brsh 3.10.5 → 3.10.7
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/CHANGELOG.md +14 -0
- package/POSIX-CHECKLIST.md +16 -15
- package/dist/shell.es.js +943 -652
- package/dist/shell.es.js.map +1 -1
- package/dist/shell.min.js +15 -6
- package/dist/shell.min.js.map +1 -1
- package/index.js +118 -39
- package/lib/builtins/index.js +2 -0
- package/lib/builtins/readInput.js +37 -0
- package/lib/builtins/sed.js +361 -0
- package/lib/builtins/tail.js +76 -0
- package/lib/local/read.js +63 -16
- package/package.json +1 -1
- package/test/builtins.test.js +217 -0
- package/test/local-commands.test.js +86 -0
- package/test/scripts.test.js +97 -0
- package/test/shell.test.js +159 -0
- package/test/wbt.test.js +22 -0
package/dist/shell.es.js
CHANGED
|
@@ -96,7 +96,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
96
96
|
if (typeof e == "string") return g(e, t);
|
|
97
97
|
if (o.isView(e)) return y(e);
|
|
98
98
|
if (e == null) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
99
|
-
if (
|
|
99
|
+
if (Z(e, o) || e && Z(e.buffer, o) || s !== void 0 && (Z(e, s) || e && Z(e.buffer, s))) return b(e, t, n);
|
|
100
100
|
if (typeof e == "number") throw TypeError("The \"value\" argument must not be of type number. Received type number");
|
|
101
101
|
let r = e.valueOf && e.valueOf();
|
|
102
102
|
if (r != null && r !== e) return u.from(r, t, n);
|
|
@@ -137,7 +137,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
137
137
|
return n;
|
|
138
138
|
}
|
|
139
139
|
function y(e) {
|
|
140
|
-
if (
|
|
140
|
+
if (Z(e, a)) {
|
|
141
141
|
let t = new a(e);
|
|
142
142
|
return b(t.buffer, t.byteOffset, t.byteLength);
|
|
143
143
|
}
|
|
@@ -154,7 +154,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
154
154
|
let t = S(e.length) | 0, n = l(t);
|
|
155
155
|
return n.length === 0 || e.copy(n, 0, 0, t), n;
|
|
156
156
|
}
|
|
157
|
-
if (e.length !== void 0) return typeof e.length != "number" ||
|
|
157
|
+
if (e.length !== void 0) return typeof e.length != "number" || fe(e.length) ? l(0) : _(e);
|
|
158
158
|
if (e.type === "Buffer" && Array.isArray(e.data)) return _(e.data);
|
|
159
159
|
}
|
|
160
160
|
function S(e) {
|
|
@@ -167,7 +167,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
167
167
|
u.isBuffer = function(e) {
|
|
168
168
|
return e != null && e._isBuffer === !0 && e !== u.prototype;
|
|
169
169
|
}, u.compare = function(e, t) {
|
|
170
|
-
if (
|
|
170
|
+
if (Z(e, a) && (e = u.from(e, e.offset, e.byteLength)), Z(t, a) && (t = u.from(t, t.offset, t.byteLength)), !u.isBuffer(e) || !u.isBuffer(t)) throw TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");
|
|
171
171
|
if (e === t) return 0;
|
|
172
172
|
let n = e.length, r = t.length;
|
|
173
173
|
for (let i = 0, a = Math.min(n, r); i < a; ++i) if (e[i] !== t[i]) {
|
|
@@ -198,7 +198,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
198
198
|
let r = u.allocUnsafe(t), i = 0;
|
|
199
199
|
for (n = 0; n < e.length; ++n) {
|
|
200
200
|
let t = e[n];
|
|
201
|
-
if (
|
|
201
|
+
if (Z(t, a)) i + t.length > r.length ? (u.isBuffer(t) || (t = u.from(t)), t.copy(r, i)) : a.prototype.set.call(r, t, i);
|
|
202
202
|
else if (u.isBuffer(t)) t.copy(r, i);
|
|
203
203
|
else throw TypeError("\"list\" argument must be an Array of Buffers");
|
|
204
204
|
i += t.length;
|
|
@@ -207,7 +207,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
207
207
|
};
|
|
208
208
|
function w(e, t) {
|
|
209
209
|
if (u.isBuffer(e)) return e.length;
|
|
210
|
-
if (o.isView(e) ||
|
|
210
|
+
if (o.isView(e) || Z(e, o)) return e.byteLength;
|
|
211
211
|
if (typeof e != "string") throw TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type " + typeof e);
|
|
212
212
|
let n = e.length, r = arguments.length > 2 && arguments[2] === !0;
|
|
213
213
|
if (!r && n === 0) return 0;
|
|
@@ -217,15 +217,15 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
217
217
|
case "latin1":
|
|
218
218
|
case "binary": return n;
|
|
219
219
|
case "utf8":
|
|
220
|
-
case "utf-8": return
|
|
220
|
+
case "utf-8": return se(e).length;
|
|
221
221
|
case "ucs2":
|
|
222
222
|
case "ucs-2":
|
|
223
223
|
case "utf16le":
|
|
224
224
|
case "utf-16le": return n * 2;
|
|
225
225
|
case "hex": return n >>> 1;
|
|
226
|
-
case "base64": return
|
|
226
|
+
case "base64": return ue(e).length;
|
|
227
227
|
default:
|
|
228
|
-
if (i) return r ? -1 :
|
|
228
|
+
if (i) return r ? -1 : se(e).length;
|
|
229
229
|
t = ("" + t).toLowerCase(), i = !0;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
@@ -280,7 +280,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
280
280
|
let t = "", n = e.INSPECT_MAX_BYTES;
|
|
281
281
|
return t = this.toString("hex", 0, n).replace(/(.{2})/g, "$1 ").trim(), this.length > n && (t += " ... "), "<Buffer " + t + ">";
|
|
282
282
|
}, r && (u.prototype[r] = u.prototype.inspect), u.prototype.compare = function(e, t, n, r, i) {
|
|
283
|
-
if (
|
|
283
|
+
if (Z(e, a) && (e = u.from(e, e.offset, e.byteLength)), !u.isBuffer(e)) throw TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof e);
|
|
284
284
|
if (t === void 0 && (t = 0), n === void 0 && (n = e ? e.length : 0), r === void 0 && (r = 0), i === void 0 && (i = this.length), t < 0 || n > e.length || r < 0 || i > this.length) throw RangeError("out of range index");
|
|
285
285
|
if (r >= i && t >= n) return 0;
|
|
286
286
|
if (r >= i) return -1;
|
|
@@ -295,7 +295,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
295
295
|
};
|
|
296
296
|
function D(e, t, n, r, i) {
|
|
297
297
|
if (e.length === 0) return -1;
|
|
298
|
-
if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n,
|
|
298
|
+
if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, fe(n) && (n = i ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
|
|
299
299
|
if (i) return -1;
|
|
300
300
|
n = e.length - 1;
|
|
301
301
|
} else if (n < 0) if (i) n = 0;
|
|
@@ -345,22 +345,22 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
345
345
|
let o;
|
|
346
346
|
for (o = 0; o < r; ++o) {
|
|
347
347
|
let r = parseInt(t.substr(o * 2, 2), 16);
|
|
348
|
-
if (
|
|
348
|
+
if (fe(r)) return o;
|
|
349
349
|
e[n + o] = r;
|
|
350
350
|
}
|
|
351
351
|
return o;
|
|
352
352
|
}
|
|
353
353
|
function A(e, t, n, r) {
|
|
354
|
-
return
|
|
354
|
+
return de(se(t, e.length - n), e, n, r);
|
|
355
355
|
}
|
|
356
356
|
function j(e, t, n, r) {
|
|
357
|
-
return
|
|
357
|
+
return de(ce(t), e, n, r);
|
|
358
358
|
}
|
|
359
359
|
function M(e, t, n, r) {
|
|
360
|
-
return
|
|
360
|
+
return de(ue(t), e, n, r);
|
|
361
361
|
}
|
|
362
362
|
function N(e, t, n, r) {
|
|
363
|
-
return
|
|
363
|
+
return de(le(t, e.length - n), e, n, r);
|
|
364
364
|
}
|
|
365
365
|
u.prototype.write = function(e, t, n, r) {
|
|
366
366
|
if (t === void 0) r = "utf8", n = this.length, t = 0;
|
|
@@ -444,7 +444,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
444
444
|
let r = e.length;
|
|
445
445
|
(!t || t < 0) && (t = 0), (!n || n < 0 || n > r) && (n = r);
|
|
446
446
|
let i = "";
|
|
447
|
-
for (let r = t; r < n; ++r) i +=
|
|
447
|
+
for (let r = t; r < n; ++r) i += pe[e[r]];
|
|
448
448
|
return i;
|
|
449
449
|
}
|
|
450
450
|
function R(e, t, n) {
|
|
@@ -482,16 +482,16 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
482
482
|
return e >>>= 0, t || z(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
|
|
483
483
|
}, u.prototype.readUint32BE = u.prototype.readUInt32BE = function(e, t) {
|
|
484
484
|
return e >>>= 0, t || z(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
|
|
485
|
-
}, u.prototype.readBigUInt64LE =
|
|
486
|
-
e >>>= 0,
|
|
485
|
+
}, u.prototype.readBigUInt64LE = me(function(e) {
|
|
486
|
+
e >>>= 0, Y(e, "offset");
|
|
487
487
|
let t = this[e], n = this[e + 7];
|
|
488
|
-
(t === void 0 || n === void 0) &&
|
|
488
|
+
(t === void 0 || n === void 0) && X(e, this.length - 8);
|
|
489
489
|
let r = t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, i = this[++e] + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + n * 2 ** 24;
|
|
490
490
|
return BigInt(r) + (BigInt(i) << BigInt(32));
|
|
491
|
-
}), u.prototype.readBigUInt64BE =
|
|
492
|
-
e >>>= 0,
|
|
491
|
+
}), u.prototype.readBigUInt64BE = me(function(e) {
|
|
492
|
+
e >>>= 0, Y(e, "offset");
|
|
493
493
|
let t = this[e], n = this[e + 7];
|
|
494
|
-
(t === void 0 || n === void 0) &&
|
|
494
|
+
(t === void 0 || n === void 0) && X(e, this.length - 8);
|
|
495
495
|
let r = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e], i = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + n;
|
|
496
496
|
return (BigInt(r) << BigInt(32)) + BigInt(i);
|
|
497
497
|
}), u.prototype.readIntLE = function(e, t, n) {
|
|
@@ -518,16 +518,16 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
518
518
|
return e >>>= 0, t || z(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
|
|
519
519
|
}, u.prototype.readInt32BE = function(e, t) {
|
|
520
520
|
return e >>>= 0, t || z(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
|
|
521
|
-
}, u.prototype.readBigInt64LE =
|
|
522
|
-
e >>>= 0,
|
|
521
|
+
}, u.prototype.readBigInt64LE = me(function(e) {
|
|
522
|
+
e >>>= 0, Y(e, "offset");
|
|
523
523
|
let t = this[e], n = this[e + 7];
|
|
524
|
-
(t === void 0 || n === void 0) &&
|
|
524
|
+
(t === void 0 || n === void 0) && X(e, this.length - 8);
|
|
525
525
|
let r = this[e + 4] + this[e + 5] * 2 ** 8 + this[e + 6] * 2 ** 16 + (n << 24);
|
|
526
526
|
return (BigInt(r) << BigInt(32)) + BigInt(t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24);
|
|
527
|
-
}), u.prototype.readBigInt64BE =
|
|
528
|
-
e >>>= 0,
|
|
527
|
+
}), u.prototype.readBigInt64BE = me(function(e) {
|
|
528
|
+
e >>>= 0, Y(e, "offset");
|
|
529
529
|
let t = this[e], n = this[e + 7];
|
|
530
|
-
(t === void 0 || n === void 0) &&
|
|
530
|
+
(t === void 0 || n === void 0) && X(e, this.length - 8);
|
|
531
531
|
let r = (t << 24) + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e];
|
|
532
532
|
return (BigInt(r) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + n);
|
|
533
533
|
}), u.prototype.readFloatLE = function(e, t) {
|
|
@@ -572,22 +572,22 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
572
572
|
return e = +e, t >>>= 0, n || B(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
573
573
|
};
|
|
574
574
|
function V(e, t, n, r, i) {
|
|
575
|
-
|
|
575
|
+
J(t, r, i, e, n, 7);
|
|
576
576
|
let a = Number(t & BigInt(4294967295));
|
|
577
577
|
e[n++] = a, a >>= 8, e[n++] = a, a >>= 8, e[n++] = a, a >>= 8, e[n++] = a;
|
|
578
578
|
let o = Number(t >> BigInt(32) & BigInt(4294967295));
|
|
579
579
|
return e[n++] = o, o >>= 8, e[n++] = o, o >>= 8, e[n++] = o, o >>= 8, e[n++] = o, n;
|
|
580
580
|
}
|
|
581
581
|
function re(e, t, n, r, i) {
|
|
582
|
-
|
|
582
|
+
J(t, r, i, e, n, 7);
|
|
583
583
|
let a = Number(t & BigInt(4294967295));
|
|
584
584
|
e[n + 7] = a, a >>= 8, e[n + 6] = a, a >>= 8, e[n + 5] = a, a >>= 8, e[n + 4] = a;
|
|
585
585
|
let o = Number(t >> BigInt(32) & BigInt(4294967295));
|
|
586
586
|
return e[n + 3] = o, o >>= 8, e[n + 2] = o, o >>= 8, e[n + 1] = o, o >>= 8, e[n] = o, n + 8;
|
|
587
587
|
}
|
|
588
|
-
u.prototype.writeBigUInt64LE =
|
|
588
|
+
u.prototype.writeBigUInt64LE = me(function(e, t = 0) {
|
|
589
589
|
return V(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
590
|
-
}), u.prototype.writeBigUInt64BE =
|
|
590
|
+
}), u.prototype.writeBigUInt64BE = me(function(e, t = 0) {
|
|
591
591
|
return re(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
592
592
|
}), u.prototype.writeIntLE = function(e, t, n, r) {
|
|
593
593
|
if (e = +e, t >>>= 0, !r) {
|
|
@@ -615,29 +615,29 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
615
615
|
return e = +e, t >>>= 0, n || B(this, e, t, 4, 2147483647, -2147483648), this[t] = e & 255, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4;
|
|
616
616
|
}, u.prototype.writeInt32BE = function(e, t, n) {
|
|
617
617
|
return e = +e, t >>>= 0, n || B(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
618
|
-
}, u.prototype.writeBigInt64LE =
|
|
618
|
+
}, u.prototype.writeBigInt64LE = me(function(e, t = 0) {
|
|
619
619
|
return V(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
620
|
-
}), u.prototype.writeBigInt64BE =
|
|
620
|
+
}), u.prototype.writeBigInt64BE = me(function(e, t = 0) {
|
|
621
621
|
return re(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
622
622
|
});
|
|
623
623
|
function H(e, t, n, r, i, a) {
|
|
624
624
|
if (n + r > e.length || n < 0) throw RangeError("Index out of range");
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function U(e, t, r, i, a) {
|
|
627
627
|
return t = +t, r >>>= 0, a || H(e, t, r, 4), n.write(e, t, r, i, 23, 4), r + 4;
|
|
628
628
|
}
|
|
629
629
|
u.prototype.writeFloatLE = function(e, t, n) {
|
|
630
|
-
return
|
|
630
|
+
return U(this, e, t, !0, n);
|
|
631
631
|
}, u.prototype.writeFloatBE = function(e, t, n) {
|
|
632
|
-
return
|
|
632
|
+
return U(this, e, t, !1, n);
|
|
633
633
|
};
|
|
634
|
-
function
|
|
634
|
+
function ie(e, t, r, i, a) {
|
|
635
635
|
return t = +t, r >>>= 0, a || H(e, t, r, 8), n.write(e, t, r, i, 52, 8), r + 8;
|
|
636
636
|
}
|
|
637
637
|
u.prototype.writeDoubleLE = function(e, t, n) {
|
|
638
|
-
return
|
|
638
|
+
return ie(this, e, t, !0, n);
|
|
639
639
|
}, u.prototype.writeDoubleBE = function(e, t, n) {
|
|
640
|
-
return
|
|
640
|
+
return ie(this, e, t, !1, n);
|
|
641
641
|
}, u.prototype.copy = function(e, t, n, r) {
|
|
642
642
|
if (!u.isBuffer(e)) throw TypeError("argument should be a Buffer");
|
|
643
643
|
if (n ||= 0, !r && r !== 0 && (r = this.length), t >= e.length && (t = e.length), t ||= 0, r > 0 && r < n && (r = n), r === n || e.length === 0 || this.length === 0) return 0;
|
|
@@ -668,9 +668,9 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
668
668
|
}
|
|
669
669
|
return this;
|
|
670
670
|
};
|
|
671
|
-
let
|
|
672
|
-
function
|
|
673
|
-
|
|
671
|
+
let W = {};
|
|
672
|
+
function G(e, t, n) {
|
|
673
|
+
W[e] = class extends n {
|
|
674
674
|
constructor() {
|
|
675
675
|
super(), Object.defineProperty(this, "message", {
|
|
676
676
|
value: t.apply(this, arguments),
|
|
@@ -694,42 +694,42 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
694
694
|
}
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
|
-
|
|
697
|
+
G("ERR_BUFFER_OUT_OF_BOUNDS", function(e) {
|
|
698
698
|
return e ? `${e} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
699
|
-
}, RangeError),
|
|
699
|
+
}, RangeError), G("ERR_INVALID_ARG_TYPE", function(e, t) {
|
|
700
700
|
return `The "${e}" argument must be of type number. Received type ${typeof t}`;
|
|
701
|
-
}, TypeError),
|
|
701
|
+
}, TypeError), G("ERR_OUT_OF_RANGE", function(e, t, n) {
|
|
702
702
|
let r = `The value of "${e}" is out of range.`, i = n;
|
|
703
|
-
return Number.isInteger(n) && Math.abs(n) > 2 ** 32 ? i =
|
|
703
|
+
return Number.isInteger(n) && Math.abs(n) > 2 ** 32 ? i = K(String(n)) : typeof n == "bigint" && (i = String(n), (n > BigInt(2) ** BigInt(32) || n < -(BigInt(2) ** BigInt(32))) && (i = K(i)), i += "n"), r += ` It must be ${t}. Received ${i}`, r;
|
|
704
704
|
}, RangeError);
|
|
705
|
-
function
|
|
705
|
+
function K(e) {
|
|
706
706
|
let t = "", n = e.length, r = +(e[0] === "-");
|
|
707
707
|
for (; n >= r + 4; n -= 3) t = `_${e.slice(n - 3, n)}${t}`;
|
|
708
708
|
return `${e.slice(0, n)}${t}`;
|
|
709
709
|
}
|
|
710
|
-
function
|
|
711
|
-
|
|
710
|
+
function q(e, t, n) {
|
|
711
|
+
Y(t, "offset"), (e[t] === void 0 || e[t + n] === void 0) && X(t, e.length - (n + 1));
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function J(e, t, n, r, i, a) {
|
|
714
714
|
if (e > n || e < t) {
|
|
715
715
|
let r = typeof t == "bigint" ? "n" : "", i;
|
|
716
|
-
throw i = a > 3 ? t === 0 || t === BigInt(0) ? `>= 0${r} and < 2${r} ** ${(a + 1) * 8}${r}` : `>= -(2${r} ** ${(a + 1) * 8 - 1}${r}) and < 2 ** ${(a + 1) * 8 - 1}${r}` : `>= ${t}${r} and <= ${n}${r}`, new
|
|
716
|
+
throw i = a > 3 ? t === 0 || t === BigInt(0) ? `>= 0${r} and < 2${r} ** ${(a + 1) * 8}${r}` : `>= -(2${r} ** ${(a + 1) * 8 - 1}${r}) and < 2 ** ${(a + 1) * 8 - 1}${r}` : `>= ${t}${r} and <= ${n}${r}`, new W.ERR_OUT_OF_RANGE("value", i, e);
|
|
717
717
|
}
|
|
718
|
-
|
|
718
|
+
q(r, i, a);
|
|
719
719
|
}
|
|
720
|
-
function
|
|
721
|
-
if (typeof e != "number") throw new
|
|
720
|
+
function Y(e, t) {
|
|
721
|
+
if (typeof e != "number") throw new W.ERR_INVALID_ARG_TYPE(t, "number", e);
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
throw Math.floor(e) === e ? t < 0 ? new
|
|
723
|
+
function X(e, t, n) {
|
|
724
|
+
throw Math.floor(e) === e ? t < 0 ? new W.ERR_BUFFER_OUT_OF_BOUNDS() : new W.ERR_OUT_OF_RANGE(n || "offset", `>= ${+!!n} and <= ${t}`, e) : (Y(e, n), new W.ERR_OUT_OF_RANGE(n || "offset", "an integer", e));
|
|
725
725
|
}
|
|
726
|
-
let
|
|
727
|
-
function
|
|
728
|
-
if (e = e.split("=")[0], e = e.trim().replace(
|
|
726
|
+
let ae = /[^+/0-9A-Za-z-_]/g;
|
|
727
|
+
function oe(e) {
|
|
728
|
+
if (e = e.split("=")[0], e = e.trim().replace(ae, ""), e.length < 2) return "";
|
|
729
729
|
for (; e.length % 4 != 0;) e += "=";
|
|
730
730
|
return e;
|
|
731
731
|
}
|
|
732
|
-
function
|
|
732
|
+
function se(e, t) {
|
|
733
733
|
t ||= Infinity;
|
|
734
734
|
let n, r = e.length, i = null, a = [];
|
|
735
735
|
for (let o = 0; o < r; ++o) {
|
|
@@ -767,31 +767,31 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
767
767
|
}
|
|
768
768
|
return a;
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function ce(e) {
|
|
771
771
|
let t = [];
|
|
772
772
|
for (let n = 0; n < e.length; ++n) t.push(e.charCodeAt(n) & 255);
|
|
773
773
|
return t;
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function le(e, t) {
|
|
776
776
|
let n, r, i, a = [];
|
|
777
777
|
for (let o = 0; o < e.length && !((t -= 2) < 0); ++o) n = e.charCodeAt(o), r = n >> 8, i = n % 256, a.push(i), a.push(r);
|
|
778
778
|
return a;
|
|
779
779
|
}
|
|
780
|
-
function
|
|
781
|
-
return t.toByteArray(
|
|
780
|
+
function ue(e) {
|
|
781
|
+
return t.toByteArray(oe(e));
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function de(e, t, n, r) {
|
|
784
784
|
let i;
|
|
785
785
|
for (i = 0; i < r && !(i + n >= t.length || i >= e.length); ++i) t[i + n] = e[i];
|
|
786
786
|
return i;
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function Z(e, t) {
|
|
789
789
|
return e instanceof t || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name;
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function fe(e) {
|
|
792
792
|
return e !== e;
|
|
793
793
|
}
|
|
794
|
-
let
|
|
794
|
+
let pe = (function() {
|
|
795
795
|
let e = "0123456789abcdef", t = Array(256);
|
|
796
796
|
for (let n = 0; n < 16; ++n) {
|
|
797
797
|
let r = n * 16;
|
|
@@ -799,7 +799,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
799
799
|
}
|
|
800
800
|
return t;
|
|
801
801
|
})();
|
|
802
|
-
function
|
|
802
|
+
function me(e) {
|
|
803
803
|
return typeof BigInt > "u" ? he : e;
|
|
804
804
|
}
|
|
805
805
|
function he() {
|
|
@@ -1733,7 +1733,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1733
1733
|
t.exports = null;
|
|
1734
1734
|
})), k = /* @__PURE__ */ t(((e, t) => {
|
|
1735
1735
|
b();
|
|
1736
|
-
var n = D(), { BinaryFile: r } =
|
|
1736
|
+
var n = D(), { BinaryFile: r } = X(), i = 0, a = 6, o = 8, s = 20, c = 27, l = 28, u = 31, d = 44, f = 54, p = 70, m = 0, h = 2, g = 3, _ = 4, v = 1, x = 2, S = 4, C = 8, w = 1, E = 4, k = 1, A = class extends n {
|
|
1737
1737
|
constructor(e, t, n) {
|
|
1738
1738
|
super(e, t, n), this._ensurePkgMeta();
|
|
1739
1739
|
}
|
|
@@ -1977,7 +1977,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1977
1977
|
for (let t of r) e === 1 ? this.stdOut = t : this.stdErr = t;
|
|
1978
1978
|
}, re = () => {
|
|
1979
1979
|
t[1] &&= (z && this.stdout ? this.stdout.write(t[1]) : this.stdOut = t[1], ""), t[2] &&= (z && this.stderr ? this.stderr.write(t[2]) : this.stdErr = t[2], "");
|
|
1980
|
-
}, H = [],
|
|
1980
|
+
}, H = [], U = (e) => {
|
|
1981
1981
|
if (!e || e.length === 0) return;
|
|
1982
1982
|
let t = this.isRaw;
|
|
1983
1983
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -1995,49 +1995,49 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1995
1995
|
L = (e) => {
|
|
1996
1996
|
this._handlingStreamData = !0;
|
|
1997
1997
|
try {
|
|
1998
|
-
|
|
1998
|
+
U(typeof e == "string" ? b.encode(e) : e instanceof Uint8Array ? e : y !== void 0 && y.isBuffer(e) ? new Uint8Array(e) : b.encode(String(e ?? "")));
|
|
1999
1999
|
} finally {
|
|
2000
2000
|
this._handlingStreamData = !1;
|
|
2001
2001
|
}
|
|
2002
2002
|
}, this._externalKeyHandler = (e) => {
|
|
2003
2003
|
if (this._handlingStreamData) return;
|
|
2004
2004
|
let t = this._keyToBytes(e);
|
|
2005
|
-
t &&
|
|
2005
|
+
t && U(t);
|
|
2006
2006
|
};
|
|
2007
|
-
let
|
|
2008
|
-
|
|
2009
|
-
let
|
|
2007
|
+
let ie = !!(this._onStdinStreamData && this.stdinStream && typeof this.stdinStream.listeners == "function" && this.stdinStream.listeners("data").includes(this._onStdinStreamData));
|
|
2008
|
+
ie && typeof this.stdinStream.off == "function" && this.stdinStream.off("data", this._onStdinStreamData), R && this.stdinStream && typeof this.stdinStream.on == "function" && this.stdinStream.on("data", L), R && this.stdin && this.stdin !== this.stdinStream && typeof this.stdin.on == "function" && this.stdin.on("data", L);
|
|
2009
|
+
let W = !R && typeof this.stdin == "string" ? b.encode(this.stdin) : !R && this.stdin instanceof Uint8Array ? this.stdin : !R && y !== void 0 && y.isBuffer(this.stdin) ? new Uint8Array(this.stdin) : new Uint8Array(), G = 0, K = this.context && this.context.fs ? this.context.fs : this.fs, q = this.context && this.context.fs && this.context.fs.cwd || this.fs && this.fs.cwd || this.context && typeof this.context.getVar == "function" && this.context.getVar("PWD") || K && K.cwd || "/", J = q.length > 1 && q.endsWith("/") ? q.slice(0, -1) : q, Y = 5, X = new Map([[3, {
|
|
2010
2010
|
type: "preopen",
|
|
2011
2011
|
path: "/",
|
|
2012
2012
|
guestName: "/"
|
|
2013
2013
|
}], [4, {
|
|
2014
2014
|
type: "preopen",
|
|
2015
|
-
path:
|
|
2015
|
+
path: J,
|
|
2016
2016
|
guestName: "."
|
|
2017
|
-
}]]),
|
|
2017
|
+
}]]), ae = new Map([
|
|
2018
2018
|
[0, 0],
|
|
2019
2019
|
[1, 0],
|
|
2020
2020
|
[2, 0]
|
|
2021
|
-
]),
|
|
2021
|
+
]), oe = (e) => {
|
|
2022
2022
|
let t = e.split("/").filter(Boolean);
|
|
2023
2023
|
return t.pop(), "/" + t.join("/");
|
|
2024
|
-
},
|
|
2025
|
-
let n =
|
|
2024
|
+
}, se = (e, t) => {
|
|
2025
|
+
let n = X.get(e);
|
|
2026
2026
|
if (!n || n.type !== "preopen" && n.type !== "dir") return null;
|
|
2027
|
-
if (t.startsWith("/")) return
|
|
2028
|
-
if (!t || t === ".") return
|
|
2029
|
-
let r = n.path.endsWith("/") ? n.path : n.path + "/", i =
|
|
2027
|
+
if (t.startsWith("/")) return K.absolutePath(t);
|
|
2028
|
+
if (!t || t === ".") return K.absolutePath(n.path);
|
|
2029
|
+
let r = n.path.endsWith("/") ? n.path : n.path + "/", i = K.absolutePath(r + t), a = K.absolutePath("/" + t);
|
|
2030
2030
|
if (n.path !== "/") {
|
|
2031
|
-
if (
|
|
2032
|
-
if (
|
|
2033
|
-
let e =
|
|
2034
|
-
return
|
|
2035
|
-
}
|
|
2036
|
-
if (
|
|
2037
|
-
let o =
|
|
2038
|
-
return
|
|
2039
|
-
},
|
|
2040
|
-
if (!(!e || e.type !== "file" || !e.dirty || !
|
|
2031
|
+
if (K.exists(i)) return i;
|
|
2032
|
+
if (K.exists(a)) return a;
|
|
2033
|
+
let e = K.exists(oe(i));
|
|
2034
|
+
return K.exists(oe(a)) && !e ? a : i;
|
|
2035
|
+
}
|
|
2036
|
+
if (K.exists(i)) return i;
|
|
2037
|
+
let o = K.absolutePath(t);
|
|
2038
|
+
return K.exists(o) ? o : i;
|
|
2039
|
+
}, ce = (e) => {
|
|
2040
|
+
if (!(!e || e.type !== "file" || !e.dirty || !K)) try {
|
|
2041
2041
|
let t = !0;
|
|
2042
2042
|
for (let n = 0; n < e.bytes.length; n++) if (e.bytes[n] === 0) {
|
|
2043
2043
|
t = !1;
|
|
@@ -2045,20 +2045,20 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2045
2045
|
}
|
|
2046
2046
|
if (t) {
|
|
2047
2047
|
let t = n.decode(e.bytes);
|
|
2048
|
-
|
|
2048
|
+
K.setFileByPath(e.path, t, !0);
|
|
2049
2049
|
} else {
|
|
2050
2050
|
let t = new Uint8Array(e.bytes.length);
|
|
2051
|
-
t.set(e.bytes),
|
|
2051
|
+
t.set(e.bytes), K.setFileByPath(e.path, new r(t.buffer, "application/octet-stream"), !0);
|
|
2052
2052
|
}
|
|
2053
2053
|
e.dirty = !1;
|
|
2054
2054
|
} catch {}
|
|
2055
|
-
},
|
|
2055
|
+
}, le = this.stdout && this.stdout.columns || this.stdinStream && this.stdinStream.columns || this.context && typeof this.context.getVar == "function" && parseInt(this.context.getVar("COLUMNS"), 10) || 80, ue = this.stdout && this.stdout.rows || this.stdinStream && this.stdinStream.rows || this.context && typeof this.context.getVar == "function" && parseInt(this.context.getVar("LINES"), 10) || 24, de = {
|
|
2056
2056
|
TERM: "xterm-256color",
|
|
2057
2057
|
COLORTERM: "truecolor",
|
|
2058
2058
|
...this.context && this.context.vars || {},
|
|
2059
|
-
COLUMNS: String(
|
|
2060
|
-
LINES: String(
|
|
2061
|
-
},
|
|
2059
|
+
COLUMNS: String(le),
|
|
2060
|
+
LINES: String(ue)
|
|
2061
|
+
}, Z = Object.entries(de).map(([e, t]) => `${e}=${t}`), fe = new Proxy({
|
|
2062
2062
|
fd_write: (e, t, r, a) => {
|
|
2063
2063
|
if (!T) return o;
|
|
2064
2064
|
let s = new DataView(T.buffer);
|
|
@@ -2070,7 +2070,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
return s.setUint32(a, o, !0), i;
|
|
2072
2072
|
}
|
|
2073
|
-
let c =
|
|
2073
|
+
let c = X.get(e);
|
|
2074
2074
|
if (!c) return o;
|
|
2075
2075
|
if (c.type === "dev_null" || c.type === "dev_zero") {
|
|
2076
2076
|
let e = 0;
|
|
@@ -2102,10 +2102,10 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2102
2102
|
},
|
|
2103
2103
|
fd_read: (e, t, n, r) => {
|
|
2104
2104
|
if (!T) return o;
|
|
2105
|
-
let s = new DataView(T.buffer), l =
|
|
2105
|
+
let s = new DataView(T.buffer), l = X.get(e), u = !!(l && l.type === "dev_tty");
|
|
2106
2106
|
if (e === 0 || z && e === 2 || u) {
|
|
2107
2107
|
(u || e === 2) && B(), this._syncRawMode();
|
|
2108
|
-
let o = !!((
|
|
2108
|
+
let o = !!((ae.get(e) || 0) & E);
|
|
2109
2109
|
if (O) {
|
|
2110
2110
|
if ((typeof D?.exports?.asyncify_get_state == "function" ? D.exports.asyncify_get_state() : 0) === 2) {
|
|
2111
2111
|
if (D.exports.asyncify_stop_rewind(), F && H.length === 0) return F = !1, s.setUint32(r, 0, !0), c;
|
|
@@ -2143,11 +2143,11 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2143
2143
|
return s.setUint32(r, e, !0), i;
|
|
2144
2144
|
}
|
|
2145
2145
|
let l = 0;
|
|
2146
|
-
for (let e = 0; e < n &&
|
|
2147
|
-
let n = s.getUint32(t + e * 8, !0), r = s.getUint32(t + e * 8 + 4, !0), i = Math.min(r,
|
|
2148
|
-
new Uint8Array(T.buffer).set(
|
|
2146
|
+
for (let e = 0; e < n && G < W.length; e++) {
|
|
2147
|
+
let n = s.getUint32(t + e * 8, !0), r = s.getUint32(t + e * 8 + 4, !0), i = Math.min(r, W.length - G);
|
|
2148
|
+
new Uint8Array(T.buffer).set(W.slice(G, G + i), n), G += i, l += i;
|
|
2149
2149
|
}
|
|
2150
|
-
return l === 0 && o &&
|
|
2150
|
+
return l === 0 && o && G >= W.length ? (s.setUint32(r, 0, !0), a) : (s.setUint32(r, l, !0), i);
|
|
2151
2151
|
}
|
|
2152
2152
|
if (!l) return o;
|
|
2153
2153
|
if (l.type === "dev_null") return s.setUint32(r, 0, !0), i;
|
|
@@ -2180,7 +2180,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2180
2180
|
fd_seek: (e, t, n, r, a) => {
|
|
2181
2181
|
if (!T) return o;
|
|
2182
2182
|
if (e <= 2) return p;
|
|
2183
|
-
let s =
|
|
2183
|
+
let s = X.get(e);
|
|
2184
2184
|
if (!s) return o;
|
|
2185
2185
|
if (s.type === "dev_tty" || s.type === "dev_null" || s.type === "dev_zero" || s.type === "dev_urandom") return p;
|
|
2186
2186
|
if (s.type !== "file") return o;
|
|
@@ -2195,32 +2195,32 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2195
2195
|
},
|
|
2196
2196
|
fd_tell: (e, t) => {
|
|
2197
2197
|
if (!T) return o;
|
|
2198
|
-
let n =
|
|
2198
|
+
let n = X.get(e);
|
|
2199
2199
|
return !n || n.type !== "file" ? o : (new DataView(T.buffer).setBigUint64(t, BigInt(n.pos), !0), i);
|
|
2200
2200
|
},
|
|
2201
2201
|
fd_close: (e) => {
|
|
2202
2202
|
if (e <= 2) return i;
|
|
2203
|
-
let t =
|
|
2204
|
-
return t ? (t.type === "file" &&
|
|
2203
|
+
let t = X.get(e);
|
|
2204
|
+
return t ? (t.type === "file" && ce(t), X.delete(e), ae.delete(e), i) : o;
|
|
2205
2205
|
},
|
|
2206
2206
|
fd_sync: (e) => {
|
|
2207
|
-
let t =
|
|
2208
|
-
return t &&
|
|
2207
|
+
let t = X.get(e);
|
|
2208
|
+
return t && ce(t), i;
|
|
2209
2209
|
},
|
|
2210
2210
|
fd_datasync: (e) => {
|
|
2211
|
-
let t =
|
|
2212
|
-
return t &&
|
|
2211
|
+
let t = X.get(e);
|
|
2212
|
+
return t && ce(t), i;
|
|
2213
2213
|
},
|
|
2214
2214
|
fd_prestat_get: (e, t) => {
|
|
2215
2215
|
if (!T) return o;
|
|
2216
|
-
let n =
|
|
2216
|
+
let n = X.get(e);
|
|
2217
2217
|
if (!n || n.type !== "preopen") return o;
|
|
2218
2218
|
let r = new DataView(T.buffer), a = b.encode(n.guestName);
|
|
2219
2219
|
return r.setUint8(t, 0), r.setUint32(t + 4, a.length, !0), i;
|
|
2220
2220
|
},
|
|
2221
2221
|
fd_prestat_dir_name: (e, t, n) => {
|
|
2222
2222
|
if (!T) return o;
|
|
2223
|
-
let r =
|
|
2223
|
+
let r = X.get(e);
|
|
2224
2224
|
if (!r || r.type !== "preopen") return o;
|
|
2225
2225
|
let a = b.encode(r.guestName);
|
|
2226
2226
|
return new Uint8Array(T.buffer, t, Math.min(n, a.length)).set(a.subarray(0, n)), i;
|
|
@@ -2230,19 +2230,19 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2230
2230
|
let n = new DataView(T.buffer), r = m;
|
|
2231
2231
|
if (e <= 2) r = h;
|
|
2232
2232
|
else {
|
|
2233
|
-
let t =
|
|
2233
|
+
let t = X.get(e);
|
|
2234
2234
|
if (!t) return o;
|
|
2235
2235
|
r = t.type === "dev_null" || t.type === "dev_zero" || t.type === "dev_urandom" || t.type === "dev_tty" ? h : t.type === "preopen" || t.type === "dir" ? g : _;
|
|
2236
2236
|
}
|
|
2237
2237
|
for (let e = 0; e < 24; e++) n.setUint8(t + e, 0);
|
|
2238
2238
|
n.setUint8(t, r);
|
|
2239
|
-
let a =
|
|
2239
|
+
let a = ae.get(e) || (X.get(e)?.append ? w : 0);
|
|
2240
2240
|
return n.setUint16(t + 2, a, !0), n.setBigUint64(t + 8, 18446744073709551615n, !0), n.setBigUint64(t + 16, 18446744073709551615n, !0), i;
|
|
2241
2241
|
},
|
|
2242
2242
|
fd_fdstat_set_flags: (e, t) => {
|
|
2243
|
-
if (!T || e > 2 && !
|
|
2244
|
-
|
|
2245
|
-
let n =
|
|
2243
|
+
if (!T || e > 2 && !X.has(e)) return o;
|
|
2244
|
+
ae.set(e, t);
|
|
2245
|
+
let n = X.get(e);
|
|
2246
2246
|
return n && (n.append = !!(t & w)), (e === 0 || e === 2 || n && n.type === "dev_tty") && t & E && B(), i;
|
|
2247
2247
|
},
|
|
2248
2248
|
fd_filestat_get: (e, t) => {
|
|
@@ -2250,55 +2250,55 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2250
2250
|
let n = new DataView(T.buffer);
|
|
2251
2251
|
for (let e = 0; e < 64; e++) n.setUint8(t + e, 0);
|
|
2252
2252
|
if (e <= 2) return n.setUint8(t + 16, h), i;
|
|
2253
|
-
let r =
|
|
2253
|
+
let r = X.get(e);
|
|
2254
2254
|
if (!r) return o;
|
|
2255
2255
|
if (r.type === "dev_null" || r.type === "dev_zero" || r.type === "dev_urandom" || r.type === "dev_tty") return n.setUint8(t + 16, h), n.setBigUint64(t + 24, 1n, !0), i;
|
|
2256
2256
|
let a = r.type === "preopen" || r.type === "dir";
|
|
2257
2257
|
return n.setUint8(t + 16, a ? g : _), n.setBigUint64(t + 24, 1n, !0), n.setBigUint64(t + 32, BigInt(r.bytes ? r.bytes.length : 0), !0), i;
|
|
2258
2258
|
},
|
|
2259
2259
|
path_open: (e, t, r, a, c, l, p, m, h) => {
|
|
2260
|
-
if (!T || !
|
|
2261
|
-
let g =
|
|
2260
|
+
if (!T || !K) return o;
|
|
2261
|
+
let g = se(e, n.decode(new Uint8Array(T.buffer, r, a)));
|
|
2262
2262
|
if (!g) return o;
|
|
2263
2263
|
let _ = g.replace(/\/+/g, "/").replace(/\/$/, "") || "/";
|
|
2264
2264
|
if (_ === "/dev/null") {
|
|
2265
|
-
let e =
|
|
2266
|
-
return
|
|
2265
|
+
let e = Y++;
|
|
2266
|
+
return X.set(e, {
|
|
2267
2267
|
type: "dev_null",
|
|
2268
2268
|
path: "/dev/null"
|
|
2269
2269
|
}), new DataView(T.buffer).setUint32(h, e, !0), i;
|
|
2270
2270
|
}
|
|
2271
2271
|
if (_ === "/dev/zero") {
|
|
2272
|
-
let e =
|
|
2273
|
-
return
|
|
2272
|
+
let e = Y++;
|
|
2273
|
+
return X.set(e, {
|
|
2274
2274
|
type: "dev_zero",
|
|
2275
2275
|
path: "/dev/zero"
|
|
2276
2276
|
}), new DataView(T.buffer).setUint32(h, e, !0), i;
|
|
2277
2277
|
}
|
|
2278
2278
|
if (_ === "/dev/urandom" || _ === "/dev/random") {
|
|
2279
|
-
let e =
|
|
2280
|
-
return
|
|
2279
|
+
let e = Y++;
|
|
2280
|
+
return X.set(e, {
|
|
2281
2281
|
type: "dev_urandom",
|
|
2282
2282
|
path: _
|
|
2283
2283
|
}), new DataView(T.buffer).setUint32(h, e, !0), i;
|
|
2284
2284
|
}
|
|
2285
2285
|
if (_ === "/dev/tty" || _ === "/dev/stdin") {
|
|
2286
2286
|
B();
|
|
2287
|
-
let e =
|
|
2288
|
-
return
|
|
2287
|
+
let e = Y++;
|
|
2288
|
+
return X.set(e, {
|
|
2289
2289
|
type: "dev_tty",
|
|
2290
2290
|
path: _
|
|
2291
2291
|
}), new DataView(T.buffer).setUint32(h, e, !0), i;
|
|
2292
2292
|
}
|
|
2293
2293
|
if (_ === "/dev/stdout") return new DataView(T.buffer).setUint32(h, 1, !0), i;
|
|
2294
2294
|
if (_ === "/dev/stderr") return new DataView(T.buffer).setUint32(h, 2, !0), i;
|
|
2295
|
-
let y =
|
|
2295
|
+
let y = K.stat(g), E = y !== null;
|
|
2296
2296
|
if (c & S && c & v && E) return s;
|
|
2297
2297
|
if (c & x) {
|
|
2298
2298
|
if (!E) return d;
|
|
2299
2299
|
if (!y.isDirectory) return f;
|
|
2300
|
-
let e =
|
|
2301
|
-
return
|
|
2300
|
+
let e = Y++;
|
|
2301
|
+
return X.set(e, {
|
|
2302
2302
|
type: "dir",
|
|
2303
2303
|
path: g
|
|
2304
2304
|
}), new DataView(T.buffer).setUint32(h, e, !0), i;
|
|
@@ -2307,11 +2307,11 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2307
2307
|
if (!E && !(c & v)) return d;
|
|
2308
2308
|
let D = new Uint8Array(), O = !1;
|
|
2309
2309
|
if (E && !(c & C)) {
|
|
2310
|
-
let e =
|
|
2310
|
+
let e = K.getFileByPath(g);
|
|
2311
2311
|
e != null && (D = typeof e == "string" ? b.encode(e) : new Uint8Array(this._contentToBytes(e)));
|
|
2312
2312
|
} else O = !0;
|
|
2313
|
-
let k =
|
|
2314
|
-
return
|
|
2313
|
+
let k = Y++;
|
|
2314
|
+
return X.set(k, {
|
|
2315
2315
|
type: "file",
|
|
2316
2316
|
path: g,
|
|
2317
2317
|
bytes: D,
|
|
@@ -2321,10 +2321,10 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2321
2321
|
}), new DataView(T.buffer).setUint32(h, k, !0), i;
|
|
2322
2322
|
},
|
|
2323
2323
|
path_filestat_get: (e, t, r, a, s) => {
|
|
2324
|
-
if (!T || !
|
|
2325
|
-
let c =
|
|
2324
|
+
if (!T || !K) return o;
|
|
2325
|
+
let c = se(e, n.decode(new Uint8Array(T.buffer, r, a)));
|
|
2326
2326
|
if (!c) return o;
|
|
2327
|
-
let l = c.replace(/\/+/g, "/").replace(/\/$/, "") || "/", u =
|
|
2327
|
+
let l = c.replace(/\/+/g, "/").replace(/\/$/, "") || "/", u = K.stat(c);
|
|
2328
2328
|
if (l === "/dev/null" || l === "/dev/zero" || l === "/dev/urandom" || l === "/dev/random" || l === "/dev/tty" || l === "/dev/stdin" || l === "/dev/stdout" || l === "/dev/stderr" || u && (u.isDevice || u.isCharacterDevice)) {
|
|
2329
2329
|
let e = new DataView(T.buffer);
|
|
2330
2330
|
for (let t = 0; t < 64; t++) e.setUint8(s + t, 0);
|
|
@@ -2333,48 +2333,48 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2333
2333
|
if (!u) return d;
|
|
2334
2334
|
let f = new DataView(T.buffer);
|
|
2335
2335
|
for (let e = 0; e < 64; e++) f.setUint8(s + e, 0);
|
|
2336
|
-
return f.setUint8(s + 16, u.isDirectory ? g : _), f.setBigUint64(s + 24, 1n, !0), f.setBigUint64(s + 32, BigInt(
|
|
2336
|
+
return f.setUint8(s + 16, u.isDirectory ? g : _), f.setBigUint64(s + 24, 1n, !0), f.setBigUint64(s + 32, BigInt(K.getSize(c) || 0), !0), i;
|
|
2337
2337
|
},
|
|
2338
2338
|
path_create_directory: (e, t, r) => {
|
|
2339
|
-
if (!T || !
|
|
2340
|
-
let a =
|
|
2339
|
+
if (!T || !K) return o;
|
|
2340
|
+
let a = se(e, n.decode(new Uint8Array(T.buffer, t, r)));
|
|
2341
2341
|
if (!a) return o;
|
|
2342
|
-
if (
|
|
2342
|
+
if (K.exists(a)) return s;
|
|
2343
2343
|
try {
|
|
2344
|
-
return
|
|
2344
|
+
return K.setFileByPath(a, {}, !0), i;
|
|
2345
2345
|
} catch {
|
|
2346
2346
|
return l;
|
|
2347
2347
|
}
|
|
2348
2348
|
},
|
|
2349
2349
|
path_unlink_file: (e, t, r) => {
|
|
2350
|
-
if (!T || !
|
|
2351
|
-
let a =
|
|
2352
|
-
if (!a || !
|
|
2350
|
+
if (!T || !K) return o;
|
|
2351
|
+
let a = se(e, n.decode(new Uint8Array(T.buffer, t, r)));
|
|
2352
|
+
if (!a || !K.exists(a)) return d;
|
|
2353
2353
|
try {
|
|
2354
|
-
return
|
|
2354
|
+
return K.deleteFileByPath(a), i;
|
|
2355
2355
|
} catch {
|
|
2356
2356
|
return l;
|
|
2357
2357
|
}
|
|
2358
2358
|
},
|
|
2359
2359
|
path_remove_directory: (e, t, r) => {
|
|
2360
|
-
if (!T || !
|
|
2361
|
-
let a =
|
|
2362
|
-
if (!a || !
|
|
2360
|
+
if (!T || !K) return o;
|
|
2361
|
+
let a = se(e, n.decode(new Uint8Array(T.buffer, t, r)));
|
|
2362
|
+
if (!a || !K.exists(a)) return d;
|
|
2363
2363
|
try {
|
|
2364
|
-
return
|
|
2364
|
+
return K.deleteFileByPath(a), i;
|
|
2365
2365
|
} catch {
|
|
2366
2366
|
return l;
|
|
2367
2367
|
}
|
|
2368
2368
|
},
|
|
2369
2369
|
path_rename: (e, t, r, a, s, c) => {
|
|
2370
|
-
if (!T || !
|
|
2371
|
-
let u = n.decode(new Uint8Array(T.buffer, t, r)), f = n.decode(new Uint8Array(T.buffer, s, c)), p =
|
|
2370
|
+
if (!T || !K) return o;
|
|
2371
|
+
let u = n.decode(new Uint8Array(T.buffer, t, r)), f = n.decode(new Uint8Array(T.buffer, s, c)), p = se(e, u), m = se(a, f);
|
|
2372
2372
|
if (!p || !m) return o;
|
|
2373
|
-
if (!
|
|
2374
|
-
for (let e of
|
|
2373
|
+
if (!K.exists(p)) return d;
|
|
2374
|
+
for (let e of X.values()) e.path === p && (ce(e), e.path = m);
|
|
2375
2375
|
try {
|
|
2376
|
-
let e =
|
|
2377
|
-
return
|
|
2376
|
+
let e = K.getFileByPath(p);
|
|
2377
|
+
return K.setFileByPath(m, e, !0), K.deleteFileByPath(p), i;
|
|
2378
2378
|
} catch {
|
|
2379
2379
|
return l;
|
|
2380
2380
|
}
|
|
@@ -2403,16 +2403,16 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2403
2403
|
environ_sizes_get: (e, t) => {
|
|
2404
2404
|
if (!T) return l;
|
|
2405
2405
|
let n = new DataView(T.buffer);
|
|
2406
|
-
n.setUint32(e,
|
|
2407
|
-
let r =
|
|
2406
|
+
n.setUint32(e, Z.length, !0);
|
|
2407
|
+
let r = Z.reduce((e, t) => e + b.encode(t).length + 1, 0);
|
|
2408
2408
|
return n.setUint32(t, r, !0), i;
|
|
2409
2409
|
},
|
|
2410
2410
|
environ_get: (e, t) => {
|
|
2411
2411
|
if (!T) return l;
|
|
2412
2412
|
let n = new DataView(T.buffer), r = t;
|
|
2413
|
-
for (let t = 0; t <
|
|
2413
|
+
for (let t = 0; t < Z.length; t++) {
|
|
2414
2414
|
n.setUint32(e + t * 4, r, !0);
|
|
2415
|
-
let i = b.encode(
|
|
2415
|
+
let i = b.encode(Z[t] + "\0");
|
|
2416
2416
|
new Uint8Array(T.buffer).set(i, r), r += i.length;
|
|
2417
2417
|
}
|
|
2418
2418
|
return i;
|
|
@@ -2459,7 +2459,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2459
2459
|
let n = e + r * 48, s = a.getBigUint64(n, !0), c = a.getUint8(n + 8), l = !1;
|
|
2460
2460
|
if (c === 0) l = N;
|
|
2461
2461
|
else if (c === 1) {
|
|
2462
|
-
let e = a.getUint32(n + 16, !0), t =
|
|
2462
|
+
let e = a.getUint32(n + 16, !0), t = X.get(e), r = !!(t && t.type === "dev_tty");
|
|
2463
2463
|
(e === 0 || z && e === 2 || r) && H.length > 0 && (l = !0);
|
|
2464
2464
|
} else c === 2 && (l = !0);
|
|
2465
2465
|
if (l) {
|
|
@@ -2483,7 +2483,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2483
2483
|
r < l && (l = r);
|
|
2484
2484
|
} else if (r === 1) {
|
|
2485
2485
|
s = !0;
|
|
2486
|
-
let e = a.getUint32(n + 16, !0), t =
|
|
2486
|
+
let e = a.getUint32(n + 16, !0), t = X.get(e), r = !!(t && t.type === "dev_tty");
|
|
2487
2487
|
(e === 0 || e === 2 || r) && B(), (e === 0 || z && e === 2 || r) && H.length > 0 && o++;
|
|
2488
2488
|
} else r === 2 && o++;
|
|
2489
2489
|
}
|
|
@@ -2493,7 +2493,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2493
2493
|
let n = e + r * 48, s = a.getBigUint64(n, !0), c = a.getUint8(n + 8), u = !1;
|
|
2494
2494
|
if (c === 0 && l === 0) u = !0;
|
|
2495
2495
|
else if (c === 1) {
|
|
2496
|
-
let e = a.getUint32(n + 16, !0), t =
|
|
2496
|
+
let e = a.getUint32(n + 16, !0), t = X.get(e), r = !!(t && t.type === "dev_tty");
|
|
2497
2497
|
(e === 0 || z && e === 2 || r) && H.length > 0 && (u = !0);
|
|
2498
2498
|
} else c === 2 && (u = !0);
|
|
2499
2499
|
if (u) {
|
|
@@ -2524,7 +2524,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2524
2524
|
}
|
|
2525
2525
|
}, { get(e, t) {
|
|
2526
2526
|
return t in e ? e[t] : () => 0;
|
|
2527
|
-
} }),
|
|
2527
|
+
} }), pe = (e) => {
|
|
2528
2528
|
if (!T || !e) return "";
|
|
2529
2529
|
try {
|
|
2530
2530
|
let t = new DataView(T.buffer).getUint32(e - 4, !0), n = new Uint16Array(T.buffer, e, t >>> 1);
|
|
@@ -2532,9 +2532,9 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2532
2532
|
} catch {
|
|
2533
2533
|
return "";
|
|
2534
2534
|
}
|
|
2535
|
-
},
|
|
2536
|
-
wasi_snapshot_preview1:
|
|
2537
|
-
wasi_unstable:
|
|
2535
|
+
}, me = {
|
|
2536
|
+
wasi_snapshot_preview1: fe,
|
|
2537
|
+
wasi_unstable: fe,
|
|
2538
2538
|
env: new Proxy({
|
|
2539
2539
|
print: (e, t) => {
|
|
2540
2540
|
T && V(1, n.decode(new Uint8Array(T.buffer, e, t)));
|
|
@@ -2543,7 +2543,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2543
2543
|
T && V(2, n.decode(new Uint8Array(T.buffer, e, t)));
|
|
2544
2544
|
},
|
|
2545
2545
|
log: (e) => {
|
|
2546
|
-
V(1,
|
|
2546
|
+
V(1, pe(e) + "\n");
|
|
2547
2547
|
},
|
|
2548
2548
|
logi: (e) => {
|
|
2549
2549
|
V(1, String(e) + "\n");
|
|
@@ -2553,11 +2553,11 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2553
2553
|
},
|
|
2554
2554
|
trace: (e, t, ...n) => {
|
|
2555
2555
|
let r = t > 0 ? " " + n.slice(0, t).join(", ") : "";
|
|
2556
|
-
V(1, `trace: ${
|
|
2556
|
+
V(1, `trace: ${pe(e)}${r}\n`);
|
|
2557
2557
|
},
|
|
2558
2558
|
seed: () => Date.now() * Math.random(),
|
|
2559
2559
|
abort: (e, t, n, r) => {
|
|
2560
|
-
let i =
|
|
2560
|
+
let i = pe(e), a = pe(t);
|
|
2561
2561
|
throw (i || a) && V(2, `abort: ${i || "aborted"} at ${a || this.script}:${n || 0}:${r || 0}\n`), this.exitCode = 134, {
|
|
2562
2562
|
_wasmExit: !0,
|
|
2563
2563
|
code: 134
|
|
@@ -2574,9 +2574,9 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2574
2574
|
initial: 1,
|
|
2575
2575
|
maximum: 256
|
|
2576
2576
|
});
|
|
2577
|
-
T = t,
|
|
2577
|
+
T = t, me[e.module] || (me[e.module] = {}), me[e.module][e.name] = t;
|
|
2578
2578
|
}
|
|
2579
|
-
if (D = await WebAssembly.instantiate(t,
|
|
2579
|
+
if (D = await WebAssembly.instantiate(t, me), D.exports.memory && (T = D.exports.memory), this._getTermiosLflag = typeof D.exports.get_termios_lflag == "function" ? D.exports.get_termios_lflag : null, O = !!(D.exports.asyncify_start_unwind && D.exports.asyncify_stop_unwind), O && T) {
|
|
2580
2580
|
try {
|
|
2581
2581
|
k = T.grow(1) * 65536;
|
|
2582
2582
|
} catch {
|
|
@@ -2646,8 +2646,8 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2646
2646
|
} catch (e) {
|
|
2647
2647
|
this._killed ? this.exitCode = 130 : (!e || !e._wasmExit) && (this.stdErr = `${this.script}: ${e?.message || String(e)}`, this.exitCode = 1);
|
|
2648
2648
|
} finally {
|
|
2649
|
-
z && this._exitAltScreen(), L && (this.stdinStream && typeof this.stdinStream.off == "function" && this.stdinStream.off("data", L), this.stdin && typeof this.stdin.off == "function" && this.stdin.off("data", L)),
|
|
2650
|
-
for (let e of
|
|
2649
|
+
z && this._exitAltScreen(), L && (this.stdinStream && typeof this.stdinStream.off == "function" && this.stdinStream.off("data", L), this.stdin && typeof this.stdin.off == "function" && this.stdin.off("data", L)), ie && this._onStdinStreamData && this.stdinStream && typeof this.stdinStream.on == "function" && this.stdinStream.on("data", this._onStdinStreamData), te && this.stdout && typeof this.stdout.off == "function" && this.stdout.off("resize", te), ne && this.stdinStream && typeof this.stdinStream.off == "function" && this.stdinStream.off("resize", ne), this._externalKeyHandler = null, this._getTermiosLflag = null;
|
|
2650
|
+
for (let e of X.values()) ce(e);
|
|
2651
2651
|
}
|
|
2652
2652
|
re();
|
|
2653
2653
|
let he = this.arguments || [];
|
|
@@ -3580,24 +3580,24 @@ function te(e) {
|
|
|
3580
3580
|
}
|
|
3581
3581
|
}
|
|
3582
3582
|
function ne() {
|
|
3583
|
-
!
|
|
3583
|
+
!ie || !W || (ie = !1, W.length ? U = W.concat(U) : G = -1, U.length && L());
|
|
3584
3584
|
}
|
|
3585
3585
|
function L() {
|
|
3586
|
-
if (!
|
|
3586
|
+
if (!ie) {
|
|
3587
3587
|
var e = ee(ne);
|
|
3588
|
-
|
|
3589
|
-
for (var t =
|
|
3590
|
-
for (
|
|
3591
|
-
|
|
3588
|
+
ie = !0;
|
|
3589
|
+
for (var t = U.length; t;) {
|
|
3590
|
+
for (W = U, U = []; ++G < t;) W && W[G].run();
|
|
3591
|
+
G = -1, t = U.length;
|
|
3592
3592
|
}
|
|
3593
|
-
|
|
3593
|
+
W = null, ie = !1, te(e);
|
|
3594
3594
|
}
|
|
3595
3595
|
}
|
|
3596
3596
|
function R(e, t) {
|
|
3597
3597
|
this.fun = e, this.array = t;
|
|
3598
3598
|
}
|
|
3599
3599
|
function z() {}
|
|
3600
|
-
var B, V, re, H,
|
|
3600
|
+
var B, V, re, H, U, ie, W, G, K, q, J = e((() => {
|
|
3601
3601
|
B = { exports: {} }, V = B.exports = {}, (function() {
|
|
3602
3602
|
try {
|
|
3603
3603
|
re = typeof setTimeout == "function" ? setTimeout : F;
|
|
@@ -3609,10 +3609,10 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
3609
3609
|
} catch {
|
|
3610
3610
|
H = I;
|
|
3611
3611
|
}
|
|
3612
|
-
})(),
|
|
3612
|
+
})(), U = [], ie = !1, G = -1, V.nextTick = function(e) {
|
|
3613
3613
|
var t = Array(arguments.length - 1);
|
|
3614
3614
|
if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
3615
|
-
|
|
3615
|
+
U.push(new R(e, t)), U.length === 1 && !ie && ee(L);
|
|
3616
3616
|
}, R.prototype.run = function() {
|
|
3617
3617
|
this.fun.apply(null, this.array);
|
|
3618
3618
|
}, V.title = "browser", V.browser = !0, V.env = {}, V.argv = [], V.version = "", V.versions = {}, V.on = z, V.addListener = z, V.once = z, V.off = z, V.removeListener = z, V.removeAllListeners = z, V.emit = z, V.prependListener = z, V.prependOnceListener = z, V.listeners = function(e) {
|
|
@@ -3625,9 +3625,9 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
3625
3625
|
throw Error("process.chdir is not supported");
|
|
3626
3626
|
}, V.umask = function() {
|
|
3627
3627
|
return 0;
|
|
3628
|
-
},
|
|
3629
|
-
})),
|
|
3630
|
-
b(),
|
|
3628
|
+
}, K = B.exports, q = /* @__PURE__ */ P(K);
|
|
3629
|
+
})), Y = /* @__PURE__ */ t(((e, t) => {
|
|
3630
|
+
b(), J();
|
|
3631
3631
|
var { BinaryFile: n, SymlinkRef: r, DeviceFile: i } = N(), a = new Uint8Array([
|
|
3632
3632
|
66,
|
|
3633
3633
|
82,
|
|
@@ -3766,8 +3766,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
3766
3766
|
let t = new DecompressionStream("gzip"), n = new Blob([e]).stream().pipeThrough(t), r = await new Response(n).arrayBuffer();
|
|
3767
3767
|
return new Uint8Array(r);
|
|
3768
3768
|
}
|
|
3769
|
-
if (
|
|
3770
|
-
let t =
|
|
3769
|
+
if (q !== void 0 && typeof q.getBuiltinModule == "function") {
|
|
3770
|
+
let t = q.getBuiltinModule("zlib");
|
|
3771
3771
|
if (t) return new Uint8Array(t.gunzipSync(y.from(e.buffer, e.byteOffset, e.byteLength)));
|
|
3772
3772
|
}
|
|
3773
3773
|
throw Error("Gzip decompression is not supported in this environment");
|
|
@@ -3786,8 +3786,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
3786
3786
|
return p(new Uint8Array(n), t);
|
|
3787
3787
|
}
|
|
3788
3788
|
if (typeof e == "string") {
|
|
3789
|
-
if (!/^https?:\/\//i.test(e) &&
|
|
3790
|
-
let n =
|
|
3789
|
+
if (!/^https?:\/\//i.test(e) && q !== void 0 && typeof q.getBuiltinModule == "function" && typeof window > "u") try {
|
|
3790
|
+
let n = q.getBuiltinModule("fs");
|
|
3791
3791
|
if (n && n.existsSync(e)) {
|
|
3792
3792
|
let r = await n.promises.readFile(e);
|
|
3793
3793
|
return p(new Uint8Array(r.buffer, r.byteOffset, r.byteLength), t);
|
|
@@ -3899,7 +3899,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
3899
3899
|
}
|
|
3900
3900
|
}
|
|
3901
3901
|
};
|
|
3902
|
-
})),
|
|
3902
|
+
})), X = /* @__PURE__ */ t(((e, t) => {
|
|
3903
3903
|
b();
|
|
3904
3904
|
var n = N(), { BinaryFile: r, SymlinkRef: i, DeviceFile: a } = n;
|
|
3905
3905
|
function o(e) {
|
|
@@ -3925,10 +3925,10 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
3925
3925
|
t.exports = class extends n {
|
|
3926
3926
|
constructor(e = "/", t = {}, n = {}, r = null) {
|
|
3927
3927
|
if (super(), t instanceof Uint8Array || t instanceof ArrayBuffer) {
|
|
3928
|
-
let { deserializeBinaryFilesystem: e } =
|
|
3928
|
+
let { deserializeBinaryFilesystem: e } = Y(), r = e(t);
|
|
3929
3929
|
t = r.filesystem, n = Object.assign({}, r.permissions, n);
|
|
3930
3930
|
} else if (t && typeof t == "object" && t.filesystem && (t.filesystem instanceof Uint8Array || typeof t.filesystem == "object") && (n = Object.assign({}, t.permissions || {}, n), t = t.filesystem, t instanceof Uint8Array || t instanceof ArrayBuffer)) {
|
|
3931
|
-
let { deserializeBinaryFilesystem: e } =
|
|
3931
|
+
let { deserializeBinaryFilesystem: e } = Y(), r = e(t);
|
|
3932
3932
|
t = r.filesystem, n = Object.assign({}, r.permissions, n);
|
|
3933
3933
|
}
|
|
3934
3934
|
o(t), this.fileSystem = t, this.permissions = Object.assign({}, n), this.cwd = e.endsWith("/") ? e : e + "/", this._onChange = r, this._changeScheduled = !1, this._initDevices();
|
|
@@ -3970,11 +3970,11 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
3970
3970
|
}), this._devices.stdin = new i("/dev/tty"), this._devices.stdout = new i("/dev/tty"), this._devices.stderr = new i("/dev/tty");
|
|
3971
3971
|
}
|
|
3972
3972
|
toBinaryContainer(e = {}) {
|
|
3973
|
-
let { serializeBinaryFilesystem: t } =
|
|
3973
|
+
let { serializeBinaryFilesystem: t } = Y();
|
|
3974
3974
|
return t(this.fileSystem, this.permissions, e);
|
|
3975
3975
|
}
|
|
3976
3976
|
static fromBinaryContainer(e, t = {}) {
|
|
3977
|
-
let { deserializeBinaryFilesystem: n } =
|
|
3977
|
+
let { deserializeBinaryFilesystem: n } = Y();
|
|
3978
3978
|
return n(e, t);
|
|
3979
3979
|
}
|
|
3980
3980
|
getFileByPath(e) {
|
|
@@ -4219,8 +4219,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
4219
4219
|
return null;
|
|
4220
4220
|
}
|
|
4221
4221
|
}, t.exports.BinaryFile = r, t.exports.SymlinkRef = i;
|
|
4222
|
-
})),
|
|
4223
|
-
|
|
4222
|
+
})), ae = /* @__PURE__ */ t(((e, t) => {
|
|
4223
|
+
J();
|
|
4224
4224
|
function n(e) {
|
|
4225
4225
|
if (typeof e != "string") throw TypeError("Path must be a string. Received " + JSON.stringify(e));
|
|
4226
4226
|
}
|
|
@@ -4258,7 +4258,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
4258
4258
|
resolve: function() {
|
|
4259
4259
|
for (var e = "", t = !1, i, a = arguments.length - 1; a >= -1 && !t; a--) {
|
|
4260
4260
|
var o;
|
|
4261
|
-
a >= 0 ? o = arguments[a] : (i === void 0 && (i =
|
|
4261
|
+
a >= 0 ? o = arguments[a] : (i === void 0 && (i = q.cwd()), o = i), n(o), o.length !== 0 && (e = o + "/" + e, t = o.charCodeAt(0) === 47);
|
|
4262
4262
|
}
|
|
4263
4263
|
return e = r(e, !t), t ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
|
|
4264
4264
|
},
|
|
@@ -4387,12 +4387,12 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
4387
4387
|
posix: null
|
|
4388
4388
|
};
|
|
4389
4389
|
a.posix = a, t.exports = a;
|
|
4390
|
-
})),
|
|
4391
|
-
b(),
|
|
4392
|
-
var r = O(), i =
|
|
4390
|
+
})), oe = /* @__PURE__ */ t(((e, t) => {
|
|
4391
|
+
b(), J();
|
|
4392
|
+
var r = O(), i = ae(), a = N(), { BinaryFile: o, SymlinkRef: s, isUtf8Text: c } = a;
|
|
4393
4393
|
t.exports = class extends a {
|
|
4394
4394
|
constructor(e = "/", t = null, n = {}) {
|
|
4395
|
-
super(), this._onChange = t, this._changeScheduled = !1, this._virtualFiles = {}, this._rootDir = n && n.rootDir ? i.resolve(n.rootDir) : null, this.cwd = this._normalizeCwd(e || (this._rootDir ? "/" :
|
|
4395
|
+
super(), this._onChange = t, this._changeScheduled = !1, this._virtualFiles = {}, this._rootDir = n && n.rootDir ? i.resolve(n.rootDir) : null, this.cwd = this._normalizeCwd(e || (this._rootDir ? "/" : q.cwd()));
|
|
4396
4396
|
}
|
|
4397
4397
|
get isRealFilesystem() {
|
|
4398
4398
|
return !0;
|
|
@@ -4675,8 +4675,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
4675
4675
|
}
|
|
4676
4676
|
}
|
|
4677
4677
|
};
|
|
4678
|
-
})),
|
|
4679
|
-
var n =
|
|
4678
|
+
})), se = /* @__PURE__ */ t(((e, t) => {
|
|
4679
|
+
var n = X();
|
|
4680
4680
|
t.exports = class {
|
|
4681
4681
|
constructor(e) {
|
|
4682
4682
|
this.options = e;
|
|
@@ -4710,7 +4710,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
4710
4710
|
return this.fs._getFileRaw(t) || null;
|
|
4711
4711
|
}
|
|
4712
4712
|
setNodeFilesystem(e) {
|
|
4713
|
-
let t =
|
|
4713
|
+
let t = oe(), n = this.fs._onChange;
|
|
4714
4714
|
this.fs = new t(e, n);
|
|
4715
4715
|
}
|
|
4716
4716
|
setFilesystem(e, t = {}) {
|
|
@@ -4730,7 +4730,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
4730
4730
|
typeof this._destroyFn == "function" && this._destroyFn(e);
|
|
4731
4731
|
}
|
|
4732
4732
|
};
|
|
4733
|
-
})),
|
|
4733
|
+
})), ce = /* @__PURE__ */ t(((e, t) => {
|
|
4734
4734
|
var r = k();
|
|
4735
4735
|
t.exports = class e {
|
|
4736
4736
|
static isCommandClass(e) {
|
|
@@ -4779,7 +4779,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
4779
4779
|
return r.createGenericWasmCommand(c, { moduleLoader: async () => n }, i);
|
|
4780
4780
|
}
|
|
4781
4781
|
};
|
|
4782
|
-
})),
|
|
4782
|
+
})), le = /* @__PURE__ */ t(((e, t) => {
|
|
4783
4783
|
var n = T(), r = class extends n {
|
|
4784
4784
|
static get name() {
|
|
4785
4785
|
return "test";
|
|
@@ -4864,7 +4864,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
4864
4864
|
}
|
|
4865
4865
|
}
|
|
4866
4866
|
};
|
|
4867
|
-
})),
|
|
4867
|
+
})), ue = /* @__PURE__ */ t(((e, t) => {
|
|
4868
4868
|
var n = T();
|
|
4869
4869
|
t.exports = class extends n {
|
|
4870
4870
|
static get name() {
|
|
@@ -4905,7 +4905,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
4905
4905
|
return o.forEach((e) => this.stdOut = e), Promise.resolve();
|
|
4906
4906
|
}
|
|
4907
4907
|
};
|
|
4908
|
-
})),
|
|
4908
|
+
})), de = /* @__PURE__ */ t(((e, t) => {
|
|
4909
4909
|
function n(e) {
|
|
4910
4910
|
return typeof e == "object" && !!e;
|
|
4911
4911
|
}
|
|
@@ -4916,7 +4916,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
4916
4916
|
return Array.isArray(e) ? e : e === void 0 ? [] : r(e) || e instanceof Set ? Array.from(e) : [e];
|
|
4917
4917
|
}
|
|
4918
4918
|
t.exports = i;
|
|
4919
|
-
})),
|
|
4919
|
+
})), Z = /* @__PURE__ */ t(((e, t) => {
|
|
4920
4920
|
function n(e, t, ...n) {
|
|
4921
4921
|
let r = [];
|
|
4922
4922
|
if (!Array.isArray(e)) throw Error("Input must be an array");
|
|
@@ -4936,7 +4936,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
4936
4936
|
return e;
|
|
4937
4937
|
}
|
|
4938
4938
|
t.exports = n;
|
|
4939
|
-
})),
|
|
4939
|
+
})), fe = /* @__PURE__ */ t(((e) => {
|
|
4940
4940
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4941
4941
|
function t(e) {
|
|
4942
4942
|
return !isNaN(parseFloat(e));
|
|
@@ -5015,10 +5015,10 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
5015
5015
|
isFunction: h,
|
|
5016
5016
|
isAsyncFunction: g
|
|
5017
5017
|
}, e.isArrayLike = i, e.isAsyncFunction = g, e.isClass = u, e.isDefined = o, e.isDefinedValue = l, e.isFiniteNumber = n, e.isFunction = h, e.isIterable = p, e.isNull = c, e.isNumber = t, e.isObject = a, e.isPlainObject = r, e.isPrimitive = d, e.isPromise = f, e.isString = m, e.isUndefined = s;
|
|
5018
|
-
})),
|
|
5019
|
-
|
|
5018
|
+
})), pe, me = e((() => {
|
|
5019
|
+
pe = globalThis || self;
|
|
5020
5020
|
})), he = /* @__PURE__ */ t(((e, t) => {
|
|
5021
|
-
|
|
5021
|
+
me();
|
|
5022
5022
|
var n = Infinity, r = "[object Symbol]", i = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, o = "\\ud800-\\udfff", s = "\\u0300-\\u036f\\ufe20-\\ufe23", c = "\\u20d0-\\u20f0", l = "\\u2700-\\u27bf", u = "a-z\\xdf-\\xf6\\xf8-\\xff", d = "\\xac\\xb1\\xd7\\xf7", f = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", p = "\\u2000-\\u206f", m = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", h = "A-Z\\xc0-\\xd6\\xd8-\\xde", g = "\\ufe0e\\ufe0f", _ = d + f + p + m, v = "['’]", y = "[" + o + "]", b = "[" + _ + "]", x = "[" + s + c + "]", S = "\\d+", C = "[" + l + "]", w = "[" + u + "]", T = "[^" + o + _ + S + l + u + h + "]", E = "\\ud83c[\\udffb-\\udfff]", D = "(?:" + x + "|" + E + ")", O = "[^" + o + "]", k = "(?:\\ud83c[\\udde6-\\uddff]){2}", A = "[\\ud800-\\udbff][\\udc00-\\udfff]", j = "[" + h + "]", M = "\\u200d", N = "(?:" + w + "|" + T + ")", P = "(?:" + j + "|" + T + ")", F = "(?:" + v + "(?:d|ll|m|re|s|t|ve))?", I = "(?:" + v + "(?:D|LL|M|RE|S|T|VE))?", ee = D + "?", te = "[" + g + "]?", ne = "(?:" + M + "(?:" + [
|
|
5023
5023
|
O,
|
|
5024
5024
|
k,
|
|
@@ -5048,7 +5048,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
5048
5048
|
j + "+" + I,
|
|
5049
5049
|
S,
|
|
5050
5050
|
R
|
|
5051
|
-
].join("|"), "g"),
|
|
5051
|
+
].join("|"), "g"), U = RegExp("[" + M + o + s + c + g + "]"), ie = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, W = {
|
|
5052
5052
|
À: "A",
|
|
5053
5053
|
Á: "A",
|
|
5054
5054
|
Â: "A",
|
|
@@ -5239,40 +5239,40 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
5239
5239
|
œ: "oe",
|
|
5240
5240
|
ʼn: "'n",
|
|
5241
5241
|
ſ: "ss"
|
|
5242
|
-
},
|
|
5243
|
-
function
|
|
5242
|
+
}, G = typeof pe == "object" && pe && pe.Object === Object && pe, K = typeof self == "object" && self && self.Object === Object && self, q = G || K || Function("return this")();
|
|
5243
|
+
function J(e, t, n, r) {
|
|
5244
5244
|
var i = -1, a = e ? e.length : 0;
|
|
5245
5245
|
for (r && a && (n = e[++i]); ++i < a;) n = t(n, e[i], i, e);
|
|
5246
5246
|
return n;
|
|
5247
5247
|
}
|
|
5248
|
-
function
|
|
5248
|
+
function Y(e) {
|
|
5249
5249
|
return e.split("");
|
|
5250
5250
|
}
|
|
5251
|
-
function
|
|
5251
|
+
function X(e) {
|
|
5252
5252
|
return e.match(i) || [];
|
|
5253
5253
|
}
|
|
5254
|
-
function
|
|
5254
|
+
function ae(e) {
|
|
5255
5255
|
return function(t) {
|
|
5256
5256
|
return e?.[t];
|
|
5257
5257
|
};
|
|
5258
5258
|
}
|
|
5259
|
-
var
|
|
5259
|
+
var oe = ae(W);
|
|
5260
|
+
function se(e) {
|
|
5261
|
+
return U.test(e);
|
|
5262
|
+
}
|
|
5260
5263
|
function ce(e) {
|
|
5261
5264
|
return ie.test(e);
|
|
5262
5265
|
}
|
|
5263
5266
|
function le(e) {
|
|
5264
|
-
return
|
|
5267
|
+
return se(e) ? ue(e) : Y(e);
|
|
5265
5268
|
}
|
|
5266
5269
|
function ue(e) {
|
|
5267
|
-
return ce(e) ? de(e) : J(e);
|
|
5268
|
-
}
|
|
5269
|
-
function de(e) {
|
|
5270
5270
|
return e.match(re) || [];
|
|
5271
5271
|
}
|
|
5272
|
-
function
|
|
5272
|
+
function de(e) {
|
|
5273
5273
|
return e.match(H) || [];
|
|
5274
5274
|
}
|
|
5275
|
-
var
|
|
5275
|
+
var Z = Object.prototype.toString, fe = q.Symbol, he = fe ? fe.prototype : void 0, ge = he ? he.toString : void 0;
|
|
5276
5276
|
function _e(e, t, n) {
|
|
5277
5277
|
var r = -1, i = e.length;
|
|
5278
5278
|
t < 0 && (t = -t > i ? 0 : i + t), n = n > i ? i : n, n < 0 && (n += i), i = t > n ? 0 : n - t >>> 0, t >>>= 0;
|
|
@@ -5292,20 +5292,20 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
5292
5292
|
function be(e) {
|
|
5293
5293
|
return function(t) {
|
|
5294
5294
|
t = we(t);
|
|
5295
|
-
var n =
|
|
5295
|
+
var n = se(t) ? le(t) : void 0, r = n ? n[0] : t.charAt(0), i = n ? ye(n, 1).join("") : t.slice(1);
|
|
5296
5296
|
return r[e]() + i;
|
|
5297
5297
|
};
|
|
5298
5298
|
}
|
|
5299
5299
|
function xe(e) {
|
|
5300
5300
|
return function(t) {
|
|
5301
|
-
return
|
|
5301
|
+
return J(ke(De(t).replace(B, "")), e, "");
|
|
5302
5302
|
};
|
|
5303
5303
|
}
|
|
5304
5304
|
function Se(e) {
|
|
5305
5305
|
return !!e && typeof e == "object";
|
|
5306
5306
|
}
|
|
5307
5307
|
function Ce(e) {
|
|
5308
|
-
return typeof e == "symbol" || Se(e) &&
|
|
5308
|
+
return typeof e == "symbol" || Se(e) && Z.call(e) == r;
|
|
5309
5309
|
}
|
|
5310
5310
|
function we(e) {
|
|
5311
5311
|
return e == null ? "" : ve(e);
|
|
@@ -5317,26 +5317,26 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
5317
5317
|
return Oe(we(e).toLowerCase());
|
|
5318
5318
|
}
|
|
5319
5319
|
function De(e) {
|
|
5320
|
-
return e = we(e), e && e.replace(a,
|
|
5320
|
+
return e = we(e), e && e.replace(a, oe).replace(V, "");
|
|
5321
5321
|
}
|
|
5322
5322
|
var Oe = be("toUpperCase");
|
|
5323
5323
|
function ke(e, t, n) {
|
|
5324
|
-
return e = we(e), t = n ? void 0 : t, t === void 0 ?
|
|
5324
|
+
return e = we(e), t = n ? void 0 : t, t === void 0 ? ce(e) ? de(e) : X(e) : e.match(t) || [];
|
|
5325
5325
|
}
|
|
5326
5326
|
t.exports = Te;
|
|
5327
5327
|
})), ge = /* @__PURE__ */ t(((e, t) => {
|
|
5328
|
-
|
|
5329
|
-
var n =
|
|
5328
|
+
J();
|
|
5329
|
+
var n = de(), r = Z(), i = fe(), a = he(), o = {
|
|
5330
5330
|
short: /^-([^\d-])$/,
|
|
5331
5331
|
long: /^--(\S+)/,
|
|
5332
5332
|
combinedShort: /^-[^\d-]{2,}$/,
|
|
5333
5333
|
optEquals: /^(--\S+?)=(.*)/
|
|
5334
5334
|
}, s = class extends Array {
|
|
5335
5335
|
load(e) {
|
|
5336
|
-
if (this.clear(), e && e !==
|
|
5336
|
+
if (this.clear(), e && e !== q.argv) e = n(e);
|
|
5337
5337
|
else {
|
|
5338
|
-
e =
|
|
5339
|
-
let t =
|
|
5338
|
+
e = q.argv.slice(0);
|
|
5339
|
+
let t = q.execArgv.some(m) ? 1 : 2;
|
|
5340
5340
|
e.splice(0, t);
|
|
5341
5341
|
}
|
|
5342
5342
|
e.forEach((e) => this.push(String(e)));
|
|
@@ -5926,6 +5926,233 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
5926
5926
|
}
|
|
5927
5927
|
};
|
|
5928
5928
|
})), xe = /* @__PURE__ */ t(((e, t) => {
|
|
5929
|
+
function n(e, t, n) {
|
|
5930
|
+
if (t === void 0 || t === "-") return typeof e.stdin == "string" ? e.stdin : (e.stdErr = `${n}: no input`, e.exitCode = 1, null);
|
|
5931
|
+
let r = e.fs.getFileByPath(t);
|
|
5932
|
+
return r == null ? (e.stdErr = `${n}: ${t}: ${e.fs.exists(t) ? "Permission denied" : "No such file or directory"}`, e.exitCode = 1, null) : r.constructor === Object ? (e.stdErr = `${n}: ${t}: Is a directory`, e.exitCode = 1, null) : r.toString();
|
|
5933
|
+
}
|
|
5934
|
+
function r(e) {
|
|
5935
|
+
return e === "" ? [] : (e.endsWith("\n") ? e.slice(0, -1) : e).split("\n");
|
|
5936
|
+
}
|
|
5937
|
+
t.exports = {
|
|
5938
|
+
readInput: n,
|
|
5939
|
+
toLines: r
|
|
5940
|
+
};
|
|
5941
|
+
})), Se = /* @__PURE__ */ t(((e, t) => {
|
|
5942
|
+
var n = T(), { readInput: r, toLines: i } = xe(), a = {
|
|
5943
|
+
alpha: "a-zA-Z",
|
|
5944
|
+
digit: "0-9",
|
|
5945
|
+
alnum: "a-zA-Z0-9",
|
|
5946
|
+
upper: "A-Z",
|
|
5947
|
+
lower: "a-z",
|
|
5948
|
+
space: "\\s",
|
|
5949
|
+
blank: " \\t",
|
|
5950
|
+
punct: "!-\\/:-@\\[-`{-~",
|
|
5951
|
+
xdigit: "0-9A-Fa-f"
|
|
5952
|
+
};
|
|
5953
|
+
function o(e, t) {
|
|
5954
|
+
let n = "";
|
|
5955
|
+
for (let r = 0; r < e.length; r++) {
|
|
5956
|
+
let i = e[r];
|
|
5957
|
+
if (i === "[") {
|
|
5958
|
+
let t = r + 1, i = "[";
|
|
5959
|
+
for (e[t] === "^" && (i += "^", t++), e[t] === "]" && (i += "\\]", t++); t < e.length && e[t] !== "]"; t++) {
|
|
5960
|
+
let n = /^\[:(\w+):\]/.exec(e.slice(t));
|
|
5961
|
+
n && a[n[1]] ? (i += a[n[1]], t += n[0].length - 1) : i += e[t] === "\\" ? "\\\\" : e[t];
|
|
5962
|
+
}
|
|
5963
|
+
if (t >= e.length) throw Error("unterminated address regex");
|
|
5964
|
+
n += `${i}]`, r = t;
|
|
5965
|
+
} else if (i === "\\" && r + 1 < e.length) {
|
|
5966
|
+
let i = e[++r];
|
|
5967
|
+
n += !t && "(){}+?|".includes(i) ? i : `\\${i}`;
|
|
5968
|
+
} else !t && "(){}+?|".includes(i) ? n += `\\${i}` : !t && i === "*" && (n === "" || n.endsWith("(")) ? n += "\\*" : n += i;
|
|
5969
|
+
}
|
|
5970
|
+
return n;
|
|
5971
|
+
}
|
|
5972
|
+
function s(e, t, n) {
|
|
5973
|
+
let r = "";
|
|
5974
|
+
for (; t < e.length; t++) if (e[t] === "\\" && t + 1 < e.length) r += e[t + 1] === n ? n : `\\${e[t + 1]}`, t++;
|
|
5975
|
+
else if (e[t] === n) return [r, t + 1];
|
|
5976
|
+
else r += e[t];
|
|
5977
|
+
throw Error("unterminated command");
|
|
5978
|
+
}
|
|
5979
|
+
function c(e) {
|
|
5980
|
+
let t = [], n = "";
|
|
5981
|
+
for (let r = 0; r < e.length; r++) if (e[r] === "\\" && r + 1 < e.length) {
|
|
5982
|
+
let i = e[++r];
|
|
5983
|
+
/\d/.test(i) ? (n && t.push(n), n = "", t.push(parseInt(i, 10))) : n += i === "n" ? "\n" : i === "t" ? " " : i;
|
|
5984
|
+
} else e[r] === "&" ? (n && t.push(n), n = "", t.push(0)) : n += e[r];
|
|
5985
|
+
return n && t.push(n), t;
|
|
5986
|
+
}
|
|
5987
|
+
t.exports = class extends n {
|
|
5988
|
+
static get name() {
|
|
5989
|
+
return "sed";
|
|
5990
|
+
}
|
|
5991
|
+
get requiresFilesystem() {
|
|
5992
|
+
return !0;
|
|
5993
|
+
}
|
|
5994
|
+
run() {
|
|
5995
|
+
let e = !1, t = !1, n = [], a = [], o = this.arguments;
|
|
5996
|
+
for (let r = 0; r < o.length; r++) {
|
|
5997
|
+
let i = o[r];
|
|
5998
|
+
if (i === "--") {
|
|
5999
|
+
a.push(...o.slice(r + 1));
|
|
6000
|
+
break;
|
|
6001
|
+
}
|
|
6002
|
+
if (i.length < 2 || !i.startsWith("-")) {
|
|
6003
|
+
a.push(i);
|
|
6004
|
+
continue;
|
|
6005
|
+
}
|
|
6006
|
+
for (let a = 1; a < i.length; a++) {
|
|
6007
|
+
let s = i[a];
|
|
6008
|
+
if (s === "n") e = !0;
|
|
6009
|
+
else if (s === "E" || s === "r") t = !0;
|
|
6010
|
+
else if (s === "e") {
|
|
6011
|
+
n.push(a + 1 < i.length ? i.slice(a + 1) : o[++r]);
|
|
6012
|
+
break;
|
|
6013
|
+
} else return this._fail(`invalid option -- ${s}`);
|
|
6014
|
+
}
|
|
6015
|
+
}
|
|
6016
|
+
if (n.length < 1 && a.length > 0 && n.push(a.shift()), n.length < 1 || n.some((e) => e === void 0)) return this._fail("usage: sed [-nEr] [-e script] script [file ...]");
|
|
6017
|
+
let s;
|
|
6018
|
+
try {
|
|
6019
|
+
this.lastRe = null, s = this._parse(n.join("\n"), t);
|
|
6020
|
+
} catch (e) {
|
|
6021
|
+
return this._fail(e.message);
|
|
6022
|
+
}
|
|
6023
|
+
let c = (a.length > 0 ? a : [void 0]).map((e) => r(this, e, "sed")).filter((e) => e !== null).flatMap(i);
|
|
6024
|
+
return this._execute(s, c, e), Promise.resolve();
|
|
6025
|
+
}
|
|
6026
|
+
_fail(e) {
|
|
6027
|
+
return this.stdErr = e.startsWith("usage") ? e : `sed: ${e}`, this.exitCode = 1, Promise.resolve();
|
|
6028
|
+
}
|
|
6029
|
+
_regex(e, t, n) {
|
|
6030
|
+
if (e === "") {
|
|
6031
|
+
if (!this.lastRe) throw Error("no previous regular expression");
|
|
6032
|
+
return new RegExp(this.lastRe.source, n);
|
|
6033
|
+
}
|
|
6034
|
+
let r = new RegExp(o(e, t), n);
|
|
6035
|
+
return this.lastRe = r, r;
|
|
6036
|
+
}
|
|
6037
|
+
_parse(e, t) {
|
|
6038
|
+
let n = [], r = 0, i = (t) => {
|
|
6039
|
+
for (; r < e.length && t.includes(e[r]);) r++;
|
|
6040
|
+
}, a = () => {
|
|
6041
|
+
if (/\d/.test(e[r] || "")) {
|
|
6042
|
+
let t = r;
|
|
6043
|
+
return i("0123456789"), {
|
|
6044
|
+
type: "line",
|
|
6045
|
+
n: parseInt(e.slice(t, r), 10)
|
|
6046
|
+
};
|
|
6047
|
+
}
|
|
6048
|
+
if (e[r] === "$") return r++, { type: "last" };
|
|
6049
|
+
if (e[r] === "/") {
|
|
6050
|
+
let [n, i] = s(e, r + 1, "/");
|
|
6051
|
+
return r = i, {
|
|
6052
|
+
type: "re",
|
|
6053
|
+
re: this._regex(n, t, "")
|
|
6054
|
+
};
|
|
6055
|
+
}
|
|
6056
|
+
};
|
|
6057
|
+
for (i(" \n;"); r < e.length; i(" \n;")) {
|
|
6058
|
+
let o = {};
|
|
6059
|
+
if (o.a1 = a(), o.a1 && e[r] === "," && (r++, o.a2 = a(), !o.a2)) throw Error("unexpected `,'");
|
|
6060
|
+
if (i(" "), e[r] === "!" && (o.negate = !0, r++, i(" ")), o.name = e[r++], o.name === "s") {
|
|
6061
|
+
let n = e[r++];
|
|
6062
|
+
if (!n || n === "\n" || n === "\\") throw Error("unterminated `s' command");
|
|
6063
|
+
let [i, a] = s(e, r, n), [l, u] = s(e, a, n);
|
|
6064
|
+
r = u, o.global = !1, o.print = !1, o.nth = 1;
|
|
6065
|
+
let d = "g";
|
|
6066
|
+
for (; r < e.length && /[gpiI\d]/.test(e[r]); r++) {
|
|
6067
|
+
let t = e[r];
|
|
6068
|
+
t === "g" ? o.global = !0 : t === "p" ? o.print = !0 : t === "i" || t === "I" ? d += "i" : o.nth = parseInt(t, 10) || 1;
|
|
6069
|
+
}
|
|
6070
|
+
o.re = this._regex(i, t, d), o.replacement = c(l);
|
|
6071
|
+
} else if (o.name === "y") {
|
|
6072
|
+
let t = e[r++], [n, i] = s(e, r, t), [a, c] = s(e, i, t);
|
|
6073
|
+
if (r = c, n.length !== a.length) throw Error("strings for `y' command are different lengths");
|
|
6074
|
+
o.map = Object.fromEntries([...n].map((e, t) => [e, a[t]]));
|
|
6075
|
+
} else if (!"dpq=".includes(o.name || "?")) throw Error(`unknown command: \`${o.name || ""}'`);
|
|
6076
|
+
if (i(" "), r < e.length && !";\n".includes(e[r])) throw Error("extra characters after command");
|
|
6077
|
+
n.push(o);
|
|
6078
|
+
}
|
|
6079
|
+
return n;
|
|
6080
|
+
}
|
|
6081
|
+
_matches(e, t, n, r) {
|
|
6082
|
+
return e.type === "line" ? t === e.n : e.type === "last" ? t === r : e.re.test(n);
|
|
6083
|
+
}
|
|
6084
|
+
_selected(e, t, n, r) {
|
|
6085
|
+
return e.a1 ? e.a2 ? e.active ? ((e.a2.type === "line" ? t >= e.a2.n : this._matches(e.a2, t, n, r)) && delete e.active, !0) : this._matches(e.a1, t, n, r) ? (e.a2.type === "line" && e.a2.n <= t || (e.active = !0), !0) : !1 : this._matches(e.a1, t, n, r) : !0;
|
|
6086
|
+
}
|
|
6087
|
+
_substitute(e, t) {
|
|
6088
|
+
let n = 0, r = !1;
|
|
6089
|
+
return {
|
|
6090
|
+
out: t.replace(e.re, (...t) => {
|
|
6091
|
+
if (n++, n < e.nth || !e.global && n > e.nth) return t[0];
|
|
6092
|
+
r = !0;
|
|
6093
|
+
let i = t.slice(0, -2);
|
|
6094
|
+
return e.replacement.map((e) => typeof e == "number" ? i[e] || "" : e).join("");
|
|
6095
|
+
}),
|
|
6096
|
+
replaced: r
|
|
6097
|
+
};
|
|
6098
|
+
}
|
|
6099
|
+
_execute(e, t, n) {
|
|
6100
|
+
for (let r = 0; r < t.length; r++) {
|
|
6101
|
+
let i = r + 1, a = t[r], o = !1, s = !1;
|
|
6102
|
+
for (let n of e) if (this._selected(n, i, a, t.length) !== !!n.negate) {
|
|
6103
|
+
if (n.name === "s") {
|
|
6104
|
+
let { out: e, replaced: t } = this._substitute(n, a);
|
|
6105
|
+
a = e, t && n.print && (this.stdOut = a);
|
|
6106
|
+
} else if (n.name === "y") a = [...a].map((e) => n.map[e] ?? e).join("");
|
|
6107
|
+
else if (n.name === "p") this.stdOut = a;
|
|
6108
|
+
else if (n.name === "=") this.stdOut = String(i);
|
|
6109
|
+
else if (n.name === "d") {
|
|
6110
|
+
o = !0;
|
|
6111
|
+
break;
|
|
6112
|
+
} else if (n.name === "q") {
|
|
6113
|
+
s = !0;
|
|
6114
|
+
break;
|
|
6115
|
+
}
|
|
6116
|
+
}
|
|
6117
|
+
if (!n && !o && (this.stdOut = a), s) return;
|
|
6118
|
+
}
|
|
6119
|
+
}
|
|
6120
|
+
};
|
|
6121
|
+
})), Ce = /* @__PURE__ */ t(((e, t) => {
|
|
6122
|
+
var n = T(), { readInput: r, toLines: i } = xe();
|
|
6123
|
+
t.exports = class extends n {
|
|
6124
|
+
static get name() {
|
|
6125
|
+
return "tail";
|
|
6126
|
+
}
|
|
6127
|
+
get requiresFilesystem() {
|
|
6128
|
+
return !0;
|
|
6129
|
+
}
|
|
6130
|
+
run() {
|
|
6131
|
+
let e = "10", t = !1, n = [], a = this.arguments;
|
|
6132
|
+
for (let r = 0; r < a.length; r++) {
|
|
6133
|
+
let i = a[r];
|
|
6134
|
+
if (i === "-n" || i === "-c") t = i === "-c", e = a[++r];
|
|
6135
|
+
else if (/^-[nc]./.test(i)) t = i[1] === "c", e = i.slice(2);
|
|
6136
|
+
else if (/^-\d+$/.test(i) || /^\+\d+$/.test(i)) e = i;
|
|
6137
|
+
else if (i === "-f" || i === "-q") continue;
|
|
6138
|
+
else if (i.startsWith("-") && i.length > 1) return this.stdErr = `tail: invalid option -- ${i.slice(1)}`, this.exitCode = 1, Promise.resolve();
|
|
6139
|
+
else n.push(i);
|
|
6140
|
+
}
|
|
6141
|
+
if (!/^[+-]?\d+$/.test(e || "")) return this.stdErr = `tail: invalid number: ${e}`, this.exitCode = 1, Promise.resolve();
|
|
6142
|
+
let o = e.startsWith("+"), s = Math.abs(parseInt(e, 10)), c = n.length > 0 ? n : [void 0];
|
|
6143
|
+
return c.forEach((e, n) => {
|
|
6144
|
+
let a = r(this, e, "tail");
|
|
6145
|
+
if (a === null) return;
|
|
6146
|
+
if (c.length > 1 && (n > 0 && (this.stdOut = ""), this.stdOut = `==> ${e === void 0 ? "standard input" : e} <==`), t) {
|
|
6147
|
+
i(o ? a.slice(Math.max(s - 1, 0)) : s < 1 ? "" : a.slice(-s)).forEach((e) => this.stdOut = e);
|
|
6148
|
+
return;
|
|
6149
|
+
}
|
|
6150
|
+
let l = i(a);
|
|
6151
|
+
(o ? l.slice(Math.max(s - 1, 0)) : s < 1 ? [] : l.slice(-s)).forEach((e) => this.stdOut = e);
|
|
6152
|
+
}), Promise.resolve();
|
|
6153
|
+
}
|
|
6154
|
+
};
|
|
6155
|
+
})), we = /* @__PURE__ */ t(((e, t) => {
|
|
5929
6156
|
var n = T();
|
|
5930
6157
|
t.exports = class extends n {
|
|
5931
6158
|
static get name() {
|
|
@@ -5935,7 +6162,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
5935
6162
|
return Promise.resolve();
|
|
5936
6163
|
}
|
|
5937
6164
|
};
|
|
5938
|
-
})),
|
|
6165
|
+
})), Te = /* @__PURE__ */ t(((e, t) => {
|
|
5939
6166
|
var n = T();
|
|
5940
6167
|
t.exports = class extends n {
|
|
5941
6168
|
static get name() {
|
|
@@ -5945,20 +6172,22 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
5945
6172
|
return this.exitCode = 1, Promise.resolve();
|
|
5946
6173
|
}
|
|
5947
6174
|
};
|
|
5948
|
-
})),
|
|
5949
|
-
var { Test: n, TestBracket: r } =
|
|
6175
|
+
})), Ee = /* @__PURE__ */ t(((e, t) => {
|
|
6176
|
+
var { Test: n, TestBracket: r } = le();
|
|
5950
6177
|
t.exports = [
|
|
5951
|
-
|
|
6178
|
+
ue(),
|
|
5952
6179
|
_e(),
|
|
5953
6180
|
ve(),
|
|
5954
6181
|
ye(),
|
|
5955
6182
|
be(),
|
|
5956
|
-
xe(),
|
|
5957
6183
|
Se(),
|
|
6184
|
+
Ce(),
|
|
6185
|
+
we(),
|
|
6186
|
+
Te(),
|
|
5958
6187
|
n,
|
|
5959
6188
|
r
|
|
5960
6189
|
];
|
|
5961
|
-
})),
|
|
6190
|
+
})), De = /* @__PURE__ */ t(((e, t) => {
|
|
5962
6191
|
var n = E();
|
|
5963
6192
|
t.exports = class extends n {
|
|
5964
6193
|
static get name() {
|
|
@@ -5970,7 +6199,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
5970
6199
|
return e.length === 2 ? (this.context.setAlias(e[0], e[1]), Promise.resolve()) : Promise.reject("alias requires a key and value delimited by '=' ie: key=value");
|
|
5971
6200
|
}
|
|
5972
6201
|
};
|
|
5973
|
-
})),
|
|
6202
|
+
})), Oe = /* @__PURE__ */ t(((e, t) => {
|
|
5974
6203
|
var n = E();
|
|
5975
6204
|
t.exports = class extends n {
|
|
5976
6205
|
static get name() {
|
|
@@ -5982,7 +6211,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
5982
6211
|
return e.length !== 2 && Promise.reject("export requires a key and value delimited by '=' ie: key=value"), this.context.setVar(e[0], e[1]), Promise.resolve();
|
|
5983
6212
|
}
|
|
5984
6213
|
};
|
|
5985
|
-
})),
|
|
6214
|
+
})), ke = /* @__PURE__ */ t(((e, t) => {
|
|
5986
6215
|
var n = E();
|
|
5987
6216
|
t.exports = class extends n {
|
|
5988
6217
|
static get name() {
|
|
@@ -5994,7 +6223,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
5994
6223
|
return e ? e.isDirectory ? (this.context.setCwd(this.arguments[0]), Promise.resolve()) : Promise.reject(`${this.arguments[0]}: Not a directory`) : Promise.reject("file or directory not found");
|
|
5995
6224
|
}
|
|
5996
6225
|
};
|
|
5997
|
-
})),
|
|
6226
|
+
})), Ae = /* @__PURE__ */ t(((e, t) => {
|
|
5998
6227
|
var n = E();
|
|
5999
6228
|
t.exports = class extends n {
|
|
6000
6229
|
static get name() {
|
|
@@ -6050,7 +6279,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6050
6279
|
return null;
|
|
6051
6280
|
}
|
|
6052
6281
|
};
|
|
6053
|
-
})),
|
|
6282
|
+
})), je = /* @__PURE__ */ t(((e, t) => {
|
|
6054
6283
|
var n = E(), r = O();
|
|
6055
6284
|
t.exports = class extends n {
|
|
6056
6285
|
static get name() {
|
|
@@ -6146,7 +6375,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6146
6375
|
return null;
|
|
6147
6376
|
}
|
|
6148
6377
|
};
|
|
6149
|
-
})),
|
|
6378
|
+
})), Me = /* @__PURE__ */ t(((e, t) => {
|
|
6150
6379
|
var n = E(), r = (() => {
|
|
6151
6380
|
try {
|
|
6152
6381
|
return O();
|
|
@@ -6219,7 +6448,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6219
6448
|
return Promise.resolve();
|
|
6220
6449
|
}
|
|
6221
6450
|
};
|
|
6222
|
-
})),
|
|
6451
|
+
})), Ne = /* @__PURE__ */ t(((e, t) => {
|
|
6223
6452
|
var n = E();
|
|
6224
6453
|
t.exports = class extends n {
|
|
6225
6454
|
static get name() {
|
|
@@ -6246,7 +6475,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6246
6475
|
return Promise.resolve();
|
|
6247
6476
|
}
|
|
6248
6477
|
};
|
|
6249
|
-
})),
|
|
6478
|
+
})), Pe = /* @__PURE__ */ t(((e, t) => {
|
|
6250
6479
|
var n = E(), r = O();
|
|
6251
6480
|
t.exports = class extends n {
|
|
6252
6481
|
static get name() {
|
|
@@ -6291,7 +6520,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6291
6520
|
continue;
|
|
6292
6521
|
}
|
|
6293
6522
|
try {
|
|
6294
|
-
let e =
|
|
6523
|
+
let e = ae();
|
|
6295
6524
|
r.mkdirSync(e.dirname(i), { recursive: !0 }), r.renameSync(n, i);
|
|
6296
6525
|
} catch (n) {
|
|
6297
6526
|
this.stdErr = `mv: cannot move '${e}' to '${t}': ${n.message}`, this.exitCode = 1;
|
|
@@ -6319,7 +6548,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6319
6548
|
return t;
|
|
6320
6549
|
}
|
|
6321
6550
|
};
|
|
6322
|
-
})),
|
|
6551
|
+
})), Fe = /* @__PURE__ */ t(((e, t) => {
|
|
6323
6552
|
var n = E();
|
|
6324
6553
|
t.exports = class extends n {
|
|
6325
6554
|
static get name() {
|
|
@@ -6330,7 +6559,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6330
6559
|
return this.stdOut = e.endsWith("/") && e !== "/" ? e.slice(0, -1) : e, Promise.resolve();
|
|
6331
6560
|
}
|
|
6332
6561
|
};
|
|
6333
|
-
})),
|
|
6562
|
+
})), Ie = /* @__PURE__ */ t(((e, t) => {
|
|
6334
6563
|
var n = E(), r = O();
|
|
6335
6564
|
t.exports = class extends n {
|
|
6336
6565
|
static get name() {
|
|
@@ -6375,7 +6604,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6375
6604
|
this.fs.deleteFileByPath(e);
|
|
6376
6605
|
}
|
|
6377
6606
|
};
|
|
6378
|
-
})),
|
|
6607
|
+
})), Le = /* @__PURE__ */ t(((e, t) => {
|
|
6379
6608
|
var n = E(), r = (() => {
|
|
6380
6609
|
try {
|
|
6381
6610
|
return O();
|
|
@@ -6444,7 +6673,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6444
6673
|
].join("");
|
|
6445
6674
|
}
|
|
6446
6675
|
};
|
|
6447
|
-
})),
|
|
6676
|
+
})), Re = /* @__PURE__ */ t(((e, t) => {
|
|
6448
6677
|
var n = E(), r = (() => {
|
|
6449
6678
|
try {
|
|
6450
6679
|
return O();
|
|
@@ -6485,7 +6714,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6485
6714
|
return Promise.resolve();
|
|
6486
6715
|
}
|
|
6487
6716
|
};
|
|
6488
|
-
})),
|
|
6717
|
+
})), ze = /* @__PURE__ */ t(((e, t) => {
|
|
6489
6718
|
var n = E();
|
|
6490
6719
|
t.exports = class extends n {
|
|
6491
6720
|
static get name() {
|
|
@@ -6497,7 +6726,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6497
6726
|
return !t || t.constructor === Object || t.constructor === String && !t.startsWith("#!") && !this.context.fs.isExecutable(e) ? Promise.reject() : Promise.resolve(e);
|
|
6498
6727
|
}
|
|
6499
6728
|
};
|
|
6500
|
-
})),
|
|
6729
|
+
})), Be = /* @__PURE__ */ t(((e, t) => {
|
|
6501
6730
|
var n = D(), r = E();
|
|
6502
6731
|
t.exports = class extends r {
|
|
6503
6732
|
static get name() {
|
|
@@ -6526,7 +6755,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6526
6755
|
return Promise.reject(`${e}: permission denied`);
|
|
6527
6756
|
}
|
|
6528
6757
|
};
|
|
6529
|
-
})),
|
|
6758
|
+
})), Ve = /* @__PURE__ */ t(((e, t) => {
|
|
6530
6759
|
var n = E();
|
|
6531
6760
|
t.exports = class extends n {
|
|
6532
6761
|
static get name() {
|
|
@@ -6536,7 +6765,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6536
6765
|
return this.arguments.length > 0 ? Promise.reject("clear does not require arguments") : (this.stdout && this.stdout.write("\x1B[2J\x1B[3J\x1B[H"), this.context.clear(), Promise.resolve());
|
|
6537
6766
|
}
|
|
6538
6767
|
};
|
|
6539
|
-
})),
|
|
6768
|
+
})), He = /* @__PURE__ */ t(((e, t) => {
|
|
6540
6769
|
var n = E();
|
|
6541
6770
|
t.exports = class extends n {
|
|
6542
6771
|
static get name() {
|
|
@@ -6547,7 +6776,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6547
6776
|
return this.exitCode = e, this.context.destroy(e), Promise.resolve();
|
|
6548
6777
|
}
|
|
6549
6778
|
};
|
|
6550
|
-
})),
|
|
6779
|
+
})), Ue = /* @__PURE__ */ t(((e, t) => {
|
|
6551
6780
|
var n = E(), r = ge();
|
|
6552
6781
|
t.exports = class extends n {
|
|
6553
6782
|
static get name() {
|
|
@@ -6566,7 +6795,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6566
6795
|
} catch (e) {
|
|
6567
6796
|
return this.printHelp(e), Promise.reject();
|
|
6568
6797
|
}
|
|
6569
|
-
return e.help ? (this.printHelp(), Promise.resolve()) : (this.nchars = e.nchars, this.
|
|
6798
|
+
return e.help ? (this.printHelp(), Promise.resolve()) : (this.nchars = e.nchars, this.names = e.name || [], this.raw = e.raw, new Promise((t) => {
|
|
6570
6799
|
let n = setTimeout(() => {
|
|
6571
6800
|
t(), this.exitCode = 1;
|
|
6572
6801
|
}, e.timeout ? e.timeout * 1e3 : 864e5);
|
|
@@ -6576,20 +6805,32 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6576
6805
|
}));
|
|
6577
6806
|
}
|
|
6578
6807
|
onInput(e) {
|
|
6579
|
-
if (this.inputBuffer ||= "",
|
|
6580
|
-
this.
|
|
6808
|
+
if (this.inputBuffer ||= "", !this.raw && !this.escaped && e === "\\") {
|
|
6809
|
+
this.escaped = !0;
|
|
6581
6810
|
return;
|
|
6582
6811
|
}
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6812
|
+
this.escaped && (delete this.escaped, e === "Enter") || e.length === 1 && (this.inputBuffer += e, this.inputBuffer.length !== this.nchars) || (e === "Enter" || this.inputBuffer.length === this.nchars) && this._finish();
|
|
6813
|
+
}
|
|
6814
|
+
_finish() {
|
|
6815
|
+
if (this.names.length < 1) return this.completionCallback(this.inputBuffer);
|
|
6816
|
+
let e = this.context.vars.IFS;
|
|
6817
|
+
this._split(this.inputBuffer, e === void 0 ? " \n" : e).forEach((e, t) => this.context.setVar(this.names[t], e)), this.completionCallback();
|
|
6818
|
+
}
|
|
6819
|
+
_split(e, t) {
|
|
6820
|
+
let { names: n } = this, r = (e) => e.replace(/[\]\\^-]/g, "\\$&"), i = r(t.replace(/[^ \t\n]/g, "")), a = r(t.replace(/[ \t\n]/g, "")), o = (e) => i ? e.replace(RegExp(`^[${i}]+`), "") : e, s = (e) => i ? e.replace(RegExp(`[${i}]+$`), "") : e, c = t === "" ? null : RegExp(a ? `[${i}]*[${a}][${i}]*|[${i}]+` : `[${i}]+`), l = o(e);
|
|
6821
|
+
return n.map((e, t) => {
|
|
6822
|
+
if (t === n.length - 1) return s(l);
|
|
6823
|
+
let r = c && c.exec(l);
|
|
6824
|
+
if (!r) {
|
|
6825
|
+
let e = l;
|
|
6826
|
+
return l = "", e;
|
|
6587
6827
|
}
|
|
6588
|
-
|
|
6589
|
-
|
|
6828
|
+
let i = l.slice(0, r.index);
|
|
6829
|
+
return l = l.slice(r.index + r[0].length), i;
|
|
6830
|
+
});
|
|
6590
6831
|
}
|
|
6591
6832
|
printHelp(e) {
|
|
6592
|
-
e && (this.stdOut = e.message), this.stdOut = "usage: read [-n nchars] [-p prompt] [-t timeout] [name ...]";
|
|
6833
|
+
e && (this.stdOut = e.message), this.stdOut = "usage: read [-r] [-n nchars] [-p prompt] [-t timeout] [name ...]";
|
|
6593
6834
|
}
|
|
6594
6835
|
parseArgs() {
|
|
6595
6836
|
return r([
|
|
@@ -6608,6 +6849,11 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6608
6849
|
alias: "t",
|
|
6609
6850
|
type: Number
|
|
6610
6851
|
},
|
|
6852
|
+
{
|
|
6853
|
+
name: "raw",
|
|
6854
|
+
alias: "r",
|
|
6855
|
+
type: Boolean
|
|
6856
|
+
},
|
|
6611
6857
|
{
|
|
6612
6858
|
name: "help",
|
|
6613
6859
|
alias: "h",
|
|
@@ -6615,13 +6861,14 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6615
6861
|
},
|
|
6616
6862
|
{
|
|
6617
6863
|
defaultOption: !0,
|
|
6864
|
+
multiple: !0,
|
|
6618
6865
|
name: "name",
|
|
6619
6866
|
type: String
|
|
6620
6867
|
}
|
|
6621
6868
|
], { argv: this.arguments });
|
|
6622
6869
|
}
|
|
6623
6870
|
};
|
|
6624
|
-
})),
|
|
6871
|
+
})), We = /* @__PURE__ */ t(((e, t) => {
|
|
6625
6872
|
var n = E(), r = T();
|
|
6626
6873
|
t.exports = class extends n {
|
|
6627
6874
|
static get name() {
|
|
@@ -6657,7 +6904,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6657
6904
|
}), this.context.setCommand(a), Promise.resolve();
|
|
6658
6905
|
}
|
|
6659
6906
|
};
|
|
6660
|
-
})),
|
|
6907
|
+
})), Ge = /* @__PURE__ */ t(((e, t) => {
|
|
6661
6908
|
var n = E();
|
|
6662
6909
|
function r(e) {
|
|
6663
6910
|
return e >= 1048576 ? (e / 1048576).toFixed(1) + " MB" : e >= 1024 ? (e / 1024).toFixed(1) + " KB" : e + " B";
|
|
@@ -6756,7 +7003,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6756
7003
|
let e = new TextDecoder().decode(t);
|
|
6757
7004
|
this.fs.setFileByPath(s, e, !0);
|
|
6758
7005
|
} else {
|
|
6759
|
-
let { BinaryFile: e } =
|
|
7006
|
+
let { BinaryFile: e } = X(), r = e ? new e(t.buffer, n || "application/octet-stream") : t;
|
|
6760
7007
|
this.fs.setFileByPath(s, r, !0);
|
|
6761
7008
|
}
|
|
6762
7009
|
} catch (e) {
|
|
@@ -6778,7 +7025,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6778
7025
|
});
|
|
6779
7026
|
}
|
|
6780
7027
|
};
|
|
6781
|
-
})),
|
|
7028
|
+
})), Ke = /* @__PURE__ */ t(((e, t) => {
|
|
6782
7029
|
var n = E(), r = {
|
|
6783
7030
|
errexit: "e",
|
|
6784
7031
|
xtrace: "x",
|
|
@@ -6835,18 +7082,15 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6835
7082
|
t ? n.includes(e) || this.context.setVar("-", n + e) : this.context.setVar("-", n.split("").filter((t) => t !== e).join(""));
|
|
6836
7083
|
}
|
|
6837
7084
|
};
|
|
6838
|
-
})),
|
|
6839
|
-
var n =
|
|
7085
|
+
})), qe = /* @__PURE__ */ t(((e, t) => {
|
|
7086
|
+
var n = Be();
|
|
6840
7087
|
t.exports = class extends n {
|
|
6841
7088
|
static get name() {
|
|
6842
7089
|
return ".";
|
|
6843
7090
|
}
|
|
6844
7091
|
};
|
|
6845
|
-
})),
|
|
7092
|
+
})), Je = /* @__PURE__ */ t(((e, t) => {
|
|
6846
7093
|
t.exports = [
|
|
6847
|
-
we(),
|
|
6848
|
-
Te(),
|
|
6849
|
-
Ee(),
|
|
6850
7094
|
De(),
|
|
6851
7095
|
Oe(),
|
|
6852
7096
|
ke(),
|
|
@@ -6864,56 +7108,59 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6864
7108
|
Ve(),
|
|
6865
7109
|
He(),
|
|
6866
7110
|
Ue(),
|
|
6867
|
-
We()
|
|
7111
|
+
We(),
|
|
7112
|
+
Ge(),
|
|
7113
|
+
Ke(),
|
|
7114
|
+
qe()
|
|
6868
7115
|
];
|
|
6869
|
-
})),
|
|
7116
|
+
})), Ye = /* @__PURE__ */ t(((e, t) => {
|
|
6870
7117
|
t.exports = Object;
|
|
6871
|
-
})),
|
|
7118
|
+
})), Xe = /* @__PURE__ */ t(((e, t) => {
|
|
6872
7119
|
t.exports = Error;
|
|
6873
|
-
})),
|
|
7120
|
+
})), Ze = /* @__PURE__ */ t(((e, t) => {
|
|
6874
7121
|
t.exports = EvalError;
|
|
6875
|
-
})),
|
|
7122
|
+
})), Qe = /* @__PURE__ */ t(((e, t) => {
|
|
6876
7123
|
t.exports = RangeError;
|
|
6877
|
-
})),
|
|
7124
|
+
})), $e = /* @__PURE__ */ t(((e, t) => {
|
|
6878
7125
|
t.exports = ReferenceError;
|
|
6879
|
-
})),
|
|
7126
|
+
})), et = /* @__PURE__ */ t(((e, t) => {
|
|
6880
7127
|
t.exports = SyntaxError;
|
|
6881
7128
|
})), Q = /* @__PURE__ */ t(((e, t) => {
|
|
6882
7129
|
t.exports = TypeError;
|
|
6883
|
-
})),
|
|
7130
|
+
})), tt = /* @__PURE__ */ t(((e, t) => {
|
|
6884
7131
|
t.exports = URIError;
|
|
6885
|
-
})),
|
|
7132
|
+
})), nt = /* @__PURE__ */ t(((e, t) => {
|
|
6886
7133
|
t.exports = Math.abs;
|
|
6887
|
-
})),
|
|
7134
|
+
})), rt = /* @__PURE__ */ t(((e, t) => {
|
|
6888
7135
|
t.exports = Math.floor;
|
|
6889
|
-
})),
|
|
7136
|
+
})), it = /* @__PURE__ */ t(((e, t) => {
|
|
6890
7137
|
t.exports = Math.max;
|
|
6891
|
-
})),
|
|
7138
|
+
})), at = /* @__PURE__ */ t(((e, t) => {
|
|
6892
7139
|
t.exports = Math.min;
|
|
6893
|
-
})),
|
|
7140
|
+
})), ot = /* @__PURE__ */ t(((e, t) => {
|
|
6894
7141
|
t.exports = Math.pow;
|
|
6895
|
-
})),
|
|
7142
|
+
})), st = /* @__PURE__ */ t(((e, t) => {
|
|
6896
7143
|
t.exports = Math.round;
|
|
6897
|
-
})),
|
|
7144
|
+
})), ct = /* @__PURE__ */ t(((e, t) => {
|
|
6898
7145
|
t.exports = Number.isNaN || function(e) {
|
|
6899
7146
|
return e !== e;
|
|
6900
7147
|
};
|
|
6901
|
-
})),
|
|
6902
|
-
var n =
|
|
7148
|
+
})), lt = /* @__PURE__ */ t(((e, t) => {
|
|
7149
|
+
var n = ct();
|
|
6903
7150
|
t.exports = function(e) {
|
|
6904
7151
|
return n(e) || e === 0 ? e : e < 0 ? -1 : 1;
|
|
6905
7152
|
};
|
|
6906
|
-
})),
|
|
7153
|
+
})), ut = /* @__PURE__ */ t(((e, t) => {
|
|
6907
7154
|
t.exports = Object.getOwnPropertyDescriptor;
|
|
6908
|
-
})),
|
|
6909
|
-
var n =
|
|
7155
|
+
})), dt = /* @__PURE__ */ t(((e, t) => {
|
|
7156
|
+
var n = ut();
|
|
6910
7157
|
if (n) try {
|
|
6911
7158
|
n([], "length");
|
|
6912
7159
|
} catch {
|
|
6913
7160
|
n = null;
|
|
6914
7161
|
}
|
|
6915
7162
|
t.exports = n;
|
|
6916
|
-
})),
|
|
7163
|
+
})), ft = /* @__PURE__ */ t(((e, t) => {
|
|
6917
7164
|
var n = Object.defineProperty || !1;
|
|
6918
7165
|
if (n) try {
|
|
6919
7166
|
n({}, "a", { value: 1 });
|
|
@@ -6921,7 +7168,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6921
7168
|
n = !1;
|
|
6922
7169
|
}
|
|
6923
7170
|
t.exports = n;
|
|
6924
|
-
})),
|
|
7171
|
+
})), pt = /* @__PURE__ */ t(((e, t) => {
|
|
6925
7172
|
t.exports = function() {
|
|
6926
7173
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1;
|
|
6927
7174
|
if (typeof Symbol.iterator == "symbol") return !0;
|
|
@@ -6938,16 +7185,16 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6938
7185
|
}
|
|
6939
7186
|
return !0;
|
|
6940
7187
|
};
|
|
6941
|
-
})),
|
|
6942
|
-
var n = typeof Symbol < "u" && Symbol, r =
|
|
7188
|
+
})), mt = /* @__PURE__ */ t(((e, t) => {
|
|
7189
|
+
var n = typeof Symbol < "u" && Symbol, r = pt();
|
|
6943
7190
|
t.exports = function() {
|
|
6944
7191
|
return typeof n != "function" || typeof Symbol != "function" || typeof n("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
|
|
6945
7192
|
};
|
|
6946
|
-
})),
|
|
7193
|
+
})), ht = /* @__PURE__ */ t(((e, t) => {
|
|
6947
7194
|
t.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
|
|
6948
|
-
})),
|
|
6949
|
-
t.exports =
|
|
6950
|
-
})),
|
|
7195
|
+
})), gt = /* @__PURE__ */ t(((e, t) => {
|
|
7196
|
+
t.exports = Ye().getPrototypeOf || null;
|
|
7197
|
+
})), _t = /* @__PURE__ */ t(((e, t) => {
|
|
6951
7198
|
var n = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, i = Math.max, a = "[object Function]", o = function(e, t) {
|
|
6952
7199
|
for (var n = [], r = 0; r < e.length; r += 1) n[r] = e[r];
|
|
6953
7200
|
for (var i = 0; i < t.length; i += 1) n[i + e.length] = t[i];
|
|
@@ -6975,26 +7222,26 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
6975
7222
|
}
|
|
6976
7223
|
return u;
|
|
6977
7224
|
};
|
|
6978
|
-
})),
|
|
6979
|
-
var n =
|
|
7225
|
+
})), vt = /* @__PURE__ */ t(((e, t) => {
|
|
7226
|
+
var n = _t();
|
|
6980
7227
|
t.exports = Function.prototype.bind || n;
|
|
6981
|
-
})),
|
|
7228
|
+
})), yt = /* @__PURE__ */ t(((e, t) => {
|
|
6982
7229
|
t.exports = Function.prototype.call;
|
|
6983
|
-
})),
|
|
7230
|
+
})), bt = /* @__PURE__ */ t(((e, t) => {
|
|
6984
7231
|
t.exports = Function.prototype.apply;
|
|
6985
|
-
})),
|
|
7232
|
+
})), xt = /* @__PURE__ */ t(((e, t) => {
|
|
6986
7233
|
t.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
|
|
6987
|
-
})),
|
|
6988
|
-
var n =
|
|
6989
|
-
t.exports =
|
|
6990
|
-
})),
|
|
6991
|
-
var n =
|
|
7234
|
+
})), St = /* @__PURE__ */ t(((e, t) => {
|
|
7235
|
+
var n = vt(), r = bt(), i = yt();
|
|
7236
|
+
t.exports = xt() || n.call(i, r);
|
|
7237
|
+
})), Ct = /* @__PURE__ */ t(((e, t) => {
|
|
7238
|
+
var n = vt(), r = Q(), i = yt(), a = St();
|
|
6992
7239
|
t.exports = function(e) {
|
|
6993
7240
|
if (e.length < 1 || typeof e[0] != "function") throw new r("a function is required");
|
|
6994
7241
|
return a(n, i, e);
|
|
6995
7242
|
};
|
|
6996
|
-
})),
|
|
6997
|
-
var n =
|
|
7243
|
+
})), wt = /* @__PURE__ */ t(((e, t) => {
|
|
7244
|
+
var n = Ct(), r = dt(), i;
|
|
6998
7245
|
try {
|
|
6999
7246
|
i = [].__proto__ === Array.prototype;
|
|
7000
7247
|
} catch (e) {
|
|
@@ -7004,8 +7251,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7004
7251
|
t.exports = a && typeof a.get == "function" ? n([a.get]) : typeof s == "function" ? function(e) {
|
|
7005
7252
|
return s(e == null ? e : o(e));
|
|
7006
7253
|
} : !1;
|
|
7007
|
-
})),
|
|
7008
|
-
var n =
|
|
7254
|
+
})), Tt = /* @__PURE__ */ t(((e, t) => {
|
|
7255
|
+
var n = ht(), r = gt(), i = wt();
|
|
7009
7256
|
t.exports = n ? function(e) {
|
|
7010
7257
|
return n(e);
|
|
7011
7258
|
} : r ? function(e) {
|
|
@@ -7014,15 +7261,15 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7014
7261
|
} : i ? function(e) {
|
|
7015
7262
|
return i(e);
|
|
7016
7263
|
} : null;
|
|
7017
|
-
})),
|
|
7264
|
+
})), Et = /* @__PURE__ */ t(((e, t) => {
|
|
7018
7265
|
var n = Function.prototype.call, r = Object.prototype.hasOwnProperty;
|
|
7019
|
-
t.exports =
|
|
7266
|
+
t.exports = vt().call(n, r);
|
|
7020
7267
|
})), $ = /* @__PURE__ */ t(((e, t) => {
|
|
7021
|
-
var n, r =
|
|
7268
|
+
var n, r = Ye(), i = Xe(), a = Ze(), o = Qe(), s = $e(), c = et(), l = Q(), u = tt(), d = nt(), f = rt(), p = it(), m = at(), h = ot(), g = st(), _ = lt(), v = Function, y = function(e) {
|
|
7022
7269
|
try {
|
|
7023
7270
|
return v("\"use strict\"; return (" + e + ").constructor;")();
|
|
7024
7271
|
} catch {}
|
|
7025
|
-
}, b =
|
|
7272
|
+
}, b = dt(), x = ft(), S = function() {
|
|
7026
7273
|
throw new l();
|
|
7027
7274
|
}, C = b ? function() {
|
|
7028
7275
|
try {
|
|
@@ -7034,7 +7281,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7034
7281
|
return S;
|
|
7035
7282
|
}
|
|
7036
7283
|
}
|
|
7037
|
-
}() : S, w =
|
|
7284
|
+
}() : S, w = mt()(), T = Tt(), E = gt(), D = ht(), O = bt(), k = yt(), A = {}, j = typeof Uint8Array > "u" || !T ? n : T(Uint8Array), M = {
|
|
7038
7285
|
__proto__: null,
|
|
7039
7286
|
"%AggregateError%": typeof AggregateError > "u" ? n : AggregateError,
|
|
7040
7287
|
"%Array%": Array,
|
|
@@ -7224,7 +7471,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7224
7471
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
7225
7472
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
7226
7473
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
7227
|
-
}, F =
|
|
7474
|
+
}, F = vt(), I = Et(), ee = F.call(k, Array.prototype.concat), te = F.call(O, Array.prototype.splice), ne = F.call(k, String.prototype.replace), L = F.call(k, String.prototype.slice), R = F.call(k, RegExp.prototype.exec), z = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, B = /\\(\\)?/g, V = function(e) {
|
|
7228
7475
|
var t = L(e, 0, 1), n = L(e, -1);
|
|
7229
7476
|
if (t === "%" && n !== "%") throw new c("invalid intrinsic syntax, expected closing `%`");
|
|
7230
7477
|
if (n === "%" && t !== "%") throw new c("invalid intrinsic syntax, expected opening `%`");
|
|
@@ -7269,8 +7516,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7269
7516
|
}
|
|
7270
7517
|
return o;
|
|
7271
7518
|
};
|
|
7272
|
-
})),
|
|
7273
|
-
var n =
|
|
7519
|
+
})), Dt = /* @__PURE__ */ t(((e, t) => {
|
|
7520
|
+
var n = ft(), r = et(), i = Q(), a = dt();
|
|
7274
7521
|
t.exports = function(e, t, o) {
|
|
7275
7522
|
if (!e || typeof e != "object" && typeof e != "function") throw new i("`obj` must be an object or a function`");
|
|
7276
7523
|
if (typeof t != "string" && typeof t != "symbol") throw new i("`property` must be a string or a symbol`");
|
|
@@ -7288,8 +7535,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7288
7535
|
else if (u || !s && !c && !l) e[t] = o;
|
|
7289
7536
|
else throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
7290
7537
|
};
|
|
7291
|
-
})),
|
|
7292
|
-
var n =
|
|
7538
|
+
})), Ot = /* @__PURE__ */ t(((e, t) => {
|
|
7539
|
+
var n = ft(), r = function() {
|
|
7293
7540
|
return !!n;
|
|
7294
7541
|
};
|
|
7295
7542
|
r.hasArrayLengthDefineBug = function() {
|
|
@@ -7300,8 +7547,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7300
7547
|
return !0;
|
|
7301
7548
|
}
|
|
7302
7549
|
}, t.exports = r;
|
|
7303
|
-
})),
|
|
7304
|
-
var n = $(), r =
|
|
7550
|
+
})), kt = /* @__PURE__ */ t(((e, t) => {
|
|
7551
|
+
var n = $(), r = Dt(), i = Ot()(), a = dt(), o = Q(), s = n("%Math.floor%");
|
|
7305
7552
|
t.exports = function(e, t) {
|
|
7306
7553
|
if (typeof e != "function") throw new o("`fn` is not a function");
|
|
7307
7554
|
if (typeof t != "number" || t < 0 || t > 4294967295 || s(t) !== t) throw new o("`length` must be a positive 32-bit integer");
|
|
@@ -7312,27 +7559,27 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7312
7559
|
}
|
|
7313
7560
|
return (c || l || !n) && (i ? r(e, "length", t, !0, !0) : r(e, "length", t)), e;
|
|
7314
7561
|
};
|
|
7315
|
-
})),
|
|
7316
|
-
var n =
|
|
7562
|
+
})), At = /* @__PURE__ */ t(((e, t) => {
|
|
7563
|
+
var n = vt(), r = bt(), i = St();
|
|
7317
7564
|
t.exports = function() {
|
|
7318
7565
|
return i(n, r, arguments);
|
|
7319
7566
|
};
|
|
7320
|
-
})),
|
|
7321
|
-
var n =
|
|
7567
|
+
})), jt = /* @__PURE__ */ t(((e, t) => {
|
|
7568
|
+
var n = kt(), r = ft(), i = Ct(), a = At();
|
|
7322
7569
|
t.exports = function(e) {
|
|
7323
7570
|
var t = i(arguments), r = 1 + e.length - (arguments.length - 1);
|
|
7324
7571
|
return n(t, r > 0 ? r : 0, !0);
|
|
7325
7572
|
}, r ? r(t.exports, "apply", { value: a }) : t.exports.apply = a;
|
|
7326
|
-
})),
|
|
7573
|
+
})), Mt = /* @__PURE__ */ t(((e, t) => {
|
|
7327
7574
|
var n = Object.prototype.toString;
|
|
7328
7575
|
t.exports = function(e) {
|
|
7329
7576
|
var t = n.call(e), r = t === "[object Arguments]";
|
|
7330
7577
|
return r ||= t !== "[object Array]" && typeof e == "object" && !!e && typeof e.length == "number" && e.length >= 0 && n.call(e.callee) === "[object Function]", r;
|
|
7331
7578
|
};
|
|
7332
|
-
})),
|
|
7579
|
+
})), Nt = /* @__PURE__ */ t(((e, t) => {
|
|
7333
7580
|
var n;
|
|
7334
7581
|
if (!Object.keys) {
|
|
7335
|
-
var r = Object.prototype.hasOwnProperty, i = Object.prototype.toString, a =
|
|
7582
|
+
var r = Object.prototype.hasOwnProperty, i = Object.prototype.toString, a = Mt(), o = Object.prototype.propertyIsEnumerable, s = !o.call({ toString: null }, "toString"), c = o.call(function() {}, "prototype"), l = [
|
|
7336
7583
|
"toString",
|
|
7337
7584
|
"toLocaleString",
|
|
7338
7585
|
"valueOf",
|
|
@@ -7399,10 +7646,10 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7399
7646
|
};
|
|
7400
7647
|
}
|
|
7401
7648
|
t.exports = n;
|
|
7402
|
-
})),
|
|
7403
|
-
var n = Array.prototype.slice, r =
|
|
7649
|
+
})), Pt = /* @__PURE__ */ t(((e, t) => {
|
|
7650
|
+
var n = Array.prototype.slice, r = Mt(), i = Object.keys, a = i ? function(e) {
|
|
7404
7651
|
return i(e);
|
|
7405
|
-
} :
|
|
7652
|
+
} : Nt(), o = Object.keys;
|
|
7406
7653
|
a.shim = function() {
|
|
7407
7654
|
return Object.keys ? function() {
|
|
7408
7655
|
var e = Object.keys(arguments);
|
|
@@ -7411,10 +7658,10 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7411
7658
|
return r(e) ? o(n.call(e)) : o(e);
|
|
7412
7659
|
}) : Object.keys = a, Object.keys || a;
|
|
7413
7660
|
}, t.exports = a;
|
|
7414
|
-
})),
|
|
7415
|
-
var n =
|
|
7661
|
+
})), Ft = /* @__PURE__ */ t(((e, t) => {
|
|
7662
|
+
var n = Pt(), r = typeof Symbol == "function" && typeof Symbol("foo") == "symbol", i = Object.prototype.toString, a = Array.prototype.concat, o = Dt(), s = function(e) {
|
|
7416
7663
|
return typeof e == "function" && i.call(e) === "[object Function]";
|
|
7417
|
-
}, c =
|
|
7664
|
+
}, c = Ot()(), l = function(e, t, n, r) {
|
|
7418
7665
|
if (t in e) {
|
|
7419
7666
|
if (r === !0) {
|
|
7420
7667
|
if (e[t] === n) return;
|
|
@@ -7427,30 +7674,30 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7427
7674
|
for (var s = 0; s < o.length; s += 1) l(e, o[s], t[o[s]], i[o[s]]);
|
|
7428
7675
|
};
|
|
7429
7676
|
u.supportsDescriptors = !!c, t.exports = u;
|
|
7430
|
-
})),
|
|
7431
|
-
var n = $(), r =
|
|
7677
|
+
})), It = /* @__PURE__ */ t(((e, t) => {
|
|
7678
|
+
var n = $(), r = Ct(), i = r([n("%String.prototype.indexOf%")]);
|
|
7432
7679
|
t.exports = function(e, t) {
|
|
7433
7680
|
var a = n(e, !!t);
|
|
7434
7681
|
return typeof a == "function" && i(e, ".prototype.") > -1 ? r([a]) : a;
|
|
7435
7682
|
};
|
|
7436
|
-
})),
|
|
7437
|
-
var n = $()("%Array%"), r = !n.isArray &&
|
|
7683
|
+
})), Lt = /* @__PURE__ */ t(((e, t) => {
|
|
7684
|
+
var n = $()("%Array%"), r = !n.isArray && It()("Object.prototype.toString");
|
|
7438
7685
|
t.exports = n.isArray || function(e) {
|
|
7439
7686
|
return r(e) === "[object Array]";
|
|
7440
7687
|
};
|
|
7441
|
-
})),
|
|
7442
|
-
t.exports =
|
|
7443
|
-
})),
|
|
7444
|
-
var n = $(), r =
|
|
7688
|
+
})), Rt = /* @__PURE__ */ t(((e, t) => {
|
|
7689
|
+
t.exports = Lt();
|
|
7690
|
+
})), zt = /* @__PURE__ */ t(((e, t) => {
|
|
7691
|
+
var n = $(), r = It(), i = Q(), a = Rt(), o = n("%Reflect.apply%", !0) || r("Function.prototype.apply");
|
|
7445
7692
|
t.exports = function(e, t) {
|
|
7446
7693
|
var n = arguments.length > 2 ? arguments[2] : [];
|
|
7447
7694
|
if (!a(n)) throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");
|
|
7448
7695
|
return o(e, t, n);
|
|
7449
7696
|
};
|
|
7450
|
-
})),
|
|
7697
|
+
})), Bt = /* @__PURE__ */ t(((e, t) => {
|
|
7451
7698
|
t.exports = {};
|
|
7452
|
-
})),
|
|
7453
|
-
|
|
7699
|
+
})), Vt = /* @__PURE__ */ t(((e, t) => {
|
|
7700
|
+
me();
|
|
7454
7701
|
var n = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, i = n && r && typeof r.get == "function" ? r.get : null, a = n && Map.prototype.forEach, o = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && o ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, c = o && s && typeof s.get == "function" ? s.get : null, l = o && Set.prototype.forEach, u = typeof WeakMap == "function" && WeakMap.prototype ? WeakMap.prototype.has : null, d = typeof WeakSet == "function" && WeakSet.prototype ? WeakSet.prototype.has : null, f = typeof WeakRef == "function" && WeakRef.prototype ? WeakRef.prototype.deref : null, p = Boolean.prototype.valueOf, m = Object.prototype.toString, h = Function.prototype.toString, g = String.prototype.match, _ = String.prototype.slice, v = String.prototype.replace, y = String.prototype.toUpperCase, b = String.prototype.toLowerCase, x = RegExp.prototype.test, S = Array.prototype.concat, C = Array.prototype.join, w = Array.prototype.slice, T = Math.floor, E = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, D = Object.getOwnPropertySymbols, O = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, k = typeof Symbol == "function" && typeof Symbol.iterator == "object", A = typeof Symbol == "function" && Symbol.toStringTag ? Symbol.toStringTag : null, j = Object.prototype.propertyIsEnumerable, M = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
|
|
7455
7702
|
return e.__proto__;
|
|
7456
7703
|
} : null);
|
|
@@ -7466,7 +7713,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7466
7713
|
}
|
|
7467
7714
|
return v.call(t, n, "$&_");
|
|
7468
7715
|
}
|
|
7469
|
-
var P =
|
|
7716
|
+
var P = Bt(), F = P.custom, I = W(F) ? F : null, ee = {
|
|
7470
7717
|
__proto__: null,
|
|
7471
7718
|
double: "\"",
|
|
7472
7719
|
single: "'"
|
|
@@ -7477,17 +7724,17 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7477
7724
|
};
|
|
7478
7725
|
t.exports = function e(t, n, r, o) {
|
|
7479
7726
|
var s = n || {};
|
|
7480
|
-
if (
|
|
7481
|
-
if (
|
|
7482
|
-
var u =
|
|
7727
|
+
if (q(s, "quoteStyle") && !q(ee, s.quoteStyle)) throw TypeError("option \"quoteStyle\" must be \"single\" or \"double\"");
|
|
7728
|
+
if (q(s, "maxStringLength") && (typeof s.maxStringLength == "number" ? s.maxStringLength < 0 && s.maxStringLength !== Infinity : s.maxStringLength !== null)) throw TypeError("option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`");
|
|
7729
|
+
var u = q(s, "customInspect") ? s.customInspect : !0;
|
|
7483
7730
|
if (typeof u != "boolean" && u !== "symbol") throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
7484
|
-
if (
|
|
7485
|
-
if (
|
|
7731
|
+
if (q(s, "indent") && s.indent !== null && s.indent !== " " && !(parseInt(s.indent, 10) === s.indent && s.indent > 0)) throw TypeError("option \"indent\" must be \"\\t\", an integer > 0, or `null`");
|
|
7732
|
+
if (q(s, "numericSeparator") && typeof s.numericSeparator != "boolean") throw TypeError("option \"numericSeparator\", if provided, must be `true` or `false`");
|
|
7486
7733
|
var d = s.numericSeparator;
|
|
7487
7734
|
if (t === void 0) return "undefined";
|
|
7488
7735
|
if (t === null) return "null";
|
|
7489
7736
|
if (typeof t == "boolean") return t ? "true" : "false";
|
|
7490
|
-
if (typeof t == "string") return
|
|
7737
|
+
if (typeof t == "string") return de(t, s);
|
|
7491
7738
|
if (typeof t == "number") {
|
|
7492
7739
|
if (t === 0) return Infinity / t > 0 ? "0" : "-0";
|
|
7493
7740
|
var f = String(t);
|
|
@@ -7501,62 +7748,62 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7501
7748
|
if (r === void 0 && (r = 0), r >= h && h > 0 && typeof t == "object") return z(t) ? "[Array]" : "[Object]";
|
|
7502
7749
|
var g = ve(s, r);
|
|
7503
7750
|
if (o === void 0) o = [];
|
|
7504
|
-
else if (
|
|
7751
|
+
else if (X(o, t) >= 0) return "[Circular]";
|
|
7505
7752
|
function y(t, n, i) {
|
|
7506
7753
|
if (n && (o = w.call(o), o.push(n)), i) {
|
|
7507
7754
|
var a = { depth: s.depth };
|
|
7508
|
-
return
|
|
7755
|
+
return q(s, "quoteStyle") && (a.quoteStyle = s.quoteStyle), e(t, a, r + 1, o);
|
|
7509
7756
|
}
|
|
7510
7757
|
return e(t, s, r + 1, o);
|
|
7511
7758
|
}
|
|
7512
7759
|
if (typeof t == "function" && !V(t)) {
|
|
7513
|
-
var x =
|
|
7760
|
+
var x = Y(t), T = be(t, y);
|
|
7514
7761
|
return "[Function" + (x ? ": " + x : " (anonymous)") + "]" + (T.length > 0 ? " { " + C.call(T, ", ") + " }" : "");
|
|
7515
7762
|
}
|
|
7516
|
-
if (
|
|
7763
|
+
if (W(t)) {
|
|
7517
7764
|
var D = k ? v.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : O.call(t);
|
|
7518
|
-
return typeof t == "object" && !k ?
|
|
7765
|
+
return typeof t == "object" && !k ? fe(D) : D;
|
|
7519
7766
|
}
|
|
7520
|
-
if (
|
|
7767
|
+
if (ue(t)) {
|
|
7521
7768
|
for (var F = "<" + b.call(String(t.nodeName)), te = t.attributes || [], R = 0; R < te.length; R++) F += " " + te[R].name + "=" + ne(L(te[R].value), "double", s);
|
|
7522
7769
|
return F += ">", t.childNodes && t.childNodes.length && (F += "..."), F += "</" + b.call(String(t.nodeName)) + ">", F;
|
|
7523
7770
|
}
|
|
7524
7771
|
if (z(t)) {
|
|
7525
7772
|
if (t.length === 0) return "[]";
|
|
7526
|
-
var
|
|
7527
|
-
return g && !_e(
|
|
7773
|
+
var K = be(t, y);
|
|
7774
|
+
return g && !_e(K) ? "[" + ye(K, g) + "]" : "[ " + C.call(K, ", ") + " ]";
|
|
7528
7775
|
}
|
|
7529
7776
|
if (re(t)) {
|
|
7530
|
-
var
|
|
7531
|
-
return !("cause" in Error.prototype) && "cause" in t && !j.call(t, "cause") ? "{ [" + String(t) + "] " + C.call(S.call("[cause]: " + y(t.cause),
|
|
7777
|
+
var Z = be(t, y);
|
|
7778
|
+
return !("cause" in Error.prototype) && "cause" in t && !j.call(t, "cause") ? "{ [" + String(t) + "] " + C.call(S.call("[cause]: " + y(t.cause), Z), ", ") + " }" : Z.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + C.call(Z, ", ") + " }";
|
|
7532
7779
|
}
|
|
7533
7780
|
if (typeof t == "object" && u) {
|
|
7534
7781
|
if (I && typeof t[I] == "function" && P) return P(t, { depth: h - r });
|
|
7535
7782
|
if (u !== "symbol" && typeof t.inspect == "function") return t.inspect();
|
|
7536
7783
|
}
|
|
7537
|
-
if (
|
|
7538
|
-
var
|
|
7784
|
+
if (ae(t)) {
|
|
7785
|
+
var me = [];
|
|
7539
7786
|
return a && a.call(t, function(e, n) {
|
|
7540
|
-
|
|
7541
|
-
}), ge("Map", i.call(t),
|
|
7787
|
+
me.push(y(n, t, !0) + " => " + y(e, t));
|
|
7788
|
+
}), ge("Map", i.call(t), me, g);
|
|
7542
7789
|
}
|
|
7543
|
-
if (
|
|
7790
|
+
if (ce(t)) {
|
|
7544
7791
|
var xe = [];
|
|
7545
7792
|
return l && l.call(t, function(e) {
|
|
7546
7793
|
xe.push(y(e, t));
|
|
7547
7794
|
}), ge("Set", c.call(t), xe, g);
|
|
7548
7795
|
}
|
|
7549
|
-
if (
|
|
7550
|
-
if (
|
|
7551
|
-
if (
|
|
7552
|
-
if (
|
|
7553
|
-
if (
|
|
7554
|
-
if (
|
|
7555
|
-
if (H(t)) return
|
|
7796
|
+
if (oe(t)) return he("WeakMap");
|
|
7797
|
+
if (le(t)) return he("WeakSet");
|
|
7798
|
+
if (se(t)) return he("WeakRef");
|
|
7799
|
+
if (U(t)) return fe(y(Number(t)));
|
|
7800
|
+
if (G(t)) return fe(y(E.call(t)));
|
|
7801
|
+
if (ie(t)) return fe(p.call(t));
|
|
7802
|
+
if (H(t)) return fe(y(String(t)));
|
|
7556
7803
|
if (typeof window < "u" && t === window) return "{ [object Window] }";
|
|
7557
|
-
if (typeof globalThis < "u" && t === globalThis ||
|
|
7804
|
+
if (typeof globalThis < "u" && t === globalThis || pe !== void 0 && t === pe) return "{ [object globalThis] }";
|
|
7558
7805
|
if (!B(t) && !V(t)) {
|
|
7559
|
-
var Se = be(t, y), Ce = M ? M(t) === Object.prototype : t instanceof Object || t.constructor === Object, we = t instanceof Object ? "" : "null prototype", Te = !Ce && A && Object(t) === t && A in t ? _.call(
|
|
7806
|
+
var Se = be(t, y), Ce = M ? M(t) === Object.prototype : t instanceof Object || t.constructor === Object, we = t instanceof Object ? "" : "null prototype", Te = !Ce && A && Object(t) === t && A in t ? _.call(J(t), 8, -1) : we ? "Object" : "", Ee = (Ce || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "") + (Te || we ? "[" + C.call(S.call([], Te || [], we || []), ": ") + "] " : "");
|
|
7560
7807
|
return Se.length === 0 ? Ee + "{}" : g ? Ee + "{" + ye(Se, g) + "}" : Ee + "{ " + C.call(Se, ", ") + " }";
|
|
7561
7808
|
}
|
|
7562
7809
|
return String(t);
|
|
@@ -7572,27 +7819,27 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7572
7819
|
return !A || !(typeof e == "object" && (A in e || e[A] !== void 0));
|
|
7573
7820
|
}
|
|
7574
7821
|
function z(e) {
|
|
7575
|
-
return
|
|
7822
|
+
return J(e) === "[object Array]" && R(e);
|
|
7576
7823
|
}
|
|
7577
7824
|
function B(e) {
|
|
7578
|
-
return
|
|
7825
|
+
return J(e) === "[object Date]" && R(e);
|
|
7579
7826
|
}
|
|
7580
7827
|
function V(e) {
|
|
7581
|
-
return
|
|
7828
|
+
return J(e) === "[object RegExp]" && R(e);
|
|
7582
7829
|
}
|
|
7583
7830
|
function re(e) {
|
|
7584
|
-
return
|
|
7831
|
+
return J(e) === "[object Error]" && R(e);
|
|
7585
7832
|
}
|
|
7586
7833
|
function H(e) {
|
|
7587
|
-
return
|
|
7834
|
+
return J(e) === "[object String]" && R(e);
|
|
7588
7835
|
}
|
|
7589
|
-
function
|
|
7590
|
-
return
|
|
7836
|
+
function U(e) {
|
|
7837
|
+
return J(e) === "[object Number]" && R(e);
|
|
7591
7838
|
}
|
|
7592
|
-
function
|
|
7593
|
-
return
|
|
7839
|
+
function ie(e) {
|
|
7840
|
+
return J(e) === "[object Boolean]" && R(e);
|
|
7594
7841
|
}
|
|
7595
|
-
function
|
|
7842
|
+
function W(e) {
|
|
7596
7843
|
if (k) return e && typeof e == "object" && e instanceof Symbol;
|
|
7597
7844
|
if (typeof e == "symbol") return !0;
|
|
7598
7845
|
if (!e || typeof e != "object" || !O) return !1;
|
|
@@ -7601,33 +7848,33 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7601
7848
|
} catch {}
|
|
7602
7849
|
return !1;
|
|
7603
7850
|
}
|
|
7604
|
-
function
|
|
7851
|
+
function G(e) {
|
|
7605
7852
|
if (!e || typeof e != "object" || !E) return !1;
|
|
7606
7853
|
try {
|
|
7607
7854
|
return E.call(e), !0;
|
|
7608
7855
|
} catch {}
|
|
7609
7856
|
return !1;
|
|
7610
7857
|
}
|
|
7611
|
-
var
|
|
7858
|
+
var K = Object.prototype.hasOwnProperty || function(e) {
|
|
7612
7859
|
return e in this;
|
|
7613
7860
|
};
|
|
7614
|
-
function
|
|
7615
|
-
return
|
|
7861
|
+
function q(e, t) {
|
|
7862
|
+
return K.call(e, t);
|
|
7616
7863
|
}
|
|
7617
|
-
function
|
|
7864
|
+
function J(e) {
|
|
7618
7865
|
return m.call(e);
|
|
7619
7866
|
}
|
|
7620
|
-
function
|
|
7867
|
+
function Y(e) {
|
|
7621
7868
|
if (e.name) return e.name;
|
|
7622
7869
|
var t = g.call(h.call(e), /^function\s*([\w$]+)/);
|
|
7623
7870
|
return t ? t[1] : null;
|
|
7624
7871
|
}
|
|
7625
|
-
function
|
|
7872
|
+
function X(e, t) {
|
|
7626
7873
|
if (e.indexOf) return e.indexOf(t);
|
|
7627
7874
|
for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n;
|
|
7628
7875
|
return -1;
|
|
7629
7876
|
}
|
|
7630
|
-
function
|
|
7877
|
+
function ae(e) {
|
|
7631
7878
|
if (!i || !e || typeof e != "object") return !1;
|
|
7632
7879
|
try {
|
|
7633
7880
|
i.call(e);
|
|
@@ -7640,7 +7887,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7640
7887
|
} catch {}
|
|
7641
7888
|
return !1;
|
|
7642
7889
|
}
|
|
7643
|
-
function
|
|
7890
|
+
function oe(e) {
|
|
7644
7891
|
if (!u || !e || typeof e != "object") return !1;
|
|
7645
7892
|
try {
|
|
7646
7893
|
u.call(e, u);
|
|
@@ -7653,14 +7900,14 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7653
7900
|
} catch {}
|
|
7654
7901
|
return !1;
|
|
7655
7902
|
}
|
|
7656
|
-
function
|
|
7903
|
+
function se(e) {
|
|
7657
7904
|
if (!f || !e || typeof e != "object") return !1;
|
|
7658
7905
|
try {
|
|
7659
7906
|
return f.call(e), !0;
|
|
7660
7907
|
} catch {}
|
|
7661
7908
|
return !1;
|
|
7662
7909
|
}
|
|
7663
|
-
function
|
|
7910
|
+
function ce(e) {
|
|
7664
7911
|
if (!c || !e || typeof e != "object") return !1;
|
|
7665
7912
|
try {
|
|
7666
7913
|
c.call(e);
|
|
@@ -7673,7 +7920,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7673
7920
|
} catch {}
|
|
7674
7921
|
return !1;
|
|
7675
7922
|
}
|
|
7676
|
-
function
|
|
7923
|
+
function le(e) {
|
|
7677
7924
|
if (!d || !e || typeof e != "object") return !1;
|
|
7678
7925
|
try {
|
|
7679
7926
|
d.call(e, d);
|
|
@@ -7686,18 +7933,18 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7686
7933
|
} catch {}
|
|
7687
7934
|
return !1;
|
|
7688
7935
|
}
|
|
7689
|
-
function
|
|
7936
|
+
function ue(e) {
|
|
7690
7937
|
return !e || typeof e != "object" ? !1 : typeof HTMLElement < "u" && e instanceof HTMLElement ? !0 : typeof e.nodeName == "string" && typeof e.getAttribute == "function";
|
|
7691
7938
|
}
|
|
7692
|
-
function
|
|
7939
|
+
function de(e, t) {
|
|
7693
7940
|
if (e.length > t.maxStringLength) {
|
|
7694
7941
|
var n = e.length - t.maxStringLength, r = "... " + n + " more character" + (n > 1 ? "s" : "");
|
|
7695
|
-
return
|
|
7942
|
+
return de(_.call(e, 0, t.maxStringLength), t) + r;
|
|
7696
7943
|
}
|
|
7697
7944
|
var i = te[t.quoteStyle || "single"];
|
|
7698
|
-
return i.lastIndex = 0, ne(v.call(v.call(e, i, "\\$1"), /[\x00-\x1f]/g,
|
|
7945
|
+
return i.lastIndex = 0, ne(v.call(v.call(e, i, "\\$1"), /[\x00-\x1f]/g, Z), "single", t);
|
|
7699
7946
|
}
|
|
7700
|
-
function
|
|
7947
|
+
function Z(e) {
|
|
7701
7948
|
var t = e.charCodeAt(0), n = {
|
|
7702
7949
|
8: "b",
|
|
7703
7950
|
9: "t",
|
|
@@ -7707,7 +7954,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7707
7954
|
}[t];
|
|
7708
7955
|
return n ? "\\" + n : "\\x" + (t < 16 ? "0" : "") + y.call(t.toString(16));
|
|
7709
7956
|
}
|
|
7710
|
-
function
|
|
7957
|
+
function fe(e) {
|
|
7711
7958
|
return "Object(" + e + ")";
|
|
7712
7959
|
}
|
|
7713
7960
|
function he(e) {
|
|
@@ -7718,7 +7965,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7718
7965
|
return e + " (" + t + ") {" + i + "}";
|
|
7719
7966
|
}
|
|
7720
7967
|
function _e(e) {
|
|
7721
|
-
for (var t = 0; t < e.length; t++) if (
|
|
7968
|
+
for (var t = 0; t < e.length; t++) if (X(e[t], "\n") >= 0) return !1;
|
|
7722
7969
|
return !0;
|
|
7723
7970
|
}
|
|
7724
7971
|
function ve(e, t) {
|
|
@@ -7740,39 +7987,39 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7740
7987
|
var n = z(e), r = [];
|
|
7741
7988
|
if (n) {
|
|
7742
7989
|
r.length = e.length;
|
|
7743
|
-
for (var i = 0; i < e.length; i++) r[i] =
|
|
7990
|
+
for (var i = 0; i < e.length; i++) r[i] = q(e, i) ? t(e[i], e) : "";
|
|
7744
7991
|
}
|
|
7745
7992
|
var a = typeof D == "function" ? D(e) : [], o;
|
|
7746
7993
|
if (k) {
|
|
7747
7994
|
o = {};
|
|
7748
7995
|
for (var s = 0; s < a.length; s++) o["$" + a[s]] = a[s];
|
|
7749
7996
|
}
|
|
7750
|
-
for (var c in e)
|
|
7997
|
+
for (var c in e) q(e, c) && (n && String(Number(c)) === c && c < e.length || k && o["$" + c] instanceof Symbol || (x.call(/[^\w$]/, c) ? r.push(t(c, e) + ": " + t(e[c], e)) : r.push(c + ": " + t(e[c], e))));
|
|
7751
7998
|
if (typeof D == "function") for (var l = 0; l < a.length; l++) j.call(e, a[l]) && r.push("[" + t(a[l]) + "]: " + t(e[a[l]], e));
|
|
7752
7999
|
return r;
|
|
7753
8000
|
}
|
|
7754
|
-
})),
|
|
8001
|
+
})), Ht = /* @__PURE__ */ t(((e, t) => {
|
|
7755
8002
|
t.exports = function(e) {
|
|
7756
8003
|
return typeof e == "string" || typeof e == "symbol";
|
|
7757
8004
|
};
|
|
7758
|
-
})),
|
|
8005
|
+
})), Ut = /* @__PURE__ */ t(((e, t) => {
|
|
7759
8006
|
t.exports = function(e) {
|
|
7760
8007
|
return !!e && (typeof e == "function" || typeof e == "object");
|
|
7761
8008
|
};
|
|
7762
|
-
})),
|
|
7763
|
-
var n = Q(), r =
|
|
8009
|
+
})), Wt = /* @__PURE__ */ t(((e, t) => {
|
|
8010
|
+
var n = Q(), r = Vt(), i = Ht(), a = Ut();
|
|
7764
8011
|
t.exports = function(e, t) {
|
|
7765
8012
|
if (!a(e)) throw new n("Assertion failed: Type(O) is not Object");
|
|
7766
8013
|
if (!i(t)) throw new n("Assertion failed: P is not a Property Key, got " + r(t));
|
|
7767
8014
|
return e[t];
|
|
7768
8015
|
};
|
|
7769
|
-
})),
|
|
7770
|
-
var n = Q(), r =
|
|
8016
|
+
})), Gt = /* @__PURE__ */ t(((e, t) => {
|
|
8017
|
+
var n = Q(), r = Vt(), i = Ht();
|
|
7771
8018
|
t.exports = function(e, t) {
|
|
7772
8019
|
if (!i(t)) throw new n("Assertion failed: P is not a Property Key, got " + r(t));
|
|
7773
8020
|
return e[t];
|
|
7774
8021
|
};
|
|
7775
|
-
})),
|
|
8022
|
+
})), Kt = /* @__PURE__ */ t(((e, t) => {
|
|
7776
8023
|
var n = Function.prototype.toString, r = typeof Reflect == "object" && Reflect !== null && Reflect.apply, i, a;
|
|
7777
8024
|
if (typeof r == "function" && typeof Object.defineProperty == "function") try {
|
|
7778
8025
|
i = Object.defineProperty({}, "length", { get: function() {
|
|
@@ -7827,10 +8074,10 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7827
8074
|
var t = l.call(e);
|
|
7828
8075
|
return t !== d && t !== f && !/^\[object HTML/.test(t) ? !1 : c(e);
|
|
7829
8076
|
};
|
|
7830
|
-
})),
|
|
7831
|
-
t.exports =
|
|
7832
|
-
})),
|
|
7833
|
-
var n = Q(), r =
|
|
8077
|
+
})), qt = /* @__PURE__ */ t(((e, t) => {
|
|
8078
|
+
t.exports = Kt();
|
|
8079
|
+
})), Jt = /* @__PURE__ */ t(((e, t) => {
|
|
8080
|
+
var n = Q(), r = Gt(), i = qt(), a = Ht(), o = Vt();
|
|
7834
8081
|
t.exports = function(e, t) {
|
|
7835
8082
|
if (!a(t)) throw new n("Assertion failed: P is not a Property Key");
|
|
7836
8083
|
var s = r(e, t);
|
|
@@ -7839,13 +8086,13 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7839
8086
|
return s;
|
|
7840
8087
|
}
|
|
7841
8088
|
};
|
|
7842
|
-
})),
|
|
7843
|
-
var n =
|
|
8089
|
+
})), Yt = /* @__PURE__ */ t(((e, t) => {
|
|
8090
|
+
var n = pt();
|
|
7844
8091
|
t.exports = function() {
|
|
7845
8092
|
return n() && !!Symbol.toStringTag;
|
|
7846
8093
|
};
|
|
7847
|
-
})),
|
|
7848
|
-
var n =
|
|
8094
|
+
})), Xt = /* @__PURE__ */ t(((e, t) => {
|
|
8095
|
+
var n = It(), r = Yt()(), i = Et(), a = dt(), o;
|
|
7849
8096
|
if (r) {
|
|
7850
8097
|
var s = n("RegExp.prototype.exec"), c = {}, l = function() {
|
|
7851
8098
|
throw c;
|
|
@@ -7870,12 +8117,12 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7870
8117
|
};
|
|
7871
8118
|
}
|
|
7872
8119
|
t.exports = o;
|
|
7873
|
-
})),
|
|
8120
|
+
})), Zt = /* @__PURE__ */ t(((e, t) => {
|
|
7874
8121
|
t.exports = function(e) {
|
|
7875
8122
|
return !!e;
|
|
7876
8123
|
};
|
|
7877
|
-
})),
|
|
7878
|
-
var n = $()("%Symbol.match%", !0), r =
|
|
8124
|
+
})), Qt = /* @__PURE__ */ t(((e, t) => {
|
|
8125
|
+
var n = $()("%Symbol.match%", !0), r = Xt(), i = Ut(), a = Zt();
|
|
7879
8126
|
t.exports = function(e) {
|
|
7880
8127
|
if (!i(e)) return !1;
|
|
7881
8128
|
if (n) {
|
|
@@ -7884,19 +8131,19 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7884
8131
|
}
|
|
7885
8132
|
return r(e);
|
|
7886
8133
|
};
|
|
7887
|
-
})),
|
|
8134
|
+
})), $t = /* @__PURE__ */ t(((e, t) => {
|
|
7888
8135
|
var n = $()("%String%"), r = Q();
|
|
7889
8136
|
t.exports = function(e) {
|
|
7890
8137
|
if (typeof e == "symbol") throw new r("Cannot convert a Symbol value to a string");
|
|
7891
8138
|
return n(e);
|
|
7892
8139
|
};
|
|
7893
|
-
})),
|
|
8140
|
+
})), en = /* @__PURE__ */ t(((e, t) => {
|
|
7894
8141
|
var n = Q();
|
|
7895
8142
|
t.exports = function(e) {
|
|
7896
8143
|
if (e == null) throw new n(arguments.length > 0 && arguments[1] || "Cannot call method on " + e);
|
|
7897
8144
|
return e;
|
|
7898
8145
|
};
|
|
7899
|
-
})),
|
|
8146
|
+
})), tn = /* @__PURE__ */ t(((e, t) => {
|
|
7900
8147
|
var n = function() {
|
|
7901
8148
|
return typeof function() {}.name == "string";
|
|
7902
8149
|
}, r = Object.getOwnPropertyDescriptor;
|
|
@@ -7914,21 +8161,21 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7914
8161
|
n.boundFunctionsHaveNames = function() {
|
|
7915
8162
|
return n() && typeof i == "function" && function() {}.bind().name !== "";
|
|
7916
8163
|
}, t.exports = n;
|
|
7917
|
-
})),
|
|
7918
|
-
var n =
|
|
8164
|
+
})), nn = /* @__PURE__ */ t(((e, t) => {
|
|
8165
|
+
var n = Dt(), r = Ot()(), i = tn().functionsHaveConfigurableNames(), a = Q();
|
|
7919
8166
|
t.exports = function(e, t) {
|
|
7920
8167
|
if (typeof e != "function") throw new a("`fn` is not a function");
|
|
7921
8168
|
return (!(arguments.length > 2 && arguments[2]) || i) && (r ? n(e, "name", t, !0, !0) : n(e, "name", t)), e;
|
|
7922
8169
|
};
|
|
7923
|
-
})),
|
|
7924
|
-
var n =
|
|
8170
|
+
})), rn = /* @__PURE__ */ t(((e, t) => {
|
|
8171
|
+
var n = nn(), r = Q(), i = Object;
|
|
7925
8172
|
t.exports = n(function() {
|
|
7926
8173
|
if (this == null || this !== i(this)) throw new r("RegExp.prototype.flags getter called on non-object");
|
|
7927
8174
|
var e = "";
|
|
7928
8175
|
return this.hasIndices && (e += "d"), this.global && (e += "g"), this.ignoreCase && (e += "i"), this.multiline && (e += "m"), this.dotAll && (e += "s"), this.unicode && (e += "u"), this.unicodeSets && (e += "v"), this.sticky && (e += "y"), e;
|
|
7929
8176
|
}, "get flags", !0);
|
|
7930
|
-
})),
|
|
7931
|
-
var n =
|
|
8177
|
+
})), an = /* @__PURE__ */ t(((e, t) => {
|
|
8178
|
+
var n = rn(), r = Ft().supportsDescriptors, i = Object.getOwnPropertyDescriptor;
|
|
7932
8179
|
t.exports = function() {
|
|
7933
8180
|
if (r && /a/gim.flags === "gim") {
|
|
7934
8181
|
var e = i(RegExp.prototype, "flags");
|
|
@@ -7943,8 +8190,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7943
8190
|
}
|
|
7944
8191
|
return n;
|
|
7945
8192
|
};
|
|
7946
|
-
})),
|
|
7947
|
-
var n =
|
|
8193
|
+
})), on = /* @__PURE__ */ t(((e, t) => {
|
|
8194
|
+
var n = Ft().supportsDescriptors, r = an(), i = dt(), a = Object.defineProperty, o = Xe(), s = Tt(), c = /a/;
|
|
7948
8195
|
t.exports = function() {
|
|
7949
8196
|
if (!n || !s) throw new o("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");
|
|
7950
8197
|
var e = r(), t = s(c), l = i(t, "flags");
|
|
@@ -7954,29 +8201,29 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
7954
8201
|
get: e
|
|
7955
8202
|
}), e;
|
|
7956
8203
|
};
|
|
7957
|
-
})),
|
|
7958
|
-
var n =
|
|
8204
|
+
})), sn = /* @__PURE__ */ t(((e, t) => {
|
|
8205
|
+
var n = Ft(), r = jt(), i = rn(), a = an(), o = on(), s = r(a());
|
|
7959
8206
|
n(s, {
|
|
7960
8207
|
getPolyfill: a,
|
|
7961
8208
|
implementation: i,
|
|
7962
8209
|
shim: o
|
|
7963
8210
|
}), t.exports = s;
|
|
7964
|
-
})),
|
|
8211
|
+
})), cn = /* @__PURE__ */ t(((e, t) => {
|
|
7965
8212
|
t.exports = function(e) {
|
|
7966
8213
|
return typeof e == "number" && e >= 55296 && e <= 56319;
|
|
7967
8214
|
};
|
|
7968
|
-
})),
|
|
8215
|
+
})), ln = /* @__PURE__ */ t(((e, t) => {
|
|
7969
8216
|
t.exports = function(e) {
|
|
7970
8217
|
return typeof e == "number" && e >= 56320 && e <= 57343;
|
|
7971
8218
|
};
|
|
7972
|
-
})),
|
|
7973
|
-
var n = $(), r = Q(), i = n("%String.fromCharCode%"), a =
|
|
8219
|
+
})), un = /* @__PURE__ */ t(((e, t) => {
|
|
8220
|
+
var n = $(), r = Q(), i = n("%String.fromCharCode%"), a = cn(), o = ln();
|
|
7974
8221
|
t.exports = function(e, t) {
|
|
7975
8222
|
if (!a(e) || !o(t)) throw new r("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");
|
|
7976
8223
|
return i(e) + i(t);
|
|
7977
8224
|
};
|
|
7978
|
-
})),
|
|
7979
|
-
var n = Q(), r =
|
|
8225
|
+
})), dn = /* @__PURE__ */ t(((e, t) => {
|
|
8226
|
+
var n = Q(), r = It(), i = cn(), a = ln(), o = un(), s = r("String.prototype.charAt"), c = r("String.prototype.charCodeAt");
|
|
7980
8227
|
t.exports = function(e, t) {
|
|
7981
8228
|
if (typeof e != "string") throw new n("Assertion failed: `string` must be a String");
|
|
7982
8229
|
var r = e.length;
|
|
@@ -8003,22 +8250,22 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8003
8250
|
"[[IsUnpairedSurrogate]]": !0
|
|
8004
8251
|
};
|
|
8005
8252
|
};
|
|
8006
|
-
})),
|
|
8007
|
-
var n =
|
|
8253
|
+
})), fn = /* @__PURE__ */ t(((e, t) => {
|
|
8254
|
+
var n = ct();
|
|
8008
8255
|
t.exports = function(e) {
|
|
8009
8256
|
return (typeof e == "number" || typeof e == "bigint") && !n(e) && e !== Infinity && e !== -Infinity;
|
|
8010
8257
|
};
|
|
8011
|
-
})),
|
|
8012
|
-
var n =
|
|
8258
|
+
})), pn = /* @__PURE__ */ t(((e, t) => {
|
|
8259
|
+
var n = nt(), r = rt(), i = ct(), a = fn();
|
|
8013
8260
|
t.exports = function(e) {
|
|
8014
8261
|
if (typeof e != "number" || i(e) || !a(e)) return !1;
|
|
8015
8262
|
var t = n(e);
|
|
8016
8263
|
return r(t) === t;
|
|
8017
8264
|
};
|
|
8018
|
-
})),
|
|
8265
|
+
})), mn = /* @__PURE__ */ t(((e, t) => {
|
|
8019
8266
|
t.exports = 2 ** 53 - 1 || 9007199254740991;
|
|
8020
|
-
})),
|
|
8021
|
-
var n =
|
|
8267
|
+
})), hn = /* @__PURE__ */ t(((e, t) => {
|
|
8268
|
+
var n = dn(), r = Q(), i = pn(), a = mn();
|
|
8022
8269
|
t.exports = function(e, t, o) {
|
|
8023
8270
|
if (typeof e != "string") throw new r("Assertion failed: `S` must be a String");
|
|
8024
8271
|
if (!i(t) || t < 0 || t > a) throw new r("Assertion failed: `length` must be an integer >= 0 and <= 2**53");
|
|
@@ -8027,7 +8274,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8027
8274
|
var s = e.length;
|
|
8028
8275
|
return t + 1 >= s ? t + 1 : t + n(e, t)["[[CodeUnitCount]]"];
|
|
8029
8276
|
};
|
|
8030
|
-
})),
|
|
8277
|
+
})), gn = /* @__PURE__ */ t(((e, t) => {
|
|
8031
8278
|
var n = Q();
|
|
8032
8279
|
t.exports = function(e, t) {
|
|
8033
8280
|
if (typeof t != "boolean") throw new n("Assertion failed: Type(done) is not Boolean");
|
|
@@ -8036,8 +8283,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8036
8283
|
done: t
|
|
8037
8284
|
};
|
|
8038
8285
|
};
|
|
8039
|
-
})),
|
|
8040
|
-
var n = Q(), r =
|
|
8286
|
+
})), _n = /* @__PURE__ */ t(((e, t) => {
|
|
8287
|
+
var n = Q(), r = Et(), i = {
|
|
8041
8288
|
__proto__: null,
|
|
8042
8289
|
"[[Configurable]]": !0,
|
|
8043
8290
|
"[[Enumerable]]": !0,
|
|
@@ -8053,8 +8300,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8053
8300
|
if (a && o) throw new n("Property Descriptors may not be both accessor and data descriptors");
|
|
8054
8301
|
return !0;
|
|
8055
8302
|
};
|
|
8056
|
-
})),
|
|
8057
|
-
var n =
|
|
8303
|
+
})), vn = /* @__PURE__ */ t(((e, t) => {
|
|
8304
|
+
var n = Ot(), r = ft(), i = n.hasArrayLengthDefineBug(), a = i && Lt(), o = It()("Object.prototype.propertyIsEnumerable");
|
|
8058
8305
|
t.exports = function(e, t, n, s, c, l) {
|
|
8059
8306
|
if (!r) {
|
|
8060
8307
|
if (!e(l) || !l["[[Configurable]]"] || !l["[[Writable]]"] || c in s && o(s, c) !== !!l["[[Enumerable]]"]) return !1;
|
|
@@ -8063,32 +8310,32 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8063
8310
|
}
|
|
8064
8311
|
return i && c === "length" && "[[Value]]" in l && a(s) && s.length !== l["[[Value]]"] ? (s.length = l["[[Value]]"], s.length === l["[[Value]]"]) : (r(s, c, n(l)), !0);
|
|
8065
8312
|
};
|
|
8066
|
-
})),
|
|
8313
|
+
})), yn = /* @__PURE__ */ t(((e, t) => {
|
|
8067
8314
|
t.exports = function(e) {
|
|
8068
8315
|
if (e === void 0) return e;
|
|
8069
8316
|
var t = {};
|
|
8070
8317
|
return "[[Value]]" in e && (t.value = e["[[Value]]"]), "[[Writable]]" in e && (t.writable = !!e["[[Writable]]"]), "[[Get]]" in e && (t.get = e["[[Get]]"]), "[[Set]]" in e && (t.set = e["[[Set]]"]), "[[Enumerable]]" in e && (t.enumerable = !!e["[[Enumerable]]"]), "[[Configurable]]" in e && (t.configurable = !!e["[[Configurable]]"]), t;
|
|
8071
8318
|
};
|
|
8072
|
-
})),
|
|
8073
|
-
var n = Q(), r =
|
|
8319
|
+
})), bn = /* @__PURE__ */ t(((e, t) => {
|
|
8320
|
+
var n = Q(), r = _n(), i = yn();
|
|
8074
8321
|
t.exports = function(e) {
|
|
8075
8322
|
if (e !== void 0 && !r(e)) throw new n("Assertion failed: `Desc` must be a Property Descriptor");
|
|
8076
8323
|
return i(e);
|
|
8077
8324
|
};
|
|
8078
|
-
})),
|
|
8079
|
-
var n = Q(), r =
|
|
8325
|
+
})), xn = /* @__PURE__ */ t(((e, t) => {
|
|
8326
|
+
var n = Q(), r = Et(), i = _n();
|
|
8080
8327
|
t.exports = function(e) {
|
|
8081
8328
|
if (e === void 0) return !1;
|
|
8082
8329
|
if (!i(e)) throw new n("Assertion failed: `Desc` must be a Property Descriptor");
|
|
8083
8330
|
return !(!r(e, "[[Value]]") && !r(e, "[[Writable]]"));
|
|
8084
8331
|
};
|
|
8085
|
-
})),
|
|
8086
|
-
var n =
|
|
8332
|
+
})), Sn = /* @__PURE__ */ t(((e, t) => {
|
|
8333
|
+
var n = ct();
|
|
8087
8334
|
t.exports = function(e, t) {
|
|
8088
8335
|
return e === t ? e === 0 ? 1 / e == 1 / t : !0 : n(e) && n(t);
|
|
8089
8336
|
};
|
|
8090
|
-
})),
|
|
8091
|
-
var n =
|
|
8337
|
+
})), Cn = /* @__PURE__ */ t(((e, t) => {
|
|
8338
|
+
var n = Et(), r = Q(), i = Ut(), a = qt(), o = Zt();
|
|
8092
8339
|
t.exports = function(e) {
|
|
8093
8340
|
if (!i(e)) throw new r("ToPropertyDescriptor requires an object");
|
|
8094
8341
|
var t = {};
|
|
@@ -8105,8 +8352,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8105
8352
|
if ((n(t, "[[Get]]") || n(t, "[[Set]]")) && (n(t, "[[Value]]") || n(t, "[[Writable]]"))) throw new r("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");
|
|
8106
8353
|
return t;
|
|
8107
8354
|
};
|
|
8108
|
-
})),
|
|
8109
|
-
var n = Q(), r =
|
|
8355
|
+
})), wn = /* @__PURE__ */ t(((e, t) => {
|
|
8356
|
+
var n = Q(), r = Ut(), i = _n(), a = vn(), o = bn(), s = xn(), c = Ht(), l = Sn(), u = Cn();
|
|
8110
8357
|
t.exports = function(e, t, d) {
|
|
8111
8358
|
if (!r(e)) throw new n("Assertion failed: Type(O) is not Object");
|
|
8112
8359
|
if (!c(t)) throw new n("Assertion failed: P is not a Property Key");
|
|
@@ -8114,19 +8361,19 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8114
8361
|
if (!i(f)) throw new n("Assertion failed: Desc is not a valid Property Descriptor");
|
|
8115
8362
|
return a(s, l, o, e, t, f);
|
|
8116
8363
|
};
|
|
8117
|
-
})),
|
|
8364
|
+
})), Tn = /* @__PURE__ */ t(((e, t) => {
|
|
8118
8365
|
t.exports = function(e) {
|
|
8119
8366
|
return e === null || typeof e != "function" && typeof e != "object";
|
|
8120
8367
|
};
|
|
8121
|
-
})),
|
|
8122
|
-
var n = $(), r = n("%Object.preventExtensions%", !0), i = n("%Object.isExtensible%", !0), a =
|
|
8368
|
+
})), En = /* @__PURE__ */ t(((e, t) => {
|
|
8369
|
+
var n = $(), r = n("%Object.preventExtensions%", !0), i = n("%Object.isExtensible%", !0), a = Tn();
|
|
8123
8370
|
t.exports = r ? function(e) {
|
|
8124
8371
|
return !a(e) && i(e);
|
|
8125
8372
|
} : function(e) {
|
|
8126
8373
|
return !a(e);
|
|
8127
8374
|
};
|
|
8128
|
-
})),
|
|
8129
|
-
var n = Q(), r =
|
|
8375
|
+
})), Dn = /* @__PURE__ */ t(((e, t) => {
|
|
8376
|
+
var n = Q(), r = Ut(), i = wn(), a = En(), o = Ht();
|
|
8130
8377
|
t.exports = function(e, t, s, c) {
|
|
8131
8378
|
if (!r(e)) throw new n("Assertion failed: `homeObject` is not an Object");
|
|
8132
8379
|
if (!o(t)) throw new n("Assertion failed: `key` is not a Property Key or a Private Name");
|
|
@@ -8140,12 +8387,12 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8140
8387
|
"[[Configurable]]": !0
|
|
8141
8388
|
});
|
|
8142
8389
|
};
|
|
8143
|
-
})),
|
|
8390
|
+
})), On = /* @__PURE__ */ t(((e, t) => {
|
|
8144
8391
|
t.exports = function(e, t) {
|
|
8145
8392
|
for (var n = 0; n < e.length; n += 1) t(e[n], n, e);
|
|
8146
8393
|
};
|
|
8147
|
-
})),
|
|
8148
|
-
var n =
|
|
8394
|
+
})), kn = /* @__PURE__ */ t(((e, t) => {
|
|
8395
|
+
var n = Vt(), r = Q(), i = function(e, t, n) {
|
|
8149
8396
|
for (var r = e, i; (i = r.next) != null; r = i) if (i.key === t) return r.next = i.next, n || (i.next = e.next, e.next = i), i;
|
|
8150
8397
|
}, a = function(e, t) {
|
|
8151
8398
|
if (e) {
|
|
@@ -8185,8 +8432,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8185
8432
|
};
|
|
8186
8433
|
return t;
|
|
8187
8434
|
};
|
|
8188
|
-
})),
|
|
8189
|
-
var n = $(), r =
|
|
8435
|
+
})), An = /* @__PURE__ */ t(((e, t) => {
|
|
8436
|
+
var n = $(), r = It(), i = Vt(), a = Q(), o = n("%Map%", !0), s = r("Map.prototype.get", !0), c = r("Map.prototype.set", !0), l = r("Map.prototype.has", !0), u = r("Map.prototype.delete", !0), d = r("Map.prototype.size", !0);
|
|
8190
8437
|
t.exports = !!o && function() {
|
|
8191
8438
|
var e, t = {
|
|
8192
8439
|
assert: function(e) {
|
|
@@ -8211,8 +8458,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8211
8458
|
};
|
|
8212
8459
|
return t;
|
|
8213
8460
|
};
|
|
8214
|
-
})),
|
|
8215
|
-
var n = $(), r =
|
|
8461
|
+
})), jn = /* @__PURE__ */ t(((e, t) => {
|
|
8462
|
+
var n = $(), r = It(), i = Vt(), a = An(), o = Q(), s = n("%WeakMap%", !0), c = r("WeakMap.prototype.get", !0), l = r("WeakMap.prototype.set", !0), u = r("WeakMap.prototype.has", !0), d = r("WeakMap.prototype.delete", !0);
|
|
8216
8463
|
t.exports = s ? function() {
|
|
8217
8464
|
var e, t, n = {
|
|
8218
8465
|
assert: function(e) {
|
|
@@ -8236,8 +8483,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8236
8483
|
};
|
|
8237
8484
|
return n;
|
|
8238
8485
|
} : a;
|
|
8239
|
-
})),
|
|
8240
|
-
var n = Q(), r =
|
|
8486
|
+
})), Mn = /* @__PURE__ */ t(((e, t) => {
|
|
8487
|
+
var n = Q(), r = Vt(), i = kn(), a = An(), o = jn() || a || i;
|
|
8241
8488
|
t.exports = function() {
|
|
8242
8489
|
var e, t = {
|
|
8243
8490
|
assert: function(e) {
|
|
@@ -8258,8 +8505,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8258
8505
|
};
|
|
8259
8506
|
return t;
|
|
8260
8507
|
};
|
|
8261
|
-
})),
|
|
8262
|
-
var n =
|
|
8508
|
+
})), Nn = /* @__PURE__ */ t(((e, t) => {
|
|
8509
|
+
var n = Et(), r = Mn()(), i = Q(), a = {
|
|
8263
8510
|
assert: function(e, t) {
|
|
8264
8511
|
if (!e || typeof e != "object" && typeof e != "function") throw new i("`O` is not an object");
|
|
8265
8512
|
if (typeof t != "string") throw new i("`slot` must be a string");
|
|
@@ -8285,7 +8532,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8285
8532
|
}
|
|
8286
8533
|
};
|
|
8287
8534
|
Object.freeze && Object.freeze(a), t.exports = a;
|
|
8288
|
-
})),
|
|
8535
|
+
})), Pn = /* @__PURE__ */ t(((e, t) => {
|
|
8289
8536
|
var n = {
|
|
8290
8537
|
__proto__: null,
|
|
8291
8538
|
foo: {}
|
|
@@ -8293,8 +8540,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8293
8540
|
t.exports = function() {
|
|
8294
8541
|
return r;
|
|
8295
8542
|
};
|
|
8296
|
-
})),
|
|
8297
|
-
var n = $()("%Object.create%", !0), r = Q(), i =
|
|
8543
|
+
})), Fn = /* @__PURE__ */ t(((e, t) => {
|
|
8544
|
+
var n = $()("%Object.create%", !0), r = Q(), i = et(), a = Ut(), o = Rt(), s = On(), c = Nn(), l = Pn()();
|
|
8298
8545
|
t.exports = function(e) {
|
|
8299
8546
|
if (e !== null && !a(e)) throw new r("Assertion failed: `proto` must be null or an object");
|
|
8300
8547
|
var t = arguments.length < 2 ? [] : arguments[1];
|
|
@@ -8311,8 +8558,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8311
8558
|
c.set(u, e, void 0);
|
|
8312
8559
|
}), u;
|
|
8313
8560
|
};
|
|
8314
|
-
})),
|
|
8315
|
-
var n = Q(), r =
|
|
8561
|
+
})), In = /* @__PURE__ */ t(((e, t) => {
|
|
8562
|
+
var n = Q(), r = Ut(), i = It()("RegExp.prototype.exec"), a = zt(), o = Wt(), s = qt();
|
|
8316
8563
|
t.exports = function(e, t) {
|
|
8317
8564
|
if (!r(e)) throw new n("Assertion failed: `R` must be an Object");
|
|
8318
8565
|
if (typeof t != "string") throw new n("Assertion failed: `S` must be a String");
|
|
@@ -8324,8 +8571,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8324
8571
|
}
|
|
8325
8572
|
return i(e, t);
|
|
8326
8573
|
};
|
|
8327
|
-
})),
|
|
8328
|
-
var n = Q(), r =
|
|
8574
|
+
})), Ln = /* @__PURE__ */ t(((e, t) => {
|
|
8575
|
+
var n = Q(), r = Ut(), i = Ht(), a = Sn(), o = function() {
|
|
8329
8576
|
try {
|
|
8330
8577
|
return delete 0, !0;
|
|
8331
8578
|
} catch {
|
|
@@ -8346,31 +8593,31 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8346
8593
|
return !1;
|
|
8347
8594
|
}
|
|
8348
8595
|
};
|
|
8349
|
-
})),
|
|
8596
|
+
})), Rn = /* @__PURE__ */ t(((e, t) => {
|
|
8350
8597
|
t.exports = function(e) {
|
|
8351
8598
|
return e === null || typeof e != "function" && typeof e != "object";
|
|
8352
8599
|
};
|
|
8353
|
-
})),
|
|
8354
|
-
var n =
|
|
8600
|
+
})), zn = /* @__PURE__ */ t(((e, t) => {
|
|
8601
|
+
var n = It(), r = n("Date.prototype.getDay"), i = function(e) {
|
|
8355
8602
|
try {
|
|
8356
8603
|
return r(e), !0;
|
|
8357
8604
|
} catch {
|
|
8358
8605
|
return !1;
|
|
8359
8606
|
}
|
|
8360
|
-
}, a = n("Object.prototype.toString"), o = "[object Date]", s =
|
|
8607
|
+
}, a = n("Object.prototype.toString"), o = "[object Date]", s = Yt()();
|
|
8361
8608
|
t.exports = function(e) {
|
|
8362
8609
|
return typeof e != "object" || !e ? !1 : s ? i(e) : a(e) === o;
|
|
8363
8610
|
};
|
|
8364
|
-
})),
|
|
8365
|
-
var n =
|
|
8611
|
+
})), Bn = /* @__PURE__ */ t(((e, t) => {
|
|
8612
|
+
var n = It(), r = Xt(), i = n("RegExp.prototype.exec"), a = Q();
|
|
8366
8613
|
t.exports = function(e) {
|
|
8367
8614
|
if (!r(e)) throw new a("`regex` must be a RegExp");
|
|
8368
8615
|
return function(t) {
|
|
8369
8616
|
return i(e, t) !== null;
|
|
8370
8617
|
};
|
|
8371
8618
|
};
|
|
8372
|
-
})),
|
|
8373
|
-
var n =
|
|
8619
|
+
})), Vn = /* @__PURE__ */ t(((e, t) => {
|
|
8620
|
+
var n = It(), r = n("Object.prototype.toString"), i = mt()(), a = Bn();
|
|
8374
8621
|
if (i) {
|
|
8375
8622
|
var o = n("Symbol.prototype.toString"), s = a(/^Symbol\(.*\)$/), c = function(e) {
|
|
8376
8623
|
return typeof e.valueOf() == "symbol" ? s(o(e)) : !1;
|
|
@@ -8387,8 +8634,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8387
8634
|
} else t.exports = function(e) {
|
|
8388
8635
|
return !1;
|
|
8389
8636
|
};
|
|
8390
|
-
})),
|
|
8391
|
-
var n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol", r =
|
|
8637
|
+
})), Hn = /* @__PURE__ */ t(((e, t) => {
|
|
8638
|
+
var n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol", r = Rn(), i = Kt(), a = zn(), o = Vn(), s = function(e, t) {
|
|
8392
8639
|
if (e == null) throw TypeError("Cannot call method on " + e);
|
|
8393
8640
|
if (typeof t != "string" || t !== "number" && t !== "string") throw TypeError("hint must be \"string\" or \"number\"");
|
|
8394
8641
|
var n = t === "string" ? ["toString", "valueOf"] : ["valueOf", "toString"], a, o, s;
|
|
@@ -8413,29 +8660,29 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8413
8660
|
}
|
|
8414
8661
|
return t === "default" && (a(e) || o(e)) && (t = "string"), s(e, t === "default" ? "number" : t);
|
|
8415
8662
|
};
|
|
8416
|
-
})),
|
|
8417
|
-
var n =
|
|
8663
|
+
})), Un = /* @__PURE__ */ t(((e, t) => {
|
|
8664
|
+
var n = Hn();
|
|
8418
8665
|
t.exports = function(e) {
|
|
8419
8666
|
return arguments.length > 1 ? n(e, arguments[1]) : n(e);
|
|
8420
8667
|
};
|
|
8421
|
-
})),
|
|
8422
|
-
var n =
|
|
8668
|
+
})), Wn = /* @__PURE__ */ t(((e, t) => {
|
|
8669
|
+
var n = en(), r = $t(), i = It()("String.prototype.replace"), a = /^\s$/.test(""), o = a ? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/ : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/, s = a ? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/ : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;
|
|
8423
8670
|
t.exports = function() {
|
|
8424
8671
|
return i(i(r(n(this)), o, ""), s, "");
|
|
8425
8672
|
};
|
|
8426
|
-
})),
|
|
8427
|
-
var n =
|
|
8673
|
+
})), Gn = /* @__PURE__ */ t(((e, t) => {
|
|
8674
|
+
var n = Wn(), r = "", i = "";
|
|
8428
8675
|
t.exports = function() {
|
|
8429
8676
|
return String.prototype.trim && r.trim() === r && i.trim() === i && ("_" + i).trim() === "_" + i && (i + "_").trim() === i + "_" ? String.prototype.trim : n;
|
|
8430
8677
|
};
|
|
8431
|
-
})),
|
|
8432
|
-
var n =
|
|
8678
|
+
})), Kn = /* @__PURE__ */ t(((e, t) => {
|
|
8679
|
+
var n = Ot()(), r = Dt(), i = Gn();
|
|
8433
8680
|
t.exports = function() {
|
|
8434
8681
|
var e = i();
|
|
8435
8682
|
return String.prototype.trim !== e && (n ? r(String.prototype, "trim", e, !0) : r(String.prototype, "trim", e)), e;
|
|
8436
8683
|
};
|
|
8437
|
-
})),
|
|
8438
|
-
var n =
|
|
8684
|
+
})), qn = /* @__PURE__ */ t(((e, t) => {
|
|
8685
|
+
var n = jt(), r = Ft(), i = en(), a = Wn(), o = Gn(), s = Kn(), c = n(o()), l = function(e) {
|
|
8439
8686
|
return i(e), c(e);
|
|
8440
8687
|
};
|
|
8441
8688
|
r(l, {
|
|
@@ -8443,12 +8690,12 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8443
8690
|
implementation: a,
|
|
8444
8691
|
shim: s
|
|
8445
8692
|
}), t.exports = l;
|
|
8446
|
-
})),
|
|
8447
|
-
var n = $(), r = n("%RegExp%"), i = Q(), a = n("%parseInt%"), o =
|
|
8693
|
+
})), Jn = /* @__PURE__ */ t(((e, t) => {
|
|
8694
|
+
var n = $(), r = n("%RegExp%"), i = Q(), a = n("%parseInt%"), o = It(), s = Bn(), c = o("String.prototype.slice"), l = s(/^0b[01]+$/i), u = s(/^0o[0-7]+$/i), d = s(/^[-+]0x[0-9a-f]+$/i), f = s(new r("[" + [
|
|
8448
8695
|
"
",
|
|
8449
8696
|
"",
|
|
8450
8697
|
""
|
|
8451
|
-
].join("") + "]", "g")), p =
|
|
8698
|
+
].join("") + "]", "g")), p = qn();
|
|
8452
8699
|
t.exports = function e(t) {
|
|
8453
8700
|
if (typeof t != "string") throw new i("Assertion failed: `argument` is not a String");
|
|
8454
8701
|
if (l(t)) return +a(c(t, 2), 2);
|
|
@@ -8457,40 +8704,40 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8457
8704
|
var n = p(t);
|
|
8458
8705
|
return n === t ? +t : e(n);
|
|
8459
8706
|
};
|
|
8460
|
-
})),
|
|
8461
|
-
var n = $(), r = Q(), i = n("%Number%"), a =
|
|
8707
|
+
})), Yn = /* @__PURE__ */ t(((e, t) => {
|
|
8708
|
+
var n = $(), r = Q(), i = n("%Number%"), a = Tn(), o = Un(), s = Jn();
|
|
8462
8709
|
t.exports = function(e) {
|
|
8463
8710
|
var t = a(e) ? e : o(e, i);
|
|
8464
8711
|
if (typeof t == "symbol") throw new r("Cannot convert a Symbol value to a number");
|
|
8465
8712
|
if (typeof t == "bigint") throw new r("Conversion from 'BigInt' to 'number' is not allowed.");
|
|
8466
8713
|
return typeof t == "string" ? s(t) : +t;
|
|
8467
8714
|
};
|
|
8468
|
-
})),
|
|
8469
|
-
var n =
|
|
8715
|
+
})), Xn = /* @__PURE__ */ t(((e, t) => {
|
|
8716
|
+
var n = rt();
|
|
8470
8717
|
t.exports = function(e) {
|
|
8471
8718
|
return typeof e == "bigint" ? e : n(e);
|
|
8472
8719
|
};
|
|
8473
|
-
})),
|
|
8474
|
-
var n =
|
|
8720
|
+
})), Zn = /* @__PURE__ */ t(((e, t) => {
|
|
8721
|
+
var n = Xn(), r = Q();
|
|
8475
8722
|
t.exports = function(e) {
|
|
8476
8723
|
if (typeof e != "number" && typeof e != "bigint") throw new r("argument must be a Number or a BigInt");
|
|
8477
8724
|
var t = e < 0 ? -n(-e) : n(e);
|
|
8478
8725
|
return t === 0 ? 0 : t;
|
|
8479
8726
|
};
|
|
8480
|
-
})),
|
|
8481
|
-
var n =
|
|
8727
|
+
})), Qn = /* @__PURE__ */ t(((e, t) => {
|
|
8728
|
+
var n = Yn(), r = Zn(), i = ct(), a = fn();
|
|
8482
8729
|
t.exports = function(e) {
|
|
8483
8730
|
var t = n(e);
|
|
8484
8731
|
return i(t) || t === 0 ? 0 : a(t) ? r(t) : t;
|
|
8485
8732
|
};
|
|
8486
|
-
})),
|
|
8487
|
-
var n =
|
|
8733
|
+
})), $n = /* @__PURE__ */ t(((e, t) => {
|
|
8734
|
+
var n = mn(), r = Qn();
|
|
8488
8735
|
t.exports = function(e) {
|
|
8489
8736
|
var t = r(e);
|
|
8490
8737
|
return t <= 0 ? 0 : t > n ? n : t;
|
|
8491
8738
|
};
|
|
8492
|
-
})),
|
|
8493
|
-
var n = $()("%Object.defineProperty%", !0), r =
|
|
8739
|
+
})), er = /* @__PURE__ */ t(((e, t) => {
|
|
8740
|
+
var n = $()("%Object.defineProperty%", !0), r = Yt()(), i = Et(), a = Q(), o = r ? Symbol.toStringTag : null;
|
|
8494
8741
|
t.exports = function(e, t) {
|
|
8495
8742
|
var r = arguments.length > 2 && !!arguments[2] && arguments[2].force, s = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
|
|
8496
8743
|
if (r !== void 0 && typeof r != "boolean" || s !== void 0 && typeof s != "boolean") throw new a("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");
|
|
@@ -8501,8 +8748,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8501
8748
|
writable: !1
|
|
8502
8749
|
}) : e[o] = t);
|
|
8503
8750
|
};
|
|
8504
|
-
})),
|
|
8505
|
-
var n = $(), r =
|
|
8751
|
+
})), tr = /* @__PURE__ */ t(((e, t) => {
|
|
8752
|
+
var n = $(), r = mt()(), i = Q(), a = Ut(), o = n("%IteratorPrototype%", !0), s = hn(), c = gn(), l = Dn(), u = Wt(), d = Fn(), f = In(), p = Ln(), m = $n(), h = $t(), g = Nn(), _ = er(), v = function(e, t, n, r) {
|
|
8506
8753
|
if (typeof t != "string") throw new i("`S` must be a string");
|
|
8507
8754
|
if (typeof n != "boolean") throw new i("`global` must be a boolean");
|
|
8508
8755
|
if (typeof r != "boolean") throw new i("`fullUnicode` must be a boolean");
|
|
@@ -8520,10 +8767,10 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8520
8767
|
}, !1)), t.exports = function(e, t, n, r) {
|
|
8521
8768
|
return new v(e, t, n, r);
|
|
8522
8769
|
};
|
|
8523
|
-
})),
|
|
8770
|
+
})), nr = /* @__PURE__ */ t(((e, t) => {
|
|
8524
8771
|
t.exports = $();
|
|
8525
|
-
})),
|
|
8526
|
-
var n =
|
|
8772
|
+
})), rr = /* @__PURE__ */ t(((e, t) => {
|
|
8773
|
+
var n = nr()("%Reflect.construct%", !0), r = wn();
|
|
8527
8774
|
try {
|
|
8528
8775
|
r({}, "", { "[[Get]]": function() {} });
|
|
8529
8776
|
} catch {
|
|
@@ -8546,8 +8793,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8546
8793
|
} else t.exports = function(e) {
|
|
8547
8794
|
return typeof e == "function" && !!e.prototype;
|
|
8548
8795
|
};
|
|
8549
|
-
})),
|
|
8550
|
-
var n = $()("%Symbol.species%", !0), r = Q(), i =
|
|
8796
|
+
})), ir = /* @__PURE__ */ t(((e, t) => {
|
|
8797
|
+
var n = $()("%Symbol.species%", !0), r = Q(), i = Ut(), a = rr();
|
|
8551
8798
|
t.exports = function(e, t) {
|
|
8552
8799
|
if (!i(e)) throw new r("Assertion failed: Type(O) is not Object");
|
|
8553
8800
|
var o = e.constructor;
|
|
@@ -8558,8 +8805,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8558
8805
|
if (a(s)) return s;
|
|
8559
8806
|
throw new r("no constructor found");
|
|
8560
8807
|
};
|
|
8561
|
-
})),
|
|
8562
|
-
var n =
|
|
8808
|
+
})), ar = /* @__PURE__ */ t(((e, t) => {
|
|
8809
|
+
var n = Ut();
|
|
8563
8810
|
t.exports = function(e) {
|
|
8564
8811
|
if (e === null) return "Null";
|
|
8565
8812
|
if (e === void 0) return "Undefined";
|
|
@@ -8568,13 +8815,13 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8568
8815
|
if (typeof e == "boolean") return "Boolean";
|
|
8569
8816
|
if (typeof e == "string") return "String";
|
|
8570
8817
|
};
|
|
8571
|
-
})),
|
|
8572
|
-
var n =
|
|
8818
|
+
})), or = /* @__PURE__ */ t(((e, t) => {
|
|
8819
|
+
var n = ar();
|
|
8573
8820
|
t.exports = function(e) {
|
|
8574
8821
|
return typeof e == "symbol" ? "Symbol" : typeof e == "bigint" ? "BigInt" : n(e);
|
|
8575
8822
|
};
|
|
8576
|
-
})),
|
|
8577
|
-
var n =
|
|
8823
|
+
})), sr = /* @__PURE__ */ t(((e, t) => {
|
|
8824
|
+
var n = tr(), r = Wt(), i = Ln(), a = ir(), o = $n(), s = $t(), c = or(), l = sn(), u = nn(), d = It(), f = $(), p = Q(), m = d("String.prototype.indexOf"), h = f("%RegExp%"), g = "flags" in h.prototype, _ = function(e, t) {
|
|
8578
8825
|
var n, i = "flags" in t ? r(t, "flags") : s(l(t));
|
|
8579
8826
|
return n = g && typeof i == "string" ? new e(t, i) : e === h ? new e(t.source, i) : new e(t, i), {
|
|
8580
8827
|
flags: i,
|
|
@@ -8587,13 +8834,13 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8587
8834
|
var l = s(e), u = _(a(t, h), t), d = u.flags, f = u.matcher;
|
|
8588
8835
|
return i(f, "lastIndex", o(r(t, "lastIndex")), !0), n(f, l, m(d, "g") > -1, m(d, "u") > -1);
|
|
8589
8836
|
}, "[Symbol.matchAll]", !0);
|
|
8590
|
-
})),
|
|
8591
|
-
var n =
|
|
8837
|
+
})), cr = /* @__PURE__ */ t(((e, t) => {
|
|
8838
|
+
var n = mt()(), r = sr();
|
|
8592
8839
|
t.exports = function() {
|
|
8593
8840
|
return !n || typeof Symbol.matchAll != "symbol" || typeof RegExp.prototype[Symbol.matchAll] != "function" ? r : RegExp.prototype[Symbol.matchAll];
|
|
8594
8841
|
};
|
|
8595
|
-
})),
|
|
8596
|
-
var n =
|
|
8842
|
+
})), lr = /* @__PURE__ */ t(((e, t) => {
|
|
8843
|
+
var n = zt(), r = Wt(), i = Jt(), a = Qt(), o = $t(), s = en(), c = It(), l = mt()(), u = sn(), d = $(), f = Q(), p = d("%RegExp%"), m = c("String.prototype.indexOf"), h = cr(), g = function(e) {
|
|
8597
8844
|
var t = h();
|
|
8598
8845
|
if (l && typeof Symbol.matchAll == "symbol") {
|
|
8599
8846
|
var n = i(e, Symbol.matchAll);
|
|
@@ -8614,8 +8861,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8614
8861
|
var l = o(t), d = new p(e, "g");
|
|
8615
8862
|
return n(g(d), d, [l]);
|
|
8616
8863
|
};
|
|
8617
|
-
})),
|
|
8618
|
-
var n =
|
|
8864
|
+
})), ur = /* @__PURE__ */ t(((e, t) => {
|
|
8865
|
+
var n = lr();
|
|
8619
8866
|
t.exports = function() {
|
|
8620
8867
|
if (String.prototype.matchAll) try {
|
|
8621
8868
|
"".matchAll(RegExp.prototype);
|
|
@@ -8624,8 +8871,8 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8624
8871
|
}
|
|
8625
8872
|
return n;
|
|
8626
8873
|
};
|
|
8627
|
-
})),
|
|
8628
|
-
var n =
|
|
8874
|
+
})), dr = /* @__PURE__ */ t(((e, t) => {
|
|
8875
|
+
var n = Ft(), r = mt()(), i = dt(), a = ur(), o = cr(), s = Object.defineProperty;
|
|
8629
8876
|
t.exports = function() {
|
|
8630
8877
|
var e = a();
|
|
8631
8878
|
if (n(String.prototype, { matchAll: e }, { matchAll: function() {
|
|
@@ -8652,21 +8899,21 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
8652
8899
|
}
|
|
8653
8900
|
return e;
|
|
8654
8901
|
};
|
|
8655
|
-
})),
|
|
8656
|
-
var n =
|
|
8902
|
+
})), fr = /* @__PURE__ */ t(((e, t) => {
|
|
8903
|
+
var n = jt(), r = Ft(), i = lr(), a = ur(), o = dr(), s = n(i);
|
|
8657
8904
|
r(s, {
|
|
8658
8905
|
getPolyfill: a,
|
|
8659
8906
|
implementation: i,
|
|
8660
8907
|
shim: o
|
|
8661
8908
|
}), t.exports = s;
|
|
8662
|
-
})),
|
|
8909
|
+
})), pr = /* @__PURE__ */ t(((e, t) => {
|
|
8663
8910
|
b();
|
|
8664
|
-
var n =
|
|
8911
|
+
var n = se(), r = E(), i = D(), a = k(), o = ce(), s = T(), c = A(), { TtyStream: l, hasCustomStdinListener: u } = w(), d = "/.brsh_history", f = Ee(), p = Je(), m = x(), h = N(), { isAsyncFilesystemSource: g, resolveFilesystemSource: _ } = Y(), v = m.EventEmitter || m.default || m;
|
|
8665
8912
|
String.prototype.regexIndexOf = function(e, t) {
|
|
8666
8913
|
let n = this.substring(t || 0).search(e);
|
|
8667
8914
|
return n >= 0 ? n + (t || 0) : n;
|
|
8668
|
-
},
|
|
8669
|
-
var C = class e extends
|
|
8915
|
+
}, fr().shim();
|
|
8916
|
+
var S = "\0", C = class e extends v {
|
|
8670
8917
|
constructor(e) {
|
|
8671
8918
|
super();
|
|
8672
8919
|
let { path: t = "/bin", profile: r, motd: i, command: a, interactive: o = !0, subshell: s = !1, hostname: c = "browser", filesystem: u = {}, permissions: d = {}, cwd: f = "/", onFsChange: p, useRealFilesystem: m = !1, cols: h, rows: _ } = e;
|
|
@@ -9350,60 +9597,67 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
9350
9597
|
_splitInput(e) {
|
|
9351
9598
|
return this._parseOperators(e);
|
|
9352
9599
|
}
|
|
9353
|
-
_parseOperators(
|
|
9354
|
-
let
|
|
9355
|
-
for (;
|
|
9356
|
-
let
|
|
9357
|
-
if (
|
|
9358
|
-
|
|
9600
|
+
_parseOperators(t) {
|
|
9601
|
+
let n = [], r = "", i = 0, a = !1, o = !1;
|
|
9602
|
+
for (; i < t.length;) {
|
|
9603
|
+
let s = t[i];
|
|
9604
|
+
if (!a && s === "$" && (t[i + 1] === "(" || t[i + 1] === "{")) {
|
|
9605
|
+
let n = e._skipGroup(t, i);
|
|
9606
|
+
if (n > -1) {
|
|
9607
|
+
r += t.slice(i, n), i = n;
|
|
9608
|
+
continue;
|
|
9609
|
+
}
|
|
9610
|
+
}
|
|
9611
|
+
if (s === "'" && !o) {
|
|
9612
|
+
a = !a, r += s, i++;
|
|
9359
9613
|
continue;
|
|
9360
9614
|
}
|
|
9361
|
-
if (
|
|
9362
|
-
|
|
9615
|
+
if (s === "\"" && !a) {
|
|
9616
|
+
o = !o, r += s, i++;
|
|
9363
9617
|
continue;
|
|
9364
9618
|
}
|
|
9365
|
-
if (!
|
|
9366
|
-
if (
|
|
9367
|
-
let
|
|
9368
|
-
if (
|
|
9369
|
-
|
|
9619
|
+
if (!a && !o) {
|
|
9620
|
+
if (s === "#" && (r.trim() === "" || /\s/.test(t[i - 1]))) {
|
|
9621
|
+
let e = t.indexOf("\n", i);
|
|
9622
|
+
if (e === -1) break;
|
|
9623
|
+
i = e;
|
|
9370
9624
|
continue;
|
|
9371
9625
|
}
|
|
9372
|
-
if (
|
|
9373
|
-
|
|
9374
|
-
command:
|
|
9626
|
+
if (s === "&" && t[i + 1] === "&") {
|
|
9627
|
+
n.push({
|
|
9628
|
+
command: r.trim(),
|
|
9375
9629
|
op: "&&"
|
|
9376
|
-
}),
|
|
9630
|
+
}), r = "", i += 2;
|
|
9377
9631
|
continue;
|
|
9378
9632
|
}
|
|
9379
|
-
if (
|
|
9380
|
-
|
|
9381
|
-
command:
|
|
9633
|
+
if (s === "|" && t[i + 1] === "|") {
|
|
9634
|
+
n.push({
|
|
9635
|
+
command: r.trim(),
|
|
9382
9636
|
op: "||"
|
|
9383
|
-
}),
|
|
9637
|
+
}), r = "", i += 2;
|
|
9384
9638
|
continue;
|
|
9385
9639
|
}
|
|
9386
|
-
if (
|
|
9387
|
-
|
|
9388
|
-
command:
|
|
9640
|
+
if (s === "|") {
|
|
9641
|
+
n.push({
|
|
9642
|
+
command: r.trim(),
|
|
9389
9643
|
op: "|"
|
|
9390
|
-
}),
|
|
9644
|
+
}), r = "", i++;
|
|
9391
9645
|
continue;
|
|
9392
9646
|
}
|
|
9393
|
-
if (
|
|
9394
|
-
|
|
9395
|
-
command:
|
|
9647
|
+
if (s === ";") {
|
|
9648
|
+
n.push({
|
|
9649
|
+
command: r.trim(),
|
|
9396
9650
|
op: ";"
|
|
9397
|
-
}),
|
|
9651
|
+
}), r = "", i++;
|
|
9398
9652
|
continue;
|
|
9399
9653
|
}
|
|
9400
9654
|
}
|
|
9401
|
-
|
|
9655
|
+
r += s, i++;
|
|
9402
9656
|
}
|
|
9403
|
-
return
|
|
9404
|
-
command:
|
|
9657
|
+
return r.trim() && n.push({
|
|
9658
|
+
command: r.trim(),
|
|
9405
9659
|
op: null
|
|
9406
|
-
}),
|
|
9660
|
+
}), n;
|
|
9407
9661
|
}
|
|
9408
9662
|
_loadJsCommand(e, t) {
|
|
9409
9663
|
return this._jsCommandCache ||= /* @__PURE__ */ new Map(), o.load(this.context.fs, e, t, this._jsCommandCache);
|
|
@@ -9452,7 +9706,7 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
9452
9706
|
});
|
|
9453
9707
|
continue;
|
|
9454
9708
|
}
|
|
9455
|
-
let o = await this._replaceVariables(t), s = n.length === 1 && /^[A-Za-z_]\w*=/.test(t), c = e > 0 && i && /^[A-Za-z_]\w*=/.test(t);
|
|
9709
|
+
let o = (await this._replaceVariables(t)).replaceAll(S, "$"), s = n.length === 1 && /^[A-Za-z_]\w*=/.test(t), c = e > 0 && i && /^[A-Za-z_]\w*=/.test(t);
|
|
9456
9710
|
if (r || s || c || !t.includes("$")) {
|
|
9457
9711
|
(o.length > 0 || r) && a.push({
|
|
9458
9712
|
value: o,
|
|
@@ -9475,19 +9729,59 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
9475
9729
|
return e.filter((e) => e.length > 0);
|
|
9476
9730
|
}
|
|
9477
9731
|
async _replaceVariables(t) {
|
|
9478
|
-
let n =
|
|
9479
|
-
for (let
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
|
|
9732
|
+
let n = "";
|
|
9733
|
+
for (let r = 0; r < t.length; r++) {
|
|
9734
|
+
if (t[r] !== "$") {
|
|
9735
|
+
n += t[r];
|
|
9736
|
+
continue;
|
|
9737
|
+
}
|
|
9738
|
+
if (t[r + 1] === "(" || t[r + 1] === "{") {
|
|
9739
|
+
let i = e._skipGroup(t, r);
|
|
9740
|
+
if (i > -1) {
|
|
9741
|
+
n += await this._expandGroup(t.slice(r, i)), r = i - 1;
|
|
9742
|
+
continue;
|
|
9743
|
+
}
|
|
9744
|
+
}
|
|
9745
|
+
let i = /^\$(?:([\w]+)|([?#@*-]))/.exec(t.slice(r, r + 256));
|
|
9746
|
+
if (i) {
|
|
9747
|
+
n += String(this.context.getVar(i[1] || i[2])), r += i[0].length - 1;
|
|
9748
|
+
continue;
|
|
9749
|
+
}
|
|
9750
|
+
n += "$";
|
|
9484
9751
|
}
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9752
|
+
return n;
|
|
9753
|
+
}
|
|
9754
|
+
async _expandGroup(t) {
|
|
9755
|
+
if (t.startsWith("$((") && t.endsWith("))")) return String(this._evalArithmetic(t.slice(3, -2)));
|
|
9756
|
+
if (t.startsWith("$(")) return this._runAndCapture(t.slice(2, -1));
|
|
9757
|
+
let n = t.slice(2, -1), r = /^#(\w+)$/.exec(n);
|
|
9758
|
+
if (r) return String(this.context.getVar(r[1]).length);
|
|
9759
|
+
let i = /^(\w+|[?#@*-])(?::?([-=?+])([\s\S]*))?$/.exec(n);
|
|
9760
|
+
if (!i) return t;
|
|
9761
|
+
let [, a, o, s = ""] = i, c = String(this.context.getVar(a)), l = () => this._replaceVariables(e._sanitiseCommandPart(s));
|
|
9762
|
+
if (!o) return c;
|
|
9763
|
+
if (o === "+") return c === "" ? "" : l();
|
|
9764
|
+
if (c !== "") return c;
|
|
9765
|
+
if (o === "-") return l();
|
|
9766
|
+
if (o === "=") {
|
|
9767
|
+
let e = await l();
|
|
9768
|
+
return this.context.setVar(a, e), e;
|
|
9769
|
+
}
|
|
9770
|
+
throw Error(`${a}: ${s || "parameter null or not set"}`);
|
|
9771
|
+
}
|
|
9772
|
+
static _skipGroup(e, t) {
|
|
9773
|
+
let n = [];
|
|
9774
|
+
for (let r = t; r < e.length; r++) {
|
|
9775
|
+
let t = e[r], i = n[n.length - 1];
|
|
9776
|
+
if (i === "'") t === "'" && n.pop();
|
|
9777
|
+
else if (t === "\\") r++;
|
|
9778
|
+
else if (t === "\"") i === "\"" ? n.pop() : n.push("\"");
|
|
9779
|
+
else if (t === "'" && i !== "\"") n.push("'");
|
|
9780
|
+
else if (t === "$" && (e[r + 1] === "{" || e[r + 1] === "(")) n.push(e[r + 1] === "{" ? "}" : ")"), r++;
|
|
9781
|
+
else if (t === "(" && i !== "\"") n.push(")");
|
|
9782
|
+
else if (t === i && (n.pop(), n.length < 1)) return r + 1;
|
|
9489
9783
|
}
|
|
9490
|
-
return
|
|
9784
|
+
return -1;
|
|
9491
9785
|
}
|
|
9492
9786
|
_evalArithmetic(e) {
|
|
9493
9787
|
let t = e.replace(/\${?([\w\d]+)}?/g, (e, t) => String(parseInt(this.context.getVar(t)) || 0));
|
|
@@ -9550,53 +9844,50 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
9550
9844
|
let r = [];
|
|
9551
9845
|
return n.on("stdOut", (e) => r.push(e)), n.on("stdErr", (e) => this.emit("stdErr", e)), await n.onCommand(e, !1), this.lastCode = n.lastCode, r.join("\n");
|
|
9552
9846
|
}
|
|
9553
|
-
static _splitCommand(
|
|
9554
|
-
let
|
|
9555
|
-
for (let c = 0; c <
|
|
9556
|
-
let l =
|
|
9557
|
-
if (
|
|
9558
|
-
|
|
9559
|
-
|
|
9847
|
+
static _splitCommand(t) {
|
|
9848
|
+
let n = /\s/g, r = !1, i = !1, a = [], o = !1, s = [];
|
|
9849
|
+
for (let c = 0; c < t.length; c++) {
|
|
9850
|
+
let l = t[c];
|
|
9851
|
+
if (!r && l === "$" && (t[c + 1] === "(" || t[c + 1] === "{")) {
|
|
9852
|
+
let n = e._skipGroup(t, c);
|
|
9853
|
+
if (n > -1) {
|
|
9854
|
+
a.push(t.slice(c, n)), c = n - 1;
|
|
9855
|
+
continue;
|
|
9856
|
+
}
|
|
9560
9857
|
}
|
|
9561
|
-
if (
|
|
9562
|
-
let
|
|
9563
|
-
if (
|
|
9564
|
-
a.push(
|
|
9858
|
+
if (i && l === "\\" && c + 1 < t.length) {
|
|
9859
|
+
let e = t[c + 1];
|
|
9860
|
+
if (e === "\"" || e === "\\" || e === "$") {
|
|
9861
|
+
a.push(e === "$" ? S : e), c++;
|
|
9565
9862
|
continue;
|
|
9566
9863
|
}
|
|
9567
9864
|
}
|
|
9568
|
-
if (!
|
|
9569
|
-
let
|
|
9570
|
-
a.push(
|
|
9865
|
+
if (!r && !i && l === "\\" && c + 1 < t.length) {
|
|
9866
|
+
let e = t[++c];
|
|
9867
|
+
a.push(e === "$" ? S : e), (e === "\"" || e === "'") && (o = !0);
|
|
9571
9868
|
continue;
|
|
9572
9869
|
}
|
|
9573
|
-
if (l === "'" && !
|
|
9574
|
-
|
|
9870
|
+
if (l === "'" && !i) {
|
|
9871
|
+
r = !r, o = !0;
|
|
9575
9872
|
continue;
|
|
9576
9873
|
}
|
|
9577
|
-
if (l === "\"" && !
|
|
9578
|
-
|
|
9874
|
+
if (l === "\"" && !r) {
|
|
9875
|
+
i = !i, o = !0;
|
|
9579
9876
|
continue;
|
|
9580
9877
|
}
|
|
9581
|
-
if (!
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
}
|
|
9586
|
-
|
|
9587
|
-
(a.length > 0 || o) && (s.push({
|
|
9588
|
-
value: a.join(""),
|
|
9589
|
-
hasQuote: o
|
|
9590
|
-
}), a = [], o = !1);
|
|
9591
|
-
continue;
|
|
9592
|
-
}
|
|
9878
|
+
if (!r && !i && l.match(n)) {
|
|
9879
|
+
(a.length > 0 || o) && (s.push({
|
|
9880
|
+
value: a.join(""),
|
|
9881
|
+
hasQuote: o
|
|
9882
|
+
}), a = [], o = !1);
|
|
9883
|
+
continue;
|
|
9593
9884
|
}
|
|
9594
|
-
a.push(l);
|
|
9885
|
+
a.push(l === "$" && r ? S : l);
|
|
9595
9886
|
}
|
|
9596
9887
|
if ((a.length > 0 || o) && s.push({
|
|
9597
9888
|
value: a.join(""),
|
|
9598
9889
|
hasQuote: o
|
|
9599
|
-
}),
|
|
9890
|
+
}), r || i) throw Error("quote expression not closed");
|
|
9600
9891
|
return s;
|
|
9601
9892
|
}
|
|
9602
9893
|
static _escapeRegExp(e) {
|
|
@@ -9618,9 +9909,9 @@ var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
|
9618
9909
|
return e.create(Object.assign({}, n, { filesystem: t }));
|
|
9619
9910
|
}
|
|
9620
9911
|
};
|
|
9621
|
-
C.STATUS_READY = "READY", C.STATUS_WORKING = "WORKING", C.STATUS_DESTROYED = "DESTROYED", C.Command = s, C.InteractiveCommand = c, C.WasmCommand = a, C.createWasmCommand = a.createGenericWasmCommand || a.createCommand, C.ReplCommand = j(), C.JsCommand = o, C.FS = h, C.BinaryContainer =
|
|
9912
|
+
C.STATUS_READY = "READY", C.STATUS_WORKING = "WORKING", C.STATUS_DESTROYED = "DESTROYED", C.Command = s, C.InteractiveCommand = c, C.WasmCommand = a, C.createWasmCommand = a.createGenericWasmCommand || a.createCommand, C.ReplCommand = j(), C.JsCommand = o, C.FS = h, C.BinaryContainer = Y(), C.Storage = C.BinaryContainer.FilesystemStorage, globalThis.shell = C, globalThis.Shell = C, t.exports = C;
|
|
9622
9913
|
}));
|
|
9623
9914
|
//#endregion
|
|
9624
|
-
export default
|
|
9915
|
+
export default pr();
|
|
9625
9916
|
|
|
9626
9917
|
//# sourceMappingURL=shell.es.js.map
|