@stinkycomputing/cachearoo 1.0.25 → 1.0.26
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/.github/workflows/build_and_test.yml +1 -1
- package/.github/workflows/npm-publish.yml +11 -6
- package/LICENSE +21 -0
- package/README.md +13 -0
- package/THIRD-PARTY-NOTICES.md +17 -0
- package/dist/cachearoo-node.js +0 -2
- package/dist/cachearoo.es.js +1181 -1325
- package/dist/cachearoo.min.js +4 -4
- package/dist/libs/cro.connection.js +14 -2
- package/dist/libs/cro.js +1 -1
- package/package.json +5 -7
package/dist/cachearoo.es.js
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
3
|
-
return
|
|
1
|
+
var Ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function mr(o) {
|
|
3
|
+
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
4
4
|
}
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var re = [],
|
|
10
|
-
for (var
|
|
11
|
-
re[
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
var e =
|
|
5
|
+
var Lt = {}, ze = {};
|
|
6
|
+
ze.byteLength = Er;
|
|
7
|
+
ze.toByteArray = Sr;
|
|
8
|
+
ze.fromByteArray = xr;
|
|
9
|
+
var re = [], z = [], wr = typeof Uint8Array < "u" ? Uint8Array : Array, Ve = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
10
|
+
for (var Ae = 0, br = Ve.length; Ae < br; ++Ae)
|
|
11
|
+
re[Ae] = Ve[Ae], z[Ve.charCodeAt(Ae)] = Ae;
|
|
12
|
+
z["-".charCodeAt(0)] = 62;
|
|
13
|
+
z["_".charCodeAt(0)] = 63;
|
|
14
|
+
function _t(o) {
|
|
15
|
+
var e = o.length;
|
|
16
16
|
if (e % 4 > 0)
|
|
17
17
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
18
|
-
var n =
|
|
18
|
+
var n = o.indexOf("=");
|
|
19
19
|
n === -1 && (n = e);
|
|
20
|
-
var
|
|
21
|
-
return [n,
|
|
20
|
+
var s = n === e ? 0 : 4 - n % 4;
|
|
21
|
+
return [n, s];
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
var e =
|
|
25
|
-
return (n +
|
|
23
|
+
function Er(o) {
|
|
24
|
+
var e = _t(o), n = e[0], s = e[1];
|
|
25
|
+
return (n + s) * 3 / 4 - s;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Ar(o, e, n) {
|
|
28
28
|
return (e + n) * 3 / 4 - n;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
var e, n =
|
|
30
|
+
function Sr(o) {
|
|
31
|
+
var e, n = _t(o), s = n[0], u = n[1], c = new wr(Ar(o, s, u)), l = 0, f = u > 0 ? s - 4 : s, m;
|
|
32
32
|
for (m = 0; m < f; m += 4)
|
|
33
|
-
e =
|
|
34
|
-
return u === 2 && (e =
|
|
33
|
+
e = z[o.charCodeAt(m)] << 18 | z[o.charCodeAt(m + 1)] << 12 | z[o.charCodeAt(m + 2)] << 6 | z[o.charCodeAt(m + 3)], c[l++] = e >> 16 & 255, c[l++] = e >> 8 & 255, c[l++] = e & 255;
|
|
34
|
+
return u === 2 && (e = z[o.charCodeAt(m)] << 2 | z[o.charCodeAt(m + 1)] >> 4, c[l++] = e & 255), u === 1 && (e = z[o.charCodeAt(m)] << 10 | z[o.charCodeAt(m + 1)] << 4 | z[o.charCodeAt(m + 2)] >> 2, c[l++] = e >> 8 & 255, c[l++] = e & 255), c;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return re[
|
|
36
|
+
function Tr(o) {
|
|
37
|
+
return re[o >> 18 & 63] + re[o >> 12 & 63] + re[o >> 6 & 63] + re[o & 63];
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
for (var
|
|
41
|
-
|
|
39
|
+
function Or(o, e, n) {
|
|
40
|
+
for (var s, u = [], c = e; c < n; c += 3)
|
|
41
|
+
s = (o[c] << 16 & 16711680) + (o[c + 1] << 8 & 65280) + (o[c + 2] & 255), u.push(Tr(s));
|
|
42
42
|
return u.join("");
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
for (var e, n =
|
|
46
|
-
u.push(
|
|
47
|
-
return
|
|
44
|
+
function xr(o) {
|
|
45
|
+
for (var e, n = o.length, s = n % 3, u = [], c = 16383, l = 0, f = n - s; l < f; l += c)
|
|
46
|
+
u.push(Or(o, l, l + c > f ? f : l + c));
|
|
47
|
+
return s === 1 ? (e = o[n - 1], u.push(
|
|
48
48
|
re[e >> 2] + re[e << 4 & 63] + "=="
|
|
49
|
-
)) :
|
|
49
|
+
)) : s === 2 && (e = (o[n - 2] << 8) + o[n - 1], u.push(
|
|
50
50
|
re[e >> 10] + re[e >> 4 & 63] + re[e << 2 & 63] + "="
|
|
51
51
|
)), u.join("");
|
|
52
52
|
}
|
|
53
|
-
var
|
|
53
|
+
var dt = {};
|
|
54
54
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
55
|
-
|
|
56
|
-
var c, l, f = u * 8 -
|
|
57
|
-
for (O += R, c = j & (1 << -w) - 1, j >>= -w, w += f; w > 0; c = c * 256 +
|
|
55
|
+
dt.read = function(o, e, n, s, u) {
|
|
56
|
+
var c, l, f = u * 8 - s - 1, m = (1 << f) - 1, b = m >> 1, w = -7, O = n ? u - 1 : 0, R = n ? -1 : 1, j = o[e + O];
|
|
57
|
+
for (O += R, c = j & (1 << -w) - 1, j >>= -w, w += f; w > 0; c = c * 256 + o[e + O], O += R, w -= 8)
|
|
58
58
|
;
|
|
59
|
-
for (l = c & (1 << -w) - 1, c >>= -w, w +=
|
|
59
|
+
for (l = c & (1 << -w) - 1, c >>= -w, w += s; w > 0; l = l * 256 + o[e + O], O += R, w -= 8)
|
|
60
60
|
;
|
|
61
61
|
if (c === 0)
|
|
62
62
|
c = 1 - b;
|
|
63
63
|
else {
|
|
64
64
|
if (c === m)
|
|
65
65
|
return l ? NaN : (j ? -1 : 1) * (1 / 0);
|
|
66
|
-
l = l + Math.pow(2,
|
|
66
|
+
l = l + Math.pow(2, s), c = c - b;
|
|
67
67
|
}
|
|
68
|
-
return (j ? -1 : 1) * l * Math.pow(2, c -
|
|
68
|
+
return (j ? -1 : 1) * l * Math.pow(2, c - s);
|
|
69
69
|
};
|
|
70
|
-
|
|
71
|
-
var l, f, m, b = c * 8 - u - 1, w = (1 << b) - 1, O = w >> 1, R = u === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, j =
|
|
72
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, l = w) : (l = Math.floor(Math.log(e) / Math.LN2), e * (m = Math.pow(2, -l)) < 1 && (l--, m *= 2), l + O >= 1 ? e += R / m : e += R * Math.pow(2, 1 - O), e * m >= 2 && (l++, m /= 2), l + O >= w ? (f = 0, l = w) : l + O >= 1 ? (f = (e * m - 1) * Math.pow(2, u), l = l + O) : (f = e * Math.pow(2, O - 1) * Math.pow(2, u), l = 0)); u >= 8;
|
|
70
|
+
dt.write = function(o, e, n, s, u, c) {
|
|
71
|
+
var l, f, m, b = c * 8 - u - 1, w = (1 << b) - 1, O = w >> 1, R = u === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, j = s ? 0 : c - 1, D = s ? 1 : -1, W = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
72
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, l = w) : (l = Math.floor(Math.log(e) / Math.LN2), e * (m = Math.pow(2, -l)) < 1 && (l--, m *= 2), l + O >= 1 ? e += R / m : e += R * Math.pow(2, 1 - O), e * m >= 2 && (l++, m /= 2), l + O >= w ? (f = 0, l = w) : l + O >= 1 ? (f = (e * m - 1) * Math.pow(2, u), l = l + O) : (f = e * Math.pow(2, O - 1) * Math.pow(2, u), l = 0)); u >= 8; o[n + j] = f & 255, j += D, f /= 256, u -= 8)
|
|
73
73
|
;
|
|
74
|
-
for (l = l << u | f, b += u; b > 0;
|
|
74
|
+
for (l = l << u | f, b += u; b > 0; o[n + j] = l & 255, j += D, l /= 256, b -= 8)
|
|
75
75
|
;
|
|
76
|
-
|
|
76
|
+
o[n + j - D] |= W * 128;
|
|
77
77
|
};
|
|
78
78
|
/*!
|
|
79
79
|
* The buffer module from node.js, for the browser.
|
|
@@ -81,19 +81,19 @@ vt.write = function(i, e, n, a, u, c) {
|
|
|
81
81
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
82
82
|
* @license MIT
|
|
83
83
|
*/
|
|
84
|
-
(function(
|
|
85
|
-
var e =
|
|
86
|
-
|
|
84
|
+
(function(o) {
|
|
85
|
+
var e = ze, n = dt, s = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
86
|
+
o.Buffer = f, o.SlowBuffer = ue, o.INSPECT_MAX_BYTES = 50;
|
|
87
87
|
var u = 2147483647;
|
|
88
|
-
|
|
88
|
+
o.kMaxLength = u, f.TYPED_ARRAY_SUPPORT = c(), !f.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
89
89
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
90
90
|
);
|
|
91
91
|
function c() {
|
|
92
92
|
try {
|
|
93
|
-
var
|
|
93
|
+
var a = new Uint8Array(1), t = { foo: function() {
|
|
94
94
|
return 42;
|
|
95
95
|
} };
|
|
96
|
-
return Object.setPrototypeOf(t, Uint8Array.prototype), Object.setPrototypeOf(
|
|
96
|
+
return Object.setPrototypeOf(t, Uint8Array.prototype), Object.setPrototypeOf(a, t), a.foo() === 42;
|
|
97
97
|
} catch {
|
|
98
98
|
return !1;
|
|
99
99
|
}
|
|
@@ -111,120 +111,120 @@ vt.write = function(i, e, n, a, u, c) {
|
|
|
111
111
|
return this.byteOffset;
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
function l(
|
|
115
|
-
if (
|
|
116
|
-
throw new RangeError('The value "' +
|
|
117
|
-
var t = new Uint8Array(
|
|
114
|
+
function l(a) {
|
|
115
|
+
if (a > u)
|
|
116
|
+
throw new RangeError('The value "' + a + '" is invalid for option "size"');
|
|
117
|
+
var t = new Uint8Array(a);
|
|
118
118
|
return Object.setPrototypeOf(t, f.prototype), t;
|
|
119
119
|
}
|
|
120
|
-
function f(
|
|
121
|
-
if (typeof
|
|
120
|
+
function f(a, t, r) {
|
|
121
|
+
if (typeof a == "number") {
|
|
122
122
|
if (typeof t == "string")
|
|
123
123
|
throw new TypeError(
|
|
124
124
|
'The "string" argument must be of type string. Received type number'
|
|
125
125
|
);
|
|
126
|
-
return O(
|
|
126
|
+
return O(a);
|
|
127
127
|
}
|
|
128
|
-
return m(
|
|
128
|
+
return m(a, t, r);
|
|
129
129
|
}
|
|
130
130
|
f.poolSize = 8192;
|
|
131
|
-
function m(
|
|
132
|
-
if (typeof
|
|
133
|
-
return R(
|
|
134
|
-
if (ArrayBuffer.isView(
|
|
135
|
-
return D(
|
|
136
|
-
if (
|
|
131
|
+
function m(a, t, r) {
|
|
132
|
+
if (typeof a == "string")
|
|
133
|
+
return R(a, t);
|
|
134
|
+
if (ArrayBuffer.isView(a))
|
|
135
|
+
return D(a);
|
|
136
|
+
if (a == null)
|
|
137
137
|
throw new TypeError(
|
|
138
|
-
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof
|
|
138
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof a
|
|
139
139
|
);
|
|
140
|
-
if ($(
|
|
141
|
-
return
|
|
142
|
-
if (typeof
|
|
140
|
+
if ($(a, ArrayBuffer) || a && $(a.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && ($(a, SharedArrayBuffer) || a && $(a.buffer, SharedArrayBuffer)))
|
|
141
|
+
return W(a, t, r);
|
|
142
|
+
if (typeof a == "number")
|
|
143
143
|
throw new TypeError(
|
|
144
144
|
'The "value" argument must not be of type number. Received type number'
|
|
145
145
|
);
|
|
146
|
-
var
|
|
147
|
-
if (
|
|
148
|
-
return f.from(
|
|
149
|
-
var p =
|
|
146
|
+
var i = a.valueOf && a.valueOf();
|
|
147
|
+
if (i != null && i !== a)
|
|
148
|
+
return f.from(i, t, r);
|
|
149
|
+
var p = ve(a);
|
|
150
150
|
if (p)
|
|
151
151
|
return p;
|
|
152
|
-
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof
|
|
152
|
+
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof a[Symbol.toPrimitive] == "function")
|
|
153
153
|
return f.from(
|
|
154
|
-
|
|
154
|
+
a[Symbol.toPrimitive]("string"),
|
|
155
155
|
t,
|
|
156
156
|
r
|
|
157
157
|
);
|
|
158
158
|
throw new TypeError(
|
|
159
|
-
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof
|
|
159
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof a
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
|
-
f.from = function(
|
|
163
|
-
return m(
|
|
162
|
+
f.from = function(a, t, r) {
|
|
163
|
+
return m(a, t, r);
|
|
164
164
|
}, Object.setPrototypeOf(f.prototype, Uint8Array.prototype), Object.setPrototypeOf(f, Uint8Array);
|
|
165
|
-
function b(
|
|
166
|
-
if (typeof
|
|
165
|
+
function b(a) {
|
|
166
|
+
if (typeof a != "number")
|
|
167
167
|
throw new TypeError('"size" argument must be of type number');
|
|
168
|
-
if (
|
|
169
|
-
throw new RangeError('The value "' +
|
|
168
|
+
if (a < 0)
|
|
169
|
+
throw new RangeError('The value "' + a + '" is invalid for option "size"');
|
|
170
170
|
}
|
|
171
|
-
function w(
|
|
172
|
-
return b(
|
|
171
|
+
function w(a, t, r) {
|
|
172
|
+
return b(a), a <= 0 ? l(a) : t !== void 0 ? typeof r == "string" ? l(a).fill(t, r) : l(a).fill(t) : l(a);
|
|
173
173
|
}
|
|
174
|
-
f.alloc = function(
|
|
175
|
-
return w(
|
|
174
|
+
f.alloc = function(a, t, r) {
|
|
175
|
+
return w(a, t, r);
|
|
176
176
|
};
|
|
177
|
-
function O(
|
|
178
|
-
return b(
|
|
177
|
+
function O(a) {
|
|
178
|
+
return b(a), l(a < 0 ? 0 : ne(a) | 0);
|
|
179
179
|
}
|
|
180
|
-
f.allocUnsafe = function(
|
|
181
|
-
return O(
|
|
182
|
-
}, f.allocUnsafeSlow = function(
|
|
183
|
-
return O(
|
|
180
|
+
f.allocUnsafe = function(a) {
|
|
181
|
+
return O(a);
|
|
182
|
+
}, f.allocUnsafeSlow = function(a) {
|
|
183
|
+
return O(a);
|
|
184
184
|
};
|
|
185
|
-
function R(
|
|
185
|
+
function R(a, t) {
|
|
186
186
|
if ((typeof t != "string" || t === "") && (t = "utf8"), !f.isEncoding(t))
|
|
187
187
|
throw new TypeError("Unknown encoding: " + t);
|
|
188
|
-
var r =
|
|
189
|
-
return p !== r && (
|
|
188
|
+
var r = me(a, t) | 0, i = l(r), p = i.write(a, t);
|
|
189
|
+
return p !== r && (i = i.slice(0, p)), i;
|
|
190
190
|
}
|
|
191
|
-
function j(
|
|
192
|
-
for (var t =
|
|
193
|
-
r[
|
|
191
|
+
function j(a) {
|
|
192
|
+
for (var t = a.length < 0 ? 0 : ne(a.length) | 0, r = l(t), i = 0; i < t; i += 1)
|
|
193
|
+
r[i] = a[i] & 255;
|
|
194
194
|
return r;
|
|
195
195
|
}
|
|
196
|
-
function D(
|
|
197
|
-
if ($(
|
|
198
|
-
var t = new Uint8Array(
|
|
199
|
-
return
|
|
196
|
+
function D(a) {
|
|
197
|
+
if ($(a, Uint8Array)) {
|
|
198
|
+
var t = new Uint8Array(a);
|
|
199
|
+
return W(t.buffer, t.byteOffset, t.byteLength);
|
|
200
200
|
}
|
|
201
|
-
return j(
|
|
201
|
+
return j(a);
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
if (t < 0 ||
|
|
203
|
+
function W(a, t, r) {
|
|
204
|
+
if (t < 0 || a.byteLength < t)
|
|
205
205
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
206
|
-
if (
|
|
206
|
+
if (a.byteLength < t + (r || 0))
|
|
207
207
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
208
|
-
var
|
|
209
|
-
return t === void 0 && r === void 0 ?
|
|
208
|
+
var i;
|
|
209
|
+
return t === void 0 && r === void 0 ? i = new Uint8Array(a) : r === void 0 ? i = new Uint8Array(a, t) : i = new Uint8Array(a, t, r), Object.setPrototypeOf(i, f.prototype), i;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
if (f.isBuffer(
|
|
213
|
-
var t = ne(
|
|
214
|
-
return r.length === 0 ||
|
|
211
|
+
function ve(a) {
|
|
212
|
+
if (f.isBuffer(a)) {
|
|
213
|
+
var t = ne(a.length) | 0, r = l(t);
|
|
214
|
+
return r.length === 0 || a.copy(r, 0, 0, t), r;
|
|
215
215
|
}
|
|
216
|
-
if (
|
|
217
|
-
return typeof
|
|
218
|
-
if (
|
|
219
|
-
return j(
|
|
216
|
+
if (a.length !== void 0)
|
|
217
|
+
return typeof a.length != "number" || Y(a.length) ? l(0) : j(a);
|
|
218
|
+
if (a.type === "Buffer" && Array.isArray(a.data))
|
|
219
|
+
return j(a.data);
|
|
220
220
|
}
|
|
221
|
-
function ne(
|
|
222
|
-
if (
|
|
221
|
+
function ne(a) {
|
|
222
|
+
if (a >= u)
|
|
223
223
|
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + u.toString(16) + " bytes");
|
|
224
|
-
return
|
|
224
|
+
return a | 0;
|
|
225
225
|
}
|
|
226
|
-
function ue(
|
|
227
|
-
return +
|
|
226
|
+
function ue(a) {
|
|
227
|
+
return +a != a && (a = 0), f.alloc(+a);
|
|
228
228
|
}
|
|
229
229
|
f.isBuffer = function(t) {
|
|
230
230
|
return t != null && t._isBuffer === !0 && t !== f.prototype;
|
|
@@ -235,12 +235,12 @@ vt.write = function(i, e, n, a, u, c) {
|
|
|
235
235
|
);
|
|
236
236
|
if (t === r)
|
|
237
237
|
return 0;
|
|
238
|
-
for (var
|
|
238
|
+
for (var i = t.length, p = r.length, d = 0, v = Math.min(i, p); d < v; ++d)
|
|
239
239
|
if (t[d] !== r[d]) {
|
|
240
|
-
|
|
240
|
+
i = t[d], p = r[d];
|
|
241
241
|
break;
|
|
242
242
|
}
|
|
243
|
-
return
|
|
243
|
+
return i < p ? -1 : p < i ? 1 : 0;
|
|
244
244
|
}, f.isEncoding = function(t) {
|
|
245
245
|
switch (String(t).toLowerCase()) {
|
|
246
246
|
case "hex":
|
|
@@ -263,13 +263,13 @@ vt.write = function(i, e, n, a, u, c) {
|
|
|
263
263
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
264
264
|
if (t.length === 0)
|
|
265
265
|
return f.alloc(0);
|
|
266
|
-
var
|
|
266
|
+
var i;
|
|
267
267
|
if (r === void 0)
|
|
268
|
-
for (r = 0,
|
|
269
|
-
r += t[
|
|
268
|
+
for (r = 0, i = 0; i < t.length; ++i)
|
|
269
|
+
r += t[i].length;
|
|
270
270
|
var p = f.allocUnsafe(r), d = 0;
|
|
271
|
-
for (
|
|
272
|
-
var v = t[
|
|
271
|
+
for (i = 0; i < t.length; ++i) {
|
|
272
|
+
var v = t[i];
|
|
273
273
|
if ($(v, Uint8Array))
|
|
274
274
|
d + v.length > p.length ? f.from(v).copy(p, d) : Uint8Array.prototype.set.call(
|
|
275
275
|
p,
|
|
@@ -284,17 +284,17 @@ vt.write = function(i, e, n, a, u, c) {
|
|
|
284
284
|
}
|
|
285
285
|
return p;
|
|
286
286
|
};
|
|
287
|
-
function
|
|
288
|
-
if (f.isBuffer(
|
|
289
|
-
return
|
|
290
|
-
if (ArrayBuffer.isView(
|
|
291
|
-
return
|
|
292
|
-
if (typeof
|
|
287
|
+
function me(a, t) {
|
|
288
|
+
if (f.isBuffer(a))
|
|
289
|
+
return a.length;
|
|
290
|
+
if (ArrayBuffer.isView(a) || $(a, ArrayBuffer))
|
|
291
|
+
return a.byteLength;
|
|
292
|
+
if (typeof a != "string")
|
|
293
293
|
throw new TypeError(
|
|
294
|
-
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof
|
|
294
|
+
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof a
|
|
295
295
|
);
|
|
296
|
-
var r =
|
|
297
|
-
if (!
|
|
296
|
+
var r = a.length, i = arguments.length > 2 && arguments[2] === !0;
|
|
297
|
+
if (!i && r === 0)
|
|
298
298
|
return 0;
|
|
299
299
|
for (var p = !1; ; )
|
|
300
300
|
switch (t) {
|
|
@@ -304,7 +304,7 @@ vt.write = function(i, e, n, a, u, c) {
|
|
|
304
304
|
return r;
|
|
305
305
|
case "utf8":
|
|
306
306
|
case "utf-8":
|
|
307
|
-
return A(
|
|
307
|
+
return A(a).length;
|
|
308
308
|
case "ucs2":
|
|
309
309
|
case "ucs-2":
|
|
310
310
|
case "utf16le":
|
|
@@ -313,20 +313,20 @@ vt.write = function(i, e, n, a, u, c) {
|
|
|
313
313
|
case "hex":
|
|
314
314
|
return r >>> 1;
|
|
315
315
|
case "base64":
|
|
316
|
-
return
|
|
316
|
+
return N(a).length;
|
|
317
317
|
default:
|
|
318
318
|
if (p)
|
|
319
|
-
return
|
|
319
|
+
return i ? -1 : A(a).length;
|
|
320
320
|
t = ("" + t).toLowerCase(), p = !0;
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
-
f.byteLength =
|
|
324
|
-
function
|
|
325
|
-
var
|
|
323
|
+
f.byteLength = me;
|
|
324
|
+
function we(a, t, r) {
|
|
325
|
+
var i = !1;
|
|
326
326
|
if ((t === void 0 || t < 0) && (t = 0), t > this.length || ((r === void 0 || r > this.length) && (r = this.length), r <= 0) || (r >>>= 0, t >>>= 0, r <= t))
|
|
327
327
|
return "";
|
|
328
|
-
for (
|
|
329
|
-
switch (
|
|
328
|
+
for (a || (a = "utf8"); ; )
|
|
329
|
+
switch (a) {
|
|
330
330
|
case "hex":
|
|
331
331
|
return V(this, t, r);
|
|
332
332
|
case "utf8":
|
|
@@ -338,191 +338,191 @@ vt.write = function(i, e, n, a, u, c) {
|
|
|
338
338
|
case "binary":
|
|
339
339
|
return pe(this, t, r);
|
|
340
340
|
case "base64":
|
|
341
|
-
return
|
|
341
|
+
return Re(this, t, r);
|
|
342
342
|
case "ucs2":
|
|
343
343
|
case "ucs-2":
|
|
344
344
|
case "utf16le":
|
|
345
345
|
case "utf-16le":
|
|
346
346
|
return he(this, t, r);
|
|
347
347
|
default:
|
|
348
|
-
if (
|
|
349
|
-
throw new TypeError("Unknown encoding: " +
|
|
350
|
-
|
|
348
|
+
if (i)
|
|
349
|
+
throw new TypeError("Unknown encoding: " + a);
|
|
350
|
+
a = (a + "").toLowerCase(), i = !0;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
f.prototype._isBuffer = !0;
|
|
354
|
-
function
|
|
355
|
-
var
|
|
356
|
-
|
|
354
|
+
function G(a, t, r) {
|
|
355
|
+
var i = a[t];
|
|
356
|
+
a[t] = a[r], a[r] = i;
|
|
357
357
|
}
|
|
358
358
|
f.prototype.swap16 = function() {
|
|
359
359
|
var t = this.length;
|
|
360
360
|
if (t % 2 !== 0)
|
|
361
361
|
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
362
362
|
for (var r = 0; r < t; r += 2)
|
|
363
|
-
|
|
363
|
+
G(this, r, r + 1);
|
|
364
364
|
return this;
|
|
365
365
|
}, f.prototype.swap32 = function() {
|
|
366
366
|
var t = this.length;
|
|
367
367
|
if (t % 4 !== 0)
|
|
368
368
|
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
369
369
|
for (var r = 0; r < t; r += 4)
|
|
370
|
-
|
|
370
|
+
G(this, r, r + 3), G(this, r + 1, r + 2);
|
|
371
371
|
return this;
|
|
372
372
|
}, f.prototype.swap64 = function() {
|
|
373
373
|
var t = this.length;
|
|
374
374
|
if (t % 8 !== 0)
|
|
375
375
|
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
376
376
|
for (var r = 0; r < t; r += 8)
|
|
377
|
-
|
|
377
|
+
G(this, r, r + 7), G(this, r + 1, r + 6), G(this, r + 2, r + 5), G(this, r + 3, r + 4);
|
|
378
378
|
return this;
|
|
379
379
|
}, f.prototype.toString = function() {
|
|
380
380
|
var t = this.length;
|
|
381
|
-
return t === 0 ? "" : arguments.length === 0 ? Q(this, 0, t) :
|
|
381
|
+
return t === 0 ? "" : arguments.length === 0 ? Q(this, 0, t) : we.apply(this, arguments);
|
|
382
382
|
}, f.prototype.toLocaleString = f.prototype.toString, f.prototype.equals = function(t) {
|
|
383
383
|
if (!f.isBuffer(t))
|
|
384
384
|
throw new TypeError("Argument must be a Buffer");
|
|
385
385
|
return this === t ? !0 : f.compare(this, t) === 0;
|
|
386
386
|
}, f.prototype.inspect = function() {
|
|
387
|
-
var t = "", r =
|
|
387
|
+
var t = "", r = o.INSPECT_MAX_BYTES;
|
|
388
388
|
return t = this.toString("hex", 0, r).replace(/(.{2})/g, "$1 ").trim(), this.length > r && (t += " ... "), "<Buffer " + t + ">";
|
|
389
|
-
},
|
|
389
|
+
}, s && (f.prototype[s] = f.prototype.inspect), f.prototype.compare = function(t, r, i, p, d) {
|
|
390
390
|
if ($(t, Uint8Array) && (t = f.from(t, t.offset, t.byteLength)), !f.isBuffer(t))
|
|
391
391
|
throw new TypeError(
|
|
392
392
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t
|
|
393
393
|
);
|
|
394
|
-
if (r === void 0 && (r = 0),
|
|
394
|
+
if (r === void 0 && (r = 0), i === void 0 && (i = t ? t.length : 0), p === void 0 && (p = 0), d === void 0 && (d = this.length), r < 0 || i > t.length || p < 0 || d > this.length)
|
|
395
395
|
throw new RangeError("out of range index");
|
|
396
|
-
if (p >= d && r >=
|
|
396
|
+
if (p >= d && r >= i)
|
|
397
397
|
return 0;
|
|
398
398
|
if (p >= d)
|
|
399
399
|
return -1;
|
|
400
|
-
if (r >=
|
|
400
|
+
if (r >= i)
|
|
401
401
|
return 1;
|
|
402
|
-
if (r >>>= 0,
|
|
402
|
+
if (r >>>= 0, i >>>= 0, p >>>= 0, d >>>= 0, this === t)
|
|
403
403
|
return 0;
|
|
404
|
-
for (var v = d - p,
|
|
405
|
-
if (_
|
|
406
|
-
v = _
|
|
404
|
+
for (var v = d - p, F = i - r, k = Math.min(v, F), U = this.slice(p, d), q = t.slice(r, i), _ = 0; _ < k; ++_)
|
|
405
|
+
if (U[_] !== q[_]) {
|
|
406
|
+
v = U[_], F = q[_];
|
|
407
407
|
break;
|
|
408
408
|
}
|
|
409
|
-
return v <
|
|
409
|
+
return v < F ? -1 : F < v ? 1 : 0;
|
|
410
410
|
};
|
|
411
|
-
function
|
|
412
|
-
if (
|
|
411
|
+
function be(a, t, r, i, p) {
|
|
412
|
+
if (a.length === 0)
|
|
413
413
|
return -1;
|
|
414
|
-
if (typeof r == "string" ? (
|
|
414
|
+
if (typeof r == "string" ? (i = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), r = +r, Y(r) && (r = p ? 0 : a.length - 1), r < 0 && (r = a.length + r), r >= a.length) {
|
|
415
415
|
if (p)
|
|
416
416
|
return -1;
|
|
417
|
-
r =
|
|
417
|
+
r = a.length - 1;
|
|
418
418
|
} else if (r < 0)
|
|
419
419
|
if (p)
|
|
420
420
|
r = 0;
|
|
421
421
|
else
|
|
422
422
|
return -1;
|
|
423
|
-
if (typeof t == "string" && (t = f.from(t,
|
|
424
|
-
return t.length === 0 ? -1 : J(
|
|
423
|
+
if (typeof t == "string" && (t = f.from(t, i)), f.isBuffer(t))
|
|
424
|
+
return t.length === 0 ? -1 : J(a, t, r, i, p);
|
|
425
425
|
if (typeof t == "number")
|
|
426
|
-
return t = t & 255, typeof Uint8Array.prototype.indexOf == "function" ? p ? Uint8Array.prototype.indexOf.call(
|
|
426
|
+
return t = t & 255, typeof Uint8Array.prototype.indexOf == "function" ? p ? Uint8Array.prototype.indexOf.call(a, t, r) : Uint8Array.prototype.lastIndexOf.call(a, t, r) : J(a, [t], r, i, p);
|
|
427
427
|
throw new TypeError("val must be string, number or Buffer");
|
|
428
428
|
}
|
|
429
|
-
function J(
|
|
430
|
-
var d = 1, v =
|
|
431
|
-
if (
|
|
432
|
-
if (
|
|
429
|
+
function J(a, t, r, i, p) {
|
|
430
|
+
var d = 1, v = a.length, F = t.length;
|
|
431
|
+
if (i !== void 0 && (i = String(i).toLowerCase(), i === "ucs2" || i === "ucs-2" || i === "utf16le" || i === "utf-16le")) {
|
|
432
|
+
if (a.length < 2 || t.length < 2)
|
|
433
433
|
return -1;
|
|
434
|
-
d = 2, v /= 2,
|
|
434
|
+
d = 2, v /= 2, F /= 2, r /= 2;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
return d === 1 ?
|
|
436
|
+
function k(St, Tt) {
|
|
437
|
+
return d === 1 ? St[Tt] : St.readUInt16BE(Tt * d);
|
|
438
438
|
}
|
|
439
|
-
var
|
|
439
|
+
var U;
|
|
440
440
|
if (p) {
|
|
441
441
|
var q = -1;
|
|
442
|
-
for (
|
|
443
|
-
if (
|
|
444
|
-
if (q === -1 && (q =
|
|
442
|
+
for (U = r; U < v; U++)
|
|
443
|
+
if (k(a, U) === k(t, q === -1 ? 0 : U - q)) {
|
|
444
|
+
if (q === -1 && (q = U), U - q + 1 === F)
|
|
445
445
|
return q * d;
|
|
446
446
|
} else
|
|
447
|
-
q !== -1 && (
|
|
447
|
+
q !== -1 && (U -= U - q), q = -1;
|
|
448
448
|
} else
|
|
449
|
-
for (r +
|
|
450
|
-
for (var
|
|
451
|
-
if (
|
|
452
|
-
|
|
449
|
+
for (r + F > v && (r = v - F), U = r; U >= 0; U--) {
|
|
450
|
+
for (var _ = !0, je = 0; je < F; je++)
|
|
451
|
+
if (k(a, U + je) !== k(t, je)) {
|
|
452
|
+
_ = !1;
|
|
453
453
|
break;
|
|
454
454
|
}
|
|
455
|
-
if (
|
|
456
|
-
return
|
|
455
|
+
if (_)
|
|
456
|
+
return U;
|
|
457
457
|
}
|
|
458
458
|
return -1;
|
|
459
459
|
}
|
|
460
|
-
f.prototype.includes = function(t, r,
|
|
461
|
-
return this.indexOf(t, r,
|
|
462
|
-
}, f.prototype.indexOf = function(t, r,
|
|
463
|
-
return
|
|
464
|
-
}, f.prototype.lastIndexOf = function(t, r,
|
|
465
|
-
return
|
|
460
|
+
f.prototype.includes = function(t, r, i) {
|
|
461
|
+
return this.indexOf(t, r, i) !== -1;
|
|
462
|
+
}, f.prototype.indexOf = function(t, r, i) {
|
|
463
|
+
return be(this, t, r, i, !0);
|
|
464
|
+
}, f.prototype.lastIndexOf = function(t, r, i) {
|
|
465
|
+
return be(this, t, r, i, !1);
|
|
466
466
|
};
|
|
467
|
-
function ie(
|
|
467
|
+
function ie(a, t, r, i) {
|
|
468
468
|
r = Number(r) || 0;
|
|
469
|
-
var p =
|
|
470
|
-
|
|
469
|
+
var p = a.length - r;
|
|
470
|
+
i ? (i = Number(i), i > p && (i = p)) : i = p;
|
|
471
471
|
var d = t.length;
|
|
472
|
-
|
|
473
|
-
for (var v = 0; v <
|
|
474
|
-
var
|
|
475
|
-
if (Y(
|
|
472
|
+
i > d / 2 && (i = d / 2);
|
|
473
|
+
for (var v = 0; v < i; ++v) {
|
|
474
|
+
var F = parseInt(t.substr(v * 2, 2), 16);
|
|
475
|
+
if (Y(F))
|
|
476
476
|
return v;
|
|
477
|
-
|
|
477
|
+
a[r + v] = F;
|
|
478
478
|
}
|
|
479
479
|
return v;
|
|
480
480
|
}
|
|
481
|
-
function X(
|
|
482
|
-
return
|
|
481
|
+
function X(a, t, r, i) {
|
|
482
|
+
return H(A(t, a.length - r), a, r, i);
|
|
483
483
|
}
|
|
484
|
-
function fe(
|
|
485
|
-
return
|
|
484
|
+
function fe(a, t, r, i) {
|
|
485
|
+
return H(T(t), a, r, i);
|
|
486
486
|
}
|
|
487
|
-
function oe(
|
|
488
|
-
return
|
|
487
|
+
function oe(a, t, r, i) {
|
|
488
|
+
return H(N(t), a, r, i);
|
|
489
489
|
}
|
|
490
|
-
function K(
|
|
491
|
-
return
|
|
490
|
+
function K(a, t, r, i) {
|
|
491
|
+
return H(P(t, a.length - r), a, r, i);
|
|
492
492
|
}
|
|
493
|
-
f.prototype.write = function(t, r,
|
|
493
|
+
f.prototype.write = function(t, r, i, p) {
|
|
494
494
|
if (r === void 0)
|
|
495
|
-
p = "utf8",
|
|
496
|
-
else if (
|
|
497
|
-
p = r,
|
|
495
|
+
p = "utf8", i = this.length, r = 0;
|
|
496
|
+
else if (i === void 0 && typeof r == "string")
|
|
497
|
+
p = r, i = this.length, r = 0;
|
|
498
498
|
else if (isFinite(r))
|
|
499
|
-
r = r >>> 0, isFinite(
|
|
499
|
+
r = r >>> 0, isFinite(i) ? (i = i >>> 0, p === void 0 && (p = "utf8")) : (p = i, i = void 0);
|
|
500
500
|
else
|
|
501
501
|
throw new Error(
|
|
502
502
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
503
503
|
);
|
|
504
504
|
var d = this.length - r;
|
|
505
|
-
if ((
|
|
505
|
+
if ((i === void 0 || i > d) && (i = d), t.length > 0 && (i < 0 || r < 0) || r > this.length)
|
|
506
506
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
507
507
|
p || (p = "utf8");
|
|
508
508
|
for (var v = !1; ; )
|
|
509
509
|
switch (p) {
|
|
510
510
|
case "hex":
|
|
511
|
-
return ie(this, t, r,
|
|
511
|
+
return ie(this, t, r, i);
|
|
512
512
|
case "utf8":
|
|
513
513
|
case "utf-8":
|
|
514
|
-
return X(this, t, r,
|
|
514
|
+
return X(this, t, r, i);
|
|
515
515
|
case "ascii":
|
|
516
516
|
case "latin1":
|
|
517
517
|
case "binary":
|
|
518
|
-
return fe(this, t, r,
|
|
518
|
+
return fe(this, t, r, i);
|
|
519
519
|
case "base64":
|
|
520
|
-
return oe(this, t, r,
|
|
520
|
+
return oe(this, t, r, i);
|
|
521
521
|
case "ucs2":
|
|
522
522
|
case "ucs-2":
|
|
523
523
|
case "utf16le":
|
|
524
524
|
case "utf-16le":
|
|
525
|
-
return K(this, t, r,
|
|
525
|
+
return K(this, t, r, i);
|
|
526
526
|
default:
|
|
527
527
|
if (v)
|
|
528
528
|
throw new TypeError("Unknown encoding: " + p);
|
|
@@ -534,243 +534,243 @@ vt.write = function(i, e, n, a, u, c) {
|
|
|
534
534
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
535
535
|
};
|
|
536
536
|
};
|
|
537
|
-
function
|
|
538
|
-
return t === 0 && r ===
|
|
539
|
-
}
|
|
540
|
-
function Q(
|
|
541
|
-
r = Math.min(
|
|
542
|
-
for (var
|
|
543
|
-
var d =
|
|
544
|
-
if (p +
|
|
545
|
-
var
|
|
546
|
-
switch (
|
|
537
|
+
function Re(a, t, r) {
|
|
538
|
+
return t === 0 && r === a.length ? e.fromByteArray(a) : e.fromByteArray(a.slice(t, r));
|
|
539
|
+
}
|
|
540
|
+
function Q(a, t, r) {
|
|
541
|
+
r = Math.min(a.length, r);
|
|
542
|
+
for (var i = [], p = t; p < r; ) {
|
|
543
|
+
var d = a[p], v = null, F = d > 239 ? 4 : d > 223 ? 3 : d > 191 ? 2 : 1;
|
|
544
|
+
if (p + F <= r) {
|
|
545
|
+
var k, U, q, _;
|
|
546
|
+
switch (F) {
|
|
547
547
|
case 1:
|
|
548
548
|
d < 128 && (v = d);
|
|
549
549
|
break;
|
|
550
550
|
case 2:
|
|
551
|
-
|
|
551
|
+
k = a[p + 1], (k & 192) === 128 && (_ = (d & 31) << 6 | k & 63, _ > 127 && (v = _));
|
|
552
552
|
break;
|
|
553
553
|
case 3:
|
|
554
|
-
|
|
554
|
+
k = a[p + 1], U = a[p + 2], (k & 192) === 128 && (U & 192) === 128 && (_ = (d & 15) << 12 | (k & 63) << 6 | U & 63, _ > 2047 && (_ < 55296 || _ > 57343) && (v = _));
|
|
555
555
|
break;
|
|
556
556
|
case 4:
|
|
557
|
-
|
|
557
|
+
k = a[p + 1], U = a[p + 2], q = a[p + 3], (k & 192) === 128 && (U & 192) === 128 && (q & 192) === 128 && (_ = (d & 15) << 18 | (k & 63) << 12 | (U & 63) << 6 | q & 63, _ > 65535 && _ < 1114112 && (v = _));
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
v === null ? (v = 65533,
|
|
560
|
+
v === null ? (v = 65533, F = 1) : v > 65535 && (v -= 65536, i.push(v >>> 10 & 1023 | 55296), v = 56320 | v & 1023), i.push(v), p += F;
|
|
561
561
|
}
|
|
562
|
-
return le(
|
|
562
|
+
return le(i);
|
|
563
563
|
}
|
|
564
564
|
var ce = 4096;
|
|
565
|
-
function le(
|
|
566
|
-
var t =
|
|
565
|
+
function le(a) {
|
|
566
|
+
var t = a.length;
|
|
567
567
|
if (t <= ce)
|
|
568
|
-
return String.fromCharCode.apply(String,
|
|
569
|
-
for (var r = "",
|
|
568
|
+
return String.fromCharCode.apply(String, a);
|
|
569
|
+
for (var r = "", i = 0; i < t; )
|
|
570
570
|
r += String.fromCharCode.apply(
|
|
571
571
|
String,
|
|
572
|
-
|
|
572
|
+
a.slice(i, i += ce)
|
|
573
573
|
);
|
|
574
574
|
return r;
|
|
575
575
|
}
|
|
576
|
-
function Be(
|
|
577
|
-
var
|
|
578
|
-
r = Math.min(
|
|
576
|
+
function Be(a, t, r) {
|
|
577
|
+
var i = "";
|
|
578
|
+
r = Math.min(a.length, r);
|
|
579
579
|
for (var p = t; p < r; ++p)
|
|
580
|
-
|
|
581
|
-
return
|
|
580
|
+
i += String.fromCharCode(a[p] & 127);
|
|
581
|
+
return i;
|
|
582
582
|
}
|
|
583
|
-
function pe(
|
|
584
|
-
var
|
|
585
|
-
r = Math.min(
|
|
583
|
+
function pe(a, t, r) {
|
|
584
|
+
var i = "";
|
|
585
|
+
r = Math.min(a.length, r);
|
|
586
586
|
for (var p = t; p < r; ++p)
|
|
587
|
-
|
|
588
|
-
return
|
|
587
|
+
i += String.fromCharCode(a[p]);
|
|
588
|
+
return i;
|
|
589
589
|
}
|
|
590
|
-
function V(
|
|
591
|
-
var
|
|
592
|
-
(!t || t < 0) && (t = 0), (!r || r < 0 || r >
|
|
590
|
+
function V(a, t, r) {
|
|
591
|
+
var i = a.length;
|
|
592
|
+
(!t || t < 0) && (t = 0), (!r || r < 0 || r > i) && (r = i);
|
|
593
593
|
for (var p = "", d = t; d < r; ++d)
|
|
594
|
-
p +=
|
|
594
|
+
p += Ee[a[d]];
|
|
595
595
|
return p;
|
|
596
596
|
}
|
|
597
|
-
function he(
|
|
598
|
-
for (var
|
|
599
|
-
p += String.fromCharCode(
|
|
597
|
+
function he(a, t, r) {
|
|
598
|
+
for (var i = a.slice(t, r), p = "", d = 0; d < i.length - 1; d += 2)
|
|
599
|
+
p += String.fromCharCode(i[d] + i[d + 1] * 256);
|
|
600
600
|
return p;
|
|
601
601
|
}
|
|
602
602
|
f.prototype.slice = function(t, r) {
|
|
603
|
-
var
|
|
604
|
-
t = ~~t, r = r === void 0 ?
|
|
603
|
+
var i = this.length;
|
|
604
|
+
t = ~~t, r = r === void 0 ? i : ~~r, t < 0 ? (t += i, t < 0 && (t = 0)) : t > i && (t = i), r < 0 ? (r += i, r < 0 && (r = 0)) : r > i && (r = i), r < t && (r = t);
|
|
605
605
|
var p = this.subarray(t, r);
|
|
606
606
|
return Object.setPrototypeOf(p, f.prototype), p;
|
|
607
607
|
};
|
|
608
|
-
function
|
|
609
|
-
if (
|
|
608
|
+
function L(a, t, r) {
|
|
609
|
+
if (a % 1 !== 0 || a < 0)
|
|
610
610
|
throw new RangeError("offset is not uint");
|
|
611
|
-
if (
|
|
611
|
+
if (a + t > r)
|
|
612
612
|
throw new RangeError("Trying to access beyond buffer length");
|
|
613
613
|
}
|
|
614
|
-
f.prototype.readUintLE = f.prototype.readUIntLE = function(t, r,
|
|
615
|
-
t = t >>> 0, r = r >>> 0,
|
|
614
|
+
f.prototype.readUintLE = f.prototype.readUIntLE = function(t, r, i) {
|
|
615
|
+
t = t >>> 0, r = r >>> 0, i || L(t, r, this.length);
|
|
616
616
|
for (var p = this[t], d = 1, v = 0; ++v < r && (d *= 256); )
|
|
617
617
|
p += this[t + v] * d;
|
|
618
618
|
return p;
|
|
619
|
-
}, f.prototype.readUintBE = f.prototype.readUIntBE = function(t, r,
|
|
620
|
-
t = t >>> 0, r = r >>> 0,
|
|
619
|
+
}, f.prototype.readUintBE = f.prototype.readUIntBE = function(t, r, i) {
|
|
620
|
+
t = t >>> 0, r = r >>> 0, i || L(t, r, this.length);
|
|
621
621
|
for (var p = this[t + --r], d = 1; r > 0 && (d *= 256); )
|
|
622
622
|
p += this[t + --r] * d;
|
|
623
623
|
return p;
|
|
624
624
|
}, f.prototype.readUint8 = f.prototype.readUInt8 = function(t, r) {
|
|
625
|
-
return t = t >>> 0, r ||
|
|
625
|
+
return t = t >>> 0, r || L(t, 1, this.length), this[t];
|
|
626
626
|
}, f.prototype.readUint16LE = f.prototype.readUInt16LE = function(t, r) {
|
|
627
|
-
return t = t >>> 0, r ||
|
|
627
|
+
return t = t >>> 0, r || L(t, 2, this.length), this[t] | this[t + 1] << 8;
|
|
628
628
|
}, f.prototype.readUint16BE = f.prototype.readUInt16BE = function(t, r) {
|
|
629
|
-
return t = t >>> 0, r ||
|
|
629
|
+
return t = t >>> 0, r || L(t, 2, this.length), this[t] << 8 | this[t + 1];
|
|
630
630
|
}, f.prototype.readUint32LE = f.prototype.readUInt32LE = function(t, r) {
|
|
631
|
-
return t = t >>> 0, r ||
|
|
631
|
+
return t = t >>> 0, r || L(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + this[t + 3] * 16777216;
|
|
632
632
|
}, f.prototype.readUint32BE = f.prototype.readUInt32BE = function(t, r) {
|
|
633
|
-
return t = t >>> 0, r ||
|
|
634
|
-
}, f.prototype.readIntLE = function(t, r,
|
|
635
|
-
t = t >>> 0, r = r >>> 0,
|
|
633
|
+
return t = t >>> 0, r || L(t, 4, this.length), this[t] * 16777216 + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
|
|
634
|
+
}, f.prototype.readIntLE = function(t, r, i) {
|
|
635
|
+
t = t >>> 0, r = r >>> 0, i || L(t, r, this.length);
|
|
636
636
|
for (var p = this[t], d = 1, v = 0; ++v < r && (d *= 256); )
|
|
637
637
|
p += this[t + v] * d;
|
|
638
638
|
return d *= 128, p >= d && (p -= Math.pow(2, 8 * r)), p;
|
|
639
|
-
}, f.prototype.readIntBE = function(t, r,
|
|
640
|
-
t = t >>> 0, r = r >>> 0,
|
|
639
|
+
}, f.prototype.readIntBE = function(t, r, i) {
|
|
640
|
+
t = t >>> 0, r = r >>> 0, i || L(t, r, this.length);
|
|
641
641
|
for (var p = r, d = 1, v = this[t + --p]; p > 0 && (d *= 256); )
|
|
642
642
|
v += this[t + --p] * d;
|
|
643
643
|
return d *= 128, v >= d && (v -= Math.pow(2, 8 * r)), v;
|
|
644
644
|
}, f.prototype.readInt8 = function(t, r) {
|
|
645
|
-
return t = t >>> 0, r ||
|
|
645
|
+
return t = t >>> 0, r || L(t, 1, this.length), this[t] & 128 ? (255 - this[t] + 1) * -1 : this[t];
|
|
646
646
|
}, f.prototype.readInt16LE = function(t, r) {
|
|
647
|
-
t = t >>> 0, r ||
|
|
648
|
-
var
|
|
649
|
-
return
|
|
647
|
+
t = t >>> 0, r || L(t, 2, this.length);
|
|
648
|
+
var i = this[t] | this[t + 1] << 8;
|
|
649
|
+
return i & 32768 ? i | 4294901760 : i;
|
|
650
650
|
}, f.prototype.readInt16BE = function(t, r) {
|
|
651
|
-
t = t >>> 0, r ||
|
|
652
|
-
var
|
|
653
|
-
return
|
|
651
|
+
t = t >>> 0, r || L(t, 2, this.length);
|
|
652
|
+
var i = this[t + 1] | this[t] << 8;
|
|
653
|
+
return i & 32768 ? i | 4294901760 : i;
|
|
654
654
|
}, f.prototype.readInt32LE = function(t, r) {
|
|
655
|
-
return t = t >>> 0, r ||
|
|
655
|
+
return t = t >>> 0, r || L(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24;
|
|
656
656
|
}, f.prototype.readInt32BE = function(t, r) {
|
|
657
|
-
return t = t >>> 0, r ||
|
|
657
|
+
return t = t >>> 0, r || L(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3];
|
|
658
658
|
}, f.prototype.readFloatLE = function(t, r) {
|
|
659
|
-
return t = t >>> 0, r ||
|
|
659
|
+
return t = t >>> 0, r || L(t, 4, this.length), n.read(this, t, !0, 23, 4);
|
|
660
660
|
}, f.prototype.readFloatBE = function(t, r) {
|
|
661
|
-
return t = t >>> 0, r ||
|
|
661
|
+
return t = t >>> 0, r || L(t, 4, this.length), n.read(this, t, !1, 23, 4);
|
|
662
662
|
}, f.prototype.readDoubleLE = function(t, r) {
|
|
663
|
-
return t = t >>> 0, r ||
|
|
663
|
+
return t = t >>> 0, r || L(t, 8, this.length), n.read(this, t, !0, 52, 8);
|
|
664
664
|
}, f.prototype.readDoubleBE = function(t, r) {
|
|
665
|
-
return t = t >>> 0, r ||
|
|
665
|
+
return t = t >>> 0, r || L(t, 8, this.length), n.read(this, t, !1, 52, 8);
|
|
666
666
|
};
|
|
667
|
-
function h(
|
|
668
|
-
if (!f.isBuffer(
|
|
667
|
+
function h(a, t, r, i, p, d) {
|
|
668
|
+
if (!f.isBuffer(a))
|
|
669
669
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
670
670
|
if (t > p || t < d)
|
|
671
671
|
throw new RangeError('"value" argument is out of bounds');
|
|
672
|
-
if (r +
|
|
672
|
+
if (r + i > a.length)
|
|
673
673
|
throw new RangeError("Index out of range");
|
|
674
674
|
}
|
|
675
|
-
f.prototype.writeUintLE = f.prototype.writeUIntLE = function(t, r,
|
|
676
|
-
if (t = +t, r = r >>> 0,
|
|
677
|
-
var d = Math.pow(2, 8 *
|
|
678
|
-
h(this, t, r,
|
|
675
|
+
f.prototype.writeUintLE = f.prototype.writeUIntLE = function(t, r, i, p) {
|
|
676
|
+
if (t = +t, r = r >>> 0, i = i >>> 0, !p) {
|
|
677
|
+
var d = Math.pow(2, 8 * i) - 1;
|
|
678
|
+
h(this, t, r, i, d, 0);
|
|
679
679
|
}
|
|
680
|
-
var v = 1,
|
|
681
|
-
for (this[r] = t & 255; ++
|
|
682
|
-
this[r +
|
|
683
|
-
return r +
|
|
684
|
-
}, f.prototype.writeUintBE = f.prototype.writeUIntBE = function(t, r,
|
|
685
|
-
if (t = +t, r = r >>> 0,
|
|
686
|
-
var d = Math.pow(2, 8 *
|
|
687
|
-
h(this, t, r,
|
|
680
|
+
var v = 1, F = 0;
|
|
681
|
+
for (this[r] = t & 255; ++F < i && (v *= 256); )
|
|
682
|
+
this[r + F] = t / v & 255;
|
|
683
|
+
return r + i;
|
|
684
|
+
}, f.prototype.writeUintBE = f.prototype.writeUIntBE = function(t, r, i, p) {
|
|
685
|
+
if (t = +t, r = r >>> 0, i = i >>> 0, !p) {
|
|
686
|
+
var d = Math.pow(2, 8 * i) - 1;
|
|
687
|
+
h(this, t, r, i, d, 0);
|
|
688
688
|
}
|
|
689
|
-
var v =
|
|
690
|
-
for (this[r + v] = t & 255; --v >= 0 && (
|
|
691
|
-
this[r + v] = t /
|
|
692
|
-
return r +
|
|
693
|
-
}, f.prototype.writeUint8 = f.prototype.writeUInt8 = function(t, r,
|
|
694
|
-
return t = +t, r = r >>> 0,
|
|
695
|
-
}, f.prototype.writeUint16LE = f.prototype.writeUInt16LE = function(t, r,
|
|
696
|
-
return t = +t, r = r >>> 0,
|
|
697
|
-
}, f.prototype.writeUint16BE = f.prototype.writeUInt16BE = function(t, r,
|
|
698
|
-
return t = +t, r = r >>> 0,
|
|
699
|
-
}, f.prototype.writeUint32LE = f.prototype.writeUInt32LE = function(t, r,
|
|
700
|
-
return t = +t, r = r >>> 0,
|
|
701
|
-
}, f.prototype.writeUint32BE = f.prototype.writeUInt32BE = function(t, r,
|
|
702
|
-
return t = +t, r = r >>> 0,
|
|
703
|
-
}, f.prototype.writeIntLE = function(t, r,
|
|
689
|
+
var v = i - 1, F = 1;
|
|
690
|
+
for (this[r + v] = t & 255; --v >= 0 && (F *= 256); )
|
|
691
|
+
this[r + v] = t / F & 255;
|
|
692
|
+
return r + i;
|
|
693
|
+
}, f.prototype.writeUint8 = f.prototype.writeUInt8 = function(t, r, i) {
|
|
694
|
+
return t = +t, r = r >>> 0, i || h(this, t, r, 1, 255, 0), this[r] = t & 255, r + 1;
|
|
695
|
+
}, f.prototype.writeUint16LE = f.prototype.writeUInt16LE = function(t, r, i) {
|
|
696
|
+
return t = +t, r = r >>> 0, i || h(this, t, r, 2, 65535, 0), this[r] = t & 255, this[r + 1] = t >>> 8, r + 2;
|
|
697
|
+
}, f.prototype.writeUint16BE = f.prototype.writeUInt16BE = function(t, r, i) {
|
|
698
|
+
return t = +t, r = r >>> 0, i || h(this, t, r, 2, 65535, 0), this[r] = t >>> 8, this[r + 1] = t & 255, r + 2;
|
|
699
|
+
}, f.prototype.writeUint32LE = f.prototype.writeUInt32LE = function(t, r, i) {
|
|
700
|
+
return t = +t, r = r >>> 0, i || h(this, t, r, 4, 4294967295, 0), this[r + 3] = t >>> 24, this[r + 2] = t >>> 16, this[r + 1] = t >>> 8, this[r] = t & 255, r + 4;
|
|
701
|
+
}, f.prototype.writeUint32BE = f.prototype.writeUInt32BE = function(t, r, i) {
|
|
702
|
+
return t = +t, r = r >>> 0, i || h(this, t, r, 4, 4294967295, 0), this[r] = t >>> 24, this[r + 1] = t >>> 16, this[r + 2] = t >>> 8, this[r + 3] = t & 255, r + 4;
|
|
703
|
+
}, f.prototype.writeIntLE = function(t, r, i, p) {
|
|
704
704
|
if (t = +t, r = r >>> 0, !p) {
|
|
705
|
-
var d = Math.pow(2, 8 *
|
|
706
|
-
h(this, t, r,
|
|
705
|
+
var d = Math.pow(2, 8 * i - 1);
|
|
706
|
+
h(this, t, r, i, d - 1, -d);
|
|
707
707
|
}
|
|
708
|
-
var v = 0,
|
|
709
|
-
for (this[r] = t & 255; ++v <
|
|
710
|
-
t < 0 &&
|
|
711
|
-
return r +
|
|
712
|
-
}, f.prototype.writeIntBE = function(t, r,
|
|
708
|
+
var v = 0, F = 1, k = 0;
|
|
709
|
+
for (this[r] = t & 255; ++v < i && (F *= 256); )
|
|
710
|
+
t < 0 && k === 0 && this[r + v - 1] !== 0 && (k = 1), this[r + v] = (t / F >> 0) - k & 255;
|
|
711
|
+
return r + i;
|
|
712
|
+
}, f.prototype.writeIntBE = function(t, r, i, p) {
|
|
713
713
|
if (t = +t, r = r >>> 0, !p) {
|
|
714
|
-
var d = Math.pow(2, 8 *
|
|
715
|
-
h(this, t, r,
|
|
714
|
+
var d = Math.pow(2, 8 * i - 1);
|
|
715
|
+
h(this, t, r, i, d - 1, -d);
|
|
716
716
|
}
|
|
717
|
-
var v =
|
|
718
|
-
for (this[r + v] = t & 255; --v >= 0 && (
|
|
719
|
-
t < 0 &&
|
|
720
|
-
return r +
|
|
721
|
-
}, f.prototype.writeInt8 = function(t, r,
|
|
722
|
-
return t = +t, r = r >>> 0,
|
|
723
|
-
}, f.prototype.writeInt16LE = function(t, r,
|
|
724
|
-
return t = +t, r = r >>> 0,
|
|
725
|
-
}, f.prototype.writeInt16BE = function(t, r,
|
|
726
|
-
return t = +t, r = r >>> 0,
|
|
727
|
-
}, f.prototype.writeInt32LE = function(t, r,
|
|
728
|
-
return t = +t, r = r >>> 0,
|
|
729
|
-
}, f.prototype.writeInt32BE = function(t, r,
|
|
730
|
-
return t = +t, r = r >>> 0,
|
|
717
|
+
var v = i - 1, F = 1, k = 0;
|
|
718
|
+
for (this[r + v] = t & 255; --v >= 0 && (F *= 256); )
|
|
719
|
+
t < 0 && k === 0 && this[r + v + 1] !== 0 && (k = 1), this[r + v] = (t / F >> 0) - k & 255;
|
|
720
|
+
return r + i;
|
|
721
|
+
}, f.prototype.writeInt8 = function(t, r, i) {
|
|
722
|
+
return t = +t, r = r >>> 0, i || h(this, t, r, 1, 127, -128), t < 0 && (t = 255 + t + 1), this[r] = t & 255, r + 1;
|
|
723
|
+
}, f.prototype.writeInt16LE = function(t, r, i) {
|
|
724
|
+
return t = +t, r = r >>> 0, i || h(this, t, r, 2, 32767, -32768), this[r] = t & 255, this[r + 1] = t >>> 8, r + 2;
|
|
725
|
+
}, f.prototype.writeInt16BE = function(t, r, i) {
|
|
726
|
+
return t = +t, r = r >>> 0, i || h(this, t, r, 2, 32767, -32768), this[r] = t >>> 8, this[r + 1] = t & 255, r + 2;
|
|
727
|
+
}, f.prototype.writeInt32LE = function(t, r, i) {
|
|
728
|
+
return t = +t, r = r >>> 0, i || h(this, t, r, 4, 2147483647, -2147483648), this[r] = t & 255, this[r + 1] = t >>> 8, this[r + 2] = t >>> 16, this[r + 3] = t >>> 24, r + 4;
|
|
729
|
+
}, f.prototype.writeInt32BE = function(t, r, i) {
|
|
730
|
+
return t = +t, r = r >>> 0, i || h(this, t, r, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), this[r] = t >>> 24, this[r + 1] = t >>> 16, this[r + 2] = t >>> 8, this[r + 3] = t & 255, r + 4;
|
|
731
731
|
};
|
|
732
|
-
function y(
|
|
733
|
-
if (r +
|
|
732
|
+
function y(a, t, r, i, p, d) {
|
|
733
|
+
if (r + i > a.length)
|
|
734
734
|
throw new RangeError("Index out of range");
|
|
735
735
|
if (r < 0)
|
|
736
736
|
throw new RangeError("Index out of range");
|
|
737
737
|
}
|
|
738
|
-
function g(
|
|
739
|
-
return t = +t, r = r >>> 0, p || y(
|
|
738
|
+
function g(a, t, r, i, p) {
|
|
739
|
+
return t = +t, r = r >>> 0, p || y(a, t, r, 4), n.write(a, t, r, i, 23, 4), r + 4;
|
|
740
740
|
}
|
|
741
|
-
f.prototype.writeFloatLE = function(t, r,
|
|
742
|
-
return g(this, t, r, !0,
|
|
743
|
-
}, f.prototype.writeFloatBE = function(t, r,
|
|
744
|
-
return g(this, t, r, !1,
|
|
741
|
+
f.prototype.writeFloatLE = function(t, r, i) {
|
|
742
|
+
return g(this, t, r, !0, i);
|
|
743
|
+
}, f.prototype.writeFloatBE = function(t, r, i) {
|
|
744
|
+
return g(this, t, r, !1, i);
|
|
745
745
|
};
|
|
746
|
-
function E(
|
|
747
|
-
return t = +t, r = r >>> 0, p || y(
|
|
748
|
-
}
|
|
749
|
-
f.prototype.writeDoubleLE = function(t, r,
|
|
750
|
-
return E(this, t, r, !0,
|
|
751
|
-
}, f.prototype.writeDoubleBE = function(t, r,
|
|
752
|
-
return E(this, t, r, !1,
|
|
753
|
-
}, f.prototype.copy = function(t, r,
|
|
746
|
+
function E(a, t, r, i, p) {
|
|
747
|
+
return t = +t, r = r >>> 0, p || y(a, t, r, 8), n.write(a, t, r, i, 52, 8), r + 8;
|
|
748
|
+
}
|
|
749
|
+
f.prototype.writeDoubleLE = function(t, r, i) {
|
|
750
|
+
return E(this, t, r, !0, i);
|
|
751
|
+
}, f.prototype.writeDoubleBE = function(t, r, i) {
|
|
752
|
+
return E(this, t, r, !1, i);
|
|
753
|
+
}, f.prototype.copy = function(t, r, i, p) {
|
|
754
754
|
if (!f.isBuffer(t))
|
|
755
755
|
throw new TypeError("argument should be a Buffer");
|
|
756
|
-
if (
|
|
756
|
+
if (i || (i = 0), !p && p !== 0 && (p = this.length), r >= t.length && (r = t.length), r || (r = 0), p > 0 && p < i && (p = i), p === i || t.length === 0 || this.length === 0)
|
|
757
757
|
return 0;
|
|
758
758
|
if (r < 0)
|
|
759
759
|
throw new RangeError("targetStart out of bounds");
|
|
760
|
-
if (
|
|
760
|
+
if (i < 0 || i >= this.length)
|
|
761
761
|
throw new RangeError("Index out of range");
|
|
762
762
|
if (p < 0)
|
|
763
763
|
throw new RangeError("sourceEnd out of bounds");
|
|
764
|
-
p > this.length && (p = this.length), t.length - r < p -
|
|
765
|
-
var d = p -
|
|
766
|
-
return this === t && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(r,
|
|
764
|
+
p > this.length && (p = this.length), t.length - r < p - i && (p = t.length - r + i);
|
|
765
|
+
var d = p - i;
|
|
766
|
+
return this === t && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(r, i, p) : Uint8Array.prototype.set.call(
|
|
767
767
|
t,
|
|
768
|
-
this.subarray(
|
|
768
|
+
this.subarray(i, p),
|
|
769
769
|
r
|
|
770
770
|
), d;
|
|
771
|
-
}, f.prototype.fill = function(t, r,
|
|
771
|
+
}, f.prototype.fill = function(t, r, i, p) {
|
|
772
772
|
if (typeof t == "string") {
|
|
773
|
-
if (typeof r == "string" ? (p = r, r = 0,
|
|
773
|
+
if (typeof r == "string" ? (p = r, r = 0, i = this.length) : typeof i == "string" && (p = i, i = this.length), p !== void 0 && typeof p != "string")
|
|
774
774
|
throw new TypeError("encoding must be a string");
|
|
775
775
|
if (typeof p == "string" && !f.isEncoding(p))
|
|
776
776
|
throw new TypeError("Unknown encoding: " + p);
|
|
@@ -780,41 +780,41 @@ vt.write = function(i, e, n, a, u, c) {
|
|
|
780
780
|
}
|
|
781
781
|
} else
|
|
782
782
|
typeof t == "number" ? t = t & 255 : typeof t == "boolean" && (t = Number(t));
|
|
783
|
-
if (r < 0 || this.length < r || this.length <
|
|
783
|
+
if (r < 0 || this.length < r || this.length < i)
|
|
784
784
|
throw new RangeError("Out of range index");
|
|
785
|
-
if (
|
|
785
|
+
if (i <= r)
|
|
786
786
|
return this;
|
|
787
|
-
r = r >>> 0,
|
|
787
|
+
r = r >>> 0, i = i === void 0 ? this.length : i >>> 0, t || (t = 0);
|
|
788
788
|
var v;
|
|
789
789
|
if (typeof t == "number")
|
|
790
|
-
for (v = r; v <
|
|
790
|
+
for (v = r; v < i; ++v)
|
|
791
791
|
this[v] = t;
|
|
792
792
|
else {
|
|
793
|
-
var
|
|
794
|
-
if (
|
|
793
|
+
var F = f.isBuffer(t) ? t : f.from(t, p), k = F.length;
|
|
794
|
+
if (k === 0)
|
|
795
795
|
throw new TypeError('The value "' + t + '" is invalid for argument "value"');
|
|
796
|
-
for (v = 0; v <
|
|
797
|
-
this[v + r] =
|
|
796
|
+
for (v = 0; v < i - r; ++v)
|
|
797
|
+
this[v + r] = F[v % k];
|
|
798
798
|
}
|
|
799
799
|
return this;
|
|
800
800
|
};
|
|
801
|
-
var
|
|
802
|
-
function I(
|
|
803
|
-
if (
|
|
801
|
+
var x = /[^+/0-9A-Za-z-_]/g;
|
|
802
|
+
function I(a) {
|
|
803
|
+
if (a = a.split("=")[0], a = a.trim().replace(x, ""), a.length < 2)
|
|
804
804
|
return "";
|
|
805
|
-
for (;
|
|
806
|
-
|
|
807
|
-
return
|
|
805
|
+
for (; a.length % 4 !== 0; )
|
|
806
|
+
a = a + "=";
|
|
807
|
+
return a;
|
|
808
808
|
}
|
|
809
|
-
function A(
|
|
809
|
+
function A(a, t) {
|
|
810
810
|
t = t || 1 / 0;
|
|
811
|
-
for (var r,
|
|
812
|
-
if (r =
|
|
811
|
+
for (var r, i = a.length, p = null, d = [], v = 0; v < i; ++v) {
|
|
812
|
+
if (r = a.charCodeAt(v), r > 55295 && r < 57344) {
|
|
813
813
|
if (!p) {
|
|
814
814
|
if (r > 56319) {
|
|
815
815
|
(t -= 3) > -1 && d.push(239, 191, 189);
|
|
816
816
|
continue;
|
|
817
|
-
} else if (v + 1 ===
|
|
817
|
+
} else if (v + 1 === i) {
|
|
818
818
|
(t -= 3) > -1 && d.push(239, 191, 189);
|
|
819
819
|
continue;
|
|
820
820
|
}
|
|
@@ -861,113 +861,113 @@ vt.write = function(i, e, n, a, u, c) {
|
|
|
861
861
|
}
|
|
862
862
|
return d;
|
|
863
863
|
}
|
|
864
|
-
function T(
|
|
865
|
-
for (var t = [], r = 0; r <
|
|
866
|
-
t.push(
|
|
864
|
+
function T(a) {
|
|
865
|
+
for (var t = [], r = 0; r < a.length; ++r)
|
|
866
|
+
t.push(a.charCodeAt(r) & 255);
|
|
867
867
|
return t;
|
|
868
868
|
}
|
|
869
|
-
function
|
|
870
|
-
for (var r,
|
|
871
|
-
r =
|
|
869
|
+
function P(a, t) {
|
|
870
|
+
for (var r, i, p, d = [], v = 0; v < a.length && !((t -= 2) < 0); ++v)
|
|
871
|
+
r = a.charCodeAt(v), i = r >> 8, p = r % 256, d.push(p), d.push(i);
|
|
872
872
|
return d;
|
|
873
873
|
}
|
|
874
|
-
function
|
|
875
|
-
return e.toByteArray(I(
|
|
874
|
+
function N(a) {
|
|
875
|
+
return e.toByteArray(I(a));
|
|
876
876
|
}
|
|
877
|
-
function
|
|
878
|
-
for (var p = 0; p <
|
|
879
|
-
t[p + r] =
|
|
877
|
+
function H(a, t, r, i) {
|
|
878
|
+
for (var p = 0; p < i && !(p + r >= t.length || p >= a.length); ++p)
|
|
879
|
+
t[p + r] = a[p];
|
|
880
880
|
return p;
|
|
881
881
|
}
|
|
882
|
-
function $(
|
|
883
|
-
return
|
|
882
|
+
function $(a, t) {
|
|
883
|
+
return a instanceof t || a != null && a.constructor != null && a.constructor.name != null && a.constructor.name === t.name;
|
|
884
884
|
}
|
|
885
|
-
function Y(
|
|
886
|
-
return
|
|
885
|
+
function Y(a) {
|
|
886
|
+
return a !== a;
|
|
887
887
|
}
|
|
888
|
-
var
|
|
889
|
-
for (var
|
|
890
|
-
for (var
|
|
891
|
-
t[
|
|
888
|
+
var Ee = function() {
|
|
889
|
+
for (var a = "0123456789abcdef", t = new Array(256), r = 0; r < 16; ++r)
|
|
890
|
+
for (var i = r * 16, p = 0; p < 16; ++p)
|
|
891
|
+
t[i + p] = a[r] + a[p];
|
|
892
892
|
return t;
|
|
893
893
|
}();
|
|
894
|
-
})(
|
|
895
|
-
var
|
|
896
|
-
function
|
|
894
|
+
})(Lt);
|
|
895
|
+
var Ct = { exports: {} }, C = Ct.exports = {}, ee, te;
|
|
896
|
+
function st() {
|
|
897
897
|
throw new Error("setTimeout has not been defined");
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function at() {
|
|
900
900
|
throw new Error("clearTimeout has not been defined");
|
|
901
901
|
}
|
|
902
902
|
(function() {
|
|
903
903
|
try {
|
|
904
|
-
typeof setTimeout == "function" ? ee = setTimeout : ee =
|
|
904
|
+
typeof setTimeout == "function" ? ee = setTimeout : ee = st;
|
|
905
905
|
} catch {
|
|
906
|
-
ee =
|
|
906
|
+
ee = st;
|
|
907
907
|
}
|
|
908
908
|
try {
|
|
909
|
-
typeof clearTimeout == "function" ? te = clearTimeout : te =
|
|
909
|
+
typeof clearTimeout == "function" ? te = clearTimeout : te = at;
|
|
910
910
|
} catch {
|
|
911
|
-
te =
|
|
911
|
+
te = at;
|
|
912
912
|
}
|
|
913
913
|
})();
|
|
914
|
-
function
|
|
914
|
+
function Dt(o) {
|
|
915
915
|
if (ee === setTimeout)
|
|
916
|
-
return setTimeout(
|
|
917
|
-
if ((ee ===
|
|
918
|
-
return ee = setTimeout, setTimeout(
|
|
916
|
+
return setTimeout(o, 0);
|
|
917
|
+
if ((ee === st || !ee) && setTimeout)
|
|
918
|
+
return ee = setTimeout, setTimeout(o, 0);
|
|
919
919
|
try {
|
|
920
|
-
return ee(
|
|
920
|
+
return ee(o, 0);
|
|
921
921
|
} catch {
|
|
922
922
|
try {
|
|
923
|
-
return ee.call(null,
|
|
923
|
+
return ee.call(null, o, 0);
|
|
924
924
|
} catch {
|
|
925
|
-
return ee.call(this,
|
|
925
|
+
return ee.call(this, o, 0);
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Fr(o) {
|
|
930
930
|
if (te === clearTimeout)
|
|
931
|
-
return clearTimeout(
|
|
932
|
-
if ((te ===
|
|
933
|
-
return te = clearTimeout, clearTimeout(
|
|
931
|
+
return clearTimeout(o);
|
|
932
|
+
if ((te === at || !te) && clearTimeout)
|
|
933
|
+
return te = clearTimeout, clearTimeout(o);
|
|
934
934
|
try {
|
|
935
|
-
return te(
|
|
935
|
+
return te(o);
|
|
936
936
|
} catch {
|
|
937
937
|
try {
|
|
938
|
-
return te.call(null,
|
|
938
|
+
return te.call(null, o);
|
|
939
939
|
} catch {
|
|
940
|
-
return te.call(this,
|
|
940
|
+
return te.call(this, o);
|
|
941
941
|
}
|
|
942
942
|
}
|
|
943
943
|
}
|
|
944
|
-
var se = [], xe = !1,
|
|
945
|
-
function
|
|
946
|
-
!xe || !
|
|
944
|
+
var se = [], xe = !1, ye, Le = -1;
|
|
945
|
+
function Ir() {
|
|
946
|
+
!xe || !ye || (xe = !1, ye.length ? se = ye.concat(se) : Le = -1, se.length && Mt());
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function Mt() {
|
|
949
949
|
if (!xe) {
|
|
950
|
-
var
|
|
950
|
+
var o = Dt(Ir);
|
|
951
951
|
xe = !0;
|
|
952
952
|
for (var e = se.length; e; ) {
|
|
953
|
-
for (
|
|
954
|
-
|
|
955
|
-
|
|
953
|
+
for (ye = se, se = []; ++Le < e; )
|
|
954
|
+
ye && ye[Le].run();
|
|
955
|
+
Le = -1, e = se.length;
|
|
956
956
|
}
|
|
957
|
-
|
|
957
|
+
ye = null, xe = !1, Fr(o);
|
|
958
958
|
}
|
|
959
959
|
}
|
|
960
|
-
C.nextTick = function(
|
|
960
|
+
C.nextTick = function(o) {
|
|
961
961
|
var e = new Array(arguments.length - 1);
|
|
962
962
|
if (arguments.length > 1)
|
|
963
963
|
for (var n = 1; n < arguments.length; n++)
|
|
964
964
|
e[n - 1] = arguments[n];
|
|
965
|
-
se.push(new
|
|
965
|
+
se.push(new Nt(o, e)), se.length === 1 && !xe && Dt(Mt);
|
|
966
966
|
};
|
|
967
|
-
function
|
|
968
|
-
this.fun =
|
|
967
|
+
function Nt(o, e) {
|
|
968
|
+
this.fun = o, this.array = e;
|
|
969
969
|
}
|
|
970
|
-
|
|
970
|
+
Nt.prototype.run = function() {
|
|
971
971
|
this.fun.apply(null, this.array);
|
|
972
972
|
};
|
|
973
973
|
C.title = "browser";
|
|
@@ -987,45 +987,45 @@ C.removeAllListeners = ae;
|
|
|
987
987
|
C.emit = ae;
|
|
988
988
|
C.prependListener = ae;
|
|
989
989
|
C.prependOnceListener = ae;
|
|
990
|
-
C.listeners = function(
|
|
990
|
+
C.listeners = function(o) {
|
|
991
991
|
return [];
|
|
992
992
|
};
|
|
993
|
-
C.binding = function(
|
|
993
|
+
C.binding = function(o) {
|
|
994
994
|
throw new Error("process.binding is not supported");
|
|
995
995
|
};
|
|
996
996
|
C.cwd = function() {
|
|
997
997
|
return "/";
|
|
998
998
|
};
|
|
999
|
-
C.chdir = function(
|
|
999
|
+
C.chdir = function(o) {
|
|
1000
1000
|
throw new Error("process.chdir is not supported");
|
|
1001
1001
|
};
|
|
1002
1002
|
C.umask = function() {
|
|
1003
1003
|
return 0;
|
|
1004
1004
|
};
|
|
1005
|
-
var
|
|
1006
|
-
const Z = /* @__PURE__ */
|
|
1007
|
-
var
|
|
1005
|
+
var Pr = Ct.exports;
|
|
1006
|
+
const Z = /* @__PURE__ */ mr(Pr);
|
|
1007
|
+
var Rr = function(o) {
|
|
1008
1008
|
function e() {
|
|
1009
|
-
var
|
|
1010
|
-
return delete
|
|
1009
|
+
var s = this || self;
|
|
1010
|
+
return delete o.prototype.__magic__, s;
|
|
1011
1011
|
}
|
|
1012
1012
|
if (typeof globalThis == "object")
|
|
1013
1013
|
return globalThis;
|
|
1014
1014
|
if (this)
|
|
1015
1015
|
return e();
|
|
1016
|
-
|
|
1016
|
+
o.defineProperty(o.prototype, "__magic__", {
|
|
1017
1017
|
configurable: !0,
|
|
1018
1018
|
get: e
|
|
1019
1019
|
});
|
|
1020
1020
|
var n = __magic__;
|
|
1021
1021
|
return n;
|
|
1022
|
-
}(Object),
|
|
1022
|
+
}(Object), Br = Rr, gt = {}, qt = {}, $t = function() {
|
|
1023
1023
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
1024
1024
|
return !1;
|
|
1025
1025
|
if (typeof Symbol.iterator == "symbol")
|
|
1026
1026
|
return !0;
|
|
1027
|
-
var e = {}, n = Symbol("test"),
|
|
1028
|
-
if (typeof n == "string" || Object.prototype.toString.call(n) !== "[object Symbol]" || Object.prototype.toString.call(
|
|
1027
|
+
var e = {}, n = Symbol("test"), s = Object(n);
|
|
1028
|
+
if (typeof n == "string" || Object.prototype.toString.call(n) !== "[object Symbol]" || Object.prototype.toString.call(s) !== "[object Symbol]")
|
|
1029
1029
|
return !1;
|
|
1030
1030
|
var u = 42;
|
|
1031
1031
|
e[n] = u;
|
|
@@ -1042,31 +1042,31 @@ var _r = function(i) {
|
|
|
1042
1042
|
return !1;
|
|
1043
1043
|
}
|
|
1044
1044
|
return !0;
|
|
1045
|
-
},
|
|
1046
|
-
return
|
|
1047
|
-
},
|
|
1048
|
-
return typeof
|
|
1049
|
-
},
|
|
1045
|
+
}, kr = $t, vt = function() {
|
|
1046
|
+
return kr() && !!Symbol.toStringTag;
|
|
1047
|
+
}, Ot = typeof Symbol < "u" && Symbol, jr = $t, Ur = function() {
|
|
1048
|
+
return typeof Ot != "function" || typeof Symbol != "function" || typeof Ot("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : jr();
|
|
1049
|
+
}, xt = {
|
|
1050
1050
|
foo: {}
|
|
1051
|
-
},
|
|
1052
|
-
return { __proto__:
|
|
1053
|
-
},
|
|
1051
|
+
}, Lr = Object, _r = function() {
|
|
1052
|
+
return { __proto__: xt }.foo === xt.foo && !({ __proto__: null } instanceof Lr);
|
|
1053
|
+
}, Cr = "Function.prototype.bind called on incompatible ", Xe = Array.prototype.slice, Dr = Object.prototype.toString, Mr = "[object Function]", Nr = function(e) {
|
|
1054
1054
|
var n = this;
|
|
1055
|
-
if (typeof n != "function" ||
|
|
1056
|
-
throw new TypeError(
|
|
1057
|
-
for (var
|
|
1055
|
+
if (typeof n != "function" || Dr.call(n) !== Mr)
|
|
1056
|
+
throw new TypeError(Cr + n);
|
|
1057
|
+
for (var s = Xe.call(arguments, 1), u, c = function() {
|
|
1058
1058
|
if (this instanceof u) {
|
|
1059
1059
|
var w = n.apply(
|
|
1060
1060
|
this,
|
|
1061
|
-
|
|
1061
|
+
s.concat(Xe.call(arguments))
|
|
1062
1062
|
);
|
|
1063
1063
|
return Object(w) === w ? w : this;
|
|
1064
1064
|
} else
|
|
1065
1065
|
return n.apply(
|
|
1066
1066
|
e,
|
|
1067
|
-
|
|
1067
|
+
s.concat(Xe.call(arguments))
|
|
1068
1068
|
);
|
|
1069
|
-
}, l = Math.max(0, n.length -
|
|
1069
|
+
}, l = Math.max(0, n.length - s.length), f = [], m = 0; m < l; m++)
|
|
1070
1070
|
f.push("$" + m);
|
|
1071
1071
|
if (u = Function("binder", "return function (" + f.join(",") + "){ return binder.apply(this,arguments); }")(c), n.prototype) {
|
|
1072
1072
|
var b = function() {
|
|
@@ -1074,42 +1074,42 @@ var _r = function(i) {
|
|
|
1074
1074
|
b.prototype = n.prototype, u.prototype = new b(), b.prototype = null;
|
|
1075
1075
|
}
|
|
1076
1076
|
return u;
|
|
1077
|
-
},
|
|
1077
|
+
}, qr = Nr, mt = Function.prototype.bind || qr, $r = mt, Wr = $r.call(Function.call, Object.prototype.hasOwnProperty), S, Pe = SyntaxError, Wt = Function, Fe = TypeError, Ye = function(o) {
|
|
1078
1078
|
try {
|
|
1079
|
-
return
|
|
1079
|
+
return Wt('"use strict"; return (' + o + ").constructor;")();
|
|
1080
1080
|
} catch {
|
|
1081
1081
|
}
|
|
1082
|
-
},
|
|
1083
|
-
if (
|
|
1082
|
+
}, de = Object.getOwnPropertyDescriptor;
|
|
1083
|
+
if (de)
|
|
1084
1084
|
try {
|
|
1085
|
-
|
|
1085
|
+
de({}, "");
|
|
1086
1086
|
} catch {
|
|
1087
|
-
|
|
1087
|
+
de = null;
|
|
1088
1088
|
}
|
|
1089
|
-
var
|
|
1090
|
-
throw new
|
|
1091
|
-
},
|
|
1089
|
+
var Ze = function() {
|
|
1090
|
+
throw new Fe();
|
|
1091
|
+
}, Gr = de ? function() {
|
|
1092
1092
|
try {
|
|
1093
|
-
return arguments.callee,
|
|
1093
|
+
return arguments.callee, Ze;
|
|
1094
1094
|
} catch {
|
|
1095
1095
|
try {
|
|
1096
|
-
return
|
|
1096
|
+
return de(arguments, "callee").get;
|
|
1097
1097
|
} catch {
|
|
1098
|
-
return
|
|
1098
|
+
return Ze;
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
|
-
}() :
|
|
1102
|
-
return
|
|
1103
|
-
} : null),
|
|
1101
|
+
}() : Ze, Se = Ur(), Jr = _r(), M = Object.getPrototypeOf || (Jr ? function(o) {
|
|
1102
|
+
return o.__proto__;
|
|
1103
|
+
} : null), Te = {}, Hr = typeof Uint8Array > "u" || !M ? S : M(Uint8Array), ge = {
|
|
1104
1104
|
"%AggregateError%": typeof AggregateError > "u" ? S : AggregateError,
|
|
1105
1105
|
"%Array%": Array,
|
|
1106
1106
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? S : ArrayBuffer,
|
|
1107
|
-
"%ArrayIteratorPrototype%":
|
|
1107
|
+
"%ArrayIteratorPrototype%": Se && M ? M([][Symbol.iterator]()) : S,
|
|
1108
1108
|
"%AsyncFromSyncIteratorPrototype%": S,
|
|
1109
|
-
"%AsyncFunction%":
|
|
1110
|
-
"%AsyncGenerator%":
|
|
1111
|
-
"%AsyncGeneratorFunction%":
|
|
1112
|
-
"%AsyncIteratorPrototype%":
|
|
1109
|
+
"%AsyncFunction%": Te,
|
|
1110
|
+
"%AsyncGenerator%": Te,
|
|
1111
|
+
"%AsyncGeneratorFunction%": Te,
|
|
1112
|
+
"%AsyncIteratorPrototype%": Te,
|
|
1113
1113
|
"%Atomics%": typeof Atomics > "u" ? S : Atomics,
|
|
1114
1114
|
"%BigInt%": typeof BigInt > "u" ? S : BigInt,
|
|
1115
1115
|
"%BigInt64Array%": typeof BigInt64Array > "u" ? S : BigInt64Array,
|
|
@@ -1128,17 +1128,17 @@ var tt = function() {
|
|
|
1128
1128
|
"%Float32Array%": typeof Float32Array > "u" ? S : Float32Array,
|
|
1129
1129
|
"%Float64Array%": typeof Float64Array > "u" ? S : Float64Array,
|
|
1130
1130
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? S : FinalizationRegistry,
|
|
1131
|
-
"%Function%":
|
|
1132
|
-
"%GeneratorFunction%":
|
|
1131
|
+
"%Function%": Wt,
|
|
1132
|
+
"%GeneratorFunction%": Te,
|
|
1133
1133
|
"%Int8Array%": typeof Int8Array > "u" ? S : Int8Array,
|
|
1134
1134
|
"%Int16Array%": typeof Int16Array > "u" ? S : Int16Array,
|
|
1135
1135
|
"%Int32Array%": typeof Int32Array > "u" ? S : Int32Array,
|
|
1136
1136
|
"%isFinite%": isFinite,
|
|
1137
1137
|
"%isNaN%": isNaN,
|
|
1138
|
-
"%IteratorPrototype%":
|
|
1138
|
+
"%IteratorPrototype%": Se && M ? M(M([][Symbol.iterator]())) : S,
|
|
1139
1139
|
"%JSON%": typeof JSON == "object" ? JSON : S,
|
|
1140
1140
|
"%Map%": typeof Map > "u" ? S : Map,
|
|
1141
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !
|
|
1141
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !Se || !M ? S : M((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
1142
1142
|
"%Math%": Math,
|
|
1143
1143
|
"%Number%": Number,
|
|
1144
1144
|
"%Object%": Object,
|
|
@@ -1151,15 +1151,15 @@ var tt = function() {
|
|
|
1151
1151
|
"%Reflect%": typeof Reflect > "u" ? S : Reflect,
|
|
1152
1152
|
"%RegExp%": RegExp,
|
|
1153
1153
|
"%Set%": typeof Set > "u" ? S : Set,
|
|
1154
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !
|
|
1154
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !Se || !M ? S : M((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
1155
1155
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? S : SharedArrayBuffer,
|
|
1156
1156
|
"%String%": String,
|
|
1157
|
-
"%StringIteratorPrototype%":
|
|
1158
|
-
"%Symbol%":
|
|
1159
|
-
"%SyntaxError%":
|
|
1160
|
-
"%ThrowTypeError%":
|
|
1161
|
-
"%TypedArray%":
|
|
1162
|
-
"%TypeError%":
|
|
1157
|
+
"%StringIteratorPrototype%": Se && M ? M(""[Symbol.iterator]()) : S,
|
|
1158
|
+
"%Symbol%": Se ? Symbol : S,
|
|
1159
|
+
"%SyntaxError%": Pe,
|
|
1160
|
+
"%ThrowTypeError%": Gr,
|
|
1161
|
+
"%TypedArray%": Hr,
|
|
1162
|
+
"%TypeError%": Fe,
|
|
1163
1163
|
"%Uint8Array%": typeof Uint8Array > "u" ? S : Uint8Array,
|
|
1164
1164
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? S : Uint8ClampedArray,
|
|
1165
1165
|
"%Uint16Array%": typeof Uint16Array > "u" ? S : Uint16Array,
|
|
@@ -1169,30 +1169,30 @@ var tt = function() {
|
|
|
1169
1169
|
"%WeakRef%": typeof WeakRef > "u" ? S : WeakRef,
|
|
1170
1170
|
"%WeakSet%": typeof WeakSet > "u" ? S : WeakSet
|
|
1171
1171
|
};
|
|
1172
|
-
if (
|
|
1172
|
+
if (M)
|
|
1173
1173
|
try {
|
|
1174
1174
|
null.error;
|
|
1175
|
-
} catch (
|
|
1176
|
-
var
|
|
1177
|
-
|
|
1175
|
+
} catch (o) {
|
|
1176
|
+
var zr = M(M(o));
|
|
1177
|
+
ge["%Error.prototype%"] = zr;
|
|
1178
1178
|
}
|
|
1179
|
-
var
|
|
1179
|
+
var Kr = function o(e) {
|
|
1180
1180
|
var n;
|
|
1181
1181
|
if (e === "%AsyncFunction%")
|
|
1182
|
-
n =
|
|
1182
|
+
n = Ye("async function () {}");
|
|
1183
1183
|
else if (e === "%GeneratorFunction%")
|
|
1184
|
-
n =
|
|
1184
|
+
n = Ye("function* () {}");
|
|
1185
1185
|
else if (e === "%AsyncGeneratorFunction%")
|
|
1186
|
-
n =
|
|
1186
|
+
n = Ye("async function* () {}");
|
|
1187
1187
|
else if (e === "%AsyncGenerator%") {
|
|
1188
|
-
var
|
|
1189
|
-
|
|
1188
|
+
var s = o("%AsyncGeneratorFunction%");
|
|
1189
|
+
s && (n = s.prototype);
|
|
1190
1190
|
} else if (e === "%AsyncIteratorPrototype%") {
|
|
1191
|
-
var u =
|
|
1192
|
-
u &&
|
|
1191
|
+
var u = o("%AsyncGenerator%");
|
|
1192
|
+
u && M && (n = M(u.prototype));
|
|
1193
1193
|
}
|
|
1194
|
-
return
|
|
1195
|
-
},
|
|
1194
|
+
return ge[e] = n, n;
|
|
1195
|
+
}, Ft = {
|
|
1196
1196
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
1197
1197
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
1198
1198
|
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
@@ -1244,69 +1244,69 @@ var Yr = function i(e) {
|
|
|
1244
1244
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
1245
1245
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
1246
1246
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
1247
|
-
},
|
|
1248
|
-
var n =
|
|
1249
|
-
if (n === "%" &&
|
|
1250
|
-
throw new
|
|
1251
|
-
if (
|
|
1252
|
-
throw new
|
|
1247
|
+
}, ke = mt, qe = Wr, Qr = ke.call(Function.call, Array.prototype.concat), Vr = ke.call(Function.apply, Array.prototype.splice), It = ke.call(Function.call, String.prototype.replace), $e = ke.call(Function.call, String.prototype.slice), Xr = ke.call(Function.call, RegExp.prototype.exec), Yr = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Zr = /\\(\\)?/g, en = function(e) {
|
|
1248
|
+
var n = $e(e, 0, 1), s = $e(e, -1);
|
|
1249
|
+
if (n === "%" && s !== "%")
|
|
1250
|
+
throw new Pe("invalid intrinsic syntax, expected closing `%`");
|
|
1251
|
+
if (s === "%" && n !== "%")
|
|
1252
|
+
throw new Pe("invalid intrinsic syntax, expected opening `%`");
|
|
1253
1253
|
var u = [];
|
|
1254
|
-
return
|
|
1255
|
-
u[u.length] = f ?
|
|
1254
|
+
return It(e, Yr, function(c, l, f, m) {
|
|
1255
|
+
u[u.length] = f ? It(m, Zr, "$1") : l || c;
|
|
1256
1256
|
}), u;
|
|
1257
|
-
},
|
|
1258
|
-
var
|
|
1259
|
-
if (
|
|
1260
|
-
var c =
|
|
1261
|
-
if (c ===
|
|
1262
|
-
throw new
|
|
1257
|
+
}, tn = function(e, n) {
|
|
1258
|
+
var s = e, u;
|
|
1259
|
+
if (qe(Ft, s) && (u = Ft[s], s = "%" + u[0] + "%"), qe(ge, s)) {
|
|
1260
|
+
var c = ge[s];
|
|
1261
|
+
if (c === Te && (c = Kr(s)), typeof c > "u" && !n)
|
|
1262
|
+
throw new Fe("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
1263
1263
|
return {
|
|
1264
1264
|
alias: u,
|
|
1265
|
-
name:
|
|
1265
|
+
name: s,
|
|
1266
1266
|
value: c
|
|
1267
1267
|
};
|
|
1268
1268
|
}
|
|
1269
|
-
throw new
|
|
1270
|
-
},
|
|
1269
|
+
throw new Pe("intrinsic " + e + " does not exist!");
|
|
1270
|
+
}, wt = function(e, n) {
|
|
1271
1271
|
if (typeof e != "string" || e.length === 0)
|
|
1272
|
-
throw new
|
|
1272
|
+
throw new Fe("intrinsic name must be a non-empty string");
|
|
1273
1273
|
if (arguments.length > 1 && typeof n != "boolean")
|
|
1274
|
-
throw new
|
|
1275
|
-
if (
|
|
1276
|
-
throw new
|
|
1277
|
-
var
|
|
1278
|
-
b && (u = b[0],
|
|
1279
|
-
for (var w = 1, O = !0; w <
|
|
1280
|
-
var R =
|
|
1274
|
+
throw new Fe('"allowMissing" argument must be a boolean');
|
|
1275
|
+
if (Xr(/^%?[^%]*%?$/, e) === null)
|
|
1276
|
+
throw new Pe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
1277
|
+
var s = en(e), u = s.length > 0 ? s[0] : "", c = tn("%" + u + "%", n), l = c.name, f = c.value, m = !1, b = c.alias;
|
|
1278
|
+
b && (u = b[0], Vr(s, Qr([0, 1], b)));
|
|
1279
|
+
for (var w = 1, O = !0; w < s.length; w += 1) {
|
|
1280
|
+
var R = s[w], j = $e(R, 0, 1), D = $e(R, -1);
|
|
1281
1281
|
if ((j === '"' || j === "'" || j === "`" || D === '"' || D === "'" || D === "`") && j !== D)
|
|
1282
|
-
throw new
|
|
1283
|
-
if ((R === "constructor" || !O) && (m = !0), u += "." + R, l = "%" + u + "%",
|
|
1284
|
-
f =
|
|
1282
|
+
throw new Pe("property names with quotes must have matching quotes");
|
|
1283
|
+
if ((R === "constructor" || !O) && (m = !0), u += "." + R, l = "%" + u + "%", qe(ge, l))
|
|
1284
|
+
f = ge[l];
|
|
1285
1285
|
else if (f != null) {
|
|
1286
1286
|
if (!(R in f)) {
|
|
1287
1287
|
if (!n)
|
|
1288
|
-
throw new
|
|
1288
|
+
throw new Fe("base intrinsic for " + e + " exists, but the property is not available.");
|
|
1289
1289
|
return;
|
|
1290
1290
|
}
|
|
1291
|
-
if (
|
|
1292
|
-
var
|
|
1293
|
-
O = !!
|
|
1291
|
+
if (de && w + 1 >= s.length) {
|
|
1292
|
+
var W = de(f, R);
|
|
1293
|
+
O = !!W, O && "get" in W && !("originalValue" in W.get) ? f = W.get : f = f[R];
|
|
1294
1294
|
} else
|
|
1295
|
-
O =
|
|
1296
|
-
O && !m && (
|
|
1295
|
+
O = qe(f, R), f = f[R];
|
|
1296
|
+
O && !m && (ge[l] = f);
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
1299
1299
|
return f;
|
|
1300
|
-
},
|
|
1301
|
-
(function(
|
|
1302
|
-
var e =
|
|
1300
|
+
}, Gt = { exports: {} };
|
|
1301
|
+
(function(o) {
|
|
1302
|
+
var e = mt, n = wt, s = n("%Function.prototype.apply%"), u = n("%Function.prototype.call%"), c = n("%Reflect.apply%", !0) || e.call(u, s), l = n("%Object.getOwnPropertyDescriptor%", !0), f = n("%Object.defineProperty%", !0), m = n("%Math.max%");
|
|
1303
1303
|
if (f)
|
|
1304
1304
|
try {
|
|
1305
1305
|
f({}, "a", { value: 1 });
|
|
1306
1306
|
} catch {
|
|
1307
1307
|
f = null;
|
|
1308
1308
|
}
|
|
1309
|
-
|
|
1309
|
+
o.exports = function(O) {
|
|
1310
1310
|
var R = c(e, u, arguments);
|
|
1311
1311
|
if (l && f) {
|
|
1312
1312
|
var j = l(R, "length");
|
|
@@ -1319,125 +1319,125 @@ var Yr = function i(e) {
|
|
|
1319
1319
|
return R;
|
|
1320
1320
|
};
|
|
1321
1321
|
var b = function() {
|
|
1322
|
-
return c(e,
|
|
1322
|
+
return c(e, s, arguments);
|
|
1323
1323
|
};
|
|
1324
|
-
f ? f(
|
|
1325
|
-
})(
|
|
1326
|
-
var
|
|
1327
|
-
var
|
|
1328
|
-
return typeof
|
|
1329
|
-
},
|
|
1330
|
-
return
|
|
1331
|
-
},
|
|
1332
|
-
return
|
|
1333
|
-
},
|
|
1334
|
-
return
|
|
1324
|
+
f ? f(o.exports, "apply", { value: b }) : o.exports.apply = b;
|
|
1325
|
+
})(Gt);
|
|
1326
|
+
var Jt = Gt.exports, Ht = wt, zt = Jt, rn = zt(Ht("String.prototype.indexOf")), Kt = function(e, n) {
|
|
1327
|
+
var s = Ht(e, !!n);
|
|
1328
|
+
return typeof s == "function" && rn(e, ".prototype.") > -1 ? zt(s) : s;
|
|
1329
|
+
}, nn = vt(), on = Kt, ut = on("Object.prototype.toString"), Ke = function(e) {
|
|
1330
|
+
return nn && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : ut(e) === "[object Arguments]";
|
|
1331
|
+
}, Qt = function(e) {
|
|
1332
|
+
return Ke(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && ut(e) !== "[object Array]" && ut(e.callee) === "[object Function]";
|
|
1333
|
+
}, sn = function() {
|
|
1334
|
+
return Ke(arguments);
|
|
1335
1335
|
}();
|
|
1336
|
-
|
|
1337
|
-
var
|
|
1338
|
-
if (!
|
|
1336
|
+
Ke.isLegacyArguments = Qt;
|
|
1337
|
+
var an = sn ? Ke : Qt, un = Object.prototype.toString, fn = Function.prototype.toString, cn = /^\s*(?:function)?\*/, Vt = vt(), et = Object.getPrototypeOf, ln = function() {
|
|
1338
|
+
if (!Vt)
|
|
1339
1339
|
return !1;
|
|
1340
1340
|
try {
|
|
1341
1341
|
return Function("return function*() {}")();
|
|
1342
1342
|
} catch {
|
|
1343
1343
|
}
|
|
1344
|
-
},
|
|
1344
|
+
}, tt, pn = function(e) {
|
|
1345
1345
|
if (typeof e != "function")
|
|
1346
1346
|
return !1;
|
|
1347
|
-
if (
|
|
1347
|
+
if (cn.test(fn.call(e)))
|
|
1348
1348
|
return !0;
|
|
1349
|
-
if (!
|
|
1350
|
-
var n =
|
|
1349
|
+
if (!Vt) {
|
|
1350
|
+
var n = un.call(e);
|
|
1351
1351
|
return n === "[object GeneratorFunction]";
|
|
1352
1352
|
}
|
|
1353
|
-
if (!
|
|
1353
|
+
if (!et)
|
|
1354
1354
|
return !1;
|
|
1355
|
-
if (typeof
|
|
1356
|
-
var
|
|
1357
|
-
|
|
1355
|
+
if (typeof tt > "u") {
|
|
1356
|
+
var s = ln();
|
|
1357
|
+
tt = s ? et(s) : !1;
|
|
1358
1358
|
}
|
|
1359
|
-
return
|
|
1360
|
-
},
|
|
1361
|
-
if (typeof
|
|
1359
|
+
return et(e) === tt;
|
|
1360
|
+
}, Xt = Function.prototype.toString, Oe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, ft, _e;
|
|
1361
|
+
if (typeof Oe == "function" && typeof Object.defineProperty == "function")
|
|
1362
1362
|
try {
|
|
1363
|
-
|
|
1363
|
+
ft = Object.defineProperty({}, "length", {
|
|
1364
1364
|
get: function() {
|
|
1365
|
-
throw
|
|
1365
|
+
throw _e;
|
|
1366
1366
|
}
|
|
1367
|
-
}),
|
|
1367
|
+
}), _e = {}, Oe(function() {
|
|
1368
1368
|
throw 42;
|
|
1369
|
-
}, null,
|
|
1370
|
-
} catch (
|
|
1371
|
-
|
|
1369
|
+
}, null, ft);
|
|
1370
|
+
} catch (o) {
|
|
1371
|
+
o !== _e && (Oe = null);
|
|
1372
1372
|
}
|
|
1373
1373
|
else
|
|
1374
|
-
|
|
1375
|
-
var
|
|
1374
|
+
Oe = null;
|
|
1375
|
+
var hn = /^\s*class\b/, ct = function(e) {
|
|
1376
1376
|
try {
|
|
1377
|
-
var n =
|
|
1378
|
-
return
|
|
1377
|
+
var n = Xt.call(e);
|
|
1378
|
+
return hn.test(n);
|
|
1379
1379
|
} catch {
|
|
1380
1380
|
return !1;
|
|
1381
1381
|
}
|
|
1382
|
-
},
|
|
1382
|
+
}, rt = function(e) {
|
|
1383
1383
|
try {
|
|
1384
|
-
return
|
|
1384
|
+
return ct(e) ? !1 : (Xt.call(e), !0);
|
|
1385
1385
|
} catch {
|
|
1386
1386
|
return !1;
|
|
1387
1387
|
}
|
|
1388
|
-
},
|
|
1388
|
+
}, Ce = Object.prototype.toString, yn = "[object Object]", dn = "[object Function]", gn = "[object GeneratorFunction]", vn = "[object HTMLAllCollection]", mn = "[object HTML document.all class]", wn = "[object HTMLCollection]", bn = typeof Symbol == "function" && !!Symbol.toStringTag, En = !(0 in [,]), lt = function() {
|
|
1389
1389
|
return !1;
|
|
1390
1390
|
};
|
|
1391
1391
|
if (typeof document == "object") {
|
|
1392
|
-
var
|
|
1393
|
-
|
|
1394
|
-
if ((
|
|
1392
|
+
var An = document.all;
|
|
1393
|
+
Ce.call(An) === Ce.call(document.all) && (lt = function(e) {
|
|
1394
|
+
if ((En || !e) && (typeof e > "u" || typeof e == "object"))
|
|
1395
1395
|
try {
|
|
1396
|
-
var n =
|
|
1397
|
-
return (n ===
|
|
1396
|
+
var n = Ce.call(e);
|
|
1397
|
+
return (n === vn || n === mn || n === wn || n === yn) && e("") == null;
|
|
1398
1398
|
} catch {
|
|
1399
1399
|
}
|
|
1400
1400
|
return !1;
|
|
1401
1401
|
});
|
|
1402
1402
|
}
|
|
1403
|
-
var
|
|
1404
|
-
if (
|
|
1403
|
+
var Sn = Oe ? function(e) {
|
|
1404
|
+
if (lt(e))
|
|
1405
1405
|
return !0;
|
|
1406
1406
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
1407
1407
|
return !1;
|
|
1408
1408
|
try {
|
|
1409
|
-
|
|
1409
|
+
Oe(e, null, ft);
|
|
1410
1410
|
} catch (n) {
|
|
1411
|
-
if (n !==
|
|
1411
|
+
if (n !== _e)
|
|
1412
1412
|
return !1;
|
|
1413
1413
|
}
|
|
1414
|
-
return !
|
|
1414
|
+
return !ct(e) && rt(e);
|
|
1415
1415
|
} : function(e) {
|
|
1416
|
-
if (
|
|
1416
|
+
if (lt(e))
|
|
1417
1417
|
return !0;
|
|
1418
1418
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
1419
1419
|
return !1;
|
|
1420
|
-
if (
|
|
1421
|
-
return
|
|
1422
|
-
if (
|
|
1420
|
+
if (bn)
|
|
1421
|
+
return rt(e);
|
|
1422
|
+
if (ct(e))
|
|
1423
1423
|
return !1;
|
|
1424
|
-
var n =
|
|
1425
|
-
return n !==
|
|
1426
|
-
},
|
|
1424
|
+
var n = Ce.call(e);
|
|
1425
|
+
return n !== dn && n !== gn && !/^\[object HTML/.test(n) ? !1 : rt(e);
|
|
1426
|
+
}, Tn = Sn, On = Object.prototype.toString, Yt = Object.prototype.hasOwnProperty, xn = function(e, n, s) {
|
|
1427
1427
|
for (var u = 0, c = e.length; u < c; u++)
|
|
1428
|
-
|
|
1429
|
-
},
|
|
1428
|
+
Yt.call(e, u) && (s == null ? n(e[u], u, e) : n.call(s, e[u], u, e));
|
|
1429
|
+
}, Fn = function(e, n, s) {
|
|
1430
1430
|
for (var u = 0, c = e.length; u < c; u++)
|
|
1431
|
-
|
|
1432
|
-
},
|
|
1431
|
+
s == null ? n(e.charAt(u), u, e) : n.call(s, e.charAt(u), u, e);
|
|
1432
|
+
}, In = function(e, n, s) {
|
|
1433
1433
|
for (var u in e)
|
|
1434
|
-
|
|
1435
|
-
},
|
|
1436
|
-
if (!
|
|
1434
|
+
Yt.call(e, u) && (s == null ? n(e[u], u, e) : n.call(s, e[u], u, e));
|
|
1435
|
+
}, Pn = function(e, n, s) {
|
|
1436
|
+
if (!Tn(n))
|
|
1437
1437
|
throw new TypeError("iterator must be a function");
|
|
1438
1438
|
var u;
|
|
1439
|
-
arguments.length >= 3 && (u =
|
|
1440
|
-
},
|
|
1439
|
+
arguments.length >= 3 && (u = s), On.call(e) === "[object Array]" ? xn(e, n, u) : typeof e == "string" ? Fn(e, n, u) : In(e, n, u);
|
|
1440
|
+
}, Rn = Pn, nt = [
|
|
1441
1441
|
"BigInt64Array",
|
|
1442
1442
|
"BigUint64Array",
|
|
1443
1443
|
"Float32Array",
|
|
@@ -1449,254 +1449,254 @@ var xn = Fe ? function(e) {
|
|
|
1449
1449
|
"Uint32Array",
|
|
1450
1450
|
"Uint8Array",
|
|
1451
1451
|
"Uint8ClampedArray"
|
|
1452
|
-
],
|
|
1453
|
-
for (var e = [], n = 0; n <
|
|
1454
|
-
typeof
|
|
1452
|
+
], Bn = typeof globalThis > "u" ? Ut : globalThis, kn = function() {
|
|
1453
|
+
for (var e = [], n = 0; n < nt.length; n++)
|
|
1454
|
+
typeof Bn[nt[n]] == "function" && (e[e.length] = nt[n]);
|
|
1455
1455
|
return e;
|
|
1456
|
-
},
|
|
1457
|
-
if (
|
|
1456
|
+
}, jn = wt, De = jn("%Object.getOwnPropertyDescriptor%", !0);
|
|
1457
|
+
if (De)
|
|
1458
1458
|
try {
|
|
1459
|
-
|
|
1459
|
+
De([], "length");
|
|
1460
1460
|
} catch {
|
|
1461
|
-
|
|
1461
|
+
De = null;
|
|
1462
1462
|
}
|
|
1463
|
-
var
|
|
1464
|
-
for (var
|
|
1465
|
-
if (e[
|
|
1466
|
-
return
|
|
1463
|
+
var Un = De, We = Rn, Ln = kn, Pt = Jt, bt = Kt, Me = Un, _n = bt("Object.prototype.toString"), Zt = vt(), Rt = typeof globalThis > "u" ? Ut : globalThis, pt = Ln(), Et = bt("String.prototype.slice"), it = Object.getPrototypeOf, Cn = bt("Array.prototype.indexOf", !0) || function(e, n) {
|
|
1464
|
+
for (var s = 0; s < e.length; s += 1)
|
|
1465
|
+
if (e[s] === n)
|
|
1466
|
+
return s;
|
|
1467
1467
|
return -1;
|
|
1468
|
-
},
|
|
1469
|
-
|
|
1470
|
-
var e = new
|
|
1468
|
+
}, Ge = { __proto__: null };
|
|
1469
|
+
Zt && Me && it ? We(pt, function(o) {
|
|
1470
|
+
var e = new Rt[o]();
|
|
1471
1471
|
if (Symbol.toStringTag in e) {
|
|
1472
|
-
var n =
|
|
1473
|
-
if (!
|
|
1474
|
-
var u =
|
|
1475
|
-
|
|
1472
|
+
var n = it(e), s = Me(n, Symbol.toStringTag);
|
|
1473
|
+
if (!s) {
|
|
1474
|
+
var u = it(n);
|
|
1475
|
+
s = Me(u, Symbol.toStringTag);
|
|
1476
1476
|
}
|
|
1477
|
-
|
|
1477
|
+
Ge["$" + o] = Pt(s.get);
|
|
1478
1478
|
}
|
|
1479
|
-
}) :
|
|
1480
|
-
var e = new
|
|
1481
|
-
|
|
1479
|
+
}) : We(pt, function(o) {
|
|
1480
|
+
var e = new Rt[o]();
|
|
1481
|
+
Ge["$" + o] = Pt(e.slice);
|
|
1482
1482
|
});
|
|
1483
|
-
var
|
|
1483
|
+
var Dn = function(e) {
|
|
1484
1484
|
var n = !1;
|
|
1485
|
-
return
|
|
1485
|
+
return We(Ge, function(s, u) {
|
|
1486
1486
|
if (!n)
|
|
1487
1487
|
try {
|
|
1488
|
-
"$" +
|
|
1488
|
+
"$" + s(e) === u && (n = Et(u, 1));
|
|
1489
1489
|
} catch {
|
|
1490
1490
|
}
|
|
1491
1491
|
}), n;
|
|
1492
|
-
},
|
|
1492
|
+
}, Mn = function(e) {
|
|
1493
1493
|
var n = !1;
|
|
1494
|
-
return
|
|
1494
|
+
return We(Ge, function(s, u) {
|
|
1495
1495
|
if (!n)
|
|
1496
1496
|
try {
|
|
1497
|
-
|
|
1497
|
+
s(e), n = Et(u, 1);
|
|
1498
1498
|
} catch {
|
|
1499
1499
|
}
|
|
1500
1500
|
}), n;
|
|
1501
|
-
},
|
|
1501
|
+
}, er = function(e) {
|
|
1502
1502
|
if (!e || typeof e != "object")
|
|
1503
1503
|
return !1;
|
|
1504
|
-
if (!
|
|
1505
|
-
var n =
|
|
1506
|
-
return
|
|
1504
|
+
if (!Zt) {
|
|
1505
|
+
var n = Et(_n(e), 8, -1);
|
|
1506
|
+
return Cn(pt, n) > -1 ? n : n !== "Object" ? !1 : Mn(e);
|
|
1507
1507
|
}
|
|
1508
|
-
return
|
|
1509
|
-
},
|
|
1510
|
-
return !!
|
|
1508
|
+
return Me ? Dn(e) : null;
|
|
1509
|
+
}, Nn = er, qn = function(e) {
|
|
1510
|
+
return !!Nn(e);
|
|
1511
1511
|
};
|
|
1512
|
-
(function(
|
|
1513
|
-
var e =
|
|
1514
|
-
function c(
|
|
1515
|
-
return
|
|
1512
|
+
(function(o) {
|
|
1513
|
+
var e = an, n = pn, s = er, u = qn;
|
|
1514
|
+
function c(i) {
|
|
1515
|
+
return i.call.bind(i);
|
|
1516
1516
|
}
|
|
1517
1517
|
var l = typeof BigInt < "u", f = typeof Symbol < "u", m = c(Object.prototype.toString), b = c(Number.prototype.valueOf), w = c(String.prototype.valueOf), O = c(Boolean.prototype.valueOf);
|
|
1518
1518
|
if (l)
|
|
1519
1519
|
var R = c(BigInt.prototype.valueOf);
|
|
1520
1520
|
if (f)
|
|
1521
1521
|
var j = c(Symbol.prototype.valueOf);
|
|
1522
|
-
function D(
|
|
1523
|
-
if (typeof
|
|
1522
|
+
function D(i, p) {
|
|
1523
|
+
if (typeof i != "object")
|
|
1524
1524
|
return !1;
|
|
1525
1525
|
try {
|
|
1526
|
-
return p(
|
|
1526
|
+
return p(i), !0;
|
|
1527
1527
|
} catch {
|
|
1528
1528
|
return !1;
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
|
-
|
|
1532
|
-
function
|
|
1533
|
-
return typeof Promise < "u" &&
|
|
1531
|
+
o.isArgumentsObject = e, o.isGeneratorFunction = n, o.isTypedArray = u;
|
|
1532
|
+
function W(i) {
|
|
1533
|
+
return typeof Promise < "u" && i instanceof Promise || i !== null && typeof i == "object" && typeof i.then == "function" && typeof i.catch == "function";
|
|
1534
1534
|
}
|
|
1535
|
-
|
|
1536
|
-
function
|
|
1537
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(
|
|
1535
|
+
o.isPromise = W;
|
|
1536
|
+
function ve(i) {
|
|
1537
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(i) : u(i) || y(i);
|
|
1538
1538
|
}
|
|
1539
|
-
|
|
1540
|
-
function ne(
|
|
1541
|
-
return
|
|
1539
|
+
o.isArrayBufferView = ve;
|
|
1540
|
+
function ne(i) {
|
|
1541
|
+
return s(i) === "Uint8Array";
|
|
1542
1542
|
}
|
|
1543
|
-
|
|
1544
|
-
function ue(
|
|
1545
|
-
return
|
|
1543
|
+
o.isUint8Array = ne;
|
|
1544
|
+
function ue(i) {
|
|
1545
|
+
return s(i) === "Uint8ClampedArray";
|
|
1546
1546
|
}
|
|
1547
|
-
|
|
1548
|
-
function
|
|
1549
|
-
return
|
|
1547
|
+
o.isUint8ClampedArray = ue;
|
|
1548
|
+
function me(i) {
|
|
1549
|
+
return s(i) === "Uint16Array";
|
|
1550
1550
|
}
|
|
1551
|
-
|
|
1552
|
-
function
|
|
1553
|
-
return
|
|
1551
|
+
o.isUint16Array = me;
|
|
1552
|
+
function we(i) {
|
|
1553
|
+
return s(i) === "Uint32Array";
|
|
1554
1554
|
}
|
|
1555
|
-
|
|
1556
|
-
function
|
|
1557
|
-
return
|
|
1555
|
+
o.isUint32Array = we;
|
|
1556
|
+
function G(i) {
|
|
1557
|
+
return s(i) === "Int8Array";
|
|
1558
1558
|
}
|
|
1559
|
-
|
|
1560
|
-
function
|
|
1561
|
-
return
|
|
1559
|
+
o.isInt8Array = G;
|
|
1560
|
+
function be(i) {
|
|
1561
|
+
return s(i) === "Int16Array";
|
|
1562
1562
|
}
|
|
1563
|
-
|
|
1564
|
-
function J(
|
|
1565
|
-
return
|
|
1563
|
+
o.isInt16Array = be;
|
|
1564
|
+
function J(i) {
|
|
1565
|
+
return s(i) === "Int32Array";
|
|
1566
1566
|
}
|
|
1567
|
-
|
|
1568
|
-
function ie(
|
|
1569
|
-
return
|
|
1567
|
+
o.isInt32Array = J;
|
|
1568
|
+
function ie(i) {
|
|
1569
|
+
return s(i) === "Float32Array";
|
|
1570
1570
|
}
|
|
1571
|
-
|
|
1572
|
-
function X(
|
|
1573
|
-
return
|
|
1571
|
+
o.isFloat32Array = ie;
|
|
1572
|
+
function X(i) {
|
|
1573
|
+
return s(i) === "Float64Array";
|
|
1574
1574
|
}
|
|
1575
|
-
|
|
1576
|
-
function fe(
|
|
1577
|
-
return
|
|
1575
|
+
o.isFloat64Array = X;
|
|
1576
|
+
function fe(i) {
|
|
1577
|
+
return s(i) === "BigInt64Array";
|
|
1578
1578
|
}
|
|
1579
|
-
|
|
1580
|
-
function oe(
|
|
1581
|
-
return
|
|
1579
|
+
o.isBigInt64Array = fe;
|
|
1580
|
+
function oe(i) {
|
|
1581
|
+
return s(i) === "BigUint64Array";
|
|
1582
1582
|
}
|
|
1583
|
-
|
|
1584
|
-
function K(
|
|
1585
|
-
return m(
|
|
1583
|
+
o.isBigUint64Array = oe;
|
|
1584
|
+
function K(i) {
|
|
1585
|
+
return m(i) === "[object Map]";
|
|
1586
1586
|
}
|
|
1587
1587
|
K.working = typeof Map < "u" && K(/* @__PURE__ */ new Map());
|
|
1588
|
-
function
|
|
1589
|
-
return typeof Map > "u" ? !1 : K.working ? K(
|
|
1588
|
+
function Re(i) {
|
|
1589
|
+
return typeof Map > "u" ? !1 : K.working ? K(i) : i instanceof Map;
|
|
1590
1590
|
}
|
|
1591
|
-
|
|
1592
|
-
function Q(
|
|
1593
|
-
return m(
|
|
1591
|
+
o.isMap = Re;
|
|
1592
|
+
function Q(i) {
|
|
1593
|
+
return m(i) === "[object Set]";
|
|
1594
1594
|
}
|
|
1595
1595
|
Q.working = typeof Set < "u" && Q(/* @__PURE__ */ new Set());
|
|
1596
|
-
function ce(
|
|
1597
|
-
return typeof Set > "u" ? !1 : Q.working ? Q(
|
|
1596
|
+
function ce(i) {
|
|
1597
|
+
return typeof Set > "u" ? !1 : Q.working ? Q(i) : i instanceof Set;
|
|
1598
1598
|
}
|
|
1599
|
-
|
|
1600
|
-
function le(
|
|
1601
|
-
return m(
|
|
1599
|
+
o.isSet = ce;
|
|
1600
|
+
function le(i) {
|
|
1601
|
+
return m(i) === "[object WeakMap]";
|
|
1602
1602
|
}
|
|
1603
1603
|
le.working = typeof WeakMap < "u" && le(/* @__PURE__ */ new WeakMap());
|
|
1604
|
-
function Be(
|
|
1605
|
-
return typeof WeakMap > "u" ? !1 : le.working ? le(
|
|
1604
|
+
function Be(i) {
|
|
1605
|
+
return typeof WeakMap > "u" ? !1 : le.working ? le(i) : i instanceof WeakMap;
|
|
1606
1606
|
}
|
|
1607
|
-
|
|
1608
|
-
function pe(
|
|
1609
|
-
return m(
|
|
1607
|
+
o.isWeakMap = Be;
|
|
1608
|
+
function pe(i) {
|
|
1609
|
+
return m(i) === "[object WeakSet]";
|
|
1610
1610
|
}
|
|
1611
1611
|
pe.working = typeof WeakSet < "u" && pe(/* @__PURE__ */ new WeakSet());
|
|
1612
|
-
function V(
|
|
1613
|
-
return pe(
|
|
1612
|
+
function V(i) {
|
|
1613
|
+
return pe(i);
|
|
1614
1614
|
}
|
|
1615
|
-
|
|
1616
|
-
function he(
|
|
1617
|
-
return m(
|
|
1615
|
+
o.isWeakSet = V;
|
|
1616
|
+
function he(i) {
|
|
1617
|
+
return m(i) === "[object ArrayBuffer]";
|
|
1618
1618
|
}
|
|
1619
1619
|
he.working = typeof ArrayBuffer < "u" && he(new ArrayBuffer());
|
|
1620
|
-
function
|
|
1621
|
-
return typeof ArrayBuffer > "u" ? !1 : he.working ? he(
|
|
1620
|
+
function L(i) {
|
|
1621
|
+
return typeof ArrayBuffer > "u" ? !1 : he.working ? he(i) : i instanceof ArrayBuffer;
|
|
1622
1622
|
}
|
|
1623
|
-
|
|
1624
|
-
function h(
|
|
1625
|
-
return m(
|
|
1623
|
+
o.isArrayBuffer = L;
|
|
1624
|
+
function h(i) {
|
|
1625
|
+
return m(i) === "[object DataView]";
|
|
1626
1626
|
}
|
|
1627
1627
|
h.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && h(new DataView(new ArrayBuffer(1), 0, 1));
|
|
1628
|
-
function y(
|
|
1629
|
-
return typeof DataView > "u" ? !1 : h.working ? h(
|
|
1628
|
+
function y(i) {
|
|
1629
|
+
return typeof DataView > "u" ? !1 : h.working ? h(i) : i instanceof DataView;
|
|
1630
1630
|
}
|
|
1631
|
-
|
|
1631
|
+
o.isDataView = y;
|
|
1632
1632
|
var g = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
|
|
1633
|
-
function E(
|
|
1634
|
-
return m(
|
|
1633
|
+
function E(i) {
|
|
1634
|
+
return m(i) === "[object SharedArrayBuffer]";
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1637
|
-
return typeof g > "u" ? !1 : (typeof E.working > "u" && (E.working = E(new g())), E.working ? E(
|
|
1636
|
+
function x(i) {
|
|
1637
|
+
return typeof g > "u" ? !1 : (typeof E.working > "u" && (E.working = E(new g())), E.working ? E(i) : i instanceof g);
|
|
1638
1638
|
}
|
|
1639
|
-
|
|
1640
|
-
function I(
|
|
1641
|
-
return m(
|
|
1639
|
+
o.isSharedArrayBuffer = x;
|
|
1640
|
+
function I(i) {
|
|
1641
|
+
return m(i) === "[object AsyncFunction]";
|
|
1642
1642
|
}
|
|
1643
|
-
|
|
1644
|
-
function A(
|
|
1645
|
-
return m(
|
|
1643
|
+
o.isAsyncFunction = I;
|
|
1644
|
+
function A(i) {
|
|
1645
|
+
return m(i) === "[object Map Iterator]";
|
|
1646
1646
|
}
|
|
1647
|
-
|
|
1648
|
-
function T(
|
|
1649
|
-
return m(
|
|
1647
|
+
o.isMapIterator = A;
|
|
1648
|
+
function T(i) {
|
|
1649
|
+
return m(i) === "[object Set Iterator]";
|
|
1650
1650
|
}
|
|
1651
|
-
|
|
1652
|
-
function
|
|
1653
|
-
return m(
|
|
1651
|
+
o.isSetIterator = T;
|
|
1652
|
+
function P(i) {
|
|
1653
|
+
return m(i) === "[object Generator]";
|
|
1654
1654
|
}
|
|
1655
|
-
|
|
1656
|
-
function
|
|
1657
|
-
return m(
|
|
1655
|
+
o.isGeneratorObject = P;
|
|
1656
|
+
function N(i) {
|
|
1657
|
+
return m(i) === "[object WebAssembly.Module]";
|
|
1658
1658
|
}
|
|
1659
|
-
|
|
1660
|
-
function
|
|
1661
|
-
return D(
|
|
1659
|
+
o.isWebAssemblyCompiledModule = N;
|
|
1660
|
+
function H(i) {
|
|
1661
|
+
return D(i, b);
|
|
1662
1662
|
}
|
|
1663
|
-
|
|
1664
|
-
function $(
|
|
1665
|
-
return D(
|
|
1663
|
+
o.isNumberObject = H;
|
|
1664
|
+
function $(i) {
|
|
1665
|
+
return D(i, w);
|
|
1666
1666
|
}
|
|
1667
|
-
|
|
1668
|
-
function Y(
|
|
1669
|
-
return D(
|
|
1667
|
+
o.isStringObject = $;
|
|
1668
|
+
function Y(i) {
|
|
1669
|
+
return D(i, O);
|
|
1670
1670
|
}
|
|
1671
|
-
|
|
1672
|
-
function
|
|
1673
|
-
return l && D(
|
|
1671
|
+
o.isBooleanObject = Y;
|
|
1672
|
+
function Ee(i) {
|
|
1673
|
+
return l && D(i, R);
|
|
1674
1674
|
}
|
|
1675
|
-
|
|
1676
|
-
function
|
|
1677
|
-
return f && D(
|
|
1675
|
+
o.isBigIntObject = Ee;
|
|
1676
|
+
function a(i) {
|
|
1677
|
+
return f && D(i, j);
|
|
1678
1678
|
}
|
|
1679
|
-
|
|
1680
|
-
function t(
|
|
1681
|
-
return
|
|
1679
|
+
o.isSymbolObject = a;
|
|
1680
|
+
function t(i) {
|
|
1681
|
+
return H(i) || $(i) || Y(i) || Ee(i) || a(i);
|
|
1682
1682
|
}
|
|
1683
|
-
|
|
1684
|
-
function r(
|
|
1685
|
-
return typeof Uint8Array < "u" && (
|
|
1683
|
+
o.isBoxedPrimitive = t;
|
|
1684
|
+
function r(i) {
|
|
1685
|
+
return typeof Uint8Array < "u" && (L(i) || x(i));
|
|
1686
1686
|
}
|
|
1687
|
-
|
|
1688
|
-
Object.defineProperty(
|
|
1687
|
+
o.isAnyArrayBuffer = r, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(i) {
|
|
1688
|
+
Object.defineProperty(o, i, {
|
|
1689
1689
|
enumerable: !1,
|
|
1690
1690
|
value: function() {
|
|
1691
|
-
throw new Error(
|
|
1691
|
+
throw new Error(i + " is not supported in userland");
|
|
1692
1692
|
}
|
|
1693
1693
|
});
|
|
1694
1694
|
});
|
|
1695
|
-
})(
|
|
1696
|
-
var
|
|
1695
|
+
})(qt);
|
|
1696
|
+
var $n = function(e) {
|
|
1697
1697
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
1698
|
-
},
|
|
1699
|
-
typeof Object.create == "function" ?
|
|
1698
|
+
}, ht = { exports: {} };
|
|
1699
|
+
typeof Object.create == "function" ? ht.exports = function(e, n) {
|
|
1700
1700
|
n && (e.super_ = n, e.prototype = Object.create(n.prototype, {
|
|
1701
1701
|
constructor: {
|
|
1702
1702
|
value: e,
|
|
@@ -1705,31 +1705,31 @@ typeof Object.create == "function" ? dt.exports = function(e, n) {
|
|
|
1705
1705
|
configurable: !0
|
|
1706
1706
|
}
|
|
1707
1707
|
}));
|
|
1708
|
-
} :
|
|
1708
|
+
} : ht.exports = function(e, n) {
|
|
1709
1709
|
if (n) {
|
|
1710
1710
|
e.super_ = n;
|
|
1711
|
-
var
|
|
1711
|
+
var s = function() {
|
|
1712
1712
|
};
|
|
1713
|
-
|
|
1713
|
+
s.prototype = n.prototype, e.prototype = new s(), e.prototype.constructor = e;
|
|
1714
1714
|
}
|
|
1715
1715
|
};
|
|
1716
|
-
var
|
|
1717
|
-
(function(
|
|
1716
|
+
var Wn = ht.exports;
|
|
1717
|
+
(function(o) {
|
|
1718
1718
|
var e = Object.getOwnPropertyDescriptors || function(y) {
|
|
1719
|
-
for (var g = Object.keys(y), E = {},
|
|
1720
|
-
E[g[
|
|
1719
|
+
for (var g = Object.keys(y), E = {}, x = 0; x < g.length; x++)
|
|
1720
|
+
E[g[x]] = Object.getOwnPropertyDescriptor(y, g[x]);
|
|
1721
1721
|
return E;
|
|
1722
1722
|
}, n = /%[sdj%]/g;
|
|
1723
|
-
|
|
1724
|
-
if (!
|
|
1723
|
+
o.format = function(h) {
|
|
1724
|
+
if (!G(h)) {
|
|
1725
1725
|
for (var y = [], g = 0; g < arguments.length; g++)
|
|
1726
1726
|
y.push(l(arguments[g]));
|
|
1727
1727
|
return y.join(" ");
|
|
1728
1728
|
}
|
|
1729
|
-
for (var g = 1, E = arguments,
|
|
1729
|
+
for (var g = 1, E = arguments, x = E.length, I = String(h).replace(n, function(T) {
|
|
1730
1730
|
if (T === "%%")
|
|
1731
1731
|
return "%";
|
|
1732
|
-
if (g >=
|
|
1732
|
+
if (g >= x)
|
|
1733
1733
|
return T;
|
|
1734
1734
|
switch (T) {
|
|
1735
1735
|
case "%s":
|
|
@@ -1745,15 +1745,15 @@ var Hn = dt.exports;
|
|
|
1745
1745
|
default:
|
|
1746
1746
|
return T;
|
|
1747
1747
|
}
|
|
1748
|
-
}), A = E[g]; g <
|
|
1748
|
+
}), A = E[g]; g < x; A = E[++g])
|
|
1749
1749
|
ue(A) || !X(A) ? I += " " + A : I += " " + l(A);
|
|
1750
1750
|
return I;
|
|
1751
|
-
},
|
|
1751
|
+
}, o.deprecate = function(h, y) {
|
|
1752
1752
|
if (typeof Z < "u" && Z.noDeprecation === !0)
|
|
1753
1753
|
return h;
|
|
1754
1754
|
if (typeof Z > "u")
|
|
1755
1755
|
return function() {
|
|
1756
|
-
return
|
|
1756
|
+
return o.deprecate(h, y).apply(this, arguments);
|
|
1757
1757
|
};
|
|
1758
1758
|
var g = !1;
|
|
1759
1759
|
function E() {
|
|
@@ -1766,32 +1766,32 @@ var Hn = dt.exports;
|
|
|
1766
1766
|
}
|
|
1767
1767
|
return E;
|
|
1768
1768
|
};
|
|
1769
|
-
var
|
|
1769
|
+
var s = {}, u = /^$/;
|
|
1770
1770
|
if (Z.env.NODE_DEBUG) {
|
|
1771
1771
|
var c = Z.env.NODE_DEBUG;
|
|
1772
1772
|
c = c.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), u = new RegExp("^" + c + "$", "i");
|
|
1773
1773
|
}
|
|
1774
|
-
|
|
1775
|
-
if (h = h.toUpperCase(), !
|
|
1774
|
+
o.debuglog = function(h) {
|
|
1775
|
+
if (h = h.toUpperCase(), !s[h])
|
|
1776
1776
|
if (u.test(h)) {
|
|
1777
1777
|
var y = Z.pid;
|
|
1778
|
-
|
|
1779
|
-
var g =
|
|
1778
|
+
s[h] = function() {
|
|
1779
|
+
var g = o.format.apply(o, arguments);
|
|
1780
1780
|
console.error("%s %d: %s", h, y, g);
|
|
1781
1781
|
};
|
|
1782
1782
|
} else
|
|
1783
|
-
|
|
1783
|
+
s[h] = function() {
|
|
1784
1784
|
};
|
|
1785
|
-
return
|
|
1785
|
+
return s[h];
|
|
1786
1786
|
};
|
|
1787
1787
|
function l(h, y) {
|
|
1788
1788
|
var g = {
|
|
1789
1789
|
seen: [],
|
|
1790
1790
|
stylize: m
|
|
1791
1791
|
};
|
|
1792
|
-
return arguments.length >= 3 && (g.depth = arguments[2]), arguments.length >= 4 && (g.colors = arguments[3]), ne(y) ? g.showHidden = y : y &&
|
|
1792
|
+
return arguments.length >= 3 && (g.depth = arguments[2]), arguments.length >= 4 && (g.colors = arguments[3]), ne(y) ? g.showHidden = y : y && o._extend(g, y), J(g.showHidden) && (g.showHidden = !1), J(g.depth) && (g.depth = 2), J(g.colors) && (g.colors = !1), J(g.customInspect) && (g.customInspect = !0), g.colors && (g.stylize = f), w(g, h, g.depth);
|
|
1793
1793
|
}
|
|
1794
|
-
|
|
1794
|
+
o.inspect = l, l.colors = {
|
|
1795
1795
|
bold: [1, 22],
|
|
1796
1796
|
italic: [3, 23],
|
|
1797
1797
|
underline: [4, 24],
|
|
@@ -1831,14 +1831,14 @@ var Hn = dt.exports;
|
|
|
1831
1831
|
}
|
|
1832
1832
|
function w(h, y, g) {
|
|
1833
1833
|
if (h.customInspect && y && K(y.inspect) && // Filter out the util module, it's inspect function is special
|
|
1834
|
-
y.inspect !==
|
|
1834
|
+
y.inspect !== o.inspect && // Also filter out any prototype objects using the circular check.
|
|
1835
1835
|
!(y.constructor && y.constructor.prototype === y)) {
|
|
1836
1836
|
var E = y.inspect(g, h);
|
|
1837
|
-
return
|
|
1837
|
+
return G(E) || (E = w(h, E, g)), E;
|
|
1838
1838
|
}
|
|
1839
|
-
var
|
|
1840
|
-
if (
|
|
1841
|
-
return
|
|
1839
|
+
var x = O(h, y);
|
|
1840
|
+
if (x)
|
|
1841
|
+
return x;
|
|
1842
1842
|
var I = Object.keys(y), A = b(I);
|
|
1843
1843
|
if (h.showHidden && (I = Object.getOwnPropertyNames(y)), oe(y) && (I.indexOf("message") >= 0 || I.indexOf("description") >= 0))
|
|
1844
1844
|
return R(y);
|
|
@@ -1854,29 +1854,29 @@ var Hn = dt.exports;
|
|
|
1854
1854
|
if (oe(y))
|
|
1855
1855
|
return R(y);
|
|
1856
1856
|
}
|
|
1857
|
-
var
|
|
1858
|
-
if (
|
|
1857
|
+
var P = "", N = !1, H = ["{", "}"];
|
|
1858
|
+
if (ve(y) && (N = !0, H = ["[", "]"]), K(y)) {
|
|
1859
1859
|
var $ = y.name ? ": " + y.name : "";
|
|
1860
|
-
|
|
1860
|
+
P = " [Function" + $ + "]";
|
|
1861
1861
|
}
|
|
1862
|
-
if (ie(y) && (
|
|
1863
|
-
return
|
|
1862
|
+
if (ie(y) && (P = " " + RegExp.prototype.toString.call(y)), fe(y) && (P = " " + Date.prototype.toUTCString.call(y)), oe(y) && (P = " " + R(y)), I.length === 0 && (!N || y.length == 0))
|
|
1863
|
+
return H[0] + P + H[1];
|
|
1864
1864
|
if (g < 0)
|
|
1865
1865
|
return ie(y) ? h.stylize(RegExp.prototype.toString.call(y), "regexp") : h.stylize("[Object]", "special");
|
|
1866
1866
|
h.seen.push(y);
|
|
1867
1867
|
var Y;
|
|
1868
|
-
return
|
|
1869
|
-
return D(h, y, g, A,
|
|
1870
|
-
}), h.seen.pop(),
|
|
1868
|
+
return N ? Y = j(h, y, g, A, I) : Y = I.map(function(Ee) {
|
|
1869
|
+
return D(h, y, g, A, Ee, N);
|
|
1870
|
+
}), h.seen.pop(), W(Y, P, H);
|
|
1871
1871
|
}
|
|
1872
1872
|
function O(h, y) {
|
|
1873
1873
|
if (J(y))
|
|
1874
1874
|
return h.stylize("undefined", "undefined");
|
|
1875
|
-
if (
|
|
1875
|
+
if (G(y)) {
|
|
1876
1876
|
var g = "'" + JSON.stringify(y).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
1877
1877
|
return h.stylize(g, "string");
|
|
1878
1878
|
}
|
|
1879
|
-
if (
|
|
1879
|
+
if (we(y))
|
|
1880
1880
|
return h.stylize("" + y, "number");
|
|
1881
1881
|
if (ne(y))
|
|
1882
1882
|
return h.stylize("" + y, "boolean");
|
|
@@ -1886,7 +1886,7 @@ var Hn = dt.exports;
|
|
|
1886
1886
|
function R(h) {
|
|
1887
1887
|
return "[" + Error.prototype.toString.call(h) + "]";
|
|
1888
1888
|
}
|
|
1889
|
-
function j(h, y, g, E,
|
|
1889
|
+
function j(h, y, g, E, x) {
|
|
1890
1890
|
for (var I = [], A = 0, T = y.length; A < T; ++A)
|
|
1891
1891
|
pe(y, String(A)) ? I.push(D(
|
|
1892
1892
|
h,
|
|
@@ -1896,103 +1896,103 @@ var Hn = dt.exports;
|
|
|
1896
1896
|
String(A),
|
|
1897
1897
|
!0
|
|
1898
1898
|
)) : I.push("");
|
|
1899
|
-
return
|
|
1900
|
-
|
|
1899
|
+
return x.forEach(function(P) {
|
|
1900
|
+
P.match(/^\d+$/) || I.push(D(
|
|
1901
1901
|
h,
|
|
1902
1902
|
y,
|
|
1903
1903
|
g,
|
|
1904
1904
|
E,
|
|
1905
|
-
|
|
1905
|
+
P,
|
|
1906
1906
|
!0
|
|
1907
1907
|
));
|
|
1908
1908
|
}), I;
|
|
1909
1909
|
}
|
|
1910
|
-
function D(h, y, g, E,
|
|
1911
|
-
var A, T,
|
|
1912
|
-
if (
|
|
1910
|
+
function D(h, y, g, E, x, I) {
|
|
1911
|
+
var A, T, P;
|
|
1912
|
+
if (P = Object.getOwnPropertyDescriptor(y, x) || { value: y[x] }, P.get ? P.set ? T = h.stylize("[Getter/Setter]", "special") : T = h.stylize("[Getter]", "special") : P.set && (T = h.stylize("[Setter]", "special")), pe(E, x) || (A = "[" + x + "]"), T || (h.seen.indexOf(P.value) < 0 ? (ue(g) ? T = w(h, P.value, null) : T = w(h, P.value, g - 1), T.indexOf(`
|
|
1913
1913
|
`) > -1 && (I ? T = T.split(`
|
|
1914
|
-
`).map(function(
|
|
1915
|
-
return " " +
|
|
1914
|
+
`).map(function(N) {
|
|
1915
|
+
return " " + N;
|
|
1916
1916
|
}).join(`
|
|
1917
1917
|
`).slice(2) : T = `
|
|
1918
1918
|
` + T.split(`
|
|
1919
|
-
`).map(function(
|
|
1920
|
-
return " " +
|
|
1919
|
+
`).map(function(N) {
|
|
1920
|
+
return " " + N;
|
|
1921
1921
|
}).join(`
|
|
1922
1922
|
`))) : T = h.stylize("[Circular]", "special")), J(A)) {
|
|
1923
|
-
if (I &&
|
|
1923
|
+
if (I && x.match(/^\d+$/))
|
|
1924
1924
|
return T;
|
|
1925
|
-
A = JSON.stringify("" +
|
|
1925
|
+
A = JSON.stringify("" + x), A.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (A = A.slice(1, -1), A = h.stylize(A, "name")) : (A = A.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), A = h.stylize(A, "string"));
|
|
1926
1926
|
}
|
|
1927
1927
|
return A + ": " + T;
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1930
|
-
var E = h.reduce(function(
|
|
1929
|
+
function W(h, y, g) {
|
|
1930
|
+
var E = h.reduce(function(x, I) {
|
|
1931
1931
|
return I.indexOf(`
|
|
1932
|
-
`) >= 0,
|
|
1932
|
+
`) >= 0, x + I.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
1933
1933
|
}, 0);
|
|
1934
1934
|
return E > 60 ? g[0] + (y === "" ? "" : y + `
|
|
1935
1935
|
`) + " " + h.join(`,
|
|
1936
1936
|
`) + " " + g[1] : g[0] + y + " " + h.join(", ") + " " + g[1];
|
|
1937
1937
|
}
|
|
1938
|
-
|
|
1939
|
-
function
|
|
1938
|
+
o.types = qt;
|
|
1939
|
+
function ve(h) {
|
|
1940
1940
|
return Array.isArray(h);
|
|
1941
1941
|
}
|
|
1942
|
-
|
|
1942
|
+
o.isArray = ve;
|
|
1943
1943
|
function ne(h) {
|
|
1944
1944
|
return typeof h == "boolean";
|
|
1945
1945
|
}
|
|
1946
|
-
|
|
1946
|
+
o.isBoolean = ne;
|
|
1947
1947
|
function ue(h) {
|
|
1948
1948
|
return h === null;
|
|
1949
1949
|
}
|
|
1950
|
-
|
|
1951
|
-
function
|
|
1950
|
+
o.isNull = ue;
|
|
1951
|
+
function me(h) {
|
|
1952
1952
|
return h == null;
|
|
1953
1953
|
}
|
|
1954
|
-
|
|
1955
|
-
function
|
|
1954
|
+
o.isNullOrUndefined = me;
|
|
1955
|
+
function we(h) {
|
|
1956
1956
|
return typeof h == "number";
|
|
1957
1957
|
}
|
|
1958
|
-
|
|
1959
|
-
function
|
|
1958
|
+
o.isNumber = we;
|
|
1959
|
+
function G(h) {
|
|
1960
1960
|
return typeof h == "string";
|
|
1961
1961
|
}
|
|
1962
|
-
|
|
1963
|
-
function
|
|
1962
|
+
o.isString = G;
|
|
1963
|
+
function be(h) {
|
|
1964
1964
|
return typeof h == "symbol";
|
|
1965
1965
|
}
|
|
1966
|
-
|
|
1966
|
+
o.isSymbol = be;
|
|
1967
1967
|
function J(h) {
|
|
1968
1968
|
return h === void 0;
|
|
1969
1969
|
}
|
|
1970
|
-
|
|
1970
|
+
o.isUndefined = J;
|
|
1971
1971
|
function ie(h) {
|
|
1972
1972
|
return X(h) && Q(h) === "[object RegExp]";
|
|
1973
1973
|
}
|
|
1974
|
-
|
|
1974
|
+
o.isRegExp = ie, o.types.isRegExp = ie;
|
|
1975
1975
|
function X(h) {
|
|
1976
1976
|
return typeof h == "object" && h !== null;
|
|
1977
1977
|
}
|
|
1978
|
-
|
|
1978
|
+
o.isObject = X;
|
|
1979
1979
|
function fe(h) {
|
|
1980
1980
|
return X(h) && Q(h) === "[object Date]";
|
|
1981
1981
|
}
|
|
1982
|
-
|
|
1982
|
+
o.isDate = fe, o.types.isDate = fe;
|
|
1983
1983
|
function oe(h) {
|
|
1984
1984
|
return X(h) && (Q(h) === "[object Error]" || h instanceof Error);
|
|
1985
1985
|
}
|
|
1986
|
-
|
|
1986
|
+
o.isError = oe, o.types.isNativeError = oe;
|
|
1987
1987
|
function K(h) {
|
|
1988
1988
|
return typeof h == "function";
|
|
1989
1989
|
}
|
|
1990
|
-
|
|
1991
|
-
function
|
|
1990
|
+
o.isFunction = K;
|
|
1991
|
+
function Re(h) {
|
|
1992
1992
|
return h === null || typeof h == "boolean" || typeof h == "number" || typeof h == "string" || typeof h == "symbol" || // ES6 symbol
|
|
1993
1993
|
typeof h > "u";
|
|
1994
1994
|
}
|
|
1995
|
-
|
|
1995
|
+
o.isPrimitive = Re, o.isBuffer = $n;
|
|
1996
1996
|
function Q(h) {
|
|
1997
1997
|
return Object.prototype.toString.call(h);
|
|
1998
1998
|
}
|
|
@@ -2021,9 +2021,9 @@ var Hn = dt.exports;
|
|
|
2021
2021
|
].join(":");
|
|
2022
2022
|
return [h.getDate(), le[h.getMonth()], y].join(" ");
|
|
2023
2023
|
}
|
|
2024
|
-
|
|
2025
|
-
console.log("%s - %s", Be(),
|
|
2026
|
-
},
|
|
2024
|
+
o.log = function() {
|
|
2025
|
+
console.log("%s - %s", Be(), o.format.apply(o, arguments));
|
|
2026
|
+
}, o.inherits = Wn, o._extend = function(h, y) {
|
|
2027
2027
|
if (!y || !X(y))
|
|
2028
2028
|
return h;
|
|
2029
2029
|
for (var g = Object.keys(y), E = g.length; E--; )
|
|
@@ -2034,7 +2034,7 @@ var Hn = dt.exports;
|
|
|
2034
2034
|
return Object.prototype.hasOwnProperty.call(h, y);
|
|
2035
2035
|
}
|
|
2036
2036
|
var V = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
|
|
2037
|
-
|
|
2037
|
+
o.promisify = function(y) {
|
|
2038
2038
|
if (typeof y != "function")
|
|
2039
2039
|
throw new TypeError('The "original" argument must be of type Function');
|
|
2040
2040
|
if (V && y[V]) {
|
|
@@ -2049,17 +2049,17 @@ var Hn = dt.exports;
|
|
|
2049
2049
|
}), g;
|
|
2050
2050
|
}
|
|
2051
2051
|
function g() {
|
|
2052
|
-
for (var E,
|
|
2053
|
-
E =
|
|
2052
|
+
for (var E, x, I = new Promise(function(P, N) {
|
|
2053
|
+
E = P, x = N;
|
|
2054
2054
|
}), A = [], T = 0; T < arguments.length; T++)
|
|
2055
2055
|
A.push(arguments[T]);
|
|
2056
|
-
A.push(function(
|
|
2057
|
-
|
|
2056
|
+
A.push(function(P, N) {
|
|
2057
|
+
P ? x(P) : E(N);
|
|
2058
2058
|
});
|
|
2059
2059
|
try {
|
|
2060
2060
|
y.apply(this, A);
|
|
2061
|
-
} catch (
|
|
2062
|
-
|
|
2061
|
+
} catch (P) {
|
|
2062
|
+
x(P);
|
|
2063
2063
|
}
|
|
2064
2064
|
return I;
|
|
2065
2065
|
}
|
|
@@ -2072,7 +2072,7 @@ var Hn = dt.exports;
|
|
|
2072
2072
|
g,
|
|
2073
2073
|
e(y)
|
|
2074
2074
|
);
|
|
2075
|
-
},
|
|
2075
|
+
}, o.promisify.custom = V;
|
|
2076
2076
|
function he(h, y) {
|
|
2077
2077
|
if (!h) {
|
|
2078
2078
|
var g = new Error("Promise was rejected with a falsy value");
|
|
@@ -2080,17 +2080,17 @@ var Hn = dt.exports;
|
|
|
2080
2080
|
}
|
|
2081
2081
|
return y(h);
|
|
2082
2082
|
}
|
|
2083
|
-
function
|
|
2083
|
+
function L(h) {
|
|
2084
2084
|
if (typeof h != "function")
|
|
2085
2085
|
throw new TypeError('The "original" argument must be of type Function');
|
|
2086
2086
|
function y() {
|
|
2087
2087
|
for (var g = [], E = 0; E < arguments.length; E++)
|
|
2088
2088
|
g.push(arguments[E]);
|
|
2089
|
-
var
|
|
2090
|
-
if (typeof
|
|
2089
|
+
var x = g.pop();
|
|
2090
|
+
if (typeof x != "function")
|
|
2091
2091
|
throw new TypeError("The last argument must be of type Function");
|
|
2092
2092
|
var I = this, A = function() {
|
|
2093
|
-
return
|
|
2093
|
+
return x.apply(I, arguments);
|
|
2094
2094
|
};
|
|
2095
2095
|
h.apply(this, g).then(
|
|
2096
2096
|
function(T) {
|
|
@@ -2106,275 +2106,127 @@ var Hn = dt.exports;
|
|
|
2106
2106
|
e(h)
|
|
2107
2107
|
), y;
|
|
2108
2108
|
}
|
|
2109
|
-
|
|
2110
|
-
})(
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
return self;
|
|
2119
|
-
if (typeof window == "object" && window)
|
|
2120
|
-
return window;
|
|
2121
|
-
throw new Error("Unable to resolve global `this`");
|
|
2122
|
-
};
|
|
2123
|
-
return at = function() {
|
|
2124
|
-
if (this)
|
|
2125
|
-
return this;
|
|
2126
|
-
if (typeof globalThis == "object" && globalThis)
|
|
2127
|
-
return globalThis;
|
|
2128
|
-
try {
|
|
2129
|
-
Object.defineProperty(Object.prototype, "__global__", {
|
|
2130
|
-
get: function() {
|
|
2131
|
-
return this;
|
|
2132
|
-
},
|
|
2133
|
-
configurable: !0
|
|
2134
|
-
});
|
|
2135
|
-
} catch {
|
|
2136
|
-
return i();
|
|
2137
|
-
}
|
|
2138
|
-
try {
|
|
2139
|
-
return __global__ || i();
|
|
2140
|
-
} finally {
|
|
2141
|
-
delete Object.prototype.__global__;
|
|
2142
|
-
}
|
|
2143
|
-
}(), at;
|
|
2109
|
+
o.callbackify = L;
|
|
2110
|
+
})(gt);
|
|
2111
|
+
const Gn = 3e3;
|
|
2112
|
+
let ot;
|
|
2113
|
+
function Jn() {
|
|
2114
|
+
if (ot)
|
|
2115
|
+
return ot;
|
|
2116
|
+
const o = typeof globalThis < "u" && globalThis.WebSocket || void 0;
|
|
2117
|
+
return o && (ot = o), o;
|
|
2144
2118
|
}
|
|
2145
|
-
|
|
2146
|
-
type: "range",
|
|
2147
|
-
registry: !0,
|
|
2148
|
-
raw: "websocket@^1.0.30",
|
|
2149
|
-
name: "websocket",
|
|
2150
|
-
escapedName: "websocket",
|
|
2151
|
-
rawSpec: "^1.0.30",
|
|
2152
|
-
saveSpec: null,
|
|
2153
|
-
fetchSpec: "^1.0.30"
|
|
2154
|
-
}, ri = [
|
|
2155
|
-
"/"
|
|
2156
|
-
], ni = "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", ii = "2bdc2602c08bf2c82253b730655c0ef7dcab3111", oi = "websocket@^1.0.30", si = "/Users/peter/dev/cachearoo-js", ai = {
|
|
2157
|
-
name: "Brian McKelvey",
|
|
2158
|
-
email: "theturtle32@gmail.com",
|
|
2159
|
-
url: "https://github.com/theturtle32"
|
|
2160
|
-
}, ui = "lib/browser.js", fi = {
|
|
2161
|
-
url: "https://github.com/theturtle32/WebSocket-Node/issues"
|
|
2162
|
-
}, ci = !1, li = {
|
|
2163
|
-
verbose: !1
|
|
2164
|
-
}, pi = [
|
|
2165
|
-
{
|
|
2166
|
-
name: "Iñaki Baz Castillo",
|
|
2167
|
-
email: "ibc@aliax.net",
|
|
2168
|
-
url: "http://dev.sipdoc.net"
|
|
2169
|
-
}
|
|
2170
|
-
], hi = {
|
|
2171
|
-
bufferutil: "^4.0.1",
|
|
2172
|
-
debug: "^2.2.0",
|
|
2173
|
-
"es5-ext": "^0.10.50",
|
|
2174
|
-
"typedarray-to-buffer": "^3.1.5",
|
|
2175
|
-
"utf-8-validate": "^5.0.2",
|
|
2176
|
-
yaeti: "^0.0.6"
|
|
2177
|
-
}, yi = !1, di = "Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.", gi = {
|
|
2178
|
-
"buffer-equal": "^1.0.0",
|
|
2179
|
-
gulp: "^4.0.2",
|
|
2180
|
-
"gulp-jshint": "^2.0.4",
|
|
2181
|
-
jshint: "^2.0.0",
|
|
2182
|
-
"jshint-stylish": "^2.2.1",
|
|
2183
|
-
tape: "^4.9.1"
|
|
2184
|
-
}, vi = {
|
|
2185
|
-
lib: "./lib"
|
|
2186
|
-
}, mi = {
|
|
2187
|
-
node: ">=4.0.0"
|
|
2188
|
-
}, wi = "https://github.com/theturtle32/WebSocket-Node", bi = [
|
|
2189
|
-
"websocket",
|
|
2190
|
-
"websockets",
|
|
2191
|
-
"socket",
|
|
2192
|
-
"networking",
|
|
2193
|
-
"comet",
|
|
2194
|
-
"push",
|
|
2195
|
-
"RFC-6455",
|
|
2196
|
-
"realtime",
|
|
2197
|
-
"server",
|
|
2198
|
-
"client"
|
|
2199
|
-
], Ei = "Apache-2.0", Ai = "index", Si = "websocket", Ti = {
|
|
2200
|
-
type: "git",
|
|
2201
|
-
url: "git+https://github.com/theturtle32/WebSocket-Node.git"
|
|
2202
|
-
}, Oi = {
|
|
2203
|
-
gulp: "gulp",
|
|
2204
|
-
test: "tape test/unit/*.js"
|
|
2205
|
-
}, Fi = "1.0.34", xi = {
|
|
2206
|
-
_from: Qn,
|
|
2207
|
-
_id: Vn,
|
|
2208
|
-
_inBundle: Xn,
|
|
2209
|
-
_integrity: Yn,
|
|
2210
|
-
_location: Zn,
|
|
2211
|
-
_phantomChildren: ei,
|
|
2212
|
-
_requested: ti,
|
|
2213
|
-
_requiredBy: ri,
|
|
2214
|
-
_resolved: ni,
|
|
2215
|
-
_shasum: ii,
|
|
2216
|
-
_spec: oi,
|
|
2217
|
-
_where: si,
|
|
2218
|
-
author: ai,
|
|
2219
|
-
browser: ui,
|
|
2220
|
-
bugs: fi,
|
|
2221
|
-
bundleDependencies: ci,
|
|
2222
|
-
config: li,
|
|
2223
|
-
contributors: pi,
|
|
2224
|
-
dependencies: hi,
|
|
2225
|
-
deprecated: yi,
|
|
2226
|
-
description: di,
|
|
2227
|
-
devDependencies: gi,
|
|
2228
|
-
directories: vi,
|
|
2229
|
-
engines: mi,
|
|
2230
|
-
homepage: wi,
|
|
2231
|
-
keywords: bi,
|
|
2232
|
-
license: Ei,
|
|
2233
|
-
main: Ai,
|
|
2234
|
-
name: Si,
|
|
2235
|
-
repository: Ti,
|
|
2236
|
-
scripts: Oi,
|
|
2237
|
-
version: Fi
|
|
2238
|
-
};
|
|
2239
|
-
var Ii = xi.version, ye;
|
|
2240
|
-
if (typeof globalThis == "object")
|
|
2241
|
-
ye = globalThis;
|
|
2242
|
-
else
|
|
2243
|
-
try {
|
|
2244
|
-
ye = Kn();
|
|
2245
|
-
} catch {
|
|
2246
|
-
} finally {
|
|
2247
|
-
if (!ye && typeof window < "u" && (ye = window), !ye)
|
|
2248
|
-
throw new Error("Could not determine global this");
|
|
2249
|
-
}
|
|
2250
|
-
var je = ye.WebSocket || ye.MozWebSocket, ki = Ii;
|
|
2251
|
-
function ir(i, e) {
|
|
2252
|
-
var n;
|
|
2253
|
-
return e ? n = new je(i, e) : n = new je(i), n;
|
|
2254
|
-
}
|
|
2255
|
-
je && ["CONNECTING", "OPEN", "CLOSING", "CLOSED"].forEach(function(i) {
|
|
2256
|
-
Object.defineProperty(ir, i, {
|
|
2257
|
-
get: function() {
|
|
2258
|
-
return je[i];
|
|
2259
|
-
}
|
|
2260
|
-
});
|
|
2261
|
-
});
|
|
2262
|
-
var Ri = {
|
|
2263
|
-
w3cwebsocket: je ? ir : null,
|
|
2264
|
-
version: ki
|
|
2265
|
-
};
|
|
2266
|
-
const Pi = 3e3;
|
|
2267
|
-
function Bi(i) {
|
|
2119
|
+
function Hn(o) {
|
|
2268
2120
|
const e = new Uint8Array(128);
|
|
2269
2121
|
let n = 0;
|
|
2270
|
-
const
|
|
2122
|
+
const s = typeof window < "u" ? window.TextEncoder : gt.TextEncoder, u = new s(), c = u.encode(o.bucket), l = u.encode(o.key), f = u.encode(o.apiKey);
|
|
2271
2123
|
if (c.byteLength > 36 || l.byteLength > 36 || f.byteLength > 36)
|
|
2272
2124
|
throw new Error("Cannot write binary header, bucket/key/apiKey cannot exceed 36 bytes each");
|
|
2273
|
-
return e[0] =
|
|
2125
|
+
return e[0] = o.type, e[1] = c.byteLength, e[2] = l.byteLength, e[3] = f.byteLength, n = 4, e.set(c, n), n += e[1], e.set(l, n), n += e[2], e.set(f, n), e;
|
|
2274
2126
|
}
|
|
2275
|
-
function
|
|
2276
|
-
let e =
|
|
2277
|
-
const u = typeof window < "u" ? window.TextDecoder :
|
|
2278
|
-
type:
|
|
2127
|
+
function zn(o) {
|
|
2128
|
+
let e = o[1], n = o[2], s = o[3];
|
|
2129
|
+
const u = typeof window < "u" ? window.TextDecoder : gt.TextDecoder, c = new u("utf-8"), l = {
|
|
2130
|
+
type: o[0],
|
|
2279
2131
|
bucket: "",
|
|
2280
2132
|
key: "",
|
|
2281
2133
|
apiKey: ""
|
|
2282
2134
|
};
|
|
2283
2135
|
let f = 4;
|
|
2284
|
-
return l.bucket = c.decode(
|
|
2136
|
+
return l.bucket = c.decode(o.slice(f, f + e)), f = f + e, l.key = c.decode(o.slice(f, f + n)), f = f + n, l.apiKey = c.decode(o.slice(f, f + s)), l;
|
|
2285
2137
|
}
|
|
2286
|
-
class
|
|
2138
|
+
class Kn {
|
|
2287
2139
|
constructor(e) {
|
|
2288
2140
|
this.connected = !1, this.id = void 0, this.enablePing = !1, this.requestID = 0, this.events = [], this.binaryEvents = [], this.sendValues = !1, this.ws = void 0, this.eventsReceived = 0, this.skipReconnect = !1, this.requests = [], this.requestTimer = void 0, this.reconnectTimer = void 0, this.pingTimer = void 0, this.pingInterval = 5e3, this.settings = e, this.enablePing = !!e.enablePing, this.pingInterval = e.pingInterval || this.pingInterval;
|
|
2289
2141
|
var n = e.secure ? "wss://" : "ws://";
|
|
2290
2142
|
this.apiKey = e.apiKey;
|
|
2291
|
-
const
|
|
2143
|
+
const s = e.wsSubDomain ? e.wsSubDomain + "." : "", u = n + s + e.host + ":" + e.port + e.path + "?id=" + e.clientId + "&apiKey=" + (e.apiKey || "");
|
|
2292
2144
|
this.wsStart(u), this.checkRequestTimeouts();
|
|
2293
2145
|
}
|
|
2294
2146
|
async request(e) {
|
|
2295
2147
|
e.key || (e.key = "");
|
|
2296
|
-
const n = e.bucket || this.settings.bucket || "",
|
|
2297
|
-
if (
|
|
2148
|
+
const n = e.bucket || this.settings.bucket || "", s = e.method || "GET";
|
|
2149
|
+
if (s === "GET" && e.key === "")
|
|
2298
2150
|
return this.list(n, e.keysOnly, e.filter);
|
|
2299
|
-
if (
|
|
2151
|
+
if (s === "GET")
|
|
2300
2152
|
return this.read(n, e.key);
|
|
2301
|
-
if (
|
|
2153
|
+
if (s === "POST" || s === "PUT")
|
|
2302
2154
|
return this.write(n, e.key, e.data, e.failIfExists, e.expire);
|
|
2303
|
-
if (
|
|
2155
|
+
if (s === "DELETE")
|
|
2304
2156
|
return this.delete(n, e.key);
|
|
2305
|
-
if (
|
|
2157
|
+
if (s === "PATCH")
|
|
2306
2158
|
return this.patch(n, e.key, e.data, e.removeDataFromReply);
|
|
2307
|
-
if (
|
|
2159
|
+
if (s === "EVENT")
|
|
2308
2160
|
return this.signalEvent(n, e.key, e.data);
|
|
2309
2161
|
}
|
|
2310
2162
|
async read(e, n) {
|
|
2311
|
-
return new Promise((
|
|
2163
|
+
return new Promise((s, u) => {
|
|
2312
2164
|
this.addRequest({ op: "read", bucket: e, key: n }, function(c, l) {
|
|
2313
|
-
c ? u(new Error("Cachearoo ws READ error: " + JSON.stringify(c) + " for bucket: " + e + ", key: " + n)) :
|
|
2165
|
+
c ? u(new Error("Cachearoo ws READ error: " + JSON.stringify(c) + " for bucket: " + e + ", key: " + n)) : s(l);
|
|
2314
2166
|
});
|
|
2315
2167
|
});
|
|
2316
2168
|
}
|
|
2317
|
-
async list(e, n,
|
|
2169
|
+
async list(e, n, s) {
|
|
2318
2170
|
return new Promise((u, c) => {
|
|
2319
|
-
this.addRequest({ op: "filter", bucket: e, keysOnly: n, filter:
|
|
2171
|
+
this.addRequest({ op: "filter", bucket: e, keysOnly: n, filter: s }, function(l, f) {
|
|
2320
2172
|
l ? c(new Error("Cachearoo ws FILTER error: " + JSON.stringify(l) + " for bucket: " + e)) : u(f);
|
|
2321
2173
|
});
|
|
2322
2174
|
});
|
|
2323
2175
|
}
|
|
2324
|
-
async write(e, n,
|
|
2176
|
+
async write(e, n, s, u, c) {
|
|
2325
2177
|
return new Promise((l, f) => {
|
|
2326
|
-
this.addRequest({ op: "write", bucket: e, key: n, value:
|
|
2178
|
+
this.addRequest({ op: "write", bucket: e, key: n, value: s, failIfExists: u, expire: c }, function(m, b) {
|
|
2327
2179
|
if (m) {
|
|
2328
|
-
const w = m.alreadyExists ? new
|
|
2180
|
+
const w = m.alreadyExists ? new rr(`Key ${n} already exists`) : new Error("Cachearoo ws WRITE error: " + JSON.stringify(m) + " for bucket: " + e + ", key: " + n);
|
|
2329
2181
|
f(w);
|
|
2330
2182
|
} else
|
|
2331
2183
|
l(b);
|
|
2332
2184
|
});
|
|
2333
2185
|
});
|
|
2334
2186
|
}
|
|
2335
|
-
async patch(e, n,
|
|
2187
|
+
async patch(e, n, s, u) {
|
|
2336
2188
|
return new Promise((c, l) => {
|
|
2337
|
-
this.addRequest({ op: "patch", bucket: e, key: n, patch:
|
|
2189
|
+
this.addRequest({ op: "patch", bucket: e, key: n, patch: s, removeDataFromReply: u }, function(f, m) {
|
|
2338
2190
|
f ? l(new Error("Cachearoo ws PATCH error: " + JSON.stringify(f) + " for bucket: " + e + ", key: " + n)) : c(m);
|
|
2339
2191
|
});
|
|
2340
2192
|
});
|
|
2341
2193
|
}
|
|
2342
2194
|
async delete(e, n) {
|
|
2343
|
-
return new Promise((
|
|
2195
|
+
return new Promise((s, u) => {
|
|
2344
2196
|
this.addRequest({ op: "remove", bucket: e, key: n }, function(c) {
|
|
2345
|
-
c ? u(new Error("Cachearoo ws REMOVE error: " + JSON.stringify(c) + " for bucket: " + e + ", key: " + n)) :
|
|
2197
|
+
c ? u(new Error("Cachearoo ws REMOVE error: " + JSON.stringify(c) + " for bucket: " + e + ", key: " + n)) : s();
|
|
2346
2198
|
});
|
|
2347
2199
|
});
|
|
2348
2200
|
}
|
|
2349
|
-
async signalEvent(e, n,
|
|
2350
|
-
var u = { bucket: e, key: n, value:
|
|
2201
|
+
async signalEvent(e, n, s) {
|
|
2202
|
+
var u = { bucket: e, key: n, value: s };
|
|
2351
2203
|
return this.connected && this.ws ? (this.ws.send(JSON.stringify({ msg: "event-broadcast", apiKey: this.apiKey, event: u })), Promise.resolve()) : Promise.reject(new Error("Cannot call SignalEvent when disconnected"));
|
|
2352
2204
|
}
|
|
2353
|
-
async signalEventBinary(e, n,
|
|
2205
|
+
async signalEventBinary(e, n, s, u) {
|
|
2354
2206
|
const c = {
|
|
2355
2207
|
type: e,
|
|
2356
2208
|
bucket: n,
|
|
2357
|
-
key:
|
|
2209
|
+
key: s,
|
|
2358
2210
|
apiKey: this.apiKey || ""
|
|
2359
|
-
}, l =
|
|
2360
|
-
this.connected && this.ws && this.ws.send(
|
|
2211
|
+
}, l = Hn(c);
|
|
2212
|
+
this.connected && this.ws && this.ws.send(Lt.Buffer.concat([l, u]));
|
|
2361
2213
|
}
|
|
2362
2214
|
close() {
|
|
2363
2215
|
this.events = [], this.skipReconnect = !0, this.connected = !1, this.ws && this.ws.close && this.ws.close(), this.ws = void 0, clearTimeout(this.reconnectTimer), clearInterval(this.pingTimer), clearTimeout(this.requestTimer);
|
|
2364
2216
|
}
|
|
2365
|
-
addListenerBinary(e, n,
|
|
2366
|
-
if (
|
|
2217
|
+
addListenerBinary(e, n, s) {
|
|
2218
|
+
if (s == null || typeof s != "function")
|
|
2367
2219
|
throw "Callback is not a function";
|
|
2368
2220
|
this.binaryEvents.push({
|
|
2369
2221
|
bucket: e,
|
|
2370
2222
|
key: n,
|
|
2371
|
-
callback:
|
|
2223
|
+
callback: s
|
|
2372
2224
|
}), this.registerEvents();
|
|
2373
2225
|
}
|
|
2374
|
-
addListener(e, n,
|
|
2226
|
+
addListener(e, n, s, u) {
|
|
2375
2227
|
if (u == null || typeof u != "function")
|
|
2376
2228
|
throw "Callback is not a function";
|
|
2377
|
-
|
|
2229
|
+
s && (this.sendValues = !0), this.events.push({
|
|
2378
2230
|
bucket: e,
|
|
2379
2231
|
key: n,
|
|
2380
2232
|
callback: u
|
|
@@ -2397,8 +2249,8 @@ class _i {
|
|
|
2397
2249
|
for (var e in this.requests) {
|
|
2398
2250
|
var n = this.requests[e + ""];
|
|
2399
2251
|
if (n) {
|
|
2400
|
-
var
|
|
2401
|
-
|
|
2252
|
+
var s = (/* @__PURE__ */ new Date()).getTime();
|
|
2253
|
+
s - this.requests[e].timeStamp > Gn && (n.callback("Timeout occured for request " + n.id), this.requests[e] = null);
|
|
2402
2254
|
}
|
|
2403
2255
|
}
|
|
2404
2256
|
this.skipReconnect || this.checkRequestTimeouts();
|
|
@@ -2409,11 +2261,11 @@ class _i {
|
|
|
2409
2261
|
if (this.connected) {
|
|
2410
2262
|
var e = [], n = [];
|
|
2411
2263
|
const l = [...this.events, ...this.binaryEvents];
|
|
2412
|
-
for (var
|
|
2413
|
-
var u = JSON.stringify(l[
|
|
2264
|
+
for (var s = 0; s < l.length; s++) {
|
|
2265
|
+
var u = JSON.stringify(l[s]);
|
|
2414
2266
|
e[u] || (n.push({
|
|
2415
|
-
bucket: l[
|
|
2416
|
-
key: l[
|
|
2267
|
+
bucket: l[s].bucket,
|
|
2268
|
+
key: l[s].key
|
|
2417
2269
|
}), e[u] = !0);
|
|
2418
2270
|
}
|
|
2419
2271
|
(c = this.ws) == null || c.send(JSON.stringify({
|
|
@@ -2427,9 +2279,9 @@ class _i {
|
|
|
2427
2279
|
processBinaryMessage(e) {
|
|
2428
2280
|
if (e.byteLength < 128)
|
|
2429
2281
|
return console.error("Binary data without header");
|
|
2430
|
-
const n =
|
|
2431
|
-
for (var
|
|
2432
|
-
(this.binaryEvents[
|
|
2282
|
+
const n = zn(new Uint8Array(e));
|
|
2283
|
+
for (var s = 0; s < this.binaryEvents.length; s++)
|
|
2284
|
+
(this.binaryEvents[s].bucket === "*" || this.binaryEvents[s].bucket == n.bucket) && (this.binaryEvents[s].key === "*" || this.binaryEvents[s].key == n.key) && this.binaryEvents[s].callback({
|
|
2433
2285
|
type: n.type,
|
|
2434
2286
|
bucket: n.bucket,
|
|
2435
2287
|
key: n.key,
|
|
@@ -2451,10 +2303,10 @@ class _i {
|
|
|
2451
2303
|
return;
|
|
2452
2304
|
}
|
|
2453
2305
|
this.eventsReceived++;
|
|
2454
|
-
var
|
|
2306
|
+
var s = typeof n.value < "u" && typeof n.isDeleted > "u" ? n.value : null, u = {
|
|
2455
2307
|
bucket: n.bucket,
|
|
2456
2308
|
key: n.key,
|
|
2457
|
-
value:
|
|
2309
|
+
value: s,
|
|
2458
2310
|
isDeleted: void 0
|
|
2459
2311
|
};
|
|
2460
2312
|
n.isDeleted && (u.isDeleted = !0);
|
|
@@ -2462,12 +2314,16 @@ class _i {
|
|
|
2462
2314
|
(this.events[c].bucket === "*" || this.events[c].bucket == u.bucket) && (this.events[c].key === "*" || this.events[c].key == u.key) && this.events[c].callback(u);
|
|
2463
2315
|
}
|
|
2464
2316
|
wsStart(e) {
|
|
2465
|
-
this.skipReconnect = !1, this.connected = !1, this.pingTimer && clearInterval(this.pingTimer), this.ws && this.ws.close && this.ws.close()
|
|
2317
|
+
this.skipReconnect = !1, this.connected = !1, this.pingTimer && clearInterval(this.pingTimer), this.ws && this.ws.close && this.ws.close();
|
|
2318
|
+
const n = Jn();
|
|
2319
|
+
if (!n)
|
|
2320
|
+
throw new Error("No global WebSocket implementation available. Use a browser or Node.js >= 22 (or assign one to globalThis.WebSocket).");
|
|
2321
|
+
this.ws = new n(e), this.ws.binaryType = "arraybuffer", this.enablePing && (this.pingTimer = setInterval(() => {
|
|
2466
2322
|
this.ws != null && this.connected && this.ws.send(JSON.stringify({ msg: "ping" }));
|
|
2467
|
-
}, this.pingInterval)), this.ws.onerror = (
|
|
2468
|
-
typeof this.onError == "function" && this.onError(
|
|
2469
|
-
}, this.ws.onmessage = (
|
|
2470
|
-
typeof
|
|
2323
|
+
}, this.pingInterval)), this.ws.onerror = (s) => {
|
|
2324
|
+
typeof this.onError == "function" && this.onError(s);
|
|
2325
|
+
}, this.ws.onmessage = (s) => {
|
|
2326
|
+
typeof s.data == "string" ? this.processStringMessage(s.data) : this.processBinaryMessage(s.data);
|
|
2471
2327
|
}, this.ws.onclose = () => {
|
|
2472
2328
|
this.connected && (this.connected = !1, typeof this.onDisconnect == "function" && this.onDisconnect(this)), this.skipReconnect || (this.reconnectTimer = setTimeout(() => {
|
|
2473
2329
|
this.skipReconnect || this.wsStart(e);
|
|
@@ -2477,213 +2333,213 @@ class _i {
|
|
|
2477
2333
|
};
|
|
2478
2334
|
}
|
|
2479
2335
|
}
|
|
2480
|
-
const
|
|
2481
|
-
class
|
|
2336
|
+
const Qn = Br.fetch, Vn = 4300, Ue = 200, Xn = 404, Bt = 201, Yn = 304, Zn = 50;
|
|
2337
|
+
class tr extends Error {
|
|
2482
2338
|
constructor(e, n) {
|
|
2483
2339
|
super(e), Error.captureStackTrace(this, this.constructor), this.progressTimeout = n;
|
|
2484
2340
|
}
|
|
2485
2341
|
}
|
|
2486
|
-
class
|
|
2342
|
+
class rr extends Error {
|
|
2487
2343
|
constructor(e) {
|
|
2488
2344
|
super(e), this.name = "AlreadyExistsError", Error.captureStackTrace(this, this.constructor);
|
|
2489
2345
|
}
|
|
2490
2346
|
}
|
|
2491
|
-
function
|
|
2492
|
-
if (typeof
|
|
2493
|
-
return
|
|
2494
|
-
if (
|
|
2495
|
-
if (typeof
|
|
2496
|
-
return
|
|
2497
|
-
if (typeof
|
|
2498
|
-
return
|
|
2347
|
+
function ei(o) {
|
|
2348
|
+
if (typeof o == "string")
|
|
2349
|
+
return o;
|
|
2350
|
+
if (o && typeof o == "object") {
|
|
2351
|
+
if (typeof o.message == "string")
|
|
2352
|
+
return o.message;
|
|
2353
|
+
if (typeof o.msg == "string")
|
|
2354
|
+
return o.msg;
|
|
2499
2355
|
try {
|
|
2500
|
-
return JSON.stringify(
|
|
2356
|
+
return JSON.stringify(o);
|
|
2501
2357
|
} catch {
|
|
2502
|
-
return String(
|
|
2358
|
+
return String(o);
|
|
2503
2359
|
}
|
|
2504
2360
|
}
|
|
2505
|
-
return String(
|
|
2361
|
+
return String(o);
|
|
2506
2362
|
}
|
|
2507
|
-
class
|
|
2363
|
+
class nr extends Error {
|
|
2508
2364
|
constructor(e) {
|
|
2509
|
-
super(
|
|
2365
|
+
super(ei(e)), this.name = "ReplyError", this.reply = e, Error.captureStackTrace(this, this.constructor);
|
|
2510
2366
|
}
|
|
2511
2367
|
}
|
|
2512
|
-
function
|
|
2513
|
-
function
|
|
2368
|
+
function ir() {
|
|
2369
|
+
function o() {
|
|
2514
2370
|
return Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
2515
2371
|
}
|
|
2516
|
-
return
|
|
2372
|
+
return o() + o() + "-" + o() + "-" + o() + "-" + o() + "-" + o() + o() + o();
|
|
2517
2373
|
}
|
|
2518
|
-
class
|
|
2374
|
+
class or {
|
|
2519
2375
|
constructor() {
|
|
2520
2376
|
this.bucket = void 0, this.host = void 0, this.port = void 0, this.path = "", this.apiKey = void 0, this.secure = !1, this.enablePing = !1, this.pingInterval = 5e3, this.clientId = void 0, this.wsSubDomain = void 0;
|
|
2521
2377
|
}
|
|
2522
2378
|
}
|
|
2523
|
-
class
|
|
2379
|
+
class Je {
|
|
2524
2380
|
constructor(e) {
|
|
2525
2381
|
this.bucket = void 0, this.data = void 0, this.failIfExists = !1, this.expire = void 0, this.async = !0, this.forceHttp = !1, this.keysOnly = !1, this.filter = void 0, this.removeDataFromReply = !1, e && (this.bucket = e.bucket, this.data = e.data, this.failIfExists = e.failIfExists, this.expire = e.expire, this.async = e.async, this.forceHttp = e.forceHttp, this.keysOnly = e.keysOnly, this.filter = e.filter, this.removeDataFromReply = e.removeDataFromReply);
|
|
2526
2382
|
}
|
|
2527
2383
|
}
|
|
2528
|
-
class
|
|
2384
|
+
class ti extends Je {
|
|
2529
2385
|
constructor() {
|
|
2530
2386
|
super(...arguments), this.url = void 0, this.method = void 0, this.key = void 0, this.forceHttp = !1, this.keysOnly = !1, this.filter = void 0, this.removeDataFromReply = !1, this.isList = !1;
|
|
2531
2387
|
}
|
|
2532
2388
|
}
|
|
2533
|
-
class
|
|
2389
|
+
class ri {
|
|
2534
2390
|
constructor(e) {
|
|
2535
|
-
this.pendingRequests = 0, e == null && (e = new
|
|
2391
|
+
this.pendingRequests = 0, e == null && (e = new or()), e.host = e.host || "127.0.0.1", e.port = e.port || Vn, typeof e.path != "string" && (e.path = ""), e.path !== "" && e.path.charAt(0) !== "/" && (e.path = "/" + e.path), e.path.charAt(e.path.length - 1) !== "/" && (e.path = e.path + "/"), this.settings = e, this.connection = new Kn(e), this.requestQueue = [];
|
|
2536
2392
|
}
|
|
2537
|
-
internalizeRequestOptions(e, n,
|
|
2393
|
+
internalizeRequestOptions(e, n, s = !1) {
|
|
2538
2394
|
var u = n.bucket || this.settings.bucket || "";
|
|
2539
2395
|
n.async == null && (n.async = !0);
|
|
2540
|
-
var c = new
|
|
2541
|
-
return n.keysOnly !== void 0 && (c.keysOnly = n.keysOnly), n.filter !== void 0 && (c.filter = n.filter), c.url = this.getUrl(e, u, c.keysOnly, c.filter,
|
|
2396
|
+
var c = new ti(null);
|
|
2397
|
+
return n.keysOnly !== void 0 && (c.keysOnly = n.keysOnly), n.filter !== void 0 && (c.filter = n.filter), c.url = this.getUrl(e, u, c.keysOnly, c.filter, s), c.bucket = u, c.key = e, c.async = n.async, c.failIfExists = n.failIfExists, c.forceHttp = n.forceHttp, c.expire = n.expire, c.isList = s, c.removeDataFromReply = n.removeDataFromReply, c;
|
|
2542
2398
|
}
|
|
2543
2399
|
checkOptions(e) {
|
|
2544
|
-
return e instanceof
|
|
2400
|
+
return e instanceof Je || (e = new Je(e)), e;
|
|
2545
2401
|
}
|
|
2546
2402
|
async read(e, n) {
|
|
2547
|
-
let
|
|
2548
|
-
return
|
|
2403
|
+
let s = this.internalizeRequestOptions(e, this.checkOptions(n));
|
|
2404
|
+
return s.method = "GET", this.request(s);
|
|
2549
2405
|
}
|
|
2550
2406
|
async list(e) {
|
|
2551
2407
|
let n = { ...e };
|
|
2552
2408
|
n.keysOnly === void 0 && (n.keysOnly = !0);
|
|
2553
|
-
let
|
|
2554
|
-
return
|
|
2409
|
+
let s = this.internalizeRequestOptions("", this.checkOptions(n), !0);
|
|
2410
|
+
return s.method = "GET", await this.request(s);
|
|
2555
2411
|
}
|
|
2556
|
-
async write(e, n,
|
|
2557
|
-
let u = this.internalizeRequestOptions(e, this.checkOptions(
|
|
2412
|
+
async write(e, n, s) {
|
|
2413
|
+
let u = this.internalizeRequestOptions(e, this.checkOptions(s));
|
|
2558
2414
|
return u.method = u.key ? "PUT" : "POST", u.data = n, this.request(u);
|
|
2559
2415
|
}
|
|
2560
|
-
async patch(e, n,
|
|
2561
|
-
let u = this.internalizeRequestOptions(e, this.checkOptions(
|
|
2416
|
+
async patch(e, n, s) {
|
|
2417
|
+
let u = this.internalizeRequestOptions(e, this.checkOptions(s));
|
|
2562
2418
|
return u.method = "PATCH", u.data = n, this.request(u);
|
|
2563
2419
|
}
|
|
2564
2420
|
async remove(e, n) {
|
|
2565
|
-
let
|
|
2566
|
-
return
|
|
2421
|
+
let s = this.internalizeRequestOptions(e, this.checkOptions(n));
|
|
2422
|
+
return s.method = "DELETE", this.request(s);
|
|
2567
2423
|
}
|
|
2568
2424
|
async repair(e) {
|
|
2569
|
-
var n = this.settings.secure ? "https://" : "http://",
|
|
2425
|
+
var n = this.settings.secure ? "https://" : "http://", s = n + this.settings.host + ":" + this.settings.port + this.settings.path + "_repair/" + e;
|
|
2570
2426
|
const u = {
|
|
2571
|
-
url:
|
|
2427
|
+
url: s,
|
|
2572
2428
|
method: "GET"
|
|
2573
2429
|
};
|
|
2574
2430
|
return await this.requestHttp(u);
|
|
2575
2431
|
}
|
|
2576
|
-
getUrl(e, n,
|
|
2432
|
+
getUrl(e, n, s, u, c = !1) {
|
|
2577
2433
|
e || (e = "");
|
|
2578
2434
|
var l = "d=" + (/* @__PURE__ */ new Date()).getTime();
|
|
2579
|
-
l = (e.indexOf("?") > -1 ? "&" : "?") + l,
|
|
2435
|
+
l = (e.indexOf("?") > -1 ? "&" : "?") + l, s && (l = l + "&keysOnly=true"), u != null && u !== "" && (l = l + "&filter=" + u);
|
|
2580
2436
|
var f = this.settings.secure ? "https://" : "http://";
|
|
2581
2437
|
return c ? f + this.settings.host + ":" + this.settings.port + this.settings.path + "_data/" + encodeURIComponent(n) + l : f + this.settings.host + ":" + this.settings.port + this.settings.path + "_data/" + encodeURIComponent(n) + "/" + encodeURIComponent(e) + l;
|
|
2582
2438
|
}
|
|
2583
2439
|
async requestHttp(e) {
|
|
2584
2440
|
const n = e.method || "GET";
|
|
2585
|
-
let
|
|
2441
|
+
let s = {
|
|
2586
2442
|
method: n,
|
|
2587
2443
|
headers: {},
|
|
2588
2444
|
body: void 0
|
|
2589
2445
|
};
|
|
2590
|
-
this.settings.apiKey && (
|
|
2591
|
-
const u = await
|
|
2592
|
-
if ((n === "GET" || n === "PATCH") && [
|
|
2446
|
+
this.settings.apiKey && (s.headers["API-Key"] = this.settings.apiKey, s.headers["x-api-key"] = this.settings.apiKey), (n == "PUT" || n == "POST" || n == "PATCH") && (s.body = JSON.stringify(e.data), s.headers["Content-Type"] = "application/json", e.failIfExists && (s.headers.failIfExists = e.failIfExists), e.removeDataFromReply && (s.headers.RemoveDataFromReply = e.removeDataFromReply), e.expire && (s.headers.expire = e.expire));
|
|
2447
|
+
const u = await Qn(e.url, s);
|
|
2448
|
+
if ((n === "GET" || n === "PATCH") && [Ue, Yn].indexOf(u.status) > -1)
|
|
2593
2449
|
return await u.json();
|
|
2594
|
-
if (["POST", "PUT"].indexOf(n) > -1 && [
|
|
2450
|
+
if (["POST", "PUT"].indexOf(n) > -1 && [Ue, Bt].indexOf(u.status) > -1) {
|
|
2595
2451
|
let c = e.key;
|
|
2596
|
-
return u.status ===
|
|
2452
|
+
return u.status === Bt && (c = u.headers.get("location") ?? c), c;
|
|
2597
2453
|
} else {
|
|
2598
|
-
if (n === "DELETE" && [
|
|
2454
|
+
if (n === "DELETE" && [Ue, Xn].indexOf(u.status) > -1)
|
|
2599
2455
|
return;
|
|
2600
|
-
if (u.status ==
|
|
2456
|
+
if (u.status == Ue)
|
|
2601
2457
|
return;
|
|
2602
2458
|
throw new Error(`${u.status}`);
|
|
2603
2459
|
}
|
|
2604
2460
|
}
|
|
2605
2461
|
async request(e) {
|
|
2606
|
-
var n,
|
|
2607
|
-
n = l,
|
|
2462
|
+
var n, s, u = new Promise(function(l, f) {
|
|
2463
|
+
n = l, s = f;
|
|
2608
2464
|
});
|
|
2609
2465
|
e.async === void 0 && (e.async = !0);
|
|
2610
|
-
var c = { resolve: n, reject:
|
|
2466
|
+
var c = { resolve: n, reject: s, options: e };
|
|
2611
2467
|
return setTimeout(() => {
|
|
2612
2468
|
this.requestQueue.unshift(c), this.processRequestQueue();
|
|
2613
2469
|
}), u;
|
|
2614
2470
|
}
|
|
2615
2471
|
processRequestQueue() {
|
|
2616
|
-
if (this.pendingRequests >=
|
|
2472
|
+
if (this.pendingRequests >= Zn || this.requestQueue.length === 0)
|
|
2617
2473
|
return;
|
|
2618
2474
|
const e = this.requestQueue.pop();
|
|
2619
2475
|
this.pendingRequests++;
|
|
2620
2476
|
var n;
|
|
2621
|
-
this.connection && e.options.async && this.connection.connected && !e.options.forceHttp ? n = this.connection.request(e.options) : n = this.requestHttp(e.options), n.then((
|
|
2622
|
-
this.pendingRequests--, e.resolve(
|
|
2623
|
-
}).catch((
|
|
2624
|
-
this.pendingRequests--, e.reject(
|
|
2477
|
+
this.connection && e.options.async && this.connection.connected && !e.options.forceHttp ? n = this.connection.request(e.options) : n = this.requestHttp(e.options), n.then((s) => {
|
|
2478
|
+
this.pendingRequests--, e.resolve(s), setTimeout(this.processRequestQueue.bind(this));
|
|
2479
|
+
}).catch((s) => {
|
|
2480
|
+
this.pendingRequests--, e.reject(s), setTimeout(this.processRequestQueue.bind(this));
|
|
2625
2481
|
});
|
|
2626
2482
|
}
|
|
2627
2483
|
close() {
|
|
2628
2484
|
this.connection.close();
|
|
2629
2485
|
}
|
|
2630
2486
|
}
|
|
2631
|
-
var
|
|
2632
|
-
return Function.prototype.apply.call(e, n,
|
|
2633
|
-
},
|
|
2634
|
-
|
|
2487
|
+
var At = { exports: {} }, Ie = typeof Reflect == "object" ? Reflect : null, kt = Ie && typeof Ie.apply == "function" ? Ie.apply : function(e, n, s) {
|
|
2488
|
+
return Function.prototype.apply.call(e, n, s);
|
|
2489
|
+
}, Ne;
|
|
2490
|
+
Ie && typeof Ie.ownKeys == "function" ? Ne = Ie.ownKeys : Object.getOwnPropertySymbols ? Ne = function(e) {
|
|
2635
2491
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
2636
|
-
} :
|
|
2492
|
+
} : Ne = function(e) {
|
|
2637
2493
|
return Object.getOwnPropertyNames(e);
|
|
2638
2494
|
};
|
|
2639
|
-
function
|
|
2640
|
-
console && console.warn && console.warn(
|
|
2495
|
+
function ni(o) {
|
|
2496
|
+
console && console.warn && console.warn(o);
|
|
2641
2497
|
}
|
|
2642
|
-
var
|
|
2498
|
+
var sr = Number.isNaN || function(e) {
|
|
2643
2499
|
return e !== e;
|
|
2644
2500
|
};
|
|
2645
|
-
function
|
|
2646
|
-
|
|
2501
|
+
function B() {
|
|
2502
|
+
B.init.call(this);
|
|
2647
2503
|
}
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
var
|
|
2655
|
-
function
|
|
2656
|
-
if (typeof
|
|
2657
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof
|
|
2504
|
+
At.exports = B;
|
|
2505
|
+
At.exports.once = ai;
|
|
2506
|
+
B.EventEmitter = B;
|
|
2507
|
+
B.prototype._events = void 0;
|
|
2508
|
+
B.prototype._eventsCount = 0;
|
|
2509
|
+
B.prototype._maxListeners = void 0;
|
|
2510
|
+
var jt = 10;
|
|
2511
|
+
function Qe(o) {
|
|
2512
|
+
if (typeof o != "function")
|
|
2513
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof o);
|
|
2658
2514
|
}
|
|
2659
|
-
Object.defineProperty(
|
|
2515
|
+
Object.defineProperty(B, "defaultMaxListeners", {
|
|
2660
2516
|
enumerable: !0,
|
|
2661
2517
|
get: function() {
|
|
2662
|
-
return
|
|
2518
|
+
return jt;
|
|
2663
2519
|
},
|
|
2664
|
-
set: function(
|
|
2665
|
-
if (typeof
|
|
2666
|
-
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' +
|
|
2667
|
-
|
|
2520
|
+
set: function(o) {
|
|
2521
|
+
if (typeof o != "number" || o < 0 || sr(o))
|
|
2522
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + o + ".");
|
|
2523
|
+
jt = o;
|
|
2668
2524
|
}
|
|
2669
2525
|
});
|
|
2670
|
-
|
|
2526
|
+
B.init = function() {
|
|
2671
2527
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
2672
2528
|
};
|
|
2673
|
-
|
|
2674
|
-
if (typeof e != "number" || e < 0 ||
|
|
2529
|
+
B.prototype.setMaxListeners = function(e) {
|
|
2530
|
+
if (typeof e != "number" || e < 0 || sr(e))
|
|
2675
2531
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
2676
2532
|
return this._maxListeners = e, this;
|
|
2677
2533
|
};
|
|
2678
|
-
function
|
|
2679
|
-
return
|
|
2534
|
+
function ar(o) {
|
|
2535
|
+
return o._maxListeners === void 0 ? B.defaultMaxListeners : o._maxListeners;
|
|
2680
2536
|
}
|
|
2681
|
-
|
|
2682
|
-
return
|
|
2537
|
+
B.prototype.getMaxListeners = function() {
|
|
2538
|
+
return ar(this);
|
|
2683
2539
|
};
|
|
2684
|
-
|
|
2685
|
-
for (var n = [],
|
|
2686
|
-
n.push(arguments[
|
|
2540
|
+
B.prototype.emit = function(e) {
|
|
2541
|
+
for (var n = [], s = 1; s < arguments.length; s++)
|
|
2542
|
+
n.push(arguments[s]);
|
|
2687
2543
|
var u = e === "error", c = this._events;
|
|
2688
2544
|
if (c !== void 0)
|
|
2689
2545
|
u = u && c.error === void 0;
|
|
@@ -2700,109 +2556,109 @@ P.prototype.emit = function(e) {
|
|
|
2700
2556
|
if (m === void 0)
|
|
2701
2557
|
return !1;
|
|
2702
2558
|
if (typeof m == "function")
|
|
2703
|
-
|
|
2559
|
+
kt(m, this, n);
|
|
2704
2560
|
else
|
|
2705
|
-
for (var b = m.length, w =
|
|
2706
|
-
|
|
2561
|
+
for (var b = m.length, w = pr(m, b), s = 0; s < b; ++s)
|
|
2562
|
+
kt(w[s], this, n);
|
|
2707
2563
|
return !0;
|
|
2708
2564
|
};
|
|
2709
|
-
function
|
|
2565
|
+
function ur(o, e, n, s) {
|
|
2710
2566
|
var u, c, l;
|
|
2711
|
-
if (
|
|
2567
|
+
if (Qe(n), c = o._events, c === void 0 ? (c = o._events = /* @__PURE__ */ Object.create(null), o._eventsCount = 0) : (c.newListener !== void 0 && (o.emit(
|
|
2712
2568
|
"newListener",
|
|
2713
2569
|
e,
|
|
2714
2570
|
n.listener ? n.listener : n
|
|
2715
|
-
), c =
|
|
2716
|
-
l = c[e] = n, ++
|
|
2717
|
-
else if (typeof l == "function" ? l = c[e] =
|
|
2571
|
+
), c = o._events), l = c[e]), l === void 0)
|
|
2572
|
+
l = c[e] = n, ++o._eventsCount;
|
|
2573
|
+
else if (typeof l == "function" ? l = c[e] = s ? [n, l] : [l, n] : s ? l.unshift(n) : l.push(n), u = ar(o), u > 0 && l.length > u && !l.warned) {
|
|
2718
2574
|
l.warned = !0;
|
|
2719
2575
|
var f = new Error("Possible EventEmitter memory leak detected. " + l.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2720
|
-
f.name = "MaxListenersExceededWarning", f.emitter =
|
|
2576
|
+
f.name = "MaxListenersExceededWarning", f.emitter = o, f.type = e, f.count = l.length, ni(f);
|
|
2721
2577
|
}
|
|
2722
|
-
return
|
|
2578
|
+
return o;
|
|
2723
2579
|
}
|
|
2724
|
-
|
|
2725
|
-
return
|
|
2580
|
+
B.prototype.addListener = function(e, n) {
|
|
2581
|
+
return ur(this, e, n, !1);
|
|
2726
2582
|
};
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
return
|
|
2583
|
+
B.prototype.on = B.prototype.addListener;
|
|
2584
|
+
B.prototype.prependListener = function(e, n) {
|
|
2585
|
+
return ur(this, e, n, !0);
|
|
2730
2586
|
};
|
|
2731
|
-
function
|
|
2587
|
+
function ii() {
|
|
2732
2588
|
if (!this.fired)
|
|
2733
2589
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
2734
2590
|
}
|
|
2735
|
-
function
|
|
2736
|
-
var
|
|
2737
|
-
return u.listener = n,
|
|
2591
|
+
function fr(o, e, n) {
|
|
2592
|
+
var s = { fired: !1, wrapFn: void 0, target: o, type: e, listener: n }, u = ii.bind(s);
|
|
2593
|
+
return u.listener = n, s.wrapFn = u, u;
|
|
2738
2594
|
}
|
|
2739
|
-
|
|
2740
|
-
return
|
|
2595
|
+
B.prototype.once = function(e, n) {
|
|
2596
|
+
return Qe(n), this.on(e, fr(this, e, n)), this;
|
|
2741
2597
|
};
|
|
2742
|
-
|
|
2743
|
-
return
|
|
2598
|
+
B.prototype.prependOnceListener = function(e, n) {
|
|
2599
|
+
return Qe(n), this.prependListener(e, fr(this, e, n)), this;
|
|
2744
2600
|
};
|
|
2745
|
-
|
|
2746
|
-
var
|
|
2747
|
-
if (
|
|
2601
|
+
B.prototype.removeListener = function(e, n) {
|
|
2602
|
+
var s, u, c, l, f;
|
|
2603
|
+
if (Qe(n), u = this._events, u === void 0)
|
|
2748
2604
|
return this;
|
|
2749
|
-
if (
|
|
2605
|
+
if (s = u[e], s === void 0)
|
|
2750
2606
|
return this;
|
|
2751
|
-
if (
|
|
2752
|
-
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete u[e], u.removeListener && this.emit("removeListener", e,
|
|
2753
|
-
else if (typeof
|
|
2754
|
-
for (c = -1, l =
|
|
2755
|
-
if (
|
|
2756
|
-
f =
|
|
2607
|
+
if (s === n || s.listener === n)
|
|
2608
|
+
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete u[e], u.removeListener && this.emit("removeListener", e, s.listener || n));
|
|
2609
|
+
else if (typeof s != "function") {
|
|
2610
|
+
for (c = -1, l = s.length - 1; l >= 0; l--)
|
|
2611
|
+
if (s[l] === n || s[l].listener === n) {
|
|
2612
|
+
f = s[l].listener, c = l;
|
|
2757
2613
|
break;
|
|
2758
2614
|
}
|
|
2759
2615
|
if (c < 0)
|
|
2760
2616
|
return this;
|
|
2761
|
-
c === 0 ?
|
|
2617
|
+
c === 0 ? s.shift() : oi(s, c), s.length === 1 && (u[e] = s[0]), u.removeListener !== void 0 && this.emit("removeListener", e, f || n);
|
|
2762
2618
|
}
|
|
2763
2619
|
return this;
|
|
2764
2620
|
};
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
var n,
|
|
2768
|
-
if (
|
|
2621
|
+
B.prototype.off = B.prototype.removeListener;
|
|
2622
|
+
B.prototype.removeAllListeners = function(e) {
|
|
2623
|
+
var n, s, u;
|
|
2624
|
+
if (s = this._events, s === void 0)
|
|
2769
2625
|
return this;
|
|
2770
|
-
if (
|
|
2771
|
-
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) :
|
|
2626
|
+
if (s.removeListener === void 0)
|
|
2627
|
+
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : s[e] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete s[e]), this;
|
|
2772
2628
|
if (arguments.length === 0) {
|
|
2773
|
-
var c = Object.keys(
|
|
2629
|
+
var c = Object.keys(s), l;
|
|
2774
2630
|
for (u = 0; u < c.length; ++u)
|
|
2775
2631
|
l = c[u], l !== "removeListener" && this.removeAllListeners(l);
|
|
2776
2632
|
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
2777
2633
|
}
|
|
2778
|
-
if (n =
|
|
2634
|
+
if (n = s[e], typeof n == "function")
|
|
2779
2635
|
this.removeListener(e, n);
|
|
2780
2636
|
else if (n !== void 0)
|
|
2781
2637
|
for (u = n.length - 1; u >= 0; u--)
|
|
2782
2638
|
this.removeListener(e, n[u]);
|
|
2783
2639
|
return this;
|
|
2784
2640
|
};
|
|
2785
|
-
function
|
|
2786
|
-
var
|
|
2787
|
-
if (
|
|
2641
|
+
function cr(o, e, n) {
|
|
2642
|
+
var s = o._events;
|
|
2643
|
+
if (s === void 0)
|
|
2788
2644
|
return [];
|
|
2789
|
-
var u =
|
|
2790
|
-
return u === void 0 ? [] : typeof u == "function" ? n ? [u.listener || u] : [u] : n ?
|
|
2645
|
+
var u = s[e];
|
|
2646
|
+
return u === void 0 ? [] : typeof u == "function" ? n ? [u.listener || u] : [u] : n ? si(u) : pr(u, u.length);
|
|
2791
2647
|
}
|
|
2792
|
-
|
|
2793
|
-
return
|
|
2648
|
+
B.prototype.listeners = function(e) {
|
|
2649
|
+
return cr(this, e, !0);
|
|
2794
2650
|
};
|
|
2795
|
-
|
|
2796
|
-
return
|
|
2651
|
+
B.prototype.rawListeners = function(e) {
|
|
2652
|
+
return cr(this, e, !1);
|
|
2797
2653
|
};
|
|
2798
|
-
|
|
2799
|
-
return typeof
|
|
2654
|
+
B.listenerCount = function(o, e) {
|
|
2655
|
+
return typeof o.listenerCount == "function" ? o.listenerCount(e) : lr.call(o, e);
|
|
2800
2656
|
};
|
|
2801
|
-
|
|
2802
|
-
function
|
|
2657
|
+
B.prototype.listenerCount = lr;
|
|
2658
|
+
function lr(o) {
|
|
2803
2659
|
var e = this._events;
|
|
2804
2660
|
if (e !== void 0) {
|
|
2805
|
-
var n = e[
|
|
2661
|
+
var n = e[o];
|
|
2806
2662
|
if (typeof n == "function")
|
|
2807
2663
|
return 1;
|
|
2808
2664
|
if (n !== void 0)
|
|
@@ -2810,64 +2666,64 @@ function dr(i) {
|
|
|
2810
2666
|
}
|
|
2811
2667
|
return 0;
|
|
2812
2668
|
}
|
|
2813
|
-
|
|
2814
|
-
return this._eventsCount > 0 ?
|
|
2669
|
+
B.prototype.eventNames = function() {
|
|
2670
|
+
return this._eventsCount > 0 ? Ne(this._events) : [];
|
|
2815
2671
|
};
|
|
2816
|
-
function
|
|
2817
|
-
for (var n = new Array(e),
|
|
2818
|
-
n[
|
|
2672
|
+
function pr(o, e) {
|
|
2673
|
+
for (var n = new Array(e), s = 0; s < e; ++s)
|
|
2674
|
+
n[s] = o[s];
|
|
2819
2675
|
return n;
|
|
2820
2676
|
}
|
|
2821
|
-
function
|
|
2822
|
-
for (; e + 1 <
|
|
2823
|
-
|
|
2824
|
-
|
|
2677
|
+
function oi(o, e) {
|
|
2678
|
+
for (; e + 1 < o.length; e++)
|
|
2679
|
+
o[e] = o[e + 1];
|
|
2680
|
+
o.pop();
|
|
2825
2681
|
}
|
|
2826
|
-
function
|
|
2827
|
-
for (var e = new Array(
|
|
2828
|
-
e[n] =
|
|
2682
|
+
function si(o) {
|
|
2683
|
+
for (var e = new Array(o.length), n = 0; n < e.length; ++n)
|
|
2684
|
+
e[n] = o[n].listener || o[n];
|
|
2829
2685
|
return e;
|
|
2830
2686
|
}
|
|
2831
|
-
function
|
|
2832
|
-
return new Promise(function(n,
|
|
2687
|
+
function ai(o, e) {
|
|
2688
|
+
return new Promise(function(n, s) {
|
|
2833
2689
|
function u(l) {
|
|
2834
|
-
|
|
2690
|
+
o.removeListener(e, c), s(l);
|
|
2835
2691
|
}
|
|
2836
2692
|
function c() {
|
|
2837
|
-
typeof
|
|
2693
|
+
typeof o.removeListener == "function" && o.removeListener("error", u), n([].slice.call(arguments));
|
|
2838
2694
|
}
|
|
2839
|
-
|
|
2695
|
+
hr(o, e, c, { once: !0 }), e !== "error" && ui(o, u, { once: !0 });
|
|
2840
2696
|
});
|
|
2841
2697
|
}
|
|
2842
|
-
function
|
|
2843
|
-
typeof
|
|
2698
|
+
function ui(o, e, n) {
|
|
2699
|
+
typeof o.on == "function" && hr(o, "error", e, n);
|
|
2844
2700
|
}
|
|
2845
|
-
function
|
|
2846
|
-
if (typeof
|
|
2847
|
-
|
|
2848
|
-
else if (typeof
|
|
2849
|
-
|
|
2850
|
-
|
|
2701
|
+
function hr(o, e, n, s) {
|
|
2702
|
+
if (typeof o.on == "function")
|
|
2703
|
+
s.once ? o.once(e, n) : o.on(e, n);
|
|
2704
|
+
else if (typeof o.addEventListener == "function")
|
|
2705
|
+
o.addEventListener(e, function u(c) {
|
|
2706
|
+
s.once && o.removeEventListener(e, u), n(c);
|
|
2851
2707
|
});
|
|
2852
2708
|
else
|
|
2853
|
-
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof
|
|
2709
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof o);
|
|
2854
2710
|
}
|
|
2855
|
-
var
|
|
2856
|
-
const
|
|
2857
|
-
class
|
|
2711
|
+
var fi = At.exports;
|
|
2712
|
+
const He = "messaging.compcon", ci = 1e4, li = 1e4, pi = 20, yr = 100, dr = 200;
|
|
2713
|
+
class hi {
|
|
2858
2714
|
constructor(e) {
|
|
2859
2715
|
const n = (/* @__PURE__ */ new Date()).valueOf();
|
|
2860
2716
|
this.lastProgress = void 0, this.publishTime = n, this.callback = e;
|
|
2861
2717
|
}
|
|
2862
2718
|
}
|
|
2863
|
-
async function
|
|
2864
|
-
|
|
2865
|
-
setTimeout(() => e(null),
|
|
2719
|
+
async function yi(o) {
|
|
2720
|
+
o !== 0 && await new Promise((e) => {
|
|
2721
|
+
setTimeout(() => e(null), o);
|
|
2866
2722
|
});
|
|
2867
2723
|
}
|
|
2868
|
-
class
|
|
2869
|
-
constructor(e, n,
|
|
2870
|
-
this.pendingJobs = /* @__PURE__ */ new Map(), this.jobQueue =
|
|
2724
|
+
class di {
|
|
2725
|
+
constructor(e, n, s, u) {
|
|
2726
|
+
this.pendingJobs = /* @__PURE__ */ new Map(), this.jobQueue = He + "." + n + ".jobs", this.statusQueue = He + "." + n + ".status", this.timeout = s || ci, this.progressTimeout = u || li, this.de = e, this.jobStatusQueueListener = (c) => {
|
|
2871
2727
|
if (this.pendingJobs.has(c.key)) {
|
|
2872
2728
|
const l = this.pendingJobs.get(c.key);
|
|
2873
2729
|
l.lastProgress = (/* @__PURE__ */ new Date()).valueOf(), l.callback(c.value.err, c), c.value.done && this.pendingJobs.delete(c.key);
|
|
@@ -2877,26 +2733,26 @@ class to {
|
|
|
2877
2733
|
destroy() {
|
|
2878
2734
|
this.de.connection && this.de.connection.removeListener(this.jobStatusQueueListener);
|
|
2879
2735
|
}
|
|
2880
|
-
async addJob(e, n,
|
|
2881
|
-
|
|
2882
|
-
const c =
|
|
2736
|
+
async addJob(e, n, s, u) {
|
|
2737
|
+
s = s || this.timeout, u = u || this.progressTimeout;
|
|
2738
|
+
const c = ir();
|
|
2883
2739
|
return await this.de.connection.write(this.jobQueue, c, e), new Promise((l, f) => {
|
|
2884
2740
|
const m = setInterval(() => {
|
|
2885
2741
|
const b = (/* @__PURE__ */ new Date()).valueOf();
|
|
2886
2742
|
let w = !1;
|
|
2887
2743
|
this.pendingJobs[c].lastProgress != null && (w = b > this.pendingJobs[c].lastProgress + u);
|
|
2888
|
-
const O = b > this.pendingJobs[c].publishTime +
|
|
2889
|
-
(w || O) && (this.pendingJobs[c] = null, clearInterval(m), f(new
|
|
2744
|
+
const O = b > this.pendingJobs[c].publishTime + s;
|
|
2745
|
+
(w || O) && (this.pendingJobs[c] = null, clearInterval(m), f(new tr(`Timeout for job id ${c}`, w)));
|
|
2890
2746
|
}, 500);
|
|
2891
|
-
this.pendingJobs[c] = new
|
|
2892
|
-
b ? (clearInterval(m), f(new
|
|
2747
|
+
this.pendingJobs[c] = new hi((b, w) => {
|
|
2748
|
+
b ? (clearInterval(m), f(new nr(b))) : w.value.done ? (clearInterval(m), l(w.value), this.de.connection.delete(this.statusQueue, w.key)) : typeof n == "function" && n(w.value);
|
|
2893
2749
|
});
|
|
2894
2750
|
});
|
|
2895
2751
|
}
|
|
2896
2752
|
}
|
|
2897
|
-
class
|
|
2898
|
-
constructor(e, n,
|
|
2899
|
-
super(), this.jobCount = 0, this.statusQueue =
|
|
2753
|
+
class gi extends fi.EventEmitter {
|
|
2754
|
+
constructor(e, n, s) {
|
|
2755
|
+
super(), this.jobCount = 0, this.statusQueue = He + "." + n + ".status", this.jobQueue = He + "." + n + ".jobs", this.de = e, this.clientId = s, this.jobQueueListener = (u) => {
|
|
2900
2756
|
u.isDeleted || u.value == null || this.jobHandler(u.key, u.value).catch(() => this.emit("job", { id: u.value.id, status: "No worker" }));
|
|
2901
2757
|
}, e.connection.addListener(this.jobQueue, "*", !0, this.jobQueueListener);
|
|
2902
2758
|
}
|
|
@@ -2904,8 +2760,8 @@ class ro extends Qi.EventEmitter {
|
|
|
2904
2760
|
this.de.connection.removeListener(this.jobQueueListener), this.removeAllListeners();
|
|
2905
2761
|
}
|
|
2906
2762
|
async jobHandler(e, n) {
|
|
2907
|
-
this.emit("job", { id: n.id, status: "Job received" }), await
|
|
2908
|
-
const
|
|
2763
|
+
this.emit("job", { id: n.id, status: "Job received" }), await yi(Math.floor(Math.random() * pi));
|
|
2764
|
+
const s = await this.waitForWorker(n);
|
|
2909
2765
|
try {
|
|
2910
2766
|
const u = {
|
|
2911
2767
|
claim: { id: this.clientId },
|
|
@@ -2914,40 +2770,40 @@ class ro extends Qi.EventEmitter {
|
|
|
2914
2770
|
data: null,
|
|
2915
2771
|
progress: null
|
|
2916
2772
|
};
|
|
2917
|
-
await this.de.connection.write(this.statusQueue, e, u, !0), await this.de.connection.delete(this.jobQueue, e), this.jobCount += 1,
|
|
2773
|
+
await this.de.connection.write(this.statusQueue, e, u, !0), await this.de.connection.delete(this.jobQueue, e), this.jobCount += 1, s.work && await s.work(n, async (c, l) => {
|
|
2918
2774
|
this.jobCount -= 1, c instanceof Error && (c = c.message), this.emit("job", { id: n.id, done: !0, data: l }), await this.de.connection.write(this.statusQueue, e, { ...u, err: c, data: l, done: !0 });
|
|
2919
2775
|
}, (c) => {
|
|
2920
2776
|
this.emit("job", { id: n.id, done: !1, progress: c }), this.de.connection.write(this.statusQueue, e, { ...u, progress: c });
|
|
2921
2777
|
});
|
|
2922
2778
|
} catch (u) {
|
|
2923
|
-
if (
|
|
2779
|
+
if (s.release(), !(u instanceof rr))
|
|
2924
2780
|
throw u;
|
|
2925
2781
|
}
|
|
2926
2782
|
}
|
|
2927
2783
|
async waitForWorker(e) {
|
|
2928
|
-
return new Promise((n,
|
|
2784
|
+
return new Promise((n, s) => {
|
|
2929
2785
|
var u = setInterval(() => {
|
|
2930
2786
|
this.onJobQuery != null && this.onJobQuery(e, (c, l) => {
|
|
2931
2787
|
if (c == null) {
|
|
2932
2788
|
clearInterval(u), this.emit("job", { id: e.id, status: "Worker assigned" }), n(l);
|
|
2933
2789
|
return;
|
|
2934
2790
|
} else
|
|
2935
|
-
c ==
|
|
2791
|
+
c == yr ? (clearInterval(u), this.emit("job", { id: e.id, error: "Not supported" }), s(new Error("Job not supported"))) : c == dr || (clearInterval(u), this.emit("job", { id: e.id, errno: c }), s(new Error(`Error no : ${c}`)));
|
|
2936
2792
|
});
|
|
2937
2793
|
}, 100);
|
|
2938
2794
|
});
|
|
2939
2795
|
}
|
|
2940
2796
|
}
|
|
2941
|
-
const
|
|
2942
|
-
class
|
|
2797
|
+
const gr = "#reqrep/", vr = "#reqrep-progress/";
|
|
2798
|
+
class vi {
|
|
2943
2799
|
constructor(e, n) {
|
|
2944
|
-
const
|
|
2945
|
-
this.lastProgress =
|
|
2800
|
+
const s = (/* @__PURE__ */ new Date()).valueOf();
|
|
2801
|
+
this.lastProgress = s, this.requestTime = s, this.reply = e, this.progress = n;
|
|
2946
2802
|
}
|
|
2947
2803
|
}
|
|
2948
|
-
class
|
|
2949
|
-
constructor(e, n,
|
|
2950
|
-
this.pendingRequests = /* @__PURE__ */ new Map(), this.timeout =
|
|
2804
|
+
class mi {
|
|
2805
|
+
constructor(e, n, s, u) {
|
|
2806
|
+
this.pendingRequests = /* @__PURE__ */ new Map(), this.timeout = s || 5e3, this.progressTimeout = u || 5e3, this.channel = gr + n, this.progressChannel = vr + n, this.de = e, this.progressListener = (c) => {
|
|
2951
2807
|
const l = this.pendingRequests[c.key];
|
|
2952
2808
|
l && (l.lastProgress = (/* @__PURE__ */ new Date()).valueOf(), typeof l.progress == "function" && l.progress(c.value.data));
|
|
2953
2809
|
}, this.replyListener = (c) => {
|
|
@@ -2957,33 +2813,33 @@ class io {
|
|
|
2957
2813
|
destroy() {
|
|
2958
2814
|
this.de.connection.removeListener(this.progressListener), this.de.connection.removeListener(this.replyListener);
|
|
2959
2815
|
}
|
|
2960
|
-
async request(e, n,
|
|
2961
|
-
return
|
|
2962
|
-
var f =
|
|
2816
|
+
async request(e, n, s, u) {
|
|
2817
|
+
return s = s || this.timeout, u = u || this.progressTimeout, new Promise((c, l) => {
|
|
2818
|
+
var f = ir();
|
|
2963
2819
|
this.de.connection.signalEvent(this.channel, f, e).catch((b) => {
|
|
2964
2820
|
this.pendingRequests[f] = null, clearInterval(m), l(b);
|
|
2965
2821
|
});
|
|
2966
2822
|
const m = setInterval(() => {
|
|
2967
|
-
const b = (/* @__PURE__ */ new Date()).valueOf(), w = b > this.pendingRequests[f].lastProgress + u, O = b > this.pendingRequests[f].requestTime +
|
|
2968
|
-
(w || O) && (this.pendingRequests[f] = null, clearInterval(m), l(new
|
|
2823
|
+
const b = (/* @__PURE__ */ new Date()).valueOf(), w = b > this.pendingRequests[f].lastProgress + u, O = b > this.pendingRequests[f].requestTime + s;
|
|
2824
|
+
(w || O) && (this.pendingRequests[f] = null, clearInterval(m), l(new tr(`Timeout in request id ${f}`, w)));
|
|
2969
2825
|
}, 500);
|
|
2970
|
-
this.pendingRequests[f] = new
|
|
2971
|
-
clearInterval(m), b ? l(new
|
|
2826
|
+
this.pendingRequests[f] = new vi((b, w) => {
|
|
2827
|
+
clearInterval(m), b ? l(new nr(b)) : c(w);
|
|
2972
2828
|
}, n);
|
|
2973
2829
|
});
|
|
2974
2830
|
}
|
|
2975
2831
|
}
|
|
2976
|
-
class
|
|
2832
|
+
class wi {
|
|
2977
2833
|
constructor(e, n) {
|
|
2978
|
-
this.channel =
|
|
2979
|
-
this.onMessage !== void 0 && this.onMessage(
|
|
2834
|
+
this.channel = gr + n, this.progressChannel = vr + n, this.de = e, this.requestListener = (s) => {
|
|
2835
|
+
this.onMessage !== void 0 && this.onMessage(s.value, (u, c) => {
|
|
2980
2836
|
if (this.de.connection.connected) {
|
|
2981
2837
|
const l = u instanceof Error ? u.message : u;
|
|
2982
|
-
this.de.connection.signalEvent(this.channel,
|
|
2838
|
+
this.de.connection.signalEvent(this.channel, s.key, { err: l, data: c }).catch(() => {
|
|
2983
2839
|
});
|
|
2984
2840
|
}
|
|
2985
2841
|
}, (u) => {
|
|
2986
|
-
this.de.connection.connected && this.de.connection.signalEvent(this.progressChannel,
|
|
2842
|
+
this.de.connection.connected && this.de.connection.signalEvent(this.progressChannel, s.key, { data: u }).catch(() => {
|
|
2987
2843
|
});
|
|
2988
2844
|
});
|
|
2989
2845
|
}, e.connection.addListener(this.channel, "*", !0, this.requestListener);
|
|
@@ -2992,33 +2848,33 @@ class oo {
|
|
|
2992
2848
|
this.de.connection.removeListener(this.requestListener);
|
|
2993
2849
|
}
|
|
2994
2850
|
}
|
|
2995
|
-
var
|
|
2996
|
-
((
|
|
2997
|
-
|
|
2998
|
-
Requestor:
|
|
2999
|
-
Replier:
|
|
3000
|
-
},
|
|
3001
|
-
CompetingConsumer:
|
|
3002
|
-
Producer:
|
|
3003
|
-
},
|
|
3004
|
-
JOB_NOT_SUPPORTED:
|
|
3005
|
-
NO_WORKER_AVAILABLE:
|
|
2851
|
+
var yt;
|
|
2852
|
+
((o) => {
|
|
2853
|
+
o.RequestReply = {
|
|
2854
|
+
Requestor: mi,
|
|
2855
|
+
Replier: wi
|
|
2856
|
+
}, o.CompetingConsumers = {
|
|
2857
|
+
CompetingConsumer: gi,
|
|
2858
|
+
Producer: di
|
|
2859
|
+
}, o.Errors = {
|
|
2860
|
+
JOB_NOT_SUPPORTED: yr,
|
|
2861
|
+
NO_WORKER_AVAILABLE: dr
|
|
3006
2862
|
};
|
|
3007
|
-
})(
|
|
2863
|
+
})(yt || (yt = {}));
|
|
3008
2864
|
typeof window < "u" && window && (window.Cachearoo = {
|
|
3009
|
-
Cachearoo:
|
|
3010
|
-
CachearooSettings:
|
|
3011
|
-
RequestOptions:
|
|
3012
|
-
Messaging:
|
|
2865
|
+
Cachearoo: ri,
|
|
2866
|
+
CachearooSettings: or,
|
|
2867
|
+
RequestOptions: Je,
|
|
2868
|
+
Messaging: yt
|
|
3013
2869
|
});
|
|
3014
2870
|
export {
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
2871
|
+
rr as AlreadyExistsError,
|
|
2872
|
+
ri as Cachearoo,
|
|
2873
|
+
or as CachearooSettings,
|
|
2874
|
+
yt as Messaging,
|
|
2875
|
+
wi as Replier,
|
|
2876
|
+
nr as ReplyError,
|
|
2877
|
+
Je as RequestOptions,
|
|
2878
|
+
mi as Requestor,
|
|
2879
|
+
tr as TimeoutError
|
|
3024
2880
|
};
|