UNPKG

@seven.io/client

Version:
1,153 lines 983 kB
import { p as process$1 } from "./index-BOkPqsAO.js"; var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, cryptoBrowserify = {}, browser$b = { exports: {} }, safeBuffer$1 = { exports: {} }, dist = {}, hasRequiredDist; function requireDist() { return hasRequiredDist || (hasRequiredDist = 1, function(x) { Object.defineProperties(x, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } }); var q = {}, k = {}; k.byteLength = c, k.toByteArray = w, k.fromByteArray = B; for (var p = [], R = [], f = typeof Uint8Array < "u" ? Uint8Array : Array, M = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", b = 0, m = M.length; b < m; ++b) p[b] = M[b], R[M.charCodeAt(b)] = b; R[45] = 62, R[95] = 63; function y(P) { var z = P.length; if (z % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4"); var O = P.indexOf("="); O === -1 && (O = z); var G = O === z ? 0 : 4 - O % 4; return [O, G]; } function c(P) { var z = y(P), O = z[0], G = z[1]; return (O + G) * 3 / 4 - G; } function g(P, z, O) { return (z + O) * 3 / 4 - O; } function w(P) { var z, O = y(P), G = O[0], Y = O[1], ne = new f(g(P, G, Y)), fe = 0, Q = Y > 0 ? G - 4 : G, ue; for (ue = 0; ue < Q; ue += 4) z = R[P.charCodeAt(ue)] << 18 | R[P.charCodeAt(ue + 1)] << 12 | R[P.charCodeAt(ue + 2)] << 6 | R[P.charCodeAt(ue + 3)], ne[fe++] = z >> 16 & 255, ne[fe++] = z >> 8 & 255, ne[fe++] = z & 255; return Y === 2 && (z = R[P.charCodeAt(ue)] << 2 | R[P.charCodeAt(ue + 1)] >> 4, ne[fe++] = z & 255), Y === 1 && (z = R[P.charCodeAt(ue)] << 10 | R[P.charCodeAt(ue + 1)] << 4 | R[P.charCodeAt(ue + 2)] >> 2, ne[fe++] = z >> 8 & 255, ne[fe++] = z & 255), ne; } function _(P) { return p[P >> 18 & 63] + p[P >> 12 & 63] + p[P >> 6 & 63] + p[P & 63]; } function S(P, z, O) { for (var G, Y = [], ne = z; ne < O; ne += 3) G = (P[ne] << 16 & 16711680) + (P[ne + 1] << 8 & 65280) + (P[ne + 2] & 255), Y.push(_(G)); return Y.join(""); } function B(P) { for (var z, O = P.length, G = O % 3, Y = [], ne = 16383, fe = 0, Q = O - G; fe < Q; fe += ne) Y.push(S(P, fe, fe + ne > Q ? Q : fe + ne)); return G === 1 ? (z = P[O - 1], Y.push( p[z >> 2] + p[z << 4 & 63] + "==" )) : G === 2 && (z = (P[O - 2] << 8) + P[O - 1], Y.push( p[z >> 10] + p[z >> 4 & 63] + p[z << 2 & 63] + "=" )), Y.join(""); } var C = {}; /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ C.read = function(P, z, O, G, Y) { var ne, fe, Q = Y * 8 - G - 1, ue = (1 << Q) - 1, d = ue >> 1, e = -7, r = O ? Y - 1 : 0, n = O ? -1 : 1, a = P[z + r]; for (r += n, ne = a & (1 << -e) - 1, a >>= -e, e += Q; e > 0; ne = ne * 256 + P[z + r], r += n, e -= 8) ; for (fe = ne & (1 << -e) - 1, ne >>= -e, e += G; e > 0; fe = fe * 256 + P[z + r], r += n, e -= 8) ; if (ne === 0) ne = 1 - d; else { if (ne === ue) return fe ? NaN : (a ? -1 : 1) * (1 / 0); fe = fe + Math.pow(2, G), ne = ne - d; } return (a ? -1 : 1) * fe * Math.pow(2, ne - G); }, C.write = function(P, z, O, G, Y, ne) { var fe, Q, ue, d = ne * 8 - Y - 1, e = (1 << d) - 1, r = e >> 1, n = Y === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, a = G ? 0 : ne - 1, s = G ? 1 : -1, u = z < 0 || z === 0 && 1 / z < 0 ? 1 : 0; for (z = Math.abs(z), isNaN(z) || z === 1 / 0 ? (Q = isNaN(z) ? 1 : 0, fe = e) : (fe = Math.floor(Math.log(z) / Math.LN2), z * (ue = Math.pow(2, -fe)) < 1 && (fe--, ue *= 2), fe + r >= 1 ? z += n / ue : z += n * Math.pow(2, 1 - r), z * ue >= 2 && (fe++, ue /= 2), fe + r >= e ? (Q = 0, fe = e) : fe + r >= 1 ? (Q = (z * ue - 1) * Math.pow(2, Y), fe = fe + r) : (Q = z * Math.pow(2, r - 1) * Math.pow(2, Y), fe = 0)); Y >= 8; P[O + a] = Q & 255, a += s, Q /= 256, Y -= 8) ; for (fe = fe << Y | Q, d += Y; d > 0; P[O + a] = fe & 255, a += s, fe /= 256, d -= 8) ; P[O + a - s] |= u * 128; }; /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <https://feross.org> * @license MIT */ (function(P) { const z = k, O = C, G = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null; P.Buffer = e, P.SlowBuffer = E, P.INSPECT_MAX_BYTES = 50; const Y = 2147483647; P.kMaxLength = Y; const { Uint8Array: ne, ArrayBuffer: fe, SharedArrayBuffer: Q } = globalThis; e.TYPED_ARRAY_SUPPORT = ue(), !e.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && 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." ); function ue() { try { const U = new ne(1), I = { foo: function() { return 42; } }; return Object.setPrototypeOf(I, ne.prototype), Object.setPrototypeOf(U, I), U.foo() === 42; } catch { return !1; } } Object.defineProperty(e.prototype, "parent", { enumerable: !0, get: function() { if (e.isBuffer(this)) return this.buffer; } }), Object.defineProperty(e.prototype, "offset", { enumerable: !0, get: function() { if (e.isBuffer(this)) return this.byteOffset; } }); function d(U) { if (U > Y) throw new RangeError('The value "' + U + '" is invalid for option "size"'); const I = new ne(U); return Object.setPrototypeOf(I, e.prototype), I; } function e(U, I, F) { if (typeof U == "number") { if (typeof I == "string") throw new TypeError( 'The "string" argument must be of type string. Received type number' ); return s(U); } return r(U, I, F); } e.poolSize = 8192; function r(U, I, F) { if (typeof U == "string") return u(U, I); if (fe.isView(U)) return o(U); if (U == null) throw new TypeError( "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof U ); if (Ie(U, fe) || U && Ie(U.buffer, fe) || typeof Q < "u" && (Ie(U, Q) || U && Ie(U.buffer, Q))) return t(U, I, F); if (typeof U == "number") throw new TypeError( 'The "value" argument must not be of type number. Received type number' ); const Z = U.valueOf && U.valueOf(); if (Z != null && Z !== U) return e.from(Z, I, F); const te = h(U); if (te) return te; if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof U[Symbol.toPrimitive] == "function") return e.from(U[Symbol.toPrimitive]("string"), I, F); throw new TypeError( "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof U ); } e.from = function(U, I, F) { return r(U, I, F); }, Object.setPrototypeOf(e.prototype, ne.prototype), Object.setPrototypeOf(e, ne); function n(U) { if (typeof U != "number") throw new TypeError('"size" argument must be of type number'); if (U < 0) throw new RangeError('The value "' + U + '" is invalid for option "size"'); } function a(U, I, F) { return n(U), U <= 0 ? d(U) : I !== void 0 ? typeof F == "string" ? d(U).fill(I, F) : d(U).fill(I) : d(U); } e.alloc = function(U, I, F) { return a(U, I, F); }; function s(U) { return n(U), d(U < 0 ? 0 : v(U) | 0); } e.allocUnsafe = function(U) { return s(U); }, e.allocUnsafeSlow = function(U) { return s(U); }; function u(U, I) { if ((typeof I != "string" || I === "") && (I = "utf8"), !e.isEncoding(I)) throw new TypeError("Unknown encoding: " + I); const F = L(U, I) | 0; let Z = d(F); const te = Z.write(U, I); return te !== F && (Z = Z.slice(0, te)), Z; } function l(U) { const I = U.length < 0 ? 0 : v(U.length) | 0, F = d(I); for (let Z = 0; Z < I; Z += 1) F[Z] = U[Z] & 255; return F; } function o(U) { if (Ie(U, ne)) { const I = new ne(U); return t(I.buffer, I.byteOffset, I.byteLength); } return l(U); } function t(U, I, F) { if (I < 0 || U.byteLength < I) throw new RangeError('"offset" is outside of buffer bounds'); if (U.byteLength < I + (F || 0)) throw new RangeError('"length" is outside of buffer bounds'); let Z; return I === void 0 && F === void 0 ? Z = new ne(U) : F === void 0 ? Z = new ne(U, I) : Z = new ne(U, I, F), Object.setPrototypeOf(Z, e.prototype), Z; } function h(U) { if (e.isBuffer(U)) { const I = v(U.length) | 0, F = d(I); return F.length === 0 || U.copy(F, 0, 0, I), F; } if (U.length !== void 0) return typeof U.length != "number" || Ke(U.length) ? d(0) : l(U); if (U.type === "Buffer" && Array.isArray(U.data)) return l(U.data); } function v(U) { if (U >= Y) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + Y.toString(16) + " bytes"); return U | 0; } function E(U) { return +U != U && (U = 0), e.alloc(+U); } e.isBuffer = function(I) { return I != null && I._isBuffer === !0 && I !== e.prototype; }, e.compare = function(I, F) { if (Ie(I, ne) && (I = e.from(I, I.offset, I.byteLength)), Ie(F, ne) && (F = e.from(F, F.offset, F.byteLength)), !e.isBuffer(I) || !e.isBuffer(F)) throw new TypeError( 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' ); if (I === F) return 0; let Z = I.length, te = F.length; for (let ce = 0, oe = Math.min(Z, te); ce < oe; ++ce) if (I[ce] !== F[ce]) { Z = I[ce], te = F[ce]; break; } return Z < te ? -1 : te < Z ? 1 : 0; }, e.isEncoding = function(I) { switch (String(I).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; } }, e.concat = function(I, F) { if (!Array.isArray(I)) throw new TypeError('"list" argument must be an Array of Buffers'); if (I.length === 0) return e.alloc(0); let Z; if (F === void 0) for (F = 0, Z = 0; Z < I.length; ++Z) F += I[Z].length; const te = e.allocUnsafe(F); let ce = 0; for (Z = 0; Z < I.length; ++Z) { let oe = I[Z]; if (Ie(oe, ne)) ce + oe.length > te.length ? (e.isBuffer(oe) || (oe = e.from(oe)), oe.copy(te, ce)) : ne.prototype.set.call( te, oe, ce ); else if (e.isBuffer(oe)) oe.copy(te, ce); else throw new TypeError('"list" argument must be an Array of Buffers'); ce += oe.length; } return te; }; function L(U, I) { if (e.isBuffer(U)) return U.length; if (fe.isView(U) || Ie(U, fe)) return U.byteLength; if (typeof U != "string") throw new TypeError( 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof U ); const F = U.length, Z = arguments.length > 2 && arguments[2] === !0; if (!Z && F === 0) return 0; let te = !1; for (; ; ) switch (I) { case "ascii": case "latin1": case "binary": return F; case "utf8": case "utf-8": return Oe(U).length; case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return F * 2; case "hex": return F >>> 1; case "base64": return De(U).length; default: if (te) return Z ? -1 : Oe(U).length; I = ("" + I).toLowerCase(), te = !0; } } e.byteLength = L; function V(U, I, F) { let Z = !1; if ((I === void 0 || I < 0) && (I = 0), I > this.length || ((F === void 0 || F > this.length) && (F = this.length), F <= 0) || (F >>>= 0, I >>>= 0, F <= I)) return ""; for (U || (U = "utf8"); ; ) switch (U) { case "hex": return Ne(this, I, F); case "utf8": case "utf-8": return he(this, I, F); case "ascii": return be(this, I, F); case "latin1": case "binary": return se(this, I, F); case "base64": return Te(this, I, F); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return pe(this, I, F); default: if (Z) throw new TypeError("Unknown encoding: " + U); U = (U + "").toLowerCase(), Z = !0; } } e.prototype._isBuffer = !0; function K(U, I, F) { const Z = U[I]; U[I] = U[F], U[F] = Z; } e.prototype.swap16 = function() { const I = this.length; if (I % 2 !== 0) throw new RangeError("Buffer size must be a multiple of 16-bits"); for (let F = 0; F < I; F += 2) K(this, F, F + 1); return this; }, e.prototype.swap32 = function() { const I = this.length; if (I % 4 !== 0) throw new RangeError("Buffer size must be a multiple of 32-bits"); for (let F = 0; F < I; F += 4) K(this, F, F + 3), K(this, F + 1, F + 2); return this; }, e.prototype.swap64 = function() { const I = this.length; if (I % 8 !== 0) throw new RangeError("Buffer size must be a multiple of 64-bits"); for (let F = 0; F < I; F += 8) K(this, F, F + 7), K(this, F + 1, F + 6), K(this, F + 2, F + 5), K(this, F + 3, F + 4); return this; }, e.prototype.toString = function() { const I = this.length; return I === 0 ? "" : arguments.length === 0 ? he(this, 0, I) : V.apply(this, arguments); }, e.prototype.toLocaleString = e.prototype.toString, e.prototype.equals = function(I) { if (!e.isBuffer(I)) throw new TypeError("Argument must be a Buffer"); return this === I ? !0 : e.compare(this, I) === 0; }, e.prototype.inspect = function() { let I = ""; const F = P.INSPECT_MAX_BYTES; return I = this.toString("hex", 0, F).replace(/(.{2})/g, "$1 ").trim(), this.length > F && (I += " ... "), "<Buffer " + I + ">"; }, G && (e.prototype[G] = e.prototype.inspect), e.prototype.compare = function(I, F, Z, te, ce) { if (Ie(I, ne) && (I = e.from(I, I.offset, I.byteLength)), !e.isBuffer(I)) throw new TypeError( 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof I ); if (F === void 0 && (F = 0), Z === void 0 && (Z = I ? I.length : 0), te === void 0 && (te = 0), ce === void 0 && (ce = this.length), F < 0 || Z > I.length || te < 0 || ce > this.length) throw new RangeError("out of range index"); if (te >= ce && F >= Z) return 0; if (te >= ce) return -1; if (F >= Z) return 1; if (F >>>= 0, Z >>>= 0, te >>>= 0, ce >>>= 0, this === I) return 0; let oe = ce - te, Me = Z - F; const Le = Math.min(oe, Me), ye = this.slice(te, ce), qe = I.slice(F, Z); for (let Fe = 0; Fe < Le; ++Fe) if (ye[Fe] !== qe[Fe]) { oe = ye[Fe], Me = qe[Fe]; break; } return oe < Me ? -1 : Me < oe ? 1 : 0; }; function $(U, I, F, Z, te) { if (U.length === 0) return -1; if (typeof F == "string" ? (Z = F, F = 0) : F > 2147483647 ? F = 2147483647 : F < -2147483648 && (F = -2147483648), F = +F, Ke(F) && (F = te ? 0 : U.length - 1), F < 0 && (F = U.length + F), F >= U.length) { if (te) return -1; F = U.length - 1; } else if (F < 0) if (te) F = 0; else return -1; if (typeof I == "string" && (I = e.from(I, Z)), e.isBuffer(I)) return I.length === 0 ? -1 : j(U, I, F, Z, te); if (typeof I == "number") return I = I & 255, typeof ne.prototype.indexOf == "function" ? te ? ne.prototype.indexOf.call(U, I, F) : ne.prototype.lastIndexOf.call(U, I, F) : j(U, [I], F, Z, te); throw new TypeError("val must be string, number or Buffer"); } function j(U, I, F, Z, te) { let ce = 1, oe = U.length, Me = I.length; if (Z !== void 0 && (Z = String(Z).toLowerCase(), Z === "ucs2" || Z === "ucs-2" || Z === "utf16le" || Z === "utf-16le")) { if (U.length < 2 || I.length < 2) return -1; ce = 2, oe /= 2, Me /= 2, F /= 2; } function Le(qe, Fe) { return ce === 1 ? qe[Fe] : qe.readUInt16BE(Fe * ce); } let ye; if (te) { let qe = -1; for (ye = F; ye < oe; ye++) if (Le(U, ye) === Le(I, qe === -1 ? 0 : ye - qe)) { if (qe === -1 && (qe = ye), ye - qe + 1 === Me) return qe * ce; } else qe !== -1 && (ye -= ye - qe), qe = -1; } else for (F + Me > oe && (F = oe - Me), ye = F; ye >= 0; ye--) { let qe = !0; for (let Fe = 0; Fe < Me; Fe++) if (Le(U, ye + Fe) !== Le(I, Fe)) { qe = !1; break; } if (qe) return ye; } return -1; } e.prototype.includes = function(I, F, Z) { return this.indexOf(I, F, Z) !== -1; }, e.prototype.indexOf = function(I, F, Z) { return $(this, I, F, Z, !0); }, e.prototype.lastIndexOf = function(I, F, Z) { return $(this, I, F, Z, !1); }; function X(U, I, F, Z) { F = Number(F) || 0; const te = U.length - F; Z ? (Z = Number(Z), Z > te && (Z = te)) : Z = te; const ce = I.length; Z > ce / 2 && (Z = ce / 2); let oe; for (oe = 0; oe < Z; ++oe) { const Me = parseInt(I.substr(oe * 2, 2), 16); if (Ke(Me)) return oe; U[F + oe] = Me; } return oe; } function re(U, I, F, Z) { return Be(Oe(I, U.length - F), U, F, Z); } function J(U, I, F, Z) { return Be(ve(I), U, F, Z); } function H(U, I, F, Z) { return Be(De(I), U, F, Z); } function ie(U, I, F, Z) { return Be(Se(I, U.length - F), U, F, Z); } e.prototype.write = function(I, F, Z, te) { if (F === void 0) te = "utf8", Z = this.length, F = 0; else if (Z === void 0 && typeof F == "string") te = F, Z = this.length, F = 0; else if (isFinite(F)) F = F >>> 0, isFinite(Z) ? (Z = Z >>> 0, te === void 0 && (te = "utf8")) : (te = Z, Z = void 0); else throw new Error( "Buffer.write(string, encoding, offset[, length]) is no longer supported" ); const ce = this.length - F; if ((Z === void 0 || Z > ce) && (Z = ce), I.length > 0 && (Z < 0 || F < 0) || F > this.length) throw new RangeError("Attempt to write outside buffer bounds"); te || (te = "utf8"); let oe = !1; for (; ; ) switch (te) { case "hex": return X(this, I, F, Z); case "utf8": case "utf-8": return re(this, I, F, Z); case "ascii": case "latin1": case "binary": return J(this, I, F, Z); case "base64": return H(this, I, F, Z); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return ie(this, I, F, Z); default: if (oe) throw new TypeError("Unknown encoding: " + te); te = ("" + te).toLowerCase(), oe = !0; } }, e.prototype.toJSON = function() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) }; }; function Te(U, I, F) { return I === 0 && F === U.length ? z.fromByteArray(U) : z.fromByteArray(U.slice(I, F)); } function he(U, I, F) { F = Math.min(U.length, F); const Z = []; let te = I; for (; te < F; ) { const ce = U[te]; let oe = null, Me = ce > 239 ? 4 : ce > 223 ? 3 : ce > 191 ? 2 : 1; if (te + Me <= F) { let Le, ye, qe, Fe; switch (Me) { case 1: ce < 128 && (oe = ce); break; case 2: Le = U[te + 1], (Le & 192) === 128 && (Fe = (ce & 31) << 6 | Le & 63, Fe > 127 && (oe = Fe)); break; case 3: Le = U[te + 1], ye = U[te + 2], (Le & 192) === 128 && (ye & 192) === 128 && (Fe = (ce & 15) << 12 | (Le & 63) << 6 | ye & 63, Fe > 2047 && (Fe < 55296 || Fe > 57343) && (oe = Fe)); break; case 4: Le = U[te + 1], ye = U[te + 2], qe = U[te + 3], (Le & 192) === 128 && (ye & 192) === 128 && (qe & 192) === 128 && (Fe = (ce & 15) << 18 | (Le & 63) << 12 | (ye & 63) << 6 | qe & 63, Fe > 65535 && Fe < 1114112 && (oe = Fe)); } } oe === null ? (oe = 65533, Me = 1) : oe > 65535 && (oe -= 65536, Z.push(oe >>> 10 & 1023 | 55296), oe = 56320 | oe & 1023), Z.push(oe), te += Me; } return $e(Z); } const le = 4096; function $e(U) { const I = U.length; if (I <= le) return String.fromCharCode.apply(String, U); let F = "", Z = 0; for (; Z < I; ) F += String.fromCharCode.apply( String, U.slice(Z, Z += le) ); return F; } function be(U, I, F) { let Z = ""; F = Math.min(U.length, F); for (let te = I; te < F; ++te) Z += String.fromCharCode(U[te] & 127); return Z; } function se(U, I, F) { let Z = ""; F = Math.min(U.length, F); for (let te = I; te < F; ++te) Z += String.fromCharCode(U[te]); return Z; } function Ne(U, I, F) { const Z = U.length; (!I || I < 0) && (I = 0), (!F || F < 0 || F > Z) && (F = Z); let te = ""; for (let ce = I; ce < F; ++ce) te += Re[U[ce]]; return te; } function pe(U, I, F) { const Z = U.slice(I, F); let te = ""; for (let ce = 0; ce < Z.length - 1; ce += 2) te += String.fromCharCode(Z[ce] + Z[ce + 1] * 256); return te; } e.prototype.slice = function(I, F) { const Z = this.length; I = ~~I, F = F === void 0 ? Z : ~~F, I < 0 ? (I += Z, I < 0 && (I = 0)) : I > Z && (I = Z), F < 0 ? (F += Z, F < 0 && (F = 0)) : F > Z && (F = Z), F < I && (F = I); const te = this.subarray(I, F); return Object.setPrototypeOf(te, e.prototype), te; }; function ge(U, I, F) { if (U % 1 !== 0 || U < 0) throw new RangeError("offset is not uint"); if (U + I > F) throw new RangeError("Trying to access beyond buffer length"); } e.prototype.readUintLE = e.prototype.readUIntLE = function(I, F, Z) { I = I >>> 0, F = F >>> 0, Z || ge(I, F, this.length); let te = this[I], ce = 1, oe = 0; for (; ++oe < F && (ce *= 256); ) te += this[I + oe] * ce; return te; }, e.prototype.readUintBE = e.prototype.readUIntBE = function(I, F, Z) { I = I >>> 0, F = F >>> 0, Z || ge(I, F, this.length); let te = this[I + --F], ce = 1; for (; F > 0 && (ce *= 256); ) te += this[I + --F] * ce; return te; }, e.prototype.readUint8 = e.prototype.readUInt8 = function(I, F) { return I = I >>> 0, F || ge(I, 1, this.length), this[I]; }, e.prototype.readUint16LE = e.prototype.readUInt16LE = function(I, F) { return I = I >>> 0, F || ge(I, 2, this.length), this[I] | this[I + 1] << 8; }, e.prototype.readUint16BE = e.prototype.readUInt16BE = function(I, F) { return I = I >>> 0, F || ge(I, 2, this.length), this[I] << 8 | this[I + 1]; }, e.prototype.readUint32LE = e.prototype.readUInt32LE = function(I, F) { return I = I >>> 0, F || ge(I, 4, this.length), (this[I] | this[I + 1] << 8 | this[I + 2] << 16) + this[I + 3] * 16777216; }, e.prototype.readUint32BE = e.prototype.readUInt32BE = function(I, F) { return I = I >>> 0, F || ge(I, 4, this.length), this[I] * 16777216 + (this[I + 1] << 16 | this[I + 2] << 8 | this[I + 3]); }, e.prototype.readBigUInt64LE = ke(function(I) { I = I >>> 0, ee(I, "offset"); const F = this[I], Z = this[I + 7]; (F === void 0 || Z === void 0) && de(I, this.length - 8); const te = F + this[++I] * 2 ** 8 + this[++I] * 2 ** 16 + this[++I] * 2 ** 24, ce = this[++I] + this[++I] * 2 ** 8 + this[++I] * 2 ** 16 + Z * 2 ** 24; return BigInt(te) + (BigInt(ce) << BigInt(32)); }), e.prototype.readBigUInt64BE = ke(function(I) { I = I >>> 0, ee(I, "offset"); const F = this[I], Z = this[I + 7]; (F === void 0 || Z === void 0) && de(I, this.length - 8); const te = F * 2 ** 24 + this[++I] * 2 ** 16 + this[++I] * 2 ** 8 + this[++I], ce = this[++I] * 2 ** 24 + this[++I] * 2 ** 16 + this[++I] * 2 ** 8 + Z; return (BigInt(te) << BigInt(32)) + BigInt(ce); }), e.prototype.readIntLE = function(I, F, Z) { I = I >>> 0, F = F >>> 0, Z || ge(I, F, this.length); let te = this[I], ce = 1, oe = 0; for (; ++oe < F && (ce *= 256); ) te += this[I + oe] * ce; return ce *= 128, te >= ce && (te -= Math.pow(2, 8 * F)), te; }, e.prototype.readIntBE = function(I, F, Z) { I = I >>> 0, F = F >>> 0, Z || ge(I, F, this.length); let te = F, ce = 1, oe = this[I + --te]; for (; te > 0 && (ce *= 256); ) oe += this[I + --te] * ce; return ce *= 128, oe >= ce && (oe -= Math.pow(2, 8 * F)), oe; }, e.prototype.readInt8 = function(I, F) { return I = I >>> 0, F || ge(I, 1, this.length), this[I] & 128 ? (255 - this[I] + 1) * -1 : this[I]; }, e.prototype.readInt16LE = function(I, F) { I = I >>> 0, F || ge(I, 2, this.length); const Z = this[I] | this[I + 1] << 8; return Z & 32768 ? Z | 4294901760 : Z; }, e.prototype.readInt16BE = function(I, F) { I = I >>> 0, F || ge(I, 2, this.length); const Z = this[I + 1] | this[I] << 8; return Z & 32768 ? Z | 4294901760 : Z; }, e.prototype.readInt32LE = function(I, F) { return I = I >>> 0, F || ge(I, 4, this.length), this[I] | this[I + 1] << 8 | this[I + 2] << 16 | this[I + 3] << 24; }, e.prototype.readInt32BE = function(I, F) { return I = I >>> 0, F || ge(I, 4, this.length), this[I] << 24 | this[I + 1] << 16 | this[I + 2] << 8 | this[I + 3]; }, e.prototype.readBigInt64LE = ke(function(I) { I = I >>> 0, ee(I, "offset"); const F = this[I], Z = this[I + 7]; (F === void 0 || Z === void 0) && de(I, this.length - 8); const te = this[I + 4] + this[I + 5] * 2 ** 8 + this[I + 6] * 2 ** 16 + (Z << 24); return (BigInt(te) << BigInt(32)) + BigInt(F + this[++I] * 2 ** 8 + this[++I] * 2 ** 16 + this[++I] * 2 ** 24); }), e.prototype.readBigInt64BE = ke(function(I) { I = I >>> 0, ee(I, "offset"); const F = this[I], Z = this[I + 7]; (F === void 0 || Z === void 0) && de(I, this.length - 8); const te = (F << 24) + // Overflow this[++I] * 2 ** 16 + this[++I] * 2 ** 8 + this[++I]; return (BigInt(te) << BigInt(32)) + BigInt(this[++I] * 2 ** 24 + this[++I] * 2 ** 16 + this[++I] * 2 ** 8 + Z); }), e.prototype.readFloatLE = function(I, F) { return I = I >>> 0, F || ge(I, 4, this.length), O.read(this, I, !0, 23, 4); }, e.prototype.readFloatBE = function(I, F) { return I = I >>> 0, F || ge(I, 4, this.length), O.read(this, I, !1, 23, 4); }, e.prototype.readDoubleLE = function(I, F) { return I = I >>> 0, F || ge(I, 8, this.length), O.read(this, I, !0, 52, 8); }, e.prototype.readDoubleBE = function(I, F) { return I = I >>> 0, F || ge(I, 8, this.length), O.read(this, I, !1, 52, 8); }; function Ce(U, I, F, Z, te, ce) { if (!e.isBuffer(U)) throw new TypeError('"buffer" argument must be a Buffer instance'); if (I > te || I < ce) throw new RangeError('"value" argument is out of bounds'); if (F + Z > U.length) throw new RangeError("Index out of range"); } e.prototype.writeUintLE = e.prototype.writeUIntLE = function(I, F, Z, te) { if (I = +I, F = F >>> 0, Z = Z >>> 0, !te) { const Me = Math.pow(2, 8 * Z) - 1; Ce(this, I, F, Z, Me, 0); } let ce = 1, oe = 0; for (this[F] = I & 255; ++oe < Z && (ce *= 256); ) this[F + oe] = I / ce & 255; return F + Z; }, e.prototype.writeUintBE = e.prototype.writeUIntBE = function(I, F, Z, te) { if (I = +I, F = F >>> 0, Z = Z >>> 0, !te) { const Me = Math.pow(2, 8 * Z) - 1; Ce(this, I, F, Z, Me, 0); } let ce = Z - 1, oe = 1; for (this[F + ce] = I & 255; --ce >= 0 && (oe *= 256); ) this[F + ce] = I / oe & 255; return F + Z; }, e.prototype.writeUint8 = e.prototype.writeUInt8 = function(I, F, Z) { return I = +I, F = F >>> 0, Z || Ce(this, I, F, 1, 255, 0), this[F] = I & 255, F + 1; }, e.prototype.writeUint16LE = e.prototype.writeUInt16LE = function(I, F, Z) { return I = +I, F = F >>> 0, Z || Ce(this, I, F, 2, 65535, 0), this[F] = I & 255, this[F + 1] = I >>> 8, F + 2; }, e.prototype.writeUint16BE = e.prototype.writeUInt16BE = function(I, F, Z) { return I = +I, F = F >>> 0, Z || Ce(this, I, F, 2, 65535, 0), this[F] = I >>> 8, this[F + 1] = I & 255, F + 2; }, e.prototype.writeUint32LE = e.prototype.writeUInt32LE = function(I, F, Z) { return I = +I, F = F >>> 0, Z || Ce(this, I, F, 4, 4294967295, 0), this[F + 3] = I >>> 24, this[F + 2] = I >>> 16, this[F + 1] = I >>> 8, this[F] = I & 255, F + 4; }, e.prototype.writeUint32BE = e.prototype.writeUInt32BE = function(I, F, Z) { return I = +I, F = F >>> 0, Z || Ce(this, I, F, 4, 4294967295, 0), this[F] = I >>> 24, this[F + 1] = I >>> 16, this[F + 2] = I >>> 8, this[F + 3] = I & 255, F + 4; }; function me(U, I, F, Z, te) { W(I, Z, te, U, F, 7); let ce = Number(I & BigInt(4294967295)); U[F++] = ce, ce = ce >> 8, U[F++] = ce, ce = ce >> 8, U[F++] = ce, ce = ce >> 8, U[F++] = ce; let oe = Number(I >> BigInt(32) & BigInt(4294967295)); return U[F++] = oe, oe = oe >> 8, U[F++] = oe, oe = oe >> 8, U[F++] = oe, oe = oe >> 8, U[F++] = oe, F; } function xe(U, I, F, Z, te) { W(I, Z, te, U, F, 7); let ce = Number(I & BigInt(4294967295)); U[F + 7] = ce, ce = ce >> 8, U[F + 6] = ce, ce = ce >> 8, U[F + 5] = ce, ce = ce >> 8, U[F + 4] = ce; let oe = Number(I >> BigInt(32) & BigInt(4294967295)); return U[F + 3] = oe, oe = oe >> 8, U[F + 2] = oe, oe = oe >> 8, U[F + 1] = oe, oe = oe >> 8, U[F] = oe, F + 8; } e.prototype.writeBigUInt64LE = ke(function(I, F = 0) { return me(this, I, F, BigInt(0), BigInt("0xffffffffffffffff")); }), e.prototype.writeBigUInt64BE = ke(function(I, F = 0) { return xe(this, I, F, BigInt(0), BigInt("0xffffffffffffffff")); }), e.prototype.writeIntLE = function(I, F, Z, te) { if (I = +I, F = F >>> 0, !te) { const Le = Math.pow(2, 8 * Z - 1); Ce(this, I, F, Z, Le - 1, -Le); } let ce = 0, oe = 1, Me = 0; for (this[F] = I & 255; ++ce < Z && (oe *= 256); ) I < 0 && Me === 0 && this[F + ce - 1] !== 0 && (Me = 1), this[F + ce] = (I / oe >> 0) - Me & 255; return F + Z; }, e.prototype.writeIntBE = function(I, F, Z, te) { if (I = +I, F = F >>> 0, !te) { const Le = Math.pow(2, 8 * Z - 1); Ce(this, I, F, Z, Le - 1, -Le); } let ce = Z - 1, oe = 1, Me = 0; for (this[F + ce] = I & 255; --ce >= 0 && (oe *= 256); ) I < 0 && Me === 0 && this[F + ce + 1] !== 0 && (Me = 1), this[F + ce] = (I / oe >> 0) - Me & 255; return F + Z; }, e.prototype.writeInt8 = function(I, F, Z) { return I = +I, F = F >>> 0, Z || Ce(this, I, F, 1, 127, -128), I < 0 && (I = 255 + I + 1), this[F] = I & 255, F + 1; }, e.prototype.writeInt16LE = function(I, F, Z) { return I = +I, F = F >>> 0, Z || Ce(this, I, F, 2, 32767, -32768), this[F] = I & 255, this[F + 1] = I >>> 8, F + 2; }, e.prototype.writeInt16BE = function(I, F, Z) { return I = +I, F = F >>> 0, Z || Ce(this, I, F, 2, 32767, -32768), this[F] = I >>> 8, this[F + 1] = I & 255, F + 2; }, e.prototype.writeInt32LE = function(I, F, Z) { return I = +I, F = F >>> 0, Z || Ce(this, I, F, 4, 2147483647, -2147483648), this[F] = I & 255, this[F + 1] = I >>> 8, this[F + 2] = I >>> 16, this[F + 3] = I >>> 24, F + 4; }, e.prototype.writeInt32BE = function(I, F, Z) { return I = +I, F = F >>> 0, Z || Ce(this, I, F, 4, 2147483647, -2147483648), I < 0 && (I = 4294967295 + I + 1), this[F] = I >>> 24, this[F + 1] = I >>> 16, this[F + 2] = I >>> 8, this[F + 3] = I & 255, F + 4; }, e.prototype.writeBigInt64LE = ke(function(I, F = 0) { return me(this, I, F, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); }), e.prototype.writeBigInt64BE = ke(function(I, F = 0) { return xe(this, I, F, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); }); function Ue(U, I, F, Z, te, ce) { if (F + Z > U.length) throw new RangeError("Index out of range"); if (F < 0) throw new RangeError("Index out of range"); } function _e(U, I, F, Z, te) { return I = +I, F = F >>> 0, te || Ue(U, I, F, 4), O.write(U, I, F, Z, 23, 4), F + 4; } e.prototype.writeFloatLE = function(I, F, Z) { return _e(this, I, F, !0, Z); }, e.prototype.writeFloatBE = function(I, F, Z) { return _e(this, I, F, !1, Z); }; function Ee(U, I, F, Z, te) { return I = +I, F = F >>> 0, te || Ue(U, I, F, 8), O.write(U, I, F, Z, 52, 8), F + 8; } e.prototype.writeDoubleLE = function(I, F, Z) { return Ee(this, I, F, !0, Z); }, e.prototype.writeDoubleBE = function(I, F, Z) { return Ee(this, I, F, !1, Z); }, e.prototype.copy = function(I, F, Z, te) { if (!e.isBuffer(I)) throw new TypeError("argument should be a Buffer"); if (Z || (Z = 0), !te && te !== 0 && (te = this.length), F >= I.length && (F = I.length), F || (F = 0), te > 0 && te < Z && (te = Z), te === Z || I.length === 0 || this.length === 0) return 0; if (F < 0) throw new RangeError("targetStart out of bounds"); if (Z < 0 || Z >= this.length) throw new RangeError("Index out of range"); if (te < 0) throw new RangeError("sourceEnd out of bounds"); te > this.length && (te = this.length), I.length - F < te - Z && (te = I.length - F + Z); const ce = te - Z; return this === I && typeof ne.prototype.copyWithin == "function" ? this.copyWithin(F, Z, te) : ne.prototype.set.call( I, this.subarray(Z, te), F ), ce; }, e.prototype.fill = function(I, F, Z, te) { if (typeof I == "string") { if (typeof F == "string" ? (te = F, F = 0, Z = this.length) : typeof Z == "string" && (te = Z, Z = this.length), te !== void 0 && typeof te != "string") throw new TypeError("encoding must be a string"); if (typeof te == "string" && !e.isEncoding(te)) throw new TypeError("Unknown encoding: " + te); if (I.length === 1) { const oe = I.charCodeAt(0); (te === "utf8" && oe < 128 || te === "latin1") && (I = oe); } } else typeof I == "number" ? I = I & 255 : typeof I == "boolean" && (I = Number(I)); if (F < 0 || this.length < F || this.length < Z) throw new RangeError("Out of range index"); if (Z <= F) return this; F = F >>> 0, Z = Z === void 0 ? this.length : Z >>> 0, I || (I = 0); let ce; if (typeof I == "number") for (ce = F; ce < Z; ++ce) this[ce] = I; else { const oe = e.isBuffer(I) ? I : e.from(I, te), Me = oe.length; if (Me === 0) throw new TypeError('The value "' + I + '" is invalid for argument "value"'); for (ce = 0; ce < Z - F; ++ce) this[ce + F] = oe[ce % Me]; } return this; }; const ze = {}; function N(U, I, F) { ze[U] = class extends F { constructor() { super(), Object.defineProperty(this, "message", { value: I.apply(this, arguments), writable: !0, configurable: !0 }), this.name = `${this.name} [${U}]`, this.stack, delete this.name; } get code() { return U; } set code(te) { Object.defineProperty(this, "code", { configurable: !0, enumerable: !0, value: te, writable: !0 }); } toString() { return `${this.name} [${U}]: ${this.message}`; } }; } N( "ERR_BUFFER_OUT_OF_BOUNDS", function(U) { return U ? `${U} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds"; }, RangeError ), N( "ERR_INVALID_ARG_TYPE", function(U, I) { return `The "${U}" argument must be of type number. Received type ${typeof I}`; }, TypeError ), N( "ERR_OUT_OF_RANGE", function(U, I, F) { let Z = `The value of "${U}" is out of range.`, te = F; return Number.isInteger(F) && Math.abs(F) > 2 ** 32 ? te = A(String(F)) : typeof F == "bigint" && (te = String(F), (F > BigInt(2) ** BigInt(32) || F < -(BigInt(2) ** BigInt(32))) && (te = A(te)), te += "n"), Z += ` It must be ${I}. Received ${te}`, Z; }, RangeError ); function A(U) { let I = "", F = U.length; const Z = U[0] === "-" ? 1 : 0; for (; F >= Z + 4; F -= 3) I = `_${U.slice(F - 3, F)}${I}`; return `${U.slice(0, F)}${I}`; } function D(U, I, F) { ee(I, "offset"), (U[I] === void 0 || U[I + F] === void 0) && de(I, U.length - (F + 1)); } function W(U, I, F, Z, te, ce) { if (U > F || U < I) { const oe = typeof I == "bigint" ? "n" : ""; let Me; throw I === 0 || I === BigInt(0) ? Me = `>= 0${oe} and < 2${oe} ** ${(ce + 1) * 8}${oe}` : Me = `>= -(2${oe} ** ${(ce + 1) * 8 - 1}${oe}) and < 2 ** ${(ce + 1) * 8 - 1}${oe}`, new ze.ERR_OUT_OF_RANGE("value", Me, U); } D(Z, te, ce); } function ee(U, I) { if (typeof U != "number") throw new ze.ERR_INVALID_ARG_TYPE(I, "number", U); } function de(U, I, F) { throw Math.floor(U) !== U ? (ee(U, F), new ze.ERR_OUT_OF_RANGE("offset", "an integer", U)) : I < 0 ? new ze.ERR_BUFFER_OUT_OF_BOUNDS() : new ze.ERR_OUT_OF_RANGE( "offset", `>= 0 and <= ${I}`, U ); } const ae = /[^+/0-9A-Za-z-_]/g; function we(U) { if (U = U.split("=")[0], U = U.trim().replace(ae, ""), U.length < 2) return ""; for (; U.length % 4 !== 0; ) U = U + "="; return U; } function Oe(U, I) { I = I || 1 / 0; let F; const Z = U.length; let te = null; const ce = []; for (let oe = 0; oe < Z; ++oe) { if (F = U.charCodeAt(oe), F > 55295 && F < 57344) { if (!te) { if (F > 56319) { (I -= 3) > -1 && ce.push(239, 191, 189); continue; } else if (oe + 1 === Z) { (I -= 3) > -1 && ce.push(239, 191, 189); continue; } te = F; continue; } if (F < 56320) { (I -= 3) > -1 && ce.push(239, 191, 189), te = F; continue; } F = (te - 55296 << 10 | F - 56320) + 65536; } else te && (I -= 3) > -1 && ce.push(239, 191, 189); if (te = null, F < 128) { if ((I -= 1) < 0) break; ce.push(F); } else if (F < 2048) { if ((I -= 2) < 0) break; ce.push( F >> 6 | 192, F & 63 | 128 ); } else if (F < 65536) { if ((I -= 3) < 0) break; ce.push( F >> 12 | 224, F >> 6 & 63 | 128, F & 63 | 128 ); } else if (F < 1114112) { if ((I -= 4) < 0) break; ce.push( F >> 18 | 240, F >> 12 & 63 | 128, F >> 6 & 63 | 128, F & 63 | 128 ); } else throw new Error("Invalid code point"); } return ce; } function ve(U) { const I = []; for (let F = 0; F < U.length; ++F) I.push(U.charCodeAt(F) & 255); return I; } function Se(U, I) { let F, Z, te; const ce = []; for (let oe = 0; oe < U.length && !((I -= 2) < 0); ++oe) F = U.charCodeAt(oe), Z = F >> 8, te = F % 256, ce.push(te), ce.push(Z); return ce; } function De(U) { return z.toByteArray(we(U)); } function Be(U, I, F, Z) { let te; for (te = 0; te < Z && !(te + F >= I.length || te >= U.length); ++te) I[te + F] = U[te]; return te; } function Ie(U, I) { return U instanceof I || U != null && U.constructor != null && U.constructor.name != null && U.constructor.name === I.name; } function Ke(U) { return U !== U; } const Re = function() { const U = "0123456789abcdef", I = new Array(256); for (let F = 0; F < 16; ++F) { const Z = F * 16; for (let te = 0; te < 16; ++te) I[Z + te] = U[F] + U[te]; } return I; }(); function ke(U) { return typeof BigInt > "u" ? We : U; } function We() { throw new Error("BigInt not supported"); } })(q); const T = q.Buffer; x.Blob = q.Blob, x.BlobOptions = q.BlobOptions, x.Buffer = q.Buffer, x.File = q.File, x.FileOptions = q.FileOptions, x.INSPECT_MAX_BYTES = q.INSPECT_MAX_BYTES, x.SlowBuffer = q.SlowBuffer, x.TranscodeEncoding = q.TranscodeEncoding, x.atob = q.atob, x.btoa = q.btoa, x.constants = q.constants, x.default = T, x.isAscii = q.isAscii, x.isUtf8 = q.isUtf8, x.kMaxLength = q.kMaxLength, x.kStringMaxLength = q.kStringMaxLength, x.resolveObjectURL = q.resolveObjectURL, x.transcode = q.transcode; }(dist)), dist; } /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ var hasRequiredSafeBuffer$1; function requireSafeBuffer$1() { return hasRequiredSafeBuffer$1 || (hasRequiredSafeBuffer$1 = 1, function(x, q) { var k = requireDist(), p = k.Buffer; function R(M, b) { for (var m in M) b[m] = M[m]; } p.from && p.alloc && p.allocUnsafe && p.allocUnsafeSlow ? x.exports = k : (R(k, q), q.Buffer = f); function f(M, b, m) { return p(M, b, m); } f.prototype = Object.create(p.prototype), R(p, f), f.from = function(M, b, m) { if (typeof M == "number") throw new TypeError("Argument must not be a number"); return p(M, b, m); }, f.alloc = function(M, b, m) { if (typeof M != "number") throw new TypeError("Argument must be a number"); var y = p(M); return b !== void 0 ? typeof m == "string" ? y.fill(b, m) : y.fill(b) : y.fill(0), y; }, f.allocUnsafe = function(M) { if (typeof M != "number") throw new TypeError("Argument must be a number"); return p(M); }, f.allocUnsafeSlow = function(M) { if (typeof M != "number") throw new TypeError("Argument must be a number"); return k.SlowBuffer(M); }; }(safeBuffer$1, safeBuffer$1.exports)), safeBuffer$1.exports; } var hasRequiredBrowser$b; function requireBrowser$b() { if (hasRequiredBrowser$b) return browser$b.exports; hasRequiredBrowser$b = 1; var x = 65536, q = 4294967295; function k() { throw new Error(`Secure random number generation is not supported by this browser. Use Chrome, Firefox or Internet Explorer 11`); } var p = requireSafeBuffer$1().Buffer, R = commonjsGlobal.crypto || commonjsGlobal.msCrypto; R && R.getRandomValues ? browser$b.exports = f : browser$b.exports = k; function f(M, b) { if (M > q) throw new RangeError("requested too many random bytes"); var m = p.allocUnsafe(M); if (M > 0) if (M > x) for (var y = 0; y < M; y += x) R.getRandomValues(m.slice(y, y + x)); else R.getRandomValues(m); return typeof b == "function" ? process$1.nextTick(function() { b(null, m); }) : m; } return browser$b.exports; } var inherits_browser = { exports: {} }, hasRequiredInherits_browser; function requireInherits_browser() { return hasRequiredInherits_browser || (hasRequiredInherits_browser = 1, typeof Object.create == "function" ? inherits_browser.exports = function(q, k) { k && (q.super_ = k, q.prototype = Object.create(k.prototype, { constructor: { value: q, enumerable: !1, writable: !0, configurable: !0 } })); } : inherits_browser.exports = function(q, k) { if (k) { q.super_ = k; var p = function() { }; p.prototype = k.prototype, q.prototype = new p(), q.prototype.constructor = q; } }), inherits_browser.exports; } var events = { exports: {} }, hasRequiredEvents; function requireEvents() { if (hasRequiredEvents) return events.exports; hasRequiredEvents = 1; var x = typeof Reflect == "object" ? Reflect : null, q = x && typeof x.apply == "function" ? x.apply : function(G, Y, ne) { return Function.prototype.apply.call(G, Y, ne); }, k; x && typeof x.ownKeys == "function" ? k = x.ownKeys : Object.getOwnPropertySymbols ? k = function(G) { return Object.getOwnPropertyNames(G).concat(Object.getOwnPropertySymbols(G)); } : k = function(G) { return Object.getOwnPropertyNames(G); }; function p(O) { console && console.warn && console.warn(O); } var R = Number.isNaN || function(G) { return G !== G; }; function f() { f.init.call(this); } events.exports = f, events.exports.once = T, f.EventEmitter = f, f.prototype._events = void 0, f.prototype._eventsCount = 0, f.prototype._maxListeners = void 0; var M = 10; function b(O) { if (typeof O != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof O); } Object.defineProperty(f, "defaultMaxListeners", { enumerable: !0, get: function() { return M; }, set: function(O) { if (typeof O != "number" || O < 0 || R(O)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + O + "."); M = O; } }), f.init = function() { (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0; }, f.prototype.setMaxListeners = function(G) { if (typeof G != "number" || G < 0 || R(G)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + G + "."); return this._maxListeners = G, this; }; function m(O) { return O._maxListeners === void 0 ? f.defaultMaxListeners : O._maxListeners; } f.prototype.getMaxListeners = function() { return m(this); }, f.prototype.emit = function(G) { for (var Y = [], ne = 1; ne < arguments.length; ne++) Y.push(