@datapos/datapos-tool-csv-parse 0.0.132 → 0.0.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/datapos-tool-csv-parse.es.js +423 -424
- package/package.json +12 -12
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var ie = typeof global < "u" ? global : typeof self < "u" ? self : typeof window < "u" ? window : {}, P = [], M = [], Zt = typeof Uint8Array < "u" ? Uint8Array : Array,
|
|
2
|
-
function
|
|
3
|
-
|
|
1
|
+
var ie = typeof global < "u" ? global : typeof self < "u" ? self : typeof window < "u" ? window : {}, P = [], M = [], Zt = typeof Uint8Array < "u" ? Uint8Array : Array, je = !1;
|
|
2
|
+
function ut() {
|
|
3
|
+
je = !0;
|
|
4
4
|
for (var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", e = 0, r = t.length; e < r; ++e)
|
|
5
5
|
P[e] = t[e], M[t.charCodeAt(e)] = e;
|
|
6
6
|
M[45] = 62, M[95] = 63;
|
|
7
7
|
}
|
|
8
8
|
function Xt(t) {
|
|
9
|
-
|
|
9
|
+
je || ut();
|
|
10
10
|
var e, r, n, i, o, s, f = t.length;
|
|
11
11
|
if (f % 4 > 0)
|
|
12
12
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -24,13 +24,13 @@ function er(t, e, r) {
|
|
|
24
24
|
n = (t[o] << 16) + (t[o + 1] << 8) + t[o + 2], i.push(Kt(n));
|
|
25
25
|
return i.join("");
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
27
|
+
function Ge(t) {
|
|
28
|
+
je || ut();
|
|
29
29
|
for (var e, r = t.length, n = r % 3, i = "", o = [], s = 16383, f = 0, a = r - n; f < a; f += s)
|
|
30
30
|
o.push(er(t, f, f + s > a ? a : f + s));
|
|
31
31
|
return n === 1 ? (e = t[r - 1], i += P[e >> 2], i += P[e << 4 & 63], i += "==") : n === 2 && (e = (t[r - 2] << 8) + t[r - 1], i += P[e >> 10], i += P[e >> 4 & 63], i += P[e << 2 & 63], i += "="), o.push(i), o.join("");
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function ve(t, e, r, n, i) {
|
|
34
34
|
var o, s, f = i * 8 - n - 1, a = (1 << f) - 1, u = a >> 1, h = -7, c = r ? i - 1 : 0, p = r ? -1 : 1, m = t[e + c];
|
|
35
35
|
for (c += p, o = m & (1 << -h) - 1, m >>= -h, h += f; h > 0; o = o * 256 + t[e + c], c += p, h -= 8)
|
|
36
36
|
;
|
|
@@ -45,24 +45,24 @@ function be(t, e, r, n, i) {
|
|
|
45
45
|
}
|
|
46
46
|
return (m ? -1 : 1) * s * Math.pow(2, o - n);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
var s, f, a, u = o * 8 - i - 1, h = (1 << u) - 1, c = h >> 1, p = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, m = n ? 0 : o - 1,
|
|
50
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, s = h) : (s = Math.floor(Math.log(e) / Math.LN2), e * (a = Math.pow(2, -s)) < 1 && (s--, a *= 2), s + c >= 1 ? e += p / a : e += p * Math.pow(2, 1 - c), e * a >= 2 && (s++, a /= 2), s + c >= h ? (f = 0, s = h) : s + c >= 1 ? (f = (e * a - 1) * Math.pow(2, i), s = s + c) : (f = e * Math.pow(2, c - 1) * Math.pow(2, i), s = 0)); i >= 8; t[r + m] = f & 255, m +=
|
|
48
|
+
function ct(t, e, r, n, i, o) {
|
|
49
|
+
var s, f, a, u = o * 8 - i - 1, h = (1 << u) - 1, c = h >> 1, p = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, m = n ? 0 : o - 1, x = n ? 1 : -1, y = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
50
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, s = h) : (s = Math.floor(Math.log(e) / Math.LN2), e * (a = Math.pow(2, -s)) < 1 && (s--, a *= 2), s + c >= 1 ? e += p / a : e += p * Math.pow(2, 1 - c), e * a >= 2 && (s++, a /= 2), s + c >= h ? (f = 0, s = h) : s + c >= 1 ? (f = (e * a - 1) * Math.pow(2, i), s = s + c) : (f = e * Math.pow(2, c - 1) * Math.pow(2, i), s = 0)); i >= 8; t[r + m] = f & 255, m += x, f /= 256, i -= 8)
|
|
51
51
|
;
|
|
52
|
-
for (s = s << i | f, u += i; u > 0; t[r + m] = s & 255, m +=
|
|
52
|
+
for (s = s << i | f, u += i; u > 0; t[r + m] = s & 255, m += x, s /= 256, u -= 8)
|
|
53
53
|
;
|
|
54
|
-
t[r + m -
|
|
54
|
+
t[r + m - x] |= y * 128;
|
|
55
55
|
}
|
|
56
|
-
var tr = {}.toString,
|
|
56
|
+
var tr = {}.toString, ht = Array.isArray || function(t) {
|
|
57
57
|
return tr.call(t) == "[object Array]";
|
|
58
58
|
}, rr = 50;
|
|
59
59
|
l.TYPED_ARRAY_SUPPORT = ie.TYPED_ARRAY_SUPPORT !== void 0 ? ie.TYPED_ARRAY_SUPPORT : !0;
|
|
60
|
-
|
|
61
|
-
function
|
|
60
|
+
_e();
|
|
61
|
+
function _e() {
|
|
62
62
|
return l.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;
|
|
63
63
|
}
|
|
64
64
|
function q(t, e) {
|
|
65
|
-
if (
|
|
65
|
+
if (_e() < e)
|
|
66
66
|
throw new RangeError("Invalid typed array length");
|
|
67
67
|
return l.TYPED_ARRAY_SUPPORT ? (t = new Uint8Array(e), t.__proto__ = l.prototype) : (t === null && (t = new l(e)), t.length = e), t;
|
|
68
68
|
}
|
|
@@ -74,57 +74,57 @@ function l(t, e, r) {
|
|
|
74
74
|
throw new Error(
|
|
75
75
|
"If encoding is specified then the first argument must be a string"
|
|
76
76
|
);
|
|
77
|
-
return
|
|
77
|
+
return qe(this, t);
|
|
78
78
|
}
|
|
79
|
-
return
|
|
79
|
+
return dt(this, t, e, r);
|
|
80
80
|
}
|
|
81
81
|
l.poolSize = 8192;
|
|
82
82
|
l._augment = function(t) {
|
|
83
83
|
return t.__proto__ = l.prototype, t;
|
|
84
84
|
};
|
|
85
|
-
function
|
|
85
|
+
function dt(t, e, r, n) {
|
|
86
86
|
if (typeof e == "number")
|
|
87
87
|
throw new TypeError('"value" argument must not be a number');
|
|
88
88
|
return typeof ArrayBuffer < "u" && e instanceof ArrayBuffer ? or(t, e, r, n) : typeof e == "string" ? ir(t, e, r) : sr(t, e);
|
|
89
89
|
}
|
|
90
90
|
l.from = function(t, e, r) {
|
|
91
|
-
return
|
|
91
|
+
return dt(null, t, e, r);
|
|
92
92
|
};
|
|
93
93
|
l.TYPED_ARRAY_SUPPORT && (l.prototype.__proto__ = Uint8Array.prototype, l.__proto__ = Uint8Array, typeof Symbol < "u" && Symbol.species && l[Symbol.species]);
|
|
94
|
-
function
|
|
94
|
+
function pt(t) {
|
|
95
95
|
if (typeof t != "number")
|
|
96
96
|
throw new TypeError('"size" argument must be a number');
|
|
97
97
|
if (t < 0)
|
|
98
98
|
throw new RangeError('"size" argument must not be negative');
|
|
99
99
|
}
|
|
100
100
|
function nr(t, e, r, n) {
|
|
101
|
-
return
|
|
101
|
+
return pt(e), e <= 0 ? q(t, e) : r !== void 0 ? typeof n == "string" ? q(t, e).fill(r, n) : q(t, e).fill(r) : q(t, e);
|
|
102
102
|
}
|
|
103
103
|
l.alloc = function(t, e, r) {
|
|
104
104
|
return nr(null, t, e, r);
|
|
105
105
|
};
|
|
106
|
-
function
|
|
107
|
-
if (
|
|
106
|
+
function qe(t, e) {
|
|
107
|
+
if (pt(e), t = q(t, e < 0 ? 0 : ze(e) | 0), !l.TYPED_ARRAY_SUPPORT)
|
|
108
108
|
for (var r = 0; r < e; ++r)
|
|
109
109
|
t[r] = 0;
|
|
110
110
|
return t;
|
|
111
111
|
}
|
|
112
112
|
l.allocUnsafe = function(t) {
|
|
113
|
-
return
|
|
113
|
+
return qe(null, t);
|
|
114
114
|
};
|
|
115
115
|
l.allocUnsafeSlow = function(t) {
|
|
116
|
-
return
|
|
116
|
+
return qe(null, t);
|
|
117
117
|
};
|
|
118
118
|
function ir(t, e, r) {
|
|
119
119
|
if ((typeof r != "string" || r === "") && (r = "utf8"), !l.isEncoding(r))
|
|
120
120
|
throw new TypeError('"encoding" must be a valid string encoding');
|
|
121
|
-
var n =
|
|
121
|
+
var n = mt(e, r) | 0;
|
|
122
122
|
t = q(t, n);
|
|
123
123
|
var i = t.write(e, r);
|
|
124
124
|
return i !== n && (t = t.slice(0, i)), t;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
var r = e.length < 0 ? 0 :
|
|
126
|
+
function ke(t, e) {
|
|
127
|
+
var r = e.length < 0 ? 0 : ze(e.length) | 0;
|
|
128
128
|
t = q(t, r);
|
|
129
129
|
for (var n = 0; n < r; n += 1)
|
|
130
130
|
t[n] = e[n] & 255;
|
|
@@ -135,27 +135,27 @@ function or(t, e, r, n) {
|
|
|
135
135
|
throw new RangeError("'offset' is out of bounds");
|
|
136
136
|
if (e.byteLength < r + (n || 0))
|
|
137
137
|
throw new RangeError("'length' is out of bounds");
|
|
138
|
-
return r === void 0 && n === void 0 ? e = new Uint8Array(e) : n === void 0 ? e = new Uint8Array(e, r) : e = new Uint8Array(e, r, n), l.TYPED_ARRAY_SUPPORT ? (t = e, t.__proto__ = l.prototype) : t =
|
|
138
|
+
return r === void 0 && n === void 0 ? e = new Uint8Array(e) : n === void 0 ? e = new Uint8Array(e, r) : e = new Uint8Array(e, r, n), l.TYPED_ARRAY_SUPPORT ? (t = e, t.__proto__ = l.prototype) : t = ke(t, e), t;
|
|
139
139
|
}
|
|
140
140
|
function sr(t, e) {
|
|
141
141
|
if ($(e)) {
|
|
142
|
-
var r =
|
|
142
|
+
var r = ze(e.length) | 0;
|
|
143
143
|
return t = q(t, r), t.length === 0 || e.copy(t, 0, 0, r), t;
|
|
144
144
|
}
|
|
145
145
|
if (e) {
|
|
146
146
|
if (typeof ArrayBuffer < "u" && e.buffer instanceof ArrayBuffer || "length" in e)
|
|
147
|
-
return typeof e.length != "number" || Rr(e.length) ? q(t, 0) :
|
|
148
|
-
if (e.type === "Buffer" &&
|
|
149
|
-
return
|
|
147
|
+
return typeof e.length != "number" || Rr(e.length) ? q(t, 0) : ke(t, e);
|
|
148
|
+
if (e.type === "Buffer" && ht(e.data))
|
|
149
|
+
return ke(t, e.data);
|
|
150
150
|
}
|
|
151
151
|
throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
if (t >=
|
|
155
|
-
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" +
|
|
153
|
+
function ze(t) {
|
|
154
|
+
if (t >= _e())
|
|
155
|
+
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + _e().toString(16) + " bytes");
|
|
156
156
|
return t | 0;
|
|
157
157
|
}
|
|
158
|
-
l.isBuffer =
|
|
158
|
+
l.isBuffer = D;
|
|
159
159
|
function $(t) {
|
|
160
160
|
return !!(t != null && t._isBuffer);
|
|
161
161
|
}
|
|
@@ -189,7 +189,7 @@ l.isEncoding = function(e) {
|
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
191
|
l.concat = function(e, r) {
|
|
192
|
-
if (!
|
|
192
|
+
if (!ht(e))
|
|
193
193
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
194
194
|
if (e.length === 0)
|
|
195
195
|
return l.alloc(0);
|
|
@@ -206,7 +206,7 @@ l.concat = function(e, r) {
|
|
|
206
206
|
}
|
|
207
207
|
return i;
|
|
208
208
|
};
|
|
209
|
-
function
|
|
209
|
+
function mt(t, e) {
|
|
210
210
|
if ($(t))
|
|
211
211
|
return t.length;
|
|
212
212
|
if (typeof ArrayBuffer < "u" && typeof ArrayBuffer.isView == "function" && (ArrayBuffer.isView(t) || t instanceof ArrayBuffer))
|
|
@@ -223,7 +223,7 @@ function gt(t, e) {
|
|
|
223
223
|
case "utf8":
|
|
224
224
|
case "utf-8":
|
|
225
225
|
case void 0:
|
|
226
|
-
return
|
|
226
|
+
return we(t).length;
|
|
227
227
|
case "ucs2":
|
|
228
228
|
case "ucs-2":
|
|
229
229
|
case "utf16le":
|
|
@@ -234,11 +234,11 @@ function gt(t, e) {
|
|
|
234
234
|
case "base64":
|
|
235
235
|
return Et(t).length;
|
|
236
236
|
default:
|
|
237
|
-
if (n) return
|
|
237
|
+
if (n) return we(t).length;
|
|
238
238
|
e = ("" + e).toLowerCase(), n = !0;
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
l.byteLength =
|
|
241
|
+
l.byteLength = mt;
|
|
242
242
|
function fr(t, e, r) {
|
|
243
243
|
var n = !1;
|
|
244
244
|
if ((e === void 0 || e < 0) && (e = 0), e > this.length || ((r === void 0 || r > this.length) && (r = this.length), r <= 0) || (r >>>= 0, e >>>= 0, r <= e))
|
|
@@ -249,7 +249,7 @@ function fr(t, e, r) {
|
|
|
249
249
|
return _r(this, e, r);
|
|
250
250
|
case "utf8":
|
|
251
251
|
case "utf-8":
|
|
252
|
-
return
|
|
252
|
+
return wt(this, e, r);
|
|
253
253
|
case "ascii":
|
|
254
254
|
return mr(this, e, r);
|
|
255
255
|
case "latin1":
|
|
@@ -298,7 +298,7 @@ l.prototype.swap64 = function() {
|
|
|
298
298
|
};
|
|
299
299
|
l.prototype.toString = function() {
|
|
300
300
|
var e = this.length | 0;
|
|
301
|
-
return e === 0 ? "" : arguments.length === 0 ?
|
|
301
|
+
return e === 0 ? "" : arguments.length === 0 ? wt(this, 0, e) : fr.apply(this, arguments);
|
|
302
302
|
};
|
|
303
303
|
l.prototype.equals = function(e) {
|
|
304
304
|
if (!$(e)) throw new TypeError("Argument must be a Buffer");
|
|
@@ -327,7 +327,7 @@ l.prototype.compare = function(e, r, n, i, o) {
|
|
|
327
327
|
}
|
|
328
328
|
return s < f ? -1 : f < s ? 1 : 0;
|
|
329
329
|
};
|
|
330
|
-
function
|
|
330
|
+
function gt(t, e, r, n, i) {
|
|
331
331
|
if (t.length === 0) return -1;
|
|
332
332
|
if (typeof r == "string" ? (n = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), r = +r, isNaN(r) && (r = i ? 0 : t.length - 1), r < 0 && (r = t.length + r), r >= t.length) {
|
|
333
333
|
if (i) return -1;
|
|
@@ -336,20 +336,20 @@ function _t(t, e, r, n, i) {
|
|
|
336
336
|
if (i) r = 0;
|
|
337
337
|
else return -1;
|
|
338
338
|
if (typeof e == "string" && (e = l.from(e, n)), $(e))
|
|
339
|
-
return e.length === 0 ? -1 :
|
|
339
|
+
return e.length === 0 ? -1 : Ze(t, e, r, n, i);
|
|
340
340
|
if (typeof e == "number")
|
|
341
|
-
return e = e & 255, l.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf == "function" ? i ? Uint8Array.prototype.indexOf.call(t, e, r) : Uint8Array.prototype.lastIndexOf.call(t, e, r) :
|
|
341
|
+
return e = e & 255, l.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf == "function" ? i ? Uint8Array.prototype.indexOf.call(t, e, r) : Uint8Array.prototype.lastIndexOf.call(t, e, r) : Ze(t, [e], r, n, i);
|
|
342
342
|
throw new TypeError("val must be string, number or Buffer");
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function Ze(t, e, r, n, i) {
|
|
345
345
|
var o = 1, s = t.length, f = e.length;
|
|
346
346
|
if (n !== void 0 && (n = String(n).toLowerCase(), n === "ucs2" || n === "ucs-2" || n === "utf16le" || n === "utf-16le")) {
|
|
347
347
|
if (t.length < 2 || e.length < 2)
|
|
348
348
|
return -1;
|
|
349
349
|
o = 2, s /= 2, f /= 2, r /= 2;
|
|
350
350
|
}
|
|
351
|
-
function a(m,
|
|
352
|
-
return o === 1 ? m[
|
|
351
|
+
function a(m, x) {
|
|
352
|
+
return o === 1 ? m[x] : m.readUInt16BE(x * o);
|
|
353
353
|
}
|
|
354
354
|
var u;
|
|
355
355
|
if (i) {
|
|
@@ -374,10 +374,10 @@ l.prototype.includes = function(e, r, n) {
|
|
|
374
374
|
return this.indexOf(e, r, n) !== -1;
|
|
375
375
|
};
|
|
376
376
|
l.prototype.indexOf = function(e, r, n) {
|
|
377
|
-
return
|
|
377
|
+
return gt(this, e, r, n, !0);
|
|
378
378
|
};
|
|
379
379
|
l.prototype.lastIndexOf = function(e, r, n) {
|
|
380
|
-
return
|
|
380
|
+
return gt(this, e, r, n, !1);
|
|
381
381
|
};
|
|
382
382
|
function ar(t, e, r, n) {
|
|
383
383
|
r = Number(r) || 0;
|
|
@@ -394,19 +394,19 @@ function ar(t, e, r, n) {
|
|
|
394
394
|
return s;
|
|
395
395
|
}
|
|
396
396
|
function lr(t, e, r, n) {
|
|
397
|
-
return
|
|
397
|
+
return xe(we(e, t.length - r), t, r, n);
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
return
|
|
399
|
+
function _t(t, e, r, n) {
|
|
400
|
+
return xe(xr(e), t, r, n);
|
|
401
401
|
}
|
|
402
402
|
function ur(t, e, r, n) {
|
|
403
|
-
return
|
|
403
|
+
return _t(t, e, r, n);
|
|
404
404
|
}
|
|
405
405
|
function cr(t, e, r, n) {
|
|
406
|
-
return
|
|
406
|
+
return xe(Et(e), t, r, n);
|
|
407
407
|
}
|
|
408
408
|
function hr(t, e, r, n) {
|
|
409
|
-
return
|
|
409
|
+
return xe(Sr(e, t.length - r), t, r, n);
|
|
410
410
|
}
|
|
411
411
|
l.prototype.write = function(e, r, n, i) {
|
|
412
412
|
if (r === void 0)
|
|
@@ -431,7 +431,7 @@ l.prototype.write = function(e, r, n, i) {
|
|
|
431
431
|
case "utf-8":
|
|
432
432
|
return lr(this, e, r, n);
|
|
433
433
|
case "ascii":
|
|
434
|
-
return
|
|
434
|
+
return _t(this, e, r, n);
|
|
435
435
|
case "latin1":
|
|
436
436
|
case "binary":
|
|
437
437
|
return ur(this, e, r, n);
|
|
@@ -454,9 +454,9 @@ l.prototype.toJSON = function() {
|
|
|
454
454
|
};
|
|
455
455
|
};
|
|
456
456
|
function dr(t, e, r) {
|
|
457
|
-
return e === 0 && r === t.length ?
|
|
457
|
+
return e === 0 && r === t.length ? Ge(t) : Ge(t.slice(e, r));
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function wt(t, e, r) {
|
|
460
460
|
r = Math.min(t.length, r);
|
|
461
461
|
for (var n = [], i = e; i < r; ) {
|
|
462
462
|
var o = t[i], s = null, f = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1;
|
|
@@ -480,15 +480,15 @@ function yt(t, e, r) {
|
|
|
480
480
|
}
|
|
481
481
|
return pr(n);
|
|
482
482
|
}
|
|
483
|
-
var
|
|
483
|
+
var Xe = 4096;
|
|
484
484
|
function pr(t) {
|
|
485
485
|
var e = t.length;
|
|
486
|
-
if (e <=
|
|
486
|
+
if (e <= Xe)
|
|
487
487
|
return String.fromCharCode.apply(String, t);
|
|
488
488
|
for (var r = "", n = 0; n < e; )
|
|
489
489
|
r += String.fromCharCode.apply(
|
|
490
490
|
String,
|
|
491
|
-
t.slice(n, n +=
|
|
491
|
+
t.slice(n, n += Xe)
|
|
492
492
|
);
|
|
493
493
|
return r;
|
|
494
494
|
}
|
|
@@ -510,7 +510,7 @@ function _r(t, e, r) {
|
|
|
510
510
|
var n = t.length;
|
|
511
511
|
(!e || e < 0) && (e = 0), (!r || r < 0 || r > n) && (r = n);
|
|
512
512
|
for (var i = "", o = e; o < r; ++o)
|
|
513
|
-
i +=
|
|
513
|
+
i += Er(t[o]);
|
|
514
514
|
return i;
|
|
515
515
|
}
|
|
516
516
|
function wr(t, e, r) {
|
|
@@ -595,18 +595,18 @@ l.prototype.readInt32BE = function(e, r) {
|
|
|
595
595
|
return r || T(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
|
|
596
596
|
};
|
|
597
597
|
l.prototype.readFloatLE = function(e, r) {
|
|
598
|
-
return r || T(e, 4, this.length),
|
|
598
|
+
return r || T(e, 4, this.length), ve(this, e, !0, 23, 4);
|
|
599
599
|
};
|
|
600
600
|
l.prototype.readFloatBE = function(e, r) {
|
|
601
|
-
return r || T(e, 4, this.length),
|
|
601
|
+
return r || T(e, 4, this.length), ve(this, e, !1, 23, 4);
|
|
602
602
|
};
|
|
603
603
|
l.prototype.readDoubleLE = function(e, r) {
|
|
604
|
-
return r || T(e, 8, this.length),
|
|
604
|
+
return r || T(e, 8, this.length), ve(this, e, !0, 52, 8);
|
|
605
605
|
};
|
|
606
606
|
l.prototype.readDoubleBE = function(e, r) {
|
|
607
|
-
return r || T(e, 8, this.length),
|
|
607
|
+
return r || T(e, 8, this.length), ve(this, e, !1, 52, 8);
|
|
608
608
|
};
|
|
609
|
-
function
|
|
609
|
+
function N(t, e, r, n, i, o) {
|
|
610
610
|
if (!$(t)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
611
611
|
if (e > i || e < o) throw new RangeError('"value" argument is out of bounds');
|
|
612
612
|
if (r + n > t.length) throw new RangeError("Index out of range");
|
|
@@ -614,7 +614,7 @@ function F(t, e, r, n, i, o) {
|
|
|
614
614
|
l.prototype.writeUIntLE = function(e, r, n, i) {
|
|
615
615
|
if (e = +e, r = r | 0, n = n | 0, !i) {
|
|
616
616
|
var o = Math.pow(2, 8 * n) - 1;
|
|
617
|
-
|
|
617
|
+
N(this, e, r, n, o, 0);
|
|
618
618
|
}
|
|
619
619
|
var s = 1, f = 0;
|
|
620
620
|
for (this[r] = e & 255; ++f < n && (s *= 256); )
|
|
@@ -624,7 +624,7 @@ l.prototype.writeUIntLE = function(e, r, n, i) {
|
|
|
624
624
|
l.prototype.writeUIntBE = function(e, r, n, i) {
|
|
625
625
|
if (e = +e, r = r | 0, n = n | 0, !i) {
|
|
626
626
|
var o = Math.pow(2, 8 * n) - 1;
|
|
627
|
-
|
|
627
|
+
N(this, e, r, n, o, 0);
|
|
628
628
|
}
|
|
629
629
|
var s = n - 1, f = 1;
|
|
630
630
|
for (this[r + s] = e & 255; --s >= 0 && (f *= 256); )
|
|
@@ -632,18 +632,18 @@ l.prototype.writeUIntBE = function(e, r, n, i) {
|
|
|
632
632
|
return r + n;
|
|
633
633
|
};
|
|
634
634
|
l.prototype.writeUInt8 = function(e, r, n) {
|
|
635
|
-
return e = +e, r = r | 0, n ||
|
|
635
|
+
return e = +e, r = r | 0, n || N(this, e, r, 1, 255, 0), l.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), this[r] = e & 255, r + 1;
|
|
636
636
|
};
|
|
637
|
-
function
|
|
637
|
+
function be(t, e, r, n) {
|
|
638
638
|
e < 0 && (e = 65535 + e + 1);
|
|
639
639
|
for (var i = 0, o = Math.min(t.length - r, 2); i < o; ++i)
|
|
640
640
|
t[r + i] = (e & 255 << 8 * (n ? i : 1 - i)) >>> (n ? i : 1 - i) * 8;
|
|
641
641
|
}
|
|
642
642
|
l.prototype.writeUInt16LE = function(e, r, n) {
|
|
643
|
-
return e = +e, r = r | 0, n ||
|
|
643
|
+
return e = +e, r = r | 0, n || N(this, e, r, 2, 65535, 0), l.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8) : be(this, e, r, !0), r + 2;
|
|
644
644
|
};
|
|
645
645
|
l.prototype.writeUInt16BE = function(e, r, n) {
|
|
646
|
-
return e = +e, r = r | 0, n ||
|
|
646
|
+
return e = +e, r = r | 0, n || N(this, e, r, 2, 65535, 0), l.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 8, this[r + 1] = e & 255) : be(this, e, r, !1), r + 2;
|
|
647
647
|
};
|
|
648
648
|
function Ee(t, e, r, n) {
|
|
649
649
|
e < 0 && (e = 4294967295 + e + 1);
|
|
@@ -651,15 +651,15 @@ function Ee(t, e, r, n) {
|
|
|
651
651
|
t[r + i] = e >>> (n ? i : 3 - i) * 8 & 255;
|
|
652
652
|
}
|
|
653
653
|
l.prototype.writeUInt32LE = function(e, r, n) {
|
|
654
|
-
return e = +e, r = r | 0, n ||
|
|
654
|
+
return e = +e, r = r | 0, n || N(this, e, r, 4, 4294967295, 0), l.TYPED_ARRAY_SUPPORT ? (this[r + 3] = e >>> 24, this[r + 2] = e >>> 16, this[r + 1] = e >>> 8, this[r] = e & 255) : Ee(this, e, r, !0), r + 4;
|
|
655
655
|
};
|
|
656
656
|
l.prototype.writeUInt32BE = function(e, r, n) {
|
|
657
|
-
return e = +e, r = r | 0, n ||
|
|
657
|
+
return e = +e, r = r | 0, n || N(this, e, r, 4, 4294967295, 0), l.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 24, this[r + 1] = e >>> 16, this[r + 2] = e >>> 8, this[r + 3] = e & 255) : Ee(this, e, r, !1), r + 4;
|
|
658
658
|
};
|
|
659
659
|
l.prototype.writeIntLE = function(e, r, n, i) {
|
|
660
660
|
if (e = +e, r = r | 0, !i) {
|
|
661
661
|
var o = Math.pow(2, 8 * n - 1);
|
|
662
|
-
|
|
662
|
+
N(this, e, r, n, o - 1, -o);
|
|
663
663
|
}
|
|
664
664
|
var s = 0, f = 1, a = 0;
|
|
665
665
|
for (this[r] = e & 255; ++s < n && (f *= 256); )
|
|
@@ -669,7 +669,7 @@ l.prototype.writeIntLE = function(e, r, n, i) {
|
|
|
669
669
|
l.prototype.writeIntBE = function(e, r, n, i) {
|
|
670
670
|
if (e = +e, r = r | 0, !i) {
|
|
671
671
|
var o = Math.pow(2, 8 * n - 1);
|
|
672
|
-
|
|
672
|
+
N(this, e, r, n, o - 1, -o);
|
|
673
673
|
}
|
|
674
674
|
var s = n - 1, f = 1, a = 0;
|
|
675
675
|
for (this[r + s] = e & 255; --s >= 0 && (f *= 256); )
|
|
@@ -677,41 +677,41 @@ l.prototype.writeIntBE = function(e, r, n, i) {
|
|
|
677
677
|
return r + n;
|
|
678
678
|
};
|
|
679
679
|
l.prototype.writeInt8 = function(e, r, n) {
|
|
680
|
-
return e = +e, r = r | 0, n ||
|
|
680
|
+
return e = +e, r = r | 0, n || N(this, e, r, 1, 127, -128), l.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[r] = e & 255, r + 1;
|
|
681
681
|
};
|
|
682
682
|
l.prototype.writeInt16LE = function(e, r, n) {
|
|
683
|
-
return e = +e, r = r | 0, n ||
|
|
683
|
+
return e = +e, r = r | 0, n || N(this, e, r, 2, 32767, -32768), l.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8) : be(this, e, r, !0), r + 2;
|
|
684
684
|
};
|
|
685
685
|
l.prototype.writeInt16BE = function(e, r, n) {
|
|
686
|
-
return e = +e, r = r | 0, n ||
|
|
686
|
+
return e = +e, r = r | 0, n || N(this, e, r, 2, 32767, -32768), l.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 8, this[r + 1] = e & 255) : be(this, e, r, !1), r + 2;
|
|
687
687
|
};
|
|
688
688
|
l.prototype.writeInt32LE = function(e, r, n) {
|
|
689
|
-
return e = +e, r = r | 0, n ||
|
|
689
|
+
return e = +e, r = r | 0, n || N(this, e, r, 4, 2147483647, -2147483648), l.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8, this[r + 2] = e >>> 16, this[r + 3] = e >>> 24) : Ee(this, e, r, !0), r + 4;
|
|
690
690
|
};
|
|
691
691
|
l.prototype.writeInt32BE = function(e, r, n) {
|
|
692
|
-
return e = +e, r = r | 0, n ||
|
|
692
|
+
return e = +e, r = r | 0, n || N(this, e, r, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), l.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 24, this[r + 1] = e >>> 16, this[r + 2] = e >>> 8, this[r + 3] = e & 255) : Ee(this, e, r, !1), r + 4;
|
|
693
693
|
};
|
|
694
|
-
function
|
|
694
|
+
function yt(t, e, r, n, i, o) {
|
|
695
695
|
if (r + n > t.length) throw new RangeError("Index out of range");
|
|
696
696
|
if (r < 0) throw new RangeError("Index out of range");
|
|
697
697
|
}
|
|
698
|
-
function
|
|
699
|
-
return i ||
|
|
698
|
+
function vt(t, e, r, n, i) {
|
|
699
|
+
return i || yt(t, e, r, 4), ct(t, e, r, n, 23, 4), r + 4;
|
|
700
700
|
}
|
|
701
701
|
l.prototype.writeFloatLE = function(e, r, n) {
|
|
702
|
-
return
|
|
702
|
+
return vt(this, e, r, !0, n);
|
|
703
703
|
};
|
|
704
704
|
l.prototype.writeFloatBE = function(e, r, n) {
|
|
705
|
-
return
|
|
705
|
+
return vt(this, e, r, !1, n);
|
|
706
706
|
};
|
|
707
|
-
function
|
|
708
|
-
return i ||
|
|
707
|
+
function bt(t, e, r, n, i) {
|
|
708
|
+
return i || yt(t, e, r, 8), ct(t, e, r, n, 52, 8), r + 8;
|
|
709
709
|
}
|
|
710
710
|
l.prototype.writeDoubleLE = function(e, r, n) {
|
|
711
|
-
return
|
|
711
|
+
return bt(this, e, r, !0, n);
|
|
712
712
|
};
|
|
713
713
|
l.prototype.writeDoubleBE = function(e, r, n) {
|
|
714
|
-
return
|
|
714
|
+
return bt(this, e, r, !1, n);
|
|
715
715
|
};
|
|
716
716
|
l.prototype.copy = function(e, r, n, i) {
|
|
717
717
|
if (n || (n = 0), !i && i !== 0 && (i = this.length), r >= e.length && (r = e.length), r || (r = 0), i > 0 && i < n && (i = n), i === n || e.length === 0 || this.length === 0) return 0;
|
|
@@ -756,7 +756,7 @@ l.prototype.fill = function(e, r, n, i) {
|
|
|
756
756
|
for (s = r; s < n; ++s)
|
|
757
757
|
this[s] = e;
|
|
758
758
|
else {
|
|
759
|
-
var f = $(e) ? e :
|
|
759
|
+
var f = $(e) ? e : we(new l(e, i).toString()), a = f.length;
|
|
760
760
|
for (s = 0; s < n - r; ++s)
|
|
761
761
|
this[s + r] = f[s % a];
|
|
762
762
|
}
|
|
@@ -772,10 +772,10 @@ function vr(t) {
|
|
|
772
772
|
function br(t) {
|
|
773
773
|
return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function Er(t) {
|
|
776
776
|
return t < 16 ? "0" + t.toString(16) : t.toString(16);
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function we(t, e) {
|
|
779
779
|
e = e || 1 / 0;
|
|
780
780
|
for (var r, n = t.length, i = null, o = [], s = 0; s < n; ++s) {
|
|
781
781
|
if (r = t.charCodeAt(s), r > 55295 && r < 57344) {
|
|
@@ -825,7 +825,7 @@ function ye(t, e) {
|
|
|
825
825
|
}
|
|
826
826
|
return o;
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function xr(t) {
|
|
829
829
|
for (var e = [], r = 0; r < t.length; ++r)
|
|
830
830
|
e.push(t.charCodeAt(r) & 255);
|
|
831
831
|
return e;
|
|
@@ -838,7 +838,7 @@ function Sr(t, e) {
|
|
|
838
838
|
function Et(t) {
|
|
839
839
|
return Xt(vr(t));
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function xe(t, e, r, n) {
|
|
842
842
|
for (var i = 0; i < n && !(i + r >= e.length || i >= t.length); ++i)
|
|
843
843
|
e[i + r] = t[i];
|
|
844
844
|
return i;
|
|
@@ -846,14 +846,14 @@ function Se(t, e, r, n) {
|
|
|
846
846
|
function Rr(t) {
|
|
847
847
|
return t !== t;
|
|
848
848
|
}
|
|
849
|
-
function
|
|
850
|
-
return t != null && (!!t._isBuffer ||
|
|
849
|
+
function D(t) {
|
|
850
|
+
return t != null && (!!t._isBuffer || xt(t) || Ir(t));
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function xt(t) {
|
|
853
853
|
return !!t.constructor && typeof t.constructor.isBuffer == "function" && t.constructor.isBuffer(t);
|
|
854
854
|
}
|
|
855
855
|
function Ir(t) {
|
|
856
|
-
return typeof t.readFloatLE == "function" && typeof t.slice == "function" &&
|
|
856
|
+
return typeof t.readFloatLE == "function" && typeof t.slice == "function" && xt(t.slice(0, 0));
|
|
857
857
|
}
|
|
858
858
|
var Ce;
|
|
859
859
|
function H() {
|
|
@@ -876,45 +876,45 @@ g.prototype.setMaxListeners = function(e) {
|
|
|
876
876
|
throw new TypeError('"n" argument must be a positive number');
|
|
877
877
|
return this._maxListeners = e, this;
|
|
878
878
|
};
|
|
879
|
-
function
|
|
879
|
+
function St(t) {
|
|
880
880
|
return t._maxListeners === void 0 ? g.defaultMaxListeners : t._maxListeners;
|
|
881
881
|
}
|
|
882
882
|
g.prototype.getMaxListeners = function() {
|
|
883
|
-
return
|
|
883
|
+
return St(this);
|
|
884
884
|
};
|
|
885
885
|
function Cr(t, e, r) {
|
|
886
886
|
if (e)
|
|
887
887
|
t.call(r);
|
|
888
888
|
else
|
|
889
|
-
for (var n = t.length, i =
|
|
889
|
+
for (var n = t.length, i = ae(t, n), o = 0; o < n; ++o)
|
|
890
890
|
i[o].call(r);
|
|
891
891
|
}
|
|
892
892
|
function Or(t, e, r, n) {
|
|
893
893
|
if (e)
|
|
894
894
|
t.call(r, n);
|
|
895
895
|
else
|
|
896
|
-
for (var i = t.length, o =
|
|
896
|
+
for (var i = t.length, o = ae(t, i), s = 0; s < i; ++s)
|
|
897
897
|
o[s].call(r, n);
|
|
898
898
|
}
|
|
899
899
|
function Ar(t, e, r, n, i) {
|
|
900
900
|
if (e)
|
|
901
901
|
t.call(r, n, i);
|
|
902
902
|
else
|
|
903
|
-
for (var o = t.length, s =
|
|
903
|
+
for (var o = t.length, s = ae(t, o), f = 0; f < o; ++f)
|
|
904
904
|
s[f].call(r, n, i);
|
|
905
905
|
}
|
|
906
906
|
function Tr(t, e, r, n, i, o) {
|
|
907
907
|
if (e)
|
|
908
908
|
t.call(r, n, i, o);
|
|
909
909
|
else
|
|
910
|
-
for (var s = t.length, f =
|
|
910
|
+
for (var s = t.length, f = ae(t, s), a = 0; a < s; ++a)
|
|
911
911
|
f[a].call(r, n, i, o);
|
|
912
912
|
}
|
|
913
913
|
function Lr(t, e, r, n) {
|
|
914
914
|
if (e)
|
|
915
915
|
t.apply(r, n);
|
|
916
916
|
else
|
|
917
|
-
for (var i = t.length, o =
|
|
917
|
+
for (var i = t.length, o = ae(t, i), s = 0; s < i; ++s)
|
|
918
918
|
o[s].apply(r, n);
|
|
919
919
|
}
|
|
920
920
|
g.prototype.emit = function(e) {
|
|
@@ -959,7 +959,7 @@ g.prototype.emit = function(e) {
|
|
|
959
959
|
}
|
|
960
960
|
return !0;
|
|
961
961
|
};
|
|
962
|
-
function
|
|
962
|
+
function Rt(t, e, r, n) {
|
|
963
963
|
var i, o, s;
|
|
964
964
|
if (typeof r != "function")
|
|
965
965
|
throw new TypeError('"listener" argument must be a function');
|
|
@@ -969,7 +969,7 @@ function It(t, e, r, n) {
|
|
|
969
969
|
r.listener ? r.listener : r
|
|
970
970
|
), o = t._events), s = o[e]) : (o = t._events = new H(), t._eventsCount = 0), !s)
|
|
971
971
|
s = o[e] = r, ++t._eventsCount;
|
|
972
|
-
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), !s.warned && (i =
|
|
972
|
+
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), !s.warned && (i = St(t), i && i > 0 && s.length > i)) {
|
|
973
973
|
s.warned = !0;
|
|
974
974
|
var f = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + e + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
975
975
|
f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = s.length, Dr(f);
|
|
@@ -980,13 +980,13 @@ function Dr(t) {
|
|
|
980
980
|
typeof console.warn == "function" ? console.warn(t) : console.log(t);
|
|
981
981
|
}
|
|
982
982
|
g.prototype.addListener = function(e, r) {
|
|
983
|
-
return
|
|
983
|
+
return Rt(this, e, r, !1);
|
|
984
984
|
};
|
|
985
985
|
g.prototype.on = g.prototype.addListener;
|
|
986
986
|
g.prototype.prependListener = function(e, r) {
|
|
987
|
-
return
|
|
987
|
+
return Rt(this, e, r, !0);
|
|
988
988
|
};
|
|
989
|
-
function
|
|
989
|
+
function It(t, e, r) {
|
|
990
990
|
var n = !1;
|
|
991
991
|
function i() {
|
|
992
992
|
t.removeListener(e, i), n || (n = !0, r.apply(t, arguments));
|
|
@@ -996,12 +996,12 @@ function Ct(t, e, r) {
|
|
|
996
996
|
g.prototype.once = function(e, r) {
|
|
997
997
|
if (typeof r != "function")
|
|
998
998
|
throw new TypeError('"listener" argument must be a function');
|
|
999
|
-
return this.on(e,
|
|
999
|
+
return this.on(e, It(this, e, r)), this;
|
|
1000
1000
|
};
|
|
1001
1001
|
g.prototype.prependOnceListener = function(e, r) {
|
|
1002
1002
|
if (typeof r != "function")
|
|
1003
1003
|
throw new TypeError('"listener" argument must be a function');
|
|
1004
|
-
return this.prependListener(e,
|
|
1004
|
+
return this.prependListener(e, It(this, e, r)), this;
|
|
1005
1005
|
};
|
|
1006
1006
|
g.prototype.removeListener = function(e, r) {
|
|
1007
1007
|
var n, i, o, s, f;
|
|
@@ -1055,10 +1055,10 @@ g.prototype.listeners = function(e) {
|
|
|
1055
1055
|
return i ? (r = i[e], r ? typeof r == "function" ? n = [r.listener || r] : n = Fr(r) : n = []) : n = [], n;
|
|
1056
1056
|
};
|
|
1057
1057
|
g.listenerCount = function(t, e) {
|
|
1058
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
1058
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : Ct.call(t, e);
|
|
1059
1059
|
};
|
|
1060
|
-
g.prototype.listenerCount =
|
|
1061
|
-
function
|
|
1060
|
+
g.prototype.listenerCount = Ct;
|
|
1061
|
+
function Ct(t) {
|
|
1062
1062
|
var e = this._events;
|
|
1063
1063
|
if (e) {
|
|
1064
1064
|
var r = e[t];
|
|
@@ -1077,7 +1077,7 @@ function Nr(t, e) {
|
|
|
1077
1077
|
t[r] = t[n];
|
|
1078
1078
|
t.pop();
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function ae(t, e) {
|
|
1081
1081
|
for (var r = new Array(e); e--; )
|
|
1082
1082
|
r[e] = t[e];
|
|
1083
1083
|
return r;
|
|
@@ -1087,19 +1087,19 @@ function Fr(t) {
|
|
|
1087
1087
|
e[r] = t[r].listener || t[r];
|
|
1088
1088
|
return e;
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1090
|
+
function Ot() {
|
|
1091
1091
|
throw new Error("setTimeout has not been defined");
|
|
1092
1092
|
}
|
|
1093
|
-
function
|
|
1093
|
+
function At() {
|
|
1094
1094
|
throw new Error("clearTimeout has not been defined");
|
|
1095
1095
|
}
|
|
1096
|
-
var Y =
|
|
1096
|
+
var Y = Ot, W = At;
|
|
1097
1097
|
typeof ie.setTimeout == "function" && (Y = setTimeout);
|
|
1098
1098
|
typeof ie.clearTimeout == "function" && (W = clearTimeout);
|
|
1099
|
-
function
|
|
1099
|
+
function Tt(t) {
|
|
1100
1100
|
if (Y === setTimeout)
|
|
1101
1101
|
return setTimeout(t, 0);
|
|
1102
|
-
if ((Y ===
|
|
1102
|
+
if ((Y === Ot || !Y) && setTimeout)
|
|
1103
1103
|
return Y = setTimeout, setTimeout(t, 0);
|
|
1104
1104
|
try {
|
|
1105
1105
|
return Y(t, 0);
|
|
@@ -1114,7 +1114,7 @@ function Lt(t) {
|
|
|
1114
1114
|
function Mr(t) {
|
|
1115
1115
|
if (W === clearTimeout)
|
|
1116
1116
|
return clearTimeout(t);
|
|
1117
|
-
if ((W ===
|
|
1117
|
+
if ((W === At || !W) && clearTimeout)
|
|
1118
1118
|
return W = clearTimeout, clearTimeout(t);
|
|
1119
1119
|
try {
|
|
1120
1120
|
return W(t);
|
|
@@ -1126,41 +1126,41 @@ function Mr(t) {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
|
-
var z = [], ne = !1, ee,
|
|
1129
|
+
var z = [], ne = !1, ee, me = -1;
|
|
1130
1130
|
function Br() {
|
|
1131
|
-
!ne || !ee || (ne = !1, ee.length ? z = ee.concat(z) :
|
|
1131
|
+
!ne || !ee || (ne = !1, ee.length ? z = ee.concat(z) : me = -1, z.length && Lt());
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function Lt() {
|
|
1134
1134
|
if (!ne) {
|
|
1135
|
-
var t =
|
|
1135
|
+
var t = Tt(Br);
|
|
1136
1136
|
ne = !0;
|
|
1137
1137
|
for (var e = z.length; e; ) {
|
|
1138
|
-
for (ee = z, z = []; ++
|
|
1139
|
-
ee && ee[
|
|
1140
|
-
|
|
1138
|
+
for (ee = z, z = []; ++me < e; )
|
|
1139
|
+
ee && ee[me].run();
|
|
1140
|
+
me = -1, e = z.length;
|
|
1141
1141
|
}
|
|
1142
1142
|
ee = null, ne = !1, Mr(t);
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1145
|
+
function k(t) {
|
|
1146
1146
|
var e = new Array(arguments.length - 1);
|
|
1147
1147
|
if (arguments.length > 1)
|
|
1148
1148
|
for (var r = 1; r < arguments.length; r++)
|
|
1149
1149
|
e[r - 1] = arguments[r];
|
|
1150
|
-
z.push(new
|
|
1150
|
+
z.push(new Dt(t, e)), z.length === 1 && !ne && Tt(Lt);
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function Dt(t, e) {
|
|
1153
1153
|
this.fun = t, this.array = e;
|
|
1154
1154
|
}
|
|
1155
|
-
|
|
1155
|
+
Dt.prototype.run = function() {
|
|
1156
1156
|
this.fun.apply(null, this.array);
|
|
1157
1157
|
};
|
|
1158
|
-
var
|
|
1159
|
-
|
|
1160
|
-
var
|
|
1161
|
-
env:
|
|
1162
|
-
},
|
|
1163
|
-
typeof Object.create == "function" ?
|
|
1158
|
+
var kr = {}, se = ie.performance || {};
|
|
1159
|
+
se.now || se.mozNow || se.msNow || se.oNow || se.webkitNow;
|
|
1160
|
+
var ge = {
|
|
1161
|
+
env: kr
|
|
1162
|
+
}, Ue;
|
|
1163
|
+
typeof Object.create == "function" ? Ue = function(e, r) {
|
|
1164
1164
|
e.super_ = r, e.prototype = Object.create(r.prototype, {
|
|
1165
1165
|
constructor: {
|
|
1166
1166
|
value: e,
|
|
@@ -1169,20 +1169,20 @@ typeof Object.create == "function" ? ke = function(e, r) {
|
|
|
1169
1169
|
configurable: !0
|
|
1170
1170
|
}
|
|
1171
1171
|
});
|
|
1172
|
-
} :
|
|
1172
|
+
} : Ue = function(e, r) {
|
|
1173
1173
|
e.super_ = r;
|
|
1174
1174
|
var n = function() {
|
|
1175
1175
|
};
|
|
1176
1176
|
n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
1177
1177
|
};
|
|
1178
|
-
var oe =
|
|
1178
|
+
var oe = Ue, Ur = /%[sdj%]/g;
|
|
1179
1179
|
function Pr(t) {
|
|
1180
|
-
if (!
|
|
1180
|
+
if (!Je(t)) {
|
|
1181
1181
|
for (var e = [], r = 0; r < arguments.length; r++)
|
|
1182
1182
|
e.push(G(arguments[r]));
|
|
1183
1183
|
return e.join(" ");
|
|
1184
1184
|
}
|
|
1185
|
-
for (var r = 1, n = arguments, i = n.length, o = String(t).replace(
|
|
1185
|
+
for (var r = 1, n = arguments, i = n.length, o = String(t).replace(Ur, function(f) {
|
|
1186
1186
|
if (f === "%%") return "%";
|
|
1187
1187
|
if (r >= i) return f;
|
|
1188
1188
|
switch (f) {
|
|
@@ -1200,47 +1200,47 @@ function Pr(t) {
|
|
|
1200
1200
|
return f;
|
|
1201
1201
|
}
|
|
1202
1202
|
}), s = n[r]; r < i; s = n[++r])
|
|
1203
|
-
|
|
1203
|
+
Ve(s) || !le(s) ? o += " " + s : o += " " + G(s);
|
|
1204
1204
|
return o;
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function Nt(t, e) {
|
|
1207
1207
|
if (Q(ie.process))
|
|
1208
1208
|
return function() {
|
|
1209
|
-
return
|
|
1209
|
+
return Nt(t, e).apply(this, arguments);
|
|
1210
1210
|
};
|
|
1211
|
-
if (
|
|
1211
|
+
if (ge.noDeprecation === !0)
|
|
1212
1212
|
return t;
|
|
1213
1213
|
var r = !1;
|
|
1214
1214
|
function n() {
|
|
1215
1215
|
if (!r) {
|
|
1216
|
-
if (
|
|
1216
|
+
if (ge.throwDeprecation)
|
|
1217
1217
|
throw new Error(e);
|
|
1218
|
-
|
|
1218
|
+
ge.traceDeprecation ? console.trace(e) : console.error(e), r = !0;
|
|
1219
1219
|
}
|
|
1220
1220
|
return t.apply(this, arguments);
|
|
1221
1221
|
}
|
|
1222
1222
|
return n;
|
|
1223
1223
|
}
|
|
1224
|
-
var
|
|
1224
|
+
var pe = {}, Oe;
|
|
1225
1225
|
function $r(t) {
|
|
1226
|
-
if (Q(Oe) && (Oe =
|
|
1226
|
+
if (Q(Oe) && (Oe = ge.env.NODE_DEBUG || ""), t = t.toUpperCase(), !pe[t])
|
|
1227
1227
|
if (new RegExp("\\b" + t + "\\b", "i").test(Oe)) {
|
|
1228
1228
|
var e = 0;
|
|
1229
|
-
|
|
1229
|
+
pe[t] = function() {
|
|
1230
1230
|
var r = Pr.apply(null, arguments);
|
|
1231
1231
|
console.error("%s %d: %s", t, e, r);
|
|
1232
1232
|
};
|
|
1233
1233
|
} else
|
|
1234
|
-
|
|
1234
|
+
pe[t] = function() {
|
|
1235
1235
|
};
|
|
1236
|
-
return
|
|
1236
|
+
return pe[t];
|
|
1237
1237
|
}
|
|
1238
1238
|
function G(t, e) {
|
|
1239
1239
|
var r = {
|
|
1240
1240
|
seen: [],
|
|
1241
1241
|
stylize: qr
|
|
1242
1242
|
};
|
|
1243
|
-
return arguments.length >= 3 && (r.depth = arguments[2]), arguments.length >= 4 && (r.colors = arguments[3]),
|
|
1243
|
+
return arguments.length >= 3 && (r.depth = arguments[2]), arguments.length >= 4 && (r.colors = arguments[3]), Ft(e) ? r.showHidden = e : e && Hr(r, e), Q(r.showHidden) && (r.showHidden = !1), Q(r.depth) && (r.depth = 2), Q(r.colors) && (r.colors = !1), Q(r.customInspect) && (r.customInspect = !0), r.colors && (r.stylize = jr), ye(r, t, r.depth);
|
|
1244
1244
|
}
|
|
1245
1245
|
G.colors = {
|
|
1246
1246
|
bold: [1, 22],
|
|
@@ -1281,12 +1281,12 @@ function zr(t) {
|
|
|
1281
1281
|
e[r] = !0;
|
|
1282
1282
|
}), e;
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function ye(t, e, r) {
|
|
1285
1285
|
if (t.customInspect && e && De(e.inspect) && // Filter out the util module, it's inspect function is special
|
|
1286
1286
|
e.inspect !== G && // Also filter out any prototype objects using the circular check.
|
|
1287
1287
|
!(e.constructor && e.constructor.prototype === e)) {
|
|
1288
1288
|
var n = e.inspect(r, t);
|
|
1289
|
-
return
|
|
1289
|
+
return Je(n) || (n = ye(t, n, r)), n;
|
|
1290
1290
|
}
|
|
1291
1291
|
var i = Vr(t, e);
|
|
1292
1292
|
if (i)
|
|
@@ -1301,7 +1301,7 @@ function ve(t, e, r) {
|
|
|
1301
1301
|
}
|
|
1302
1302
|
if (Te(e))
|
|
1303
1303
|
return t.stylize(RegExp.prototype.toString.call(e), "regexp");
|
|
1304
|
-
if (
|
|
1304
|
+
if (Ke(e))
|
|
1305
1305
|
return t.stylize(Date.prototype.toString.call(e), "date");
|
|
1306
1306
|
if (Le(e))
|
|
1307
1307
|
return Ae(e);
|
|
@@ -1311,7 +1311,7 @@ function ve(t, e, r) {
|
|
|
1311
1311
|
var c = e.name ? ": " + e.name : "";
|
|
1312
1312
|
a = " [Function" + c + "]";
|
|
1313
1313
|
}
|
|
1314
|
-
if (Te(e) && (a = " " + RegExp.prototype.toString.call(e)),
|
|
1314
|
+
if (Te(e) && (a = " " + RegExp.prototype.toString.call(e)), Ke(e) && (a = " " + Date.prototype.toUTCString.call(e)), Le(e) && (a = " " + Ae(e)), o.length === 0 && (!u || e.length == 0))
|
|
1315
1315
|
return h[0] + a + h[1];
|
|
1316
1316
|
if (r < 0)
|
|
1317
1317
|
return Te(e) ? t.stylize(RegExp.prototype.toString.call(e), "regexp") : t.stylize("[Object]", "special");
|
|
@@ -1324,15 +1324,15 @@ function ve(t, e, r) {
|
|
|
1324
1324
|
function Vr(t, e) {
|
|
1325
1325
|
if (Q(e))
|
|
1326
1326
|
return t.stylize("undefined", "undefined");
|
|
1327
|
-
if (
|
|
1327
|
+
if (Je(e)) {
|
|
1328
1328
|
var r = "'" + JSON.stringify(e).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
1329
1329
|
return t.stylize(r, "string");
|
|
1330
1330
|
}
|
|
1331
1331
|
if (Qr(e))
|
|
1332
1332
|
return t.stylize("" + e, "number");
|
|
1333
|
-
if (
|
|
1333
|
+
if (Ft(e))
|
|
1334
1334
|
return t.stylize("" + e, "boolean");
|
|
1335
|
-
if (
|
|
1335
|
+
if (Ve(e))
|
|
1336
1336
|
return t.stylize("null", "null");
|
|
1337
1337
|
}
|
|
1338
1338
|
function Ae(t) {
|
|
@@ -1340,7 +1340,7 @@ function Ae(t) {
|
|
|
1340
1340
|
}
|
|
1341
1341
|
function Jr(t, e, r, n, i) {
|
|
1342
1342
|
for (var o = [], s = 0, f = e.length; s < f; ++s)
|
|
1343
|
-
|
|
1343
|
+
Mt(e, String(s)) ? o.push(Pe(
|
|
1344
1344
|
t,
|
|
1345
1345
|
e,
|
|
1346
1346
|
r,
|
|
@@ -1361,7 +1361,7 @@ function Jr(t, e, r, n, i) {
|
|
|
1361
1361
|
}
|
|
1362
1362
|
function Pe(t, e, r, n, i, o) {
|
|
1363
1363
|
var s, f, a;
|
|
1364
|
-
if (a = Object.getOwnPropertyDescriptor(e, i) || { value: e[i] }, a.get ? a.set ? f = t.stylize("[Getter/Setter]", "special") : f = t.stylize("[Getter]", "special") : a.set && (f = t.stylize("[Setter]", "special")),
|
|
1364
|
+
if (a = Object.getOwnPropertyDescriptor(e, i) || { value: e[i] }, a.get ? a.set ? f = t.stylize("[Getter/Setter]", "special") : f = t.stylize("[Getter]", "special") : a.set && (f = t.stylize("[Setter]", "special")), Mt(n, i) || (s = "[" + i + "]"), f || (t.seen.indexOf(a.value) < 0 ? (Ve(r) ? f = ye(t, a.value, null) : f = ye(t, a.value, r - 1), f.indexOf(`
|
|
1365
1365
|
`) > -1 && (o ? f = f.split(`
|
|
1366
1366
|
`).map(function(u) {
|
|
1367
1367
|
return " " + u;
|
|
@@ -1390,46 +1390,46 @@ function Yr(t, e, r) {
|
|
|
1390
1390
|
function Wr(t) {
|
|
1391
1391
|
return Array.isArray(t);
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1393
|
+
function Ft(t) {
|
|
1394
1394
|
return typeof t == "boolean";
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1396
|
+
function Ve(t) {
|
|
1397
1397
|
return t === null;
|
|
1398
1398
|
}
|
|
1399
1399
|
function Qr(t) {
|
|
1400
1400
|
return typeof t == "number";
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1402
|
+
function Je(t) {
|
|
1403
1403
|
return typeof t == "string";
|
|
1404
1404
|
}
|
|
1405
1405
|
function Q(t) {
|
|
1406
1406
|
return t === void 0;
|
|
1407
1407
|
}
|
|
1408
1408
|
function Te(t) {
|
|
1409
|
-
return
|
|
1409
|
+
return le(t) && Ye(t) === "[object RegExp]";
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function le(t) {
|
|
1412
1412
|
return typeof t == "object" && t !== null;
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1415
|
-
return
|
|
1414
|
+
function Ke(t) {
|
|
1415
|
+
return le(t) && Ye(t) === "[object Date]";
|
|
1416
1416
|
}
|
|
1417
1417
|
function Le(t) {
|
|
1418
|
-
return
|
|
1418
|
+
return le(t) && (Ye(t) === "[object Error]" || t instanceof Error);
|
|
1419
1419
|
}
|
|
1420
1420
|
function De(t) {
|
|
1421
1421
|
return typeof t == "function";
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1423
|
+
function Ye(t) {
|
|
1424
1424
|
return Object.prototype.toString.call(t);
|
|
1425
1425
|
}
|
|
1426
1426
|
function Hr(t, e) {
|
|
1427
|
-
if (!e || !
|
|
1427
|
+
if (!e || !le(e)) return t;
|
|
1428
1428
|
for (var r = Object.keys(e), n = r.length; n--; )
|
|
1429
1429
|
t[r[n]] = e[r[n]];
|
|
1430
1430
|
return t;
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function Mt(t, e) {
|
|
1433
1433
|
return Object.prototype.hasOwnProperty.call(t, e);
|
|
1434
1434
|
}
|
|
1435
1435
|
function te() {
|
|
@@ -1487,7 +1487,7 @@ function Zr(t) {
|
|
|
1487
1487
|
if (t && !Gr(t))
|
|
1488
1488
|
throw new Error("Unknown encoding: " + t);
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1490
|
+
function ue(t) {
|
|
1491
1491
|
switch (this.encoding = (t || "utf8").toLowerCase().replace(/[-_]/, ""), Zr(t), this.encoding) {
|
|
1492
1492
|
case "utf8":
|
|
1493
1493
|
this.surrogateSize = 3;
|
|
@@ -1505,7 +1505,7 @@ function ce(t) {
|
|
|
1505
1505
|
}
|
|
1506
1506
|
this.charBuffer = new l(6), this.charReceived = 0, this.charLength = 0;
|
|
1507
1507
|
}
|
|
1508
|
-
|
|
1508
|
+
ue.prototype.write = function(t) {
|
|
1509
1509
|
for (var e = ""; this.charLength; ) {
|
|
1510
1510
|
var r = t.length >= this.charLength - this.charReceived ? this.charLength - this.charReceived : t.length;
|
|
1511
1511
|
if (t.copy(this.charBuffer, this.charReceived, 0, r), this.charReceived += r, this.charReceived < this.charLength)
|
|
@@ -1530,7 +1530,7 @@ ce.prototype.write = function(t) {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
return e;
|
|
1532
1532
|
};
|
|
1533
|
-
|
|
1533
|
+
ue.prototype.detectIncompleteChar = function(t) {
|
|
1534
1534
|
for (var e = t.length >= 3 ? 3 : t.length; e > 0; e--) {
|
|
1535
1535
|
var r = t[t.length - e];
|
|
1536
1536
|
if (e == 1 && r >> 5 == 6) {
|
|
@@ -1548,7 +1548,7 @@ ce.prototype.detectIncompleteChar = function(t) {
|
|
|
1548
1548
|
}
|
|
1549
1549
|
this.charReceived = e;
|
|
1550
1550
|
};
|
|
1551
|
-
|
|
1551
|
+
ue.prototype.end = function(t) {
|
|
1552
1552
|
var e = "";
|
|
1553
1553
|
if (t && t.length && (e = this.write(t)), this.charReceived) {
|
|
1554
1554
|
var r = this.charReceived, n = this.charBuffer, i = this.encoding;
|
|
@@ -1565,8 +1565,8 @@ function Kr(t) {
|
|
|
1565
1565
|
function en(t) {
|
|
1566
1566
|
this.charReceived = t.length % 3, this.charLength = this.charReceived ? 3 : 0;
|
|
1567
1567
|
}
|
|
1568
|
-
C.ReadableState =
|
|
1569
|
-
var
|
|
1568
|
+
C.ReadableState = Bt;
|
|
1569
|
+
var E = $r("stream");
|
|
1570
1570
|
oe(C, g);
|
|
1571
1571
|
function tn(t, e, r) {
|
|
1572
1572
|
if (typeof t.prependListener == "function")
|
|
@@ -1576,14 +1576,14 @@ function tn(t, e, r) {
|
|
|
1576
1576
|
function rn(t, e) {
|
|
1577
1577
|
return t.listeners(e).length;
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function Bt(t, e) {
|
|
1580
1580
|
t = t || {}, this.objectMode = !!t.objectMode, e instanceof B && (this.objectMode = this.objectMode || !!t.readableObjectMode);
|
|
1581
1581
|
var r = t.highWaterMark, n = this.objectMode ? 16 : 16 * 1024;
|
|
1582
|
-
this.highWaterMark = r || r === 0 ? r : n, this.highWaterMark = ~~this.highWaterMark, this.buffer = new te(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.defaultEncoding = t.defaultEncoding || "utf8", this.ranOut = !1, this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, t.encoding && (this.decoder = new
|
|
1582
|
+
this.highWaterMark = r || r === 0 ? r : n, this.highWaterMark = ~~this.highWaterMark, this.buffer = new te(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.defaultEncoding = t.defaultEncoding || "utf8", this.ranOut = !1, this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, t.encoding && (this.decoder = new ue(t.encoding), this.encoding = t.encoding);
|
|
1583
1583
|
}
|
|
1584
1584
|
function C(t) {
|
|
1585
1585
|
if (!(this instanceof C)) return new C(t);
|
|
1586
|
-
this._readableState = new
|
|
1586
|
+
this._readableState = new Bt(t, this), this.readable = !0, t && typeof t.read == "function" && (this._read = t.read), g.call(this);
|
|
1587
1587
|
}
|
|
1588
1588
|
C.prototype.push = function(t, e) {
|
|
1589
1589
|
var r = this._readableState;
|
|
@@ -1611,7 +1611,7 @@ function kt(t, e, r, n, i) {
|
|
|
1611
1611
|
t.emit("error", f);
|
|
1612
1612
|
} else {
|
|
1613
1613
|
var a;
|
|
1614
|
-
e.decoder && !i && !n && (r = e.decoder.write(r), a = !e.objectMode && r.length === 0), i || (e.reading = !1), a || (e.flowing && e.length === 0 && !e.sync ? (t.emit("data", r), t.read(0)) : (e.length += e.objectMode ? 1 : r.length, i ? e.buffer.unshift(r) : e.buffer.push(r), e.needReadable &&
|
|
1614
|
+
e.decoder && !i && !n && (r = e.decoder.write(r), a = !e.objectMode && r.length === 0), i || (e.reading = !1), a || (e.flowing && e.length === 0 && !e.sync ? (t.emit("data", r), t.read(0)) : (e.length += e.objectMode ? 1 : r.length, i ? e.buffer.unshift(r) : e.buffer.push(r), e.needReadable && Se(t))), an(t, e);
|
|
1615
1615
|
}
|
|
1616
1616
|
else i || (e.reading = !1);
|
|
1617
1617
|
return nn(e);
|
|
@@ -1620,30 +1620,30 @@ function nn(t) {
|
|
|
1620
1620
|
return !t.ended && (t.needReadable || t.length < t.highWaterMark || t.length === 0);
|
|
1621
1621
|
}
|
|
1622
1622
|
C.prototype.setEncoding = function(t) {
|
|
1623
|
-
return this._readableState.decoder = new
|
|
1623
|
+
return this._readableState.decoder = new ue(t), this._readableState.encoding = t, this;
|
|
1624
1624
|
};
|
|
1625
|
-
var
|
|
1625
|
+
var et = 8388608;
|
|
1626
1626
|
function on(t) {
|
|
1627
|
-
return t >=
|
|
1627
|
+
return t >= et ? t = et : (t--, t |= t >>> 1, t |= t >>> 2, t |= t >>> 4, t |= t >>> 8, t |= t >>> 16, t++), t;
|
|
1628
1628
|
}
|
|
1629
|
-
function
|
|
1629
|
+
function tt(t, e) {
|
|
1630
1630
|
return t <= 0 || e.length === 0 && e.ended ? 0 : e.objectMode ? 1 : t !== t ? e.flowing && e.length ? e.buffer.head.data.length : e.length : (t > e.highWaterMark && (e.highWaterMark = on(t)), t <= e.length ? t : e.ended ? e.length : (e.needReadable = !0, 0));
|
|
1631
1631
|
}
|
|
1632
1632
|
C.prototype.read = function(t) {
|
|
1633
|
-
|
|
1633
|
+
E("read", t), t = parseInt(t, 10);
|
|
1634
1634
|
var e = this._readableState, r = t;
|
|
1635
1635
|
if (t !== 0 && (e.emittedReadable = !1), t === 0 && e.needReadable && (e.length >= e.highWaterMark || e.ended))
|
|
1636
|
-
return
|
|
1637
|
-
if (t =
|
|
1636
|
+
return E("read: emitReadable", e.length, e.ended), e.length === 0 && e.ended ? Ne(this) : Se(this), null;
|
|
1637
|
+
if (t = tt(t, e), t === 0 && e.ended)
|
|
1638
1638
|
return e.length === 0 && Ne(this), null;
|
|
1639
1639
|
var n = e.needReadable;
|
|
1640
|
-
|
|
1640
|
+
E("need readable", n), (e.length === 0 || e.length - t < e.highWaterMark) && (n = !0, E("length less than watermark", n)), e.ended || e.reading ? (n = !1, E("reading or ended", n)) : n && (E("do read"), e.reading = !0, e.sync = !0, e.length === 0 && (e.needReadable = !0), this._read(e.highWaterMark), e.sync = !1, e.reading || (t = tt(r, e)));
|
|
1641
1641
|
var i;
|
|
1642
|
-
return t > 0 ? i =
|
|
1642
|
+
return t > 0 ? i = Ut(t, e) : i = null, i === null ? (e.needReadable = !0, t = 0) : e.length -= t, e.length === 0 && (e.ended || (e.needReadable = !0), r !== t && e.ended && Ne(this)), i !== null && this.emit("data", i), i;
|
|
1643
1643
|
};
|
|
1644
1644
|
function sn(t, e) {
|
|
1645
1645
|
var r = null;
|
|
1646
|
-
return !
|
|
1646
|
+
return !D(e) && typeof e != "string" && e !== null && e !== void 0 && !t.objectMode && (r = new TypeError("Invalid non-string/buffer chunk")), r;
|
|
1647
1647
|
}
|
|
1648
1648
|
function fn(t, e) {
|
|
1649
1649
|
if (!e.ended) {
|
|
@@ -1651,21 +1651,21 @@ function fn(t, e) {
|
|
|
1651
1651
|
var r = e.decoder.end();
|
|
1652
1652
|
r && r.length && (e.buffer.push(r), e.length += e.objectMode ? 1 : r.length);
|
|
1653
1653
|
}
|
|
1654
|
-
e.ended = !0,
|
|
1654
|
+
e.ended = !0, Se(t);
|
|
1655
1655
|
}
|
|
1656
1656
|
}
|
|
1657
|
-
function
|
|
1657
|
+
function Se(t) {
|
|
1658
1658
|
var e = t._readableState;
|
|
1659
|
-
e.needReadable = !1, e.emittedReadable || (
|
|
1659
|
+
e.needReadable = !1, e.emittedReadable || (E("emitReadable", e.flowing), e.emittedReadable = !0, e.sync ? k(rt, t) : rt(t));
|
|
1660
1660
|
}
|
|
1661
|
-
function
|
|
1662
|
-
|
|
1661
|
+
function rt(t) {
|
|
1662
|
+
E("emit readable"), t.emit("readable"), We(t);
|
|
1663
1663
|
}
|
|
1664
1664
|
function an(t, e) {
|
|
1665
|
-
e.readingMore || (e.readingMore = !0,
|
|
1665
|
+
e.readingMore || (e.readingMore = !0, k(ln, t, e));
|
|
1666
1666
|
}
|
|
1667
1667
|
function ln(t, e) {
|
|
1668
|
-
for (var r = e.length; !e.reading && !e.flowing && !e.ended && e.length < e.highWaterMark && (
|
|
1668
|
+
for (var r = e.length; !e.reading && !e.flowing && !e.ended && e.length < e.highWaterMark && (E("maybeReadMore read 0"), t.read(0), r !== e.length); )
|
|
1669
1669
|
r = e.length;
|
|
1670
1670
|
e.readingMore = !1;
|
|
1671
1671
|
}
|
|
@@ -1685,49 +1685,49 @@ C.prototype.pipe = function(t, e) {
|
|
|
1685
1685
|
n.pipes.push(t);
|
|
1686
1686
|
break;
|
|
1687
1687
|
}
|
|
1688
|
-
n.pipesCount += 1,
|
|
1688
|
+
n.pipesCount += 1, E("pipe count=%d opts=%j", n.pipesCount, e);
|
|
1689
1689
|
var i = !e || e.end !== !1, o = i ? f : h;
|
|
1690
|
-
n.endEmitted ?
|
|
1691
|
-
function s(
|
|
1692
|
-
|
|
1690
|
+
n.endEmitted ? k(o) : r.once("end", o), t.on("unpipe", s);
|
|
1691
|
+
function s(I) {
|
|
1692
|
+
E("onunpipe"), I === r && h();
|
|
1693
1693
|
}
|
|
1694
1694
|
function f() {
|
|
1695
|
-
|
|
1695
|
+
E("onend"), t.end();
|
|
1696
1696
|
}
|
|
1697
1697
|
var a = un(r);
|
|
1698
1698
|
t.on("drain", a);
|
|
1699
1699
|
var u = !1;
|
|
1700
1700
|
function h() {
|
|
1701
|
-
|
|
1701
|
+
E("cleanup"), t.removeListener("close", x), t.removeListener("finish", y), t.removeListener("drain", a), t.removeListener("error", m), t.removeListener("unpipe", s), r.removeListener("end", f), r.removeListener("end", h), r.removeListener("data", p), u = !0, n.awaitDrain && (!t._writableState || t._writableState.needDrain) && a();
|
|
1702
1702
|
}
|
|
1703
1703
|
var c = !1;
|
|
1704
1704
|
r.on("data", p);
|
|
1705
|
-
function p(
|
|
1706
|
-
|
|
1707
|
-
var v = t.write(
|
|
1708
|
-
v === !1 && !c && ((n.pipesCount === 1 && n.pipes === t || n.pipesCount > 1 &&
|
|
1705
|
+
function p(I) {
|
|
1706
|
+
E("ondata"), c = !1;
|
|
1707
|
+
var v = t.write(I);
|
|
1708
|
+
v === !1 && !c && ((n.pipesCount === 1 && n.pipes === t || n.pipesCount > 1 && Pt(n.pipes, t) !== -1) && !u && (E("false write response, pause", r._readableState.awaitDrain), r._readableState.awaitDrain++, c = !0), r.pause());
|
|
1709
1709
|
}
|
|
1710
|
-
function m(
|
|
1711
|
-
|
|
1710
|
+
function m(I) {
|
|
1711
|
+
E("onerror", I), S(), t.removeListener("error", m), rn(t, "error") === 0 && t.emit("error", I);
|
|
1712
1712
|
}
|
|
1713
1713
|
tn(t, "error", m);
|
|
1714
|
-
function
|
|
1715
|
-
t.removeListener("finish", y),
|
|
1714
|
+
function x() {
|
|
1715
|
+
t.removeListener("finish", y), S();
|
|
1716
1716
|
}
|
|
1717
|
-
t.once("close",
|
|
1717
|
+
t.once("close", x);
|
|
1718
1718
|
function y() {
|
|
1719
|
-
|
|
1719
|
+
E("onfinish"), t.removeListener("close", x), S();
|
|
1720
1720
|
}
|
|
1721
1721
|
t.once("finish", y);
|
|
1722
|
-
function
|
|
1723
|
-
|
|
1722
|
+
function S() {
|
|
1723
|
+
E("unpipe"), r.unpipe(t);
|
|
1724
1724
|
}
|
|
1725
|
-
return t.emit("pipe", r), n.flowing || (
|
|
1725
|
+
return t.emit("pipe", r), n.flowing || (E("pipe resume"), r.resume()), t;
|
|
1726
1726
|
};
|
|
1727
1727
|
function un(t) {
|
|
1728
1728
|
return function() {
|
|
1729
1729
|
var e = t._readableState;
|
|
1730
|
-
|
|
1730
|
+
E("pipeOnDrain", e.awaitDrain), e.awaitDrain && e.awaitDrain--, e.awaitDrain === 0 && t.listeners("data").length && (e.flowing = !0, We(t));
|
|
1731
1731
|
};
|
|
1732
1732
|
}
|
|
1733
1733
|
C.prototype.unpipe = function(t) {
|
|
@@ -1742,7 +1742,7 @@ C.prototype.unpipe = function(t) {
|
|
|
1742
1742
|
r[i].emit("unpipe", this);
|
|
1743
1743
|
return this;
|
|
1744
1744
|
}
|
|
1745
|
-
var o =
|
|
1745
|
+
var o = Pt(e.pipes, t);
|
|
1746
1746
|
return o === -1 ? this : (e.pipes.splice(o, 1), e.pipesCount -= 1, e.pipesCount === 1 && (e.pipes = e.pipes[0]), t.emit("unpipe", this), this);
|
|
1747
1747
|
};
|
|
1748
1748
|
C.prototype.on = function(t, e) {
|
|
@@ -1751,42 +1751,42 @@ C.prototype.on = function(t, e) {
|
|
|
1751
1751
|
this._readableState.flowing !== !1 && this.resume();
|
|
1752
1752
|
else if (t === "readable") {
|
|
1753
1753
|
var n = this._readableState;
|
|
1754
|
-
!n.endEmitted && !n.readableListening && (n.readableListening = n.needReadable = !0, n.emittedReadable = !1, n.reading ? n.length &&
|
|
1754
|
+
!n.endEmitted && !n.readableListening && (n.readableListening = n.needReadable = !0, n.emittedReadable = !1, n.reading ? n.length && Se(this) : k(cn, this));
|
|
1755
1755
|
}
|
|
1756
1756
|
return r;
|
|
1757
1757
|
};
|
|
1758
1758
|
C.prototype.addListener = C.prototype.on;
|
|
1759
1759
|
function cn(t) {
|
|
1760
|
-
|
|
1760
|
+
E("readable nexttick read 0"), t.read(0);
|
|
1761
1761
|
}
|
|
1762
1762
|
C.prototype.resume = function() {
|
|
1763
1763
|
var t = this._readableState;
|
|
1764
|
-
return t.flowing || (
|
|
1764
|
+
return t.flowing || (E("resume"), t.flowing = !0, hn(this, t)), this;
|
|
1765
1765
|
};
|
|
1766
1766
|
function hn(t, e) {
|
|
1767
|
-
e.resumeScheduled || (e.resumeScheduled = !0,
|
|
1767
|
+
e.resumeScheduled || (e.resumeScheduled = !0, k(dn, t, e));
|
|
1768
1768
|
}
|
|
1769
1769
|
function dn(t, e) {
|
|
1770
|
-
e.reading || (
|
|
1770
|
+
e.reading || (E("resume read 0"), t.read(0)), e.resumeScheduled = !1, e.awaitDrain = 0, t.emit("resume"), We(t), e.flowing && !e.reading && t.read(0);
|
|
1771
1771
|
}
|
|
1772
1772
|
C.prototype.pause = function() {
|
|
1773
|
-
return
|
|
1773
|
+
return E("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (E("pause"), this._readableState.flowing = !1, this.emit("pause")), this;
|
|
1774
1774
|
};
|
|
1775
|
-
function
|
|
1775
|
+
function We(t) {
|
|
1776
1776
|
var e = t._readableState;
|
|
1777
|
-
for (
|
|
1777
|
+
for (E("flow", e.flowing); e.flowing && t.read() !== null; )
|
|
1778
1778
|
;
|
|
1779
1779
|
}
|
|
1780
1780
|
C.prototype.wrap = function(t) {
|
|
1781
1781
|
var e = this._readableState, r = !1, n = this;
|
|
1782
1782
|
t.on("end", function() {
|
|
1783
|
-
if (
|
|
1783
|
+
if (E("wrapped end"), e.decoder && !e.ended) {
|
|
1784
1784
|
var s = e.decoder.end();
|
|
1785
1785
|
s && s.length && n.push(s);
|
|
1786
1786
|
}
|
|
1787
1787
|
n.push(null);
|
|
1788
1788
|
}), t.on("data", function(s) {
|
|
1789
|
-
if (
|
|
1789
|
+
if (E("wrapped data"), e.decoder && (s = e.decoder.write(s)), !(e.objectMode && s == null) && !(!e.objectMode && (!s || !s.length))) {
|
|
1790
1790
|
var f = n.push(s);
|
|
1791
1791
|
f || (r = !0, t.pause());
|
|
1792
1792
|
}
|
|
@@ -1801,11 +1801,11 @@ C.prototype.wrap = function(t) {
|
|
|
1801
1801
|
return wn(o, function(s) {
|
|
1802
1802
|
t.on(s, n.emit.bind(n, s));
|
|
1803
1803
|
}), n._read = function(s) {
|
|
1804
|
-
|
|
1804
|
+
E("wrapped _read", s), r && (r = !1, t.resume());
|
|
1805
1805
|
}, n;
|
|
1806
1806
|
};
|
|
1807
|
-
C._fromList =
|
|
1808
|
-
function
|
|
1807
|
+
C._fromList = Ut;
|
|
1808
|
+
function Ut(t, e) {
|
|
1809
1809
|
if (e.length === 0) return null;
|
|
1810
1810
|
var r;
|
|
1811
1811
|
return e.objectMode ? r = e.buffer.shift() : !t || t >= e.length ? (e.decoder ? r = e.buffer.join("") : e.buffer.length === 1 ? r = e.buffer.head.data : r = e.buffer.concat(e.length), e.buffer.clear()) : r = pn(t, e.buffer, e.decoder), r;
|
|
@@ -1841,7 +1841,7 @@ function gn(t, e) {
|
|
|
1841
1841
|
function Ne(t) {
|
|
1842
1842
|
var e = t._readableState;
|
|
1843
1843
|
if (e.length > 0) throw new Error('"endReadable()" called on non-empty stream');
|
|
1844
|
-
e.endEmitted || (e.ended = !0,
|
|
1844
|
+
e.endEmitted || (e.ended = !0, k(_n, e, t));
|
|
1845
1845
|
}
|
|
1846
1846
|
function _n(t, e) {
|
|
1847
1847
|
!t.endEmitted && t.length === 0 && (t.endEmitted = !0, e.readable = !1, e.emit("end"));
|
|
@@ -1850,21 +1850,21 @@ function wn(t, e) {
|
|
|
1850
1850
|
for (var r = 0, n = t.length; r < n; r++)
|
|
1851
1851
|
e(t[r], r);
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function Pt(t, e) {
|
|
1854
1854
|
for (var r = 0, n = t.length; r < n; r++)
|
|
1855
1855
|
if (t[r] === e) return r;
|
|
1856
1856
|
return -1;
|
|
1857
1857
|
}
|
|
1858
|
-
|
|
1859
|
-
oe(
|
|
1858
|
+
L.WritableState = Qe;
|
|
1859
|
+
oe(L, g);
|
|
1860
1860
|
function yn() {
|
|
1861
1861
|
}
|
|
1862
1862
|
function vn(t, e, r) {
|
|
1863
1863
|
this.chunk = t, this.encoding = e, this.callback = r, this.next = null;
|
|
1864
1864
|
}
|
|
1865
|
-
function
|
|
1865
|
+
function Qe(t, e) {
|
|
1866
1866
|
Object.defineProperty(this, "buffer", {
|
|
1867
|
-
get:
|
|
1867
|
+
get: Nt(function() {
|
|
1868
1868
|
return this.getBuffer();
|
|
1869
1869
|
}, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")
|
|
1870
1870
|
}), t = t || {}, this.objectMode = !!t.objectMode, e instanceof B && (this.objectMode = this.objectMode || !!t.writableObjectMode);
|
|
@@ -1873,49 +1873,49 @@ function He(t, e) {
|
|
|
1873
1873
|
var i = t.decodeStrings === !1;
|
|
1874
1874
|
this.decodeStrings = !i, this.defaultEncoding = t.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(o) {
|
|
1875
1875
|
Cn(e, o);
|
|
1876
|
-
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.bufferedRequestCount = 0, this.corkedRequestsFree = new
|
|
1876
|
+
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.bufferedRequestCount = 0, this.corkedRequestsFree = new zt(this);
|
|
1877
1877
|
}
|
|
1878
|
-
|
|
1878
|
+
Qe.prototype.getBuffer = function() {
|
|
1879
1879
|
for (var e = this.bufferedRequest, r = []; e; )
|
|
1880
1880
|
r.push(e), e = e.next;
|
|
1881
1881
|
return r;
|
|
1882
1882
|
};
|
|
1883
|
-
function
|
|
1884
|
-
if (!(this instanceof
|
|
1885
|
-
this._writableState = new
|
|
1883
|
+
function L(t) {
|
|
1884
|
+
if (!(this instanceof L) && !(this instanceof B)) return new L(t);
|
|
1885
|
+
this._writableState = new Qe(t, this), this.writable = !0, t && (typeof t.write == "function" && (this._write = t.write), typeof t.writev == "function" && (this._writev = t.writev)), g.call(this);
|
|
1886
1886
|
}
|
|
1887
|
-
|
|
1887
|
+
L.prototype.pipe = function() {
|
|
1888
1888
|
this.emit("error", new Error("Cannot pipe, not readable"));
|
|
1889
1889
|
};
|
|
1890
1890
|
function bn(t, e) {
|
|
1891
1891
|
var r = new Error("write after end");
|
|
1892
|
-
t.emit("error", r),
|
|
1892
|
+
t.emit("error", r), k(e, r);
|
|
1893
1893
|
}
|
|
1894
|
-
function
|
|
1894
|
+
function En(t, e, r, n) {
|
|
1895
1895
|
var i = !0, o = !1;
|
|
1896
|
-
return r === null ? o = new TypeError("May not write null values to stream") : !l.isBuffer(r) && typeof r != "string" && r !== void 0 && !e.objectMode && (o = new TypeError("Invalid non-string/buffer chunk")), o && (t.emit("error", o),
|
|
1896
|
+
return r === null ? o = new TypeError("May not write null values to stream") : !l.isBuffer(r) && typeof r != "string" && r !== void 0 && !e.objectMode && (o = new TypeError("Invalid non-string/buffer chunk")), o && (t.emit("error", o), k(n, o), i = !1), i;
|
|
1897
1897
|
}
|
|
1898
|
-
|
|
1898
|
+
L.prototype.write = function(t, e, r) {
|
|
1899
1899
|
var n = this._writableState, i = !1;
|
|
1900
|
-
return typeof e == "function" && (r = e, e = null), l.isBuffer(t) ? e = "buffer" : e || (e = n.defaultEncoding), typeof r != "function" && (r = yn), n.ended ? bn(this, r) :
|
|
1900
|
+
return typeof e == "function" && (r = e, e = null), l.isBuffer(t) ? e = "buffer" : e || (e = n.defaultEncoding), typeof r != "function" && (r = yn), n.ended ? bn(this, r) : En(this, n, t, r) && (n.pendingcb++, i = Sn(this, n, t, e, r)), i;
|
|
1901
1901
|
};
|
|
1902
|
-
|
|
1902
|
+
L.prototype.cork = function() {
|
|
1903
1903
|
var t = this._writableState;
|
|
1904
1904
|
t.corked++;
|
|
1905
1905
|
};
|
|
1906
|
-
|
|
1906
|
+
L.prototype.uncork = function() {
|
|
1907
1907
|
var t = this._writableState;
|
|
1908
|
-
t.corked && (t.corked--, !t.writing && !t.corked && !t.finished && !t.bufferProcessing && t.bufferedRequest &&
|
|
1908
|
+
t.corked && (t.corked--, !t.writing && !t.corked && !t.finished && !t.bufferProcessing && t.bufferedRequest && $t(this, t));
|
|
1909
1909
|
};
|
|
1910
|
-
|
|
1910
|
+
L.prototype.setDefaultEncoding = function(e) {
|
|
1911
1911
|
if (typeof e == "string" && (e = e.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((e + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + e);
|
|
1912
1912
|
return this._writableState.defaultEncoding = e, this;
|
|
1913
1913
|
};
|
|
1914
|
-
function
|
|
1914
|
+
function xn(t, e, r) {
|
|
1915
1915
|
return !t.objectMode && t.decodeStrings !== !1 && typeof e == "string" && (e = l.from(e, r)), e;
|
|
1916
1916
|
}
|
|
1917
1917
|
function Sn(t, e, r, n, i) {
|
|
1918
|
-
r =
|
|
1918
|
+
r = xn(e, r, n), l.isBuffer(r) && (n = "buffer");
|
|
1919
1919
|
var o = e.objectMode ? 1 : r.length;
|
|
1920
1920
|
e.length += o;
|
|
1921
1921
|
var s = e.length < e.highWaterMark;
|
|
@@ -1930,7 +1930,7 @@ function $e(t, e, r, n, i, o, s) {
|
|
|
1930
1930
|
e.writelen = n, e.writecb = s, e.writing = !0, e.sync = !0, r ? t._writev(i, e.onwrite) : t._write(i, o, e.onwrite), e.sync = !1;
|
|
1931
1931
|
}
|
|
1932
1932
|
function Rn(t, e, r, n, i) {
|
|
1933
|
-
--e.pendingcb, r ?
|
|
1933
|
+
--e.pendingcb, r ? k(i, n) : i(n), t._writableState.errorEmitted = !0, t.emit("error", n);
|
|
1934
1934
|
}
|
|
1935
1935
|
function In(t) {
|
|
1936
1936
|
t.writing = !1, t.writecb = null, t.length -= t.writelen, t.writelen = 0;
|
|
@@ -1939,17 +1939,17 @@ function Cn(t, e) {
|
|
|
1939
1939
|
var r = t._writableState, n = r.sync, i = r.writecb;
|
|
1940
1940
|
if (In(r), e) Rn(t, r, n, e, i);
|
|
1941
1941
|
else {
|
|
1942
|
-
var o =
|
|
1943
|
-
!o && !r.corked && !r.bufferProcessing && r.bufferedRequest &&
|
|
1942
|
+
var o = jt(r);
|
|
1943
|
+
!o && !r.corked && !r.bufferProcessing && r.bufferedRequest && $t(t, r), n ? k(nt, t, r, o, i) : nt(t, r, o, i);
|
|
1944
1944
|
}
|
|
1945
1945
|
}
|
|
1946
|
-
function
|
|
1947
|
-
r || On(t, e), e.pendingcb--, n(),
|
|
1946
|
+
function nt(t, e, r, n) {
|
|
1947
|
+
r || On(t, e), e.pendingcb--, n(), qt(t, e);
|
|
1948
1948
|
}
|
|
1949
1949
|
function On(t, e) {
|
|
1950
1950
|
e.length === 0 && e.needDrain && (e.needDrain = !1, t.emit("drain"));
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1952
|
+
function $t(t, e) {
|
|
1953
1953
|
e.bufferProcessing = !0;
|
|
1954
1954
|
var r = e.bufferedRequest;
|
|
1955
1955
|
if (t._writev && r && r.next) {
|
|
@@ -1957,7 +1957,7 @@ function jt(t, e) {
|
|
|
1957
1957
|
o.entry = r;
|
|
1958
1958
|
for (var s = 0; r; )
|
|
1959
1959
|
i[s] = r, r = r.next, s += 1;
|
|
1960
|
-
$e(t, e, !0, e.length, i, "", o.finish), e.pendingcb++, e.lastBufferedRequest = null, o.next ? (e.corkedRequestsFree = o.next, o.next = null) : e.corkedRequestsFree = new
|
|
1960
|
+
$e(t, e, !0, e.length, i, "", o.finish), e.pendingcb++, e.lastBufferedRequest = null, o.next ? (e.corkedRequestsFree = o.next, o.next = null) : e.corkedRequestsFree = new zt(e);
|
|
1961
1961
|
} else {
|
|
1962
1962
|
for (; r; ) {
|
|
1963
1963
|
var f = r.chunk, a = r.encoding, u = r.callback, h = e.objectMode ? 1 : f.length;
|
|
@@ -1968,28 +1968,28 @@ function jt(t, e) {
|
|
|
1968
1968
|
}
|
|
1969
1969
|
e.bufferedRequestCount = 0, e.bufferedRequest = r, e.bufferProcessing = !1;
|
|
1970
1970
|
}
|
|
1971
|
-
|
|
1971
|
+
L.prototype._write = function(t, e, r) {
|
|
1972
1972
|
r(new Error("not implemented"));
|
|
1973
1973
|
};
|
|
1974
|
-
|
|
1975
|
-
|
|
1974
|
+
L.prototype._writev = null;
|
|
1975
|
+
L.prototype.end = function(t, e, r) {
|
|
1976
1976
|
var n = this._writableState;
|
|
1977
1977
|
typeof t == "function" ? (r = t, t = null, e = null) : typeof e == "function" && (r = e, e = null), t != null && this.write(t, e), n.corked && (n.corked = 1, this.uncork()), !n.ending && !n.finished && An(this, n, r);
|
|
1978
1978
|
};
|
|
1979
|
-
function
|
|
1979
|
+
function jt(t) {
|
|
1980
1980
|
return t.ending && t.length === 0 && t.bufferedRequest === null && !t.finished && !t.writing;
|
|
1981
1981
|
}
|
|
1982
|
-
function
|
|
1982
|
+
function it(t, e) {
|
|
1983
1983
|
e.prefinished || (e.prefinished = !0, t.emit("prefinish"));
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1986
|
-
var r =
|
|
1987
|
-
return r && (e.pendingcb === 0 ? (
|
|
1985
|
+
function qt(t, e) {
|
|
1986
|
+
var r = jt(e);
|
|
1987
|
+
return r && (e.pendingcb === 0 ? (it(t, e), e.finished = !0, t.emit("finish")) : it(t, e)), r;
|
|
1988
1988
|
}
|
|
1989
1989
|
function An(t, e, r) {
|
|
1990
|
-
e.ending = !0,
|
|
1990
|
+
e.ending = !0, qt(t, e), r && (e.finished ? k(r) : t.once("finish", r)), e.ended = !0, t.writable = !1;
|
|
1991
1991
|
}
|
|
1992
|
-
function
|
|
1992
|
+
function zt(t) {
|
|
1993
1993
|
var e = this;
|
|
1994
1994
|
this.next = null, this.entry = null, this.finish = function(r) {
|
|
1995
1995
|
var n = e.entry;
|
|
@@ -2001,22 +2001,22 @@ function Vt(t) {
|
|
|
2001
2001
|
};
|
|
2002
2002
|
}
|
|
2003
2003
|
oe(B, C);
|
|
2004
|
-
var
|
|
2005
|
-
for (var Fe = 0; Fe <
|
|
2006
|
-
var Me =
|
|
2007
|
-
B.prototype[Me] || (B.prototype[Me] =
|
|
2004
|
+
var ot = Object.keys(L.prototype);
|
|
2005
|
+
for (var Fe = 0; Fe < ot.length; Fe++) {
|
|
2006
|
+
var Me = ot[Fe];
|
|
2007
|
+
B.prototype[Me] || (B.prototype[Me] = L.prototype[Me]);
|
|
2008
2008
|
}
|
|
2009
2009
|
function B(t) {
|
|
2010
2010
|
if (!(this instanceof B)) return new B(t);
|
|
2011
|
-
C.call(this, t),
|
|
2011
|
+
C.call(this, t), L.call(this, t), t && t.readable === !1 && (this.readable = !1), t && t.writable === !1 && (this.writable = !1), this.allowHalfOpen = !0, t && t.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", Tn);
|
|
2012
2012
|
}
|
|
2013
2013
|
function Tn() {
|
|
2014
|
-
this.allowHalfOpen || this._writableState.ended ||
|
|
2014
|
+
this.allowHalfOpen || this._writableState.ended || k(Ln, this);
|
|
2015
2015
|
}
|
|
2016
2016
|
function Ln(t) {
|
|
2017
2017
|
t.end();
|
|
2018
2018
|
}
|
|
2019
|
-
oe(
|
|
2019
|
+
oe(U, B);
|
|
2020
2020
|
function Dn(t) {
|
|
2021
2021
|
this.afterTransform = function(e, r) {
|
|
2022
2022
|
return Nn(t, e, r);
|
|
@@ -2031,54 +2031,54 @@ function Nn(t, e, r) {
|
|
|
2031
2031
|
var o = t._readableState;
|
|
2032
2032
|
o.reading = !1, (o.needReadable || o.length < o.highWaterMark) && t._read(o.highWaterMark);
|
|
2033
2033
|
}
|
|
2034
|
-
function
|
|
2035
|
-
if (!(this instanceof
|
|
2034
|
+
function U(t) {
|
|
2035
|
+
if (!(this instanceof U)) return new U(t);
|
|
2036
2036
|
B.call(this, t), this._transformState = new Dn(this);
|
|
2037
2037
|
var e = this;
|
|
2038
2038
|
this._readableState.needReadable = !0, this._readableState.sync = !1, t && (typeof t.transform == "function" && (this._transform = t.transform), typeof t.flush == "function" && (this._flush = t.flush)), this.once("prefinish", function() {
|
|
2039
2039
|
typeof this._flush == "function" ? this._flush(function(r) {
|
|
2040
|
-
|
|
2041
|
-
}) :
|
|
2040
|
+
st(e, r);
|
|
2041
|
+
}) : st(e);
|
|
2042
2042
|
});
|
|
2043
2043
|
}
|
|
2044
|
-
|
|
2044
|
+
U.prototype.push = function(t, e) {
|
|
2045
2045
|
return this._transformState.needTransform = !1, B.prototype.push.call(this, t, e);
|
|
2046
2046
|
};
|
|
2047
|
-
|
|
2047
|
+
U.prototype._transform = function(t, e, r) {
|
|
2048
2048
|
throw new Error("Not implemented");
|
|
2049
2049
|
};
|
|
2050
|
-
|
|
2050
|
+
U.prototype._write = function(t, e, r) {
|
|
2051
2051
|
var n = this._transformState;
|
|
2052
2052
|
if (n.writecb = r, n.writechunk = t, n.writeencoding = e, !n.transforming) {
|
|
2053
2053
|
var i = this._readableState;
|
|
2054
2054
|
(n.needTransform || i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark);
|
|
2055
2055
|
}
|
|
2056
2056
|
};
|
|
2057
|
-
|
|
2057
|
+
U.prototype._read = function(t) {
|
|
2058
2058
|
var e = this._transformState;
|
|
2059
2059
|
e.writechunk !== null && e.writecb && !e.transforming ? (e.transforming = !0, this._transform(e.writechunk, e.writeencoding, e.afterTransform)) : e.needTransform = !0;
|
|
2060
2060
|
};
|
|
2061
|
-
function
|
|
2061
|
+
function st(t, e) {
|
|
2062
2062
|
if (e) return t.emit("error", e);
|
|
2063
2063
|
var r = t._writableState, n = t._transformState;
|
|
2064
2064
|
if (r.length) throw new Error("Calling transform done when ws.length != 0");
|
|
2065
2065
|
if (n.transforming) throw new Error("Calling transform done when still transforming");
|
|
2066
2066
|
return t.push(null);
|
|
2067
2067
|
}
|
|
2068
|
-
oe(
|
|
2069
|
-
function
|
|
2070
|
-
if (!(this instanceof
|
|
2071
|
-
|
|
2068
|
+
oe(fe, U);
|
|
2069
|
+
function fe(t) {
|
|
2070
|
+
if (!(this instanceof fe)) return new fe(t);
|
|
2071
|
+
U.call(this, t);
|
|
2072
2072
|
}
|
|
2073
|
-
|
|
2073
|
+
fe.prototype._transform = function(t, e, r) {
|
|
2074
2074
|
r(null, t);
|
|
2075
2075
|
};
|
|
2076
2076
|
oe(V, g);
|
|
2077
2077
|
V.Readable = C;
|
|
2078
|
-
V.Writable =
|
|
2078
|
+
V.Writable = L;
|
|
2079
2079
|
V.Duplex = B;
|
|
2080
|
-
V.Transform =
|
|
2081
|
-
V.PassThrough =
|
|
2080
|
+
V.Transform = U;
|
|
2081
|
+
V.PassThrough = fe;
|
|
2082
2082
|
V.Stream = V;
|
|
2083
2083
|
function V() {
|
|
2084
2084
|
g.call(this);
|
|
@@ -2110,7 +2110,7 @@ V.prototype.pipe = function(t, e) {
|
|
|
2110
2110
|
}
|
|
2111
2111
|
return r.on("end", u), r.on("close", u), t.on("close", u), t.emit("pipe", r), t;
|
|
2112
2112
|
};
|
|
2113
|
-
const
|
|
2113
|
+
const Vt = function(t) {
|
|
2114
2114
|
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
2115
2115
|
};
|
|
2116
2116
|
class w extends Error {
|
|
@@ -2119,11 +2119,11 @@ class w extends Error {
|
|
|
2119
2119
|
for (const o of i)
|
|
2120
2120
|
for (const s in o) {
|
|
2121
2121
|
const f = o[s];
|
|
2122
|
-
this[s] =
|
|
2122
|
+
this[s] = D(f) ? f.toString(n.encoding) : f == null ? f : JSON.parse(JSON.stringify(f));
|
|
2123
2123
|
}
|
|
2124
2124
|
}
|
|
2125
2125
|
}
|
|
2126
|
-
const
|
|
2126
|
+
const Jt = function(t) {
|
|
2127
2127
|
const e = [];
|
|
2128
2128
|
for (let r = 0, n = t.length; r < n; r++) {
|
|
2129
2129
|
const i = t[r];
|
|
@@ -2131,7 +2131,7 @@ const Yt = function(t) {
|
|
|
2131
2131
|
e[r] = { disabled: !0 };
|
|
2132
2132
|
else if (typeof i == "string")
|
|
2133
2133
|
e[r] = { name: i };
|
|
2134
|
-
else if (
|
|
2134
|
+
else if (Vt(i)) {
|
|
2135
2135
|
if (typeof i.name != "string")
|
|
2136
2136
|
throw new w("CSV_OPTION_COLUMNS_MISSING_NAME", [
|
|
2137
2137
|
"Option columns missing name:",
|
|
@@ -2148,12 +2148,12 @@ const Yt = function(t) {
|
|
|
2148
2148
|
}
|
|
2149
2149
|
return e;
|
|
2150
2150
|
};
|
|
2151
|
-
class
|
|
2151
|
+
class ft {
|
|
2152
2152
|
constructor(e = 100) {
|
|
2153
2153
|
this.size = e, this.length = 0, this.buf = l.allocUnsafe(e);
|
|
2154
2154
|
}
|
|
2155
2155
|
prepend(e) {
|
|
2156
|
-
if (
|
|
2156
|
+
if (D(e)) {
|
|
2157
2157
|
const r = this.length + e.length;
|
|
2158
2158
|
if (r >= this.size && (this.resize(), r >= this.size))
|
|
2159
2159
|
throw Error("INVALID_BUFFER_STATE");
|
|
@@ -2189,7 +2189,7 @@ class at {
|
|
|
2189
2189
|
this.length = 0;
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
|
-
const Fn = 12, Mn = 13, Bn = 10,
|
|
2192
|
+
const Fn = 12, Mn = 13, Bn = 10, kn = 32, Un = 9, Pn = function(t) {
|
|
2193
2193
|
return {
|
|
2194
2194
|
bomSkipped: !1,
|
|
2195
2195
|
bufBytesStart: 0,
|
|
@@ -2199,10 +2199,10 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2199
2199
|
error: void 0,
|
|
2200
2200
|
enabled: t.from_line === 1,
|
|
2201
2201
|
escaping: !1,
|
|
2202
|
-
escapeIsQuote:
|
|
2202
|
+
escapeIsQuote: D(t.escape) && D(t.quote) && l.compare(t.escape, t.quote) === 0,
|
|
2203
2203
|
// columns can be `false`, `true`, `Array`
|
|
2204
2204
|
expectedRecordLength: Array.isArray(t.columns) ? t.columns.length : void 0,
|
|
2205
|
-
field: new
|
|
2205
|
+
field: new ft(20),
|
|
2206
2206
|
firstLineToHeaders: t.cast_first_line_to_header,
|
|
2207
2207
|
needMoreDataSize: Math.max(
|
|
2208
2208
|
// Skip if the remaining buffer smaller than comment
|
|
@@ -2214,7 +2214,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2214
2214
|
previousBuf: void 0,
|
|
2215
2215
|
quoting: !1,
|
|
2216
2216
|
stop: !1,
|
|
2217
|
-
rawBuffer: new
|
|
2217
|
+
rawBuffer: new ft(100),
|
|
2218
2218
|
record: [],
|
|
2219
2219
|
recordHasError: !1,
|
|
2220
2220
|
record_length: 0,
|
|
@@ -2229,15 +2229,15 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2229
2229
|
l.from(l.from([Mn], "utf8").toString(), t.encoding),
|
|
2230
2230
|
l.from(l.from([Bn], "utf8").toString(), t.encoding),
|
|
2231
2231
|
l.from(l.from([Fn], "utf8").toString(), t.encoding),
|
|
2232
|
-
l.from(l.from([
|
|
2233
|
-
l.from(l.from([
|
|
2232
|
+
l.from(l.from([kn], "utf8").toString(), t.encoding),
|
|
2233
|
+
l.from(l.from([Un], "utf8").toString(), t.encoding)
|
|
2234
2234
|
]
|
|
2235
2235
|
};
|
|
2236
2236
|
}, $n = function(t) {
|
|
2237
2237
|
return t.replace(/([A-Z])/g, function(e, r) {
|
|
2238
2238
|
return "_" + r.toLowerCase();
|
|
2239
2239
|
});
|
|
2240
|
-
},
|
|
2240
|
+
}, at = function(t) {
|
|
2241
2241
|
const e = {};
|
|
2242
2242
|
for (const n in t)
|
|
2243
2243
|
e[$n(n)] = t[n];
|
|
@@ -2303,7 +2303,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2303
2303
|
else if (typeof e.columns == "function")
|
|
2304
2304
|
e.cast_first_line_to_header = e.columns, e.columns = !0;
|
|
2305
2305
|
else if (Array.isArray(e.columns))
|
|
2306
|
-
e.columns =
|
|
2306
|
+
e.columns = Jt(e.columns);
|
|
2307
2307
|
else if (e.columns === void 0 || e.columns === null || e.columns === !1)
|
|
2308
2308
|
e.columns = !1;
|
|
2309
2309
|
else
|
|
@@ -2341,7 +2341,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2341
2341
|
}
|
|
2342
2342
|
if (e.comment === void 0 || e.comment === null || e.comment === !1 || e.comment === "")
|
|
2343
2343
|
e.comment = null;
|
|
2344
|
-
else if (typeof e.comment == "string" && (e.comment = l.from(e.comment, e.encoding)), !
|
|
2344
|
+
else if (typeof e.comment == "string" && (e.comment = l.from(e.comment, e.encoding)), !D(e.comment))
|
|
2345
2345
|
throw new w(
|
|
2346
2346
|
"CSV_INVALID_OPTION_COMMENT",
|
|
2347
2347
|
[
|
|
@@ -2377,7 +2377,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2377
2377
|
if (e.delimiter = e.delimiter.map(function(n) {
|
|
2378
2378
|
if (n == null || n === !1)
|
|
2379
2379
|
return l.from(",", e.encoding);
|
|
2380
|
-
if (typeof n == "string" && (n = l.from(n, e.encoding)), !
|
|
2380
|
+
if (typeof n == "string" && (n = l.from(n, e.encoding)), !D(n) || n.length === 0)
|
|
2381
2381
|
throw new w(
|
|
2382
2382
|
"CSV_INVALID_OPTION_DELIMITER",
|
|
2383
2383
|
[
|
|
@@ -2388,7 +2388,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2388
2388
|
e
|
|
2389
2389
|
);
|
|
2390
2390
|
return n;
|
|
2391
|
-
}), e.escape === void 0 || e.escape === !0 ? e.escape = l.from('"', e.encoding) : typeof e.escape == "string" ? e.escape = l.from(e.escape, e.encoding) : (e.escape === null || e.escape === !1) && (e.escape = null), e.escape !== null && !
|
|
2391
|
+
}), e.escape === void 0 || e.escape === !0 ? e.escape = l.from('"', e.encoding) : typeof e.escape == "string" ? e.escape = l.from(e.escape, e.encoding) : (e.escape === null || e.escape === !1) && (e.escape = null), e.escape !== null && !D(e.escape))
|
|
2392
2392
|
throw new Error(
|
|
2393
2393
|
`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`
|
|
2394
2394
|
);
|
|
@@ -2453,7 +2453,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2453
2453
|
);
|
|
2454
2454
|
if (e.objname === void 0 || e.objname === null || e.objname === !1)
|
|
2455
2455
|
e.objname = void 0;
|
|
2456
|
-
else if (
|
|
2456
|
+
else if (D(e.objname)) {
|
|
2457
2457
|
if (e.objname.length === 0)
|
|
2458
2458
|
throw new Error("Invalid Option: objname must be a non empty buffer");
|
|
2459
2459
|
e.encoding === null || (e.objname = e.objname.toString(e.encoding));
|
|
@@ -2492,7 +2492,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2492
2492
|
);
|
|
2493
2493
|
if (e.quote === null || e.quote === !1 || e.quote === "")
|
|
2494
2494
|
e.quote = null;
|
|
2495
|
-
else if (e.quote === void 0 || e.quote === !0 ? e.quote = l.from('"', e.encoding) : typeof e.quote == "string" && (e.quote = l.from(e.quote, e.encoding)), !
|
|
2495
|
+
else if (e.quote === void 0 || e.quote === !0 ? e.quote = l.from('"', e.encoding) : typeof e.quote == "string" && (e.quote = l.from(e.quote, e.encoding)), !D(e.quote))
|
|
2496
2496
|
throw new Error(
|
|
2497
2497
|
`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`
|
|
2498
2498
|
);
|
|
@@ -2504,7 +2504,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2504
2504
|
);
|
|
2505
2505
|
if (e.record_delimiter === void 0)
|
|
2506
2506
|
e.record_delimiter = [];
|
|
2507
|
-
else if (typeof e.record_delimiter == "string" ||
|
|
2507
|
+
else if (typeof e.record_delimiter == "string" || D(e.record_delimiter)) {
|
|
2508
2508
|
if (e.record_delimiter.length === 0)
|
|
2509
2509
|
throw new w(
|
|
2510
2510
|
"CSV_INVALID_OPTION_RECORD_DELIMITER",
|
|
@@ -2527,7 +2527,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2527
2527
|
e
|
|
2528
2528
|
);
|
|
2529
2529
|
if (e.record_delimiter = e.record_delimiter.map(function(n, i) {
|
|
2530
|
-
if (typeof n != "string" && !
|
|
2530
|
+
if (typeof n != "string" && !D(n))
|
|
2531
2531
|
throw new w(
|
|
2532
2532
|
"CSV_INVALID_OPTION_RECORD_DELIMITER",
|
|
2533
2533
|
[
|
|
@@ -2635,7 +2635,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2635
2635
|
`Invalid Option: to_line must be an integer, got ${JSON.stringify(t.to_line)}`
|
|
2636
2636
|
);
|
|
2637
2637
|
return e;
|
|
2638
|
-
},
|
|
2638
|
+
}, lt = function(t) {
|
|
2639
2639
|
return t.every(
|
|
2640
2640
|
(e) => e == null || e.toString && e.toString().trim() === ""
|
|
2641
2641
|
);
|
|
@@ -2657,7 +2657,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2657
2657
|
invalid_field_length: 0,
|
|
2658
2658
|
lines: 1,
|
|
2659
2659
|
records: 0
|
|
2660
|
-
}, r =
|
|
2660
|
+
}, r = at(t);
|
|
2661
2661
|
return {
|
|
2662
2662
|
info: e,
|
|
2663
2663
|
original_options: t,
|
|
@@ -2692,22 +2692,22 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2692
2692
|
ltrim: c,
|
|
2693
2693
|
max_record_size: p,
|
|
2694
2694
|
raw: m,
|
|
2695
|
-
relax_quotes:
|
|
2695
|
+
relax_quotes: x,
|
|
2696
2696
|
rtrim: y,
|
|
2697
|
-
skip_empty_lines:
|
|
2698
|
-
to:
|
|
2697
|
+
skip_empty_lines: S,
|
|
2698
|
+
to: I,
|
|
2699
2699
|
to_line: v
|
|
2700
2700
|
} = this.options;
|
|
2701
|
-
let { comment: _, escape:
|
|
2702
|
-
const { bomSkipped: Qt, previousBuf:
|
|
2701
|
+
let { comment: _, escape: R, quote: F, record_delimiter: Re } = this.options;
|
|
2702
|
+
const { bomSkipped: Qt, previousBuf: ce, rawBuffer: Ht, escapeIsQuote: Gt } = this.state;
|
|
2703
2703
|
let b;
|
|
2704
|
-
if (
|
|
2704
|
+
if (ce === void 0)
|
|
2705
2705
|
if (n === void 0) {
|
|
2706
2706
|
s();
|
|
2707
2707
|
return;
|
|
2708
2708
|
} else
|
|
2709
2709
|
b = n;
|
|
2710
|
-
else
|
|
2710
|
+
else ce !== void 0 && n === void 0 ? b = ce : b = l.concat([ce, n]);
|
|
2711
2711
|
if (Qt === !1)
|
|
2712
2712
|
if (f === !1)
|
|
2713
2713
|
this.state.bomSkipped = !0;
|
|
@@ -2721,13 +2721,13 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2721
2721
|
if (re[O].compare(b, 0, re[O].length) === 0) {
|
|
2722
2722
|
const J = re[O].length;
|
|
2723
2723
|
this.state.bufBytesStart += J, b = b.slice(J);
|
|
2724
|
-
const
|
|
2724
|
+
const he = at({
|
|
2725
2725
|
...this.original_options,
|
|
2726
2726
|
encoding: O
|
|
2727
2727
|
});
|
|
2728
|
-
for (const A in
|
|
2729
|
-
this.options[A] =
|
|
2730
|
-
({ comment: _, escape:
|
|
2728
|
+
for (const A in he)
|
|
2729
|
+
this.options[A] = he[A];
|
|
2730
|
+
({ comment: _, escape: R, quote: F } = this.options);
|
|
2731
2731
|
break;
|
|
2732
2732
|
}
|
|
2733
2733
|
this.state.bomSkipped = !0;
|
|
@@ -2739,38 +2739,38 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2739
2739
|
this.state.stop = !0, s();
|
|
2740
2740
|
return;
|
|
2741
2741
|
}
|
|
2742
|
-
this.state.quoting === !1 &&
|
|
2742
|
+
this.state.quoting === !1 && Re.length === 0 && this.__autoDiscoverRecordDelimiter(
|
|
2743
2743
|
b,
|
|
2744
2744
|
d
|
|
2745
|
-
) && (
|
|
2745
|
+
) && (Re = this.options.record_delimiter);
|
|
2746
2746
|
const O = b[d];
|
|
2747
2747
|
if (m === !0 && Ht.append(O), (O === jn || O === qn) && this.state.wasRowDelimiter === !1 && (this.state.wasRowDelimiter = !0), this.state.escaping === !0)
|
|
2748
2748
|
this.state.escaping = !1;
|
|
2749
2749
|
else {
|
|
2750
|
-
if (
|
|
2750
|
+
if (R !== null && this.state.quoting === !0 && this.__isEscape(b, d, O) && d + R.length < Ie)
|
|
2751
2751
|
if (Gt) {
|
|
2752
|
-
if (this.__isQuote(b, d +
|
|
2753
|
-
this.state.escaping = !0, d +=
|
|
2752
|
+
if (this.__isQuote(b, d + R.length)) {
|
|
2753
|
+
this.state.escaping = !0, d += R.length - 1;
|
|
2754
2754
|
continue;
|
|
2755
2755
|
}
|
|
2756
2756
|
} else {
|
|
2757
|
-
this.state.escaping = !0, d +=
|
|
2757
|
+
this.state.escaping = !0, d += R.length - 1;
|
|
2758
2758
|
continue;
|
|
2759
2759
|
}
|
|
2760
2760
|
if (this.state.commenting === !1 && this.__isQuote(b, d))
|
|
2761
2761
|
if (this.state.quoting === !0) {
|
|
2762
|
-
const A = b[d +
|
|
2762
|
+
const A = b[d + F.length], Z = y && this.__isCharTrimable(b, d + F.length), j = _ !== null && this.__compareBytes(_, b, d + F.length, A), X = this.__isDelimiter(
|
|
2763
2763
|
b,
|
|
2764
|
-
d +
|
|
2764
|
+
d + F.length,
|
|
2765
2765
|
A
|
|
2766
|
-
),
|
|
2767
|
-
if (
|
|
2768
|
-
d +=
|
|
2769
|
-
else if (!A || X ||
|
|
2770
|
-
this.state.quoting = !1, this.state.wasQuoting = !0, d +=
|
|
2766
|
+
), de = Re.length === 0 ? this.__autoDiscoverRecordDelimiter(b, d + F.length) : this.__isRecordDelimiter(A, b, d + F.length);
|
|
2767
|
+
if (R !== null && this.__isEscape(b, d, O) && this.__isQuote(b, d + R.length))
|
|
2768
|
+
d += R.length - 1;
|
|
2769
|
+
else if (!A || X || de || j || Z) {
|
|
2770
|
+
this.state.quoting = !1, this.state.wasQuoting = !0, d += F.length - 1;
|
|
2771
2771
|
continue;
|
|
2772
|
-
} else if (
|
|
2773
|
-
const
|
|
2772
|
+
} else if (x === !1) {
|
|
2773
|
+
const He = this.__error(
|
|
2774
2774
|
new w(
|
|
2775
2775
|
"CSV_INVALID_CLOSING_QUOTE",
|
|
2776
2776
|
[
|
|
@@ -2784,11 +2784,11 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2784
2784
|
this.__infoField()
|
|
2785
2785
|
)
|
|
2786
2786
|
);
|
|
2787
|
-
if (
|
|
2787
|
+
if (He !== void 0) return He;
|
|
2788
2788
|
} else
|
|
2789
|
-
this.state.quoting = !1, this.state.wasQuoting = !0, this.state.field.prepend(
|
|
2789
|
+
this.state.quoting = !1, this.state.wasQuoting = !0, this.state.field.prepend(F), d += F.length - 1;
|
|
2790
2790
|
} else if (this.state.field.length !== 0) {
|
|
2791
|
-
if (
|
|
2791
|
+
if (x === !1) {
|
|
2792
2792
|
const A = this.__infoField(), Z = Object.keys(re).map(
|
|
2793
2793
|
(X) => re[X].equals(this.state.field.toString()) ? X : !1
|
|
2794
2794
|
).filter(Boolean)[0], j = this.__error(
|
|
@@ -2809,7 +2809,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2809
2809
|
if (j !== void 0) return j;
|
|
2810
2810
|
}
|
|
2811
2811
|
} else {
|
|
2812
|
-
this.state.quoting = !0, d +=
|
|
2812
|
+
this.state.quoting = !0, d += F.length - 1;
|
|
2813
2813
|
continue;
|
|
2814
2814
|
}
|
|
2815
2815
|
if (this.state.quoting === !1) {
|
|
@@ -2826,7 +2826,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2826
2826
|
this.state.enabled = !0, this.__resetField(), this.__resetRecord(), d += A - 1;
|
|
2827
2827
|
continue;
|
|
2828
2828
|
}
|
|
2829
|
-
if (
|
|
2829
|
+
if (S === !0 && this.state.wasQuoting === !1 && this.state.record.length === 0 && this.state.field.length === 0) {
|
|
2830
2830
|
this.info.empty_lines++, d += A - 1;
|
|
2831
2831
|
continue;
|
|
2832
2832
|
}
|
|
@@ -2834,9 +2834,9 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2834
2834
|
const X = this.__onField();
|
|
2835
2835
|
if (X !== void 0) return X;
|
|
2836
2836
|
this.info.bytes = this.state.bufBytesStart + d + A;
|
|
2837
|
-
const
|
|
2838
|
-
if (
|
|
2839
|
-
if (
|
|
2837
|
+
const de = this.__onRecord(o);
|
|
2838
|
+
if (de !== void 0) return de;
|
|
2839
|
+
if (I !== -1 && this.info.records >= I) {
|
|
2840
2840
|
this.state.stop = !0, s();
|
|
2841
2841
|
return;
|
|
2842
2842
|
}
|
|
@@ -2874,8 +2874,8 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2874
2874
|
this.__infoField()
|
|
2875
2875
|
)
|
|
2876
2876
|
);
|
|
2877
|
-
const J = c === !1 || this.state.quoting === !0 || this.state.field.length !== 0 || !this.__isCharTrimable(b, d),
|
|
2878
|
-
if (J === !0 &&
|
|
2877
|
+
const J = c === !1 || this.state.quoting === !0 || this.state.field.length !== 0 || !this.__isCharTrimable(b, d), he = y === !1 || this.state.wasQuoting === !1;
|
|
2878
|
+
if (J === !0 && he === !0)
|
|
2879
2879
|
this.state.field.append(O);
|
|
2880
2880
|
else {
|
|
2881
2881
|
if (y === !0 && !this.__isCharTrimable(b, d))
|
|
@@ -2932,24 +2932,24 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2932
2932
|
relax_column_count_more: c,
|
|
2933
2933
|
raw: p,
|
|
2934
2934
|
skip_records_with_empty_values: m
|
|
2935
|
-
} = this.options, { enabled:
|
|
2936
|
-
if (
|
|
2935
|
+
} = this.options, { enabled: x, record: y } = this.state;
|
|
2936
|
+
if (x === !1)
|
|
2937
2937
|
return this.__resetRecord();
|
|
2938
|
-
const
|
|
2938
|
+
const S = y.length;
|
|
2939
2939
|
if (i === !0) {
|
|
2940
|
-
if (m === !0 &&
|
|
2940
|
+
if (m === !0 && lt(y)) {
|
|
2941
2941
|
this.__resetRecord();
|
|
2942
2942
|
return;
|
|
2943
2943
|
}
|
|
2944
2944
|
return this.__firstLineToColumns(y);
|
|
2945
2945
|
}
|
|
2946
|
-
if (i === !1 && this.info.records === 0 && (this.state.expectedRecordLength =
|
|
2947
|
-
const
|
|
2946
|
+
if (i === !1 && this.info.records === 0 && (this.state.expectedRecordLength = S), S !== this.state.expectedRecordLength) {
|
|
2947
|
+
const I = i === !1 ? new w(
|
|
2948
2948
|
"CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",
|
|
2949
2949
|
[
|
|
2950
2950
|
"Invalid Record Length:",
|
|
2951
2951
|
`expect ${this.state.expectedRecordLength},`,
|
|
2952
|
-
`got ${
|
|
2952
|
+
`got ${S} on line ${this.info.lines}`
|
|
2953
2953
|
],
|
|
2954
2954
|
this.options,
|
|
2955
2955
|
this.__infoField(),
|
|
@@ -2962,7 +2962,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2962
2962
|
"Invalid Record Length:",
|
|
2963
2963
|
`columns length is ${i.length},`,
|
|
2964
2964
|
// rename columns
|
|
2965
|
-
`got ${
|
|
2965
|
+
`got ${S} on line ${this.info.lines}`
|
|
2966
2966
|
],
|
|
2967
2967
|
this.options,
|
|
2968
2968
|
this.__infoField(),
|
|
@@ -2970,14 +2970,14 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2970
2970
|
record: y
|
|
2971
2971
|
}
|
|
2972
2972
|
);
|
|
2973
|
-
if (u === !0 || h === !0 &&
|
|
2974
|
-
this.info.invalid_field_length++, this.state.error =
|
|
2973
|
+
if (u === !0 || h === !0 && S < this.state.expectedRecordLength || c === !0 && S > this.state.expectedRecordLength)
|
|
2974
|
+
this.info.invalid_field_length++, this.state.error = I;
|
|
2975
2975
|
else {
|
|
2976
|
-
const v = this.__error(
|
|
2976
|
+
const v = this.__error(I);
|
|
2977
2977
|
if (v) return v;
|
|
2978
2978
|
}
|
|
2979
2979
|
}
|
|
2980
|
-
if (m === !0 &&
|
|
2980
|
+
if (m === !0 && lt(y)) {
|
|
2981
2981
|
this.__resetRecord();
|
|
2982
2982
|
return;
|
|
2983
2983
|
}
|
|
@@ -2986,25 +2986,25 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
2986
2986
|
return;
|
|
2987
2987
|
}
|
|
2988
2988
|
if (this.info.records++, a === 1 || this.info.records >= a) {
|
|
2989
|
-
const { objname:
|
|
2989
|
+
const { objname: I } = this.options;
|
|
2990
2990
|
if (i !== !1) {
|
|
2991
2991
|
const v = {};
|
|
2992
|
-
for (let _ = 0,
|
|
2992
|
+
for (let _ = 0, R = y.length; _ < R; _++)
|
|
2993
2993
|
i[_] === void 0 || i[_].disabled || (o === !0 && v[i[_].name] !== void 0 ? Array.isArray(v[i[_].name]) ? v[i[_].name] = v[i[_].name].concat(y[_]) : v[i[_].name] = [v[i[_].name], y[_]] : v[i[_].name] = y[_]);
|
|
2994
2994
|
if (p === !0 || f === !0) {
|
|
2995
2995
|
const _ = Object.assign(
|
|
2996
2996
|
{ record: v },
|
|
2997
2997
|
p === !0 ? { raw: this.state.rawBuffer.toString(s) } : {},
|
|
2998
2998
|
f === !0 ? { info: this.__infoRecord() } : {}
|
|
2999
|
-
),
|
|
3000
|
-
|
|
2999
|
+
), R = this.__push(
|
|
3000
|
+
I === void 0 ? _ : [v[I], _],
|
|
3001
3001
|
n
|
|
3002
3002
|
);
|
|
3003
|
-
if (
|
|
3004
|
-
return
|
|
3003
|
+
if (R)
|
|
3004
|
+
return R;
|
|
3005
3005
|
} else {
|
|
3006
3006
|
const _ = this.__push(
|
|
3007
|
-
|
|
3007
|
+
I === void 0 ? v : [v[I], v],
|
|
3008
3008
|
n
|
|
3009
3009
|
);
|
|
3010
3010
|
if (_)
|
|
@@ -3016,14 +3016,14 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
3016
3016
|
p === !0 ? { raw: this.state.rawBuffer.toString(s) } : {},
|
|
3017
3017
|
f === !0 ? { info: this.__infoRecord() } : {}
|
|
3018
3018
|
), _ = this.__push(
|
|
3019
|
-
|
|
3019
|
+
I === void 0 ? v : [y[I], v],
|
|
3020
3020
|
n
|
|
3021
3021
|
);
|
|
3022
3022
|
if (_)
|
|
3023
3023
|
return _;
|
|
3024
3024
|
} else {
|
|
3025
3025
|
const v = this.__push(
|
|
3026
|
-
|
|
3026
|
+
I === void 0 ? y : [y[I], y],
|
|
3027
3027
|
n
|
|
3028
3028
|
);
|
|
3029
3029
|
if (v)
|
|
@@ -3052,7 +3052,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
3052
3052
|
}
|
|
3053
3053
|
)
|
|
3054
3054
|
);
|
|
3055
|
-
const s =
|
|
3055
|
+
const s = Jt(o);
|
|
3056
3056
|
this.state.expectedRecordLength = s.length, this.options.columns = s, this.__resetRecord();
|
|
3057
3057
|
return;
|
|
3058
3058
|
} catch (o) {
|
|
@@ -3250,7 +3250,7 @@ const Fn = 12, Mn = 13, Bn = 10, Un = 32, kn = 9, Pn = function(t) {
|
|
|
3250
3250
|
}
|
|
3251
3251
|
};
|
|
3252
3252
|
};
|
|
3253
|
-
class Vn extends
|
|
3253
|
+
class Vn extends U {
|
|
3254
3254
|
constructor(e = {}) {
|
|
3255
3255
|
super({ readableObjectMode: !0, ...e, encoding: null }), this.api = zn({
|
|
3256
3256
|
on_skip: (r, n) => {
|
|
@@ -3292,13 +3292,13 @@ class Vn extends k {
|
|
|
3292
3292
|
e(r);
|
|
3293
3293
|
}
|
|
3294
3294
|
}
|
|
3295
|
-
const
|
|
3295
|
+
const Yt = function() {
|
|
3296
3296
|
let t, e, r;
|
|
3297
3297
|
for (const i in arguments) {
|
|
3298
3298
|
const o = arguments[i], s = typeof o;
|
|
3299
|
-
if (t === void 0 && (typeof o == "string" ||
|
|
3299
|
+
if (t === void 0 && (typeof o == "string" || D(o)))
|
|
3300
3300
|
t = o;
|
|
3301
|
-
else if (e === void 0 &&
|
|
3301
|
+
else if (e === void 0 && Vt(o))
|
|
3302
3302
|
e = o;
|
|
3303
3303
|
else if (r === void 0 && s === "function")
|
|
3304
3304
|
r = o;
|
|
@@ -3367,7 +3367,7 @@ function Hn(t) {
|
|
|
3367
3367
|
if (typeof t == "string") return new Error(t);
|
|
3368
3368
|
if (typeof t == "number" || typeof t == "boolean" || typeof t == "bigint") return new Error(String(t));
|
|
3369
3369
|
if (typeof t == "symbol") return new Error(t.description ?? "Unknown error");
|
|
3370
|
-
if (
|
|
3370
|
+
if (typeof t == "object")
|
|
3371
3371
|
try {
|
|
3372
3372
|
return new Error(JSON.stringify(t));
|
|
3373
3373
|
} catch {
|
|
@@ -3379,7 +3379,7 @@ function Gn(t) {
|
|
|
3379
3379
|
if (!(t == null || t === ""))
|
|
3380
3380
|
return t.length > 2048 ? `${t.slice(0, 2048)}... [truncated]` : t;
|
|
3381
3381
|
}
|
|
3382
|
-
const
|
|
3382
|
+
const Wt = {
|
|
3383
3383
|
bom: !1,
|
|
3384
3384
|
cast: void 0,
|
|
3385
3385
|
cast_date: !1,
|
|
@@ -3425,51 +3425,50 @@ class ni {
|
|
|
3425
3425
|
const m = () => {
|
|
3426
3426
|
if (p) return;
|
|
3427
3427
|
p = !0;
|
|
3428
|
-
const
|
|
3429
|
-
a = void 0, h = void 0,
|
|
3428
|
+
const S = a;
|
|
3429
|
+
a = void 0, h = void 0, S != null && (Be(() => S.removeAllListeners()), Be(() => S.end())), Be(() => {
|
|
3430
3430
|
u?.cancel();
|
|
3431
3431
|
}), u = void 0;
|
|
3432
3432
|
};
|
|
3433
3433
|
i.signal.addEventListener("abort", m, { once: !0 });
|
|
3434
|
-
const
|
|
3435
|
-
c || (c = !0, m(), i.signal.aborted || i.abort(
|
|
3434
|
+
const x = (S) => {
|
|
3435
|
+
c || (c = !0, m(), i.signal.aborted || i.abort(S), f(S));
|
|
3436
3436
|
};
|
|
3437
3437
|
(async () => {
|
|
3438
|
-
|
|
3439
|
-
...
|
|
3438
|
+
a = Yt({
|
|
3439
|
+
...Wt,
|
|
3440
3440
|
...r,
|
|
3441
|
-
cast: (
|
|
3442
|
-
}
|
|
3443
|
-
console.log("xxxx", je), console.log("xxxx", r), console.log("xxxx", R), a = Wt(R), h = Kn({ chunk: o, chunkSize: e.chunkSize ?? Zn }), a.on("readable", () => {
|
|
3441
|
+
cast: (R, F) => ({ value: R, wasValueQuoted: F.quoting })
|
|
3442
|
+
}), h = Kn({ chunk: o, chunkSize: e.chunkSize ?? Zn }), a.on("readable", () => {
|
|
3444
3443
|
try {
|
|
3445
3444
|
if (a == null || h == null) return;
|
|
3446
|
-
let
|
|
3447
|
-
for (; (
|
|
3445
|
+
let R;
|
|
3446
|
+
for (; (R = a.read()) != null; ) {
|
|
3448
3447
|
if (c) return;
|
|
3449
|
-
i.signal.throwIfAborted(), h.push(
|
|
3448
|
+
i.signal.throwIfAborted(), h.push(R);
|
|
3450
3449
|
}
|
|
3451
|
-
} catch (
|
|
3452
|
-
|
|
3450
|
+
} catch (R) {
|
|
3451
|
+
x(R);
|
|
3453
3452
|
}
|
|
3454
|
-
}), a.on("error", (
|
|
3453
|
+
}), a.on("error", (R) => x(R)), a.on("end", () => {
|
|
3455
3454
|
c || (h?.flush(), s(ei(a)));
|
|
3456
3455
|
});
|
|
3457
3456
|
const S = await fetch(encodeURI(n), { signal: i.signal });
|
|
3458
3457
|
if (!S.ok || S.body == null)
|
|
3459
3458
|
throw await Qn(S, `Failed to fetch '${n}' file.`, "datapos-connector-file-store-emulator|Connector|retrieve");
|
|
3460
3459
|
u = S.body.getReader();
|
|
3461
|
-
const
|
|
3462
|
-
let
|
|
3463
|
-
for (; !
|
|
3460
|
+
const I = new TextDecoder(e.encodingId);
|
|
3461
|
+
let v = await u.read();
|
|
3462
|
+
for (; !v.done; ) {
|
|
3464
3463
|
if (c) return;
|
|
3465
3464
|
i.signal.throwIfAborted();
|
|
3466
|
-
const
|
|
3467
|
-
|
|
3465
|
+
const R = I.decode(v.value, { stream: !0 });
|
|
3466
|
+
R.length > 0 && a.write(R), v = await u.read();
|
|
3468
3467
|
}
|
|
3469
3468
|
if (c) return;
|
|
3470
|
-
const
|
|
3471
|
-
|
|
3472
|
-
})().catch((
|
|
3469
|
+
const _ = I.decode();
|
|
3470
|
+
_.length > 0 && a.write(_), a.end();
|
|
3471
|
+
})().catch((S) => x(S));
|
|
3473
3472
|
});
|
|
3474
3473
|
}
|
|
3475
3474
|
/**
|
|
@@ -3521,8 +3520,8 @@ async function ri(t, e) {
|
|
|
3521
3520
|
for (const s of e)
|
|
3522
3521
|
try {
|
|
3523
3522
|
let f = 0, a, u = 0, h = 0;
|
|
3524
|
-
const c =
|
|
3525
|
-
...
|
|
3523
|
+
const c = Yt({
|
|
3524
|
+
...Wt,
|
|
3526
3525
|
cast: (p, m) => ({ value: p, wasValueQuoted: m.quoting }),
|
|
3527
3526
|
delimiter: s,
|
|
3528
3527
|
relax_column_count: !0
|
|
@@ -3531,15 +3530,15 @@ async function ri(t, e) {
|
|
|
3531
3530
|
try {
|
|
3532
3531
|
const m = [];
|
|
3533
3532
|
c.on("readable", () => {
|
|
3534
|
-
let
|
|
3535
|
-
for (; (
|
|
3533
|
+
let x;
|
|
3534
|
+
for (; (x = c.read()) != null; ) {
|
|
3536
3535
|
u++;
|
|
3537
|
-
const y =
|
|
3538
|
-
a != null && (h += Math.abs(y - a)), a = y, f += y, m.push(
|
|
3536
|
+
const y = x.length;
|
|
3537
|
+
a != null && (h += Math.abs(y - a)), a = y, f += y, m.push(x);
|
|
3539
3538
|
}
|
|
3540
3539
|
}), c.on("error", () => p()), c.on("end", () => {
|
|
3541
|
-
const
|
|
3542
|
-
(!i || h <= i) && (!n ||
|
|
3540
|
+
const x = f / u;
|
|
3541
|
+
(!i || h <= i) && (!n || x > n) && (r = s, n = x, i = h, o = [...m]), p();
|
|
3543
3542
|
}), c.write(t), c.end();
|
|
3544
3543
|
} catch {
|
|
3545
3544
|
p();
|