bbpro
Version:
BrowserBox - remote browser isolation tool
747 lines • 195 kB
JavaScript
(function(e) {
if ("object" == typeof exports && "undefined" != typeof module) module.exports = e();
else if ("function" == typeof define && define.amd) define([], e);
else {
var t;
t = "undefined" == typeof window ? "undefined" == typeof global ? "undefined" == typeof self ? this : self : global : window, t.SimplePeer = e();
}
})(function() {
var t = Math.floor, n = Math.abs, r = Math.pow;
return (function() {
function d(s, e, n) {
function t(o, i) {
if (!e[o]) {
if (!s[o]) {
var l = "function" == typeof require && undefined;
if (!i && l) return l(o, !0);
if (r) return r(o, !0);
var c = new Error("Cannot find module '" + o + "'");
throw c.code = "MODULE_NOT_FOUND", c;
}
var a = e[o] = {
exports: {}
};
s[o][0].call(a.exports, function(e) {
var r = s[o][1][e];
return t(r || e);
}, a, a.exports, d, s, e, n);
}
return e[o].exports;
}
for(var r = "function" == typeof require && undefined, a = 0; a < n.length; a++)t(n[a]);
return t;
}
return d;
})()({
1: [
function(e, t, n) {
"use strict";
function r(e) {
var t = e.length;
if (0 < t % 4) throw new Error("Invalid string. Length must be a multiple of 4");
var n = e.indexOf("=");
-1 === n && (n = t);
var r = n === t ? 0 : 4 - n % 4;
return [
n,
r
];
}
function a(e, t, n) {
return 3 * (t + n) / 4 - n;
}
function o(e) {
var t, n, o = r(e), d = o[0], s = o[1], l = new p(a(e, d, s)), c = 0, f = 0 < s ? d - 4 : d;
for(n = 0; n < f; n += 4)t = u[e.charCodeAt(n)] << 18 | u[e.charCodeAt(n + 1)] << 12 | u[e.charCodeAt(n + 2)] << 6 | u[e.charCodeAt(n + 3)], l[c++] = 255 & t >> 16, l[c++] = 255 & t >> 8, l[c++] = 255 & t;
return 2 === s && (t = u[e.charCodeAt(n)] << 2 | u[e.charCodeAt(n + 1)] >> 4, l[c++] = 255 & t), 1 === s && (t = u[e.charCodeAt(n)] << 10 | u[e.charCodeAt(n + 1)] << 4 | u[e.charCodeAt(n + 2)] >> 2, l[c++] = 255 & t >> 8, l[c++] = 255 & t), l;
}
function d(e) {
return c[63 & e >> 18] + c[63 & e >> 12] + c[63 & e >> 6] + c[63 & e];
}
function s(e, t, n) {
for(var r, a = [], o = t; o < n; o += 3)r = (16711680 & e[o] << 16) + (65280 & e[o + 1] << 8) + (255 & e[o + 2]), a.push(d(r));
return a.join("");
}
function l(e) {
for(var t, n = e.length, r = n % 3, a = [], o = 16383, d = 0, l = n - r; d < l; d += o)a.push(s(e, d, d + o > l ? l : d + o));
return 1 === r ? (t = e[n - 1], a.push(c[t >> 2] + c[63 & t << 4] + "==")) : 2 === r && (t = (e[n - 2] << 8) + e[n - 1], a.push(c[t >> 10] + c[63 & t >> 4] + c[63 & t << 2] + "=")), a.join("");
}
n.byteLength = function(e) {
var t = r(e), n = t[0], a = t[1];
return 3 * (n + a) / 4 - a;
}, n.toByteArray = o, n.fromByteArray = l;
for(var c = [], u = [], p = "undefined" == typeof Uint8Array ? Array : Uint8Array, f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", g = 0, _ = f.length; g < _; ++g)c[g] = f[g], u[f.charCodeAt(g)] = g;
u[45] = 62, u[95] = 63;
},
{}
],
2: [
function() {},
{}
],
3: [
function(e, t, n) {
(function() {
(function() {
"use strict";
var t = String.fromCharCode, o = Math.min;
function d(e) {
if (2147483647 < e) throw new RangeError('The value "' + e + '" is invalid for option "size"');
var t = new Uint8Array(e);
return t.__proto__ = s.prototype, t;
}
function s(e, t, n) {
if ("number" == typeof e) {
if ("string" == typeof t) throw new TypeError('The "string" argument must be of type string. Received type number');
return p(e);
}
return l(e, t, n);
}
function l(e, t, n) {
if ("string" == typeof e) return f(e, t);
if (ArrayBuffer.isView(e)) return g(e);
if (null == e) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
if (K(e, ArrayBuffer) || e && K(e.buffer, ArrayBuffer)) return _(e, t, n);
if ("number" == typeof e) throw new TypeError('The "value" argument must not be of type number. Received type number');
var r = e.valueOf && e.valueOf();
if (null != r && r !== e) return s.from(r, t, n);
var a = h(e);
if (a) return a;
if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof e[Symbol.toPrimitive]) return s.from(e[Symbol.toPrimitive]("string"), t, n);
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
}
function c(e) {
if ("number" != typeof e) throw new TypeError('"size" argument must be of type number');
else if (0 > e) throw new RangeError('The value "' + e + '" is invalid for option "size"');
}
function u(e, t, n) {
return c(e), 0 >= e ? d(e) : void 0 === t ? d(e) : "string" == typeof n ? d(e).fill(t, n) : d(e).fill(t);
}
function p(e) {
return c(e), d(0 > e ? 0 : 0 | m(e));
}
function f(e, t) {
if (("string" != typeof t || "" === t) && (t = "utf8"), !s.isEncoding(t)) throw new TypeError("Unknown encoding: " + t);
var n = 0 | b(e, t), r = d(n), a = r.write(e, t);
return a !== n && (r = r.slice(0, a)), r;
}
function g(e) {
for(var t = 0 > e.length ? 0 : 0 | m(e.length), n = d(t), r = 0; r < t; r += 1)n[r] = 255 & e[r];
return n;
}
function _(e, t, n) {
if (0 > t || e.byteLength < t) throw new RangeError('"offset" is outside of buffer bounds');
if (e.byteLength < t + (n || 0)) throw new RangeError('"length" is outside of buffer bounds');
var r;
return r = void 0 === t && void 0 === n ? new Uint8Array(e) : void 0 === n ? new Uint8Array(e, t) : new Uint8Array(e, t, n), r.__proto__ = s.prototype, r;
}
function h(e) {
if (s.isBuffer(e)) {
var t = 0 | m(e.length), n = d(t);
return 0 === n.length ? n : (e.copy(n, 0, 0, t), n);
}
return void 0 === e.length ? "Buffer" === e.type && Array.isArray(e.data) ? g(e.data) : void 0 : "number" != typeof e.length || X(e.length) ? d(0) : g(e);
}
function m(e) {
if (e >= 2147483647) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + 2147483647..toString(16) + " bytes");
return 0 | e;
}
function b(e, t) {
if (s.isBuffer(e)) return e.length;
if (ArrayBuffer.isView(e) || K(e, ArrayBuffer)) return e.byteLength;
if ("string" != typeof e) throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e);
var n = e.length, r = 2 < arguments.length && !0 === arguments[2];
if (!r && 0 === n) return 0;
for(var a = !1;;)switch(t){
case "ascii":
case "latin1":
case "binary":
return n;
case "utf8":
case "utf-8":
return H(e).length;
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return 2 * n;
case "hex":
return n >>> 1;
case "base64":
return z(e).length;
default:
if (a) return r ? -1 : H(e).length;
t = ("" + t).toLowerCase(), a = !0;
}
}
function y(e, t, n) {
var r = !1;
if ((void 0 === t || 0 > t) && (t = 0), t > this.length) return "";
if ((void 0 === n || n > this.length) && (n = this.length), 0 >= n) return "";
if (n >>>= 0, t >>>= 0, n <= t) return "";
for(e || (e = "utf8");;)switch(e){
case "hex":
return P(this, t, n);
case "utf8":
case "utf-8":
return x(this, t, n);
case "ascii":
return D(this, t, n);
case "latin1":
case "binary":
return I(this, t, n);
case "base64":
return A(this, t, n);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return M(this, t, n);
default:
if (r) throw new TypeError("Unknown encoding: " + e);
e = (e + "").toLowerCase(), r = !0;
}
}
function C(e, t, n) {
var r = e[t];
e[t] = e[n], e[n] = r;
}
function R(e, t, n, r, a) {
if (0 === e.length) return -1;
if ("string" == typeof n ? (r = n, n = 0) : 2147483647 < n ? n = 2147483647 : -2147483648 > n && (n = -2147483648), n = +n, X(n) && (n = a ? 0 : e.length - 1), 0 > n && (n = e.length + n), n >= e.length) {
if (a) return -1;
n = e.length - 1;
} else if (0 > n) {
if (a) n = 0;
else return -1;
}
if ("string" == typeof t && (t = s.from(t, r)), s.isBuffer(t)) return 0 === t.length ? -1 : E(e, t, n, r, a);
if ("number" == typeof t) return t &= 255, "function" == typeof Uint8Array.prototype.indexOf ? a ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : E(e, [
t
], n, r, a);
throw new TypeError("val must be string, number or Buffer");
}
function E(e, t, n, r, a) {
function o(e, t) {
return 1 === d ? e[t] : e.readUInt16BE(t * d);
}
var d = 1, s = e.length, l = t.length;
if (void 0 !== r && (r = (r + "").toLowerCase(), "ucs2" === r || "ucs-2" === r || "utf16le" === r || "utf-16le" === r)) {
if (2 > e.length || 2 > t.length) return -1;
d = 2, s /= 2, l /= 2, n /= 2;
}
var c;
if (a) {
var u = -1;
for(c = n; c < s; c++)if (o(e, c) !== o(t, -1 === u ? 0 : c - u)) -1 !== u && (c -= c - u), u = -1;
else if (-1 === u && (u = c), c - u + 1 === l) return u * d;
} else for(n + l > s && (n = s - l), c = n; 0 <= c; c--){
for(var p = !0, f = 0; f < l; f++)if (o(e, c + f) !== o(t, f)) {
p = !1;
break;
}
if (p) return c;
}
return -1;
}
function w(e, t, n, r) {
n = +n || 0;
var a = e.length - n;
r ? (r = +r, r > a && (r = a)) : r = a;
var o = t.length;
r > o / 2 && (r = o / 2);
for(var d, s = 0; s < r; ++s){
if (d = parseInt(t.substr(2 * s, 2), 16), X(d)) return s;
e[n + s] = d;
}
return s;
}
function S(e, t, n, r) {
return G(H(t, e.length - n), e, n, r);
}
function T(e, t, n, r) {
return G(Y(t), e, n, r);
}
function v(e, t, n, r) {
return T(e, t, n, r);
}
function k(e, t, n, r) {
return G(z(t), e, n, r);
}
function L(e, t, n, r) {
return G(V(t, e.length - n), e, n, r);
}
function A(e, t, n) {
return 0 === t && n === e.length ? $.fromByteArray(e) : $.fromByteArray(e.slice(t, n));
}
function x(e, t, n) {
n = o(e.length, n);
for(var r = [], a = t; a < n;){
var d = e[a], s = null, l = 239 < d ? 4 : 223 < d ? 3 : 191 < d ? 2 : 1;
if (a + l <= n) {
var c, u, p, f;
1 === l ? 128 > d && (s = d) : 2 === l ? (c = e[a + 1], 128 == (192 & c) && (f = (31 & d) << 6 | 63 & c, 127 < f && (s = f))) : 3 === l ? (c = e[a + 1], u = e[a + 2], 128 == (192 & c) && 128 == (192 & u) && (f = (15 & d) << 12 | (63 & c) << 6 | 63 & u, 2047 < f && (55296 > f || 57343 < f) && (s = f))) : 4 === l && (c = e[a + 1], u = e[a + 2], p = e[a + 3], 128 == (192 & c) && 128 == (192 & u) && 128 == (192 & p) && (f = (15 & d) << 18 | (63 & c) << 12 | (63 & u) << 6 | 63 & p, 65535 < f && 1114112 > f && (s = f)));
}
null === s ? (s = 65533, l = 1) : 65535 < s && (s -= 65536, r.push(55296 | 1023 & s >>> 10), s = 56320 | 1023 & s), r.push(s), a += l;
}
return N(r);
}
function N(e) {
var n = e.length;
if (n <= 4096) return t.apply(String, e);
for(var r = "", a = 0; a < n;)r += t.apply(String, e.slice(a, a += 4096));
return r;
}
function D(e, n, r) {
var a = "";
r = o(e.length, r);
for(var d = n; d < r; ++d)a += t(127 & e[d]);
return a;
}
function I(e, n, r) {
var a = "";
r = o(e.length, r);
for(var d = n; d < r; ++d)a += t(e[d]);
return a;
}
function P(e, t, n) {
var r = e.length;
(!t || 0 > t) && (t = 0), (!n || 0 > n || n > r) && (n = r);
for(var a = "", o = t; o < n; ++o)a += W(e[o]);
return a;
}
function M(e, n, r) {
for(var a = e.slice(n, r), o = "", d = 0; d < a.length; d += 2)o += t(a[d] + 256 * a[d + 1]);
return o;
}
function O(e, t, n) {
if (0 != e % 1 || 0 > e) throw new RangeError("offset is not uint");
if (e + t > n) throw new RangeError("Trying to access beyond buffer length");
}
function F(e, t, n, r, a, o) {
if (!s.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance');
if (t > a || t < o) throw new RangeError('"value" argument is out of bounds');
if (n + r > e.length) throw new RangeError("Index out of range");
}
function B(e, t, n, r) {
if (n + r > e.length) throw new RangeError("Index out of range");
if (0 > n) throw new RangeError("Index out of range");
}
function U(e, t, n, r, a) {
return t = +t, n >>>= 0, a || B(e, t, n, 4, 34028234663852886e22, -340282346638528860000000000000000000000), J.write(e, t, n, r, 23, 4), n + 4;
}
function j(e, t, n, r, a) {
return t = +t, n >>>= 0, a || B(e, t, n, 8, 17976931348623157e292, -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), J.write(e, t, n, r, 52, 8), n + 8;
}
function q(e) {
if (e = e.split("=")[0], e = e.trim().replace(Q, ""), 2 > e.length) return "";
for(; 0 != e.length % 4;)e += "=";
return e;
}
function W(e) {
return 16 > e ? "0" + e.toString(16) : e.toString(16);
}
function H(e, t) {
t = t || 1 / 0;
for(var n, r = e.length, a = null, o = [], d = 0; d < r; ++d){
if (n = e.charCodeAt(d), 55295 < n && 57344 > n) {
if (!a) {
if (56319 < n) {
-1 < (t -= 3) && o.push(239, 191, 189);
continue;
} else if (d + 1 === r) {
-1 < (t -= 3) && o.push(239, 191, 189);
continue;
}
a = n;
continue;
}
if (56320 > n) {
-1 < (t -= 3) && o.push(239, 191, 189), a = n;
continue;
}
n = (a - 55296 << 10 | n - 56320) + 65536;
} else a && -1 < (t -= 3) && o.push(239, 191, 189);
if (a = null, 128 > n) {
if (0 > (t -= 1)) break;
o.push(n);
} else if (2048 > n) {
if (0 > (t -= 2)) break;
o.push(192 | n >> 6, 128 | 63 & n);
} else if (65536 > n) {
if (0 > (t -= 3)) break;
o.push(224 | n >> 12, 128 | 63 & n >> 6, 128 | 63 & n);
} else if (1114112 > n) {
if (0 > (t -= 4)) break;
o.push(240 | n >> 18, 128 | 63 & n >> 12, 128 | 63 & n >> 6, 128 | 63 & n);
} else throw new Error("Invalid code point");
}
return o;
}
function Y(e) {
for(var t = [], n = 0; n < e.length; ++n)t.push(255 & e.charCodeAt(n));
return t;
}
function V(e, t) {
for(var n, r, a, o = [], d = 0; d < e.length && !(0 > (t -= 2)); ++d)n = e.charCodeAt(d), r = n >> 8, a = n % 256, o.push(a), o.push(r);
return o;
}
function z(e) {
return $.toByteArray(q(e));
}
function G(e, t, n, r) {
for(var a = 0; a < r && !(a + n >= t.length || a >= e.length); ++a)t[a + n] = e[a];
return a;
}
function K(e, t) {
return e instanceof t || null != e && null != e.constructor && null != e.constructor.name && e.constructor.name === t.name;
}
function X(e) {
return e !== e;
}
var $ = e("base64-js"), J = e("ieee754");
n.Buffer = s, n.SlowBuffer = function(e) {
return +e != e && (e = 0), s.alloc(+e);
}, n.INSPECT_MAX_BYTES = 50;
n.kMaxLength = 2147483647, s.TYPED_ARRAY_SUPPORT = function() {
try {
var e = new Uint8Array(1);
return e.__proto__ = {
__proto__: Uint8Array.prototype,
foo: function() {
return 42;
}
}, 42 === e.foo();
} catch (t) {
return !1;
}
}(), s.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(s.prototype, "parent", {
enumerable: !0,
get: function() {
return s.isBuffer(this) ? this.buffer : void 0;
}
}), Object.defineProperty(s.prototype, "offset", {
enumerable: !0,
get: function() {
return s.isBuffer(this) ? this.byteOffset : void 0;
}
}), "undefined" != typeof Symbol && null != Symbol.species && s[Symbol.species] === s && Object.defineProperty(s, Symbol.species, {
value: null,
configurable: !0,
enumerable: !1,
writable: !1
}), s.poolSize = 8192, s.from = function(e, t, n) {
return l(e, t, n);
}, s.prototype.__proto__ = Uint8Array.prototype, s.__proto__ = Uint8Array, s.alloc = function(e, t, n) {
return u(e, t, n);
}, s.allocUnsafe = function(e) {
return p(e);
}, s.allocUnsafeSlow = function(e) {
return p(e);
}, s.isBuffer = function(e) {
return null != e && !0 === e._isBuffer && e !== s.prototype;
}, s.compare = function(e, t) {
if (K(e, Uint8Array) && (e = s.from(e, e.offset, e.byteLength)), K(t, Uint8Array) && (t = s.from(t, t.offset, t.byteLength)), !s.isBuffer(e) || !s.isBuffer(t)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
if (e === t) return 0;
for(var n = e.length, r = t.length, d = 0, l = o(n, r); d < l; ++d)if (e[d] !== t[d]) {
n = e[d], r = t[d];
break;
}
return n < r ? -1 : r < n ? 1 : 0;
}, s.isEncoding = function(e) {
switch((e + "").toLowerCase()){
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "latin1":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return !0;
default:
return !1;
}
}, s.concat = function(e, t) {
if (!Array.isArray(e)) throw new TypeError('"list" argument must be an Array of Buffers');
if (0 === e.length) return s.alloc(0);
var n;
if (t === void 0) for(t = 0, n = 0; n < e.length; ++n)t += e[n].length;
var r = s.allocUnsafe(t), a = 0;
for(n = 0; n < e.length; ++n){
var o = e[n];
if (K(o, Uint8Array) && (o = s.from(o)), !s.isBuffer(o)) throw new TypeError('"list" argument must be an Array of Buffers');
o.copy(r, a), a += o.length;
}
return r;
}, s.byteLength = b, s.prototype._isBuffer = !0, s.prototype.swap16 = function() {
var e = this.length;
if (0 != e % 2) throw new RangeError("Buffer size must be a multiple of 16-bits");
for(var t = 0; t < e; t += 2)C(this, t, t + 1);
return this;
}, s.prototype.swap32 = function() {
var e = this.length;
if (0 != e % 4) throw new RangeError("Buffer size must be a multiple of 32-bits");
for(var t = 0; t < e; t += 4)C(this, t, t + 3), C(this, t + 1, t + 2);
return this;
}, s.prototype.swap64 = function() {
var e = this.length;
if (0 != e % 8) throw new RangeError("Buffer size must be a multiple of 64-bits");
for(var t = 0; t < e; t += 8)C(this, t, t + 7), C(this, t + 1, t + 6), C(this, t + 2, t + 5), C(this, t + 3, t + 4);
return this;
}, s.prototype.toString = function() {
var e = this.length;
return 0 === e ? "" : 0 === arguments.length ? x(this, 0, e) : y.apply(this, arguments);
}, s.prototype.toLocaleString = s.prototype.toString, s.prototype.equals = function(e) {
if (!s.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
return this === e || 0 === s.compare(this, e);
}, s.prototype.inspect = function() {
var e = "", t = n.INSPECT_MAX_BYTES;
return e = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (e += " ... "), "<Buffer " + e + ">";
}, s.prototype.compare = function(e, t, n, r, a) {
if (K(e, Uint8Array) && (e = s.from(e, e.offset, e.byteLength)), !s.isBuffer(e)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e);
if (void 0 === t && (t = 0), void 0 === n && (n = e ? e.length : 0), void 0 === r && (r = 0), void 0 === a && (a = this.length), 0 > t || n > e.length || 0 > r || a > this.length) throw new RangeError("out of range index");
if (r >= a && t >= n) return 0;
if (r >= a) return -1;
if (t >= n) return 1;
if (t >>>= 0, n >>>= 0, r >>>= 0, a >>>= 0, this === e) return 0;
for(var d = a - r, l = n - t, c = o(d, l), u = this.slice(r, a), p = e.slice(t, n), f = 0; f < c; ++f)if (u[f] !== p[f]) {
d = u[f], l = p[f];
break;
}
return d < l ? -1 : l < d ? 1 : 0;
}, s.prototype.includes = function(e, t, n) {
return -1 !== this.indexOf(e, t, n);
}, s.prototype.indexOf = function(e, t, n) {
return R(this, e, t, n, !0);
}, s.prototype.lastIndexOf = function(e, t, n) {
return R(this, e, t, n, !1);
}, s.prototype.write = function(e, t, n, r) {
if (void 0 === t) r = "utf8", n = this.length, t = 0;
else if (void 0 === n && "string" == typeof t) r = t, n = this.length, t = 0;
else if (isFinite(t)) t >>>= 0, isFinite(n) ? (n >>>= 0, void 0 === r && (r = "utf8")) : (r = n, n = void 0);
else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
var a = this.length - t;
if ((void 0 === n || n > a) && (n = a), 0 < e.length && (0 > n || 0 > t) || t > this.length) throw new RangeError("Attempt to write outside buffer bounds");
r || (r = "utf8");
for(var o = !1;;)switch(r){
case "hex":
return w(this, e, t, n);
case "utf8":
case "utf-8":
return S(this, e, t, n);
case "ascii":
return T(this, e, t, n);
case "latin1":
case "binary":
return v(this, e, t, n);
case "base64":
return k(this, e, t, n);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return L(this, e, t, n);
default:
if (o) throw new TypeError("Unknown encoding: " + r);
r = ("" + r).toLowerCase(), o = !0;
}
}, s.prototype.toJSON = function() {
return {
type: "Buffer",
data: Array.prototype.slice.call(this._arr || this, 0)
};
};
s.prototype.slice = function(e, t) {
var n = this.length;
e = ~~e, t = t === void 0 ? n : ~~t, 0 > e ? (e += n, 0 > e && (e = 0)) : e > n && (e = n), 0 > t ? (t += n, 0 > t && (t = 0)) : t > n && (t = n), t < e && (t = e);
var r = this.subarray(e, t);
return r.__proto__ = s.prototype, r;
}, s.prototype.readUIntLE = function(e, t, n) {
e >>>= 0, t >>>= 0, n || O(e, t, this.length);
for(var r = this[e], a = 1, o = 0; ++o < t && (a *= 256);)r += this[e + o] * a;
return r;
}, s.prototype.readUIntBE = function(e, t, n) {
e >>>= 0, t >>>= 0, n || O(e, t, this.length);
for(var r = this[e + --t], a = 1; 0 < t && (a *= 256);)r += this[e + --t] * a;
return r;
}, s.prototype.readUInt8 = function(e, t) {
return e >>>= 0, t || O(e, 1, this.length), this[e];
}, s.prototype.readUInt16LE = function(e, t) {
return e >>>= 0, t || O(e, 2, this.length), this[e] | this[e + 1] << 8;
}, s.prototype.readUInt16BE = function(e, t) {
return e >>>= 0, t || O(e, 2, this.length), this[e] << 8 | this[e + 1];
}, s.prototype.readUInt32LE = function(e, t) {
return e >>>= 0, t || O(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3];
}, s.prototype.readUInt32BE = function(e, t) {
return e >>>= 0, t || O(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
}, s.prototype.readIntLE = function(e, t, n) {
e >>>= 0, t >>>= 0, n || O(e, t, this.length);
for(var a = this[e], o = 1, d = 0; ++d < t && (o *= 256);)a += this[e + d] * o;
return o *= 128, a >= o && (a -= r(2, 8 * t)), a;
}, s.prototype.readIntBE = function(e, t, n) {
e >>>= 0, t >>>= 0, n || O(e, t, this.length);
for(var a = t, o = 1, d = this[e + --a]; 0 < a && (o *= 256);)d += this[e + --a] * o;
return o *= 128, d >= o && (d -= r(2, 8 * t)), d;
}, s.prototype.readInt8 = function(e, t) {
return e >>>= 0, t || O(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e];
}, s.prototype.readInt16LE = function(e, t) {
e >>>= 0, t || O(e, 2, this.length);
var n = this[e] | this[e + 1] << 8;
return 32768 & n ? 4294901760 | n : n;
}, s.prototype.readInt16BE = function(e, t) {
e >>>= 0, t || O(e, 2, this.length);
var n = this[e + 1] | this[e] << 8;
return 32768 & n ? 4294901760 | n : n;
}, s.prototype.readInt32LE = function(e, t) {
return e >>>= 0, t || O(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
}, s.prototype.readInt32BE = function(e, t) {
return e >>>= 0, t || O(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
}, s.prototype.readFloatLE = function(e, t) {
return e >>>= 0, t || O(e, 4, this.length), J.read(this, e, !0, 23, 4);
}, s.prototype.readFloatBE = function(e, t) {
return e >>>= 0, t || O(e, 4, this.length), J.read(this, e, !1, 23, 4);
}, s.prototype.readDoubleLE = function(e, t) {
return e >>>= 0, t || O(e, 8, this.length), J.read(this, e, !0, 52, 8);
}, s.prototype.readDoubleBE = function(e, t) {
return e >>>= 0, t || O(e, 8, this.length), J.read(this, e, !1, 52, 8);
}, s.prototype.writeUIntLE = function(e, t, n, a) {
if (e = +e, t >>>= 0, n >>>= 0, !a) {
var o = r(2, 8 * n) - 1;
F(this, e, t, n, o, 0);
}
var d = 1, s = 0;
for(this[t] = 255 & e; ++s < n && (d *= 256);)this[t + s] = 255 & e / d;
return t + n;
}, s.prototype.writeUIntBE = function(e, t, n, a) {
if (e = +e, t >>>= 0, n >>>= 0, !a) {
var o = r(2, 8 * n) - 1;
F(this, e, t, n, o, 0);
}
var d = n - 1, s = 1;
for(this[t + d] = 255 & e; 0 <= --d && (s *= 256);)this[t + d] = 255 & e / s;
return t + n;
}, s.prototype.writeUInt8 = function(e, t, n) {
return e = +e, t >>>= 0, n || F(this, e, t, 1, 255, 0), this[t] = 255 & e, t + 1;
}, s.prototype.writeUInt16LE = function(e, t, n) {
return e = +e, t >>>= 0, n || F(this, e, t, 2, 65535, 0), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2;
}, s.prototype.writeUInt16BE = function(e, t, n) {
return e = +e, t >>>= 0, n || F(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2;
}, s.prototype.writeUInt32LE = function(e, t, n) {
return e = +e, t >>>= 0, n || F(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e, t + 4;
}, s.prototype.writeUInt32BE = function(e, t, n) {
return e = +e, t >>>= 0, n || F(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4;
}, s.prototype.writeIntLE = function(e, t, n, a) {
if (e = +e, t >>>= 0, !a) {
var o = r(2, 8 * n - 1);
F(this, e, t, n, o - 1, -o);
}
var d = 0, s = 1, l = 0;
for(this[t] = 255 & e; ++d < n && (s *= 256);)0 > e && 0 === l && 0 !== this[t + d - 1] && (l = 1), this[t + d] = 255 & (e / s >> 0) - l;
return t + n;
}, s.prototype.writeIntBE = function(e, t, n, a) {
if (e = +e, t >>>= 0, !a) {
var o = r(2, 8 * n - 1);
F(this, e, t, n, o - 1, -o);
}
var d = n - 1, s = 1, l = 0;
for(this[t + d] = 255 & e; 0 <= --d && (s *= 256);)0 > e && 0 === l && 0 !== this[t + d + 1] && (l = 1), this[t + d] = 255 & (e / s >> 0) - l;
return t + n;
}, s.prototype.writeInt8 = function(e, t, n) {
return e = +e, t >>>= 0, n || F(this, e, t, 1, 127, -128), 0 > e && (e = 255 + e + 1), this[t] = 255 & e, t + 1;
}, s.prototype.writeInt16LE = function(e, t, n) {
return e = +e, t >>>= 0, n || F(this, e, t, 2, 32767, -32768), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2;
}, s.prototype.writeInt16BE = function(e, t, n) {
return e = +e, t >>>= 0, n || F(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2;
}, s.prototype.writeInt32LE = function(e, t, n) {
return e = +e, t >>>= 0, n || F(this, e, t, 4, 2147483647, -2147483648), this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4;
}, s.prototype.writeInt32BE = function(e, t, n) {
return e = +e, t >>>= 0, n || F(this, e, t, 4, 2147483647, -2147483648), 0 > e && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4;
}, s.prototype.writeFloatLE = function(e, t, n) {
return U(this, e, t, !0, n);
}, s.prototype.writeFloatBE = function(e, t, n) {
return U(this, e, t, !1, n);
}, s.prototype.writeDoubleLE = function(e, t, n) {
return j(this, e, t, !0, n);
}, s.prototype.writeDoubleBE = function(e, t, n) {
return j(this, e, t, !1, n);
}, s.prototype.copy = function(e, t, n, r) {
if (!s.isBuffer(e)) throw new TypeError("argument should be a Buffer");
if (n || (n = 0), r || 0 === r || (r = this.length), t >= e.length && (t = e.length), t || (t = 0), 0 < r && r < n && (r = n), r === n) return 0;
if (0 === e.length || 0 === this.length) return 0;
if (0 > t) throw new RangeError("targetStart out of bounds");
if (0 > n || n >= this.length) throw new RangeError("Index out of range");
if (0 > r) throw new RangeError("sourceEnd out of bounds");
r > this.length && (r = this.length), e.length - t < r - n && (r = e.length - t + n);
var a = r - n;
if (this === e && "function" == typeof Uint8Array.prototype.copyWithin) this.copyWithin(t, n, r);
else if (this === e && n < t && t < r) for(var o = a - 1; 0 <= o; --o)e[o + t] = this[o + n];
else Uint8Array.prototype.set.call(e, this.subarray(n, r), t);
return a;
}, s.prototype.fill = function(e, t, n, r) {
if ("string" == typeof e) {
if ("string" == typeof t ? (r = t, t = 0, n = this.length) : "string" == typeof n && (r = n, n = this.length), void 0 !== r && "string" != typeof r) throw new TypeError("encoding must be a string");
if ("string" == typeof r && !s.isEncoding(r)) throw new TypeError("Unknown encoding: " + r);
if (1 === e.length) {
var a = e.charCodeAt(0);
("utf8" === r && 128 > a || "latin1" === r) && (e = a);
}
} else "number" == typeof e && (e &= 255);
if (0 > t || this.length < t || this.length < n) throw new RangeError("Out of range index");
if (n <= t) return this;
t >>>= 0, n = n === void 0 ? this.length : n >>> 0, e || (e = 0);
var o;
if ("number" == typeof e) for(o = t; o < n; ++o)this[o] = e;
else {
var d = s.isBuffer(e) ? e : s.from(e, r), l = d.length;
if (0 === l) throw new TypeError('The value "' + e + '" is invalid for argument "value"');
for(o = 0; o < n - t; ++o)this[o + t] = d[o % l];
}
return this;
};
var Q = /[^+/0-9A-Za-z-_]/g;
}).call(this);
}).call(this, e("buffer").Buffer);
},
{
"base64-js": 1,
buffer: 3,
ieee754: 9
}
],
4: [
function(e, t, n) {
(function(a) {
(function() {
function r() {
let e;
try {
e = n.storage.getItem("debug");
} catch (e) {}
return !e && "undefined" != typeof a && "env" in a && (e = a.env.DEBUG), e;
}
n.formatArgs = function(e) {
if (e[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + e[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors) return;
const n = "color: " + this.color;
e.splice(1, 0, n, "color: inherit");
let r = 0, a = 0;
e[0].replace(/%[a-zA-Z%]/g, (e)=>{
"%%" === e || (r++, "%c" === e && (a = r));
}), e.splice(a, 0, n);
}, n.save = function(e) {
try {
e ? n.storage.setItem("debug", e) : n.storage.removeItem("debug");
} catch (e) {}
}, n.load = r, n.useColors = function() {
return !!("undefined" != typeof window && window.process && ("renderer" === window.process.type || window.process.__nwjs)) || !("undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) && ("undefined" != typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || "undefined" != typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && 31 <= parseInt(RegExp.$1, 10) || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
}, n.storage = function() {
try {
return localStorage;
} catch (e) {}
}(), n.destroy = (()=>{
let e = !1;
return ()=>{
e || (e = !0, console.