class t {
  constructor(t2) {
    this.left = t2 ? [...t2] : [], this.right = [];
  }
  get(t2) {
    if (t2 < 0 || t2 >= this.left.length + this.right.length)
      throw new RangeError("Cannot access index `" + t2 + "` in a splice buffer of size `" + (this.left.length + this.right.length) + "`");
    return t2 < this.left.length ? this.left[t2] : this.right[this.right.length - t2 + this.left.length - 1];
  }
  get length() {
    return this.left.length + this.right.length;
  }
  shift() {
    return this.setCursor(0), this.right.pop();
  }
  slice(t2, e2) {
    const r = null == e2 ? Number.POSITIVE_INFINITY : e2;
    return r < this.left.length ? this.left.slice(t2, r) : t2 > this.left.length ? this.right.slice(this.right.length - r + this.left.length, this.right.length - t2 + this.left.length).reverse() : this.left.slice(t2).concat(this.right.slice(this.right.length - r + this.left.length).reverse());
  }
  splice(t2, r, n) {
    const i = r || 0;
    this.setCursor(Math.trunc(t2));
    const o = this.right.splice(this.right.length - i, Number.POSITIVE_INFINITY);
    return n && e(this.left, n), o.reverse();
  }
  pop() {
    return this.setCursor(Number.POSITIVE_INFINITY), this.left.pop();
  }
  push(t2) {
    this.setCursor(Number.POSITIVE_INFINITY), this.left.push(t2);
  }
  pushMany(t2) {
    this.setCursor(Number.POSITIVE_INFINITY), e(this.left, t2);
  }
  unshift(t2) {
    this.setCursor(0), this.right.push(t2);
  }
  unshiftMany(t2) {
    this.setCursor(0), e(this.right, t2.reverse());
  }
  setCursor(t2) {
    if (!(t2 === this.left.length || t2 > this.left.length && 0 === this.right.length || t2 < 0 && 0 === this.left.length))
      if (t2 < this.left.length) {
        const r = this.left.splice(t2, Number.POSITIVE_INFINITY);
        e(this.right, r.reverse());
      } else {
        const r = this.right.splice(this.left.length + this.right.length - t2, Number.POSITIVE_INFINITY);
        e(this.left, r.reverse());
      }
  }
}
function e(t2, e2) {
  let r = 0;
  if (e2.length < 1e4)
    t2.push(...e2);
  else
    for (; r < e2.length; )
      t2.push(...e2.slice(r, r + 1e4)), r += 1e4;
}
for (var r = {}, n = { byteLength: function(t2) {
  var e2 = h(t2), r2 = e2[0], n2 = e2[1];
  return 3 * (r2 + n2) / 4 - n2;
}, toByteArray: function(t2) {
  var e2, r2, n2 = h(t2), i2 = n2[0], s2 = n2[1], u2 = new f(function(t3, e3, r3) {
    return 3 * (e3 + r3) / 4 - r3;
  }(0, i2, s2)), l2 = 0, c2 = s2 > 0 ? i2 - 4 : i2;
  for (r2 = 0; r2 < c2; r2 += 4)
    e2 = o[t2.charCodeAt(r2)] << 18 | o[t2.charCodeAt(r2 + 1)] << 12 | o[t2.charCodeAt(r2 + 2)] << 6 | o[t2.charCodeAt(r2 + 3)], u2[l2++] = e2 >> 16 & 255, u2[l2++] = e2 >> 8 & 255, u2[l2++] = 255 & e2;
  2 === s2 && (e2 = o[t2.charCodeAt(r2)] << 2 | o[t2.charCodeAt(r2 + 1)] >> 4, u2[l2++] = 255 & e2);
  1 === s2 && (e2 = o[t2.charCodeAt(r2)] << 10 | o[t2.charCodeAt(r2 + 1)] << 4 | o[t2.charCodeAt(r2 + 2)] >> 2, u2[l2++] = e2 >> 8 & 255, u2[l2++] = 255 & e2);
  return u2;
}, fromByteArray: function(t2) {
  for (var e2, r2 = t2.length, n2 = r2 % 3, o2 = [], f2 = 16383, s2 = 0, u2 = r2 - n2; s2 < u2; s2 += f2)
    o2.push(l(t2, s2, s2 + f2 > u2 ? u2 : s2 + f2));
  1 === n2 ? (e2 = t2[r2 - 1], o2.push(i[e2 >> 2] + i[e2 << 4 & 63] + "==")) : 2 === n2 && (e2 = (t2[r2 - 2] << 8) + t2[r2 - 1], o2.push(i[e2 >> 10] + i[e2 >> 4 & 63] + i[e2 << 2 & 63] + "="));
  return o2.join("");
} }, i = [], o = [], f = "undefined" != typeof Uint8Array ? Uint8Array : Array, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", u = 0; u < 64; ++u)
  i[u] = s[u], o[s.charCodeAt(u)] = u;
function h(t2) {
  var e2 = t2.length;
  if (e2 % 4 > 0)
    throw new Error("Invalid string. Length must be a multiple of 4");
  var r = t2.indexOf("=");
  return -1 === r && (r = e2), [r, r === e2 ? 0 : 4 - r % 4];
}
function l(t2, e2, r) {
  for (var n, o, f = [], s = e2; s < r; s += 3)
    n = (t2[s] << 16 & 16711680) + (t2[s + 1] << 8 & 65280) + (255 & t2[s + 2]), f.push(i[(o = n) >> 18 & 63] + i[o >> 12 & 63] + i[o >> 6 & 63] + i[63 & o]);
  return f.join("");
}
o["-".charCodeAt(0)] = 62, o["_".charCodeAt(0)] = 63;
var c = { read: function(t2, e2, r, n, i) {
  var o, f, s = 8 * i - n - 1, u = (1 << s) - 1, h2 = u >> 1, l2 = -7, c2 = r ? i - 1 : 0, a = r ? -1 : 1, p = t2[e2 + c2];
  for (c2 += a, o = p & (1 << -l2) - 1, p >>= -l2, l2 += s; l2 > 0; o = 256 * o + t2[e2 + c2], c2 += a, l2 -= 8)
    ;
  for (f = o & (1 << -l2) - 1, o >>= -l2, l2 += n; l2 > 0; f = 256 * f + t2[e2 + c2], c2 += a, l2 -= 8)
    ;
  if (0 === o)
    o = 1 - h2;
  else {
    if (o === u)
      return f ? NaN : 1 / 0 * (p ? -1 : 1);
    f += Math.pow(2, n), o -= h2;
  }
  return (p ? -1 : 1) * f * Math.pow(2, o - n);
}, write: function(t2, e2, r, n, i, o) {
  var f, s, u, h2 = 8 * o - i - 1, l2 = (1 << h2) - 1, c2 = l2 >> 1, a = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : o - 1, g = n ? 1 : -1, y = e2 < 0 || 0 === e2 && 1 / e2 < 0 ? 1 : 0;
  for (e2 = Math.abs(e2), isNaN(e2) || e2 === 1 / 0 ? (s = isNaN(e2) ? 1 : 0, f = l2) : (f = Math.floor(Math.log(e2) / Math.LN2), e2 * (u = Math.pow(2, -f)) < 1 && (f--, u *= 2), (e2 += f + c2 >= 1 ? a / u : a * Math.pow(2, 1 - c2)) * u >= 2 && (f++, u /= 2), f + c2 >= l2 ? (s = 0, f = l2) : f + c2 >= 1 ? (s = (e2 * u - 1) * Math.pow(2, i), f += c2) : (s = e2 * Math.pow(2, c2 - 1) * Math.pow(2, i), f = 0)); i >= 8; t2[r + p] = 255 & s, p += g, s /= 256, i -= 8)
    ;
  for (f = f << i | s, h2 += i; h2 > 0; t2[r + p] = 255 & f, p += g, f /= 256, h2 -= 8)
    ;
  t2[r + p - g] |= 128 * y;
} };
!function(t2) {
  const e2 = n, r = c, i = "function" == typeof Symbol && "function" == typeof Symbol.for ? Symbol.for("nodejs.util.inspect.custom") : null;
  t2.Buffer = s, t2.SlowBuffer = function(t3) {
    +t3 != t3 && (t3 = 0);
    return s.alloc(+t3);
  }, t2.INSPECT_MAX_BYTES = 50;
  const o = 2147483647;
  function f(t3) {
    if (t3 > o)
      throw new RangeError('The value "' + t3 + '" is invalid for option "size"');
    const e3 = new Uint8Array(t3);
    return Object.setPrototypeOf(e3, s.prototype), e3;
  }
  function s(t3, e3, r2) {
    if ("number" == typeof t3) {
      if ("string" == typeof e3)
        throw new TypeError('The "string" argument must be of type string. Received type number');
      return l2(t3);
    }
    return u(t3, e3, r2);
  }
  function u(t3, e3, r2) {
    if ("string" == typeof t3)
      return function(t4, e4) {
        "string" == typeof e4 && "" !== e4 || (e4 = "utf8");
        if (!s.isEncoding(e4))
          throw new TypeError("Unknown encoding: " + e4);
        const r3 = 0 | y(t4, e4);
        let n2 = f(r3);
        const i3 = n2.write(t4, e4);
        i3 !== r3 && (n2 = n2.slice(0, i3));
        return n2;
      }(t3, e3);
    if (ArrayBuffer.isView(t3))
      return function(t4) {
        if (J(t4, Uint8Array)) {
          const e4 = new Uint8Array(t4);
          return p(e4.buffer, e4.byteOffset, e4.byteLength);
        }
        return a(t4);
      }(t3);
    if (null == t3)
      throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof t3);
    if (J(t3, ArrayBuffer) || t3 && J(t3.buffer, ArrayBuffer))
      return p(t3, e3, r2);
    if ("undefined" != typeof SharedArrayBuffer && (J(t3, SharedArrayBuffer) || t3 && J(t3.buffer, SharedArrayBuffer)))
      return p(t3, e3, r2);
    if ("number" == typeof t3)
      throw new TypeError('The "value" argument must not be of type number. Received type number');
    const n = t3.valueOf && t3.valueOf();
    if (null != n && n !== t3)
      return s.from(n, e3, r2);
    const i2 = function(t4) {
      if (s.isBuffer(t4)) {
        const e4 = 0 | g(t4.length), r3 = f(e4);
        return 0 === r3.length || t4.copy(r3, 0, 0, e4), r3;
      }
      if (void 0 !== t4.length)
        return "number" != typeof t4.length || Z(t4.length) ? f(0) : a(t4);
      if ("Buffer" === t4.type && Array.isArray(t4.data))
        return a(t4.data);
    }(t3);
    if (i2)
      return i2;
    if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof t3[Symbol.toPrimitive])
      return s.from(t3[Symbol.toPrimitive]("string"), e3, r2);
    throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof t3);
  }
  function h2(t3) {
    if ("number" != typeof t3)
      throw new TypeError('"size" argument must be of type number');
    if (t3 < 0)
      throw new RangeError('The value "' + t3 + '" is invalid for option "size"');
  }
  function l2(t3) {
    return h2(t3), f(t3 < 0 ? 0 : 0 | g(t3));
  }
  function a(t3) {
    const e3 = t3.length < 0 ? 0 : 0 | g(t3.length), r2 = f(e3);
    for (let n = 0; n < e3; n += 1)
      r2[n] = 255 & t3[n];
    return r2;
  }
  function p(t3, e3, r2) {
    if (e3 < 0 || t3.byteLength < e3)
      throw new RangeError('"offset" is outside of buffer bounds');
    if (t3.byteLength < e3 + (r2 || 0))
      throw new RangeError('"length" is outside of buffer bounds');
    let n;
    return n = void 0 === e3 && void 0 === r2 ? new Uint8Array(t3) : void 0 === r2 ? new Uint8Array(t3, e3) : new Uint8Array(t3, e3, r2), Object.setPrototypeOf(n, s.prototype), n;
  }
  function g(t3) {
    if (t3 >= o)
      throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + o.toString(16) + " bytes");
    return 0 | t3;
  }
  function y(t3, e3) {
    if (s.isBuffer(t3))
      return t3.length;
    if (ArrayBuffer.isView(t3) || J(t3, ArrayBuffer))
      return t3.byteLength;
    if ("string" != typeof t3)
      throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof t3);
    const r2 = t3.length, n = arguments.length > 2 && true === arguments[2];
    if (!n && 0 === r2)
      return 0;
    let i2 = false;
    for (; ; )
      switch (e3) {
        case "ascii":
        case "latin1":
        case "binary":
          return r2;
        case "utf8":
        case "utf-8":
          return W(t3).length;
        case "ucs2":
        case "ucs-2":
        case "utf16le":
        case "utf-16le":
          return 2 * r2;
        case "hex":
          return r2 >>> 1;
        case "base64":
          return X(t3).length;
        default:
          if (i2)
            return n ? -1 : W(t3).length;
          e3 = ("" + e3).toLowerCase(), i2 = true;
      }
  }
  function w(t3, e3, r2) {
    let n = false;
    if ((void 0 === e3 || e3 < 0) && (e3 = 0), e3 > this.length)
      return "";
    if ((void 0 === r2 || r2 > this.length) && (r2 = this.length), r2 <= 0)
      return "";
    if ((r2 >>>= 0) <= (e3 >>>= 0))
      return "";
    for (t3 || (t3 = "utf8"); ; )
      switch (t3) {
        case "hex":
          return N(this, e3, r2);
        case "utf8":
        case "utf-8":
          return T(this, e3, r2);
        case "ascii":
          return O(this, e3, r2);
        case "latin1":
        case "binary":
          return S(this, e3, r2);
        case "base64":
          return U(this, e3, r2);
        case "ucs2":
        case "ucs-2":
        case "utf16le":
        case "utf-16le":
          return L(this, e3, r2);
        default:
          if (n)
            throw new TypeError("Unknown encoding: " + t3);
          t3 = (t3 + "").toLowerCase(), n = true;
      }
  }
  function d(t3, e3, r2) {
    const n = t3[e3];
    t3[e3] = t3[r2], t3[r2] = n;
  }
  function b(t3, e3, r2, n, i2) {
    if (0 === t3.length)
      return -1;
    if ("string" == typeof r2 ? (n = r2, r2 = 0) : r2 > 2147483647 ? r2 = 2147483647 : r2 < -2147483648 && (r2 = -2147483648), Z(r2 = +r2) && (r2 = i2 ? 0 : t3.length - 1), r2 < 0 && (r2 = t3.length + r2), r2 >= t3.length) {
      if (i2)
        return -1;
      r2 = t3.length - 1;
    } else if (r2 < 0) {
      if (!i2)
        return -1;
      r2 = 0;
    }
    if ("string" == typeof e3 && (e3 = s.from(e3, n)), s.isBuffer(e3))
      return 0 === e3.length ? -1 : E(t3, e3, r2, n, i2);
    if ("number" == typeof e3)
      return e3 &= 255, "function" == typeof Uint8Array.prototype.indexOf ? i2 ? Uint8Array.prototype.indexOf.call(t3, e3, r2) : Uint8Array.prototype.lastIndexOf.call(t3, e3, r2) : E(t3, [e3], r2, n, i2);
    throw new TypeError("val must be string, number or Buffer");
  }
  function E(t3, e3, r2, n, i2) {
    let o2, f2 = 1, s2 = t3.length, u2 = e3.length;
    if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) {
      if (t3.length < 2 || e3.length < 2)
        return -1;
      f2 = 2, s2 /= 2, u2 /= 2, r2 /= 2;
    }
    function h3(t4, e4) {
      return 1 === f2 ? t4[e4] : t4.readUInt16BE(e4 * f2);
    }
    if (i2) {
      let n2 = -1;
      for (o2 = r2; o2 < s2; o2++)
        if (h3(t3, o2) === h3(e3, -1 === n2 ? 0 : o2 - n2)) {
          if (-1 === n2 && (n2 = o2), o2 - n2 + 1 === u2)
            return n2 * f2;
        } else
          -1 !== n2 && (o2 -= o2 - n2), n2 = -1;
    } else
      for (r2 + u2 > s2 && (r2 = s2 - u2), o2 = r2; o2 >= 0; o2--) {
        let r3 = true;
        for (let n2 = 0; n2 < u2; n2++)
          if (h3(t3, o2 + n2) !== h3(e3, n2)) {
            r3 = false;
            break;
          }
        if (r3)
          return o2;
      }
    return -1;
  }
  function m(t3, e3, r2, n) {
    r2 = Number(r2) || 0;
    const i2 = t3.length - r2;
    n ? (n = Number(n)) > i2 && (n = i2) : n = i2;
    const o2 = e3.length;
    let f2;
    for (n > o2 / 2 && (n = o2 / 2), f2 = 0; f2 < n; ++f2) {
      const n2 = parseInt(e3.substr(2 * f2, 2), 16);
      if (Z(n2))
        return f2;
      t3[r2 + f2] = n2;
    }
    return f2;
  }
  function B(t3, e3, r2, n) {
    return q(W(e3, t3.length - r2), t3, r2, n);
  }
  function I(t3, e3, r2, n) {
    return q(function(t4) {
      const e4 = [];
      for (let r3 = 0; r3 < t4.length; ++r3)
        e4.push(255 & t4.charCodeAt(r3));
      return e4;
    }(e3), t3, r2, n);
  }
  function A(t3, e3, r2, n) {
    return q(X(e3), t3, r2, n);
  }
  function v(t3, e3, r2, n) {
    return q(function(t4, e4) {
      let r3, n2, i2;
      const o2 = [];
      for (let f2 = 0; f2 < t4.length && !((e4 -= 2) < 0); ++f2)
        r3 = t4.charCodeAt(f2), n2 = r3 >> 8, i2 = r3 % 256, o2.push(i2), o2.push(n2);
      return o2;
    }(e3, t3.length - r2), t3, r2, n);
  }
  function U(t3, r2, n) {
    return 0 === r2 && n === t3.length ? e2.fromByteArray(t3) : e2.fromByteArray(t3.slice(r2, n));
  }
  function T(t3, e3, r2) {
    r2 = Math.min(t3.length, r2);
    const n = [];
    let i2 = e3;
    for (; i2 < r2; ) {
      const e4 = t3[i2];
      let o2 = null, f2 = e4 > 239 ? 4 : e4 > 223 ? 3 : e4 > 191 ? 2 : 1;
      if (i2 + f2 <= r2) {
        let r3, n2, s2, u2;
        switch (f2) {
          case 1:
            e4 < 128 && (o2 = e4);
            break;
          case 2:
            r3 = t3[i2 + 1], 128 == (192 & r3) && (u2 = (31 & e4) << 6 | 63 & r3, u2 > 127 && (o2 = u2));
            break;
          case 3:
            r3 = t3[i2 + 1], n2 = t3[i2 + 2], 128 == (192 & r3) && 128 == (192 & n2) && (u2 = (15 & e4) << 12 | (63 & r3) << 6 | 63 & n2, u2 > 2047 && (u2 < 55296 || u2 > 57343) && (o2 = u2));
            break;
          case 4:
            r3 = t3[i2 + 1], n2 = t3[i2 + 2], s2 = t3[i2 + 3], 128 == (192 & r3) && 128 == (192 & n2) && 128 == (192 & s2) && (u2 = (15 & e4) << 18 | (63 & r3) << 12 | (63 & n2) << 6 | 63 & s2, u2 > 65535 && u2 < 1114112 && (o2 = u2));
        }
      }
      null === o2 ? (o2 = 65533, f2 = 1) : o2 > 65535 && (o2 -= 65536, n.push(o2 >>> 10 & 1023 | 55296), o2 = 56320 | 1023 & o2), n.push(o2), i2 += f2;
    }
    return function(t4) {
      const e4 = t4.length;
      if (e4 <= R)
        return String.fromCharCode.apply(String, t4);
      let r3 = "", n2 = 0;
      for (; n2 < e4; )
        r3 += String.fromCharCode.apply(String, t4.slice(n2, n2 += R));
      return r3;
    }(n);
  }
  t2.kMaxLength = o, s.TYPED_ARRAY_SUPPORT = function() {
    try {
      const t3 = new Uint8Array(1), e3 = { foo: function() {
        return 42;
      } };
      return Object.setPrototypeOf(e3, Uint8Array.prototype), Object.setPrototypeOf(t3, e3), 42 === t3.foo();
    } catch (t3) {
      return false;
    }
  }(), !s.TYPED_ARRAY_SUPPORT && "undefined" != typeof console && console.error, Object.defineProperty(s.prototype, "parent", { enumerable: true, get: function() {
    if (s.isBuffer(this))
      return this.buffer;
  } }), Object.defineProperty(s.prototype, "offset", { enumerable: true, get: function() {
    if (s.isBuffer(this))
      return this.byteOffset;
  } }), s.poolSize = 8192, s.from = function(t3, e3, r2) {
    return u(t3, e3, r2);
  }, Object.setPrototypeOf(s.prototype, Uint8Array.prototype), Object.setPrototypeOf(s, Uint8Array), s.alloc = function(t3, e3, r2) {
    return function(t4, e4, r3) {
      return h2(t4), t4 <= 0 ? f(t4) : void 0 !== e4 ? "string" == typeof r3 ? f(t4).fill(e4, r3) : f(t4).fill(e4) : f(t4);
    }(t3, e3, r2);
  }, s.allocUnsafe = function(t3) {
    return l2(t3);
  }, s.allocUnsafeSlow = function(t3) {
    return l2(t3);
  }, s.isBuffer = function(t3) {
    return null != t3 && true === t3._isBuffer && t3 !== s.prototype;
  }, s.compare = function(t3, e3) {
    if (J(t3, Uint8Array) && (t3 = s.from(t3, t3.offset, t3.byteLength)), J(e3, Uint8Array) && (e3 = s.from(e3, e3.offset, e3.byteLength)), !s.isBuffer(t3) || !s.isBuffer(e3))
      throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
    if (t3 === e3)
      return 0;
    let r2 = t3.length, n = e3.length;
    for (let i2 = 0, o2 = Math.min(r2, n); i2 < o2; ++i2)
      if (t3[i2] !== e3[i2]) {
        r2 = t3[i2], n = e3[i2];
        break;
      }
    return r2 < n ? -1 : n < r2 ? 1 : 0;
  }, s.isEncoding = function(t3) {
    switch (String(t3).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 true;
      default:
        return false;
    }
  }, s.concat = function(t3, e3) {
    if (!Array.isArray(t3))
      throw new TypeError('"list" argument must be an Array of Buffers');
    if (0 === t3.length)
      return s.alloc(0);
    let r2;
    if (void 0 === e3)
      for (e3 = 0, r2 = 0; r2 < t3.length; ++r2)
        e3 += t3[r2].length;
    const n = s.allocUnsafe(e3);
    let i2 = 0;
    for (r2 = 0; r2 < t3.length; ++r2) {
      let e4 = t3[r2];
      if (J(e4, Uint8Array))
        i2 + e4.length > n.length ? (s.isBuffer(e4) || (e4 = s.from(e4)), e4.copy(n, i2)) : Uint8Array.prototype.set.call(n, e4, i2);
      else {
        if (!s.isBuffer(e4))
          throw new TypeError('"list" argument must be an Array of Buffers');
        e4.copy(n, i2);
      }
      i2 += e4.length;
    }
    return n;
  }, s.byteLength = y, s.prototype._isBuffer = true, s.prototype.swap16 = function() {
    const t3 = this.length;
    if (t3 % 2 != 0)
      throw new RangeError("Buffer size must be a multiple of 16-bits");
    for (let e3 = 0; e3 < t3; e3 += 2)
      d(this, e3, e3 + 1);
    return this;
  }, s.prototype.swap32 = function() {
    const t3 = this.length;
    if (t3 % 4 != 0)
      throw new RangeError("Buffer size must be a multiple of 32-bits");
    for (let e3 = 0; e3 < t3; e3 += 4)
      d(this, e3, e3 + 3), d(this, e3 + 1, e3 + 2);
    return this;
  }, s.prototype.swap64 = function() {
    const t3 = this.length;
    if (t3 % 8 != 0)
      throw new RangeError("Buffer size must be a multiple of 64-bits");
    for (let e3 = 0; e3 < t3; e3 += 8)
      d(this, e3, e3 + 7), d(this, e3 + 1, e3 + 6), d(this, e3 + 2, e3 + 5), d(this, e3 + 3, e3 + 4);
    return this;
  }, s.prototype.toString = function() {
    const t3 = this.length;
    return 0 === t3 ? "" : 0 === arguments.length ? T(this, 0, t3) : w.apply(this, arguments);
  }, s.prototype.toLocaleString = s.prototype.toString, s.prototype.equals = function(t3) {
    if (!s.isBuffer(t3))
      throw new TypeError("Argument must be a Buffer");
    return this === t3 || 0 === s.compare(this, t3);
  }, s.prototype.inspect = function() {
    let e3 = "";
    const r2 = t2.INSPECT_MAX_BYTES;
    return e3 = this.toString("hex", 0, r2).replace(/(.{2})/g, "$1 ").trim(), this.length > r2 && (e3 += " ... "), "<Buffer " + e3 + ">";
  }, i && (s.prototype[i] = s.prototype.inspect), s.prototype.compare = function(t3, e3, r2, n, i2) {
    if (J(t3, Uint8Array) && (t3 = s.from(t3, t3.offset, t3.byteLength)), !s.isBuffer(t3))
      throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t3);
    if (void 0 === e3 && (e3 = 0), void 0 === r2 && (r2 = t3 ? t3.length : 0), void 0 === n && (n = 0), void 0 === i2 && (i2 = this.length), e3 < 0 || r2 > t3.length || n < 0 || i2 > this.length)
      throw new RangeError("out of range index");
    if (n >= i2 && e3 >= r2)
      return 0;
    if (n >= i2)
      return -1;
    if (e3 >= r2)
      return 1;
    if (this === t3)
      return 0;
    let o2 = (i2 >>>= 0) - (n >>>= 0), f2 = (r2 >>>= 0) - (e3 >>>= 0);
    const u2 = Math.min(o2, f2), h3 = this.slice(n, i2), l3 = t3.slice(e3, r2);
    for (let t4 = 0; t4 < u2; ++t4)
      if (h3[t4] !== l3[t4]) {
        o2 = h3[t4], f2 = l3[t4];
        break;
      }
    return o2 < f2 ? -1 : f2 < o2 ? 1 : 0;
  }, s.prototype.includes = function(t3, e3, r2) {
    return -1 !== this.indexOf(t3, e3, r2);
  }, s.prototype.indexOf = function(t3, e3, r2) {
    return b(this, t3, e3, r2, true);
  }, s.prototype.lastIndexOf = function(t3, e3, r2) {
    return b(this, t3, e3, r2, false);
  }, s.prototype.write = function(t3, e3, r2, n) {
    if (void 0 === e3)
      n = "utf8", r2 = this.length, e3 = 0;
    else if (void 0 === r2 && "string" == typeof e3)
      n = e3, r2 = this.length, e3 = 0;
    else {
      if (!isFinite(e3))
        throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
      e3 >>>= 0, isFinite(r2) ? (r2 >>>= 0, void 0 === n && (n = "utf8")) : (n = r2, r2 = void 0);
    }
    const i2 = this.length - e3;
    if ((void 0 === r2 || r2 > i2) && (r2 = i2), t3.length > 0 && (r2 < 0 || e3 < 0) || e3 > this.length)
      throw new RangeError("Attempt to write outside buffer bounds");
    n || (n = "utf8");
    let o2 = false;
    for (; ; )
      switch (n) {
        case "hex":
          return m(this, t3, e3, r2);
        case "utf8":
        case "utf-8":
          return B(this, t3, e3, r2);
        case "ascii":
        case "latin1":
        case "binary":
          return I(this, t3, e3, r2);
        case "base64":
          return A(this, t3, e3, r2);
        case "ucs2":
        case "ucs-2":
        case "utf16le":
        case "utf-16le":
          return v(this, t3, e3, r2);
        default:
          if (o2)
            throw new TypeError("Unknown encoding: " + n);
          n = ("" + n).toLowerCase(), o2 = true;
      }
  }, s.prototype.toJSON = function() {
    return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };
  };
  const R = 4096;
  function O(t3, e3, r2) {
    let n = "";
    r2 = Math.min(t3.length, r2);
    for (let i2 = e3; i2 < r2; ++i2)
      n += String.fromCharCode(127 & t3[i2]);
    return n;
  }
  function S(t3, e3, r2) {
    let n = "";
    r2 = Math.min(t3.length, r2);
    for (let i2 = e3; i2 < r2; ++i2)
      n += String.fromCharCode(t3[i2]);
    return n;
  }
  function N(t3, e3, r2) {
    const n = t3.length;
    (!e3 || e3 < 0) && (e3 = 0), (!r2 || r2 < 0 || r2 > n) && (r2 = n);
    let i2 = "";
    for (let n2 = e3; n2 < r2; ++n2)
      i2 += H[t3[n2]];
    return i2;
  }
  function L(t3, e3, r2) {
    const n = t3.slice(e3, r2);
    let i2 = "";
    for (let t4 = 0; t4 < n.length - 1; t4 += 2)
      i2 += String.fromCharCode(n[t4] + 256 * n[t4 + 1]);
    return i2;
  }
  function _(t3, e3, r2) {
    if (t3 % 1 != 0 || t3 < 0)
      throw new RangeError("offset is not uint");
    if (t3 + e3 > r2)
      throw new RangeError("Trying to access beyond buffer length");
  }
  function C(t3, e3, r2, n, i2, o2) {
    if (!s.isBuffer(t3))
      throw new TypeError('"buffer" argument must be a Buffer instance');
    if (e3 > i2 || e3 < o2)
      throw new RangeError('"value" argument is out of bounds');
    if (r2 + n > t3.length)
      throw new RangeError("Index out of range");
  }
  function M(t3, e3, r2, n, i2) {
    V(e3, n, i2, t3, r2, 7);
    let o2 = Number(e3 & BigInt(4294967295));
    t3[r2++] = o2, o2 >>= 8, t3[r2++] = o2, o2 >>= 8, t3[r2++] = o2, o2 >>= 8, t3[r2++] = o2;
    let f2 = Number(e3 >> BigInt(32) & BigInt(4294967295));
    return t3[r2++] = f2, f2 >>= 8, t3[r2++] = f2, f2 >>= 8, t3[r2++] = f2, f2 >>= 8, t3[r2++] = f2, r2;
  }
  function P(t3, e3, r2, n, i2) {
    V(e3, n, i2, t3, r2, 7);
    let o2 = Number(e3 & BigInt(4294967295));
    t3[r2 + 7] = o2, o2 >>= 8, t3[r2 + 6] = o2, o2 >>= 8, t3[r2 + 5] = o2, o2 >>= 8, t3[r2 + 4] = o2;
    let f2 = Number(e3 >> BigInt(32) & BigInt(4294967295));
    return t3[r2 + 3] = f2, f2 >>= 8, t3[r2 + 2] = f2, f2 >>= 8, t3[r2 + 1] = f2, f2 >>= 8, t3[r2] = f2, r2 + 8;
  }
  function x(t3, e3, r2, n, i2, o2) {
    if (r2 + n > t3.length)
      throw new RangeError("Index out of range");
    if (r2 < 0)
      throw new RangeError("Index out of range");
  }
  function $(t3, e3, n, i2, o2) {
    return e3 = +e3, n >>>= 0, o2 || x(t3, 0, n, 4), r.write(t3, e3, n, i2, 23, 4), n + 4;
  }
  function F(t3, e3, n, i2, o2) {
    return e3 = +e3, n >>>= 0, o2 || x(t3, 0, n, 8), r.write(t3, e3, n, i2, 52, 8), n + 8;
  }
  s.prototype.slice = function(t3, e3) {
    const r2 = this.length;
    (t3 = ~~t3) < 0 ? (t3 += r2) < 0 && (t3 = 0) : t3 > r2 && (t3 = r2), (e3 = void 0 === e3 ? r2 : ~~e3) < 0 ? (e3 += r2) < 0 && (e3 = 0) : e3 > r2 && (e3 = r2), e3 < t3 && (e3 = t3);
    const n = this.subarray(t3, e3);
    return Object.setPrototypeOf(n, s.prototype), n;
  }, s.prototype.readUintLE = s.prototype.readUIntLE = function(t3, e3, r2) {
    t3 >>>= 0, e3 >>>= 0, r2 || _(t3, e3, this.length);
    let n = this[t3], i2 = 1, o2 = 0;
    for (; ++o2 < e3 && (i2 *= 256); )
      n += this[t3 + o2] * i2;
    return n;
  }, s.prototype.readUintBE = s.prototype.readUIntBE = function(t3, e3, r2) {
    t3 >>>= 0, e3 >>>= 0, r2 || _(t3, e3, this.length);
    let n = this[t3 + --e3], i2 = 1;
    for (; e3 > 0 && (i2 *= 256); )
      n += this[t3 + --e3] * i2;
    return n;
  }, s.prototype.readUint8 = s.prototype.readUInt8 = function(t3, e3) {
    return t3 >>>= 0, e3 || _(t3, 1, this.length), this[t3];
  }, s.prototype.readUint16LE = s.prototype.readUInt16LE = function(t3, e3) {
    return t3 >>>= 0, e3 || _(t3, 2, this.length), this[t3] | this[t3 + 1] << 8;
  }, s.prototype.readUint16BE = s.prototype.readUInt16BE = function(t3, e3) {
    return t3 >>>= 0, e3 || _(t3, 2, this.length), this[t3] << 8 | this[t3 + 1];
  }, s.prototype.readUint32LE = s.prototype.readUInt32LE = function(t3, e3) {
    return t3 >>>= 0, e3 || _(t3, 4, this.length), (this[t3] | this[t3 + 1] << 8 | this[t3 + 2] << 16) + 16777216 * this[t3 + 3];
  }, s.prototype.readUint32BE = s.prototype.readUInt32BE = function(t3, e3) {
    return t3 >>>= 0, e3 || _(t3, 4, this.length), 16777216 * this[t3] + (this[t3 + 1] << 16 | this[t3 + 2] << 8 | this[t3 + 3]);
  }, s.prototype.readBigUInt64LE = K(function(t3) {
    z(t3 >>>= 0, "offset");
    const e3 = this[t3], r2 = this[t3 + 7];
    void 0 !== e3 && void 0 !== r2 || D(t3, this.length - 8);
    const n = e3 + 256 * this[++t3] + 65536 * this[++t3] + this[++t3] * 2 ** 24, i2 = this[++t3] + 256 * this[++t3] + 65536 * this[++t3] + r2 * 2 ** 24;
    return BigInt(n) + (BigInt(i2) << BigInt(32));
  }), s.prototype.readBigUInt64BE = K(function(t3) {
    z(t3 >>>= 0, "offset");
    const e3 = this[t3], r2 = this[t3 + 7];
    void 0 !== e3 && void 0 !== r2 || D(t3, this.length - 8);
    const n = e3 * 2 ** 24 + 65536 * this[++t3] + 256 * this[++t3] + this[++t3], i2 = this[++t3] * 2 ** 24 + 65536 * this[++t3] + 256 * this[++t3] + r2;
    return (BigInt(n) << BigInt(32)) + BigInt(i2);
  }), s.prototype.readIntLE = function(t3, e3, r2) {
    t3 >>>= 0, e3 >>>= 0, r2 || _(t3, e3, this.length);
    let n = this[t3], i2 = 1, o2 = 0;
    for (; ++o2 < e3 && (i2 *= 256); )
      n += this[t3 + o2] * i2;
    return i2 *= 128, n >= i2 && (n -= Math.pow(2, 8 * e3)), n;
  }, s.prototype.readIntBE = function(t3, e3, r2) {
    t3 >>>= 0, e3 >>>= 0, r2 || _(t3, e3, this.length);
    let n = e3, i2 = 1, o2 = this[t3 + --n];
    for (; n > 0 && (i2 *= 256); )
      o2 += this[t3 + --n] * i2;
    return i2 *= 128, o2 >= i2 && (o2 -= Math.pow(2, 8 * e3)), o2;
  }, s.prototype.readInt8 = function(t3, e3) {
    return t3 >>>= 0, e3 || _(t3, 1, this.length), 128 & this[t3] ? -1 * (255 - this[t3] + 1) : this[t3];
  }, s.prototype.readInt16LE = function(t3, e3) {
    t3 >>>= 0, e3 || _(t3, 2, this.length);
    const r2 = this[t3] | this[t3 + 1] << 8;
    return 32768 & r2 ? 4294901760 | r2 : r2;
  }, s.prototype.readInt16BE = function(t3, e3) {
    t3 >>>= 0, e3 || _(t3, 2, this.length);
    const r2 = this[t3 + 1] | this[t3] << 8;
    return 32768 & r2 ? 4294901760 | r2 : r2;
  }, s.prototype.readInt32LE = function(t3, e3) {
    return t3 >>>= 0, e3 || _(t3, 4, this.length), this[t3] | this[t3 + 1] << 8 | this[t3 + 2] << 16 | this[t3 + 3] << 24;
  }, s.prototype.readInt32BE = function(t3, e3) {
    return t3 >>>= 0, e3 || _(t3, 4, this.length), this[t3] << 24 | this[t3 + 1] << 16 | this[t3 + 2] << 8 | this[t3 + 3];
  }, s.prototype.readBigInt64LE = K(function(t3) {
    z(t3 >>>= 0, "offset");
    const e3 = this[t3], r2 = this[t3 + 7];
    void 0 !== e3 && void 0 !== r2 || D(t3, this.length - 8);
    const n = this[t3 + 4] + 256 * this[t3 + 5] + 65536 * this[t3 + 6] + (r2 << 24);
    return (BigInt(n) << BigInt(32)) + BigInt(e3 + 256 * this[++t3] + 65536 * this[++t3] + this[++t3] * 2 ** 24);
  }), s.prototype.readBigInt64BE = K(function(t3) {
    z(t3 >>>= 0, "offset");
    const e3 = this[t3], r2 = this[t3 + 7];
    void 0 !== e3 && void 0 !== r2 || D(t3, this.length - 8);
    const n = (e3 << 24) + 65536 * this[++t3] + 256 * this[++t3] + this[++t3];
    return (BigInt(n) << BigInt(32)) + BigInt(this[++t3] * 2 ** 24 + 65536 * this[++t3] + 256 * this[++t3] + r2);
  }), s.prototype.readFloatLE = function(t3, e3) {
    return t3 >>>= 0, e3 || _(t3, 4, this.length), r.read(this, t3, true, 23, 4);
  }, s.prototype.readFloatBE = function(t3, e3) {
    return t3 >>>= 0, e3 || _(t3, 4, this.length), r.read(this, t3, false, 23, 4);
  }, s.prototype.readDoubleLE = function(t3, e3) {
    return t3 >>>= 0, e3 || _(t3, 8, this.length), r.read(this, t3, true, 52, 8);
  }, s.prototype.readDoubleBE = function(t3, e3) {
    return t3 >>>= 0, e3 || _(t3, 8, this.length), r.read(this, t3, false, 52, 8);
  }, s.prototype.writeUintLE = s.prototype.writeUIntLE = function(t3, e3, r2, n) {
    if (t3 = +t3, e3 >>>= 0, r2 >>>= 0, !n) {
      C(this, t3, e3, r2, Math.pow(2, 8 * r2) - 1, 0);
    }
    let i2 = 1, o2 = 0;
    for (this[e3] = 255 & t3; ++o2 < r2 && (i2 *= 256); )
      this[e3 + o2] = t3 / i2 & 255;
    return e3 + r2;
  }, s.prototype.writeUintBE = s.prototype.writeUIntBE = function(t3, e3, r2, n) {
    if (t3 = +t3, e3 >>>= 0, r2 >>>= 0, !n) {
      C(this, t3, e3, r2, Math.pow(2, 8 * r2) - 1, 0);
    }
    let i2 = r2 - 1, o2 = 1;
    for (this[e3 + i2] = 255 & t3; --i2 >= 0 && (o2 *= 256); )
      this[e3 + i2] = t3 / o2 & 255;
    return e3 + r2;
  }, s.prototype.writeUint8 = s.prototype.writeUInt8 = function(t3, e3, r2) {
    return t3 = +t3, e3 >>>= 0, r2 || C(this, t3, e3, 1, 255, 0), this[e3] = 255 & t3, e3 + 1;
  }, s.prototype.writeUint16LE = s.prototype.writeUInt16LE = function(t3, e3, r2) {
    return t3 = +t3, e3 >>>= 0, r2 || C(this, t3, e3, 2, 65535, 0), this[e3] = 255 & t3, this[e3 + 1] = t3 >>> 8, e3 + 2;
  }, s.prototype.writeUint16BE = s.prototype.writeUInt16BE = function(t3, e3, r2) {
    return t3 = +t3, e3 >>>= 0, r2 || C(this, t3, e3, 2, 65535, 0), this[e3] = t3 >>> 8, this[e3 + 1] = 255 & t3, e3 + 2;
  }, s.prototype.writeUint32LE = s.prototype.writeUInt32LE = function(t3, e3, r2) {
    return t3 = +t3, e3 >>>= 0, r2 || C(this, t3, e3, 4, 4294967295, 0), this[e3 + 3] = t3 >>> 24, this[e3 + 2] = t3 >>> 16, this[e3 + 1] = t3 >>> 8, this[e3] = 255 & t3, e3 + 4;
  }, s.prototype.writeUint32BE = s.prototype.writeUInt32BE = function(t3, e3, r2) {
    return t3 = +t3, e3 >>>= 0, r2 || C(this, t3, e3, 4, 4294967295, 0), this[e3] = t3 >>> 24, this[e3 + 1] = t3 >>> 16, this[e3 + 2] = t3 >>> 8, this[e3 + 3] = 255 & t3, e3 + 4;
  }, s.prototype.writeBigUInt64LE = K(function(t3, e3 = 0) {
    return M(this, t3, e3, BigInt(0), BigInt("0xffffffffffffffff"));
  }), s.prototype.writeBigUInt64BE = K(function(t3, e3 = 0) {
    return P(this, t3, e3, BigInt(0), BigInt("0xffffffffffffffff"));
  }), s.prototype.writeIntLE = function(t3, e3, r2, n) {
    if (t3 = +t3, e3 >>>= 0, !n) {
      const n2 = Math.pow(2, 8 * r2 - 1);
      C(this, t3, e3, r2, n2 - 1, -n2);
    }
    let i2 = 0, o2 = 1, f2 = 0;
    for (this[e3] = 255 & t3; ++i2 < r2 && (o2 *= 256); )
      t3 < 0 && 0 === f2 && 0 !== this[e3 + i2 - 1] && (f2 = 1), this[e3 + i2] = (t3 / o2 | 0) - f2 & 255;
    return e3 + r2;
  }, s.prototype.writeIntBE = function(t3, e3, r2, n) {
    if (t3 = +t3, e3 >>>= 0, !n) {
      const n2 = Math.pow(2, 8 * r2 - 1);
      C(this, t3, e3, r2, n2 - 1, -n2);
    }
    let i2 = r2 - 1, o2 = 1, f2 = 0;
    for (this[e3 + i2] = 255 & t3; --i2 >= 0 && (o2 *= 256); )
      t3 < 0 && 0 === f2 && 0 !== this[e3 + i2 + 1] && (f2 = 1), this[e3 + i2] = (t3 / o2 | 0) - f2 & 255;
    return e3 + r2;
  }, s.prototype.writeInt8 = function(t3, e3, r2) {
    return t3 = +t3, e3 >>>= 0, r2 || C(this, t3, e3, 1, 127, -128), t3 < 0 && (t3 = 255 + t3 + 1), this[e3] = 255 & t3, e3 + 1;
  }, s.prototype.writeInt16LE = function(t3, e3, r2) {
    return t3 = +t3, e3 >>>= 0, r2 || C(this, t3, e3, 2, 32767, -32768), this[e3] = 255 & t3, this[e3 + 1] = t3 >>> 8, e3 + 2;
  }, s.prototype.writeInt16BE = function(t3, e3, r2) {
    return t3 = +t3, e3 >>>= 0, r2 || C(this, t3, e3, 2, 32767, -32768), this[e3] = t3 >>> 8, this[e3 + 1] = 255 & t3, e3 + 2;
  }, s.prototype.writeInt32LE = function(t3, e3, r2) {
    return t3 = +t3, e3 >>>= 0, r2 || C(this, t3, e3, 4, 2147483647, -2147483648), this[e3] = 255 & t3, this[e3 + 1] = t3 >>> 8, this[e3 + 2] = t3 >>> 16, this[e3 + 3] = t3 >>> 24, e3 + 4;
  }, s.prototype.writeInt32BE = function(t3, e3, r2) {
    return t3 = +t3, e3 >>>= 0, r2 || C(this, t3, e3, 4, 2147483647, -2147483648), t3 < 0 && (t3 = 4294967295 + t3 + 1), this[e3] = t3 >>> 24, this[e3 + 1] = t3 >>> 16, this[e3 + 2] = t3 >>> 8, this[e3 + 3] = 255 & t3, e3 + 4;
  }, s.prototype.writeBigInt64LE = K(function(t3, e3 = 0) {
    return M(this, t3, e3, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
  }), s.prototype.writeBigInt64BE = K(function(t3, e3 = 0) {
    return P(this, t3, e3, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
  }), s.prototype.writeFloatLE = function(t3, e3, r2) {
    return $(this, t3, e3, true, r2);
  }, s.prototype.writeFloatBE = function(t3, e3, r2) {
    return $(this, t3, e3, false, r2);
  }, s.prototype.writeDoubleLE = function(t3, e3, r2) {
    return F(this, t3, e3, true, r2);
  }, s.prototype.writeDoubleBE = function(t3, e3, r2) {
    return F(this, t3, e3, false, r2);
  }, s.prototype.copy = function(t3, e3, r2, n) {
    if (!s.isBuffer(t3))
      throw new TypeError("argument should be a Buffer");
    if (r2 || (r2 = 0), n || 0 === n || (n = this.length), e3 >= t3.length && (e3 = t3.length), e3 || (e3 = 0), n > 0 && n < r2 && (n = r2), n === r2)
      return 0;
    if (0 === t3.length || 0 === this.length)
      return 0;
    if (e3 < 0)
      throw new RangeError("targetStart out of bounds");
    if (r2 < 0 || r2 >= this.length)
      throw new RangeError("Index out of range");
    if (n < 0)
      throw new RangeError("sourceEnd out of bounds");
    n > this.length && (n = this.length), t3.length - e3 < n - r2 && (n = t3.length - e3 + r2);
    const i2 = n - r2;
    return this === t3 && "function" == typeof Uint8Array.prototype.copyWithin ? this.copyWithin(e3, r2, n) : Uint8Array.prototype.set.call(t3, this.subarray(r2, n), e3), i2;
  }, s.prototype.fill = function(t3, e3, r2, n) {
    if ("string" == typeof t3) {
      if ("string" == typeof e3 ? (n = e3, e3 = 0, r2 = this.length) : "string" == typeof r2 && (n = r2, r2 = this.length), void 0 !== n && "string" != typeof n)
        throw new TypeError("encoding must be a string");
      if ("string" == typeof n && !s.isEncoding(n))
        throw new TypeError("Unknown encoding: " + n);
      if (1 === t3.length) {
        const e4 = t3.charCodeAt(0);
        ("utf8" === n && e4 < 128 || "latin1" === n) && (t3 = e4);
      }
    } else
      "number" == typeof t3 ? t3 &= 255 : "boolean" == typeof t3 && (t3 = Number(t3));
    if (e3 < 0 || this.length < e3 || this.length < r2)
      throw new RangeError("Out of range index");
    if (r2 <= e3)
      return this;
    let i2;
    if (e3 >>>= 0, r2 = void 0 === r2 ? this.length : r2 >>> 0, t3 || (t3 = 0), "number" == typeof t3)
      for (i2 = e3; i2 < r2; ++i2)
        this[i2] = t3;
    else {
      const o2 = s.isBuffer(t3) ? t3 : s.from(t3, n), f2 = o2.length;
      if (0 === f2)
        throw new TypeError('The value "' + t3 + '" is invalid for argument "value"');
      for (i2 = 0; i2 < r2 - e3; ++i2)
        this[i2 + e3] = o2[i2 % f2];
    }
    return this;
  };
  const k = {};
  function j(t3, e3, r2) {
    k[t3] = class extends r2 {
      constructor() {
        super(), Object.defineProperty(this, "message", { value: e3.apply(this, arguments), writable: true, configurable: true }), this.name = `${this.name} [${t3}]`, delete this.name;
      }
      get code() {
        return t3;
      }
      set code(t4) {
        Object.defineProperty(this, "code", { configurable: true, enumerable: true, value: t4, writable: true });
      }
      toString() {
        return `${this.name} [${t3}]: ${this.message}`;
      }
    };
  }
  function Y(t3) {
    let e3 = "", r2 = t3.length;
    const n = "-" === t3[0] ? 1 : 0;
    for (; r2 >= n + 4; r2 -= 3)
      e3 = `_${t3.slice(r2 - 3, r2)}${e3}`;
    return `${t3.slice(0, r2)}${e3}`;
  }
  function V(t3, e3, r2, n, i2, o2) {
    if (t3 > r2 || t3 < e3) {
      const n2 = "bigint" == typeof e3 ? "n" : "";
      let i3;
      throw i3 = o2 > 3 ? 0 === e3 || e3 === BigInt(0) ? `>= 0${n2} and < 2${n2} ** ${8 * (o2 + 1)}${n2}` : `>= -(2${n2} ** ${8 * (o2 + 1) - 1}${n2}) and < 2 ** ${8 * (o2 + 1) - 1}${n2}` : `>= ${e3}${n2} and <= ${r2}${n2}`, new k.ERR_OUT_OF_RANGE("value", i3, t3);
    }
    !function(t4, e4, r3) {
      z(e4, "offset"), void 0 !== t4[e4] && void 0 !== t4[e4 + r3] || D(e4, t4.length - (r3 + 1));
    }(n, i2, o2);
  }
  function z(t3, e3) {
    if ("number" != typeof t3)
      throw new k.ERR_INVALID_ARG_TYPE(e3, "number", t3);
  }
  function D(t3, e3, r2) {
    if (Math.floor(t3) !== t3)
      throw z(t3, r2), new k.ERR_OUT_OF_RANGE(r2 || "offset", "an integer", t3);
    if (e3 < 0)
      throw new k.ERR_BUFFER_OUT_OF_BOUNDS();
    throw new k.ERR_OUT_OF_RANGE(r2 || "offset", `>= ${r2 ? 1 : 0} and <= ${e3}`, t3);
  }
  j("ERR_BUFFER_OUT_OF_BOUNDS", function(t3) {
    return t3 ? `${t3} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
  }, RangeError), j("ERR_INVALID_ARG_TYPE", function(t3, e3) {
    return `The "${t3}" argument must be of type number. Received type ${typeof e3}`;
  }, TypeError), j("ERR_OUT_OF_RANGE", function(t3, e3, r2) {
    let n = `The value of "${t3}" is out of range.`, i2 = r2;
    return Number.isInteger(r2) && Math.abs(r2) > 2 ** 32 ? i2 = Y(String(r2)) : "bigint" == typeof r2 && (i2 = String(r2), (r2 > BigInt(2) ** BigInt(32) || r2 < -(BigInt(2) ** BigInt(32))) && (i2 = Y(i2)), i2 += "n"), n += ` It must be ${e3}. Received ${i2}`, n;
  }, RangeError);
  const G = /[^+/0-9A-Za-z-_]/g;
  function W(t3, e3) {
    let r2;
    e3 = e3 || 1 / 0;
    const n = t3.length;
    let i2 = null;
    const o2 = [];
    for (let f2 = 0; f2 < n; ++f2) {
      if (r2 = t3.charCodeAt(f2), r2 > 55295 && r2 < 57344) {
        if (!i2) {
          if (r2 > 56319) {
            (e3 -= 3) > -1 && o2.push(239, 191, 189);
            continue;
          }
          if (f2 + 1 === n) {
            (e3 -= 3) > -1 && o2.push(239, 191, 189);
            continue;
          }
          i2 = r2;
          continue;
        }
        if (r2 < 56320) {
          (e3 -= 3) > -1 && o2.push(239, 191, 189), i2 = r2;
          continue;
        }
        r2 = 65536 + (i2 - 55296 << 10 | r2 - 56320);
      } else
        i2 && (e3 -= 3) > -1 && o2.push(239, 191, 189);
      if (i2 = null, r2 < 128) {
        if ((e3 -= 1) < 0)
          break;
        o2.push(r2);
      } else if (r2 < 2048) {
        if ((e3 -= 2) < 0)
          break;
        o2.push(r2 >> 6 | 192, 63 & r2 | 128);
      } else if (r2 < 65536) {
        if ((e3 -= 3) < 0)
          break;
        o2.push(r2 >> 12 | 224, r2 >> 6 & 63 | 128, 63 & r2 | 128);
      } else {
        if (!(r2 < 1114112))
          throw new Error("Invalid code point");
        if ((e3 -= 4) < 0)
          break;
        o2.push(r2 >> 18 | 240, r2 >> 12 & 63 | 128, r2 >> 6 & 63 | 128, 63 & r2 | 128);
      }
    }
    return o2;
  }
  function X(t3) {
    return e2.toByteArray(function(t4) {
      if ((t4 = (t4 = t4.split("=")[0]).trim().replace(G, "")).length < 2)
        return "";
      for (; t4.length % 4 != 0; )
        t4 += "=";
      return t4;
    }(t3));
  }
  function q(t3, e3, r2, n) {
    let i2;
    for (i2 = 0; i2 < n && !(i2 + r2 >= e3.length || i2 >= t3.length); ++i2)
      e3[i2 + r2] = t3[i2];
    return i2;
  }
  function J(t3, e3) {
    return t3 instanceof e3 || null != t3 && null != t3.constructor && null != t3.constructor.name && t3.constructor.name === e3.name;
  }
  function Z(t3) {
    return t3 != t3;
  }
  const H = function() {
    const t3 = "0123456789abcdef", e3 = new Array(256);
    for (let r2 = 0; r2 < 16; ++r2) {
      const n = 16 * r2;
      for (let i2 = 0; i2 < 16; ++i2)
        e3[n + i2] = t3[r2] + t3[i2];
    }
    return e3;
  }();
  function K(t3) {
    return "undefined" == typeof BigInt ? Q : t3;
  }
  function Q() {
    throw new Error("BigInt not supported");
  }
}(r);
export {
  t as S,
  r as b
};
