"use strict";
(() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __require = /* @__PURE__ */ ((x13) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x13, {
    get: (a5, b9) => (typeof require !== "undefined" ? require : a5)[b9]
  }) : x13)(function(x13) {
    if (typeof require !== "undefined") return require.apply(this, arguments);
    throw Error('Dynamic require of "' + x13 + '" is not supported');
  });
  var __esm = (fn, res) => function __init() {
    return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
  };
  var __commonJS = (cb, mod3) => function __require2() {
    return mod3 || (0, cb[__getOwnPropNames(cb)[0]])((mod3 = { exports: {} }).exports, mod3), mod3.exports;
  };
  var __export = (target, all) => {
    for (var name2 in all)
      __defProp(target, name2, { get: all[name2], enumerable: true });
  };
  var __copyProps = (to3, from16, except, desc) => {
    if (from16 && typeof from16 === "object" || typeof from16 === "function") {
      for (let key2 of __getOwnPropNames(from16))
        if (!__hasOwnProp.call(to3, key2) && key2 !== except)
          __defProp(to3, key2, { get: () => from16[key2], enumerable: !(desc = __getOwnPropDesc(from16, key2)) || desc.enumerable });
    }
    return to3;
  };
  var __reExport = (target, mod3, secondTarget) => (__copyProps(target, mod3, "default"), secondTarget && __copyProps(secondTarget, mod3, "default"));
  var __toESM = (mod3, isNodeMode, target) => (target = mod3 != null ? __create(__getProtoOf(mod3)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod3 || !mod3.__esModule ? __defProp(target, "default", { value: mod3, enumerable: true }) : target,
    mod3
  ));
  var __toCommonJS = (mod3) => __copyProps(__defProp({}, "__esModule", { value: true }), mod3);

  // ../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
  var require_base64_js = __commonJS({
    "../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      exports.byteLength = byteLength;
      exports.toByteArray = toByteArray;
      exports.fromByteArray = fromByteArray;
      var lookup = [];
      var revLookup = [];
      var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
      var code2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
      for (i5 = 0, len = code2.length; i5 < len; ++i5) {
        lookup[i5] = code2[i5];
        revLookup[code2.charCodeAt(i5)] = i5;
      }
      var i5;
      var len;
      revLookup["-".charCodeAt(0)] = 62;
      revLookup["_".charCodeAt(0)] = 63;
      function getLens(b64) {
        var len2 = b64.length;
        if (len2 % 4 > 0) {
          throw new Error("Invalid string. Length must be a multiple of 4");
        }
        var validLen = b64.indexOf("=");
        if (validLen === -1) validLen = len2;
        var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
        return [validLen, placeHoldersLen];
      }
      function byteLength(b64) {
        var lens = getLens(b64);
        var validLen = lens[0];
        var placeHoldersLen = lens[1];
        return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
      }
      function _byteLength(b64, validLen, placeHoldersLen) {
        return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
      }
      function toByteArray(b64) {
        var tmp;
        var lens = getLens(b64);
        var validLen = lens[0];
        var placeHoldersLen = lens[1];
        var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
        var curByte = 0;
        var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
        var i6;
        for (i6 = 0; i6 < len2; i6 += 4) {
          tmp = revLookup[b64.charCodeAt(i6)] << 18 | revLookup[b64.charCodeAt(i6 + 1)] << 12 | revLookup[b64.charCodeAt(i6 + 2)] << 6 | revLookup[b64.charCodeAt(i6 + 3)];
          arr[curByte++] = tmp >> 16 & 255;
          arr[curByte++] = tmp >> 8 & 255;
          arr[curByte++] = tmp & 255;
        }
        if (placeHoldersLen === 2) {
          tmp = revLookup[b64.charCodeAt(i6)] << 2 | revLookup[b64.charCodeAt(i6 + 1)] >> 4;
          arr[curByte++] = tmp & 255;
        }
        if (placeHoldersLen === 1) {
          tmp = revLookup[b64.charCodeAt(i6)] << 10 | revLookup[b64.charCodeAt(i6 + 1)] << 4 | revLookup[b64.charCodeAt(i6 + 2)] >> 2;
          arr[curByte++] = tmp >> 8 & 255;
          arr[curByte++] = tmp & 255;
        }
        return arr;
      }
      function tripletToBase64(num2) {
        return lookup[num2 >> 18 & 63] + lookup[num2 >> 12 & 63] + lookup[num2 >> 6 & 63] + lookup[num2 & 63];
      }
      function encodeChunk(uint8, start, end) {
        var tmp;
        var output = [];
        for (var i6 = start; i6 < end; i6 += 3) {
          tmp = (uint8[i6] << 16 & 16711680) + (uint8[i6 + 1] << 8 & 65280) + (uint8[i6 + 2] & 255);
          output.push(tripletToBase64(tmp));
        }
        return output.join("");
      }
      function fromByteArray(uint8) {
        var tmp;
        var len2 = uint8.length;
        var extraBytes = len2 % 3;
        var parts = [];
        var maxChunkLength = 16383;
        for (var i6 = 0, len22 = len2 - extraBytes; i6 < len22; i6 += maxChunkLength) {
          parts.push(encodeChunk(uint8, i6, i6 + maxChunkLength > len22 ? len22 : i6 + maxChunkLength));
        }
        if (extraBytes === 1) {
          tmp = uint8[len2 - 1];
          parts.push(
            lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
          );
        } else if (extraBytes === 2) {
          tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
          parts.push(
            lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
          );
        }
        return parts.join("");
      }
    }
  });

  // ../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
  var require_ieee754 = __commonJS({
    "../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      exports.read = function(buffer2, offset2, isLE3, mLen, nBytes) {
        var e2, m3;
        var eLen = nBytes * 8 - mLen - 1;
        var eMax = (1 << eLen) - 1;
        var eBias = eMax >> 1;
        var nBits = -7;
        var i5 = isLE3 ? nBytes - 1 : 0;
        var d6 = isLE3 ? -1 : 1;
        var s3 = buffer2[offset2 + i5];
        i5 += d6;
        e2 = s3 & (1 << -nBits) - 1;
        s3 >>= -nBits;
        nBits += eLen;
        for (; nBits > 0; e2 = e2 * 256 + buffer2[offset2 + i5], i5 += d6, nBits -= 8) {
        }
        m3 = e2 & (1 << -nBits) - 1;
        e2 >>= -nBits;
        nBits += mLen;
        for (; nBits > 0; m3 = m3 * 256 + buffer2[offset2 + i5], i5 += d6, nBits -= 8) {
        }
        if (e2 === 0) {
          e2 = 1 - eBias;
        } else if (e2 === eMax) {
          return m3 ? NaN : (s3 ? -1 : 1) * Infinity;
        } else {
          m3 = m3 + Math.pow(2, mLen);
          e2 = e2 - eBias;
        }
        return (s3 ? -1 : 1) * m3 * Math.pow(2, e2 - mLen);
      };
      exports.write = function(buffer2, value, offset2, isLE3, mLen, nBytes) {
        var e2, m3, c7;
        var eLen = nBytes * 8 - mLen - 1;
        var eMax = (1 << eLen) - 1;
        var eBias = eMax >> 1;
        var rt5 = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
        var i5 = isLE3 ? 0 : nBytes - 1;
        var d6 = isLE3 ? 1 : -1;
        var s3 = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
        value = Math.abs(value);
        if (isNaN(value) || value === Infinity) {
          m3 = isNaN(value) ? 1 : 0;
          e2 = eMax;
        } else {
          e2 = Math.floor(Math.log(value) / Math.LN2);
          if (value * (c7 = Math.pow(2, -e2)) < 1) {
            e2--;
            c7 *= 2;
          }
          if (e2 + eBias >= 1) {
            value += rt5 / c7;
          } else {
            value += rt5 * Math.pow(2, 1 - eBias);
          }
          if (value * c7 >= 2) {
            e2++;
            c7 /= 2;
          }
          if (e2 + eBias >= eMax) {
            m3 = 0;
            e2 = eMax;
          } else if (e2 + eBias >= 1) {
            m3 = (value * c7 - 1) * Math.pow(2, mLen);
            e2 = e2 + eBias;
          } else {
            m3 = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
            e2 = 0;
          }
        }
        for (; mLen >= 8; buffer2[offset2 + i5] = m3 & 255, i5 += d6, m3 /= 256, mLen -= 8) {
        }
        e2 = e2 << mLen | m3;
        eLen += mLen;
        for (; eLen > 0; buffer2[offset2 + i5] = e2 & 255, i5 += d6, e2 /= 256, eLen -= 8) {
        }
        buffer2[offset2 + i5 - d6] |= s3 * 128;
      };
    }
  });

  // ../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
  var require_buffer = __commonJS({
    "../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var base644 = require_base64_js();
      var ieee754 = require_ieee754();
      var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
      exports.Buffer = Buffer6;
      exports.SlowBuffer = SlowBuffer;
      exports.INSPECT_MAX_BYTES = 50;
      var K_MAX_LENGTH = 2147483647;
      exports.kMaxLength = K_MAX_LENGTH;
      Buffer6.TYPED_ARRAY_SUPPORT = typedArraySupport();
      if (!Buffer6.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && 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 typedArraySupport() {
        try {
          const arr = new Uint8Array(1);
          const proto = { foo: function() {
            return 42;
          } };
          Object.setPrototypeOf(proto, Uint8Array.prototype);
          Object.setPrototypeOf(arr, proto);
          return arr.foo() === 42;
        } catch (e2) {
          return false;
        }
      }
      Object.defineProperty(Buffer6.prototype, "parent", {
        enumerable: true,
        get: function() {
          if (!Buffer6.isBuffer(this)) return void 0;
          return this.buffer;
        }
      });
      Object.defineProperty(Buffer6.prototype, "offset", {
        enumerable: true,
        get: function() {
          if (!Buffer6.isBuffer(this)) return void 0;
          return this.byteOffset;
        }
      });
      function createBuffer(length2) {
        if (length2 > K_MAX_LENGTH) {
          throw new RangeError('The value "' + length2 + '" is invalid for option "size"');
        }
        const buf = new Uint8Array(length2);
        Object.setPrototypeOf(buf, Buffer6.prototype);
        return buf;
      }
      function Buffer6(arg, encodingOrOffset, length2) {
        if (typeof arg === "number") {
          if (typeof encodingOrOffset === "string") {
            throw new TypeError(
              'The "string" argument must be of type string. Received type number'
            );
          }
          return allocUnsafe3(arg);
        }
        return from16(arg, encodingOrOffset, length2);
      }
      Buffer6.poolSize = 8192;
      function from16(value, encodingOrOffset, length2) {
        if (typeof value === "string") {
          return fromString6(value, encodingOrOffset);
        }
        if (ArrayBuffer.isView(value)) {
          return fromArrayView(value);
        }
        if (value == null) {
          throw new TypeError(
            "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
          );
        }
        if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
          return fromArrayBuffer(value, encodingOrOffset, length2);
        }
        if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
          return fromArrayBuffer(value, encodingOrOffset, length2);
        }
        if (typeof value === "number") {
          throw new TypeError(
            'The "value" argument must not be of type number. Received type number'
          );
        }
        const valueOf = value.valueOf && value.valueOf();
        if (valueOf != null && valueOf !== value) {
          return Buffer6.from(valueOf, encodingOrOffset, length2);
        }
        const b9 = fromObject(value);
        if (b9) return b9;
        if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
          return Buffer6.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length2);
        }
        throw new TypeError(
          "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
        );
      }
      Buffer6.from = function(value, encodingOrOffset, length2) {
        return from16(value, encodingOrOffset, length2);
      };
      Object.setPrototypeOf(Buffer6.prototype, Uint8Array.prototype);
      Object.setPrototypeOf(Buffer6, Uint8Array);
      function assertSize4(size5) {
        if (typeof size5 !== "number") {
          throw new TypeError('"size" argument must be of type number');
        } else if (size5 < 0) {
          throw new RangeError('The value "' + size5 + '" is invalid for option "size"');
        }
      }
      function alloc(size5, fill, encoding) {
        assertSize4(size5);
        if (size5 <= 0) {
          return createBuffer(size5);
        }
        if (fill !== void 0) {
          return typeof encoding === "string" ? createBuffer(size5).fill(fill, encoding) : createBuffer(size5).fill(fill);
        }
        return createBuffer(size5);
      }
      Buffer6.alloc = function(size5, fill, encoding) {
        return alloc(size5, fill, encoding);
      };
      function allocUnsafe3(size5) {
        assertSize4(size5);
        return createBuffer(size5 < 0 ? 0 : checked(size5) | 0);
      }
      Buffer6.allocUnsafe = function(size5) {
        return allocUnsafe3(size5);
      };
      Buffer6.allocUnsafeSlow = function(size5) {
        return allocUnsafe3(size5);
      };
      function fromString6(string7, encoding) {
        if (typeof encoding !== "string" || encoding === "") {
          encoding = "utf8";
        }
        if (!Buffer6.isEncoding(encoding)) {
          throw new TypeError("Unknown encoding: " + encoding);
        }
        const length2 = byteLength(string7, encoding) | 0;
        let buf = createBuffer(length2);
        const actual = buf.write(string7, encoding);
        if (actual !== length2) {
          buf = buf.slice(0, actual);
        }
        return buf;
      }
      function fromArrayLike(array3) {
        const length2 = array3.length < 0 ? 0 : checked(array3.length) | 0;
        const buf = createBuffer(length2);
        for (let i5 = 0; i5 < length2; i5 += 1) {
          buf[i5] = array3[i5] & 255;
        }
        return buf;
      }
      function fromArrayView(arrayView) {
        if (isInstance(arrayView, Uint8Array)) {
          const copy = new Uint8Array(arrayView);
          return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
        }
        return fromArrayLike(arrayView);
      }
      function fromArrayBuffer(array3, byteOffset, length2) {
        if (byteOffset < 0 || array3.byteLength < byteOffset) {
          throw new RangeError('"offset" is outside of buffer bounds');
        }
        if (array3.byteLength < byteOffset + (length2 || 0)) {
          throw new RangeError('"length" is outside of buffer bounds');
        }
        let buf;
        if (byteOffset === void 0 && length2 === void 0) {
          buf = new Uint8Array(array3);
        } else if (length2 === void 0) {
          buf = new Uint8Array(array3, byteOffset);
        } else {
          buf = new Uint8Array(array3, byteOffset, length2);
        }
        Object.setPrototypeOf(buf, Buffer6.prototype);
        return buf;
      }
      function fromObject(obj) {
        if (Buffer6.isBuffer(obj)) {
          const len = checked(obj.length) | 0;
          const buf = createBuffer(len);
          if (buf.length === 0) {
            return buf;
          }
          obj.copy(buf, 0, 0, len);
          return buf;
        }
        if (obj.length !== void 0) {
          if (typeof obj.length !== "number" || numberIsNaN(obj.length)) {
            return createBuffer(0);
          }
          return fromArrayLike(obj);
        }
        if (obj.type === "Buffer" && Array.isArray(obj.data)) {
          return fromArrayLike(obj.data);
        }
      }
      function checked(length2) {
        if (length2 >= K_MAX_LENGTH) {
          throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes");
        }
        return length2 | 0;
      }
      function SlowBuffer(length2) {
        if (+length2 != length2) {
          length2 = 0;
        }
        return Buffer6.alloc(+length2);
      }
      Buffer6.isBuffer = function isBuffer(b9) {
        return b9 != null && b9._isBuffer === true && b9 !== Buffer6.prototype;
      };
      Buffer6.compare = function compare4(a5, b9) {
        if (isInstance(a5, Uint8Array)) a5 = Buffer6.from(a5, a5.offset, a5.byteLength);
        if (isInstance(b9, Uint8Array)) b9 = Buffer6.from(b9, b9.offset, b9.byteLength);
        if (!Buffer6.isBuffer(a5) || !Buffer6.isBuffer(b9)) {
          throw new TypeError(
            'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
          );
        }
        if (a5 === b9) return 0;
        let x13 = a5.length;
        let y11 = b9.length;
        for (let i5 = 0, len = Math.min(x13, y11); i5 < len; ++i5) {
          if (a5[i5] !== b9[i5]) {
            x13 = a5[i5];
            y11 = b9[i5];
            break;
          }
        }
        if (x13 < y11) return -1;
        if (y11 < x13) return 1;
        return 0;
      };
      Buffer6.isEncoding = function isEncoding(encoding) {
        switch (String(encoding).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;
        }
      };
      Buffer6.concat = function concat6(list, length2) {
        if (!Array.isArray(list)) {
          throw new TypeError('"list" argument must be an Array of Buffers');
        }
        if (list.length === 0) {
          return Buffer6.alloc(0);
        }
        let i5;
        if (length2 === void 0) {
          length2 = 0;
          for (i5 = 0; i5 < list.length; ++i5) {
            length2 += list[i5].length;
          }
        }
        const buffer2 = Buffer6.allocUnsafe(length2);
        let pos = 0;
        for (i5 = 0; i5 < list.length; ++i5) {
          let buf = list[i5];
          if (isInstance(buf, Uint8Array)) {
            if (pos + buf.length > buffer2.length) {
              if (!Buffer6.isBuffer(buf)) buf = Buffer6.from(buf);
              buf.copy(buffer2, pos);
            } else {
              Uint8Array.prototype.set.call(
                buffer2,
                buf,
                pos
              );
            }
          } else if (!Buffer6.isBuffer(buf)) {
            throw new TypeError('"list" argument must be an Array of Buffers');
          } else {
            buf.copy(buffer2, pos);
          }
          pos += buf.length;
        }
        return buffer2;
      };
      function byteLength(string7, encoding) {
        if (Buffer6.isBuffer(string7)) {
          return string7.length;
        }
        if (ArrayBuffer.isView(string7) || isInstance(string7, ArrayBuffer)) {
          return string7.byteLength;
        }
        if (typeof string7 !== "string") {
          throw new TypeError(
            'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string7
          );
        }
        const len = string7.length;
        const mustMatch = arguments.length > 2 && arguments[2] === true;
        if (!mustMatch && len === 0) return 0;
        let loweredCase = false;
        for (; ; ) {
          switch (encoding) {
            case "ascii":
            case "latin1":
            case "binary":
              return len;
            case "utf8":
            case "utf-8":
              return utf8ToBytes4(string7).length;
            case "ucs2":
            case "ucs-2":
            case "utf16le":
            case "utf-16le":
              return len * 2;
            case "hex":
              return len >>> 1;
            case "base64":
              return base64ToBytes2(string7).length;
            default:
              if (loweredCase) {
                return mustMatch ? -1 : utf8ToBytes4(string7).length;
              }
              encoding = ("" + encoding).toLowerCase();
              loweredCase = true;
          }
        }
      }
      Buffer6.byteLength = byteLength;
      function slowToString(encoding, start, end) {
        let loweredCase = false;
        if (start === void 0 || start < 0) {
          start = 0;
        }
        if (start > this.length) {
          return "";
        }
        if (end === void 0 || end > this.length) {
          end = this.length;
        }
        if (end <= 0) {
          return "";
        }
        end >>>= 0;
        start >>>= 0;
        if (end <= start) {
          return "";
        }
        if (!encoding) encoding = "utf8";
        while (true) {
          switch (encoding) {
            case "hex":
              return hexSlice(this, start, end);
            case "utf8":
            case "utf-8":
              return utf8Slice(this, start, end);
            case "ascii":
              return asciiSlice(this, start, end);
            case "latin1":
            case "binary":
              return latin1Slice(this, start, end);
            case "base64":
              return base64Slice(this, start, end);
            case "ucs2":
            case "ucs-2":
            case "utf16le":
            case "utf-16le":
              return utf16leSlice(this, start, end);
            default:
              if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
              encoding = (encoding + "").toLowerCase();
              loweredCase = true;
          }
        }
      }
      Buffer6.prototype._isBuffer = true;
      function swap(b9, n6, m3) {
        const i5 = b9[n6];
        b9[n6] = b9[m3];
        b9[m3] = i5;
      }
      Buffer6.prototype.swap16 = function swap16() {
        const len = this.length;
        if (len % 2 !== 0) {
          throw new RangeError("Buffer size must be a multiple of 16-bits");
        }
        for (let i5 = 0; i5 < len; i5 += 2) {
          swap(this, i5, i5 + 1);
        }
        return this;
      };
      Buffer6.prototype.swap32 = function swap32() {
        const len = this.length;
        if (len % 4 !== 0) {
          throw new RangeError("Buffer size must be a multiple of 32-bits");
        }
        for (let i5 = 0; i5 < len; i5 += 4) {
          swap(this, i5, i5 + 3);
          swap(this, i5 + 1, i5 + 2);
        }
        return this;
      };
      Buffer6.prototype.swap64 = function swap64() {
        const len = this.length;
        if (len % 8 !== 0) {
          throw new RangeError("Buffer size must be a multiple of 64-bits");
        }
        for (let i5 = 0; i5 < len; i5 += 8) {
          swap(this, i5, i5 + 7);
          swap(this, i5 + 1, i5 + 6);
          swap(this, i5 + 2, i5 + 5);
          swap(this, i5 + 3, i5 + 4);
        }
        return this;
      };
      Buffer6.prototype.toString = function toString5() {
        const length2 = this.length;
        if (length2 === 0) return "";
        if (arguments.length === 0) return utf8Slice(this, 0, length2);
        return slowToString.apply(this, arguments);
      };
      Buffer6.prototype.toLocaleString = Buffer6.prototype.toString;
      Buffer6.prototype.equals = function equals5(b9) {
        if (!Buffer6.isBuffer(b9)) throw new TypeError("Argument must be a Buffer");
        if (this === b9) return true;
        return Buffer6.compare(this, b9) === 0;
      };
      Buffer6.prototype.inspect = function inspect4() {
        let str = "";
        const max = exports.INSPECT_MAX_BYTES;
        str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
        if (this.length > max) str += " ... ";
        return "<Buffer " + str + ">";
      };
      if (customInspectSymbol) {
        Buffer6.prototype[customInspectSymbol] = Buffer6.prototype.inspect;
      }
      Buffer6.prototype.compare = function compare4(target, start, end, thisStart, thisEnd) {
        if (isInstance(target, Uint8Array)) {
          target = Buffer6.from(target, target.offset, target.byteLength);
        }
        if (!Buffer6.isBuffer(target)) {
          throw new TypeError(
            'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target
          );
        }
        if (start === void 0) {
          start = 0;
        }
        if (end === void 0) {
          end = target ? target.length : 0;
        }
        if (thisStart === void 0) {
          thisStart = 0;
        }
        if (thisEnd === void 0) {
          thisEnd = this.length;
        }
        if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
          throw new RangeError("out of range index");
        }
        if (thisStart >= thisEnd && start >= end) {
          return 0;
        }
        if (thisStart >= thisEnd) {
          return -1;
        }
        if (start >= end) {
          return 1;
        }
        start >>>= 0;
        end >>>= 0;
        thisStart >>>= 0;
        thisEnd >>>= 0;
        if (this === target) return 0;
        let x13 = thisEnd - thisStart;
        let y11 = end - start;
        const len = Math.min(x13, y11);
        const thisCopy = this.slice(thisStart, thisEnd);
        const targetCopy = target.slice(start, end);
        for (let i5 = 0; i5 < len; ++i5) {
          if (thisCopy[i5] !== targetCopy[i5]) {
            x13 = thisCopy[i5];
            y11 = targetCopy[i5];
            break;
          }
        }
        if (x13 < y11) return -1;
        if (y11 < x13) return 1;
        return 0;
      };
      function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
        if (buffer2.length === 0) return -1;
        if (typeof byteOffset === "string") {
          encoding = byteOffset;
          byteOffset = 0;
        } else if (byteOffset > 2147483647) {
          byteOffset = 2147483647;
        } else if (byteOffset < -2147483648) {
          byteOffset = -2147483648;
        }
        byteOffset = +byteOffset;
        if (numberIsNaN(byteOffset)) {
          byteOffset = dir ? 0 : buffer2.length - 1;
        }
        if (byteOffset < 0) byteOffset = buffer2.length + byteOffset;
        if (byteOffset >= buffer2.length) {
          if (dir) return -1;
          else byteOffset = buffer2.length - 1;
        } else if (byteOffset < 0) {
          if (dir) byteOffset = 0;
          else return -1;
        }
        if (typeof val === "string") {
          val = Buffer6.from(val, encoding);
        }
        if (Buffer6.isBuffer(val)) {
          if (val.length === 0) {
            return -1;
          }
          return arrayIndexOf(buffer2, val, byteOffset, encoding, dir);
        } else if (typeof val === "number") {
          val = val & 255;
          if (typeof Uint8Array.prototype.indexOf === "function") {
            if (dir) {
              return Uint8Array.prototype.indexOf.call(buffer2, val, byteOffset);
            } else {
              return Uint8Array.prototype.lastIndexOf.call(buffer2, val, byteOffset);
            }
          }
          return arrayIndexOf(buffer2, [val], byteOffset, encoding, dir);
        }
        throw new TypeError("val must be string, number or Buffer");
      }
      function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
        let indexSize = 1;
        let arrLength = arr.length;
        let valLength = val.length;
        if (encoding !== void 0) {
          encoding = String(encoding).toLowerCase();
          if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") {
            if (arr.length < 2 || val.length < 2) {
              return -1;
            }
            indexSize = 2;
            arrLength /= 2;
            valLength /= 2;
            byteOffset /= 2;
          }
        }
        function read2(buf, i6) {
          if (indexSize === 1) {
            return buf[i6];
          } else {
            return buf.readUInt16BE(i6 * indexSize);
          }
        }
        let i5;
        if (dir) {
          let foundIndex = -1;
          for (i5 = byteOffset; i5 < arrLength; i5++) {
            if (read2(arr, i5) === read2(val, foundIndex === -1 ? 0 : i5 - foundIndex)) {
              if (foundIndex === -1) foundIndex = i5;
              if (i5 - foundIndex + 1 === valLength) return foundIndex * indexSize;
            } else {
              if (foundIndex !== -1) i5 -= i5 - foundIndex;
              foundIndex = -1;
            }
          }
        } else {
          if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
          for (i5 = byteOffset; i5 >= 0; i5--) {
            let found = true;
            for (let j6 = 0; j6 < valLength; j6++) {
              if (read2(arr, i5 + j6) !== read2(val, j6)) {
                found = false;
                break;
              }
            }
            if (found) return i5;
          }
        }
        return -1;
      }
      Buffer6.prototype.includes = function includes(val, byteOffset, encoding) {
        return this.indexOf(val, byteOffset, encoding) !== -1;
      };
      Buffer6.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
        return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
      };
      Buffer6.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
        return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
      };
      function hexWrite(buf, string7, offset2, length2) {
        offset2 = Number(offset2) || 0;
        const remaining = buf.length - offset2;
        if (!length2) {
          length2 = remaining;
        } else {
          length2 = Number(length2);
          if (length2 > remaining) {
            length2 = remaining;
          }
        }
        const strLen = string7.length;
        if (length2 > strLen / 2) {
          length2 = strLen / 2;
        }
        let i5;
        for (i5 = 0; i5 < length2; ++i5) {
          const parsed = parseInt(string7.substr(i5 * 2, 2), 16);
          if (numberIsNaN(parsed)) return i5;
          buf[offset2 + i5] = parsed;
        }
        return i5;
      }
      function utf8Write(buf, string7, offset2, length2) {
        return blitBuffer(utf8ToBytes4(string7, buf.length - offset2), buf, offset2, length2);
      }
      function asciiWrite(buf, string7, offset2, length2) {
        return blitBuffer(asciiToBytes(string7), buf, offset2, length2);
      }
      function base64Write(buf, string7, offset2, length2) {
        return blitBuffer(base64ToBytes2(string7), buf, offset2, length2);
      }
      function ucs2Write(buf, string7, offset2, length2) {
        return blitBuffer(utf16leToBytes(string7, buf.length - offset2), buf, offset2, length2);
      }
      Buffer6.prototype.write = function write(string7, offset2, length2, encoding) {
        if (offset2 === void 0) {
          encoding = "utf8";
          length2 = this.length;
          offset2 = 0;
        } else if (length2 === void 0 && typeof offset2 === "string") {
          encoding = offset2;
          length2 = this.length;
          offset2 = 0;
        } else if (isFinite(offset2)) {
          offset2 = offset2 >>> 0;
          if (isFinite(length2)) {
            length2 = length2 >>> 0;
            if (encoding === void 0) encoding = "utf8";
          } else {
            encoding = length2;
            length2 = void 0;
          }
        } else {
          throw new Error(
            "Buffer.write(string, encoding, offset[, length]) is no longer supported"
          );
        }
        const remaining = this.length - offset2;
        if (length2 === void 0 || length2 > remaining) length2 = remaining;
        if (string7.length > 0 && (length2 < 0 || offset2 < 0) || offset2 > this.length) {
          throw new RangeError("Attempt to write outside buffer bounds");
        }
        if (!encoding) encoding = "utf8";
        let loweredCase = false;
        for (; ; ) {
          switch (encoding) {
            case "hex":
              return hexWrite(this, string7, offset2, length2);
            case "utf8":
            case "utf-8":
              return utf8Write(this, string7, offset2, length2);
            case "ascii":
            case "latin1":
            case "binary":
              return asciiWrite(this, string7, offset2, length2);
            case "base64":
              return base64Write(this, string7, offset2, length2);
            case "ucs2":
            case "ucs-2":
            case "utf16le":
            case "utf-16le":
              return ucs2Write(this, string7, offset2, length2);
            default:
              if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
              encoding = ("" + encoding).toLowerCase();
              loweredCase = true;
          }
        }
      };
      Buffer6.prototype.toJSON = function toJSON2() {
        return {
          type: "Buffer",
          data: Array.prototype.slice.call(this._arr || this, 0)
        };
      };
      function base64Slice(buf, start, end) {
        if (start === 0 && end === buf.length) {
          return base644.fromByteArray(buf);
        } else {
          return base644.fromByteArray(buf.slice(start, end));
        }
      }
      function utf8Slice(buf, start, end) {
        end = Math.min(buf.length, end);
        const res = [];
        let i5 = start;
        while (i5 < end) {
          const firstByte = buf[i5];
          let codePoint = null;
          let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
          if (i5 + bytesPerSequence <= end) {
            let secondByte, thirdByte, fourthByte, tempCodePoint;
            switch (bytesPerSequence) {
              case 1:
                if (firstByte < 128) {
                  codePoint = firstByte;
                }
                break;
              case 2:
                secondByte = buf[i5 + 1];
                if ((secondByte & 192) === 128) {
                  tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
                  if (tempCodePoint > 127) {
                    codePoint = tempCodePoint;
                  }
                }
                break;
              case 3:
                secondByte = buf[i5 + 1];
                thirdByte = buf[i5 + 2];
                if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
                  tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
                  if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
                    codePoint = tempCodePoint;
                  }
                }
                break;
              case 4:
                secondByte = buf[i5 + 1];
                thirdByte = buf[i5 + 2];
                fourthByte = buf[i5 + 3];
                if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
                  tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
                  if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
                    codePoint = tempCodePoint;
                  }
                }
            }
          }
          if (codePoint === null) {
            codePoint = 65533;
            bytesPerSequence = 1;
          } else if (codePoint > 65535) {
            codePoint -= 65536;
            res.push(codePoint >>> 10 & 1023 | 55296);
            codePoint = 56320 | codePoint & 1023;
          }
          res.push(codePoint);
          i5 += bytesPerSequence;
        }
        return decodeCodePointsArray(res);
      }
      var MAX_ARGUMENTS_LENGTH = 4096;
      function decodeCodePointsArray(codePoints) {
        const len = codePoints.length;
        if (len <= MAX_ARGUMENTS_LENGTH) {
          return String.fromCharCode.apply(String, codePoints);
        }
        let res = "";
        let i5 = 0;
        while (i5 < len) {
          res += String.fromCharCode.apply(
            String,
            codePoints.slice(i5, i5 += MAX_ARGUMENTS_LENGTH)
          );
        }
        return res;
      }
      function asciiSlice(buf, start, end) {
        let ret = "";
        end = Math.min(buf.length, end);
        for (let i5 = start; i5 < end; ++i5) {
          ret += String.fromCharCode(buf[i5] & 127);
        }
        return ret;
      }
      function latin1Slice(buf, start, end) {
        let ret = "";
        end = Math.min(buf.length, end);
        for (let i5 = start; i5 < end; ++i5) {
          ret += String.fromCharCode(buf[i5]);
        }
        return ret;
      }
      function hexSlice(buf, start, end) {
        const len = buf.length;
        if (!start || start < 0) start = 0;
        if (!end || end < 0 || end > len) end = len;
        let out = "";
        for (let i5 = start; i5 < end; ++i5) {
          out += hexSliceLookupTable[buf[i5]];
        }
        return out;
      }
      function utf16leSlice(buf, start, end) {
        const bytes = buf.slice(start, end);
        let res = "";
        for (let i5 = 0; i5 < bytes.length - 1; i5 += 2) {
          res += String.fromCharCode(bytes[i5] + bytes[i5 + 1] * 256);
        }
        return res;
      }
      Buffer6.prototype.slice = function slice4(start, end) {
        const len = this.length;
        start = ~~start;
        end = end === void 0 ? len : ~~end;
        if (start < 0) {
          start += len;
          if (start < 0) start = 0;
        } else if (start > len) {
          start = len;
        }
        if (end < 0) {
          end += len;
          if (end < 0) end = 0;
        } else if (end > len) {
          end = len;
        }
        if (end < start) end = start;
        const newBuf = this.subarray(start, end);
        Object.setPrototypeOf(newBuf, Buffer6.prototype);
        return newBuf;
      };
      function checkOffset(offset2, ext, length2) {
        if (offset2 % 1 !== 0 || offset2 < 0) throw new RangeError("offset is not uint");
        if (offset2 + ext > length2) throw new RangeError("Trying to access beyond buffer length");
      }
      Buffer6.prototype.readUintLE = Buffer6.prototype.readUIntLE = function readUIntLE(offset2, byteLength2, noAssert) {
        offset2 = offset2 >>> 0;
        byteLength2 = byteLength2 >>> 0;
        if (!noAssert) checkOffset(offset2, byteLength2, this.length);
        let val = this[offset2];
        let mul3 = 1;
        let i5 = 0;
        while (++i5 < byteLength2 && (mul3 *= 256)) {
          val += this[offset2 + i5] * mul3;
        }
        return val;
      };
      Buffer6.prototype.readUintBE = Buffer6.prototype.readUIntBE = function readUIntBE(offset2, byteLength2, noAssert) {
        offset2 = offset2 >>> 0;
        byteLength2 = byteLength2 >>> 0;
        if (!noAssert) {
          checkOffset(offset2, byteLength2, this.length);
        }
        let val = this[offset2 + --byteLength2];
        let mul3 = 1;
        while (byteLength2 > 0 && (mul3 *= 256)) {
          val += this[offset2 + --byteLength2] * mul3;
        }
        return val;
      };
      Buffer6.prototype.readUint8 = Buffer6.prototype.readUInt8 = function readUInt8(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 1, this.length);
        return this[offset2];
      };
      Buffer6.prototype.readUint16LE = Buffer6.prototype.readUInt16LE = function readUInt16LE(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 2, this.length);
        return this[offset2] | this[offset2 + 1] << 8;
      };
      Buffer6.prototype.readUint16BE = Buffer6.prototype.readUInt16BE = function readUInt16BE(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 2, this.length);
        return this[offset2] << 8 | this[offset2 + 1];
      };
      Buffer6.prototype.readUint32LE = Buffer6.prototype.readUInt32LE = function readUInt32LE(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 4, this.length);
        return (this[offset2] | this[offset2 + 1] << 8 | this[offset2 + 2] << 16) + this[offset2 + 3] * 16777216;
      };
      Buffer6.prototype.readUint32BE = Buffer6.prototype.readUInt32BE = function readUInt32BE(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 4, this.length);
        return this[offset2] * 16777216 + (this[offset2 + 1] << 16 | this[offset2 + 2] << 8 | this[offset2 + 3]);
      };
      Buffer6.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset2) {
        offset2 = offset2 >>> 0;
        validateNumber(offset2, "offset");
        const first = this[offset2];
        const last = this[offset2 + 7];
        if (first === void 0 || last === void 0) {
          boundsError(offset2, this.length - 8);
        }
        const lo4 = first + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 24;
        const hi2 = this[++offset2] + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + last * 2 ** 24;
        return BigInt(lo4) + (BigInt(hi2) << BigInt(32));
      });
      Buffer6.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset2) {
        offset2 = offset2 >>> 0;
        validateNumber(offset2, "offset");
        const first = this[offset2];
        const last = this[offset2 + 7];
        if (first === void 0 || last === void 0) {
          boundsError(offset2, this.length - 8);
        }
        const hi2 = first * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + this[++offset2];
        const lo4 = this[++offset2] * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + last;
        return (BigInt(hi2) << BigInt(32)) + BigInt(lo4);
      });
      Buffer6.prototype.readIntLE = function readIntLE(offset2, byteLength2, noAssert) {
        offset2 = offset2 >>> 0;
        byteLength2 = byteLength2 >>> 0;
        if (!noAssert) checkOffset(offset2, byteLength2, this.length);
        let val = this[offset2];
        let mul3 = 1;
        let i5 = 0;
        while (++i5 < byteLength2 && (mul3 *= 256)) {
          val += this[offset2 + i5] * mul3;
        }
        mul3 *= 128;
        if (val >= mul3) val -= Math.pow(2, 8 * byteLength2);
        return val;
      };
      Buffer6.prototype.readIntBE = function readIntBE(offset2, byteLength2, noAssert) {
        offset2 = offset2 >>> 0;
        byteLength2 = byteLength2 >>> 0;
        if (!noAssert) checkOffset(offset2, byteLength2, this.length);
        let i5 = byteLength2;
        let mul3 = 1;
        let val = this[offset2 + --i5];
        while (i5 > 0 && (mul3 *= 256)) {
          val += this[offset2 + --i5] * mul3;
        }
        mul3 *= 128;
        if (val >= mul3) val -= Math.pow(2, 8 * byteLength2);
        return val;
      };
      Buffer6.prototype.readInt8 = function readInt8(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 1, this.length);
        if (!(this[offset2] & 128)) return this[offset2];
        return (255 - this[offset2] + 1) * -1;
      };
      Buffer6.prototype.readInt16LE = function readInt16LE(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 2, this.length);
        const val = this[offset2] | this[offset2 + 1] << 8;
        return val & 32768 ? val | 4294901760 : val;
      };
      Buffer6.prototype.readInt16BE = function readInt16BE(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 2, this.length);
        const val = this[offset2 + 1] | this[offset2] << 8;
        return val & 32768 ? val | 4294901760 : val;
      };
      Buffer6.prototype.readInt32LE = function readInt32LE(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 4, this.length);
        return this[offset2] | this[offset2 + 1] << 8 | this[offset2 + 2] << 16 | this[offset2 + 3] << 24;
      };
      Buffer6.prototype.readInt32BE = function readInt32BE(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 4, this.length);
        return this[offset2] << 24 | this[offset2 + 1] << 16 | this[offset2 + 2] << 8 | this[offset2 + 3];
      };
      Buffer6.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset2) {
        offset2 = offset2 >>> 0;
        validateNumber(offset2, "offset");
        const first = this[offset2];
        const last = this[offset2 + 7];
        if (first === void 0 || last === void 0) {
          boundsError(offset2, this.length - 8);
        }
        const val = this[offset2 + 4] + this[offset2 + 5] * 2 ** 8 + this[offset2 + 6] * 2 ** 16 + (last << 24);
        return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 24);
      });
      Buffer6.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset2) {
        offset2 = offset2 >>> 0;
        validateNumber(offset2, "offset");
        const first = this[offset2];
        const last = this[offset2 + 7];
        if (first === void 0 || last === void 0) {
          boundsError(offset2, this.length - 8);
        }
        const val = (first << 24) + // Overflow
        this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + this[++offset2];
        return (BigInt(val) << BigInt(32)) + BigInt(this[++offset2] * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + last);
      });
      Buffer6.prototype.readFloatLE = function readFloatLE(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 4, this.length);
        return ieee754.read(this, offset2, true, 23, 4);
      };
      Buffer6.prototype.readFloatBE = function readFloatBE(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 4, this.length);
        return ieee754.read(this, offset2, false, 23, 4);
      };
      Buffer6.prototype.readDoubleLE = function readDoubleLE(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 8, this.length);
        return ieee754.read(this, offset2, true, 52, 8);
      };
      Buffer6.prototype.readDoubleBE = function readDoubleBE(offset2, noAssert) {
        offset2 = offset2 >>> 0;
        if (!noAssert) checkOffset(offset2, 8, this.length);
        return ieee754.read(this, offset2, false, 52, 8);
      };
      function checkInt(buf, value, offset2, ext, max, min) {
        if (!Buffer6.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
        if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
        if (offset2 + ext > buf.length) throw new RangeError("Index out of range");
      }
      Buffer6.prototype.writeUintLE = Buffer6.prototype.writeUIntLE = function writeUIntLE(value, offset2, byteLength2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        byteLength2 = byteLength2 >>> 0;
        if (!noAssert) {
          const maxBytes = Math.pow(2, 8 * byteLength2) - 1;
          checkInt(this, value, offset2, byteLength2, maxBytes, 0);
        }
        let mul3 = 1;
        let i5 = 0;
        this[offset2] = value & 255;
        while (++i5 < byteLength2 && (mul3 *= 256)) {
          this[offset2 + i5] = value / mul3 & 255;
        }
        return offset2 + byteLength2;
      };
      Buffer6.prototype.writeUintBE = Buffer6.prototype.writeUIntBE = function writeUIntBE(value, offset2, byteLength2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        byteLength2 = byteLength2 >>> 0;
        if (!noAssert) {
          const maxBytes = Math.pow(2, 8 * byteLength2) - 1;
          checkInt(this, value, offset2, byteLength2, maxBytes, 0);
        }
        let i5 = byteLength2 - 1;
        let mul3 = 1;
        this[offset2 + i5] = value & 255;
        while (--i5 >= 0 && (mul3 *= 256)) {
          this[offset2 + i5] = value / mul3 & 255;
        }
        return offset2 + byteLength2;
      };
      Buffer6.prototype.writeUint8 = Buffer6.prototype.writeUInt8 = function writeUInt8(value, offset2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) checkInt(this, value, offset2, 1, 255, 0);
        this[offset2] = value & 255;
        return offset2 + 1;
      };
      Buffer6.prototype.writeUint16LE = Buffer6.prototype.writeUInt16LE = function writeUInt16LE(value, offset2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) checkInt(this, value, offset2, 2, 65535, 0);
        this[offset2] = value & 255;
        this[offset2 + 1] = value >>> 8;
        return offset2 + 2;
      };
      Buffer6.prototype.writeUint16BE = Buffer6.prototype.writeUInt16BE = function writeUInt16BE(value, offset2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) checkInt(this, value, offset2, 2, 65535, 0);
        this[offset2] = value >>> 8;
        this[offset2 + 1] = value & 255;
        return offset2 + 2;
      };
      Buffer6.prototype.writeUint32LE = Buffer6.prototype.writeUInt32LE = function writeUInt32LE(value, offset2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) checkInt(this, value, offset2, 4, 4294967295, 0);
        this[offset2 + 3] = value >>> 24;
        this[offset2 + 2] = value >>> 16;
        this[offset2 + 1] = value >>> 8;
        this[offset2] = value & 255;
        return offset2 + 4;
      };
      Buffer6.prototype.writeUint32BE = Buffer6.prototype.writeUInt32BE = function writeUInt32BE(value, offset2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) checkInt(this, value, offset2, 4, 4294967295, 0);
        this[offset2] = value >>> 24;
        this[offset2 + 1] = value >>> 16;
        this[offset2 + 2] = value >>> 8;
        this[offset2 + 3] = value & 255;
        return offset2 + 4;
      };
      function wrtBigUInt64LE(buf, value, offset2, min, max) {
        checkIntBI(value, min, max, buf, offset2, 7);
        let lo4 = Number(value & BigInt(4294967295));
        buf[offset2++] = lo4;
        lo4 = lo4 >> 8;
        buf[offset2++] = lo4;
        lo4 = lo4 >> 8;
        buf[offset2++] = lo4;
        lo4 = lo4 >> 8;
        buf[offset2++] = lo4;
        let hi2 = Number(value >> BigInt(32) & BigInt(4294967295));
        buf[offset2++] = hi2;
        hi2 = hi2 >> 8;
        buf[offset2++] = hi2;
        hi2 = hi2 >> 8;
        buf[offset2++] = hi2;
        hi2 = hi2 >> 8;
        buf[offset2++] = hi2;
        return offset2;
      }
      function wrtBigUInt64BE(buf, value, offset2, min, max) {
        checkIntBI(value, min, max, buf, offset2, 7);
        let lo4 = Number(value & BigInt(4294967295));
        buf[offset2 + 7] = lo4;
        lo4 = lo4 >> 8;
        buf[offset2 + 6] = lo4;
        lo4 = lo4 >> 8;
        buf[offset2 + 5] = lo4;
        lo4 = lo4 >> 8;
        buf[offset2 + 4] = lo4;
        let hi2 = Number(value >> BigInt(32) & BigInt(4294967295));
        buf[offset2 + 3] = hi2;
        hi2 = hi2 >> 8;
        buf[offset2 + 2] = hi2;
        hi2 = hi2 >> 8;
        buf[offset2 + 1] = hi2;
        hi2 = hi2 >> 8;
        buf[offset2] = hi2;
        return offset2 + 8;
      }
      Buffer6.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset2 = 0) {
        return wrtBigUInt64LE(this, value, offset2, BigInt(0), BigInt("0xffffffffffffffff"));
      });
      Buffer6.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset2 = 0) {
        return wrtBigUInt64BE(this, value, offset2, BigInt(0), BigInt("0xffffffffffffffff"));
      });
      Buffer6.prototype.writeIntLE = function writeIntLE(value, offset2, byteLength2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) {
          const limit = Math.pow(2, 8 * byteLength2 - 1);
          checkInt(this, value, offset2, byteLength2, limit - 1, -limit);
        }
        let i5 = 0;
        let mul3 = 1;
        let sub = 0;
        this[offset2] = value & 255;
        while (++i5 < byteLength2 && (mul3 *= 256)) {
          if (value < 0 && sub === 0 && this[offset2 + i5 - 1] !== 0) {
            sub = 1;
          }
          this[offset2 + i5] = (value / mul3 >> 0) - sub & 255;
        }
        return offset2 + byteLength2;
      };
      Buffer6.prototype.writeIntBE = function writeIntBE(value, offset2, byteLength2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) {
          const limit = Math.pow(2, 8 * byteLength2 - 1);
          checkInt(this, value, offset2, byteLength2, limit - 1, -limit);
        }
        let i5 = byteLength2 - 1;
        let mul3 = 1;
        let sub = 0;
        this[offset2 + i5] = value & 255;
        while (--i5 >= 0 && (mul3 *= 256)) {
          if (value < 0 && sub === 0 && this[offset2 + i5 + 1] !== 0) {
            sub = 1;
          }
          this[offset2 + i5] = (value / mul3 >> 0) - sub & 255;
        }
        return offset2 + byteLength2;
      };
      Buffer6.prototype.writeInt8 = function writeInt8(value, offset2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) checkInt(this, value, offset2, 1, 127, -128);
        if (value < 0) value = 255 + value + 1;
        this[offset2] = value & 255;
        return offset2 + 1;
      };
      Buffer6.prototype.writeInt16LE = function writeInt16LE(value, offset2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) checkInt(this, value, offset2, 2, 32767, -32768);
        this[offset2] = value & 255;
        this[offset2 + 1] = value >>> 8;
        return offset2 + 2;
      };
      Buffer6.prototype.writeInt16BE = function writeInt16BE(value, offset2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) checkInt(this, value, offset2, 2, 32767, -32768);
        this[offset2] = value >>> 8;
        this[offset2 + 1] = value & 255;
        return offset2 + 2;
      };
      Buffer6.prototype.writeInt32LE = function writeInt32LE(value, offset2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) checkInt(this, value, offset2, 4, 2147483647, -2147483648);
        this[offset2] = value & 255;
        this[offset2 + 1] = value >>> 8;
        this[offset2 + 2] = value >>> 16;
        this[offset2 + 3] = value >>> 24;
        return offset2 + 4;
      };
      Buffer6.prototype.writeInt32BE = function writeInt32BE(value, offset2, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) checkInt(this, value, offset2, 4, 2147483647, -2147483648);
        if (value < 0) value = 4294967295 + value + 1;
        this[offset2] = value >>> 24;
        this[offset2 + 1] = value >>> 16;
        this[offset2 + 2] = value >>> 8;
        this[offset2 + 3] = value & 255;
        return offset2 + 4;
      };
      Buffer6.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset2 = 0) {
        return wrtBigUInt64LE(this, value, offset2, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
      });
      Buffer6.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset2 = 0) {
        return wrtBigUInt64BE(this, value, offset2, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
      });
      function checkIEEE754(buf, value, offset2, ext, max, min) {
        if (offset2 + ext > buf.length) throw new RangeError("Index out of range");
        if (offset2 < 0) throw new RangeError("Index out of range");
      }
      function writeFloat(buf, value, offset2, littleEndian, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) {
          checkIEEE754(buf, value, offset2, 4, 34028234663852886e22, -34028234663852886e22);
        }
        ieee754.write(buf, value, offset2, littleEndian, 23, 4);
        return offset2 + 4;
      }
      Buffer6.prototype.writeFloatLE = function writeFloatLE(value, offset2, noAssert) {
        return writeFloat(this, value, offset2, true, noAssert);
      };
      Buffer6.prototype.writeFloatBE = function writeFloatBE(value, offset2, noAssert) {
        return writeFloat(this, value, offset2, false, noAssert);
      };
      function writeDouble(buf, value, offset2, littleEndian, noAssert) {
        value = +value;
        offset2 = offset2 >>> 0;
        if (!noAssert) {
          checkIEEE754(buf, value, offset2, 8, 17976931348623157e292, -17976931348623157e292);
        }
        ieee754.write(buf, value, offset2, littleEndian, 52, 8);
        return offset2 + 8;
      }
      Buffer6.prototype.writeDoubleLE = function writeDoubleLE(value, offset2, noAssert) {
        return writeDouble(this, value, offset2, true, noAssert);
      };
      Buffer6.prototype.writeDoubleBE = function writeDoubleBE(value, offset2, noAssert) {
        return writeDouble(this, value, offset2, false, noAssert);
      };
      Buffer6.prototype.copy = function copy(target, targetStart, start, end) {
        if (!Buffer6.isBuffer(target)) throw new TypeError("argument should be a Buffer");
        if (!start) start = 0;
        if (!end && end !== 0) end = this.length;
        if (targetStart >= target.length) targetStart = target.length;
        if (!targetStart) targetStart = 0;
        if (end > 0 && end < start) end = start;
        if (end === start) return 0;
        if (target.length === 0 || this.length === 0) return 0;
        if (targetStart < 0) {
          throw new RangeError("targetStart out of bounds");
        }
        if (start < 0 || start >= this.length) throw new RangeError("Index out of range");
        if (end < 0) throw new RangeError("sourceEnd out of bounds");
        if (end > this.length) end = this.length;
        if (target.length - targetStart < end - start) {
          end = target.length - targetStart + start;
        }
        const len = end - start;
        if (this === target && typeof Uint8Array.prototype.copyWithin === "function") {
          this.copyWithin(targetStart, start, end);
        } else {
          Uint8Array.prototype.set.call(
            target,
            this.subarray(start, end),
            targetStart
          );
        }
        return len;
      };
      Buffer6.prototype.fill = function fill(val, start, end, encoding) {
        if (typeof val === "string") {
          if (typeof start === "string") {
            encoding = start;
            start = 0;
            end = this.length;
          } else if (typeof end === "string") {
            encoding = end;
            end = this.length;
          }
          if (encoding !== void 0 && typeof encoding !== "string") {
            throw new TypeError("encoding must be a string");
          }
          if (typeof encoding === "string" && !Buffer6.isEncoding(encoding)) {
            throw new TypeError("Unknown encoding: " + encoding);
          }
          if (val.length === 1) {
            const code2 = val.charCodeAt(0);
            if (encoding === "utf8" && code2 < 128 || encoding === "latin1") {
              val = code2;
            }
          }
        } else if (typeof val === "number") {
          val = val & 255;
        } else if (typeof val === "boolean") {
          val = Number(val);
        }
        if (start < 0 || this.length < start || this.length < end) {
          throw new RangeError("Out of range index");
        }
        if (end <= start) {
          return this;
        }
        start = start >>> 0;
        end = end === void 0 ? this.length : end >>> 0;
        if (!val) val = 0;
        let i5;
        if (typeof val === "number") {
          for (i5 = start; i5 < end; ++i5) {
            this[i5] = val;
          }
        } else {
          const bytes = Buffer6.isBuffer(val) ? val : Buffer6.from(val, encoding);
          const len = bytes.length;
          if (len === 0) {
            throw new TypeError('The value "' + val + '" is invalid for argument "value"');
          }
          for (i5 = 0; i5 < end - start; ++i5) {
            this[i5 + start] = bytes[i5 % len];
          }
        }
        return this;
      };
      var errors = {};
      function E6(sym, getMessage, Base) {
        errors[sym] = class NodeError extends Base {
          constructor() {
            super();
            Object.defineProperty(this, "message", {
              value: getMessage.apply(this, arguments),
              writable: true,
              configurable: true
            });
            this.name = `${this.name} [${sym}]`;
            this.stack;
            delete this.name;
          }
          get code() {
            return sym;
          }
          set code(value) {
            Object.defineProperty(this, "code", {
              configurable: true,
              enumerable: true,
              value,
              writable: true
            });
          }
          toString() {
            return `${this.name} [${sym}]: ${this.message}`;
          }
        };
      }
      E6(
        "ERR_BUFFER_OUT_OF_BOUNDS",
        function(name2) {
          if (name2) {
            return `${name2} is outside of buffer bounds`;
          }
          return "Attempt to access memory outside buffer bounds";
        },
        RangeError
      );
      E6(
        "ERR_INVALID_ARG_TYPE",
        function(name2, actual) {
          return `The "${name2}" argument must be of type number. Received type ${typeof actual}`;
        },
        TypeError
      );
      E6(
        "ERR_OUT_OF_RANGE",
        function(str, range, input) {
          let msg = `The value of "${str}" is out of range.`;
          let received = input;
          if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
            received = addNumericalSeparator(String(input));
          } else if (typeof input === "bigint") {
            received = String(input);
            if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
              received = addNumericalSeparator(received);
            }
            received += "n";
          }
          msg += ` It must be ${range}. Received ${received}`;
          return msg;
        },
        RangeError
      );
      function addNumericalSeparator(val) {
        let res = "";
        let i5 = val.length;
        const start = val[0] === "-" ? 1 : 0;
        for (; i5 >= start + 4; i5 -= 3) {
          res = `_${val.slice(i5 - 3, i5)}${res}`;
        }
        return `${val.slice(0, i5)}${res}`;
      }
      function checkBounds(buf, offset2, byteLength2) {
        validateNumber(offset2, "offset");
        if (buf[offset2] === void 0 || buf[offset2 + byteLength2] === void 0) {
          boundsError(offset2, buf.length - (byteLength2 + 1));
        }
      }
      function checkIntBI(value, min, max, buf, offset2, byteLength2) {
        if (value > max || value < min) {
          const n6 = typeof min === "bigint" ? "n" : "";
          let range;
          if (byteLength2 > 3) {
            if (min === 0 || min === BigInt(0)) {
              range = `>= 0${n6} and < 2${n6} ** ${(byteLength2 + 1) * 8}${n6}`;
            } else {
              range = `>= -(2${n6} ** ${(byteLength2 + 1) * 8 - 1}${n6}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n6}`;
            }
          } else {
            range = `>= ${min}${n6} and <= ${max}${n6}`;
          }
          throw new errors.ERR_OUT_OF_RANGE("value", range, value);
        }
        checkBounds(buf, offset2, byteLength2);
      }
      function validateNumber(value, name2) {
        if (typeof value !== "number") {
          throw new errors.ERR_INVALID_ARG_TYPE(name2, "number", value);
        }
      }
      function boundsError(value, length2, type2) {
        if (Math.floor(value) !== value) {
          validateNumber(value, type2);
          throw new errors.ERR_OUT_OF_RANGE(type2 || "offset", "an integer", value);
        }
        if (length2 < 0) {
          throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
        }
        throw new errors.ERR_OUT_OF_RANGE(
          type2 || "offset",
          `>= ${type2 ? 1 : 0} and <= ${length2}`,
          value
        );
      }
      var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
      function base64clean(str) {
        str = str.split("=")[0];
        str = str.trim().replace(INVALID_BASE64_RE, "");
        if (str.length < 2) return "";
        while (str.length % 4 !== 0) {
          str = str + "=";
        }
        return str;
      }
      function utf8ToBytes4(string7, units) {
        units = units || Infinity;
        let codePoint;
        const length2 = string7.length;
        let leadSurrogate = null;
        const bytes = [];
        for (let i5 = 0; i5 < length2; ++i5) {
          codePoint = string7.charCodeAt(i5);
          if (codePoint > 55295 && codePoint < 57344) {
            if (!leadSurrogate) {
              if (codePoint > 56319) {
                if ((units -= 3) > -1) bytes.push(239, 191, 189);
                continue;
              } else if (i5 + 1 === length2) {
                if ((units -= 3) > -1) bytes.push(239, 191, 189);
                continue;
              }
              leadSurrogate = codePoint;
              continue;
            }
            if (codePoint < 56320) {
              if ((units -= 3) > -1) bytes.push(239, 191, 189);
              leadSurrogate = codePoint;
              continue;
            }
            codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
          } else if (leadSurrogate) {
            if ((units -= 3) > -1) bytes.push(239, 191, 189);
          }
          leadSurrogate = null;
          if (codePoint < 128) {
            if ((units -= 1) < 0) break;
            bytes.push(codePoint);
          } else if (codePoint < 2048) {
            if ((units -= 2) < 0) break;
            bytes.push(
              codePoint >> 6 | 192,
              codePoint & 63 | 128
            );
          } else if (codePoint < 65536) {
            if ((units -= 3) < 0) break;
            bytes.push(
              codePoint >> 12 | 224,
              codePoint >> 6 & 63 | 128,
              codePoint & 63 | 128
            );
          } else if (codePoint < 1114112) {
            if ((units -= 4) < 0) break;
            bytes.push(
              codePoint >> 18 | 240,
              codePoint >> 12 & 63 | 128,
              codePoint >> 6 & 63 | 128,
              codePoint & 63 | 128
            );
          } else {
            throw new Error("Invalid code point");
          }
        }
        return bytes;
      }
      function asciiToBytes(str) {
        const byteArray = [];
        for (let i5 = 0; i5 < str.length; ++i5) {
          byteArray.push(str.charCodeAt(i5) & 255);
        }
        return byteArray;
      }
      function utf16leToBytes(str, units) {
        let c7, hi2, lo4;
        const byteArray = [];
        for (let i5 = 0; i5 < str.length; ++i5) {
          if ((units -= 2) < 0) break;
          c7 = str.charCodeAt(i5);
          hi2 = c7 >> 8;
          lo4 = c7 % 256;
          byteArray.push(lo4);
          byteArray.push(hi2);
        }
        return byteArray;
      }
      function base64ToBytes2(str) {
        return base644.toByteArray(base64clean(str));
      }
      function blitBuffer(src2, dst, offset2, length2) {
        let i5;
        for (i5 = 0; i5 < length2; ++i5) {
          if (i5 + offset2 >= dst.length || i5 >= src2.length) break;
          dst[i5 + offset2] = src2[i5];
        }
        return i5;
      }
      function isInstance(obj, type2) {
        return obj instanceof type2 || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type2.name;
      }
      function numberIsNaN(obj) {
        return obj !== obj;
      }
      var hexSliceLookupTable = (function() {
        const alphabet3 = "0123456789abcdef";
        const table = new Array(256);
        for (let i5 = 0; i5 < 16; ++i5) {
          const i16 = i5 * 16;
          for (let j6 = 0; j6 < 16; ++j6) {
            table[i16 + j6] = alphabet3[i5] + alphabet3[j6];
          }
        }
        return table;
      })();
      function defineBigIntMethod(fn) {
        return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
      }
      function BufferBigIntNotDefined() {
        throw new Error("BigInt not supported");
      }
    }
  });

  // src/shared/node-compat-inject.ts
  var import_buffer, nodeProcess, Buffer2, global, process, globalWithNodeCompat, processTarget;
  var init_node_compat_inject = __esm({
    "src/shared/node-compat-inject.ts"() {
      "use strict";
      import_buffer = __toESM(require_buffer(), 1);
      nodeProcess = {
        browser: true,
        env: {},
        version: ""
      };
      Buffer2 = import_buffer.Buffer;
      global = globalThis;
      process = nodeProcess;
      globalWithNodeCompat = globalThis;
      processTarget = globalThis;
      if (!globalWithNodeCompat.Buffer) {
        globalWithNodeCompat.Buffer = import_buffer.Buffer;
      }
      if (!globalWithNodeCompat.global) {
        globalWithNodeCompat.global = globalThis;
      }
      if (!processTarget.process) {
        processTarget.process = nodeProcess;
      }
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/version.js
  var version;
  var init_version = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/version.js"() {
      "use strict";
      init_node_compat_inject();
      version = "1.2.3";
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/errors.js
  var BaseError;
  var init_errors = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/errors.js"() {
      "use strict";
      init_node_compat_inject();
      init_version();
      BaseError = class _BaseError extends Error {
        constructor(shortMessage, args = {}) {
          const details = args.cause instanceof _BaseError ? args.cause.details : args.cause?.message ? args.cause.message : args.details;
          const docsPath8 = args.cause instanceof _BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;
          const message = [
            shortMessage || "An error occurred.",
            "",
            ...args.metaMessages ? [...args.metaMessages, ""] : [],
            ...docsPath8 ? [`Docs: https://abitype.dev${docsPath8}`] : [],
            ...details ? [`Details: ${details}`] : [],
            `Version: abitype@${version}`
          ].join("\n");
          super(message);
          Object.defineProperty(this, "details", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "docsPath", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "metaMessages", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "shortMessage", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "AbiTypeError"
          });
          if (args.cause)
            this.cause = args.cause;
          this.details = details;
          this.docsPath = docsPath8;
          this.metaMessages = args.metaMessages;
          this.shortMessage = shortMessage;
        }
      };
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/regex.js
  function execTyped(regex, string7) {
    const match = regex.exec(string7);
    return match?.groups;
  }
  var bytesRegex, integerRegex, isTupleRegex;
  var init_regex = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/regex.js"() {
      "use strict";
      init_node_compat_inject();
      bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
      integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
      isTupleRegex = /^\(.+?\).*?$/;
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js
  function formatAbiParameter(abiParameter) {
    let type2 = abiParameter.type;
    if (tupleRegex.test(abiParameter.type) && "components" in abiParameter) {
      type2 = "(";
      const length2 = abiParameter.components.length;
      for (let i5 = 0; i5 < length2; i5++) {
        const component = abiParameter.components[i5];
        type2 += formatAbiParameter(component);
        if (i5 < length2 - 1)
          type2 += ", ";
      }
      const result = execTyped(tupleRegex, abiParameter.type);
      type2 += `)${result?.array || ""}`;
      return formatAbiParameter({
        ...abiParameter,
        type: type2
      });
    }
    if ("indexed" in abiParameter && abiParameter.indexed)
      type2 = `${type2} indexed`;
    if (abiParameter.name)
      return `${type2} ${abiParameter.name}`;
    return type2;
  }
  var tupleRegex;
  var init_formatAbiParameter = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js"() {
      "use strict";
      init_node_compat_inject();
      init_regex();
      tupleRegex = /^tuple(?<array>(\[(\d*)\])*)$/;
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js
  function formatAbiParameters(abiParameters) {
    let params = "";
    const length2 = abiParameters.length;
    for (let i5 = 0; i5 < length2; i5++) {
      const abiParameter = abiParameters[i5];
      params += formatAbiParameter(abiParameter);
      if (i5 !== length2 - 1)
        params += ", ";
    }
    return params;
  }
  var init_formatAbiParameters = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js"() {
      "use strict";
      init_node_compat_inject();
      init_formatAbiParameter();
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js
  function formatAbiItem(abiItem) {
    if (abiItem.type === "function")
      return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== "nonpayable" ? ` ${abiItem.stateMutability}` : ""}${abiItem.outputs?.length ? ` returns (${formatAbiParameters(abiItem.outputs)})` : ""}`;
    if (abiItem.type === "event")
      return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;
    if (abiItem.type === "error")
      return `error ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;
    if (abiItem.type === "constructor")
      return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === "payable" ? " payable" : ""}`;
    if (abiItem.type === "fallback")
      return `fallback() external${abiItem.stateMutability === "payable" ? " payable" : ""}`;
    return "receive() external payable";
  }
  var init_formatAbiItem = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js"() {
      "use strict";
      init_node_compat_inject();
      init_formatAbiParameters();
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js
  function isErrorSignature(signature2) {
    return errorSignatureRegex.test(signature2);
  }
  function execErrorSignature(signature2) {
    return execTyped(errorSignatureRegex, signature2);
  }
  function isEventSignature(signature2) {
    return eventSignatureRegex.test(signature2);
  }
  function execEventSignature(signature2) {
    return execTyped(eventSignatureRegex, signature2);
  }
  function isFunctionSignature(signature2) {
    return functionSignatureRegex.test(signature2);
  }
  function execFunctionSignature(signature2) {
    return execTyped(functionSignatureRegex, signature2);
  }
  function isStructSignature(signature2) {
    return structSignatureRegex.test(signature2);
  }
  function execStructSignature(signature2) {
    return execTyped(structSignatureRegex, signature2);
  }
  function isConstructorSignature(signature2) {
    return constructorSignatureRegex.test(signature2);
  }
  function execConstructorSignature(signature2) {
    return execTyped(constructorSignatureRegex, signature2);
  }
  function isFallbackSignature(signature2) {
    return fallbackSignatureRegex.test(signature2);
  }
  function execFallbackSignature(signature2) {
    return execTyped(fallbackSignatureRegex, signature2);
  }
  function isReceiveSignature(signature2) {
    return receiveSignatureRegex.test(signature2);
  }
  var errorSignatureRegex, eventSignatureRegex, functionSignatureRegex, structSignatureRegex, constructorSignatureRegex, fallbackSignatureRegex, receiveSignatureRegex, modifiers, eventModifiers, functionModifiers;
  var init_signatures = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js"() {
      "use strict";
      init_node_compat_inject();
      init_regex();
      errorSignatureRegex = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
      eventSignatureRegex = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
      functionSignatureRegex = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;
      structSignatureRegex = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
      constructorSignatureRegex = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
      fallbackSignatureRegex = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;
      receiveSignatureRegex = /^receive\(\) external payable$/;
      modifiers = /* @__PURE__ */ new Set([
        "memory",
        "indexed",
        "storage",
        "calldata"
      ]);
      eventModifiers = /* @__PURE__ */ new Set(["indexed"]);
      functionModifiers = /* @__PURE__ */ new Set([
        "calldata",
        "memory",
        "storage"
      ]);
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js
  var InvalidAbiItemError, UnknownTypeError, UnknownSolidityTypeError;
  var init_abiItem = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js"() {
      "use strict";
      init_node_compat_inject();
      init_errors();
      InvalidAbiItemError = class extends BaseError {
        constructor({ signature: signature2 }) {
          super("Failed to parse ABI item.", {
            details: `parseAbiItem(${JSON.stringify(signature2, null, 2)})`,
            docsPath: "/api/human#parseabiitem-1"
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "InvalidAbiItemError"
          });
        }
      };
      UnknownTypeError = class extends BaseError {
        constructor({ type: type2 }) {
          super("Unknown type.", {
            metaMessages: [
              `Type "${type2}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`
            ]
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "UnknownTypeError"
          });
        }
      };
      UnknownSolidityTypeError = class extends BaseError {
        constructor({ type: type2 }) {
          super("Unknown type.", {
            metaMessages: [`Type "${type2}" is not a valid ABI type.`]
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "UnknownSolidityTypeError"
          });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js
  var InvalidAbiParametersError, InvalidParameterError, SolidityProtectedKeywordError, InvalidModifierError, InvalidFunctionModifierError, InvalidAbiTypeParameterError;
  var init_abiParameter = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js"() {
      "use strict";
      init_node_compat_inject();
      init_errors();
      InvalidAbiParametersError = class extends BaseError {
        constructor({ params }) {
          super("Failed to parse ABI parameters.", {
            details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,
            docsPath: "/api/human#parseabiparameters-1"
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "InvalidAbiParametersError"
          });
        }
      };
      InvalidParameterError = class extends BaseError {
        constructor({ param }) {
          super("Invalid ABI parameter.", {
            details: param
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "InvalidParameterError"
          });
        }
      };
      SolidityProtectedKeywordError = class extends BaseError {
        constructor({ param, name: name2 }) {
          super("Invalid ABI parameter.", {
            details: param,
            metaMessages: [
              `"${name2}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`
            ]
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "SolidityProtectedKeywordError"
          });
        }
      };
      InvalidModifierError = class extends BaseError {
        constructor({ param, type: type2, modifier }) {
          super("Invalid ABI parameter.", {
            details: param,
            metaMessages: [
              `Modifier "${modifier}" not allowed${type2 ? ` in "${type2}" type` : ""}.`
            ]
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "InvalidModifierError"
          });
        }
      };
      InvalidFunctionModifierError = class extends BaseError {
        constructor({ param, type: type2, modifier }) {
          super("Invalid ABI parameter.", {
            details: param,
            metaMessages: [
              `Modifier "${modifier}" not allowed${type2 ? ` in "${type2}" type` : ""}.`,
              `Data location can only be specified for array, struct, or mapping types, but "${modifier}" was given.`
            ]
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "InvalidFunctionModifierError"
          });
        }
      };
      InvalidAbiTypeParameterError = class extends BaseError {
        constructor({ abiParameter }) {
          super("Invalid ABI parameter.", {
            details: JSON.stringify(abiParameter, null, 2),
            metaMessages: ["ABI parameter type is invalid."]
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "InvalidAbiTypeParameterError"
          });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/errors/signature.js
  var InvalidSignatureError, UnknownSignatureError, InvalidStructSignatureError;
  var init_signature = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/errors/signature.js"() {
      "use strict";
      init_node_compat_inject();
      init_errors();
      InvalidSignatureError = class extends BaseError {
        constructor({ signature: signature2, type: type2 }) {
          super(`Invalid ${type2} signature.`, {
            details: signature2
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "InvalidSignatureError"
          });
        }
      };
      UnknownSignatureError = class extends BaseError {
        constructor({ signature: signature2 }) {
          super("Unknown signature.", {
            details: signature2
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "UnknownSignatureError"
          });
        }
      };
      InvalidStructSignatureError = class extends BaseError {
        constructor({ signature: signature2 }) {
          super("Invalid struct signature.", {
            details: signature2,
            metaMessages: ["No properties exist."]
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "InvalidStructSignatureError"
          });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/errors/struct.js
  var CircularReferenceError;
  var init_struct = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/errors/struct.js"() {
      "use strict";
      init_node_compat_inject();
      init_errors();
      CircularReferenceError = class extends BaseError {
        constructor({ type: type2 }) {
          super("Circular reference detected.", {
            metaMessages: [`Struct "${type2}" is a circular reference.`]
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "CircularReferenceError"
          });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js
  var InvalidParenthesisError;
  var init_splitParameters = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js"() {
      "use strict";
      init_node_compat_inject();
      init_errors();
      InvalidParenthesisError = class extends BaseError {
        constructor({ current, depth }) {
          super("Unbalanced parentheses.", {
            metaMessages: [
              `"${current.trim()}" has too many ${depth > 0 ? "opening" : "closing"} parentheses.`
            ],
            details: `Depth "${depth}"`
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "InvalidParenthesisError"
          });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/runtime/cache.js
  function getParameterCacheKey(param, type2, structs) {
    let structKey = "";
    if (structs)
      for (const struct4 of Object.entries(structs)) {
        if (!struct4)
          continue;
        let propertyKey = "";
        for (const property of struct4[1]) {
          propertyKey += `[${property.type}${property.name ? `:${property.name}` : ""}]`;
        }
        structKey += `(${struct4[0]}{${propertyKey}})`;
      }
    if (type2)
      return `${type2}:${param}${structKey}`;
    return `${param}${structKey}`;
  }
  var parameterCache;
  var init_cache = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/runtime/cache.js"() {
      "use strict";
      init_node_compat_inject();
      parameterCache = /* @__PURE__ */ new Map([
        // Unnamed
        ["address", { type: "address" }],
        ["bool", { type: "bool" }],
        ["bytes", { type: "bytes" }],
        ["bytes32", { type: "bytes32" }],
        ["int", { type: "int256" }],
        ["int256", { type: "int256" }],
        ["string", { type: "string" }],
        ["uint", { type: "uint256" }],
        ["uint8", { type: "uint8" }],
        ["uint16", { type: "uint16" }],
        ["uint24", { type: "uint24" }],
        ["uint32", { type: "uint32" }],
        ["uint64", { type: "uint64" }],
        ["uint96", { type: "uint96" }],
        ["uint112", { type: "uint112" }],
        ["uint160", { type: "uint160" }],
        ["uint192", { type: "uint192" }],
        ["uint256", { type: "uint256" }],
        // Named
        ["address owner", { type: "address", name: "owner" }],
        ["address to", { type: "address", name: "to" }],
        ["bool approved", { type: "bool", name: "approved" }],
        ["bytes _data", { type: "bytes", name: "_data" }],
        ["bytes data", { type: "bytes", name: "data" }],
        ["bytes signature", { type: "bytes", name: "signature" }],
        ["bytes32 hash", { type: "bytes32", name: "hash" }],
        ["bytes32 r", { type: "bytes32", name: "r" }],
        ["bytes32 root", { type: "bytes32", name: "root" }],
        ["bytes32 s", { type: "bytes32", name: "s" }],
        ["string name", { type: "string", name: "name" }],
        ["string symbol", { type: "string", name: "symbol" }],
        ["string tokenURI", { type: "string", name: "tokenURI" }],
        ["uint tokenId", { type: "uint256", name: "tokenId" }],
        ["uint8 v", { type: "uint8", name: "v" }],
        ["uint256 balance", { type: "uint256", name: "balance" }],
        ["uint256 tokenId", { type: "uint256", name: "tokenId" }],
        ["uint256 value", { type: "uint256", name: "value" }],
        // Indexed
        [
          "event:address indexed from",
          { type: "address", name: "from", indexed: true }
        ],
        ["event:address indexed to", { type: "address", name: "to", indexed: true }],
        [
          "event:uint indexed tokenId",
          { type: "uint256", name: "tokenId", indexed: true }
        ],
        [
          "event:uint256 indexed tokenId",
          { type: "uint256", name: "tokenId", indexed: true }
        ]
      ]);
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/runtime/utils.js
  function parseSignature(signature2, structs = {}) {
    if (isFunctionSignature(signature2))
      return parseFunctionSignature(signature2, structs);
    if (isEventSignature(signature2))
      return parseEventSignature(signature2, structs);
    if (isErrorSignature(signature2))
      return parseErrorSignature(signature2, structs);
    if (isConstructorSignature(signature2))
      return parseConstructorSignature(signature2, structs);
    if (isFallbackSignature(signature2))
      return parseFallbackSignature(signature2);
    if (isReceiveSignature(signature2))
      return {
        type: "receive",
        stateMutability: "payable"
      };
    throw new UnknownSignatureError({ signature: signature2 });
  }
  function parseFunctionSignature(signature2, structs = {}) {
    const match = execFunctionSignature(signature2);
    if (!match)
      throw new InvalidSignatureError({ signature: signature2, type: "function" });
    const inputParams = splitParameters(match.parameters);
    const inputs = [];
    const inputLength = inputParams.length;
    for (let i5 = 0; i5 < inputLength; i5++) {
      inputs.push(parseAbiParameter(inputParams[i5], {
        modifiers: functionModifiers,
        structs,
        type: "function"
      }));
    }
    const outputs = [];
    if (match.returns) {
      const outputParams = splitParameters(match.returns);
      const outputLength = outputParams.length;
      for (let i5 = 0; i5 < outputLength; i5++) {
        outputs.push(parseAbiParameter(outputParams[i5], {
          modifiers: functionModifiers,
          structs,
          type: "function"
        }));
      }
    }
    return {
      name: match.name,
      type: "function",
      stateMutability: match.stateMutability ?? "nonpayable",
      inputs,
      outputs
    };
  }
  function parseEventSignature(signature2, structs = {}) {
    const match = execEventSignature(signature2);
    if (!match)
      throw new InvalidSignatureError({ signature: signature2, type: "event" });
    const params = splitParameters(match.parameters);
    const abiParameters = [];
    const length2 = params.length;
    for (let i5 = 0; i5 < length2; i5++)
      abiParameters.push(parseAbiParameter(params[i5], {
        modifiers: eventModifiers,
        structs,
        type: "event"
      }));
    return { name: match.name, type: "event", inputs: abiParameters };
  }
  function parseErrorSignature(signature2, structs = {}) {
    const match = execErrorSignature(signature2);
    if (!match)
      throw new InvalidSignatureError({ signature: signature2, type: "error" });
    const params = splitParameters(match.parameters);
    const abiParameters = [];
    const length2 = params.length;
    for (let i5 = 0; i5 < length2; i5++)
      abiParameters.push(parseAbiParameter(params[i5], { structs, type: "error" }));
    return { name: match.name, type: "error", inputs: abiParameters };
  }
  function parseConstructorSignature(signature2, structs = {}) {
    const match = execConstructorSignature(signature2);
    if (!match)
      throw new InvalidSignatureError({ signature: signature2, type: "constructor" });
    const params = splitParameters(match.parameters);
    const abiParameters = [];
    const length2 = params.length;
    for (let i5 = 0; i5 < length2; i5++)
      abiParameters.push(parseAbiParameter(params[i5], { structs, type: "constructor" }));
    return {
      type: "constructor",
      stateMutability: match.stateMutability ?? "nonpayable",
      inputs: abiParameters
    };
  }
  function parseFallbackSignature(signature2) {
    const match = execFallbackSignature(signature2);
    if (!match)
      throw new InvalidSignatureError({ signature: signature2, type: "fallback" });
    return {
      type: "fallback",
      stateMutability: match.stateMutability ?? "nonpayable"
    };
  }
  function parseAbiParameter(param, options) {
    const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);
    if (parameterCache.has(parameterCacheKey))
      return parameterCache.get(parameterCacheKey);
    const isTuple = isTupleRegex.test(param);
    const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);
    if (!match)
      throw new InvalidParameterError({ param });
    if (match.name && isSolidityKeyword(match.name))
      throw new SolidityProtectedKeywordError({ param, name: match.name });
    const name2 = match.name ? { name: match.name } : {};
    const indexed = match.modifier === "indexed" ? { indexed: true } : {};
    const structs = options?.structs ?? {};
    let type2;
    let components = {};
    if (isTuple) {
      type2 = "tuple";
      const params = splitParameters(match.type);
      const components_ = [];
      const length2 = params.length;
      for (let i5 = 0; i5 < length2; i5++) {
        components_.push(parseAbiParameter(params[i5], { structs }));
      }
      components = { components: components_ };
    } else if (match.type in structs) {
      type2 = "tuple";
      components = { components: structs[match.type] };
    } else if (dynamicIntegerRegex.test(match.type)) {
      type2 = `${match.type}256`;
    } else if (match.type === "address payable") {
      type2 = "address";
    } else {
      type2 = match.type;
      if (!(options?.type === "struct") && !isSolidityType(type2))
        throw new UnknownSolidityTypeError({ type: type2 });
    }
    if (match.modifier) {
      if (!options?.modifiers?.has?.(match.modifier))
        throw new InvalidModifierError({
          param,
          type: options?.type,
          modifier: match.modifier
        });
      if (functionModifiers.has(match.modifier) && !isValidDataLocation(type2, !!match.array))
        throw new InvalidFunctionModifierError({
          param,
          type: options?.type,
          modifier: match.modifier
        });
    }
    const abiParameter = {
      type: `${type2}${match.array ?? ""}`,
      ...name2,
      ...indexed,
      ...components
    };
    parameterCache.set(parameterCacheKey, abiParameter);
    return abiParameter;
  }
  function splitParameters(params, result = [], current = "", depth = 0) {
    const length2 = params.trim().length;
    for (let i5 = 0; i5 < length2; i5++) {
      const char = params[i5];
      const tail = params.slice(i5 + 1);
      switch (char) {
        case ",":
          return depth === 0 ? splitParameters(tail, [...result, current.trim()]) : splitParameters(tail, result, `${current}${char}`, depth);
        case "(":
          return splitParameters(tail, result, `${current}${char}`, depth + 1);
        case ")":
          return splitParameters(tail, result, `${current}${char}`, depth - 1);
        default:
          return splitParameters(tail, result, `${current}${char}`, depth);
      }
    }
    if (current === "")
      return result;
    if (depth !== 0)
      throw new InvalidParenthesisError({ current, depth });
    result.push(current.trim());
    return result;
  }
  function isSolidityType(type2) {
    return type2 === "address" || type2 === "bool" || type2 === "function" || type2 === "string" || bytesRegex.test(type2) || integerRegex.test(type2);
  }
  function isSolidityKeyword(name2) {
    return name2 === "address" || name2 === "bool" || name2 === "function" || name2 === "string" || name2 === "tuple" || bytesRegex.test(name2) || integerRegex.test(name2) || protectedKeywordsRegex.test(name2);
  }
  function isValidDataLocation(type2, isArray) {
    return isArray || type2 === "bytes" || type2 === "string" || type2 === "tuple";
  }
  var abiParameterWithoutTupleRegex, abiParameterWithTupleRegex, dynamicIntegerRegex, protectedKeywordsRegex;
  var init_utils = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/runtime/utils.js"() {
      "use strict";
      init_node_compat_inject();
      init_regex();
      init_abiItem();
      init_abiParameter();
      init_signature();
      init_splitParameters();
      init_cache();
      init_signatures();
      abiParameterWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;
      abiParameterWithTupleRegex = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;
      dynamicIntegerRegex = /^u?int$/;
      protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/runtime/structs.js
  function parseStructs(signatures) {
    const shallowStructs = {};
    const signaturesLength = signatures.length;
    for (let i5 = 0; i5 < signaturesLength; i5++) {
      const signature2 = signatures[i5];
      if (!isStructSignature(signature2))
        continue;
      const match = execStructSignature(signature2);
      if (!match)
        throw new InvalidSignatureError({ signature: signature2, type: "struct" });
      const properties = match.properties.split(";");
      const components = [];
      const propertiesLength = properties.length;
      for (let k7 = 0; k7 < propertiesLength; k7++) {
        const property = properties[k7];
        const trimmed = property.trim();
        if (!trimmed)
          continue;
        const abiParameter = parseAbiParameter(trimmed, {
          type: "struct"
        });
        components.push(abiParameter);
      }
      if (!components.length)
        throw new InvalidStructSignatureError({ signature: signature2 });
      shallowStructs[match.name] = components;
    }
    const resolvedStructs = {};
    const entries = Object.entries(shallowStructs);
    const entriesLength = entries.length;
    for (let i5 = 0; i5 < entriesLength; i5++) {
      const [name2, parameters] = entries[i5];
      resolvedStructs[name2] = resolveStructs(parameters, shallowStructs);
    }
    return resolvedStructs;
  }
  function resolveStructs(abiParameters = [], structs = {}, ancestors = /* @__PURE__ */ new Set()) {
    const components = [];
    const length2 = abiParameters.length;
    for (let i5 = 0; i5 < length2; i5++) {
      const abiParameter = abiParameters[i5];
      const isTuple = isTupleRegex.test(abiParameter.type);
      if (isTuple)
        components.push(abiParameter);
      else {
        const match = execTyped(typeWithoutTupleRegex, abiParameter.type);
        if (!match?.type)
          throw new InvalidAbiTypeParameterError({ abiParameter });
        const { array: array3, type: type2 } = match;
        if (type2 in structs) {
          if (ancestors.has(type2))
            throw new CircularReferenceError({ type: type2 });
          components.push({
            ...abiParameter,
            type: `tuple${array3 ?? ""}`,
            components: resolveStructs(structs[type2], structs, /* @__PURE__ */ new Set([...ancestors, type2]))
          });
        } else {
          if (isSolidityType(type2))
            components.push(abiParameter);
          else
            throw new UnknownTypeError({ type: type2 });
        }
      }
    }
    return components;
  }
  var typeWithoutTupleRegex;
  var init_structs = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/runtime/structs.js"() {
      "use strict";
      init_node_compat_inject();
      init_regex();
      init_abiItem();
      init_abiParameter();
      init_signature();
      init_struct();
      init_signatures();
      init_utils();
      typeWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/parseAbi.js
  function parseAbi(signatures) {
    const structs = parseStructs(signatures);
    const abi2 = [];
    const length2 = signatures.length;
    for (let i5 = 0; i5 < length2; i5++) {
      const signature2 = signatures[i5];
      if (isStructSignature(signature2))
        continue;
      abi2.push(parseSignature(signature2, structs));
    }
    return abi2;
  }
  var init_parseAbi = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/parseAbi.js"() {
      "use strict";
      init_node_compat_inject();
      init_signatures();
      init_structs();
      init_utils();
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js
  function parseAbiItem(signature2) {
    let abiItem;
    if (typeof signature2 === "string")
      abiItem = parseSignature(signature2);
    else {
      const structs = parseStructs(signature2);
      const length2 = signature2.length;
      for (let i5 = 0; i5 < length2; i5++) {
        const signature_ = signature2[i5];
        if (isStructSignature(signature_))
          continue;
        abiItem = parseSignature(signature_, structs);
        break;
      }
    }
    if (!abiItem)
      throw new InvalidAbiItemError({ signature: signature2 });
    return abiItem;
  }
  var init_parseAbiItem = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js"() {
      "use strict";
      init_node_compat_inject();
      init_abiItem();
      init_signatures();
      init_structs();
      init_utils();
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js
  function parseAbiParameters(params) {
    const abiParameters = [];
    if (typeof params === "string") {
      const parameters = splitParameters(params);
      const length2 = parameters.length;
      for (let i5 = 0; i5 < length2; i5++) {
        abiParameters.push(parseAbiParameter(parameters[i5], { modifiers }));
      }
    } else {
      const structs = parseStructs(params);
      const length2 = params.length;
      for (let i5 = 0; i5 < length2; i5++) {
        const signature2 = params[i5];
        if (isStructSignature(signature2))
          continue;
        const parameters = splitParameters(signature2);
        const length3 = parameters.length;
        for (let k7 = 0; k7 < length3; k7++) {
          abiParameters.push(parseAbiParameter(parameters[k7], { modifiers, structs }));
        }
      }
    }
    if (abiParameters.length === 0)
      throw new InvalidAbiParametersError({ params });
    return abiParameters;
  }
  var init_parseAbiParameters = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js"() {
      "use strict";
      init_node_compat_inject();
      init_abiParameter();
      init_signatures();
      init_structs();
      init_utils();
      init_utils();
    }
  });

  // ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/exports/index.js
  var init_exports = __esm({
    "../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@4.4.3/node_modules/abitype/dist/esm/exports/index.js"() {
      "use strict";
      init_node_compat_inject();
      init_formatAbiItem();
      init_formatAbiParameters();
      init_parseAbi();
      init_parseAbiItem();
      init_parseAbiParameters();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/formatAbiItem.js
  function formatAbiItem2(abiItem, { includeName = false } = {}) {
    if (abiItem.type !== "function" && abiItem.type !== "event" && abiItem.type !== "error")
      throw new InvalidDefinitionTypeError(abiItem.type);
    return `${abiItem.name}(${formatAbiParams(abiItem.inputs, { includeName })})`;
  }
  function formatAbiParams(params, { includeName = false } = {}) {
    if (!params)
      return "";
    return params.map((param) => formatAbiParam(param, { includeName })).join(includeName ? ", " : ",");
  }
  function formatAbiParam(param, { includeName }) {
    if (param.type.startsWith("tuple")) {
      return `(${formatAbiParams(param.components, { includeName })})${param.type.slice("tuple".length)}`;
    }
    return param.type + (includeName && param.name ? ` ${param.name}` : "");
  }
  var init_formatAbiItem2 = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/formatAbiItem.js"() {
      "use strict";
      init_node_compat_inject();
      init_abi();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/data/isHex.js
  function isHex(value, { strict = true } = {}) {
    if (!value)
      return false;
    if (typeof value !== "string")
      return false;
    return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith("0x");
  }
  var init_isHex = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/data/isHex.js"() {
      "use strict";
      init_node_compat_inject();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/data/size.js
  function size(value) {
    if (isHex(value, { strict: false }))
      return Math.ceil((value.length - 2) / 2);
    return value.length;
  }
  var init_size = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/data/size.js"() {
      "use strict";
      init_node_compat_inject();
      init_isHex();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/version.js
  var version2;
  var init_version2 = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/version.js"() {
      "use strict";
      init_node_compat_inject();
      version2 = "2.49.0";
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/base.js
  function walk(err2, fn) {
    if (fn?.(err2))
      return err2;
    if (err2 && typeof err2 === "object" && "cause" in err2 && err2.cause !== void 0)
      return walk(err2.cause, fn);
    return fn ? null : err2;
  }
  var errorConfig, BaseError2;
  var init_base = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/base.js"() {
      "use strict";
      init_node_compat_inject();
      init_version2();
      errorConfig = {
        getDocsUrl: ({ docsBaseUrl, docsPath: docsPath8 = "", docsSlug }) => docsPath8 ? `${docsBaseUrl ?? "https://viem.sh"}${docsPath8}${docsSlug ? `#${docsSlug}` : ""}` : void 0,
        version: `viem@${version2}`
      };
      BaseError2 = class _BaseError extends Error {
        constructor(shortMessage, args = {}) {
          const details = (() => {
            if (args.cause instanceof _BaseError)
              return args.cause.details;
            if (args.cause?.message)
              return args.cause.message;
            return args.details;
          })();
          const docsPath8 = (() => {
            if (args.cause instanceof _BaseError)
              return args.cause.docsPath || args.docsPath;
            return args.docsPath;
          })();
          const docsUrl = errorConfig.getDocsUrl?.({ ...args, docsPath: docsPath8 });
          const message = [
            shortMessage || "An error occurred.",
            "",
            ...args.metaMessages ? [...args.metaMessages, ""] : [],
            ...docsUrl ? [`Docs: ${docsUrl}`] : [],
            ...details ? [`Details: ${details}`] : [],
            ...errorConfig.version ? [`Version: ${errorConfig.version}`] : []
          ].join("\n");
          super(message, args.cause ? { cause: args.cause } : void 0);
          Object.defineProperty(this, "details", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "docsPath", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "metaMessages", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "shortMessage", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "version", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "BaseError"
          });
          this.details = details;
          this.docsPath = docsPath8;
          this.metaMessages = args.metaMessages;
          this.name = args.name ?? this.name;
          this.shortMessage = shortMessage;
          this.version = version2;
        }
        walk(fn) {
          return walk(this, fn);
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/abi.js
  var AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeTooSmallError, AbiDecodingZeroDataError, AbiEncodingArrayLengthMismatchError, AbiEncodingBytesSizeMismatchError, AbiEncodingLengthMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventSignatureEmptyTopicsError, AbiEventSignatureNotFoundError, AbiEventNotFoundError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, AbiItemAmbiguityError, BytesSizeMismatchError, DecodeLogDataMismatch, DecodeLogTopicsMismatch, InvalidAbiEncodingTypeError, InvalidAbiDecodingTypeError, InvalidArrayError, InvalidDefinitionTypeError;
  var init_abi = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/abi.js"() {
      "use strict";
      init_node_compat_inject();
      init_formatAbiItem2();
      init_size();
      init_base();
      AbiConstructorNotFoundError = class extends BaseError2 {
        constructor({ docsPath: docsPath8 }) {
          super([
            "A constructor was not found on the ABI.",
            "Make sure you are using the correct ABI and that the constructor exists on it."
          ].join("\n"), {
            docsPath: docsPath8,
            name: "AbiConstructorNotFoundError"
          });
        }
      };
      AbiConstructorParamsNotFoundError = class extends BaseError2 {
        constructor({ docsPath: docsPath8 }) {
          super([
            "Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.",
            "Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."
          ].join("\n"), {
            docsPath: docsPath8,
            name: "AbiConstructorParamsNotFoundError"
          });
        }
      };
      AbiDecodingDataSizeTooSmallError = class extends BaseError2 {
        constructor({ data, params, size: size5 }) {
          super([`Data size of ${size5} bytes is too small for given parameters.`].join("\n"), {
            metaMessages: [
              `Params: (${formatAbiParams(params, { includeName: true })})`,
              `Data:   ${data} (${size5} bytes)`
            ],
            name: "AbiDecodingDataSizeTooSmallError"
          });
          Object.defineProperty(this, "data", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "params", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "size", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.data = data;
          this.params = params;
          this.size = size5;
        }
      };
      AbiDecodingZeroDataError = class extends BaseError2 {
        constructor({ cause } = {}) {
          super('Cannot decode zero data ("0x") with ABI parameters.', {
            name: "AbiDecodingZeroDataError",
            cause
          });
        }
      };
      AbiEncodingArrayLengthMismatchError = class extends BaseError2 {
        constructor({ expectedLength, givenLength, type: type2 }) {
          super([
            `ABI encoding array length mismatch for type ${type2}.`,
            `Expected length: ${expectedLength}`,
            `Given length: ${givenLength}`
          ].join("\n"), { name: "AbiEncodingArrayLengthMismatchError" });
        }
      };
      AbiEncodingBytesSizeMismatchError = class extends BaseError2 {
        constructor({ expectedSize, value }) {
          super(`Size of bytes "${value}" (bytes${size(value)}) does not match expected size (bytes${expectedSize}).`, { name: "AbiEncodingBytesSizeMismatchError" });
        }
      };
      AbiEncodingLengthMismatchError = class extends BaseError2 {
        constructor({ expectedLength, givenLength }) {
          super([
            "ABI encoding params/values length mismatch.",
            `Expected length (params): ${expectedLength}`,
            `Given length (values): ${givenLength}`
          ].join("\n"), { name: "AbiEncodingLengthMismatchError" });
        }
      };
      AbiErrorInputsNotFoundError = class extends BaseError2 {
        constructor(errorName, { docsPath: docsPath8 }) {
          super([
            `Arguments (\`args\`) were provided to "${errorName}", but "${errorName}" on the ABI does not contain any parameters (\`inputs\`).`,
            "Cannot encode error result without knowing what the parameter types are.",
            "Make sure you are using the correct ABI and that the inputs exist on it."
          ].join("\n"), {
            docsPath: docsPath8,
            name: "AbiErrorInputsNotFoundError"
          });
        }
      };
      AbiErrorNotFoundError = class extends BaseError2 {
        constructor(errorName, { docsPath: docsPath8 } = {}) {
          super([
            `Error ${errorName ? `"${errorName}" ` : ""}not found on ABI.`,
            "Make sure you are using the correct ABI and that the error exists on it."
          ].join("\n"), {
            docsPath: docsPath8,
            name: "AbiErrorNotFoundError"
          });
        }
      };
      AbiErrorSignatureNotFoundError = class extends BaseError2 {
        constructor(signature2, { docsPath: docsPath8, cause }) {
          super([
            `Encoded error signature "${signature2}" not found on ABI.`,
            "Make sure you are using the correct ABI and that the error exists on it.",
            `You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${signature2}.`
          ].join("\n"), {
            docsPath: docsPath8,
            name: "AbiErrorSignatureNotFoundError",
            cause
          });
          Object.defineProperty(this, "signature", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.signature = signature2;
        }
      };
      AbiEventSignatureEmptyTopicsError = class extends BaseError2 {
        constructor({ docsPath: docsPath8 }) {
          super("Cannot extract event signature from empty topics.", {
            docsPath: docsPath8,
            name: "AbiEventSignatureEmptyTopicsError"
          });
        }
      };
      AbiEventSignatureNotFoundError = class extends BaseError2 {
        constructor(signature2, { docsPath: docsPath8 }) {
          super([
            `Encoded event signature "${signature2}" not found on ABI.`,
            "Make sure you are using the correct ABI and that the event exists on it.",
            `You can look up the signature here: https://4byte.sourcify.dev/?q=${signature2}.`
          ].join("\n"), {
            docsPath: docsPath8,
            name: "AbiEventSignatureNotFoundError"
          });
        }
      };
      AbiEventNotFoundError = class extends BaseError2 {
        constructor(eventName, { docsPath: docsPath8 } = {}) {
          super([
            `Event ${eventName ? `"${eventName}" ` : ""}not found on ABI.`,
            "Make sure you are using the correct ABI and that the event exists on it."
          ].join("\n"), {
            docsPath: docsPath8,
            name: "AbiEventNotFoundError"
          });
        }
      };
      AbiFunctionNotFoundError = class extends BaseError2 {
        constructor(functionName, { docsPath: docsPath8 } = {}) {
          super([
            `Function ${functionName ? `"${functionName}" ` : ""}not found on ABI.`,
            "Make sure you are using the correct ABI and that the function exists on it."
          ].join("\n"), {
            docsPath: docsPath8,
            name: "AbiFunctionNotFoundError"
          });
        }
      };
      AbiFunctionOutputsNotFoundError = class extends BaseError2 {
        constructor(functionName, { docsPath: docsPath8 }) {
          super([
            `Function "${functionName}" does not contain any \`outputs\` on ABI.`,
            "Cannot decode function result without knowing what the parameter types are.",
            "Make sure you are using the correct ABI and that the function exists on it."
          ].join("\n"), {
            docsPath: docsPath8,
            name: "AbiFunctionOutputsNotFoundError"
          });
        }
      };
      AbiFunctionSignatureNotFoundError = class extends BaseError2 {
        constructor(signature2, { docsPath: docsPath8 }) {
          super([
            `Encoded function signature "${signature2}" not found on ABI.`,
            "Make sure you are using the correct ABI and that the function exists on it.",
            `You can look up the signature here: https://4byte.sourcify.dev/?q=${signature2}.`
          ].join("\n"), {
            docsPath: docsPath8,
            name: "AbiFunctionSignatureNotFoundError"
          });
        }
      };
      AbiItemAmbiguityError = class extends BaseError2 {
        constructor(x13, y11) {
          super("Found ambiguous types in overloaded ABI items.", {
            metaMessages: [
              `\`${x13.type}\` in \`${formatAbiItem2(x13.abiItem)}\`, and`,
              `\`${y11.type}\` in \`${formatAbiItem2(y11.abiItem)}\``,
              "",
              "These types encode differently and cannot be distinguished at runtime.",
              "Remove one of the ambiguous items in the ABI."
            ],
            name: "AbiItemAmbiguityError"
          });
        }
      };
      BytesSizeMismatchError = class extends BaseError2 {
        constructor({ expectedSize, givenSize }) {
          super(`Expected bytes${expectedSize}, got bytes${givenSize}.`, {
            name: "BytesSizeMismatchError"
          });
        }
      };
      DecodeLogDataMismatch = class extends BaseError2 {
        constructor({ abiItem, data, params, size: size5 }) {
          super([
            `Data size of ${size5} bytes is too small for non-indexed event parameters.`
          ].join("\n"), {
            metaMessages: [
              `Params: (${formatAbiParams(params, { includeName: true })})`,
              `Data:   ${data} (${size5} bytes)`
            ],
            name: "DecodeLogDataMismatch"
          });
          Object.defineProperty(this, "abiItem", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "data", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "params", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "size", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.abiItem = abiItem;
          this.data = data;
          this.params = params;
          this.size = size5;
        }
      };
      DecodeLogTopicsMismatch = class extends BaseError2 {
        constructor({ abiItem, param }) {
          super([
            `Expected a topic for indexed event parameter${param.name ? ` "${param.name}"` : ""} on event "${formatAbiItem2(abiItem, { includeName: true })}".`
          ].join("\n"), { name: "DecodeLogTopicsMismatch" });
          Object.defineProperty(this, "abiItem", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.abiItem = abiItem;
        }
      };
      InvalidAbiEncodingTypeError = class extends BaseError2 {
        constructor(type2, { docsPath: docsPath8 }) {
          super([
            `Type "${type2}" is not a valid encoding type.`,
            "Please provide a valid ABI type."
          ].join("\n"), { docsPath: docsPath8, name: "InvalidAbiEncodingType" });
        }
      };
      InvalidAbiDecodingTypeError = class extends BaseError2 {
        constructor(type2, { docsPath: docsPath8 }) {
          super([
            `Type "${type2}" is not a valid decoding type.`,
            "Please provide a valid ABI type."
          ].join("\n"), { docsPath: docsPath8, name: "InvalidAbiDecodingType" });
        }
      };
      InvalidArrayError = class extends BaseError2 {
        constructor(value) {
          super([`Value "${value}" is not a valid array.`].join("\n"), {
            name: "InvalidArrayError"
          });
        }
      };
      InvalidDefinitionTypeError = class extends BaseError2 {
        constructor(type2) {
          super([
            `"${type2}" is not a valid definition type.`,
            'Valid types: "function", "event", "error"'
          ].join("\n"), { name: "InvalidDefinitionTypeError" });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/data.js
  var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError, InvalidBytesLengthError;
  var init_data = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/data.js"() {
      "use strict";
      init_node_compat_inject();
      init_base();
      SliceOffsetOutOfBoundsError = class extends BaseError2 {
        constructor({ offset: offset2, position, size: size5 }) {
          super(`Slice ${position === "start" ? "starting" : "ending"} at offset "${offset2}" is out-of-bounds (size: ${size5}).`, { name: "SliceOffsetOutOfBoundsError" });
        }
      };
      SizeExceedsPaddingSizeError = class extends BaseError2 {
        constructor({ size: size5, targetSize, type: type2 }) {
          super(`${type2.charAt(0).toUpperCase()}${type2.slice(1).toLowerCase()} size (${size5}) exceeds padding size (${targetSize}).`, { name: "SizeExceedsPaddingSizeError" });
        }
      };
      InvalidBytesLengthError = class extends BaseError2 {
        constructor({ size: size5, targetSize, type: type2 }) {
          super(`${type2.charAt(0).toUpperCase()}${type2.slice(1).toLowerCase()} is expected to be ${targetSize} ${type2} long, but is ${size5} ${type2} long.`, { name: "InvalidBytesLengthError" });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/data/pad.js
  function pad(hexOrBytes, { dir, size: size5 = 32 } = {}) {
    if (typeof hexOrBytes === "string")
      return padHex(hexOrBytes, { dir, size: size5 });
    return padBytes(hexOrBytes, { dir, size: size5 });
  }
  function padHex(hex_, { dir, size: size5 = 32 } = {}) {
    if (size5 === null)
      return hex_;
    const hex3 = hex_.replace("0x", "");
    if (hex3.length > size5 * 2)
      throw new SizeExceedsPaddingSizeError({
        size: Math.ceil(hex3.length / 2),
        targetSize: size5,
        type: "hex"
      });
    return `0x${hex3[dir === "right" ? "padEnd" : "padStart"](size5 * 2, "0")}`;
  }
  function padBytes(bytes, { dir, size: size5 = 32 } = {}) {
    if (size5 === null)
      return bytes;
    if (bytes.length > size5)
      throw new SizeExceedsPaddingSizeError({
        size: bytes.length,
        targetSize: size5,
        type: "bytes"
      });
    const paddedBytes = new Uint8Array(size5);
    for (let i5 = 0; i5 < size5; i5++) {
      const padEnd = dir === "right";
      paddedBytes[padEnd ? i5 : size5 - i5 - 1] = bytes[padEnd ? i5 : bytes.length - i5 - 1];
    }
    return paddedBytes;
  }
  var init_pad = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/data/pad.js"() {
      "use strict";
      init_node_compat_inject();
      init_data();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/encoding.js
  var IntegerOutOfRangeError, InvalidBytesBooleanError, InvalidHexBooleanError, SizeOverflowError;
  var init_encoding = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/encoding.js"() {
      "use strict";
      init_node_compat_inject();
      init_base();
      IntegerOutOfRangeError = class extends BaseError2 {
        constructor({ max, min, signed, size: size5, value }) {
          super(`Number "${value}" is not in safe ${size5 ? `${size5 * 8}-bit ${signed ? "signed" : "unsigned"} ` : ""}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: "IntegerOutOfRangeError" });
        }
      };
      InvalidBytesBooleanError = class extends BaseError2 {
        constructor(bytes) {
          super(`Bytes value "${bytes}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
            name: "InvalidBytesBooleanError"
          });
        }
      };
      InvalidHexBooleanError = class extends BaseError2 {
        constructor(hex3) {
          super(`Hex value "${hex3}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`, { name: "InvalidHexBooleanError" });
        }
      };
      SizeOverflowError = class extends BaseError2 {
        constructor({ givenSize, maxSize }) {
          super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: "SizeOverflowError" });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/data/trim.js
  function trim(hexOrBytes, { dir = "left" } = {}) {
    let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
    let sliceLength = 0;
    for (let i5 = 0; i5 < data.length - 1; i5++) {
      if (data[dir === "left" ? i5 : data.length - i5 - 1].toString() === "0")
        sliceLength++;
      else
        break;
    }
    data = dir === "left" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);
    if (typeof hexOrBytes === "string") {
      if (data.length === 1 && dir === "right")
        data = `${data}0`;
      return `0x${data.length % 2 === 1 ? `0${data}` : data}`;
    }
    return data;
  }
  var init_trim = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/data/trim.js"() {
      "use strict";
      init_node_compat_inject();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/encoding/fromHex.js
  function assertSize(hexOrBytes, { size: size5 }) {
    if (size(hexOrBytes) > size5)
      throw new SizeOverflowError({
        givenSize: size(hexOrBytes),
        maxSize: size5
      });
  }
  function hexToBigInt(hex3, opts = {}) {
    const { signed } = opts;
    if (opts.size)
      assertSize(hex3, { size: opts.size });
    const value = BigInt(hex3);
    if (!signed)
      return value;
    const size5 = (hex3.length - 2) / 2;
    const max = (1n << BigInt(size5) * 8n - 1n) - 1n;
    if (value <= max)
      return value;
    return value - BigInt(`0x${"f".padStart(size5 * 2, "f")}`) - 1n;
  }
  function hexToBool(hex_, opts = {}) {
    let hex3 = hex_;
    if (opts.size) {
      assertSize(hex3, { size: opts.size });
      hex3 = trim(hex3);
    }
    if (trim(hex3) === "0x00")
      return false;
    if (trim(hex3) === "0x01")
      return true;
    throw new InvalidHexBooleanError(hex3);
  }
  function hexToNumber(hex3, opts = {}) {
    const value = hexToBigInt(hex3, opts);
    const number5 = Number(value);
    if (!Number.isSafeInteger(number5))
      throw new IntegerOutOfRangeError({
        max: `${Number.MAX_SAFE_INTEGER}`,
        min: `${Number.MIN_SAFE_INTEGER}`,
        signed: opts.signed,
        size: opts.size,
        value: `${value}n`
      });
    return number5;
  }
  var init_fromHex = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/encoding/fromHex.js"() {
      "use strict";
      init_node_compat_inject();
      init_encoding();
      init_size();
      init_trim();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/encoding/toHex.js
  function toHex(value, opts = {}) {
    if (typeof value === "number" || typeof value === "bigint")
      return numberToHex(value, opts);
    if (typeof value === "string") {
      return stringToHex(value, opts);
    }
    if (typeof value === "boolean")
      return boolToHex(value, opts);
    return bytesToHex(value, opts);
  }
  function boolToHex(value, opts = {}) {
    const hex3 = `0x${Number(value)}`;
    if (typeof opts.size === "number") {
      assertSize(hex3, { size: opts.size });
      return pad(hex3, { size: opts.size });
    }
    return hex3;
  }
  function bytesToHex(value, opts = {}) {
    let string7 = "";
    for (let i5 = 0; i5 < value.length; i5++) {
      string7 += hexes[value[i5]];
    }
    const hex3 = `0x${string7}`;
    if (typeof opts.size === "number") {
      assertSize(hex3, { size: opts.size });
      return pad(hex3, { dir: "right", size: opts.size });
    }
    return hex3;
  }
  function numberToHex(value_, opts = {}) {
    const { signed, size: size5 } = opts;
    const value = BigInt(value_);
    let maxValue;
    if (size5) {
      if (signed)
        maxValue = (1n << BigInt(size5) * 8n - 1n) - 1n;
      else
        maxValue = 2n ** (BigInt(size5) * 8n) - 1n;
    } else if (typeof value_ === "number") {
      maxValue = BigInt(Number.MAX_SAFE_INTEGER);
    }
    const minValue = typeof maxValue === "bigint" && signed ? -maxValue - 1n : 0;
    if (maxValue && value > maxValue || value < minValue) {
      const suffix = typeof value_ === "bigint" ? "n" : "";
      throw new IntegerOutOfRangeError({
        max: maxValue ? `${maxValue}${suffix}` : void 0,
        min: `${minValue}${suffix}`,
        signed,
        size: size5,
        value: `${value_}${suffix}`
      });
    }
    const hex3 = `0x${(signed && value < 0 ? (1n << BigInt(size5 * 8)) + BigInt(value) : value).toString(16)}`;
    if (size5)
      return pad(hex3, { size: size5 });
    return hex3;
  }
  function stringToHex(value_, opts = {}) {
    const value = encoder.encode(value_);
    return bytesToHex(value, opts);
  }
  var hexes, encoder;
  var init_toHex = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/encoding/toHex.js"() {
      "use strict";
      init_node_compat_inject();
      init_encoding();
      init_pad();
      init_fromHex();
      hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i5) => i5.toString(16).padStart(2, "0"));
      encoder = /* @__PURE__ */ new TextEncoder();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/encoding/toBytes.js
  function toBytes(value, opts = {}) {
    if (typeof value === "number" || typeof value === "bigint")
      return numberToBytes(value, opts);
    if (typeof value === "boolean")
      return boolToBytes(value, opts);
    if (isHex(value))
      return hexToBytes(value, opts);
    return stringToBytes(value, opts);
  }
  function boolToBytes(value, opts = {}) {
    const bytes = new Uint8Array(1);
    bytes[0] = Number(value);
    if (typeof opts.size === "number") {
      assertSize(bytes, { size: opts.size });
      return pad(bytes, { size: opts.size });
    }
    return bytes;
  }
  function charCodeToBase16(char) {
    if (char >= charCodeMap.zero && char <= charCodeMap.nine)
      return char - charCodeMap.zero;
    if (char >= charCodeMap.A && char <= charCodeMap.F)
      return char - (charCodeMap.A - 10);
    if (char >= charCodeMap.a && char <= charCodeMap.f)
      return char - (charCodeMap.a - 10);
    return void 0;
  }
  function hexToBytes(hex_, opts = {}) {
    let hex3 = hex_;
    if (opts.size) {
      assertSize(hex3, { size: opts.size });
      hex3 = pad(hex3, { dir: "right", size: opts.size });
    }
    let hexString = hex3.slice(2);
    if (hexString.length % 2)
      hexString = `0${hexString}`;
    const length2 = hexString.length / 2;
    const bytes = new Uint8Array(length2);
    for (let index2 = 0, j6 = 0; index2 < length2; index2++) {
      const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j6++));
      const nibbleRight = charCodeToBase16(hexString.charCodeAt(j6++));
      if (nibbleLeft === void 0 || nibbleRight === void 0) {
        throw new BaseError2(`Invalid byte sequence ("${hexString[j6 - 2]}${hexString[j6 - 1]}" in "${hexString}").`);
      }
      bytes[index2] = nibbleLeft * 16 + nibbleRight;
    }
    return bytes;
  }
  function numberToBytes(value, opts) {
    const hex3 = numberToHex(value, opts);
    return hexToBytes(hex3);
  }
  function stringToBytes(value, opts = {}) {
    const bytes = encoder2.encode(value);
    if (typeof opts.size === "number") {
      assertSize(bytes, { size: opts.size });
      return pad(bytes, { dir: "right", size: opts.size });
    }
    return bytes;
  }
  var encoder2, charCodeMap;
  var init_toBytes = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/encoding/toBytes.js"() {
      "use strict";
      init_node_compat_inject();
      init_base();
      init_isHex();
      init_pad();
      init_fromHex();
      init_toHex();
      encoder2 = /* @__PURE__ */ new TextEncoder();
      charCodeMap = {
        zero: 48,
        nine: 57,
        A: 65,
        F: 70,
        a: 97,
        f: 102
      };
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js
  function fromBig(n6, le6 = false) {
    if (le6)
      return { h: Number(n6 & U32_MASK64), l: Number(n6 >> _32n & U32_MASK64) };
    return { h: Number(n6 >> _32n & U32_MASK64) | 0, l: Number(n6 & U32_MASK64) | 0 };
  }
  function split(lst, le6 = false) {
    const len = lst.length;
    let Ah = new Uint32Array(len);
    let Al = new Uint32Array(len);
    for (let i5 = 0; i5 < len; i5++) {
      const { h: h8, l: l6 } = fromBig(lst[i5], le6);
      [Ah[i5], Al[i5]] = [h8, l6];
    }
    return [Ah, Al];
  }
  function add(Ah, Al, Bh, Bl) {
    const l6 = (Al >>> 0) + (Bl >>> 0);
    return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };
  }
  var U32_MASK64, _32n, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotlSH, rotlSL, rotlBH, rotlBL, add3L, add3H, add4L, add4H, add5L, add5H;
  var init_u64 = __esm({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js"() {
      "use strict";
      init_node_compat_inject();
      U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
      _32n = /* @__PURE__ */ BigInt(32);
      shrSH = (h8, _l, s3) => h8 >>> s3;
      shrSL = (h8, l6, s3) => h8 << 32 - s3 | l6 >>> s3;
      rotrSH = (h8, l6, s3) => h8 >>> s3 | l6 << 32 - s3;
      rotrSL = (h8, l6, s3) => h8 << 32 - s3 | l6 >>> s3;
      rotrBH = (h8, l6, s3) => h8 << 64 - s3 | l6 >>> s3 - 32;
      rotrBL = (h8, l6, s3) => h8 >>> s3 - 32 | l6 << 64 - s3;
      rotlSH = (h8, l6, s3) => h8 << s3 | l6 >>> 32 - s3;
      rotlSL = (h8, l6, s3) => l6 << s3 | h8 >>> 32 - s3;
      rotlBH = (h8, l6, s3) => l6 << s3 - 32 | h8 >>> 64 - s3;
      rotlBL = (h8, l6, s3) => h8 << s3 - 32 | l6 >>> 64 - s3;
      add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
      add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
      add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
      add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
      add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
      add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js
  var crypto2;
  var init_crypto = __esm({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js"() {
      "use strict";
      init_node_compat_inject();
      crypto2 = typeof globalThis === "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js
  function isBytes(a5) {
    return a5 instanceof Uint8Array || ArrayBuffer.isView(a5) && a5.constructor.name === "Uint8Array";
  }
  function anumber(n6) {
    if (!Number.isSafeInteger(n6) || n6 < 0)
      throw new Error("positive integer expected, got " + n6);
  }
  function abytes(b9, ...lengths) {
    if (!isBytes(b9))
      throw new Error("Uint8Array expected");
    if (lengths.length > 0 && !lengths.includes(b9.length))
      throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b9.length);
  }
  function ahash(h8) {
    if (typeof h8 !== "function" || typeof h8.create !== "function")
      throw new Error("Hash should be wrapped by utils.createHasher");
    anumber(h8.outputLen);
    anumber(h8.blockLen);
  }
  function aexists(instance2, checkFinished = true) {
    if (instance2.destroyed)
      throw new Error("Hash instance has been destroyed");
    if (checkFinished && instance2.finished)
      throw new Error("Hash#digest() has already been called");
  }
  function aoutput(out, instance2) {
    abytes(out);
    const min = instance2.outputLen;
    if (out.length < min) {
      throw new Error("digestInto() expects output buffer of length at least " + min);
    }
  }
  function u32(arr) {
    return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
  }
  function clean(...arrays) {
    for (let i5 = 0; i5 < arrays.length; i5++) {
      arrays[i5].fill(0);
    }
  }
  function createView(arr) {
    return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
  }
  function rotr(word, shift) {
    return word << 32 - shift | word >>> shift;
  }
  function rotl(word, shift) {
    return word << shift | word >>> 32 - shift >>> 0;
  }
  function byteSwap(word) {
    return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
  }
  function byteSwap32(arr) {
    for (let i5 = 0; i5 < arr.length; i5++) {
      arr[i5] = byteSwap(arr[i5]);
    }
    return arr;
  }
  function bytesToHex2(bytes) {
    abytes(bytes);
    if (hasHexBuiltin)
      return bytes.toHex();
    let hex3 = "";
    for (let i5 = 0; i5 < bytes.length; i5++) {
      hex3 += hexes2[bytes[i5]];
    }
    return hex3;
  }
  function asciiToBase16(ch) {
    if (ch >= asciis._0 && ch <= asciis._9)
      return ch - asciis._0;
    if (ch >= asciis.A && ch <= asciis.F)
      return ch - (asciis.A - 10);
    if (ch >= asciis.a && ch <= asciis.f)
      return ch - (asciis.a - 10);
    return;
  }
  function hexToBytes2(hex3) {
    if (typeof hex3 !== "string")
      throw new Error("hex string expected, got " + typeof hex3);
    if (hasHexBuiltin)
      return Uint8Array.fromHex(hex3);
    const hl = hex3.length;
    const al = hl / 2;
    if (hl % 2)
      throw new Error("hex string expected, got unpadded hex of length " + hl);
    const array3 = new Uint8Array(al);
    for (let ai2 = 0, hi2 = 0; ai2 < al; ai2++, hi2 += 2) {
      const n1 = asciiToBase16(hex3.charCodeAt(hi2));
      const n22 = asciiToBase16(hex3.charCodeAt(hi2 + 1));
      if (n1 === void 0 || n22 === void 0) {
        const char = hex3[hi2] + hex3[hi2 + 1];
        throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi2);
      }
      array3[ai2] = n1 * 16 + n22;
    }
    return array3;
  }
  function utf8ToBytes(str) {
    if (typeof str !== "string")
      throw new Error("string expected");
    return new Uint8Array(new TextEncoder().encode(str));
  }
  function toBytes2(data) {
    if (typeof data === "string")
      data = utf8ToBytes(data);
    abytes(data);
    return data;
  }
  function kdfInputToBytes(data) {
    if (typeof data === "string")
      data = utf8ToBytes(data);
    abytes(data);
    return data;
  }
  function concatBytes(...arrays) {
    let sum = 0;
    for (let i5 = 0; i5 < arrays.length; i5++) {
      const a5 = arrays[i5];
      abytes(a5);
      sum += a5.length;
    }
    const res = new Uint8Array(sum);
    for (let i5 = 0, pad4 = 0; i5 < arrays.length; i5++) {
      const a5 = arrays[i5];
      res.set(a5, pad4);
      pad4 += a5.length;
    }
    return res;
  }
  function checkOpts(defaults, opts) {
    if (opts !== void 0 && {}.toString.call(opts) !== "[object Object]")
      throw new Error("options should be object or undefined");
    const merged = Object.assign(defaults, opts);
    return merged;
  }
  function createHasher(hashCons) {
    const hashC = (msg) => hashCons().update(toBytes2(msg)).digest();
    const tmp = hashCons();
    hashC.outputLen = tmp.outputLen;
    hashC.blockLen = tmp.blockLen;
    hashC.create = () => hashCons();
    return hashC;
  }
  function randomBytes(bytesLength = 32) {
    if (crypto2 && typeof crypto2.getRandomValues === "function") {
      return crypto2.getRandomValues(new Uint8Array(bytesLength));
    }
    if (crypto2 && typeof crypto2.randomBytes === "function") {
      return Uint8Array.from(crypto2.randomBytes(bytesLength));
    }
    throw new Error("crypto.getRandomValues must be defined");
  }
  var isLE, swap32IfBE, hasHexBuiltin, hexes2, asciis, Hash;
  var init_utils2 = __esm({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js"() {
      "use strict";
      init_node_compat_inject();
      init_crypto();
      isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
      swap32IfBE = isLE ? (u4) => u4 : byteSwap32;
      hasHexBuiltin = /* @__PURE__ */ (() => (
        // @ts-ignore
        typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function"
      ))();
      hexes2 = /* @__PURE__ */ Array.from({ length: 256 }, (_6, i5) => i5.toString(16).padStart(2, "0"));
      asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
      Hash = class {
      };
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js
  function keccakP(s3, rounds = 24) {
    const B7 = new Uint32Array(5 * 2);
    for (let round = 24 - rounds; round < 24; round++) {
      for (let x13 = 0; x13 < 10; x13++)
        B7[x13] = s3[x13] ^ s3[x13 + 10] ^ s3[x13 + 20] ^ s3[x13 + 30] ^ s3[x13 + 40];
      for (let x13 = 0; x13 < 10; x13 += 2) {
        const idx1 = (x13 + 8) % 10;
        const idx0 = (x13 + 2) % 10;
        const B0 = B7[idx0];
        const B1 = B7[idx0 + 1];
        const Th = rotlH(B0, B1, 1) ^ B7[idx1];
        const Tl = rotlL(B0, B1, 1) ^ B7[idx1 + 1];
        for (let y11 = 0; y11 < 50; y11 += 10) {
          s3[x13 + y11] ^= Th;
          s3[x13 + y11 + 1] ^= Tl;
        }
      }
      let curH = s3[2];
      let curL = s3[3];
      for (let t = 0; t < 24; t++) {
        const shift = SHA3_ROTL[t];
        const Th = rotlH(curH, curL, shift);
        const Tl = rotlL(curH, curL, shift);
        const PI = SHA3_PI[t];
        curH = s3[PI];
        curL = s3[PI + 1];
        s3[PI] = Th;
        s3[PI + 1] = Tl;
      }
      for (let y11 = 0; y11 < 50; y11 += 10) {
        for (let x13 = 0; x13 < 10; x13++)
          B7[x13] = s3[y11 + x13];
        for (let x13 = 0; x13 < 10; x13++)
          s3[y11 + x13] ^= ~B7[(x13 + 2) % 10] & B7[(x13 + 4) % 10];
      }
      s3[0] ^= SHA3_IOTA_H[round];
      s3[1] ^= SHA3_IOTA_L[round];
    }
    clean(B7);
  }
  var _0n, _1n, _2n, _7n, _256n, _0x71n, SHA3_PI, SHA3_ROTL, _SHA3_IOTA, IOTAS, SHA3_IOTA_H, SHA3_IOTA_L, rotlH, rotlL, Keccak, gen, keccak_256;
  var init_sha3 = __esm({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js"() {
      "use strict";
      init_node_compat_inject();
      init_u64();
      init_utils2();
      _0n = BigInt(0);
      _1n = BigInt(1);
      _2n = BigInt(2);
      _7n = BigInt(7);
      _256n = BigInt(256);
      _0x71n = BigInt(113);
      SHA3_PI = [];
      SHA3_ROTL = [];
      _SHA3_IOTA = [];
      for (let round = 0, R6 = _1n, x13 = 1, y11 = 0; round < 24; round++) {
        [x13, y11] = [y11, (2 * x13 + 3 * y11) % 5];
        SHA3_PI.push(2 * (5 * y11 + x13));
        SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);
        let t = _0n;
        for (let j6 = 0; j6 < 7; j6++) {
          R6 = (R6 << _1n ^ (R6 >> _7n) * _0x71n) % _256n;
          if (R6 & _2n)
            t ^= _1n << (_1n << /* @__PURE__ */ BigInt(j6)) - _1n;
        }
        _SHA3_IOTA.push(t);
      }
      IOTAS = split(_SHA3_IOTA, true);
      SHA3_IOTA_H = IOTAS[0];
      SHA3_IOTA_L = IOTAS[1];
      rotlH = (h8, l6, s3) => s3 > 32 ? rotlBH(h8, l6, s3) : rotlSH(h8, l6, s3);
      rotlL = (h8, l6, s3) => s3 > 32 ? rotlBL(h8, l6, s3) : rotlSL(h8, l6, s3);
      Keccak = class _Keccak extends Hash {
        // NOTE: we accept arguments in bytes instead of bits here.
        constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
          super();
          this.pos = 0;
          this.posOut = 0;
          this.finished = false;
          this.destroyed = false;
          this.enableXOF = false;
          this.blockLen = blockLen;
          this.suffix = suffix;
          this.outputLen = outputLen;
          this.enableXOF = enableXOF;
          this.rounds = rounds;
          anumber(outputLen);
          if (!(0 < blockLen && blockLen < 200))
            throw new Error("only keccak-f1600 function is supported");
          this.state = new Uint8Array(200);
          this.state32 = u32(this.state);
        }
        clone() {
          return this._cloneInto();
        }
        keccak() {
          swap32IfBE(this.state32);
          keccakP(this.state32, this.rounds);
          swap32IfBE(this.state32);
          this.posOut = 0;
          this.pos = 0;
        }
        update(data) {
          aexists(this);
          data = toBytes2(data);
          abytes(data);
          const { blockLen, state } = this;
          const len = data.length;
          for (let pos = 0; pos < len; ) {
            const take = Math.min(blockLen - this.pos, len - pos);
            for (let i5 = 0; i5 < take; i5++)
              state[this.pos++] ^= data[pos++];
            if (this.pos === blockLen)
              this.keccak();
          }
          return this;
        }
        finish() {
          if (this.finished)
            return;
          this.finished = true;
          const { state, suffix, pos, blockLen } = this;
          state[pos] ^= suffix;
          if ((suffix & 128) !== 0 && pos === blockLen - 1)
            this.keccak();
          state[blockLen - 1] ^= 128;
          this.keccak();
        }
        writeInto(out) {
          aexists(this, false);
          abytes(out);
          this.finish();
          const bufferOut = this.state;
          const { blockLen } = this;
          for (let pos = 0, len = out.length; pos < len; ) {
            if (this.posOut >= blockLen)
              this.keccak();
            const take = Math.min(blockLen - this.posOut, len - pos);
            out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
            this.posOut += take;
            pos += take;
          }
          return out;
        }
        xofInto(out) {
          if (!this.enableXOF)
            throw new Error("XOF is not possible for this instance");
          return this.writeInto(out);
        }
        xof(bytes) {
          anumber(bytes);
          return this.xofInto(new Uint8Array(bytes));
        }
        digestInto(out) {
          aoutput(out, this);
          if (this.finished)
            throw new Error("digest() was already called");
          this.writeInto(out);
          this.destroy();
          return out;
        }
        digest() {
          return this.digestInto(new Uint8Array(this.outputLen));
        }
        destroy() {
          this.destroyed = true;
          clean(this.state);
        }
        _cloneInto(to3) {
          const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
          to3 || (to3 = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
          to3.state32.set(this.state32);
          to3.pos = this.pos;
          to3.posOut = this.posOut;
          to3.finished = this.finished;
          to3.rounds = rounds;
          to3.suffix = suffix;
          to3.outputLen = outputLen;
          to3.enableXOF = enableXOF;
          to3.destroyed = this.destroyed;
          return to3;
        }
      };
      gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));
      keccak_256 = /* @__PURE__ */ (() => gen(1, 136, 256 / 8))();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/keccak256.js
  function keccak256(value, to_) {
    const to3 = to_ || "hex";
    const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);
    if (to3 === "bytes")
      return bytes;
    return toHex(bytes);
  }
  var init_keccak256 = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/keccak256.js"() {
      "use strict";
      init_node_compat_inject();
      init_sha3();
      init_isHex();
      init_toBytes();
      init_toHex();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/hashSignature.js
  function hashSignature(sig) {
    return hash(sig);
  }
  var hash;
  var init_hashSignature = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/hashSignature.js"() {
      "use strict";
      init_node_compat_inject();
      init_toBytes();
      init_keccak256();
      hash = (value) => keccak256(toBytes(value));
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/normalizeSignature.js
  function normalizeSignature(signature2) {
    let active = true;
    let current = "";
    let level = 0;
    let result = "";
    let valid = false;
    for (let i5 = 0; i5 < signature2.length; i5++) {
      const char = signature2[i5];
      if (["(", ")", ","].includes(char))
        active = true;
      if (char === "(")
        level++;
      if (char === ")")
        level--;
      if (!active)
        continue;
      if (level === 0) {
        if (char === " " && ["event", "function", ""].includes(result))
          result = "";
        else {
          result += char;
          if (char === ")") {
            valid = true;
            break;
          }
        }
        continue;
      }
      if (char === " ") {
        if (signature2[i5 - 1] !== "," && current !== "," && current !== ",(") {
          current = "";
          active = false;
        }
        continue;
      }
      result += char;
      current += char;
    }
    if (!valid)
      throw new BaseError2("Unable to normalize signature.");
    return result;
  }
  var init_normalizeSignature = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/normalizeSignature.js"() {
      "use strict";
      init_node_compat_inject();
      init_base();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/toSignature.js
  var toSignature;
  var init_toSignature = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/toSignature.js"() {
      "use strict";
      init_node_compat_inject();
      init_exports();
      init_normalizeSignature();
      toSignature = (def) => {
        const def_ = (() => {
          if (typeof def === "string")
            return def;
          return formatAbiItem(def);
        })();
        return normalizeSignature(def_);
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/toSignatureHash.js
  function toSignatureHash(fn) {
    return hashSignature(toSignature(fn));
  }
  var init_toSignatureHash = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/toSignatureHash.js"() {
      "use strict";
      init_node_compat_inject();
      init_hashSignature();
      init_toSignature();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/toEventSelector.js
  var toEventSelector;
  var init_toEventSelector = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/toEventSelector.js"() {
      "use strict";
      init_node_compat_inject();
      init_toSignatureHash();
      toEventSelector = toSignatureHash;
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/address.js
  var InvalidAddressError;
  var init_address = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/address.js"() {
      "use strict";
      init_node_compat_inject();
      init_base();
      InvalidAddressError = class extends BaseError2 {
        constructor({ address }) {
          super(`Address "${address}" is invalid.`, {
            metaMessages: [
              "- Address must be a hex value of 20 bytes (40 hex characters).",
              "- Address must match its checksum counterpart."
            ],
            name: "InvalidAddressError"
          });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/lru.js
  var LruMap;
  var init_lru = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/lru.js"() {
      "use strict";
      init_node_compat_inject();
      LruMap = class extends Map {
        constructor(size5) {
          super();
          Object.defineProperty(this, "maxSize", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.maxSize = size5;
        }
        get(key2) {
          const value = super.get(key2);
          if (super.has(key2)) {
            super.delete(key2);
            super.set(key2, value);
          }
          return value;
        }
        set(key2, value) {
          if (super.has(key2))
            super.delete(key2);
          super.set(key2, value);
          if (this.maxSize && this.size > this.maxSize) {
            const firstKey = super.keys().next().value;
            if (firstKey !== void 0)
              super.delete(firstKey);
          }
          return this;
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/address/getAddress.js
  function checksumAddress(address_, chainId) {
    if (checksumAddressCache.has(`${address_}.${chainId}`))
      return checksumAddressCache.get(`${address_}.${chainId}`);
    const hexAddress = chainId ? `${chainId}${address_.toLowerCase()}` : address_.substring(2).toLowerCase();
    const hash5 = keccak256(stringToBytes(hexAddress), "bytes");
    const address = (chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress).split("");
    for (let i5 = 0; i5 < 40; i5 += 2) {
      if (hash5[i5 >> 1] >> 4 >= 8 && address[i5]) {
        address[i5] = address[i5].toUpperCase();
      }
      if ((hash5[i5 >> 1] & 15) >= 8 && address[i5 + 1]) {
        address[i5 + 1] = address[i5 + 1].toUpperCase();
      }
    }
    const result = `0x${address.join("")}`;
    checksumAddressCache.set(`${address_}.${chainId}`, result);
    return result;
  }
  function getAddress(address, chainId) {
    if (!isAddress(address, { strict: false }))
      throw new InvalidAddressError({ address });
    return checksumAddress(address, chainId);
  }
  var checksumAddressCache;
  var init_getAddress = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/address/getAddress.js"() {
      "use strict";
      init_node_compat_inject();
      init_address();
      init_toBytes();
      init_keccak256();
      init_lru();
      init_isAddress();
      checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/address/isAddress.js
  function isAddress(address, options) {
    const { strict = true } = options ?? {};
    const cacheKey2 = `${address}.${strict}`;
    if (isAddressCache.has(cacheKey2))
      return isAddressCache.get(cacheKey2);
    const result = (() => {
      if (!addressRegex.test(address))
        return false;
      if (address.toLowerCase() === address)
        return true;
      if (strict)
        return checksumAddress(address) === address;
      return true;
    })();
    isAddressCache.set(cacheKey2, result);
    return result;
  }
  var addressRegex, isAddressCache;
  var init_isAddress = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/address/isAddress.js"() {
      "use strict";
      init_node_compat_inject();
      init_lru();
      init_getAddress();
      addressRegex = /^0x[a-fA-F0-9]{40}$/;
      isAddressCache = /* @__PURE__ */ new LruMap(8192);
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/data/concat.js
  function concat(values) {
    if (typeof values[0] === "string")
      return concatHex(values);
    return concatBytes2(values);
  }
  function concatBytes2(values) {
    let length2 = 0;
    for (const arr of values) {
      length2 += arr.length;
    }
    const result = new Uint8Array(length2);
    let offset2 = 0;
    for (const arr of values) {
      result.set(arr, offset2);
      offset2 += arr.length;
    }
    return result;
  }
  function concatHex(values) {
    return `0x${values.reduce((acc, x13) => acc + x13.replace("0x", ""), "")}`;
  }
  var init_concat = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/data/concat.js"() {
      "use strict";
      init_node_compat_inject();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/data/slice.js
  function slice(value, start, end, { strict } = {}) {
    if (isHex(value, { strict: false }))
      return sliceHex(value, start, end, {
        strict
      });
    return sliceBytes(value, start, end, {
      strict
    });
  }
  function assertStartOffset(value, start) {
    if (typeof start === "number" && start > 0 && start > size(value) - 1)
      throw new SliceOffsetOutOfBoundsError({
        offset: start,
        position: "start",
        size: size(value)
      });
  }
  function assertEndOffset(value, start, end) {
    if (typeof start === "number" && typeof end === "number" && size(value) !== end - start) {
      throw new SliceOffsetOutOfBoundsError({
        offset: end,
        position: "end",
        size: size(value)
      });
    }
  }
  function sliceBytes(value_, start, end, { strict } = {}) {
    assertStartOffset(value_, start);
    const value = value_.slice(start, end);
    if (strict)
      assertEndOffset(value, start, end);
    return value;
  }
  function sliceHex(value_, start, end, { strict } = {}) {
    assertStartOffset(value_, start);
    const value = `0x${value_.replace("0x", "").slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;
    if (strict)
      assertEndOffset(value, start, end);
    return value;
  }
  var init_slice = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/data/slice.js"() {
      "use strict";
      init_node_compat_inject();
      init_data();
      init_isHex();
      init_size();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/regex.js
  var bytesRegex2, integerRegex2;
  var init_regex2 = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/regex.js"() {
      "use strict";
      init_node_compat_inject();
      bytesRegex2 = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
      integerRegex2 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
  function encodeAbiParameters(params, values) {
    if (params.length !== values.length)
      throw new AbiEncodingLengthMismatchError({
        expectedLength: params.length,
        givenLength: values.length
      });
    const preparedParams = prepareParams({
      params,
      values
    });
    const data = encodeParams(preparedParams);
    if (data.length === 0)
      return "0x";
    return data;
  }
  function prepareParams({ params, values }) {
    const preparedParams = [];
    for (let i5 = 0; i5 < params.length; i5++) {
      preparedParams.push(prepareParam({ param: params[i5], value: values[i5] }));
    }
    return preparedParams;
  }
  function prepareParam({ param, value }) {
    const arrayComponents = getArrayComponents(param.type);
    if (arrayComponents) {
      const [length2, type2] = arrayComponents;
      return encodeArray(value, { length: length2, param: { ...param, type: type2 } });
    }
    if (param.type === "tuple") {
      return encodeTuple(value, {
        param
      });
    }
    if (param.type === "address") {
      return encodeAddress(value);
    }
    if (param.type === "bool") {
      return encodeBool(value);
    }
    if (param.type.startsWith("uint") || param.type.startsWith("int")) {
      const signed = param.type.startsWith("int");
      const [, , size5 = "256"] = integerRegex2.exec(param.type) ?? [];
      return encodeNumber(value, {
        signed,
        size: Number(size5)
      });
    }
    if (param.type.startsWith("bytes")) {
      return encodeBytes(value, { param });
    }
    if (param.type === "string") {
      return encodeString(value);
    }
    throw new InvalidAbiEncodingTypeError(param.type, {
      docsPath: "/docs/contract/encodeAbiParameters"
    });
  }
  function encodeParams(preparedParams) {
    let staticSize = 0;
    for (let i5 = 0; i5 < preparedParams.length; i5++) {
      const { dynamic, encoded } = preparedParams[i5];
      if (dynamic)
        staticSize += 32;
      else
        staticSize += size(encoded);
    }
    const staticParams = [];
    const dynamicParams = [];
    let dynamicSize = 0;
    for (let i5 = 0; i5 < preparedParams.length; i5++) {
      const { dynamic, encoded } = preparedParams[i5];
      if (dynamic) {
        staticParams.push(numberToHex(staticSize + dynamicSize, { size: 32 }));
        dynamicParams.push(encoded);
        dynamicSize += size(encoded);
      } else {
        staticParams.push(encoded);
      }
    }
    return concat([...staticParams, ...dynamicParams]);
  }
  function encodeAddress(value) {
    if (!isAddress(value))
      throw new InvalidAddressError({ address: value });
    return { dynamic: false, encoded: padHex(value.toLowerCase()) };
  }
  function encodeArray(value, { length: length2, param }) {
    const dynamic = length2 === null;
    if (!Array.isArray(value))
      throw new InvalidArrayError(value);
    if (!dynamic && value.length !== length2)
      throw new AbiEncodingArrayLengthMismatchError({
        expectedLength: length2,
        givenLength: value.length,
        type: `${param.type}[${length2}]`
      });
    let dynamicChild = false;
    const preparedParams = [];
    for (let i5 = 0; i5 < value.length; i5++) {
      const preparedParam = prepareParam({ param, value: value[i5] });
      if (preparedParam.dynamic)
        dynamicChild = true;
      preparedParams.push(preparedParam);
    }
    if (dynamic || dynamicChild) {
      const data = encodeParams(preparedParams);
      if (dynamic) {
        const length3 = numberToHex(preparedParams.length, { size: 32 });
        return {
          dynamic: true,
          encoded: preparedParams.length > 0 ? concat([length3, data]) : length3
        };
      }
      if (dynamicChild)
        return { dynamic: true, encoded: data };
    }
    return {
      dynamic: false,
      encoded: concat(preparedParams.map(({ encoded }) => encoded))
    };
  }
  function encodeBytes(value, { param }) {
    const [, paramSize] = param.type.split("bytes");
    const bytesSize = size(value);
    if (!paramSize) {
      let value_ = value;
      if (bytesSize % 32 !== 0)
        value_ = padHex(value_, {
          dir: "right",
          size: Math.ceil((value.length - 2) / 2 / 32) * 32
        });
      return {
        dynamic: true,
        encoded: concat([padHex(numberToHex(bytesSize, { size: 32 })), value_])
      };
    }
    if (bytesSize !== Number.parseInt(paramSize, 10))
      throw new AbiEncodingBytesSizeMismatchError({
        expectedSize: Number.parseInt(paramSize, 10),
        value
      });
    return { dynamic: false, encoded: padHex(value, { dir: "right" }) };
  }
  function encodeBool(value) {
    if (typeof value !== "boolean")
      throw new BaseError2(`Invalid boolean value: "${value}" (type: ${typeof value}). Expected: \`true\` or \`false\`.`);
    return { dynamic: false, encoded: padHex(boolToHex(value)) };
  }
  function encodeNumber(value, { signed, size: size5 = 256 }) {
    if (typeof size5 === "number") {
      const max = 2n ** (BigInt(size5) - (signed ? 1n : 0n)) - 1n;
      const min = signed ? -max - 1n : 0n;
      if (value > max || value < min)
        throw new IntegerOutOfRangeError({
          max: max.toString(),
          min: min.toString(),
          signed,
          size: size5 / 8,
          value: value.toString()
        });
    }
    return {
      dynamic: false,
      encoded: numberToHex(value, {
        size: 32,
        signed
      })
    };
  }
  function encodeString(value) {
    const hexValue = stringToHex(value);
    const partsLength = Math.ceil(size(hexValue) / 32);
    const parts = [];
    for (let i5 = 0; i5 < partsLength; i5++) {
      parts.push(padHex(slice(hexValue, i5 * 32, (i5 + 1) * 32), {
        dir: "right"
      }));
    }
    return {
      dynamic: true,
      encoded: concat([
        padHex(numberToHex(size(hexValue), { size: 32 })),
        ...parts
      ])
    };
  }
  function encodeTuple(value, { param }) {
    let dynamic = false;
    const preparedParams = [];
    for (let i5 = 0; i5 < param.components.length; i5++) {
      const param_ = param.components[i5];
      const index2 = Array.isArray(value) ? i5 : param_.name;
      const preparedParam = prepareParam({
        param: param_,
        value: value[index2]
      });
      preparedParams.push(preparedParam);
      if (preparedParam.dynamic)
        dynamic = true;
    }
    return {
      dynamic,
      encoded: dynamic ? encodeParams(preparedParams) : concat(preparedParams.map(({ encoded }) => encoded))
    };
  }
  function getArrayComponents(type2) {
    const matches = type2.match(/^(.*)\[(\d+)?\]$/);
    return matches ? (
      // Return `null` if the array is dynamic.
      [matches[2] ? Number(matches[2]) : null, matches[1]]
    ) : void 0;
  }
  var init_encodeAbiParameters = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js"() {
      "use strict";
      init_node_compat_inject();
      init_abi();
      init_address();
      init_base();
      init_encoding();
      init_isAddress();
      init_concat();
      init_pad();
      init_size();
      init_slice();
      init_toHex();
      init_regex2();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/toFunctionSelector.js
  var toFunctionSelector;
  var init_toFunctionSelector = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/toFunctionSelector.js"() {
      "use strict";
      init_node_compat_inject();
      init_slice();
      init_toSignatureHash();
      toFunctionSelector = (fn) => slice(toSignatureHash(fn), 0, 4);
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/getAbiItem.js
  function getAbiItem(parameters) {
    const { abi: abi2, args = [], name: name2 } = parameters;
    const isSelector = isHex(name2, { strict: false });
    const abiItems = abi2.filter((abiItem) => {
      if (isSelector) {
        if (abiItem.type === "function")
          return toFunctionSelector(abiItem) === name2;
        if (abiItem.type === "event")
          return toEventSelector(abiItem) === name2;
        return false;
      }
      return "name" in abiItem && abiItem.name === name2;
    });
    if (abiItems.length === 0)
      return void 0;
    if (abiItems.length === 1)
      return abiItems[0];
    let matchedAbiItem;
    for (const abiItem of abiItems) {
      if (!("inputs" in abiItem))
        continue;
      if (!args || args.length === 0) {
        if (!abiItem.inputs || abiItem.inputs.length === 0)
          return abiItem;
        continue;
      }
      if (!abiItem.inputs)
        continue;
      if (abiItem.inputs.length === 0)
        continue;
      if (abiItem.inputs.length !== args.length)
        continue;
      const matched = args.every((arg, index2) => {
        const abiParameter = "inputs" in abiItem && abiItem.inputs[index2];
        if (!abiParameter)
          return false;
        return isArgOfType(arg, abiParameter);
      });
      if (matched) {
        if (matchedAbiItem && "inputs" in matchedAbiItem && matchedAbiItem.inputs) {
          const ambiguousTypes = getAmbiguousTypes(abiItem.inputs, matchedAbiItem.inputs, args);
          if (ambiguousTypes)
            throw new AbiItemAmbiguityError({
              abiItem,
              type: ambiguousTypes[0]
            }, {
              abiItem: matchedAbiItem,
              type: ambiguousTypes[1]
            });
        }
        matchedAbiItem = abiItem;
      }
    }
    if (matchedAbiItem)
      return matchedAbiItem;
    return abiItems[0];
  }
  function isArgOfType(arg, abiParameter) {
    const argType = typeof arg;
    const abiParameterType = abiParameter.type;
    switch (abiParameterType) {
      case "address":
        return isAddress(arg, { strict: false });
      case "bool":
        return argType === "boolean";
      case "function":
        return argType === "string";
      case "string":
        return argType === "string";
      default: {
        if (abiParameterType === "tuple" && "components" in abiParameter)
          return Object.values(abiParameter.components).every((component, index2) => {
            return argType === "object" && isArgOfType(Object.values(arg)[index2], component);
          });
        if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))
          return argType === "number" || argType === "bigint";
        if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))
          return argType === "string" || arg instanceof Uint8Array;
        if (/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(abiParameterType)) {
          return Array.isArray(arg) && arg.every((x13) => isArgOfType(x13, {
            ...abiParameter,
            // Pop off `[]` or `[M]` from end of type
            type: abiParameterType.replace(/(\[[0-9]{0,}\])$/, "")
          }));
        }
        return false;
      }
    }
  }
  function getAmbiguousTypes(sourceParameters, targetParameters, args) {
    for (const parameterIndex in sourceParameters) {
      const sourceParameter = sourceParameters[parameterIndex];
      const targetParameter = targetParameters[parameterIndex];
      if (sourceParameter.type === "tuple" && targetParameter.type === "tuple" && "components" in sourceParameter && "components" in targetParameter)
        return getAmbiguousTypes(sourceParameter.components, targetParameter.components, args[parameterIndex]);
      const types = [sourceParameter.type, targetParameter.type];
      const ambiguous = (() => {
        if (types.includes("address") && types.includes("bytes20"))
          return true;
        if (types.includes("address") && types.includes("string"))
          return isAddress(args[parameterIndex], { strict: false });
        if (types.includes("address") && types.includes("bytes"))
          return isAddress(args[parameterIndex], { strict: false });
        return false;
      })();
      if (ambiguous)
        return types;
    }
    return;
  }
  var init_getAbiItem = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/getAbiItem.js"() {
      "use strict";
      init_node_compat_inject();
      init_abi();
      init_isHex();
      init_isAddress();
      init_toEventSelector();
      init_toFunctionSelector();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/utils/parseAccount.js
  function parseAccount(account) {
    if (typeof account === "string")
      return { address: account, type: "json-rpc" };
    return account;
  }
  var init_parseAccount = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/utils/parseAccount.js"() {
      "use strict";
      init_node_compat_inject();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js
  function prepareEncodeFunctionData(parameters) {
    const { abi: abi2, args, functionName } = parameters;
    let abiItem = abi2[0];
    if (functionName) {
      const item = getAbiItem({
        abi: abi2,
        args,
        name: functionName
      });
      if (!item)
        throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath2 });
      abiItem = item;
    }
    if (abiItem.type !== "function")
      throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath2 });
    return {
      abi: [abiItem],
      functionName: toFunctionSelector(formatAbiItem2(abiItem))
    };
  }
  var docsPath2;
  var init_prepareEncodeFunctionData = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js"() {
      "use strict";
      init_node_compat_inject();
      init_abi();
      init_toFunctionSelector();
      init_formatAbiItem2();
      init_getAbiItem();
      docsPath2 = "/docs/contract/encodeFunctionData";
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/encodeFunctionData.js
  function encodeFunctionData(parameters) {
    const { args } = parameters;
    const { abi: abi2, functionName } = (() => {
      if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
        return parameters;
      return prepareEncodeFunctionData(parameters);
    })();
    const abiItem = abi2[0];
    const signature2 = functionName;
    const data = "inputs" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;
    return concatHex([signature2, data ?? "0x"]);
  }
  var init_encodeFunctionData = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/encodeFunctionData.js"() {
      "use strict";
      init_node_compat_inject();
      init_concat();
      init_encodeAbiParameters();
      init_prepareEncodeFunctionData();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/solidity.js
  var panicReasons, solidityError, solidityPanic;
  var init_solidity = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/solidity.js"() {
      "use strict";
      init_node_compat_inject();
      panicReasons = {
        1: "An `assert` condition failed.",
        17: "Arithmetic operation resulted in underflow or overflow.",
        18: "Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",
        33: "Attempted to convert to an invalid type.",
        34: "Attempted to access a storage byte array that is incorrectly encoded.",
        49: "Performed `.pop()` on an empty array",
        50: "Array index is out of bounds.",
        65: "Allocated too much memory or created an array which is too large.",
        81: "Attempted to call a zero-initialized variable of internal function type."
      };
      solidityError = {
        inputs: [
          {
            name: "message",
            type: "string"
          }
        ],
        name: "Error",
        type: "error"
      };
      solidityPanic = {
        inputs: [
          {
            name: "reason",
            type: "uint256"
          }
        ],
        name: "Panic",
        type: "error"
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/cursor.js
  var NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError;
  var init_cursor = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/cursor.js"() {
      "use strict";
      init_node_compat_inject();
      init_base();
      NegativeOffsetError = class extends BaseError2 {
        constructor({ offset: offset2 }) {
          super(`Offset \`${offset2}\` cannot be negative.`, {
            name: "NegativeOffsetError"
          });
        }
      };
      PositionOutOfBoundsError = class extends BaseError2 {
        constructor({ length: length2, position }) {
          super(`Position \`${position}\` is out of bounds (\`0 < position < ${length2}\`).`, { name: "PositionOutOfBoundsError" });
        }
      };
      RecursiveReadLimitExceededError = class extends BaseError2 {
        constructor({ count, limit }) {
          super(`Recursive read limit of \`${limit}\` exceeded (recursive read count: \`${count}\`).`, { name: "RecursiveReadLimitExceededError" });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/cursor.js
  function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
    const cursor = Object.create(staticCursor);
    cursor.bytes = bytes;
    cursor.dataView = new DataView(bytes.buffer ?? bytes, bytes.byteOffset, bytes.byteLength);
    cursor.positionReadCount = /* @__PURE__ */ new Map();
    cursor.recursiveReadLimit = recursiveReadLimit;
    return cursor;
  }
  var staticCursor;
  var init_cursor2 = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/cursor.js"() {
      "use strict";
      init_node_compat_inject();
      init_cursor();
      staticCursor = {
        bytes: new Uint8Array(),
        dataView: new DataView(new ArrayBuffer(0)),
        position: 0,
        positionReadCount: /* @__PURE__ */ new Map(),
        recursiveReadCount: 0,
        recursiveReadLimit: Number.POSITIVE_INFINITY,
        assertReadLimit() {
          if (this.recursiveReadCount >= this.recursiveReadLimit)
            throw new RecursiveReadLimitExceededError({
              count: this.recursiveReadCount + 1,
              limit: this.recursiveReadLimit
            });
        },
        assertPosition(position) {
          if (position < 0 || position > this.bytes.length - 1)
            throw new PositionOutOfBoundsError({
              length: this.bytes.length,
              position
            });
        },
        decrementPosition(offset2) {
          if (offset2 < 0)
            throw new NegativeOffsetError({ offset: offset2 });
          const position = this.position - offset2;
          this.assertPosition(position);
          this.position = position;
        },
        getReadCount(position) {
          return this.positionReadCount.get(position || this.position) || 0;
        },
        incrementPosition(offset2) {
          if (offset2 < 0)
            throw new NegativeOffsetError({ offset: offset2 });
          const position = this.position + offset2;
          this.assertPosition(position);
          this.position = position;
        },
        inspectByte(position_) {
          const position = position_ ?? this.position;
          this.assertPosition(position);
          return this.bytes[position];
        },
        inspectBytes(length2, position_) {
          const position = position_ ?? this.position;
          this.assertPosition(position + length2 - 1);
          return this.bytes.subarray(position, position + length2);
        },
        inspectUint8(position_) {
          const position = position_ ?? this.position;
          this.assertPosition(position);
          return this.bytes[position];
        },
        inspectUint16(position_) {
          const position = position_ ?? this.position;
          this.assertPosition(position + 1);
          return this.dataView.getUint16(position);
        },
        inspectUint24(position_) {
          const position = position_ ?? this.position;
          this.assertPosition(position + 2);
          return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);
        },
        inspectUint32(position_) {
          const position = position_ ?? this.position;
          this.assertPosition(position + 3);
          return this.dataView.getUint32(position);
        },
        pushByte(byte) {
          this.assertPosition(this.position);
          this.bytes[this.position] = byte;
          this.position++;
        },
        pushBytes(bytes) {
          this.assertPosition(this.position + bytes.length - 1);
          this.bytes.set(bytes, this.position);
          this.position += bytes.length;
        },
        pushUint8(value) {
          this.assertPosition(this.position);
          this.bytes[this.position] = value;
          this.position++;
        },
        pushUint16(value) {
          this.assertPosition(this.position + 1);
          this.dataView.setUint16(this.position, value);
          this.position += 2;
        },
        pushUint24(value) {
          this.assertPosition(this.position + 2);
          this.dataView.setUint16(this.position, value >> 8);
          this.dataView.setUint8(this.position + 2, value & ~4294967040);
          this.position += 3;
        },
        pushUint32(value) {
          this.assertPosition(this.position + 3);
          this.dataView.setUint32(this.position, value);
          this.position += 4;
        },
        readByte() {
          this.assertReadLimit();
          this._touch();
          const value = this.inspectByte();
          this.position++;
          return value;
        },
        readBytes(length2, size5) {
          this.assertReadLimit();
          this._touch();
          const value = this.inspectBytes(length2);
          this.position += size5 ?? length2;
          return value;
        },
        readUint8() {
          this.assertReadLimit();
          this._touch();
          const value = this.inspectUint8();
          this.position += 1;
          return value;
        },
        readUint16() {
          this.assertReadLimit();
          this._touch();
          const value = this.inspectUint16();
          this.position += 2;
          return value;
        },
        readUint24() {
          this.assertReadLimit();
          this._touch();
          const value = this.inspectUint24();
          this.position += 3;
          return value;
        },
        readUint32() {
          this.assertReadLimit();
          this._touch();
          const value = this.inspectUint32();
          this.position += 4;
          return value;
        },
        get remaining() {
          return this.bytes.length - this.position;
        },
        setPosition(position) {
          const oldPosition = this.position;
          this.assertPosition(position);
          this.position = position;
          return () => this.position = oldPosition;
        },
        _touch() {
          if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)
            return;
          const count = this.getReadCount();
          this.positionReadCount.set(this.position, count + 1);
          if (count > 0)
            this.recursiveReadCount++;
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/encoding/fromBytes.js
  function bytesToBigInt(bytes, opts = {}) {
    if (typeof opts.size !== "undefined")
      assertSize(bytes, { size: opts.size });
    const hex3 = bytesToHex(bytes, opts);
    return hexToBigInt(hex3, opts);
  }
  function bytesToBool(bytes_, opts = {}) {
    let bytes = bytes_;
    if (typeof opts.size !== "undefined") {
      assertSize(bytes, { size: opts.size });
      bytes = trim(bytes);
    }
    if (bytes.length > 1 || bytes[0] > 1)
      throw new InvalidBytesBooleanError(bytes);
    return Boolean(bytes[0]);
  }
  function bytesToNumber(bytes, opts = {}) {
    if (typeof opts.size !== "undefined")
      assertSize(bytes, { size: opts.size });
    const hex3 = bytesToHex(bytes, opts);
    return hexToNumber(hex3, opts);
  }
  function bytesToString(bytes_, opts = {}) {
    let bytes = bytes_;
    if (typeof opts.size !== "undefined") {
      assertSize(bytes, { size: opts.size });
      bytes = trim(bytes, { dir: "right" });
    }
    return new TextDecoder().decode(bytes);
  }
  var init_fromBytes = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/encoding/fromBytes.js"() {
      "use strict";
      init_node_compat_inject();
      init_encoding();
      init_trim();
      init_fromHex();
      init_toHex();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js
  function decodeAbiParameters(params, data) {
    const bytes = typeof data === "string" ? hexToBytes(data) : data;
    const cursor = createCursor(bytes);
    if (size(bytes) === 0 && params.length > 0)
      throw new AbiDecodingZeroDataError();
    if (size(data) && size(data) < 32)
      throw new AbiDecodingDataSizeTooSmallError({
        data: typeof data === "string" ? data : bytesToHex(data),
        params,
        size: size(data)
      });
    let consumed = 0;
    const values = [];
    for (let i5 = 0; i5 < params.length; ++i5) {
      const param = params[i5];
      cursor.setPosition(consumed);
      const [data2, consumed_] = decodeParameter(cursor, param, {
        staticPosition: 0
      });
      consumed += consumed_;
      values.push(data2);
    }
    return values;
  }
  function decodeParameter(cursor, param, { staticPosition }) {
    const arrayComponents = getArrayComponents(param.type);
    if (arrayComponents) {
      const [length2, type2] = arrayComponents;
      return decodeArray(cursor, { ...param, type: type2 }, { length: length2, staticPosition });
    }
    if (param.type === "tuple")
      return decodeTuple(cursor, param, { staticPosition });
    if (param.type === "address")
      return decodeAddress(cursor);
    if (param.type === "bool")
      return decodeBool(cursor);
    if (param.type.startsWith("bytes"))
      return decodeBytes(cursor, param, { staticPosition });
    if (param.type.startsWith("uint") || param.type.startsWith("int"))
      return decodeNumber(cursor, param);
    if (param.type === "string")
      return decodeString(cursor, { staticPosition });
    throw new InvalidAbiDecodingTypeError(param.type, {
      docsPath: "/docs/contract/decodeAbiParameters"
    });
  }
  function decodeAddress(cursor) {
    const value = cursor.readBytes(32);
    return [checksumAddress(bytesToHex(sliceBytes(value, -20))), 32];
  }
  function decodeArray(cursor, param, { length: length2, staticPosition }) {
    if (!length2) {
      const offset2 = bytesToNumber(cursor.readBytes(sizeOfOffset));
      const start = staticPosition + offset2;
      const startOfData = start + sizeOfLength;
      cursor.setPosition(start);
      const length3 = bytesToNumber(cursor.readBytes(sizeOfLength));
      const dynamicChild = hasDynamicChild(param);
      let consumed2 = 0;
      const value2 = [];
      for (let i5 = 0; i5 < length3; ++i5) {
        cursor.setPosition(startOfData + (dynamicChild ? i5 * 32 : consumed2));
        const [data, consumed_] = decodeParameter(cursor, param, {
          staticPosition: startOfData
        });
        consumed2 += consumed_;
        value2.push(data);
      }
      cursor.setPosition(staticPosition + 32);
      return [value2, 32];
    }
    if (hasDynamicChild(param)) {
      const offset2 = bytesToNumber(cursor.readBytes(sizeOfOffset));
      const start = staticPosition + offset2;
      const value2 = [];
      for (let i5 = 0; i5 < length2; ++i5) {
        cursor.setPosition(start + i5 * 32);
        const [data] = decodeParameter(cursor, param, {
          staticPosition: start
        });
        value2.push(data);
      }
      cursor.setPosition(staticPosition + 32);
      return [value2, 32];
    }
    let consumed = 0;
    const value = [];
    for (let i5 = 0; i5 < length2; ++i5) {
      const [data, consumed_] = decodeParameter(cursor, param, {
        staticPosition: staticPosition + consumed
      });
      consumed += consumed_;
      value.push(data);
    }
    return [value, consumed];
  }
  function decodeBool(cursor) {
    return [bytesToBool(cursor.readBytes(32), { size: 32 }), 32];
  }
  function decodeBytes(cursor, param, { staticPosition }) {
    const [_6, size5] = param.type.split("bytes");
    if (!size5) {
      const offset2 = bytesToNumber(cursor.readBytes(32));
      cursor.setPosition(staticPosition + offset2);
      const length2 = bytesToNumber(cursor.readBytes(32));
      if (length2 === 0) {
        cursor.setPosition(staticPosition + 32);
        return ["0x", 32];
      }
      const data = cursor.readBytes(length2);
      cursor.setPosition(staticPosition + 32);
      return [bytesToHex(data), 32];
    }
    const value = bytesToHex(cursor.readBytes(Number.parseInt(size5, 10), 32));
    return [value, 32];
  }
  function decodeNumber(cursor, param) {
    const signed = param.type.startsWith("int");
    const size5 = Number.parseInt(param.type.split("int")[1] || "256", 10);
    const value = cursor.readBytes(32);
    return [
      size5 > 48 ? bytesToBigInt(value, { signed }) : bytesToNumber(value, { signed }),
      32
    ];
  }
  function decodeTuple(cursor, param, { staticPosition }) {
    const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name: name2 }) => !name2);
    const value = hasUnnamedChild ? [] : {};
    let consumed = 0;
    if (hasDynamicChild(param)) {
      const offset2 = bytesToNumber(cursor.readBytes(sizeOfOffset));
      const start = staticPosition + offset2;
      for (let i5 = 0; i5 < param.components.length; ++i5) {
        const component = param.components[i5];
        cursor.setPosition(start + consumed);
        const [data, consumed_] = decodeParameter(cursor, component, {
          staticPosition: start
        });
        consumed += consumed_;
        value[hasUnnamedChild ? i5 : component?.name] = data;
      }
      cursor.setPosition(staticPosition + 32);
      return [value, 32];
    }
    for (let i5 = 0; i5 < param.components.length; ++i5) {
      const component = param.components[i5];
      const [data, consumed_] = decodeParameter(cursor, component, {
        staticPosition
      });
      value[hasUnnamedChild ? i5 : component?.name] = data;
      consumed += consumed_;
    }
    return [value, consumed];
  }
  function decodeString(cursor, { staticPosition }) {
    const offset2 = bytesToNumber(cursor.readBytes(32));
    const start = staticPosition + offset2;
    cursor.setPosition(start);
    const length2 = bytesToNumber(cursor.readBytes(32));
    if (length2 === 0) {
      cursor.setPosition(staticPosition + 32);
      return ["", 32];
    }
    const data = cursor.readBytes(length2, 32);
    const value = bytesToString(trim(data));
    cursor.setPosition(staticPosition + 32);
    return [value, 32];
  }
  function hasDynamicChild(param) {
    const { type: type2 } = param;
    if (type2 === "string")
      return true;
    if (type2 === "bytes")
      return true;
    if (type2.endsWith("[]"))
      return true;
    if (type2 === "tuple")
      return param.components?.some(hasDynamicChild);
    const arrayComponents = getArrayComponents(param.type);
    if (arrayComponents && hasDynamicChild({ ...param, type: arrayComponents[1] }))
      return true;
    return false;
  }
  var sizeOfLength, sizeOfOffset;
  var init_decodeAbiParameters = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js"() {
      "use strict";
      init_node_compat_inject();
      init_abi();
      init_getAddress();
      init_cursor2();
      init_size();
      init_slice();
      init_trim();
      init_fromBytes();
      init_toBytes();
      init_toHex();
      init_encodeAbiParameters();
      sizeOfLength = 32;
      sizeOfOffset = 32;
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/decodeErrorResult.js
  function decodeErrorResult(parameters) {
    const { abi: abi2, data, cause } = parameters;
    const signature2 = slice(data, 0, 4);
    if (signature2 === "0x")
      throw new AbiDecodingZeroDataError({ cause });
    const abi_ = [...abi2 || [], solidityError, solidityPanic];
    const abiItem = abi_.find((x13) => x13.type === "error" && signature2 === toFunctionSelector(formatAbiItem2(x13)));
    if (!abiItem)
      throw new AbiErrorSignatureNotFoundError(signature2, {
        docsPath: "/docs/contract/decodeErrorResult",
        cause
      });
    return {
      abiItem,
      args: "inputs" in abiItem && abiItem.inputs && abiItem.inputs.length > 0 ? decodeAbiParameters(abiItem.inputs, slice(data, 4)) : void 0,
      errorName: abiItem.name
    };
  }
  var init_decodeErrorResult = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/decodeErrorResult.js"() {
      "use strict";
      init_node_compat_inject();
      init_solidity();
      init_abi();
      init_slice();
      init_toFunctionSelector();
      init_decodeAbiParameters();
      init_formatAbiItem2();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/stringify.js
  var stringify;
  var init_stringify = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/stringify.js"() {
      "use strict";
      init_node_compat_inject();
      stringify = (value, replacer, space) => JSON.stringify(value, (key2, value_) => {
        const value2 = typeof value_ === "bigint" ? value_.toString() : value_;
        return typeof replacer === "function" ? replacer(key2, value2) : value2;
      }, space);
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js
  function formatAbiItemWithArgs({ abiItem, args, includeFunctionName = true, includeName = false }) {
    if (!("name" in abiItem))
      return;
    if (!("inputs" in abiItem))
      return;
    if (!abiItem.inputs)
      return;
    return `${includeFunctionName ? abiItem.name : ""}(${abiItem.inputs.map((input, i5) => `${includeName && input.name ? `${input.name}: ` : ""}${typeof args[i5] === "object" ? stringify(args[i5]) : args[i5]}`).join(", ")})`;
  }
  var init_formatAbiItemWithArgs = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js"() {
      "use strict";
      init_node_compat_inject();
      init_stringify();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/unit.js
  var etherUnits, gweiUnits;
  var init_unit = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/unit.js"() {
      "use strict";
      init_node_compat_inject();
      etherUnits = {
        gwei: 9,
        wei: 18
      };
      gweiUnits = {
        ether: -9,
        wei: 9
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/unit/formatUnits.js
  function formatUnits(value, decimals) {
    let display = value.toString();
    const negative = display.startsWith("-");
    if (negative)
      display = display.slice(1);
    display = display.padStart(decimals, "0");
    let [integer2, fraction] = [
      display.slice(0, display.length - decimals),
      display.slice(display.length - decimals)
    ];
    fraction = fraction.replace(/(0+)$/, "");
    return `${negative ? "-" : ""}${integer2 || "0"}${fraction ? `.${fraction}` : ""}`;
  }
  var init_formatUnits = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/unit/formatUnits.js"() {
      "use strict";
      init_node_compat_inject();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/unit/formatEther.js
  function formatEther(wei, unit = "wei") {
    return formatUnits(wei, etherUnits[unit]);
  }
  var init_formatEther = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/unit/formatEther.js"() {
      "use strict";
      init_node_compat_inject();
      init_unit();
      init_formatUnits();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/unit/formatGwei.js
  function formatGwei(wei, unit = "wei") {
    return formatUnits(wei, gweiUnits[unit]);
  }
  var init_formatGwei = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/unit/formatGwei.js"() {
      "use strict";
      init_node_compat_inject();
      init_unit();
      init_formatUnits();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/stateOverride.js
  function prettyStateMapping(stateMapping) {
    return stateMapping.reduce((pretty, { slot, value }) => {
      return `${pretty}        ${slot}: ${value}
`;
    }, "");
  }
  function prettyStateOverride(stateOverride) {
    return stateOverride.reduce((pretty, { address, ...state }) => {
      let val = `${pretty}    ${address}:
`;
      if (state.nonce)
        val += `      nonce: ${state.nonce}
`;
      if (state.balance)
        val += `      balance: ${state.balance}
`;
      if (state.code)
        val += `      code: ${state.code}
`;
      if (state.state) {
        val += "      state:\n";
        val += prettyStateMapping(state.state);
      }
      if (state.stateDiff) {
        val += "      stateDiff:\n";
        val += prettyStateMapping(state.stateDiff);
      }
      return val;
    }, "  State Override:\n").slice(0, -1);
  }
  var AccountStateConflictError, StateAssignmentConflictError;
  var init_stateOverride = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/stateOverride.js"() {
      "use strict";
      init_node_compat_inject();
      init_base();
      AccountStateConflictError = class extends BaseError2 {
        constructor({ address }) {
          super(`State for account "${address}" is set multiple times.`, {
            name: "AccountStateConflictError"
          });
        }
      };
      StateAssignmentConflictError = class extends BaseError2 {
        constructor() {
          super("state and stateDiff are set on the same account.", {
            name: "StateAssignmentConflictError"
          });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/transaction.js
  function prettyPrint(args) {
    const entries = Object.entries(args).map(([key2, value]) => {
      if (value === void 0 || value === false)
        return null;
      return [key2, value];
    }).filter(Boolean);
    const maxLength = entries.reduce((acc, [key2]) => Math.max(acc, key2.length), 0);
    return entries.map(([key2, value]) => `  ${`${key2}:`.padEnd(maxLength + 1)}  ${value}`).join("\n");
  }
  var InvalidLegacyVError, InvalidSerializableTransactionError, InvalidStorageKeySizeError, TransactionExecutionError, TransactionNotFoundError, TransactionReceiptNotFoundError, TransactionReceiptRevertedError, WaitForTransactionReceiptTimeoutError;
  var init_transaction = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/transaction.js"() {
      "use strict";
      init_node_compat_inject();
      init_formatEther();
      init_formatGwei();
      init_base();
      InvalidLegacyVError = class extends BaseError2 {
        constructor({ v: v13 }) {
          super(`Invalid \`v\` value "${v13}". Expected 27 or 28.`, {
            name: "InvalidLegacyVError"
          });
        }
      };
      InvalidSerializableTransactionError = class extends BaseError2 {
        constructor({ transaction }) {
          super("Cannot infer a transaction type from provided transaction.", {
            metaMessages: [
              "Provided Transaction:",
              "{",
              prettyPrint(transaction),
              "}",
              "",
              "To infer the type, either provide:",
              "- a `type` to the Transaction, or",
              "- an EIP-1559 Transaction with `maxFeePerGas`, or",
              "- an EIP-2930 Transaction with `gasPrice` & `accessList`, or",
              "- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or",
              "- an EIP-7702 Transaction with `authorizationList`, or",
              "- a Legacy Transaction with `gasPrice`"
            ],
            name: "InvalidSerializableTransactionError"
          });
        }
      };
      InvalidStorageKeySizeError = class extends BaseError2 {
        constructor({ storageKey }) {
          super(`Size for storage key "${storageKey}" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
        }
      };
      TransactionExecutionError = class extends BaseError2 {
        constructor(cause, { account, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to: to3, value }) {
          const prettyArgs = prettyPrint({
            chain: chain2 && `${chain2?.name} (id: ${chain2?.id})`,
            from: account?.address,
            to: to3,
            value: typeof value !== "undefined" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || "ETH"}`,
            data,
            gas,
            gasPrice: typeof gasPrice !== "undefined" && `${formatGwei(gasPrice)} gwei`,
            maxFeePerGas: typeof maxFeePerGas !== "undefined" && `${formatGwei(maxFeePerGas)} gwei`,
            maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== "undefined" && `${formatGwei(maxPriorityFeePerGas)} gwei`,
            nonce
          });
          super(cause.shortMessage, {
            cause,
            docsPath: docsPath8,
            metaMessages: [
              ...cause.metaMessages ? [...cause.metaMessages, " "] : [],
              "Request Arguments:",
              prettyArgs
            ].filter(Boolean),
            name: "TransactionExecutionError"
          });
          Object.defineProperty(this, "cause", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.cause = cause;
        }
      };
      TransactionNotFoundError = class extends BaseError2 {
        constructor({ blockHash, blockNumber, blockTag, hash: hash5, index: index2 }) {
          let identifier = "Transaction";
          if (blockTag && index2 !== void 0)
            identifier = `Transaction at block time "${blockTag}" at index "${index2}"`;
          if (blockHash && index2 !== void 0)
            identifier = `Transaction at block hash "${blockHash}" at index "${index2}"`;
          if (blockNumber && index2 !== void 0)
            identifier = `Transaction at block number "${blockNumber}" at index "${index2}"`;
          if (hash5)
            identifier = `Transaction with hash "${hash5}"`;
          super(`${identifier} could not be found.`, {
            name: "TransactionNotFoundError"
          });
        }
      };
      TransactionReceiptNotFoundError = class extends BaseError2 {
        constructor({ hash: hash5 }) {
          super(`Transaction receipt with hash "${hash5}" could not be found. The Transaction may not be processed on a block yet.`, {
            name: "TransactionReceiptNotFoundError"
          });
        }
      };
      TransactionReceiptRevertedError = class extends BaseError2 {
        constructor({ receipt }) {
          super(`Transaction with hash "${receipt.transactionHash}" reverted.`, {
            metaMessages: [
              'The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.',
              " ",
              "You can attempt to extract the revert reason by:",
              "- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract",
              "- using the `call` Action with raw `data`"
            ],
            name: "TransactionReceiptRevertedError"
          });
          Object.defineProperty(this, "receipt", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.receipt = receipt;
        }
      };
      WaitForTransactionReceiptTimeoutError = class extends BaseError2 {
        constructor({ hash: hash5 }) {
          super(`Timed out while waiting for transaction with hash "${hash5}" to be confirmed.`, { name: "WaitForTransactionReceiptTimeoutError" });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/utils.js
  function getAbortError(signal) {
    if (signal?.reason)
      return signal.reason;
    if (typeof DOMException === "function")
      return new DOMException("This operation was aborted", "AbortError");
    const error51 = new Error("This operation was aborted");
    error51.name = "AbortError";
    return error51;
  }
  function isAbortError(error51) {
    return typeof error51 === "object" && error51 !== null && "name" in error51 && error51.name === "AbortError";
  }
  var getContractAddress, getUrl;
  var init_utils3 = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/utils.js"() {
      "use strict";
      init_node_compat_inject();
      getContractAddress = (address) => address;
      getUrl = (url2) => {
        try {
          const parsed = new URL(url2);
          if (!parsed.username && !parsed.password)
            return url2;
          parsed.username = "";
          parsed.password = "";
          return parsed.toString();
        } catch {
          return url2;
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/contract.js
  var CallExecutionError, ContractFunctionExecutionError, ContractFunctionRevertedError, ContractFunctionZeroDataError, CounterfactualDeploymentFailedError, RawContractError;
  var init_contract = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/contract.js"() {
      "use strict";
      init_node_compat_inject();
      init_parseAccount();
      init_solidity();
      init_decodeErrorResult();
      init_formatAbiItem2();
      init_formatAbiItemWithArgs();
      init_getAbiItem();
      init_formatEther();
      init_formatGwei();
      init_abi();
      init_base();
      init_stateOverride();
      init_transaction();
      init_utils3();
      CallExecutionError = class extends BaseError2 {
        constructor(cause, { account: account_, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to: to3, value, stateOverride }) {
          const account = account_ ? parseAccount(account_) : void 0;
          let prettyArgs = prettyPrint({
            from: account?.address,
            to: to3,
            value: typeof value !== "undefined" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || "ETH"}`,
            data,
            gas,
            gasPrice: typeof gasPrice !== "undefined" && `${formatGwei(gasPrice)} gwei`,
            maxFeePerGas: typeof maxFeePerGas !== "undefined" && `${formatGwei(maxFeePerGas)} gwei`,
            maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== "undefined" && `${formatGwei(maxPriorityFeePerGas)} gwei`,
            nonce
          });
          if (stateOverride) {
            prettyArgs += `
${prettyStateOverride(stateOverride)}`;
          }
          super(cause.shortMessage, {
            cause,
            docsPath: docsPath8,
            metaMessages: [
              ...cause.metaMessages ? [...cause.metaMessages, " "] : [],
              "Raw Call Arguments:",
              prettyArgs
            ].filter(Boolean),
            name: "CallExecutionError"
          });
          Object.defineProperty(this, "cause", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.cause = cause;
        }
      };
      ContractFunctionExecutionError = class extends BaseError2 {
        constructor(cause, { abi: abi2, args, contractAddress, docsPath: docsPath8, functionName, sender }) {
          const abiItem = getAbiItem({ abi: abi2, args, name: functionName });
          const formattedArgs = abiItem ? formatAbiItemWithArgs({
            abiItem,
            args,
            includeFunctionName: false,
            includeName: false
          }) : void 0;
          const functionWithParams = abiItem ? formatAbiItem2(abiItem, { includeName: true }) : void 0;
          const prettyArgs = prettyPrint({
            address: contractAddress && getContractAddress(contractAddress),
            function: functionWithParams,
            args: formattedArgs && formattedArgs !== "()" && `${[...Array(functionName?.length ?? 0).keys()].map(() => " ").join("")}${formattedArgs}`,
            sender
          });
          super(cause.shortMessage || `An unknown error occurred while executing the contract function "${functionName}".`, {
            cause,
            docsPath: docsPath8,
            metaMessages: [
              ...cause.metaMessages ? [...cause.metaMessages, " "] : [],
              prettyArgs && "Contract Call:",
              prettyArgs
            ].filter(Boolean),
            name: "ContractFunctionExecutionError"
          });
          Object.defineProperty(this, "abi", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "args", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "cause", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "contractAddress", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "formattedArgs", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "functionName", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "sender", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.abi = abi2;
          this.args = args;
          this.cause = cause;
          this.contractAddress = contractAddress;
          this.functionName = functionName;
          this.sender = sender;
        }
      };
      ContractFunctionRevertedError = class extends BaseError2 {
        constructor({ abi: abi2, data, functionName, message, cause: error51 }) {
          let cause;
          let decodedData;
          let metaMessages;
          let reason;
          if (data && data !== "0x") {
            try {
              decodedData = decodeErrorResult({ abi: abi2, data, cause: error51 });
              const { abiItem, errorName, args: errorArgs } = decodedData;
              if (errorName === "Error") {
                reason = errorArgs[0];
              } else if (errorName === "Panic") {
                const [firstArg] = errorArgs;
                reason = panicReasons[firstArg];
              } else {
                const errorWithParams = abiItem ? formatAbiItem2(abiItem, { includeName: true }) : void 0;
                const formattedArgs = abiItem && errorArgs ? formatAbiItemWithArgs({
                  abiItem,
                  args: errorArgs,
                  includeFunctionName: false,
                  includeName: false
                }) : void 0;
                metaMessages = [
                  errorWithParams ? `Error: ${errorWithParams}` : "",
                  formattedArgs && formattedArgs !== "()" ? `       ${[...Array(errorName?.length ?? 0).keys()].map(() => " ").join("")}${formattedArgs}` : ""
                ];
              }
            } catch (err2) {
              cause = err2;
            }
          } else if (message)
            reason = message;
          let signature2;
          if (cause instanceof AbiErrorSignatureNotFoundError) {
            signature2 = cause.signature;
            metaMessages = [
              `Unable to decode signature "${signature2}" as it was not found on the provided ABI.`,
              "Make sure you are using the correct ABI and that the error exists on it.",
              `You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${signature2}.`
            ];
          }
          super(reason && reason !== "execution reverted" || signature2 ? [
            `The contract function "${functionName}" reverted with the following ${signature2 ? "signature" : "reason"}:`,
            reason || signature2
          ].join("\n") : `The contract function "${functionName}" reverted.`, {
            cause: cause ?? error51,
            metaMessages,
            name: "ContractFunctionRevertedError"
          });
          Object.defineProperty(this, "data", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "raw", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "reason", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "signature", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.data = decodedData;
          this.raw = data;
          this.reason = reason;
          this.signature = signature2;
        }
      };
      ContractFunctionZeroDataError = class extends BaseError2 {
        constructor({ functionName, cause }) {
          super(`The contract function "${functionName}" returned no data ("0x").`, {
            metaMessages: [
              "This could be due to any of the following:",
              `  - The contract does not have the function "${functionName}",`,
              "  - The parameters passed to the contract function may be invalid, or",
              "  - The address is not a contract."
            ],
            name: "ContractFunctionZeroDataError",
            cause
          });
        }
      };
      CounterfactualDeploymentFailedError = class extends BaseError2 {
        constructor({ factory }) {
          super(`Deployment for counterfactual contract call failed${factory ? ` for factory "${factory}".` : ""}`, {
            metaMessages: [
              "Please ensure:",
              "- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).",
              "- The `factoryData` is a valid encoded function call for contract deployment function on the factory."
            ],
            name: "CounterfactualDeploymentFailedError"
          });
        }
      };
      RawContractError = class extends BaseError2 {
        constructor({ data, message }) {
          super(message || "", { name: "RawContractError" });
          Object.defineProperty(this, "code", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: 3
          });
          Object.defineProperty(this, "data", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.data = data;
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/request.js
  var HttpRequestError, RpcRequestError, TimeoutError;
  var init_request = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/request.js"() {
      "use strict";
      init_node_compat_inject();
      init_stringify();
      init_base();
      init_utils3();
      HttpRequestError = class extends BaseError2 {
        constructor({ body, cause, details, headers, status, url: url2 }) {
          super("HTTP request failed.", {
            cause,
            details,
            metaMessages: [
              status && `Status: ${status}`,
              `URL: ${getUrl(url2)}`,
              body && `Request body: ${stringify(body)}`
            ].filter(Boolean),
            name: "HttpRequestError"
          });
          Object.defineProperty(this, "body", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "headers", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "status", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "url", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.body = body;
          this.headers = headers;
          this.status = status;
          this.url = url2;
        }
      };
      RpcRequestError = class extends BaseError2 {
        constructor({ body, error: error51, url: url2 }) {
          super("RPC Request failed.", {
            cause: error51,
            details: error51.message,
            metaMessages: [`URL: ${getUrl(url2)}`, `Request body: ${stringify(body)}`],
            name: "RpcRequestError"
          });
          Object.defineProperty(this, "code", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "data", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "url", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.code = error51.code;
          this.data = error51.data;
          this.url = url2;
        }
      };
      TimeoutError = class extends BaseError2 {
        constructor({ body, url: url2 }) {
          super("The request took too long to respond.", {
            details: "The request timed out.",
            metaMessages: [`URL: ${getUrl(url2)}`, `Request body: ${stringify(body)}`],
            name: "TimeoutError"
          });
          Object.defineProperty(this, "url", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.url = url2;
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/rpc.js
  var unknownErrorCode, RpcError, ProviderRpcError, ParseRpcError, InvalidRequestRpcError, MethodNotFoundRpcError, InvalidParamsRpcError, InternalRpcError, InvalidInputRpcError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, TransactionRejectedRpcError, MethodNotSupportedRpcError, LimitExceededRpcError, JsonRpcVersionUnsupportedError, UserRejectedRequestError, UnauthorizedProviderError, UnsupportedProviderMethodError, ProviderDisconnectedError, ChainDisconnectedError, SwitchChainError, UnsupportedNonOptionalCapabilityError, UnsupportedChainIdError, DuplicateIdError, UnknownBundleIdError, BundleTooLargeError, AtomicReadyWalletRejectedUpgradeError, AtomicityNotSupportedError, WalletConnectSessionSettlementError, UnknownRpcError;
  var init_rpc = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/rpc.js"() {
      "use strict";
      init_node_compat_inject();
      init_base();
      init_request();
      unknownErrorCode = -1;
      RpcError = class extends BaseError2 {
        constructor(cause, { code: code2, docsPath: docsPath8, metaMessages, name: name2, shortMessage }) {
          super(shortMessage, {
            cause,
            docsPath: docsPath8,
            metaMessages: metaMessages || cause?.metaMessages,
            name: name2 || "RpcError"
          });
          Object.defineProperty(this, "code", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.name = name2 || cause.name;
          this.code = cause instanceof RpcRequestError ? cause.code : code2 ?? unknownErrorCode;
        }
      };
      ProviderRpcError = class extends RpcError {
        constructor(cause, options) {
          super(cause, options);
          Object.defineProperty(this, "data", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          this.data = options.data;
        }
      };
      ParseRpcError = class _ParseRpcError extends RpcError {
        constructor(cause) {
          super(cause, {
            code: _ParseRpcError.code,
            name: "ParseRpcError",
            shortMessage: "Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."
          });
        }
      };
      Object.defineProperty(ParseRpcError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: -32700
      });
      InvalidRequestRpcError = class _InvalidRequestRpcError extends RpcError {
        constructor(cause) {
          super(cause, {
            code: _InvalidRequestRpcError.code,
            name: "InvalidRequestRpcError",
            shortMessage: "JSON is not a valid request object."
          });
        }
      };
      Object.defineProperty(InvalidRequestRpcError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: -32600
      });
      MethodNotFoundRpcError = class _MethodNotFoundRpcError extends RpcError {
        constructor(cause, { method } = {}) {
          super(cause, {
            code: _MethodNotFoundRpcError.code,
            name: "MethodNotFoundRpcError",
            shortMessage: `The method${method ? ` "${method}"` : ""} does not exist / is not available.`
          });
        }
      };
      Object.defineProperty(MethodNotFoundRpcError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: -32601
      });
      InvalidParamsRpcError = class _InvalidParamsRpcError extends RpcError {
        constructor(cause) {
          super(cause, {
            code: _InvalidParamsRpcError.code,
            name: "InvalidParamsRpcError",
            shortMessage: [
              "Invalid parameters were provided to the RPC method.",
              "Double check you have provided the correct parameters."
            ].join("\n")
          });
        }
      };
      Object.defineProperty(InvalidParamsRpcError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: -32602
      });
      InternalRpcError = class _InternalRpcError extends RpcError {
        constructor(cause) {
          super(cause, {
            code: _InternalRpcError.code,
            name: "InternalRpcError",
            shortMessage: "An internal error was received."
          });
        }
      };
      Object.defineProperty(InternalRpcError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: -32603
      });
      InvalidInputRpcError = class _InvalidInputRpcError extends RpcError {
        constructor(cause) {
          super(cause, {
            code: _InvalidInputRpcError.code,
            name: "InvalidInputRpcError",
            shortMessage: [
              "Missing or invalid parameters.",
              "Double check you have provided the correct parameters."
            ].join("\n")
          });
        }
      };
      Object.defineProperty(InvalidInputRpcError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: -32e3
      });
      ResourceNotFoundRpcError = class _ResourceNotFoundRpcError extends RpcError {
        constructor(cause) {
          super(cause, {
            code: _ResourceNotFoundRpcError.code,
            name: "ResourceNotFoundRpcError",
            shortMessage: "Requested resource not found."
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "ResourceNotFoundRpcError"
          });
        }
      };
      Object.defineProperty(ResourceNotFoundRpcError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: -32001
      });
      ResourceUnavailableRpcError = class _ResourceUnavailableRpcError extends RpcError {
        constructor(cause) {
          super(cause, {
            code: _ResourceUnavailableRpcError.code,
            name: "ResourceUnavailableRpcError",
            shortMessage: "Requested resource not available."
          });
        }
      };
      Object.defineProperty(ResourceUnavailableRpcError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: -32002
      });
      TransactionRejectedRpcError = class _TransactionRejectedRpcError extends RpcError {
        constructor(cause) {
          super(cause, {
            code: _TransactionRejectedRpcError.code,
            name: "TransactionRejectedRpcError",
            shortMessage: "Transaction creation failed."
          });
        }
      };
      Object.defineProperty(TransactionRejectedRpcError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: -32003
      });
      MethodNotSupportedRpcError = class _MethodNotSupportedRpcError extends RpcError {
        constructor(cause, { method } = {}) {
          super(cause, {
            code: _MethodNotSupportedRpcError.code,
            name: "MethodNotSupportedRpcError",
            shortMessage: `Method${method ? ` "${method}"` : ""} is not supported.`
          });
        }
      };
      Object.defineProperty(MethodNotSupportedRpcError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: -32004
      });
      LimitExceededRpcError = class _LimitExceededRpcError extends RpcError {
        constructor(cause) {
          super(cause, {
            code: _LimitExceededRpcError.code,
            name: "LimitExceededRpcError",
            shortMessage: "Request exceeds defined limit."
          });
        }
      };
      Object.defineProperty(LimitExceededRpcError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: -32005
      });
      JsonRpcVersionUnsupportedError = class _JsonRpcVersionUnsupportedError extends RpcError {
        constructor(cause) {
          super(cause, {
            code: _JsonRpcVersionUnsupportedError.code,
            name: "JsonRpcVersionUnsupportedError",
            shortMessage: "Version of JSON-RPC protocol is not supported."
          });
        }
      };
      Object.defineProperty(JsonRpcVersionUnsupportedError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: -32006
      });
      UserRejectedRequestError = class _UserRejectedRequestError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _UserRejectedRequestError.code,
            name: "UserRejectedRequestError",
            shortMessage: "User rejected the request."
          });
        }
      };
      Object.defineProperty(UserRejectedRequestError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 4001
      });
      UnauthorizedProviderError = class _UnauthorizedProviderError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _UnauthorizedProviderError.code,
            name: "UnauthorizedProviderError",
            shortMessage: "The requested method and/or account has not been authorized by the user."
          });
        }
      };
      Object.defineProperty(UnauthorizedProviderError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 4100
      });
      UnsupportedProviderMethodError = class _UnsupportedProviderMethodError extends ProviderRpcError {
        constructor(cause, { method } = {}) {
          super(cause, {
            code: _UnsupportedProviderMethodError.code,
            name: "UnsupportedProviderMethodError",
            shortMessage: `The Provider does not support the requested method${method ? ` " ${method}"` : ""}.`
          });
        }
      };
      Object.defineProperty(UnsupportedProviderMethodError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 4200
      });
      ProviderDisconnectedError = class _ProviderDisconnectedError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _ProviderDisconnectedError.code,
            name: "ProviderDisconnectedError",
            shortMessage: "The Provider is disconnected from all chains."
          });
        }
      };
      Object.defineProperty(ProviderDisconnectedError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 4900
      });
      ChainDisconnectedError = class _ChainDisconnectedError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _ChainDisconnectedError.code,
            name: "ChainDisconnectedError",
            shortMessage: "The Provider is not connected to the requested chain."
          });
        }
      };
      Object.defineProperty(ChainDisconnectedError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 4901
      });
      SwitchChainError = class _SwitchChainError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _SwitchChainError.code,
            name: "SwitchChainError",
            shortMessage: "An error occurred when attempting to switch chain."
          });
        }
      };
      Object.defineProperty(SwitchChainError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 4902
      });
      UnsupportedNonOptionalCapabilityError = class _UnsupportedNonOptionalCapabilityError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _UnsupportedNonOptionalCapabilityError.code,
            name: "UnsupportedNonOptionalCapabilityError",
            shortMessage: "This Wallet does not support a capability that was not marked as optional."
          });
        }
      };
      Object.defineProperty(UnsupportedNonOptionalCapabilityError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 5700
      });
      UnsupportedChainIdError = class _UnsupportedChainIdError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _UnsupportedChainIdError.code,
            name: "UnsupportedChainIdError",
            shortMessage: "This Wallet does not support the requested chain ID."
          });
        }
      };
      Object.defineProperty(UnsupportedChainIdError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 5710
      });
      DuplicateIdError = class _DuplicateIdError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _DuplicateIdError.code,
            name: "DuplicateIdError",
            shortMessage: "There is already a bundle submitted with this ID."
          });
        }
      };
      Object.defineProperty(DuplicateIdError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 5720
      });
      UnknownBundleIdError = class _UnknownBundleIdError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _UnknownBundleIdError.code,
            name: "UnknownBundleIdError",
            shortMessage: "This bundle id is unknown / has not been submitted"
          });
        }
      };
      Object.defineProperty(UnknownBundleIdError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 5730
      });
      BundleTooLargeError = class _BundleTooLargeError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _BundleTooLargeError.code,
            name: "BundleTooLargeError",
            shortMessage: "The call bundle is too large for the Wallet to process."
          });
        }
      };
      Object.defineProperty(BundleTooLargeError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 5740
      });
      AtomicReadyWalletRejectedUpgradeError = class _AtomicReadyWalletRejectedUpgradeError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _AtomicReadyWalletRejectedUpgradeError.code,
            name: "AtomicReadyWalletRejectedUpgradeError",
            shortMessage: "The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."
          });
        }
      };
      Object.defineProperty(AtomicReadyWalletRejectedUpgradeError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 5750
      });
      AtomicityNotSupportedError = class _AtomicityNotSupportedError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _AtomicityNotSupportedError.code,
            name: "AtomicityNotSupportedError",
            shortMessage: "The wallet does not support atomic execution but the request requires it."
          });
        }
      };
      Object.defineProperty(AtomicityNotSupportedError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 5760
      });
      WalletConnectSessionSettlementError = class _WalletConnectSessionSettlementError extends ProviderRpcError {
        constructor(cause) {
          super(cause, {
            code: _WalletConnectSessionSettlementError.code,
            name: "WalletConnectSessionSettlementError",
            shortMessage: "WalletConnect session settlement failed."
          });
        }
      };
      Object.defineProperty(WalletConnectSessionSettlementError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 7e3
      });
      UnknownRpcError = class extends RpcError {
        constructor(cause) {
          super(cause, {
            name: "UnknownRpcError",
            shortMessage: "An unknown RPC error occurred."
          });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js
  function setBigUint64(view, byteOffset, value, isLE3) {
    if (typeof view.setBigUint64 === "function")
      return view.setBigUint64(byteOffset, value, isLE3);
    const _32n3 = BigInt(32);
    const _u32_max = BigInt(4294967295);
    const wh = Number(value >> _32n3 & _u32_max);
    const wl = Number(value & _u32_max);
    const h8 = isLE3 ? 4 : 0;
    const l6 = isLE3 ? 0 : 4;
    view.setUint32(byteOffset + h8, wh, isLE3);
    view.setUint32(byteOffset + l6, wl, isLE3);
  }
  function Chi(a5, b9, c7) {
    return a5 & b9 ^ ~a5 & c7;
  }
  function Maj(a5, b9, c7) {
    return a5 & b9 ^ a5 & c7 ^ b9 & c7;
  }
  var HashMD, SHA256_IV, SHA384_IV, SHA512_IV;
  var init_md = __esm({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js"() {
      "use strict";
      init_node_compat_inject();
      init_utils2();
      HashMD = class extends Hash {
        constructor(blockLen, outputLen, padOffset, isLE3) {
          super();
          this.finished = false;
          this.length = 0;
          this.pos = 0;
          this.destroyed = false;
          this.blockLen = blockLen;
          this.outputLen = outputLen;
          this.padOffset = padOffset;
          this.isLE = isLE3;
          this.buffer = new Uint8Array(blockLen);
          this.view = createView(this.buffer);
        }
        update(data) {
          aexists(this);
          data = toBytes2(data);
          abytes(data);
          const { view, buffer: buffer2, blockLen } = this;
          const len = data.length;
          for (let pos = 0; pos < len; ) {
            const take = Math.min(blockLen - this.pos, len - pos);
            if (take === blockLen) {
              const dataView = createView(data);
              for (; blockLen <= len - pos; pos += blockLen)
                this.process(dataView, pos);
              continue;
            }
            buffer2.set(data.subarray(pos, pos + take), this.pos);
            this.pos += take;
            pos += take;
            if (this.pos === blockLen) {
              this.process(view, 0);
              this.pos = 0;
            }
          }
          this.length += data.length;
          this.roundClean();
          return this;
        }
        digestInto(out) {
          aexists(this);
          aoutput(out, this);
          this.finished = true;
          const { buffer: buffer2, view, blockLen, isLE: isLE3 } = this;
          let { pos } = this;
          buffer2[pos++] = 128;
          clean(this.buffer.subarray(pos));
          if (this.padOffset > blockLen - pos) {
            this.process(view, 0);
            pos = 0;
          }
          for (let i5 = pos; i5 < blockLen; i5++)
            buffer2[i5] = 0;
          setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE3);
          this.process(view, 0);
          const oview = createView(out);
          const len = this.outputLen;
          if (len % 4)
            throw new Error("_sha2: outputLen should be aligned to 32bit");
          const outLen = len / 4;
          const state = this.get();
          if (outLen > state.length)
            throw new Error("_sha2: outputLen bigger than state");
          for (let i5 = 0; i5 < outLen; i5++)
            oview.setUint32(4 * i5, state[i5], isLE3);
        }
        digest() {
          const { buffer: buffer2, outputLen } = this;
          this.digestInto(buffer2);
          const res = buffer2.slice(0, outputLen);
          this.destroy();
          return res;
        }
        _cloneInto(to3) {
          to3 || (to3 = new this.constructor());
          to3.set(...this.get());
          const { blockLen, buffer: buffer2, length: length2, finished, destroyed, pos } = this;
          to3.destroyed = destroyed;
          to3.finished = finished;
          to3.length = length2;
          to3.pos = pos;
          if (length2 % blockLen)
            to3.buffer.set(buffer2);
          return to3;
        }
        clone() {
          return this._cloneInto();
        }
      };
      SHA256_IV = /* @__PURE__ */ Uint32Array.from([
        1779033703,
        3144134277,
        1013904242,
        2773480762,
        1359893119,
        2600822924,
        528734635,
        1541459225
      ]);
      SHA384_IV = /* @__PURE__ */ Uint32Array.from([
        3418070365,
        3238371032,
        1654270250,
        914150663,
        2438529370,
        812702999,
        355462360,
        4144912697,
        1731405415,
        4290775857,
        2394180231,
        1750603025,
        3675008525,
        1694076839,
        1203062813,
        3204075428
      ]);
      SHA512_IV = /* @__PURE__ */ Uint32Array.from([
        1779033703,
        4089235720,
        3144134277,
        2227873595,
        1013904242,
        4271175723,
        2773480762,
        1595750129,
        1359893119,
        2917565137,
        2600822924,
        725511199,
        528734635,
        4215389547,
        1541459225,
        327033209
      ]);
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js
  var SHA256_K, SHA256_W, SHA256, K512, SHA512_Kh, SHA512_Kl, SHA512_W_H, SHA512_W_L, SHA512, SHA384, sha256, sha512, sha384;
  var init_sha2 = __esm({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js"() {
      "use strict";
      init_node_compat_inject();
      init_md();
      init_u64();
      init_utils2();
      SHA256_K = /* @__PURE__ */ Uint32Array.from([
        1116352408,
        1899447441,
        3049323471,
        3921009573,
        961987163,
        1508970993,
        2453635748,
        2870763221,
        3624381080,
        310598401,
        607225278,
        1426881987,
        1925078388,
        2162078206,
        2614888103,
        3248222580,
        3835390401,
        4022224774,
        264347078,
        604807628,
        770255983,
        1249150122,
        1555081692,
        1996064986,
        2554220882,
        2821834349,
        2952996808,
        3210313671,
        3336571891,
        3584528711,
        113926993,
        338241895,
        666307205,
        773529912,
        1294757372,
        1396182291,
        1695183700,
        1986661051,
        2177026350,
        2456956037,
        2730485921,
        2820302411,
        3259730800,
        3345764771,
        3516065817,
        3600352804,
        4094571909,
        275423344,
        430227734,
        506948616,
        659060556,
        883997877,
        958139571,
        1322822218,
        1537002063,
        1747873779,
        1955562222,
        2024104815,
        2227730452,
        2361852424,
        2428436474,
        2756734187,
        3204031479,
        3329325298
      ]);
      SHA256_W = /* @__PURE__ */ new Uint32Array(64);
      SHA256 = class extends HashMD {
        constructor(outputLen = 32) {
          super(64, outputLen, 8, false);
          this.A = SHA256_IV[0] | 0;
          this.B = SHA256_IV[1] | 0;
          this.C = SHA256_IV[2] | 0;
          this.D = SHA256_IV[3] | 0;
          this.E = SHA256_IV[4] | 0;
          this.F = SHA256_IV[5] | 0;
          this.G = SHA256_IV[6] | 0;
          this.H = SHA256_IV[7] | 0;
        }
        get() {
          const { A: A7, B: B7, C: C9, D: D7, E: E6, F: F6, G: G6, H: H6 } = this;
          return [A7, B7, C9, D7, E6, F6, G6, H6];
        }
        // prettier-ignore
        set(A7, B7, C9, D7, E6, F6, G6, H6) {
          this.A = A7 | 0;
          this.B = B7 | 0;
          this.C = C9 | 0;
          this.D = D7 | 0;
          this.E = E6 | 0;
          this.F = F6 | 0;
          this.G = G6 | 0;
          this.H = H6 | 0;
        }
        process(view, offset2) {
          for (let i5 = 0; i5 < 16; i5++, offset2 += 4)
            SHA256_W[i5] = view.getUint32(offset2, false);
          for (let i5 = 16; i5 < 64; i5++) {
            const W15 = SHA256_W[i5 - 15];
            const W22 = SHA256_W[i5 - 2];
            const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;
            const s1 = rotr(W22, 17) ^ rotr(W22, 19) ^ W22 >>> 10;
            SHA256_W[i5] = s1 + SHA256_W[i5 - 7] + s0 + SHA256_W[i5 - 16] | 0;
          }
          let { A: A7, B: B7, C: C9, D: D7, E: E6, F: F6, G: G6, H: H6 } = this;
          for (let i5 = 0; i5 < 64; i5++) {
            const sigma1 = rotr(E6, 6) ^ rotr(E6, 11) ^ rotr(E6, 25);
            const T1 = H6 + sigma1 + Chi(E6, F6, G6) + SHA256_K[i5] + SHA256_W[i5] | 0;
            const sigma0 = rotr(A7, 2) ^ rotr(A7, 13) ^ rotr(A7, 22);
            const T22 = sigma0 + Maj(A7, B7, C9) | 0;
            H6 = G6;
            G6 = F6;
            F6 = E6;
            E6 = D7 + T1 | 0;
            D7 = C9;
            C9 = B7;
            B7 = A7;
            A7 = T1 + T22 | 0;
          }
          A7 = A7 + this.A | 0;
          B7 = B7 + this.B | 0;
          C9 = C9 + this.C | 0;
          D7 = D7 + this.D | 0;
          E6 = E6 + this.E | 0;
          F6 = F6 + this.F | 0;
          G6 = G6 + this.G | 0;
          H6 = H6 + this.H | 0;
          this.set(A7, B7, C9, D7, E6, F6, G6, H6);
        }
        roundClean() {
          clean(SHA256_W);
        }
        destroy() {
          this.set(0, 0, 0, 0, 0, 0, 0, 0);
          clean(this.buffer);
        }
      };
      K512 = /* @__PURE__ */ (() => split([
        "0x428a2f98d728ae22",
        "0x7137449123ef65cd",
        "0xb5c0fbcfec4d3b2f",
        "0xe9b5dba58189dbbc",
        "0x3956c25bf348b538",
        "0x59f111f1b605d019",
        "0x923f82a4af194f9b",
        "0xab1c5ed5da6d8118",
        "0xd807aa98a3030242",
        "0x12835b0145706fbe",
        "0x243185be4ee4b28c",
        "0x550c7dc3d5ffb4e2",
        "0x72be5d74f27b896f",
        "0x80deb1fe3b1696b1",
        "0x9bdc06a725c71235",
        "0xc19bf174cf692694",
        "0xe49b69c19ef14ad2",
        "0xefbe4786384f25e3",
        "0x0fc19dc68b8cd5b5",
        "0x240ca1cc77ac9c65",
        "0x2de92c6f592b0275",
        "0x4a7484aa6ea6e483",
        "0x5cb0a9dcbd41fbd4",
        "0x76f988da831153b5",
        "0x983e5152ee66dfab",
        "0xa831c66d2db43210",
        "0xb00327c898fb213f",
        "0xbf597fc7beef0ee4",
        "0xc6e00bf33da88fc2",
        "0xd5a79147930aa725",
        "0x06ca6351e003826f",
        "0x142929670a0e6e70",
        "0x27b70a8546d22ffc",
        "0x2e1b21385c26c926",
        "0x4d2c6dfc5ac42aed",
        "0x53380d139d95b3df",
        "0x650a73548baf63de",
        "0x766a0abb3c77b2a8",
        "0x81c2c92e47edaee6",
        "0x92722c851482353b",
        "0xa2bfe8a14cf10364",
        "0xa81a664bbc423001",
        "0xc24b8b70d0f89791",
        "0xc76c51a30654be30",
        "0xd192e819d6ef5218",
        "0xd69906245565a910",
        "0xf40e35855771202a",
        "0x106aa07032bbd1b8",
        "0x19a4c116b8d2d0c8",
        "0x1e376c085141ab53",
        "0x2748774cdf8eeb99",
        "0x34b0bcb5e19b48a8",
        "0x391c0cb3c5c95a63",
        "0x4ed8aa4ae3418acb",
        "0x5b9cca4f7763e373",
        "0x682e6ff3d6b2b8a3",
        "0x748f82ee5defb2fc",
        "0x78a5636f43172f60",
        "0x84c87814a1f0ab72",
        "0x8cc702081a6439ec",
        "0x90befffa23631e28",
        "0xa4506cebde82bde9",
        "0xbef9a3f7b2c67915",
        "0xc67178f2e372532b",
        "0xca273eceea26619c",
        "0xd186b8c721c0c207",
        "0xeada7dd6cde0eb1e",
        "0xf57d4f7fee6ed178",
        "0x06f067aa72176fba",
        "0x0a637dc5a2c898a6",
        "0x113f9804bef90dae",
        "0x1b710b35131c471b",
        "0x28db77f523047d84",
        "0x32caab7b40c72493",
        "0x3c9ebe0a15c9bebc",
        "0x431d67c49c100d4c",
        "0x4cc5d4becb3e42b6",
        "0x597f299cfc657e2a",
        "0x5fcb6fab3ad6faec",
        "0x6c44198c4a475817"
      ].map((n6) => BigInt(n6))))();
      SHA512_Kh = /* @__PURE__ */ (() => K512[0])();
      SHA512_Kl = /* @__PURE__ */ (() => K512[1])();
      SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
      SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
      SHA512 = class extends HashMD {
        constructor(outputLen = 64) {
          super(128, outputLen, 16, false);
          this.Ah = SHA512_IV[0] | 0;
          this.Al = SHA512_IV[1] | 0;
          this.Bh = SHA512_IV[2] | 0;
          this.Bl = SHA512_IV[3] | 0;
          this.Ch = SHA512_IV[4] | 0;
          this.Cl = SHA512_IV[5] | 0;
          this.Dh = SHA512_IV[6] | 0;
          this.Dl = SHA512_IV[7] | 0;
          this.Eh = SHA512_IV[8] | 0;
          this.El = SHA512_IV[9] | 0;
          this.Fh = SHA512_IV[10] | 0;
          this.Fl = SHA512_IV[11] | 0;
          this.Gh = SHA512_IV[12] | 0;
          this.Gl = SHA512_IV[13] | 0;
          this.Hh = SHA512_IV[14] | 0;
          this.Hl = SHA512_IV[15] | 0;
        }
        // prettier-ignore
        get() {
          const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
          return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];
        }
        // prettier-ignore
        set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {
          this.Ah = Ah | 0;
          this.Al = Al | 0;
          this.Bh = Bh | 0;
          this.Bl = Bl | 0;
          this.Ch = Ch | 0;
          this.Cl = Cl | 0;
          this.Dh = Dh | 0;
          this.Dl = Dl | 0;
          this.Eh = Eh | 0;
          this.El = El | 0;
          this.Fh = Fh | 0;
          this.Fl = Fl | 0;
          this.Gh = Gh | 0;
          this.Gl = Gl | 0;
          this.Hh = Hh | 0;
          this.Hl = Hl | 0;
        }
        process(view, offset2) {
          for (let i5 = 0; i5 < 16; i5++, offset2 += 4) {
            SHA512_W_H[i5] = view.getUint32(offset2);
            SHA512_W_L[i5] = view.getUint32(offset2 += 4);
          }
          for (let i5 = 16; i5 < 80; i5++) {
            const W15h = SHA512_W_H[i5 - 15] | 0;
            const W15l = SHA512_W_L[i5 - 15] | 0;
            const s0h = rotrSH(W15h, W15l, 1) ^ rotrSH(W15h, W15l, 8) ^ shrSH(W15h, W15l, 7);
            const s0l = rotrSL(W15h, W15l, 1) ^ rotrSL(W15h, W15l, 8) ^ shrSL(W15h, W15l, 7);
            const W2h = SHA512_W_H[i5 - 2] | 0;
            const W2l = SHA512_W_L[i5 - 2] | 0;
            const s1h = rotrSH(W2h, W2l, 19) ^ rotrBH(W2h, W2l, 61) ^ shrSH(W2h, W2l, 6);
            const s1l = rotrSL(W2h, W2l, 19) ^ rotrBL(W2h, W2l, 61) ^ shrSL(W2h, W2l, 6);
            const SUMl = add4L(s0l, s1l, SHA512_W_L[i5 - 7], SHA512_W_L[i5 - 16]);
            const SUMh = add4H(SUMl, s0h, s1h, SHA512_W_H[i5 - 7], SHA512_W_H[i5 - 16]);
            SHA512_W_H[i5] = SUMh | 0;
            SHA512_W_L[i5] = SUMl | 0;
          }
          let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
          for (let i5 = 0; i5 < 80; i5++) {
            const sigma1h = rotrSH(Eh, El, 14) ^ rotrSH(Eh, El, 18) ^ rotrBH(Eh, El, 41);
            const sigma1l = rotrSL(Eh, El, 14) ^ rotrSL(Eh, El, 18) ^ rotrBL(Eh, El, 41);
            const CHIh = Eh & Fh ^ ~Eh & Gh;
            const CHIl = El & Fl ^ ~El & Gl;
            const T1ll = add5L(Hl, sigma1l, CHIl, SHA512_Kl[i5], SHA512_W_L[i5]);
            const T1h = add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i5], SHA512_W_H[i5]);
            const T1l = T1ll | 0;
            const sigma0h = rotrSH(Ah, Al, 28) ^ rotrBH(Ah, Al, 34) ^ rotrBH(Ah, Al, 39);
            const sigma0l = rotrSL(Ah, Al, 28) ^ rotrBL(Ah, Al, 34) ^ rotrBL(Ah, Al, 39);
            const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;
            const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;
            Hh = Gh | 0;
            Hl = Gl | 0;
            Gh = Fh | 0;
            Gl = Fl | 0;
            Fh = Eh | 0;
            Fl = El | 0;
            ({ h: Eh, l: El } = add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
            Dh = Ch | 0;
            Dl = Cl | 0;
            Ch = Bh | 0;
            Cl = Bl | 0;
            Bh = Ah | 0;
            Bl = Al | 0;
            const All = add3L(T1l, sigma0l, MAJl);
            Ah = add3H(All, T1h, sigma0h, MAJh);
            Al = All | 0;
          }
          ({ h: Ah, l: Al } = add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
          ({ h: Bh, l: Bl } = add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
          ({ h: Ch, l: Cl } = add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
          ({ h: Dh, l: Dl } = add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
          ({ h: Eh, l: El } = add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
          ({ h: Fh, l: Fl } = add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
          ({ h: Gh, l: Gl } = add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
          ({ h: Hh, l: Hl } = add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
          this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
        }
        roundClean() {
          clean(SHA512_W_H, SHA512_W_L);
        }
        destroy() {
          clean(this.buffer);
          this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
        }
      };
      SHA384 = class extends SHA512 {
        constructor() {
          super(48);
          this.Ah = SHA384_IV[0] | 0;
          this.Al = SHA384_IV[1] | 0;
          this.Bh = SHA384_IV[2] | 0;
          this.Bl = SHA384_IV[3] | 0;
          this.Ch = SHA384_IV[4] | 0;
          this.Cl = SHA384_IV[5] | 0;
          this.Dh = SHA384_IV[6] | 0;
          this.Dl = SHA384_IV[7] | 0;
          this.Eh = SHA384_IV[8] | 0;
          this.El = SHA384_IV[9] | 0;
          this.Fh = SHA384_IV[10] | 0;
          this.Fl = SHA384_IV[11] | 0;
          this.Gh = SHA384_IV[12] | 0;
          this.Gl = SHA384_IV[13] | 0;
          this.Hh = SHA384_IV[14] | 0;
          this.Hl = SHA384_IV[15] | 0;
        }
      };
      sha256 = /* @__PURE__ */ createHasher(() => new SHA256());
      sha512 = /* @__PURE__ */ createHasher(() => new SHA512());
      sha384 = /* @__PURE__ */ createHasher(() => new SHA384());
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js
  var HMAC, hmac;
  var init_hmac = __esm({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js"() {
      "use strict";
      init_node_compat_inject();
      init_utils2();
      HMAC = class extends Hash {
        constructor(hash5, _key) {
          super();
          this.finished = false;
          this.destroyed = false;
          ahash(hash5);
          const key2 = toBytes2(_key);
          this.iHash = hash5.create();
          if (typeof this.iHash.update !== "function")
            throw new Error("Expected instance of class which extends utils.Hash");
          this.blockLen = this.iHash.blockLen;
          this.outputLen = this.iHash.outputLen;
          const blockLen = this.blockLen;
          const pad4 = new Uint8Array(blockLen);
          pad4.set(key2.length > blockLen ? hash5.create().update(key2).digest() : key2);
          for (let i5 = 0; i5 < pad4.length; i5++)
            pad4[i5] ^= 54;
          this.iHash.update(pad4);
          this.oHash = hash5.create();
          for (let i5 = 0; i5 < pad4.length; i5++)
            pad4[i5] ^= 54 ^ 92;
          this.oHash.update(pad4);
          clean(pad4);
        }
        update(buf) {
          aexists(this);
          this.iHash.update(buf);
          return this;
        }
        digestInto(out) {
          aexists(this);
          abytes(out, this.outputLen);
          this.finished = true;
          this.iHash.digestInto(out);
          this.oHash.update(out);
          this.oHash.digestInto(out);
          this.destroy();
        }
        digest() {
          const out = new Uint8Array(this.oHash.outputLen);
          this.digestInto(out);
          return out;
        }
        _cloneInto(to3) {
          to3 || (to3 = Object.create(Object.getPrototypeOf(this), {}));
          const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;
          to3 = to3;
          to3.finished = finished;
          to3.destroyed = destroyed;
          to3.blockLen = blockLen;
          to3.outputLen = outputLen;
          to3.oHash = oHash._cloneInto(to3.oHash);
          to3.iHash = iHash._cloneInto(to3.iHash);
          return to3;
        }
        clone() {
          return this._cloneInto();
        }
        destroy() {
          this.destroyed = true;
          this.oHash.destroy();
          this.iHash.destroy();
        }
      };
      hmac = (hash5, key2, message) => new HMAC(hash5, key2).update(message).digest();
      hmac.create = (hash5, key2) => new HMAC(hash5, key2);
    }
  });

  // ../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js
  function isBytes2(a5) {
    return a5 instanceof Uint8Array || ArrayBuffer.isView(a5) && a5.constructor.name === "Uint8Array";
  }
  function abytes2(item) {
    if (!isBytes2(item))
      throw new Error("Uint8Array expected");
  }
  function abool(title, value) {
    if (typeof value !== "boolean")
      throw new Error(title + " boolean expected, got " + value);
  }
  function numberToHexUnpadded(num2) {
    const hex3 = num2.toString(16);
    return hex3.length & 1 ? "0" + hex3 : hex3;
  }
  function hexToNumber2(hex3) {
    if (typeof hex3 !== "string")
      throw new Error("hex string expected, got " + typeof hex3);
    return hex3 === "" ? _0n2 : BigInt("0x" + hex3);
  }
  function bytesToHex3(bytes) {
    abytes2(bytes);
    if (hasHexBuiltin2)
      return bytes.toHex();
    let hex3 = "";
    for (let i5 = 0; i5 < bytes.length; i5++) {
      hex3 += hexes3[bytes[i5]];
    }
    return hex3;
  }
  function asciiToBase162(ch) {
    if (ch >= asciis2._0 && ch <= asciis2._9)
      return ch - asciis2._0;
    if (ch >= asciis2.A && ch <= asciis2.F)
      return ch - (asciis2.A - 10);
    if (ch >= asciis2.a && ch <= asciis2.f)
      return ch - (asciis2.a - 10);
    return;
  }
  function hexToBytes3(hex3) {
    if (typeof hex3 !== "string")
      throw new Error("hex string expected, got " + typeof hex3);
    if (hasHexBuiltin2)
      return Uint8Array.fromHex(hex3);
    const hl = hex3.length;
    const al = hl / 2;
    if (hl % 2)
      throw new Error("hex string expected, got unpadded hex of length " + hl);
    const array3 = new Uint8Array(al);
    for (let ai2 = 0, hi2 = 0; ai2 < al; ai2++, hi2 += 2) {
      const n1 = asciiToBase162(hex3.charCodeAt(hi2));
      const n22 = asciiToBase162(hex3.charCodeAt(hi2 + 1));
      if (n1 === void 0 || n22 === void 0) {
        const char = hex3[hi2] + hex3[hi2 + 1];
        throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi2);
      }
      array3[ai2] = n1 * 16 + n22;
    }
    return array3;
  }
  function bytesToNumberBE(bytes) {
    return hexToNumber2(bytesToHex3(bytes));
  }
  function bytesToNumberLE(bytes) {
    abytes2(bytes);
    return hexToNumber2(bytesToHex3(Uint8Array.from(bytes).reverse()));
  }
  function numberToBytesBE(n6, len) {
    return hexToBytes3(n6.toString(16).padStart(len * 2, "0"));
  }
  function numberToBytesLE(n6, len) {
    return numberToBytesBE(n6, len).reverse();
  }
  function ensureBytes(title, hex3, expectedLength) {
    let res;
    if (typeof hex3 === "string") {
      try {
        res = hexToBytes3(hex3);
      } catch (e2) {
        throw new Error(title + " must be hex string or Uint8Array, cause: " + e2);
      }
    } else if (isBytes2(hex3)) {
      res = Uint8Array.from(hex3);
    } else {
      throw new Error(title + " must be hex string or Uint8Array");
    }
    const len = res.length;
    if (typeof expectedLength === "number" && len !== expectedLength)
      throw new Error(title + " of length " + expectedLength + " expected, got " + len);
    return res;
  }
  function concatBytes3(...arrays) {
    let sum = 0;
    for (let i5 = 0; i5 < arrays.length; i5++) {
      const a5 = arrays[i5];
      abytes2(a5);
      sum += a5.length;
    }
    const res = new Uint8Array(sum);
    for (let i5 = 0, pad4 = 0; i5 < arrays.length; i5++) {
      const a5 = arrays[i5];
      res.set(a5, pad4);
      pad4 += a5.length;
    }
    return res;
  }
  function utf8ToBytes2(str) {
    if (typeof str !== "string")
      throw new Error("string expected");
    return new Uint8Array(new TextEncoder().encode(str));
  }
  function inRange(n6, min, max) {
    return isPosBig(n6) && isPosBig(min) && isPosBig(max) && min <= n6 && n6 < max;
  }
  function aInRange(title, n6, min, max) {
    if (!inRange(n6, min, max))
      throw new Error("expected valid " + title + ": " + min + " <= n < " + max + ", got " + n6);
  }
  function bitLen(n6) {
    let len;
    for (len = 0; n6 > _0n2; n6 >>= _1n2, len += 1)
      ;
    return len;
  }
  function createHmacDrbg(hashLen, qByteLen, hmacFn) {
    if (typeof hashLen !== "number" || hashLen < 2)
      throw new Error("hashLen must be a number");
    if (typeof qByteLen !== "number" || qByteLen < 2)
      throw new Error("qByteLen must be a number");
    if (typeof hmacFn !== "function")
      throw new Error("hmacFn must be a function");
    let v13 = u8n(hashLen);
    let k7 = u8n(hashLen);
    let i5 = 0;
    const reset = () => {
      v13.fill(1);
      k7.fill(0);
      i5 = 0;
    };
    const h8 = (...b9) => hmacFn(k7, v13, ...b9);
    const reseed2 = (seed = u8n(0)) => {
      k7 = h8(u8fr([0]), seed);
      v13 = h8();
      if (seed.length === 0)
        return;
      k7 = h8(u8fr([1]), seed);
      v13 = h8();
    };
    const gen2 = () => {
      if (i5++ >= 1e3)
        throw new Error("drbg: tried 1000 values");
      let len = 0;
      const out = [];
      while (len < qByteLen) {
        v13 = h8();
        const sl = v13.slice();
        out.push(sl);
        len += v13.length;
      }
      return concatBytes3(...out);
    };
    const genUntil = (seed, pred) => {
      reset();
      reseed2(seed);
      let res = void 0;
      while (!(res = pred(gen2())))
        reseed2();
      reset();
      return res;
    };
    return genUntil;
  }
  function validateObject(object2, validators, optValidators = {}) {
    const checkField = (fieldName, type2, isOptional) => {
      const checkVal = validatorFns[type2];
      if (typeof checkVal !== "function")
        throw new Error("invalid validator function");
      const val = object2[fieldName];
      if (isOptional && val === void 0)
        return;
      if (!checkVal(val, object2)) {
        throw new Error("param " + String(fieldName) + " is invalid. Expected " + type2 + ", got " + val);
      }
    };
    for (const [fieldName, type2] of Object.entries(validators))
      checkField(fieldName, type2, false);
    for (const [fieldName, type2] of Object.entries(optValidators))
      checkField(fieldName, type2, true);
    return object2;
  }
  function memoized(fn) {
    const map2 = /* @__PURE__ */ new WeakMap();
    return (arg, ...args) => {
      const val = map2.get(arg);
      if (val !== void 0)
        return val;
      const computed = fn(arg, ...args);
      map2.set(arg, computed);
      return computed;
    };
  }
  var _0n2, _1n2, hasHexBuiltin2, hexes3, asciis2, isPosBig, bitMask, u8n, u8fr, validatorFns;
  var init_utils4 = __esm({
    "../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js"() {
      "use strict";
      init_node_compat_inject();
      _0n2 = /* @__PURE__ */ BigInt(0);
      _1n2 = /* @__PURE__ */ BigInt(1);
      hasHexBuiltin2 = // @ts-ignore
      typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function";
      hexes3 = /* @__PURE__ */ Array.from({ length: 256 }, (_6, i5) => i5.toString(16).padStart(2, "0"));
      asciis2 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
      isPosBig = (n6) => typeof n6 === "bigint" && _0n2 <= n6;
      bitMask = (n6) => (_1n2 << BigInt(n6)) - _1n2;
      u8n = (len) => new Uint8Array(len);
      u8fr = (arr) => Uint8Array.from(arr);
      validatorFns = {
        bigint: (val) => typeof val === "bigint",
        function: (val) => typeof val === "function",
        boolean: (val) => typeof val === "boolean",
        string: (val) => typeof val === "string",
        stringOrUint8Array: (val) => typeof val === "string" || isBytes2(val),
        isSafeInteger: (val) => Number.isSafeInteger(val),
        array: (val) => Array.isArray(val),
        field: (val, object2) => object2.Fp.isValid(val),
        hash: (val) => typeof val === "function" && Number.isSafeInteger(val.outputLen)
      };
    }
  });

  // ../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/modular.js
  function mod(a5, b9) {
    const result = a5 % b9;
    return result >= _0n3 ? result : b9 + result;
  }
  function pow2(x13, power, modulo) {
    let res = x13;
    while (power-- > _0n3) {
      res *= res;
      res %= modulo;
    }
    return res;
  }
  function invert(number5, modulo) {
    if (number5 === _0n3)
      throw new Error("invert: expected non-zero number");
    if (modulo <= _0n3)
      throw new Error("invert: expected positive modulus, got " + modulo);
    let a5 = mod(number5, modulo);
    let b9 = modulo;
    let x13 = _0n3, y11 = _1n3, u4 = _1n3, v13 = _0n3;
    while (a5 !== _0n3) {
      const q7 = b9 / a5;
      const r3 = b9 % a5;
      const m3 = x13 - u4 * q7;
      const n6 = y11 - v13 * q7;
      b9 = a5, a5 = r3, x13 = u4, y11 = v13, u4 = m3, v13 = n6;
    }
    const gcd = b9;
    if (gcd !== _1n3)
      throw new Error("invert: does not exist");
    return mod(x13, modulo);
  }
  function sqrt3mod4(Fp3, n6) {
    const p1div4 = (Fp3.ORDER + _1n3) / _4n;
    const root = Fp3.pow(n6, p1div4);
    if (!Fp3.eql(Fp3.sqr(root), n6))
      throw new Error("Cannot find square root");
    return root;
  }
  function sqrt5mod8(Fp3, n6) {
    const p5div8 = (Fp3.ORDER - _5n) / _8n;
    const n22 = Fp3.mul(n6, _2n2);
    const v13 = Fp3.pow(n22, p5div8);
    const nv = Fp3.mul(n6, v13);
    const i5 = Fp3.mul(Fp3.mul(nv, _2n2), v13);
    const root = Fp3.mul(nv, Fp3.sub(i5, Fp3.ONE));
    if (!Fp3.eql(Fp3.sqr(root), n6))
      throw new Error("Cannot find square root");
    return root;
  }
  function tonelliShanks(P8) {
    if (P8 < BigInt(3))
      throw new Error("sqrt is not defined for small field");
    let Q7 = P8 - _1n3;
    let S10 = 0;
    while (Q7 % _2n2 === _0n3) {
      Q7 /= _2n2;
      S10++;
    }
    let Z6 = _2n2;
    const _Fp = Field(P8);
    while (FpLegendre(_Fp, Z6) === 1) {
      if (Z6++ > 1e3)
        throw new Error("Cannot find square root: probably non-prime P");
    }
    if (S10 === 1)
      return sqrt3mod4;
    let cc = _Fp.pow(Z6, Q7);
    const Q1div2 = (Q7 + _1n3) / _2n2;
    return function tonelliSlow(Fp3, n6) {
      if (Fp3.is0(n6))
        return n6;
      if (FpLegendre(Fp3, n6) !== 1)
        throw new Error("Cannot find square root");
      let M9 = S10;
      let c7 = Fp3.mul(Fp3.ONE, cc);
      let t = Fp3.pow(n6, Q7);
      let R6 = Fp3.pow(n6, Q1div2);
      while (!Fp3.eql(t, Fp3.ONE)) {
        if (Fp3.is0(t))
          return Fp3.ZERO;
        let i5 = 1;
        let t_tmp = Fp3.sqr(t);
        while (!Fp3.eql(t_tmp, Fp3.ONE)) {
          i5++;
          t_tmp = Fp3.sqr(t_tmp);
          if (i5 === M9)
            throw new Error("Cannot find square root");
        }
        const exponent = _1n3 << BigInt(M9 - i5 - 1);
        const b9 = Fp3.pow(c7, exponent);
        M9 = i5;
        c7 = Fp3.sqr(b9);
        t = Fp3.mul(t, c7);
        R6 = Fp3.mul(R6, b9);
      }
      return R6;
    };
  }
  function FpSqrt(P8) {
    if (P8 % _4n === _3n)
      return sqrt3mod4;
    if (P8 % _8n === _5n)
      return sqrt5mod8;
    return tonelliShanks(P8);
  }
  function validateField(field) {
    const initial = {
      ORDER: "bigint",
      MASK: "bigint",
      BYTES: "isSafeInteger",
      BITS: "isSafeInteger"
    };
    const opts = FIELD_FIELDS.reduce((map2, val) => {
      map2[val] = "function";
      return map2;
    }, initial);
    return validateObject(field, opts);
  }
  function FpPow(Fp3, num2, power) {
    if (power < _0n3)
      throw new Error("invalid exponent, negatives unsupported");
    if (power === _0n3)
      return Fp3.ONE;
    if (power === _1n3)
      return num2;
    let p7 = Fp3.ONE;
    let d6 = num2;
    while (power > _0n3) {
      if (power & _1n3)
        p7 = Fp3.mul(p7, d6);
      d6 = Fp3.sqr(d6);
      power >>= _1n3;
    }
    return p7;
  }
  function FpInvertBatch(Fp3, nums, passZero = false) {
    const inverted = new Array(nums.length).fill(passZero ? Fp3.ZERO : void 0);
    const multipliedAcc = nums.reduce((acc, num2, i5) => {
      if (Fp3.is0(num2))
        return acc;
      inverted[i5] = acc;
      return Fp3.mul(acc, num2);
    }, Fp3.ONE);
    const invertedAcc = Fp3.inv(multipliedAcc);
    nums.reduceRight((acc, num2, i5) => {
      if (Fp3.is0(num2))
        return acc;
      inverted[i5] = Fp3.mul(acc, inverted[i5]);
      return Fp3.mul(acc, num2);
    }, invertedAcc);
    return inverted;
  }
  function FpLegendre(Fp3, n6) {
    const p1mod2 = (Fp3.ORDER - _1n3) / _2n2;
    const powered = Fp3.pow(n6, p1mod2);
    const yes = Fp3.eql(powered, Fp3.ONE);
    const zero = Fp3.eql(powered, Fp3.ZERO);
    const no3 = Fp3.eql(powered, Fp3.neg(Fp3.ONE));
    if (!yes && !zero && !no3)
      throw new Error("invalid Legendre symbol result");
    return yes ? 1 : zero ? 0 : -1;
  }
  function nLength(n6, nBitLength) {
    if (nBitLength !== void 0)
      anumber(nBitLength);
    const _nBitLength = nBitLength !== void 0 ? nBitLength : n6.toString(2).length;
    const nByteLength = Math.ceil(_nBitLength / 8);
    return { nBitLength: _nBitLength, nByteLength };
  }
  function Field(ORDER, bitLen3, isLE3 = false, redef = {}) {
    if (ORDER <= _0n3)
      throw new Error("invalid field: expected ORDER > 0, got " + ORDER);
    const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen3);
    if (BYTES > 2048)
      throw new Error("invalid field: expected ORDER of <= 2048 bytes");
    let sqrtP;
    const f7 = Object.freeze({
      ORDER,
      isLE: isLE3,
      BITS,
      BYTES,
      MASK: bitMask(BITS),
      ZERO: _0n3,
      ONE: _1n3,
      create: (num2) => mod(num2, ORDER),
      isValid: (num2) => {
        if (typeof num2 !== "bigint")
          throw new Error("invalid field element: expected bigint, got " + typeof num2);
        return _0n3 <= num2 && num2 < ORDER;
      },
      is0: (num2) => num2 === _0n3,
      isOdd: (num2) => (num2 & _1n3) === _1n3,
      neg: (num2) => mod(-num2, ORDER),
      eql: (lhs, rhs) => lhs === rhs,
      sqr: (num2) => mod(num2 * num2, ORDER),
      add: (lhs, rhs) => mod(lhs + rhs, ORDER),
      sub: (lhs, rhs) => mod(lhs - rhs, ORDER),
      mul: (lhs, rhs) => mod(lhs * rhs, ORDER),
      pow: (num2, power) => FpPow(f7, num2, power),
      div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),
      // Same as above, but doesn't normalize
      sqrN: (num2) => num2 * num2,
      addN: (lhs, rhs) => lhs + rhs,
      subN: (lhs, rhs) => lhs - rhs,
      mulN: (lhs, rhs) => lhs * rhs,
      inv: (num2) => invert(num2, ORDER),
      sqrt: redef.sqrt || ((n6) => {
        if (!sqrtP)
          sqrtP = FpSqrt(ORDER);
        return sqrtP(f7, n6);
      }),
      toBytes: (num2) => isLE3 ? numberToBytesLE(num2, BYTES) : numberToBytesBE(num2, BYTES),
      fromBytes: (bytes) => {
        if (bytes.length !== BYTES)
          throw new Error("Field.fromBytes: expected " + BYTES + " bytes, got " + bytes.length);
        return isLE3 ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);
      },
      // TODO: we don't need it here, move out to separate fn
      invertBatch: (lst) => FpInvertBatch(f7, lst),
      // We can't move this out because Fp6, Fp12 implement it
      // and it's unclear what to return in there.
      cmov: (a5, b9, c7) => c7 ? b9 : a5
    });
    return Object.freeze(f7);
  }
  function getFieldBytesLength(fieldOrder) {
    if (typeof fieldOrder !== "bigint")
      throw new Error("field order must be bigint");
    const bitLength = fieldOrder.toString(2).length;
    return Math.ceil(bitLength / 8);
  }
  function getMinHashLength(fieldOrder) {
    const length2 = getFieldBytesLength(fieldOrder);
    return length2 + Math.ceil(length2 / 2);
  }
  function mapHashToField(key2, fieldOrder, isLE3 = false) {
    const len = key2.length;
    const fieldLen = getFieldBytesLength(fieldOrder);
    const minLen = getMinHashLength(fieldOrder);
    if (len < 16 || len < minLen || len > 1024)
      throw new Error("expected " + minLen + "-1024 bytes of input, got " + len);
    const num2 = isLE3 ? bytesToNumberLE(key2) : bytesToNumberBE(key2);
    const reduced = mod(num2, fieldOrder - _1n3) + _1n3;
    return isLE3 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
  }
  var _0n3, _1n3, _2n2, _3n, _4n, _5n, _8n, isNegativeLE, FIELD_FIELDS;
  var init_modular = __esm({
    "../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/modular.js"() {
      "use strict";
      init_node_compat_inject();
      init_utils2();
      init_utils4();
      _0n3 = BigInt(0);
      _1n3 = BigInt(1);
      _2n2 = /* @__PURE__ */ BigInt(2);
      _3n = /* @__PURE__ */ BigInt(3);
      _4n = /* @__PURE__ */ BigInt(4);
      _5n = /* @__PURE__ */ BigInt(5);
      _8n = /* @__PURE__ */ BigInt(8);
      isNegativeLE = (num2, modulo) => (mod(num2, modulo) & _1n3) === _1n3;
      FIELD_FIELDS = [
        "create",
        "isValid",
        "is0",
        "neg",
        "inv",
        "sqrt",
        "sqr",
        "eql",
        "add",
        "sub",
        "mul",
        "pow",
        "div",
        "addN",
        "subN",
        "mulN",
        "sqrN"
      ];
    }
  });

  // ../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/curve.js
  function constTimeNegate(condition, item) {
    const neg3 = item.negate();
    return condition ? neg3 : item;
  }
  function validateW(W8, bits) {
    if (!Number.isSafeInteger(W8) || W8 <= 0 || W8 > bits)
      throw new Error("invalid window size, expected [1.." + bits + "], got W=" + W8);
  }
  function calcWOpts(W8, scalarBits2) {
    validateW(W8, scalarBits2);
    const windows = Math.ceil(scalarBits2 / W8) + 1;
    const windowSize = 2 ** (W8 - 1);
    const maxNumber = 2 ** W8;
    const mask2 = bitMask(W8);
    const shiftBy = BigInt(W8);
    return { windows, windowSize, mask: mask2, maxNumber, shiftBy };
  }
  function calcOffsets(n6, window2, wOpts) {
    const { windowSize, mask: mask2, maxNumber, shiftBy } = wOpts;
    let wbits = Number(n6 & mask2);
    let nextN = n6 >> shiftBy;
    if (wbits > windowSize) {
      wbits -= maxNumber;
      nextN += _1n4;
    }
    const offsetStart = window2 * windowSize;
    const offset2 = offsetStart + Math.abs(wbits) - 1;
    const isZero = wbits === 0;
    const isNeg = wbits < 0;
    const isNegF = window2 % 2 !== 0;
    const offsetF = offsetStart;
    return { nextN, offset: offset2, isZero, isNeg, isNegF, offsetF };
  }
  function validateMSMPoints(points, c7) {
    if (!Array.isArray(points))
      throw new Error("array expected");
    points.forEach((p7, i5) => {
      if (!(p7 instanceof c7))
        throw new Error("invalid point at index " + i5);
    });
  }
  function validateMSMScalars(scalars, field) {
    if (!Array.isArray(scalars))
      throw new Error("array of scalars expected");
    scalars.forEach((s3, i5) => {
      if (!field.isValid(s3))
        throw new Error("invalid scalar at index " + i5);
    });
  }
  function getW(P8) {
    return pointWindowSizes.get(P8) || 1;
  }
  function wNAF(c7, bits) {
    return {
      constTimeNegate,
      hasPrecomputes(elm) {
        return getW(elm) !== 1;
      },
      // non-const time multiplication ladder
      unsafeLadder(elm, n6, p7 = c7.ZERO) {
        let d6 = elm;
        while (n6 > _0n4) {
          if (n6 & _1n4)
            p7 = p7.add(d6);
          d6 = d6.double();
          n6 >>= _1n4;
        }
        return p7;
      },
      /**
       * Creates a wNAF precomputation window. Used for caching.
       * Default window size is set by `utils.precompute()` and is equal to 8.
       * Number of precomputed points depends on the curve size:
       * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:
       * - 𝑊 is the window size
       * - 𝑛 is the bitlength of the curve order.
       * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.
       * @param elm Point instance
       * @param W window size
       * @returns precomputed point tables flattened to a single array
       */
      precomputeWindow(elm, W8) {
        const { windows, windowSize } = calcWOpts(W8, bits);
        const points = [];
        let p7 = elm;
        let base4 = p7;
        for (let window2 = 0; window2 < windows; window2++) {
          base4 = p7;
          points.push(base4);
          for (let i5 = 1; i5 < windowSize; i5++) {
            base4 = base4.add(p7);
            points.push(base4);
          }
          p7 = base4.double();
        }
        return points;
      },
      /**
       * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.
       * @param W window size
       * @param precomputes precomputed tables
       * @param n scalar (we don't check here, but should be less than curve order)
       * @returns real and fake (for const-time) points
       */
      wNAF(W8, precomputes, n6) {
        let p7 = c7.ZERO;
        let f7 = c7.BASE;
        const wo2 = calcWOpts(W8, bits);
        for (let window2 = 0; window2 < wo2.windows; window2++) {
          const { nextN, offset: offset2, isZero, isNeg, isNegF, offsetF } = calcOffsets(n6, window2, wo2);
          n6 = nextN;
          if (isZero) {
            f7 = f7.add(constTimeNegate(isNegF, precomputes[offsetF]));
          } else {
            p7 = p7.add(constTimeNegate(isNeg, precomputes[offset2]));
          }
        }
        return { p: p7, f: f7 };
      },
      /**
       * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.
       * @param W window size
       * @param precomputes precomputed tables
       * @param n scalar (we don't check here, but should be less than curve order)
       * @param acc accumulator point to add result of multiplication
       * @returns point
       */
      wNAFUnsafe(W8, precomputes, n6, acc = c7.ZERO) {
        const wo2 = calcWOpts(W8, bits);
        for (let window2 = 0; window2 < wo2.windows; window2++) {
          if (n6 === _0n4)
            break;
          const { nextN, offset: offset2, isZero, isNeg } = calcOffsets(n6, window2, wo2);
          n6 = nextN;
          if (isZero) {
            continue;
          } else {
            const item = precomputes[offset2];
            acc = acc.add(isNeg ? item.negate() : item);
          }
        }
        return acc;
      },
      getPrecomputes(W8, P8, transform2) {
        let comp = pointPrecomputes.get(P8);
        if (!comp) {
          comp = this.precomputeWindow(P8, W8);
          if (W8 !== 1)
            pointPrecomputes.set(P8, transform2(comp));
        }
        return comp;
      },
      wNAFCached(P8, n6, transform2) {
        const W8 = getW(P8);
        return this.wNAF(W8, this.getPrecomputes(W8, P8, transform2), n6);
      },
      wNAFCachedUnsafe(P8, n6, transform2, prev) {
        const W8 = getW(P8);
        if (W8 === 1)
          return this.unsafeLadder(P8, n6, prev);
        return this.wNAFUnsafe(W8, this.getPrecomputes(W8, P8, transform2), n6, prev);
      },
      // We calculate precomputes for elliptic curve point multiplication
      // using windowed method. This specifies window size and
      // stores precomputed values. Usually only base point would be precomputed.
      setWindowSize(P8, W8) {
        validateW(W8, bits);
        pointWindowSizes.set(P8, W8);
        pointPrecomputes.delete(P8);
      }
    };
  }
  function pippenger(c7, fieldN, points, scalars) {
    validateMSMPoints(points, c7);
    validateMSMScalars(scalars, fieldN);
    const plength = points.length;
    const slength = scalars.length;
    if (plength !== slength)
      throw new Error("arrays of points and scalars must have equal length");
    const zero = c7.ZERO;
    const wbits = bitLen(BigInt(plength));
    let windowSize = 1;
    if (wbits > 12)
      windowSize = wbits - 3;
    else if (wbits > 4)
      windowSize = wbits - 2;
    else if (wbits > 0)
      windowSize = 2;
    const MASK = bitMask(windowSize);
    const buckets = new Array(Number(MASK) + 1).fill(zero);
    const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;
    let sum = zero;
    for (let i5 = lastBits; i5 >= 0; i5 -= windowSize) {
      buckets.fill(zero);
      for (let j6 = 0; j6 < slength; j6++) {
        const scalar = scalars[j6];
        const wbits2 = Number(scalar >> BigInt(i5) & MASK);
        buckets[wbits2] = buckets[wbits2].add(points[j6]);
      }
      let resI = zero;
      for (let j6 = buckets.length - 1, sumI = zero; j6 > 0; j6--) {
        sumI = sumI.add(buckets[j6]);
        resI = resI.add(sumI);
      }
      sum = sum.add(resI);
      if (i5 !== 0)
        for (let j6 = 0; j6 < windowSize; j6++)
          sum = sum.double();
    }
    return sum;
  }
  function validateBasic(curve) {
    validateField(curve.Fp);
    validateObject(curve, {
      n: "bigint",
      h: "bigint",
      Gx: "field",
      Gy: "field"
    }, {
      nBitLength: "isSafeInteger",
      nByteLength: "isSafeInteger"
    });
    return Object.freeze({
      ...nLength(curve.n, curve.nBitLength),
      ...curve,
      ...{ p: curve.Fp.ORDER }
    });
  }
  var _0n4, _1n4, pointPrecomputes, pointWindowSizes;
  var init_curve = __esm({
    "../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/curve.js"() {
      "use strict";
      init_node_compat_inject();
      init_modular();
      init_utils4();
      _0n4 = BigInt(0);
      _1n4 = BigInt(1);
      pointPrecomputes = /* @__PURE__ */ new WeakMap();
      pointWindowSizes = /* @__PURE__ */ new WeakMap();
    }
  });

  // ../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/weierstrass.js
  function validateSigVerOpts(opts) {
    if (opts.lowS !== void 0)
      abool("lowS", opts.lowS);
    if (opts.prehash !== void 0)
      abool("prehash", opts.prehash);
  }
  function validatePointOpts(curve) {
    const opts = validateBasic(curve);
    validateObject(opts, {
      a: "field",
      b: "field"
    }, {
      allowInfinityPoint: "boolean",
      allowedPrivateKeyLengths: "array",
      clearCofactor: "function",
      fromBytes: "function",
      isTorsionFree: "function",
      toBytes: "function",
      wrapPrivateKey: "boolean"
    });
    const { endo, Fp: Fp3, a: a5 } = opts;
    if (endo) {
      if (!Fp3.eql(a5, Fp3.ZERO)) {
        throw new Error("invalid endo: CURVE.a must be 0");
      }
      if (typeof endo !== "object" || typeof endo.beta !== "bigint" || typeof endo.splitScalar !== "function") {
        throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');
      }
    }
    return Object.freeze({ ...opts });
  }
  function numToSizedHex(num2, size5) {
    return bytesToHex3(numberToBytesBE(num2, size5));
  }
  function weierstrassPoints(opts) {
    const CURVE = validatePointOpts(opts);
    const { Fp: Fp3 } = CURVE;
    const Fn5 = Field(CURVE.n, CURVE.nBitLength);
    const toBytes5 = CURVE.toBytes || ((_c, point3, _isCompressed) => {
      const a5 = point3.toAffine();
      return concatBytes3(Uint8Array.from([4]), Fp3.toBytes(a5.x), Fp3.toBytes(a5.y));
    });
    const fromBytes4 = CURVE.fromBytes || ((bytes) => {
      const tail = bytes.subarray(1);
      const x13 = Fp3.fromBytes(tail.subarray(0, Fp3.BYTES));
      const y11 = Fp3.fromBytes(tail.subarray(Fp3.BYTES, 2 * Fp3.BYTES));
      return { x: x13, y: y11 };
    });
    function weierstrassEquation(x13) {
      const { a: a5, b: b9 } = CURVE;
      const x22 = Fp3.sqr(x13);
      const x32 = Fp3.mul(x22, x13);
      return Fp3.add(Fp3.add(x32, Fp3.mul(x13, a5)), b9);
    }
    function isValidXY(x13, y11) {
      const left = Fp3.sqr(y11);
      const right = weierstrassEquation(x13);
      return Fp3.eql(left, right);
    }
    if (!isValidXY(CURVE.Gx, CURVE.Gy))
      throw new Error("bad curve params: generator point");
    const _4a3 = Fp3.mul(Fp3.pow(CURVE.a, _3n2), _4n2);
    const _27b2 = Fp3.mul(Fp3.sqr(CURVE.b), BigInt(27));
    if (Fp3.is0(Fp3.add(_4a3, _27b2)))
      throw new Error("bad curve params: a or b");
    function isWithinCurveOrder(num2) {
      return inRange(num2, _1n5, CURVE.n);
    }
    function normPrivateKeyToScalar(key2) {
      const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: N13 } = CURVE;
      if (lengths && typeof key2 !== "bigint") {
        if (isBytes2(key2))
          key2 = bytesToHex3(key2);
        if (typeof key2 !== "string" || !lengths.includes(key2.length))
          throw new Error("invalid private key");
        key2 = key2.padStart(nByteLength * 2, "0");
      }
      let num2;
      try {
        num2 = typeof key2 === "bigint" ? key2 : bytesToNumberBE(ensureBytes("private key", key2, nByteLength));
      } catch (error51) {
        throw new Error("invalid private key, expected hex or " + nByteLength + " bytes, got " + typeof key2);
      }
      if (wrapPrivateKey)
        num2 = mod(num2, N13);
      aInRange("private key", num2, _1n5, N13);
      return num2;
    }
    function aprjpoint(other) {
      if (!(other instanceof Point5))
        throw new Error("ProjectivePoint expected");
    }
    const toAffineMemo = memoized((p7, iz) => {
      const { px: x13, py: y11, pz: z11 } = p7;
      if (Fp3.eql(z11, Fp3.ONE))
        return { x: x13, y: y11 };
      const is0 = p7.is0();
      if (iz == null)
        iz = is0 ? Fp3.ONE : Fp3.inv(z11);
      const ax = Fp3.mul(x13, iz);
      const ay = Fp3.mul(y11, iz);
      const zz = Fp3.mul(z11, iz);
      if (is0)
        return { x: Fp3.ZERO, y: Fp3.ZERO };
      if (!Fp3.eql(zz, Fp3.ONE))
        throw new Error("invZ was invalid");
      return { x: ax, y: ay };
    });
    const assertValidMemo = memoized((p7) => {
      if (p7.is0()) {
        if (CURVE.allowInfinityPoint && !Fp3.is0(p7.py))
          return;
        throw new Error("bad point: ZERO");
      }
      const { x: x13, y: y11 } = p7.toAffine();
      if (!Fp3.isValid(x13) || !Fp3.isValid(y11))
        throw new Error("bad point: x or y not FE");
      if (!isValidXY(x13, y11))
        throw new Error("bad point: equation left != right");
      if (!p7.isTorsionFree())
        throw new Error("bad point: not in prime-order subgroup");
      return true;
    });
    class Point5 {
      constructor(px, py, pz) {
        if (px == null || !Fp3.isValid(px))
          throw new Error("x required");
        if (py == null || !Fp3.isValid(py) || Fp3.is0(py))
          throw new Error("y required");
        if (pz == null || !Fp3.isValid(pz))
          throw new Error("z required");
        this.px = px;
        this.py = py;
        this.pz = pz;
        Object.freeze(this);
      }
      // Does not validate if the point is on-curve.
      // Use fromHex instead, or call assertValidity() later.
      static fromAffine(p7) {
        const { x: x13, y: y11 } = p7 || {};
        if (!p7 || !Fp3.isValid(x13) || !Fp3.isValid(y11))
          throw new Error("invalid affine point");
        if (p7 instanceof Point5)
          throw new Error("projective point not allowed");
        const is0 = (i5) => Fp3.eql(i5, Fp3.ZERO);
        if (is0(x13) && is0(y11))
          return Point5.ZERO;
        return new Point5(x13, y11, Fp3.ONE);
      }
      get x() {
        return this.toAffine().x;
      }
      get y() {
        return this.toAffine().y;
      }
      /**
       * Takes a bunch of Projective Points but executes only one
       * inversion on all of them. Inversion is very slow operation,
       * so this improves performance massively.
       * Optimization: converts a list of projective points to a list of identical points with Z=1.
       */
      static normalizeZ(points) {
        const toInv = FpInvertBatch(Fp3, points.map((p7) => p7.pz));
        return points.map((p7, i5) => p7.toAffine(toInv[i5])).map(Point5.fromAffine);
      }
      /**
       * Converts hash string or Uint8Array to Point.
       * @param hex short/long ECDSA hex
       */
      static fromHex(hex3) {
        const P8 = Point5.fromAffine(fromBytes4(ensureBytes("pointHex", hex3)));
        P8.assertValidity();
        return P8;
      }
      // Multiplies generator point by privateKey.
      static fromPrivateKey(privateKey) {
        return Point5.BASE.multiply(normPrivateKeyToScalar(privateKey));
      }
      // Multiscalar Multiplication
      static msm(points, scalars) {
        return pippenger(Point5, Fn5, points, scalars);
      }
      // "Private method", don't use it directly
      _setWindowSize(windowSize) {
        wnaf.setWindowSize(this, windowSize);
      }
      // A point on curve is valid if it conforms to equation.
      assertValidity() {
        assertValidMemo(this);
      }
      hasEvenY() {
        const { y: y11 } = this.toAffine();
        if (Fp3.isOdd)
          return !Fp3.isOdd(y11);
        throw new Error("Field doesn't support isOdd");
      }
      /**
       * Compare one point to another.
       */
      equals(other) {
        aprjpoint(other);
        const { px: X1, py: Y1, pz: Z1 } = this;
        const { px: X22, py: Y22, pz: Z22 } = other;
        const U1 = Fp3.eql(Fp3.mul(X1, Z22), Fp3.mul(X22, Z1));
        const U22 = Fp3.eql(Fp3.mul(Y1, Z22), Fp3.mul(Y22, Z1));
        return U1 && U22;
      }
      /**
       * Flips point to one corresponding to (x, -y) in Affine coordinates.
       */
      negate() {
        return new Point5(this.px, Fp3.neg(this.py), this.pz);
      }
      // Renes-Costello-Batina exception-free doubling formula.
      // There is 30% faster Jacobian formula, but it is not complete.
      // https://eprint.iacr.org/2015/1060, algorithm 3
      // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
      double() {
        const { a: a5, b: b9 } = CURVE;
        const b32 = Fp3.mul(b9, _3n2);
        const { px: X1, py: Y1, pz: Z1 } = this;
        let X32 = Fp3.ZERO, Y32 = Fp3.ZERO, Z32 = Fp3.ZERO;
        let t0 = Fp3.mul(X1, X1);
        let t1 = Fp3.mul(Y1, Y1);
        let t2 = Fp3.mul(Z1, Z1);
        let t3 = Fp3.mul(X1, Y1);
        t3 = Fp3.add(t3, t3);
        Z32 = Fp3.mul(X1, Z1);
        Z32 = Fp3.add(Z32, Z32);
        X32 = Fp3.mul(a5, Z32);
        Y32 = Fp3.mul(b32, t2);
        Y32 = Fp3.add(X32, Y32);
        X32 = Fp3.sub(t1, Y32);
        Y32 = Fp3.add(t1, Y32);
        Y32 = Fp3.mul(X32, Y32);
        X32 = Fp3.mul(t3, X32);
        Z32 = Fp3.mul(b32, Z32);
        t2 = Fp3.mul(a5, t2);
        t3 = Fp3.sub(t0, t2);
        t3 = Fp3.mul(a5, t3);
        t3 = Fp3.add(t3, Z32);
        Z32 = Fp3.add(t0, t0);
        t0 = Fp3.add(Z32, t0);
        t0 = Fp3.add(t0, t2);
        t0 = Fp3.mul(t0, t3);
        Y32 = Fp3.add(Y32, t0);
        t2 = Fp3.mul(Y1, Z1);
        t2 = Fp3.add(t2, t2);
        t0 = Fp3.mul(t2, t3);
        X32 = Fp3.sub(X32, t0);
        Z32 = Fp3.mul(t2, t1);
        Z32 = Fp3.add(Z32, Z32);
        Z32 = Fp3.add(Z32, Z32);
        return new Point5(X32, Y32, Z32);
      }
      // Renes-Costello-Batina exception-free addition formula.
      // There is 30% faster Jacobian formula, but it is not complete.
      // https://eprint.iacr.org/2015/1060, algorithm 1
      // Cost: 12M + 0S + 3*a + 3*b3 + 23add.
      add(other) {
        aprjpoint(other);
        const { px: X1, py: Y1, pz: Z1 } = this;
        const { px: X22, py: Y22, pz: Z22 } = other;
        let X32 = Fp3.ZERO, Y32 = Fp3.ZERO, Z32 = Fp3.ZERO;
        const a5 = CURVE.a;
        const b32 = Fp3.mul(CURVE.b, _3n2);
        let t0 = Fp3.mul(X1, X22);
        let t1 = Fp3.mul(Y1, Y22);
        let t2 = Fp3.mul(Z1, Z22);
        let t3 = Fp3.add(X1, Y1);
        let t4 = Fp3.add(X22, Y22);
        t3 = Fp3.mul(t3, t4);
        t4 = Fp3.add(t0, t1);
        t3 = Fp3.sub(t3, t4);
        t4 = Fp3.add(X1, Z1);
        let t5 = Fp3.add(X22, Z22);
        t4 = Fp3.mul(t4, t5);
        t5 = Fp3.add(t0, t2);
        t4 = Fp3.sub(t4, t5);
        t5 = Fp3.add(Y1, Z1);
        X32 = Fp3.add(Y22, Z22);
        t5 = Fp3.mul(t5, X32);
        X32 = Fp3.add(t1, t2);
        t5 = Fp3.sub(t5, X32);
        Z32 = Fp3.mul(a5, t4);
        X32 = Fp3.mul(b32, t2);
        Z32 = Fp3.add(X32, Z32);
        X32 = Fp3.sub(t1, Z32);
        Z32 = Fp3.add(t1, Z32);
        Y32 = Fp3.mul(X32, Z32);
        t1 = Fp3.add(t0, t0);
        t1 = Fp3.add(t1, t0);
        t2 = Fp3.mul(a5, t2);
        t4 = Fp3.mul(b32, t4);
        t1 = Fp3.add(t1, t2);
        t2 = Fp3.sub(t0, t2);
        t2 = Fp3.mul(a5, t2);
        t4 = Fp3.add(t4, t2);
        t0 = Fp3.mul(t1, t4);
        Y32 = Fp3.add(Y32, t0);
        t0 = Fp3.mul(t5, t4);
        X32 = Fp3.mul(t3, X32);
        X32 = Fp3.sub(X32, t0);
        t0 = Fp3.mul(t3, t1);
        Z32 = Fp3.mul(t5, Z32);
        Z32 = Fp3.add(Z32, t0);
        return new Point5(X32, Y32, Z32);
      }
      subtract(other) {
        return this.add(other.negate());
      }
      is0() {
        return this.equals(Point5.ZERO);
      }
      wNAF(n6) {
        return wnaf.wNAFCached(this, n6, Point5.normalizeZ);
      }
      /**
       * Non-constant-time multiplication. Uses double-and-add algorithm.
       * It's faster, but should only be used when you don't care about
       * an exposed private key e.g. sig verification, which works over *public* keys.
       */
      multiplyUnsafe(sc) {
        const { endo: endo2, n: N13 } = CURVE;
        aInRange("scalar", sc, _0n5, N13);
        const I7 = Point5.ZERO;
        if (sc === _0n5)
          return I7;
        if (this.is0() || sc === _1n5)
          return this;
        if (!endo2 || wnaf.hasPrecomputes(this))
          return wnaf.wNAFCachedUnsafe(this, sc, Point5.normalizeZ);
        let { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(sc);
        let k1p = I7;
        let k2p = I7;
        let d6 = this;
        while (k1 > _0n5 || k22 > _0n5) {
          if (k1 & _1n5)
            k1p = k1p.add(d6);
          if (k22 & _1n5)
            k2p = k2p.add(d6);
          d6 = d6.double();
          k1 >>= _1n5;
          k22 >>= _1n5;
        }
        if (k1neg)
          k1p = k1p.negate();
        if (k2neg)
          k2p = k2p.negate();
        k2p = new Point5(Fp3.mul(k2p.px, endo2.beta), k2p.py, k2p.pz);
        return k1p.add(k2p);
      }
      /**
       * Constant time multiplication.
       * Uses wNAF method. Windowed method may be 10% faster,
       * but takes 2x longer to generate and consumes 2x memory.
       * Uses precomputes when available.
       * Uses endomorphism for Koblitz curves.
       * @param scalar by which the point would be multiplied
       * @returns New point
       */
      multiply(scalar) {
        const { endo: endo2, n: N13 } = CURVE;
        aInRange("scalar", scalar, _1n5, N13);
        let point3, fake;
        if (endo2) {
          const { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(scalar);
          let { p: k1p, f: f1p } = this.wNAF(k1);
          let { p: k2p, f: f2p } = this.wNAF(k22);
          k1p = wnaf.constTimeNegate(k1neg, k1p);
          k2p = wnaf.constTimeNegate(k2neg, k2p);
          k2p = new Point5(Fp3.mul(k2p.px, endo2.beta), k2p.py, k2p.pz);
          point3 = k1p.add(k2p);
          fake = f1p.add(f2p);
        } else {
          const { p: p7, f: f7 } = this.wNAF(scalar);
          point3 = p7;
          fake = f7;
        }
        return Point5.normalizeZ([point3, fake])[0];
      }
      /**
       * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.
       * Not using Strauss-Shamir trick: precomputation tables are faster.
       * The trick could be useful if both P and Q are not G (not in our case).
       * @returns non-zero affine point
       */
      multiplyAndAddUnsafe(Q7, a5, b9) {
        const G6 = Point5.BASE;
        const mul3 = (P8, a6) => a6 === _0n5 || a6 === _1n5 || !P8.equals(G6) ? P8.multiplyUnsafe(a6) : P8.multiply(a6);
        const sum = mul3(this, a5).add(mul3(Q7, b9));
        return sum.is0() ? void 0 : sum;
      }
      // Converts Projective point to affine (x, y) coordinates.
      // Can accept precomputed Z^-1 - for example, from invertBatch.
      // (x, y, z) ∋ (x=x/z, y=y/z)
      toAffine(iz) {
        return toAffineMemo(this, iz);
      }
      isTorsionFree() {
        const { h: cofactor, isTorsionFree } = CURVE;
        if (cofactor === _1n5)
          return true;
        if (isTorsionFree)
          return isTorsionFree(Point5, this);
        throw new Error("isTorsionFree() has not been declared for the elliptic curve");
      }
      clearCofactor() {
        const { h: cofactor, clearCofactor } = CURVE;
        if (cofactor === _1n5)
          return this;
        if (clearCofactor)
          return clearCofactor(Point5, this);
        return this.multiplyUnsafe(CURVE.h);
      }
      toRawBytes(isCompressed = true) {
        abool("isCompressed", isCompressed);
        this.assertValidity();
        return toBytes5(Point5, this, isCompressed);
      }
      toHex(isCompressed = true) {
        abool("isCompressed", isCompressed);
        return bytesToHex3(this.toRawBytes(isCompressed));
      }
    }
    Point5.BASE = new Point5(CURVE.Gx, CURVE.Gy, Fp3.ONE);
    Point5.ZERO = new Point5(Fp3.ZERO, Fp3.ONE, Fp3.ZERO);
    const { endo, nBitLength } = CURVE;
    const wnaf = wNAF(Point5, endo ? Math.ceil(nBitLength / 2) : nBitLength);
    return {
      CURVE,
      ProjectivePoint: Point5,
      normPrivateKeyToScalar,
      weierstrassEquation,
      isWithinCurveOrder
    };
  }
  function validateOpts(curve) {
    const opts = validateBasic(curve);
    validateObject(opts, {
      hash: "hash",
      hmac: "function",
      randomBytes: "function"
    }, {
      bits2int: "function",
      bits2int_modN: "function",
      lowS: "boolean"
    });
    return Object.freeze({ lowS: true, ...opts });
  }
  function weierstrass(curveDef) {
    const CURVE = validateOpts(curveDef);
    const { Fp: Fp3, n: CURVE_ORDER, nByteLength, nBitLength } = CURVE;
    const compressedLen = Fp3.BYTES + 1;
    const uncompressedLen = 2 * Fp3.BYTES + 1;
    function modN2(a5) {
      return mod(a5, CURVE_ORDER);
    }
    function invN(a5) {
      return invert(a5, CURVE_ORDER);
    }
    const { ProjectivePoint: Point5, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder } = weierstrassPoints({
      ...CURVE,
      toBytes(_c, point3, isCompressed) {
        const a5 = point3.toAffine();
        const x13 = Fp3.toBytes(a5.x);
        const cat = concatBytes3;
        abool("isCompressed", isCompressed);
        if (isCompressed) {
          return cat(Uint8Array.from([point3.hasEvenY() ? 2 : 3]), x13);
        } else {
          return cat(Uint8Array.from([4]), x13, Fp3.toBytes(a5.y));
        }
      },
      fromBytes(bytes) {
        const len = bytes.length;
        const head = bytes[0];
        const tail = bytes.subarray(1);
        if (len === compressedLen && (head === 2 || head === 3)) {
          const x13 = bytesToNumberBE(tail);
          if (!inRange(x13, _1n5, Fp3.ORDER))
            throw new Error("Point is not on curve");
          const y22 = weierstrassEquation(x13);
          let y11;
          try {
            y11 = Fp3.sqrt(y22);
          } catch (sqrtError) {
            const suffix = sqrtError instanceof Error ? ": " + sqrtError.message : "";
            throw new Error("Point is not on curve" + suffix);
          }
          const isYOdd = (y11 & _1n5) === _1n5;
          const isHeadOdd = (head & 1) === 1;
          if (isHeadOdd !== isYOdd)
            y11 = Fp3.neg(y11);
          return { x: x13, y: y11 };
        } else if (len === uncompressedLen && head === 4) {
          const x13 = Fp3.fromBytes(tail.subarray(0, Fp3.BYTES));
          const y11 = Fp3.fromBytes(tail.subarray(Fp3.BYTES, 2 * Fp3.BYTES));
          return { x: x13, y: y11 };
        } else {
          const cl = compressedLen;
          const ul = uncompressedLen;
          throw new Error("invalid Point, expected length of " + cl + ", or uncompressed " + ul + ", got " + len);
        }
      }
    });
    function isBiggerThanHalfOrder(number5) {
      const HALF = CURVE_ORDER >> _1n5;
      return number5 > HALF;
    }
    function normalizeS(s3) {
      return isBiggerThanHalfOrder(s3) ? modN2(-s3) : s3;
    }
    const slcNum = (b9, from16, to3) => bytesToNumberBE(b9.slice(from16, to3));
    class Signature2 {
      constructor(r3, s3, recovery) {
        aInRange("r", r3, _1n5, CURVE_ORDER);
        aInRange("s", s3, _1n5, CURVE_ORDER);
        this.r = r3;
        this.s = s3;
        if (recovery != null)
          this.recovery = recovery;
        Object.freeze(this);
      }
      // pair (bytes of r, bytes of s)
      static fromCompact(hex3) {
        const l6 = nByteLength;
        hex3 = ensureBytes("compactSignature", hex3, l6 * 2);
        return new Signature2(slcNum(hex3, 0, l6), slcNum(hex3, l6, 2 * l6));
      }
      // DER encoded ECDSA signature
      // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
      static fromDER(hex3) {
        const { r: r3, s: s3 } = DER.toSig(ensureBytes("DER", hex3));
        return new Signature2(r3, s3);
      }
      /**
       * @todo remove
       * @deprecated
       */
      assertValidity() {
      }
      addRecoveryBit(recovery) {
        return new Signature2(this.r, this.s, recovery);
      }
      recoverPublicKey(msgHash) {
        const { r: r3, s: s3, recovery: rec } = this;
        const h8 = bits2int_modN(ensureBytes("msgHash", msgHash));
        if (rec == null || ![0, 1, 2, 3].includes(rec))
          throw new Error("recovery id invalid");
        const radj = rec === 2 || rec === 3 ? r3 + CURVE.n : r3;
        if (radj >= Fp3.ORDER)
          throw new Error("recovery id 2 or 3 invalid");
        const prefix = (rec & 1) === 0 ? "02" : "03";
        const R6 = Point5.fromHex(prefix + numToSizedHex(radj, Fp3.BYTES));
        const ir5 = invN(radj);
        const u1 = modN2(-h8 * ir5);
        const u22 = modN2(s3 * ir5);
        const Q7 = Point5.BASE.multiplyAndAddUnsafe(R6, u1, u22);
        if (!Q7)
          throw new Error("point at infinify");
        Q7.assertValidity();
        return Q7;
      }
      // Signatures should be low-s, to prevent malleability.
      hasHighS() {
        return isBiggerThanHalfOrder(this.s);
      }
      normalizeS() {
        return this.hasHighS() ? new Signature2(this.r, modN2(-this.s), this.recovery) : this;
      }
      // DER-encoded
      toDERRawBytes() {
        return hexToBytes3(this.toDERHex());
      }
      toDERHex() {
        return DER.hexFromSig(this);
      }
      // padded bytes of r, then padded bytes of s
      toCompactRawBytes() {
        return hexToBytes3(this.toCompactHex());
      }
      toCompactHex() {
        const l6 = nByteLength;
        return numToSizedHex(this.r, l6) + numToSizedHex(this.s, l6);
      }
    }
    const utils = {
      isValidPrivateKey(privateKey) {
        try {
          normPrivateKeyToScalar(privateKey);
          return true;
        } catch (error51) {
          return false;
        }
      },
      normPrivateKeyToScalar,
      /**
       * Produces cryptographically secure private key from random of size
       * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.
       */
      randomPrivateKey: () => {
        const length2 = getMinHashLength(CURVE.n);
        return mapHashToField(CURVE.randomBytes(length2), CURVE.n);
      },
      /**
       * Creates precompute table for an arbitrary EC point. Makes point "cached".
       * Allows to massively speed-up `point.multiply(scalar)`.
       * @returns cached point
       * @example
       * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));
       * fast.multiply(privKey); // much faster ECDH now
       */
      precompute(windowSize = 8, point3 = Point5.BASE) {
        point3._setWindowSize(windowSize);
        point3.multiply(BigInt(3));
        return point3;
      }
    };
    function getPublicKey2(privateKey, isCompressed = true) {
      return Point5.fromPrivateKey(privateKey).toRawBytes(isCompressed);
    }
    function isProbPub(item) {
      if (typeof item === "bigint")
        return false;
      if (item instanceof Point5)
        return true;
      const arr = ensureBytes("key", item);
      const len = arr.length;
      const fpl = Fp3.BYTES;
      const compLen = fpl + 1;
      const uncompLen = 2 * fpl + 1;
      if (CURVE.allowedPrivateKeyLengths || nByteLength === compLen) {
        return void 0;
      } else {
        return len === compLen || len === uncompLen;
      }
    }
    function getSharedSecret(privateA, publicB, isCompressed = true) {
      if (isProbPub(privateA) === true)
        throw new Error("first arg must be private key");
      if (isProbPub(publicB) === false)
        throw new Error("second arg must be public key");
      const b9 = Point5.fromHex(publicB);
      return b9.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);
    }
    const bits2int = CURVE.bits2int || function(bytes) {
      if (bytes.length > 8192)
        throw new Error("input is too large");
      const num2 = bytesToNumberBE(bytes);
      const delta = bytes.length * 8 - nBitLength;
      return delta > 0 ? num2 >> BigInt(delta) : num2;
    };
    const bits2int_modN = CURVE.bits2int_modN || function(bytes) {
      return modN2(bits2int(bytes));
    };
    const ORDER_MASK = bitMask(nBitLength);
    function int2octets(num2) {
      aInRange("num < 2^" + nBitLength, num2, _0n5, ORDER_MASK);
      return numberToBytesBE(num2, nByteLength);
    }
    function prepSig(msgHash, privateKey, opts = defaultSigOpts) {
      if (["recovered", "canonical"].some((k7) => k7 in opts))
        throw new Error("sign() legacy options not supported");
      const { hash: hash5, randomBytes: randomBytes3 } = CURVE;
      let { lowS, prehash, extraEntropy: ent } = opts;
      if (lowS == null)
        lowS = true;
      msgHash = ensureBytes("msgHash", msgHash);
      validateSigVerOpts(opts);
      if (prehash)
        msgHash = ensureBytes("prehashed msgHash", hash5(msgHash));
      const h1int = bits2int_modN(msgHash);
      const d6 = normPrivateKeyToScalar(privateKey);
      const seedArgs = [int2octets(d6), int2octets(h1int)];
      if (ent != null && ent !== false) {
        const e2 = ent === true ? randomBytes3(Fp3.BYTES) : ent;
        seedArgs.push(ensureBytes("extraEntropy", e2));
      }
      const seed = concatBytes3(...seedArgs);
      const m3 = h1int;
      function k2sig(kBytes) {
        const k7 = bits2int(kBytes);
        if (!isWithinCurveOrder(k7))
          return;
        const ik = invN(k7);
        const q7 = Point5.BASE.multiply(k7).toAffine();
        const r3 = modN2(q7.x);
        if (r3 === _0n5)
          return;
        const s3 = modN2(ik * modN2(m3 + r3 * d6));
        if (s3 === _0n5)
          return;
        let recovery = (q7.x === r3 ? 0 : 2) | Number(q7.y & _1n5);
        let normS = s3;
        if (lowS && isBiggerThanHalfOrder(s3)) {
          normS = normalizeS(s3);
          recovery ^= 1;
        }
        return new Signature2(r3, normS, recovery);
      }
      return { seed, k2sig };
    }
    const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };
    const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };
    function sign6(msgHash, privKey, opts = defaultSigOpts) {
      const { seed, k2sig } = prepSig(msgHash, privKey, opts);
      const C9 = CURVE;
      const drbg = createHmacDrbg(C9.hash.outputLen, C9.nByteLength, C9.hmac);
      return drbg(seed, k2sig);
    }
    Point5.BASE._setWindowSize(8);
    function verify5(signature2, msgHash, publicKey3, opts = defaultVerOpts) {
      const sg = signature2;
      msgHash = ensureBytes("msgHash", msgHash);
      publicKey3 = ensureBytes("publicKey", publicKey3);
      const { lowS, prehash, format } = opts;
      validateSigVerOpts(opts);
      if ("strict" in opts)
        throw new Error("options.strict was renamed to lowS");
      if (format !== void 0 && format !== "compact" && format !== "der")
        throw new Error("format must be compact or der");
      const isHex2 = typeof sg === "string" || isBytes2(sg);
      const isObj = !isHex2 && !format && typeof sg === "object" && sg !== null && typeof sg.r === "bigint" && typeof sg.s === "bigint";
      if (!isHex2 && !isObj)
        throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");
      let _sig = void 0;
      let P8;
      try {
        if (isObj)
          _sig = new Signature2(sg.r, sg.s);
        if (isHex2) {
          try {
            if (format !== "compact")
              _sig = Signature2.fromDER(sg);
          } catch (derError) {
            if (!(derError instanceof DER.Err))
              throw derError;
          }
          if (!_sig && format !== "der")
            _sig = Signature2.fromCompact(sg);
        }
        P8 = Point5.fromHex(publicKey3);
      } catch (error51) {
        return false;
      }
      if (!_sig)
        return false;
      if (lowS && _sig.hasHighS())
        return false;
      if (prehash)
        msgHash = CURVE.hash(msgHash);
      const { r: r3, s: s3 } = _sig;
      const h8 = bits2int_modN(msgHash);
      const is3 = invN(s3);
      const u1 = modN2(h8 * is3);
      const u22 = modN2(r3 * is3);
      const R6 = Point5.BASE.multiplyAndAddUnsafe(P8, u1, u22)?.toAffine();
      if (!R6)
        return false;
      const v13 = modN2(R6.x);
      return v13 === r3;
    }
    return {
      CURVE,
      getPublicKey: getPublicKey2,
      getSharedSecret,
      sign: sign6,
      verify: verify5,
      ProjectivePoint: Point5,
      Signature: Signature2,
      utils
    };
  }
  function SWUFpSqrtRatio(Fp3, Z6) {
    const q7 = Fp3.ORDER;
    let l6 = _0n5;
    for (let o5 = q7 - _1n5; o5 % _2n3 === _0n5; o5 /= _2n3)
      l6 += _1n5;
    const c1 = l6;
    const _2n_pow_c1_1 = _2n3 << c1 - _1n5 - _1n5;
    const _2n_pow_c1 = _2n_pow_c1_1 * _2n3;
    const c22 = (q7 - _1n5) / _2n_pow_c1;
    const c32 = (c22 - _1n5) / _2n3;
    const c42 = _2n_pow_c1 - _1n5;
    const c52 = _2n_pow_c1_1;
    const c62 = Fp3.pow(Z6, c22);
    const c7 = Fp3.pow(Z6, (c22 + _1n5) / _2n3);
    let sqrtRatio = (u4, v13) => {
      let tv1 = c62;
      let tv2 = Fp3.pow(v13, c42);
      let tv3 = Fp3.sqr(tv2);
      tv3 = Fp3.mul(tv3, v13);
      let tv5 = Fp3.mul(u4, tv3);
      tv5 = Fp3.pow(tv5, c32);
      tv5 = Fp3.mul(tv5, tv2);
      tv2 = Fp3.mul(tv5, v13);
      tv3 = Fp3.mul(tv5, u4);
      let tv4 = Fp3.mul(tv3, tv2);
      tv5 = Fp3.pow(tv4, c52);
      let isQR = Fp3.eql(tv5, Fp3.ONE);
      tv2 = Fp3.mul(tv3, c7);
      tv5 = Fp3.mul(tv4, tv1);
      tv3 = Fp3.cmov(tv2, tv3, isQR);
      tv4 = Fp3.cmov(tv5, tv4, isQR);
      for (let i5 = c1; i5 > _1n5; i5--) {
        let tv52 = i5 - _2n3;
        tv52 = _2n3 << tv52 - _1n5;
        let tvv5 = Fp3.pow(tv4, tv52);
        const e1 = Fp3.eql(tvv5, Fp3.ONE);
        tv2 = Fp3.mul(tv3, tv1);
        tv1 = Fp3.mul(tv1, tv1);
        tvv5 = Fp3.mul(tv4, tv1);
        tv3 = Fp3.cmov(tv2, tv3, e1);
        tv4 = Fp3.cmov(tvv5, tv4, e1);
      }
      return { isValid: isQR, value: tv3 };
    };
    if (Fp3.ORDER % _4n2 === _3n2) {
      const c12 = (Fp3.ORDER - _3n2) / _4n2;
      const c23 = Fp3.sqrt(Fp3.neg(Z6));
      sqrtRatio = (u4, v13) => {
        let tv1 = Fp3.sqr(v13);
        const tv2 = Fp3.mul(u4, v13);
        tv1 = Fp3.mul(tv1, tv2);
        let y1 = Fp3.pow(tv1, c12);
        y1 = Fp3.mul(y1, tv2);
        const y22 = Fp3.mul(y1, c23);
        const tv3 = Fp3.mul(Fp3.sqr(y1), v13);
        const isQR = Fp3.eql(tv3, u4);
        let y11 = Fp3.cmov(y22, y1, isQR);
        return { isValid: isQR, value: y11 };
      };
    }
    return sqrtRatio;
  }
  function mapToCurveSimpleSWU(Fp3, opts) {
    validateField(Fp3);
    if (!Fp3.isValid(opts.A) || !Fp3.isValid(opts.B) || !Fp3.isValid(opts.Z))
      throw new Error("mapToCurveSimpleSWU: invalid opts");
    const sqrtRatio = SWUFpSqrtRatio(Fp3, opts.Z);
    if (!Fp3.isOdd)
      throw new Error("Fp.isOdd is not implemented!");
    return (u4) => {
      let tv1, tv2, tv3, tv4, tv5, tv6, x13, y11;
      tv1 = Fp3.sqr(u4);
      tv1 = Fp3.mul(tv1, opts.Z);
      tv2 = Fp3.sqr(tv1);
      tv2 = Fp3.add(tv2, tv1);
      tv3 = Fp3.add(tv2, Fp3.ONE);
      tv3 = Fp3.mul(tv3, opts.B);
      tv4 = Fp3.cmov(opts.Z, Fp3.neg(tv2), !Fp3.eql(tv2, Fp3.ZERO));
      tv4 = Fp3.mul(tv4, opts.A);
      tv2 = Fp3.sqr(tv3);
      tv6 = Fp3.sqr(tv4);
      tv5 = Fp3.mul(tv6, opts.A);
      tv2 = Fp3.add(tv2, tv5);
      tv2 = Fp3.mul(tv2, tv3);
      tv6 = Fp3.mul(tv6, tv4);
      tv5 = Fp3.mul(tv6, opts.B);
      tv2 = Fp3.add(tv2, tv5);
      x13 = Fp3.mul(tv1, tv3);
      const { isValid, value } = sqrtRatio(tv2, tv6);
      y11 = Fp3.mul(tv1, u4);
      y11 = Fp3.mul(y11, value);
      x13 = Fp3.cmov(x13, tv3, isValid);
      y11 = Fp3.cmov(y11, value, isValid);
      const e1 = Fp3.isOdd(u4) === Fp3.isOdd(y11);
      y11 = Fp3.cmov(Fp3.neg(y11), y11, e1);
      const tv4_inv = FpInvertBatch(Fp3, [tv4], true)[0];
      x13 = Fp3.mul(x13, tv4_inv);
      return { x: x13, y: y11 };
    };
  }
  var DERErr, DER, _0n5, _1n5, _2n3, _3n2, _4n2;
  var init_weierstrass = __esm({
    "../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/weierstrass.js"() {
      "use strict";
      init_node_compat_inject();
      init_curve();
      init_modular();
      init_utils4();
      DERErr = class extends Error {
        constructor(m3 = "") {
          super(m3);
        }
      };
      DER = {
        // asn.1 DER encoding utils
        Err: DERErr,
        // Basic building block is TLV (Tag-Length-Value)
        _tlv: {
          encode: (tag, data) => {
            const { Err: E6 } = DER;
            if (tag < 0 || tag > 256)
              throw new E6("tlv.encode: wrong tag");
            if (data.length & 1)
              throw new E6("tlv.encode: unpadded data");
            const dataLen = data.length / 2;
            const len = numberToHexUnpadded(dataLen);
            if (len.length / 2 & 128)
              throw new E6("tlv.encode: long form length too big");
            const lenLen = dataLen > 127 ? numberToHexUnpadded(len.length / 2 | 128) : "";
            const t = numberToHexUnpadded(tag);
            return t + lenLen + len + data;
          },
          // v - value, l - left bytes (unparsed)
          decode(tag, data) {
            const { Err: E6 } = DER;
            let pos = 0;
            if (tag < 0 || tag > 256)
              throw new E6("tlv.encode: wrong tag");
            if (data.length < 2 || data[pos++] !== tag)
              throw new E6("tlv.decode: wrong tlv");
            const first = data[pos++];
            const isLong = !!(first & 128);
            let length2 = 0;
            if (!isLong)
              length2 = first;
            else {
              const lenLen = first & 127;
              if (!lenLen)
                throw new E6("tlv.decode(long): indefinite length not supported");
              if (lenLen > 4)
                throw new E6("tlv.decode(long): byte length is too big");
              const lengthBytes = data.subarray(pos, pos + lenLen);
              if (lengthBytes.length !== lenLen)
                throw new E6("tlv.decode: length bytes not complete");
              if (lengthBytes[0] === 0)
                throw new E6("tlv.decode(long): zero leftmost byte");
              for (const b9 of lengthBytes)
                length2 = length2 << 8 | b9;
              pos += lenLen;
              if (length2 < 128)
                throw new E6("tlv.decode(long): not minimal encoding");
            }
            const v13 = data.subarray(pos, pos + length2);
            if (v13.length !== length2)
              throw new E6("tlv.decode: wrong value length");
            return { v: v13, l: data.subarray(pos + length2) };
          }
        },
        // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,
        // since we always use positive integers here. It must always be empty:
        // - add zero byte if exists
        // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)
        _int: {
          encode(num2) {
            const { Err: E6 } = DER;
            if (num2 < _0n5)
              throw new E6("integer: negative integers are not allowed");
            let hex3 = numberToHexUnpadded(num2);
            if (Number.parseInt(hex3[0], 16) & 8)
              hex3 = "00" + hex3;
            if (hex3.length & 1)
              throw new E6("unexpected DER parsing assertion: unpadded hex");
            return hex3;
          },
          decode(data) {
            const { Err: E6 } = DER;
            if (data[0] & 128)
              throw new E6("invalid signature integer: negative");
            if (data[0] === 0 && !(data[1] & 128))
              throw new E6("invalid signature integer: unnecessary leading zero");
            return bytesToNumberBE(data);
          }
        },
        toSig(hex3) {
          const { Err: E6, _int: int2, _tlv: tlv } = DER;
          const data = ensureBytes("signature", hex3);
          const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);
          if (seqLeftBytes.length)
            throw new E6("invalid signature: left bytes after parsing");
          const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);
          const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);
          if (sLeftBytes.length)
            throw new E6("invalid signature: left bytes after parsing");
          return { r: int2.decode(rBytes), s: int2.decode(sBytes) };
        },
        hexFromSig(sig) {
          const { _tlv: tlv, _int: int2 } = DER;
          const rs = tlv.encode(2, int2.encode(sig.r));
          const ss2 = tlv.encode(2, int2.encode(sig.s));
          const seq2 = rs + ss2;
          return tlv.encode(48, seq2);
        }
      };
      _0n5 = BigInt(0);
      _1n5 = BigInt(1);
      _2n3 = BigInt(2);
      _3n2 = BigInt(3);
      _4n2 = BigInt(4);
    }
  });

  // ../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/_shortw_utils.js
  function getHash(hash5) {
    return {
      hash: hash5,
      hmac: (key2, ...msgs) => hmac(hash5, key2, concatBytes(...msgs)),
      randomBytes
    };
  }
  function createCurve(curveDef, defHash) {
    const create4 = (hash5) => weierstrass({ ...curveDef, ...getHash(hash5) });
    return { ...create4(defHash), create: create4 };
  }
  var init_shortw_utils = __esm({
    "../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/_shortw_utils.js"() {
      "use strict";
      init_node_compat_inject();
      init_hmac();
      init_utils2();
      init_weierstrass();
    }
  });

  // ../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/hash-to-curve.js
  function i2osp(value, length2) {
    anum(value);
    anum(length2);
    if (value < 0 || value >= 1 << 8 * length2)
      throw new Error("invalid I2OSP input: " + value);
    const res = Array.from({ length: length2 }).fill(0);
    for (let i5 = length2 - 1; i5 >= 0; i5--) {
      res[i5] = value & 255;
      value >>>= 8;
    }
    return new Uint8Array(res);
  }
  function strxor(a5, b9) {
    const arr = new Uint8Array(a5.length);
    for (let i5 = 0; i5 < a5.length; i5++) {
      arr[i5] = a5[i5] ^ b9[i5];
    }
    return arr;
  }
  function anum(item) {
    if (!Number.isSafeInteger(item))
      throw new Error("number expected");
  }
  function expand_message_xmd(msg, DST, lenInBytes, H6) {
    abytes2(msg);
    abytes2(DST);
    anum(lenInBytes);
    if (DST.length > 255)
      DST = H6(concatBytes3(utf8ToBytes2("H2C-OVERSIZE-DST-"), DST));
    const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H6;
    const ell = Math.ceil(lenInBytes / b_in_bytes);
    if (lenInBytes > 65535 || ell > 255)
      throw new Error("expand_message_xmd: invalid lenInBytes");
    const DST_prime = concatBytes3(DST, i2osp(DST.length, 1));
    const Z_pad = i2osp(0, r_in_bytes);
    const l_i_b_str = i2osp(lenInBytes, 2);
    const b9 = new Array(ell);
    const b_0 = H6(concatBytes3(Z_pad, msg, l_i_b_str, i2osp(0, 1), DST_prime));
    b9[0] = H6(concatBytes3(b_0, i2osp(1, 1), DST_prime));
    for (let i5 = 1; i5 <= ell; i5++) {
      const args = [strxor(b_0, b9[i5 - 1]), i2osp(i5 + 1, 1), DST_prime];
      b9[i5] = H6(concatBytes3(...args));
    }
    const pseudo_random_bytes = concatBytes3(...b9);
    return pseudo_random_bytes.slice(0, lenInBytes);
  }
  function expand_message_xof(msg, DST, lenInBytes, k7, H6) {
    abytes2(msg);
    abytes2(DST);
    anum(lenInBytes);
    if (DST.length > 255) {
      const dkLen = Math.ceil(2 * k7 / 8);
      DST = H6.create({ dkLen }).update(utf8ToBytes2("H2C-OVERSIZE-DST-")).update(DST).digest();
    }
    if (lenInBytes > 65535 || DST.length > 255)
      throw new Error("expand_message_xof: invalid lenInBytes");
    return H6.create({ dkLen: lenInBytes }).update(msg).update(i2osp(lenInBytes, 2)).update(DST).update(i2osp(DST.length, 1)).digest();
  }
  function hash_to_field(msg, count, options) {
    validateObject(options, {
      DST: "stringOrUint8Array",
      p: "bigint",
      m: "isSafeInteger",
      k: "isSafeInteger",
      hash: "hash"
    });
    const { p: p7, k: k7, m: m3, hash: hash5, expand: expand2, DST: _DST } = options;
    abytes2(msg);
    anum(count);
    const DST = typeof _DST === "string" ? utf8ToBytes2(_DST) : _DST;
    const log2p = p7.toString(2).length;
    const L6 = Math.ceil((log2p + k7) / 8);
    const len_in_bytes = count * m3 * L6;
    let prb;
    if (expand2 === "xmd") {
      prb = expand_message_xmd(msg, DST, len_in_bytes, hash5);
    } else if (expand2 === "xof") {
      prb = expand_message_xof(msg, DST, len_in_bytes, k7, hash5);
    } else if (expand2 === "_internal_pass") {
      prb = msg;
    } else {
      throw new Error('expand must be "xmd" or "xof"');
    }
    const u4 = new Array(count);
    for (let i5 = 0; i5 < count; i5++) {
      const e2 = new Array(m3);
      for (let j6 = 0; j6 < m3; j6++) {
        const elm_offset = L6 * (j6 + i5 * m3);
        const tv = prb.subarray(elm_offset, elm_offset + L6);
        e2[j6] = mod(os2ip(tv), p7);
      }
      u4[i5] = e2;
    }
    return u4;
  }
  function isogenyMap(field, map2) {
    const coeff = map2.map((i5) => Array.from(i5).reverse());
    return (x13, y11) => {
      const [xn4, xd, yn4, yd] = coeff.map((val) => val.reduce((acc, i5) => field.add(field.mul(acc, x13), i5)));
      const [xd_inv, yd_inv] = FpInvertBatch(field, [xd, yd], true);
      x13 = field.mul(xn4, xd_inv);
      y11 = field.mul(y11, field.mul(yn4, yd_inv));
      return { x: x13, y: y11 };
    };
  }
  function createHasher2(Point5, mapToCurve, defaults) {
    if (typeof mapToCurve !== "function")
      throw new Error("mapToCurve() must be defined");
    function map2(num2) {
      return Point5.fromAffine(mapToCurve(num2));
    }
    function clear2(initial) {
      const P8 = initial.clearCofactor();
      if (P8.equals(Point5.ZERO))
        return Point5.ZERO;
      P8.assertValidity();
      return P8;
    }
    return {
      defaults,
      // Encodes byte string to elliptic curve.
      // hash_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3
      hashToCurve(msg, options) {
        const u4 = hash_to_field(msg, 2, { ...defaults, DST: defaults.DST, ...options });
        const u0 = map2(u4[0]);
        const u1 = map2(u4[1]);
        return clear2(u0.add(u1));
      },
      // Encodes byte string to elliptic curve.
      // encode_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3
      encodeToCurve(msg, options) {
        const u4 = hash_to_field(msg, 1, { ...defaults, DST: defaults.encodeDST, ...options });
        return clear2(map2(u4[0]));
      },
      // Same as encodeToCurve, but without hash
      mapToCurve(scalars) {
        if (!Array.isArray(scalars))
          throw new Error("expected array of bigints");
        for (const i5 of scalars)
          if (typeof i5 !== "bigint")
            throw new Error("expected array of bigints");
        return clear2(map2(scalars));
      }
    };
  }
  var os2ip;
  var init_hash_to_curve = __esm({
    "../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/hash-to-curve.js"() {
      "use strict";
      init_node_compat_inject();
      init_modular();
      init_utils4();
      os2ip = bytesToNumberBE;
    }
  });

  // ../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/secp256k1.js
  var secp256k1_exports = {};
  __export(secp256k1_exports, {
    encodeToCurve: () => encodeToCurve,
    hashToCurve: () => hashToCurve,
    schnorr: () => schnorr,
    secp256k1: () => secp256k1,
    secp256k1_hasher: () => secp256k1_hasher
  });
  function sqrtMod(y11) {
    const P8 = secp256k1P;
    const _3n7 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);
    const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);
    const b22 = y11 * y11 * y11 % P8;
    const b32 = b22 * b22 * y11 % P8;
    const b62 = pow2(b32, _3n7, P8) * b32 % P8;
    const b9 = pow2(b62, _3n7, P8) * b32 % P8;
    const b11 = pow2(b9, _2n4, P8) * b22 % P8;
    const b222 = pow2(b11, _11n, P8) * b11 % P8;
    const b44 = pow2(b222, _22n, P8) * b222 % P8;
    const b88 = pow2(b44, _44n, P8) * b44 % P8;
    const b176 = pow2(b88, _88n, P8) * b88 % P8;
    const b220 = pow2(b176, _44n, P8) * b44 % P8;
    const b223 = pow2(b220, _3n7, P8) * b32 % P8;
    const t1 = pow2(b223, _23n, P8) * b222 % P8;
    const t2 = pow2(t1, _6n, P8) * b22 % P8;
    const root = pow2(t2, _2n4, P8);
    if (!Fpk1.eql(Fpk1.sqr(root), y11))
      throw new Error("Cannot find square root");
    return root;
  }
  function taggedHash(tag, ...messages) {
    let tagP = TAGGED_HASH_PREFIXES[tag];
    if (tagP === void 0) {
      const tagH = sha256(Uint8Array.from(tag, (c7) => c7.charCodeAt(0)));
      tagP = concatBytes3(tagH, tagH);
      TAGGED_HASH_PREFIXES[tag] = tagP;
    }
    return sha256(concatBytes3(tagP, ...messages));
  }
  function schnorrGetExtPubKey(priv) {
    let d_ = secp256k1.utils.normPrivateKeyToScalar(priv);
    let p7 = Point.fromPrivateKey(d_);
    const scalar = p7.hasEvenY() ? d_ : modN(-d_);
    return { scalar, bytes: pointToBytes(p7) };
  }
  function lift_x(x13) {
    aInRange("x", x13, _1n6, secp256k1P);
    const xx = modP(x13 * x13);
    const c7 = modP(xx * x13 + BigInt(7));
    let y11 = sqrtMod(c7);
    if (y11 % _2n4 !== _0n6)
      y11 = modP(-y11);
    const p7 = new Point(x13, y11, _1n6);
    p7.assertValidity();
    return p7;
  }
  function challenge(...args) {
    return modN(num(taggedHash("BIP0340/challenge", ...args)));
  }
  function schnorrGetPublicKey(privateKey) {
    return schnorrGetExtPubKey(privateKey).bytes;
  }
  function schnorrSign(message, privateKey, auxRand = randomBytes(32)) {
    const m3 = ensureBytes("message", message);
    const { bytes: px, scalar: d6 } = schnorrGetExtPubKey(privateKey);
    const a5 = ensureBytes("auxRand", auxRand, 32);
    const t = numTo32b(d6 ^ num(taggedHash("BIP0340/aux", a5)));
    const rand2 = taggedHash("BIP0340/nonce", t, px, m3);
    const k_ = modN(num(rand2));
    if (k_ === _0n6)
      throw new Error("sign failed: k is zero");
    const { bytes: rx, scalar: k7 } = schnorrGetExtPubKey(k_);
    const e2 = challenge(rx, px, m3);
    const sig = new Uint8Array(64);
    sig.set(rx, 0);
    sig.set(numTo32b(modN(k7 + e2 * d6)), 32);
    if (!schnorrVerify(sig, m3, px))
      throw new Error("sign: Invalid signature produced");
    return sig;
  }
  function schnorrVerify(signature2, message, publicKey3) {
    const sig = ensureBytes("signature", signature2, 64);
    const m3 = ensureBytes("message", message);
    const pub = ensureBytes("publicKey", publicKey3, 32);
    try {
      const P8 = lift_x(num(pub));
      const r3 = num(sig.subarray(0, 32));
      if (!inRange(r3, _1n6, secp256k1P))
        return false;
      const s3 = num(sig.subarray(32, 64));
      if (!inRange(s3, _1n6, secp256k1N))
        return false;
      const e2 = challenge(numTo32b(r3), pointToBytes(P8), m3);
      const R6 = GmulAdd(P8, s3, modN(-e2));
      if (!R6 || !R6.hasEvenY() || R6.toAffine().x !== r3)
        return false;
      return true;
    } catch (error51) {
      return false;
    }
  }
  var secp256k1P, secp256k1N, _0n6, _1n6, _2n4, divNearest, Fpk1, secp256k1, TAGGED_HASH_PREFIXES, pointToBytes, numTo32b, modP, modN, Point, GmulAdd, num, schnorr, isoMap, mapSWU, secp256k1_hasher, hashToCurve, encodeToCurve;
  var init_secp256k1 = __esm({
    "../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/secp256k1.js"() {
      "use strict";
      init_node_compat_inject();
      init_sha2();
      init_utils2();
      init_shortw_utils();
      init_hash_to_curve();
      init_modular();
      init_utils4();
      init_weierstrass();
      secp256k1P = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f");
      secp256k1N = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");
      _0n6 = BigInt(0);
      _1n6 = BigInt(1);
      _2n4 = BigInt(2);
      divNearest = (a5, b9) => (a5 + b9 / _2n4) / b9;
      Fpk1 = Field(secp256k1P, void 0, void 0, { sqrt: sqrtMod });
      secp256k1 = createCurve({
        a: _0n6,
        b: BigInt(7),
        Fp: Fpk1,
        n: secp256k1N,
        Gx: BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),
        Gy: BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),
        h: BigInt(1),
        lowS: true,
        // Allow only low-S signatures by default in sign() and verify()
        endo: {
          // Endomorphism, see above
          beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),
          splitScalar: (k7) => {
            const n6 = secp256k1N;
            const a1 = BigInt("0x3086d221a7d46bcde86c90e49284eb15");
            const b1 = -_1n6 * BigInt("0xe4437ed6010e88286f547fa90abfe4c3");
            const a22 = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8");
            const b22 = a1;
            const POW_2_128 = BigInt("0x100000000000000000000000000000000");
            const c1 = divNearest(b22 * k7, n6);
            const c22 = divNearest(-b1 * k7, n6);
            let k1 = mod(k7 - c1 * a1 - c22 * a22, n6);
            let k22 = mod(-c1 * b1 - c22 * b22, n6);
            const k1neg = k1 > POW_2_128;
            const k2neg = k22 > POW_2_128;
            if (k1neg)
              k1 = n6 - k1;
            if (k2neg)
              k22 = n6 - k22;
            if (k1 > POW_2_128 || k22 > POW_2_128) {
              throw new Error("splitScalar: Endomorphism failed, k=" + k7);
            }
            return { k1neg, k1, k2neg, k2: k22 };
          }
        }
      }, sha256);
      TAGGED_HASH_PREFIXES = {};
      pointToBytes = (point3) => point3.toRawBytes(true).slice(1);
      numTo32b = (n6) => numberToBytesBE(n6, 32);
      modP = (x13) => mod(x13, secp256k1P);
      modN = (x13) => mod(x13, secp256k1N);
      Point = /* @__PURE__ */ (() => secp256k1.ProjectivePoint)();
      GmulAdd = (Q7, a5, b9) => Point.BASE.multiplyAndAddUnsafe(Q7, a5, b9);
      num = bytesToNumberBE;
      schnorr = /* @__PURE__ */ (() => ({
        getPublicKey: schnorrGetPublicKey,
        sign: schnorrSign,
        verify: schnorrVerify,
        utils: {
          randomPrivateKey: secp256k1.utils.randomPrivateKey,
          lift_x,
          pointToBytes,
          numberToBytesBE,
          bytesToNumberBE,
          taggedHash,
          mod
        }
      }))();
      isoMap = /* @__PURE__ */ (() => isogenyMap(Fpk1, [
        // xNum
        [
          "0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7",
          "0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581",
          "0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262",
          "0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"
        ],
        // xDen
        [
          "0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b",
          "0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14",
          "0x0000000000000000000000000000000000000000000000000000000000000001"
          // LAST 1
        ],
        // yNum
        [
          "0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c",
          "0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3",
          "0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931",
          "0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"
        ],
        // yDen
        [
          "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b",
          "0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573",
          "0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f",
          "0x0000000000000000000000000000000000000000000000000000000000000001"
          // LAST 1
        ]
      ].map((i5) => i5.map((j6) => BigInt(j6)))))();
      mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fpk1, {
        A: BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),
        B: BigInt("1771"),
        Z: Fpk1.create(BigInt("-11"))
      }))();
      secp256k1_hasher = /* @__PURE__ */ (() => createHasher2(secp256k1.ProjectivePoint, (scalars) => {
        const { x: x13, y: y11 } = mapSWU(Fpk1.create(scalars[0]));
        return isoMap(x13, y11);
      }, {
        DST: "secp256k1_XMD:SHA-256_SSWU_RO_",
        encodeDST: "secp256k1_XMD:SHA-256_SSWU_NU_",
        p: Fpk1.ORDER,
        m: 1,
        k: 128,
        expand: "xmd",
        hash: sha256
      }))();
      hashToCurve = /* @__PURE__ */ (() => secp256k1_hasher.hashToCurve)();
      encodeToCurve = /* @__PURE__ */ (() => secp256k1_hasher.encodeToCurve)();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/node.js
  var ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, NonceTooHighError, NonceTooLowError, NonceMaxValueError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, TransactionTypeNotSupportedError, TipAboveFeeCapError, UnknownNodeError;
  var init_node = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/node.js"() {
      "use strict";
      init_node_compat_inject();
      init_formatGwei();
      init_base();
      ExecutionRevertedError = class extends BaseError2 {
        constructor({ cause, message } = {}) {
          const reason = message?.replace("execution reverted: ", "")?.replace("execution reverted", "");
          super(`Execution reverted ${reason ? `with reason: ${reason}` : "for an unknown reason"}.`, {
            cause,
            name: "ExecutionRevertedError"
          });
        }
      };
      Object.defineProperty(ExecutionRevertedError, "code", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: 3
      });
      Object.defineProperty(ExecutionRevertedError, "nodeMessage", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: /execution reverted|gas required exceeds allowance/
      });
      FeeCapTooHighError = class extends BaseError2 {
        constructor({ cause, maxFeePerGas } = {}) {
          super(`The fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
            cause,
            name: "FeeCapTooHighError"
          });
        }
      };
      Object.defineProperty(FeeCapTooHighError, "nodeMessage", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
      });
      FeeCapTooLowError = class extends BaseError2 {
        constructor({ cause, maxFeePerGas } = {}) {
          super(`The fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : ""} gwei) cannot be lower than the block base fee.`, {
            cause,
            name: "FeeCapTooLowError"
          });
        }
      };
      Object.defineProperty(FeeCapTooLowError, "nodeMessage", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
      });
      NonceTooHighError = class extends BaseError2 {
        constructor({ cause, nonce } = {}) {
          super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ""}is higher than the next one expected.`, { cause, name: "NonceTooHighError" });
        }
      };
      Object.defineProperty(NonceTooHighError, "nodeMessage", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: /nonce too high/
      });
      NonceTooLowError = class extends BaseError2 {
        constructor({ cause, nonce } = {}) {
          super([
            `Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ""}is lower than the current nonce of the account.`,
            "Try increasing the nonce or find the latest nonce with `getTransactionCount`."
          ].join("\n"), { cause, name: "NonceTooLowError" });
        }
      };
      Object.defineProperty(NonceTooLowError, "nodeMessage", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: /nonce too low|transaction already imported|already known/
      });
      NonceMaxValueError = class extends BaseError2 {
        constructor({ cause, nonce } = {}) {
          super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ""}exceeds the maximum allowed nonce.`, { cause, name: "NonceMaxValueError" });
        }
      };
      Object.defineProperty(NonceMaxValueError, "nodeMessage", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: /nonce has max value/
      });
      InsufficientFundsError = class extends BaseError2 {
        constructor({ cause } = {}) {
          super([
            "The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."
          ].join("\n"), {
            cause,
            metaMessages: [
              "This error could arise when the account does not have enough funds to:",
              " - pay for the total gas fee,",
              " - pay for the value to send.",
              " ",
              "The cost of the transaction is calculated as `gas * gas fee + value`, where:",
              " - `gas` is the amount of gas needed for transaction to execute,",
              " - `gas fee` is the gas fee,",
              " - `value` is the amount of ether to send to the recipient."
            ],
            name: "InsufficientFundsError"
          });
        }
      };
      Object.defineProperty(InsufficientFundsError, "nodeMessage", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: /insufficient funds|exceeds transaction sender account balance/
      });
      IntrinsicGasTooHighError = class extends BaseError2 {
        constructor({ cause, gas } = {}) {
          super(`The amount of gas ${gas ? `(${gas}) ` : ""}provided for the transaction exceeds the limit allowed for the block.`, {
            cause,
            name: "IntrinsicGasTooHighError"
          });
        }
      };
      Object.defineProperty(IntrinsicGasTooHighError, "nodeMessage", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: /intrinsic gas too high|gas limit reached/
      });
      IntrinsicGasTooLowError = class extends BaseError2 {
        constructor({ cause, gas } = {}) {
          super(`The amount of gas ${gas ? `(${gas}) ` : ""}provided for the transaction is too low.`, {
            cause,
            name: "IntrinsicGasTooLowError"
          });
        }
      };
      Object.defineProperty(IntrinsicGasTooLowError, "nodeMessage", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: /intrinsic gas too low/
      });
      TransactionTypeNotSupportedError = class extends BaseError2 {
        constructor({ cause }) {
          super("The transaction type is not supported for this chain.", {
            cause,
            name: "TransactionTypeNotSupportedError"
          });
        }
      };
      Object.defineProperty(TransactionTypeNotSupportedError, "nodeMessage", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: /transaction type not valid/
      });
      TipAboveFeeCapError = class extends BaseError2 {
        constructor({ cause, maxPriorityFeePerGas, maxFeePerGas } = {}) {
          super([
            `The provided tip (\`maxPriorityFeePerGas\`${maxPriorityFeePerGas ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ""}).`
          ].join("\n"), {
            cause,
            name: "TipAboveFeeCapError"
          });
        }
      };
      Object.defineProperty(TipAboveFeeCapError, "nodeMessage", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
      });
      UnknownNodeError = class extends BaseError2 {
        constructor({ cause }) {
          super(`An error occurred while executing: ${cause?.shortMessage}`, {
            cause,
            name: "UnknownNodeError"
          });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/errors/getNodeError.js
  function getNodeError(err2, args) {
    const message = (err2.details || "").toLowerCase();
    const executionRevertedError = err2 instanceof BaseError2 ? err2.walk((e2) => e2?.code === ExecutionRevertedError.code) : err2;
    if (executionRevertedError instanceof BaseError2)
      return new ExecutionRevertedError({
        cause: err2,
        message: executionRevertedError.details
      });
    if (ExecutionRevertedError.nodeMessage.test(message))
      return new ExecutionRevertedError({
        cause: err2,
        message: err2.details
      });
    if (FeeCapTooHighError.nodeMessage.test(message))
      return new FeeCapTooHighError({
        cause: err2,
        maxFeePerGas: args?.maxFeePerGas
      });
    if (FeeCapTooLowError.nodeMessage.test(message))
      return new FeeCapTooLowError({
        cause: err2,
        maxFeePerGas: args?.maxFeePerGas
      });
    if (NonceTooHighError.nodeMessage.test(message))
      return new NonceTooHighError({ cause: err2, nonce: args?.nonce });
    if (NonceTooLowError.nodeMessage.test(message))
      return new NonceTooLowError({ cause: err2, nonce: args?.nonce });
    if (NonceMaxValueError.nodeMessage.test(message))
      return new NonceMaxValueError({ cause: err2, nonce: args?.nonce });
    if (InsufficientFundsError.nodeMessage.test(message))
      return new InsufficientFundsError({ cause: err2 });
    if (IntrinsicGasTooHighError.nodeMessage.test(message))
      return new IntrinsicGasTooHighError({ cause: err2, gas: args?.gas });
    if (IntrinsicGasTooLowError.nodeMessage.test(message))
      return new IntrinsicGasTooLowError({ cause: err2, gas: args?.gas });
    if (TransactionTypeNotSupportedError.nodeMessage.test(message))
      return new TransactionTypeNotSupportedError({ cause: err2 });
    if (TipAboveFeeCapError.nodeMessage.test(message))
      return new TipAboveFeeCapError({
        cause: err2,
        maxFeePerGas: args?.maxFeePerGas,
        maxPriorityFeePerGas: args?.maxPriorityFeePerGas
      });
    return new UnknownNodeError({
      cause: err2
    });
  }
  var init_getNodeError = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/errors/getNodeError.js"() {
      "use strict";
      init_node_compat_inject();
      init_base();
      init_node();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/extract.js
  function extract(value_, { format }) {
    if (!format)
      return {};
    const value = {};
    function extract_(formatted2) {
      const keys2 = Object.keys(formatted2);
      for (const key2 of keys2) {
        if (key2 in value_)
          value[key2] = value_[key2];
        if (formatted2[key2] && typeof formatted2[key2] === "object" && !Array.isArray(formatted2[key2]))
          extract_(formatted2[key2]);
      }
    }
    const formatted = format(value_ || {});
    extract_(formatted);
    return value;
  }
  var init_extract = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/extract.js"() {
      "use strict";
      init_node_compat_inject();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/formatter.js
  function defineFormatter(type2, format) {
    return ({ exclude, format: overrides }) => {
      return {
        exclude,
        format: (args, action) => {
          const formatted = format(args, action);
          if (exclude) {
            for (const key2 of exclude) {
              delete formatted[key2];
            }
          }
          return {
            ...formatted,
            ...overrides(args, action)
          };
        },
        type: type2
      };
    };
  }
  var init_formatter = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/formatter.js"() {
      "use strict";
      init_node_compat_inject();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/transactionRequest.js
  function formatTransactionRequest(request, _6) {
    const rpcRequest = {};
    if (typeof request.authorizationList !== "undefined")
      rpcRequest.authorizationList = formatAuthorizationList(request.authorizationList);
    if (typeof request.accessList !== "undefined")
      rpcRequest.accessList = request.accessList;
    if (typeof request.blobVersionedHashes !== "undefined")
      rpcRequest.blobVersionedHashes = request.blobVersionedHashes;
    if (typeof request.blobs !== "undefined") {
      if (typeof request.blobs[0] !== "string")
        rpcRequest.blobs = request.blobs.map((x13) => bytesToHex(x13));
      else
        rpcRequest.blobs = request.blobs;
    }
    if (typeof request.data !== "undefined")
      rpcRequest.data = request.data;
    if (request.account)
      rpcRequest.from = request.account.address;
    if (typeof request.from !== "undefined")
      rpcRequest.from = request.from;
    if (typeof request.gas !== "undefined")
      rpcRequest.gas = numberToHex(request.gas);
    if (typeof request.gasPrice !== "undefined")
      rpcRequest.gasPrice = numberToHex(request.gasPrice);
    if (typeof request.maxFeePerBlobGas !== "undefined")
      rpcRequest.maxFeePerBlobGas = numberToHex(request.maxFeePerBlobGas);
    if (typeof request.maxFeePerGas !== "undefined")
      rpcRequest.maxFeePerGas = numberToHex(request.maxFeePerGas);
    if (typeof request.maxPriorityFeePerGas !== "undefined")
      rpcRequest.maxPriorityFeePerGas = numberToHex(request.maxPriorityFeePerGas);
    if (typeof request.nonce !== "undefined")
      rpcRequest.nonce = numberToHex(request.nonce);
    if (typeof request.to !== "undefined")
      rpcRequest.to = request.to;
    if (typeof request.type !== "undefined")
      rpcRequest.type = rpcTransactionType[request.type];
    if (typeof request.value !== "undefined")
      rpcRequest.value = numberToHex(request.value);
    return rpcRequest;
  }
  function formatAuthorizationList(authorizationList) {
    return authorizationList.map((authorization) => ({
      address: authorization.address,
      r: authorization.r ? numberToHex(BigInt(authorization.r)) : authorization.r,
      s: authorization.s ? numberToHex(BigInt(authorization.s)) : authorization.s,
      chainId: numberToHex(authorization.chainId),
      nonce: numberToHex(authorization.nonce),
      ...typeof authorization.yParity !== "undefined" ? { yParity: numberToHex(authorization.yParity) } : {},
      ...typeof authorization.v !== "undefined" && typeof authorization.yParity === "undefined" ? { v: numberToHex(authorization.v) } : {}
    }));
  }
  var rpcTransactionType, defineTransactionRequest;
  var init_transactionRequest = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/transactionRequest.js"() {
      "use strict";
      init_node_compat_inject();
      init_toHex();
      init_formatter();
      rpcTransactionType = {
        legacy: "0x0",
        eip2930: "0x1",
        eip1559: "0x2",
        eip4844: "0x3",
        eip7702: "0x4"
      };
      defineTransactionRequest = /* @__PURE__ */ defineFormatter("transactionRequest", formatTransactionRequest);
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/stateOverride.js
  function serializeStateMapping(stateMapping) {
    if (!stateMapping || stateMapping.length === 0)
      return void 0;
    return stateMapping.reduce((acc, { slot, value }) => {
      if (slot.length !== 66)
        throw new InvalidBytesLengthError({
          size: slot.length,
          targetSize: 66,
          type: "hex"
        });
      if (value.length !== 66)
        throw new InvalidBytesLengthError({
          size: value.length,
          targetSize: 66,
          type: "hex"
        });
      acc[slot] = value;
      return acc;
    }, {});
  }
  function serializeAccountStateOverride(parameters) {
    const { balance, nonce, state, stateDiff, code: code2 } = parameters;
    const rpcAccountStateOverride = {};
    if (code2 !== void 0)
      rpcAccountStateOverride.code = code2;
    if (balance !== void 0)
      rpcAccountStateOverride.balance = numberToHex(balance);
    if (nonce !== void 0)
      rpcAccountStateOverride.nonce = numberToHex(nonce);
    if (state !== void 0)
      rpcAccountStateOverride.state = serializeStateMapping(state);
    if (stateDiff !== void 0) {
      if (rpcAccountStateOverride.state)
        throw new StateAssignmentConflictError();
      rpcAccountStateOverride.stateDiff = serializeStateMapping(stateDiff);
    }
    return rpcAccountStateOverride;
  }
  function serializeStateOverride(parameters) {
    if (!parameters)
      return void 0;
    const rpcStateOverride = {};
    for (const { address, ...accountState } of parameters) {
      if (!isAddress(address, { strict: false }))
        throw new InvalidAddressError({ address });
      if (rpcStateOverride[address])
        throw new AccountStateConflictError({ address });
      rpcStateOverride[address] = serializeAccountStateOverride(accountState);
    }
    return rpcStateOverride;
  }
  var init_stateOverride2 = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/stateOverride.js"() {
      "use strict";
      init_node_compat_inject();
      init_address();
      init_data();
      init_stateOverride();
      init_isAddress();
      init_toHex();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/number.js
  var maxInt8, maxInt16, maxInt24, maxInt32, maxInt40, maxInt48, maxInt56, maxInt64, maxInt72, maxInt80, maxInt88, maxInt96, maxInt104, maxInt112, maxInt120, maxInt128, maxInt136, maxInt144, maxInt152, maxInt160, maxInt168, maxInt176, maxInt184, maxInt192, maxInt200, maxInt208, maxInt216, maxInt224, maxInt232, maxInt240, maxInt248, maxInt256, minInt8, minInt16, minInt24, minInt32, minInt40, minInt48, minInt56, minInt64, minInt72, minInt80, minInt88, minInt96, minInt104, minInt112, minInt120, minInt128, minInt136, minInt144, minInt152, minInt160, minInt168, minInt176, minInt184, minInt192, minInt200, minInt208, minInt216, minInt224, minInt232, minInt240, minInt248, minInt256, maxUint8, maxUint16, maxUint24, maxUint32, maxUint40, maxUint48, maxUint56, maxUint64, maxUint72, maxUint80, maxUint88, maxUint96, maxUint104, maxUint112, maxUint120, maxUint128, maxUint136, maxUint144, maxUint152, maxUint160, maxUint168, maxUint176, maxUint184, maxUint192, maxUint200, maxUint208, maxUint216, maxUint224, maxUint232, maxUint240, maxUint248, maxUint256;
  var init_number = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/number.js"() {
      "use strict";
      init_node_compat_inject();
      maxInt8 = 2n ** (8n - 1n) - 1n;
      maxInt16 = 2n ** (16n - 1n) - 1n;
      maxInt24 = 2n ** (24n - 1n) - 1n;
      maxInt32 = 2n ** (32n - 1n) - 1n;
      maxInt40 = 2n ** (40n - 1n) - 1n;
      maxInt48 = 2n ** (48n - 1n) - 1n;
      maxInt56 = 2n ** (56n - 1n) - 1n;
      maxInt64 = 2n ** (64n - 1n) - 1n;
      maxInt72 = 2n ** (72n - 1n) - 1n;
      maxInt80 = 2n ** (80n - 1n) - 1n;
      maxInt88 = 2n ** (88n - 1n) - 1n;
      maxInt96 = 2n ** (96n - 1n) - 1n;
      maxInt104 = 2n ** (104n - 1n) - 1n;
      maxInt112 = 2n ** (112n - 1n) - 1n;
      maxInt120 = 2n ** (120n - 1n) - 1n;
      maxInt128 = 2n ** (128n - 1n) - 1n;
      maxInt136 = 2n ** (136n - 1n) - 1n;
      maxInt144 = 2n ** (144n - 1n) - 1n;
      maxInt152 = 2n ** (152n - 1n) - 1n;
      maxInt160 = 2n ** (160n - 1n) - 1n;
      maxInt168 = 2n ** (168n - 1n) - 1n;
      maxInt176 = 2n ** (176n - 1n) - 1n;
      maxInt184 = 2n ** (184n - 1n) - 1n;
      maxInt192 = 2n ** (192n - 1n) - 1n;
      maxInt200 = 2n ** (200n - 1n) - 1n;
      maxInt208 = 2n ** (208n - 1n) - 1n;
      maxInt216 = 2n ** (216n - 1n) - 1n;
      maxInt224 = 2n ** (224n - 1n) - 1n;
      maxInt232 = 2n ** (232n - 1n) - 1n;
      maxInt240 = 2n ** (240n - 1n) - 1n;
      maxInt248 = 2n ** (248n - 1n) - 1n;
      maxInt256 = 2n ** (256n - 1n) - 1n;
      minInt8 = -(2n ** (8n - 1n));
      minInt16 = -(2n ** (16n - 1n));
      minInt24 = -(2n ** (24n - 1n));
      minInt32 = -(2n ** (32n - 1n));
      minInt40 = -(2n ** (40n - 1n));
      minInt48 = -(2n ** (48n - 1n));
      minInt56 = -(2n ** (56n - 1n));
      minInt64 = -(2n ** (64n - 1n));
      minInt72 = -(2n ** (72n - 1n));
      minInt80 = -(2n ** (80n - 1n));
      minInt88 = -(2n ** (88n - 1n));
      minInt96 = -(2n ** (96n - 1n));
      minInt104 = -(2n ** (104n - 1n));
      minInt112 = -(2n ** (112n - 1n));
      minInt120 = -(2n ** (120n - 1n));
      minInt128 = -(2n ** (128n - 1n));
      minInt136 = -(2n ** (136n - 1n));
      minInt144 = -(2n ** (144n - 1n));
      minInt152 = -(2n ** (152n - 1n));
      minInt160 = -(2n ** (160n - 1n));
      minInt168 = -(2n ** (168n - 1n));
      minInt176 = -(2n ** (176n - 1n));
      minInt184 = -(2n ** (184n - 1n));
      minInt192 = -(2n ** (192n - 1n));
      minInt200 = -(2n ** (200n - 1n));
      minInt208 = -(2n ** (208n - 1n));
      minInt216 = -(2n ** (216n - 1n));
      minInt224 = -(2n ** (224n - 1n));
      minInt232 = -(2n ** (232n - 1n));
      minInt240 = -(2n ** (240n - 1n));
      minInt248 = -(2n ** (248n - 1n));
      minInt256 = -(2n ** (256n - 1n));
      maxUint8 = 2n ** 8n - 1n;
      maxUint16 = 2n ** 16n - 1n;
      maxUint24 = 2n ** 24n - 1n;
      maxUint32 = 2n ** 32n - 1n;
      maxUint40 = 2n ** 40n - 1n;
      maxUint48 = 2n ** 48n - 1n;
      maxUint56 = 2n ** 56n - 1n;
      maxUint64 = 2n ** 64n - 1n;
      maxUint72 = 2n ** 72n - 1n;
      maxUint80 = 2n ** 80n - 1n;
      maxUint88 = 2n ** 88n - 1n;
      maxUint96 = 2n ** 96n - 1n;
      maxUint104 = 2n ** 104n - 1n;
      maxUint112 = 2n ** 112n - 1n;
      maxUint120 = 2n ** 120n - 1n;
      maxUint128 = 2n ** 128n - 1n;
      maxUint136 = 2n ** 136n - 1n;
      maxUint144 = 2n ** 144n - 1n;
      maxUint152 = 2n ** 152n - 1n;
      maxUint160 = 2n ** 160n - 1n;
      maxUint168 = 2n ** 168n - 1n;
      maxUint176 = 2n ** 176n - 1n;
      maxUint184 = 2n ** 184n - 1n;
      maxUint192 = 2n ** 192n - 1n;
      maxUint200 = 2n ** 200n - 1n;
      maxUint208 = 2n ** 208n - 1n;
      maxUint216 = 2n ** 216n - 1n;
      maxUint224 = 2n ** 224n - 1n;
      maxUint232 = 2n ** 232n - 1n;
      maxUint240 = 2n ** 240n - 1n;
      maxUint248 = 2n ** 248n - 1n;
      maxUint256 = 2n ** 256n - 1n;
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/transaction/assertRequest.js
  function assertRequest(args) {
    const { account: account_, maxFeePerGas, maxPriorityFeePerGas, to: to3 } = args;
    const account = account_ ? parseAccount(account_) : void 0;
    if (account && !isAddress(account.address))
      throw new InvalidAddressError({ address: account.address });
    if (to3 && !isAddress(to3))
      throw new InvalidAddressError({ address: to3 });
    if (maxFeePerGas && maxFeePerGas > maxUint256)
      throw new FeeCapTooHighError({ maxFeePerGas });
    if (maxPriorityFeePerGas && maxFeePerGas && maxPriorityFeePerGas > maxFeePerGas)
      throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });
  }
  var init_assertRequest = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/transaction/assertRequest.js"() {
      "use strict";
      init_node_compat_inject();
      init_parseAccount();
      init_number();
      init_address();
      init_node();
      init_isAddress();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/address/isAddressEqual.js
  function isAddressEqual(a5, b9) {
    if (!isAddress(a5, { strict: false }))
      throw new InvalidAddressError({ address: a5 });
    if (!isAddress(b9, { strict: false }))
      throw new InvalidAddressError({ address: b9 });
    return a5.toLowerCase() === b9.toLowerCase();
  }
  var init_isAddressEqual = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/address/isAddressEqual.js"() {
      "use strict";
      init_node_compat_inject();
      init_address();
      init_isAddress();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js
  function decodeFunctionResult(parameters) {
    const { abi: abi2, args, functionName, data } = parameters;
    let abiItem = abi2[0];
    if (functionName) {
      const item = getAbiItem({ abi: abi2, args, name: functionName });
      if (!item)
        throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath4 });
      abiItem = item;
    }
    if (abiItem.type !== "function")
      throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath4 });
    if (!abiItem.outputs)
      throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath: docsPath4 });
    const values = decodeAbiParameters(abiItem.outputs, data);
    if (values && values.length > 1)
      return values;
    if (values && values.length === 1)
      return values[0];
    return void 0;
  }
  var docsPath4;
  var init_decodeFunctionResult = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js"() {
      "use strict";
      init_node_compat_inject();
      init_abi();
      init_decodeAbiParameters();
      init_getAbiItem();
      docsPath4 = "/docs/contract/decodeFunctionResult";
    }
  });

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/version.js
  var version3;
  var init_version3 = __esm({
    "../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/version.js"() {
      "use strict";
      init_node_compat_inject();
      version3 = "0.1.1";
    }
  });

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/internal/errors.js
  function getVersion() {
    return version3;
  }
  var init_errors2 = __esm({
    "../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/internal/errors.js"() {
      "use strict";
      init_node_compat_inject();
      init_version3();
    }
  });

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Errors.js
  function walk2(err2, fn) {
    if (fn?.(err2))
      return err2;
    if (err2 && typeof err2 === "object" && "cause" in err2 && err2.cause)
      return walk2(err2.cause, fn);
    return fn ? null : err2;
  }
  var BaseError3;
  var init_Errors = __esm({
    "../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Errors.js"() {
      "use strict";
      init_node_compat_inject();
      init_errors2();
      BaseError3 = class _BaseError extends Error {
        static setStaticOptions(options) {
          _BaseError.prototype.docsOrigin = options.docsOrigin;
          _BaseError.prototype.showVersion = options.showVersion;
          _BaseError.prototype.version = options.version;
        }
        constructor(shortMessage, options = {}) {
          const details = (() => {
            if (options.cause instanceof _BaseError) {
              if (options.cause.details)
                return options.cause.details;
              if (options.cause.shortMessage)
                return options.cause.shortMessage;
            }
            if (options.cause && "details" in options.cause && typeof options.cause.details === "string")
              return options.cause.details;
            if (options.cause?.message)
              return options.cause.message;
            return options.details;
          })();
          const docsPath8 = (() => {
            if (options.cause instanceof _BaseError)
              return options.cause.docsPath || options.docsPath;
            return options.docsPath;
          })();
          const docsBaseUrl = options.docsOrigin ?? _BaseError.prototype.docsOrigin;
          const docs = `${docsBaseUrl}${docsPath8 ?? ""}`;
          const showVersion = Boolean(options.version ?? _BaseError.prototype.showVersion);
          const version16 = options.version ?? _BaseError.prototype.version;
          const message = [
            shortMessage || "An error occurred.",
            ...options.metaMessages ? ["", ...options.metaMessages] : [],
            ...details || docsPath8 || showVersion ? [
              "",
              details ? `Details: ${details}` : void 0,
              docsPath8 ? `See: ${docs}` : void 0,
              showVersion ? `Version: ${version16}` : void 0
            ] : []
          ].filter((x13) => typeof x13 === "string").join("\n");
          super(message, options.cause ? { cause: options.cause } : void 0);
          Object.defineProperty(this, "details", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "docs", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "docsOrigin", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "docsPath", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "shortMessage", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "showVersion", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "version", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "cause", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: void 0
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "BaseError"
          });
          this.cause = options.cause;
          this.details = details;
          this.docs = docs;
          this.docsOrigin = docsBaseUrl;
          this.docsPath = docsPath8;
          this.shortMessage = shortMessage;
          this.showVersion = showVersion;
          this.version = version16;
        }
        walk(fn) {
          return walk2(this, fn);
        }
      };
      Object.defineProperty(BaseError3, "defaultStaticOptions", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: {
          docsOrigin: "https://oxlib.sh",
          showVersion: false,
          version: `ox@${getVersion()}`
        }
      });
      (() => {
        BaseError3.setStaticOptions(BaseError3.defaultStaticOptions);
      })();
    }
  });

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/internal/bytes.js
  function assertSize2(bytes, size_) {
    if (size2(bytes) > size_)
      throw new SizeOverflowError2({
        givenSize: size2(bytes),
        maxSize: size_
      });
  }
  function assertStartOffset2(value, start) {
    if (typeof start === "number" && start > 0 && start > size2(value) - 1)
      throw new SliceOffsetOutOfBoundsError2({
        offset: start,
        position: "start",
        size: size2(value)
      });
  }
  function assertEndOffset2(value, start, end) {
    if (typeof start === "number" && typeof end === "number" && size2(value) !== end - start) {
      throw new SliceOffsetOutOfBoundsError2({
        offset: end,
        position: "end",
        size: size2(value)
      });
    }
  }
  function charCodeToBase162(char) {
    if (char >= charCodeMap2.zero && char <= charCodeMap2.nine)
      return char - charCodeMap2.zero;
    if (char >= charCodeMap2.A && char <= charCodeMap2.F)
      return char - (charCodeMap2.A - 10);
    if (char >= charCodeMap2.a && char <= charCodeMap2.f)
      return char - (charCodeMap2.a - 10);
    return void 0;
  }
  function pad2(bytes, options = {}) {
    const { dir, size: size5 = 32 } = options;
    if (size5 === 0)
      return bytes;
    if (bytes.length > size5)
      throw new SizeExceedsPaddingSizeError2({
        size: bytes.length,
        targetSize: size5,
        type: "Bytes"
      });
    const paddedBytes = new Uint8Array(size5);
    for (let i5 = 0; i5 < size5; i5++) {
      const padEnd = dir === "right";
      paddedBytes[padEnd ? i5 : size5 - i5 - 1] = bytes[padEnd ? i5 : bytes.length - i5 - 1];
    }
    return paddedBytes;
  }
  function trim2(value, options = {}) {
    const { dir = "left" } = options;
    let data = value;
    let sliceLength = 0;
    for (let i5 = 0; i5 < data.length - 1; i5++) {
      if (data[dir === "left" ? i5 : data.length - i5 - 1].toString() === "0")
        sliceLength++;
      else
        break;
    }
    data = dir === "left" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);
    return data;
  }
  var charCodeMap2;
  var init_bytes = __esm({
    "../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/internal/bytes.js"() {
      "use strict";
      init_node_compat_inject();
      init_Bytes();
      charCodeMap2 = {
        zero: 48,
        nine: 57,
        A: 65,
        F: 70,
        a: 97,
        f: 102
      };
    }
  });

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/internal/hex.js
  function assertSize3(hex3, size_) {
    if (size3(hex3) > size_)
      throw new SizeOverflowError3({
        givenSize: size3(hex3),
        maxSize: size_
      });
  }
  function assertStartOffset3(value, start) {
    if (typeof start === "number" && start > 0 && start > size3(value) - 1)
      throw new SliceOffsetOutOfBoundsError3({
        offset: start,
        position: "start",
        size: size3(value)
      });
  }
  function assertEndOffset3(value, start, end) {
    if (typeof start === "number" && typeof end === "number" && size3(value) !== end - start) {
      throw new SliceOffsetOutOfBoundsError3({
        offset: end,
        position: "end",
        size: size3(value)
      });
    }
  }
  function pad3(hex_, options = {}) {
    const { dir, size: size5 = 32 } = options;
    if (size5 === 0)
      return hex_;
    const hex3 = hex_.replace("0x", "");
    if (hex3.length > size5 * 2)
      throw new SizeExceedsPaddingSizeError3({
        size: Math.ceil(hex3.length / 2),
        targetSize: size5,
        type: "Hex"
      });
    return `0x${hex3[dir === "right" ? "padEnd" : "padStart"](size5 * 2, "0")}`;
  }
  function trim3(value, options = {}) {
    const { dir = "left" } = options;
    let data = value.replace("0x", "");
    let sliceLength = 0;
    for (let i5 = 0; i5 < data.length - 1; i5++) {
      if (data[dir === "left" ? i5 : data.length - i5 - 1].toString() === "0")
        sliceLength++;
      else
        break;
    }
    data = dir === "left" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);
    if (data === "0")
      return "0x";
    if (dir === "right" && data.length % 2 === 1)
      return `0x${data}0`;
    return `0x${data}`;
  }
  var init_hex = __esm({
    "../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/internal/hex.js"() {
      "use strict";
      init_node_compat_inject();
      init_Hex();
    }
  });

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Json.js
  function stringify2(value, replacer, space) {
    return JSON.stringify(value, (key2, value2) => {
      if (typeof replacer === "function")
        return replacer(key2, value2);
      if (typeof value2 === "bigint")
        return value2.toString() + bigIntSuffix;
      return value2;
    }, space);
  }
  var bigIntSuffix;
  var init_Json = __esm({
    "../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Json.js"() {
      "use strict";
      init_node_compat_inject();
      bigIntSuffix = "#__bigint";
    }
  });

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Bytes.js
  function assert(value) {
    if (value instanceof Uint8Array)
      return;
    if (!value)
      throw new InvalidBytesTypeError(value);
    if (typeof value !== "object")
      throw new InvalidBytesTypeError(value);
    if (!("BYTES_PER_ELEMENT" in value))
      throw new InvalidBytesTypeError(value);
    if (value.BYTES_PER_ELEMENT !== 1 || value.constructor.name !== "Uint8Array")
      throw new InvalidBytesTypeError(value);
  }
  function from(value) {
    if (value instanceof Uint8Array)
      return value;
    if (typeof value === "string")
      return fromHex(value);
    return fromArray(value);
  }
  function fromArray(value) {
    return value instanceof Uint8Array ? value : new Uint8Array(value);
  }
  function fromHex(value, options = {}) {
    const { size: size5 } = options;
    let hex3 = value;
    if (size5) {
      assertSize3(value, size5);
      hex3 = padRight(value, size5);
    }
    let hexString = hex3.slice(2);
    if (hexString.length % 2)
      hexString = `0${hexString}`;
    const length2 = hexString.length / 2;
    const bytes = new Uint8Array(length2);
    for (let index2 = 0, j6 = 0; index2 < length2; index2++) {
      const nibbleLeft = charCodeToBase162(hexString.charCodeAt(j6++));
      const nibbleRight = charCodeToBase162(hexString.charCodeAt(j6++));
      if (nibbleLeft === void 0 || nibbleRight === void 0) {
        throw new BaseError3(`Invalid byte sequence ("${hexString[j6 - 2]}${hexString[j6 - 1]}" in "${hexString}").`);
      }
      bytes[index2] = nibbleLeft << 4 | nibbleRight;
    }
    return bytes;
  }
  function fromString(value, options = {}) {
    const { size: size5 } = options;
    const bytes = encoder3.encode(value);
    if (typeof size5 === "number") {
      assertSize2(bytes, size5);
      return padRight2(bytes, size5);
    }
    return bytes;
  }
  function padRight2(value, size5) {
    return pad2(value, { dir: "right", size: size5 });
  }
  function size2(value) {
    return value.length;
  }
  function slice2(value, start, end, options = {}) {
    const { strict } = options;
    assertStartOffset2(value, start);
    const value_ = value.slice(start, end);
    if (strict)
      assertEndOffset2(value_, start, end);
    return value_;
  }
  function toBigInt2(bytes, options = {}) {
    const { size: size5 } = options;
    if (typeof size5 !== "undefined")
      assertSize2(bytes, size5);
    const hex3 = fromBytes(bytes, options);
    return toBigInt(hex3, options);
  }
  function toBoolean(bytes, options = {}) {
    const { size: size5 } = options;
    let bytes_ = bytes;
    if (typeof size5 !== "undefined") {
      assertSize2(bytes_, size5);
      bytes_ = trimLeft(bytes_);
    }
    if (bytes_.length > 1 || bytes_[0] > 1)
      throw new InvalidBytesBooleanError2(bytes_);
    return Boolean(bytes_[0]);
  }
  function toNumber2(bytes, options = {}) {
    const { size: size5 } = options;
    if (typeof size5 !== "undefined")
      assertSize2(bytes, size5);
    const hex3 = fromBytes(bytes, options);
    return toNumber(hex3, options);
  }
  function toString(bytes, options = {}) {
    const { size: size5 } = options;
    let bytes_ = bytes;
    if (typeof size5 !== "undefined") {
      assertSize2(bytes_, size5);
      bytes_ = trimRight(bytes_);
    }
    return decoder.decode(bytes_);
  }
  function trimLeft(value) {
    return trim2(value, { dir: "left" });
  }
  function trimRight(value) {
    return trim2(value, { dir: "right" });
  }
  function validate(value) {
    try {
      assert(value);
      return true;
    } catch {
      return false;
    }
  }
  var decoder, encoder3, InvalidBytesBooleanError2, InvalidBytesTypeError, SizeOverflowError2, SliceOffsetOutOfBoundsError2, SizeExceedsPaddingSizeError2;
  var init_Bytes = __esm({
    "../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Bytes.js"() {
      "use strict";
      init_node_compat_inject();
      init_Errors();
      init_Hex();
      init_bytes();
      init_hex();
      init_Json();
      decoder = /* @__PURE__ */ new TextDecoder();
      encoder3 = /* @__PURE__ */ new TextEncoder();
      InvalidBytesBooleanError2 = class extends BaseError3 {
        constructor(bytes) {
          super(`Bytes value \`${bytes}\` is not a valid boolean.`, {
            metaMessages: [
              "The bytes array must contain a single byte of either a `0` or `1` value."
            ]
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "Bytes.InvalidBytesBooleanError"
          });
        }
      };
      InvalidBytesTypeError = class extends BaseError3 {
        constructor(value) {
          super(`Value \`${typeof value === "object" ? stringify2(value) : value}\` of type \`${typeof value}\` is an invalid Bytes value.`, {
            metaMessages: ["Bytes values must be of type `Bytes`."]
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "Bytes.InvalidBytesTypeError"
          });
        }
      };
      SizeOverflowError2 = class extends BaseError3 {
        constructor({ givenSize, maxSize }) {
          super(`Size cannot exceed \`${maxSize}\` bytes. Given size: \`${givenSize}\` bytes.`);
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "Bytes.SizeOverflowError"
          });
        }
      };
      SliceOffsetOutOfBoundsError2 = class extends BaseError3 {
        constructor({ offset: offset2, position, size: size5 }) {
          super(`Slice ${position === "start" ? "starting" : "ending"} at offset \`${offset2}\` is out-of-bounds (size: \`${size5}\`).`);
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "Bytes.SliceOffsetOutOfBoundsError"
          });
        }
      };
      SizeExceedsPaddingSizeError2 = class extends BaseError3 {
        constructor({ size: size5, targetSize, type: type2 }) {
          super(`${type2.charAt(0).toUpperCase()}${type2.slice(1).toLowerCase()} size (\`${size5}\`) exceeds padding size (\`${targetSize}\`).`);
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "Bytes.SizeExceedsPaddingSizeError"
          });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Hex.js
  function assert2(value, options = {}) {
    const { strict = false } = options;
    if (!value)
      throw new InvalidHexTypeError(value);
    if (typeof value !== "string")
      throw new InvalidHexTypeError(value);
    if (strict) {
      if (!/^0x[0-9a-fA-F]*$/.test(value))
        throw new InvalidHexValueError(value);
    }
    if (!value.startsWith("0x"))
      throw new InvalidHexValueError(value);
  }
  function concat2(...values) {
    return `0x${values.reduce((acc, x13) => acc + x13.replace("0x", ""), "")}`;
  }
  function from2(value) {
    if (value instanceof Uint8Array)
      return fromBytes(value);
    if (Array.isArray(value))
      return fromBytes(new Uint8Array(value));
    return value;
  }
  function fromBoolean(value, options = {}) {
    const hex3 = `0x${Number(value)}`;
    if (typeof options.size === "number") {
      assertSize3(hex3, options.size);
      return padLeft(hex3, options.size);
    }
    return hex3;
  }
  function fromBytes(value, options = {}) {
    let string7 = "";
    for (let i5 = 0; i5 < value.length; i5++)
      string7 += hexes4[value[i5]];
    const hex3 = `0x${string7}`;
    if (typeof options.size === "number") {
      assertSize3(hex3, options.size);
      return padRight(hex3, options.size);
    }
    return hex3;
  }
  function fromNumber(value, options = {}) {
    const { signed, size: size5 } = options;
    const value_ = BigInt(value);
    let maxValue;
    if (size5) {
      if (signed)
        maxValue = (1n << BigInt(size5) * 8n - 1n) - 1n;
      else
        maxValue = 2n ** (BigInt(size5) * 8n) - 1n;
    } else if (typeof value === "number") {
      maxValue = BigInt(Number.MAX_SAFE_INTEGER);
    }
    const minValue = typeof maxValue === "bigint" && signed ? -maxValue - 1n : 0;
    if (maxValue && value_ > maxValue || value_ < minValue) {
      const suffix = typeof value === "bigint" ? "n" : "";
      throw new IntegerOutOfRangeError2({
        max: maxValue ? `${maxValue}${suffix}` : void 0,
        min: `${minValue}${suffix}`,
        signed,
        size: size5,
        value: `${value}${suffix}`
      });
    }
    const stringValue = (signed && value_ < 0 ? BigInt.asUintN(size5 * 8, BigInt(value_)) : value_).toString(16);
    const hex3 = `0x${stringValue}`;
    if (size5)
      return padLeft(hex3, size5);
    return hex3;
  }
  function fromString2(value, options = {}) {
    return fromBytes(encoder4.encode(value), options);
  }
  function padLeft(value, size5) {
    return pad3(value, { dir: "left", size: size5 });
  }
  function padRight(value, size5) {
    return pad3(value, { dir: "right", size: size5 });
  }
  function slice3(value, start, end, options = {}) {
    const { strict } = options;
    assertStartOffset3(value, start);
    const value_ = `0x${value.replace("0x", "").slice((start ?? 0) * 2, (end ?? value.length) * 2)}`;
    if (strict)
      assertEndOffset3(value_, start, end);
    return value_;
  }
  function size3(value) {
    return Math.ceil((value.length - 2) / 2);
  }
  function trimLeft2(value) {
    return trim3(value, { dir: "left" });
  }
  function toBigInt(hex3, options = {}) {
    const { signed } = options;
    if (options.size)
      assertSize3(hex3, options.size);
    const value = BigInt(hex3);
    if (!signed)
      return value;
    const size5 = (hex3.length - 2) / 2;
    const max_unsigned = (1n << BigInt(size5) * 8n) - 1n;
    const max_signed = max_unsigned >> 1n;
    if (value <= max_signed)
      return value;
    return value - max_unsigned - 1n;
  }
  function toNumber(hex3, options = {}) {
    const { signed, size: size5 } = options;
    if (!signed && !size5)
      return Number(hex3);
    return Number(toBigInt(hex3, options));
  }
  function validate2(value, options = {}) {
    const { strict = false } = options;
    try {
      assert2(value, { strict });
      return true;
    } catch {
      return false;
    }
  }
  var encoder4, hexes4, IntegerOutOfRangeError2, InvalidHexTypeError, InvalidHexValueError, SizeOverflowError3, SliceOffsetOutOfBoundsError3, SizeExceedsPaddingSizeError3;
  var init_Hex = __esm({
    "../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Hex.js"() {
      "use strict";
      init_node_compat_inject();
      init_Errors();
      init_hex();
      init_Json();
      encoder4 = /* @__PURE__ */ new TextEncoder();
      hexes4 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i5) => i5.toString(16).padStart(2, "0"));
      IntegerOutOfRangeError2 = class extends BaseError3 {
        constructor({ max, min, signed, size: size5, value }) {
          super(`Number \`${value}\` is not in safe${size5 ? ` ${size5 * 8}-bit` : ""}${signed ? " signed" : " unsigned"} integer range ${max ? `(\`${min}\` to \`${max}\`)` : `(above \`${min}\`)`}`);
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "Hex.IntegerOutOfRangeError"
          });
        }
      };
      InvalidHexTypeError = class extends BaseError3 {
        constructor(value) {
          super(`Value \`${typeof value === "object" ? stringify2(value) : value}\` of type \`${typeof value}\` is an invalid hex type.`, {
            metaMessages: ['Hex types must be represented as `"0x${string}"`.']
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "Hex.InvalidHexTypeError"
          });
        }
      };
      InvalidHexValueError = class extends BaseError3 {
        constructor(value) {
          super(`Value \`${value}\` is an invalid hex value.`, {
            metaMessages: [
              'Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).'
            ]
          });
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "Hex.InvalidHexValueError"
          });
        }
      };
      SizeOverflowError3 = class extends BaseError3 {
        constructor({ givenSize, maxSize }) {
          super(`Size cannot exceed \`${maxSize}\` bytes. Given size: \`${givenSize}\` bytes.`);
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "Hex.SizeOverflowError"
          });
        }
      };
      SliceOffsetOutOfBoundsError3 = class extends BaseError3 {
        constructor({ offset: offset2, position, size: size5 }) {
          super(`Slice ${position === "start" ? "starting" : "ending"} at offset \`${offset2}\` is out-of-bounds (size: \`${size5}\`).`);
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "Hex.SliceOffsetOutOfBoundsError"
          });
        }
      };
      SizeExceedsPaddingSizeError3 = class extends BaseError3 {
        constructor({ size: size5, targetSize, type: type2 }) {
          super(`${type2.charAt(0).toUpperCase()}${type2.slice(1).toLowerCase()} size (\`${size5}\`) exceeds padding size (\`${targetSize}\`).`);
          Object.defineProperty(this, "name", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: "Hex.SizeExceedsPaddingSizeError"
          });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Withdrawal.js
  function toRpc(withdrawal) {
    return {
      address: withdrawal.address,
      amount: fromNumber(withdrawal.amount),
      index: fromNumber(withdrawal.index),
      validatorIndex: fromNumber(withdrawal.validatorIndex)
    };
  }
  var init_Withdrawal = __esm({
    "../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Withdrawal.js"() {
      "use strict";
      init_node_compat_inject();
      init_Hex();
    }
  });

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/BlockOverrides.js
  function toRpc2(blockOverrides) {
    return {
      ...typeof blockOverrides.baseFeePerGas === "bigint" && {
        baseFeePerGas: fromNumber(blockOverrides.baseFeePerGas)
      },
      ...typeof blockOverrides.blobBaseFee === "bigint" && {
        blobBaseFee: fromNumber(blockOverrides.blobBaseFee)
      },
      ...typeof blockOverrides.feeRecipient === "string" && {
        feeRecipient: blockOverrides.feeRecipient
      },
      ...typeof blockOverrides.gasLimit === "bigint" && {
        gasLimit: fromNumber(blockOverrides.gasLimit)
      },
      ...typeof blockOverrides.number === "bigint" && {
        number: fromNumber(blockOverrides.number)
      },
      ...typeof blockOverrides.prevRandao === "bigint" && {
        prevRandao: fromNumber(blockOverrides.prevRandao)
      },
      ...typeof blockOverrides.time === "bigint" && {
        time: fromNumber(blockOverrides.time)
      },
      ...blockOverrides.withdrawals && {
        withdrawals: blockOverrides.withdrawals.map(toRpc)
      }
    };
  }
  var init_BlockOverrides = __esm({
    "../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/BlockOverrides.js"() {
      "use strict";
      init_node_compat_inject();
      init_Hex();
      init_Withdrawal();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/abis.js
  var multicall3Abi, batchGatewayAbi, universalResolverErrors, universalResolverResolveAbi, universalResolverReverseAbi, textResolverAbi, addressResolverAbi, erc1271Abi, erc6492SignatureValidatorAbi;
  var init_abis = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/abis.js"() {
      "use strict";
      init_node_compat_inject();
      multicall3Abi = [
        {
          inputs: [
            {
              components: [
                {
                  name: "target",
                  type: "address"
                },
                {
                  name: "allowFailure",
                  type: "bool"
                },
                {
                  name: "callData",
                  type: "bytes"
                }
              ],
              name: "calls",
              type: "tuple[]"
            }
          ],
          name: "aggregate3",
          outputs: [
            {
              components: [
                {
                  name: "success",
                  type: "bool"
                },
                {
                  name: "returnData",
                  type: "bytes"
                }
              ],
              name: "returnData",
              type: "tuple[]"
            }
          ],
          stateMutability: "view",
          type: "function"
        },
        {
          inputs: [
            {
              name: "addr",
              type: "address"
            }
          ],
          name: "getEthBalance",
          outputs: [
            {
              name: "balance",
              type: "uint256"
            }
          ],
          stateMutability: "view",
          type: "function"
        },
        {
          inputs: [],
          name: "getCurrentBlockTimestamp",
          outputs: [
            {
              internalType: "uint256",
              name: "timestamp",
              type: "uint256"
            }
          ],
          stateMutability: "view",
          type: "function"
        }
      ];
      batchGatewayAbi = [
        {
          name: "query",
          type: "function",
          stateMutability: "view",
          inputs: [
            {
              type: "tuple[]",
              name: "queries",
              components: [
                {
                  type: "address",
                  name: "sender"
                },
                {
                  type: "string[]",
                  name: "urls"
                },
                {
                  type: "bytes",
                  name: "data"
                }
              ]
            }
          ],
          outputs: [
            {
              type: "bool[]",
              name: "failures"
            },
            {
              type: "bytes[]",
              name: "responses"
            }
          ]
        },
        {
          name: "HttpError",
          type: "error",
          inputs: [
            {
              type: "uint16",
              name: "status"
            },
            {
              type: "string",
              name: "message"
            }
          ]
        }
      ];
      universalResolverErrors = [
        {
          inputs: [
            {
              name: "dns",
              type: "bytes"
            }
          ],
          name: "DNSDecodingFailed",
          type: "error"
        },
        {
          inputs: [
            {
              name: "ens",
              type: "string"
            }
          ],
          name: "DNSEncodingFailed",
          type: "error"
        },
        {
          inputs: [],
          name: "EmptyAddress",
          type: "error"
        },
        {
          inputs: [
            {
              name: "status",
              type: "uint16"
            },
            {
              name: "message",
              type: "string"
            }
          ],
          name: "HttpError",
          type: "error"
        },
        {
          inputs: [],
          name: "InvalidBatchGatewayResponse",
          type: "error"
        },
        {
          inputs: [
            {
              name: "errorData",
              type: "bytes"
            }
          ],
          name: "ResolverError",
          type: "error"
        },
        {
          inputs: [
            {
              name: "name",
              type: "bytes"
            },
            {
              name: "resolver",
              type: "address"
            }
          ],
          name: "ResolverNotContract",
          type: "error"
        },
        {
          inputs: [
            {
              name: "name",
              type: "bytes"
            }
          ],
          name: "ResolverNotFound",
          type: "error"
        },
        {
          inputs: [
            {
              name: "primary",
              type: "string"
            },
            {
              name: "primaryAddress",
              type: "bytes"
            }
          ],
          name: "ReverseAddressMismatch",
          type: "error"
        },
        {
          inputs: [
            {
              internalType: "bytes4",
              name: "selector",
              type: "bytes4"
            }
          ],
          name: "UnsupportedResolverProfile",
          type: "error"
        }
      ];
      universalResolverResolveAbi = [
        ...universalResolverErrors,
        {
          name: "resolveWithGateways",
          type: "function",
          stateMutability: "view",
          inputs: [
            { name: "name", type: "bytes" },
            { name: "data", type: "bytes" },
            { name: "gateways", type: "string[]" }
          ],
          outputs: [
            { name: "", type: "bytes" },
            { name: "address", type: "address" }
          ]
        }
      ];
      universalResolverReverseAbi = [
        ...universalResolverErrors,
        {
          name: "reverseWithGateways",
          type: "function",
          stateMutability: "view",
          inputs: [
            { type: "bytes", name: "reverseName" },
            { type: "uint256", name: "coinType" },
            { type: "string[]", name: "gateways" }
          ],
          outputs: [
            { type: "string", name: "resolvedName" },
            { type: "address", name: "resolver" },
            { type: "address", name: "reverseResolver" }
          ]
        }
      ];
      textResolverAbi = [
        {
          name: "text",
          type: "function",
          stateMutability: "view",
          inputs: [
            { name: "name", type: "bytes32" },
            { name: "key", type: "string" }
          ],
          outputs: [{ name: "", type: "string" }]
        }
      ];
      addressResolverAbi = [
        {
          name: "addr",
          type: "function",
          stateMutability: "view",
          inputs: [{ name: "name", type: "bytes32" }],
          outputs: [{ name: "", type: "address" }]
        },
        {
          name: "addr",
          type: "function",
          stateMutability: "view",
          inputs: [
            { name: "name", type: "bytes32" },
            { name: "coinType", type: "uint256" }
          ],
          outputs: [{ name: "", type: "bytes" }]
        }
      ];
      erc1271Abi = [
        {
          name: "isValidSignature",
          type: "function",
          stateMutability: "view",
          inputs: [
            { name: "hash", type: "bytes32" },
            { name: "signature", type: "bytes" }
          ],
          outputs: [{ name: "", type: "bytes4" }]
        }
      ];
      erc6492SignatureValidatorAbi = [
        {
          inputs: [
            {
              name: "_signer",
              type: "address"
            },
            {
              name: "_hash",
              type: "bytes32"
            },
            {
              name: "_signature",
              type: "bytes"
            }
          ],
          stateMutability: "nonpayable",
          type: "constructor"
        },
        {
          inputs: [
            {
              name: "_signer",
              type: "address"
            },
            {
              name: "_hash",
              type: "bytes32"
            },
            {
              name: "_signature",
              type: "bytes"
            }
          ],
          outputs: [
            {
              type: "bool"
            }
          ],
          stateMutability: "nonpayable",
          type: "function",
          name: "isValidSig"
        }
      ];
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/contract.js
  var aggregate3Signature;
  var init_contract2 = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/contract.js"() {
      "use strict";
      init_node_compat_inject();
      aggregate3Signature = "0x82ad56cb";
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/contracts.js
  var deploylessCallViaBytecodeBytecode, deploylessCallViaFactoryBytecode, erc6492SignatureValidatorByteCode, multicall3Bytecode;
  var init_contracts = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/contracts.js"() {
      "use strict";
      init_node_compat_inject();
      deploylessCallViaBytecodeBytecode = "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe";
      deploylessCallViaFactoryBytecode = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";
      erc6492SignatureValidatorByteCode = "0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";
      multicall3Bytecode = " ";
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/chain.js
  var ChainDoesNotSupportContract, ChainMismatchError, ChainNotFoundError, ClientChainNotConfiguredError, InvalidChainIdError;
  var init_chain = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/chain.js"() {
      "use strict";
      init_node_compat_inject();
      init_base();
      ChainDoesNotSupportContract = class extends BaseError2 {
        constructor({ blockNumber, chain: chain2, contract }) {
          super(`Chain "${chain2.name}" does not support contract "${contract.name}".`, {
            metaMessages: [
              "This could be due to any of the following:",
              ...blockNumber && contract.blockCreated && contract.blockCreated > blockNumber ? [
                `- The contract "${contract.name}" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`
              ] : [
                `- The chain does not have the contract "${contract.name}" configured.`
              ]
            ],
            name: "ChainDoesNotSupportContract"
          });
        }
      };
      ChainMismatchError = class extends BaseError2 {
        constructor({ chain: chain2, currentChainId }) {
          super(`The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain2.id} \u2013 ${chain2.name}).`, {
            metaMessages: [
              `Current Chain ID:  ${currentChainId}`,
              `Expected Chain ID: ${chain2.id} \u2013 ${chain2.name}`
            ],
            name: "ChainMismatchError"
          });
        }
      };
      ChainNotFoundError = class extends BaseError2 {
        constructor() {
          super([
            "No chain was provided to the request.",
            "Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."
          ].join("\n"), {
            name: "ChainNotFoundError"
          });
        }
      };
      ClientChainNotConfiguredError = class extends BaseError2 {
        constructor() {
          super("No chain was provided to the Client.", {
            name: "ClientChainNotConfiguredError"
          });
        }
      };
      InvalidChainIdError = class extends BaseError2 {
        constructor({ chainId }) {
          super(typeof chainId === "number" ? `Chain ID "${chainId}" is invalid.` : "Chain ID is invalid.", { name: "InvalidChainIdError" });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/encodeDeployData.js
  function encodeDeployData(parameters) {
    const { abi: abi2, args, bytecode } = parameters;
    if (!args || args.length === 0)
      return bytecode;
    const description = abi2.find((x13) => "type" in x13 && x13.type === "constructor");
    if (!description)
      throw new AbiConstructorNotFoundError({ docsPath: docsPath5 });
    if (!("inputs" in description))
      throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });
    if (!description.inputs || description.inputs.length === 0)
      throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });
    const data = encodeAbiParameters(description.inputs, args);
    return concatHex([bytecode, data]);
  }
  var docsPath5;
  var init_encodeDeployData = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/encodeDeployData.js"() {
      "use strict";
      init_node_compat_inject();
      init_abi();
      init_concat();
      init_encodeAbiParameters();
      docsPath5 = "/docs/contract/encodeDeployData";
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/chain/getChainContractAddress.js
  function getChainContractAddress({ blockNumber, chain: chain2, contract: name2 }) {
    const contract = chain2?.contracts?.[name2];
    if (!contract)
      throw new ChainDoesNotSupportContract({
        chain: chain2,
        contract: { name: name2 }
      });
    if (blockNumber && contract.blockCreated && contract.blockCreated > blockNumber)
      throw new ChainDoesNotSupportContract({
        blockNumber,
        chain: chain2,
        contract: {
          name: name2,
          blockCreated: contract.blockCreated
        }
      });
    return contract.address;
  }
  var init_getChainContractAddress = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/chain/getChainContractAddress.js"() {
      "use strict";
      init_node_compat_inject();
      init_chain();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/errors/getCallError.js
  function getCallError(err2, { docsPath: docsPath8, ...args }) {
    const cause = (() => {
      const cause2 = getNodeError(err2, args);
      if (cause2 instanceof UnknownNodeError)
        return err2;
      return cause2;
    })();
    return new CallExecutionError(cause, {
      docsPath: docsPath8,
      ...args
    });
  }
  var init_getCallError = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/errors/getCallError.js"() {
      "use strict";
      init_node_compat_inject();
      init_contract();
      init_node();
      init_getNodeError();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/promise/withResolvers.js
  function withResolvers() {
    let resolve = () => void 0;
    let reject2 = () => void 0;
    const promise2 = new Promise((resolve_, reject_) => {
      resolve = resolve_;
      reject2 = reject_;
    });
    return { promise: promise2, resolve, reject: reject2 };
  }
  var init_withResolvers = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/promise/withResolvers.js"() {
      "use strict";
      init_node_compat_inject();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/promise/createBatchScheduler.js
  function createBatchScheduler({ fn, id, shouldSplitBatch, wait: wait2 = 0, sort }) {
    const exec = async () => {
      const scheduler = getScheduler();
      flush();
      const args = scheduler.map(({ args: args2 }) => args2);
      if (args.length === 0)
        return;
      fn(args).then((data) => {
        if (sort && Array.isArray(data))
          data.sort(sort);
        for (let i5 = 0; i5 < scheduler.length; i5++) {
          const { resolve } = scheduler[i5];
          resolve?.([data[i5], data]);
        }
      }).catch((err2) => {
        for (let i5 = 0; i5 < scheduler.length; i5++) {
          const { reject: reject2 } = scheduler[i5];
          reject2?.(err2);
        }
      });
    };
    const flush = () => schedulerCache.delete(id);
    const getBatchedArgs = () => getScheduler().map(({ args }) => args);
    const getScheduler = () => schedulerCache.get(id) || [];
    const setScheduler = (item) => schedulerCache.set(id, [...getScheduler(), item]);
    return {
      flush,
      async schedule(args) {
        const { promise: promise2, resolve, reject: reject2 } = withResolvers();
        const split3 = shouldSplitBatch?.([...getBatchedArgs(), args]);
        if (split3)
          exec();
        const hasActiveScheduler = getScheduler().length > 0;
        if (hasActiveScheduler) {
          setScheduler({ args, resolve, reject: reject2 });
          return promise2;
        }
        setScheduler({ args, resolve, reject: reject2 });
        setTimeout(exec, wait2);
        return promise2;
      }
    };
  }
  var schedulerCache;
  var init_createBatchScheduler = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/promise/createBatchScheduler.js"() {
      "use strict";
      init_node_compat_inject();
      init_withResolvers();
      schedulerCache = /* @__PURE__ */ new Map();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/ccip.js
  var OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError;
  var init_ccip = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/ccip.js"() {
      "use strict";
      init_node_compat_inject();
      init_stringify();
      init_base();
      init_utils3();
      OffchainLookupError = class extends BaseError2 {
        constructor({ callbackSelector, cause, data, extraData, sender, urls }) {
          super(cause.shortMessage || "An error occurred while fetching for an offchain result.", {
            cause,
            metaMessages: [
              ...cause.metaMessages || [],
              cause.metaMessages?.length ? "" : [],
              "Offchain Gateway Call:",
              urls && [
                "  Gateway URL(s):",
                ...urls.map((url2) => `    ${getUrl(url2)}`)
              ],
              `  Sender: ${sender}`,
              `  Data: ${data}`,
              `  Callback selector: ${callbackSelector}`,
              `  Extra data: ${extraData}`
            ].flat(),
            name: "OffchainLookupError"
          });
        }
      };
      OffchainLookupResponseMalformedError = class extends BaseError2 {
        constructor({ result, url: url2 }) {
          super("Offchain gateway response is malformed. Response data must be a hex value.", {
            metaMessages: [
              `Gateway URL: ${getUrl(url2)}`,
              `Response: ${stringify(result)}`
            ],
            name: "OffchainLookupResponseMalformedError"
          });
        }
      };
      OffchainLookupSenderMismatchError = class extends BaseError2 {
        constructor({ sender, to: to3 }) {
          super("Reverted sender address does not match target contract address (`to`).", {
            metaMessages: [
              `Contract address: ${to3}`,
              `OffchainLookup sender address: ${sender}`
            ],
            name: "OffchainLookupSenderMismatchError"
          });
        }
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/decodeFunctionData.js
  function decodeFunctionData(parameters) {
    const { abi: abi2, data } = parameters;
    const signature2 = slice(data, 0, 4);
    const description = abi2.find((x13) => x13.type === "function" && signature2 === toFunctionSelector(formatAbiItem2(x13)));
    if (!description)
      throw new AbiFunctionSignatureNotFoundError(signature2, {
        docsPath: "/docs/contract/decodeFunctionData"
      });
    return {
      functionName: description.name,
      args: "inputs" in description && description.inputs && description.inputs.length > 0 ? decodeAbiParameters(description.inputs, slice(data, 4)) : void 0
    };
  }
  var init_decodeFunctionData = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/decodeFunctionData.js"() {
      "use strict";
      init_node_compat_inject();
      init_abi();
      init_slice();
      init_toFunctionSelector();
      init_decodeAbiParameters();
      init_formatAbiItem2();
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/encodeErrorResult.js
  function encodeErrorResult(parameters) {
    const { abi: abi2, errorName, args } = parameters;
    let abiItem = abi2[0];
    if (errorName) {
      const item = getAbiItem({ abi: abi2, args, name: errorName });
      if (!item)
        throw new AbiErrorNotFoundError(errorName, { docsPath: docsPath6 });
      abiItem = item;
    }
    if (abiItem.type !== "error")
      throw new AbiErrorNotFoundError(void 0, { docsPath: docsPath6 });
    const definition = formatAbiItem2(abiItem);
    const signature2 = toFunctionSelector(definition);
    let data = "0x";
    if (args && args.length > 0) {
      if (!abiItem.inputs)
        throw new AbiErrorInputsNotFoundError(abiItem.name, { docsPath: docsPath6 });
      data = encodeAbiParameters(abiItem.inputs, args);
    }
    return concatHex([signature2, data]);
  }
  var docsPath6;
  var init_encodeErrorResult = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/encodeErrorResult.js"() {
      "use strict";
      init_node_compat_inject();
      init_abi();
      init_concat();
      init_toFunctionSelector();
      init_encodeAbiParameters();
      init_formatAbiItem2();
      init_getAbiItem();
      docsPath6 = "/docs/contract/encodeErrorResult";
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js
  function encodeFunctionResult(parameters) {
    const { abi: abi2, functionName, result } = parameters;
    let abiItem = abi2[0];
    if (functionName) {
      const item = getAbiItem({ abi: abi2, name: functionName });
      if (!item)
        throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath7 });
      abiItem = item;
    }
    if (abiItem.type !== "function")
      throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath7 });
    if (!abiItem.outputs)
      throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath: docsPath7 });
    const values = (() => {
      if (abiItem.outputs.length === 0)
        return [];
      if (abiItem.outputs.length === 1)
        return [result];
      if (Array.isArray(result))
        return result;
      throw new InvalidArrayError(result);
    })();
    return encodeAbiParameters(abiItem.outputs, values);
  }
  var docsPath7;
  var init_encodeFunctionResult = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js"() {
      "use strict";
      init_node_compat_inject();
      init_abi();
      init_encodeAbiParameters();
      init_getAbiItem();
      docsPath7 = "/docs/contract/encodeFunctionResult";
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js
  async function localBatchGatewayRequest(parameters) {
    const { data, ccipRequest: ccipRequest2 } = parameters;
    const { args: [queries] } = decodeFunctionData({ abi: batchGatewayAbi, data });
    const failures = [];
    const responses = [];
    await Promise.all(queries.map(async (query, i5) => {
      try {
        responses[i5] = query.urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({ data: query.data, ccipRequest: ccipRequest2 }) : await ccipRequest2(query);
        failures[i5] = false;
      } catch (err2) {
        failures[i5] = true;
        responses[i5] = encodeError(err2);
      }
    }));
    return encodeFunctionResult({
      abi: batchGatewayAbi,
      functionName: "query",
      result: [failures, responses]
    });
  }
  function encodeError(error51) {
    if (error51.name === "HttpRequestError" && error51.status)
      return encodeErrorResult({
        abi: batchGatewayAbi,
        errorName: "HttpError",
        args: [error51.status, error51.shortMessage]
      });
    return encodeErrorResult({
      abi: [solidityError],
      errorName: "Error",
      args: ["shortMessage" in error51 ? error51.shortMessage : error51.message]
    });
  }
  var localBatchGatewayUrl;
  var init_localBatchGatewayRequest = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js"() {
      "use strict";
      init_node_compat_inject();
      init_abis();
      init_solidity();
      init_decodeFunctionData();
      init_encodeErrorResult();
      init_encodeFunctionResult();
      localBatchGatewayUrl = "x-batch-gateway:true";
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ccip.js
  var ccip_exports = {};
  __export(ccip_exports, {
    ccipRequest: () => ccipRequest,
    offchainLookup: () => offchainLookup,
    offchainLookupAbiItem: () => offchainLookupAbiItem,
    offchainLookupSignature: () => offchainLookupSignature
  });
  async function offchainLookup(client, { blockNumber, blockTag, data, requestOptions, to: to3 }) {
    const { args } = decodeErrorResult({
      data,
      abi: [offchainLookupAbiItem]
    });
    const [sender, urls, callData, callbackSelector, extraData] = args;
    const { ccipRead } = client;
    const ccipRequest_ = ccipRead && typeof ccipRead?.request === "function" ? ccipRead.request : ccipRequest;
    try {
      if (!isAddressEqual(to3, sender))
        throw new OffchainLookupSenderMismatchError({ sender, to: to3 });
      const result = urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({
        data: callData,
        ccipRequest: (parameters) => ccipRequest_({ ...parameters, requestOptions })
      }) : await ccipRequest_({ data: callData, requestOptions, sender, urls });
      const { data: data_ } = await call(client, {
        blockNumber,
        blockTag,
        data: concat([
          callbackSelector,
          encodeAbiParameters([{ type: "bytes" }, { type: "bytes" }], [result, extraData])
        ]),
        requestOptions,
        to: to3
      });
      return data_;
    } catch (err2) {
      if (requestOptions?.signal?.aborted)
        throw getAbortError(requestOptions.signal);
      if (isAbortError(err2))
        throw err2;
      throw new OffchainLookupError({
        callbackSelector,
        cause: err2,
        data,
        extraData,
        sender,
        urls
      });
    }
  }
  async function ccipRequest({ data, requestOptions, sender, urls }) {
    let error51 = new Error("An unknown error occurred.");
    for (let i5 = 0; i5 < urls.length; i5++) {
      if (requestOptions?.signal?.aborted)
        throw getAbortError(requestOptions.signal);
      const url2 = urls[i5];
      const method = url2.includes("{data}") ? "GET" : "POST";
      const body = method === "POST" ? { data, sender } : void 0;
      const headers = method === "POST" ? { "Content-Type": "application/json" } : {};
      try {
        const response = await fetch(url2.replace("{sender}", sender.toLowerCase()).replace("{data}", data), {
          body: JSON.stringify(body),
          headers,
          method,
          ...requestOptions?.signal ? { signal: requestOptions.signal } : {}
        });
        let result;
        if (response.headers.get("Content-Type")?.startsWith("application/json")) {
          result = (await response.json()).data;
        } else {
          result = await response.text();
        }
        if (!response.ok) {
          error51 = new HttpRequestError({
            body,
            details: result?.error ? stringify(result.error) : response.statusText,
            headers: response.headers,
            status: response.status,
            url: url2
          });
          continue;
        }
        if (!isHex(result)) {
          error51 = new OffchainLookupResponseMalformedError({
            result,
            url: url2
          });
          continue;
        }
        return result;
      } catch (err2) {
        if (requestOptions?.signal?.aborted)
          throw getAbortError(requestOptions.signal);
        if (isAbortError(err2))
          throw err2;
        error51 = new HttpRequestError({
          body,
          details: err2.message,
          url: url2
        });
      }
    }
    throw error51;
  }
  var offchainLookupSignature, offchainLookupAbiItem;
  var init_ccip2 = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ccip.js"() {
      "use strict";
      init_node_compat_inject();
      init_call();
      init_ccip();
      init_request();
      init_utils3();
      init_decodeErrorResult();
      init_encodeAbiParameters();
      init_isAddressEqual();
      init_concat();
      init_isHex();
      init_localBatchGatewayRequest();
      init_stringify();
      offchainLookupSignature = "0x556f1830";
      offchainLookupAbiItem = {
        name: "OffchainLookup",
        type: "error",
        inputs: [
          {
            name: "sender",
            type: "address"
          },
          {
            name: "urls",
            type: "string[]"
          },
          {
            name: "callData",
            type: "bytes"
          },
          {
            name: "callbackFunction",
            type: "bytes4"
          },
          {
            name: "extraData",
            type: "bytes"
          }
        ]
      };
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/call.js
  async function call(client, args) {
    const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = client.experimental_blockTag ?? "latest", accessList, blobs, blockOverrides, code: code2, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, requestOptions, to: to3, value, stateOverride, ...rest } = args;
    const account = account_ ? parseAccount(account_) : void 0;
    if (code2 && (factory || factoryData))
      throw new BaseError2("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
    if (code2 && to3)
      throw new BaseError2("Cannot provide both `code` & `to` as parameters.");
    const deploylessCallViaBytecode = code2 && data_;
    const deploylessCallViaFactory = factory && factoryData && to3 && data_;
    const deploylessCall = deploylessCallViaBytecode || deploylessCallViaFactory;
    const data = (() => {
      if (deploylessCallViaBytecode)
        return toDeploylessCallViaBytecodeData({
          code: code2,
          data: data_
        });
      if (deploylessCallViaFactory)
        return toDeploylessCallViaFactoryData({
          data: data_,
          factory,
          factoryData,
          to: to3
        });
      return data_;
    })();
    try {
      assertRequest(args);
      const blockNumberHex = typeof blockNumber === "bigint" ? numberToHex(blockNumber) : void 0;
      const block = blockNumberHex || blockTag;
      const rpcBlockOverrides = blockOverrides ? toRpc2(blockOverrides) : void 0;
      const rpcStateOverride = serializeStateOverride(stateOverride);
      const chainFormat = client.chain?.formatters?.transactionRequest?.format;
      const format = chainFormat || formatTransactionRequest;
      const request = format({
        // Pick out extra data that might exist on the chain's transaction request type.
        ...extract(rest, { format: chainFormat }),
        accessList,
        account,
        authorizationList,
        blobs,
        data,
        gas,
        gasPrice,
        maxFeePerBlobGas,
        maxFeePerGas,
        maxPriorityFeePerGas,
        nonce,
        to: deploylessCall ? void 0 : to3,
        value
      }, "call");
      if (batch && shouldPerformMulticall({ request }) && !rpcStateOverride && !rpcBlockOverrides) {
        try {
          return await scheduleMulticall(client, {
            ...request,
            blockNumber,
            blockTag,
            requestOptions
          });
        } catch (err2) {
          if (!(err2 instanceof ClientChainNotConfiguredError) && !(err2 instanceof ChainDoesNotSupportContract))
            throw err2;
        }
      }
      const params = (() => {
        const base4 = [
          request,
          block
        ];
        if (rpcStateOverride && rpcBlockOverrides)
          return [...base4, rpcStateOverride, rpcBlockOverrides];
        if (rpcStateOverride)
          return [...base4, rpcStateOverride];
        if (rpcBlockOverrides)
          return [...base4, {}, rpcBlockOverrides];
        return base4;
      })();
      const response = await client.request({
        method: "eth_call",
        params
      }, requestOptions);
      if (response === "0x")
        return { data: void 0 };
      return { data: response };
    } catch (err2) {
      if (requestOptions?.signal?.aborted)
        throw getAbortError(requestOptions.signal);
      if (isAbortError(err2))
        throw err2;
      const data2 = getRevertErrorData(err2);
      const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await Promise.resolve().then(() => (init_ccip2(), ccip_exports));
      if (client.ccipRead !== false && data2?.slice(0, 10) === offchainLookupSignature2 && to3)
        return {
          data: await offchainLookup2(client, { data: data2, requestOptions, to: to3 })
        };
      if (deploylessCall && data2?.slice(0, 10) === "0x101bb98d")
        throw new CounterfactualDeploymentFailedError({ factory });
      throw getCallError(err2, {
        ...args,
        account,
        chain: client.chain
      });
    }
  }
  function shouldPerformMulticall({ request }) {
    const { data, to: to3, ...request_ } = request;
    if (!data)
      return false;
    if (data.startsWith(aggregate3Signature))
      return false;
    if (!to3)
      return false;
    if (Object.values(request_).filter((x13) => typeof x13 !== "undefined").length > 0)
      return false;
    return true;
  }
  function getRequestOptionsId(requestOptions) {
    if (!requestOptions)
      return "default";
    const id = requestOptionsIds.get(requestOptions);
    if (id !== void 0)
      return id;
    const nextId = requestOptionsId++;
    requestOptionsIds.set(requestOptions, nextId);
    return nextId;
  }
  async function scheduleMulticall(client, args) {
    const { batchSize = 1024, deployless = false, wait: wait2 = 0 } = typeof client.batch?.multicall === "object" ? client.batch.multicall : {};
    const { blockNumber, blockTag = client.experimental_blockTag ?? "latest", data, requestOptions, to: to3 } = args;
    const multicallAddress = (() => {
      if (deployless)
        return null;
      if (args.multicallAddress)
        return args.multicallAddress;
      if (client.chain) {
        return getChainContractAddress({
          blockNumber,
          chain: client.chain,
          contract: "multicall3"
        });
      }
      throw new ClientChainNotConfiguredError();
    })();
    const blockNumberHex = typeof blockNumber === "bigint" ? numberToHex(blockNumber) : void 0;
    const block = blockNumberHex || blockTag;
    const { schedule } = createBatchScheduler({
      id: `${client.uid}.${block}.${getRequestOptionsId(requestOptions)}`,
      wait: wait2,
      shouldSplitBatch(args2) {
        const size5 = args2.reduce((size6, { data: data2 }) => size6 + (data2.length - 2), 0);
        return size5 > batchSize * 2;
      },
      fn: async (requests) => {
        const calls = requests.map((request) => ({
          allowFailure: true,
          callData: request.data,
          target: request.to
        }));
        const calldata = encodeFunctionData({
          abi: multicall3Abi,
          args: [calls],
          functionName: "aggregate3"
        });
        const data2 = await client.request({
          method: "eth_call",
          params: [
            {
              ...multicallAddress === null ? {
                data: toDeploylessCallViaBytecodeData({
                  code: multicall3Bytecode,
                  data: calldata
                })
              } : { to: multicallAddress, data: calldata }
            },
            block
          ]
        }, requestOptions);
        return decodeFunctionResult({
          abi: multicall3Abi,
          args: [calls],
          functionName: "aggregate3",
          data: data2 || "0x"
        });
      }
    });
    const [{ returnData, success: success2 }] = await schedule({ data, to: to3 });
    if (!success2)
      throw new RawContractError({ data: returnData });
    if (returnData === "0x")
      return { data: void 0 };
    return { data: returnData };
  }
  function toDeploylessCallViaBytecodeData(parameters) {
    const { code: code2, data } = parameters;
    return encodeDeployData({
      abi: parseAbi(["constructor(bytes, bytes)"]),
      bytecode: deploylessCallViaBytecodeBytecode,
      args: [code2, data]
    });
  }
  function toDeploylessCallViaFactoryData(parameters) {
    const { data, factory, factoryData, to: to3 } = parameters;
    return encodeDeployData({
      abi: parseAbi(["constructor(address, bytes, address, bytes)"]),
      bytecode: deploylessCallViaFactoryBytecode,
      args: [to3, data, factory, factoryData]
    });
  }
  function getRevertErrorData(err2) {
    if (!(err2 instanceof BaseError2))
      return void 0;
    const error51 = err2.walk();
    return typeof error51?.data === "object" ? error51.data?.data : error51.data;
  }
  var requestOptionsId, requestOptionsIds;
  var init_call = __esm({
    "../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/call.js"() {
      "use strict";
      init_node_compat_inject();
      init_exports();
      init_BlockOverrides();
      init_parseAccount();
      init_abis();
      init_contract2();
      init_contracts();
      init_base();
      init_chain();
      init_contract();
      init_utils3();
      init_decodeFunctionResult();
      init_encodeDeployData();
      init_encodeFunctionData();
      init_getChainContractAddress();
      init_toHex();
      init_getCallError();
      init_extract();
      init_transactionRequest();
      init_createBatchScheduler();
      init_stateOverride2();
      init_assertRequest();
      requestOptionsId = 0;
      requestOptionsIds = /* @__PURE__ */ new WeakMap();
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/crypto.js
  var require_crypto = __commonJS({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/crypto.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.crypto = void 0;
      exports.crypto = typeof globalThis === "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/utils.js
  var require_utils = __commonJS({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/utils.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.wrapXOFConstructorWithOpts = exports.wrapConstructorWithOpts = exports.wrapConstructor = exports.Hash = exports.nextTick = exports.swap32IfBE = exports.byteSwapIfBE = exports.swap8IfBE = exports.isLE = void 0;
      exports.isBytes = isBytes8;
      exports.anumber = anumber5;
      exports.abytes = abytes6;
      exports.ahash = ahash3;
      exports.aexists = aexists4;
      exports.aoutput = aoutput4;
      exports.u8 = u85;
      exports.u32 = u325;
      exports.clean = clean4;
      exports.createView = createView4;
      exports.rotr = rotr3;
      exports.rotl = rotl3;
      exports.byteSwap = byteSwap2;
      exports.byteSwap32 = byteSwap322;
      exports.bytesToHex = bytesToHex6;
      exports.hexToBytes = hexToBytes7;
      exports.asyncLoop = asyncLoop2;
      exports.utf8ToBytes = utf8ToBytes4;
      exports.bytesToUtf8 = bytesToUtf82;
      exports.toBytes = toBytes5;
      exports.kdfInputToBytes = kdfInputToBytes2;
      exports.concatBytes = concatBytes6;
      exports.checkOpts = checkOpts3;
      exports.createHasher = createHasher4;
      exports.createOptHasher = createOptHasher;
      exports.createXOFer = createXOFer2;
      exports.randomBytes = randomBytes3;
      var crypto_1 = require_crypto();
      function isBytes8(a5) {
        return a5 instanceof Uint8Array || ArrayBuffer.isView(a5) && a5.constructor.name === "Uint8Array";
      }
      function anumber5(n6) {
        if (!Number.isSafeInteger(n6) || n6 < 0)
          throw new Error("positive integer expected, got " + n6);
      }
      function abytes6(b9, ...lengths) {
        if (!isBytes8(b9))
          throw new Error("Uint8Array expected");
        if (lengths.length > 0 && !lengths.includes(b9.length))
          throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b9.length);
      }
      function ahash3(h8) {
        if (typeof h8 !== "function" || typeof h8.create !== "function")
          throw new Error("Hash should be wrapped by utils.createHasher");
        anumber5(h8.outputLen);
        anumber5(h8.blockLen);
      }
      function aexists4(instance2, checkFinished = true) {
        if (instance2.destroyed)
          throw new Error("Hash instance has been destroyed");
        if (checkFinished && instance2.finished)
          throw new Error("Hash#digest() has already been called");
      }
      function aoutput4(out, instance2) {
        abytes6(out);
        const min = instance2.outputLen;
        if (out.length < min) {
          throw new Error("digestInto() expects output buffer of length at least " + min);
        }
      }
      function u85(arr) {
        return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
      }
      function u325(arr) {
        return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
      }
      function clean4(...arrays) {
        for (let i5 = 0; i5 < arrays.length; i5++) {
          arrays[i5].fill(0);
        }
      }
      function createView4(arr) {
        return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
      }
      function rotr3(word, shift) {
        return word << 32 - shift | word >>> shift;
      }
      function rotl3(word, shift) {
        return word << shift | word >>> 32 - shift >>> 0;
      }
      exports.isLE = (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
      function byteSwap2(word) {
        return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
      }
      exports.swap8IfBE = exports.isLE ? (n6) => n6 : (n6) => byteSwap2(n6);
      exports.byteSwapIfBE = exports.swap8IfBE;
      function byteSwap322(arr) {
        for (let i5 = 0; i5 < arr.length; i5++) {
          arr[i5] = byteSwap2(arr[i5]);
        }
        return arr;
      }
      exports.swap32IfBE = exports.isLE ? (u4) => u4 : byteSwap322;
      var hasHexBuiltin4 = /* @__PURE__ */ (() => (
        // @ts-ignore
        typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function"
      ))();
      var hexes5 = /* @__PURE__ */ Array.from({ length: 256 }, (_6, i5) => i5.toString(16).padStart(2, "0"));
      function bytesToHex6(bytes) {
        abytes6(bytes);
        if (hasHexBuiltin4)
          return bytes.toHex();
        let hex3 = "";
        for (let i5 = 0; i5 < bytes.length; i5++) {
          hex3 += hexes5[bytes[i5]];
        }
        return hex3;
      }
      var asciis4 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
      function asciiToBase164(ch) {
        if (ch >= asciis4._0 && ch <= asciis4._9)
          return ch - asciis4._0;
        if (ch >= asciis4.A && ch <= asciis4.F)
          return ch - (asciis4.A - 10);
        if (ch >= asciis4.a && ch <= asciis4.f)
          return ch - (asciis4.a - 10);
        return;
      }
      function hexToBytes7(hex3) {
        if (typeof hex3 !== "string")
          throw new Error("hex string expected, got " + typeof hex3);
        if (hasHexBuiltin4)
          return Uint8Array.fromHex(hex3);
        const hl = hex3.length;
        const al = hl / 2;
        if (hl % 2)
          throw new Error("hex string expected, got unpadded hex of length " + hl);
        const array3 = new Uint8Array(al);
        for (let ai2 = 0, hi2 = 0; ai2 < al; ai2++, hi2 += 2) {
          const n1 = asciiToBase164(hex3.charCodeAt(hi2));
          const n22 = asciiToBase164(hex3.charCodeAt(hi2 + 1));
          if (n1 === void 0 || n22 === void 0) {
            const char = hex3[hi2] + hex3[hi2 + 1];
            throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi2);
          }
          array3[ai2] = n1 * 16 + n22;
        }
        return array3;
      }
      var nextTick = async () => {
      };
      exports.nextTick = nextTick;
      async function asyncLoop2(iters, tick, cb) {
        let ts2 = Date.now();
        for (let i5 = 0; i5 < iters; i5++) {
          cb(i5);
          const diff = Date.now() - ts2;
          if (diff >= 0 && diff < tick)
            continue;
          await (0, exports.nextTick)();
          ts2 += diff;
        }
      }
      function utf8ToBytes4(str) {
        if (typeof str !== "string")
          throw new Error("string expected");
        return new Uint8Array(new TextEncoder().encode(str));
      }
      function bytesToUtf82(bytes) {
        return new TextDecoder().decode(bytes);
      }
      function toBytes5(data) {
        if (typeof data === "string")
          data = utf8ToBytes4(data);
        abytes6(data);
        return data;
      }
      function kdfInputToBytes2(data) {
        if (typeof data === "string")
          data = utf8ToBytes4(data);
        abytes6(data);
        return data;
      }
      function concatBytes6(...arrays) {
        let sum = 0;
        for (let i5 = 0; i5 < arrays.length; i5++) {
          const a5 = arrays[i5];
          abytes6(a5);
          sum += a5.length;
        }
        const res = new Uint8Array(sum);
        for (let i5 = 0, pad4 = 0; i5 < arrays.length; i5++) {
          const a5 = arrays[i5];
          res.set(a5, pad4);
          pad4 += a5.length;
        }
        return res;
      }
      function checkOpts3(defaults, opts) {
        if (opts !== void 0 && {}.toString.call(opts) !== "[object Object]")
          throw new Error("options should be object or undefined");
        const merged = Object.assign(defaults, opts);
        return merged;
      }
      var Hash3 = class {
      };
      exports.Hash = Hash3;
      function createHasher4(hashCons) {
        const hashC = (msg) => hashCons().update(toBytes5(msg)).digest();
        const tmp = hashCons();
        hashC.outputLen = tmp.outputLen;
        hashC.blockLen = tmp.blockLen;
        hashC.create = () => hashCons();
        return hashC;
      }
      function createOptHasher(hashCons) {
        const hashC = (msg, opts) => hashCons(opts).update(toBytes5(msg)).digest();
        const tmp = hashCons({});
        hashC.outputLen = tmp.outputLen;
        hashC.blockLen = tmp.blockLen;
        hashC.create = (opts) => hashCons(opts);
        return hashC;
      }
      function createXOFer2(hashCons) {
        const hashC = (msg, opts) => hashCons(opts).update(toBytes5(msg)).digest();
        const tmp = hashCons({});
        hashC.outputLen = tmp.outputLen;
        hashC.blockLen = tmp.blockLen;
        hashC.create = (opts) => hashCons(opts);
        return hashC;
      }
      exports.wrapConstructor = createHasher4;
      exports.wrapConstructorWithOpts = createOptHasher;
      exports.wrapXOFConstructorWithOpts = createXOFer2;
      function randomBytes3(bytesLength = 32) {
        if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === "function") {
          return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
        }
        if (crypto_1.crypto && typeof crypto_1.crypto.randomBytes === "function") {
          return Uint8Array.from(crypto_1.crypto.randomBytes(bytesLength));
        }
        throw new Error("crypto.getRandomValues must be defined");
      }
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_md.js
  var require_md = __commonJS({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_md.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.SHA512_IV = exports.SHA384_IV = exports.SHA224_IV = exports.SHA256_IV = exports.HashMD = void 0;
      exports.setBigUint64 = setBigUint643;
      exports.Chi = Chi3;
      exports.Maj = Maj3;
      var utils_ts_1 = require_utils();
      function setBigUint643(view, byteOffset, value, isLE3) {
        if (typeof view.setBigUint64 === "function")
          return view.setBigUint64(byteOffset, value, isLE3);
        const _32n3 = BigInt(32);
        const _u32_max = BigInt(4294967295);
        const wh = Number(value >> _32n3 & _u32_max);
        const wl = Number(value & _u32_max);
        const h8 = isLE3 ? 4 : 0;
        const l6 = isLE3 ? 0 : 4;
        view.setUint32(byteOffset + h8, wh, isLE3);
        view.setUint32(byteOffset + l6, wl, isLE3);
      }
      function Chi3(a5, b9, c7) {
        return a5 & b9 ^ ~a5 & c7;
      }
      function Maj3(a5, b9, c7) {
        return a5 & b9 ^ a5 & c7 ^ b9 & c7;
      }
      var HashMD3 = class extends utils_ts_1.Hash {
        constructor(blockLen, outputLen, padOffset, isLE3) {
          super();
          this.finished = false;
          this.length = 0;
          this.pos = 0;
          this.destroyed = false;
          this.blockLen = blockLen;
          this.outputLen = outputLen;
          this.padOffset = padOffset;
          this.isLE = isLE3;
          this.buffer = new Uint8Array(blockLen);
          this.view = (0, utils_ts_1.createView)(this.buffer);
        }
        update(data) {
          (0, utils_ts_1.aexists)(this);
          data = (0, utils_ts_1.toBytes)(data);
          (0, utils_ts_1.abytes)(data);
          const { view, buffer: buffer2, blockLen } = this;
          const len = data.length;
          for (let pos = 0; pos < len; ) {
            const take = Math.min(blockLen - this.pos, len - pos);
            if (take === blockLen) {
              const dataView = (0, utils_ts_1.createView)(data);
              for (; blockLen <= len - pos; pos += blockLen)
                this.process(dataView, pos);
              continue;
            }
            buffer2.set(data.subarray(pos, pos + take), this.pos);
            this.pos += take;
            pos += take;
            if (this.pos === blockLen) {
              this.process(view, 0);
              this.pos = 0;
            }
          }
          this.length += data.length;
          this.roundClean();
          return this;
        }
        digestInto(out) {
          (0, utils_ts_1.aexists)(this);
          (0, utils_ts_1.aoutput)(out, this);
          this.finished = true;
          const { buffer: buffer2, view, blockLen, isLE: isLE3 } = this;
          let { pos } = this;
          buffer2[pos++] = 128;
          (0, utils_ts_1.clean)(this.buffer.subarray(pos));
          if (this.padOffset > blockLen - pos) {
            this.process(view, 0);
            pos = 0;
          }
          for (let i5 = pos; i5 < blockLen; i5++)
            buffer2[i5] = 0;
          setBigUint643(view, blockLen - 8, BigInt(this.length * 8), isLE3);
          this.process(view, 0);
          const oview = (0, utils_ts_1.createView)(out);
          const len = this.outputLen;
          if (len % 4)
            throw new Error("_sha2: outputLen should be aligned to 32bit");
          const outLen = len / 4;
          const state = this.get();
          if (outLen > state.length)
            throw new Error("_sha2: outputLen bigger than state");
          for (let i5 = 0; i5 < outLen; i5++)
            oview.setUint32(4 * i5, state[i5], isLE3);
        }
        digest() {
          const { buffer: buffer2, outputLen } = this;
          this.digestInto(buffer2);
          const res = buffer2.slice(0, outputLen);
          this.destroy();
          return res;
        }
        _cloneInto(to3) {
          to3 || (to3 = new this.constructor());
          to3.set(...this.get());
          const { blockLen, buffer: buffer2, length: length2, finished, destroyed, pos } = this;
          to3.destroyed = destroyed;
          to3.finished = finished;
          to3.length = length2;
          to3.pos = pos;
          if (length2 % blockLen)
            to3.buffer.set(buffer2);
          return to3;
        }
        clone() {
          return this._cloneInto();
        }
      };
      exports.HashMD = HashMD3;
      exports.SHA256_IV = Uint32Array.from([
        1779033703,
        3144134277,
        1013904242,
        2773480762,
        1359893119,
        2600822924,
        528734635,
        1541459225
      ]);
      exports.SHA224_IV = Uint32Array.from([
        3238371032,
        914150663,
        812702999,
        4144912697,
        4290775857,
        1750603025,
        1694076839,
        3204075428
      ]);
      exports.SHA384_IV = Uint32Array.from([
        3418070365,
        3238371032,
        1654270250,
        914150663,
        2438529370,
        812702999,
        355462360,
        4144912697,
        1731405415,
        4290775857,
        2394180231,
        1750603025,
        3675008525,
        1694076839,
        1203062813,
        3204075428
      ]);
      exports.SHA512_IV = Uint32Array.from([
        1779033703,
        4089235720,
        3144134277,
        2227873595,
        1013904242,
        4271175723,
        2773480762,
        1595750129,
        1359893119,
        2917565137,
        2600822924,
        725511199,
        528734635,
        4215389547,
        1541459225,
        327033209
      ]);
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_u64.js
  var require_u64 = __commonJS({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_u64.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.toBig = exports.shrSL = exports.shrSH = exports.rotrSL = exports.rotrSH = exports.rotrBL = exports.rotrBH = exports.rotr32L = exports.rotr32H = exports.rotlSL = exports.rotlSH = exports.rotlBL = exports.rotlBH = exports.add5L = exports.add5H = exports.add4L = exports.add4H = exports.add3L = exports.add3H = void 0;
      exports.add = add5;
      exports.fromBig = fromBig3;
      exports.split = split3;
      var U32_MASK643 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
      var _32n3 = /* @__PURE__ */ BigInt(32);
      function fromBig3(n6, le6 = false) {
        if (le6)
          return { h: Number(n6 & U32_MASK643), l: Number(n6 >> _32n3 & U32_MASK643) };
        return { h: Number(n6 >> _32n3 & U32_MASK643) | 0, l: Number(n6 & U32_MASK643) | 0 };
      }
      function split3(lst, le6 = false) {
        const len = lst.length;
        let Ah = new Uint32Array(len);
        let Al = new Uint32Array(len);
        for (let i5 = 0; i5 < len; i5++) {
          const { h: h8, l: l6 } = fromBig3(lst[i5], le6);
          [Ah[i5], Al[i5]] = [h8, l6];
        }
        return [Ah, Al];
      }
      var toBig = (h8, l6) => BigInt(h8 >>> 0) << _32n3 | BigInt(l6 >>> 0);
      exports.toBig = toBig;
      var shrSH3 = (h8, _l, s3) => h8 >>> s3;
      exports.shrSH = shrSH3;
      var shrSL3 = (h8, l6, s3) => h8 << 32 - s3 | l6 >>> s3;
      exports.shrSL = shrSL3;
      var rotrSH3 = (h8, l6, s3) => h8 >>> s3 | l6 << 32 - s3;
      exports.rotrSH = rotrSH3;
      var rotrSL3 = (h8, l6, s3) => h8 << 32 - s3 | l6 >>> s3;
      exports.rotrSL = rotrSL3;
      var rotrBH3 = (h8, l6, s3) => h8 << 64 - s3 | l6 >>> s3 - 32;
      exports.rotrBH = rotrBH3;
      var rotrBL3 = (h8, l6, s3) => h8 >>> s3 - 32 | l6 << 64 - s3;
      exports.rotrBL = rotrBL3;
      var rotr32H = (_h, l6) => l6;
      exports.rotr32H = rotr32H;
      var rotr32L = (h8, _l) => h8;
      exports.rotr32L = rotr32L;
      var rotlSH2 = (h8, l6, s3) => h8 << s3 | l6 >>> 32 - s3;
      exports.rotlSH = rotlSH2;
      var rotlSL2 = (h8, l6, s3) => l6 << s3 | h8 >>> 32 - s3;
      exports.rotlSL = rotlSL2;
      var rotlBH2 = (h8, l6, s3) => l6 << s3 - 32 | h8 >>> 64 - s3;
      exports.rotlBH = rotlBH2;
      var rotlBL2 = (h8, l6, s3) => h8 << s3 - 32 | l6 >>> 64 - s3;
      exports.rotlBL = rotlBL2;
      function add5(Ah, Al, Bh, Bl) {
        const l6 = (Al >>> 0) + (Bl >>> 0);
        return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };
      }
      var add3L3 = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
      exports.add3L = add3L3;
      var add3H3 = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
      exports.add3H = add3H3;
      var add4L3 = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
      exports.add4L = add4L3;
      var add4H3 = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
      exports.add4H = add4H3;
      var add5L3 = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
      exports.add5L = add5L3;
      var add5H3 = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
      exports.add5H = add5H3;
      var u643 = {
        fromBig: fromBig3,
        split: split3,
        toBig,
        shrSH: shrSH3,
        shrSL: shrSL3,
        rotrSH: rotrSH3,
        rotrSL: rotrSL3,
        rotrBH: rotrBH3,
        rotrBL: rotrBL3,
        rotr32H,
        rotr32L,
        rotlSH: rotlSH2,
        rotlSL: rotlSL2,
        rotlBH: rotlBH2,
        rotlBL: rotlBL2,
        add: add5,
        add3L: add3L3,
        add3H: add3H3,
        add4L: add4L3,
        add4H: add4H3,
        add5H: add5H3,
        add5L: add5L3
      };
      exports.default = u643;
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha2.js
  var require_sha2 = __commonJS({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha2.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.sha512_224 = exports.sha512_256 = exports.sha384 = exports.sha512 = exports.sha224 = exports.sha256 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA384 = exports.SHA512 = exports.SHA224 = exports.SHA256 = void 0;
      var _md_ts_1 = require_md();
      var u643 = require_u64();
      var utils_ts_1 = require_utils();
      var SHA256_K2 = /* @__PURE__ */ Uint32Array.from([
        1116352408,
        1899447441,
        3049323471,
        3921009573,
        961987163,
        1508970993,
        2453635748,
        2870763221,
        3624381080,
        310598401,
        607225278,
        1426881987,
        1925078388,
        2162078206,
        2614888103,
        3248222580,
        3835390401,
        4022224774,
        264347078,
        604807628,
        770255983,
        1249150122,
        1555081692,
        1996064986,
        2554220882,
        2821834349,
        2952996808,
        3210313671,
        3336571891,
        3584528711,
        113926993,
        338241895,
        666307205,
        773529912,
        1294757372,
        1396182291,
        1695183700,
        1986661051,
        2177026350,
        2456956037,
        2730485921,
        2820302411,
        3259730800,
        3345764771,
        3516065817,
        3600352804,
        4094571909,
        275423344,
        430227734,
        506948616,
        659060556,
        883997877,
        958139571,
        1322822218,
        1537002063,
        1747873779,
        1955562222,
        2024104815,
        2227730452,
        2361852424,
        2428436474,
        2756734187,
        3204031479,
        3329325298
      ]);
      var SHA256_W2 = /* @__PURE__ */ new Uint32Array(64);
      var SHA2562 = class extends _md_ts_1.HashMD {
        constructor(outputLen = 32) {
          super(64, outputLen, 8, false);
          this.A = _md_ts_1.SHA256_IV[0] | 0;
          this.B = _md_ts_1.SHA256_IV[1] | 0;
          this.C = _md_ts_1.SHA256_IV[2] | 0;
          this.D = _md_ts_1.SHA256_IV[3] | 0;
          this.E = _md_ts_1.SHA256_IV[4] | 0;
          this.F = _md_ts_1.SHA256_IV[5] | 0;
          this.G = _md_ts_1.SHA256_IV[6] | 0;
          this.H = _md_ts_1.SHA256_IV[7] | 0;
        }
        get() {
          const { A: A7, B: B7, C: C9, D: D7, E: E6, F: F6, G: G6, H: H6 } = this;
          return [A7, B7, C9, D7, E6, F6, G6, H6];
        }
        // prettier-ignore
        set(A7, B7, C9, D7, E6, F6, G6, H6) {
          this.A = A7 | 0;
          this.B = B7 | 0;
          this.C = C9 | 0;
          this.D = D7 | 0;
          this.E = E6 | 0;
          this.F = F6 | 0;
          this.G = G6 | 0;
          this.H = H6 | 0;
        }
        process(view, offset2) {
          for (let i5 = 0; i5 < 16; i5++, offset2 += 4)
            SHA256_W2[i5] = view.getUint32(offset2, false);
          for (let i5 = 16; i5 < 64; i5++) {
            const W15 = SHA256_W2[i5 - 15];
            const W22 = SHA256_W2[i5 - 2];
            const s0 = (0, utils_ts_1.rotr)(W15, 7) ^ (0, utils_ts_1.rotr)(W15, 18) ^ W15 >>> 3;
            const s1 = (0, utils_ts_1.rotr)(W22, 17) ^ (0, utils_ts_1.rotr)(W22, 19) ^ W22 >>> 10;
            SHA256_W2[i5] = s1 + SHA256_W2[i5 - 7] + s0 + SHA256_W2[i5 - 16] | 0;
          }
          let { A: A7, B: B7, C: C9, D: D7, E: E6, F: F6, G: G6, H: H6 } = this;
          for (let i5 = 0; i5 < 64; i5++) {
            const sigma1 = (0, utils_ts_1.rotr)(E6, 6) ^ (0, utils_ts_1.rotr)(E6, 11) ^ (0, utils_ts_1.rotr)(E6, 25);
            const T1 = H6 + sigma1 + (0, _md_ts_1.Chi)(E6, F6, G6) + SHA256_K2[i5] + SHA256_W2[i5] | 0;
            const sigma0 = (0, utils_ts_1.rotr)(A7, 2) ^ (0, utils_ts_1.rotr)(A7, 13) ^ (0, utils_ts_1.rotr)(A7, 22);
            const T22 = sigma0 + (0, _md_ts_1.Maj)(A7, B7, C9) | 0;
            H6 = G6;
            G6 = F6;
            F6 = E6;
            E6 = D7 + T1 | 0;
            D7 = C9;
            C9 = B7;
            B7 = A7;
            A7 = T1 + T22 | 0;
          }
          A7 = A7 + this.A | 0;
          B7 = B7 + this.B | 0;
          C9 = C9 + this.C | 0;
          D7 = D7 + this.D | 0;
          E6 = E6 + this.E | 0;
          F6 = F6 + this.F | 0;
          G6 = G6 + this.G | 0;
          H6 = H6 + this.H | 0;
          this.set(A7, B7, C9, D7, E6, F6, G6, H6);
        }
        roundClean() {
          (0, utils_ts_1.clean)(SHA256_W2);
        }
        destroy() {
          this.set(0, 0, 0, 0, 0, 0, 0, 0);
          (0, utils_ts_1.clean)(this.buffer);
        }
      };
      exports.SHA256 = SHA2562;
      var SHA2242 = class extends SHA2562 {
        constructor() {
          super(28);
          this.A = _md_ts_1.SHA224_IV[0] | 0;
          this.B = _md_ts_1.SHA224_IV[1] | 0;
          this.C = _md_ts_1.SHA224_IV[2] | 0;
          this.D = _md_ts_1.SHA224_IV[3] | 0;
          this.E = _md_ts_1.SHA224_IV[4] | 0;
          this.F = _md_ts_1.SHA224_IV[5] | 0;
          this.G = _md_ts_1.SHA224_IV[6] | 0;
          this.H = _md_ts_1.SHA224_IV[7] | 0;
        }
      };
      exports.SHA224 = SHA2242;
      var K5123 = /* @__PURE__ */ (() => u643.split([
        "0x428a2f98d728ae22",
        "0x7137449123ef65cd",
        "0xb5c0fbcfec4d3b2f",
        "0xe9b5dba58189dbbc",
        "0x3956c25bf348b538",
        "0x59f111f1b605d019",
        "0x923f82a4af194f9b",
        "0xab1c5ed5da6d8118",
        "0xd807aa98a3030242",
        "0x12835b0145706fbe",
        "0x243185be4ee4b28c",
        "0x550c7dc3d5ffb4e2",
        "0x72be5d74f27b896f",
        "0x80deb1fe3b1696b1",
        "0x9bdc06a725c71235",
        "0xc19bf174cf692694",
        "0xe49b69c19ef14ad2",
        "0xefbe4786384f25e3",
        "0x0fc19dc68b8cd5b5",
        "0x240ca1cc77ac9c65",
        "0x2de92c6f592b0275",
        "0x4a7484aa6ea6e483",
        "0x5cb0a9dcbd41fbd4",
        "0x76f988da831153b5",
        "0x983e5152ee66dfab",
        "0xa831c66d2db43210",
        "0xb00327c898fb213f",
        "0xbf597fc7beef0ee4",
        "0xc6e00bf33da88fc2",
        "0xd5a79147930aa725",
        "0x06ca6351e003826f",
        "0x142929670a0e6e70",
        "0x27b70a8546d22ffc",
        "0x2e1b21385c26c926",
        "0x4d2c6dfc5ac42aed",
        "0x53380d139d95b3df",
        "0x650a73548baf63de",
        "0x766a0abb3c77b2a8",
        "0x81c2c92e47edaee6",
        "0x92722c851482353b",
        "0xa2bfe8a14cf10364",
        "0xa81a664bbc423001",
        "0xc24b8b70d0f89791",
        "0xc76c51a30654be30",
        "0xd192e819d6ef5218",
        "0xd69906245565a910",
        "0xf40e35855771202a",
        "0x106aa07032bbd1b8",
        "0x19a4c116b8d2d0c8",
        "0x1e376c085141ab53",
        "0x2748774cdf8eeb99",
        "0x34b0bcb5e19b48a8",
        "0x391c0cb3c5c95a63",
        "0x4ed8aa4ae3418acb",
        "0x5b9cca4f7763e373",
        "0x682e6ff3d6b2b8a3",
        "0x748f82ee5defb2fc",
        "0x78a5636f43172f60",
        "0x84c87814a1f0ab72",
        "0x8cc702081a6439ec",
        "0x90befffa23631e28",
        "0xa4506cebde82bde9",
        "0xbef9a3f7b2c67915",
        "0xc67178f2e372532b",
        "0xca273eceea26619c",
        "0xd186b8c721c0c207",
        "0xeada7dd6cde0eb1e",
        "0xf57d4f7fee6ed178",
        "0x06f067aa72176fba",
        "0x0a637dc5a2c898a6",
        "0x113f9804bef90dae",
        "0x1b710b35131c471b",
        "0x28db77f523047d84",
        "0x32caab7b40c72493",
        "0x3c9ebe0a15c9bebc",
        "0x431d67c49c100d4c",
        "0x4cc5d4becb3e42b6",
        "0x597f299cfc657e2a",
        "0x5fcb6fab3ad6faec",
        "0x6c44198c4a475817"
      ].map((n6) => BigInt(n6))))();
      var SHA512_Kh3 = /* @__PURE__ */ (() => K5123[0])();
      var SHA512_Kl3 = /* @__PURE__ */ (() => K5123[1])();
      var SHA512_W_H3 = /* @__PURE__ */ new Uint32Array(80);
      var SHA512_W_L3 = /* @__PURE__ */ new Uint32Array(80);
      var SHA5122 = class extends _md_ts_1.HashMD {
        constructor(outputLen = 64) {
          super(128, outputLen, 16, false);
          this.Ah = _md_ts_1.SHA512_IV[0] | 0;
          this.Al = _md_ts_1.SHA512_IV[1] | 0;
          this.Bh = _md_ts_1.SHA512_IV[2] | 0;
          this.Bl = _md_ts_1.SHA512_IV[3] | 0;
          this.Ch = _md_ts_1.SHA512_IV[4] | 0;
          this.Cl = _md_ts_1.SHA512_IV[5] | 0;
          this.Dh = _md_ts_1.SHA512_IV[6] | 0;
          this.Dl = _md_ts_1.SHA512_IV[7] | 0;
          this.Eh = _md_ts_1.SHA512_IV[8] | 0;
          this.El = _md_ts_1.SHA512_IV[9] | 0;
          this.Fh = _md_ts_1.SHA512_IV[10] | 0;
          this.Fl = _md_ts_1.SHA512_IV[11] | 0;
          this.Gh = _md_ts_1.SHA512_IV[12] | 0;
          this.Gl = _md_ts_1.SHA512_IV[13] | 0;
          this.Hh = _md_ts_1.SHA512_IV[14] | 0;
          this.Hl = _md_ts_1.SHA512_IV[15] | 0;
        }
        // prettier-ignore
        get() {
          const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
          return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];
        }
        // prettier-ignore
        set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {
          this.Ah = Ah | 0;
          this.Al = Al | 0;
          this.Bh = Bh | 0;
          this.Bl = Bl | 0;
          this.Ch = Ch | 0;
          this.Cl = Cl | 0;
          this.Dh = Dh | 0;
          this.Dl = Dl | 0;
          this.Eh = Eh | 0;
          this.El = El | 0;
          this.Fh = Fh | 0;
          this.Fl = Fl | 0;
          this.Gh = Gh | 0;
          this.Gl = Gl | 0;
          this.Hh = Hh | 0;
          this.Hl = Hl | 0;
        }
        process(view, offset2) {
          for (let i5 = 0; i5 < 16; i5++, offset2 += 4) {
            SHA512_W_H3[i5] = view.getUint32(offset2);
            SHA512_W_L3[i5] = view.getUint32(offset2 += 4);
          }
          for (let i5 = 16; i5 < 80; i5++) {
            const W15h = SHA512_W_H3[i5 - 15] | 0;
            const W15l = SHA512_W_L3[i5 - 15] | 0;
            const s0h = u643.rotrSH(W15h, W15l, 1) ^ u643.rotrSH(W15h, W15l, 8) ^ u643.shrSH(W15h, W15l, 7);
            const s0l = u643.rotrSL(W15h, W15l, 1) ^ u643.rotrSL(W15h, W15l, 8) ^ u643.shrSL(W15h, W15l, 7);
            const W2h = SHA512_W_H3[i5 - 2] | 0;
            const W2l = SHA512_W_L3[i5 - 2] | 0;
            const s1h = u643.rotrSH(W2h, W2l, 19) ^ u643.rotrBH(W2h, W2l, 61) ^ u643.shrSH(W2h, W2l, 6);
            const s1l = u643.rotrSL(W2h, W2l, 19) ^ u643.rotrBL(W2h, W2l, 61) ^ u643.shrSL(W2h, W2l, 6);
            const SUMl = u643.add4L(s0l, s1l, SHA512_W_L3[i5 - 7], SHA512_W_L3[i5 - 16]);
            const SUMh = u643.add4H(SUMl, s0h, s1h, SHA512_W_H3[i5 - 7], SHA512_W_H3[i5 - 16]);
            SHA512_W_H3[i5] = SUMh | 0;
            SHA512_W_L3[i5] = SUMl | 0;
          }
          let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
          for (let i5 = 0; i5 < 80; i5++) {
            const sigma1h = u643.rotrSH(Eh, El, 14) ^ u643.rotrSH(Eh, El, 18) ^ u643.rotrBH(Eh, El, 41);
            const sigma1l = u643.rotrSL(Eh, El, 14) ^ u643.rotrSL(Eh, El, 18) ^ u643.rotrBL(Eh, El, 41);
            const CHIh = Eh & Fh ^ ~Eh & Gh;
            const CHIl = El & Fl ^ ~El & Gl;
            const T1ll = u643.add5L(Hl, sigma1l, CHIl, SHA512_Kl3[i5], SHA512_W_L3[i5]);
            const T1h = u643.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh3[i5], SHA512_W_H3[i5]);
            const T1l = T1ll | 0;
            const sigma0h = u643.rotrSH(Ah, Al, 28) ^ u643.rotrBH(Ah, Al, 34) ^ u643.rotrBH(Ah, Al, 39);
            const sigma0l = u643.rotrSL(Ah, Al, 28) ^ u643.rotrBL(Ah, Al, 34) ^ u643.rotrBL(Ah, Al, 39);
            const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;
            const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;
            Hh = Gh | 0;
            Hl = Gl | 0;
            Gh = Fh | 0;
            Gl = Fl | 0;
            Fh = Eh | 0;
            Fl = El | 0;
            ({ h: Eh, l: El } = u643.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
            Dh = Ch | 0;
            Dl = Cl | 0;
            Ch = Bh | 0;
            Cl = Bl | 0;
            Bh = Ah | 0;
            Bl = Al | 0;
            const All = u643.add3L(T1l, sigma0l, MAJl);
            Ah = u643.add3H(All, T1h, sigma0h, MAJh);
            Al = All | 0;
          }
          ({ h: Ah, l: Al } = u643.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
          ({ h: Bh, l: Bl } = u643.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
          ({ h: Ch, l: Cl } = u643.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
          ({ h: Dh, l: Dl } = u643.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
          ({ h: Eh, l: El } = u643.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
          ({ h: Fh, l: Fl } = u643.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
          ({ h: Gh, l: Gl } = u643.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
          ({ h: Hh, l: Hl } = u643.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
          this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
        }
        roundClean() {
          (0, utils_ts_1.clean)(SHA512_W_H3, SHA512_W_L3);
        }
        destroy() {
          (0, utils_ts_1.clean)(this.buffer);
          this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
        }
      };
      exports.SHA512 = SHA5122;
      var SHA3842 = class extends SHA5122 {
        constructor() {
          super(48);
          this.Ah = _md_ts_1.SHA384_IV[0] | 0;
          this.Al = _md_ts_1.SHA384_IV[1] | 0;
          this.Bh = _md_ts_1.SHA384_IV[2] | 0;
          this.Bl = _md_ts_1.SHA384_IV[3] | 0;
          this.Ch = _md_ts_1.SHA384_IV[4] | 0;
          this.Cl = _md_ts_1.SHA384_IV[5] | 0;
          this.Dh = _md_ts_1.SHA384_IV[6] | 0;
          this.Dl = _md_ts_1.SHA384_IV[7] | 0;
          this.Eh = _md_ts_1.SHA384_IV[8] | 0;
          this.El = _md_ts_1.SHA384_IV[9] | 0;
          this.Fh = _md_ts_1.SHA384_IV[10] | 0;
          this.Fl = _md_ts_1.SHA384_IV[11] | 0;
          this.Gh = _md_ts_1.SHA384_IV[12] | 0;
          this.Gl = _md_ts_1.SHA384_IV[13] | 0;
          this.Hh = _md_ts_1.SHA384_IV[14] | 0;
          this.Hl = _md_ts_1.SHA384_IV[15] | 0;
        }
      };
      exports.SHA384 = SHA3842;
      var T224_IV = /* @__PURE__ */ Uint32Array.from([
        2352822216,
        424955298,
        1944164710,
        2312950998,
        502970286,
        855612546,
        1738396948,
        1479516111,
        258812777,
        2077511080,
        2011393907,
        79989058,
        1067287976,
        1780299464,
        286451373,
        2446758561
      ]);
      var T256_IV = /* @__PURE__ */ Uint32Array.from([
        573645204,
        4230739756,
        2673172387,
        3360449730,
        596883563,
        1867755857,
        2520282905,
        1497426621,
        2519219938,
        2827943907,
        3193839141,
        1401305490,
        721525244,
        746961066,
        246885852,
        2177182882
      ]);
      var SHA512_224 = class extends SHA5122 {
        constructor() {
          super(28);
          this.Ah = T224_IV[0] | 0;
          this.Al = T224_IV[1] | 0;
          this.Bh = T224_IV[2] | 0;
          this.Bl = T224_IV[3] | 0;
          this.Ch = T224_IV[4] | 0;
          this.Cl = T224_IV[5] | 0;
          this.Dh = T224_IV[6] | 0;
          this.Dl = T224_IV[7] | 0;
          this.Eh = T224_IV[8] | 0;
          this.El = T224_IV[9] | 0;
          this.Fh = T224_IV[10] | 0;
          this.Fl = T224_IV[11] | 0;
          this.Gh = T224_IV[12] | 0;
          this.Gl = T224_IV[13] | 0;
          this.Hh = T224_IV[14] | 0;
          this.Hl = T224_IV[15] | 0;
        }
      };
      exports.SHA512_224 = SHA512_224;
      var SHA512_256 = class extends SHA5122 {
        constructor() {
          super(32);
          this.Ah = T256_IV[0] | 0;
          this.Al = T256_IV[1] | 0;
          this.Bh = T256_IV[2] | 0;
          this.Bl = T256_IV[3] | 0;
          this.Ch = T256_IV[4] | 0;
          this.Cl = T256_IV[5] | 0;
          this.Dh = T256_IV[6] | 0;
          this.Dl = T256_IV[7] | 0;
          this.Eh = T256_IV[8] | 0;
          this.El = T256_IV[9] | 0;
          this.Fh = T256_IV[10] | 0;
          this.Fl = T256_IV[11] | 0;
          this.Gh = T256_IV[12] | 0;
          this.Gl = T256_IV[13] | 0;
          this.Hh = T256_IV[14] | 0;
          this.Hl = T256_IV[15] | 0;
        }
      };
      exports.SHA512_256 = SHA512_256;
      exports.sha256 = (0, utils_ts_1.createHasher)(() => new SHA2562());
      exports.sha224 = (0, utils_ts_1.createHasher)(() => new SHA2242());
      exports.sha512 = (0, utils_ts_1.createHasher)(() => new SHA5122());
      exports.sha384 = (0, utils_ts_1.createHasher)(() => new SHA3842());
      exports.sha512_256 = (0, utils_ts_1.createHasher)(() => new SHA512_256());
      exports.sha512_224 = (0, utils_ts_1.createHasher)(() => new SHA512_224());
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha256.js
  var require_sha256 = __commonJS({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha256.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.sha224 = exports.SHA224 = exports.sha256 = exports.SHA256 = void 0;
      var sha2_ts_1 = require_sha2();
      exports.SHA256 = sha2_ts_1.SHA256;
      exports.sha256 = sha2_ts_1.sha256;
      exports.SHA224 = sha2_ts_1.SHA224;
      exports.sha224 = sha2_ts_1.sha224;
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha512.js
  var require_sha512 = __commonJS({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha512.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.sha512_256 = exports.SHA512_256 = exports.sha512_224 = exports.SHA512_224 = exports.sha384 = exports.SHA384 = exports.sha512 = exports.SHA512 = void 0;
      var sha2_ts_1 = require_sha2();
      exports.SHA512 = sha2_ts_1.SHA512;
      exports.sha512 = sha2_ts_1.sha512;
      exports.SHA384 = sha2_ts_1.SHA384;
      exports.sha384 = sha2_ts_1.sha384;
      exports.SHA512_224 = sha2_ts_1.SHA512_224;
      exports.sha512_224 = sha2_ts_1.sha512_224;
      exports.SHA512_256 = sha2_ts_1.SHA512_256;
      exports.sha512_256 = sha2_ts_1.sha512_256;
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/hmac.js
  var require_hmac = __commonJS({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/hmac.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.hmac = exports.HMAC = void 0;
      var utils_ts_1 = require_utils();
      var HMAC2 = class extends utils_ts_1.Hash {
        constructor(hash5, _key) {
          super();
          this.finished = false;
          this.destroyed = false;
          (0, utils_ts_1.ahash)(hash5);
          const key2 = (0, utils_ts_1.toBytes)(_key);
          this.iHash = hash5.create();
          if (typeof this.iHash.update !== "function")
            throw new Error("Expected instance of class which extends utils.Hash");
          this.blockLen = this.iHash.blockLen;
          this.outputLen = this.iHash.outputLen;
          const blockLen = this.blockLen;
          const pad4 = new Uint8Array(blockLen);
          pad4.set(key2.length > blockLen ? hash5.create().update(key2).digest() : key2);
          for (let i5 = 0; i5 < pad4.length; i5++)
            pad4[i5] ^= 54;
          this.iHash.update(pad4);
          this.oHash = hash5.create();
          for (let i5 = 0; i5 < pad4.length; i5++)
            pad4[i5] ^= 54 ^ 92;
          this.oHash.update(pad4);
          (0, utils_ts_1.clean)(pad4);
        }
        update(buf) {
          (0, utils_ts_1.aexists)(this);
          this.iHash.update(buf);
          return this;
        }
        digestInto(out) {
          (0, utils_ts_1.aexists)(this);
          (0, utils_ts_1.abytes)(out, this.outputLen);
          this.finished = true;
          this.iHash.digestInto(out);
          this.oHash.update(out);
          this.oHash.digestInto(out);
          this.destroy();
        }
        digest() {
          const out = new Uint8Array(this.oHash.outputLen);
          this.digestInto(out);
          return out;
        }
        _cloneInto(to3) {
          to3 || (to3 = Object.create(Object.getPrototypeOf(this), {}));
          const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;
          to3 = to3;
          to3.finished = finished;
          to3.destroyed = destroyed;
          to3.blockLen = blockLen;
          to3.outputLen = outputLen;
          to3.oHash = oHash._cloneInto(to3.oHash);
          to3.iHash = iHash._cloneInto(to3.iHash);
          return to3;
        }
        clone() {
          return this._cloneInto();
        }
        destroy() {
          this.destroyed = true;
          this.oHash.destroy();
          this.iHash.destroy();
        }
      };
      exports.HMAC = HMAC2;
      var hmac4 = (hash5, key2, message) => new HMAC2(hash5, key2).update(message).digest();
      exports.hmac = hmac4;
      exports.hmac.create = (hash5, key2) => new HMAC2(hash5, key2);
    }
  });

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/pbkdf2.js
  var require_pbkdf2 = __commonJS({
    "../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/pbkdf2.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.pbkdf2 = pbkdf22;
      exports.pbkdf2Async = pbkdf2Async2;
      var hmac_ts_1 = require_hmac();
      var utils_ts_1 = require_utils();
      function pbkdf2Init2(hash5, _password, _salt, _opts) {
        (0, utils_ts_1.ahash)(hash5);
        const opts = (0, utils_ts_1.checkOpts)({ dkLen: 32, asyncTick: 10 }, _opts);
        const { c: c7, dkLen, asyncTick } = opts;
        (0, utils_ts_1.anumber)(c7);
        (0, utils_ts_1.anumber)(dkLen);
        (0, utils_ts_1.anumber)(asyncTick);
        if (c7 < 1)
          throw new Error("iterations (c) should be >= 1");
        const password = (0, utils_ts_1.kdfInputToBytes)(_password);
        const salt = (0, utils_ts_1.kdfInputToBytes)(_salt);
        const DK = new Uint8Array(dkLen);
        const PRF = hmac_ts_1.hmac.create(hash5, password);
        const PRFSalt = PRF._cloneInto().update(salt);
        return { c: c7, dkLen, asyncTick, DK, PRF, PRFSalt };
      }
      function pbkdf2Output2(PRF, PRFSalt, DK, prfW, u4) {
        PRF.destroy();
        PRFSalt.destroy();
        if (prfW)
          prfW.destroy();
        (0, utils_ts_1.clean)(u4);
        return DK;
      }
      function pbkdf22(hash5, password, salt, opts) {
        const { c: c7, dkLen, DK, PRF, PRFSalt } = pbkdf2Init2(hash5, password, salt, opts);
        let prfW;
        const arr = new Uint8Array(4);
        const view = (0, utils_ts_1.createView)(arr);
        const u4 = new Uint8Array(PRF.outputLen);
        for (let ti2 = 1, pos = 0; pos < dkLen; ti2++, pos += PRF.outputLen) {
          const Ti = DK.subarray(pos, pos + PRF.outputLen);
          view.setInt32(0, ti2, false);
          (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u4);
          Ti.set(u4.subarray(0, Ti.length));
          for (let ui2 = 1; ui2 < c7; ui2++) {
            PRF._cloneInto(prfW).update(u4).digestInto(u4);
            for (let i5 = 0; i5 < Ti.length; i5++)
              Ti[i5] ^= u4[i5];
          }
        }
        return pbkdf2Output2(PRF, PRFSalt, DK, prfW, u4);
      }
      async function pbkdf2Async2(hash5, password, salt, opts) {
        const { c: c7, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init2(hash5, password, salt, opts);
        let prfW;
        const arr = new Uint8Array(4);
        const view = (0, utils_ts_1.createView)(arr);
        const u4 = new Uint8Array(PRF.outputLen);
        for (let ti2 = 1, pos = 0; pos < dkLen; ti2++, pos += PRF.outputLen) {
          const Ti = DK.subarray(pos, pos + PRF.outputLen);
          view.setInt32(0, ti2, false);
          (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u4);
          Ti.set(u4.subarray(0, Ti.length));
          await (0, utils_ts_1.asyncLoop)(c7 - 1, asyncTick, () => {
            PRF._cloneInto(prfW).update(u4).digestInto(u4);
            for (let i5 = 0; i5 < Ti.length; i5++)
              Ti[i5] ^= u4[i5];
          });
        }
        return pbkdf2Output2(PRF, PRFSalt, DK, prfW, u4);
      }
    }
  });

  // ../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/czech.json
  var require_czech = __commonJS({
    "../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/czech.json"(exports, module) {
      module.exports = [
        "abdikace",
        "abeceda",
        "adresa",
        "agrese",
        "akce",
        "aktovka",
        "alej",
        "alkohol",
        "amputace",
        "ananas",
        "andulka",
        "anekdota",
        "anketa",
        "antika",
        "anulovat",
        "archa",
        "arogance",
        "asfalt",
        "asistent",
        "aspirace",
        "astma",
        "astronom",
        "atlas",
        "atletika",
        "atol",
        "autobus",
        "azyl",
        "babka",
        "bachor",
        "bacil",
        "baculka",
        "badatel",
        "bageta",
        "bagr",
        "bahno",
        "bakterie",
        "balada",
        "baletka",
        "balkon",
        "balonek",
        "balvan",
        "balza",
        "bambus",
        "bankomat",
        "barbar",
        "baret",
        "barman",
        "baroko",
        "barva",
        "baterka",
        "batoh",
        "bavlna",
        "bazalka",
        "bazilika",
        "bazuka",
        "bedna",
        "beran",
        "beseda",
        "bestie",
        "beton",
        "bezinka",
        "bezmoc",
        "beztak",
        "bicykl",
        "bidlo",
        "biftek",
        "bikiny",
        "bilance",
        "biograf",
        "biolog",
        "bitva",
        "bizon",
        "blahobyt",
        "blatouch",
        "blecha",
        "bledule",
        "blesk",
        "blikat",
        "blizna",
        "blokovat",
        "bloudit",
        "blud",
        "bobek",
        "bobr",
        "bodlina",
        "bodnout",
        "bohatost",
        "bojkot",
        "bojovat",
        "bokorys",
        "bolest",
        "borec",
        "borovice",
        "bota",
        "boubel",
        "bouchat",
        "bouda",
        "boule",
        "bourat",
        "boxer",
        "bradavka",
        "brambora",
        "branka",
        "bratr",
        "brepta",
        "briketa",
        "brko",
        "brloh",
        "bronz",
        "broskev",
        "brunetka",
        "brusinka",
        "brzda",
        "brzy",
        "bublina",
        "bubnovat",
        "buchta",
        "buditel",
        "budka",
        "budova",
        "bufet",
        "bujarost",
        "bukvice",
        "buldok",
        "bulva",
        "bunda",
        "bunkr",
        "burza",
        "butik",
        "buvol",
        "buzola",
        "bydlet",
        "bylina",
        "bytovka",
        "bzukot",
        "capart",
        "carevna",
        "cedr",
        "cedule",
        "cejch",
        "cejn",
        "cela",
        "celer",
        "celkem",
        "celnice",
        "cenina",
        "cennost",
        "cenovka",
        "centrum",
        "cenzor",
        "cestopis",
        "cetka",
        "chalupa",
        "chapadlo",
        "charita",
        "chata",
        "chechtat",
        "chemie",
        "chichot",
        "chirurg",
        "chlad",
        "chleba",
        "chlubit",
        "chmel",
        "chmura",
        "chobot",
        "chochol",
        "chodba",
        "cholera",
        "chomout",
        "chopit",
        "choroba",
        "chov",
        "chrapot",
        "chrlit",
        "chrt",
        "chrup",
        "chtivost",
        "chudina",
        "chutnat",
        "chvat",
        "chvilka",
        "chvost",
        "chyba",
        "chystat",
        "chytit",
        "cibule",
        "cigareta",
        "cihelna",
        "cihla",
        "cinkot",
        "cirkus",
        "cisterna",
        "citace",
        "citrus",
        "cizinec",
        "cizost",
        "clona",
        "cokoliv",
        "couvat",
        "ctitel",
        "ctnost",
        "cudnost",
        "cuketa",
        "cukr",
        "cupot",
        "cvaknout",
        "cval",
        "cvik",
        "cvrkot",
        "cyklista",
        "daleko",
        "dareba",
        "datel",
        "datum",
        "dcera",
        "debata",
        "dechovka",
        "decibel",
        "deficit",
        "deflace",
        "dekl",
        "dekret",
        "demokrat",
        "deprese",
        "derby",
        "deska",
        "detektiv",
        "dikobraz",
        "diktovat",
        "dioda",
        "diplom",
        "disk",
        "displej",
        "divadlo",
        "divoch",
        "dlaha",
        "dlouho",
        "dluhopis",
        "dnes",
        "dobro",
        "dobytek",
        "docent",
        "dochutit",
        "dodnes",
        "dohled",
        "dohoda",
        "dohra",
        "dojem",
        "dojnice",
        "doklad",
        "dokola",
        "doktor",
        "dokument",
        "dolar",
        "doleva",
        "dolina",
        "doma",
        "dominant",
        "domluvit",
        "domov",
        "donutit",
        "dopad",
        "dopis",
        "doplnit",
        "doposud",
        "doprovod",
        "dopustit",
        "dorazit",
        "dorost",
        "dort",
        "dosah",
        "doslov",
        "dostatek",
        "dosud",
        "dosyta",
        "dotaz",
        "dotek",
        "dotknout",
        "doufat",
        "doutnat",
        "dovozce",
        "dozadu",
        "doznat",
        "dozorce",
        "drahota",
        "drak",
        "dramatik",
        "dravec",
        "draze",
        "drdol",
        "drobnost",
        "drogerie",
        "drozd",
        "drsnost",
        "drtit",
        "drzost",
        "duben",
        "duchovno",
        "dudek",
        "duha",
        "duhovka",
        "dusit",
        "dusno",
        "dutost",
        "dvojice",
        "dvorec",
        "dynamit",
        "ekolog",
        "ekonomie",
        "elektron",
        "elipsa",
        "email",
        "emise",
        "emoce",
        "empatie",
        "epizoda",
        "epocha",
        "epopej",
        "epos",
        "esej",
        "esence",
        "eskorta",
        "eskymo",
        "etiketa",
        "euforie",
        "evoluce",
        "exekuce",
        "exkurze",
        "expedice",
        "exploze",
        "export",
        "extrakt",
        "facka",
        "fajfka",
        "fakulta",
        "fanatik",
        "fantazie",
        "farmacie",
        "favorit",
        "fazole",
        "federace",
        "fejeton",
        "fenka",
        "fialka",
        "figurant",
        "filozof",
        "filtr",
        "finance",
        "finta",
        "fixace",
        "fjord",
        "flanel",
        "flirt",
        "flotila",
        "fond",
        "fosfor",
        "fotbal",
        "fotka",
        "foton",
        "frakce",
        "freska",
        "fronta",
        "fukar",
        "funkce",
        "fyzika",
        "galeje",
        "garant",
        "genetika",
        "geolog",
        "gilotina",
        "glazura",
        "glejt",
        "golem",
        "golfista",
        "gotika",
        "graf",
        "gramofon",
        "granule",
        "grep",
        "gril",
        "grog",
        "groteska",
        "guma",
        "hadice",
        "hadr",
        "hala",
        "halenka",
        "hanba",
        "hanopis",
        "harfa",
        "harpuna",
        "havran",
        "hebkost",
        "hejkal",
        "hejno",
        "hejtman",
        "hektar",
        "helma",
        "hematom",
        "herec",
        "herna",
        "heslo",
        "hezky",
        "historik",
        "hladovka",
        "hlasivky",
        "hlava",
        "hledat",
        "hlen",
        "hlodavec",
        "hloh",
        "hloupost",
        "hltat",
        "hlubina",
        "hluchota",
        "hmat",
        "hmota",
        "hmyz",
        "hnis",
        "hnojivo",
        "hnout",
        "hoblina",
        "hoboj",
        "hoch",
        "hodiny",
        "hodlat",
        "hodnota",
        "hodovat",
        "hojnost",
        "hokej",
        "holinka",
        "holka",
        "holub",
        "homole",
        "honitba",
        "honorace",
        "horal",
        "horda",
        "horizont",
        "horko",
        "horlivec",
        "hormon",
        "hornina",
        "horoskop",
        "horstvo",
        "hospoda",
        "hostina",
        "hotovost",
        "houba",
        "houf",
        "houpat",
        "houska",
        "hovor",
        "hradba",
        "hranice",
        "hravost",
        "hrazda",
        "hrbolek",
        "hrdina",
        "hrdlo",
        "hrdost",
        "hrnek",
        "hrobka",
        "hromada",
        "hrot",
        "hrouda",
        "hrozen",
        "hrstka",
        "hrubost",
        "hryzat",
        "hubenost",
        "hubnout",
        "hudba",
        "hukot",
        "humr",
        "husita",
        "hustota",
        "hvozd",
        "hybnost",
        "hydrant",
        "hygiena",
        "hymna",
        "hysterik",
        "idylka",
        "ihned",
        "ikona",
        "iluze",
        "imunita",
        "infekce",
        "inflace",
        "inkaso",
        "inovace",
        "inspekce",
        "internet",
        "invalida",
        "investor",
        "inzerce",
        "ironie",
        "jablko",
        "jachta",
        "jahoda",
        "jakmile",
        "jakost",
        "jalovec",
        "jantar",
        "jarmark",
        "jaro",
        "jasan",
        "jasno",
        "jatka",
        "javor",
        "jazyk",
        "jedinec",
        "jedle",
        "jednatel",
        "jehlan",
        "jekot",
        "jelen",
        "jelito",
        "jemnost",
        "jenom",
        "jepice",
        "jeseter",
        "jevit",
        "jezdec",
        "jezero",
        "jinak",
        "jindy",
        "jinoch",
        "jiskra",
        "jistota",
        "jitrnice",
        "jizva",
        "jmenovat",
        "jogurt",
        "jurta",
        "kabaret",
        "kabel",
        "kabinet",
        "kachna",
        "kadet",
        "kadidlo",
        "kahan",
        "kajak",
        "kajuta",
        "kakao",
        "kaktus",
        "kalamita",
        "kalhoty",
        "kalibr",
        "kalnost",
        "kamera",
        "kamkoliv",
        "kamna",
        "kanibal",
        "kanoe",
        "kantor",
        "kapalina",
        "kapela",
        "kapitola",
        "kapka",
        "kaple",
        "kapota",
        "kapr",
        "kapusta",
        "kapybara",
        "karamel",
        "karotka",
        "karton",
        "kasa",
        "katalog",
        "katedra",
        "kauce",
        "kauza",
        "kavalec",
        "kazajka",
        "kazeta",
        "kazivost",
        "kdekoliv",
        "kdesi",
        "kedluben",
        "kemp",
        "keramika",
        "kino",
        "klacek",
        "kladivo",
        "klam",
        "klapot",
        "klasika",
        "klaun",
        "klec",
        "klenba",
        "klepat",
        "klesnout",
        "klid",
        "klima",
        "klisna",
        "klobouk",
        "klokan",
        "klopa",
        "kloub",
        "klubovna",
        "klusat",
        "kluzkost",
        "kmen",
        "kmitat",
        "kmotr",
        "kniha",
        "knot",
        "koalice",
        "koberec",
        "kobka",
        "kobliha",
        "kobyla",
        "kocour",
        "kohout",
        "kojenec",
        "kokos",
        "koktejl",
        "kolaps",
        "koleda",
        "kolize",
        "kolo",
        "komando",
        "kometa",
        "komik",
        "komnata",
        "komora",
        "kompas",
        "komunita",
        "konat",
        "koncept",
        "kondice",
        "konec",
        "konfese",
        "kongres",
        "konina",
        "konkurs",
        "kontakt",
        "konzerva",
        "kopanec",
        "kopie",
        "kopnout",
        "koprovka",
        "korbel",
        "korektor",
        "kormidlo",
        "koroptev",
        "korpus",
        "koruna",
        "koryto",
        "korzet",
        "kosatec",
        "kostka",
        "kotel",
        "kotleta",
        "kotoul",
        "koukat",
        "koupelna",
        "kousek",
        "kouzlo",
        "kovboj",
        "koza",
        "kozoroh",
        "krabice",
        "krach",
        "krajina",
        "kralovat",
        "krasopis",
        "kravata",
        "kredit",
        "krejcar",
        "kresba",
        "kreveta",
        "kriket",
        "kritik",
        "krize",
        "krkavec",
        "krmelec",
        "krmivo",
        "krocan",
        "krok",
        "kronika",
        "kropit",
        "kroupa",
        "krovka",
        "krtek",
        "kruhadlo",
        "krupice",
        "krutost",
        "krvinka",
        "krychle",
        "krypta",
        "krystal",
        "kryt",
        "kudlanka",
        "kufr",
        "kujnost",
        "kukla",
        "kulajda",
        "kulich",
        "kulka",
        "kulomet",
        "kultura",
        "kuna",
        "kupodivu",
        "kurt",
        "kurzor",
        "kutil",
        "kvalita",
        "kvasinka",
        "kvestor",
        "kynolog",
        "kyselina",
        "kytara",
        "kytice",
        "kytka",
        "kytovec",
        "kyvadlo",
        "labrador",
        "lachtan",
        "ladnost",
        "laik",
        "lakomec",
        "lamela",
        "lampa",
        "lanovka",
        "lasice",
        "laso",
        "lastura",
        "latinka",
        "lavina",
        "lebka",
        "leckdy",
        "leden",
        "lednice",
        "ledovka",
        "ledvina",
        "legenda",
        "legie",
        "legrace",
        "lehce",
        "lehkost",
        "lehnout",
        "lektvar",
        "lenochod",
        "lentilka",
        "lepenka",
        "lepidlo",
        "letadlo",
        "letec",
        "letmo",
        "letokruh",
        "levhart",
        "levitace",
        "levobok",
        "libra",
        "lichotka",
        "lidojed",
        "lidskost",
        "lihovina",
        "lijavec",
        "lilek",
        "limetka",
        "linie",
        "linka",
        "linoleum",
        "listopad",
        "litina",
        "litovat",
        "lobista",
        "lodivod",
        "logika",
        "logoped",
        "lokalita",
        "loket",
        "lomcovat",
        "lopata",
        "lopuch",
        "lord",
        "losos",
        "lotr",
        "loudal",
        "louh",
        "louka",
        "louskat",
        "lovec",
        "lstivost",
        "lucerna",
        "lucifer",
        "lump",
        "lusk",
        "lustrace",
        "lvice",
        "lyra",
        "lyrika",
        "lysina",
        "madam",
        "madlo",
        "magistr",
        "mahagon",
        "majetek",
        "majitel",
        "majorita",
        "makak",
        "makovice",
        "makrela",
        "malba",
        "malina",
        "malovat",
        "malvice",
        "maminka",
        "mandle",
        "manko",
        "marnost",
        "masakr",
        "maskot",
        "masopust",
        "matice",
        "matrika",
        "maturita",
        "mazanec",
        "mazivo",
        "mazlit",
        "mazurka",
        "mdloba",
        "mechanik",
        "meditace",
        "medovina",
        "melasa",
        "meloun",
        "mentolka",
        "metla",
        "metoda",
        "metr",
        "mezera",
        "migrace",
        "mihnout",
        "mihule",
        "mikina",
        "mikrofon",
        "milenec",
        "milimetr",
        "milost",
        "mimika",
        "mincovna",
        "minibar",
        "minomet",
        "minulost",
        "miska",
        "mistr",
        "mixovat",
        "mladost",
        "mlha",
        "mlhovina",
        "mlok",
        "mlsat",
        "mluvit",
        "mnich",
        "mnohem",
        "mobil",
        "mocnost",
        "modelka",
        "modlitba",
        "mohyla",
        "mokro",
        "molekula",
        "momentka",
        "monarcha",
        "monokl",
        "monstrum",
        "montovat",
        "monzun",
        "mosaz",
        "moskyt",
        "most",
        "motivace",
        "motorka",
        "motyka",
        "moucha",
        "moudrost",
        "mozaika",
        "mozek",
        "mozol",
        "mramor",
        "mravenec",
        "mrkev",
        "mrtvola",
        "mrzet",
        "mrzutost",
        "mstitel",
        "mudrc",
        "muflon",
        "mulat",
        "mumie",
        "munice",
        "muset",
        "mutace",
        "muzeum",
        "muzikant",
        "myslivec",
        "mzda",
        "nabourat",
        "nachytat",
        "nadace",
        "nadbytek",
        "nadhoz",
        "nadobro",
        "nadpis",
        "nahlas",
        "nahnat",
        "nahodile",
        "nahradit",
        "naivita",
        "najednou",
        "najisto",
        "najmout",
        "naklonit",
        "nakonec",
        "nakrmit",
        "nalevo",
        "namazat",
        "namluvit",
        "nanometr",
        "naoko",
        "naopak",
        "naostro",
        "napadat",
        "napevno",
        "naplnit",
        "napnout",
        "naposled",
        "naprosto",
        "narodit",
        "naruby",
        "narychlo",
        "nasadit",
        "nasekat",
        "naslepo",
        "nastat",
        "natolik",
        "navenek",
        "navrch",
        "navzdory",
        "nazvat",
        "nebe",
        "nechat",
        "necky",
        "nedaleko",
        "nedbat",
        "neduh",
        "negace",
        "nehet",
        "nehoda",
        "nejen",
        "nejprve",
        "neklid",
        "nelibost",
        "nemilost",
        "nemoc",
        "neochota",
        "neonka",
        "nepokoj",
        "nerost",
        "nerv",
        "nesmysl",
        "nesoulad",
        "netvor",
        "neuron",
        "nevina",
        "nezvykle",
        "nicota",
        "nijak",
        "nikam",
        "nikdy",
        "nikl",
        "nikterak",
        "nitro",
        "nocleh",
        "nohavice",
        "nominace",
        "nora",
        "norek",
        "nositel",
        "nosnost",
        "nouze",
        "noviny",
        "novota",
        "nozdra",
        "nuda",
        "nudle",
        "nuget",
        "nutit",
        "nutnost",
        "nutrie",
        "nymfa",
        "obal",
        "obarvit",
        "obava",
        "obdiv",
        "obec",
        "obehnat",
        "obejmout",
        "obezita",
        "obhajoba",
        "obilnice",
        "objasnit",
        "objekt",
        "obklopit",
        "oblast",
        "oblek",
        "obliba",
        "obloha",
        "obluda",
        "obnos",
        "obohatit",
        "obojek",
        "obout",
        "obrazec",
        "obrna",
        "obruba",
        "obrys",
        "obsah",
        "obsluha",
        "obstarat",
        "obuv",
        "obvaz",
        "obvinit",
        "obvod",
        "obvykle",
        "obyvatel",
        "obzor",
        "ocas",
        "ocel",
        "ocenit",
        "ochladit",
        "ochota",
        "ochrana",
        "ocitnout",
        "odboj",
        "odbyt",
        "odchod",
        "odcizit",
        "odebrat",
        "odeslat",
        "odevzdat",
        "odezva",
        "odhadce",
        "odhodit",
        "odjet",
        "odjinud",
        "odkaz",
        "odkoupit",
        "odliv",
        "odluka",
        "odmlka",
        "odolnost",
        "odpad",
        "odpis",
        "odplout",
        "odpor",
        "odpustit",
        "odpykat",
        "odrazka",
        "odsoudit",
        "odstup",
        "odsun",
        "odtok",
        "odtud",
        "odvaha",
        "odveta",
        "odvolat",
        "odvracet",
        "odznak",
        "ofina",
        "ofsajd",
        "ohlas",
        "ohnisko",
        "ohrada",
        "ohrozit",
        "ohryzek",
        "okap",
        "okenice",
        "oklika",
        "okno",
        "okouzlit",
        "okovy",
        "okrasa",
        "okres",
        "okrsek",
        "okruh",
        "okupant",
        "okurka",
        "okusit",
        "olejnina",
        "olizovat",
        "omak",
        "omeleta",
        "omezit",
        "omladina",
        "omlouvat",
        "omluva",
        "omyl",
        "onehdy",
        "opakovat",
        "opasek",
        "operace",
        "opice",
        "opilost",
        "opisovat",
        "opora",
        "opozice",
        "opravdu",
        "oproti",
        "orbital",
        "orchestr",
        "orgie",
        "orlice",
        "orloj",
        "ortel",
        "osada",
        "oschnout",
        "osika",
        "osivo",
        "oslava",
        "oslepit",
        "oslnit",
        "oslovit",
        "osnova",
        "osoba",
        "osolit",
        "ospalec",
        "osten",
        "ostraha",
        "ostuda",
        "ostych",
        "osvojit",
        "oteplit",
        "otisk",
        "otop",
        "otrhat",
        "otrlost",
        "otrok",
        "otruby",
        "otvor",
        "ovanout",
        "ovar",
        "oves",
        "ovlivnit",
        "ovoce",
        "oxid",
        "ozdoba",
        "pachatel",
        "pacient",
        "padouch",
        "pahorek",
        "pakt",
        "palanda",
        "palec",
        "palivo",
        "paluba",
        "pamflet",
        "pamlsek",
        "panenka",
        "panika",
        "panna",
        "panovat",
        "panstvo",
        "pantofle",
        "paprika",
        "parketa",
        "parodie",
        "parta",
        "paruka",
        "paryba",
        "paseka",
        "pasivita",
        "pastelka",
        "patent",
        "patrona",
        "pavouk",
        "pazneht",
        "pazourek",
        "pecka",
        "pedagog",
        "pejsek",
        "peklo",
        "peloton",
        "penalta",
        "pendrek",
        "penze",
        "periskop",
        "pero",
        "pestrost",
        "petarda",
        "petice",
        "petrolej",
        "pevnina",
        "pexeso",
        "pianista",
        "piha",
        "pijavice",
        "pikle",
        "piknik",
        "pilina",
        "pilnost",
        "pilulka",
        "pinzeta",
        "pipeta",
        "pisatel",
        "pistole",
        "pitevna",
        "pivnice",
        "pivovar",
        "placenta",
        "plakat",
        "plamen",
        "planeta",
        "plastika",
        "platit",
        "plavidlo",
        "plaz",
        "plech",
        "plemeno",
        "plenta",
        "ples",
        "pletivo",
        "plevel",
        "plivat",
        "plnit",
        "plno",
        "plocha",
        "plodina",
        "plomba",
        "plout",
        "pluk",
        "plyn",
        "pobavit",
        "pobyt",
        "pochod",
        "pocit",
        "poctivec",
        "podat",
        "podcenit",
        "podepsat",
        "podhled",
        "podivit",
        "podklad",
        "podmanit",
        "podnik",
        "podoba",
        "podpora",
        "podraz",
        "podstata",
        "podvod",
        "podzim",
        "poezie",
        "pohanka",
        "pohnutka",
        "pohovor",
        "pohroma",
        "pohyb",
        "pointa",
        "pojistka",
        "pojmout",
        "pokazit",
        "pokles",
        "pokoj",
        "pokrok",
        "pokuta",
        "pokyn",
        "poledne",
        "polibek",
        "polknout",
        "poloha",
        "polynom",
        "pomalu",
        "pominout",
        "pomlka",
        "pomoc",
        "pomsta",
        "pomyslet",
        "ponechat",
        "ponorka",
        "ponurost",
        "popadat",
        "popel",
        "popisek",
        "poplach",
        "poprosit",
        "popsat",
        "popud",
        "poradce",
        "porce",
        "porod",
        "porucha",
        "poryv",
        "posadit",
        "posed",
        "posila",
        "poskok",
        "poslanec",
        "posoudit",
        "pospolu",
        "postava",
        "posudek",
        "posyp",
        "potah",
        "potkan",
        "potlesk",
        "potomek",
        "potrava",
        "potupa",
        "potvora",
        "poukaz",
        "pouto",
        "pouzdro",
        "povaha",
        "povidla",
        "povlak",
        "povoz",
        "povrch",
        "povstat",
        "povyk",
        "povzdech",
        "pozdrav",
        "pozemek",
        "poznatek",
        "pozor",
        "pozvat",
        "pracovat",
        "prahory",
        "praktika",
        "prales",
        "praotec",
        "praporek",
        "prase",
        "pravda",
        "princip",
        "prkno",
        "probudit",
        "procento",
        "prodej",
        "profese",
        "prohra",
        "projekt",
        "prolomit",
        "promile",
        "pronikat",
        "propad",
        "prorok",
        "prosba",
        "proton",
        "proutek",
        "provaz",
        "prskavka",
        "prsten",
        "prudkost",
        "prut",
        "prvek",
        "prvohory",
        "psanec",
        "psovod",
        "pstruh",
        "ptactvo",
        "puberta",
        "puch",
        "pudl",
        "pukavec",
        "puklina",
        "pukrle",
        "pult",
        "pumpa",
        "punc",
        "pupen",
        "pusa",
        "pusinka",
        "pustina",
        "putovat",
        "putyka",
        "pyramida",
        "pysk",
        "pytel",
        "racek",
        "rachot",
        "radiace",
        "radnice",
        "radon",
        "raft",
        "ragby",
        "raketa",
        "rakovina",
        "rameno",
        "rampouch",
        "rande",
        "rarach",
        "rarita",
        "rasovna",
        "rastr",
        "ratolest",
        "razance",
        "razidlo",
        "reagovat",
        "reakce",
        "recept",
        "redaktor",
        "referent",
        "reflex",
        "rejnok",
        "reklama",
        "rekord",
        "rekrut",
        "rektor",
        "reputace",
        "revize",
        "revma",
        "revolver",
        "rezerva",
        "riskovat",
        "riziko",
        "robotika",
        "rodokmen",
        "rohovka",
        "rokle",
        "rokoko",
        "romaneto",
        "ropovod",
        "ropucha",
        "rorejs",
        "rosol",
        "rostlina",
        "rotmistr",
        "rotoped",
        "rotunda",
        "roubenka",
        "roucho",
        "roup",
        "roura",
        "rovina",
        "rovnice",
        "rozbor",
        "rozchod",
        "rozdat",
        "rozeznat",
        "rozhodce",
        "rozinka",
        "rozjezd",
        "rozkaz",
        "rozloha",
        "rozmar",
        "rozpad",
        "rozruch",
        "rozsah",
        "roztok",
        "rozum",
        "rozvod",
        "rubrika",
        "ruchadlo",
        "rukavice",
        "rukopis",
        "ryba",
        "rybolov",
        "rychlost",
        "rydlo",
        "rypadlo",
        "rytina",
        "ryzost",
        "sadista",
        "sahat",
        "sako",
        "samec",
        "samizdat",
        "samota",
        "sanitka",
        "sardinka",
        "sasanka",
        "satelit",
        "sazba",
        "sazenice",
        "sbor",
        "schovat",
        "sebranka",
        "secese",
        "sedadlo",
        "sediment",
        "sedlo",
        "sehnat",
        "sejmout",
        "sekera",
        "sekta",
        "sekunda",
        "sekvoje",
        "semeno",
        "seno",
        "servis",
        "sesadit",
        "seshora",
        "seskok",
        "seslat",
        "sestra",
        "sesuv",
        "sesypat",
        "setba",
        "setina",
        "setkat",
        "setnout",
        "setrvat",
        "sever",
        "seznam",
        "shoda",
        "shrnout",
        "sifon",
        "silnice",
        "sirka",
        "sirotek",
        "sirup",
        "situace",
        "skafandr",
        "skalisko",
        "skanzen",
        "skaut",
        "skeptik",
        "skica",
        "skladba",
        "sklenice",
        "sklo",
        "skluz",
        "skoba",
        "skokan",
        "skoro",
        "skripta",
        "skrz",
        "skupina",
        "skvost",
        "skvrna",
        "slabika",
        "sladidlo",
        "slanina",
        "slast",
        "slavnost",
        "sledovat",
        "slepec",
        "sleva",
        "slezina",
        "slib",
        "slina",
        "sliznice",
        "slon",
        "sloupek",
        "slovo",
        "sluch",
        "sluha",
        "slunce",
        "slupka",
        "slza",
        "smaragd",
        "smetana",
        "smilstvo",
        "smlouva",
        "smog",
        "smrad",
        "smrk",
        "smrtka",
        "smutek",
        "smysl",
        "snad",
        "snaha",
        "snob",
        "sobota",
        "socha",
        "sodovka",
        "sokol",
        "sopka",
        "sotva",
        "souboj",
        "soucit",
        "soudce",
        "souhlas",
        "soulad",
        "soumrak",
        "souprava",
        "soused",
        "soutok",
        "souviset",
        "spalovna",
        "spasitel",
        "spis",
        "splav",
        "spodek",
        "spojenec",
        "spolu",
        "sponzor",
        "spornost",
        "spousta",
        "sprcha",
        "spustit",
        "sranda",
        "sraz",
        "srdce",
        "srna",
        "srnec",
        "srovnat",
        "srpen",
        "srst",
        "srub",
        "stanice",
        "starosta",
        "statika",
        "stavba",
        "stehno",
        "stezka",
        "stodola",
        "stolek",
        "stopa",
        "storno",
        "stoupat",
        "strach",
        "stres",
        "strhnout",
        "strom",
        "struna",
        "studna",
        "stupnice",
        "stvol",
        "styk",
        "subjekt",
        "subtropy",
        "suchar",
        "sudost",
        "sukno",
        "sundat",
        "sunout",
        "surikata",
        "surovina",
        "svah",
        "svalstvo",
        "svetr",
        "svatba",
        "svazek",
        "svisle",
        "svitek",
        "svoboda",
        "svodidlo",
        "svorka",
        "svrab",
        "sykavka",
        "sykot",
        "synek",
        "synovec",
        "sypat",
        "sypkost",
        "syrovost",
        "sysel",
        "sytost",
        "tabletka",
        "tabule",
        "tahoun",
        "tajemno",
        "tajfun",
        "tajga",
        "tajit",
        "tajnost",
        "taktika",
        "tamhle",
        "tampon",
        "tancovat",
        "tanec",
        "tanker",
        "tapeta",
        "tavenina",
        "tazatel",
        "technika",
        "tehdy",
        "tekutina",
        "telefon",
        "temnota",
        "tendence",
        "tenista",
        "tenor",
        "teplota",
        "tepna",
        "teprve",
        "terapie",
        "termoska",
        "textil",
        "ticho",
        "tiskopis",
        "titulek",
        "tkadlec",
        "tkanina",
        "tlapka",
        "tleskat",
        "tlukot",
        "tlupa",
        "tmel",
        "toaleta",
        "topinka",
        "topol",
        "torzo",
        "touha",
        "toulec",
        "tradice",
        "traktor",
        "tramp",
        "trasa",
        "traverza",
        "trefit",
        "trest",
        "trezor",
        "trhavina",
        "trhlina",
        "trochu",
        "trojice",
        "troska",
        "trouba",
        "trpce",
        "trpitel",
        "trpkost",
        "trubec",
        "truchlit",
        "truhlice",
        "trus",
        "trvat",
        "tudy",
        "tuhnout",
        "tuhost",
        "tundra",
        "turista",
        "turnaj",
        "tuzemsko",
        "tvaroh",
        "tvorba",
        "tvrdost",
        "tvrz",
        "tygr",
        "tykev",
        "ubohost",
        "uboze",
        "ubrat",
        "ubrousek",
        "ubrus",
        "ubytovna",
        "ucho",
        "uctivost",
        "udivit",
        "uhradit",
        "ujednat",
        "ujistit",
        "ujmout",
        "ukazatel",
        "uklidnit",
        "uklonit",
        "ukotvit",
        "ukrojit",
        "ulice",
        "ulita",
        "ulovit",
        "umyvadlo",
        "unavit",
        "uniforma",
        "uniknout",
        "upadnout",
        "uplatnit",
        "uplynout",
        "upoutat",
        "upravit",
        "uran",
        "urazit",
        "usednout",
        "usilovat",
        "usmrtit",
        "usnadnit",
        "usnout",
        "usoudit",
        "ustlat",
        "ustrnout",
        "utahovat",
        "utkat",
        "utlumit",
        "utonout",
        "utopenec",
        "utrousit",
        "uvalit",
        "uvolnit",
        "uvozovka",
        "uzdravit",
        "uzel",
        "uzenina",
        "uzlina",
        "uznat",
        "vagon",
        "valcha",
        "valoun",
        "vana",
        "vandal",
        "vanilka",
        "varan",
        "varhany",
        "varovat",
        "vcelku",
        "vchod",
        "vdova",
        "vedro",
        "vegetace",
        "vejce",
        "velbloud",
        "veletrh",
        "velitel",
        "velmoc",
        "velryba",
        "venkov",
        "veranda",
        "verze",
        "veselka",
        "veskrze",
        "vesnice",
        "vespodu",
        "vesta",
        "veterina",
        "veverka",
        "vibrace",
        "vichr",
        "videohra",
        "vidina",
        "vidle",
        "vila",
        "vinice",
        "viset",
        "vitalita",
        "vize",
        "vizitka",
        "vjezd",
        "vklad",
        "vkus",
        "vlajka",
        "vlak",
        "vlasec",
        "vlevo",
        "vlhkost",
        "vliv",
        "vlnovka",
        "vloupat",
        "vnucovat",
        "vnuk",
        "voda",
        "vodivost",
        "vodoznak",
        "vodstvo",
        "vojensky",
        "vojna",
        "vojsko",
        "volant",
        "volba",
        "volit",
        "volno",
        "voskovka",
        "vozidlo",
        "vozovna",
        "vpravo",
        "vrabec",
        "vracet",
        "vrah",
        "vrata",
        "vrba",
        "vrcholek",
        "vrhat",
        "vrstva",
        "vrtule",
        "vsadit",
        "vstoupit",
        "vstup",
        "vtip",
        "vybavit",
        "vybrat",
        "vychovat",
        "vydat",
        "vydra",
        "vyfotit",
        "vyhledat",
        "vyhnout",
        "vyhodit",
        "vyhradit",
        "vyhubit",
        "vyjasnit",
        "vyjet",
        "vyjmout",
        "vyklopit",
        "vykonat",
        "vylekat",
        "vymazat",
        "vymezit",
        "vymizet",
        "vymyslet",
        "vynechat",
        "vynikat",
        "vynutit",
        "vypadat",
        "vyplatit",
        "vypravit",
        "vypustit",
        "vyrazit",
        "vyrovnat",
        "vyrvat",
        "vyslovit",
        "vysoko",
        "vystavit",
        "vysunout",
        "vysypat",
        "vytasit",
        "vytesat",
        "vytratit",
        "vyvinout",
        "vyvolat",
        "vyvrhel",
        "vyzdobit",
        "vyznat",
        "vzadu",
        "vzbudit",
        "vzchopit",
        "vzdor",
        "vzduch",
        "vzdychat",
        "vzestup",
        "vzhledem",
        "vzkaz",
        "vzlykat",
        "vznik",
        "vzorek",
        "vzpoura",
        "vztah",
        "vztek",
        "xylofon",
        "zabrat",
        "zabydlet",
        "zachovat",
        "zadarmo",
        "zadusit",
        "zafoukat",
        "zahltit",
        "zahodit",
        "zahrada",
        "zahynout",
        "zajatec",
        "zajet",
        "zajistit",
        "zaklepat",
        "zakoupit",
        "zalepit",
        "zamezit",
        "zamotat",
        "zamyslet",
        "zanechat",
        "zanikat",
        "zaplatit",
        "zapojit",
        "zapsat",
        "zarazit",
        "zastavit",
        "zasunout",
        "zatajit",
        "zatemnit",
        "zatknout",
        "zaujmout",
        "zavalit",
        "zavelet",
        "zavinit",
        "zavolat",
        "zavrtat",
        "zazvonit",
        "zbavit",
        "zbrusu",
        "zbudovat",
        "zbytek",
        "zdaleka",
        "zdarma",
        "zdatnost",
        "zdivo",
        "zdobit",
        "zdroj",
        "zdvih",
        "zdymadlo",
        "zelenina",
        "zeman",
        "zemina",
        "zeptat",
        "zezadu",
        "zezdola",
        "zhatit",
        "zhltnout",
        "zhluboka",
        "zhotovit",
        "zhruba",
        "zima",
        "zimnice",
        "zjemnit",
        "zklamat",
        "zkoumat",
        "zkratka",
        "zkumavka",
        "zlato",
        "zlehka",
        "zloba",
        "zlom",
        "zlost",
        "zlozvyk",
        "zmapovat",
        "zmar",
        "zmatek",
        "zmije",
        "zmizet",
        "zmocnit",
        "zmodrat",
        "zmrzlina",
        "zmutovat",
        "znak",
        "znalost",
        "znamenat",
        "znovu",
        "zobrazit",
        "zotavit",
        "zoubek",
        "zoufale",
        "zplodit",
        "zpomalit",
        "zprava",
        "zprostit",
        "zprudka",
        "zprvu",
        "zrada",
        "zranit",
        "zrcadlo",
        "zrnitost",
        "zrno",
        "zrovna",
        "zrychlit",
        "zrzavost",
        "zticha",
        "ztratit",
        "zubovina",
        "zubr",
        "zvednout",
        "zvenku",
        "zvesela",
        "zvon",
        "zvrat",
        "zvukovod",
        "zvyk"
      ];
    }
  });

  // ../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/chinese_simplified.json
  var require_chinese_simplified = __commonJS({
    "../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/chinese_simplified.json"(exports, module) {
      module.exports = [
        "\u7684",
        "\u4E00",
        "\u662F",
        "\u5728",
        "\u4E0D",
        "\u4E86",
        "\u6709",
        "\u548C",
        "\u4EBA",
        "\u8FD9",
        "\u4E2D",
        "\u5927",
        "\u4E3A",
        "\u4E0A",
        "\u4E2A",
        "\u56FD",
        "\u6211",
        "\u4EE5",
        "\u8981",
        "\u4ED6",
        "\u65F6",
        "\u6765",
        "\u7528",
        "\u4EEC",
        "\u751F",
        "\u5230",
        "\u4F5C",
        "\u5730",
        "\u4E8E",
        "\u51FA",
        "\u5C31",
        "\u5206",
        "\u5BF9",
        "\u6210",
        "\u4F1A",
        "\u53EF",
        "\u4E3B",
        "\u53D1",
        "\u5E74",
        "\u52A8",
        "\u540C",
        "\u5DE5",
        "\u4E5F",
        "\u80FD",
        "\u4E0B",
        "\u8FC7",
        "\u5B50",
        "\u8BF4",
        "\u4EA7",
        "\u79CD",
        "\u9762",
        "\u800C",
        "\u65B9",
        "\u540E",
        "\u591A",
        "\u5B9A",
        "\u884C",
        "\u5B66",
        "\u6CD5",
        "\u6240",
        "\u6C11",
        "\u5F97",
        "\u7ECF",
        "\u5341",
        "\u4E09",
        "\u4E4B",
        "\u8FDB",
        "\u7740",
        "\u7B49",
        "\u90E8",
        "\u5EA6",
        "\u5BB6",
        "\u7535",
        "\u529B",
        "\u91CC",
        "\u5982",
        "\u6C34",
        "\u5316",
        "\u9AD8",
        "\u81EA",
        "\u4E8C",
        "\u7406",
        "\u8D77",
        "\u5C0F",
        "\u7269",
        "\u73B0",
        "\u5B9E",
        "\u52A0",
        "\u91CF",
        "\u90FD",
        "\u4E24",
        "\u4F53",
        "\u5236",
        "\u673A",
        "\u5F53",
        "\u4F7F",
        "\u70B9",
        "\u4ECE",
        "\u4E1A",
        "\u672C",
        "\u53BB",
        "\u628A",
        "\u6027",
        "\u597D",
        "\u5E94",
        "\u5F00",
        "\u5B83",
        "\u5408",
        "\u8FD8",
        "\u56E0",
        "\u7531",
        "\u5176",
        "\u4E9B",
        "\u7136",
        "\u524D",
        "\u5916",
        "\u5929",
        "\u653F",
        "\u56DB",
        "\u65E5",
        "\u90A3",
        "\u793E",
        "\u4E49",
        "\u4E8B",
        "\u5E73",
        "\u5F62",
        "\u76F8",
        "\u5168",
        "\u8868",
        "\u95F4",
        "\u6837",
        "\u4E0E",
        "\u5173",
        "\u5404",
        "\u91CD",
        "\u65B0",
        "\u7EBF",
        "\u5185",
        "\u6570",
        "\u6B63",
        "\u5FC3",
        "\u53CD",
        "\u4F60",
        "\u660E",
        "\u770B",
        "\u539F",
        "\u53C8",
        "\u4E48",
        "\u5229",
        "\u6BD4",
        "\u6216",
        "\u4F46",
        "\u8D28",
        "\u6C14",
        "\u7B2C",
        "\u5411",
        "\u9053",
        "\u547D",
        "\u6B64",
        "\u53D8",
        "\u6761",
        "\u53EA",
        "\u6CA1",
        "\u7ED3",
        "\u89E3",
        "\u95EE",
        "\u610F",
        "\u5EFA",
        "\u6708",
        "\u516C",
        "\u65E0",
        "\u7CFB",
        "\u519B",
        "\u5F88",
        "\u60C5",
        "\u8005",
        "\u6700",
        "\u7ACB",
        "\u4EE3",
        "\u60F3",
        "\u5DF2",
        "\u901A",
        "\u5E76",
        "\u63D0",
        "\u76F4",
        "\u9898",
        "\u515A",
        "\u7A0B",
        "\u5C55",
        "\u4E94",
        "\u679C",
        "\u6599",
        "\u8C61",
        "\u5458",
        "\u9769",
        "\u4F4D",
        "\u5165",
        "\u5E38",
        "\u6587",
        "\u603B",
        "\u6B21",
        "\u54C1",
        "\u5F0F",
        "\u6D3B",
        "\u8BBE",
        "\u53CA",
        "\u7BA1",
        "\u7279",
        "\u4EF6",
        "\u957F",
        "\u6C42",
        "\u8001",
        "\u5934",
        "\u57FA",
        "\u8D44",
        "\u8FB9",
        "\u6D41",
        "\u8DEF",
        "\u7EA7",
        "\u5C11",
        "\u56FE",
        "\u5C71",
        "\u7EDF",
        "\u63A5",
        "\u77E5",
        "\u8F83",
        "\u5C06",
        "\u7EC4",
        "\u89C1",
        "\u8BA1",
        "\u522B",
        "\u5979",
        "\u624B",
        "\u89D2",
        "\u671F",
        "\u6839",
        "\u8BBA",
        "\u8FD0",
        "\u519C",
        "\u6307",
        "\u51E0",
        "\u4E5D",
        "\u533A",
        "\u5F3A",
        "\u653E",
        "\u51B3",
        "\u897F",
        "\u88AB",
        "\u5E72",
        "\u505A",
        "\u5FC5",
        "\u6218",
        "\u5148",
        "\u56DE",
        "\u5219",
        "\u4EFB",
        "\u53D6",
        "\u636E",
        "\u5904",
        "\u961F",
        "\u5357",
        "\u7ED9",
        "\u8272",
        "\u5149",
        "\u95E8",
        "\u5373",
        "\u4FDD",
        "\u6CBB",
        "\u5317",
        "\u9020",
        "\u767E",
        "\u89C4",
        "\u70ED",
        "\u9886",
        "\u4E03",
        "\u6D77",
        "\u53E3",
        "\u4E1C",
        "\u5BFC",
        "\u5668",
        "\u538B",
        "\u5FD7",
        "\u4E16",
        "\u91D1",
        "\u589E",
        "\u4E89",
        "\u6D4E",
        "\u9636",
        "\u6CB9",
        "\u601D",
        "\u672F",
        "\u6781",
        "\u4EA4",
        "\u53D7",
        "\u8054",
        "\u4EC0",
        "\u8BA4",
        "\u516D",
        "\u5171",
        "\u6743",
        "\u6536",
        "\u8BC1",
        "\u6539",
        "\u6E05",
        "\u7F8E",
        "\u518D",
        "\u91C7",
        "\u8F6C",
        "\u66F4",
        "\u5355",
        "\u98CE",
        "\u5207",
        "\u6253",
        "\u767D",
        "\u6559",
        "\u901F",
        "\u82B1",
        "\u5E26",
        "\u5B89",
        "\u573A",
        "\u8EAB",
        "\u8F66",
        "\u4F8B",
        "\u771F",
        "\u52A1",
        "\u5177",
        "\u4E07",
        "\u6BCF",
        "\u76EE",
        "\u81F3",
        "\u8FBE",
        "\u8D70",
        "\u79EF",
        "\u793A",
        "\u8BAE",
        "\u58F0",
        "\u62A5",
        "\u6597",
        "\u5B8C",
        "\u7C7B",
        "\u516B",
        "\u79BB",
        "\u534E",
        "\u540D",
        "\u786E",
        "\u624D",
        "\u79D1",
        "\u5F20",
        "\u4FE1",
        "\u9A6C",
        "\u8282",
        "\u8BDD",
        "\u7C73",
        "\u6574",
        "\u7A7A",
        "\u5143",
        "\u51B5",
        "\u4ECA",
        "\u96C6",
        "\u6E29",
        "\u4F20",
        "\u571F",
        "\u8BB8",
        "\u6B65",
        "\u7FA4",
        "\u5E7F",
        "\u77F3",
        "\u8BB0",
        "\u9700",
        "\u6BB5",
        "\u7814",
        "\u754C",
        "\u62C9",
        "\u6797",
        "\u5F8B",
        "\u53EB",
        "\u4E14",
        "\u7A76",
        "\u89C2",
        "\u8D8A",
        "\u7EC7",
        "\u88C5",
        "\u5F71",
        "\u7B97",
        "\u4F4E",
        "\u6301",
        "\u97F3",
        "\u4F17",
        "\u4E66",
        "\u5E03",
        "\u590D",
        "\u5BB9",
        "\u513F",
        "\u987B",
        "\u9645",
        "\u5546",
        "\u975E",
        "\u9A8C",
        "\u8FDE",
        "\u65AD",
        "\u6DF1",
        "\u96BE",
        "\u8FD1",
        "\u77FF",
        "\u5343",
        "\u5468",
        "\u59D4",
        "\u7D20",
        "\u6280",
        "\u5907",
        "\u534A",
        "\u529E",
        "\u9752",
        "\u7701",
        "\u5217",
        "\u4E60",
        "\u54CD",
        "\u7EA6",
        "\u652F",
        "\u822C",
        "\u53F2",
        "\u611F",
        "\u52B3",
        "\u4FBF",
        "\u56E2",
        "\u5F80",
        "\u9178",
        "\u5386",
        "\u5E02",
        "\u514B",
        "\u4F55",
        "\u9664",
        "\u6D88",
        "\u6784",
        "\u5E9C",
        "\u79F0",
        "\u592A",
        "\u51C6",
        "\u7CBE",
        "\u503C",
        "\u53F7",
        "\u7387",
        "\u65CF",
        "\u7EF4",
        "\u5212",
        "\u9009",
        "\u6807",
        "\u5199",
        "\u5B58",
        "\u5019",
        "\u6BDB",
        "\u4EB2",
        "\u5FEB",
        "\u6548",
        "\u65AF",
        "\u9662",
        "\u67E5",
        "\u6C5F",
        "\u578B",
        "\u773C",
        "\u738B",
        "\u6309",
        "\u683C",
        "\u517B",
        "\u6613",
        "\u7F6E",
        "\u6D3E",
        "\u5C42",
        "\u7247",
        "\u59CB",
        "\u5374",
        "\u4E13",
        "\u72B6",
        "\u80B2",
        "\u5382",
        "\u4EAC",
        "\u8BC6",
        "\u9002",
        "\u5C5E",
        "\u5706",
        "\u5305",
        "\u706B",
        "\u4F4F",
        "\u8C03",
        "\u6EE1",
        "\u53BF",
        "\u5C40",
        "\u7167",
        "\u53C2",
        "\u7EA2",
        "\u7EC6",
        "\u5F15",
        "\u542C",
        "\u8BE5",
        "\u94C1",
        "\u4EF7",
        "\u4E25",
        "\u9996",
        "\u5E95",
        "\u6DB2",
        "\u5B98",
        "\u5FB7",
        "\u968F",
        "\u75C5",
        "\u82CF",
        "\u5931",
        "\u5C14",
        "\u6B7B",
        "\u8BB2",
        "\u914D",
        "\u5973",
        "\u9EC4",
        "\u63A8",
        "\u663E",
        "\u8C08",
        "\u7F6A",
        "\u795E",
        "\u827A",
        "\u5462",
        "\u5E2D",
        "\u542B",
        "\u4F01",
        "\u671B",
        "\u5BC6",
        "\u6279",
        "\u8425",
        "\u9879",
        "\u9632",
        "\u4E3E",
        "\u7403",
        "\u82F1",
        "\u6C27",
        "\u52BF",
        "\u544A",
        "\u674E",
        "\u53F0",
        "\u843D",
        "\u6728",
        "\u5E2E",
        "\u8F6E",
        "\u7834",
        "\u4E9A",
        "\u5E08",
        "\u56F4",
        "\u6CE8",
        "\u8FDC",
        "\u5B57",
        "\u6750",
        "\u6392",
        "\u4F9B",
        "\u6CB3",
        "\u6001",
        "\u5C01",
        "\u53E6",
        "\u65BD",
        "\u51CF",
        "\u6811",
        "\u6EB6",
        "\u600E",
        "\u6B62",
        "\u6848",
        "\u8A00",
        "\u58EB",
        "\u5747",
        "\u6B66",
        "\u56FA",
        "\u53F6",
        "\u9C7C",
        "\u6CE2",
        "\u89C6",
        "\u4EC5",
        "\u8D39",
        "\u7D27",
        "\u7231",
        "\u5DE6",
        "\u7AE0",
        "\u65E9",
        "\u671D",
        "\u5BB3",
        "\u7EED",
        "\u8F7B",
        "\u670D",
        "\u8BD5",
        "\u98DF",
        "\u5145",
        "\u5175",
        "\u6E90",
        "\u5224",
        "\u62A4",
        "\u53F8",
        "\u8DB3",
        "\u67D0",
        "\u7EC3",
        "\u5DEE",
        "\u81F4",
        "\u677F",
        "\u7530",
        "\u964D",
        "\u9ED1",
        "\u72AF",
        "\u8D1F",
        "\u51FB",
        "\u8303",
        "\u7EE7",
        "\u5174",
        "\u4F3C",
        "\u4F59",
        "\u575A",
        "\u66F2",
        "\u8F93",
        "\u4FEE",
        "\u6545",
        "\u57CE",
        "\u592B",
        "\u591F",
        "\u9001",
        "\u7B14",
        "\u8239",
        "\u5360",
        "\u53F3",
        "\u8D22",
        "\u5403",
        "\u5BCC",
        "\u6625",
        "\u804C",
        "\u89C9",
        "\u6C49",
        "\u753B",
        "\u529F",
        "\u5DF4",
        "\u8DDF",
        "\u867D",
        "\u6742",
        "\u98DE",
        "\u68C0",
        "\u5438",
        "\u52A9",
        "\u5347",
        "\u9633",
        "\u4E92",
        "\u521D",
        "\u521B",
        "\u6297",
        "\u8003",
        "\u6295",
        "\u574F",
        "\u7B56",
        "\u53E4",
        "\u5F84",
        "\u6362",
        "\u672A",
        "\u8DD1",
        "\u7559",
        "\u94A2",
        "\u66FE",
        "\u7AEF",
        "\u8D23",
        "\u7AD9",
        "\u7B80",
        "\u8FF0",
        "\u94B1",
        "\u526F",
        "\u5C3D",
        "\u5E1D",
        "\u5C04",
        "\u8349",
        "\u51B2",
        "\u627F",
        "\u72EC",
        "\u4EE4",
        "\u9650",
        "\u963F",
        "\u5BA3",
        "\u73AF",
        "\u53CC",
        "\u8BF7",
        "\u8D85",
        "\u5FAE",
        "\u8BA9",
        "\u63A7",
        "\u5DDE",
        "\u826F",
        "\u8F74",
        "\u627E",
        "\u5426",
        "\u7EAA",
        "\u76CA",
        "\u4F9D",
        "\u4F18",
        "\u9876",
        "\u7840",
        "\u8F7D",
        "\u5012",
        "\u623F",
        "\u7A81",
        "\u5750",
        "\u7C89",
        "\u654C",
        "\u7565",
        "\u5BA2",
        "\u8881",
        "\u51B7",
        "\u80DC",
        "\u7EDD",
        "\u6790",
        "\u5757",
        "\u5242",
        "\u6D4B",
        "\u4E1D",
        "\u534F",
        "\u8BC9",
        "\u5FF5",
        "\u9648",
        "\u4ECD",
        "\u7F57",
        "\u76D0",
        "\u53CB",
        "\u6D0B",
        "\u9519",
        "\u82E6",
        "\u591C",
        "\u5211",
        "\u79FB",
        "\u9891",
        "\u9010",
        "\u9760",
        "\u6DF7",
        "\u6BCD",
        "\u77ED",
        "\u76AE",
        "\u7EC8",
        "\u805A",
        "\u6C7D",
        "\u6751",
        "\u4E91",
        "\u54EA",
        "\u65E2",
        "\u8DDD",
        "\u536B",
        "\u505C",
        "\u70C8",
        "\u592E",
        "\u5BDF",
        "\u70E7",
        "\u8FC5",
        "\u5883",
        "\u82E5",
        "\u5370",
        "\u6D32",
        "\u523B",
        "\u62EC",
        "\u6FC0",
        "\u5B54",
        "\u641E",
        "\u751A",
        "\u5BA4",
        "\u5F85",
        "\u6838",
        "\u6821",
        "\u6563",
        "\u4FB5",
        "\u5427",
        "\u7532",
        "\u6E38",
        "\u4E45",
        "\u83DC",
        "\u5473",
        "\u65E7",
        "\u6A21",
        "\u6E56",
        "\u8D27",
        "\u635F",
        "\u9884",
        "\u963B",
        "\u6BEB",
        "\u666E",
        "\u7A33",
        "\u4E59",
        "\u5988",
        "\u690D",
        "\u606F",
        "\u6269",
        "\u94F6",
        "\u8BED",
        "\u6325",
        "\u9152",
        "\u5B88",
        "\u62FF",
        "\u5E8F",
        "\u7EB8",
        "\u533B",
        "\u7F3A",
        "\u96E8",
        "\u5417",
        "\u9488",
        "\u5218",
        "\u554A",
        "\u6025",
        "\u5531",
        "\u8BEF",
        "\u8BAD",
        "\u613F",
        "\u5BA1",
        "\u9644",
        "\u83B7",
        "\u8336",
        "\u9C9C",
        "\u7CAE",
        "\u65A4",
        "\u5B69",
        "\u8131",
        "\u786B",
        "\u80A5",
        "\u5584",
        "\u9F99",
        "\u6F14",
        "\u7236",
        "\u6E10",
        "\u8840",
        "\u6B22",
        "\u68B0",
        "\u638C",
        "\u6B4C",
        "\u6C99",
        "\u521A",
        "\u653B",
        "\u8C13",
        "\u76FE",
        "\u8BA8",
        "\u665A",
        "\u7C92",
        "\u4E71",
        "\u71C3",
        "\u77DB",
        "\u4E4E",
        "\u6740",
        "\u836F",
        "\u5B81",
        "\u9C81",
        "\u8D35",
        "\u949F",
        "\u7164",
        "\u8BFB",
        "\u73ED",
        "\u4F2F",
        "\u9999",
        "\u4ECB",
        "\u8FEB",
        "\u53E5",
        "\u4E30",
        "\u57F9",
        "\u63E1",
        "\u5170",
        "\u62C5",
        "\u5F26",
        "\u86CB",
        "\u6C89",
        "\u5047",
        "\u7A7F",
        "\u6267",
        "\u7B54",
        "\u4E50",
        "\u8C01",
        "\u987A",
        "\u70DF",
        "\u7F29",
        "\u5F81",
        "\u8138",
        "\u559C",
        "\u677E",
        "\u811A",
        "\u56F0",
        "\u5F02",
        "\u514D",
        "\u80CC",
        "\u661F",
        "\u798F",
        "\u4E70",
        "\u67D3",
        "\u4E95",
        "\u6982",
        "\u6162",
        "\u6015",
        "\u78C1",
        "\u500D",
        "\u7956",
        "\u7687",
        "\u4FC3",
        "\u9759",
        "\u8865",
        "\u8BC4",
        "\u7FFB",
        "\u8089",
        "\u8DF5",
        "\u5C3C",
        "\u8863",
        "\u5BBD",
        "\u626C",
        "\u68C9",
        "\u5E0C",
        "\u4F24",
        "\u64CD",
        "\u5782",
        "\u79CB",
        "\u5B9C",
        "\u6C22",
        "\u5957",
        "\u7763",
        "\u632F",
        "\u67B6",
        "\u4EAE",
        "\u672B",
        "\u5BAA",
        "\u5E86",
        "\u7F16",
        "\u725B",
        "\u89E6",
        "\u6620",
        "\u96F7",
        "\u9500",
        "\u8BD7",
        "\u5EA7",
        "\u5C45",
        "\u6293",
        "\u88C2",
        "\u80DE",
        "\u547C",
        "\u5A18",
        "\u666F",
        "\u5A01",
        "\u7EFF",
        "\u6676",
        "\u539A",
        "\u76DF",
        "\u8861",
        "\u9E21",
        "\u5B59",
        "\u5EF6",
        "\u5371",
        "\u80F6",
        "\u5C4B",
        "\u4E61",
        "\u4E34",
        "\u9646",
        "\u987E",
        "\u6389",
        "\u5440",
        "\u706F",
        "\u5C81",
        "\u63AA",
        "\u675F",
        "\u8010",
        "\u5267",
        "\u7389",
        "\u8D75",
        "\u8DF3",
        "\u54E5",
        "\u5B63",
        "\u8BFE",
        "\u51EF",
        "\u80E1",
        "\u989D",
        "\u6B3E",
        "\u7ECD",
        "\u5377",
        "\u9F50",
        "\u4F1F",
        "\u84B8",
        "\u6B96",
        "\u6C38",
        "\u5B97",
        "\u82D7",
        "\u5DDD",
        "\u7089",
        "\u5CA9",
        "\u5F31",
        "\u96F6",
        "\u6768",
        "\u594F",
        "\u6CBF",
        "\u9732",
        "\u6746",
        "\u63A2",
        "\u6ED1",
        "\u9547",
        "\u996D",
        "\u6D53",
        "\u822A",
        "\u6000",
        "\u8D76",
        "\u5E93",
        "\u593A",
        "\u4F0A",
        "\u7075",
        "\u7A0E",
        "\u9014",
        "\u706D",
        "\u8D5B",
        "\u5F52",
        "\u53EC",
        "\u9F13",
        "\u64AD",
        "\u76D8",
        "\u88C1",
        "\u9669",
        "\u5EB7",
        "\u552F",
        "\u5F55",
        "\u83CC",
        "\u7EAF",
        "\u501F",
        "\u7CD6",
        "\u76D6",
        "\u6A2A",
        "\u7B26",
        "\u79C1",
        "\u52AA",
        "\u5802",
        "\u57DF",
        "\u67AA",
        "\u6DA6",
        "\u5E45",
        "\u54C8",
        "\u7ADF",
        "\u719F",
        "\u866B",
        "\u6CFD",
        "\u8111",
        "\u58E4",
        "\u78B3",
        "\u6B27",
        "\u904D",
        "\u4FA7",
        "\u5BE8",
        "\u6562",
        "\u5F7B",
        "\u8651",
        "\u659C",
        "\u8584",
        "\u5EAD",
        "\u7EB3",
        "\u5F39",
        "\u9972",
        "\u4F38",
        "\u6298",
        "\u9EA6",
        "\u6E7F",
        "\u6697",
        "\u8377",
        "\u74E6",
        "\u585E",
        "\u5E8A",
        "\u7B51",
        "\u6076",
        "\u6237",
        "\u8BBF",
        "\u5854",
        "\u5947",
        "\u900F",
        "\u6881",
        "\u5200",
        "\u65CB",
        "\u8FF9",
        "\u5361",
        "\u6C2F",
        "\u9047",
        "\u4EFD",
        "\u6BD2",
        "\u6CE5",
        "\u9000",
        "\u6D17",
        "\u6446",
        "\u7070",
        "\u5F69",
        "\u5356",
        "\u8017",
        "\u590F",
        "\u62E9",
        "\u5FD9",
        "\u94DC",
        "\u732E",
        "\u786C",
        "\u4E88",
        "\u7E41",
        "\u5708",
        "\u96EA",
        "\u51FD",
        "\u4EA6",
        "\u62BD",
        "\u7BC7",
        "\u9635",
        "\u9634",
        "\u4E01",
        "\u5C3A",
        "\u8FFD",
        "\u5806",
        "\u96C4",
        "\u8FCE",
        "\u6CDB",
        "\u7238",
        "\u697C",
        "\u907F",
        "\u8C0B",
        "\u5428",
        "\u91CE",
        "\u732A",
        "\u65D7",
        "\u7D2F",
        "\u504F",
        "\u5178",
        "\u9986",
        "\u7D22",
        "\u79E6",
        "\u8102",
        "\u6F6E",
        "\u7237",
        "\u8C46",
        "\u5FFD",
        "\u6258",
        "\u60CA",
        "\u5851",
        "\u9057",
        "\u6108",
        "\u6731",
        "\u66FF",
        "\u7EA4",
        "\u7C97",
        "\u503E",
        "\u5C1A",
        "\u75DB",
        "\u695A",
        "\u8C22",
        "\u594B",
        "\u8D2D",
        "\u78E8",
        "\u541B",
        "\u6C60",
        "\u65C1",
        "\u788E",
        "\u9AA8",
        "\u76D1",
        "\u6355",
        "\u5F1F",
        "\u66B4",
        "\u5272",
        "\u8D2F",
        "\u6B8A",
        "\u91CA",
        "\u8BCD",
        "\u4EA1",
        "\u58C1",
        "\u987F",
        "\u5B9D",
        "\u5348",
        "\u5C18",
        "\u95FB",
        "\u63ED",
        "\u70AE",
        "\u6B8B",
        "\u51AC",
        "\u6865",
        "\u5987",
        "\u8B66",
        "\u7EFC",
        "\u62DB",
        "\u5434",
        "\u4ED8",
        "\u6D6E",
        "\u906D",
        "\u5F90",
        "\u60A8",
        "\u6447",
        "\u8C37",
        "\u8D5E",
        "\u7BB1",
        "\u9694",
        "\u8BA2",
        "\u7537",
        "\u5439",
        "\u56ED",
        "\u7EB7",
        "\u5510",
        "\u8D25",
        "\u5B8B",
        "\u73BB",
        "\u5DE8",
        "\u8015",
        "\u5766",
        "\u8363",
        "\u95ED",
        "\u6E7E",
        "\u952E",
        "\u51E1",
        "\u9A7B",
        "\u9505",
        "\u6551",
        "\u6069",
        "\u5265",
        "\u51DD",
        "\u78B1",
        "\u9F7F",
        "\u622A",
        "\u70BC",
        "\u9EBB",
        "\u7EBA",
        "\u7981",
        "\u5E9F",
        "\u76DB",
        "\u7248",
        "\u7F13",
        "\u51C0",
        "\u775B",
        "\u660C",
        "\u5A5A",
        "\u6D89",
        "\u7B52",
        "\u5634",
        "\u63D2",
        "\u5CB8",
        "\u6717",
        "\u5E84",
        "\u8857",
        "\u85CF",
        "\u59D1",
        "\u8D38",
        "\u8150",
        "\u5974",
        "\u5566",
        "\u60EF",
        "\u4E58",
        "\u4F19",
        "\u6062",
        "\u5300",
        "\u7EB1",
        "\u624E",
        "\u8FA9",
        "\u8033",
        "\u5F6A",
        "\u81E3",
        "\u4EBF",
        "\u7483",
        "\u62B5",
        "\u8109",
        "\u79C0",
        "\u8428",
        "\u4FC4",
        "\u7F51",
        "\u821E",
        "\u5E97",
        "\u55B7",
        "\u7EB5",
        "\u5BF8",
        "\u6C57",
        "\u6302",
        "\u6D2A",
        "\u8D3A",
        "\u95EA",
        "\u67EC",
        "\u7206",
        "\u70EF",
        "\u6D25",
        "\u7A3B",
        "\u5899",
        "\u8F6F",
        "\u52C7",
        "\u50CF",
        "\u6EDA",
        "\u5398",
        "\u8499",
        "\u82B3",
        "\u80AF",
        "\u5761",
        "\u67F1",
        "\u8361",
        "\u817F",
        "\u4EEA",
        "\u65C5",
        "\u5C3E",
        "\u8F67",
        "\u51B0",
        "\u8D21",
        "\u767B",
        "\u9ECE",
        "\u524A",
        "\u94BB",
        "\u52D2",
        "\u9003",
        "\u969C",
        "\u6C28",
        "\u90ED",
        "\u5CF0",
        "\u5E01",
        "\u6E2F",
        "\u4F0F",
        "\u8F68",
        "\u4EA9",
        "\u6BD5",
        "\u64E6",
        "\u83AB",
        "\u523A",
        "\u6D6A",
        "\u79D8",
        "\u63F4",
        "\u682A",
        "\u5065",
        "\u552E",
        "\u80A1",
        "\u5C9B",
        "\u7518",
        "\u6CE1",
        "\u7761",
        "\u7AE5",
        "\u94F8",
        "\u6C64",
        "\u9600",
        "\u4F11",
        "\u6C47",
        "\u820D",
        "\u7267",
        "\u7ED5",
        "\u70B8",
        "\u54F2",
        "\u78F7",
        "\u7EE9",
        "\u670B",
        "\u6DE1",
        "\u5C16",
        "\u542F",
        "\u9677",
        "\u67F4",
        "\u5448",
        "\u5F92",
        "\u989C",
        "\u6CEA",
        "\u7A0D",
        "\u5FD8",
        "\u6CF5",
        "\u84DD",
        "\u62D6",
        "\u6D1E",
        "\u6388",
        "\u955C",
        "\u8F9B",
        "\u58EE",
        "\u950B",
        "\u8D2B",
        "\u865A",
        "\u5F2F",
        "\u6469",
        "\u6CF0",
        "\u5E7C",
        "\u5EF7",
        "\u5C0A",
        "\u7A97",
        "\u7EB2",
        "\u5F04",
        "\u96B6",
        "\u7591",
        "\u6C0F",
        "\u5BAB",
        "\u59D0",
        "\u9707",
        "\u745E",
        "\u602A",
        "\u5C24",
        "\u7434",
        "\u5FAA",
        "\u63CF",
        "\u819C",
        "\u8FDD",
        "\u5939",
        "\u8170",
        "\u7F18",
        "\u73E0",
        "\u7A77",
        "\u68EE",
        "\u679D",
        "\u7AF9",
        "\u6C9F",
        "\u50AC",
        "\u7EF3",
        "\u5FC6",
        "\u90A6",
        "\u5269",
        "\u5E78",
        "\u6D46",
        "\u680F",
        "\u62E5",
        "\u7259",
        "\u8D2E",
        "\u793C",
        "\u6EE4",
        "\u94A0",
        "\u7EB9",
        "\u7F62",
        "\u62CD",
        "\u54B1",
        "\u558A",
        "\u8896",
        "\u57C3",
        "\u52E4",
        "\u7F5A",
        "\u7126",
        "\u6F5C",
        "\u4F0D",
        "\u58A8",
        "\u6B32",
        "\u7F1D",
        "\u59D3",
        "\u520A",
        "\u9971",
        "\u4EFF",
        "\u5956",
        "\u94DD",
        "\u9B3C",
        "\u4E3D",
        "\u8DE8",
        "\u9ED8",
        "\u6316",
        "\u94FE",
        "\u626B",
        "\u559D",
        "\u888B",
        "\u70AD",
        "\u6C61",
        "\u5E55",
        "\u8BF8",
        "\u5F27",
        "\u52B1",
        "\u6885",
        "\u5976",
        "\u6D01",
        "\u707E",
        "\u821F",
        "\u9274",
        "\u82EF",
        "\u8BBC",
        "\u62B1",
        "\u6BC1",
        "\u61C2",
        "\u5BD2",
        "\u667A",
        "\u57D4",
        "\u5BC4",
        "\u5C4A",
        "\u8DC3",
        "\u6E21",
        "\u6311",
        "\u4E39",
        "\u8270",
        "\u8D1D",
        "\u78B0",
        "\u62D4",
        "\u7239",
        "\u6234",
        "\u7801",
        "\u68A6",
        "\u82BD",
        "\u7194",
        "\u8D64",
        "\u6E14",
        "\u54ED",
        "\u656C",
        "\u9897",
        "\u5954",
        "\u94C5",
        "\u4EF2",
        "\u864E",
        "\u7A00",
        "\u59B9",
        "\u4E4F",
        "\u73CD",
        "\u7533",
        "\u684C",
        "\u9075",
        "\u5141",
        "\u9686",
        "\u87BA",
        "\u4ED3",
        "\u9B4F",
        "\u9510",
        "\u6653",
        "\u6C2E",
        "\u517C",
        "\u9690",
        "\u788D",
        "\u8D6B",
        "\u62E8",
        "\u5FE0",
        "\u8083",
        "\u7F38",
        "\u7275",
        "\u62A2",
        "\u535A",
        "\u5DE7",
        "\u58F3",
        "\u5144",
        "\u675C",
        "\u8BAF",
        "\u8BDA",
        "\u78A7",
        "\u7965",
        "\u67EF",
        "\u9875",
        "\u5DE1",
        "\u77E9",
        "\u60B2",
        "\u704C",
        "\u9F84",
        "\u4F26",
        "\u7968",
        "\u5BFB",
        "\u6842",
        "\u94FA",
        "\u5723",
        "\u6050",
        "\u6070",
        "\u90D1",
        "\u8DA3",
        "\u62AC",
        "\u8352",
        "\u817E",
        "\u8D34",
        "\u67D4",
        "\u6EF4",
        "\u731B",
        "\u9614",
        "\u8F86",
        "\u59BB",
        "\u586B",
        "\u64A4",
        "\u50A8",
        "\u7B7E",
        "\u95F9",
        "\u6270",
        "\u7D2B",
        "\u7802",
        "\u9012",
        "\u620F",
        "\u540A",
        "\u9676",
        "\u4F10",
        "\u5582",
        "\u7597",
        "\u74F6",
        "\u5A46",
        "\u629A",
        "\u81C2",
        "\u6478",
        "\u5FCD",
        "\u867E",
        "\u8721",
        "\u90BB",
        "\u80F8",
        "\u5DE9",
        "\u6324",
        "\u5076",
        "\u5F03",
        "\u69FD",
        "\u52B2",
        "\u4E73",
        "\u9093",
        "\u5409",
        "\u4EC1",
        "\u70C2",
        "\u7816",
        "\u79DF",
        "\u4E4C",
        "\u8230",
        "\u4F34",
        "\u74DC",
        "\u6D45",
        "\u4E19",
        "\u6682",
        "\u71E5",
        "\u6A61",
        "\u67F3",
        "\u8FF7",
        "\u6696",
        "\u724C",
        "\u79E7",
        "\u80C6",
        "\u8BE6",
        "\u7C27",
        "\u8E0F",
        "\u74F7",
        "\u8C31",
        "\u5446",
        "\u5BBE",
        "\u7CCA",
        "\u6D1B",
        "\u8F89",
        "\u6124",
        "\u7ADE",
        "\u9699",
        "\u6012",
        "\u7C98",
        "\u4E43",
        "\u7EEA",
        "\u80A9",
        "\u7C4D",
        "\u654F",
        "\u6D82",
        "\u7199",
        "\u7686",
        "\u4FA6",
        "\u60AC",
        "\u6398",
        "\u4EAB",
        "\u7EA0",
        "\u9192",
        "\u72C2",
        "\u9501",
        "\u6DC0",
        "\u6068",
        "\u7272",
        "\u9738",
        "\u722C",
        "\u8D4F",
        "\u9006",
        "\u73A9",
        "\u9675",
        "\u795D",
        "\u79D2",
        "\u6D59",
        "\u8C8C",
        "\u5F79",
        "\u5F7C",
        "\u6089",
        "\u9E2D",
        "\u8D8B",
        "\u51E4",
        "\u6668",
        "\u755C",
        "\u8F88",
        "\u79E9",
        "\u5375",
        "\u7F72",
        "\u68AF",
        "\u708E",
        "\u6EE9",
        "\u68CB",
        "\u9A71",
        "\u7B5B",
        "\u5CE1",
        "\u5192",
        "\u5565",
        "\u5BFF",
        "\u8BD1",
        "\u6D78",
        "\u6CC9",
        "\u5E3D",
        "\u8FDF",
        "\u7845",
        "\u7586",
        "\u8D37",
        "\u6F0F",
        "\u7A3F",
        "\u51A0",
        "\u5AE9",
        "\u80C1",
        "\u82AF",
        "\u7262",
        "\u53DB",
        "\u8680",
        "\u5965",
        "\u9E23",
        "\u5CAD",
        "\u7F8A",
        "\u51ED",
        "\u4E32",
        "\u5858",
        "\u7ED8",
        "\u9175",
        "\u878D",
        "\u76C6",
        "\u9521",
        "\u5E99",
        "\u7B79",
        "\u51BB",
        "\u8F85",
        "\u6444",
        "\u88AD",
        "\u7B4B",
        "\u62D2",
        "\u50DA",
        "\u65F1",
        "\u94BE",
        "\u9E1F",
        "\u6F06",
        "\u6C88",
        "\u7709",
        "\u758F",
        "\u6DFB",
        "\u68D2",
        "\u7A57",
        "\u785D",
        "\u97E9",
        "\u903C",
        "\u626D",
        "\u4FA8",
        "\u51C9",
        "\u633A",
        "\u7897",
        "\u683D",
        "\u7092",
        "\u676F",
        "\u60A3",
        "\u998F",
        "\u529D",
        "\u8C6A",
        "\u8FBD",
        "\u52C3",
        "\u9E3F",
        "\u65E6",
        "\u540F",
        "\u62DC",
        "\u72D7",
        "\u57CB",
        "\u8F8A",
        "\u63A9",
        "\u996E",
        "\u642C",
        "\u9A82",
        "\u8F9E",
        "\u52FE",
        "\u6263",
        "\u4F30",
        "\u848B",
        "\u7ED2",
        "\u96FE",
        "\u4E08",
        "\u6735",
        "\u59C6",
        "\u62DF",
        "\u5B87",
        "\u8F91",
        "\u9655",
        "\u96D5",
        "\u507F",
        "\u84C4",
        "\u5D07",
        "\u526A",
        "\u5021",
        "\u5385",
        "\u54AC",
        "\u9A76",
        "\u85AF",
        "\u5237",
        "\u65A5",
        "\u756A",
        "\u8D4B",
        "\u5949",
        "\u4F5B",
        "\u6D47",
        "\u6F2B",
        "\u66FC",
        "\u6247",
        "\u9499",
        "\u6843",
        "\u6276",
        "\u4ED4",
        "\u8FD4",
        "\u4FD7",
        "\u4E8F",
        "\u8154",
        "\u978B",
        "\u68F1",
        "\u8986",
        "\u6846",
        "\u6084",
        "\u53D4",
        "\u649E",
        "\u9A97",
        "\u52D8",
        "\u65FA",
        "\u6CB8",
        "\u5B64",
        "\u5410",
        "\u5B5F",
        "\u6E20",
        "\u5C48",
        "\u75BE",
        "\u5999",
        "\u60DC",
        "\u4EF0",
        "\u72E0",
        "\u80C0",
        "\u8C10",
        "\u629B",
        "\u9709",
        "\u6851",
        "\u5C97",
        "\u561B",
        "\u8870",
        "\u76D7",
        "\u6E17",
        "\u810F",
        "\u8D56",
        "\u6D8C",
        "\u751C",
        "\u66F9",
        "\u9605",
        "\u808C",
        "\u54E9",
        "\u5389",
        "\u70C3",
        "\u7EAC",
        "\u6BC5",
        "\u6628",
        "\u4F2A",
        "\u75C7",
        "\u716E",
        "\u53F9",
        "\u9489",
        "\u642D",
        "\u830E",
        "\u7B3C",
        "\u9177",
        "\u5077",
        "\u5F13",
        "\u9525",
        "\u6052",
        "\u6770",
        "\u5751",
        "\u9F3B",
        "\u7FFC",
        "\u7EB6",
        "\u53D9",
        "\u72F1",
        "\u902E",
        "\u7F50",
        "\u7EDC",
        "\u68DA",
        "\u6291",
        "\u81A8",
        "\u852C",
        "\u5BFA",
        "\u9AA4",
        "\u7A46",
        "\u51B6",
        "\u67AF",
        "\u518C",
        "\u5C38",
        "\u51F8",
        "\u7EC5",
        "\u576F",
        "\u727A",
        "\u7130",
        "\u8F70",
        "\u6B23",
        "\u664B",
        "\u7626",
        "\u5FA1",
        "\u952D",
        "\u9526",
        "\u4E27",
        "\u65EC",
        "\u953B",
        "\u5784",
        "\u641C",
        "\u6251",
        "\u9080",
        "\u4EAD",
        "\u916F",
        "\u8FC8",
        "\u8212",
        "\u8106",
        "\u9176",
        "\u95F2",
        "\u5FE7",
        "\u915A",
        "\u987D",
        "\u7FBD",
        "\u6DA8",
        "\u5378",
        "\u4ED7",
        "\u966A",
        "\u8F9F",
        "\u60E9",
        "\u676D",
        "\u59DA",
        "\u809A",
        "\u6349",
        "\u98D8",
        "\u6F02",
        "\u6606",
        "\u6B3A",
        "\u543E",
        "\u90CE",
        "\u70F7",
        "\u6C41",
        "\u5475",
        "\u9970",
        "\u8427",
        "\u96C5",
        "\u90AE",
        "\u8FC1",
        "\u71D5",
        "\u6492",
        "\u59FB",
        "\u8D74",
        "\u5BB4",
        "\u70E6",
        "\u503A",
        "\u5E10",
        "\u6591",
        "\u94C3",
        "\u65E8",
        "\u9187",
        "\u8463",
        "\u997C",
        "\u96CF",
        "\u59FF",
        "\u62CC",
        "\u5085",
        "\u8179",
        "\u59A5",
        "\u63C9",
        "\u8D24",
        "\u62C6",
        "\u6B6A",
        "\u8461",
        "\u80FA",
        "\u4E22",
        "\u6D69",
        "\u5FBD",
        "\u6602",
        "\u57AB",
        "\u6321",
        "\u89C8",
        "\u8D2A",
        "\u6170",
        "\u7F34",
        "\u6C6A",
        "\u614C",
        "\u51AF",
        "\u8BFA",
        "\u59DC",
        "\u8C0A",
        "\u51F6",
        "\u52A3",
        "\u8BEC",
        "\u8000",
        "\u660F",
        "\u8EBA",
        "\u76C8",
        "\u9A91",
        "\u4E54",
        "\u6EAA",
        "\u4E1B",
        "\u5362",
        "\u62B9",
        "\u95F7",
        "\u54A8",
        "\u522E",
        "\u9A7E",
        "\u7F06",
        "\u609F",
        "\u6458",
        "\u94D2",
        "\u63B7",
        "\u9887",
        "\u5E7B",
        "\u67C4",
        "\u60E0",
        "\u60E8",
        "\u4F73",
        "\u4EC7",
        "\u814A",
        "\u7A9D",
        "\u6DA4",
        "\u5251",
        "\u77A7",
        "\u5821",
        "\u6CFC",
        "\u8471",
        "\u7F69",
        "\u970D",
        "\u635E",
        "\u80CE",
        "\u82CD",
        "\u6EE8",
        "\u4FE9",
        "\u6345",
        "\u6E58",
        "\u780D",
        "\u971E",
        "\u90B5",
        "\u8404",
        "\u75AF",
        "\u6DEE",
        "\u9042",
        "\u718A",
        "\u7CAA",
        "\u70D8",
        "\u5BBF",
        "\u6863",
        "\u6208",
        "\u9A73",
        "\u5AC2",
        "\u88D5",
        "\u5F99",
        "\u7BAD",
        "\u6350",
        "\u80A0",
        "\u6491",
        "\u6652",
        "\u8FA8",
        "\u6BBF",
        "\u83B2",
        "\u644A",
        "\u6405",
        "\u9171",
        "\u5C4F",
        "\u75AB",
        "\u54C0",
        "\u8521",
        "\u5835",
        "\u6CAB",
        "\u76B1",
        "\u7545",
        "\u53E0",
        "\u9601",
        "\u83B1",
        "\u6572",
        "\u8F96",
        "\u94A9",
        "\u75D5",
        "\u575D",
        "\u5DF7",
        "\u997F",
        "\u7978",
        "\u4E18",
        "\u7384",
        "\u6E9C",
        "\u66F0",
        "\u903B",
        "\u5F6D",
        "\u5C1D",
        "\u537F",
        "\u59A8",
        "\u8247",
        "\u541E",
        "\u97E6",
        "\u6028",
        "\u77EE",
        "\u6B47"
      ];
    }
  });

  // ../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/chinese_traditional.json
  var require_chinese_traditional = __commonJS({
    "../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/chinese_traditional.json"(exports, module) {
      module.exports = [
        "\u7684",
        "\u4E00",
        "\u662F",
        "\u5728",
        "\u4E0D",
        "\u4E86",
        "\u6709",
        "\u548C",
        "\u4EBA",
        "\u9019",
        "\u4E2D",
        "\u5927",
        "\u70BA",
        "\u4E0A",
        "\u500B",
        "\u570B",
        "\u6211",
        "\u4EE5",
        "\u8981",
        "\u4ED6",
        "\u6642",
        "\u4F86",
        "\u7528",
        "\u5011",
        "\u751F",
        "\u5230",
        "\u4F5C",
        "\u5730",
        "\u65BC",
        "\u51FA",
        "\u5C31",
        "\u5206",
        "\u5C0D",
        "\u6210",
        "\u6703",
        "\u53EF",
        "\u4E3B",
        "\u767C",
        "\u5E74",
        "\u52D5",
        "\u540C",
        "\u5DE5",
        "\u4E5F",
        "\u80FD",
        "\u4E0B",
        "\u904E",
        "\u5B50",
        "\u8AAA",
        "\u7522",
        "\u7A2E",
        "\u9762",
        "\u800C",
        "\u65B9",
        "\u5F8C",
        "\u591A",
        "\u5B9A",
        "\u884C",
        "\u5B78",
        "\u6CD5",
        "\u6240",
        "\u6C11",
        "\u5F97",
        "\u7D93",
        "\u5341",
        "\u4E09",
        "\u4E4B",
        "\u9032",
        "\u8457",
        "\u7B49",
        "\u90E8",
        "\u5EA6",
        "\u5BB6",
        "\u96FB",
        "\u529B",
        "\u88E1",
        "\u5982",
        "\u6C34",
        "\u5316",
        "\u9AD8",
        "\u81EA",
        "\u4E8C",
        "\u7406",
        "\u8D77",
        "\u5C0F",
        "\u7269",
        "\u73FE",
        "\u5BE6",
        "\u52A0",
        "\u91CF",
        "\u90FD",
        "\u5169",
        "\u9AD4",
        "\u5236",
        "\u6A5F",
        "\u7576",
        "\u4F7F",
        "\u9EDE",
        "\u5F9E",
        "\u696D",
        "\u672C",
        "\u53BB",
        "\u628A",
        "\u6027",
        "\u597D",
        "\u61C9",
        "\u958B",
        "\u5B83",
        "\u5408",
        "\u9084",
        "\u56E0",
        "\u7531",
        "\u5176",
        "\u4E9B",
        "\u7136",
        "\u524D",
        "\u5916",
        "\u5929",
        "\u653F",
        "\u56DB",
        "\u65E5",
        "\u90A3",
        "\u793E",
        "\u7FA9",
        "\u4E8B",
        "\u5E73",
        "\u5F62",
        "\u76F8",
        "\u5168",
        "\u8868",
        "\u9593",
        "\u6A23",
        "\u8207",
        "\u95DC",
        "\u5404",
        "\u91CD",
        "\u65B0",
        "\u7DDA",
        "\u5167",
        "\u6578",
        "\u6B63",
        "\u5FC3",
        "\u53CD",
        "\u4F60",
        "\u660E",
        "\u770B",
        "\u539F",
        "\u53C8",
        "\u9EBC",
        "\u5229",
        "\u6BD4",
        "\u6216",
        "\u4F46",
        "\u8CEA",
        "\u6C23",
        "\u7B2C",
        "\u5411",
        "\u9053",
        "\u547D",
        "\u6B64",
        "\u8B8A",
        "\u689D",
        "\u53EA",
        "\u6C92",
        "\u7D50",
        "\u89E3",
        "\u554F",
        "\u610F",
        "\u5EFA",
        "\u6708",
        "\u516C",
        "\u7121",
        "\u7CFB",
        "\u8ECD",
        "\u5F88",
        "\u60C5",
        "\u8005",
        "\u6700",
        "\u7ACB",
        "\u4EE3",
        "\u60F3",
        "\u5DF2",
        "\u901A",
        "\u4E26",
        "\u63D0",
        "\u76F4",
        "\u984C",
        "\u9EE8",
        "\u7A0B",
        "\u5C55",
        "\u4E94",
        "\u679C",
        "\u6599",
        "\u8C61",
        "\u54E1",
        "\u9769",
        "\u4F4D",
        "\u5165",
        "\u5E38",
        "\u6587",
        "\u7E3D",
        "\u6B21",
        "\u54C1",
        "\u5F0F",
        "\u6D3B",
        "\u8A2D",
        "\u53CA",
        "\u7BA1",
        "\u7279",
        "\u4EF6",
        "\u9577",
        "\u6C42",
        "\u8001",
        "\u982D",
        "\u57FA",
        "\u8CC7",
        "\u908A",
        "\u6D41",
        "\u8DEF",
        "\u7D1A",
        "\u5C11",
        "\u5716",
        "\u5C71",
        "\u7D71",
        "\u63A5",
        "\u77E5",
        "\u8F03",
        "\u5C07",
        "\u7D44",
        "\u898B",
        "\u8A08",
        "\u5225",
        "\u5979",
        "\u624B",
        "\u89D2",
        "\u671F",
        "\u6839",
        "\u8AD6",
        "\u904B",
        "\u8FB2",
        "\u6307",
        "\u5E7E",
        "\u4E5D",
        "\u5340",
        "\u5F37",
        "\u653E",
        "\u6C7A",
        "\u897F",
        "\u88AB",
        "\u5E79",
        "\u505A",
        "\u5FC5",
        "\u6230",
        "\u5148",
        "\u56DE",
        "\u5247",
        "\u4EFB",
        "\u53D6",
        "\u64DA",
        "\u8655",
        "\u968A",
        "\u5357",
        "\u7D66",
        "\u8272",
        "\u5149",
        "\u9580",
        "\u5373",
        "\u4FDD",
        "\u6CBB",
        "\u5317",
        "\u9020",
        "\u767E",
        "\u898F",
        "\u71B1",
        "\u9818",
        "\u4E03",
        "\u6D77",
        "\u53E3",
        "\u6771",
        "\u5C0E",
        "\u5668",
        "\u58D3",
        "\u5FD7",
        "\u4E16",
        "\u91D1",
        "\u589E",
        "\u722D",
        "\u6FDF",
        "\u968E",
        "\u6CB9",
        "\u601D",
        "\u8853",
        "\u6975",
        "\u4EA4",
        "\u53D7",
        "\u806F",
        "\u4EC0",
        "\u8A8D",
        "\u516D",
        "\u5171",
        "\u6B0A",
        "\u6536",
        "\u8B49",
        "\u6539",
        "\u6E05",
        "\u7F8E",
        "\u518D",
        "\u63A1",
        "\u8F49",
        "\u66F4",
        "\u55AE",
        "\u98A8",
        "\u5207",
        "\u6253",
        "\u767D",
        "\u6559",
        "\u901F",
        "\u82B1",
        "\u5E36",
        "\u5B89",
        "\u5834",
        "\u8EAB",
        "\u8ECA",
        "\u4F8B",
        "\u771F",
        "\u52D9",
        "\u5177",
        "\u842C",
        "\u6BCF",
        "\u76EE",
        "\u81F3",
        "\u9054",
        "\u8D70",
        "\u7A4D",
        "\u793A",
        "\u8B70",
        "\u8072",
        "\u5831",
        "\u9B25",
        "\u5B8C",
        "\u985E",
        "\u516B",
        "\u96E2",
        "\u83EF",
        "\u540D",
        "\u78BA",
        "\u624D",
        "\u79D1",
        "\u5F35",
        "\u4FE1",
        "\u99AC",
        "\u7BC0",
        "\u8A71",
        "\u7C73",
        "\u6574",
        "\u7A7A",
        "\u5143",
        "\u6CC1",
        "\u4ECA",
        "\u96C6",
        "\u6EAB",
        "\u50B3",
        "\u571F",
        "\u8A31",
        "\u6B65",
        "\u7FA4",
        "\u5EE3",
        "\u77F3",
        "\u8A18",
        "\u9700",
        "\u6BB5",
        "\u7814",
        "\u754C",
        "\u62C9",
        "\u6797",
        "\u5F8B",
        "\u53EB",
        "\u4E14",
        "\u7A76",
        "\u89C0",
        "\u8D8A",
        "\u7E54",
        "\u88DD",
        "\u5F71",
        "\u7B97",
        "\u4F4E",
        "\u6301",
        "\u97F3",
        "\u773E",
        "\u66F8",
        "\u5E03",
        "\u590D",
        "\u5BB9",
        "\u5152",
        "\u9808",
        "\u969B",
        "\u5546",
        "\u975E",
        "\u9A57",
        "\u9023",
        "\u65B7",
        "\u6DF1",
        "\u96E3",
        "\u8FD1",
        "\u7926",
        "\u5343",
        "\u9031",
        "\u59D4",
        "\u7D20",
        "\u6280",
        "\u5099",
        "\u534A",
        "\u8FA6",
        "\u9752",
        "\u7701",
        "\u5217",
        "\u7FD2",
        "\u97FF",
        "\u7D04",
        "\u652F",
        "\u822C",
        "\u53F2",
        "\u611F",
        "\u52DE",
        "\u4FBF",
        "\u5718",
        "\u5F80",
        "\u9178",
        "\u6B77",
        "\u5E02",
        "\u514B",
        "\u4F55",
        "\u9664",
        "\u6D88",
        "\u69CB",
        "\u5E9C",
        "\u7A31",
        "\u592A",
        "\u6E96",
        "\u7CBE",
        "\u503C",
        "\u865F",
        "\u7387",
        "\u65CF",
        "\u7DAD",
        "\u5283",
        "\u9078",
        "\u6A19",
        "\u5BEB",
        "\u5B58",
        "\u5019",
        "\u6BDB",
        "\u89AA",
        "\u5FEB",
        "\u6548",
        "\u65AF",
        "\u9662",
        "\u67E5",
        "\u6C5F",
        "\u578B",
        "\u773C",
        "\u738B",
        "\u6309",
        "\u683C",
        "\u990A",
        "\u6613",
        "\u7F6E",
        "\u6D3E",
        "\u5C64",
        "\u7247",
        "\u59CB",
        "\u537B",
        "\u5C08",
        "\u72C0",
        "\u80B2",
        "\u5EE0",
        "\u4EAC",
        "\u8B58",
        "\u9069",
        "\u5C6C",
        "\u5713",
        "\u5305",
        "\u706B",
        "\u4F4F",
        "\u8ABF",
        "\u6EFF",
        "\u7E23",
        "\u5C40",
        "\u7167",
        "\u53C3",
        "\u7D05",
        "\u7D30",
        "\u5F15",
        "\u807D",
        "\u8A72",
        "\u9435",
        "\u50F9",
        "\u56B4",
        "\u9996",
        "\u5E95",
        "\u6DB2",
        "\u5B98",
        "\u5FB7",
        "\u96A8",
        "\u75C5",
        "\u8607",
        "\u5931",
        "\u723E",
        "\u6B7B",
        "\u8B1B",
        "\u914D",
        "\u5973",
        "\u9EC3",
        "\u63A8",
        "\u986F",
        "\u8AC7",
        "\u7F6A",
        "\u795E",
        "\u85DD",
        "\u5462",
        "\u5E2D",
        "\u542B",
        "\u4F01",
        "\u671B",
        "\u5BC6",
        "\u6279",
        "\u71DF",
        "\u9805",
        "\u9632",
        "\u8209",
        "\u7403",
        "\u82F1",
        "\u6C27",
        "\u52E2",
        "\u544A",
        "\u674E",
        "\u53F0",
        "\u843D",
        "\u6728",
        "\u5E6B",
        "\u8F2A",
        "\u7834",
        "\u4E9E",
        "\u5E2B",
        "\u570D",
        "\u6CE8",
        "\u9060",
        "\u5B57",
        "\u6750",
        "\u6392",
        "\u4F9B",
        "\u6CB3",
        "\u614B",
        "\u5C01",
        "\u53E6",
        "\u65BD",
        "\u6E1B",
        "\u6A39",
        "\u6EB6",
        "\u600E",
        "\u6B62",
        "\u6848",
        "\u8A00",
        "\u58EB",
        "\u5747",
        "\u6B66",
        "\u56FA",
        "\u8449",
        "\u9B5A",
        "\u6CE2",
        "\u8996",
        "\u50C5",
        "\u8CBB",
        "\u7DCA",
        "\u611B",
        "\u5DE6",
        "\u7AE0",
        "\u65E9",
        "\u671D",
        "\u5BB3",
        "\u7E8C",
        "\u8F15",
        "\u670D",
        "\u8A66",
        "\u98DF",
        "\u5145",
        "\u5175",
        "\u6E90",
        "\u5224",
        "\u8B77",
        "\u53F8",
        "\u8DB3",
        "\u67D0",
        "\u7DF4",
        "\u5DEE",
        "\u81F4",
        "\u677F",
        "\u7530",
        "\u964D",
        "\u9ED1",
        "\u72AF",
        "\u8CA0",
        "\u64CA",
        "\u8303",
        "\u7E7C",
        "\u8208",
        "\u4F3C",
        "\u9918",
        "\u5805",
        "\u66F2",
        "\u8F38",
        "\u4FEE",
        "\u6545",
        "\u57CE",
        "\u592B",
        "\u5920",
        "\u9001",
        "\u7B46",
        "\u8239",
        "\u4F54",
        "\u53F3",
        "\u8CA1",
        "\u5403",
        "\u5BCC",
        "\u6625",
        "\u8077",
        "\u89BA",
        "\u6F22",
        "\u756B",
        "\u529F",
        "\u5DF4",
        "\u8DDF",
        "\u96D6",
        "\u96DC",
        "\u98DB",
        "\u6AA2",
        "\u5438",
        "\u52A9",
        "\u6607",
        "\u967D",
        "\u4E92",
        "\u521D",
        "\u5275",
        "\u6297",
        "\u8003",
        "\u6295",
        "\u58DE",
        "\u7B56",
        "\u53E4",
        "\u5F91",
        "\u63DB",
        "\u672A",
        "\u8DD1",
        "\u7559",
        "\u92FC",
        "\u66FE",
        "\u7AEF",
        "\u8CAC",
        "\u7AD9",
        "\u7C21",
        "\u8FF0",
        "\u9322",
        "\u526F",
        "\u76E1",
        "\u5E1D",
        "\u5C04",
        "\u8349",
        "\u885D",
        "\u627F",
        "\u7368",
        "\u4EE4",
        "\u9650",
        "\u963F",
        "\u5BA3",
        "\u74B0",
        "\u96D9",
        "\u8ACB",
        "\u8D85",
        "\u5FAE",
        "\u8B93",
        "\u63A7",
        "\u5DDE",
        "\u826F",
        "\u8EF8",
        "\u627E",
        "\u5426",
        "\u7D00",
        "\u76CA",
        "\u4F9D",
        "\u512A",
        "\u9802",
        "\u790E",
        "\u8F09",
        "\u5012",
        "\u623F",
        "\u7A81",
        "\u5750",
        "\u7C89",
        "\u6575",
        "\u7565",
        "\u5BA2",
        "\u8881",
        "\u51B7",
        "\u52DD",
        "\u7D55",
        "\u6790",
        "\u584A",
        "\u5291",
        "\u6E2C",
        "\u7D72",
        "\u5354",
        "\u8A34",
        "\u5FF5",
        "\u9673",
        "\u4ECD",
        "\u7F85",
        "\u9E7D",
        "\u53CB",
        "\u6D0B",
        "\u932F",
        "\u82E6",
        "\u591C",
        "\u5211",
        "\u79FB",
        "\u983B",
        "\u9010",
        "\u9760",
        "\u6DF7",
        "\u6BCD",
        "\u77ED",
        "\u76AE",
        "\u7D42",
        "\u805A",
        "\u6C7D",
        "\u6751",
        "\u96F2",
        "\u54EA",
        "\u65E2",
        "\u8DDD",
        "\u885B",
        "\u505C",
        "\u70C8",
        "\u592E",
        "\u5BDF",
        "\u71D2",
        "\u8FC5",
        "\u5883",
        "\u82E5",
        "\u5370",
        "\u6D32",
        "\u523B",
        "\u62EC",
        "\u6FC0",
        "\u5B54",
        "\u641E",
        "\u751A",
        "\u5BA4",
        "\u5F85",
        "\u6838",
        "\u6821",
        "\u6563",
        "\u4FB5",
        "\u5427",
        "\u7532",
        "\u904A",
        "\u4E45",
        "\u83DC",
        "\u5473",
        "\u820A",
        "\u6A21",
        "\u6E56",
        "\u8CA8",
        "\u640D",
        "\u9810",
        "\u963B",
        "\u6BEB",
        "\u666E",
        "\u7A69",
        "\u4E59",
        "\u5ABD",
        "\u690D",
        "\u606F",
        "\u64F4",
        "\u9280",
        "\u8A9E",
        "\u63EE",
        "\u9152",
        "\u5B88",
        "\u62FF",
        "\u5E8F",
        "\u7D19",
        "\u91AB",
        "\u7F3A",
        "\u96E8",
        "\u55CE",
        "\u91DD",
        "\u5289",
        "\u554A",
        "\u6025",
        "\u5531",
        "\u8AA4",
        "\u8A13",
        "\u9858",
        "\u5BE9",
        "\u9644",
        "\u7372",
        "\u8336",
        "\u9BAE",
        "\u7CE7",
        "\u65A4",
        "\u5B69",
        "\u812B",
        "\u786B",
        "\u80A5",
        "\u5584",
        "\u9F8D",
        "\u6F14",
        "\u7236",
        "\u6F38",
        "\u8840",
        "\u6B61",
        "\u68B0",
        "\u638C",
        "\u6B4C",
        "\u6C99",
        "\u525B",
        "\u653B",
        "\u8B02",
        "\u76FE",
        "\u8A0E",
        "\u665A",
        "\u7C92",
        "\u4E82",
        "\u71C3",
        "\u77DB",
        "\u4E4E",
        "\u6BBA",
        "\u85E5",
        "\u5BE7",
        "\u9B6F",
        "\u8CB4",
        "\u9418",
        "\u7164",
        "\u8B80",
        "\u73ED",
        "\u4F2F",
        "\u9999",
        "\u4ECB",
        "\u8FEB",
        "\u53E5",
        "\u8C50",
        "\u57F9",
        "\u63E1",
        "\u862D",
        "\u64D4",
        "\u5F26",
        "\u86CB",
        "\u6C89",
        "\u5047",
        "\u7A7F",
        "\u57F7",
        "\u7B54",
        "\u6A02",
        "\u8AB0",
        "\u9806",
        "\u7159",
        "\u7E2E",
        "\u5FB5",
        "\u81C9",
        "\u559C",
        "\u677E",
        "\u8173",
        "\u56F0",
        "\u7570",
        "\u514D",
        "\u80CC",
        "\u661F",
        "\u798F",
        "\u8CB7",
        "\u67D3",
        "\u4E95",
        "\u6982",
        "\u6162",
        "\u6015",
        "\u78C1",
        "\u500D",
        "\u7956",
        "\u7687",
        "\u4FC3",
        "\u975C",
        "\u88DC",
        "\u8A55",
        "\u7FFB",
        "\u8089",
        "\u8E10",
        "\u5C3C",
        "\u8863",
        "\u5BEC",
        "\u63DA",
        "\u68C9",
        "\u5E0C",
        "\u50B7",
        "\u64CD",
        "\u5782",
        "\u79CB",
        "\u5B9C",
        "\u6C2B",
        "\u5957",
        "\u7763",
        "\u632F",
        "\u67B6",
        "\u4EAE",
        "\u672B",
        "\u61B2",
        "\u6176",
        "\u7DE8",
        "\u725B",
        "\u89F8",
        "\u6620",
        "\u96F7",
        "\u92B7",
        "\u8A69",
        "\u5EA7",
        "\u5C45",
        "\u6293",
        "\u88C2",
        "\u80DE",
        "\u547C",
        "\u5A18",
        "\u666F",
        "\u5A01",
        "\u7DA0",
        "\u6676",
        "\u539A",
        "\u76DF",
        "\u8861",
        "\u96DE",
        "\u5B6B",
        "\u5EF6",
        "\u5371",
        "\u81A0",
        "\u5C4B",
        "\u9109",
        "\u81E8",
        "\u9678",
        "\u9867",
        "\u6389",
        "\u5440",
        "\u71C8",
        "\u6B72",
        "\u63AA",
        "\u675F",
        "\u8010",
        "\u5287",
        "\u7389",
        "\u8D99",
        "\u8DF3",
        "\u54E5",
        "\u5B63",
        "\u8AB2",
        "\u51F1",
        "\u80E1",
        "\u984D",
        "\u6B3E",
        "\u7D39",
        "\u5377",
        "\u9F4A",
        "\u5049",
        "\u84B8",
        "\u6B96",
        "\u6C38",
        "\u5B97",
        "\u82D7",
        "\u5DDD",
        "\u7210",
        "\u5CA9",
        "\u5F31",
        "\u96F6",
        "\u694A",
        "\u594F",
        "\u6CBF",
        "\u9732",
        "\u687F",
        "\u63A2",
        "\u6ED1",
        "\u93AE",
        "\u98EF",
        "\u6FC3",
        "\u822A",
        "\u61F7",
        "\u8D95",
        "\u5EAB",
        "\u596A",
        "\u4F0A",
        "\u9748",
        "\u7A05",
        "\u9014",
        "\u6EC5",
        "\u8CFD",
        "\u6B78",
        "\u53EC",
        "\u9F13",
        "\u64AD",
        "\u76E4",
        "\u88C1",
        "\u96AA",
        "\u5EB7",
        "\u552F",
        "\u9304",
        "\u83CC",
        "\u7D14",
        "\u501F",
        "\u7CD6",
        "\u84CB",
        "\u6A6B",
        "\u7B26",
        "\u79C1",
        "\u52AA",
        "\u5802",
        "\u57DF",
        "\u69CD",
        "\u6F64",
        "\u5E45",
        "\u54C8",
        "\u7ADF",
        "\u719F",
        "\u87F2",
        "\u6FA4",
        "\u8166",
        "\u58E4",
        "\u78B3",
        "\u6B50",
        "\u904D",
        "\u5074",
        "\u5BE8",
        "\u6562",
        "\u5FB9",
        "\u616E",
        "\u659C",
        "\u8584",
        "\u5EAD",
        "\u7D0D",
        "\u5F48",
        "\u98FC",
        "\u4F38",
        "\u6298",
        "\u9EA5",
        "\u6FD5",
        "\u6697",
        "\u8377",
        "\u74E6",
        "\u585E",
        "\u5E8A",
        "\u7BC9",
        "\u60E1",
        "\u6236",
        "\u8A2A",
        "\u5854",
        "\u5947",
        "\u900F",
        "\u6881",
        "\u5200",
        "\u65CB",
        "\u8DE1",
        "\u5361",
        "\u6C2F",
        "\u9047",
        "\u4EFD",
        "\u6BD2",
        "\u6CE5",
        "\u9000",
        "\u6D17",
        "\u64FA",
        "\u7070",
        "\u5F69",
        "\u8CE3",
        "\u8017",
        "\u590F",
        "\u64C7",
        "\u5FD9",
        "\u9285",
        "\u737B",
        "\u786C",
        "\u4E88",
        "\u7E41",
        "\u5708",
        "\u96EA",
        "\u51FD",
        "\u4EA6",
        "\u62BD",
        "\u7BC7",
        "\u9663",
        "\u9670",
        "\u4E01",
        "\u5C3A",
        "\u8FFD",
        "\u5806",
        "\u96C4",
        "\u8FCE",
        "\u6CDB",
        "\u7238",
        "\u6A13",
        "\u907F",
        "\u8B00",
        "\u5678",
        "\u91CE",
        "\u8C6C",
        "\u65D7",
        "\u7D2F",
        "\u504F",
        "\u5178",
        "\u9928",
        "\u7D22",
        "\u79E6",
        "\u8102",
        "\u6F6E",
        "\u723A",
        "\u8C46",
        "\u5FFD",
        "\u6258",
        "\u9A5A",
        "\u5851",
        "\u907A",
        "\u6108",
        "\u6731",
        "\u66FF",
        "\u7E96",
        "\u7C97",
        "\u50BE",
        "\u5C1A",
        "\u75DB",
        "\u695A",
        "\u8B1D",
        "\u596E",
        "\u8CFC",
        "\u78E8",
        "\u541B",
        "\u6C60",
        "\u65C1",
        "\u788E",
        "\u9AA8",
        "\u76E3",
        "\u6355",
        "\u5F1F",
        "\u66B4",
        "\u5272",
        "\u8CAB",
        "\u6B8A",
        "\u91CB",
        "\u8A5E",
        "\u4EA1",
        "\u58C1",
        "\u9813",
        "\u5BF6",
        "\u5348",
        "\u5875",
        "\u805E",
        "\u63ED",
        "\u70AE",
        "\u6B98",
        "\u51AC",
        "\u6A4B",
        "\u5A66",
        "\u8B66",
        "\u7D9C",
        "\u62DB",
        "\u5433",
        "\u4ED8",
        "\u6D6E",
        "\u906D",
        "\u5F90",
        "\u60A8",
        "\u6416",
        "\u8C37",
        "\u8D0A",
        "\u7BB1",
        "\u9694",
        "\u8A02",
        "\u7537",
        "\u5439",
        "\u5712",
        "\u7D1B",
        "\u5510",
        "\u6557",
        "\u5B8B",
        "\u73BB",
        "\u5DE8",
        "\u8015",
        "\u5766",
        "\u69AE",
        "\u9589",
        "\u7063",
        "\u9375",
        "\u51E1",
        "\u99D0",
        "\u934B",
        "\u6551",
        "\u6069",
        "\u525D",
        "\u51DD",
        "\u9E7C",
        "\u9F52",
        "\u622A",
        "\u7149",
        "\u9EBB",
        "\u7D21",
        "\u7981",
        "\u5EE2",
        "\u76DB",
        "\u7248",
        "\u7DE9",
        "\u6DE8",
        "\u775B",
        "\u660C",
        "\u5A5A",
        "\u6D89",
        "\u7B52",
        "\u5634",
        "\u63D2",
        "\u5CB8",
        "\u6717",
        "\u838A",
        "\u8857",
        "\u85CF",
        "\u59D1",
        "\u8CBF",
        "\u8150",
        "\u5974",
        "\u5566",
        "\u6163",
        "\u4E58",
        "\u5925",
        "\u6062",
        "\u52FB",
        "\u7D17",
        "\u624E",
        "\u8FAF",
        "\u8033",
        "\u5F6A",
        "\u81E3",
        "\u5104",
        "\u7483",
        "\u62B5",
        "\u8108",
        "\u79C0",
        "\u85A9",
        "\u4FC4",
        "\u7DB2",
        "\u821E",
        "\u5E97",
        "\u5674",
        "\u7E31",
        "\u5BF8",
        "\u6C57",
        "\u639B",
        "\u6D2A",
        "\u8CC0",
        "\u9583",
        "\u67EC",
        "\u7206",
        "\u70EF",
        "\u6D25",
        "\u7A3B",
        "\u7246",
        "\u8EDF",
        "\u52C7",
        "\u50CF",
        "\u6EFE",
        "\u5398",
        "\u8499",
        "\u82B3",
        "\u80AF",
        "\u5761",
        "\u67F1",
        "\u76EA",
        "\u817F",
        "\u5100",
        "\u65C5",
        "\u5C3E",
        "\u8ECB",
        "\u51B0",
        "\u8CA2",
        "\u767B",
        "\u9ECE",
        "\u524A",
        "\u947D",
        "\u52D2",
        "\u9003",
        "\u969C",
        "\u6C28",
        "\u90ED",
        "\u5CF0",
        "\u5E63",
        "\u6E2F",
        "\u4F0F",
        "\u8ECC",
        "\u755D",
        "\u7562",
        "\u64E6",
        "\u83AB",
        "\u523A",
        "\u6D6A",
        "\u79D8",
        "\u63F4",
        "\u682A",
        "\u5065",
        "\u552E",
        "\u80A1",
        "\u5CF6",
        "\u7518",
        "\u6CE1",
        "\u7761",
        "\u7AE5",
        "\u9444",
        "\u6E6F",
        "\u95A5",
        "\u4F11",
        "\u532F",
        "\u820D",
        "\u7267",
        "\u7E5E",
        "\u70B8",
        "\u54F2",
        "\u78F7",
        "\u7E3E",
        "\u670B",
        "\u6DE1",
        "\u5C16",
        "\u555F",
        "\u9677",
        "\u67F4",
        "\u5448",
        "\u5F92",
        "\u984F",
        "\u6DDA",
        "\u7A0D",
        "\u5FD8",
        "\u6CF5",
        "\u85CD",
        "\u62D6",
        "\u6D1E",
        "\u6388",
        "\u93E1",
        "\u8F9B",
        "\u58EF",
        "\u92D2",
        "\u8CA7",
        "\u865B",
        "\u5F4E",
        "\u6469",
        "\u6CF0",
        "\u5E7C",
        "\u5EF7",
        "\u5C0A",
        "\u7A97",
        "\u7DB1",
        "\u5F04",
        "\u96B8",
        "\u7591",
        "\u6C0F",
        "\u5BAE",
        "\u59D0",
        "\u9707",
        "\u745E",
        "\u602A",
        "\u5C24",
        "\u7434",
        "\u5FAA",
        "\u63CF",
        "\u819C",
        "\u9055",
        "\u593E",
        "\u8170",
        "\u7DE3",
        "\u73E0",
        "\u7AAE",
        "\u68EE",
        "\u679D",
        "\u7AF9",
        "\u6E9D",
        "\u50AC",
        "\u7E69",
        "\u61B6",
        "\u90A6",
        "\u5269",
        "\u5E78",
        "\u6F3F",
        "\u6B04",
        "\u64C1",
        "\u7259",
        "\u8CAF",
        "\u79AE",
        "\u6FFE",
        "\u9209",
        "\u7D0B",
        "\u7F77",
        "\u62CD",
        "\u54B1",
        "\u558A",
        "\u8896",
        "\u57C3",
        "\u52E4",
        "\u7F70",
        "\u7126",
        "\u6F5B",
        "\u4F0D",
        "\u58A8",
        "\u6B32",
        "\u7E2B",
        "\u59D3",
        "\u520A",
        "\u98FD",
        "\u4EFF",
        "\u734E",
        "\u92C1",
        "\u9B3C",
        "\u9E97",
        "\u8DE8",
        "\u9ED8",
        "\u6316",
        "\u93C8",
        "\u6383",
        "\u559D",
        "\u888B",
        "\u70AD",
        "\u6C61",
        "\u5E55",
        "\u8AF8",
        "\u5F27",
        "\u52F5",
        "\u6885",
        "\u5976",
        "\u6F54",
        "\u707D",
        "\u821F",
        "\u9451",
        "\u82EF",
        "\u8A1F",
        "\u62B1",
        "\u6BC0",
        "\u61C2",
        "\u5BD2",
        "\u667A",
        "\u57D4",
        "\u5BC4",
        "\u5C46",
        "\u8E8D",
        "\u6E21",
        "\u6311",
        "\u4E39",
        "\u8271",
        "\u8C9D",
        "\u78B0",
        "\u62D4",
        "\u7239",
        "\u6234",
        "\u78BC",
        "\u5922",
        "\u82BD",
        "\u7194",
        "\u8D64",
        "\u6F01",
        "\u54ED",
        "\u656C",
        "\u9846",
        "\u5954",
        "\u925B",
        "\u4EF2",
        "\u864E",
        "\u7A00",
        "\u59B9",
        "\u4E4F",
        "\u73CD",
        "\u7533",
        "\u684C",
        "\u9075",
        "\u5141",
        "\u9686",
        "\u87BA",
        "\u5009",
        "\u9B4F",
        "\u92B3",
        "\u66C9",
        "\u6C2E",
        "\u517C",
        "\u96B1",
        "\u7919",
        "\u8D6B",
        "\u64A5",
        "\u5FE0",
        "\u8085",
        "\u7F38",
        "\u727D",
        "\u6436",
        "\u535A",
        "\u5DE7",
        "\u6BBC",
        "\u5144",
        "\u675C",
        "\u8A0A",
        "\u8AA0",
        "\u78A7",
        "\u7965",
        "\u67EF",
        "\u9801",
        "\u5DE1",
        "\u77E9",
        "\u60B2",
        "\u704C",
        "\u9F61",
        "\u502B",
        "\u7968",
        "\u5C0B",
        "\u6842",
        "\u92EA",
        "\u8056",
        "\u6050",
        "\u6070",
        "\u912D",
        "\u8DA3",
        "\u62AC",
        "\u8352",
        "\u9A30",
        "\u8CBC",
        "\u67D4",
        "\u6EF4",
        "\u731B",
        "\u95CA",
        "\u8F1B",
        "\u59BB",
        "\u586B",
        "\u64A4",
        "\u5132",
        "\u7C3D",
        "\u9B27",
        "\u64FE",
        "\u7D2B",
        "\u7802",
        "\u905E",
        "\u6232",
        "\u540A",
        "\u9676",
        "\u4F10",
        "\u9935",
        "\u7642",
        "\u74F6",
        "\u5A46",
        "\u64AB",
        "\u81C2",
        "\u6478",
        "\u5FCD",
        "\u8766",
        "\u881F",
        "\u9130",
        "\u80F8",
        "\u978F",
        "\u64E0",
        "\u5076",
        "\u68C4",
        "\u69FD",
        "\u52C1",
        "\u4E73",
        "\u9127",
        "\u5409",
        "\u4EC1",
        "\u721B",
        "\u78DA",
        "\u79DF",
        "\u70CF",
        "\u8266",
        "\u4F34",
        "\u74DC",
        "\u6DFA",
        "\u4E19",
        "\u66AB",
        "\u71E5",
        "\u6A61",
        "\u67F3",
        "\u8FF7",
        "\u6696",
        "\u724C",
        "\u79E7",
        "\u81BD",
        "\u8A73",
        "\u7C27",
        "\u8E0F",
        "\u74F7",
        "\u8B5C",
        "\u5446",
        "\u8CD3",
        "\u7CCA",
        "\u6D1B",
        "\u8F1D",
        "\u61A4",
        "\u7AF6",
        "\u9699",
        "\u6012",
        "\u7C98",
        "\u4E43",
        "\u7DD2",
        "\u80A9",
        "\u7C4D",
        "\u654F",
        "\u5857",
        "\u7199",
        "\u7686",
        "\u5075",
        "\u61F8",
        "\u6398",
        "\u4EAB",
        "\u7CFE",
        "\u9192",
        "\u72C2",
        "\u9396",
        "\u6DC0",
        "\u6068",
        "\u7272",
        "\u9738",
        "\u722C",
        "\u8CDE",
        "\u9006",
        "\u73A9",
        "\u9675",
        "\u795D",
        "\u79D2",
        "\u6D59",
        "\u8C8C",
        "\u5F79",
        "\u5F7C",
        "\u6089",
        "\u9D28",
        "\u8DA8",
        "\u9CF3",
        "\u6668",
        "\u755C",
        "\u8F29",
        "\u79E9",
        "\u5375",
        "\u7F72",
        "\u68AF",
        "\u708E",
        "\u7058",
        "\u68CB",
        "\u9A45",
        "\u7BE9",
        "\u5CFD",
        "\u5192",
        "\u5565",
        "\u58FD",
        "\u8B6F",
        "\u6D78",
        "\u6CC9",
        "\u5E3D",
        "\u9072",
        "\u77FD",
        "\u7586",
        "\u8CB8",
        "\u6F0F",
        "\u7A3F",
        "\u51A0",
        "\u5AE9",
        "\u8105",
        "\u82AF",
        "\u7262",
        "\u53DB",
        "\u8755",
        "\u5967",
        "\u9CF4",
        "\u5DBA",
        "\u7F8A",
        "\u6191",
        "\u4E32",
        "\u5858",
        "\u7E6A",
        "\u9175",
        "\u878D",
        "\u76C6",
        "\u932B",
        "\u5EDF",
        "\u7C4C",
        "\u51CD",
        "\u8F14",
        "\u651D",
        "\u8972",
        "\u7B4B",
        "\u62D2",
        "\u50DA",
        "\u65F1",
        "\u9240",
        "\u9CE5",
        "\u6F06",
        "\u6C88",
        "\u7709",
        "\u758F",
        "\u6DFB",
        "\u68D2",
        "\u7A57",
        "\u785D",
        "\u97D3",
        "\u903C",
        "\u626D",
        "\u50D1",
        "\u6DBC",
        "\u633A",
        "\u7897",
        "\u683D",
        "\u7092",
        "\u676F",
        "\u60A3",
        "\u993E",
        "\u52F8",
        "\u8C6A",
        "\u907C",
        "\u52C3",
        "\u9D3B",
        "\u65E6",
        "\u540F",
        "\u62DC",
        "\u72D7",
        "\u57CB",
        "\u8F25",
        "\u63A9",
        "\u98F2",
        "\u642C",
        "\u7F75",
        "\u8FAD",
        "\u52FE",
        "\u6263",
        "\u4F30",
        "\u8523",
        "\u7D68",
        "\u9727",
        "\u4E08",
        "\u6735",
        "\u59C6",
        "\u64EC",
        "\u5B87",
        "\u8F2F",
        "\u965D",
        "\u96D5",
        "\u511F",
        "\u84C4",
        "\u5D07",
        "\u526A",
        "\u5021",
        "\u5EF3",
        "\u54AC",
        "\u99DB",
        "\u85AF",
        "\u5237",
        "\u65A5",
        "\u756A",
        "\u8CE6",
        "\u5949",
        "\u4F5B",
        "\u6F86",
        "\u6F2B",
        "\u66FC",
        "\u6247",
        "\u9223",
        "\u6843",
        "\u6276",
        "\u4ED4",
        "\u8FD4",
        "\u4FD7",
        "\u8667",
        "\u8154",
        "\u978B",
        "\u68F1",
        "\u8986",
        "\u6846",
        "\u6084",
        "\u53D4",
        "\u649E",
        "\u9A19",
        "\u52D8",
        "\u65FA",
        "\u6CB8",
        "\u5B64",
        "\u5410",
        "\u5B5F",
        "\u6E20",
        "\u5C48",
        "\u75BE",
        "\u5999",
        "\u60DC",
        "\u4EF0",
        "\u72E0",
        "\u8139",
        "\u8AE7",
        "\u62CB",
        "\u9EF4",
        "\u6851",
        "\u5D17",
        "\u561B",
        "\u8870",
        "\u76DC",
        "\u6EF2",
        "\u81DF",
        "\u8CF4",
        "\u6E67",
        "\u751C",
        "\u66F9",
        "\u95B1",
        "\u808C",
        "\u54E9",
        "\u53B2",
        "\u70F4",
        "\u7DEF",
        "\u6BC5",
        "\u6628",
        "\u507D",
        "\u75C7",
        "\u716E",
        "\u5606",
        "\u91D8",
        "\u642D",
        "\u8396",
        "\u7C60",
        "\u9177",
        "\u5077",
        "\u5F13",
        "\u9310",
        "\u6046",
        "\u5091",
        "\u5751",
        "\u9F3B",
        "\u7FFC",
        "\u7DB8",
        "\u6558",
        "\u7344",
        "\u902E",
        "\u7F50",
        "\u7D61",
        "\u68DA",
        "\u6291",
        "\u81A8",
        "\u852C",
        "\u5BFA",
        "\u9A5F",
        "\u7A46",
        "\u51B6",
        "\u67AF",
        "\u518A",
        "\u5C4D",
        "\u51F8",
        "\u7D33",
        "\u576F",
        "\u72A7",
        "\u7130",
        "\u8F5F",
        "\u6B23",
        "\u6649",
        "\u7626",
        "\u79A6",
        "\u9320",
        "\u9326",
        "\u55AA",
        "\u65EC",
        "\u935B",
        "\u58DF",
        "\u641C",
        "\u64B2",
        "\u9080",
        "\u4EAD",
        "\u916F",
        "\u9081",
        "\u8212",
        "\u8106",
        "\u9176",
        "\u9592",
        "\u6182",
        "\u915A",
        "\u9811",
        "\u7FBD",
        "\u6F32",
        "\u5378",
        "\u4ED7",
        "\u966A",
        "\u95E2",
        "\u61F2",
        "\u676D",
        "\u59DA",
        "\u809A",
        "\u6349",
        "\u98C4",
        "\u6F02",
        "\u6606",
        "\u6B3A",
        "\u543E",
        "\u90CE",
        "\u70F7",
        "\u6C41",
        "\u5475",
        "\u98FE",
        "\u856D",
        "\u96C5",
        "\u90F5",
        "\u9077",
        "\u71D5",
        "\u6492",
        "\u59FB",
        "\u8D74",
        "\u5BB4",
        "\u7169",
        "\u50B5",
        "\u5E33",
        "\u6591",
        "\u9234",
        "\u65E8",
        "\u9187",
        "\u8463",
        "\u9905",
        "\u96DB",
        "\u59FF",
        "\u62CC",
        "\u5085",
        "\u8179",
        "\u59A5",
        "\u63C9",
        "\u8CE2",
        "\u62C6",
        "\u6B6A",
        "\u8461",
        "\u80FA",
        "\u4E1F",
        "\u6D69",
        "\u5FBD",
        "\u6602",
        "\u588A",
        "\u64CB",
        "\u89BD",
        "\u8CAA",
        "\u6170",
        "\u7E73",
        "\u6C6A",
        "\u614C",
        "\u99AE",
        "\u8AFE",
        "\u59DC",
        "\u8ABC",
        "\u5147",
        "\u52A3",
        "\u8AA3",
        "\u8000",
        "\u660F",
        "\u8EBA",
        "\u76C8",
        "\u9A0E",
        "\u55AC",
        "\u6EAA",
        "\u53E2",
        "\u76E7",
        "\u62B9",
        "\u60B6",
        "\u8AEE",
        "\u522E",
        "\u99D5",
        "\u7E9C",
        "\u609F",
        "\u6458",
        "\u927A",
        "\u64F2",
        "\u9817",
        "\u5E7B",
        "\u67C4",
        "\u60E0",
        "\u6158",
        "\u4F73",
        "\u4EC7",
        "\u81D8",
        "\u7AA9",
        "\u6ECC",
        "\u528D",
        "\u77A7",
        "\u5821",
        "\u6F51",
        "\u8525",
        "\u7F69",
        "\u970D",
        "\u6488",
        "\u80CE",
        "\u84BC",
        "\u6FF1",
        "\u5006",
        "\u6345",
        "\u6E58",
        "\u780D",
        "\u971E",
        "\u90B5",
        "\u8404",
        "\u760B",
        "\u6DEE",
        "\u9042",
        "\u718A",
        "\u7CDE",
        "\u70D8",
        "\u5BBF",
        "\u6A94",
        "\u6208",
        "\u99C1",
        "\u5AC2",
        "\u88D5",
        "\u5F99",
        "\u7BAD",
        "\u6350",
        "\u8178",
        "\u6490",
        "\u66EC",
        "\u8FA8",
        "\u6BBF",
        "\u84EE",
        "\u6524",
        "\u652A",
        "\u91AC",
        "\u5C4F",
        "\u75AB",
        "\u54C0",
        "\u8521",
        "\u5835",
        "\u6CAB",
        "\u76BA",
        "\u66A2",
        "\u758A",
        "\u95A3",
        "\u840A",
        "\u6572",
        "\u8F44",
        "\u9264",
        "\u75D5",
        "\u58E9",
        "\u5DF7",
        "\u9913",
        "\u798D",
        "\u4E18",
        "\u7384",
        "\u6E9C",
        "\u66F0",
        "\u908F",
        "\u5F6D",
        "\u5617",
        "\u537F",
        "\u59A8",
        "\u8247",
        "\u541E",
        "\u97CB",
        "\u6028",
        "\u77EE",
        "\u6B47"
      ];
    }
  });

  // ../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/korean.json
  var require_korean = __commonJS({
    "../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/korean.json"(exports, module) {
      module.exports = [
        "\u1100\u1161\u1100\u1167\u11A8",
        "\u1100\u1161\u1101\u1173\u11B7",
        "\u1100\u1161\u1102\u1161\u11AB",
        "\u1100\u1161\u1102\u1173\u11BC",
        "\u1100\u1161\u1103\u1173\u11A8",
        "\u1100\u1161\u1105\u1173\u110E\u1175\u11B7",
        "\u1100\u1161\u1106\u116E\u11B7",
        "\u1100\u1161\u1107\u1161\u11BC",
        "\u1100\u1161\u1109\u1161\u11BC",
        "\u1100\u1161\u1109\u1173\u11B7",
        "\u1100\u1161\u110B\u116E\u11AB\u1103\u1166",
        "\u1100\u1161\u110B\u1173\u11AF",
        "\u1100\u1161\u110B\u1175\u1103\u1173",
        "\u1100\u1161\u110B\u1175\u11B8",
        "\u1100\u1161\u110C\u1161\u11BC",
        "\u1100\u1161\u110C\u1165\u11BC",
        "\u1100\u1161\u110C\u1169\u11A8",
        "\u1100\u1161\u110C\u116E\u11A8",
        "\u1100\u1161\u11A8\u110B\u1169",
        "\u1100\u1161\u11A8\u110C\u1161",
        "\u1100\u1161\u11AB\u1100\u1167\u11A8",
        "\u1100\u1161\u11AB\u1107\u116E",
        "\u1100\u1161\u11AB\u1109\u1165\u11B8",
        "\u1100\u1161\u11AB\u110C\u1161\u11BC",
        "\u1100\u1161\u11AB\u110C\u1165\u11B8",
        "\u1100\u1161\u11AB\u1111\u1161\u11AB",
        "\u1100\u1161\u11AF\u1103\u1173\u11BC",
        "\u1100\u1161\u11AF\u1107\u1175",
        "\u1100\u1161\u11AF\u1109\u1162\u11A8",
        "\u1100\u1161\u11AF\u110C\u1173\u11BC",
        "\u1100\u1161\u11B7\u1100\u1161\u11A8",
        "\u1100\u1161\u11B7\u1100\u1175",
        "\u1100\u1161\u11B7\u1109\u1169",
        "\u1100\u1161\u11B7\u1109\u116E\u1109\u1165\u11BC",
        "\u1100\u1161\u11B7\u110C\u1161",
        "\u1100\u1161\u11B7\u110C\u1165\u11BC",
        "\u1100\u1161\u11B8\u110C\u1161\u1100\u1175",
        "\u1100\u1161\u11BC\u1102\u1161\u11B7",
        "\u1100\u1161\u11BC\u1103\u1161\u11BC",
        "\u1100\u1161\u11BC\u1103\u1169",
        "\u1100\u1161\u11BC\u1105\u1167\u11A8\u1112\u1175",
        "\u1100\u1161\u11BC\u1107\u1167\u11AB",
        "\u1100\u1161\u11BC\u1107\u116E\u11A8",
        "\u1100\u1161\u11BC\u1109\u1161",
        "\u1100\u1161\u11BC\u1109\u116E\u1105\u1163\u11BC",
        "\u1100\u1161\u11BC\u110B\u1161\u110C\u1175",
        "\u1100\u1161\u11BC\u110B\u116F\u11AB\u1103\u1169",
        "\u1100\u1161\u11BC\u110B\u1174",
        "\u1100\u1161\u11BC\u110C\u1166",
        "\u1100\u1161\u11BC\u110C\u1169",
        "\u1100\u1161\u11C0\u110B\u1175",
        "\u1100\u1162\u1100\u116E\u1105\u1175",
        "\u1100\u1162\u1102\u1161\u1105\u1175",
        "\u1100\u1162\u1107\u1161\u11BC",
        "\u1100\u1162\u1107\u1167\u11AF",
        "\u1100\u1162\u1109\u1165\u11AB",
        "\u1100\u1162\u1109\u1165\u11BC",
        "\u1100\u1162\u110B\u1175\u11AB",
        "\u1100\u1162\u11A8\u1100\u116A\u11AB\u110C\u1165\u11A8",
        "\u1100\u1165\u1109\u1175\u11AF",
        "\u1100\u1165\u110B\u1162\u11A8",
        "\u1100\u1165\u110B\u116E\u11AF",
        "\u1100\u1165\u110C\u1175\u11BA",
        "\u1100\u1165\u1111\u116E\u11B7",
        "\u1100\u1165\u11A8\u110C\u1165\u11BC",
        "\u1100\u1165\u11AB\u1100\u1161\u11BC",
        "\u1100\u1165\u11AB\u1106\u116E\u11AF",
        "\u1100\u1165\u11AB\u1109\u1165\u11AF",
        "\u1100\u1165\u11AB\u110C\u1169",
        "\u1100\u1165\u11AB\u110E\u116E\u11A8",
        "\u1100\u1165\u11AF\u110B\u1173\u11B7",
        "\u1100\u1165\u11B7\u1109\u1161",
        "\u1100\u1165\u11B7\u1110\u1169",
        "\u1100\u1166\u1109\u1175\u1111\u1161\u11AB",
        "\u1100\u1166\u110B\u1175\u11B7",
        "\u1100\u1167\u110B\u116E\u11AF",
        "\u1100\u1167\u11AB\u1112\u1162",
        "\u1100\u1167\u11AF\u1100\u116A",
        "\u1100\u1167\u11AF\u1100\u116E\u11A8",
        "\u1100\u1167\u11AF\u1105\u1169\u11AB",
        "\u1100\u1167\u11AF\u1109\u1165\u11A8",
        "\u1100\u1167\u11AF\u1109\u1173\u11BC",
        "\u1100\u1167\u11AF\u1109\u1175\u11B7",
        "\u1100\u1167\u11AF\u110C\u1165\u11BC",
        "\u1100\u1167\u11AF\u1112\u1169\u11AB",
        "\u1100\u1167\u11BC\u1100\u1168",
        "\u1100\u1167\u11BC\u1100\u1169",
        "\u1100\u1167\u11BC\u1100\u1175",
        "\u1100\u1167\u11BC\u1105\u1167\u11A8",
        "\u1100\u1167\u11BC\u1107\u1169\u11A8\u1100\u116E\u11BC",
        "\u1100\u1167\u11BC\u1107\u1175",
        "\u1100\u1167\u11BC\u1109\u1161\u11BC\u1103\u1169",
        "\u1100\u1167\u11BC\u110B\u1167\u11BC",
        "\u1100\u1167\u11BC\u110B\u116E",
        "\u1100\u1167\u11BC\u110C\u1162\u11BC",
        "\u1100\u1167\u11BC\u110C\u1166",
        "\u1100\u1167\u11BC\u110C\u116E",
        "\u1100\u1167\u11BC\u110E\u1161\u11AF",
        "\u1100\u1167\u11BC\u110E\u1175",
        "\u1100\u1167\u11BC\u1112\u1163\u11BC",
        "\u1100\u1167\u11BC\u1112\u1165\u11B7",
        "\u1100\u1168\u1100\u1169\u11A8",
        "\u1100\u1168\u1103\u1161\u11AB",
        "\u1100\u1168\u1105\u1161\u11AB",
        "\u1100\u1168\u1109\u1161\u11AB",
        "\u1100\u1168\u1109\u1169\u11A8",
        "\u1100\u1168\u110B\u1163\u11A8",
        "\u1100\u1168\u110C\u1165\u11AF",
        "\u1100\u1168\u110E\u1173\u11BC",
        "\u1100\u1168\u1112\u116C\u11A8",
        "\u1100\u1169\u1100\u1162\u11A8",
        "\u1100\u1169\u1100\u116E\u1105\u1167",
        "\u1100\u1169\u1100\u116E\u11BC",
        "\u1100\u1169\u1100\u1173\u11B8",
        "\u1100\u1169\u1103\u1173\u11BC\u1112\u1161\u11A8\u1109\u1162\u11BC",
        "\u1100\u1169\u1106\u116E\u1109\u1175\u11AB",
        "\u1100\u1169\u1106\u1175\u11AB",
        "\u1100\u1169\u110B\u1163\u11BC\u110B\u1175",
        "\u1100\u1169\u110C\u1161\u11BC",
        "\u1100\u1169\u110C\u1165\u11AB",
        "\u1100\u1169\u110C\u1175\u11B8",
        "\u1100\u1169\u110E\u116E\u11BA\u1100\u1161\u1105\u116E",
        "\u1100\u1169\u1110\u1169\u11BC",
        "\u1100\u1169\u1112\u1163\u11BC",
        "\u1100\u1169\u11A8\u1109\u1175\u11A8",
        "\u1100\u1169\u11AF\u1106\u1169\u11A8",
        "\u1100\u1169\u11AF\u110D\u1161\u1100\u1175",
        "\u1100\u1169\u11AF\u1111\u1173",
        "\u1100\u1169\u11BC\u1100\u1161\u11AB",
        "\u1100\u1169\u11BC\u1100\u1162",
        "\u1100\u1169\u11BC\u1100\u1167\u11A8",
        "\u1100\u1169\u11BC\u1100\u116E\u11AB",
        "\u1100\u1169\u11BC\u1100\u1173\u11B8",
        "\u1100\u1169\u11BC\u1100\u1175",
        "\u1100\u1169\u11BC\u1103\u1169\u11BC",
        "\u1100\u1169\u11BC\u1106\u116E\u110B\u116F\u11AB",
        "\u1100\u1169\u11BC\u1107\u116E",
        "\u1100\u1169\u11BC\u1109\u1161",
        "\u1100\u1169\u11BC\u1109\u1175\u11A8",
        "\u1100\u1169\u11BC\u110B\u1165\u11B8",
        "\u1100\u1169\u11BC\u110B\u1167\u11AB",
        "\u1100\u1169\u11BC\u110B\u116F\u11AB",
        "\u1100\u1169\u11BC\u110C\u1161\u11BC",
        "\u1100\u1169\u11BC\u110D\u1161",
        "\u1100\u1169\u11BC\u110E\u1162\u11A8",
        "\u1100\u1169\u11BC\u1110\u1169\u11BC",
        "\u1100\u1169\u11BC\u1111\u1169",
        "\u1100\u1169\u11BC\u1112\u1161\u11BC",
        "\u1100\u1169\u11BC\u1112\u1172\u110B\u1175\u11AF",
        "\u1100\u116A\u1106\u1169\u11A8",
        "\u1100\u116A\u110B\u1175\u11AF",
        "\u1100\u116A\u110C\u1161\u11BC",
        "\u1100\u116A\u110C\u1165\u11BC",
        "\u1100\u116A\u1112\u1161\u11A8",
        "\u1100\u116A\u11AB\u1100\u1162\u11A8",
        "\u1100\u116A\u11AB\u1100\u1168",
        "\u1100\u116A\u11AB\u1100\u116A\u11BC",
        "\u1100\u116A\u11AB\u1102\u1167\u11B7",
        "\u1100\u116A\u11AB\u1105\u1161\u11B7",
        "\u1100\u116A\u11AB\u1105\u1167\u11AB",
        "\u1100\u116A\u11AB\u1105\u1175",
        "\u1100\u116A\u11AB\u1109\u1173\u11B8",
        "\u1100\u116A\u11AB\u1109\u1175\u11B7",
        "\u1100\u116A\u11AB\u110C\u1165\u11B7",
        "\u1100\u116A\u11AB\u110E\u1161\u11AF",
        "\u1100\u116A\u11BC\u1100\u1167\u11BC",
        "\u1100\u116A\u11BC\u1100\u1169",
        "\u1100\u116A\u11BC\u110C\u1161\u11BC",
        "\u1100\u116A\u11BC\u110C\u116E",
        "\u1100\u116C\u1105\u1169\u110B\u116E\u11B7",
        "\u1100\u116C\u11BC\u110C\u1161\u11BC\u1112\u1175",
        "\u1100\u116D\u1100\u116A\u1109\u1165",
        "\u1100\u116D\u1106\u116E\u11AB",
        "\u1100\u116D\u1107\u1169\u11A8",
        "\u1100\u116D\u1109\u1175\u11AF",
        "\u1100\u116D\u110B\u1163\u11BC",
        "\u1100\u116D\u110B\u1172\u11A8",
        "\u1100\u116D\u110C\u1161\u11BC",
        "\u1100\u116D\u110C\u1175\u11A8",
        "\u1100\u116D\u1110\u1169\u11BC",
        "\u1100\u116D\u1112\u116A\u11AB",
        "\u1100\u116D\u1112\u116E\u11AB",
        "\u1100\u116E\u1100\u1167\u11BC",
        "\u1100\u116E\u1105\u1173\u11B7",
        "\u1100\u116E\u1106\u1165\u11BC",
        "\u1100\u116E\u1107\u1167\u11AF",
        "\u1100\u116E\u1107\u116E\u11AB",
        "\u1100\u116E\u1109\u1165\u11A8",
        "\u1100\u116E\u1109\u1165\u11BC",
        "\u1100\u116E\u1109\u1169\u11A8",
        "\u1100\u116E\u110B\u1167\u11A8",
        "\u1100\u116E\u110B\u1175\u11B8",
        "\u1100\u116E\u110E\u1165\u11BC",
        "\u1100\u116E\u110E\u1166\u110C\u1165\u11A8",
        "\u1100\u116E\u11A8\u1100\u1161",
        "\u1100\u116E\u11A8\u1100\u1175",
        "\u1100\u116E\u11A8\u1102\u1162",
        "\u1100\u116E\u11A8\u1105\u1175\u11B8",
        "\u1100\u116E\u11A8\u1106\u116E\u11AF",
        "\u1100\u116E\u11A8\u1106\u1175\u11AB",
        "\u1100\u116E\u11A8\u1109\u116E",
        "\u1100\u116E\u11A8\u110B\u1165",
        "\u1100\u116E\u11A8\u110B\u116A\u11BC",
        "\u1100\u116E\u11A8\u110C\u1165\u11A8",
        "\u1100\u116E\u11A8\u110C\u1166",
        "\u1100\u116E\u11A8\u1112\u116C",
        "\u1100\u116E\u11AB\u1103\u1162",
        "\u1100\u116E\u11AB\u1109\u1161",
        "\u1100\u116E\u11AB\u110B\u1175\u11AB",
        "\u1100\u116E\u11BC\u1100\u1173\u11A8\u110C\u1165\u11A8",
        "\u1100\u116F\u11AB\u1105\u1175",
        "\u1100\u116F\u11AB\u110B\u1171",
        "\u1100\u116F\u11AB\u1110\u116E",
        "\u1100\u1171\u1100\u116E\u11A8",
        "\u1100\u1171\u1109\u1175\u11AB",
        "\u1100\u1172\u110C\u1165\u11BC",
        "\u1100\u1172\u110E\u1175\u11A8",
        "\u1100\u1172\u11AB\u1112\u1167\u11BC",
        "\u1100\u1173\u1102\u1161\u11AF",
        "\u1100\u1173\u1102\u1163\u11BC",
        "\u1100\u1173\u1102\u1173\u11AF",
        "\u1100\u1173\u1105\u1165\u1102\u1161",
        "\u1100\u1173\u1105\u116E\u11B8",
        "\u1100\u1173\u1105\u1173\u11BA",
        "\u1100\u1173\u1105\u1175\u11B7",
        "\u1100\u1173\u110C\u1166\u1109\u1165\u110B\u1163",
        "\u1100\u1173\u1110\u1169\u1105\u1169\u11A8",
        "\u1100\u1173\u11A8\u1107\u1169\u11A8",
        "\u1100\u1173\u11A8\u1112\u1175",
        "\u1100\u1173\u11AB\u1100\u1165",
        "\u1100\u1173\u11AB\u1100\u116D",
        "\u1100\u1173\u11AB\u1105\u1162",
        "\u1100\u1173\u11AB\u1105\u1169",
        "\u1100\u1173\u11AB\u1106\u116E",
        "\u1100\u1173\u11AB\u1107\u1169\u11AB",
        "\u1100\u1173\u11AB\u110B\u116F\u11AB",
        "\u1100\u1173\u11AB\u110B\u1172\u11A8",
        "\u1100\u1173\u11AB\u110E\u1165",
        "\u1100\u1173\u11AF\u110A\u1175",
        "\u1100\u1173\u11AF\u110C\u1161",
        "\u1100\u1173\u11B7\u1100\u1161\u11BC\u1109\u1161\u11AB",
        "\u1100\u1173\u11B7\u1100\u1169",
        "\u1100\u1173\u11B7\u1102\u1167\u11AB",
        "\u1100\u1173\u11B7\u1106\u1166\u1103\u1161\u11AF",
        "\u1100\u1173\u11B7\u110B\u1162\u11A8",
        "\u1100\u1173\u11B7\u110B\u1167\u11AB",
        "\u1100\u1173\u11B7\u110B\u116D\u110B\u1175\u11AF",
        "\u1100\u1173\u11B7\u110C\u1175",
        "\u1100\u1173\u11BC\u110C\u1165\u11BC\u110C\u1165\u11A8",
        "\u1100\u1175\u1100\u1161\u11AB",
        "\u1100\u1175\u1100\u116A\u11AB",
        "\u1100\u1175\u1102\u1167\u11B7",
        "\u1100\u1175\u1102\u1173\u11BC",
        "\u1100\u1175\u1103\u1169\u11A8\u1100\u116D",
        "\u1100\u1175\u1103\u116E\u11BC",
        "\u1100\u1175\u1105\u1169\u11A8",
        "\u1100\u1175\u1105\u1173\u11B7",
        "\u1100\u1175\u1107\u1165\u11B8",
        "\u1100\u1175\u1107\u1169\u11AB",
        "\u1100\u1175\u1107\u116E\u11AB",
        "\u1100\u1175\u1108\u1173\u11B7",
        "\u1100\u1175\u1109\u116E\u11A8\u1109\u1161",
        "\u1100\u1175\u1109\u116E\u11AF",
        "\u1100\u1175\u110B\u1165\u11A8",
        "\u1100\u1175\u110B\u1165\u11B8",
        "\u1100\u1175\u110B\u1169\u11AB",
        "\u1100\u1175\u110B\u116E\u11AB",
        "\u1100\u1175\u110B\u116F\u11AB",
        "\u1100\u1175\u110C\u1165\u11A8",
        "\u1100\u1175\u110C\u116E\u11AB",
        "\u1100\u1175\u110E\u1175\u11B7",
        "\u1100\u1175\u1112\u1169\u11AB",
        "\u1100\u1175\u1112\u116C\u11A8",
        "\u1100\u1175\u11AB\u1100\u1173\u11B8",
        "\u1100\u1175\u11AB\u110C\u1161\u11BC",
        "\u1100\u1175\u11AF\u110B\u1175",
        "\u1100\u1175\u11B7\u1107\u1161\u11B8",
        "\u1100\u1175\u11B7\u110E\u1175",
        "\u1100\u1175\u11B7\u1111\u1169\u1100\u1169\u11BC\u1112\u1161\u11BC",
        "\u1101\u1161\u11A8\u1103\u116E\u1100\u1175",
        "\u1101\u1161\u11B7\u1108\u1161\u11A8",
        "\u1101\u1162\u1103\u1161\u11AF\u110B\u1173\u11B7",
        "\u1101\u1162\u1109\u1169\u1100\u1173\u11B7",
        "\u1101\u1165\u11B8\u110C\u1175\u11AF",
        "\u1101\u1169\u11A8\u1103\u1162\u1100\u1175",
        "\u1101\u1169\u11BE\u110B\u1175\u11C1",
        "\u1102\u1161\u1103\u1173\u11AF\u110B\u1175",
        "\u1102\u1161\u1105\u1161\u11AB\u1112\u1175",
        "\u1102\u1161\u1106\u1165\u110C\u1175",
        "\u1102\u1161\u1106\u116E\u11AF",
        "\u1102\u1161\u110E\u1175\u11B7\u1107\u1161\u11AB",
        "\u1102\u1161\u1112\u1173\u11AF",
        "\u1102\u1161\u11A8\u110B\u1167\u11B8",
        "\u1102\u1161\u11AB\u1107\u1161\u11BC",
        "\u1102\u1161\u11AF\u1100\u1162",
        "\u1102\u1161\u11AF\u110A\u1175",
        "\u1102\u1161\u11AF\u110D\u1161",
        "\u1102\u1161\u11B7\u1102\u1167",
        "\u1102\u1161\u11B7\u1103\u1162\u1106\u116E\u11AB",
        "\u1102\u1161\u11B7\u1106\u1162",
        "\u1102\u1161\u11B7\u1109\u1161\u11AB",
        "\u1102\u1161\u11B7\u110C\u1161",
        "\u1102\u1161\u11B7\u1111\u1167\u11AB",
        "\u1102\u1161\u11B7\u1112\u1161\u11A8\u1109\u1162\u11BC",
        "\u1102\u1161\u11BC\u1107\u1175",
        "\u1102\u1161\u11C0\u1106\u1161\u11AF",
        "\u1102\u1162\u1102\u1167\u11AB",
        "\u1102\u1162\u110B\u116D\u11BC",
        "\u1102\u1162\u110B\u1175\u11AF",
        "\u1102\u1162\u11B7\u1107\u1175",
        "\u1102\u1162\u11B7\u1109\u1162",
        "\u1102\u1162\u11BA\u1106\u116E\u11AF",
        "\u1102\u1162\u11BC\u1103\u1169\u11BC",
        "\u1102\u1162\u11BC\u1106\u1167\u11AB",
        "\u1102\u1162\u11BC\u1107\u1161\u11BC",
        "\u1102\u1162\u11BC\u110C\u1161\u11BC\u1100\u1169",
        "\u1102\u1166\u11A8\u1110\u1161\u110B\u1175",
        "\u1102\u1166\u11BA\u110D\u1162",
        "\u1102\u1169\u1103\u1169\u11BC",
        "\u1102\u1169\u1105\u1161\u11AB\u1109\u1162\u11A8",
        "\u1102\u1169\u1105\u1167\u11A8",
        "\u1102\u1169\u110B\u1175\u11AB",
        "\u1102\u1169\u11A8\u110B\u1173\u11B7",
        "\u1102\u1169\u11A8\u110E\u1161",
        "\u1102\u1169\u11A8\u1112\u116A",
        "\u1102\u1169\u11AB\u1105\u1175",
        "\u1102\u1169\u11AB\u1106\u116E\u11AB",
        "\u1102\u1169\u11AB\u110C\u1162\u11BC",
        "\u1102\u1169\u11AF\u110B\u1175",
        "\u1102\u1169\u11BC\u1100\u116E",
        "\u1102\u1169\u11BC\u1103\u1161\u11B7",
        "\u1102\u1169\u11BC\u1106\u1175\u11AB",
        "\u1102\u1169\u11BC\u1107\u116E",
        "\u1102\u1169\u11BC\u110B\u1165\u11B8",
        "\u1102\u1169\u11BC\u110C\u1161\u11BC",
        "\u1102\u1169\u11BC\u110E\u1169\u11AB",
        "\u1102\u1169\u11C1\u110B\u1175",
        "\u1102\u116E\u11AB\u1103\u1169\u11BC\u110C\u1161",
        "\u1102\u116E\u11AB\u1106\u116E\u11AF",
        "\u1102\u116E\u11AB\u110A\u1165\u11B8",
        "\u1102\u1172\u110B\u116D\u11A8",
        "\u1102\u1173\u1101\u1175\u11B7",
        "\u1102\u1173\u11A8\u1103\u1162",
        "\u1102\u1173\u11BC\u1103\u1169\u11BC\u110C\u1165\u11A8",
        "\u1102\u1173\u11BC\u1105\u1167\u11A8",
        "\u1103\u1161\u1107\u1161\u11BC",
        "\u1103\u1161\u110B\u1163\u11BC\u1109\u1165\u11BC",
        "\u1103\u1161\u110B\u1173\u11B7",
        "\u1103\u1161\u110B\u1175\u110B\u1165\u1110\u1173",
        "\u1103\u1161\u1112\u1162\u11BC",
        "\u1103\u1161\u11AB\u1100\u1168",
        "\u1103\u1161\u11AB\u1100\u1169\u11AF",
        "\u1103\u1161\u11AB\u1103\u1169\u11A8",
        "\u1103\u1161\u11AB\u1106\u1161\u11BA",
        "\u1103\u1161\u11AB\u1109\u116E\u11AB",
        "\u1103\u1161\u11AB\u110B\u1165",
        "\u1103\u1161\u11AB\u110B\u1171",
        "\u1103\u1161\u11AB\u110C\u1165\u11B7",
        "\u1103\u1161\u11AB\u110E\u1166",
        "\u1103\u1161\u11AB\u110E\u116E",
        "\u1103\u1161\u11AB\u1111\u1167\u11AB",
        "\u1103\u1161\u11AB\u1111\u116E\u11BC",
        "\u1103\u1161\u11AF\u1100\u1163\u11AF",
        "\u1103\u1161\u11AF\u1105\u1165",
        "\u1103\u1161\u11AF\u1105\u1167\u11A8",
        "\u1103\u1161\u11AF\u1105\u1175",
        "\u1103\u1161\u11B0\u1100\u1169\u1100\u1175",
        "\u1103\u1161\u11B7\u1103\u1161\u11BC",
        "\u1103\u1161\u11B7\u1107\u1162",
        "\u1103\u1161\u11B7\u110B\u116D",
        "\u1103\u1161\u11B7\u110B\u1175\u11B7",
        "\u1103\u1161\u11B8\u1107\u1167\u11AB",
        "\u1103\u1161\u11B8\u110C\u1161\u11BC",
        "\u1103\u1161\u11BC\u1100\u1173\u11AB",
        "\u1103\u1161\u11BC\u1107\u116E\u11AB\u1100\u1161\u11AB",
        "\u1103\u1161\u11BC\u110B\u1167\u11AB\u1112\u1175",
        "\u1103\u1161\u11BC\u110C\u1161\u11BC",
        "\u1103\u1162\u1100\u1172\u1106\u1169",
        "\u1103\u1162\u1102\u1161\u11BD",
        "\u1103\u1162\u1103\u1161\u11AB\u1112\u1175",
        "\u1103\u1162\u1103\u1161\u11B8",
        "\u1103\u1162\u1103\u1169\u1109\u1175",
        "\u1103\u1162\u1105\u1163\u11A8",
        "\u1103\u1162\u1105\u1163\u11BC",
        "\u1103\u1162\u1105\u1172\u11A8",
        "\u1103\u1162\u1106\u116E\u11AB",
        "\u1103\u1162\u1107\u116E\u1107\u116E\u11AB",
        "\u1103\u1162\u1109\u1175\u11AB",
        "\u1103\u1162\u110B\u1173\u11BC",
        "\u1103\u1162\u110C\u1161\u11BC",
        "\u1103\u1162\u110C\u1165\u11AB",
        "\u1103\u1162\u110C\u1165\u11B8",
        "\u1103\u1162\u110C\u116E\u11BC",
        "\u1103\u1162\u110E\u1162\u11A8",
        "\u1103\u1162\u110E\u116E\u11AF",
        "\u1103\u1162\u110E\u116E\u11BC",
        "\u1103\u1162\u1110\u1169\u11BC\u1105\u1167\u11BC",
        "\u1103\u1162\u1112\u1161\u11A8",
        "\u1103\u1162\u1112\u1161\u11AB\u1106\u1175\u11AB\u1100\u116E\u11A8",
        "\u1103\u1162\u1112\u1161\u11B8\u1109\u1175\u11AF",
        "\u1103\u1162\u1112\u1167\u11BC",
        "\u1103\u1165\u11BC\u110B\u1165\u1105\u1175",
        "\u1103\u1166\u110B\u1175\u1110\u1173",
        "\u1103\u1169\u1103\u1162\u110E\u1166",
        "\u1103\u1169\u1103\u1165\u11A8",
        "\u1103\u1169\u1103\u116E\u11A8",
        "\u1103\u1169\u1106\u1161\u11BC",
        "\u1103\u1169\u1109\u1165\u1100\u116A\u11AB",
        "\u1103\u1169\u1109\u1175\u11B7",
        "\u1103\u1169\u110B\u116E\u11B7",
        "\u1103\u1169\u110B\u1175\u11B8",
        "\u1103\u1169\u110C\u1161\u1100\u1175",
        "\u1103\u1169\u110C\u1165\u1112\u1175",
        "\u1103\u1169\u110C\u1165\u11AB",
        "\u1103\u1169\u110C\u116E\u11BC",
        "\u1103\u1169\u110E\u1161\u11A8",
        "\u1103\u1169\u11A8\u1100\u1161\u11B7",
        "\u1103\u1169\u11A8\u1105\u1175\u11B8",
        "\u1103\u1169\u11A8\u1109\u1165",
        "\u1103\u1169\u11A8\u110B\u1175\u11AF",
        "\u1103\u1169\u11A8\u110E\u1161\u11BC\u110C\u1165\u11A8",
        "\u1103\u1169\u11BC\u1112\u116A\u110E\u1162\u11A8",
        "\u1103\u1171\u11BA\u1106\u1169\u1109\u1173\u11B8",
        "\u1103\u1171\u11BA\u1109\u1161\u11AB",
        "\u1104\u1161\u11AF\u110B\u1161\u110B\u1175",
        "\u1106\u1161\u1102\u116E\u1105\u1161",
        "\u1106\u1161\u1102\u1173\u11AF",
        "\u1106\u1161\u1103\u1161\u11BC",
        "\u1106\u1161\u1105\u1161\u1110\u1169\u11AB",
        "\u1106\u1161\u1105\u1167\u11AB",
        "\u1106\u1161\u1106\u116E\u1105\u1175",
        "\u1106\u1161\u1109\u1161\u110C\u1175",
        "\u1106\u1161\u110B\u1163\u11A8",
        "\u1106\u1161\u110B\u116D\u1102\u1166\u110C\u1173",
        "\u1106\u1161\u110B\u1173\u11AF",
        "\u1106\u1161\u110B\u1173\u11B7",
        "\u1106\u1161\u110B\u1175\u110F\u1173",
        "\u1106\u1161\u110C\u116E\u11BC",
        "\u1106\u1161\u110C\u1175\u1106\u1161\u11A8",
        "\u1106\u1161\u110E\u1161\u11AB\u1100\u1161\u110C\u1175",
        "\u1106\u1161\u110E\u1161\u11AF",
        "\u1106\u1161\u1112\u1173\u11AB",
        "\u1106\u1161\u11A8\u1100\u1165\u11AF\u1105\u1175",
        "\u1106\u1161\u11A8\u1102\u1162",
        "\u1106\u1161\u11A8\u1109\u1161\u11BC",
        "\u1106\u1161\u11AB\u1102\u1161\u11B7",
        "\u1106\u1161\u11AB\u1103\u116E",
        "\u1106\u1161\u11AB\u1109\u1166",
        "\u1106\u1161\u11AB\u110B\u1163\u11A8",
        "\u1106\u1161\u11AB\u110B\u1175\u11AF",
        "\u1106\u1161\u11AB\u110C\u1165\u11B7",
        "\u1106\u1161\u11AB\u110C\u1169\u11A8",
        "\u1106\u1161\u11AB\u1112\u116A",
        "\u1106\u1161\u11AD\u110B\u1175",
        "\u1106\u1161\u11AF\u1100\u1175",
        "\u1106\u1161\u11AF\u110A\u1173\u11B7",
        "\u1106\u1161\u11AF\u1110\u116E",
        "\u1106\u1161\u11B7\u1103\u1162\u1105\u1169",
        "\u1106\u1161\u11BC\u110B\u116F\u11AB\u1100\u1167\u11BC",
        "\u1106\u1162\u1102\u1167\u11AB",
        "\u1106\u1162\u1103\u1161\u11AF",
        "\u1106\u1162\u1105\u1167\u11A8",
        "\u1106\u1162\u1107\u1165\u11AB",
        "\u1106\u1162\u1109\u1173\u110F\u1165\u11B7",
        "\u1106\u1162\u110B\u1175\u11AF",
        "\u1106\u1162\u110C\u1161\u11BC",
        "\u1106\u1162\u11A8\u110C\u116E",
        "\u1106\u1165\u11A8\u110B\u1175",
        "\u1106\u1165\u11AB\u110C\u1165",
        "\u1106\u1165\u11AB\u110C\u1175",
        "\u1106\u1165\u11AF\u1105\u1175",
        "\u1106\u1166\u110B\u1175\u11AF",
        "\u1106\u1167\u1102\u1173\u1105\u1175",
        "\u1106\u1167\u110E\u1175\u11AF",
        "\u1106\u1167\u11AB\u1103\u1161\u11B7",
        "\u1106\u1167\u11AF\u110E\u1175",
        "\u1106\u1167\u11BC\u1103\u1161\u11AB",
        "\u1106\u1167\u11BC\u1105\u1167\u11BC",
        "\u1106\u1167\u11BC\u110B\u1168",
        "\u1106\u1167\u11BC\u110B\u1174",
        "\u1106\u1167\u11BC\u110C\u1165\u11AF",
        "\u1106\u1167\u11BC\u110E\u1175\u11BC",
        "\u1106\u1167\u11BC\u1112\u1161\u11B7",
        "\u1106\u1169\u1100\u1173\u11B7",
        "\u1106\u1169\u1102\u1175\u1110\u1165",
        "\u1106\u1169\u1103\u1166\u11AF",
        "\u1106\u1169\u1103\u1173\u11AB",
        "\u1106\u1169\u1107\u1165\u11B7",
        "\u1106\u1169\u1109\u1173\u11B8",
        "\u1106\u1169\u110B\u1163\u11BC",
        "\u1106\u1169\u110B\u1175\u11B7",
        "\u1106\u1169\u110C\u1169\u1105\u1175",
        "\u1106\u1169\u110C\u1175\u11B8",
        "\u1106\u1169\u1110\u116E\u11BC\u110B\u1175",
        "\u1106\u1169\u11A8\u1100\u1165\u11AF\u110B\u1175",
        "\u1106\u1169\u11A8\u1105\u1169\u11A8",
        "\u1106\u1169\u11A8\u1109\u1161",
        "\u1106\u1169\u11A8\u1109\u1169\u1105\u1175",
        "\u1106\u1169\u11A8\u1109\u116E\u11B7",
        "\u1106\u1169\u11A8\u110C\u1165\u11A8",
        "\u1106\u1169\u11A8\u1111\u116D",
        "\u1106\u1169\u11AF\u1105\u1162",
        "\u1106\u1169\u11B7\u1106\u1162",
        "\u1106\u1169\u11B7\u1106\u116E\u1100\u1166",
        "\u1106\u1169\u11B7\u1109\u1161\u11AF",
        "\u1106\u1169\u11B7\u1109\u1169\u11A8",
        "\u1106\u1169\u11B7\u110C\u1175\u11BA",
        "\u1106\u1169\u11B7\u1110\u1169\u11BC",
        "\u1106\u1169\u11B8\u1109\u1175",
        "\u1106\u116E\u1100\u116A\u11AB\u1109\u1175\u11B7",
        "\u1106\u116E\u1100\u116E\u11BC\u1112\u116A",
        "\u1106\u116E\u1103\u1165\u110B\u1171",
        "\u1106\u116E\u1103\u1165\u11B7",
        "\u1106\u116E\u1105\u1173\u11C1",
        "\u1106\u116E\u1109\u1173\u11AB",
        "\u1106\u116E\u110B\u1165\u11BA",
        "\u1106\u116E\u110B\u1167\u11A8",
        "\u1106\u116E\u110B\u116D\u11BC",
        "\u1106\u116E\u110C\u1169\u1100\u1165\u11AB",
        "\u1106\u116E\u110C\u1175\u1100\u1162",
        "\u1106\u116E\u110E\u1165\u11A8",
        "\u1106\u116E\u11AB\u1100\u116E",
        "\u1106\u116E\u11AB\u1103\u1173\u11A8",
        "\u1106\u116E\u11AB\u1107\u1165\u11B8",
        "\u1106\u116E\u11AB\u1109\u1165",
        "\u1106\u116E\u11AB\u110C\u1166",
        "\u1106\u116E\u11AB\u1112\u1161\u11A8",
        "\u1106\u116E\u11AB\u1112\u116A",
        "\u1106\u116E\u11AF\u1100\u1161",
        "\u1106\u116E\u11AF\u1100\u1165\u11AB",
        "\u1106\u116E\u11AF\u1100\u1167\u11AF",
        "\u1106\u116E\u11AF\u1100\u1169\u1100\u1175",
        "\u1106\u116E\u11AF\u1105\u1169\u11AB",
        "\u1106\u116E\u11AF\u1105\u1175\u1112\u1161\u11A8",
        "\u1106\u116E\u11AF\u110B\u1173\u11B7",
        "\u1106\u116E\u11AF\u110C\u1175\u11AF",
        "\u1106\u116E\u11AF\u110E\u1166",
        "\u1106\u1175\u1100\u116E\u11A8",
        "\u1106\u1175\u1103\u1175\u110B\u1165",
        "\u1106\u1175\u1109\u1161\u110B\u1175\u11AF",
        "\u1106\u1175\u1109\u116E\u11AF",
        "\u1106\u1175\u110B\u1167\u11A8",
        "\u1106\u1175\u110B\u116D\u11BC\u1109\u1175\u11AF",
        "\u1106\u1175\u110B\u116E\u11B7",
        "\u1106\u1175\u110B\u1175\u11AB",
        "\u1106\u1175\u1110\u1175\u11BC",
        "\u1106\u1175\u1112\u1169\u11AB",
        "\u1106\u1175\u11AB\u1100\u1161\u11AB",
        "\u1106\u1175\u11AB\u110C\u1169\u11A8",
        "\u1106\u1175\u11AB\u110C\u116E",
        "\u1106\u1175\u11AE\u110B\u1173\u11B7",
        "\u1106\u1175\u11AF\u1100\u1161\u1105\u116E",
        "\u1106\u1175\u11AF\u1105\u1175\u1106\u1175\u1110\u1165",
        "\u1106\u1175\u11C0\u1107\u1161\u1103\u1161\u11A8",
        "\u1107\u1161\u1100\u1161\u110C\u1175",
        "\u1107\u1161\u1100\u116E\u1102\u1175",
        "\u1107\u1161\u1102\u1161\u1102\u1161",
        "\u1107\u1161\u1102\u1173\u11AF",
        "\u1107\u1161\u1103\u1161\u11A8",
        "\u1107\u1161\u1103\u1161\u11BA\u1100\u1161",
        "\u1107\u1161\u1105\u1161\u11B7",
        "\u1107\u1161\u110B\u1175\u1105\u1165\u1109\u1173",
        "\u1107\u1161\u1110\u1161\u11BC",
        "\u1107\u1161\u11A8\u1106\u116E\u11AF\u1100\u116A\u11AB",
        "\u1107\u1161\u11A8\u1109\u1161",
        "\u1107\u1161\u11A8\u1109\u116E",
        "\u1107\u1161\u11AB\u1103\u1162",
        "\u1107\u1161\u11AB\u1103\u1173\u1109\u1175",
        "\u1107\u1161\u11AB\u1106\u1161\u11AF",
        "\u1107\u1161\u11AB\u1107\u1161\u11AF",
        "\u1107\u1161\u11AB\u1109\u1165\u11BC",
        "\u1107\u1161\u11AB\u110B\u1173\u11BC",
        "\u1107\u1161\u11AB\u110C\u1161\u11BC",
        "\u1107\u1161\u11AB\u110C\u116E\u11A8",
        "\u1107\u1161\u11AB\u110C\u1175",
        "\u1107\u1161\u11AB\u110E\u1161\u11AB",
        "\u1107\u1161\u11AE\u110E\u1175\u11B7",
        "\u1107\u1161\u11AF\u1100\u1161\u1105\u1161\u11A8",
        "\u1107\u1161\u11AF\u1100\u1165\u11AF\u110B\u1173\u11B7",
        "\u1107\u1161\u11AF\u1100\u1167\u11AB",
        "\u1107\u1161\u11AF\u1103\u1161\u11AF",
        "\u1107\u1161\u11AF\u1105\u1166",
        "\u1107\u1161\u11AF\u1106\u1169\u11A8",
        "\u1107\u1161\u11AF\u1107\u1161\u1103\u1161\u11A8",
        "\u1107\u1161\u11AF\u1109\u1162\u11BC",
        "\u1107\u1161\u11AF\u110B\u1173\u11B7",
        "\u1107\u1161\u11AF\u110C\u1161\u1100\u116E\u11A8",
        "\u1107\u1161\u11AF\u110C\u1165\u11AB",
        "\u1107\u1161\u11AF\u1110\u1169\u11B8",
        "\u1107\u1161\u11AF\u1111\u116D",
        "\u1107\u1161\u11B7\u1112\u1161\u1102\u1173\u11AF",
        "\u1107\u1161\u11B8\u1100\u1173\u1105\u1173\u11BA",
        "\u1107\u1161\u11B8\u1106\u1161\u11BA",
        "\u1107\u1161\u11B8\u1109\u1161\u11BC",
        "\u1107\u1161\u11B8\u1109\u1169\u11C0",
        "\u1107\u1161\u11BC\u1100\u1173\u11B7",
        "\u1107\u1161\u11BC\u1106\u1167\u11AB",
        "\u1107\u1161\u11BC\u1106\u116E\u11AB",
        "\u1107\u1161\u11BC\u1107\u1161\u1103\u1161\u11A8",
        "\u1107\u1161\u11BC\u1107\u1165\u11B8",
        "\u1107\u1161\u11BC\u1109\u1169\u11BC",
        "\u1107\u1161\u11BC\u1109\u1175\u11A8",
        "\u1107\u1161\u11BC\u110B\u1161\u11AB",
        "\u1107\u1161\u11BC\u110B\u116E\u11AF",
        "\u1107\u1161\u11BC\u110C\u1175",
        "\u1107\u1161\u11BC\u1112\u1161\u11A8",
        "\u1107\u1161\u11BC\u1112\u1162",
        "\u1107\u1161\u11BC\u1112\u1163\u11BC",
        "\u1107\u1162\u1100\u1167\u11BC",
        "\u1107\u1162\u1101\u1169\u11B8",
        "\u1107\u1162\u1103\u1161\u11AF",
        "\u1107\u1162\u1103\u1173\u1106\u1175\u11AB\u1110\u1165\u11AB",
        "\u1107\u1162\u11A8\u1103\u116E\u1109\u1161\u11AB",
        "\u1107\u1162\u11A8\u1109\u1162\u11A8",
        "\u1107\u1162\u11A8\u1109\u1165\u11BC",
        "\u1107\u1162\u11A8\u110B\u1175\u11AB",
        "\u1107\u1162\u11A8\u110C\u1166",
        "\u1107\u1162\u11A8\u1112\u116A\u110C\u1165\u11B7",
        "\u1107\u1165\u1105\u1173\u11BA",
        "\u1107\u1165\u1109\u1165\u11BA",
        "\u1107\u1165\u1110\u1173\u11AB",
        "\u1107\u1165\u11AB\u1100\u1162",
        "\u1107\u1165\u11AB\u110B\u1167\u11A8",
        "\u1107\u1165\u11AB\u110C\u1175",
        "\u1107\u1165\u11AB\u1112\u1169",
        "\u1107\u1165\u11AF\u1100\u1173\u11B7",
        "\u1107\u1165\u11AF\u1105\u1166",
        "\u1107\u1165\u11AF\u110A\u1165",
        "\u1107\u1165\u11B7\u110B\u1171",
        "\u1107\u1165\u11B7\u110B\u1175\u11AB",
        "\u1107\u1165\u11B7\u110C\u116C",
        "\u1107\u1165\u11B8\u1105\u1172\u11AF",
        "\u1107\u1165\u11B8\u110B\u116F\u11AB",
        "\u1107\u1165\u11B8\u110C\u1165\u11A8",
        "\u1107\u1165\u11B8\u110E\u1175\u11A8",
        "\u1107\u1166\u110B\u1175\u110C\u1175\u11BC",
        "\u1107\u1166\u11AF\u1110\u1173",
        "\u1107\u1167\u11AB\u1100\u1167\u11BC",
        "\u1107\u1167\u11AB\u1103\u1169\u11BC",
        "\u1107\u1167\u11AB\u1106\u1167\u11BC",
        "\u1107\u1167\u11AB\u1109\u1175\u11AB",
        "\u1107\u1167\u11AB\u1112\u1169\u1109\u1161",
        "\u1107\u1167\u11AB\u1112\u116A",
        "\u1107\u1167\u11AF\u1103\u1169",
        "\u1107\u1167\u11AF\u1106\u1167\u11BC",
        "\u1107\u1167\u11AF\u110B\u1175\u11AF",
        "\u1107\u1167\u11BC\u1109\u1175\u11AF",
        "\u1107\u1167\u11BC\u110B\u1161\u1105\u1175",
        "\u1107\u1167\u11BC\u110B\u116F\u11AB",
        "\u1107\u1169\u1100\u116A\u11AB",
        "\u1107\u1169\u1102\u1165\u1109\u1173",
        "\u1107\u1169\u1105\u1161\u1109\u1162\u11A8",
        "\u1107\u1169\u1105\u1161\u11B7",
        "\u1107\u1169\u1105\u1173\u11B7",
        "\u1107\u1169\u1109\u1161\u11BC",
        "\u1107\u1169\u110B\u1161\u11AB",
        "\u1107\u1169\u110C\u1161\u1100\u1175",
        "\u1107\u1169\u110C\u1161\u11BC",
        "\u1107\u1169\u110C\u1165\u11AB",
        "\u1107\u1169\u110C\u1169\u11AB",
        "\u1107\u1169\u1110\u1169\u11BC",
        "\u1107\u1169\u1111\u1167\u11AB\u110C\u1165\u11A8",
        "\u1107\u1169\u1112\u1165\u11B7",
        "\u1107\u1169\u11A8\u1103\u1169",
        "\u1107\u1169\u11A8\u1109\u1161",
        "\u1107\u1169\u11A8\u1109\u116E\u11BC\u110B\u1161",
        "\u1107\u1169\u11A8\u1109\u1173\u11B8",
        "\u1107\u1169\u11A9\u110B\u1173\u11B7",
        "\u1107\u1169\u11AB\u1100\u1167\u11A8\u110C\u1165\u11A8",
        "\u1107\u1169\u11AB\u1105\u1162",
        "\u1107\u1169\u11AB\u1107\u116E",
        "\u1107\u1169\u11AB\u1109\u1161",
        "\u1107\u1169\u11AB\u1109\u1165\u11BC",
        "\u1107\u1169\u11AB\u110B\u1175\u11AB",
        "\u1107\u1169\u11AB\u110C\u1175\u11AF",
        "\u1107\u1169\u11AF\u1111\u1166\u11AB",
        "\u1107\u1169\u11BC\u1109\u1161",
        "\u1107\u1169\u11BC\u110C\u1175",
        "\u1107\u1169\u11BC\u1110\u116E",
        "\u1107\u116E\u1100\u1173\u11AB",
        "\u1107\u116E\u1101\u1173\u1105\u1165\u110B\u116E\u11B7",
        "\u1107\u116E\u1103\u1161\u11B7",
        "\u1107\u116E\u1103\u1169\u11BC\u1109\u1161\u11AB",
        "\u1107\u116E\u1106\u116E\u11AB",
        "\u1107\u116E\u1107\u116E\u11AB",
        "\u1107\u116E\u1109\u1161\u11AB",
        "\u1107\u116E\u1109\u1161\u11BC",
        "\u1107\u116E\u110B\u1165\u11BF",
        "\u1107\u116E\u110B\u1175\u11AB",
        "\u1107\u116E\u110C\u1161\u11A8\u110B\u116D\u11BC",
        "\u1107\u116E\u110C\u1161\u11BC",
        "\u1107\u116E\u110C\u1165\u11BC",
        "\u1107\u116E\u110C\u1169\u11A8",
        "\u1107\u116E\u110C\u1175\u1105\u1165\u11AB\u1112\u1175",
        "\u1107\u116E\u110E\u1175\u11AB",
        "\u1107\u116E\u1110\u1161\u11A8",
        "\u1107\u116E\u1111\u116E\u11B7",
        "\u1107\u116E\u1112\u116C\u110C\u1161\u11BC",
        "\u1107\u116E\u11A8\u1107\u116E",
        "\u1107\u116E\u11A8\u1112\u1161\u11AB",
        "\u1107\u116E\u11AB\u1102\u1169",
        "\u1107\u116E\u11AB\u1105\u1163\u11BC",
        "\u1107\u116E\u11AB\u1105\u1175",
        "\u1107\u116E\u11AB\u1106\u1167\u11BC",
        "\u1107\u116E\u11AB\u1109\u1165\u11A8",
        "\u1107\u116E\u11AB\u110B\u1163",
        "\u1107\u116E\u11AB\u110B\u1171\u1100\u1175",
        "\u1107\u116E\u11AB\u1111\u1175\u11AF",
        "\u1107\u116E\u11AB\u1112\u1169\u11BC\u1109\u1162\u11A8",
        "\u1107\u116E\u11AF\u1100\u1169\u1100\u1175",
        "\u1107\u116E\u11AF\u1100\u116A",
        "\u1107\u116E\u11AF\u1100\u116D",
        "\u1107\u116E\u11AF\u1101\u1169\u11BE",
        "\u1107\u116E\u11AF\u1106\u1161\u11AB",
        "\u1107\u116E\u11AF\u1107\u1165\u11B8",
        "\u1107\u116E\u11AF\u1107\u1175\u11BE",
        "\u1107\u116E\u11AF\u110B\u1161\u11AB",
        "\u1107\u116E\u11AF\u110B\u1175\u110B\u1175\u11A8",
        "\u1107\u116E\u11AF\u1112\u1162\u11BC",
        "\u1107\u1173\u1105\u1162\u11AB\u1103\u1173",
        "\u1107\u1175\u1100\u1173\u11A8",
        "\u1107\u1175\u1102\u1161\u11AB",
        "\u1107\u1175\u1102\u1175\u11AF",
        "\u1107\u1175\u1103\u116E\u11AF\u1100\u1175",
        "\u1107\u1175\u1103\u1175\u110B\u1169",
        "\u1107\u1175\u1105\u1169\u1109\u1169",
        "\u1107\u1175\u1106\u1161\u11AB",
        "\u1107\u1175\u1106\u1167\u11BC",
        "\u1107\u1175\u1106\u1175\u11AF",
        "\u1107\u1175\u1107\u1161\u1105\u1161\u11B7",
        "\u1107\u1175\u1107\u1175\u11B7\u1107\u1161\u11B8",
        "\u1107\u1175\u1109\u1161\u11BC",
        "\u1107\u1175\u110B\u116D\u11BC",
        "\u1107\u1175\u110B\u1172\u11AF",
        "\u1107\u1175\u110C\u116E\u11BC",
        "\u1107\u1175\u1110\u1161\u1106\u1175\u11AB",
        "\u1107\u1175\u1111\u1161\u11AB",
        "\u1107\u1175\u11AF\u1103\u1175\u11BC",
        "\u1107\u1175\u11BA\u1106\u116E\u11AF",
        "\u1107\u1175\u11BA\u1107\u1161\u11BC\u110B\u116E\u11AF",
        "\u1107\u1175\u11BA\u110C\u116E\u11AF\u1100\u1175",
        "\u1107\u1175\u11BE\u1101\u1161\u11AF",
        "\u1108\u1161\u11AF\u1100\u1161\u11AB\u1109\u1162\u11A8",
        "\u1108\u1161\u11AF\u1105\u1162",
        "\u1108\u1161\u11AF\u1105\u1175",
        "\u1109\u1161\u1100\u1165\u11AB",
        "\u1109\u1161\u1100\u1168\u110C\u1165\u11AF",
        "\u1109\u1161\u1102\u1161\u110B\u1175",
        "\u1109\u1161\u1102\u1163\u11BC",
        "\u1109\u1161\u1105\u1161\u11B7",
        "\u1109\u1161\u1105\u1161\u11BC",
        "\u1109\u1161\u1105\u1175\u11B8",
        "\u1109\u1161\u1106\u1169\u1102\u1175\u11B7",
        "\u1109\u1161\u1106\u116E\u11AF",
        "\u1109\u1161\u1107\u1161\u11BC",
        "\u1109\u1161\u1109\u1161\u11BC",
        "\u1109\u1161\u1109\u1162\u11BC\u1112\u116A\u11AF",
        "\u1109\u1161\u1109\u1165\u11AF",
        "\u1109\u1161\u1109\u1173\u11B7",
        "\u1109\u1161\u1109\u1175\u11AF",
        "\u1109\u1161\u110B\u1165\u11B8",
        "\u1109\u1161\u110B\u116D\u11BC",
        "\u1109\u1161\u110B\u116F\u11AF",
        "\u1109\u1161\u110C\u1161\u11BC",
        "\u1109\u1161\u110C\u1165\u11AB",
        "\u1109\u1161\u110C\u1175\u11AB",
        "\u1109\u1161\u110E\u1169\u11AB",
        "\u1109\u1161\u110E\u116E\u11AB\u1100\u1175",
        "\u1109\u1161\u1110\u1161\u11BC",
        "\u1109\u1161\u1110\u116E\u1105\u1175",
        "\u1109\u1161\u1112\u1173\u11AF",
        "\u1109\u1161\u11AB\u1100\u1175\u11AF",
        "\u1109\u1161\u11AB\u1107\u116E\u110B\u1175\u11AB\u1100\u116A",
        "\u1109\u1161\u11AB\u110B\u1165\u11B8",
        "\u1109\u1161\u11AB\u110E\u1162\u11A8",
        "\u1109\u1161\u11AF\u1105\u1175\u11B7",
        "\u1109\u1161\u11AF\u110B\u1175\u11AB",
        "\u1109\u1161\u11AF\u110D\u1161\u11A8",
        "\u1109\u1161\u11B7\u1100\u1168\u1110\u1161\u11BC",
        "\u1109\u1161\u11B7\u1100\u116E\u11A8",
        "\u1109\u1161\u11B7\u1109\u1175\u11B8",
        "\u1109\u1161\u11B7\u110B\u116F\u11AF",
        "\u1109\u1161\u11B7\u110E\u1169\u11AB",
        "\u1109\u1161\u11BC\u1100\u116A\u11AB",
        "\u1109\u1161\u11BC\u1100\u1173\u11B7",
        "\u1109\u1161\u11BC\u1103\u1162",
        "\u1109\u1161\u11BC\u1105\u1172",
        "\u1109\u1161\u11BC\u1107\u1161\u11AB\u1100\u1175",
        "\u1109\u1161\u11BC\u1109\u1161\u11BC",
        "\u1109\u1161\u11BC\u1109\u1175\u11A8",
        "\u1109\u1161\u11BC\u110B\u1165\u11B8",
        "\u1109\u1161\u11BC\u110B\u1175\u11AB",
        "\u1109\u1161\u11BC\u110C\u1161",
        "\u1109\u1161\u11BC\u110C\u1165\u11B7",
        "\u1109\u1161\u11BC\u110E\u1165",
        "\u1109\u1161\u11BC\u110E\u116E",
        "\u1109\u1161\u11BC\u1110\u1162",
        "\u1109\u1161\u11BC\u1111\u116D",
        "\u1109\u1161\u11BC\u1111\u116E\u11B7",
        "\u1109\u1161\u11BC\u1112\u116A\u11BC",
        "\u1109\u1162\u1107\u1167\u11A8",
        "\u1109\u1162\u11A8\u1101\u1161\u11AF",
        "\u1109\u1162\u11A8\u110B\u1167\u11AB\u1111\u1175\u11AF",
        "\u1109\u1162\u11BC\u1100\u1161\u11A8",
        "\u1109\u1162\u11BC\u1106\u1167\u11BC",
        "\u1109\u1162\u11BC\u1106\u116E\u11AF",
        "\u1109\u1162\u11BC\u1107\u1161\u11BC\u1109\u1169\u11BC",
        "\u1109\u1162\u11BC\u1109\u1161\u11AB",
        "\u1109\u1162\u11BC\u1109\u1165\u11AB",
        "\u1109\u1162\u11BC\u1109\u1175\u11AB",
        "\u1109\u1162\u11BC\u110B\u1175\u11AF",
        "\u1109\u1162\u11BC\u1112\u116A\u11AF",
        "\u1109\u1165\u1105\u1161\u11B8",
        "\u1109\u1165\u1105\u1173\u11AB",
        "\u1109\u1165\u1106\u1167\u11BC",
        "\u1109\u1165\u1106\u1175\u11AB",
        "\u1109\u1165\u1107\u1175\u1109\u1173",
        "\u1109\u1165\u110B\u1163\u11BC",
        "\u1109\u1165\u110B\u116E\u11AF",
        "\u1109\u1165\u110C\u1165\u11A8",
        "\u1109\u1165\u110C\u1165\u11B7",
        "\u1109\u1165\u110D\u1169\u11A8",
        "\u1109\u1165\u110F\u1173\u11AF",
        "\u1109\u1165\u11A8\u1109\u1161",
        "\u1109\u1165\u11A8\u110B\u1172",
        "\u1109\u1165\u11AB\u1100\u1165",
        "\u1109\u1165\u11AB\u1106\u116E\u11AF",
        "\u1109\u1165\u11AB\u1107\u1162",
        "\u1109\u1165\u11AB\u1109\u1162\u11BC",
        "\u1109\u1165\u11AB\u1109\u116E",
        "\u1109\u1165\u11AB\u110B\u116F\u11AB",
        "\u1109\u1165\u11AB\u110C\u1161\u11BC",
        "\u1109\u1165\u11AB\u110C\u1165\u11AB",
        "\u1109\u1165\u11AB\u1110\u1162\u11A8",
        "\u1109\u1165\u11AB\u1111\u116E\u11BC\u1100\u1175",
        "\u1109\u1165\u11AF\u1100\u1165\u110C\u1175",
        "\u1109\u1165\u11AF\u1102\u1161\u11AF",
        "\u1109\u1165\u11AF\u1105\u1165\u11BC\u1110\u1161\u11BC",
        "\u1109\u1165\u11AF\u1106\u1167\u11BC",
        "\u1109\u1165\u11AF\u1106\u116E\u11AB",
        "\u1109\u1165\u11AF\u1109\u1161",
        "\u1109\u1165\u11AF\u110B\u1161\u11A8\u1109\u1161\u11AB",
        "\u1109\u1165\u11AF\u110E\u1175",
        "\u1109\u1165\u11AF\u1110\u1161\u11BC",
        "\u1109\u1165\u11B8\u110A\u1175",
        "\u1109\u1165\u11BC\u1100\u1169\u11BC",
        "\u1109\u1165\u11BC\u1103\u1161\u11BC",
        "\u1109\u1165\u11BC\u1106\u1167\u11BC",
        "\u1109\u1165\u11BC\u1107\u1167\u11AF",
        "\u1109\u1165\u11BC\u110B\u1175\u11AB",
        "\u1109\u1165\u11BC\u110C\u1161\u11BC",
        "\u1109\u1165\u11BC\u110C\u1165\u11A8",
        "\u1109\u1165\u11BC\u110C\u1175\u11AF",
        "\u1109\u1165\u11BC\u1112\u1161\u11B7",
        "\u1109\u1166\u1100\u1173\u11B7",
        "\u1109\u1166\u1106\u1175\u1102\u1161",
        "\u1109\u1166\u1109\u1161\u11BC",
        "\u1109\u1166\u110B\u116F\u11AF",
        "\u1109\u1166\u110C\u1169\u11BC\u1103\u1162\u110B\u116A\u11BC",
        "\u1109\u1166\u1110\u1161\u11A8",
        "\u1109\u1166\u11AB\u1110\u1165",
        "\u1109\u1166\u11AB\u1110\u1175\u1106\u1175\u1110\u1165",
        "\u1109\u1166\u11BA\u110D\u1162",
        "\u1109\u1169\u1100\u1172\u1106\u1169",
        "\u1109\u1169\u1100\u1173\u11A8\u110C\u1165\u11A8",
        "\u1109\u1169\u1100\u1173\u11B7",
        "\u1109\u1169\u1102\u1161\u1100\u1175",
        "\u1109\u1169\u1102\u1167\u11AB",
        "\u1109\u1169\u1103\u1173\u11A8",
        "\u1109\u1169\u1106\u1161\u11BC",
        "\u1109\u1169\u1106\u116E\u11AB",
        "\u1109\u1169\u1109\u1165\u11AF",
        "\u1109\u1169\u1109\u1169\u11A8",
        "\u1109\u1169\u110B\u1161\u1100\u116A",
        "\u1109\u1169\u110B\u116D\u11BC",
        "\u1109\u1169\u110B\u116F\u11AB",
        "\u1109\u1169\u110B\u1173\u11B7",
        "\u1109\u1169\u110C\u116E\u11BC\u1112\u1175",
        "\u1109\u1169\u110C\u1175\u1111\u116E\u11B7",
        "\u1109\u1169\u110C\u1175\u11AF",
        "\u1109\u1169\u1111\u116E\u11BC",
        "\u1109\u1169\u1112\u1167\u11BC",
        "\u1109\u1169\u11A8\u1103\u1161\u11B7",
        "\u1109\u1169\u11A8\u1103\u1169",
        "\u1109\u1169\u11A8\u110B\u1169\u11BA",
        "\u1109\u1169\u11AB\u1100\u1161\u1105\u1161\u11A8",
        "\u1109\u1169\u11AB\u1100\u1175\u11AF",
        "\u1109\u1169\u11AB\u1102\u1167",
        "\u1109\u1169\u11AB\u1102\u1175\u11B7",
        "\u1109\u1169\u11AB\u1103\u1173\u11BC",
        "\u1109\u1169\u11AB\u1106\u1169\u11A8",
        "\u1109\u1169\u11AB\u1108\u1167\u11A8",
        "\u1109\u1169\u11AB\u1109\u1175\u11AF",
        "\u1109\u1169\u11AB\u110C\u1175\u11AF",
        "\u1109\u1169\u11AB\u1110\u1169\u11B8",
        "\u1109\u1169\u11AB\u1112\u1162",
        "\u1109\u1169\u11AF\u110C\u1175\u11A8\u1112\u1175",
        "\u1109\u1169\u11B7\u110A\u1175",
        "\u1109\u1169\u11BC\u110B\u1161\u110C\u1175",
        "\u1109\u1169\u11BC\u110B\u1175",
        "\u1109\u1169\u11BC\u1111\u1167\u11AB",
        "\u1109\u116C\u1100\u1169\u1100\u1175",
        "\u1109\u116D\u1111\u1175\u11BC",
        "\u1109\u116E\u1100\u1165\u11AB",
        "\u1109\u116E\u1102\u1167\u11AB",
        "\u1109\u116E\u1103\u1161\u11AB",
        "\u1109\u116E\u1103\u1169\u11BA\u1106\u116E\u11AF",
        "\u1109\u116E\u1103\u1169\u11BC\u110C\u1165\u11A8",
        "\u1109\u116E\u1106\u1167\u11AB",
        "\u1109\u116E\u1106\u1167\u11BC",
        "\u1109\u116E\u1107\u1161\u11A8",
        "\u1109\u116E\u1109\u1161\u11BC",
        "\u1109\u116E\u1109\u1165\u11A8",
        "\u1109\u116E\u1109\u116E\u11AF",
        "\u1109\u116E\u1109\u1175\u1105\u1169",
        "\u1109\u116E\u110B\u1165\u11B8",
        "\u1109\u116E\u110B\u1167\u11B7",
        "\u1109\u116E\u110B\u1167\u11BC",
        "\u1109\u116E\u110B\u1175\u11B8",
        "\u1109\u116E\u110C\u116E\u11AB",
        "\u1109\u116E\u110C\u1175\u11B8",
        "\u1109\u116E\u110E\u116E\u11AF",
        "\u1109\u116E\u110F\u1165\u11BA",
        "\u1109\u116E\u1111\u1175\u11AF",
        "\u1109\u116E\u1112\u1161\u11A8",
        "\u1109\u116E\u1112\u1165\u11B7\u1109\u1162\u11BC",
        "\u1109\u116E\u1112\u116A\u1100\u1175",
        "\u1109\u116E\u11A8\u1102\u1167",
        "\u1109\u116E\u11A8\u1109\u1169",
        "\u1109\u116E\u11A8\u110C\u1166",
        "\u1109\u116E\u11AB\u1100\u1161\u11AB",
        "\u1109\u116E\u11AB\u1109\u1165",
        "\u1109\u116E\u11AB\u1109\u116E",
        "\u1109\u116E\u11AB\u1109\u1175\u11A8\u1100\u1161\u11AB",
        "\u1109\u116E\u11AB\u110B\u1171",
        "\u1109\u116E\u11AE\u1100\u1161\u1105\u1161\u11A8",
        "\u1109\u116E\u11AF\u1107\u1167\u11BC",
        "\u1109\u116E\u11AF\u110C\u1175\u11B8",
        "\u1109\u116E\u11BA\u110C\u1161",
        "\u1109\u1173\u1102\u1175\u11B7",
        "\u1109\u1173\u1106\u116E\u11AF",
        "\u1109\u1173\u1109\u1173\u1105\u1169",
        "\u1109\u1173\u1109\u1173\u11BC",
        "\u1109\u1173\u110B\u1170\u1110\u1165",
        "\u1109\u1173\u110B\u1171\u110E\u1175",
        "\u1109\u1173\u110F\u1166\u110B\u1175\u1110\u1173",
        "\u1109\u1173\u1110\u1172\u1103\u1175\u110B\u1169",
        "\u1109\u1173\u1110\u1173\u1105\u1166\u1109\u1173",
        "\u1109\u1173\u1111\u1169\u110E\u1173",
        "\u1109\u1173\u11AF\u110D\u1165\u11A8",
        "\u1109\u1173\u11AF\u1111\u1173\u11B7",
        "\u1109\u1173\u11B8\u1100\u116A\u11AB",
        "\u1109\u1173\u11B8\u1100\u1175",
        "\u1109\u1173\u11BC\u1100\u1162\u11A8",
        "\u1109\u1173\u11BC\u1105\u1175",
        "\u1109\u1173\u11BC\u1107\u116E",
        "\u1109\u1173\u11BC\u110B\u116D\u11BC\u110E\u1161",
        "\u1109\u1173\u11BC\u110C\u1175\u11AB",
        "\u1109\u1175\u1100\u1161\u11A8",
        "\u1109\u1175\u1100\u1161\u11AB",
        "\u1109\u1175\u1100\u1169\u11AF",
        "\u1109\u1175\u1100\u1173\u11B7\u110E\u1175",
        "\u1109\u1175\u1102\u1161\u1105\u1175\u110B\u1169",
        "\u1109\u1175\u1103\u1162\u11A8",
        "\u1109\u1175\u1105\u1175\u110C\u1173",
        "\u1109\u1175\u1106\u1166\u11AB\u1110\u1173",
        "\u1109\u1175\u1106\u1175\u11AB",
        "\u1109\u1175\u1107\u116E\u1106\u1169",
        "\u1109\u1175\u1109\u1165\u11AB",
        "\u1109\u1175\u1109\u1165\u11AF",
        "\u1109\u1175\u1109\u1173\u1110\u1166\u11B7",
        "\u1109\u1175\u110B\u1161\u1107\u1165\u110C\u1175",
        "\u1109\u1175\u110B\u1165\u1106\u1165\u1102\u1175",
        "\u1109\u1175\u110B\u116F\u11AF",
        "\u1109\u1175\u110B\u1175\u11AB",
        "\u1109\u1175\u110B\u1175\u11AF",
        "\u1109\u1175\u110C\u1161\u11A8",
        "\u1109\u1175\u110C\u1161\u11BC",
        "\u1109\u1175\u110C\u1165\u11AF",
        "\u1109\u1175\u110C\u1165\u11B7",
        "\u1109\u1175\u110C\u116E\u11BC",
        "\u1109\u1175\u110C\u1173\u11AB",
        "\u1109\u1175\u110C\u1175\u11B8",
        "\u1109\u1175\u110E\u1165\u11BC",
        "\u1109\u1175\u1112\u1161\u11B8",
        "\u1109\u1175\u1112\u1165\u11B7",
        "\u1109\u1175\u11A8\u1100\u116E",
        "\u1109\u1175\u11A8\u1100\u1175",
        "\u1109\u1175\u11A8\u1103\u1161\u11BC",
        "\u1109\u1175\u11A8\u1105\u1163\u11BC",
        "\u1109\u1175\u11A8\u1105\u116D\u1111\u116E\u11B7",
        "\u1109\u1175\u11A8\u1106\u116E\u11AF",
        "\u1109\u1175\u11A8\u1108\u1161\u11BC",
        "\u1109\u1175\u11A8\u1109\u1161",
        "\u1109\u1175\u11A8\u1109\u1162\u11BC\u1112\u116A\u11AF",
        "\u1109\u1175\u11A8\u110E\u1169",
        "\u1109\u1175\u11A8\u1110\u1161\u11A8",
        "\u1109\u1175\u11A8\u1111\u116E\u11B7",
        "\u1109\u1175\u11AB\u1100\u1169",
        "\u1109\u1175\u11AB\u1100\u1172",
        "\u1109\u1175\u11AB\u1102\u1167\u11B7",
        "\u1109\u1175\u11AB\u1106\u116E\u11AB",
        "\u1109\u1175\u11AB\u1107\u1161\u11AF",
        "\u1109\u1175\u11AB\u1107\u1175",
        "\u1109\u1175\u11AB\u1109\u1161",
        "\u1109\u1175\u11AB\u1109\u1166",
        "\u1109\u1175\u11AB\u110B\u116D\u11BC",
        "\u1109\u1175\u11AB\u110C\u1166\u1111\u116E\u11B7",
        "\u1109\u1175\u11AB\u110E\u1165\u11BC",
        "\u1109\u1175\u11AB\u110E\u1166",
        "\u1109\u1175\u11AB\u1112\u116A",
        "\u1109\u1175\u11AF\u1100\u1161\u11B7",
        "\u1109\u1175\u11AF\u1102\u1162",
        "\u1109\u1175\u11AF\u1105\u1167\u11A8",
        "\u1109\u1175\u11AF\u1105\u1168",
        "\u1109\u1175\u11AF\u1106\u1161\u11BC",
        "\u1109\u1175\u11AF\u1109\u116E",
        "\u1109\u1175\u11AF\u1109\u1173\u11B8",
        "\u1109\u1175\u11AF\u1109\u1175",
        "\u1109\u1175\u11AF\u110C\u1161\u11BC",
        "\u1109\u1175\u11AF\u110C\u1165\u11BC",
        "\u1109\u1175\u11AF\u110C\u1175\u11AF\u110C\u1165\u11A8",
        "\u1109\u1175\u11AF\u110E\u1165\u11AB",
        "\u1109\u1175\u11AF\u110E\u1166",
        "\u1109\u1175\u11AF\u110F\u1165\u11BA",
        "\u1109\u1175\u11AF\u1110\u1162",
        "\u1109\u1175\u11AF\u1111\u1162",
        "\u1109\u1175\u11AF\u1112\u1165\u11B7",
        "\u1109\u1175\u11AF\u1112\u1167\u11AB",
        "\u1109\u1175\u11B7\u1105\u1175",
        "\u1109\u1175\u11B7\u1107\u116E\u1105\u1173\u11B7",
        "\u1109\u1175\u11B7\u1109\u1161",
        "\u1109\u1175\u11B7\u110C\u1161\u11BC",
        "\u1109\u1175\u11B7\u110C\u1165\u11BC",
        "\u1109\u1175\u11B7\u1111\u1161\u11AB",
        "\u110A\u1161\u11BC\u1103\u116E\u11BC\u110B\u1175",
        "\u110A\u1175\u1105\u1173\u11B7",
        "\u110A\u1175\u110B\u1161\u11BA",
        "\u110B\u1161\u1100\u1161\u110A\u1175",
        "\u110B\u1161\u1102\u1161\u110B\u116E\u11AB\u1109\u1165",
        "\u110B\u1161\u1103\u1173\u1102\u1175\u11B7",
        "\u110B\u1161\u1103\u1173\u11AF",
        "\u110B\u1161\u1109\u1171\u110B\u116E\u11B7",
        "\u110B\u1161\u1109\u1173\u1111\u1161\u11AF\u1110\u1173",
        "\u110B\u1161\u1109\u1175\u110B\u1161",
        "\u110B\u1161\u110B\u116E\u11AF\u1105\u1165",
        "\u110B\u1161\u110C\u1165\u110A\u1175",
        "\u110B\u1161\u110C\u116E\u11B7\u1106\u1161",
        "\u110B\u1161\u110C\u1175\u11A8",
        "\u110B\u1161\u110E\u1175\u11B7",
        "\u110B\u1161\u1111\u1161\u1110\u1173",
        "\u110B\u1161\u1111\u1173\u1105\u1175\u110F\u1161",
        "\u110B\u1161\u1111\u1173\u11B7",
        "\u110B\u1161\u1112\u1169\u11B8",
        "\u110B\u1161\u1112\u1173\u11AB",
        "\u110B\u1161\u11A8\u1100\u1175",
        "\u110B\u1161\u11A8\u1106\u1169\u11BC",
        "\u110B\u1161\u11A8\u1109\u116E",
        "\u110B\u1161\u11AB\u1100\u1162",
        "\u110B\u1161\u11AB\u1100\u1167\u11BC",
        "\u110B\u1161\u11AB\u1100\u116A",
        "\u110B\u1161\u11AB\u1102\u1162",
        "\u110B\u1161\u11AB\u1102\u1167\u11BC",
        "\u110B\u1161\u11AB\u1103\u1169\u11BC",
        "\u110B\u1161\u11AB\u1107\u1161\u11BC",
        "\u110B\u1161\u11AB\u1107\u116E",
        "\u110B\u1161\u11AB\u110C\u116E",
        "\u110B\u1161\u11AF\u1105\u116E\u1106\u1175\u1102\u1172\u11B7",
        "\u110B\u1161\u11AF\u110F\u1169\u110B\u1169\u11AF",
        "\u110B\u1161\u11B7\u1109\u1175",
        "\u110B\u1161\u11B7\u110F\u1165\u11BA",
        "\u110B\u1161\u11B8\u1105\u1167\u11A8",
        "\u110B\u1161\u11C1\u1102\u1161\u11AF",
        "\u110B\u1161\u11C1\u1106\u116E\u11AB",
        "\u110B\u1162\u110B\u1175\u11AB",
        "\u110B\u1162\u110C\u1165\u11BC",
        "\u110B\u1162\u11A8\u1109\u116E",
        "\u110B\u1162\u11AF\u1107\u1165\u11B7",
        "\u110B\u1163\u1100\u1161\u11AB",
        "\u110B\u1163\u1103\u1161\u11AB",
        "\u110B\u1163\u110B\u1169\u11BC",
        "\u110B\u1163\u11A8\u1100\u1161\u11AB",
        "\u110B\u1163\u11A8\u1100\u116E\u11A8",
        "\u110B\u1163\u11A8\u1109\u1169\u11A8",
        "\u110B\u1163\u11A8\u1109\u116E",
        "\u110B\u1163\u11A8\u110C\u1165\u11B7",
        "\u110B\u1163\u11A8\u1111\u116E\u11B7",
        "\u110B\u1163\u11A8\u1112\u1169\u11AB\u1102\u1167",
        "\u110B\u1163\u11BC\u1102\u1167\u11B7",
        "\u110B\u1163\u11BC\u1105\u1167\u11A8",
        "\u110B\u1163\u11BC\u1106\u1161\u11AF",
        "\u110B\u1163\u11BC\u1107\u1162\u110E\u116E",
        "\u110B\u1163\u11BC\u110C\u116E",
        "\u110B\u1163\u11BC\u1111\u1161",
        "\u110B\u1165\u1103\u116E\u11B7",
        "\u110B\u1165\u1105\u1167\u110B\u116E\u11B7",
        "\u110B\u1165\u1105\u1173\u11AB",
        "\u110B\u1165\u110C\u1166\u11BA\u1107\u1161\u11B7",
        "\u110B\u1165\u110D\u1162\u11BB\u1103\u1173\u11AB",
        "\u110B\u1165\u110D\u1165\u1103\u1161\u1100\u1161",
        "\u110B\u1165\u110D\u1165\u11AB\u110C\u1175",
        "\u110B\u1165\u11AB\u1102\u1175",
        "\u110B\u1165\u11AB\u1103\u1165\u11A8",
        "\u110B\u1165\u11AB\u1105\u1169\u11AB",
        "\u110B\u1165\u11AB\u110B\u1165",
        "\u110B\u1165\u11AF\u1100\u116E\u11AF",
        "\u110B\u1165\u11AF\u1105\u1173\u11AB",
        "\u110B\u1165\u11AF\u110B\u1173\u11B7",
        "\u110B\u1165\u11AF\u1111\u1175\u11BA",
        "\u110B\u1165\u11B7\u1106\u1161",
        "\u110B\u1165\u11B8\u1106\u116E",
        "\u110B\u1165\u11B8\u110C\u1169\u11BC",
        "\u110B\u1165\u11B8\u110E\u1166",
        "\u110B\u1165\u11BC\u1103\u1165\u11BC\u110B\u1175",
        "\u110B\u1165\u11BC\u1106\u1161\u11BC",
        "\u110B\u1165\u11BC\u1110\u1165\u1105\u1175",
        "\u110B\u1165\u11BD\u1100\u1173\u110C\u1166",
        "\u110B\u1166\u1102\u1165\u110C\u1175",
        "\u110B\u1166\u110B\u1165\u110F\u1165\u11AB",
        "\u110B\u1166\u11AB\u110C\u1175\u11AB",
        "\u110B\u1167\u1100\u1165\u11AB",
        "\u110B\u1167\u1100\u1169\u1109\u1162\u11BC",
        "\u110B\u1167\u1100\u116A\u11AB",
        "\u110B\u1167\u1100\u116E\u11AB",
        "\u110B\u1167\u1100\u116F\u11AB",
        "\u110B\u1167\u1103\u1162\u1109\u1162\u11BC",
        "\u110B\u1167\u1103\u1165\u11B2",
        "\u110B\u1167\u1103\u1169\u11BC\u1109\u1162\u11BC",
        "\u110B\u1167\u1103\u1173\u11AB",
        "\u110B\u1167\u1105\u1169\u11AB",
        "\u110B\u1167\u1105\u1173\u11B7",
        "\u110B\u1167\u1109\u1165\u11BA",
        "\u110B\u1167\u1109\u1165\u11BC",
        "\u110B\u1167\u110B\u116A\u11BC",
        "\u110B\u1167\u110B\u1175\u11AB",
        "\u110B\u1167\u110C\u1165\u11AB\u1112\u1175",
        "\u110B\u1167\u110C\u1175\u11A8\u110B\u116F\u11AB",
        "\u110B\u1167\u1112\u1161\u11A8\u1109\u1162\u11BC",
        "\u110B\u1167\u1112\u1162\u11BC",
        "\u110B\u1167\u11A8\u1109\u1161",
        "\u110B\u1167\u11A8\u1109\u1175",
        "\u110B\u1167\u11A8\u1112\u1161\u11AF",
        "\u110B\u1167\u11AB\u1100\u1167\u11AF",
        "\u110B\u1167\u11AB\u1100\u116E",
        "\u110B\u1167\u11AB\u1100\u1173\u11A8",
        "\u110B\u1167\u11AB\u1100\u1175",
        "\u110B\u1167\u11AB\u1105\u1161\u11A8",
        "\u110B\u1167\u11AB\u1109\u1165\u11AF",
        "\u110B\u1167\u11AB\u1109\u1166",
        "\u110B\u1167\u11AB\u1109\u1169\u11A8",
        "\u110B\u1167\u11AB\u1109\u1173\u11B8",
        "\u110B\u1167\u11AB\u110B\u1162",
        "\u110B\u1167\u11AB\u110B\u1168\u110B\u1175\u11AB",
        "\u110B\u1167\u11AB\u110B\u1175\u11AB",
        "\u110B\u1167\u11AB\u110C\u1161\u11BC",
        "\u110B\u1167\u11AB\u110C\u116E",
        "\u110B\u1167\u11AB\u110E\u116E\u11AF",
        "\u110B\u1167\u11AB\u1111\u1175\u11AF",
        "\u110B\u1167\u11AB\u1112\u1161\u11B8",
        "\u110B\u1167\u11AB\u1112\u1172",
        "\u110B\u1167\u11AF\u1100\u1175",
        "\u110B\u1167\u11AF\u1106\u1162",
        "\u110B\u1167\u11AF\u1109\u116C",
        "\u110B\u1167\u11AF\u1109\u1175\u11B7\u1112\u1175",
        "\u110B\u1167\u11AF\u110C\u1165\u11BC",
        "\u110B\u1167\u11AF\u110E\u1161",
        "\u110B\u1167\u11AF\u1112\u1173\u11AF",
        "\u110B\u1167\u11B7\u1105\u1167",
        "\u110B\u1167\u11B8\u1109\u1165",
        "\u110B\u1167\u11BC\u1100\u116E\u11A8",
        "\u110B\u1167\u11BC\u1102\u1161\u11B7",
        "\u110B\u1167\u11BC\u1109\u1161\u11BC",
        "\u110B\u1167\u11BC\u110B\u1163\u11BC",
        "\u110B\u1167\u11BC\u110B\u1167\u11A8",
        "\u110B\u1167\u11BC\u110B\u116E\u11BC",
        "\u110B\u1167\u11BC\u110B\u116F\u11AB\u1112\u1175",
        "\u110B\u1167\u11BC\u1112\u1161",
        "\u110B\u1167\u11BC\u1112\u1163\u11BC",
        "\u110B\u1167\u11BC\u1112\u1169\u11AB",
        "\u110B\u1167\u11BC\u1112\u116A",
        "\u110B\u1167\u11C1\u1100\u116E\u1105\u1175",
        "\u110B\u1167\u11C1\u1107\u1161\u11BC",
        "\u110B\u1167\u11C1\u110C\u1175\u11B8",
        "\u110B\u1168\u1100\u1161\u11B7",
        "\u110B\u1168\u1100\u1173\u11B7",
        "\u110B\u1168\u1107\u1161\u11BC",
        "\u110B\u1168\u1109\u1161\u11AB",
        "\u110B\u1168\u1109\u1161\u11BC",
        "\u110B\u1168\u1109\u1165\u11AB",
        "\u110B\u1168\u1109\u116E\u11AF",
        "\u110B\u1168\u1109\u1173\u11B8",
        "\u110B\u1168\u1109\u1175\u11A8\u110C\u1161\u11BC",
        "\u110B\u1168\u110B\u1163\u11A8",
        "\u110B\u1168\u110C\u1165\u11AB",
        "\u110B\u1168\u110C\u1165\u11AF",
        "\u110B\u1168\u110C\u1165\u11BC",
        "\u110B\u1168\u110F\u1165\u11AB\u1103\u1162",
        "\u110B\u1168\u11BA\u1102\u1161\u11AF",
        "\u110B\u1169\u1102\u1173\u11AF",
        "\u110B\u1169\u1105\u1161\u11A8",
        "\u110B\u1169\u1105\u1162\u11BA\u1103\u1169\u11BC\u110B\u1161\u11AB",
        "\u110B\u1169\u1105\u1166\u11AB\u110C\u1175",
        "\u110B\u1169\u1105\u1169\u110C\u1175",
        "\u110B\u1169\u1105\u1173\u11AB\u1107\u1161\u11AF",
        "\u110B\u1169\u1107\u1173\u11AB",
        "\u110B\u1169\u1109\u1175\u11B8",
        "\u110B\u1169\u110B\u1167\u11B7",
        "\u110B\u1169\u110B\u116F\u11AF",
        "\u110B\u1169\u110C\u1165\u11AB",
        "\u110B\u1169\u110C\u1175\u11A8",
        "\u110B\u1169\u110C\u1175\u11BC\u110B\u1165",
        "\u110B\u1169\u1111\u1166\u1105\u1161",
        "\u110B\u1169\u1111\u1175\u1109\u1173\u1110\u1166\u11AF",
        "\u110B\u1169\u1112\u1175\u1105\u1167",
        "\u110B\u1169\u11A8\u1109\u1161\u11BC",
        "\u110B\u1169\u11A8\u1109\u116E\u1109\u116E",
        "\u110B\u1169\u11AB\u1100\u1161\u11BD",
        "\u110B\u1169\u11AB\u1105\u1161\u110B\u1175\u11AB",
        "\u110B\u1169\u11AB\u1106\u1169\u11B7",
        "\u110B\u1169\u11AB\u110C\u1169\u11BC\u110B\u1175\u11AF",
        "\u110B\u1169\u11AB\u1110\u1169\u11BC",
        "\u110B\u1169\u11AF\u1100\u1161\u110B\u1173\u11AF",
        "\u110B\u1169\u11AF\u1105\u1175\u11B7\u1111\u1175\u11A8",
        "\u110B\u1169\u11AF\u1112\u1162",
        "\u110B\u1169\u11BA\u110E\u1161\u1105\u1175\u11B7",
        "\u110B\u116A\u110B\u1175\u1109\u1167\u110E\u1173",
        "\u110B\u116A\u110B\u1175\u11AB",
        "\u110B\u116A\u11AB\u1109\u1165\u11BC",
        "\u110B\u116A\u11AB\u110C\u1165\u11AB",
        "\u110B\u116A\u11BC\u1107\u1175",
        "\u110B\u116A\u11BC\u110C\u1161",
        "\u110B\u116B\u1102\u1163\u1112\u1161\u1106\u1167\u11AB",
        "\u110B\u116B\u11AB\u110C\u1175",
        "\u110B\u116C\u1100\u1161\u11BA\u110C\u1175\u11B8",
        "\u110B\u116C\u1100\u116E\u11A8",
        "\u110B\u116C\u1105\u1169\u110B\u116E\u11B7",
        "\u110B\u116C\u1109\u1161\u11B7\u110E\u1169\u11AB",
        "\u110B\u116C\u110E\u116E\u11AF",
        "\u110B\u116C\u110E\u1175\u11B7",
        "\u110B\u116C\u1112\u1161\u11AF\u1106\u1165\u1102\u1175",
        "\u110B\u116C\u11AB\u1107\u1161\u11AF",
        "\u110B\u116C\u11AB\u1109\u1169\u11AB",
        "\u110B\u116C\u11AB\u110D\u1169\u11A8",
        "\u110B\u116D\u1100\u1173\u11B7",
        "\u110B\u116D\u110B\u1175\u11AF",
        "\u110B\u116D\u110C\u1173\u11B7",
        "\u110B\u116D\u110E\u1165\u11BC",
        "\u110B\u116D\u11BC\u1100\u1175",
        "\u110B\u116D\u11BC\u1109\u1165",
        "\u110B\u116D\u11BC\u110B\u1165",
        "\u110B\u116E\u1109\u1161\u11AB",
        "\u110B\u116E\u1109\u1165\u11AB",
        "\u110B\u116E\u1109\u1173\u11BC",
        "\u110B\u116E\u110B\u1167\u11AB\u1112\u1175",
        "\u110B\u116E\u110C\u1165\u11BC",
        "\u110B\u116E\u110E\u1166\u1100\u116E\u11A8",
        "\u110B\u116E\u1111\u1167\u11AB",
        "\u110B\u116E\u11AB\u1103\u1169\u11BC",
        "\u110B\u116E\u11AB\u1106\u1167\u11BC",
        "\u110B\u116E\u11AB\u1107\u1161\u11AB",
        "\u110B\u116E\u11AB\u110C\u1165\u11AB",
        "\u110B\u116E\u11AB\u1112\u1162\u11BC",
        "\u110B\u116E\u11AF\u1109\u1161\u11AB",
        "\u110B\u116E\u11AF\u110B\u1173\u11B7",
        "\u110B\u116E\u11B7\u110C\u1175\u11A8\u110B\u1175\u11B7",
        "\u110B\u116E\u11BA\u110B\u1165\u1105\u1173\u11AB",
        "\u110B\u116E\u11BA\u110B\u1173\u11B7",
        "\u110B\u116F\u1102\u1161\u11A8",
        "\u110B\u116F\u11AB\u1100\u1169",
        "\u110B\u116F\u11AB\u1105\u1162",
        "\u110B\u116F\u11AB\u1109\u1165",
        "\u110B\u116F\u11AB\u1109\u116E\u11BC\u110B\u1175",
        "\u110B\u116F\u11AB\u110B\u1175\u11AB",
        "\u110B\u116F\u11AB\u110C\u1161\u11BC",
        "\u110B\u116F\u11AB\u1111\u1175\u1109\u1173",
        "\u110B\u116F\u11AF\u1100\u1173\u11B8",
        "\u110B\u116F\u11AF\u1103\u1173\u110F\u1165\u11B8",
        "\u110B\u116F\u11AF\u1109\u1166",
        "\u110B\u116F\u11AF\u110B\u116D\u110B\u1175\u11AF",
        "\u110B\u1170\u110B\u1175\u1110\u1165",
        "\u110B\u1171\u1107\u1161\u11AB",
        "\u110B\u1171\u1107\u1165\u11B8",
        "\u110B\u1171\u1109\u1165\u11BC",
        "\u110B\u1171\u110B\u116F\u11AB",
        "\u110B\u1171\u1112\u1165\u11B7",
        "\u110B\u1171\u1112\u1167\u11B8",
        "\u110B\u1171\u11BA\u1109\u1161\u1105\u1161\u11B7",
        "\u110B\u1172\u1102\u1161\u11AB\u1112\u1175",
        "\u110B\u1172\u1105\u1165\u11B8",
        "\u110B\u1172\u1106\u1167\u11BC",
        "\u110B\u1172\u1106\u116E\u11AF",
        "\u110B\u1172\u1109\u1161\u11AB",
        "\u110B\u1172\u110C\u1165\u11A8",
        "\u110B\u1172\u110E\u1175\u110B\u116F\u11AB",
        "\u110B\u1172\u1112\u1161\u11A8",
        "\u110B\u1172\u1112\u1162\u11BC",
        "\u110B\u1172\u1112\u1167\u11BC",
        "\u110B\u1172\u11A8\u1100\u116E\u11AB",
        "\u110B\u1172\u11A8\u1109\u1161\u11BC",
        "\u110B\u1172\u11A8\u1109\u1175\u11B8",
        "\u110B\u1172\u11A8\u110E\u1166",
        "\u110B\u1173\u11AB\u1112\u1162\u11BC",
        "\u110B\u1173\u11B7\u1105\u1167\u11A8",
        "\u110B\u1173\u11B7\u1105\u116D",
        "\u110B\u1173\u11B7\u1107\u1161\u11AB",
        "\u110B\u1173\u11B7\u1109\u1165\u11BC",
        "\u110B\u1173\u11B7\u1109\u1175\u11A8",
        "\u110B\u1173\u11B7\u110B\u1161\u11A8",
        "\u110B\u1173\u11B7\u110C\u116E",
        "\u110B\u1174\u1100\u1167\u11AB",
        "\u110B\u1174\u1102\u1169\u11AB",
        "\u110B\u1174\u1106\u116E\u11AB",
        "\u110B\u1174\u1107\u1169\u11A8",
        "\u110B\u1174\u1109\u1175\u11A8",
        "\u110B\u1174\u1109\u1175\u11B7",
        "\u110B\u1174\u110B\u116C\u1105\u1169",
        "\u110B\u1174\u110B\u116D\u11A8",
        "\u110B\u1174\u110B\u116F\u11AB",
        "\u110B\u1174\u1112\u1161\u11A8",
        "\u110B\u1175\u1100\u1165\u11BA",
        "\u110B\u1175\u1100\u1169\u11BA",
        "\u110B\u1175\u1102\u1167\u11B7",
        "\u110B\u1175\u1102\u1169\u11B7",
        "\u110B\u1175\u1103\u1161\u11AF",
        "\u110B\u1175\u1103\u1162\u1105\u1169",
        "\u110B\u1175\u1103\u1169\u11BC",
        "\u110B\u1175\u1105\u1165\u11C2\u1100\u1166",
        "\u110B\u1175\u1105\u1167\u11A8\u1109\u1165",
        "\u110B\u1175\u1105\u1169\u11AB\u110C\u1165\u11A8",
        "\u110B\u1175\u1105\u1173\u11B7",
        "\u110B\u1175\u1106\u1175\u11AB",
        "\u110B\u1175\u1107\u1161\u11AF\u1109\u1169",
        "\u110B\u1175\u1107\u1167\u11AF",
        "\u110B\u1175\u1107\u116E\u11AF",
        "\u110B\u1175\u1108\u1161\u11AF",
        "\u110B\u1175\u1109\u1161\u11BC",
        "\u110B\u1175\u1109\u1165\u11BC",
        "\u110B\u1175\u1109\u1173\u11AF",
        "\u110B\u1175\u110B\u1163\u1100\u1175",
        "\u110B\u1175\u110B\u116D\u11BC",
        "\u110B\u1175\u110B\u116E\u11BA",
        "\u110B\u1175\u110B\u116F\u11AF",
        "\u110B\u1175\u110B\u1173\u11A8\u1100\u1169",
        "\u110B\u1175\u110B\u1175\u11A8",
        "\u110B\u1175\u110C\u1165\u11AB",
        "\u110B\u1175\u110C\u116E\u11BC",
        "\u110B\u1175\u1110\u1173\u11AE\u1102\u1161\u11AF",
        "\u110B\u1175\u1110\u1173\u11AF",
        "\u110B\u1175\u1112\u1169\u11AB",
        "\u110B\u1175\u11AB\u1100\u1161\u11AB",
        "\u110B\u1175\u11AB\u1100\u1167\u11A8",
        "\u110B\u1175\u11AB\u1100\u1169\u11BC",
        "\u110B\u1175\u11AB\u1100\u116E",
        "\u110B\u1175\u11AB\u1100\u1173\u11AB",
        "\u110B\u1175\u11AB\u1100\u1175",
        "\u110B\u1175\u11AB\u1103\u1169",
        "\u110B\u1175\u11AB\u1105\u1172",
        "\u110B\u1175\u11AB\u1106\u116E\u11AF",
        "\u110B\u1175\u11AB\u1109\u1162\u11BC",
        "\u110B\u1175\u11AB\u1109\u116B",
        "\u110B\u1175\u11AB\u110B\u1167\u11AB",
        "\u110B\u1175\u11AB\u110B\u116F\u11AB",
        "\u110B\u1175\u11AB\u110C\u1162",
        "\u110B\u1175\u11AB\u110C\u1169\u11BC",
        "\u110B\u1175\u11AB\u110E\u1165\u11AB",
        "\u110B\u1175\u11AB\u110E\u1166",
        "\u110B\u1175\u11AB\u1110\u1165\u1102\u1166\u11BA",
        "\u110B\u1175\u11AB\u1112\u1161",
        "\u110B\u1175\u11AB\u1112\u1167\u11BC",
        "\u110B\u1175\u11AF\u1100\u1169\u11B8",
        "\u110B\u1175\u11AF\u1100\u1175",
        "\u110B\u1175\u11AF\u1103\u1161\u11AB",
        "\u110B\u1175\u11AF\u1103\u1162",
        "\u110B\u1175\u11AF\u1103\u1173\u11BC",
        "\u110B\u1175\u11AF\u1107\u1161\u11AB",
        "\u110B\u1175\u11AF\u1107\u1169\u11AB",
        "\u110B\u1175\u11AF\u1107\u116E",
        "\u110B\u1175\u11AF\u1109\u1161\u11BC",
        "\u110B\u1175\u11AF\u1109\u1162\u11BC",
        "\u110B\u1175\u11AF\u1109\u1169\u11AB",
        "\u110B\u1175\u11AF\u110B\u116D\u110B\u1175\u11AF",
        "\u110B\u1175\u11AF\u110B\u116F\u11AF",
        "\u110B\u1175\u11AF\u110C\u1165\u11BC",
        "\u110B\u1175\u11AF\u110C\u1169\u11BC",
        "\u110B\u1175\u11AF\u110C\u116E\u110B\u1175\u11AF",
        "\u110B\u1175\u11AF\u110D\u1175\u11A8",
        "\u110B\u1175\u11AF\u110E\u1166",
        "\u110B\u1175\u11AF\u110E\u1175",
        "\u110B\u1175\u11AF\u1112\u1162\u11BC",
        "\u110B\u1175\u11AF\u1112\u116C\u110B\u116D\u11BC",
        "\u110B\u1175\u11B7\u1100\u1173\u11B7",
        "\u110B\u1175\u11B7\u1106\u116E",
        "\u110B\u1175\u11B8\u1103\u1162",
        "\u110B\u1175\u11B8\u1105\u1167\u11A8",
        "\u110B\u1175\u11B8\u1106\u1161\u11BA",
        "\u110B\u1175\u11B8\u1109\u1161",
        "\u110B\u1175\u11B8\u1109\u116E\u11AF",
        "\u110B\u1175\u11B8\u1109\u1175",
        "\u110B\u1175\u11B8\u110B\u116F\u11AB",
        "\u110B\u1175\u11B8\u110C\u1161\u11BC",
        "\u110B\u1175\u11B8\u1112\u1161\u11A8",
        "\u110C\u1161\u1100\u1161\u110B\u116D\u11BC",
        "\u110C\u1161\u1100\u1167\u11A8",
        "\u110C\u1161\u1100\u1173\u11A8",
        "\u110C\u1161\u1103\u1169\u11BC",
        "\u110C\u1161\u1105\u1161\u11BC",
        "\u110C\u1161\u1107\u116E\u1109\u1175\u11B7",
        "\u110C\u1161\u1109\u1175\u11A8",
        "\u110C\u1161\u1109\u1175\u11AB",
        "\u110C\u1161\u110B\u1167\u11AB",
        "\u110C\u1161\u110B\u116F\u11AB",
        "\u110C\u1161\u110B\u1172\u11AF",
        "\u110C\u1161\u110C\u1165\u11AB\u1100\u1165",
        "\u110C\u1161\u110C\u1165\u11BC",
        "\u110C\u1161\u110C\u1169\u11AB\u1109\u1175\u11B7",
        "\u110C\u1161\u1111\u1161\u11AB",
        "\u110C\u1161\u11A8\u1100\u1161",
        "\u110C\u1161\u11A8\u1102\u1167\u11AB",
        "\u110C\u1161\u11A8\u1109\u1165\u11BC",
        "\u110C\u1161\u11A8\u110B\u1165\u11B8",
        "\u110C\u1161\u11A8\u110B\u116D\u11BC",
        "\u110C\u1161\u11A8\u110B\u1173\u11AB\u1104\u1161\u11AF",
        "\u110C\u1161\u11A8\u1111\u116E\u11B7",
        "\u110C\u1161\u11AB\u1103\u1175",
        "\u110C\u1161\u11AB\u1104\u1173\u11A8",
        "\u110C\u1161\u11AB\u110E\u1175",
        "\u110C\u1161\u11AF\u1106\u1169\u11BA",
        "\u110C\u1161\u11B7\u1101\u1161\u11AB",
        "\u110C\u1161\u11B7\u1109\u116E\u1112\u1161\u11B7",
        "\u110C\u1161\u11B7\u1109\u1175",
        "\u110C\u1161\u11B7\u110B\u1169\u11BA",
        "\u110C\u1161\u11B7\u110C\u1161\u1105\u1175",
        "\u110C\u1161\u11B8\u110C\u1175",
        "\u110C\u1161\u11BC\u1100\u116A\u11AB",
        "\u110C\u1161\u11BC\u1100\u116E\u11AB",
        "\u110C\u1161\u11BC\u1100\u1175\u1100\u1161\u11AB",
        "\u110C\u1161\u11BC\u1105\u1162",
        "\u110C\u1161\u11BC\u1105\u1168",
        "\u110C\u1161\u11BC\u1105\u1173",
        "\u110C\u1161\u11BC\u1106\u1161",
        "\u110C\u1161\u11BC\u1106\u1167\u11AB",
        "\u110C\u1161\u11BC\u1106\u1169",
        "\u110C\u1161\u11BC\u1106\u1175",
        "\u110C\u1161\u11BC\u1107\u1175",
        "\u110C\u1161\u11BC\u1109\u1161",
        "\u110C\u1161\u11BC\u1109\u1169",
        "\u110C\u1161\u11BC\u1109\u1175\u11A8",
        "\u110C\u1161\u11BC\u110B\u1162\u110B\u1175\u11AB",
        "\u110C\u1161\u11BC\u110B\u1175\u11AB",
        "\u110C\u1161\u11BC\u110C\u1165\u11B7",
        "\u110C\u1161\u11BC\u110E\u1161",
        "\u110C\u1161\u11BC\u1112\u1161\u11A8\u1100\u1173\u11B7",
        "\u110C\u1162\u1102\u1173\u11BC",
        "\u110C\u1162\u1108\u1161\u11AF\u1105\u1175",
        "\u110C\u1162\u1109\u1161\u11AB",
        "\u110C\u1162\u1109\u1162\u11BC",
        "\u110C\u1162\u110C\u1161\u11A8\u1102\u1167\u11AB",
        "\u110C\u1162\u110C\u1165\u11BC",
        "\u110C\u1162\u110E\u1162\u1100\u1175",
        "\u110C\u1162\u1111\u1161\u11AB",
        "\u110C\u1162\u1112\u1161\u11A8",
        "\u110C\u1162\u1112\u116A\u11AF\u110B\u116D\u11BC",
        "\u110C\u1165\u1100\u1165\u11BA",
        "\u110C\u1165\u1100\u1169\u1105\u1175",
        "\u110C\u1165\u1100\u1169\u11BA",
        "\u110C\u1165\u1102\u1167\u11A8",
        "\u110C\u1165\u1105\u1165\u11AB",
        "\u110C\u1165\u1105\u1165\u11C2\u1100\u1166",
        "\u110C\u1165\u1107\u1165\u11AB",
        "\u110C\u1165\u110B\u116E\u11AF",
        "\u110C\u1165\u110C\u1165\u11AF\u1105\u1169",
        "\u110C\u1165\u110E\u116E\u11A8",
        "\u110C\u1165\u11A8\u1100\u1173\u11A8",
        "\u110C\u1165\u11A8\u1103\u1161\u11BC\u1112\u1175",
        "\u110C\u1165\u11A8\u1109\u1165\u11BC",
        "\u110C\u1165\u11A8\u110B\u116D\u11BC",
        "\u110C\u1165\u11A8\u110B\u1173\u11BC",
        "\u110C\u1165\u11AB\u1100\u1162",
        "\u110C\u1165\u11AB\u1100\u1169\u11BC",
        "\u110C\u1165\u11AB\u1100\u1175",
        "\u110C\u1165\u11AB\u1103\u1161\u11AF",
        "\u110C\u1165\u11AB\u1105\u1161\u1103\u1169",
        "\u110C\u1165\u11AB\u1106\u1161\u11BC",
        "\u110C\u1165\u11AB\u1106\u116E\u11AB",
        "\u110C\u1165\u11AB\u1107\u1161\u11AB",
        "\u110C\u1165\u11AB\u1107\u116E",
        "\u110C\u1165\u11AB\u1109\u1166",
        "\u110C\u1165\u11AB\u1109\u1175",
        "\u110C\u1165\u11AB\u110B\u116D\u11BC",
        "\u110C\u1165\u11AB\u110C\u1161",
        "\u110C\u1165\u11AB\u110C\u1162\u11BC",
        "\u110C\u1165\u11AB\u110C\u116E",
        "\u110C\u1165\u11AB\u110E\u1165\u11AF",
        "\u110C\u1165\u11AB\u110E\u1166",
        "\u110C\u1165\u11AB\u1110\u1169\u11BC",
        "\u110C\u1165\u11AB\u1112\u1167",
        "\u110C\u1165\u11AB\u1112\u116E",
        "\u110C\u1165\u11AF\u1103\u1162",
        "\u110C\u1165\u11AF\u1106\u1161\u11BC",
        "\u110C\u1165\u11AF\u1107\u1161\u11AB",
        "\u110C\u1165\u11AF\u110B\u1163\u11A8",
        "\u110C\u1165\u11AF\u110E\u1161",
        "\u110C\u1165\u11B7\u1100\u1165\u11B7",
        "\u110C\u1165\u11B7\u1109\u116E",
        "\u110C\u1165\u11B7\u1109\u1175\u11B7",
        "\u110C\u1165\u11B7\u110B\u116F\u11AB",
        "\u110C\u1165\u11B7\u110C\u1165\u11B7",
        "\u110C\u1165\u11B7\u110E\u1161",
        "\u110C\u1165\u11B8\u1100\u1173\u11AB",
        "\u110C\u1165\u11B8\u1109\u1175",
        "\u110C\u1165\u11B8\u110E\u1169\u11A8",
        "\u110C\u1165\u11BA\u1100\u1161\u1105\u1161\u11A8",
        "\u110C\u1165\u11BC\u1100\u1165\u110C\u1161\u11BC",
        "\u110C\u1165\u11BC\u1103\u1169",
        "\u110C\u1165\u11BC\u1105\u1172\u110C\u1161\u11BC",
        "\u110C\u1165\u11BC\u1105\u1175",
        "\u110C\u1165\u11BC\u1106\u1161\u11AF",
        "\u110C\u1165\u11BC\u1106\u1167\u11AB",
        "\u110C\u1165\u11BC\u1106\u116E\u11AB",
        "\u110C\u1165\u11BC\u1107\u1161\u11AB\u1103\u1162",
        "\u110C\u1165\u11BC\u1107\u1169",
        "\u110C\u1165\u11BC\u1107\u116E",
        "\u110C\u1165\u11BC\u1107\u1175",
        "\u110C\u1165\u11BC\u1109\u1161\u11BC",
        "\u110C\u1165\u11BC\u1109\u1165\u11BC",
        "\u110C\u1165\u11BC\u110B\u1169",
        "\u110C\u1165\u11BC\u110B\u116F\u11AB",
        "\u110C\u1165\u11BC\u110C\u1161\u11BC",
        "\u110C\u1165\u11BC\u110C\u1175",
        "\u110C\u1165\u11BC\u110E\u1175",
        "\u110C\u1165\u11BC\u1112\u116A\u11A8\u1112\u1175",
        "\u110C\u1166\u1100\u1169\u11BC",
        "\u110C\u1166\u1100\u116A\u110C\u1165\u11B7",
        "\u110C\u1166\u1103\u1162\u1105\u1169",
        "\u110C\u1166\u1106\u1169\u11A8",
        "\u110C\u1166\u1107\u1161\u11AF",
        "\u110C\u1166\u1107\u1165\u11B8",
        "\u110C\u1166\u1109\u1161\u11BA\u1102\u1161\u11AF",
        "\u110C\u1166\u110B\u1161\u11AB",
        "\u110C\u1166\u110B\u1175\u11AF",
        "\u110C\u1166\u110C\u1161\u11A8",
        "\u110C\u1166\u110C\u116E\u1103\u1169",
        "\u110C\u1166\u110E\u116E\u11AF",
        "\u110C\u1166\u1111\u116E\u11B7",
        "\u110C\u1166\u1112\u1161\u11AB",
        "\u110C\u1169\u1100\u1161\u11A8",
        "\u110C\u1169\u1100\u1165\u11AB",
        "\u110C\u1169\u1100\u1173\u11B7",
        "\u110C\u1169\u1100\u1175\u11BC",
        "\u110C\u1169\u1106\u1167\u11BC",
        "\u110C\u1169\u1106\u1175\u1105\u116D",
        "\u110C\u1169\u1109\u1161\u11BC",
        "\u110C\u1169\u1109\u1165\u11AB",
        "\u110C\u1169\u110B\u116D\u11BC\u1112\u1175",
        "\u110C\u1169\u110C\u1165\u11AF",
        "\u110C\u1169\u110C\u1165\u11BC",
        "\u110C\u1169\u110C\u1175\u11A8",
        "\u110C\u1169\u11AB\u1103\u1162\u11BA\u1106\u1161\u11AF",
        "\u110C\u1169\u11AB\u110C\u1162",
        "\u110C\u1169\u11AF\u110B\u1165\u11B8",
        "\u110C\u1169\u11AF\u110B\u1173\u11B7",
        "\u110C\u1169\u11BC\u1100\u116D",
        "\u110C\u1169\u11BC\u1105\u1169",
        "\u110C\u1169\u11BC\u1105\u1172",
        "\u110C\u1169\u11BC\u1109\u1169\u1105\u1175",
        "\u110C\u1169\u11BC\u110B\u1165\u11B8\u110B\u116F\u11AB",
        "\u110C\u1169\u11BC\u110C\u1169\u11BC",
        "\u110C\u1169\u11BC\u1112\u1161\u11B8",
        "\u110C\u116A\u1109\u1165\u11A8",
        "\u110C\u116C\u110B\u1175\u11AB",
        "\u110C\u116E\u1100\u116A\u11AB\u110C\u1165\u11A8",
        "\u110C\u116E\u1105\u1173\u11B7",
        "\u110C\u116E\u1106\u1161\u11AF",
        "\u110C\u116E\u1106\u1165\u1102\u1175",
        "\u110C\u116E\u1106\u1165\u11A8",
        "\u110C\u116E\u1106\u116E\u11AB",
        "\u110C\u116E\u1106\u1175\u11AB",
        "\u110C\u116E\u1107\u1161\u11BC",
        "\u110C\u116E\u1107\u1167\u11AB",
        "\u110C\u116E\u1109\u1175\u11A8",
        "\u110C\u116E\u110B\u1175\u11AB",
        "\u110C\u116E\u110B\u1175\u11AF",
        "\u110C\u116E\u110C\u1161\u11BC",
        "\u110C\u116E\u110C\u1165\u11AB\u110C\u1161",
        "\u110C\u116E\u1110\u1162\u11A8",
        "\u110C\u116E\u11AB\u1107\u1175",
        "\u110C\u116E\u11AF\u1100\u1165\u1105\u1175",
        "\u110C\u116E\u11AF\u1100\u1175",
        "\u110C\u116E\u11AF\u1106\u116E\u1102\u1174",
        "\u110C\u116E\u11BC\u1100\u1161\u11AB",
        "\u110C\u116E\u11BC\u1100\u1168\u1107\u1161\u11BC\u1109\u1169\u11BC",
        "\u110C\u116E\u11BC\u1100\u116E\u11A8",
        "\u110C\u116E\u11BC\u1102\u1167\u11AB",
        "\u110C\u116E\u11BC\u1103\u1161\u11AB",
        "\u110C\u116E\u11BC\u1103\u1169\u11A8",
        "\u110C\u116E\u11BC\u1107\u1161\u11AB",
        "\u110C\u116E\u11BC\u1107\u116E",
        "\u110C\u116E\u11BC\u1109\u1166",
        "\u110C\u116E\u11BC\u1109\u1169\u1100\u1175\u110B\u1165\u11B8",
        "\u110C\u116E\u11BC\u1109\u116E\u11AB",
        "\u110C\u116E\u11BC\u110B\u1161\u11BC",
        "\u110C\u116E\u11BC\u110B\u116D",
        "\u110C\u116E\u11BC\u1112\u1161\u11A8\u1100\u116D",
        "\u110C\u1173\u11A8\u1109\u1165\u11A8",
        "\u110C\u1173\u11A8\u1109\u1175",
        "\u110C\u1173\u11AF\u1100\u1165\u110B\u116E\u11B7",
        "\u110C\u1173\u11BC\u1100\u1161",
        "\u110C\u1173\u11BC\u1100\u1165",
        "\u110C\u1173\u11BC\u1100\u116F\u11AB",
        "\u110C\u1173\u11BC\u1109\u1161\u11BC",
        "\u110C\u1173\u11BC\u1109\u1166",
        "\u110C\u1175\u1100\u1161\u11A8",
        "\u110C\u1175\u1100\u1161\u11B8",
        "\u110C\u1175\u1100\u1167\u11BC",
        "\u110C\u1175\u1100\u1173\u11A8\u1112\u1175",
        "\u110C\u1175\u1100\u1173\u11B7",
        "\u110C\u1175\u1100\u1173\u11B8",
        "\u110C\u1175\u1102\u1173\u11BC",
        "\u110C\u1175\u1105\u1173\u11B7\u1100\u1175\u11AF",
        "\u110C\u1175\u1105\u1175\u1109\u1161\u11AB",
        "\u110C\u1175\u1107\u1161\u11BC",
        "\u110C\u1175\u1107\u116E\u11BC",
        "\u110C\u1175\u1109\u1175\u11A8",
        "\u110C\u1175\u110B\u1167\u11A8",
        "\u110C\u1175\u110B\u116E\u1100\u1162",
        "\u110C\u1175\u110B\u116F\u11AB",
        "\u110C\u1175\u110C\u1165\u11A8",
        "\u110C\u1175\u110C\u1165\u11B7",
        "\u110C\u1175\u110C\u1175\u11AB",
        "\u110C\u1175\u110E\u116E\u11AF",
        "\u110C\u1175\u11A8\u1109\u1165\u11AB",
        "\u110C\u1175\u11A8\u110B\u1165\u11B8",
        "\u110C\u1175\u11A8\u110B\u116F\u11AB",
        "\u110C\u1175\u11A8\u110C\u1161\u11BC",
        "\u110C\u1175\u11AB\u1100\u1173\u11B8",
        "\u110C\u1175\u11AB\u1103\u1169\u11BC",
        "\u110C\u1175\u11AB\u1105\u1169",
        "\u110C\u1175\u11AB\u1105\u116D",
        "\u110C\u1175\u11AB\u1105\u1175",
        "\u110C\u1175\u11AB\u110D\u1161",
        "\u110C\u1175\u11AB\u110E\u1161\u11AF",
        "\u110C\u1175\u11AB\u110E\u116E\u11AF",
        "\u110C\u1175\u11AB\u1110\u1169\u11BC",
        "\u110C\u1175\u11AB\u1112\u1162\u11BC",
        "\u110C\u1175\u11AF\u1106\u116E\u11AB",
        "\u110C\u1175\u11AF\u1107\u1167\u11BC",
        "\u110C\u1175\u11AF\u1109\u1165",
        "\u110C\u1175\u11B7\u110C\u1161\u11A8",
        "\u110C\u1175\u11B8\u1103\u1161\u11AB",
        "\u110C\u1175\u11B8\u110B\u1161\u11AB",
        "\u110C\u1175\u11B8\u110C\u116E\u11BC",
        "\u110D\u1161\u110C\u1173\u11BC",
        "\u110D\u1175\u1101\u1165\u1100\u1175",
        "\u110E\u1161\u1102\u1161\u11B7",
        "\u110E\u1161\u1105\u1161\u1105\u1175",
        "\u110E\u1161\u1105\u1163\u11BC",
        "\u110E\u1161\u1105\u1175\u11B7",
        "\u110E\u1161\u1107\u1167\u11AF",
        "\u110E\u1161\u1109\u1165\u11AB",
        "\u110E\u1161\u110E\u1173\u11B7",
        "\u110E\u1161\u11A8\u1100\u1161\u11A8",
        "\u110E\u1161\u11AB\u1106\u116E\u11AF",
        "\u110E\u1161\u11AB\u1109\u1165\u11BC",
        "\u110E\u1161\u11B7\u1100\u1161",
        "\u110E\u1161\u11B7\u1100\u1175\u1105\u1173\u11B7",
        "\u110E\u1161\u11B7\u1109\u1162",
        "\u110E\u1161\u11B7\u1109\u1165\u11A8",
        "\u110E\u1161\u11B7\u110B\u1167",
        "\u110E\u1161\u11B7\u110B\u116C",
        "\u110E\u1161\u11B7\u110C\u1169",
        "\u110E\u1161\u11BA\u110C\u1161\u11AB",
        "\u110E\u1161\u11BC\u1100\u1161",
        "\u110E\u1161\u11BC\u1100\u1169",
        "\u110E\u1161\u11BC\u1100\u116E",
        "\u110E\u1161\u11BC\u1106\u116E\u11AB",
        "\u110E\u1161\u11BC\u1107\u1161\u11A9",
        "\u110E\u1161\u11BC\u110C\u1161\u11A8",
        "\u110E\u1161\u11BC\u110C\u1169",
        "\u110E\u1162\u1102\u1165\u11AF",
        "\u110E\u1162\u110C\u1165\u11B7",
        "\u110E\u1162\u11A8\u1100\u1161\u1107\u1161\u11BC",
        "\u110E\u1162\u11A8\u1107\u1161\u11BC",
        "\u110E\u1162\u11A8\u1109\u1161\u11BC",
        "\u110E\u1162\u11A8\u110B\u1175\u11B7",
        "\u110E\u1162\u11B7\u1111\u1175\u110B\u1165\u11AB",
        "\u110E\u1165\u1107\u1165\u11AF",
        "\u110E\u1165\u110B\u1173\u11B7",
        "\u110E\u1165\u11AB\u1100\u116E\u11A8",
        "\u110E\u1165\u11AB\u1103\u116E\u11BC",
        "\u110E\u1165\u11AB\u110C\u1161\u11BC",
        "\u110E\u1165\u11AB\u110C\u1162",
        "\u110E\u1165\u11AB\u110E\u1165\u11AB\u1112\u1175",
        "\u110E\u1165\u11AF\u1103\u1169",
        "\u110E\u1165\u11AF\u110C\u1165\u1112\u1175",
        "\u110E\u1165\u11AF\u1112\u1161\u11A8",
        "\u110E\u1165\u11BA\u1102\u1161\u11AF",
        "\u110E\u1165\u11BA\u110D\u1162",
        "\u110E\u1165\u11BC\u1102\u1167\u11AB",
        "\u110E\u1165\u11BC\u1107\u1161\u110C\u1175",
        "\u110E\u1165\u11BC\u1109\u1169",
        "\u110E\u1165\u11BC\u110E\u116E\u11AB",
        "\u110E\u1166\u1100\u1168",
        "\u110E\u1166\u1105\u1167\u11A8",
        "\u110E\u1166\u110B\u1169\u11AB",
        "\u110E\u1166\u110B\u1172\u11A8",
        "\u110E\u1166\u110C\u116E\u11BC",
        "\u110E\u1166\u1112\u1165\u11B7",
        "\u110E\u1169\u1103\u1173\u11BC\u1112\u1161\u11A8\u1109\u1162\u11BC",
        "\u110E\u1169\u1107\u1161\u11AB",
        "\u110E\u1169\u1107\u1161\u11B8",
        "\u110E\u1169\u1109\u1161\u11BC\u1112\u116A",
        "\u110E\u1169\u1109\u116E\u11AB",
        "\u110E\u1169\u110B\u1167\u1105\u1173\u11B7",
        "\u110E\u1169\u110B\u116F\u11AB",
        "\u110E\u1169\u110C\u1165\u1102\u1167\u11A8",
        "\u110E\u1169\u110C\u1165\u11B7",
        "\u110E\u1169\u110E\u1165\u11BC",
        "\u110E\u1169\u110F\u1169\u11AF\u1105\u1175\u11BA",
        "\u110E\u1169\u11BA\u1107\u116E\u11AF",
        "\u110E\u1169\u11BC\u1100\u1161\u11A8",
        "\u110E\u1169\u11BC\u1105\u1175",
        "\u110E\u1169\u11BC\u110C\u1161\u11BC",
        "\u110E\u116A\u11AF\u110B\u1167\u11BC",
        "\u110E\u116C\u1100\u1173\u11AB",
        "\u110E\u116C\u1109\u1161\u11BC",
        "\u110E\u116C\u1109\u1165\u11AB",
        "\u110E\u116C\u1109\u1175\u11AB",
        "\u110E\u116C\u110B\u1161\u11A8",
        "\u110E\u116C\u110C\u1169\u11BC",
        "\u110E\u116E\u1109\u1165\u11A8",
        "\u110E\u116E\u110B\u1165\u11A8",
        "\u110E\u116E\u110C\u1175\u11AB",
        "\u110E\u116E\u110E\u1165\u11AB",
        "\u110E\u116E\u110E\u1173\u11A8",
        "\u110E\u116E\u11A8\u1100\u116E",
        "\u110E\u116E\u11A8\u1109\u1169",
        "\u110E\u116E\u11A8\u110C\u1166",
        "\u110E\u116E\u11A8\u1112\u1161",
        "\u110E\u116E\u11AF\u1100\u1173\u11AB",
        "\u110E\u116E\u11AF\u1107\u1161\u11AF",
        "\u110E\u116E\u11AF\u1109\u1161\u11AB",
        "\u110E\u116E\u11AF\u1109\u1175\u11AB",
        "\u110E\u116E\u11AF\u110B\u1167\u11AB",
        "\u110E\u116E\u11AF\u110B\u1175\u11B8",
        "\u110E\u116E\u11AF\u110C\u1161\u11BC",
        "\u110E\u116E\u11AF\u1111\u1161\u11AB",
        "\u110E\u116E\u11BC\u1100\u1167\u11A8",
        "\u110E\u116E\u11BC\u1100\u1169",
        "\u110E\u116E\u11BC\u1103\u1169\u11AF",
        "\u110E\u116E\u11BC\u1107\u116E\u11AB\u1112\u1175",
        "\u110E\u116E\u11BC\u110E\u1165\u11BC\u1103\u1169",
        "\u110E\u1171\u110B\u1165\u11B8",
        "\u110E\u1171\u110C\u1175\u11A8",
        "\u110E\u1171\u1112\u1163\u11BC",
        "\u110E\u1175\u110B\u1163\u11A8",
        "\u110E\u1175\u11AB\u1100\u116E",
        "\u110E\u1175\u11AB\u110E\u1165\u11A8",
        "\u110E\u1175\u11AF\u1109\u1175\u11B8",
        "\u110E\u1175\u11AF\u110B\u116F\u11AF",
        "\u110E\u1175\u11AF\u1111\u1161\u11AB",
        "\u110E\u1175\u11B7\u1103\u1162",
        "\u110E\u1175\u11B7\u1106\u116E\u11A8",
        "\u110E\u1175\u11B7\u1109\u1175\u11AF",
        "\u110E\u1175\u11BA\u1109\u1169\u11AF",
        "\u110E\u1175\u11BC\u110E\u1161\u11AB",
        "\u110F\u1161\u1106\u1166\u1105\u1161",
        "\u110F\u1161\u110B\u116E\u11AB\u1110\u1165",
        "\u110F\u1161\u11AF\u1100\u116E\u11A8\u1109\u116E",
        "\u110F\u1162\u1105\u1175\u11A8\u1110\u1165",
        "\u110F\u1162\u11B7\u1111\u1165\u1109\u1173",
        "\u110F\u1162\u11B7\u1111\u1166\u110B\u1175\u11AB",
        "\u110F\u1165\u1110\u1173\u11AB",
        "\u110F\u1165\u11AB\u1103\u1175\u1109\u1167\u11AB",
        "\u110F\u1165\u11AF\u1105\u1165",
        "\u110F\u1165\u11B7\u1111\u1172\u1110\u1165",
        "\u110F\u1169\u1101\u1175\u1105\u1175",
        "\u110F\u1169\u1106\u1175\u1103\u1175",
        "\u110F\u1169\u11AB\u1109\u1165\u1110\u1173",
        "\u110F\u1169\u11AF\u1105\u1161",
        "\u110F\u1169\u11B7\u1111\u1173\u11AF\u1105\u1166\u11A8\u1109\u1173",
        "\u110F\u1169\u11BC\u1102\u1161\u1106\u116E\u11AF",
        "\u110F\u116B\u1100\u1161\u11B7",
        "\u110F\u116E\u1103\u1166\u1110\u1161",
        "\u110F\u1173\u1105\u1175\u11B7",
        "\u110F\u1173\u11AB\u1100\u1175\u11AF",
        "\u110F\u1173\u11AB\u1104\u1161\u11AF",
        "\u110F\u1173\u11AB\u1109\u1169\u1105\u1175",
        "\u110F\u1173\u11AB\u110B\u1161\u1103\u1173\u11AF",
        "\u110F\u1173\u11AB\u110B\u1165\u1106\u1165\u1102\u1175",
        "\u110F\u1173\u11AB\u110B\u1175\u11AF",
        "\u110F\u1173\u11AB\u110C\u1165\u11AF",
        "\u110F\u1173\u11AF\u1105\u1162\u1109\u1175\u11A8",
        "\u110F\u1173\u11AF\u1105\u1165\u11B8",
        "\u110F\u1175\u11AF\u1105\u1169",
        "\u1110\u1161\u110B\u1175\u11B8",
        "\u1110\u1161\u110C\u1161\u1100\u1175",
        "\u1110\u1161\u11A8\u1100\u116E",
        "\u1110\u1161\u11A8\u110C\u1161",
        "\u1110\u1161\u11AB\u1109\u1162\u11BC",
        "\u1110\u1162\u1100\u116F\u11AB\u1103\u1169",
        "\u1110\u1162\u110B\u1163\u11BC",
        "\u1110\u1162\u1111\u116E\u11BC",
        "\u1110\u1162\u11A8\u1109\u1175",
        "\u1110\u1162\u11AF\u1105\u1165\u11AB\u1110\u1173",
        "\u1110\u1165\u1102\u1165\u11AF",
        "\u1110\u1165\u1106\u1175\u1102\u1165\u11AF",
        "\u1110\u1166\u1102\u1175\u1109\u1173",
        "\u1110\u1166\u1109\u1173\u1110\u1173",
        "\u1110\u1166\u110B\u1175\u1107\u1173\u11AF",
        "\u1110\u1166\u11AF\u1105\u1166\u1107\u1175\u110C\u1165\u11AB",
        "\u1110\u1169\u1105\u1169\u11AB",
        "\u1110\u1169\u1106\u1161\u1110\u1169",
        "\u1110\u1169\u110B\u116D\u110B\u1175\u11AF",
        "\u1110\u1169\u11BC\u1100\u1168",
        "\u1110\u1169\u11BC\u1100\u116A",
        "\u1110\u1169\u11BC\u1105\u1169",
        "\u1110\u1169\u11BC\u1109\u1175\u11AB",
        "\u1110\u1169\u11BC\u110B\u1167\u11A8",
        "\u1110\u1169\u11BC\u110B\u1175\u11AF",
        "\u1110\u1169\u11BC\u110C\u1161\u11BC",
        "\u1110\u1169\u11BC\u110C\u1166",
        "\u1110\u1169\u11BC\u110C\u1173\u11BC",
        "\u1110\u1169\u11BC\u1112\u1161\u11B8",
        "\u1110\u1169\u11BC\u1112\u116A",
        "\u1110\u116C\u1100\u1173\u11AB",
        "\u1110\u116C\u110B\u116F\u11AB",
        "\u1110\u116C\u110C\u1175\u11A8\u1100\u1173\u11B7",
        "\u1110\u1171\u1100\u1175\u11B7",
        "\u1110\u1173\u1105\u1165\u11A8",
        "\u1110\u1173\u11A8\u1100\u1173\u11B8",
        "\u1110\u1173\u11A8\u1107\u1167\u11AF",
        "\u1110\u1173\u11A8\u1109\u1165\u11BC",
        "\u1110\u1173\u11A8\u1109\u116E",
        "\u1110\u1173\u11A8\u110C\u1175\u11BC",
        "\u1110\u1173\u11A8\u1112\u1175",
        "\u1110\u1173\u11AB\u1110\u1173\u11AB\u1112\u1175",
        "\u1110\u1175\u1109\u1167\u110E\u1173",
        "\u1111\u1161\u1105\u1161\u11AB\u1109\u1162\u11A8",
        "\u1111\u1161\u110B\u1175\u11AF",
        "\u1111\u1161\u110E\u116E\u11AF\u1109\u1169",
        "\u1111\u1161\u11AB\u1100\u1167\u11AF",
        "\u1111\u1161\u11AB\u1103\u1161\u11AB",
        "\u1111\u1161\u11AB\u1106\u1162",
        "\u1111\u1161\u11AB\u1109\u1161",
        "\u1111\u1161\u11AF\u1109\u1175\u11B8",
        "\u1111\u1161\u11AF\u110B\u116F\u11AF",
        "\u1111\u1161\u11B8\u1109\u1169\u11BC",
        "\u1111\u1162\u1109\u1167\u11AB",
        "\u1111\u1162\u11A8\u1109\u1173",
        "\u1111\u1162\u11A8\u1109\u1175\u1106\u1175\u11AF\u1105\u1175",
        "\u1111\u1162\u11AB\u1110\u1175",
        "\u1111\u1165\u1109\u1166\u11AB\u1110\u1173",
        "\u1111\u1166\u110B\u1175\u11AB\u1110\u1173",
        "\u1111\u1167\u11AB\u1100\u1167\u11AB",
        "\u1111\u1167\u11AB\u110B\u1174",
        "\u1111\u1167\u11AB\u110C\u1175",
        "\u1111\u1167\u11AB\u1112\u1175",
        "\u1111\u1167\u11BC\u1100\u1161",
        "\u1111\u1167\u11BC\u1100\u1172\u11AB",
        "\u1111\u1167\u11BC\u1109\u1162\u11BC",
        "\u1111\u1167\u11BC\u1109\u1169",
        "\u1111\u1167\u11BC\u110B\u1163\u11BC",
        "\u1111\u1167\u11BC\u110B\u1175\u11AF",
        "\u1111\u1167\u11BC\u1112\u116A",
        "\u1111\u1169\u1109\u1173\u1110\u1165",
        "\u1111\u1169\u110B\u1175\u11AB\u1110\u1173",
        "\u1111\u1169\u110C\u1161\u11BC",
        "\u1111\u1169\u1112\u1161\u11B7",
        "\u1111\u116D\u1106\u1167\u11AB",
        "\u1111\u116D\u110C\u1165\u11BC",
        "\u1111\u116D\u110C\u116E\u11AB",
        "\u1111\u116D\u1112\u1167\u11AB",
        "\u1111\u116E\u11B7\u1106\u1169\u11A8",
        "\u1111\u116E\u11B7\u110C\u1175\u11AF",
        "\u1111\u116E\u11BC\u1100\u1167\u11BC",
        "\u1111\u116E\u11BC\u1109\u1169\u11A8",
        "\u1111\u116E\u11BC\u1109\u1173\u11B8",
        "\u1111\u1173\u1105\u1161\u11BC\u1109\u1173",
        "\u1111\u1173\u1105\u1175\u11AB\u1110\u1165",
        "\u1111\u1173\u11AF\u1105\u1161\u1109\u1173\u1110\u1175\u11A8",
        "\u1111\u1175\u1100\u1169\u11AB",
        "\u1111\u1175\u1106\u1161\u11BC",
        "\u1111\u1175\u110B\u1161\u1102\u1169",
        "\u1111\u1175\u11AF\u1105\u1173\u11B7",
        "\u1111\u1175\u11AF\u1109\u116E",
        "\u1111\u1175\u11AF\u110B\u116D",
        "\u1111\u1175\u11AF\u110C\u1161",
        "\u1111\u1175\u11AF\u1110\u1169\u11BC",
        "\u1111\u1175\u11BC\u1100\u1168",
        "\u1112\u1161\u1102\u1173\u1102\u1175\u11B7",
        "\u1112\u1161\u1102\u1173\u11AF",
        "\u1112\u1161\u1103\u1173\u110B\u1170\u110B\u1165",
        "\u1112\u1161\u1105\u116E\u11BA\u1107\u1161\u11B7",
        "\u1112\u1161\u1107\u1161\u11AB\u1100\u1175",
        "\u1112\u1161\u1109\u116E\u11A8\u110C\u1175\u11B8",
        "\u1112\u1161\u1109\u116E\u11AB",
        "\u1112\u1161\u110B\u1167\u1110\u1173\u11AB",
        "\u1112\u1161\u110C\u1175\u1106\u1161\u11AB",
        "\u1112\u1161\u110E\u1165\u11AB",
        "\u1112\u1161\u1111\u116E\u11B7",
        "\u1112\u1161\u1111\u1175\u11AF",
        "\u1112\u1161\u11A8\u1100\u116A",
        "\u1112\u1161\u11A8\u1100\u116D",
        "\u1112\u1161\u11A8\u1100\u1173\u11B8",
        "\u1112\u1161\u11A8\u1100\u1175",
        "\u1112\u1161\u11A8\u1102\u1167\u11AB",
        "\u1112\u1161\u11A8\u1105\u1167\u11A8",
        "\u1112\u1161\u11A8\u1107\u1165\u11AB",
        "\u1112\u1161\u11A8\u1107\u116E\u1106\u1169",
        "\u1112\u1161\u11A8\u1107\u1175",
        "\u1112\u1161\u11A8\u1109\u1162\u11BC",
        "\u1112\u1161\u11A8\u1109\u116E\u11AF",
        "\u1112\u1161\u11A8\u1109\u1173\u11B8",
        "\u1112\u1161\u11A8\u110B\u116D\u11BC\u1111\u116E\u11B7",
        "\u1112\u1161\u11A8\u110B\u116F\u11AB",
        "\u1112\u1161\u11A8\u110B\u1171",
        "\u1112\u1161\u11A8\u110C\u1161",
        "\u1112\u1161\u11A8\u110C\u1165\u11B7",
        "\u1112\u1161\u11AB\u1100\u1168",
        "\u1112\u1161\u11AB\u1100\u1173\u11AF",
        "\u1112\u1161\u11AB\u1101\u1165\u1107\u1165\u11AB\u110B\u1166",
        "\u1112\u1161\u11AB\u1102\u1161\u11BD",
        "\u1112\u1161\u11AB\u1102\u116E\u11AB",
        "\u1112\u1161\u11AB\u1103\u1169\u11BC\u110B\u1161\u11AB",
        "\u1112\u1161\u11AB\u1104\u1162",
        "\u1112\u1161\u11AB\u1105\u1161\u1109\u1161\u11AB",
        "\u1112\u1161\u11AB\u1106\u1161\u1103\u1175",
        "\u1112\u1161\u11AB\u1106\u116E\u11AB",
        "\u1112\u1161\u11AB\u1107\u1165\u11AB",
        "\u1112\u1161\u11AB\u1107\u1169\u11A8",
        "\u1112\u1161\u11AB\u1109\u1175\u11A8",
        "\u1112\u1161\u11AB\u110B\u1167\u1105\u1173\u11B7",
        "\u1112\u1161\u11AB\u110D\u1169\u11A8",
        "\u1112\u1161\u11AF\u1106\u1165\u1102\u1175",
        "\u1112\u1161\u11AF\u110B\u1161\u1107\u1165\u110C\u1175",
        "\u1112\u1161\u11AF\u110B\u1175\u11AB",
        "\u1112\u1161\u11B7\u1101\u1166",
        "\u1112\u1161\u11B7\u1107\u116E\u1105\u1169",
        "\u1112\u1161\u11B8\u1100\u1167\u11A8",
        "\u1112\u1161\u11B8\u1105\u1175\u110C\u1165\u11A8",
        "\u1112\u1161\u11BC\u1100\u1169\u11BC",
        "\u1112\u1161\u11BC\u1100\u116E",
        "\u1112\u1161\u11BC\u1109\u1161\u11BC",
        "\u1112\u1161\u11BC\u110B\u1174",
        "\u1112\u1162\u1100\u1167\u11AF",
        "\u1112\u1162\u1100\u116E\u11AB",
        "\u1112\u1162\u1103\u1161\u11B8",
        "\u1112\u1162\u1103\u1161\u11BC",
        "\u1112\u1162\u1106\u116E\u11AF",
        "\u1112\u1162\u1109\u1165\u11A8",
        "\u1112\u1162\u1109\u1165\u11AF",
        "\u1112\u1162\u1109\u116E\u110B\u116D\u11A8\u110C\u1161\u11BC",
        "\u1112\u1162\u110B\u1161\u11AB",
        "\u1112\u1162\u11A8\u1109\u1175\u11B7",
        "\u1112\u1162\u11AB\u1103\u1173\u1107\u1162\u11A8",
        "\u1112\u1162\u11B7\u1107\u1165\u1100\u1165",
        "\u1112\u1162\u11BA\u1107\u1167\u11C0",
        "\u1112\u1162\u11BA\u1109\u1161\u11AF",
        "\u1112\u1162\u11BC\u1103\u1169\u11BC",
        "\u1112\u1162\u11BC\u1107\u1169\u11A8",
        "\u1112\u1162\u11BC\u1109\u1161",
        "\u1112\u1162\u11BC\u110B\u116E\u11AB",
        "\u1112\u1162\u11BC\u110B\u1171",
        "\u1112\u1163\u11BC\u1100\u1175",
        "\u1112\u1163\u11BC\u1109\u1161\u11BC",
        "\u1112\u1163\u11BC\u1109\u116E",
        "\u1112\u1165\u1105\u1161\u11A8",
        "\u1112\u1165\u110B\u116D\u11BC",
        "\u1112\u1166\u11AF\u1100\u1175",
        "\u1112\u1167\u11AB\u1100\u116A\u11AB",
        "\u1112\u1167\u11AB\u1100\u1173\u11B7",
        "\u1112\u1167\u11AB\u1103\u1162",
        "\u1112\u1167\u11AB\u1109\u1161\u11BC",
        "\u1112\u1167\u11AB\u1109\u1175\u11AF",
        "\u1112\u1167\u11AB\u110C\u1161\u11BC",
        "\u1112\u1167\u11AB\u110C\u1162",
        "\u1112\u1167\u11AB\u110C\u1175",
        "\u1112\u1167\u11AF\u110B\u1162\u11A8",
        "\u1112\u1167\u11B8\u1105\u1167\u11A8",
        "\u1112\u1167\u11BC\u1107\u116E",
        "\u1112\u1167\u11BC\u1109\u1161",
        "\u1112\u1167\u11BC\u1109\u116E",
        "\u1112\u1167\u11BC\u1109\u1175\u11A8",
        "\u1112\u1167\u11BC\u110C\u1166",
        "\u1112\u1167\u11BC\u1110\u1162",
        "\u1112\u1167\u11BC\u1111\u1167\u11AB",
        "\u1112\u1168\u1110\u1162\u11A8",
        "\u1112\u1169\u1100\u1175\u1109\u1175\u11B7",
        "\u1112\u1169\u1102\u1161\u11B7",
        "\u1112\u1169\u1105\u1161\u11BC\u110B\u1175",
        "\u1112\u1169\u1107\u1161\u11A8",
        "\u1112\u1169\u1110\u1166\u11AF",
        "\u1112\u1169\u1112\u1173\u11B8",
        "\u1112\u1169\u11A8\u1109\u1175",
        "\u1112\u1169\u11AF\u1105\u1169",
        "\u1112\u1169\u11B7\u1111\u1166\u110B\u1175\u110C\u1175",
        "\u1112\u1169\u11BC\u1107\u1169",
        "\u1112\u1169\u11BC\u1109\u116E",
        "\u1112\u1169\u11BC\u110E\u1161",
        "\u1112\u116A\u1106\u1167\u11AB",
        "\u1112\u116A\u1107\u116E\u11AB",
        "\u1112\u116A\u1109\u1161\u11AF",
        "\u1112\u116A\u110B\u116D\u110B\u1175\u11AF",
        "\u1112\u116A\u110C\u1161\u11BC",
        "\u1112\u116A\u1112\u1161\u11A8",
        "\u1112\u116A\u11A8\u1107\u1169",
        "\u1112\u116A\u11A8\u110B\u1175\u11AB",
        "\u1112\u116A\u11A8\u110C\u1161\u11BC",
        "\u1112\u116A\u11A8\u110C\u1165\u11BC",
        "\u1112\u116A\u11AB\u1100\u1161\u11B8",
        "\u1112\u116A\u11AB\u1100\u1167\u11BC",
        "\u1112\u116A\u11AB\u110B\u1167\u11BC",
        "\u1112\u116A\u11AB\u110B\u1172\u11AF",
        "\u1112\u116A\u11AB\u110C\u1161",
        "\u1112\u116A\u11AF\u1100\u1175",
        "\u1112\u116A\u11AF\u1103\u1169\u11BC",
        "\u1112\u116A\u11AF\u1107\u1161\u11AF\u1112\u1175",
        "\u1112\u116A\u11AF\u110B\u116D\u11BC",
        "\u1112\u116A\u11AF\u110D\u1161\u11A8",
        "\u1112\u116C\u1100\u1167\u11AB",
        "\u1112\u116C\u1100\u116A\u11AB",
        "\u1112\u116C\u1107\u1169\u11A8",
        "\u1112\u116C\u1109\u1162\u11A8",
        "\u1112\u116C\u110B\u116F\u11AB",
        "\u1112\u116C\u110C\u1161\u11BC",
        "\u1112\u116C\u110C\u1165\u11AB",
        "\u1112\u116C\u11BA\u1109\u116E",
        "\u1112\u116C\u11BC\u1103\u1161\u11AB\u1107\u1169\u1103\u1169",
        "\u1112\u116D\u110B\u1172\u11AF\u110C\u1165\u11A8",
        "\u1112\u116E\u1107\u1161\u11AB",
        "\u1112\u116E\u110E\u116E\u11BA\u1100\u1161\u1105\u116E",
        "\u1112\u116E\u11AB\u1105\u1167\u11AB",
        "\u1112\u116F\u11AF\u110A\u1175\u11AB",
        "\u1112\u1172\u1109\u1175\u11A8",
        "\u1112\u1172\u110B\u1175\u11AF",
        "\u1112\u1172\u11BC\u1102\u1162",
        "\u1112\u1173\u1105\u1173\u11B7",
        "\u1112\u1173\u11A8\u1107\u1162\u11A8",
        "\u1112\u1173\u11A8\u110B\u1175\u11AB",
        "\u1112\u1173\u11AB\u110C\u1165\u11A8",
        "\u1112\u1173\u11AB\u1112\u1175",
        "\u1112\u1173\u11BC\u1106\u1175",
        "\u1112\u1173\u11BC\u1107\u116E\u11AB",
        "\u1112\u1174\u1100\u1169\u11A8",
        "\u1112\u1174\u1106\u1161\u11BC",
        "\u1112\u1174\u1109\u1162\u11BC",
        "\u1112\u1174\u11AB\u1109\u1162\u11A8",
        "\u1112\u1175\u11B7\u1101\u1165\u11BA"
      ];
    }
  });

  // ../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/french.json
  var require_french = __commonJS({
    "../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/french.json"(exports, module) {
      module.exports = [
        "abaisser",
        "abandon",
        "abdiquer",
        "abeille",
        "abolir",
        "aborder",
        "aboutir",
        "aboyer",
        "abrasif",
        "abreuver",
        "abriter",
        "abroger",
        "abrupt",
        "absence",
        "absolu",
        "absurde",
        "abusif",
        "abyssal",
        "acade\u0301mie",
        "acajou",
        "acarien",
        "accabler",
        "accepter",
        "acclamer",
        "accolade",
        "accroche",
        "accuser",
        "acerbe",
        "achat",
        "acheter",
        "aciduler",
        "acier",
        "acompte",
        "acque\u0301rir",
        "acronyme",
        "acteur",
        "actif",
        "actuel",
        "adepte",
        "ade\u0301quat",
        "adhe\u0301sif",
        "adjectif",
        "adjuger",
        "admettre",
        "admirer",
        "adopter",
        "adorer",
        "adoucir",
        "adresse",
        "adroit",
        "adulte",
        "adverbe",
        "ae\u0301rer",
        "ae\u0301ronef",
        "affaire",
        "affecter",
        "affiche",
        "affreux",
        "affubler",
        "agacer",
        "agencer",
        "agile",
        "agiter",
        "agrafer",
        "agre\u0301able",
        "agrume",
        "aider",
        "aiguille",
        "ailier",
        "aimable",
        "aisance",
        "ajouter",
        "ajuster",
        "alarmer",
        "alchimie",
        "alerte",
        "alge\u0300bre",
        "algue",
        "alie\u0301ner",
        "aliment",
        "alle\u0301ger",
        "alliage",
        "allouer",
        "allumer",
        "alourdir",
        "alpaga",
        "altesse",
        "alve\u0301ole",
        "amateur",
        "ambigu",
        "ambre",
        "ame\u0301nager",
        "amertume",
        "amidon",
        "amiral",
        "amorcer",
        "amour",
        "amovible",
        "amphibie",
        "ampleur",
        "amusant",
        "analyse",
        "anaphore",
        "anarchie",
        "anatomie",
        "ancien",
        "ane\u0301antir",
        "angle",
        "angoisse",
        "anguleux",
        "animal",
        "annexer",
        "annonce",
        "annuel",
        "anodin",
        "anomalie",
        "anonyme",
        "anormal",
        "antenne",
        "antidote",
        "anxieux",
        "apaiser",
        "ape\u0301ritif",
        "aplanir",
        "apologie",
        "appareil",
        "appeler",
        "apporter",
        "appuyer",
        "aquarium",
        "aqueduc",
        "arbitre",
        "arbuste",
        "ardeur",
        "ardoise",
        "argent",
        "arlequin",
        "armature",
        "armement",
        "armoire",
        "armure",
        "arpenter",
        "arracher",
        "arriver",
        "arroser",
        "arsenic",
        "arte\u0301riel",
        "article",
        "aspect",
        "asphalte",
        "aspirer",
        "assaut",
        "asservir",
        "assiette",
        "associer",
        "assurer",
        "asticot",
        "astre",
        "astuce",
        "atelier",
        "atome",
        "atrium",
        "atroce",
        "attaque",
        "attentif",
        "attirer",
        "attraper",
        "aubaine",
        "auberge",
        "audace",
        "audible",
        "augurer",
        "aurore",
        "automne",
        "autruche",
        "avaler",
        "avancer",
        "avarice",
        "avenir",
        "averse",
        "aveugle",
        "aviateur",
        "avide",
        "avion",
        "aviser",
        "avoine",
        "avouer",
        "avril",
        "axial",
        "axiome",
        "badge",
        "bafouer",
        "bagage",
        "baguette",
        "baignade",
        "balancer",
        "balcon",
        "baleine",
        "balisage",
        "bambin",
        "bancaire",
        "bandage",
        "banlieue",
        "bannie\u0300re",
        "banquier",
        "barbier",
        "baril",
        "baron",
        "barque",
        "barrage",
        "bassin",
        "bastion",
        "bataille",
        "bateau",
        "batterie",
        "baudrier",
        "bavarder",
        "belette",
        "be\u0301lier",
        "belote",
        "be\u0301ne\u0301fice",
        "berceau",
        "berger",
        "berline",
        "bermuda",
        "besace",
        "besogne",
        "be\u0301tail",
        "beurre",
        "biberon",
        "bicycle",
        "bidule",
        "bijou",
        "bilan",
        "bilingue",
        "billard",
        "binaire",
        "biologie",
        "biopsie",
        "biotype",
        "biscuit",
        "bison",
        "bistouri",
        "bitume",
        "bizarre",
        "blafard",
        "blague",
        "blanchir",
        "blessant",
        "blinder",
        "blond",
        "bloquer",
        "blouson",
        "bobard",
        "bobine",
        "boire",
        "boiser",
        "bolide",
        "bonbon",
        "bondir",
        "bonheur",
        "bonifier",
        "bonus",
        "bordure",
        "borne",
        "botte",
        "boucle",
        "boueux",
        "bougie",
        "boulon",
        "bouquin",
        "bourse",
        "boussole",
        "boutique",
        "boxeur",
        "branche",
        "brasier",
        "brave",
        "brebis",
        "bre\u0300che",
        "breuvage",
        "bricoler",
        "brigade",
        "brillant",
        "brioche",
        "brique",
        "brochure",
        "broder",
        "bronzer",
        "brousse",
        "broyeur",
        "brume",
        "brusque",
        "brutal",
        "bruyant",
        "buffle",
        "buisson",
        "bulletin",
        "bureau",
        "burin",
        "bustier",
        "butiner",
        "butoir",
        "buvable",
        "buvette",
        "cabanon",
        "cabine",
        "cachette",
        "cadeau",
        "cadre",
        "cafe\u0301ine",
        "caillou",
        "caisson",
        "calculer",
        "calepin",
        "calibre",
        "calmer",
        "calomnie",
        "calvaire",
        "camarade",
        "came\u0301ra",
        "camion",
        "campagne",
        "canal",
        "caneton",
        "canon",
        "cantine",
        "canular",
        "capable",
        "caporal",
        "caprice",
        "capsule",
        "capter",
        "capuche",
        "carabine",
        "carbone",
        "caresser",
        "caribou",
        "carnage",
        "carotte",
        "carreau",
        "carton",
        "cascade",
        "casier",
        "casque",
        "cassure",
        "causer",
        "caution",
        "cavalier",
        "caverne",
        "caviar",
        "ce\u0301dille",
        "ceinture",
        "ce\u0301leste",
        "cellule",
        "cendrier",
        "censurer",
        "central",
        "cercle",
        "ce\u0301re\u0301bral",
        "cerise",
        "cerner",
        "cerveau",
        "cesser",
        "chagrin",
        "chaise",
        "chaleur",
        "chambre",
        "chance",
        "chapitre",
        "charbon",
        "chasseur",
        "chaton",
        "chausson",
        "chavirer",
        "chemise",
        "chenille",
        "che\u0301quier",
        "chercher",
        "cheval",
        "chien",
        "chiffre",
        "chignon",
        "chime\u0300re",
        "chiot",
        "chlorure",
        "chocolat",
        "choisir",
        "chose",
        "chouette",
        "chrome",
        "chute",
        "cigare",
        "cigogne",
        "cimenter",
        "cine\u0301ma",
        "cintrer",
        "circuler",
        "cirer",
        "cirque",
        "citerne",
        "citoyen",
        "citron",
        "civil",
        "clairon",
        "clameur",
        "claquer",
        "classe",
        "clavier",
        "client",
        "cligner",
        "climat",
        "clivage",
        "cloche",
        "clonage",
        "cloporte",
        "cobalt",
        "cobra",
        "cocasse",
        "cocotier",
        "coder",
        "codifier",
        "coffre",
        "cogner",
        "cohe\u0301sion",
        "coiffer",
        "coincer",
        "cole\u0300re",
        "colibri",
        "colline",
        "colmater",
        "colonel",
        "combat",
        "come\u0301die",
        "commande",
        "compact",
        "concert",
        "conduire",
        "confier",
        "congeler",
        "connoter",
        "consonne",
        "contact",
        "convexe",
        "copain",
        "copie",
        "corail",
        "corbeau",
        "cordage",
        "corniche",
        "corpus",
        "correct",
        "corte\u0300ge",
        "cosmique",
        "costume",
        "coton",
        "coude",
        "coupure",
        "courage",
        "couteau",
        "couvrir",
        "coyote",
        "crabe",
        "crainte",
        "cravate",
        "crayon",
        "cre\u0301ature",
        "cre\u0301diter",
        "cre\u0301meux",
        "creuser",
        "crevette",
        "cribler",
        "crier",
        "cristal",
        "crite\u0300re",
        "croire",
        "croquer",
        "crotale",
        "crucial",
        "cruel",
        "crypter",
        "cubique",
        "cueillir",
        "cuille\u0300re",
        "cuisine",
        "cuivre",
        "culminer",
        "cultiver",
        "cumuler",
        "cupide",
        "curatif",
        "curseur",
        "cyanure",
        "cycle",
        "cylindre",
        "cynique",
        "daigner",
        "damier",
        "danger",
        "danseur",
        "dauphin",
        "de\u0301battre",
        "de\u0301biter",
        "de\u0301border",
        "de\u0301brider",
        "de\u0301butant",
        "de\u0301caler",
        "de\u0301cembre",
        "de\u0301chirer",
        "de\u0301cider",
        "de\u0301clarer",
        "de\u0301corer",
        "de\u0301crire",
        "de\u0301cupler",
        "de\u0301dale",
        "de\u0301ductif",
        "de\u0301esse",
        "de\u0301fensif",
        "de\u0301filer",
        "de\u0301frayer",
        "de\u0301gager",
        "de\u0301givrer",
        "de\u0301glutir",
        "de\u0301grafer",
        "de\u0301jeuner",
        "de\u0301lice",
        "de\u0301loger",
        "demander",
        "demeurer",
        "de\u0301molir",
        "de\u0301nicher",
        "de\u0301nouer",
        "dentelle",
        "de\u0301nuder",
        "de\u0301part",
        "de\u0301penser",
        "de\u0301phaser",
        "de\u0301placer",
        "de\u0301poser",
        "de\u0301ranger",
        "de\u0301rober",
        "de\u0301sastre",
        "descente",
        "de\u0301sert",
        "de\u0301signer",
        "de\u0301sobe\u0301ir",
        "dessiner",
        "destrier",
        "de\u0301tacher",
        "de\u0301tester",
        "de\u0301tourer",
        "de\u0301tresse",
        "devancer",
        "devenir",
        "deviner",
        "devoir",
        "diable",
        "dialogue",
        "diamant",
        "dicter",
        "diffe\u0301rer",
        "dige\u0301rer",
        "digital",
        "digne",
        "diluer",
        "dimanche",
        "diminuer",
        "dioxyde",
        "directif",
        "diriger",
        "discuter",
        "disposer",
        "dissiper",
        "distance",
        "divertir",
        "diviser",
        "docile",
        "docteur",
        "dogme",
        "doigt",
        "domaine",
        "domicile",
        "dompter",
        "donateur",
        "donjon",
        "donner",
        "dopamine",
        "dortoir",
        "dorure",
        "dosage",
        "doseur",
        "dossier",
        "dotation",
        "douanier",
        "double",
        "douceur",
        "douter",
        "doyen",
        "dragon",
        "draper",
        "dresser",
        "dribbler",
        "droiture",
        "duperie",
        "duplexe",
        "durable",
        "durcir",
        "dynastie",
        "e\u0301blouir",
        "e\u0301carter",
        "e\u0301charpe",
        "e\u0301chelle",
        "e\u0301clairer",
        "e\u0301clipse",
        "e\u0301clore",
        "e\u0301cluse",
        "e\u0301cole",
        "e\u0301conomie",
        "e\u0301corce",
        "e\u0301couter",
        "e\u0301craser",
        "e\u0301cre\u0301mer",
        "e\u0301crivain",
        "e\u0301crou",
        "e\u0301cume",
        "e\u0301cureuil",
        "e\u0301difier",
        "e\u0301duquer",
        "effacer",
        "effectif",
        "effigie",
        "effort",
        "effrayer",
        "effusion",
        "e\u0301galiser",
        "e\u0301garer",
        "e\u0301jecter",
        "e\u0301laborer",
        "e\u0301largir",
        "e\u0301lectron",
        "e\u0301le\u0301gant",
        "e\u0301le\u0301phant",
        "e\u0301le\u0300ve",
        "e\u0301ligible",
        "e\u0301litisme",
        "e\u0301loge",
        "e\u0301lucider",
        "e\u0301luder",
        "emballer",
        "embellir",
        "embryon",
        "e\u0301meraude",
        "e\u0301mission",
        "emmener",
        "e\u0301motion",
        "e\u0301mouvoir",
        "empereur",
        "employer",
        "emporter",
        "emprise",
        "e\u0301mulsion",
        "encadrer",
        "enche\u0300re",
        "enclave",
        "encoche",
        "endiguer",
        "endosser",
        "endroit",
        "enduire",
        "e\u0301nergie",
        "enfance",
        "enfermer",
        "enfouir",
        "engager",
        "engin",
        "englober",
        "e\u0301nigme",
        "enjamber",
        "enjeu",
        "enlever",
        "ennemi",
        "ennuyeux",
        "enrichir",
        "enrobage",
        "enseigne",
        "entasser",
        "entendre",
        "entier",
        "entourer",
        "entraver",
        "e\u0301nume\u0301rer",
        "envahir",
        "enviable",
        "envoyer",
        "enzyme",
        "e\u0301olien",
        "e\u0301paissir",
        "e\u0301pargne",
        "e\u0301patant",
        "e\u0301paule",
        "e\u0301picerie",
        "e\u0301pide\u0301mie",
        "e\u0301pier",
        "e\u0301pilogue",
        "e\u0301pine",
        "e\u0301pisode",
        "e\u0301pitaphe",
        "e\u0301poque",
        "e\u0301preuve",
        "e\u0301prouver",
        "e\u0301puisant",
        "e\u0301querre",
        "e\u0301quipe",
        "e\u0301riger",
        "e\u0301rosion",
        "erreur",
        "e\u0301ruption",
        "escalier",
        "espadon",
        "espe\u0300ce",
        "espie\u0300gle",
        "espoir",
        "esprit",
        "esquiver",
        "essayer",
        "essence",
        "essieu",
        "essorer",
        "estime",
        "estomac",
        "estrade",
        "e\u0301tage\u0300re",
        "e\u0301taler",
        "e\u0301tanche",
        "e\u0301tatique",
        "e\u0301teindre",
        "e\u0301tendoir",
        "e\u0301ternel",
        "e\u0301thanol",
        "e\u0301thique",
        "ethnie",
        "e\u0301tirer",
        "e\u0301toffer",
        "e\u0301toile",
        "e\u0301tonnant",
        "e\u0301tourdir",
        "e\u0301trange",
        "e\u0301troit",
        "e\u0301tude",
        "euphorie",
        "e\u0301valuer",
        "e\u0301vasion",
        "e\u0301ventail",
        "e\u0301vidence",
        "e\u0301viter",
        "e\u0301volutif",
        "e\u0301voquer",
        "exact",
        "exage\u0301rer",
        "exaucer",
        "exceller",
        "excitant",
        "exclusif",
        "excuse",
        "exe\u0301cuter",
        "exemple",
        "exercer",
        "exhaler",
        "exhorter",
        "exigence",
        "exiler",
        "exister",
        "exotique",
        "expe\u0301dier",
        "explorer",
        "exposer",
        "exprimer",
        "exquis",
        "extensif",
        "extraire",
        "exulter",
        "fable",
        "fabuleux",
        "facette",
        "facile",
        "facture",
        "faiblir",
        "falaise",
        "fameux",
        "famille",
        "farceur",
        "farfelu",
        "farine",
        "farouche",
        "fasciner",
        "fatal",
        "fatigue",
        "faucon",
        "fautif",
        "faveur",
        "favori",
        "fe\u0301brile",
        "fe\u0301conder",
        "fe\u0301de\u0301rer",
        "fe\u0301lin",
        "femme",
        "fe\u0301mur",
        "fendoir",
        "fe\u0301odal",
        "fermer",
        "fe\u0301roce",
        "ferveur",
        "festival",
        "feuille",
        "feutre",
        "fe\u0301vrier",
        "fiasco",
        "ficeler",
        "fictif",
        "fide\u0300le",
        "figure",
        "filature",
        "filetage",
        "filie\u0300re",
        "filleul",
        "filmer",
        "filou",
        "filtrer",
        "financer",
        "finir",
        "fiole",
        "firme",
        "fissure",
        "fixer",
        "flairer",
        "flamme",
        "flasque",
        "flatteur",
        "fle\u0301au",
        "fle\u0300che",
        "fleur",
        "flexion",
        "flocon",
        "flore",
        "fluctuer",
        "fluide",
        "fluvial",
        "folie",
        "fonderie",
        "fongible",
        "fontaine",
        "forcer",
        "forgeron",
        "formuler",
        "fortune",
        "fossile",
        "foudre",
        "fouge\u0300re",
        "fouiller",
        "foulure",
        "fourmi",
        "fragile",
        "fraise",
        "franchir",
        "frapper",
        "frayeur",
        "fre\u0301gate",
        "freiner",
        "frelon",
        "fre\u0301mir",
        "fre\u0301ne\u0301sie",
        "fre\u0300re",
        "friable",
        "friction",
        "frisson",
        "frivole",
        "froid",
        "fromage",
        "frontal",
        "frotter",
        "fruit",
        "fugitif",
        "fuite",
        "fureur",
        "furieux",
        "furtif",
        "fusion",
        "futur",
        "gagner",
        "galaxie",
        "galerie",
        "gambader",
        "garantir",
        "gardien",
        "garnir",
        "garrigue",
        "gazelle",
        "gazon",
        "ge\u0301ant",
        "ge\u0301latine",
        "ge\u0301lule",
        "gendarme",
        "ge\u0301ne\u0301ral",
        "ge\u0301nie",
        "genou",
        "gentil",
        "ge\u0301ologie",
        "ge\u0301ome\u0300tre",
        "ge\u0301ranium",
        "germe",
        "gestuel",
        "geyser",
        "gibier",
        "gicler",
        "girafe",
        "givre",
        "glace",
        "glaive",
        "glisser",
        "globe",
        "gloire",
        "glorieux",
        "golfeur",
        "gomme",
        "gonfler",
        "gorge",
        "gorille",
        "goudron",
        "gouffre",
        "goulot",
        "goupille",
        "gourmand",
        "goutte",
        "graduel",
        "graffiti",
        "graine",
        "grand",
        "grappin",
        "gratuit",
        "gravir",
        "grenat",
        "griffure",
        "griller",
        "grimper",
        "grogner",
        "gronder",
        "grotte",
        "groupe",
        "gruger",
        "grutier",
        "gruye\u0300re",
        "gue\u0301pard",
        "guerrier",
        "guide",
        "guimauve",
        "guitare",
        "gustatif",
        "gymnaste",
        "gyrostat",
        "habitude",
        "hachoir",
        "halte",
        "hameau",
        "hangar",
        "hanneton",
        "haricot",
        "harmonie",
        "harpon",
        "hasard",
        "he\u0301lium",
        "he\u0301matome",
        "herbe",
        "he\u0301risson",
        "hermine",
        "he\u0301ron",
        "he\u0301siter",
        "heureux",
        "hiberner",
        "hibou",
        "hilarant",
        "histoire",
        "hiver",
        "homard",
        "hommage",
        "homoge\u0300ne",
        "honneur",
        "honorer",
        "honteux",
        "horde",
        "horizon",
        "horloge",
        "hormone",
        "horrible",
        "houleux",
        "housse",
        "hublot",
        "huileux",
        "humain",
        "humble",
        "humide",
        "humour",
        "hurler",
        "hydromel",
        "hygie\u0300ne",
        "hymne",
        "hypnose",
        "idylle",
        "ignorer",
        "iguane",
        "illicite",
        "illusion",
        "image",
        "imbiber",
        "imiter",
        "immense",
        "immobile",
        "immuable",
        "impact",
        "impe\u0301rial",
        "implorer",
        "imposer",
        "imprimer",
        "imputer",
        "incarner",
        "incendie",
        "incident",
        "incliner",
        "incolore",
        "indexer",
        "indice",
        "inductif",
        "ine\u0301dit",
        "ineptie",
        "inexact",
        "infini",
        "infliger",
        "informer",
        "infusion",
        "inge\u0301rer",
        "inhaler",
        "inhiber",
        "injecter",
        "injure",
        "innocent",
        "inoculer",
        "inonder",
        "inscrire",
        "insecte",
        "insigne",
        "insolite",
        "inspirer",
        "instinct",
        "insulter",
        "intact",
        "intense",
        "intime",
        "intrigue",
        "intuitif",
        "inutile",
        "invasion",
        "inventer",
        "inviter",
        "invoquer",
        "ironique",
        "irradier",
        "irre\u0301el",
        "irriter",
        "isoler",
        "ivoire",
        "ivresse",
        "jaguar",
        "jaillir",
        "jambe",
        "janvier",
        "jardin",
        "jauger",
        "jaune",
        "javelot",
        "jetable",
        "jeton",
        "jeudi",
        "jeunesse",
        "joindre",
        "joncher",
        "jongler",
        "joueur",
        "jouissif",
        "journal",
        "jovial",
        "joyau",
        "joyeux",
        "jubiler",
        "jugement",
        "junior",
        "jupon",
        "juriste",
        "justice",
        "juteux",
        "juve\u0301nile",
        "kayak",
        "kimono",
        "kiosque",
        "label",
        "labial",
        "labourer",
        "lace\u0301rer",
        "lactose",
        "lagune",
        "laine",
        "laisser",
        "laitier",
        "lambeau",
        "lamelle",
        "lampe",
        "lanceur",
        "langage",
        "lanterne",
        "lapin",
        "largeur",
        "larme",
        "laurier",
        "lavabo",
        "lavoir",
        "lecture",
        "le\u0301gal",
        "le\u0301ger",
        "le\u0301gume",
        "lessive",
        "lettre",
        "levier",
        "lexique",
        "le\u0301zard",
        "liasse",
        "libe\u0301rer",
        "libre",
        "licence",
        "licorne",
        "lie\u0300ge",
        "lie\u0300vre",
        "ligature",
        "ligoter",
        "ligue",
        "limer",
        "limite",
        "limonade",
        "limpide",
        "line\u0301aire",
        "lingot",
        "lionceau",
        "liquide",
        "lisie\u0300re",
        "lister",
        "lithium",
        "litige",
        "littoral",
        "livreur",
        "logique",
        "lointain",
        "loisir",
        "lombric",
        "loterie",
        "louer",
        "lourd",
        "loutre",
        "louve",
        "loyal",
        "lubie",
        "lucide",
        "lucratif",
        "lueur",
        "lugubre",
        "luisant",
        "lumie\u0300re",
        "lunaire",
        "lundi",
        "luron",
        "lutter",
        "luxueux",
        "machine",
        "magasin",
        "magenta",
        "magique",
        "maigre",
        "maillon",
        "maintien",
        "mairie",
        "maison",
        "majorer",
        "malaxer",
        "male\u0301fice",
        "malheur",
        "malice",
        "mallette",
        "mammouth",
        "mandater",
        "maniable",
        "manquant",
        "manteau",
        "manuel",
        "marathon",
        "marbre",
        "marchand",
        "mardi",
        "maritime",
        "marqueur",
        "marron",
        "marteler",
        "mascotte",
        "massif",
        "mate\u0301riel",
        "matie\u0300re",
        "matraque",
        "maudire",
        "maussade",
        "mauve",
        "maximal",
        "me\u0301chant",
        "me\u0301connu",
        "me\u0301daille",
        "me\u0301decin",
        "me\u0301diter",
        "me\u0301duse",
        "meilleur",
        "me\u0301lange",
        "me\u0301lodie",
        "membre",
        "me\u0301moire",
        "menacer",
        "mener",
        "menhir",
        "mensonge",
        "mentor",
        "mercredi",
        "me\u0301rite",
        "merle",
        "messager",
        "mesure",
        "me\u0301tal",
        "me\u0301te\u0301ore",
        "me\u0301thode",
        "me\u0301tier",
        "meuble",
        "miauler",
        "microbe",
        "miette",
        "mignon",
        "migrer",
        "milieu",
        "million",
        "mimique",
        "mince",
        "mine\u0301ral",
        "minimal",
        "minorer",
        "minute",
        "miracle",
        "miroiter",
        "missile",
        "mixte",
        "mobile",
        "moderne",
        "moelleux",
        "mondial",
        "moniteur",
        "monnaie",
        "monotone",
        "monstre",
        "montagne",
        "monument",
        "moqueur",
        "morceau",
        "morsure",
        "mortier",
        "moteur",
        "motif",
        "mouche",
        "moufle",
        "moulin",
        "mousson",
        "mouton",
        "mouvant",
        "multiple",
        "munition",
        "muraille",
        "mure\u0300ne",
        "murmure",
        "muscle",
        "muse\u0301um",
        "musicien",
        "mutation",
        "muter",
        "mutuel",
        "myriade",
        "myrtille",
        "myste\u0300re",
        "mythique",
        "nageur",
        "nappe",
        "narquois",
        "narrer",
        "natation",
        "nation",
        "nature",
        "naufrage",
        "nautique",
        "navire",
        "ne\u0301buleux",
        "nectar",
        "ne\u0301faste",
        "ne\u0301gation",
        "ne\u0301gliger",
        "ne\u0301gocier",
        "neige",
        "nerveux",
        "nettoyer",
        "neurone",
        "neutron",
        "neveu",
        "niche",
        "nickel",
        "nitrate",
        "niveau",
        "noble",
        "nocif",
        "nocturne",
        "noirceur",
        "noisette",
        "nomade",
        "nombreux",
        "nommer",
        "normatif",
        "notable",
        "notifier",
        "notoire",
        "nourrir",
        "nouveau",
        "novateur",
        "novembre",
        "novice",
        "nuage",
        "nuancer",
        "nuire",
        "nuisible",
        "nume\u0301ro",
        "nuptial",
        "nuque",
        "nutritif",
        "obe\u0301ir",
        "objectif",
        "obliger",
        "obscur",
        "observer",
        "obstacle",
        "obtenir",
        "obturer",
        "occasion",
        "occuper",
        "oce\u0301an",
        "octobre",
        "octroyer",
        "octupler",
        "oculaire",
        "odeur",
        "odorant",
        "offenser",
        "officier",
        "offrir",
        "ogive",
        "oiseau",
        "oisillon",
        "olfactif",
        "olivier",
        "ombrage",
        "omettre",
        "onctueux",
        "onduler",
        "one\u0301reux",
        "onirique",
        "opale",
        "opaque",
        "ope\u0301rer",
        "opinion",
        "opportun",
        "opprimer",
        "opter",
        "optique",
        "orageux",
        "orange",
        "orbite",
        "ordonner",
        "oreille",
        "organe",
        "orgueil",
        "orifice",
        "ornement",
        "orque",
        "ortie",
        "osciller",
        "osmose",
        "ossature",
        "otarie",
        "ouragan",
        "ourson",
        "outil",
        "outrager",
        "ouvrage",
        "ovation",
        "oxyde",
        "oxyge\u0300ne",
        "ozone",
        "paisible",
        "palace",
        "palmare\u0300s",
        "palourde",
        "palper",
        "panache",
        "panda",
        "pangolin",
        "paniquer",
        "panneau",
        "panorama",
        "pantalon",
        "papaye",
        "papier",
        "papoter",
        "papyrus",
        "paradoxe",
        "parcelle",
        "paresse",
        "parfumer",
        "parler",
        "parole",
        "parrain",
        "parsemer",
        "partager",
        "parure",
        "parvenir",
        "passion",
        "paste\u0300que",
        "paternel",
        "patience",
        "patron",
        "pavillon",
        "pavoiser",
        "payer",
        "paysage",
        "peigne",
        "peintre",
        "pelage",
        "pe\u0301lican",
        "pelle",
        "pelouse",
        "peluche",
        "pendule",
        "pe\u0301ne\u0301trer",
        "pe\u0301nible",
        "pensif",
        "pe\u0301nurie",
        "pe\u0301pite",
        "pe\u0301plum",
        "perdrix",
        "perforer",
        "pe\u0301riode",
        "permuter",
        "perplexe",
        "persil",
        "perte",
        "peser",
        "pe\u0301tale",
        "petit",
        "pe\u0301trir",
        "peuple",
        "pharaon",
        "phobie",
        "phoque",
        "photon",
        "phrase",
        "physique",
        "piano",
        "pictural",
        "pie\u0300ce",
        "pierre",
        "pieuvre",
        "pilote",
        "pinceau",
        "pipette",
        "piquer",
        "pirogue",
        "piscine",
        "piston",
        "pivoter",
        "pixel",
        "pizza",
        "placard",
        "plafond",
        "plaisir",
        "planer",
        "plaque",
        "plastron",
        "plateau",
        "pleurer",
        "plexus",
        "pliage",
        "plomb",
        "plonger",
        "pluie",
        "plumage",
        "pochette",
        "poe\u0301sie",
        "poe\u0300te",
        "pointe",
        "poirier",
        "poisson",
        "poivre",
        "polaire",
        "policier",
        "pollen",
        "polygone",
        "pommade",
        "pompier",
        "ponctuel",
        "ponde\u0301rer",
        "poney",
        "portique",
        "position",
        "posse\u0301der",
        "posture",
        "potager",
        "poteau",
        "potion",
        "pouce",
        "poulain",
        "poumon",
        "pourpre",
        "poussin",
        "pouvoir",
        "prairie",
        "pratique",
        "pre\u0301cieux",
        "pre\u0301dire",
        "pre\u0301fixe",
        "pre\u0301lude",
        "pre\u0301nom",
        "pre\u0301sence",
        "pre\u0301texte",
        "pre\u0301voir",
        "primitif",
        "prince",
        "prison",
        "priver",
        "proble\u0300me",
        "proce\u0301der",
        "prodige",
        "profond",
        "progre\u0300s",
        "proie",
        "projeter",
        "prologue",
        "promener",
        "propre",
        "prospe\u0300re",
        "prote\u0301ger",
        "prouesse",
        "proverbe",
        "prudence",
        "pruneau",
        "psychose",
        "public",
        "puceron",
        "puiser",
        "pulpe",
        "pulsar",
        "punaise",
        "punitif",
        "pupitre",
        "purifier",
        "puzzle",
        "pyramide",
        "quasar",
        "querelle",
        "question",
        "quie\u0301tude",
        "quitter",
        "quotient",
        "racine",
        "raconter",
        "radieux",
        "ragondin",
        "raideur",
        "raisin",
        "ralentir",
        "rallonge",
        "ramasser",
        "rapide",
        "rasage",
        "ratisser",
        "ravager",
        "ravin",
        "rayonner",
        "re\u0301actif",
        "re\u0301agir",
        "re\u0301aliser",
        "re\u0301animer",
        "recevoir",
        "re\u0301citer",
        "re\u0301clamer",
        "re\u0301colter",
        "recruter",
        "reculer",
        "recycler",
        "re\u0301diger",
        "redouter",
        "refaire",
        "re\u0301flexe",
        "re\u0301former",
        "refrain",
        "refuge",
        "re\u0301galien",
        "re\u0301gion",
        "re\u0301glage",
        "re\u0301gulier",
        "re\u0301ite\u0301rer",
        "rejeter",
        "rejouer",
        "relatif",
        "relever",
        "relief",
        "remarque",
        "reme\u0300de",
        "remise",
        "remonter",
        "remplir",
        "remuer",
        "renard",
        "renfort",
        "renifler",
        "renoncer",
        "rentrer",
        "renvoi",
        "replier",
        "reporter",
        "reprise",
        "reptile",
        "requin",
        "re\u0301serve",
        "re\u0301sineux",
        "re\u0301soudre",
        "respect",
        "rester",
        "re\u0301sultat",
        "re\u0301tablir",
        "retenir",
        "re\u0301ticule",
        "retomber",
        "retracer",
        "re\u0301union",
        "re\u0301ussir",
        "revanche",
        "revivre",
        "re\u0301volte",
        "re\u0301vulsif",
        "richesse",
        "rideau",
        "rieur",
        "rigide",
        "rigoler",
        "rincer",
        "riposter",
        "risible",
        "risque",
        "rituel",
        "rival",
        "rivie\u0300re",
        "rocheux",
        "romance",
        "rompre",
        "ronce",
        "rondin",
        "roseau",
        "rosier",
        "rotatif",
        "rotor",
        "rotule",
        "rouge",
        "rouille",
        "rouleau",
        "routine",
        "royaume",
        "ruban",
        "rubis",
        "ruche",
        "ruelle",
        "rugueux",
        "ruiner",
        "ruisseau",
        "ruser",
        "rustique",
        "rythme",
        "sabler",
        "saboter",
        "sabre",
        "sacoche",
        "safari",
        "sagesse",
        "saisir",
        "salade",
        "salive",
        "salon",
        "saluer",
        "samedi",
        "sanction",
        "sanglier",
        "sarcasme",
        "sardine",
        "saturer",
        "saugrenu",
        "saumon",
        "sauter",
        "sauvage",
        "savant",
        "savonner",
        "scalpel",
        "scandale",
        "sce\u0301le\u0301rat",
        "sce\u0301nario",
        "sceptre",
        "sche\u0301ma",
        "science",
        "scinder",
        "score",
        "scrutin",
        "sculpter",
        "se\u0301ance",
        "se\u0301cable",
        "se\u0301cher",
        "secouer",
        "se\u0301cre\u0301ter",
        "se\u0301datif",
        "se\u0301duire",
        "seigneur",
        "se\u0301jour",
        "se\u0301lectif",
        "semaine",
        "sembler",
        "semence",
        "se\u0301minal",
        "se\u0301nateur",
        "sensible",
        "sentence",
        "se\u0301parer",
        "se\u0301quence",
        "serein",
        "sergent",
        "se\u0301rieux",
        "serrure",
        "se\u0301rum",
        "service",
        "se\u0301same",
        "se\u0301vir",
        "sevrage",
        "sextuple",
        "side\u0301ral",
        "sie\u0300cle",
        "sie\u0301ger",
        "siffler",
        "sigle",
        "signal",
        "silence",
        "silicium",
        "simple",
        "since\u0300re",
        "sinistre",
        "siphon",
        "sirop",
        "sismique",
        "situer",
        "skier",
        "social",
        "socle",
        "sodium",
        "soigneux",
        "soldat",
        "soleil",
        "solitude",
        "soluble",
        "sombre",
        "sommeil",
        "somnoler",
        "sonde",
        "songeur",
        "sonnette",
        "sonore",
        "sorcier",
        "sortir",
        "sosie",
        "sottise",
        "soucieux",
        "soudure",
        "souffle",
        "soulever",
        "soupape",
        "source",
        "soutirer",
        "souvenir",
        "spacieux",
        "spatial",
        "spe\u0301cial",
        "sphe\u0300re",
        "spiral",
        "stable",
        "station",
        "sternum",
        "stimulus",
        "stipuler",
        "strict",
        "studieux",
        "stupeur",
        "styliste",
        "sublime",
        "substrat",
        "subtil",
        "subvenir",
        "succe\u0300s",
        "sucre",
        "suffixe",
        "sugge\u0301rer",
        "suiveur",
        "sulfate",
        "superbe",
        "supplier",
        "surface",
        "suricate",
        "surmener",
        "surprise",
        "sursaut",
        "survie",
        "suspect",
        "syllabe",
        "symbole",
        "syme\u0301trie",
        "synapse",
        "syntaxe",
        "syste\u0300me",
        "tabac",
        "tablier",
        "tactile",
        "tailler",
        "talent",
        "talisman",
        "talonner",
        "tambour",
        "tamiser",
        "tangible",
        "tapis",
        "taquiner",
        "tarder",
        "tarif",
        "tartine",
        "tasse",
        "tatami",
        "tatouage",
        "taupe",
        "taureau",
        "taxer",
        "te\u0301moin",
        "temporel",
        "tenaille",
        "tendre",
        "teneur",
        "tenir",
        "tension",
        "terminer",
        "terne",
        "terrible",
        "te\u0301tine",
        "texte",
        "the\u0300me",
        "the\u0301orie",
        "the\u0301rapie",
        "thorax",
        "tibia",
        "tie\u0300de",
        "timide",
        "tirelire",
        "tiroir",
        "tissu",
        "titane",
        "titre",
        "tituber",
        "toboggan",
        "tole\u0301rant",
        "tomate",
        "tonique",
        "tonneau",
        "toponyme",
        "torche",
        "tordre",
        "tornade",
        "torpille",
        "torrent",
        "torse",
        "tortue",
        "totem",
        "toucher",
        "tournage",
        "tousser",
        "toxine",
        "traction",
        "trafic",
        "tragique",
        "trahir",
        "train",
        "trancher",
        "travail",
        "tre\u0300fle",
        "tremper",
        "tre\u0301sor",
        "treuil",
        "triage",
        "tribunal",
        "tricoter",
        "trilogie",
        "triomphe",
        "tripler",
        "triturer",
        "trivial",
        "trombone",
        "tronc",
        "tropical",
        "troupeau",
        "tuile",
        "tulipe",
        "tumulte",
        "tunnel",
        "turbine",
        "tuteur",
        "tutoyer",
        "tuyau",
        "tympan",
        "typhon",
        "typique",
        "tyran",
        "ubuesque",
        "ultime",
        "ultrason",
        "unanime",
        "unifier",
        "union",
        "unique",
        "unitaire",
        "univers",
        "uranium",
        "urbain",
        "urticant",
        "usage",
        "usine",
        "usuel",
        "usure",
        "utile",
        "utopie",
        "vacarme",
        "vaccin",
        "vagabond",
        "vague",
        "vaillant",
        "vaincre",
        "vaisseau",
        "valable",
        "valise",
        "vallon",
        "valve",
        "vampire",
        "vanille",
        "vapeur",
        "varier",
        "vaseux",
        "vassal",
        "vaste",
        "vecteur",
        "vedette",
        "ve\u0301ge\u0301tal",
        "ve\u0301hicule",
        "veinard",
        "ve\u0301loce",
        "vendredi",
        "ve\u0301ne\u0301rer",
        "venger",
        "venimeux",
        "ventouse",
        "verdure",
        "ve\u0301rin",
        "vernir",
        "verrou",
        "verser",
        "vertu",
        "veston",
        "ve\u0301te\u0301ran",
        "ve\u0301tuste",
        "vexant",
        "vexer",
        "viaduc",
        "viande",
        "victoire",
        "vidange",
        "vide\u0301o",
        "vignette",
        "vigueur",
        "vilain",
        "village",
        "vinaigre",
        "violon",
        "vipe\u0300re",
        "virement",
        "virtuose",
        "virus",
        "visage",
        "viseur",
        "vision",
        "visqueux",
        "visuel",
        "vital",
        "vitesse",
        "viticole",
        "vitrine",
        "vivace",
        "vivipare",
        "vocation",
        "voguer",
        "voile",
        "voisin",
        "voiture",
        "volaille",
        "volcan",
        "voltiger",
        "volume",
        "vorace",
        "vortex",
        "voter",
        "vouloir",
        "voyage",
        "voyelle",
        "wagon",
        "xe\u0301non",
        "yacht",
        "ze\u0300bre",
        "ze\u0301nith",
        "zeste",
        "zoologie"
      ];
    }
  });

  // ../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/italian.json
  var require_italian = __commonJS({
    "../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/italian.json"(exports, module) {
      module.exports = [
        "abaco",
        "abbaglio",
        "abbinato",
        "abete",
        "abisso",
        "abolire",
        "abrasivo",
        "abrogato",
        "accadere",
        "accenno",
        "accusato",
        "acetone",
        "achille",
        "acido",
        "acqua",
        "acre",
        "acrilico",
        "acrobata",
        "acuto",
        "adagio",
        "addebito",
        "addome",
        "adeguato",
        "aderire",
        "adipe",
        "adottare",
        "adulare",
        "affabile",
        "affetto",
        "affisso",
        "affranto",
        "aforisma",
        "afoso",
        "africano",
        "agave",
        "agente",
        "agevole",
        "aggancio",
        "agire",
        "agitare",
        "agonismo",
        "agricolo",
        "agrumeto",
        "aguzzo",
        "alabarda",
        "alato",
        "albatro",
        "alberato",
        "albo",
        "albume",
        "alce",
        "alcolico",
        "alettone",
        "alfa",
        "algebra",
        "aliante",
        "alibi",
        "alimento",
        "allagato",
        "allegro",
        "allievo",
        "allodola",
        "allusivo",
        "almeno",
        "alogeno",
        "alpaca",
        "alpestre",
        "altalena",
        "alterno",
        "alticcio",
        "altrove",
        "alunno",
        "alveolo",
        "alzare",
        "amalgama",
        "amanita",
        "amarena",
        "ambito",
        "ambrato",
        "ameba",
        "america",
        "ametista",
        "amico",
        "ammasso",
        "ammenda",
        "ammirare",
        "ammonito",
        "amore",
        "ampio",
        "ampliare",
        "amuleto",
        "anacardo",
        "anagrafe",
        "analista",
        "anarchia",
        "anatra",
        "anca",
        "ancella",
        "ancora",
        "andare",
        "andrea",
        "anello",
        "angelo",
        "angolare",
        "angusto",
        "anima",
        "annegare",
        "annidato",
        "anno",
        "annuncio",
        "anonimo",
        "anticipo",
        "anzi",
        "apatico",
        "apertura",
        "apode",
        "apparire",
        "appetito",
        "appoggio",
        "approdo",
        "appunto",
        "aprile",
        "arabica",
        "arachide",
        "aragosta",
        "araldica",
        "arancio",
        "aratura",
        "arazzo",
        "arbitro",
        "archivio",
        "ardito",
        "arenile",
        "argento",
        "argine",
        "arguto",
        "aria",
        "armonia",
        "arnese",
        "arredato",
        "arringa",
        "arrosto",
        "arsenico",
        "arso",
        "artefice",
        "arzillo",
        "asciutto",
        "ascolto",
        "asepsi",
        "asettico",
        "asfalto",
        "asino",
        "asola",
        "aspirato",
        "aspro",
        "assaggio",
        "asse",
        "assoluto",
        "assurdo",
        "asta",
        "astenuto",
        "astice",
        "astratto",
        "atavico",
        "ateismo",
        "atomico",
        "atono",
        "attesa",
        "attivare",
        "attorno",
        "attrito",
        "attuale",
        "ausilio",
        "austria",
        "autista",
        "autonomo",
        "autunno",
        "avanzato",
        "avere",
        "avvenire",
        "avviso",
        "avvolgere",
        "azione",
        "azoto",
        "azzimo",
        "azzurro",
        "babele",
        "baccano",
        "bacino",
        "baco",
        "badessa",
        "badilata",
        "bagnato",
        "baita",
        "balcone",
        "baldo",
        "balena",
        "ballata",
        "balzano",
        "bambino",
        "bandire",
        "baraonda",
        "barbaro",
        "barca",
        "baritono",
        "barlume",
        "barocco",
        "basilico",
        "basso",
        "batosta",
        "battuto",
        "baule",
        "bava",
        "bavosa",
        "becco",
        "beffa",
        "belgio",
        "belva",
        "benda",
        "benevole",
        "benigno",
        "benzina",
        "bere",
        "berlina",
        "beta",
        "bibita",
        "bici",
        "bidone",
        "bifido",
        "biga",
        "bilancia",
        "bimbo",
        "binocolo",
        "biologo",
        "bipede",
        "bipolare",
        "birbante",
        "birra",
        "biscotto",
        "bisesto",
        "bisnonno",
        "bisonte",
        "bisturi",
        "bizzarro",
        "blando",
        "blatta",
        "bollito",
        "bonifico",
        "bordo",
        "bosco",
        "botanico",
        "bottino",
        "bozzolo",
        "braccio",
        "bradipo",
        "brama",
        "branca",
        "bravura",
        "bretella",
        "brevetto",
        "brezza",
        "briglia",
        "brillante",
        "brindare",
        "broccolo",
        "brodo",
        "bronzina",
        "brullo",
        "bruno",
        "bubbone",
        "buca",
        "budino",
        "buffone",
        "buio",
        "bulbo",
        "buono",
        "burlone",
        "burrasca",
        "bussola",
        "busta",
        "cadetto",
        "caduco",
        "calamaro",
        "calcolo",
        "calesse",
        "calibro",
        "calmo",
        "caloria",
        "cambusa",
        "camerata",
        "camicia",
        "cammino",
        "camola",
        "campale",
        "canapa",
        "candela",
        "cane",
        "canino",
        "canotto",
        "cantina",
        "capace",
        "capello",
        "capitolo",
        "capogiro",
        "cappero",
        "capra",
        "capsula",
        "carapace",
        "carcassa",
        "cardo",
        "carisma",
        "carovana",
        "carretto",
        "cartolina",
        "casaccio",
        "cascata",
        "caserma",
        "caso",
        "cassone",
        "castello",
        "casuale",
        "catasta",
        "catena",
        "catrame",
        "cauto",
        "cavillo",
        "cedibile",
        "cedrata",
        "cefalo",
        "celebre",
        "cellulare",
        "cena",
        "cenone",
        "centesimo",
        "ceramica",
        "cercare",
        "certo",
        "cerume",
        "cervello",
        "cesoia",
        "cespo",
        "ceto",
        "chela",
        "chiaro",
        "chicca",
        "chiedere",
        "chimera",
        "china",
        "chirurgo",
        "chitarra",
        "ciao",
        "ciclismo",
        "cifrare",
        "cigno",
        "cilindro",
        "ciottolo",
        "circa",
        "cirrosi",
        "citrico",
        "cittadino",
        "ciuffo",
        "civetta",
        "civile",
        "classico",
        "clinica",
        "cloro",
        "cocco",
        "codardo",
        "codice",
        "coerente",
        "cognome",
        "collare",
        "colmato",
        "colore",
        "colposo",
        "coltivato",
        "colza",
        "coma",
        "cometa",
        "commando",
        "comodo",
        "computer",
        "comune",
        "conciso",
        "condurre",
        "conferma",
        "congelare",
        "coniuge",
        "connesso",
        "conoscere",
        "consumo",
        "continuo",
        "convegno",
        "coperto",
        "copione",
        "coppia",
        "copricapo",
        "corazza",
        "cordata",
        "coricato",
        "cornice",
        "corolla",
        "corpo",
        "corredo",
        "corsia",
        "cortese",
        "cosmico",
        "costante",
        "cottura",
        "covato",
        "cratere",
        "cravatta",
        "creato",
        "credere",
        "cremoso",
        "crescita",
        "creta",
        "criceto",
        "crinale",
        "crisi",
        "critico",
        "croce",
        "cronaca",
        "crostata",
        "cruciale",
        "crusca",
        "cucire",
        "cuculo",
        "cugino",
        "cullato",
        "cupola",
        "curatore",
        "cursore",
        "curvo",
        "cuscino",
        "custode",
        "dado",
        "daino",
        "dalmata",
        "damerino",
        "daniela",
        "dannoso",
        "danzare",
        "datato",
        "davanti",
        "davvero",
        "debutto",
        "decennio",
        "deciso",
        "declino",
        "decollo",
        "decreto",
        "dedicato",
        "definito",
        "deforme",
        "degno",
        "delegare",
        "delfino",
        "delirio",
        "delta",
        "demenza",
        "denotato",
        "dentro",
        "deposito",
        "derapata",
        "derivare",
        "deroga",
        "descritto",
        "deserto",
        "desiderio",
        "desumere",
        "detersivo",
        "devoto",
        "diametro",
        "dicembre",
        "diedro",
        "difeso",
        "diffuso",
        "digerire",
        "digitale",
        "diluvio",
        "dinamico",
        "dinnanzi",
        "dipinto",
        "diploma",
        "dipolo",
        "diradare",
        "dire",
        "dirotto",
        "dirupo",
        "disagio",
        "discreto",
        "disfare",
        "disgelo",
        "disposto",
        "distanza",
        "disumano",
        "dito",
        "divano",
        "divelto",
        "dividere",
        "divorato",
        "doblone",
        "docente",
        "doganale",
        "dogma",
        "dolce",
        "domato",
        "domenica",
        "dominare",
        "dondolo",
        "dono",
        "dormire",
        "dote",
        "dottore",
        "dovuto",
        "dozzina",
        "drago",
        "druido",
        "dubbio",
        "dubitare",
        "ducale",
        "duna",
        "duomo",
        "duplice",
        "duraturo",
        "ebano",
        "eccesso",
        "ecco",
        "eclissi",
        "economia",
        "edera",
        "edicola",
        "edile",
        "editoria",
        "educare",
        "egemonia",
        "egli",
        "egoismo",
        "egregio",
        "elaborato",
        "elargire",
        "elegante",
        "elencato",
        "eletto",
        "elevare",
        "elfico",
        "elica",
        "elmo",
        "elsa",
        "eluso",
        "emanato",
        "emblema",
        "emesso",
        "emiro",
        "emotivo",
        "emozione",
        "empirico",
        "emulo",
        "endemico",
        "enduro",
        "energia",
        "enfasi",
        "enoteca",
        "entrare",
        "enzima",
        "epatite",
        "epilogo",
        "episodio",
        "epocale",
        "eppure",
        "equatore",
        "erario",
        "erba",
        "erboso",
        "erede",
        "eremita",
        "erigere",
        "ermetico",
        "eroe",
        "erosivo",
        "errante",
        "esagono",
        "esame",
        "esanime",
        "esaudire",
        "esca",
        "esempio",
        "esercito",
        "esibito",
        "esigente",
        "esistere",
        "esito",
        "esofago",
        "esortato",
        "esoso",
        "espanso",
        "espresso",
        "essenza",
        "esso",
        "esteso",
        "estimare",
        "estonia",
        "estroso",
        "esultare",
        "etilico",
        "etnico",
        "etrusco",
        "etto",
        "euclideo",
        "europa",
        "evaso",
        "evidenza",
        "evitato",
        "evoluto",
        "evviva",
        "fabbrica",
        "faccenda",
        "fachiro",
        "falco",
        "famiglia",
        "fanale",
        "fanfara",
        "fango",
        "fantasma",
        "fare",
        "farfalla",
        "farinoso",
        "farmaco",
        "fascia",
        "fastoso",
        "fasullo",
        "faticare",
        "fato",
        "favoloso",
        "febbre",
        "fecola",
        "fede",
        "fegato",
        "felpa",
        "feltro",
        "femmina",
        "fendere",
        "fenomeno",
        "fermento",
        "ferro",
        "fertile",
        "fessura",
        "festivo",
        "fetta",
        "feudo",
        "fiaba",
        "fiducia",
        "fifa",
        "figurato",
        "filo",
        "finanza",
        "finestra",
        "finire",
        "fiore",
        "fiscale",
        "fisico",
        "fiume",
        "flacone",
        "flamenco",
        "flebo",
        "flemma",
        "florido",
        "fluente",
        "fluoro",
        "fobico",
        "focaccia",
        "focoso",
        "foderato",
        "foglio",
        "folata",
        "folclore",
        "folgore",
        "fondente",
        "fonetico",
        "fonia",
        "fontana",
        "forbito",
        "forchetta",
        "foresta",
        "formica",
        "fornaio",
        "foro",
        "fortezza",
        "forzare",
        "fosfato",
        "fosso",
        "fracasso",
        "frana",
        "frassino",
        "fratello",
        "freccetta",
        "frenata",
        "fresco",
        "frigo",
        "frollino",
        "fronde",
        "frugale",
        "frutta",
        "fucilata",
        "fucsia",
        "fuggente",
        "fulmine",
        "fulvo",
        "fumante",
        "fumetto",
        "fumoso",
        "fune",
        "funzione",
        "fuoco",
        "furbo",
        "furgone",
        "furore",
        "fuso",
        "futile",
        "gabbiano",
        "gaffe",
        "galateo",
        "gallina",
        "galoppo",
        "gambero",
        "gamma",
        "garanzia",
        "garbo",
        "garofano",
        "garzone",
        "gasdotto",
        "gasolio",
        "gastrico",
        "gatto",
        "gaudio",
        "gazebo",
        "gazzella",
        "geco",
        "gelatina",
        "gelso",
        "gemello",
        "gemmato",
        "gene",
        "genitore",
        "gennaio",
        "genotipo",
        "gergo",
        "ghepardo",
        "ghiaccio",
        "ghisa",
        "giallo",
        "gilda",
        "ginepro",
        "giocare",
        "gioiello",
        "giorno",
        "giove",
        "girato",
        "girone",
        "gittata",
        "giudizio",
        "giurato",
        "giusto",
        "globulo",
        "glutine",
        "gnomo",
        "gobba",
        "golf",
        "gomito",
        "gommone",
        "gonfio",
        "gonna",
        "governo",
        "gracile",
        "grado",
        "grafico",
        "grammo",
        "grande",
        "grattare",
        "gravoso",
        "grazia",
        "greca",
        "gregge",
        "grifone",
        "grigio",
        "grinza",
        "grotta",
        "gruppo",
        "guadagno",
        "guaio",
        "guanto",
        "guardare",
        "gufo",
        "guidare",
        "ibernato",
        "icona",
        "identico",
        "idillio",
        "idolo",
        "idra",
        "idrico",
        "idrogeno",
        "igiene",
        "ignaro",
        "ignorato",
        "ilare",
        "illeso",
        "illogico",
        "illudere",
        "imballo",
        "imbevuto",
        "imbocco",
        "imbuto",
        "immane",
        "immerso",
        "immolato",
        "impacco",
        "impeto",
        "impiego",
        "importo",
        "impronta",
        "inalare",
        "inarcare",
        "inattivo",
        "incanto",
        "incendio",
        "inchino",
        "incisivo",
        "incluso",
        "incontro",
        "incrocio",
        "incubo",
        "indagine",
        "india",
        "indole",
        "inedito",
        "infatti",
        "infilare",
        "inflitto",
        "ingaggio",
        "ingegno",
        "inglese",
        "ingordo",
        "ingrosso",
        "innesco",
        "inodore",
        "inoltrare",
        "inondato",
        "insano",
        "insetto",
        "insieme",
        "insonnia",
        "insulina",
        "intasato",
        "intero",
        "intonaco",
        "intuito",
        "inumidire",
        "invalido",
        "invece",
        "invito",
        "iperbole",
        "ipnotico",
        "ipotesi",
        "ippica",
        "iride",
        "irlanda",
        "ironico",
        "irrigato",
        "irrorare",
        "isolato",
        "isotopo",
        "isterico",
        "istituto",
        "istrice",
        "italia",
        "iterare",
        "labbro",
        "labirinto",
        "lacca",
        "lacerato",
        "lacrima",
        "lacuna",
        "laddove",
        "lago",
        "lampo",
        "lancetta",
        "lanterna",
        "lardoso",
        "larga",
        "laringe",
        "lastra",
        "latenza",
        "latino",
        "lattuga",
        "lavagna",
        "lavoro",
        "legale",
        "leggero",
        "lembo",
        "lentezza",
        "lenza",
        "leone",
        "lepre",
        "lesivo",
        "lessato",
        "lesto",
        "letterale",
        "leva",
        "levigato",
        "libero",
        "lido",
        "lievito",
        "lilla",
        "limatura",
        "limitare",
        "limpido",
        "lineare",
        "lingua",
        "liquido",
        "lira",
        "lirica",
        "lisca",
        "lite",
        "litigio",
        "livrea",
        "locanda",
        "lode",
        "logica",
        "lombare",
        "londra",
        "longevo",
        "loquace",
        "lorenzo",
        "loto",
        "lotteria",
        "luce",
        "lucidato",
        "lumaca",
        "luminoso",
        "lungo",
        "lupo",
        "luppolo",
        "lusinga",
        "lusso",
        "lutto",
        "macabro",
        "macchina",
        "macero",
        "macinato",
        "madama",
        "magico",
        "maglia",
        "magnete",
        "magro",
        "maiolica",
        "malafede",
        "malgrado",
        "malinteso",
        "malsano",
        "malto",
        "malumore",
        "mana",
        "mancia",
        "mandorla",
        "mangiare",
        "manifesto",
        "mannaro",
        "manovra",
        "mansarda",
        "mantide",
        "manubrio",
        "mappa",
        "maratona",
        "marcire",
        "maretta",
        "marmo",
        "marsupio",
        "maschera",
        "massaia",
        "mastino",
        "materasso",
        "matricola",
        "mattone",
        "maturo",
        "mazurca",
        "meandro",
        "meccanico",
        "mecenate",
        "medesimo",
        "meditare",
        "mega",
        "melassa",
        "melis",
        "melodia",
        "meninge",
        "meno",
        "mensola",
        "mercurio",
        "merenda",
        "merlo",
        "meschino",
        "mese",
        "messere",
        "mestolo",
        "metallo",
        "metodo",
        "mettere",
        "miagolare",
        "mica",
        "micelio",
        "michele",
        "microbo",
        "midollo",
        "miele",
        "migliore",
        "milano",
        "milite",
        "mimosa",
        "minerale",
        "mini",
        "minore",
        "mirino",
        "mirtillo",
        "miscela",
        "missiva",
        "misto",
        "misurare",
        "mitezza",
        "mitigare",
        "mitra",
        "mittente",
        "mnemonico",
        "modello",
        "modifica",
        "modulo",
        "mogano",
        "mogio",
        "mole",
        "molosso",
        "monastero",
        "monco",
        "mondina",
        "monetario",
        "monile",
        "monotono",
        "monsone",
        "montato",
        "monviso",
        "mora",
        "mordere",
        "morsicato",
        "mostro",
        "motivato",
        "motosega",
        "motto",
        "movenza",
        "movimento",
        "mozzo",
        "mucca",
        "mucosa",
        "muffa",
        "mughetto",
        "mugnaio",
        "mulatto",
        "mulinello",
        "multiplo",
        "mummia",
        "munto",
        "muovere",
        "murale",
        "musa",
        "muscolo",
        "musica",
        "mutevole",
        "muto",
        "nababbo",
        "nafta",
        "nanometro",
        "narciso",
        "narice",
        "narrato",
        "nascere",
        "nastrare",
        "naturale",
        "nautica",
        "naviglio",
        "nebulosa",
        "necrosi",
        "negativo",
        "negozio",
        "nemmeno",
        "neofita",
        "neretto",
        "nervo",
        "nessuno",
        "nettuno",
        "neutrale",
        "neve",
        "nevrotico",
        "nicchia",
        "ninfa",
        "nitido",
        "nobile",
        "nocivo",
        "nodo",
        "nome",
        "nomina",
        "nordico",
        "normale",
        "norvegese",
        "nostrano",
        "notare",
        "notizia",
        "notturno",
        "novella",
        "nucleo",
        "nulla",
        "numero",
        "nuovo",
        "nutrire",
        "nuvola",
        "nuziale",
        "oasi",
        "obbedire",
        "obbligo",
        "obelisco",
        "oblio",
        "obolo",
        "obsoleto",
        "occasione",
        "occhio",
        "occidente",
        "occorrere",
        "occultare",
        "ocra",
        "oculato",
        "odierno",
        "odorare",
        "offerta",
        "offrire",
        "offuscato",
        "oggetto",
        "oggi",
        "ognuno",
        "olandese",
        "olfatto",
        "oliato",
        "oliva",
        "ologramma",
        "oltre",
        "omaggio",
        "ombelico",
        "ombra",
        "omega",
        "omissione",
        "ondoso",
        "onere",
        "onice",
        "onnivoro",
        "onorevole",
        "onta",
        "operato",
        "opinione",
        "opposto",
        "oracolo",
        "orafo",
        "ordine",
        "orecchino",
        "orefice",
        "orfano",
        "organico",
        "origine",
        "orizzonte",
        "orma",
        "ormeggio",
        "ornativo",
        "orologio",
        "orrendo",
        "orribile",
        "ortensia",
        "ortica",
        "orzata",
        "orzo",
        "osare",
        "oscurare",
        "osmosi",
        "ospedale",
        "ospite",
        "ossa",
        "ossidare",
        "ostacolo",
        "oste",
        "otite",
        "otre",
        "ottagono",
        "ottimo",
        "ottobre",
        "ovale",
        "ovest",
        "ovino",
        "oviparo",
        "ovocito",
        "ovunque",
        "ovviare",
        "ozio",
        "pacchetto",
        "pace",
        "pacifico",
        "padella",
        "padrone",
        "paese",
        "paga",
        "pagina",
        "palazzina",
        "palesare",
        "pallido",
        "palo",
        "palude",
        "pandoro",
        "pannello",
        "paolo",
        "paonazzo",
        "paprica",
        "parabola",
        "parcella",
        "parere",
        "pargolo",
        "pari",
        "parlato",
        "parola",
        "partire",
        "parvenza",
        "parziale",
        "passivo",
        "pasticca",
        "patacca",
        "patologia",
        "pattume",
        "pavone",
        "peccato",
        "pedalare",
        "pedonale",
        "peggio",
        "peloso",
        "penare",
        "pendice",
        "penisola",
        "pennuto",
        "penombra",
        "pensare",
        "pentola",
        "pepe",
        "pepita",
        "perbene",
        "percorso",
        "perdonato",
        "perforare",
        "pergamena",
        "periodo",
        "permesso",
        "perno",
        "perplesso",
        "persuaso",
        "pertugio",
        "pervaso",
        "pesatore",
        "pesista",
        "peso",
        "pestifero",
        "petalo",
        "pettine",
        "petulante",
        "pezzo",
        "piacere",
        "pianta",
        "piattino",
        "piccino",
        "picozza",
        "piega",
        "pietra",
        "piffero",
        "pigiama",
        "pigolio",
        "pigro",
        "pila",
        "pilifero",
        "pillola",
        "pilota",
        "pimpante",
        "pineta",
        "pinna",
        "pinolo",
        "pioggia",
        "piombo",
        "piramide",
        "piretico",
        "pirite",
        "pirolisi",
        "pitone",
        "pizzico",
        "placebo",
        "planare",
        "plasma",
        "platano",
        "plenario",
        "pochezza",
        "poderoso",
        "podismo",
        "poesia",
        "poggiare",
        "polenta",
        "poligono",
        "pollice",
        "polmonite",
        "polpetta",
        "polso",
        "poltrona",
        "polvere",
        "pomice",
        "pomodoro",
        "ponte",
        "popoloso",
        "porfido",
        "poroso",
        "porpora",
        "porre",
        "portata",
        "posa",
        "positivo",
        "possesso",
        "postulato",
        "potassio",
        "potere",
        "pranzo",
        "prassi",
        "pratica",
        "precluso",
        "predica",
        "prefisso",
        "pregiato",
        "prelievo",
        "premere",
        "prenotare",
        "preparato",
        "presenza",
        "pretesto",
        "prevalso",
        "prima",
        "principe",
        "privato",
        "problema",
        "procura",
        "produrre",
        "profumo",
        "progetto",
        "prolunga",
        "promessa",
        "pronome",
        "proposta",
        "proroga",
        "proteso",
        "prova",
        "prudente",
        "prugna",
        "prurito",
        "psiche",
        "pubblico",
        "pudica",
        "pugilato",
        "pugno",
        "pulce",
        "pulito",
        "pulsante",
        "puntare",
        "pupazzo",
        "pupilla",
        "puro",
        "quadro",
        "qualcosa",
        "quasi",
        "querela",
        "quota",
        "raccolto",
        "raddoppio",
        "radicale",
        "radunato",
        "raffica",
        "ragazzo",
        "ragione",
        "ragno",
        "ramarro",
        "ramingo",
        "ramo",
        "randagio",
        "rantolare",
        "rapato",
        "rapina",
        "rappreso",
        "rasatura",
        "raschiato",
        "rasente",
        "rassegna",
        "rastrello",
        "rata",
        "ravveduto",
        "reale",
        "recepire",
        "recinto",
        "recluta",
        "recondito",
        "recupero",
        "reddito",
        "redimere",
        "regalato",
        "registro",
        "regola",
        "regresso",
        "relazione",
        "remare",
        "remoto",
        "renna",
        "replica",
        "reprimere",
        "reputare",
        "resa",
        "residente",
        "responso",
        "restauro",
        "rete",
        "retina",
        "retorica",
        "rettifica",
        "revocato",
        "riassunto",
        "ribadire",
        "ribelle",
        "ribrezzo",
        "ricarica",
        "ricco",
        "ricevere",
        "riciclato",
        "ricordo",
        "ricreduto",
        "ridicolo",
        "ridurre",
        "rifasare",
        "riflesso",
        "riforma",
        "rifugio",
        "rigare",
        "rigettato",
        "righello",
        "rilassato",
        "rilevato",
        "rimanere",
        "rimbalzo",
        "rimedio",
        "rimorchio",
        "rinascita",
        "rincaro",
        "rinforzo",
        "rinnovo",
        "rinomato",
        "rinsavito",
        "rintocco",
        "rinuncia",
        "rinvenire",
        "riparato",
        "ripetuto",
        "ripieno",
        "riportare",
        "ripresa",
        "ripulire",
        "risata",
        "rischio",
        "riserva",
        "risibile",
        "riso",
        "rispetto",
        "ristoro",
        "risultato",
        "risvolto",
        "ritardo",
        "ritegno",
        "ritmico",
        "ritrovo",
        "riunione",
        "riva",
        "riverso",
        "rivincita",
        "rivolto",
        "rizoma",
        "roba",
        "robotico",
        "robusto",
        "roccia",
        "roco",
        "rodaggio",
        "rodere",
        "roditore",
        "rogito",
        "rollio",
        "romantico",
        "rompere",
        "ronzio",
        "rosolare",
        "rospo",
        "rotante",
        "rotondo",
        "rotula",
        "rovescio",
        "rubizzo",
        "rubrica",
        "ruga",
        "rullino",
        "rumine",
        "rumoroso",
        "ruolo",
        "rupe",
        "russare",
        "rustico",
        "sabato",
        "sabbiare",
        "sabotato",
        "sagoma",
        "salasso",
        "saldatura",
        "salgemma",
        "salivare",
        "salmone",
        "salone",
        "saltare",
        "saluto",
        "salvo",
        "sapere",
        "sapido",
        "saporito",
        "saraceno",
        "sarcasmo",
        "sarto",
        "sassoso",
        "satellite",
        "satira",
        "satollo",
        "saturno",
        "savana",
        "savio",
        "saziato",
        "sbadiglio",
        "sbalzo",
        "sbancato",
        "sbarra",
        "sbattere",
        "sbavare",
        "sbendare",
        "sbirciare",
        "sbloccato",
        "sbocciato",
        "sbrinare",
        "sbruffone",
        "sbuffare",
        "scabroso",
        "scadenza",
        "scala",
        "scambiare",
        "scandalo",
        "scapola",
        "scarso",
        "scatenare",
        "scavato",
        "scelto",
        "scenico",
        "scettro",
        "scheda",
        "schiena",
        "sciarpa",
        "scienza",
        "scindere",
        "scippo",
        "sciroppo",
        "scivolo",
        "sclerare",
        "scodella",
        "scolpito",
        "scomparto",
        "sconforto",
        "scoprire",
        "scorta",
        "scossone",
        "scozzese",
        "scriba",
        "scrollare",
        "scrutinio",
        "scuderia",
        "scultore",
        "scuola",
        "scuro",
        "scusare",
        "sdebitare",
        "sdoganare",
        "seccatura",
        "secondo",
        "sedano",
        "seggiola",
        "segnalato",
        "segregato",
        "seguito",
        "selciato",
        "selettivo",
        "sella",
        "selvaggio",
        "semaforo",
        "sembrare",
        "seme",
        "seminato",
        "sempre",
        "senso",
        "sentire",
        "sepolto",
        "sequenza",
        "serata",
        "serbato",
        "sereno",
        "serio",
        "serpente",
        "serraglio",
        "servire",
        "sestina",
        "setola",
        "settimana",
        "sfacelo",
        "sfaldare",
        "sfamato",
        "sfarzoso",
        "sfaticato",
        "sfera",
        "sfida",
        "sfilato",
        "sfinge",
        "sfocato",
        "sfoderare",
        "sfogo",
        "sfoltire",
        "sforzato",
        "sfratto",
        "sfruttato",
        "sfuggito",
        "sfumare",
        "sfuso",
        "sgabello",
        "sgarbato",
        "sgonfiare",
        "sgorbio",
        "sgrassato",
        "sguardo",
        "sibilo",
        "siccome",
        "sierra",
        "sigla",
        "signore",
        "silenzio",
        "sillaba",
        "simbolo",
        "simpatico",
        "simulato",
        "sinfonia",
        "singolo",
        "sinistro",
        "sino",
        "sintesi",
        "sinusoide",
        "sipario",
        "sisma",
        "sistole",
        "situato",
        "slitta",
        "slogatura",
        "sloveno",
        "smarrito",
        "smemorato",
        "smentito",
        "smeraldo",
        "smilzo",
        "smontare",
        "smottato",
        "smussato",
        "snellire",
        "snervato",
        "snodo",
        "sobbalzo",
        "sobrio",
        "soccorso",
        "sociale",
        "sodale",
        "soffitto",
        "sogno",
        "soldato",
        "solenne",
        "solido",
        "sollazzo",
        "solo",
        "solubile",
        "solvente",
        "somatico",
        "somma",
        "sonda",
        "sonetto",
        "sonnifero",
        "sopire",
        "soppeso",
        "sopra",
        "sorgere",
        "sorpasso",
        "sorriso",
        "sorso",
        "sorteggio",
        "sorvolato",
        "sospiro",
        "sosta",
        "sottile",
        "spada",
        "spalla",
        "spargere",
        "spatola",
        "spavento",
        "spazzola",
        "specie",
        "spedire",
        "spegnere",
        "spelatura",
        "speranza",
        "spessore",
        "spettrale",
        "spezzato",
        "spia",
        "spigoloso",
        "spillato",
        "spinoso",
        "spirale",
        "splendido",
        "sportivo",
        "sposo",
        "spranga",
        "sprecare",
        "spronato",
        "spruzzo",
        "spuntino",
        "squillo",
        "sradicare",
        "srotolato",
        "stabile",
        "stacco",
        "staffa",
        "stagnare",
        "stampato",
        "stantio",
        "starnuto",
        "stasera",
        "statuto",
        "stelo",
        "steppa",
        "sterzo",
        "stiletto",
        "stima",
        "stirpe",
        "stivale",
        "stizzoso",
        "stonato",
        "storico",
        "strappo",
        "stregato",
        "stridulo",
        "strozzare",
        "strutto",
        "stuccare",
        "stufo",
        "stupendo",
        "subentro",
        "succoso",
        "sudore",
        "suggerito",
        "sugo",
        "sultano",
        "suonare",
        "superbo",
        "supporto",
        "surgelato",
        "surrogato",
        "sussurro",
        "sutura",
        "svagare",
        "svedese",
        "sveglio",
        "svelare",
        "svenuto",
        "svezia",
        "sviluppo",
        "svista",
        "svizzera",
        "svolta",
        "svuotare",
        "tabacco",
        "tabulato",
        "tacciare",
        "taciturno",
        "tale",
        "talismano",
        "tampone",
        "tannino",
        "tara",
        "tardivo",
        "targato",
        "tariffa",
        "tarpare",
        "tartaruga",
        "tasto",
        "tattico",
        "taverna",
        "tavolata",
        "tazza",
        "teca",
        "tecnico",
        "telefono",
        "temerario",
        "tempo",
        "temuto",
        "tendone",
        "tenero",
        "tensione",
        "tentacolo",
        "teorema",
        "terme",
        "terrazzo",
        "terzetto",
        "tesi",
        "tesserato",
        "testato",
        "tetro",
        "tettoia",
        "tifare",
        "tigella",
        "timbro",
        "tinto",
        "tipico",
        "tipografo",
        "tiraggio",
        "tiro",
        "titanio",
        "titolo",
        "titubante",
        "tizio",
        "tizzone",
        "toccare",
        "tollerare",
        "tolto",
        "tombola",
        "tomo",
        "tonfo",
        "tonsilla",
        "topazio",
        "topologia",
        "toppa",
        "torba",
        "tornare",
        "torrone",
        "tortora",
        "toscano",
        "tossire",
        "tostatura",
        "totano",
        "trabocco",
        "trachea",
        "trafila",
        "tragedia",
        "tralcio",
        "tramonto",
        "transito",
        "trapano",
        "trarre",
        "trasloco",
        "trattato",
        "trave",
        "treccia",
        "tremolio",
        "trespolo",
        "tributo",
        "tricheco",
        "trifoglio",
        "trillo",
        "trincea",
        "trio",
        "tristezza",
        "triturato",
        "trivella",
        "tromba",
        "trono",
        "troppo",
        "trottola",
        "trovare",
        "truccato",
        "tubatura",
        "tuffato",
        "tulipano",
        "tumulto",
        "tunisia",
        "turbare",
        "turchino",
        "tuta",
        "tutela",
        "ubicato",
        "uccello",
        "uccisore",
        "udire",
        "uditivo",
        "uffa",
        "ufficio",
        "uguale",
        "ulisse",
        "ultimato",
        "umano",
        "umile",
        "umorismo",
        "uncinetto",
        "ungere",
        "ungherese",
        "unicorno",
        "unificato",
        "unisono",
        "unitario",
        "unte",
        "uovo",
        "upupa",
        "uragano",
        "urgenza",
        "urlo",
        "usanza",
        "usato",
        "uscito",
        "usignolo",
        "usuraio",
        "utensile",
        "utilizzo",
        "utopia",
        "vacante",
        "vaccinato",
        "vagabondo",
        "vagliato",
        "valanga",
        "valgo",
        "valico",
        "valletta",
        "valoroso",
        "valutare",
        "valvola",
        "vampata",
        "vangare",
        "vanitoso",
        "vano",
        "vantaggio",
        "vanvera",
        "vapore",
        "varano",
        "varcato",
        "variante",
        "vasca",
        "vedetta",
        "vedova",
        "veduto",
        "vegetale",
        "veicolo",
        "velcro",
        "velina",
        "velluto",
        "veloce",
        "venato",
        "vendemmia",
        "vento",
        "verace",
        "verbale",
        "vergogna",
        "verifica",
        "vero",
        "verruca",
        "verticale",
        "vescica",
        "vessillo",
        "vestale",
        "veterano",
        "vetrina",
        "vetusto",
        "viandante",
        "vibrante",
        "vicenda",
        "vichingo",
        "vicinanza",
        "vidimare",
        "vigilia",
        "vigneto",
        "vigore",
        "vile",
        "villano",
        "vimini",
        "vincitore",
        "viola",
        "vipera",
        "virgola",
        "virologo",
        "virulento",
        "viscoso",
        "visione",
        "vispo",
        "vissuto",
        "visura",
        "vita",
        "vitello",
        "vittima",
        "vivanda",
        "vivido",
        "viziare",
        "voce",
        "voga",
        "volatile",
        "volere",
        "volpe",
        "voragine",
        "vulcano",
        "zampogna",
        "zanna",
        "zappato",
        "zattera",
        "zavorra",
        "zefiro",
        "zelante",
        "zelo",
        "zenzero",
        "zerbino",
        "zibetto",
        "zinco",
        "zircone",
        "zitto",
        "zolla",
        "zotico",
        "zucchero",
        "zufolo",
        "zulu",
        "zuppa"
      ];
    }
  });

  // ../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/spanish.json
  var require_spanish = __commonJS({
    "../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/spanish.json"(exports, module) {
      module.exports = [
        "a\u0301baco",
        "abdomen",
        "abeja",
        "abierto",
        "abogado",
        "abono",
        "aborto",
        "abrazo",
        "abrir",
        "abuelo",
        "abuso",
        "acabar",
        "academia",
        "acceso",
        "accio\u0301n",
        "aceite",
        "acelga",
        "acento",
        "aceptar",
        "a\u0301cido",
        "aclarar",
        "acne\u0301",
        "acoger",
        "acoso",
        "activo",
        "acto",
        "actriz",
        "actuar",
        "acudir",
        "acuerdo",
        "acusar",
        "adicto",
        "admitir",
        "adoptar",
        "adorno",
        "aduana",
        "adulto",
        "ae\u0301reo",
        "afectar",
        "aficio\u0301n",
        "afinar",
        "afirmar",
        "a\u0301gil",
        "agitar",
        "agoni\u0301a",
        "agosto",
        "agotar",
        "agregar",
        "agrio",
        "agua",
        "agudo",
        "a\u0301guila",
        "aguja",
        "ahogo",
        "ahorro",
        "aire",
        "aislar",
        "ajedrez",
        "ajeno",
        "ajuste",
        "alacra\u0301n",
        "alambre",
        "alarma",
        "alba",
        "a\u0301lbum",
        "alcalde",
        "aldea",
        "alegre",
        "alejar",
        "alerta",
        "aleta",
        "alfiler",
        "alga",
        "algodo\u0301n",
        "aliado",
        "aliento",
        "alivio",
        "alma",
        "almeja",
        "almi\u0301bar",
        "altar",
        "alteza",
        "altivo",
        "alto",
        "altura",
        "alumno",
        "alzar",
        "amable",
        "amante",
        "amapola",
        "amargo",
        "amasar",
        "a\u0301mbar",
        "a\u0301mbito",
        "ameno",
        "amigo",
        "amistad",
        "amor",
        "amparo",
        "amplio",
        "ancho",
        "anciano",
        "ancla",
        "andar",
        "ande\u0301n",
        "anemia",
        "a\u0301ngulo",
        "anillo",
        "a\u0301nimo",
        "ani\u0301s",
        "anotar",
        "antena",
        "antiguo",
        "antojo",
        "anual",
        "anular",
        "anuncio",
        "an\u0303adir",
        "an\u0303ejo",
        "an\u0303o",
        "apagar",
        "aparato",
        "apetito",
        "apio",
        "aplicar",
        "apodo",
        "aporte",
        "apoyo",
        "aprender",
        "aprobar",
        "apuesta",
        "apuro",
        "arado",
        "aran\u0303a",
        "arar",
        "a\u0301rbitro",
        "a\u0301rbol",
        "arbusto",
        "archivo",
        "arco",
        "arder",
        "ardilla",
        "arduo",
        "a\u0301rea",
        "a\u0301rido",
        "aries",
        "armoni\u0301a",
        "arne\u0301s",
        "aroma",
        "arpa",
        "arpo\u0301n",
        "arreglo",
        "arroz",
        "arruga",
        "arte",
        "artista",
        "asa",
        "asado",
        "asalto",
        "ascenso",
        "asegurar",
        "aseo",
        "asesor",
        "asiento",
        "asilo",
        "asistir",
        "asno",
        "asombro",
        "a\u0301spero",
        "astilla",
        "astro",
        "astuto",
        "asumir",
        "asunto",
        "atajo",
        "ataque",
        "atar",
        "atento",
        "ateo",
        "a\u0301tico",
        "atleta",
        "a\u0301tomo",
        "atraer",
        "atroz",
        "atu\u0301n",
        "audaz",
        "audio",
        "auge",
        "aula",
        "aumento",
        "ausente",
        "autor",
        "aval",
        "avance",
        "avaro",
        "ave",
        "avellana",
        "avena",
        "avestruz",
        "avio\u0301n",
        "aviso",
        "ayer",
        "ayuda",
        "ayuno",
        "azafra\u0301n",
        "azar",
        "azote",
        "azu\u0301car",
        "azufre",
        "azul",
        "baba",
        "babor",
        "bache",
        "bahi\u0301a",
        "baile",
        "bajar",
        "balanza",
        "balco\u0301n",
        "balde",
        "bambu\u0301",
        "banco",
        "banda",
        "ban\u0303o",
        "barba",
        "barco",
        "barniz",
        "barro",
        "ba\u0301scula",
        "basto\u0301n",
        "basura",
        "batalla",
        "bateri\u0301a",
        "batir",
        "batuta",
        "bau\u0301l",
        "bazar",
        "bebe\u0301",
        "bebida",
        "bello",
        "besar",
        "beso",
        "bestia",
        "bicho",
        "bien",
        "bingo",
        "blanco",
        "bloque",
        "blusa",
        "boa",
        "bobina",
        "bobo",
        "boca",
        "bocina",
        "boda",
        "bodega",
        "boina",
        "bola",
        "bolero",
        "bolsa",
        "bomba",
        "bondad",
        "bonito",
        "bono",
        "bonsa\u0301i",
        "borde",
        "borrar",
        "bosque",
        "bote",
        "boti\u0301n",
        "bo\u0301veda",
        "bozal",
        "bravo",
        "brazo",
        "brecha",
        "breve",
        "brillo",
        "brinco",
        "brisa",
        "broca",
        "broma",
        "bronce",
        "brote",
        "bruja",
        "brusco",
        "bruto",
        "buceo",
        "bucle",
        "bueno",
        "buey",
        "bufanda",
        "bufo\u0301n",
        "bu\u0301ho",
        "buitre",
        "bulto",
        "burbuja",
        "burla",
        "burro",
        "buscar",
        "butaca",
        "buzo\u0301n",
        "caballo",
        "cabeza",
        "cabina",
        "cabra",
        "cacao",
        "cada\u0301ver",
        "cadena",
        "caer",
        "cafe\u0301",
        "cai\u0301da",
        "caima\u0301n",
        "caja",
        "cajo\u0301n",
        "cal",
        "calamar",
        "calcio",
        "caldo",
        "calidad",
        "calle",
        "calma",
        "calor",
        "calvo",
        "cama",
        "cambio",
        "camello",
        "camino",
        "campo",
        "ca\u0301ncer",
        "candil",
        "canela",
        "canguro",
        "canica",
        "canto",
        "can\u0303a",
        "can\u0303o\u0301n",
        "caoba",
        "caos",
        "capaz",
        "capita\u0301n",
        "capote",
        "captar",
        "capucha",
        "cara",
        "carbo\u0301n",
        "ca\u0301rcel",
        "careta",
        "carga",
        "carin\u0303o",
        "carne",
        "carpeta",
        "carro",
        "carta",
        "casa",
        "casco",
        "casero",
        "caspa",
        "castor",
        "catorce",
        "catre",
        "caudal",
        "causa",
        "cazo",
        "cebolla",
        "ceder",
        "cedro",
        "celda",
        "ce\u0301lebre",
        "celoso",
        "ce\u0301lula",
        "cemento",
        "ceniza",
        "centro",
        "cerca",
        "cerdo",
        "cereza",
        "cero",
        "cerrar",
        "certeza",
        "ce\u0301sped",
        "cetro",
        "chacal",
        "chaleco",
        "champu\u0301",
        "chancla",
        "chapa",
        "charla",
        "chico",
        "chiste",
        "chivo",
        "choque",
        "choza",
        "chuleta",
        "chupar",
        "ciclo\u0301n",
        "ciego",
        "cielo",
        "cien",
        "cierto",
        "cifra",
        "cigarro",
        "cima",
        "cinco",
        "cine",
        "cinta",
        "cipre\u0301s",
        "circo",
        "ciruela",
        "cisne",
        "cita",
        "ciudad",
        "clamor",
        "clan",
        "claro",
        "clase",
        "clave",
        "cliente",
        "clima",
        "cli\u0301nica",
        "cobre",
        "coccio\u0301n",
        "cochino",
        "cocina",
        "coco",
        "co\u0301digo",
        "codo",
        "cofre",
        "coger",
        "cohete",
        "coji\u0301n",
        "cojo",
        "cola",
        "colcha",
        "colegio",
        "colgar",
        "colina",
        "collar",
        "colmo",
        "columna",
        "combate",
        "comer",
        "comida",
        "co\u0301modo",
        "compra",
        "conde",
        "conejo",
        "conga",
        "conocer",
        "consejo",
        "contar",
        "copa",
        "copia",
        "corazo\u0301n",
        "corbata",
        "corcho",
        "cordo\u0301n",
        "corona",
        "correr",
        "coser",
        "cosmos",
        "costa",
        "cra\u0301neo",
        "cra\u0301ter",
        "crear",
        "crecer",
        "crei\u0301do",
        "crema",
        "cri\u0301a",
        "crimen",
        "cripta",
        "crisis",
        "cromo",
        "cro\u0301nica",
        "croqueta",
        "crudo",
        "cruz",
        "cuadro",
        "cuarto",
        "cuatro",
        "cubo",
        "cubrir",
        "cuchara",
        "cuello",
        "cuento",
        "cuerda",
        "cuesta",
        "cueva",
        "cuidar",
        "culebra",
        "culpa",
        "culto",
        "cumbre",
        "cumplir",
        "cuna",
        "cuneta",
        "cuota",
        "cupo\u0301n",
        "cu\u0301pula",
        "curar",
        "curioso",
        "curso",
        "curva",
        "cutis",
        "dama",
        "danza",
        "dar",
        "dardo",
        "da\u0301til",
        "deber",
        "de\u0301bil",
        "de\u0301cada",
        "decir",
        "dedo",
        "defensa",
        "definir",
        "dejar",
        "delfi\u0301n",
        "delgado",
        "delito",
        "demora",
        "denso",
        "dental",
        "deporte",
        "derecho",
        "derrota",
        "desayuno",
        "deseo",
        "desfile",
        "desnudo",
        "destino",
        "desvi\u0301o",
        "detalle",
        "detener",
        "deuda",
        "di\u0301a",
        "diablo",
        "diadema",
        "diamante",
        "diana",
        "diario",
        "dibujo",
        "dictar",
        "diente",
        "dieta",
        "diez",
        "difi\u0301cil",
        "digno",
        "dilema",
        "diluir",
        "dinero",
        "directo",
        "dirigir",
        "disco",
        "disen\u0303o",
        "disfraz",
        "diva",
        "divino",
        "doble",
        "doce",
        "dolor",
        "domingo",
        "don",
        "donar",
        "dorado",
        "dormir",
        "dorso",
        "dos",
        "dosis",
        "drago\u0301n",
        "droga",
        "ducha",
        "duda",
        "duelo",
        "duen\u0303o",
        "dulce",
        "du\u0301o",
        "duque",
        "durar",
        "dureza",
        "duro",
        "e\u0301bano",
        "ebrio",
        "echar",
        "eco",
        "ecuador",
        "edad",
        "edicio\u0301n",
        "edificio",
        "editor",
        "educar",
        "efecto",
        "eficaz",
        "eje",
        "ejemplo",
        "elefante",
        "elegir",
        "elemento",
        "elevar",
        "elipse",
        "e\u0301lite",
        "elixir",
        "elogio",
        "eludir",
        "embudo",
        "emitir",
        "emocio\u0301n",
        "empate",
        "empen\u0303o",
        "empleo",
        "empresa",
        "enano",
        "encargo",
        "enchufe",
        "enci\u0301a",
        "enemigo",
        "enero",
        "enfado",
        "enfermo",
        "engan\u0303o",
        "enigma",
        "enlace",
        "enorme",
        "enredo",
        "ensayo",
        "ensen\u0303ar",
        "entero",
        "entrar",
        "envase",
        "envi\u0301o",
        "e\u0301poca",
        "equipo",
        "erizo",
        "escala",
        "escena",
        "escolar",
        "escribir",
        "escudo",
        "esencia",
        "esfera",
        "esfuerzo",
        "espada",
        "espejo",
        "espi\u0301a",
        "esposa",
        "espuma",
        "esqui\u0301",
        "estar",
        "este",
        "estilo",
        "estufa",
        "etapa",
        "eterno",
        "e\u0301tica",
        "etnia",
        "evadir",
        "evaluar",
        "evento",
        "evitar",
        "exacto",
        "examen",
        "exceso",
        "excusa",
        "exento",
        "exigir",
        "exilio",
        "existir",
        "e\u0301xito",
        "experto",
        "explicar",
        "exponer",
        "extremo",
        "fa\u0301brica",
        "fa\u0301bula",
        "fachada",
        "fa\u0301cil",
        "factor",
        "faena",
        "faja",
        "falda",
        "fallo",
        "falso",
        "faltar",
        "fama",
        "familia",
        "famoso",
        "farao\u0301n",
        "farmacia",
        "farol",
        "farsa",
        "fase",
        "fatiga",
        "fauna",
        "favor",
        "fax",
        "febrero",
        "fecha",
        "feliz",
        "feo",
        "feria",
        "feroz",
        "fe\u0301rtil",
        "fervor",
        "festi\u0301n",
        "fiable",
        "fianza",
        "fiar",
        "fibra",
        "ficcio\u0301n",
        "ficha",
        "fideo",
        "fiebre",
        "fiel",
        "fiera",
        "fiesta",
        "figura",
        "fijar",
        "fijo",
        "fila",
        "filete",
        "filial",
        "filtro",
        "fin",
        "finca",
        "fingir",
        "finito",
        "firma",
        "flaco",
        "flauta",
        "flecha",
        "flor",
        "flota",
        "fluir",
        "flujo",
        "flu\u0301or",
        "fobia",
        "foca",
        "fogata",
        "fogo\u0301n",
        "folio",
        "folleto",
        "fondo",
        "forma",
        "forro",
        "fortuna",
        "forzar",
        "fosa",
        "foto",
        "fracaso",
        "fra\u0301gil",
        "franja",
        "frase",
        "fraude",
        "frei\u0301r",
        "freno",
        "fresa",
        "fri\u0301o",
        "frito",
        "fruta",
        "fuego",
        "fuente",
        "fuerza",
        "fuga",
        "fumar",
        "funcio\u0301n",
        "funda",
        "furgo\u0301n",
        "furia",
        "fusil",
        "fu\u0301tbol",
        "futuro",
        "gacela",
        "gafas",
        "gaita",
        "gajo",
        "gala",
        "galeri\u0301a",
        "gallo",
        "gamba",
        "ganar",
        "gancho",
        "ganga",
        "ganso",
        "garaje",
        "garza",
        "gasolina",
        "gastar",
        "gato",
        "gavila\u0301n",
        "gemelo",
        "gemir",
        "gen",
        "ge\u0301nero",
        "genio",
        "gente",
        "geranio",
        "gerente",
        "germen",
        "gesto",
        "gigante",
        "gimnasio",
        "girar",
        "giro",
        "glaciar",
        "globo",
        "gloria",
        "gol",
        "golfo",
        "goloso",
        "golpe",
        "goma",
        "gordo",
        "gorila",
        "gorra",
        "gota",
        "goteo",
        "gozar",
        "grada",
        "gra\u0301fico",
        "grano",
        "grasa",
        "gratis",
        "grave",
        "grieta",
        "grillo",
        "gripe",
        "gris",
        "grito",
        "grosor",
        "gru\u0301a",
        "grueso",
        "grumo",
        "grupo",
        "guante",
        "guapo",
        "guardia",
        "guerra",
        "gui\u0301a",
        "guin\u0303o",
        "guion",
        "guiso",
        "guitarra",
        "gusano",
        "gustar",
        "haber",
        "ha\u0301bil",
        "hablar",
        "hacer",
        "hacha",
        "hada",
        "hallar",
        "hamaca",
        "harina",
        "haz",
        "hazan\u0303a",
        "hebilla",
        "hebra",
        "hecho",
        "helado",
        "helio",
        "hembra",
        "herir",
        "hermano",
        "he\u0301roe",
        "hervir",
        "hielo",
        "hierro",
        "hi\u0301gado",
        "higiene",
        "hijo",
        "himno",
        "historia",
        "hocico",
        "hogar",
        "hoguera",
        "hoja",
        "hombre",
        "hongo",
        "honor",
        "honra",
        "hora",
        "hormiga",
        "horno",
        "hostil",
        "hoyo",
        "hueco",
        "huelga",
        "huerta",
        "hueso",
        "huevo",
        "huida",
        "huir",
        "humano",
        "hu\u0301medo",
        "humilde",
        "humo",
        "hundir",
        "huraca\u0301n",
        "hurto",
        "icono",
        "ideal",
        "idioma",
        "i\u0301dolo",
        "iglesia",
        "iglu\u0301",
        "igual",
        "ilegal",
        "ilusio\u0301n",
        "imagen",
        "ima\u0301n",
        "imitar",
        "impar",
        "imperio",
        "imponer",
        "impulso",
        "incapaz",
        "i\u0301ndice",
        "inerte",
        "infiel",
        "informe",
        "ingenio",
        "inicio",
        "inmenso",
        "inmune",
        "innato",
        "insecto",
        "instante",
        "intere\u0301s",
        "i\u0301ntimo",
        "intuir",
        "inu\u0301til",
        "invierno",
        "ira",
        "iris",
        "ironi\u0301a",
        "isla",
        "islote",
        "jabali\u0301",
        "jabo\u0301n",
        "jamo\u0301n",
        "jarabe",
        "jardi\u0301n",
        "jarra",
        "jaula",
        "jazmi\u0301n",
        "jefe",
        "jeringa",
        "jinete",
        "jornada",
        "joroba",
        "joven",
        "joya",
        "juerga",
        "jueves",
        "juez",
        "jugador",
        "jugo",
        "juguete",
        "juicio",
        "junco",
        "jungla",
        "junio",
        "juntar",
        "ju\u0301piter",
        "jurar",
        "justo",
        "juvenil",
        "juzgar",
        "kilo",
        "koala",
        "labio",
        "lacio",
        "lacra",
        "lado",
        "ladro\u0301n",
        "lagarto",
        "la\u0301grima",
        "laguna",
        "laico",
        "lamer",
        "la\u0301mina",
        "la\u0301mpara",
        "lana",
        "lancha",
        "langosta",
        "lanza",
        "la\u0301piz",
        "largo",
        "larva",
        "la\u0301stima",
        "lata",
        "la\u0301tex",
        "latir",
        "laurel",
        "lavar",
        "lazo",
        "leal",
        "leccio\u0301n",
        "leche",
        "lector",
        "leer",
        "legio\u0301n",
        "legumbre",
        "lejano",
        "lengua",
        "lento",
        "len\u0303a",
        "leo\u0301n",
        "leopardo",
        "lesio\u0301n",
        "letal",
        "letra",
        "leve",
        "leyenda",
        "libertad",
        "libro",
        "licor",
        "li\u0301der",
        "lidiar",
        "lienzo",
        "liga",
        "ligero",
        "lima",
        "li\u0301mite",
        "limo\u0301n",
        "limpio",
        "lince",
        "lindo",
        "li\u0301nea",
        "lingote",
        "lino",
        "linterna",
        "li\u0301quido",
        "liso",
        "lista",
        "litera",
        "litio",
        "litro",
        "llaga",
        "llama",
        "llanto",
        "llave",
        "llegar",
        "llenar",
        "llevar",
        "llorar",
        "llover",
        "lluvia",
        "lobo",
        "locio\u0301n",
        "loco",
        "locura",
        "lo\u0301gica",
        "logro",
        "lombriz",
        "lomo",
        "lonja",
        "lote",
        "lucha",
        "lucir",
        "lugar",
        "lujo",
        "luna",
        "lunes",
        "lupa",
        "lustro",
        "luto",
        "luz",
        "maceta",
        "macho",
        "madera",
        "madre",
        "maduro",
        "maestro",
        "mafia",
        "magia",
        "mago",
        "mai\u0301z",
        "maldad",
        "maleta",
        "malla",
        "malo",
        "mama\u0301",
        "mambo",
        "mamut",
        "manco",
        "mando",
        "manejar",
        "manga",
        "maniqui\u0301",
        "manjar",
        "mano",
        "manso",
        "manta",
        "man\u0303ana",
        "mapa",
        "ma\u0301quina",
        "mar",
        "marco",
        "marea",
        "marfil",
        "margen",
        "marido",
        "ma\u0301rmol",
        "marro\u0301n",
        "martes",
        "marzo",
        "masa",
        "ma\u0301scara",
        "masivo",
        "matar",
        "materia",
        "matiz",
        "matriz",
        "ma\u0301ximo",
        "mayor",
        "mazorca",
        "mecha",
        "medalla",
        "medio",
        "me\u0301dula",
        "mejilla",
        "mejor",
        "melena",
        "melo\u0301n",
        "memoria",
        "menor",
        "mensaje",
        "mente",
        "menu\u0301",
        "mercado",
        "merengue",
        "me\u0301rito",
        "mes",
        "meso\u0301n",
        "meta",
        "meter",
        "me\u0301todo",
        "metro",
        "mezcla",
        "miedo",
        "miel",
        "miembro",
        "miga",
        "mil",
        "milagro",
        "militar",
        "millo\u0301n",
        "mimo",
        "mina",
        "minero",
        "mi\u0301nimo",
        "minuto",
        "miope",
        "mirar",
        "misa",
        "miseria",
        "misil",
        "mismo",
        "mitad",
        "mito",
        "mochila",
        "mocio\u0301n",
        "moda",
        "modelo",
        "moho",
        "mojar",
        "molde",
        "moler",
        "molino",
        "momento",
        "momia",
        "monarca",
        "moneda",
        "monja",
        "monto",
        "mon\u0303o",
        "morada",
        "morder",
        "moreno",
        "morir",
        "morro",
        "morsa",
        "mortal",
        "mosca",
        "mostrar",
        "motivo",
        "mover",
        "mo\u0301vil",
        "mozo",
        "mucho",
        "mudar",
        "mueble",
        "muela",
        "muerte",
        "muestra",
        "mugre",
        "mujer",
        "mula",
        "muleta",
        "multa",
        "mundo",
        "mun\u0303eca",
        "mural",
        "muro",
        "mu\u0301sculo",
        "museo",
        "musgo",
        "mu\u0301sica",
        "muslo",
        "na\u0301car",
        "nacio\u0301n",
        "nadar",
        "naipe",
        "naranja",
        "nariz",
        "narrar",
        "nasal",
        "natal",
        "nativo",
        "natural",
        "na\u0301usea",
        "naval",
        "nave",
        "navidad",
        "necio",
        "ne\u0301ctar",
        "negar",
        "negocio",
        "negro",
        "neo\u0301n",
        "nervio",
        "neto",
        "neutro",
        "nevar",
        "nevera",
        "nicho",
        "nido",
        "niebla",
        "nieto",
        "nin\u0303ez",
        "nin\u0303o",
        "ni\u0301tido",
        "nivel",
        "nobleza",
        "noche",
        "no\u0301mina",
        "noria",
        "norma",
        "norte",
        "nota",
        "noticia",
        "novato",
        "novela",
        "novio",
        "nube",
        "nuca",
        "nu\u0301cleo",
        "nudillo",
        "nudo",
        "nuera",
        "nueve",
        "nuez",
        "nulo",
        "nu\u0301mero",
        "nutria",
        "oasis",
        "obeso",
        "obispo",
        "objeto",
        "obra",
        "obrero",
        "observar",
        "obtener",
        "obvio",
        "oca",
        "ocaso",
        "oce\u0301ano",
        "ochenta",
        "ocho",
        "ocio",
        "ocre",
        "octavo",
        "octubre",
        "oculto",
        "ocupar",
        "ocurrir",
        "odiar",
        "odio",
        "odisea",
        "oeste",
        "ofensa",
        "oferta",
        "oficio",
        "ofrecer",
        "ogro",
        "oi\u0301do",
        "oi\u0301r",
        "ojo",
        "ola",
        "oleada",
        "olfato",
        "olivo",
        "olla",
        "olmo",
        "olor",
        "olvido",
        "ombligo",
        "onda",
        "onza",
        "opaco",
        "opcio\u0301n",
        "o\u0301pera",
        "opinar",
        "oponer",
        "optar",
        "o\u0301ptica",
        "opuesto",
        "oracio\u0301n",
        "orador",
        "oral",
        "o\u0301rbita",
        "orca",
        "orden",
        "oreja",
        "o\u0301rgano",
        "orgi\u0301a",
        "orgullo",
        "oriente",
        "origen",
        "orilla",
        "oro",
        "orquesta",
        "oruga",
        "osadi\u0301a",
        "oscuro",
        "osezno",
        "oso",
        "ostra",
        "oton\u0303o",
        "otro",
        "oveja",
        "o\u0301vulo",
        "o\u0301xido",
        "oxi\u0301geno",
        "oyente",
        "ozono",
        "pacto",
        "padre",
        "paella",
        "pa\u0301gina",
        "pago",
        "pai\u0301s",
        "pa\u0301jaro",
        "palabra",
        "palco",
        "paleta",
        "pa\u0301lido",
        "palma",
        "paloma",
        "palpar",
        "pan",
        "panal",
        "pa\u0301nico",
        "pantera",
        "pan\u0303uelo",
        "papa\u0301",
        "papel",
        "papilla",
        "paquete",
        "parar",
        "parcela",
        "pared",
        "parir",
        "paro",
        "pa\u0301rpado",
        "parque",
        "pa\u0301rrafo",
        "parte",
        "pasar",
        "paseo",
        "pasio\u0301n",
        "paso",
        "pasta",
        "pata",
        "patio",
        "patria",
        "pausa",
        "pauta",
        "pavo",
        "payaso",
        "peato\u0301n",
        "pecado",
        "pecera",
        "pecho",
        "pedal",
        "pedir",
        "pegar",
        "peine",
        "pelar",
        "peldan\u0303o",
        "pelea",
        "peligro",
        "pellejo",
        "pelo",
        "peluca",
        "pena",
        "pensar",
        "pen\u0303o\u0301n",
        "peo\u0301n",
        "peor",
        "pepino",
        "pequen\u0303o",
        "pera",
        "percha",
        "perder",
        "pereza",
        "perfil",
        "perico",
        "perla",
        "permiso",
        "perro",
        "persona",
        "pesa",
        "pesca",
        "pe\u0301simo",
        "pestan\u0303a",
        "pe\u0301talo",
        "petro\u0301leo",
        "pez",
        "pezun\u0303a",
        "picar",
        "picho\u0301n",
        "pie",
        "piedra",
        "pierna",
        "pieza",
        "pijama",
        "pilar",
        "piloto",
        "pimienta",
        "pino",
        "pintor",
        "pinza",
        "pin\u0303a",
        "piojo",
        "pipa",
        "pirata",
        "pisar",
        "piscina",
        "piso",
        "pista",
        "pito\u0301n",
        "pizca",
        "placa",
        "plan",
        "plata",
        "playa",
        "plaza",
        "pleito",
        "pleno",
        "plomo",
        "pluma",
        "plural",
        "pobre",
        "poco",
        "poder",
        "podio",
        "poema",
        "poesi\u0301a",
        "poeta",
        "polen",
        "polici\u0301a",
        "pollo",
        "polvo",
        "pomada",
        "pomelo",
        "pomo",
        "pompa",
        "poner",
        "porcio\u0301n",
        "portal",
        "posada",
        "poseer",
        "posible",
        "poste",
        "potencia",
        "potro",
        "pozo",
        "prado",
        "precoz",
        "pregunta",
        "premio",
        "prensa",
        "preso",
        "previo",
        "primo",
        "pri\u0301ncipe",
        "prisio\u0301n",
        "privar",
        "proa",
        "probar",
        "proceso",
        "producto",
        "proeza",
        "profesor",
        "programa",
        "prole",
        "promesa",
        "pronto",
        "propio",
        "pro\u0301ximo",
        "prueba",
        "pu\u0301blico",
        "puchero",
        "pudor",
        "pueblo",
        "puerta",
        "puesto",
        "pulga",
        "pulir",
        "pulmo\u0301n",
        "pulpo",
        "pulso",
        "puma",
        "punto",
        "pun\u0303al",
        "pun\u0303o",
        "pupa",
        "pupila",
        "pure\u0301",
        "quedar",
        "queja",
        "quemar",
        "querer",
        "queso",
        "quieto",
        "qui\u0301mica",
        "quince",
        "quitar",
        "ra\u0301bano",
        "rabia",
        "rabo",
        "racio\u0301n",
        "radical",
        "rai\u0301z",
        "rama",
        "rampa",
        "rancho",
        "rango",
        "rapaz",
        "ra\u0301pido",
        "rapto",
        "rasgo",
        "raspa",
        "rato",
        "rayo",
        "raza",
        "razo\u0301n",
        "reaccio\u0301n",
        "realidad",
        "reban\u0303o",
        "rebote",
        "recaer",
        "receta",
        "rechazo",
        "recoger",
        "recreo",
        "recto",
        "recurso",
        "red",
        "redondo",
        "reducir",
        "reflejo",
        "reforma",
        "refra\u0301n",
        "refugio",
        "regalo",
        "regir",
        "regla",
        "regreso",
        "rehe\u0301n",
        "reino",
        "rei\u0301r",
        "reja",
        "relato",
        "relevo",
        "relieve",
        "relleno",
        "reloj",
        "remar",
        "remedio",
        "remo",
        "rencor",
        "rendir",
        "renta",
        "reparto",
        "repetir",
        "reposo",
        "reptil",
        "res",
        "rescate",
        "resina",
        "respeto",
        "resto",
        "resumen",
        "retiro",
        "retorno",
        "retrato",
        "reunir",
        "reve\u0301s",
        "revista",
        "rey",
        "rezar",
        "rico",
        "riego",
        "rienda",
        "riesgo",
        "rifa",
        "ri\u0301gido",
        "rigor",
        "rinco\u0301n",
        "rin\u0303o\u0301n",
        "ri\u0301o",
        "riqueza",
        "risa",
        "ritmo",
        "rito",
        "rizo",
        "roble",
        "roce",
        "rociar",
        "rodar",
        "rodeo",
        "rodilla",
        "roer",
        "rojizo",
        "rojo",
        "romero",
        "romper",
        "ron",
        "ronco",
        "ronda",
        "ropa",
        "ropero",
        "rosa",
        "rosca",
        "rostro",
        "rotar",
        "rubi\u0301",
        "rubor",
        "rudo",
        "rueda",
        "rugir",
        "ruido",
        "ruina",
        "ruleta",
        "rulo",
        "rumbo",
        "rumor",
        "ruptura",
        "ruta",
        "rutina",
        "sa\u0301bado",
        "saber",
        "sabio",
        "sable",
        "sacar",
        "sagaz",
        "sagrado",
        "sala",
        "saldo",
        "salero",
        "salir",
        "salmo\u0301n",
        "salo\u0301n",
        "salsa",
        "salto",
        "salud",
        "salvar",
        "samba",
        "sancio\u0301n",
        "sandi\u0301a",
        "sanear",
        "sangre",
        "sanidad",
        "sano",
        "santo",
        "sapo",
        "saque",
        "sardina",
        "sarte\u0301n",
        "sastre",
        "sata\u0301n",
        "sauna",
        "saxofo\u0301n",
        "seccio\u0301n",
        "seco",
        "secreto",
        "secta",
        "sed",
        "seguir",
        "seis",
        "sello",
        "selva",
        "semana",
        "semilla",
        "senda",
        "sensor",
        "sen\u0303al",
        "sen\u0303or",
        "separar",
        "sepia",
        "sequi\u0301a",
        "ser",
        "serie",
        "sermo\u0301n",
        "servir",
        "sesenta",
        "sesio\u0301n",
        "seta",
        "setenta",
        "severo",
        "sexo",
        "sexto",
        "sidra",
        "siesta",
        "siete",
        "siglo",
        "signo",
        "si\u0301laba",
        "silbar",
        "silencio",
        "silla",
        "si\u0301mbolo",
        "simio",
        "sirena",
        "sistema",
        "sitio",
        "situar",
        "sobre",
        "socio",
        "sodio",
        "sol",
        "solapa",
        "soldado",
        "soledad",
        "so\u0301lido",
        "soltar",
        "solucio\u0301n",
        "sombra",
        "sondeo",
        "sonido",
        "sonoro",
        "sonrisa",
        "sopa",
        "soplar",
        "soporte",
        "sordo",
        "sorpresa",
        "sorteo",
        "soste\u0301n",
        "so\u0301tano",
        "suave",
        "subir",
        "suceso",
        "sudor",
        "suegra",
        "suelo",
        "suen\u0303o",
        "suerte",
        "sufrir",
        "sujeto",
        "sulta\u0301n",
        "sumar",
        "superar",
        "suplir",
        "suponer",
        "supremo",
        "sur",
        "surco",
        "suren\u0303o",
        "surgir",
        "susto",
        "sutil",
        "tabaco",
        "tabique",
        "tabla",
        "tabu\u0301",
        "taco",
        "tacto",
        "tajo",
        "talar",
        "talco",
        "talento",
        "talla",
        "talo\u0301n",
        "taman\u0303o",
        "tambor",
        "tango",
        "tanque",
        "tapa",
        "tapete",
        "tapia",
        "tapo\u0301n",
        "taquilla",
        "tarde",
        "tarea",
        "tarifa",
        "tarjeta",
        "tarot",
        "tarro",
        "tarta",
        "tatuaje",
        "tauro",
        "taza",
        "tazo\u0301n",
        "teatro",
        "techo",
        "tecla",
        "te\u0301cnica",
        "tejado",
        "tejer",
        "tejido",
        "tela",
        "tele\u0301fono",
        "tema",
        "temor",
        "templo",
        "tenaz",
        "tender",
        "tener",
        "tenis",
        "tenso",
        "teori\u0301a",
        "terapia",
        "terco",
        "te\u0301rmino",
        "ternura",
        "terror",
        "tesis",
        "tesoro",
        "testigo",
        "tetera",
        "texto",
        "tez",
        "tibio",
        "tiburo\u0301n",
        "tiempo",
        "tienda",
        "tierra",
        "tieso",
        "tigre",
        "tijera",
        "tilde",
        "timbre",
        "ti\u0301mido",
        "timo",
        "tinta",
        "ti\u0301o",
        "ti\u0301pico",
        "tipo",
        "tira",
        "tiro\u0301n",
        "tita\u0301n",
        "ti\u0301tere",
        "ti\u0301tulo",
        "tiza",
        "toalla",
        "tobillo",
        "tocar",
        "tocino",
        "todo",
        "toga",
        "toldo",
        "tomar",
        "tono",
        "tonto",
        "topar",
        "tope",
        "toque",
        "to\u0301rax",
        "torero",
        "tormenta",
        "torneo",
        "toro",
        "torpedo",
        "torre",
        "torso",
        "tortuga",
        "tos",
        "tosco",
        "toser",
        "to\u0301xico",
        "trabajo",
        "tractor",
        "traer",
        "tra\u0301fico",
        "trago",
        "traje",
        "tramo",
        "trance",
        "trato",
        "trauma",
        "trazar",
        "tre\u0301bol",
        "tregua",
        "treinta",
        "tren",
        "trepar",
        "tres",
        "tribu",
        "trigo",
        "tripa",
        "triste",
        "triunfo",
        "trofeo",
        "trompa",
        "tronco",
        "tropa",
        "trote",
        "trozo",
        "truco",
        "trueno",
        "trufa",
        "tuberi\u0301a",
        "tubo",
        "tuerto",
        "tumba",
        "tumor",
        "tu\u0301nel",
        "tu\u0301nica",
        "turbina",
        "turismo",
        "turno",
        "tutor",
        "ubicar",
        "u\u0301lcera",
        "umbral",
        "unidad",
        "unir",
        "universo",
        "uno",
        "untar",
        "un\u0303a",
        "urbano",
        "urbe",
        "urgente",
        "urna",
        "usar",
        "usuario",
        "u\u0301til",
        "utopi\u0301a",
        "uva",
        "vaca",
        "vaci\u0301o",
        "vacuna",
        "vagar",
        "vago",
        "vaina",
        "vajilla",
        "vale",
        "va\u0301lido",
        "valle",
        "valor",
        "va\u0301lvula",
        "vampiro",
        "vara",
        "variar",
        "varo\u0301n",
        "vaso",
        "vecino",
        "vector",
        "vehi\u0301culo",
        "veinte",
        "vejez",
        "vela",
        "velero",
        "veloz",
        "vena",
        "vencer",
        "venda",
        "veneno",
        "vengar",
        "venir",
        "venta",
        "venus",
        "ver",
        "verano",
        "verbo",
        "verde",
        "vereda",
        "verja",
        "verso",
        "verter",
        "vi\u0301a",
        "viaje",
        "vibrar",
        "vicio",
        "vi\u0301ctima",
        "vida",
        "vi\u0301deo",
        "vidrio",
        "viejo",
        "viernes",
        "vigor",
        "vil",
        "villa",
        "vinagre",
        "vino",
        "vin\u0303edo",
        "violi\u0301n",
        "viral",
        "virgo",
        "virtud",
        "visor",
        "vi\u0301spera",
        "vista",
        "vitamina",
        "viudo",
        "vivaz",
        "vivero",
        "vivir",
        "vivo",
        "volca\u0301n",
        "volumen",
        "volver",
        "voraz",
        "votar",
        "voto",
        "voz",
        "vuelo",
        "vulgar",
        "yacer",
        "yate",
        "yegua",
        "yema",
        "yerno",
        "yeso",
        "yodo",
        "yoga",
        "yogur",
        "zafiro",
        "zanja",
        "zapato",
        "zarza",
        "zona",
        "zorro",
        "zumo",
        "zurdo"
      ];
    }
  });

  // ../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/japanese.json
  var require_japanese = __commonJS({
    "../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/japanese.json"(exports, module) {
      module.exports = [
        "\u3042\u3044\u3053\u304F\u3057\u3093",
        "\u3042\u3044\u3055\u3064",
        "\u3042\u3044\u305F\u3099",
        "\u3042\u304A\u305D\u3099\u3089",
        "\u3042\u304B\u3061\u3083\u3093",
        "\u3042\u304D\u308B",
        "\u3042\u3051\u304B\u3099\u305F",
        "\u3042\u3051\u308B",
        "\u3042\u3053\u304B\u3099\u308C\u308B",
        "\u3042\u3055\u3044",
        "\u3042\u3055\u3072",
        "\u3042\u3057\u3042\u3068",
        "\u3042\u3057\u3099\u308F\u3046",
        "\u3042\u3059\u3099\u304B\u308B",
        "\u3042\u3059\u3099\u304D",
        "\u3042\u305D\u3075\u3099",
        "\u3042\u305F\u3048\u308B",
        "\u3042\u305F\u305F\u3081\u308B",
        "\u3042\u305F\u308A\u307E\u3048",
        "\u3042\u305F\u308B",
        "\u3042\u3064\u3044",
        "\u3042\u3064\u304B\u3046",
        "\u3042\u3063\u3057\u3085\u304F",
        "\u3042\u3064\u307E\u308A",
        "\u3042\u3064\u3081\u308B",
        "\u3042\u3066\u306A",
        "\u3042\u3066\u306F\u307E\u308B",
        "\u3042\u3072\u308B",
        "\u3042\u3075\u3099\u3089",
        "\u3042\u3075\u3099\u308B",
        "\u3042\u3075\u308C\u308B",
        "\u3042\u307E\u3044",
        "\u3042\u307E\u3068\u3099",
        "\u3042\u307E\u3084\u304B\u3059",
        "\u3042\u307E\u308A",
        "\u3042\u307F\u3082\u306E",
        "\u3042\u3081\u308A\u304B",
        "\u3042\u3084\u307E\u308B",
        "\u3042\u3086\u3080",
        "\u3042\u3089\u3044\u304F\u3099\u307E",
        "\u3042\u3089\u3057",
        "\u3042\u3089\u3059\u3057\u3099",
        "\u3042\u3089\u305F\u3081\u308B",
        "\u3042\u3089\u3086\u308B",
        "\u3042\u3089\u308F\u3059",
        "\u3042\u308A\u304B\u3099\u3068\u3046",
        "\u3042\u308F\u305B\u308B",
        "\u3042\u308F\u3066\u308B",
        "\u3042\u3093\u3044",
        "\u3042\u3093\u304B\u3099\u3044",
        "\u3042\u3093\u3053",
        "\u3042\u3093\u305B\u3099\u3093",
        "\u3042\u3093\u3066\u3044",
        "\u3042\u3093\u306A\u3044",
        "\u3042\u3093\u307E\u308A",
        "\u3044\u3044\u305F\u3099\u3059",
        "\u3044\u304A\u3093",
        "\u3044\u304B\u3099\u3044",
        "\u3044\u304B\u3099\u304F",
        "\u3044\u304D\u304A\u3044",
        "\u3044\u304D\u306A\u308A",
        "\u3044\u304D\u3082\u306E",
        "\u3044\u304D\u308B",
        "\u3044\u304F\u3057\u3099",
        "\u3044\u304F\u3075\u3099\u3093",
        "\u3044\u3051\u306F\u3099\u306A",
        "\u3044\u3051\u3093",
        "\u3044\u3053\u3046",
        "\u3044\u3053\u304F",
        "\u3044\u3053\u3064",
        "\u3044\u3055\u307E\u3057\u3044",
        "\u3044\u3055\u3093",
        "\u3044\u3057\u304D",
        "\u3044\u3057\u3099\u3085\u3046",
        "\u3044\u3057\u3099\u3087\u3046",
        "\u3044\u3057\u3099\u308F\u308B",
        "\u3044\u3059\u3099\u307F",
        "\u3044\u3059\u3099\u308C",
        "\u3044\u305B\u3044",
        "\u3044\u305B\u3048\u3072\u3099",
        "\u3044\u305B\u304B\u3044",
        "\u3044\u305B\u304D",
        "\u3044\u305B\u3099\u3093",
        "\u3044\u305D\u3046\u308D\u3046",
        "\u3044\u305D\u304B\u3099\u3057\u3044",
        "\u3044\u305F\u3099\u3044",
        "\u3044\u305F\u3099\u304F",
        "\u3044\u305F\u3059\u3099\u3089",
        "\u3044\u305F\u307F",
        "\u3044\u305F\u308A\u3042",
        "\u3044\u3061\u304A\u3046",
        "\u3044\u3061\u3057\u3099",
        "\u3044\u3061\u3068\u3099",
        "\u3044\u3061\u306F\u3099",
        "\u3044\u3061\u3075\u3099",
        "\u3044\u3061\u308A\u3085\u3046",
        "\u3044\u3064\u304B",
        "\u3044\u3063\u3057\u3085\u3093",
        "\u3044\u3063\u305B\u3044",
        "\u3044\u3063\u305D\u3046",
        "\u3044\u3063\u305F\u3093",
        "\u3044\u3063\u3061",
        "\u3044\u3063\u3066\u3044",
        "\u3044\u3063\u307B\u309A\u3046",
        "\u3044\u3066\u3055\u3099",
        "\u3044\u3066\u3093",
        "\u3044\u3068\u3099\u3046",
        "\u3044\u3068\u3053",
        "\u3044\u306A\u3044",
        "\u3044\u306A\u304B",
        "\u3044\u306D\u3080\u308A",
        "\u3044\u306E\u3061",
        "\u3044\u306E\u308B",
        "\u3044\u306F\u3064",
        "\u3044\u306F\u3099\u308B",
        "\u3044\u306F\u3093",
        "\u3044\u3072\u3099\u304D",
        "\u3044\u3072\u3093",
        "\u3044\u3075\u304F",
        "\u3044\u3078\u3093",
        "\u3044\u307B\u3046",
        "\u3044\u307F\u3093",
        "\u3044\u3082\u3046\u3068",
        "\u3044\u3082\u305F\u308C",
        "\u3044\u3082\u308A",
        "\u3044\u3084\u304B\u3099\u308B",
        "\u3044\u3084\u3059",
        "\u3044\u3088\u304B\u3093",
        "\u3044\u3088\u304F",
        "\u3044\u3089\u3044",
        "\u3044\u3089\u3059\u3068",
        "\u3044\u308A\u304F\u3099\u3061",
        "\u3044\u308A\u3087\u3046",
        "\u3044\u308C\u3044",
        "\u3044\u308C\u3082\u306E",
        "\u3044\u308C\u308B",
        "\u3044\u308D\u3048\u3093\u3072\u309A\u3064",
        "\u3044\u308F\u3044",
        "\u3044\u308F\u3046",
        "\u3044\u308F\u304B\u3093",
        "\u3044\u308F\u306F\u3099",
        "\u3044\u308F\u3086\u308B",
        "\u3044\u3093\u3051\u3099\u3093\u307E\u3081",
        "\u3044\u3093\u3055\u3064",
        "\u3044\u3093\u3057\u3087\u3046",
        "\u3044\u3093\u3088\u3046",
        "\u3046\u3048\u304D",
        "\u3046\u3048\u308B",
        "\u3046\u304A\u3055\u3099",
        "\u3046\u304B\u3099\u3044",
        "\u3046\u304B\u3075\u3099",
        "\u3046\u304B\u3078\u3099\u308B",
        "\u3046\u304D\u308F",
        "\u3046\u304F\u3089\u3044\u306A",
        "\u3046\u304F\u308C\u308C",
        "\u3046\u3051\u305F\u307E\u308F\u308B",
        "\u3046\u3051\u3064\u3051",
        "\u3046\u3051\u3068\u308B",
        "\u3046\u3051\u3082\u3064",
        "\u3046\u3051\u308B",
        "\u3046\u3053\u3099\u304B\u3059",
        "\u3046\u3053\u3099\u304F",
        "\u3046\u3053\u3093",
        "\u3046\u3055\u304D\u3099",
        "\u3046\u3057\u306A\u3046",
        "\u3046\u3057\u308D\u304B\u3099\u307F",
        "\u3046\u3059\u3044",
        "\u3046\u3059\u304D\u3099",
        "\u3046\u3059\u304F\u3099\u3089\u3044",
        "\u3046\u3059\u3081\u308B",
        "\u3046\u305B\u3064",
        "\u3046\u3061\u3042\u308F\u305B",
        "\u3046\u3061\u304B\u3099\u308F",
        "\u3046\u3061\u304D",
        "\u3046\u3061\u3085\u3046",
        "\u3046\u3063\u304B\u308A",
        "\u3046\u3064\u304F\u3057\u3044",
        "\u3046\u3063\u305F\u3048\u308B",
        "\u3046\u3064\u308B",
        "\u3046\u3068\u3099\u3093",
        "\u3046\u306A\u304D\u3099",
        "\u3046\u306A\u3057\u3099",
        "\u3046\u306A\u3059\u3099\u304F",
        "\u3046\u306A\u308B",
        "\u3046\u306D\u308B",
        "\u3046\u306E\u3046",
        "\u3046\u3075\u3099\u3051\u3099",
        "\u3046\u3075\u3099\u3053\u3099\u3048",
        "\u3046\u307E\u308C\u308B",
        "\u3046\u3081\u308B",
        "\u3046\u3082\u3046",
        "\u3046\u3084\u307E\u3046",
        "\u3046\u3088\u304F",
        "\u3046\u3089\u304B\u3099\u3048\u3059",
        "\u3046\u3089\u304F\u3099\u3061",
        "\u3046\u3089\u306A\u3044",
        "\u3046\u308A\u3042\u3051\u3099",
        "\u3046\u308A\u304D\u308C",
        "\u3046\u308B\u3055\u3044",
        "\u3046\u308C\u3057\u3044",
        "\u3046\u308C\u3086\u304D",
        "\u3046\u308C\u308B",
        "\u3046\u308D\u3053",
        "\u3046\u308F\u304D",
        "\u3046\u308F\u3055",
        "\u3046\u3093\u3053\u3046",
        "\u3046\u3093\u3061\u3093",
        "\u3046\u3093\u3066\u3093",
        "\u3046\u3093\u3068\u3099\u3046",
        "\u3048\u3044\u3048\u3093",
        "\u3048\u3044\u304B\u3099",
        "\u3048\u3044\u304D\u3087\u3046",
        "\u3048\u3044\u3053\u3099",
        "\u3048\u3044\u305B\u3044",
        "\u3048\u3044\u3075\u3099\u3093",
        "\u3048\u3044\u3088\u3046",
        "\u3048\u3044\u308F",
        "\u3048\u304A\u308A",
        "\u3048\u304B\u3099\u304A",
        "\u3048\u304B\u3099\u304F",
        "\u3048\u304D\u305F\u3044",
        "\u3048\u304F\u305B\u308B",
        "\u3048\u3057\u3083\u304F",
        "\u3048\u3059\u3066",
        "\u3048\u3064\u3089\u3093",
        "\u3048\u306E\u304F\u3099",
        "\u3048\u307B\u3046\u307E\u304D",
        "\u3048\u307B\u3093",
        "\u3048\u307E\u304D",
        "\u3048\u3082\u3057\u3099",
        "\u3048\u3082\u306E",
        "\u3048\u3089\u3044",
        "\u3048\u3089\u3075\u3099",
        "\u3048\u308A\u3042",
        "\u3048\u3093\u3048\u3093",
        "\u3048\u3093\u304B\u3044",
        "\u3048\u3093\u304D\u3099",
        "\u3048\u3093\u3051\u3099\u304D",
        "\u3048\u3093\u3057\u3085\u3046",
        "\u3048\u3093\u305B\u3099\u3064",
        "\u3048\u3093\u305D\u304F",
        "\u3048\u3093\u3061\u3087\u3046",
        "\u3048\u3093\u3068\u3064",
        "\u304A\u3044\u304B\u3051\u308B",
        "\u304A\u3044\u3053\u3059",
        "\u304A\u3044\u3057\u3044",
        "\u304A\u3044\u3064\u304F",
        "\u304A\u3046\u3048\u3093",
        "\u304A\u3046\u3055\u307E",
        "\u304A\u3046\u3057\u3099",
        "\u304A\u3046\u305B\u3064",
        "\u304A\u3046\u305F\u3044",
        "\u304A\u3046\u3075\u304F",
        "\u304A\u3046\u3078\u3099\u3044",
        "\u304A\u3046\u3088\u3046",
        "\u304A\u3048\u308B",
        "\u304A\u304A\u3044",
        "\u304A\u304A\u3046",
        "\u304A\u304A\u3068\u3099\u304A\u308A",
        "\u304A\u304A\u3084",
        "\u304A\u304A\u3088\u305D",
        "\u304A\u304B\u3048\u308A",
        "\u304A\u304B\u3059\u3099",
        "\u304A\u304B\u3099\u3080",
        "\u304A\u304B\u308F\u308A",
        "\u304A\u304D\u3099\u306A\u3046",
        "\u304A\u304D\u308B",
        "\u304A\u304F\u3055\u307E",
        "\u304A\u304F\u3057\u3099\u3087\u3046",
        "\u304A\u304F\u308A\u304B\u3099\u306A",
        "\u304A\u304F\u308B",
        "\u304A\u304F\u308C\u308B",
        "\u304A\u3053\u3059",
        "\u304A\u3053\u306A\u3046",
        "\u304A\u3053\u308B",
        "\u304A\u3055\u3048\u308B",
        "\u304A\u3055\u306A\u3044",
        "\u304A\u3055\u3081\u308B",
        "\u304A\u3057\u3044\u308C",
        "\u304A\u3057\u3048\u308B",
        "\u304A\u3057\u3099\u304D\u3099",
        "\u304A\u3057\u3099\u3055\u3093",
        "\u304A\u3057\u3083\u308C",
        "\u304A\u305D\u3089\u304F",
        "\u304A\u305D\u308F\u308B",
        "\u304A\u305F\u304B\u3099\u3044",
        "\u304A\u305F\u304F",
        "\u304A\u305F\u3099\u3084\u304B",
        "\u304A\u3061\u3064\u304F",
        "\u304A\u3063\u3068",
        "\u304A\u3064\u308A",
        "\u304A\u3066\u3099\u304B\u3051",
        "\u304A\u3068\u3057\u3082\u306E",
        "\u304A\u3068\u306A\u3057\u3044",
        "\u304A\u3068\u3099\u308A",
        "\u304A\u3068\u3099\u308D\u304B\u3059",
        "\u304A\u306F\u3099\u3055\u3093",
        "\u304A\u307E\u3044\u308A",
        "\u304A\u3081\u3066\u3099\u3068\u3046",
        "\u304A\u3082\u3044\u3066\u3099",
        "\u304A\u3082\u3046",
        "\u304A\u3082\u305F\u3044",
        "\u304A\u3082\u3061\u3083",
        "\u304A\u3084\u3064",
        "\u304A\u3084\u3086\u3072\u3099",
        "\u304A\u3088\u307B\u3099\u3059",
        "\u304A\u3089\u3093\u305F\u3099",
        "\u304A\u308D\u3059",
        "\u304A\u3093\u304B\u3099\u304F",
        "\u304A\u3093\u3051\u3044",
        "\u304A\u3093\u3057\u3083",
        "\u304A\u3093\u305B\u3093",
        "\u304A\u3093\u305F\u3099\u3093",
        "\u304A\u3093\u3061\u3085\u3046",
        "\u304A\u3093\u3068\u3099\u3051\u3044",
        "\u304B\u3042\u3064",
        "\u304B\u3044\u304B\u3099",
        "\u304B\u3099\u3044\u304D",
        "\u304B\u3099\u3044\u3051\u3093",
        "\u304B\u3099\u3044\u3053\u3046",
        "\u304B\u3044\u3055\u3064",
        "\u304B\u3044\u3057\u3083",
        "\u304B\u3044\u3059\u3044\u3088\u304F",
        "\u304B\u3044\u305B\u3099\u3093",
        "\u304B\u3044\u305D\u3099\u3046\u3068\u3099",
        "\u304B\u3044\u3064\u3046",
        "\u304B\u3044\u3066\u3093",
        "\u304B\u3044\u3068\u3046",
        "\u304B\u3044\u3075\u304F",
        "\u304B\u3099\u3044\u3078\u304D",
        "\u304B\u3044\u307B\u3046",
        "\u304B\u3044\u3088\u3046",
        "\u304B\u3099\u3044\u3089\u3044",
        "\u304B\u3044\u308F",
        "\u304B\u3048\u308B",
        "\u304B\u304A\u308A",
        "\u304B\u304B\u3048\u308B",
        "\u304B\u304B\u3099\u304F",
        "\u304B\u304B\u3099\u3057",
        "\u304B\u304B\u3099\u307F",
        "\u304B\u304F\u3053\u3099",
        "\u304B\u304F\u3068\u304F",
        "\u304B\u3055\u3099\u308B",
        "\u304B\u3099\u305D\u3099\u3046",
        "\u304B\u305F\u3044",
        "\u304B\u305F\u3061",
        "\u304B\u3099\u3061\u3087\u3046",
        "\u304B\u3099\u3063\u304D\u3085\u3046",
        "\u304B\u3099\u3063\u3053\u3046",
        "\u304B\u3099\u3063\u3055\u3093",
        "\u304B\u3099\u3063\u3057\u3087\u3046",
        "\u304B\u306A\u3055\u3099\u308F\u3057",
        "\u304B\u306E\u3046",
        "\u304B\u3099\u306F\u304F",
        "\u304B\u3075\u3099\u304B",
        "\u304B\u307B\u3046",
        "\u304B\u307B\u3053\u3099",
        "\u304B\u307E\u3046",
        "\u304B\u307E\u307B\u3099\u3053",
        "\u304B\u3081\u308C\u304A\u3093",
        "\u304B\u3086\u3044",
        "\u304B\u3088\u3046\u3072\u3099",
        "\u304B\u3089\u3044",
        "\u304B\u308B\u3044",
        "\u304B\u308D\u3046",
        "\u304B\u308F\u304F",
        "\u304B\u308F\u3089",
        "\u304B\u3099\u3093\u304B",
        "\u304B\u3093\u3051\u3044",
        "\u304B\u3093\u3053\u3046",
        "\u304B\u3093\u3057\u3083",
        "\u304B\u3093\u305D\u3046",
        "\u304B\u3093\u305F\u3093",
        "\u304B\u3093\u3061",
        "\u304B\u3099\u3093\u306F\u3099\u308B",
        "\u304D\u3042\u3044",
        "\u304D\u3042\u3064",
        "\u304D\u3044\u308D",
        "\u304D\u3099\u3044\u3093",
        "\u304D\u3046\u3044",
        "\u304D\u3046\u3093",
        "\u304D\u3048\u308B",
        "\u304D\u304A\u3046",
        "\u304D\u304A\u304F",
        "\u304D\u304A\u3061",
        "\u304D\u304A\u3093",
        "\u304D\u304B\u3044",
        "\u304D\u304B\u304F",
        "\u304D\u304B\u3093\u3057\u3083",
        "\u304D\u304D\u3066",
        "\u304D\u304F\u306F\u3099\u308A",
        "\u304D\u304F\u3089\u3051\u3099",
        "\u304D\u3051\u3093\u305B\u3044",
        "\u304D\u3053\u3046",
        "\u304D\u3053\u3048\u308B",
        "\u304D\u3053\u304F",
        "\u304D\u3055\u3044",
        "\u304D\u3055\u304F",
        "\u304D\u3055\u307E",
        "\u304D\u3055\u3089\u304D\u3099",
        "\u304D\u3099\u3057\u3099\u304B\u304B\u3099\u304F",
        "\u304D\u3099\u3057\u304D",
        "\u304D\u3099\u3057\u3099\u305F\u3044\u3051\u3093",
        "\u304D\u3099\u3057\u3099\u306B\u3063\u3066\u3044",
        "\u304D\u3099\u3057\u3099\u3085\u3064\u3057\u3083",
        "\u304D\u3059\u3046",
        "\u304D\u305B\u3044",
        "\u304D\u305B\u304D",
        "\u304D\u305B\u3064",
        "\u304D\u305D\u3046",
        "\u304D\u305D\u3099\u304F",
        "\u304D\u305D\u3099\u3093",
        "\u304D\u305F\u3048\u308B",
        "\u304D\u3061\u3087\u3046",
        "\u304D\u3064\u3048\u3093",
        "\u304D\u3099\u3063\u3061\u308A",
        "\u304D\u3064\u3064\u304D",
        "\u304D\u3064\u306D",
        "\u304D\u3066\u3044",
        "\u304D\u3068\u3099\u3046",
        "\u304D\u3068\u3099\u304F",
        "\u304D\u306A\u3044",
        "\u304D\u306A\u304B\u3099",
        "\u304D\u306A\u3053",
        "\u304D\u306C\u3053\u3099\u3057",
        "\u304D\u306D\u3093",
        "\u304D\u306E\u3046",
        "\u304D\u306E\u3057\u305F",
        "\u304D\u306F\u304F",
        "\u304D\u3072\u3099\u3057\u3044",
        "\u304D\u3072\u3093",
        "\u304D\u3075\u304F",
        "\u304D\u3075\u3099\u3093",
        "\u304D\u307B\u3099\u3046",
        "\u304D\u307B\u3093",
        "\u304D\u307E\u308B",
        "\u304D\u307F\u3064",
        "\u304D\u3080\u3059\u3099\u304B\u3057\u3044",
        "\u304D\u3081\u308B",
        "\u304D\u3082\u305F\u3099\u3081\u3057",
        "\u304D\u3082\u3061",
        "\u304D\u3082\u306E",
        "\u304D\u3083\u304F",
        "\u304D\u3084\u304F",
        "\u304D\u3099\u3085\u3046\u306B\u304F",
        "\u304D\u3088\u3046",
        "\u304D\u3087\u3046\u308A\u3085\u3046",
        "\u304D\u3089\u3044",
        "\u304D\u3089\u304F",
        "\u304D\u308A\u3093",
        "\u304D\u308C\u3044",
        "\u304D\u308C\u3064",
        "\u304D\u308D\u304F",
        "\u304D\u3099\u308D\u3093",
        "\u304D\u308F\u3081\u308B",
        "\u304D\u3099\u3093\u3044\u308D",
        "\u304D\u3093\u304B\u304F\u3057\u3099",
        "\u304D\u3093\u3057\u3099\u3087",
        "\u304D\u3093\u3088\u3046\u3072\u3099",
        "\u304F\u3099\u3042\u3044",
        "\u304F\u3044\u3059\u3099",
        "\u304F\u3046\u304B\u3093",
        "\u304F\u3046\u304D",
        "\u304F\u3046\u304F\u3099\u3093",
        "\u304F\u3046\u3053\u3046",
        "\u304F\u3099\u3046\u305B\u3044",
        "\u304F\u3046\u305D\u3046",
        "\u304F\u3099\u3046\u305F\u3089",
        "\u304F\u3046\u3075\u304F",
        "\u304F\u3046\u307B\u3099",
        "\u304F\u304B\u3093",
        "\u304F\u304D\u3087\u3046",
        "\u304F\u3051\u3099\u3093",
        "\u304F\u3099\u3053\u3046",
        "\u304F\u3055\u3044",
        "\u304F\u3055\u304D",
        "\u304F\u3055\u306F\u3099\u306A",
        "\u304F\u3055\u308B",
        "\u304F\u3057\u3083\u307F",
        "\u304F\u3057\u3087\u3046",
        "\u304F\u3059\u306E\u304D",
        "\u304F\u3059\u308A\u3086\u3072\u3099",
        "\u304F\u305B\u3051\u3099",
        "\u304F\u305B\u3093",
        "\u304F\u3099\u305F\u3044\u3066\u304D",
        "\u304F\u305F\u3099\u3055\u308B",
        "\u304F\u305F\u3072\u3099\u308C\u308B",
        "\u304F\u3061\u3053\u307F",
        "\u304F\u3061\u3055\u304D",
        "\u304F\u3064\u3057\u305F",
        "\u304F\u3099\u3063\u3059\u308A",
        "\u304F\u3064\u308D\u304F\u3099",
        "\u304F\u3068\u3046\u3066\u3093",
        "\u304F\u3068\u3099\u304F",
        "\u304F\u306A\u3093",
        "\u304F\u306D\u304F\u306D",
        "\u304F\u306E\u3046",
        "\u304F\u3075\u3046",
        "\u304F\u307F\u3042\u308F\u305B",
        "\u304F\u307F\u305F\u3066\u308B",
        "\u304F\u3081\u308B",
        "\u304F\u3084\u304F\u3057\u3087",
        "\u304F\u3089\u3059",
        "\u304F\u3089\u3078\u3099\u308B",
        "\u304F\u308B\u307E",
        "\u304F\u308C\u308B",
        "\u304F\u308D\u3046",
        "\u304F\u308F\u3057\u3044",
        "\u304F\u3099\u3093\u304B\u3093",
        "\u304F\u3099\u3093\u3057\u3087\u304F",
        "\u304F\u3099\u3093\u305F\u3044",
        "\u304F\u3099\u3093\u3066",
        "\u3051\u3042\u306A",
        "\u3051\u3044\u304B\u304F",
        "\u3051\u3044\u3051\u3093",
        "\u3051\u3044\u3053",
        "\u3051\u3044\u3055\u3064",
        "\u3051\u3099\u3044\u3057\u3099\u3085\u3064",
        "\u3051\u3044\u305F\u3044",
        "\u3051\u3099\u3044\u306E\u3046\u3057\u3099\u3093",
        "\u3051\u3044\u308C\u304D",
        "\u3051\u3044\u308D",
        "\u3051\u304A\u3068\u3059",
        "\u3051\u304A\u308A\u3082\u306E",
        "\u3051\u3099\u304D\u304B",
        "\u3051\u3099\u304D\u3051\u3099\u3093",
        "\u3051\u3099\u304D\u305F\u3099\u3093",
        "\u3051\u3099\u304D\u3061\u3093",
        "\u3051\u3099\u304D\u3068\u3064",
        "\u3051\u3099\u304D\u306F",
        "\u3051\u3099\u304D\u3084\u304F",
        "\u3051\u3099\u3053\u3046",
        "\u3051\u3099\u3053\u304F\u3057\u3099\u3087\u3046",
        "\u3051\u3099\u3055\u3099\u3044",
        "\u3051\u3055\u304D",
        "\u3051\u3099\u3055\u3099\u3093",
        "\u3051\u3057\u304D",
        "\u3051\u3057\u3053\u3099\u3080",
        "\u3051\u3057\u3087\u3046",
        "\u3051\u3099\u3059\u3068",
        "\u3051\u305F\u306F\u3099",
        "\u3051\u3061\u3083\u3063\u3075\u309A",
        "\u3051\u3061\u3089\u3059",
        "\u3051\u3064\u3042\u3064",
        "\u3051\u3064\u3044",
        "\u3051\u3064\u3048\u304D",
        "\u3051\u3063\u3053\u3093",
        "\u3051\u3064\u3057\u3099\u3087",
        "\u3051\u3063\u305B\u304D",
        "\u3051\u3063\u3066\u3044",
        "\u3051\u3064\u307E\u3064",
        "\u3051\u3099\u3064\u3088\u3046\u3072\u3099",
        "\u3051\u3099\u3064\u308C\u3044",
        "\u3051\u3064\u308D\u3093",
        "\u3051\u3099\u3068\u3099\u304F",
        "\u3051\u3068\u306F\u3099\u3059",
        "\u3051\u3068\u308B",
        "\u3051\u306A\u3051\u3099",
        "\u3051\u306A\u3059",
        "\u3051\u306A\u307F",
        "\u3051\u306C\u304D",
        "\u3051\u3099\u306D\u3064",
        "\u3051\u306D\u3093",
        "\u3051\u306F\u3044",
        "\u3051\u3099\u3072\u3093",
        "\u3051\u3075\u3099\u304B\u3044",
        "\u3051\u3099\u307B\u3099\u304F",
        "\u3051\u307E\u308A",
        "\u3051\u307F\u304B\u308B",
        "\u3051\u3080\u3057",
        "\u3051\u3080\u308A",
        "\u3051\u3082\u306E",
        "\u3051\u3089\u3044",
        "\u3051\u308D\u3051\u308D",
        "\u3051\u308F\u3057\u3044",
        "\u3051\u3093\u3044",
        "\u3051\u3093\u3048\u3064",
        "\u3051\u3093\u304A",
        "\u3051\u3093\u304B",
        "\u3051\u3099\u3093\u304D",
        "\u3051\u3093\u3051\u3099\u3093",
        "\u3051\u3093\u3053\u3046",
        "\u3051\u3093\u3055\u304F",
        "\u3051\u3093\u3057\u3085\u3046",
        "\u3051\u3093\u3059\u3046",
        "\u3051\u3099\u3093\u305D\u3046",
        "\u3051\u3093\u3061\u304F",
        "\u3051\u3093\u3066\u3044",
        "\u3051\u3093\u3068\u3046",
        "\u3051\u3093\u306A\u3044",
        "\u3051\u3093\u306B\u3093",
        "\u3051\u3099\u3093\u3075\u3099\u3064",
        "\u3051\u3093\u307E",
        "\u3051\u3093\u307F\u3093",
        "\u3051\u3093\u3081\u3044",
        "\u3051\u3093\u3089\u3093",
        "\u3051\u3093\u308A",
        "\u3053\u3042\u304F\u307E",
        "\u3053\u3044\u306C",
        "\u3053\u3044\u3072\u3099\u3068",
        "\u3053\u3099\u3046\u3044",
        "\u3053\u3046\u3048\u3093",
        "\u3053\u3046\u304A\u3093",
        "\u3053\u3046\u304B\u3093",
        "\u3053\u3099\u3046\u304D\u3085\u3046",
        "\u3053\u3099\u3046\u3051\u3044",
        "\u3053\u3046\u3053\u3046",
        "\u3053\u3046\u3055\u3044",
        "\u3053\u3046\u3057\u3099",
        "\u3053\u3046\u3059\u3044",
        "\u3053\u3099\u3046\u305B\u3044",
        "\u3053\u3046\u305D\u304F",
        "\u3053\u3046\u305F\u3044",
        "\u3053\u3046\u3061\u3083",
        "\u3053\u3046\u3064\u3046",
        "\u3053\u3046\u3066\u3044",
        "\u3053\u3046\u3068\u3099\u3046",
        "\u3053\u3046\u306A\u3044",
        "\u3053\u3046\u306F\u3044",
        "\u3053\u3099\u3046\u307B\u3046",
        "\u3053\u3099\u3046\u307E\u3093",
        "\u3053\u3046\u3082\u304F",
        "\u3053\u3046\u308A\u3064",
        "\u3053\u3048\u308B",
        "\u3053\u304A\u308A",
        "\u3053\u3099\u304B\u3044",
        "\u3053\u3099\u304B\u3099\u3064",
        "\u3053\u3099\u304B\u3093",
        "\u3053\u304F\u3053\u3099",
        "\u3053\u304F\u3055\u3044",
        "\u3053\u304F\u3068\u3046",
        "\u3053\u304F\u306A\u3044",
        "\u3053\u304F\u306F\u304F",
        "\u3053\u304F\u3099\u307E",
        "\u3053\u3051\u3044",
        "\u3053\u3051\u308B",
        "\u3053\u3053\u306E\u304B",
        "\u3053\u3053\u308D",
        "\u3053\u3055\u3081",
        "\u3053\u3057\u3064",
        "\u3053\u3059\u3046",
        "\u3053\u305B\u3044",
        "\u3053\u305B\u304D",
        "\u3053\u305B\u3099\u3093",
        "\u3053\u305D\u305F\u3099\u3066",
        "\u3053\u305F\u3044",
        "\u3053\u305F\u3048\u308B",
        "\u3053\u305F\u3064",
        "\u3053\u3061\u3087\u3046",
        "\u3053\u3063\u304B",
        "\u3053\u3064\u3053\u3064",
        "\u3053\u3064\u306F\u3099\u3093",
        "\u3053\u3064\u3075\u3099",
        "\u3053\u3066\u3044",
        "\u3053\u3066\u3093",
        "\u3053\u3068\u304B\u3099\u3089",
        "\u3053\u3068\u3057",
        "\u3053\u3068\u306F\u3099",
        "\u3053\u3068\u308A",
        "\u3053\u306A\u3053\u3099\u306A",
        "\u3053\u306D\u3053\u306D",
        "\u3053\u306E\u307E\u307E",
        "\u3053\u306E\u307F",
        "\u3053\u306E\u3088",
        "\u3053\u3099\u306F\u3093",
        "\u3053\u3072\u3064\u3057\u3099",
        "\u3053\u3075\u3046",
        "\u3053\u3075\u3093",
        "\u3053\u307B\u3099\u308C\u308B",
        "\u3053\u3099\u307E\u3042\u3075\u3099\u3089",
        "\u3053\u307E\u304B\u3044",
        "\u3053\u3099\u307E\u3059\u308A",
        "\u3053\u307E\u3064\u306A",
        "\u3053\u307E\u308B",
        "\u3053\u3080\u304D\u3099\u3053",
        "\u3053\u3082\u3057\u3099",
        "\u3053\u3082\u3061",
        "\u3053\u3082\u306E",
        "\u3053\u3082\u3093",
        "\u3053\u3084\u304F",
        "\u3053\u3084\u307E",
        "\u3053\u3086\u3046",
        "\u3053\u3086\u3072\u3099",
        "\u3053\u3088\u3044",
        "\u3053\u3088\u3046",
        "\u3053\u308A\u308B",
        "\u3053\u308C\u304F\u3057\u3087\u3093",
        "\u3053\u308D\u3063\u3051",
        "\u3053\u308F\u3082\u3066",
        "\u3053\u308F\u308C\u308B",
        "\u3053\u3093\u3044\u3093",
        "\u3053\u3093\u304B\u3044",
        "\u3053\u3093\u304D",
        "\u3053\u3093\u3057\u3085\u3046",
        "\u3053\u3093\u3059\u3044",
        "\u3053\u3093\u305F\u3099\u3066",
        "\u3053\u3093\u3068\u3093",
        "\u3053\u3093\u306A\u3093",
        "\u3053\u3093\u3072\u3099\u306B",
        "\u3053\u3093\u307B\u309A\u3093",
        "\u3053\u3093\u307E\u3051",
        "\u3053\u3093\u3084",
        "\u3053\u3093\u308C\u3044",
        "\u3053\u3093\u308F\u304F",
        "\u3055\u3099\u3044\u3048\u304D",
        "\u3055\u3044\u304B\u3044",
        "\u3055\u3044\u304D\u3093",
        "\u3055\u3099\u3044\u3051\u3099\u3093",
        "\u3055\u3099\u3044\u3053",
        "\u3055\u3044\u3057\u3087",
        "\u3055\u3044\u305B\u3044",
        "\u3055\u3099\u3044\u305F\u304F",
        "\u3055\u3099\u3044\u3061\u3085\u3046",
        "\u3055\u3044\u3066\u304D",
        "\u3055\u3099\u3044\u308A\u3087\u3046",
        "\u3055\u3046\u306A",
        "\u3055\u304B\u3044\u3057",
        "\u3055\u304B\u3099\u3059",
        "\u3055\u304B\u306A",
        "\u3055\u304B\u307F\u3061",
        "\u3055\u304B\u3099\u308B",
        "\u3055\u304D\u3099\u3087\u3046",
        "\u3055\u304F\u3057",
        "\u3055\u304F\u3072\u3093",
        "\u3055\u304F\u3089",
        "\u3055\u3053\u304F",
        "\u3055\u3053\u3064",
        "\u3055\u3059\u3099\u304B\u308B",
        "\u3055\u3099\u305B\u304D",
        "\u3055\u305F\u3093",
        "\u3055\u3064\u3048\u3044",
        "\u3055\u3099\u3064\u304A\u3093",
        "\u3055\u3099\u3063\u304B",
        "\u3055\u3099\u3064\u304B\u3099\u304F",
        "\u3055\u3063\u304D\u3087\u304F",
        "\u3055\u3099\u3063\u3057",
        "\u3055\u3064\u3057\u3099\u3093",
        "\u3055\u3099\u3063\u305D\u3046",
        "\u3055\u3064\u305F\u306F\u3099",
        "\u3055\u3064\u307E\u3044\u3082",
        "\u3055\u3066\u3044",
        "\u3055\u3068\u3044\u3082",
        "\u3055\u3068\u3046",
        "\u3055\u3068\u304A\u3084",
        "\u3055\u3068\u3057",
        "\u3055\u3068\u308B",
        "\u3055\u306E\u3046",
        "\u3055\u306F\u3099\u304F",
        "\u3055\u3072\u3099\u3057\u3044",
        "\u3055\u3078\u3099\u3064",
        "\u3055\u307B\u3046",
        "\u3055\u307B\u3068\u3099",
        "\u3055\u307E\u3059",
        "\u3055\u307F\u3057\u3044",
        "\u3055\u307F\u305F\u3099\u308C",
        "\u3055\u3080\u3051",
        "\u3055\u3081\u308B",
        "\u3055\u3084\u3048\u3093\u3068\u3099\u3046",
        "\u3055\u3086\u3046",
        "\u3055\u3088\u3046",
        "\u3055\u3088\u304F",
        "\u3055\u3089\u305F\u3099",
        "\u3055\u3099\u308B\u305D\u306F\u3099",
        "\u3055\u308F\u3084\u304B",
        "\u3055\u308F\u308B",
        "\u3055\u3093\u3044\u3093",
        "\u3055\u3093\u304B",
        "\u3055\u3093\u304D\u3083\u304F",
        "\u3055\u3093\u3053\u3046",
        "\u3055\u3093\u3055\u3044",
        "\u3055\u3099\u3093\u3057\u3087",
        "\u3055\u3093\u3059\u3046",
        "\u3055\u3093\u305B\u3044",
        "\u3055\u3093\u305D",
        "\u3055\u3093\u3061",
        "\u3055\u3093\u307E",
        "\u3055\u3093\u307F",
        "\u3055\u3093\u3089\u3093",
        "\u3057\u3042\u3044",
        "\u3057\u3042\u3051\u3099",
        "\u3057\u3042\u3055\u3063\u3066",
        "\u3057\u3042\u308F\u305B",
        "\u3057\u3044\u304F",
        "\u3057\u3044\u3093",
        "\u3057\u3046\u3061",
        "\u3057\u3048\u3044",
        "\u3057\u304A\u3051",
        "\u3057\u304B\u3044",
        "\u3057\u304B\u304F",
        "\u3057\u3099\u304B\u3093",
        "\u3057\u3053\u3099\u3068",
        "\u3057\u3059\u3046",
        "\u3057\u3099\u305F\u3099\u3044",
        "\u3057\u305F\u3046\u3051",
        "\u3057\u305F\u304D\u3099",
        "\u3057\u305F\u3066",
        "\u3057\u305F\u307F",
        "\u3057\u3061\u3087\u3046",
        "\u3057\u3061\u308A\u3093",
        "\u3057\u3063\u304B\u308A",
        "\u3057\u3064\u3057\u3099",
        "\u3057\u3064\u3082\u3093",
        "\u3057\u3066\u3044",
        "\u3057\u3066\u304D",
        "\u3057\u3066\u3064",
        "\u3057\u3099\u3066\u3093",
        "\u3057\u3099\u3068\u3099\u3046",
        "\u3057\u306A\u304D\u3099\u308C",
        "\u3057\u306A\u3082\u306E",
        "\u3057\u306A\u3093",
        "\u3057\u306D\u307E",
        "\u3057\u306D\u3093",
        "\u3057\u306E\u304F\u3099",
        "\u3057\u306E\u3075\u3099",
        "\u3057\u306F\u3044",
        "\u3057\u306F\u3099\u304B\u308A",
        "\u3057\u306F\u3064",
        "\u3057\u306F\u3089\u3044",
        "\u3057\u306F\u3093",
        "\u3057\u3072\u3087\u3046",
        "\u3057\u3075\u304F",
        "\u3057\u3099\u3075\u3099\u3093",
        "\u3057\u3078\u3044",
        "\u3057\u307B\u3046",
        "\u3057\u307B\u3093",
        "\u3057\u307E\u3046",
        "\u3057\u307E\u308B",
        "\u3057\u307F\u3093",
        "\u3057\u3080\u3051\u308B",
        "\u3057\u3099\u3080\u3057\u3087",
        "\u3057\u3081\u3044",
        "\u3057\u3081\u308B",
        "\u3057\u3082\u3093",
        "\u3057\u3083\u3044\u3093",
        "\u3057\u3083\u3046\u3093",
        "\u3057\u3083\u304A\u3093",
        "\u3057\u3099\u3083\u304B\u3099\u3044\u3082",
        "\u3057\u3084\u304F\u3057\u3087",
        "\u3057\u3083\u304F\u307B\u3046",
        "\u3057\u3083\u3051\u3093",
        "\u3057\u3083\u3053",
        "\u3057\u3083\u3055\u3099\u3044",
        "\u3057\u3083\u3057\u3093",
        "\u3057\u3083\u305B\u3093",
        "\u3057\u3083\u305D\u3046",
        "\u3057\u3083\u305F\u3044",
        "\u3057\u3083\u3061\u3087\u3046",
        "\u3057\u3083\u3063\u304D\u3093",
        "\u3057\u3099\u3083\u307E",
        "\u3057\u3083\u308A\u3093",
        "\u3057\u3083\u308C\u3044",
        "\u3057\u3099\u3086\u3046",
        "\u3057\u3099\u3085\u3046\u3057\u3087",
        "\u3057\u3085\u304F\u306F\u304F",
        "\u3057\u3099\u3085\u3057\u3093",
        "\u3057\u3085\u3063\u305B\u304D",
        "\u3057\u3085\u307F",
        "\u3057\u3085\u3089\u306F\u3099",
        "\u3057\u3099\u3085\u3093\u306F\u3099\u3093",
        "\u3057\u3087\u3046\u304B\u3044",
        "\u3057\u3087\u304F\u305F\u304F",
        "\u3057\u3087\u3063\u3051\u3093",
        "\u3057\u3087\u3068\u3099\u3046",
        "\u3057\u3087\u3082\u3064",
        "\u3057\u3089\u305B\u308B",
        "\u3057\u3089\u3078\u3099\u308B",
        "\u3057\u3093\u304B",
        "\u3057\u3093\u3053\u3046",
        "\u3057\u3099\u3093\u3057\u3099\u3083",
        "\u3057\u3093\u305B\u3044\u3057\u3099",
        "\u3057\u3093\u3061\u304F",
        "\u3057\u3093\u308A\u3093",
        "\u3059\u3042\u3051\u3099",
        "\u3059\u3042\u3057",
        "\u3059\u3042\u306A",
        "\u3059\u3099\u3042\u3093",
        "\u3059\u3044\u3048\u3044",
        "\u3059\u3044\u304B",
        "\u3059\u3044\u3068\u3046",
        "\u3059\u3099\u3044\u3075\u3099\u3093",
        "\u3059\u3044\u3088\u3046\u3072\u3099",
        "\u3059\u3046\u304B\u3099\u304F",
        "\u3059\u3046\u3057\u3099\u3064",
        "\u3059\u3046\u305B\u3093",
        "\u3059\u304A\u3068\u3099\u308A",
        "\u3059\u304D\u307E",
        "\u3059\u304F\u3046",
        "\u3059\u304F\u306A\u3044",
        "\u3059\u3051\u308B",
        "\u3059\u3053\u3099\u3044",
        "\u3059\u3053\u3057",
        "\u3059\u3099\u3055\u3093",
        "\u3059\u3059\u3099\u3057\u3044",
        "\u3059\u3059\u3080",
        "\u3059\u3059\u3081\u308B",
        "\u3059\u3063\u304B\u308A",
        "\u3059\u3099\u3063\u3057\u308A",
        "\u3059\u3099\u3063\u3068",
        "\u3059\u3066\u304D",
        "\u3059\u3066\u308B",
        "\u3059\u306D\u308B",
        "\u3059\u306E\u3053",
        "\u3059\u306F\u305F\u3099",
        "\u3059\u306F\u3099\u3089\u3057\u3044",
        "\u3059\u3099\u3072\u3087\u3046",
        "\u3059\u3099\u3075\u3099\u306C\u308C",
        "\u3059\u3075\u3099\u308A",
        "\u3059\u3075\u308C",
        "\u3059\u3078\u3099\u3066",
        "\u3059\u3078\u3099\u308B",
        "\u3059\u3099\u307B\u3046",
        "\u3059\u307B\u3099\u3093",
        "\u3059\u307E\u3044",
        "\u3059\u3081\u3057",
        "\u3059\u3082\u3046",
        "\u3059\u3084\u304D",
        "\u3059\u3089\u3059\u3089",
        "\u3059\u308B\u3081",
        "\u3059\u308C\u3061\u304B\u3099\u3046",
        "\u3059\u308D\u3063\u3068",
        "\u3059\u308F\u308B",
        "\u3059\u3093\u305B\u3099\u3093",
        "\u3059\u3093\u307B\u309A\u3046",
        "\u305B\u3042\u3075\u3099\u3089",
        "\u305B\u3044\u304B\u3064",
        "\u305B\u3044\u3051\u3099\u3093",
        "\u305B\u3044\u3057\u3099",
        "\u305B\u3044\u3088\u3046",
        "\u305B\u304A\u3046",
        "\u305B\u304B\u3044\u304B\u3093",
        "\u305B\u304D\u306B\u3093",
        "\u305B\u304D\u3080",
        "\u305B\u304D\u3086",
        "\u305B\u304D\u3089\u3093\u3046\u3093",
        "\u305B\u3051\u3093",
        "\u305B\u3053\u3046",
        "\u305B\u3059\u3057\u3099",
        "\u305B\u305F\u3044",
        "\u305B\u305F\u3051",
        "\u305B\u3063\u304B\u304F",
        "\u305B\u3063\u304D\u3083\u304F",
        "\u305B\u3099\u3063\u304F",
        "\u305B\u3063\u3051\u3093",
        "\u305B\u3063\u3053\u3064",
        "\u305B\u3063\u3055\u305F\u304F\u307E",
        "\u305B\u3064\u305D\u3099\u304F",
        "\u305B\u3064\u305F\u3099\u3093",
        "\u305B\u3064\u3066\u3099\u3093",
        "\u305B\u3063\u306F\u309A\u3093",
        "\u305B\u3064\u3072\u3099",
        "\u305B\u3064\u3075\u3099\u3093",
        "\u305B\u3064\u3081\u3044",
        "\u305B\u3064\u308A\u3064",
        "\u305B\u306A\u304B",
        "\u305B\u306E\u3072\u3099",
        "\u305B\u306F\u306F\u3099",
        "\u305B\u3072\u3099\u308D",
        "\u305B\u307B\u3099\u306D",
        "\u305B\u307E\u3044",
        "\u305B\u307E\u308B",
        "\u305B\u3081\u308B",
        "\u305B\u3082\u305F\u308C",
        "\u305B\u308A\u3075",
        "\u305B\u3099\u3093\u3042\u304F",
        "\u305B\u3093\u3044",
        "\u305B\u3093\u3048\u3044",
        "\u305B\u3093\u304B",
        "\u305B\u3093\u304D\u3087",
        "\u305B\u3093\u304F",
        "\u305B\u3093\u3051\u3099\u3093",
        "\u305B\u3099\u3093\u3053\u3099",
        "\u305B\u3093\u3055\u3044",
        "\u305B\u3093\u3057\u3085",
        "\u305B\u3093\u3059\u3044",
        "\u305B\u3093\u305B\u3044",
        "\u305B\u3093\u305D\u3099",
        "\u305B\u3093\u305F\u304F",
        "\u305B\u3093\u3061\u3087\u3046",
        "\u305B\u3093\u3066\u3044",
        "\u305B\u3093\u3068\u3046",
        "\u305B\u3093\u306C\u304D",
        "\u305B\u3093\u306D\u3093",
        "\u305B\u3093\u306F\u309A\u3044",
        "\u305B\u3099\u3093\u3075\u3099",
        "\u305B\u3099\u3093\u307B\u309A\u3046",
        "\u305B\u3093\u3080",
        "\u305B\u3093\u3081\u3093\u3057\u3099\u3087",
        "\u305B\u3093\u3082\u3093",
        "\u305B\u3093\u3084\u304F",
        "\u305B\u3093\u3086\u3046",
        "\u305B\u3093\u3088\u3046",
        "\u305B\u3099\u3093\u3089",
        "\u305B\u3099\u3093\u308A\u3083\u304F",
        "\u305B\u3093\u308C\u3044",
        "\u305B\u3093\u308D",
        "\u305D\u3042\u304F",
        "\u305D\u3044\u3068\u3051\u3099\u308B",
        "\u305D\u3044\u306D",
        "\u305D\u3046\u304B\u3099\u3093\u304D\u3087\u3046",
        "\u305D\u3046\u304D",
        "\u305D\u3046\u3053\u3099",
        "\u305D\u3046\u3057\u3093",
        "\u305D\u3046\u305F\u3099\u3093",
        "\u305D\u3046\u306A\u3093",
        "\u305D\u3046\u3072\u3099",
        "\u305D\u3046\u3081\u3093",
        "\u305D\u3046\u308A",
        "\u305D\u3048\u3082\u306E",
        "\u305D\u3048\u3093",
        "\u305D\u304B\u3099\u3044",
        "\u305D\u3051\u3099\u304D",
        "\u305D\u3053\u3046",
        "\u305D\u3053\u305D\u3053",
        "\u305D\u3055\u3099\u3044",
        "\u305D\u3057\u306A",
        "\u305D\u305B\u3044",
        "\u305D\u305B\u3093",
        "\u305D\u305D\u304F\u3099",
        "\u305D\u305F\u3099\u3066\u308B",
        "\u305D\u3064\u3046",
        "\u305D\u3064\u3048\u3093",
        "\u305D\u3063\u304B\u3093",
        "\u305D\u3064\u304D\u3099\u3087\u3046",
        "\u305D\u3063\u3051\u3064",
        "\u305D\u3063\u3053\u3046",
        "\u305D\u3063\u305B\u3093",
        "\u305D\u3063\u3068",
        "\u305D\u3068\u304B\u3099\u308F",
        "\u305D\u3068\u3064\u3099\u3089",
        "\u305D\u306A\u3048\u308B",
        "\u305D\u306A\u305F",
        "\u305D\u3075\u307B\u3099",
        "\u305D\u307B\u3099\u304F",
        "\u305D\u307B\u3099\u308D",
        "\u305D\u307E\u3064",
        "\u305D\u307E\u308B",
        "\u305D\u3080\u304F",
        "\u305D\u3080\u308A\u3048",
        "\u305D\u3081\u308B",
        "\u305D\u3082\u305D\u3082",
        "\u305D\u3088\u304B\u305B\u3099",
        "\u305D\u3089\u307E\u3081",
        "\u305D\u308D\u3046",
        "\u305D\u3093\u304B\u3044",
        "\u305D\u3093\u3051\u3044",
        "\u305D\u3093\u3055\u3099\u3044",
        "\u305D\u3093\u3057\u3064",
        "\u305D\u3093\u305D\u3099\u304F",
        "\u305D\u3093\u3061\u3087\u3046",
        "\u305D\u3099\u3093\u3072\u3099",
        "\u305D\u3099\u3093\u3075\u3099\u3093",
        "\u305D\u3093\u307F\u3093",
        "\u305F\u3042\u3044",
        "\u305F\u3044\u3044\u3093",
        "\u305F\u3044\u3046\u3093",
        "\u305F\u3044\u3048\u304D",
        "\u305F\u3044\u304A\u3046",
        "\u305F\u3099\u3044\u304B\u3099\u304F",
        "\u305F\u3044\u304D",
        "\u305F\u3044\u304F\u3099\u3046",
        "\u305F\u3044\u3051\u3093",
        "\u305F\u3044\u3053",
        "\u305F\u3044\u3055\u3099\u3044",
        "\u305F\u3099\u3044\u3057\u3099\u3087\u3046\u3075\u3099",
        "\u305F\u3099\u3044\u3059\u304D",
        "\u305F\u3044\u305B\u3064",
        "\u305F\u3044\u305D\u3046",
        "\u305F\u3099\u3044\u305F\u3044",
        "\u305F\u3044\u3061\u3087\u3046",
        "\u305F\u3044\u3066\u3044",
        "\u305F\u3099\u3044\u3068\u3099\u3053\u308D",
        "\u305F\u3044\u306A\u3044",
        "\u305F\u3044\u306D\u3064",
        "\u305F\u3044\u306E\u3046",
        "\u305F\u3044\u306F\u3093",
        "\u305F\u3099\u3044\u3072\u3087\u3046",
        "\u305F\u3044\u3075\u3046",
        "\u305F\u3044\u3078\u3093",
        "\u305F\u3044\u307B",
        "\u305F\u3044\u307E\u3064\u306F\u3099\u306A",
        "\u305F\u3044\u307F\u3093\u304F\u3099",
        "\u305F\u3044\u3080",
        "\u305F\u3044\u3081\u3093",
        "\u305F\u3044\u3084\u304D",
        "\u305F\u3044\u3088\u3046",
        "\u305F\u3044\u3089",
        "\u305F\u3044\u308A\u3087\u304F",
        "\u305F\u3044\u308B",
        "\u305F\u3044\u308F\u3093",
        "\u305F\u3046\u3048",
        "\u305F\u3048\u308B",
        "\u305F\u304A\u3059",
        "\u305F\u304A\u308B",
        "\u305F\u304A\u308C\u308B",
        "\u305F\u304B\u3044",
        "\u305F\u304B\u306D",
        "\u305F\u304D\u3072\u3099",
        "\u305F\u304F\u3055\u3093",
        "\u305F\u3053\u304F",
        "\u305F\u3053\u3084\u304D",
        "\u305F\u3055\u3044",
        "\u305F\u3057\u3055\u3099\u3093",
        "\u305F\u3099\u3057\u3099\u3083\u308C",
        "\u305F\u3059\u3051\u308B",
        "\u305F\u3059\u3099\u3055\u308F\u308B",
        "\u305F\u305D\u304B\u3099\u308C",
        "\u305F\u305F\u304B\u3046",
        "\u305F\u305F\u304F",
        "\u305F\u305F\u3099\u3057\u3044",
        "\u305F\u305F\u307F",
        "\u305F\u3061\u306F\u3099\u306A",
        "\u305F\u3099\u3063\u304B\u3044",
        "\u305F\u3099\u3063\u304D\u3083\u304F",
        "\u305F\u3099\u3063\u3053",
        "\u305F\u3099\u3063\u3057\u3085\u3064",
        "\u305F\u3099\u3063\u305F\u3044",
        "\u305F\u3066\u308B",
        "\u305F\u3068\u3048\u308B",
        "\u305F\u306A\u306F\u3099\u305F",
        "\u305F\u306B\u3093",
        "\u305F\u306C\u304D",
        "\u305F\u306E\u3057\u307F",
        "\u305F\u306F\u3064",
        "\u305F\u3075\u3099\u3093",
        "\u305F\u3078\u3099\u308B",
        "\u305F\u307B\u3099\u3046",
        "\u305F\u307E\u3053\u3099",
        "\u305F\u307E\u308B",
        "\u305F\u3099\u3080\u308B",
        "\u305F\u3081\u3044\u304D",
        "\u305F\u3081\u3059",
        "\u305F\u3081\u308B",
        "\u305F\u3082\u3064",
        "\u305F\u3084\u3059\u3044",
        "\u305F\u3088\u308B",
        "\u305F\u3089\u3059",
        "\u305F\u308A\u304D\u307B\u3093\u304B\u3099\u3093",
        "\u305F\u308A\u3087\u3046",
        "\u305F\u308A\u308B",
        "\u305F\u308B\u3068",
        "\u305F\u308C\u308B",
        "\u305F\u308C\u3093\u3068",
        "\u305F\u308D\u3063\u3068",
        "\u305F\u308F\u3080\u308C\u308B",
        "\u305F\u3099\u3093\u3042\u3064",
        "\u305F\u3093\u3044",
        "\u305F\u3093\u304A\u3093",
        "\u305F\u3093\u304B",
        "\u305F\u3093\u304D",
        "\u305F\u3093\u3051\u3093",
        "\u305F\u3093\u3053\u3099",
        "\u305F\u3093\u3055\u3093",
        "\u305F\u3093\u3057\u3099\u3087\u3046\u3072\u3099",
        "\u305F\u3099\u3093\u305B\u3044",
        "\u305F\u3093\u305D\u304F",
        "\u305F\u3093\u305F\u3044",
        "\u305F\u3099\u3093\u3061",
        "\u305F\u3093\u3066\u3044",
        "\u305F\u3093\u3068\u3046",
        "\u305F\u3099\u3093\u306A",
        "\u305F\u3093\u306B\u3093",
        "\u305F\u3099\u3093\u306D\u3064",
        "\u305F\u3093\u306E\u3046",
        "\u305F\u3093\u3072\u309A\u3093",
        "\u305F\u3099\u3093\u307B\u3099\u3046",
        "\u305F\u3093\u307E\u3064",
        "\u305F\u3093\u3081\u3044",
        "\u305F\u3099\u3093\u308C\u3064",
        "\u305F\u3099\u3093\u308D",
        "\u305F\u3099\u3093\u308F",
        "\u3061\u3042\u3044",
        "\u3061\u3042\u3093",
        "\u3061\u3044\u304D",
        "\u3061\u3044\u3055\u3044",
        "\u3061\u3048\u3093",
        "\u3061\u304B\u3044",
        "\u3061\u304B\u3089",
        "\u3061\u304D\u3085\u3046",
        "\u3061\u304D\u3093",
        "\u3061\u3051\u3044\u3059\u3099",
        "\u3061\u3051\u3093",
        "\u3061\u3053\u304F",
        "\u3061\u3055\u3044",
        "\u3061\u3057\u304D",
        "\u3061\u3057\u308A\u3087\u3046",
        "\u3061\u305B\u3044",
        "\u3061\u305D\u3046",
        "\u3061\u305F\u3044",
        "\u3061\u305F\u3093",
        "\u3061\u3061\u304A\u3084",
        "\u3061\u3064\u3057\u3099\u3087",
        "\u3061\u3066\u304D",
        "\u3061\u3066\u3093",
        "\u3061\u306C\u304D",
        "\u3061\u306C\u308A",
        "\u3061\u306E\u3046",
        "\u3061\u3072\u3087\u3046",
        "\u3061\u3078\u3044\u305B\u3093",
        "\u3061\u307B\u3046",
        "\u3061\u307E\u305F",
        "\u3061\u307F\u3064",
        "\u3061\u307F\u3068\u3099\u308D",
        "\u3061\u3081\u3044\u3068\u3099",
        "\u3061\u3083\u3093\u3053\u306A\u3078\u3099",
        "\u3061\u3085\u3046\u3044",
        "\u3061\u3086\u308A\u3087\u304F",
        "\u3061\u3087\u3046\u3057",
        "\u3061\u3087\u3055\u304F\u3051\u3093",
        "\u3061\u3089\u3057",
        "\u3061\u3089\u307F",
        "\u3061\u308A\u304B\u3099\u307F",
        "\u3061\u308A\u3087\u3046",
        "\u3061\u308B\u3068\u3099",
        "\u3061\u308F\u308F",
        "\u3061\u3093\u305F\u3044",
        "\u3061\u3093\u3082\u304F",
        "\u3064\u3044\u304B",
        "\u3064\u3044\u305F\u3061",
        "\u3064\u3046\u304B",
        "\u3064\u3046\u3057\u3099\u3087\u3046",
        "\u3064\u3046\u306F\u3093",
        "\u3064\u3046\u308F",
        "\u3064\u304B\u3046",
        "\u3064\u304B\u308C\u308B",
        "\u3064\u304F\u306D",
        "\u3064\u304F\u308B",
        "\u3064\u3051\u306D",
        "\u3064\u3051\u308B",
        "\u3064\u3053\u3099\u3046",
        "\u3064\u305F\u3048\u308B",
        "\u3064\u3064\u3099\u304F",
        "\u3064\u3064\u3057\u3099",
        "\u3064\u3064\u3080",
        "\u3064\u3068\u3081\u308B",
        "\u3064\u306A\u304B\u3099\u308B",
        "\u3064\u306A\u307F",
        "\u3064\u306D\u3064\u3099\u306D",
        "\u3064\u306E\u308B",
        "\u3064\u3075\u3099\u3059",
        "\u3064\u307E\u3089\u306A\u3044",
        "\u3064\u307E\u308B",
        "\u3064\u307F\u304D",
        "\u3064\u3081\u305F\u3044",
        "\u3064\u3082\u308A",
        "\u3064\u3082\u308B",
        "\u3064\u3088\u3044",
        "\u3064\u308B\u307B\u3099",
        "\u3064\u308B\u307F\u304F",
        "\u3064\u308F\u3082\u306E",
        "\u3064\u308F\u308A",
        "\u3066\u3042\u3057",
        "\u3066\u3042\u3066",
        "\u3066\u3042\u307F",
        "\u3066\u3044\u304A\u3093",
        "\u3066\u3044\u304B",
        "\u3066\u3044\u304D",
        "\u3066\u3044\u3051\u3044",
        "\u3066\u3044\u3053\u304F",
        "\u3066\u3044\u3055\u3064",
        "\u3066\u3044\u3057",
        "\u3066\u3044\u305B\u3044",
        "\u3066\u3044\u305F\u3044",
        "\u3066\u3044\u3068\u3099",
        "\u3066\u3044\u306D\u3044",
        "\u3066\u3044\u3072\u3087\u3046",
        "\u3066\u3044\u3078\u3093",
        "\u3066\u3044\u307B\u3099\u3046",
        "\u3066\u3046\u3061",
        "\u3066\u304A\u304F\u308C",
        "\u3066\u304D\u3068\u3046",
        "\u3066\u304F\u3072\u3099",
        "\u3066\u3099\u3053\u307B\u3099\u3053",
        "\u3066\u3055\u304D\u3099\u3087\u3046",
        "\u3066\u3055\u3051\u3099",
        "\u3066\u3059\u308A",
        "\u3066\u305D\u3046",
        "\u3066\u3061\u304B\u3099\u3044",
        "\u3066\u3061\u3087\u3046",
        "\u3066\u3064\u304B\u3099\u304F",
        "\u3066\u3064\u3064\u3099\u304D",
        "\u3066\u3099\u3063\u306F\u309A",
        "\u3066\u3064\u307B\u3099\u3046",
        "\u3066\u3064\u3084",
        "\u3066\u3099\u306C\u304B\u3048",
        "\u3066\u306C\u304D",
        "\u3066\u306C\u304F\u3099\u3044",
        "\u3066\u306E\u3072\u3089",
        "\u3066\u306F\u3044",
        "\u3066\u3075\u3099\u304F\u308D",
        "\u3066\u3075\u305F\u3099",
        "\u3066\u307B\u3068\u3099\u304D",
        "\u3066\u307B\u3093",
        "\u3066\u307E\u3048",
        "\u3066\u307E\u304D\u3059\u3099\u3057",
        "\u3066\u307F\u3057\u3099\u304B",
        "\u3066\u307F\u3084\u3051\u3099",
        "\u3066\u3089\u3059",
        "\u3066\u308C\u3072\u3099",
        "\u3066\u308F\u3051",
        "\u3066\u308F\u305F\u3057",
        "\u3066\u3099\u3093\u3042\u3064",
        "\u3066\u3093\u3044\u3093",
        "\u3066\u3093\u304B\u3044",
        "\u3066\u3093\u304D",
        "\u3066\u3093\u304F\u3099",
        "\u3066\u3093\u3051\u3093",
        "\u3066\u3093\u3053\u3099\u304F",
        "\u3066\u3093\u3055\u3044",
        "\u3066\u3093\u3057",
        "\u3066\u3093\u3059\u3046",
        "\u3066\u3099\u3093\u3061",
        "\u3066\u3093\u3066\u304D",
        "\u3066\u3093\u3068\u3046",
        "\u3066\u3093\u306A\u3044",
        "\u3066\u3093\u3075\u309A\u3089",
        "\u3066\u3093\u307B\u3099\u3046\u305F\u3099\u3044",
        "\u3066\u3093\u3081\u3064",
        "\u3066\u3093\u3089\u3093\u304B\u3044",
        "\u3066\u3099\u3093\u308A\u3087\u304F",
        "\u3066\u3099\u3093\u308F",
        "\u3068\u3099\u3042\u3044",
        "\u3068\u3044\u308C",
        "\u3068\u3099\u3046\u304B\u3093",
        "\u3068\u3046\u304D\u3085\u3046",
        "\u3068\u3099\u3046\u304F\u3099",
        "\u3068\u3046\u3057",
        "\u3068\u3046\u3080\u304D\u3099",
        "\u3068\u304A\u3044",
        "\u3068\u304A\u304B",
        "\u3068\u304A\u304F",
        "\u3068\u304A\u3059",
        "\u3068\u304A\u308B",
        "\u3068\u304B\u3044",
        "\u3068\u304B\u3059",
        "\u3068\u304D\u304A\u308A",
        "\u3068\u304D\u3068\u3099\u304D",
        "\u3068\u304F\u3044",
        "\u3068\u304F\u3057\u3085\u3046",
        "\u3068\u304F\u3066\u3093",
        "\u3068\u304F\u306B",
        "\u3068\u304F\u3078\u3099\u3064",
        "\u3068\u3051\u3044",
        "\u3068\u3051\u308B",
        "\u3068\u3053\u3084",
        "\u3068\u3055\u304B",
        "\u3068\u3057\u3087\u304B\u3093",
        "\u3068\u305D\u3046",
        "\u3068\u305F\u3093",
        "\u3068\u3061\u3085\u3046",
        "\u3068\u3063\u304D\u3085\u3046",
        "\u3068\u3063\u304F\u3093",
        "\u3068\u3064\u305B\u3099\u3093",
        "\u3068\u3064\u306B\u3085\u3046",
        "\u3068\u3068\u3099\u3051\u308B",
        "\u3068\u3068\u306E\u3048\u308B",
        "\u3068\u306A\u3044",
        "\u3068\u306A\u3048\u308B",
        "\u3068\u306A\u308A",
        "\u3068\u306E\u3055\u307E",
        "\u3068\u306F\u3099\u3059",
        "\u3068\u3099\u3075\u3099\u304B\u3099\u308F",
        "\u3068\u307B\u3046",
        "\u3068\u307E\u308B",
        "\u3068\u3081\u308B",
        "\u3068\u3082\u305F\u3099\u3061",
        "\u3068\u3082\u308B",
        "\u3068\u3099\u3088\u3046\u3072\u3099",
        "\u3068\u3089\u3048\u308B",
        "\u3068\u3093\u304B\u3064",
        "\u3068\u3099\u3093\u3075\u3099\u308A",
        "\u306A\u3044\u304B\u304F",
        "\u306A\u3044\u3053\u3046",
        "\u306A\u3044\u3057\u3087",
        "\u306A\u3044\u3059",
        "\u306A\u3044\u305B\u3093",
        "\u306A\u3044\u305D\u3046",
        "\u306A\u304A\u3059",
        "\u306A\u304B\u3099\u3044",
        "\u306A\u304F\u3059",
        "\u306A\u3051\u3099\u308B",
        "\u306A\u3053\u3046\u3068\u3099",
        "\u306A\u3055\u3051",
        "\u306A\u305F\u3066\u3099\u3053\u3053",
        "\u306A\u3063\u3068\u3046",
        "\u306A\u3064\u3084\u3059\u307F",
        "\u306A\u306A\u304A\u3057",
        "\u306A\u306B\u3053\u3099\u3068",
        "\u306A\u306B\u3082\u306E",
        "\u306A\u306B\u308F",
        "\u306A\u306E\u304B",
        "\u306A\u3075\u305F\u3099",
        "\u306A\u307E\u3044\u304D",
        "\u306A\u307E\u3048",
        "\u306A\u307E\u307F",
        "\u306A\u307F\u305F\u3099",
        "\u306A\u3081\u3089\u304B",
        "\u306A\u3081\u308B",
        "\u306A\u3084\u3080",
        "\u306A\u3089\u3046",
        "\u306A\u3089\u3072\u3099",
        "\u306A\u3089\u3075\u3099",
        "\u306A\u308C\u308B",
        "\u306A\u308F\u3068\u3072\u3099",
        "\u306A\u308F\u306F\u3099\u308A",
        "\u306B\u3042\u3046",
        "\u306B\u3044\u304B\u3099\u305F",
        "\u306B\u3046\u3051",
        "\u306B\u304A\u3044",
        "\u306B\u304B\u3044",
        "\u306B\u304B\u3099\u3066",
        "\u306B\u304D\u3072\u3099",
        "\u306B\u304F\u3057\u307F",
        "\u306B\u304F\u307E\u3093",
        "\u306B\u3051\u3099\u308B",
        "\u306B\u3055\u3093\u304B\u305F\u3093\u305D",
        "\u306B\u3057\u304D",
        "\u306B\u305B\u3082\u306E",
        "\u306B\u3061\u3057\u3099\u3087\u3046",
        "\u306B\u3061\u3088\u3046\u3072\u3099",
        "\u306B\u3063\u304B",
        "\u306B\u3063\u304D",
        "\u306B\u3063\u3051\u3044",
        "\u306B\u3063\u3053\u3046",
        "\u306B\u3063\u3055\u3093",
        "\u306B\u3063\u3057\u3087\u304F",
        "\u306B\u3063\u3059\u3046",
        "\u306B\u3063\u305B\u304D",
        "\u306B\u3063\u3066\u3044",
        "\u306B\u306A\u3046",
        "\u306B\u307B\u3093",
        "\u306B\u307E\u3081",
        "\u306B\u3082\u3064",
        "\u306B\u3084\u308A",
        "\u306B\u3085\u3046\u3044\u3093",
        "\u306B\u308A\u3093\u3057\u3083",
        "\u306B\u308F\u3068\u308A",
        "\u306B\u3093\u3044",
        "\u306B\u3093\u304B",
        "\u306B\u3093\u304D",
        "\u306B\u3093\u3051\u3099\u3093",
        "\u306B\u3093\u3057\u304D",
        "\u306B\u3093\u3059\u3099\u3046",
        "\u306B\u3093\u305D\u3046",
        "\u306B\u3093\u305F\u3044",
        "\u306B\u3093\u3061",
        "\u306B\u3093\u3066\u3044",
        "\u306B\u3093\u306B\u304F",
        "\u306B\u3093\u3075\u309A",
        "\u306B\u3093\u307E\u308A",
        "\u306B\u3093\u3080",
        "\u306B\u3093\u3081\u3044",
        "\u306B\u3093\u3088\u3046",
        "\u306C\u3044\u304F\u304D\u3099",
        "\u306C\u304B\u3059",
        "\u306C\u304F\u3099\u3044\u3068\u308B",
        "\u306C\u304F\u3099\u3046",
        "\u306C\u304F\u3082\u308A",
        "\u306C\u3059\u3080",
        "\u306C\u307E\u3048\u3072\u3099",
        "\u306C\u3081\u308A",
        "\u306C\u3089\u3059",
        "\u306C\u3093\u3061\u3083\u304F",
        "\u306D\u3042\u3051\u3099",
        "\u306D\u3044\u304D",
        "\u306D\u3044\u308B",
        "\u306D\u3044\u308D",
        "\u306D\u304F\u3099\u305B",
        "\u306D\u304F\u305F\u3044",
        "\u306D\u304F\u3089",
        "\u306D\u3053\u305B\u3099",
        "\u306D\u3053\u3080",
        "\u306D\u3055\u3051\u3099",
        "\u306D\u3059\u3053\u3099\u3059",
        "\u306D\u305D\u3078\u3099\u308B",
        "\u306D\u305F\u3099\u3093",
        "\u306D\u3064\u3044",
        "\u306D\u3063\u3057\u3093",
        "\u306D\u3064\u305D\u3099\u3046",
        "\u306D\u3063\u305F\u3044\u304D\u3099\u3087",
        "\u306D\u3075\u3099\u305D\u304F",
        "\u306D\u3075\u305F\u3099",
        "\u306D\u307B\u3099\u3046",
        "\u306D\u307B\u308A\u306F\u307B\u308A",
        "\u306D\u307E\u304D",
        "\u306D\u307E\u308F\u3057",
        "\u306D\u307F\u307F",
        "\u306D\u3080\u3044",
        "\u306D\u3080\u305F\u3044",
        "\u306D\u3082\u3068",
        "\u306D\u3089\u3046",
        "\u306D\u308F\u3055\u3099",
        "\u306D\u3093\u3044\u308A",
        "\u306D\u3093\u304A\u3057",
        "\u306D\u3093\u304B\u3093",
        "\u306D\u3093\u304D\u3093",
        "\u306D\u3093\u304F\u3099",
        "\u306D\u3093\u3055\u3099",
        "\u306D\u3093\u3057",
        "\u306D\u3093\u3061\u3083\u304F",
        "\u306D\u3093\u3068\u3099",
        "\u306D\u3093\u3072\u309A",
        "\u306D\u3093\u3075\u3099\u3064",
        "\u306D\u3093\u307E\u3064",
        "\u306D\u3093\u308A\u3087\u3046",
        "\u306D\u3093\u308C\u3044",
        "\u306E\u3044\u3059\u3099",
        "\u306E\u304A\u3064\u3099\u307E",
        "\u306E\u304B\u3099\u3059",
        "\u306E\u304D\u306A\u307F",
        "\u306E\u3053\u304D\u3099\u308A",
        "\u306E\u3053\u3059",
        "\u306E\u3053\u308B",
        "\u306E\u305B\u308B",
        "\u306E\u305D\u3099\u304F",
        "\u306E\u305D\u3099\u3080",
        "\u306E\u305F\u307E\u3046",
        "\u306E\u3061\u307B\u3068\u3099",
        "\u306E\u3063\u304F",
        "\u306E\u306F\u3099\u3059",
        "\u306E\u306F\u3089",
        "\u306E\u3078\u3099\u308B",
        "\u306E\u307B\u3099\u308B",
        "\u306E\u307F\u3082\u306E",
        "\u306E\u3084\u307E",
        "\u306E\u3089\u3044\u306C",
        "\u306E\u3089\u306D\u3053",
        "\u306E\u308A\u3082\u306E",
        "\u306E\u308A\u3086\u304D",
        "\u306E\u308C\u3093",
        "\u306E\u3093\u304D",
        "\u306F\u3099\u3042\u3044",
        "\u306F\u3042\u304F",
        "\u306F\u3099\u3042\u3055\u3093",
        "\u306F\u3099\u3044\u304B",
        "\u306F\u3099\u3044\u304F",
        "\u306F\u3044\u3051\u3093",
        "\u306F\u3044\u3053\u3099",
        "\u306F\u3044\u3057\u3093",
        "\u306F\u3044\u3059\u3044",
        "\u306F\u3044\u305B\u3093",
        "\u306F\u3044\u305D\u3046",
        "\u306F\u3044\u3061",
        "\u306F\u3099\u3044\u306F\u3099\u3044",
        "\u306F\u3044\u308C\u3064",
        "\u306F\u3048\u308B",
        "\u306F\u304A\u308B",
        "\u306F\u304B\u3044",
        "\u306F\u3099\u304B\u308A",
        "\u306F\u304B\u308B",
        "\u306F\u304F\u3057\u3085",
        "\u306F\u3051\u3093",
        "\u306F\u3053\u3075\u3099",
        "\u306F\u3055\u307F",
        "\u306F\u3055\u3093",
        "\u306F\u3057\u3053\u3099",
        "\u306F\u3099\u3057\u3087",
        "\u306F\u3057\u308B",
        "\u306F\u305B\u308B",
        "\u306F\u309A\u305D\u3053\u3093",
        "\u306F\u305D\u3093",
        "\u306F\u305F\u3093",
        "\u306F\u3061\u307F\u3064",
        "\u306F\u3064\u304A\u3093",
        "\u306F\u3063\u304B\u304F",
        "\u306F\u3064\u3099\u304D",
        "\u306F\u3063\u304D\u308A",
        "\u306F\u3063\u304F\u3064",
        "\u306F\u3063\u3051\u3093",
        "\u306F\u3063\u3053\u3046",
        "\u306F\u3063\u3055\u3093",
        "\u306F\u3063\u3057\u3093",
        "\u306F\u3063\u305F\u3064",
        "\u306F\u3063\u3061\u3085\u3046",
        "\u306F\u3063\u3066\u3093",
        "\u306F\u3063\u3072\u309A\u3087\u3046",
        "\u306F\u3063\u307B\u309A\u3046",
        "\u306F\u306A\u3059",
        "\u306F\u306A\u3072\u3099",
        "\u306F\u306B\u304B\u3080",
        "\u306F\u3075\u3099\u3089\u3057",
        "\u306F\u307F\u304B\u3099\u304D",
        "\u306F\u3080\u304B\u3046",
        "\u306F\u3081\u3064",
        "\u306F\u3084\u3044",
        "\u306F\u3084\u3057",
        "\u306F\u3089\u3046",
        "\u306F\u308D\u3046\u3043\u3093",
        "\u306F\u308F\u3044",
        "\u306F\u3093\u3044",
        "\u306F\u3093\u3048\u3044",
        "\u306F\u3093\u304A\u3093",
        "\u306F\u3093\u304B\u304F",
        "\u306F\u3093\u304D\u3087\u3046",
        "\u306F\u3099\u3093\u304F\u3099\u307F",
        "\u306F\u3093\u3053",
        "\u306F\u3093\u3057\u3083",
        "\u306F\u3093\u3059\u3046",
        "\u306F\u3093\u305F\u3099\u3093",
        "\u306F\u309A\u3093\u3061",
        "\u306F\u309A\u3093\u3064",
        "\u306F\u3093\u3066\u3044",
        "\u306F\u3093\u3068\u3057",
        "\u306F\u3093\u306E\u3046",
        "\u306F\u3093\u306F\u309A",
        "\u306F\u3093\u3075\u3099\u3093",
        "\u306F\u3093\u3078\u309A\u3093",
        "\u306F\u3093\u307B\u3099\u3046\u304D",
        "\u306F\u3093\u3081\u3044",
        "\u306F\u3093\u3089\u3093",
        "\u306F\u3093\u308D\u3093",
        "\u3072\u3044\u304D",
        "\u3072\u3046\u3093",
        "\u3072\u3048\u308B",
        "\u3072\u304B\u304F",
        "\u3072\u304B\u308A",
        "\u3072\u304B\u308B",
        "\u3072\u304B\u3093",
        "\u3072\u304F\u3044",
        "\u3072\u3051\u3064",
        "\u3072\u3053\u3046\u304D",
        "\u3072\u3053\u304F",
        "\u3072\u3055\u3044",
        "\u3072\u3055\u3057\u3075\u3099\u308A",
        "\u3072\u3055\u3093",
        "\u3072\u3099\u3057\u3099\u3085\u3064\u304B\u3093",
        "\u3072\u3057\u3087",
        "\u3072\u305D\u304B",
        "\u3072\u305D\u3080",
        "\u3072\u305F\u3080\u304D",
        "\u3072\u305F\u3099\u308A",
        "\u3072\u305F\u308B",
        "\u3072\u3064\u304D\u3099",
        "\u3072\u3063\u3053\u3057",
        "\u3072\u3063\u3057",
        "\u3072\u3064\u3057\u3099\u3085\u3072\u3093",
        "\u3072\u3063\u3059",
        "\u3072\u3064\u305B\u3099\u3093",
        "\u3072\u309A\u3063\u305F\u308A",
        "\u3072\u309A\u3063\u3061\u308A",
        "\u3072\u3064\u3088\u3046",
        "\u3072\u3066\u3044",
        "\u3072\u3068\u3053\u3099\u307F",
        "\u3072\u306A\u307E\u3064\u308A",
        "\u3072\u306A\u3093",
        "\u3072\u306D\u308B",
        "\u3072\u306F\u3093",
        "\u3072\u3072\u3099\u304F",
        "\u3072\u3072\u3087\u3046",
        "\u3072\u307B\u3046",
        "\u3072\u307E\u308F\u308A",
        "\u3072\u307E\u3093",
        "\u3072\u307F\u3064",
        "\u3072\u3081\u3044",
        "\u3072\u3081\u3057\u3099\u3057",
        "\u3072\u3084\u3051",
        "\u3072\u3084\u3059",
        "\u3072\u3088\u3046",
        "\u3072\u3099\u3087\u3046\u304D",
        "\u3072\u3089\u304B\u3099\u306A",
        "\u3072\u3089\u304F",
        "\u3072\u308A\u3064",
        "\u3072\u308A\u3087\u3046",
        "\u3072\u308B\u307E",
        "\u3072\u308B\u3084\u3059\u307F",
        "\u3072\u308C\u3044",
        "\u3072\u308D\u3044",
        "\u3072\u308D\u3046",
        "\u3072\u308D\u304D",
        "\u3072\u308D\u3086\u304D",
        "\u3072\u3093\u304B\u304F",
        "\u3072\u3093\u3051\u3064",
        "\u3072\u3093\u3053\u3093",
        "\u3072\u3093\u3057\u3085",
        "\u3072\u3093\u305D\u3046",
        "\u3072\u309A\u3093\u3061",
        "\u3072\u3093\u306F\u309A\u3093",
        "\u3072\u3099\u3093\u307B\u3099\u3046",
        "\u3075\u3042\u3093",
        "\u3075\u3044\u3046\u3061",
        "\u3075\u3046\u3051\u3044",
        "\u3075\u3046\u305B\u3093",
        "\u3075\u309A\u3046\u305F\u308D\u3046",
        "\u3075\u3046\u3068\u3046",
        "\u3075\u3046\u3075",
        "\u3075\u3048\u308B",
        "\u3075\u304A\u3093",
        "\u3075\u304B\u3044",
        "\u3075\u304D\u3093",
        "\u3075\u304F\u3055\u3099\u3064",
        "\u3075\u304F\u3075\u3099\u304F\u308D",
        "\u3075\u3053\u3046",
        "\u3075\u3055\u3044",
        "\u3075\u3057\u304D\u3099",
        "\u3075\u3057\u3099\u307F",
        "\u3075\u3059\u307E",
        "\u3075\u305B\u3044",
        "\u3075\u305B\u304F\u3099",
        "\u3075\u305D\u304F",
        "\u3075\u3099\u305F\u306B\u304F",
        "\u3075\u305F\u3093",
        "\u3075\u3061\u3087\u3046",
        "\u3075\u3064\u3046",
        "\u3075\u3064\u304B",
        "\u3075\u3063\u304B\u3064",
        "\u3075\u3063\u304D",
        "\u3075\u3063\u3053\u304F",
        "\u3075\u3099\u3068\u3099\u3046",
        "\u3075\u3068\u308B",
        "\u3075\u3068\u3093",
        "\u3075\u306E\u3046",
        "\u3075\u306F\u3044",
        "\u3075\u3072\u3087\u3046",
        "\u3075\u3078\u3093",
        "\u3075\u307E\u3093",
        "\u3075\u307F\u3093",
        "\u3075\u3081\u3064",
        "\u3075\u3081\u3093",
        "\u3075\u3088\u3046",
        "\u3075\u308A\u3053",
        "\u3075\u308A\u308B",
        "\u3075\u308B\u3044",
        "\u3075\u3093\u3044\u304D",
        "\u3075\u3099\u3093\u304B\u3099\u304F",
        "\u3075\u3099\u3093\u304F\u3099",
        "\u3075\u3093\u3057\u3064",
        "\u3075\u3099\u3093\u305B\u304D",
        "\u3075\u3093\u305D\u3046",
        "\u3075\u3099\u3093\u307B\u309A\u3046",
        "\u3078\u3044\u3042\u3093",
        "\u3078\u3044\u304A\u3093",
        "\u3078\u3044\u304B\u3099\u3044",
        "\u3078\u3044\u304D",
        "\u3078\u3044\u3051\u3099\u3093",
        "\u3078\u3044\u3053\u3046",
        "\u3078\u3044\u3055",
        "\u3078\u3044\u3057\u3083",
        "\u3078\u3044\u305B\u3064",
        "\u3078\u3044\u305D",
        "\u3078\u3044\u305F\u304F",
        "\u3078\u3044\u3066\u3093",
        "\u3078\u3044\u306D\u3064",
        "\u3078\u3044\u308F",
        "\u3078\u304D\u304B\u3099",
        "\u3078\u3053\u3080",
        "\u3078\u3099\u306B\u3044\u308D",
        "\u3078\u3099\u306B\u3057\u3087\u3046\u304B\u3099",
        "\u3078\u3089\u3059",
        "\u3078\u3093\u304B\u3093",
        "\u3078\u3099\u3093\u304D\u3087\u3046",
        "\u3078\u3099\u3093\u3053\u3099\u3057",
        "\u3078\u3093\u3055\u3044",
        "\u3078\u3093\u305F\u3044",
        "\u3078\u3099\u3093\u308A",
        "\u307B\u3042\u3093",
        "\u307B\u3044\u304F",
        "\u307B\u3099\u3046\u304D\u3099\u3087",
        "\u307B\u3046\u3053\u304F",
        "\u307B\u3046\u305D\u3046",
        "\u307B\u3046\u307B\u3046",
        "\u307B\u3046\u3082\u3093",
        "\u307B\u3046\u308A\u3064",
        "\u307B\u3048\u308B",
        "\u307B\u304A\u3093",
        "\u307B\u304B\u3093",
        "\u307B\u304D\u3087\u3046",
        "\u307B\u3099\u304D\u3093",
        "\u307B\u304F\u308D",
        "\u307B\u3051\u3064",
        "\u307B\u3051\u3093",
        "\u307B\u3053\u3046",
        "\u307B\u3053\u308B",
        "\u307B\u3057\u3044",
        "\u307B\u3057\u3064",
        "\u307B\u3057\u3085",
        "\u307B\u3057\u3087\u3046",
        "\u307B\u305B\u3044",
        "\u307B\u305D\u3044",
        "\u307B\u305D\u304F",
        "\u307B\u305F\u3066",
        "\u307B\u305F\u308B",
        "\u307B\u309A\u3061\u3075\u3099\u304F\u308D",
        "\u307B\u3063\u304D\u3087\u304F",
        "\u307B\u3063\u3055",
        "\u307B\u3063\u305F\u3093",
        "\u307B\u3068\u3093\u3068\u3099",
        "\u307B\u3081\u308B",
        "\u307B\u3093\u3044",
        "\u307B\u3093\u304D",
        "\u307B\u3093\u3051",
        "\u307B\u3093\u3057\u3064",
        "\u307B\u3093\u3084\u304F",
        "\u307E\u3044\u306B\u3061",
        "\u307E\u304B\u3044",
        "\u307E\u304B\u305B\u308B",
        "\u307E\u304B\u3099\u308B",
        "\u307E\u3051\u308B",
        "\u307E\u3053\u3068",
        "\u307E\u3055\u3064",
        "\u307E\u3057\u3099\u3081",
        "\u307E\u3059\u304F",
        "\u307E\u305B\u3099\u308B",
        "\u307E\u3064\u308A",
        "\u307E\u3068\u3081",
        "\u307E\u306A\u3075\u3099",
        "\u307E\u306C\u3051",
        "\u307E\u306D\u304F",
        "\u307E\u307B\u3046",
        "\u307E\u3082\u308B",
        "\u307E\u3086\u3051\u3099",
        "\u307E\u3088\u3046",
        "\u307E\u308D\u3084\u304B",
        "\u307E\u308F\u3059",
        "\u307E\u308F\u308A",
        "\u307E\u308F\u308B",
        "\u307E\u3093\u304B\u3099",
        "\u307E\u3093\u304D\u3064",
        "\u307E\u3093\u305D\u3099\u304F",
        "\u307E\u3093\u306A\u304B",
        "\u307F\u3044\u3089",
        "\u307F\u3046\u3061",
        "\u307F\u3048\u308B",
        "\u307F\u304B\u3099\u304F",
        "\u307F\u304B\u305F",
        "\u307F\u304B\u3093",
        "\u307F\u3051\u3093",
        "\u307F\u3053\u3093",
        "\u307F\u3057\u3099\u304B\u3044",
        "\u307F\u3059\u3044",
        "\u307F\u3059\u3048\u308B",
        "\u307F\u305B\u308B",
        "\u307F\u3063\u304B",
        "\u307F\u3064\u304B\u308B",
        "\u307F\u3064\u3051\u308B",
        "\u307F\u3066\u3044",
        "\u307F\u3068\u3081\u308B",
        "\u307F\u306A\u3068",
        "\u307F\u306A\u307F\u304B\u3055\u3044",
        "\u307F\u306D\u3089\u308B",
        "\u307F\u306E\u3046",
        "\u307F\u306E\u304B\u3099\u3059",
        "\u307F\u307B\u3093",
        "\u307F\u3082\u3068",
        "\u307F\u3084\u3051\u3099",
        "\u307F\u3089\u3044",
        "\u307F\u308A\u3087\u304F",
        "\u307F\u308F\u304F",
        "\u307F\u3093\u304B",
        "\u307F\u3093\u305D\u3099\u304F",
        "\u3080\u3044\u304B",
        "\u3080\u3048\u304D",
        "\u3080\u3048\u3093",
        "\u3080\u304B\u3044",
        "\u3080\u304B\u3046",
        "\u3080\u304B\u3048",
        "\u3080\u304B\u3057",
        "\u3080\u304D\u3099\u3061\u3083",
        "\u3080\u3051\u308B",
        "\u3080\u3051\u3099\u3093",
        "\u3080\u3055\u307B\u3099\u308B",
        "\u3080\u3057\u3042\u3064\u3044",
        "\u3080\u3057\u306F\u3099",
        "\u3080\u3057\u3099\u3085\u3093",
        "\u3080\u3057\u308D",
        "\u3080\u3059\u3046",
        "\u3080\u3059\u3053",
        "\u3080\u3059\u3075\u3099",
        "\u3080\u3059\u3081",
        "\u3080\u305B\u308B",
        "\u3080\u305B\u3093",
        "\u3080\u3061\u3085\u3046",
        "\u3080\u306A\u3057\u3044",
        "\u3080\u306E\u3046",
        "\u3080\u3084\u307F",
        "\u3080\u3088\u3046",
        "\u3080\u3089\u3055\u304D",
        "\u3080\u308A\u3087\u3046",
        "\u3080\u308D\u3093",
        "\u3081\u3044\u3042\u3093",
        "\u3081\u3044\u3046\u3093",
        "\u3081\u3044\u3048\u3093",
        "\u3081\u3044\u304B\u304F",
        "\u3081\u3044\u304D\u3087\u304F",
        "\u3081\u3044\u3055\u3044",
        "\u3081\u3044\u3057",
        "\u3081\u3044\u305D\u3046",
        "\u3081\u3044\u3075\u3099\u3064",
        "\u3081\u3044\u308C\u3044",
        "\u3081\u3044\u308F\u304F",
        "\u3081\u304F\u3099\u307E\u308C\u308B",
        "\u3081\u3055\u3099\u3059",
        "\u3081\u3057\u305F",
        "\u3081\u3059\u3099\u3089\u3057\u3044",
        "\u3081\u305F\u3099\u3064",
        "\u3081\u307E\u3044",
        "\u3081\u3084\u3059",
        "\u3081\u3093\u304D\u3087",
        "\u3081\u3093\u305B\u304D",
        "\u3081\u3093\u3068\u3099\u3046",
        "\u3082\u3046\u3057\u3042\u3051\u3099\u308B",
        "\u3082\u3046\u3068\u3099\u3046\u3051\u3093",
        "\u3082\u3048\u308B",
        "\u3082\u304F\u3057",
        "\u3082\u304F\u3066\u304D",
        "\u3082\u304F\u3088\u3046\u3072\u3099",
        "\u3082\u3061\u308D\u3093",
        "\u3082\u3068\u3099\u308B",
        "\u3082\u3089\u3046",
        "\u3082\u3093\u304F",
        "\u3082\u3093\u305F\u3099\u3044",
        "\u3084\u304A\u3084",
        "\u3084\u3051\u308B",
        "\u3084\u3055\u3044",
        "\u3084\u3055\u3057\u3044",
        "\u3084\u3059\u3044",
        "\u3084\u3059\u305F\u308D\u3046",
        "\u3084\u3059\u307F",
        "\u3084\u305B\u308B",
        "\u3084\u305D\u3046",
        "\u3084\u305F\u3044",
        "\u3084\u3061\u3093",
        "\u3084\u3063\u3068",
        "\u3084\u3063\u306F\u309A\u308A",
        "\u3084\u3075\u3099\u308B",
        "\u3084\u3081\u308B",
        "\u3084\u3084\u3053\u3057\u3044",
        "\u3084\u3088\u3044",
        "\u3084\u308F\u3089\u304B\u3044",
        "\u3086\u3046\u304D",
        "\u3086\u3046\u3072\u3099\u3093\u304D\u3087\u304F",
        "\u3086\u3046\u3078\u3099",
        "\u3086\u3046\u3081\u3044",
        "\u3086\u3051\u3064",
        "\u3086\u3057\u3085\u3064",
        "\u3086\u305B\u3093",
        "\u3086\u305D\u3046",
        "\u3086\u305F\u304B",
        "\u3086\u3061\u3083\u304F",
        "\u3086\u3066\u3099\u308B",
        "\u3086\u306B\u3085\u3046",
        "\u3086\u3072\u3099\u308F",
        "\u3086\u3089\u3044",
        "\u3086\u308C\u308B",
        "\u3088\u3046\u3044",
        "\u3088\u3046\u304B",
        "\u3088\u3046\u304D\u3085\u3046",
        "\u3088\u3046\u3057\u3099",
        "\u3088\u3046\u3059",
        "\u3088\u3046\u3061\u3048\u3093",
        "\u3088\u304B\u305B\u3099",
        "\u3088\u304B\u3093",
        "\u3088\u304D\u3093",
        "\u3088\u304F\u305B\u3044",
        "\u3088\u304F\u307B\u3099\u3046",
        "\u3088\u3051\u3044",
        "\u3088\u3053\u3099\u308C\u308B",
        "\u3088\u3055\u3093",
        "\u3088\u3057\u3085\u3046",
        "\u3088\u305D\u3046",
        "\u3088\u305D\u304F",
        "\u3088\u3063\u304B",
        "\u3088\u3066\u3044",
        "\u3088\u3068\u3099\u304B\u3099\u308F\u304F",
        "\u3088\u306D\u3064",
        "\u3088\u3084\u304F",
        "\u3088\u3086\u3046",
        "\u3088\u308D\u3053\u3075\u3099",
        "\u3088\u308D\u3057\u3044",
        "\u3089\u3044\u3046",
        "\u3089\u304F\u304B\u3099\u304D",
        "\u3089\u304F\u3053\u3099",
        "\u3089\u304F\u3055\u3064",
        "\u3089\u304F\u305F\u3099",
        "\u3089\u3057\u3093\u306F\u3099\u3093",
        "\u3089\u305B\u3093",
        "\u3089\u305D\u3099\u304F",
        "\u3089\u305F\u3044",
        "\u3089\u3063\u304B",
        "\u3089\u308C\u3064",
        "\u308A\u3048\u304D",
        "\u308A\u304B\u3044",
        "\u308A\u304D\u3055\u304F",
        "\u308A\u304D\u305B\u3064",
        "\u308A\u304F\u304F\u3099\u3093",
        "\u308A\u304F\u3064",
        "\u308A\u3051\u3093",
        "\u308A\u3053\u3046",
        "\u308A\u305B\u3044",
        "\u308A\u305D\u3046",
        "\u308A\u305D\u304F",
        "\u308A\u3066\u3093",
        "\u308A\u306D\u3093",
        "\u308A\u3086\u3046",
        "\u308A\u3085\u3046\u304B\u3099\u304F",
        "\u308A\u3088\u3046",
        "\u308A\u3087\u3046\u308A",
        "\u308A\u3087\u304B\u3093",
        "\u308A\u3087\u304F\u3061\u3083",
        "\u308A\u3087\u3053\u3046",
        "\u308A\u308A\u304F",
        "\u308A\u308C\u304D",
        "\u308A\u308D\u3093",
        "\u308A\u3093\u3053\u3099",
        "\u308B\u3044\u3051\u3044",
        "\u308B\u3044\u3055\u3044",
        "\u308B\u3044\u3057\u3099",
        "\u308B\u3044\u305B\u304D",
        "\u308B\u3059\u306F\u3099\u3093",
        "\u308B\u308A\u304B\u3099\u308F\u3089",
        "\u308C\u3044\u304B\u3093",
        "\u308C\u3044\u304D\u3099",
        "\u308C\u3044\u305B\u3044",
        "\u308C\u3044\u305D\u3099\u3046\u3053",
        "\u308C\u3044\u3068\u3046",
        "\u308C\u3044\u307B\u3099\u3046",
        "\u308C\u304D\u3057",
        "\u308C\u304D\u305F\u3099\u3044",
        "\u308C\u3093\u3042\u3044",
        "\u308C\u3093\u3051\u3044",
        "\u308C\u3093\u3053\u3093",
        "\u308C\u3093\u3055\u3044",
        "\u308C\u3093\u3057\u3085\u3046",
        "\u308C\u3093\u305D\u3099\u304F",
        "\u308C\u3093\u3089\u304F",
        "\u308D\u3046\u304B",
        "\u308D\u3046\u3053\u3099",
        "\u308D\u3046\u3057\u3099\u3093",
        "\u308D\u3046\u305D\u304F",
        "\u308D\u304F\u304B\u3099",
        "\u308D\u3053\u3064",
        "\u308D\u3057\u3099\u3046\u3089",
        "\u308D\u3057\u3085\u3064",
        "\u308D\u305B\u3093",
        "\u308D\u3066\u3093",
        "\u308D\u3081\u3093",
        "\u308D\u308C\u3064",
        "\u308D\u3093\u304D\u3099",
        "\u308D\u3093\u306F\u309A",
        "\u308D\u3093\u3075\u3099\u3093",
        "\u308D\u3093\u308A",
        "\u308F\u304B\u3059",
        "\u308F\u304B\u3081",
        "\u308F\u304B\u3084\u307E",
        "\u308F\u304B\u308C\u308B",
        "\u308F\u3057\u3064",
        "\u308F\u3057\u3099\u307E\u3057",
        "\u308F\u3059\u308C\u3082\u306E",
        "\u308F\u3089\u3046",
        "\u308F\u308C\u308B"
      ];
    }
  });

  // ../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/portuguese.json
  var require_portuguese = __commonJS({
    "../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/portuguese.json"(exports, module) {
      module.exports = [
        "abacate",
        "abaixo",
        "abalar",
        "abater",
        "abduzir",
        "abelha",
        "aberto",
        "abismo",
        "abotoar",
        "abranger",
        "abreviar",
        "abrigar",
        "abrupto",
        "absinto",
        "absoluto",
        "absurdo",
        "abutre",
        "acabado",
        "acalmar",
        "acampar",
        "acanhar",
        "acaso",
        "aceitar",
        "acelerar",
        "acenar",
        "acervo",
        "acessar",
        "acetona",
        "achatar",
        "acidez",
        "acima",
        "acionado",
        "acirrar",
        "aclamar",
        "aclive",
        "acolhida",
        "acomodar",
        "acoplar",
        "acordar",
        "acumular",
        "acusador",
        "adaptar",
        "adega",
        "adentro",
        "adepto",
        "adequar",
        "aderente",
        "adesivo",
        "adeus",
        "adiante",
        "aditivo",
        "adjetivo",
        "adjunto",
        "admirar",
        "adorar",
        "adquirir",
        "adubo",
        "adverso",
        "advogado",
        "aeronave",
        "afastar",
        "aferir",
        "afetivo",
        "afinador",
        "afivelar",
        "aflito",
        "afluente",
        "afrontar",
        "agachar",
        "agarrar",
        "agasalho",
        "agenciar",
        "agilizar",
        "agiota",
        "agitado",
        "agora",
        "agradar",
        "agreste",
        "agrupar",
        "aguardar",
        "agulha",
        "ajoelhar",
        "ajudar",
        "ajustar",
        "alameda",
        "alarme",
        "alastrar",
        "alavanca",
        "albergue",
        "albino",
        "alcatra",
        "aldeia",
        "alecrim",
        "alegria",
        "alertar",
        "alface",
        "alfinete",
        "algum",
        "alheio",
        "aliar",
        "alicate",
        "alienar",
        "alinhar",
        "aliviar",
        "almofada",
        "alocar",
        "alpiste",
        "alterar",
        "altitude",
        "alucinar",
        "alugar",
        "aluno",
        "alusivo",
        "alvo",
        "amaciar",
        "amador",
        "amarelo",
        "amassar",
        "ambas",
        "ambiente",
        "ameixa",
        "amenizar",
        "amido",
        "amistoso",
        "amizade",
        "amolador",
        "amontoar",
        "amoroso",
        "amostra",
        "amparar",
        "ampliar",
        "ampola",
        "anagrama",
        "analisar",
        "anarquia",
        "anatomia",
        "andaime",
        "anel",
        "anexo",
        "angular",
        "animar",
        "anjo",
        "anomalia",
        "anotado",
        "ansioso",
        "anterior",
        "anuidade",
        "anunciar",
        "anzol",
        "apagador",
        "apalpar",
        "apanhado",
        "apego",
        "apelido",
        "apertada",
        "apesar",
        "apetite",
        "apito",
        "aplauso",
        "aplicada",
        "apoio",
        "apontar",
        "aposta",
        "aprendiz",
        "aprovar",
        "aquecer",
        "arame",
        "aranha",
        "arara",
        "arcada",
        "ardente",
        "areia",
        "arejar",
        "arenito",
        "aresta",
        "argiloso",
        "argola",
        "arma",
        "arquivo",
        "arraial",
        "arrebate",
        "arriscar",
        "arroba",
        "arrumar",
        "arsenal",
        "arterial",
        "artigo",
        "arvoredo",
        "asfaltar",
        "asilado",
        "aspirar",
        "assador",
        "assinar",
        "assoalho",
        "assunto",
        "astral",
        "atacado",
        "atadura",
        "atalho",
        "atarefar",
        "atear",
        "atender",
        "aterro",
        "ateu",
        "atingir",
        "atirador",
        "ativo",
        "atoleiro",
        "atracar",
        "atrevido",
        "atriz",
        "atual",
        "atum",
        "auditor",
        "aumentar",
        "aura",
        "aurora",
        "autismo",
        "autoria",
        "autuar",
        "avaliar",
        "avante",
        "avaria",
        "avental",
        "avesso",
        "aviador",
        "avisar",
        "avulso",
        "axila",
        "azarar",
        "azedo",
        "azeite",
        "azulejo",
        "babar",
        "babosa",
        "bacalhau",
        "bacharel",
        "bacia",
        "bagagem",
        "baiano",
        "bailar",
        "baioneta",
        "bairro",
        "baixista",
        "bajular",
        "baleia",
        "baliza",
        "balsa",
        "banal",
        "bandeira",
        "banho",
        "banir",
        "banquete",
        "barato",
        "barbado",
        "baronesa",
        "barraca",
        "barulho",
        "baseado",
        "bastante",
        "batata",
        "batedor",
        "batida",
        "batom",
        "batucar",
        "baunilha",
        "beber",
        "beijo",
        "beirada",
        "beisebol",
        "beldade",
        "beleza",
        "belga",
        "beliscar",
        "bendito",
        "bengala",
        "benzer",
        "berimbau",
        "berlinda",
        "berro",
        "besouro",
        "bexiga",
        "bezerro",
        "bico",
        "bicudo",
        "bienal",
        "bifocal",
        "bifurcar",
        "bigorna",
        "bilhete",
        "bimestre",
        "bimotor",
        "biologia",
        "biombo",
        "biosfera",
        "bipolar",
        "birrento",
        "biscoito",
        "bisneto",
        "bispo",
        "bissexto",
        "bitola",
        "bizarro",
        "blindado",
        "bloco",
        "bloquear",
        "boato",
        "bobagem",
        "bocado",
        "bocejo",
        "bochecha",
        "boicotar",
        "bolada",
        "boletim",
        "bolha",
        "bolo",
        "bombeiro",
        "bonde",
        "boneco",
        "bonita",
        "borbulha",
        "borda",
        "boreal",
        "borracha",
        "bovino",
        "boxeador",
        "branco",
        "brasa",
        "braveza",
        "breu",
        "briga",
        "brilho",
        "brincar",
        "broa",
        "brochura",
        "bronzear",
        "broto",
        "bruxo",
        "bucha",
        "budismo",
        "bufar",
        "bule",
        "buraco",
        "busca",
        "busto",
        "buzina",
        "cabana",
        "cabelo",
        "cabide",
        "cabo",
        "cabrito",
        "cacau",
        "cacetada",
        "cachorro",
        "cacique",
        "cadastro",
        "cadeado",
        "cafezal",
        "caiaque",
        "caipira",
        "caixote",
        "cajado",
        "caju",
        "calafrio",
        "calcular",
        "caldeira",
        "calibrar",
        "calmante",
        "calota",
        "camada",
        "cambista",
        "camisa",
        "camomila",
        "campanha",
        "camuflar",
        "canavial",
        "cancelar",
        "caneta",
        "canguru",
        "canhoto",
        "canivete",
        "canoa",
        "cansado",
        "cantar",
        "canudo",
        "capacho",
        "capela",
        "capinar",
        "capotar",
        "capricho",
        "captador",
        "capuz",
        "caracol",
        "carbono",
        "cardeal",
        "careca",
        "carimbar",
        "carneiro",
        "carpete",
        "carreira",
        "cartaz",
        "carvalho",
        "casaco",
        "casca",
        "casebre",
        "castelo",
        "casulo",
        "catarata",
        "cativar",
        "caule",
        "causador",
        "cautelar",
        "cavalo",
        "caverna",
        "cebola",
        "cedilha",
        "cegonha",
        "celebrar",
        "celular",
        "cenoura",
        "censo",
        "centeio",
        "cercar",
        "cerrado",
        "certeiro",
        "cerveja",
        "cetim",
        "cevada",
        "chacota",
        "chaleira",
        "chamado",
        "chapada",
        "charme",
        "chatice",
        "chave",
        "chefe",
        "chegada",
        "cheiro",
        "cheque",
        "chicote",
        "chifre",
        "chinelo",
        "chocalho",
        "chover",
        "chumbo",
        "chutar",
        "chuva",
        "cicatriz",
        "ciclone",
        "cidade",
        "cidreira",
        "ciente",
        "cigana",
        "cimento",
        "cinto",
        "cinza",
        "ciranda",
        "circuito",
        "cirurgia",
        "citar",
        "clareza",
        "clero",
        "clicar",
        "clone",
        "clube",
        "coado",
        "coagir",
        "cobaia",
        "cobertor",
        "cobrar",
        "cocada",
        "coelho",
        "coentro",
        "coeso",
        "cogumelo",
        "coibir",
        "coifa",
        "coiote",
        "colar",
        "coleira",
        "colher",
        "colidir",
        "colmeia",
        "colono",
        "coluna",
        "comando",
        "combinar",
        "comentar",
        "comitiva",
        "comover",
        "complexo",
        "comum",
        "concha",
        "condor",
        "conectar",
        "confuso",
        "congelar",
        "conhecer",
        "conjugar",
        "consumir",
        "contrato",
        "convite",
        "cooperar",
        "copeiro",
        "copiador",
        "copo",
        "coquetel",
        "coragem",
        "cordial",
        "corneta",
        "coronha",
        "corporal",
        "correio",
        "cortejo",
        "coruja",
        "corvo",
        "cosseno",
        "costela",
        "cotonete",
        "couro",
        "couve",
        "covil",
        "cozinha",
        "cratera",
        "cravo",
        "creche",
        "credor",
        "creme",
        "crer",
        "crespo",
        "criada",
        "criminal",
        "crioulo",
        "crise",
        "criticar",
        "crosta",
        "crua",
        "cruzeiro",
        "cubano",
        "cueca",
        "cuidado",
        "cujo",
        "culatra",
        "culminar",
        "culpar",
        "cultura",
        "cumprir",
        "cunhado",
        "cupido",
        "curativo",
        "curral",
        "cursar",
        "curto",
        "cuspir",
        "custear",
        "cutelo",
        "damasco",
        "datar",
        "debater",
        "debitar",
        "deboche",
        "debulhar",
        "decalque",
        "decimal",
        "declive",
        "decote",
        "decretar",
        "dedal",
        "dedicado",
        "deduzir",
        "defesa",
        "defumar",
        "degelo",
        "degrau",
        "degustar",
        "deitado",
        "deixar",
        "delator",
        "delegado",
        "delinear",
        "delonga",
        "demanda",
        "demitir",
        "demolido",
        "dentista",
        "depenado",
        "depilar",
        "depois",
        "depressa",
        "depurar",
        "deriva",
        "derramar",
        "desafio",
        "desbotar",
        "descanso",
        "desenho",
        "desfiado",
        "desgaste",
        "desigual",
        "deslize",
        "desmamar",
        "desova",
        "despesa",
        "destaque",
        "desviar",
        "detalhar",
        "detentor",
        "detonar",
        "detrito",
        "deusa",
        "dever",
        "devido",
        "devotado",
        "dezena",
        "diagrama",
        "dialeto",
        "didata",
        "difuso",
        "digitar",
        "dilatado",
        "diluente",
        "diminuir",
        "dinastia",
        "dinheiro",
        "diocese",
        "direto",
        "discreta",
        "disfarce",
        "disparo",
        "disquete",
        "dissipar",
        "distante",
        "ditador",
        "diurno",
        "diverso",
        "divisor",
        "divulgar",
        "dizer",
        "dobrador",
        "dolorido",
        "domador",
        "dominado",
        "donativo",
        "donzela",
        "dormente",
        "dorsal",
        "dosagem",
        "dourado",
        "doutor",
        "drenagem",
        "drible",
        "drogaria",
        "duelar",
        "duende",
        "dueto",
        "duplo",
        "duquesa",
        "durante",
        "duvidoso",
        "eclodir",
        "ecoar",
        "ecologia",
        "edificar",
        "edital",
        "educado",
        "efeito",
        "efetivar",
        "ejetar",
        "elaborar",
        "eleger",
        "eleitor",
        "elenco",
        "elevador",
        "eliminar",
        "elogiar",
        "embargo",
        "embolado",
        "embrulho",
        "embutido",
        "emenda",
        "emergir",
        "emissor",
        "empatia",
        "empenho",
        "empinado",
        "empolgar",
        "emprego",
        "empurrar",
        "emulador",
        "encaixe",
        "encenado",
        "enchente",
        "encontro",
        "endeusar",
        "endossar",
        "enfaixar",
        "enfeite",
        "enfim",
        "engajado",
        "engenho",
        "englobar",
        "engomado",
        "engraxar",
        "enguia",
        "enjoar",
        "enlatar",
        "enquanto",
        "enraizar",
        "enrolado",
        "enrugar",
        "ensaio",
        "enseada",
        "ensino",
        "ensopado",
        "entanto",
        "enteado",
        "entidade",
        "entortar",
        "entrada",
        "entulho",
        "envergar",
        "enviado",
        "envolver",
        "enxame",
        "enxerto",
        "enxofre",
        "enxuto",
        "epiderme",
        "equipar",
        "ereto",
        "erguido",
        "errata",
        "erva",
        "ervilha",
        "esbanjar",
        "esbelto",
        "escama",
        "escola",
        "escrita",
        "escuta",
        "esfinge",
        "esfolar",
        "esfregar",
        "esfumado",
        "esgrima",
        "esmalte",
        "espanto",
        "espelho",
        "espiga",
        "esponja",
        "espreita",
        "espumar",
        "esquerda",
        "estaca",
        "esteira",
        "esticar",
        "estofado",
        "estrela",
        "estudo",
        "esvaziar",
        "etanol",
        "etiqueta",
        "euforia",
        "europeu",
        "evacuar",
        "evaporar",
        "evasivo",
        "eventual",
        "evidente",
        "evoluir",
        "exagero",
        "exalar",
        "examinar",
        "exato",
        "exausto",
        "excesso",
        "excitar",
        "exclamar",
        "executar",
        "exemplo",
        "exibir",
        "exigente",
        "exonerar",
        "expandir",
        "expelir",
        "expirar",
        "explanar",
        "exposto",
        "expresso",
        "expulsar",
        "externo",
        "extinto",
        "extrato",
        "fabricar",
        "fabuloso",
        "faceta",
        "facial",
        "fada",
        "fadiga",
        "faixa",
        "falar",
        "falta",
        "familiar",
        "fandango",
        "fanfarra",
        "fantoche",
        "fardado",
        "farelo",
        "farinha",
        "farofa",
        "farpa",
        "fartura",
        "fatia",
        "fator",
        "favorita",
        "faxina",
        "fazenda",
        "fechado",
        "feijoada",
        "feirante",
        "felino",
        "feminino",
        "fenda",
        "feno",
        "fera",
        "feriado",
        "ferrugem",
        "ferver",
        "festejar",
        "fetal",
        "feudal",
        "fiapo",
        "fibrose",
        "ficar",
        "ficheiro",
        "figurado",
        "fileira",
        "filho",
        "filme",
        "filtrar",
        "firmeza",
        "fisgada",
        "fissura",
        "fita",
        "fivela",
        "fixador",
        "fixo",
        "flacidez",
        "flamingo",
        "flanela",
        "flechada",
        "flora",
        "flutuar",
        "fluxo",
        "focal",
        "focinho",
        "fofocar",
        "fogo",
        "foguete",
        "foice",
        "folgado",
        "folheto",
        "forjar",
        "formiga",
        "forno",
        "forte",
        "fosco",
        "fossa",
        "fragata",
        "fralda",
        "frango",
        "frasco",
        "fraterno",
        "freira",
        "frente",
        "fretar",
        "frieza",
        "friso",
        "fritura",
        "fronha",
        "frustrar",
        "fruteira",
        "fugir",
        "fulano",
        "fuligem",
        "fundar",
        "fungo",
        "funil",
        "furador",
        "furioso",
        "futebol",
        "gabarito",
        "gabinete",
        "gado",
        "gaiato",
        "gaiola",
        "gaivota",
        "galega",
        "galho",
        "galinha",
        "galocha",
        "ganhar",
        "garagem",
        "garfo",
        "gargalo",
        "garimpo",
        "garoupa",
        "garrafa",
        "gasoduto",
        "gasto",
        "gata",
        "gatilho",
        "gaveta",
        "gazela",
        "gelado",
        "geleia",
        "gelo",
        "gemada",
        "gemer",
        "gemido",
        "generoso",
        "gengiva",
        "genial",
        "genoma",
        "genro",
        "geologia",
        "gerador",
        "germinar",
        "gesso",
        "gestor",
        "ginasta",
        "gincana",
        "gingado",
        "girafa",
        "girino",
        "glacial",
        "glicose",
        "global",
        "glorioso",
        "goela",
        "goiaba",
        "golfe",
        "golpear",
        "gordura",
        "gorjeta",
        "gorro",
        "gostoso",
        "goteira",
        "governar",
        "gracejo",
        "gradual",
        "grafite",
        "gralha",
        "grampo",
        "granada",
        "gratuito",
        "graveto",
        "graxa",
        "grego",
        "grelhar",
        "greve",
        "grilo",
        "grisalho",
        "gritaria",
        "grosso",
        "grotesco",
        "grudado",
        "grunhido",
        "gruta",
        "guache",
        "guarani",
        "guaxinim",
        "guerrear",
        "guiar",
        "guincho",
        "guisado",
        "gula",
        "guloso",
        "guru",
        "habitar",
        "harmonia",
        "haste",
        "haver",
        "hectare",
        "herdar",
        "heresia",
        "hesitar",
        "hiato",
        "hibernar",
        "hidratar",
        "hiena",
        "hino",
        "hipismo",
        "hipnose",
        "hipoteca",
        "hoje",
        "holofote",
        "homem",
        "honesto",
        "honrado",
        "hormonal",
        "hospedar",
        "humorado",
        "iate",
        "ideia",
        "idoso",
        "ignorado",
        "igreja",
        "iguana",
        "ileso",
        "ilha",
        "iludido",
        "iluminar",
        "ilustrar",
        "imagem",
        "imediato",
        "imenso",
        "imersivo",
        "iminente",
        "imitador",
        "imortal",
        "impacto",
        "impedir",
        "implante",
        "impor",
        "imprensa",
        "impune",
        "imunizar",
        "inalador",
        "inapto",
        "inativo",
        "incenso",
        "inchar",
        "incidir",
        "incluir",
        "incolor",
        "indeciso",
        "indireto",
        "indutor",
        "ineficaz",
        "inerente",
        "infantil",
        "infestar",
        "infinito",
        "inflamar",
        "informal",
        "infrator",
        "ingerir",
        "inibido",
        "inicial",
        "inimigo",
        "injetar",
        "inocente",
        "inodoro",
        "inovador",
        "inox",
        "inquieto",
        "inscrito",
        "inseto",
        "insistir",
        "inspetor",
        "instalar",
        "insulto",
        "intacto",
        "integral",
        "intimar",
        "intocado",
        "intriga",
        "invasor",
        "inverno",
        "invicto",
        "invocar",
        "iogurte",
        "iraniano",
        "ironizar",
        "irreal",
        "irritado",
        "isca",
        "isento",
        "isolado",
        "isqueiro",
        "italiano",
        "janeiro",
        "jangada",
        "janta",
        "jararaca",
        "jardim",
        "jarro",
        "jasmim",
        "jato",
        "javali",
        "jazida",
        "jejum",
        "joaninha",
        "joelhada",
        "jogador",
        "joia",
        "jornal",
        "jorrar",
        "jovem",
        "juba",
        "judeu",
        "judoca",
        "juiz",
        "julgador",
        "julho",
        "jurado",
        "jurista",
        "juro",
        "justa",
        "labareda",
        "laboral",
        "lacre",
        "lactante",
        "ladrilho",
        "lagarta",
        "lagoa",
        "laje",
        "lamber",
        "lamentar",
        "laminar",
        "lampejo",
        "lanche",
        "lapidar",
        "lapso",
        "laranja",
        "lareira",
        "largura",
        "lasanha",
        "lastro",
        "lateral",
        "latido",
        "lavanda",
        "lavoura",
        "lavrador",
        "laxante",
        "lazer",
        "lealdade",
        "lebre",
        "legado",
        "legendar",
        "legista",
        "leigo",
        "leiloar",
        "leitura",
        "lembrete",
        "leme",
        "lenhador",
        "lentilha",
        "leoa",
        "lesma",
        "leste",
        "letivo",
        "letreiro",
        "levar",
        "leveza",
        "levitar",
        "liberal",
        "libido",
        "liderar",
        "ligar",
        "ligeiro",
        "limitar",
        "limoeiro",
        "limpador",
        "linda",
        "linear",
        "linhagem",
        "liquidez",
        "listagem",
        "lisura",
        "litoral",
        "livro",
        "lixa",
        "lixeira",
        "locador",
        "locutor",
        "lojista",
        "lombo",
        "lona",
        "longe",
        "lontra",
        "lorde",
        "lotado",
        "loteria",
        "loucura",
        "lousa",
        "louvar",
        "luar",
        "lucidez",
        "lucro",
        "luneta",
        "lustre",
        "lutador",
        "luva",
        "macaco",
        "macete",
        "machado",
        "macio",
        "madeira",
        "madrinha",
        "magnata",
        "magreza",
        "maior",
        "mais",
        "malandro",
        "malha",
        "malote",
        "maluco",
        "mamilo",
        "mamoeiro",
        "mamute",
        "manada",
        "mancha",
        "mandato",
        "manequim",
        "manhoso",
        "manivela",
        "manobrar",
        "mansa",
        "manter",
        "manusear",
        "mapeado",
        "maquinar",
        "marcador",
        "maresia",
        "marfim",
        "margem",
        "marinho",
        "marmita",
        "maroto",
        "marquise",
        "marreco",
        "martelo",
        "marujo",
        "mascote",
        "masmorra",
        "massagem",
        "mastigar",
        "matagal",
        "materno",
        "matinal",
        "matutar",
        "maxilar",
        "medalha",
        "medida",
        "medusa",
        "megafone",
        "meiga",
        "melancia",
        "melhor",
        "membro",
        "memorial",
        "menino",
        "menos",
        "mensagem",
        "mental",
        "merecer",
        "mergulho",
        "mesada",
        "mesclar",
        "mesmo",
        "mesquita",
        "mestre",
        "metade",
        "meteoro",
        "metragem",
        "mexer",
        "mexicano",
        "micro",
        "migalha",
        "migrar",
        "milagre",
        "milenar",
        "milhar",
        "mimado",
        "minerar",
        "minhoca",
        "ministro",
        "minoria",
        "miolo",
        "mirante",
        "mirtilo",
        "misturar",
        "mocidade",
        "moderno",
        "modular",
        "moeda",
        "moer",
        "moinho",
        "moita",
        "moldura",
        "moleza",
        "molho",
        "molinete",
        "molusco",
        "montanha",
        "moqueca",
        "morango",
        "morcego",
        "mordomo",
        "morena",
        "mosaico",
        "mosquete",
        "mostarda",
        "motel",
        "motim",
        "moto",
        "motriz",
        "muda",
        "muito",
        "mulata",
        "mulher",
        "multar",
        "mundial",
        "munido",
        "muralha",
        "murcho",
        "muscular",
        "museu",
        "musical",
        "nacional",
        "nadador",
        "naja",
        "namoro",
        "narina",
        "narrado",
        "nascer",
        "nativa",
        "natureza",
        "navalha",
        "navegar",
        "navio",
        "neblina",
        "nebuloso",
        "negativa",
        "negociar",
        "negrito",
        "nervoso",
        "neta",
        "neural",
        "nevasca",
        "nevoeiro",
        "ninar",
        "ninho",
        "nitidez",
        "nivelar",
        "nobreza",
        "noite",
        "noiva",
        "nomear",
        "nominal",
        "nordeste",
        "nortear",
        "notar",
        "noticiar",
        "noturno",
        "novelo",
        "novilho",
        "novo",
        "nublado",
        "nudez",
        "numeral",
        "nupcial",
        "nutrir",
        "nuvem",
        "obcecado",
        "obedecer",
        "objetivo",
        "obrigado",
        "obscuro",
        "obstetra",
        "obter",
        "obturar",
        "ocidente",
        "ocioso",
        "ocorrer",
        "oculista",
        "ocupado",
        "ofegante",
        "ofensiva",
        "oferenda",
        "oficina",
        "ofuscado",
        "ogiva",
        "olaria",
        "oleoso",
        "olhar",
        "oliveira",
        "ombro",
        "omelete",
        "omisso",
        "omitir",
        "ondulado",
        "oneroso",
        "ontem",
        "opcional",
        "operador",
        "oponente",
        "oportuno",
        "oposto",
        "orar",
        "orbitar",
        "ordem",
        "ordinal",
        "orfanato",
        "orgasmo",
        "orgulho",
        "oriental",
        "origem",
        "oriundo",
        "orla",
        "ortodoxo",
        "orvalho",
        "oscilar",
        "ossada",
        "osso",
        "ostentar",
        "otimismo",
        "ousadia",
        "outono",
        "outubro",
        "ouvido",
        "ovelha",
        "ovular",
        "oxidar",
        "oxigenar",
        "pacato",
        "paciente",
        "pacote",
        "pactuar",
        "padaria",
        "padrinho",
        "pagar",
        "pagode",
        "painel",
        "pairar",
        "paisagem",
        "palavra",
        "palestra",
        "palheta",
        "palito",
        "palmada",
        "palpitar",
        "pancada",
        "panela",
        "panfleto",
        "panqueca",
        "pantanal",
        "papagaio",
        "papelada",
        "papiro",
        "parafina",
        "parcial",
        "pardal",
        "parede",
        "partida",
        "pasmo",
        "passado",
        "pastel",
        "patamar",
        "patente",
        "patinar",
        "patrono",
        "paulada",
        "pausar",
        "peculiar",
        "pedalar",
        "pedestre",
        "pediatra",
        "pedra",
        "pegada",
        "peitoral",
        "peixe",
        "pele",
        "pelicano",
        "penca",
        "pendurar",
        "peneira",
        "penhasco",
        "pensador",
        "pente",
        "perceber",
        "perfeito",
        "pergunta",
        "perito",
        "permitir",
        "perna",
        "perplexo",
        "persiana",
        "pertence",
        "peruca",
        "pescado",
        "pesquisa",
        "pessoa",
        "petiscar",
        "piada",
        "picado",
        "piedade",
        "pigmento",
        "pilastra",
        "pilhado",
        "pilotar",
        "pimenta",
        "pincel",
        "pinguim",
        "pinha",
        "pinote",
        "pintar",
        "pioneiro",
        "pipoca",
        "piquete",
        "piranha",
        "pires",
        "pirueta",
        "piscar",
        "pistola",
        "pitanga",
        "pivete",
        "planta",
        "plaqueta",
        "platina",
        "plebeu",
        "plumagem",
        "pluvial",
        "pneu",
        "poda",
        "poeira",
        "poetisa",
        "polegada",
        "policiar",
        "poluente",
        "polvilho",
        "pomar",
        "pomba",
        "ponderar",
        "pontaria",
        "populoso",
        "porta",
        "possuir",
        "postal",
        "pote",
        "poupar",
        "pouso",
        "povoar",
        "praia",
        "prancha",
        "prato",
        "praxe",
        "prece",
        "predador",
        "prefeito",
        "premiar",
        "prensar",
        "preparar",
        "presilha",
        "pretexto",
        "prevenir",
        "prezar",
        "primata",
        "princesa",
        "prisma",
        "privado",
        "processo",
        "produto",
        "profeta",
        "proibido",
        "projeto",
        "prometer",
        "propagar",
        "prosa",
        "protetor",
        "provador",
        "publicar",
        "pudim",
        "pular",
        "pulmonar",
        "pulseira",
        "punhal",
        "punir",
        "pupilo",
        "pureza",
        "puxador",
        "quadra",
        "quantia",
        "quarto",
        "quase",
        "quebrar",
        "queda",
        "queijo",
        "quente",
        "querido",
        "quimono",
        "quina",
        "quiosque",
        "rabanada",
        "rabisco",
        "rachar",
        "racionar",
        "radial",
        "raiar",
        "rainha",
        "raio",
        "raiva",
        "rajada",
        "ralado",
        "ramal",
        "ranger",
        "ranhura",
        "rapadura",
        "rapel",
        "rapidez",
        "raposa",
        "raquete",
        "raridade",
        "rasante",
        "rascunho",
        "rasgar",
        "raspador",
        "rasteira",
        "rasurar",
        "ratazana",
        "ratoeira",
        "realeza",
        "reanimar",
        "reaver",
        "rebaixar",
        "rebelde",
        "rebolar",
        "recado",
        "recente",
        "recheio",
        "recibo",
        "recordar",
        "recrutar",
        "recuar",
        "rede",
        "redimir",
        "redonda",
        "reduzida",
        "reenvio",
        "refinar",
        "refletir",
        "refogar",
        "refresco",
        "refugiar",
        "regalia",
        "regime",
        "regra",
        "reinado",
        "reitor",
        "rejeitar",
        "relativo",
        "remador",
        "remendo",
        "remorso",
        "renovado",
        "reparo",
        "repelir",
        "repleto",
        "repolho",
        "represa",
        "repudiar",
        "requerer",
        "resenha",
        "resfriar",
        "resgatar",
        "residir",
        "resolver",
        "respeito",
        "ressaca",
        "restante",
        "resumir",
        "retalho",
        "reter",
        "retirar",
        "retomada",
        "retratar",
        "revelar",
        "revisor",
        "revolta",
        "riacho",
        "rica",
        "rigidez",
        "rigoroso",
        "rimar",
        "ringue",
        "risada",
        "risco",
        "risonho",
        "robalo",
        "rochedo",
        "rodada",
        "rodeio",
        "rodovia",
        "roedor",
        "roleta",
        "romano",
        "roncar",
        "rosado",
        "roseira",
        "rosto",
        "rota",
        "roteiro",
        "rotina",
        "rotular",
        "rouco",
        "roupa",
        "roxo",
        "rubro",
        "rugido",
        "rugoso",
        "ruivo",
        "rumo",
        "rupestre",
        "russo",
        "sabor",
        "saciar",
        "sacola",
        "sacudir",
        "sadio",
        "safira",
        "saga",
        "sagrada",
        "saibro",
        "salada",
        "saleiro",
        "salgado",
        "saliva",
        "salpicar",
        "salsicha",
        "saltar",
        "salvador",
        "sambar",
        "samurai",
        "sanar",
        "sanfona",
        "sangue",
        "sanidade",
        "sapato",
        "sarda",
        "sargento",
        "sarjeta",
        "saturar",
        "saudade",
        "saxofone",
        "sazonal",
        "secar",
        "secular",
        "seda",
        "sedento",
        "sediado",
        "sedoso",
        "sedutor",
        "segmento",
        "segredo",
        "segundo",
        "seiva",
        "seleto",
        "selvagem",
        "semanal",
        "semente",
        "senador",
        "senhor",
        "sensual",
        "sentado",
        "separado",
        "sereia",
        "seringa",
        "serra",
        "servo",
        "setembro",
        "setor",
        "sigilo",
        "silhueta",
        "silicone",
        "simetria",
        "simpatia",
        "simular",
        "sinal",
        "sincero",
        "singular",
        "sinopse",
        "sintonia",
        "sirene",
        "siri",
        "situado",
        "soberano",
        "sobra",
        "socorro",
        "sogro",
        "soja",
        "solda",
        "soletrar",
        "solteiro",
        "sombrio",
        "sonata",
        "sondar",
        "sonegar",
        "sonhador",
        "sono",
        "soprano",
        "soquete",
        "sorrir",
        "sorteio",
        "sossego",
        "sotaque",
        "soterrar",
        "sovado",
        "sozinho",
        "suavizar",
        "subida",
        "submerso",
        "subsolo",
        "subtrair",
        "sucata",
        "sucesso",
        "suco",
        "sudeste",
        "sufixo",
        "sugador",
        "sugerir",
        "sujeito",
        "sulfato",
        "sumir",
        "suor",
        "superior",
        "suplicar",
        "suposto",
        "suprimir",
        "surdina",
        "surfista",
        "surpresa",
        "surreal",
        "surtir",
        "suspiro",
        "sustento",
        "tabela",
        "tablete",
        "tabuada",
        "tacho",
        "tagarela",
        "talher",
        "talo",
        "talvez",
        "tamanho",
        "tamborim",
        "tampa",
        "tangente",
        "tanto",
        "tapar",
        "tapioca",
        "tardio",
        "tarefa",
        "tarja",
        "tarraxa",
        "tatuagem",
        "taurino",
        "taxativo",
        "taxista",
        "teatral",
        "tecer",
        "tecido",
        "teclado",
        "tedioso",
        "teia",
        "teimar",
        "telefone",
        "telhado",
        "tempero",
        "tenente",
        "tensor",
        "tentar",
        "termal",
        "terno",
        "terreno",
        "tese",
        "tesoura",
        "testado",
        "teto",
        "textura",
        "texugo",
        "tiara",
        "tigela",
        "tijolo",
        "timbrar",
        "timidez",
        "tingido",
        "tinteiro",
        "tiragem",
        "titular",
        "toalha",
        "tocha",
        "tolerar",
        "tolice",
        "tomada",
        "tomilho",
        "tonel",
        "tontura",
        "topete",
        "tora",
        "torcido",
        "torneio",
        "torque",
        "torrada",
        "torto",
        "tostar",
        "touca",
        "toupeira",
        "toxina",
        "trabalho",
        "tracejar",
        "tradutor",
        "trafegar",
        "trajeto",
        "trama",
        "trancar",
        "trapo",
        "traseiro",
        "tratador",
        "travar",
        "treino",
        "tremer",
        "trepidar",
        "trevo",
        "triagem",
        "tribo",
        "triciclo",
        "tridente",
        "trilogia",
        "trindade",
        "triplo",
        "triturar",
        "triunfal",
        "trocar",
        "trombeta",
        "trova",
        "trunfo",
        "truque",
        "tubular",
        "tucano",
        "tudo",
        "tulipa",
        "tupi",
        "turbo",
        "turma",
        "turquesa",
        "tutelar",
        "tutorial",
        "uivar",
        "umbigo",
        "unha",
        "unidade",
        "uniforme",
        "urologia",
        "urso",
        "urtiga",
        "urubu",
        "usado",
        "usina",
        "usufruir",
        "vacina",
        "vadiar",
        "vagaroso",
        "vaidoso",
        "vala",
        "valente",
        "validade",
        "valores",
        "vantagem",
        "vaqueiro",
        "varanda",
        "vareta",
        "varrer",
        "vascular",
        "vasilha",
        "vassoura",
        "vazar",
        "vazio",
        "veado",
        "vedar",
        "vegetar",
        "veicular",
        "veleiro",
        "velhice",
        "veludo",
        "vencedor",
        "vendaval",
        "venerar",
        "ventre",
        "verbal",
        "verdade",
        "vereador",
        "vergonha",
        "vermelho",
        "verniz",
        "versar",
        "vertente",
        "vespa",
        "vestido",
        "vetorial",
        "viaduto",
        "viagem",
        "viajar",
        "viatura",
        "vibrador",
        "videira",
        "vidraria",
        "viela",
        "viga",
        "vigente",
        "vigiar",
        "vigorar",
        "vilarejo",
        "vinco",
        "vinheta",
        "vinil",
        "violeta",
        "virada",
        "virtude",
        "visitar",
        "visto",
        "vitral",
        "viveiro",
        "vizinho",
        "voador",
        "voar",
        "vogal",
        "volante",
        "voleibol",
        "voltagem",
        "volumoso",
        "vontade",
        "vulto",
        "vuvuzela",
        "xadrez",
        "xarope",
        "xeque",
        "xeretar",
        "xerife",
        "xingar",
        "zangado",
        "zarpar",
        "zebu",
        "zelador",
        "zombar",
        "zoologia",
        "zumbido"
      ];
    }
  });

  // ../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/english.json
  var require_english = __commonJS({
    "../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/wordlists/english.json"(exports, module) {
      module.exports = [
        "abandon",
        "ability",
        "able",
        "about",
        "above",
        "absent",
        "absorb",
        "abstract",
        "absurd",
        "abuse",
        "access",
        "accident",
        "account",
        "accuse",
        "achieve",
        "acid",
        "acoustic",
        "acquire",
        "across",
        "act",
        "action",
        "actor",
        "actress",
        "actual",
        "adapt",
        "add",
        "addict",
        "address",
        "adjust",
        "admit",
        "adult",
        "advance",
        "advice",
        "aerobic",
        "affair",
        "afford",
        "afraid",
        "again",
        "age",
        "agent",
        "agree",
        "ahead",
        "aim",
        "air",
        "airport",
        "aisle",
        "alarm",
        "album",
        "alcohol",
        "alert",
        "alien",
        "all",
        "alley",
        "allow",
        "almost",
        "alone",
        "alpha",
        "already",
        "also",
        "alter",
        "always",
        "amateur",
        "amazing",
        "among",
        "amount",
        "amused",
        "analyst",
        "anchor",
        "ancient",
        "anger",
        "angle",
        "angry",
        "animal",
        "ankle",
        "announce",
        "annual",
        "another",
        "answer",
        "antenna",
        "antique",
        "anxiety",
        "any",
        "apart",
        "apology",
        "appear",
        "apple",
        "approve",
        "april",
        "arch",
        "arctic",
        "area",
        "arena",
        "argue",
        "arm",
        "armed",
        "armor",
        "army",
        "around",
        "arrange",
        "arrest",
        "arrive",
        "arrow",
        "art",
        "artefact",
        "artist",
        "artwork",
        "ask",
        "aspect",
        "assault",
        "asset",
        "assist",
        "assume",
        "asthma",
        "athlete",
        "atom",
        "attack",
        "attend",
        "attitude",
        "attract",
        "auction",
        "audit",
        "august",
        "aunt",
        "author",
        "auto",
        "autumn",
        "average",
        "avocado",
        "avoid",
        "awake",
        "aware",
        "away",
        "awesome",
        "awful",
        "awkward",
        "axis",
        "baby",
        "bachelor",
        "bacon",
        "badge",
        "bag",
        "balance",
        "balcony",
        "ball",
        "bamboo",
        "banana",
        "banner",
        "bar",
        "barely",
        "bargain",
        "barrel",
        "base",
        "basic",
        "basket",
        "battle",
        "beach",
        "bean",
        "beauty",
        "because",
        "become",
        "beef",
        "before",
        "begin",
        "behave",
        "behind",
        "believe",
        "below",
        "belt",
        "bench",
        "benefit",
        "best",
        "betray",
        "better",
        "between",
        "beyond",
        "bicycle",
        "bid",
        "bike",
        "bind",
        "biology",
        "bird",
        "birth",
        "bitter",
        "black",
        "blade",
        "blame",
        "blanket",
        "blast",
        "bleak",
        "bless",
        "blind",
        "blood",
        "blossom",
        "blouse",
        "blue",
        "blur",
        "blush",
        "board",
        "boat",
        "body",
        "boil",
        "bomb",
        "bone",
        "bonus",
        "book",
        "boost",
        "border",
        "boring",
        "borrow",
        "boss",
        "bottom",
        "bounce",
        "box",
        "boy",
        "bracket",
        "brain",
        "brand",
        "brass",
        "brave",
        "bread",
        "breeze",
        "brick",
        "bridge",
        "brief",
        "bright",
        "bring",
        "brisk",
        "broccoli",
        "broken",
        "bronze",
        "broom",
        "brother",
        "brown",
        "brush",
        "bubble",
        "buddy",
        "budget",
        "buffalo",
        "build",
        "bulb",
        "bulk",
        "bullet",
        "bundle",
        "bunker",
        "burden",
        "burger",
        "burst",
        "bus",
        "business",
        "busy",
        "butter",
        "buyer",
        "buzz",
        "cabbage",
        "cabin",
        "cable",
        "cactus",
        "cage",
        "cake",
        "call",
        "calm",
        "camera",
        "camp",
        "can",
        "canal",
        "cancel",
        "candy",
        "cannon",
        "canoe",
        "canvas",
        "canyon",
        "capable",
        "capital",
        "captain",
        "car",
        "carbon",
        "card",
        "cargo",
        "carpet",
        "carry",
        "cart",
        "case",
        "cash",
        "casino",
        "castle",
        "casual",
        "cat",
        "catalog",
        "catch",
        "category",
        "cattle",
        "caught",
        "cause",
        "caution",
        "cave",
        "ceiling",
        "celery",
        "cement",
        "census",
        "century",
        "cereal",
        "certain",
        "chair",
        "chalk",
        "champion",
        "change",
        "chaos",
        "chapter",
        "charge",
        "chase",
        "chat",
        "cheap",
        "check",
        "cheese",
        "chef",
        "cherry",
        "chest",
        "chicken",
        "chief",
        "child",
        "chimney",
        "choice",
        "choose",
        "chronic",
        "chuckle",
        "chunk",
        "churn",
        "cigar",
        "cinnamon",
        "circle",
        "citizen",
        "city",
        "civil",
        "claim",
        "clap",
        "clarify",
        "claw",
        "clay",
        "clean",
        "clerk",
        "clever",
        "click",
        "client",
        "cliff",
        "climb",
        "clinic",
        "clip",
        "clock",
        "clog",
        "close",
        "cloth",
        "cloud",
        "clown",
        "club",
        "clump",
        "cluster",
        "clutch",
        "coach",
        "coast",
        "coconut",
        "code",
        "coffee",
        "coil",
        "coin",
        "collect",
        "color",
        "column",
        "combine",
        "come",
        "comfort",
        "comic",
        "common",
        "company",
        "concert",
        "conduct",
        "confirm",
        "congress",
        "connect",
        "consider",
        "control",
        "convince",
        "cook",
        "cool",
        "copper",
        "copy",
        "coral",
        "core",
        "corn",
        "correct",
        "cost",
        "cotton",
        "couch",
        "country",
        "couple",
        "course",
        "cousin",
        "cover",
        "coyote",
        "crack",
        "cradle",
        "craft",
        "cram",
        "crane",
        "crash",
        "crater",
        "crawl",
        "crazy",
        "cream",
        "credit",
        "creek",
        "crew",
        "cricket",
        "crime",
        "crisp",
        "critic",
        "crop",
        "cross",
        "crouch",
        "crowd",
        "crucial",
        "cruel",
        "cruise",
        "crumble",
        "crunch",
        "crush",
        "cry",
        "crystal",
        "cube",
        "culture",
        "cup",
        "cupboard",
        "curious",
        "current",
        "curtain",
        "curve",
        "cushion",
        "custom",
        "cute",
        "cycle",
        "dad",
        "damage",
        "damp",
        "dance",
        "danger",
        "daring",
        "dash",
        "daughter",
        "dawn",
        "day",
        "deal",
        "debate",
        "debris",
        "decade",
        "december",
        "decide",
        "decline",
        "decorate",
        "decrease",
        "deer",
        "defense",
        "define",
        "defy",
        "degree",
        "delay",
        "deliver",
        "demand",
        "demise",
        "denial",
        "dentist",
        "deny",
        "depart",
        "depend",
        "deposit",
        "depth",
        "deputy",
        "derive",
        "describe",
        "desert",
        "design",
        "desk",
        "despair",
        "destroy",
        "detail",
        "detect",
        "develop",
        "device",
        "devote",
        "diagram",
        "dial",
        "diamond",
        "diary",
        "dice",
        "diesel",
        "diet",
        "differ",
        "digital",
        "dignity",
        "dilemma",
        "dinner",
        "dinosaur",
        "direct",
        "dirt",
        "disagree",
        "discover",
        "disease",
        "dish",
        "dismiss",
        "disorder",
        "display",
        "distance",
        "divert",
        "divide",
        "divorce",
        "dizzy",
        "doctor",
        "document",
        "dog",
        "doll",
        "dolphin",
        "domain",
        "donate",
        "donkey",
        "donor",
        "door",
        "dose",
        "double",
        "dove",
        "draft",
        "dragon",
        "drama",
        "drastic",
        "draw",
        "dream",
        "dress",
        "drift",
        "drill",
        "drink",
        "drip",
        "drive",
        "drop",
        "drum",
        "dry",
        "duck",
        "dumb",
        "dune",
        "during",
        "dust",
        "dutch",
        "duty",
        "dwarf",
        "dynamic",
        "eager",
        "eagle",
        "early",
        "earn",
        "earth",
        "easily",
        "east",
        "easy",
        "echo",
        "ecology",
        "economy",
        "edge",
        "edit",
        "educate",
        "effort",
        "egg",
        "eight",
        "either",
        "elbow",
        "elder",
        "electric",
        "elegant",
        "element",
        "elephant",
        "elevator",
        "elite",
        "else",
        "embark",
        "embody",
        "embrace",
        "emerge",
        "emotion",
        "employ",
        "empower",
        "empty",
        "enable",
        "enact",
        "end",
        "endless",
        "endorse",
        "enemy",
        "energy",
        "enforce",
        "engage",
        "engine",
        "enhance",
        "enjoy",
        "enlist",
        "enough",
        "enrich",
        "enroll",
        "ensure",
        "enter",
        "entire",
        "entry",
        "envelope",
        "episode",
        "equal",
        "equip",
        "era",
        "erase",
        "erode",
        "erosion",
        "error",
        "erupt",
        "escape",
        "essay",
        "essence",
        "estate",
        "eternal",
        "ethics",
        "evidence",
        "evil",
        "evoke",
        "evolve",
        "exact",
        "example",
        "excess",
        "exchange",
        "excite",
        "exclude",
        "excuse",
        "execute",
        "exercise",
        "exhaust",
        "exhibit",
        "exile",
        "exist",
        "exit",
        "exotic",
        "expand",
        "expect",
        "expire",
        "explain",
        "expose",
        "express",
        "extend",
        "extra",
        "eye",
        "eyebrow",
        "fabric",
        "face",
        "faculty",
        "fade",
        "faint",
        "faith",
        "fall",
        "false",
        "fame",
        "family",
        "famous",
        "fan",
        "fancy",
        "fantasy",
        "farm",
        "fashion",
        "fat",
        "fatal",
        "father",
        "fatigue",
        "fault",
        "favorite",
        "feature",
        "february",
        "federal",
        "fee",
        "feed",
        "feel",
        "female",
        "fence",
        "festival",
        "fetch",
        "fever",
        "few",
        "fiber",
        "fiction",
        "field",
        "figure",
        "file",
        "film",
        "filter",
        "final",
        "find",
        "fine",
        "finger",
        "finish",
        "fire",
        "firm",
        "first",
        "fiscal",
        "fish",
        "fit",
        "fitness",
        "fix",
        "flag",
        "flame",
        "flash",
        "flat",
        "flavor",
        "flee",
        "flight",
        "flip",
        "float",
        "flock",
        "floor",
        "flower",
        "fluid",
        "flush",
        "fly",
        "foam",
        "focus",
        "fog",
        "foil",
        "fold",
        "follow",
        "food",
        "foot",
        "force",
        "forest",
        "forget",
        "fork",
        "fortune",
        "forum",
        "forward",
        "fossil",
        "foster",
        "found",
        "fox",
        "fragile",
        "frame",
        "frequent",
        "fresh",
        "friend",
        "fringe",
        "frog",
        "front",
        "frost",
        "frown",
        "frozen",
        "fruit",
        "fuel",
        "fun",
        "funny",
        "furnace",
        "fury",
        "future",
        "gadget",
        "gain",
        "galaxy",
        "gallery",
        "game",
        "gap",
        "garage",
        "garbage",
        "garden",
        "garlic",
        "garment",
        "gas",
        "gasp",
        "gate",
        "gather",
        "gauge",
        "gaze",
        "general",
        "genius",
        "genre",
        "gentle",
        "genuine",
        "gesture",
        "ghost",
        "giant",
        "gift",
        "giggle",
        "ginger",
        "giraffe",
        "girl",
        "give",
        "glad",
        "glance",
        "glare",
        "glass",
        "glide",
        "glimpse",
        "globe",
        "gloom",
        "glory",
        "glove",
        "glow",
        "glue",
        "goat",
        "goddess",
        "gold",
        "good",
        "goose",
        "gorilla",
        "gospel",
        "gossip",
        "govern",
        "gown",
        "grab",
        "grace",
        "grain",
        "grant",
        "grape",
        "grass",
        "gravity",
        "great",
        "green",
        "grid",
        "grief",
        "grit",
        "grocery",
        "group",
        "grow",
        "grunt",
        "guard",
        "guess",
        "guide",
        "guilt",
        "guitar",
        "gun",
        "gym",
        "habit",
        "hair",
        "half",
        "hammer",
        "hamster",
        "hand",
        "happy",
        "harbor",
        "hard",
        "harsh",
        "harvest",
        "hat",
        "have",
        "hawk",
        "hazard",
        "head",
        "health",
        "heart",
        "heavy",
        "hedgehog",
        "height",
        "hello",
        "helmet",
        "help",
        "hen",
        "hero",
        "hidden",
        "high",
        "hill",
        "hint",
        "hip",
        "hire",
        "history",
        "hobby",
        "hockey",
        "hold",
        "hole",
        "holiday",
        "hollow",
        "home",
        "honey",
        "hood",
        "hope",
        "horn",
        "horror",
        "horse",
        "hospital",
        "host",
        "hotel",
        "hour",
        "hover",
        "hub",
        "huge",
        "human",
        "humble",
        "humor",
        "hundred",
        "hungry",
        "hunt",
        "hurdle",
        "hurry",
        "hurt",
        "husband",
        "hybrid",
        "ice",
        "icon",
        "idea",
        "identify",
        "idle",
        "ignore",
        "ill",
        "illegal",
        "illness",
        "image",
        "imitate",
        "immense",
        "immune",
        "impact",
        "impose",
        "improve",
        "impulse",
        "inch",
        "include",
        "income",
        "increase",
        "index",
        "indicate",
        "indoor",
        "industry",
        "infant",
        "inflict",
        "inform",
        "inhale",
        "inherit",
        "initial",
        "inject",
        "injury",
        "inmate",
        "inner",
        "innocent",
        "input",
        "inquiry",
        "insane",
        "insect",
        "inside",
        "inspire",
        "install",
        "intact",
        "interest",
        "into",
        "invest",
        "invite",
        "involve",
        "iron",
        "island",
        "isolate",
        "issue",
        "item",
        "ivory",
        "jacket",
        "jaguar",
        "jar",
        "jazz",
        "jealous",
        "jeans",
        "jelly",
        "jewel",
        "job",
        "join",
        "joke",
        "journey",
        "joy",
        "judge",
        "juice",
        "jump",
        "jungle",
        "junior",
        "junk",
        "just",
        "kangaroo",
        "keen",
        "keep",
        "ketchup",
        "key",
        "kick",
        "kid",
        "kidney",
        "kind",
        "kingdom",
        "kiss",
        "kit",
        "kitchen",
        "kite",
        "kitten",
        "kiwi",
        "knee",
        "knife",
        "knock",
        "know",
        "lab",
        "label",
        "labor",
        "ladder",
        "lady",
        "lake",
        "lamp",
        "language",
        "laptop",
        "large",
        "later",
        "latin",
        "laugh",
        "laundry",
        "lava",
        "law",
        "lawn",
        "lawsuit",
        "layer",
        "lazy",
        "leader",
        "leaf",
        "learn",
        "leave",
        "lecture",
        "left",
        "leg",
        "legal",
        "legend",
        "leisure",
        "lemon",
        "lend",
        "length",
        "lens",
        "leopard",
        "lesson",
        "letter",
        "level",
        "liar",
        "liberty",
        "library",
        "license",
        "life",
        "lift",
        "light",
        "like",
        "limb",
        "limit",
        "link",
        "lion",
        "liquid",
        "list",
        "little",
        "live",
        "lizard",
        "load",
        "loan",
        "lobster",
        "local",
        "lock",
        "logic",
        "lonely",
        "long",
        "loop",
        "lottery",
        "loud",
        "lounge",
        "love",
        "loyal",
        "lucky",
        "luggage",
        "lumber",
        "lunar",
        "lunch",
        "luxury",
        "lyrics",
        "machine",
        "mad",
        "magic",
        "magnet",
        "maid",
        "mail",
        "main",
        "major",
        "make",
        "mammal",
        "man",
        "manage",
        "mandate",
        "mango",
        "mansion",
        "manual",
        "maple",
        "marble",
        "march",
        "margin",
        "marine",
        "market",
        "marriage",
        "mask",
        "mass",
        "master",
        "match",
        "material",
        "math",
        "matrix",
        "matter",
        "maximum",
        "maze",
        "meadow",
        "mean",
        "measure",
        "meat",
        "mechanic",
        "medal",
        "media",
        "melody",
        "melt",
        "member",
        "memory",
        "mention",
        "menu",
        "mercy",
        "merge",
        "merit",
        "merry",
        "mesh",
        "message",
        "metal",
        "method",
        "middle",
        "midnight",
        "milk",
        "million",
        "mimic",
        "mind",
        "minimum",
        "minor",
        "minute",
        "miracle",
        "mirror",
        "misery",
        "miss",
        "mistake",
        "mix",
        "mixed",
        "mixture",
        "mobile",
        "model",
        "modify",
        "mom",
        "moment",
        "monitor",
        "monkey",
        "monster",
        "month",
        "moon",
        "moral",
        "more",
        "morning",
        "mosquito",
        "mother",
        "motion",
        "motor",
        "mountain",
        "mouse",
        "move",
        "movie",
        "much",
        "muffin",
        "mule",
        "multiply",
        "muscle",
        "museum",
        "mushroom",
        "music",
        "must",
        "mutual",
        "myself",
        "mystery",
        "myth",
        "naive",
        "name",
        "napkin",
        "narrow",
        "nasty",
        "nation",
        "nature",
        "near",
        "neck",
        "need",
        "negative",
        "neglect",
        "neither",
        "nephew",
        "nerve",
        "nest",
        "net",
        "network",
        "neutral",
        "never",
        "news",
        "next",
        "nice",
        "night",
        "noble",
        "noise",
        "nominee",
        "noodle",
        "normal",
        "north",
        "nose",
        "notable",
        "note",
        "nothing",
        "notice",
        "novel",
        "now",
        "nuclear",
        "number",
        "nurse",
        "nut",
        "oak",
        "obey",
        "object",
        "oblige",
        "obscure",
        "observe",
        "obtain",
        "obvious",
        "occur",
        "ocean",
        "october",
        "odor",
        "off",
        "offer",
        "office",
        "often",
        "oil",
        "okay",
        "old",
        "olive",
        "olympic",
        "omit",
        "once",
        "one",
        "onion",
        "online",
        "only",
        "open",
        "opera",
        "opinion",
        "oppose",
        "option",
        "orange",
        "orbit",
        "orchard",
        "order",
        "ordinary",
        "organ",
        "orient",
        "original",
        "orphan",
        "ostrich",
        "other",
        "outdoor",
        "outer",
        "output",
        "outside",
        "oval",
        "oven",
        "over",
        "own",
        "owner",
        "oxygen",
        "oyster",
        "ozone",
        "pact",
        "paddle",
        "page",
        "pair",
        "palace",
        "palm",
        "panda",
        "panel",
        "panic",
        "panther",
        "paper",
        "parade",
        "parent",
        "park",
        "parrot",
        "party",
        "pass",
        "patch",
        "path",
        "patient",
        "patrol",
        "pattern",
        "pause",
        "pave",
        "payment",
        "peace",
        "peanut",
        "pear",
        "peasant",
        "pelican",
        "pen",
        "penalty",
        "pencil",
        "people",
        "pepper",
        "perfect",
        "permit",
        "person",
        "pet",
        "phone",
        "photo",
        "phrase",
        "physical",
        "piano",
        "picnic",
        "picture",
        "piece",
        "pig",
        "pigeon",
        "pill",
        "pilot",
        "pink",
        "pioneer",
        "pipe",
        "pistol",
        "pitch",
        "pizza",
        "place",
        "planet",
        "plastic",
        "plate",
        "play",
        "please",
        "pledge",
        "pluck",
        "plug",
        "plunge",
        "poem",
        "poet",
        "point",
        "polar",
        "pole",
        "police",
        "pond",
        "pony",
        "pool",
        "popular",
        "portion",
        "position",
        "possible",
        "post",
        "potato",
        "pottery",
        "poverty",
        "powder",
        "power",
        "practice",
        "praise",
        "predict",
        "prefer",
        "prepare",
        "present",
        "pretty",
        "prevent",
        "price",
        "pride",
        "primary",
        "print",
        "priority",
        "prison",
        "private",
        "prize",
        "problem",
        "process",
        "produce",
        "profit",
        "program",
        "project",
        "promote",
        "proof",
        "property",
        "prosper",
        "protect",
        "proud",
        "provide",
        "public",
        "pudding",
        "pull",
        "pulp",
        "pulse",
        "pumpkin",
        "punch",
        "pupil",
        "puppy",
        "purchase",
        "purity",
        "purpose",
        "purse",
        "push",
        "put",
        "puzzle",
        "pyramid",
        "quality",
        "quantum",
        "quarter",
        "question",
        "quick",
        "quit",
        "quiz",
        "quote",
        "rabbit",
        "raccoon",
        "race",
        "rack",
        "radar",
        "radio",
        "rail",
        "rain",
        "raise",
        "rally",
        "ramp",
        "ranch",
        "random",
        "range",
        "rapid",
        "rare",
        "rate",
        "rather",
        "raven",
        "raw",
        "razor",
        "ready",
        "real",
        "reason",
        "rebel",
        "rebuild",
        "recall",
        "receive",
        "recipe",
        "record",
        "recycle",
        "reduce",
        "reflect",
        "reform",
        "refuse",
        "region",
        "regret",
        "regular",
        "reject",
        "relax",
        "release",
        "relief",
        "rely",
        "remain",
        "remember",
        "remind",
        "remove",
        "render",
        "renew",
        "rent",
        "reopen",
        "repair",
        "repeat",
        "replace",
        "report",
        "require",
        "rescue",
        "resemble",
        "resist",
        "resource",
        "response",
        "result",
        "retire",
        "retreat",
        "return",
        "reunion",
        "reveal",
        "review",
        "reward",
        "rhythm",
        "rib",
        "ribbon",
        "rice",
        "rich",
        "ride",
        "ridge",
        "rifle",
        "right",
        "rigid",
        "ring",
        "riot",
        "ripple",
        "risk",
        "ritual",
        "rival",
        "river",
        "road",
        "roast",
        "robot",
        "robust",
        "rocket",
        "romance",
        "roof",
        "rookie",
        "room",
        "rose",
        "rotate",
        "rough",
        "round",
        "route",
        "royal",
        "rubber",
        "rude",
        "rug",
        "rule",
        "run",
        "runway",
        "rural",
        "sad",
        "saddle",
        "sadness",
        "safe",
        "sail",
        "salad",
        "salmon",
        "salon",
        "salt",
        "salute",
        "same",
        "sample",
        "sand",
        "satisfy",
        "satoshi",
        "sauce",
        "sausage",
        "save",
        "say",
        "scale",
        "scan",
        "scare",
        "scatter",
        "scene",
        "scheme",
        "school",
        "science",
        "scissors",
        "scorpion",
        "scout",
        "scrap",
        "screen",
        "script",
        "scrub",
        "sea",
        "search",
        "season",
        "seat",
        "second",
        "secret",
        "section",
        "security",
        "seed",
        "seek",
        "segment",
        "select",
        "sell",
        "seminar",
        "senior",
        "sense",
        "sentence",
        "series",
        "service",
        "session",
        "settle",
        "setup",
        "seven",
        "shadow",
        "shaft",
        "shallow",
        "share",
        "shed",
        "shell",
        "sheriff",
        "shield",
        "shift",
        "shine",
        "ship",
        "shiver",
        "shock",
        "shoe",
        "shoot",
        "shop",
        "short",
        "shoulder",
        "shove",
        "shrimp",
        "shrug",
        "shuffle",
        "shy",
        "sibling",
        "sick",
        "side",
        "siege",
        "sight",
        "sign",
        "silent",
        "silk",
        "silly",
        "silver",
        "similar",
        "simple",
        "since",
        "sing",
        "siren",
        "sister",
        "situate",
        "six",
        "size",
        "skate",
        "sketch",
        "ski",
        "skill",
        "skin",
        "skirt",
        "skull",
        "slab",
        "slam",
        "sleep",
        "slender",
        "slice",
        "slide",
        "slight",
        "slim",
        "slogan",
        "slot",
        "slow",
        "slush",
        "small",
        "smart",
        "smile",
        "smoke",
        "smooth",
        "snack",
        "snake",
        "snap",
        "sniff",
        "snow",
        "soap",
        "soccer",
        "social",
        "sock",
        "soda",
        "soft",
        "solar",
        "soldier",
        "solid",
        "solution",
        "solve",
        "someone",
        "song",
        "soon",
        "sorry",
        "sort",
        "soul",
        "sound",
        "soup",
        "source",
        "south",
        "space",
        "spare",
        "spatial",
        "spawn",
        "speak",
        "special",
        "speed",
        "spell",
        "spend",
        "sphere",
        "spice",
        "spider",
        "spike",
        "spin",
        "spirit",
        "split",
        "spoil",
        "sponsor",
        "spoon",
        "sport",
        "spot",
        "spray",
        "spread",
        "spring",
        "spy",
        "square",
        "squeeze",
        "squirrel",
        "stable",
        "stadium",
        "staff",
        "stage",
        "stairs",
        "stamp",
        "stand",
        "start",
        "state",
        "stay",
        "steak",
        "steel",
        "stem",
        "step",
        "stereo",
        "stick",
        "still",
        "sting",
        "stock",
        "stomach",
        "stone",
        "stool",
        "story",
        "stove",
        "strategy",
        "street",
        "strike",
        "strong",
        "struggle",
        "student",
        "stuff",
        "stumble",
        "style",
        "subject",
        "submit",
        "subway",
        "success",
        "such",
        "sudden",
        "suffer",
        "sugar",
        "suggest",
        "suit",
        "summer",
        "sun",
        "sunny",
        "sunset",
        "super",
        "supply",
        "supreme",
        "sure",
        "surface",
        "surge",
        "surprise",
        "surround",
        "survey",
        "suspect",
        "sustain",
        "swallow",
        "swamp",
        "swap",
        "swarm",
        "swear",
        "sweet",
        "swift",
        "swim",
        "swing",
        "switch",
        "sword",
        "symbol",
        "symptom",
        "syrup",
        "system",
        "table",
        "tackle",
        "tag",
        "tail",
        "talent",
        "talk",
        "tank",
        "tape",
        "target",
        "task",
        "taste",
        "tattoo",
        "taxi",
        "teach",
        "team",
        "tell",
        "ten",
        "tenant",
        "tennis",
        "tent",
        "term",
        "test",
        "text",
        "thank",
        "that",
        "theme",
        "then",
        "theory",
        "there",
        "they",
        "thing",
        "this",
        "thought",
        "three",
        "thrive",
        "throw",
        "thumb",
        "thunder",
        "ticket",
        "tide",
        "tiger",
        "tilt",
        "timber",
        "time",
        "tiny",
        "tip",
        "tired",
        "tissue",
        "title",
        "toast",
        "tobacco",
        "today",
        "toddler",
        "toe",
        "together",
        "toilet",
        "token",
        "tomato",
        "tomorrow",
        "tone",
        "tongue",
        "tonight",
        "tool",
        "tooth",
        "top",
        "topic",
        "topple",
        "torch",
        "tornado",
        "tortoise",
        "toss",
        "total",
        "tourist",
        "toward",
        "tower",
        "town",
        "toy",
        "track",
        "trade",
        "traffic",
        "tragic",
        "train",
        "transfer",
        "trap",
        "trash",
        "travel",
        "tray",
        "treat",
        "tree",
        "trend",
        "trial",
        "tribe",
        "trick",
        "trigger",
        "trim",
        "trip",
        "trophy",
        "trouble",
        "truck",
        "true",
        "truly",
        "trumpet",
        "trust",
        "truth",
        "try",
        "tube",
        "tuition",
        "tumble",
        "tuna",
        "tunnel",
        "turkey",
        "turn",
        "turtle",
        "twelve",
        "twenty",
        "twice",
        "twin",
        "twist",
        "two",
        "type",
        "typical",
        "ugly",
        "umbrella",
        "unable",
        "unaware",
        "uncle",
        "uncover",
        "under",
        "undo",
        "unfair",
        "unfold",
        "unhappy",
        "uniform",
        "unique",
        "unit",
        "universe",
        "unknown",
        "unlock",
        "until",
        "unusual",
        "unveil",
        "update",
        "upgrade",
        "uphold",
        "upon",
        "upper",
        "upset",
        "urban",
        "urge",
        "usage",
        "use",
        "used",
        "useful",
        "useless",
        "usual",
        "utility",
        "vacant",
        "vacuum",
        "vague",
        "valid",
        "valley",
        "valve",
        "van",
        "vanish",
        "vapor",
        "various",
        "vast",
        "vault",
        "vehicle",
        "velvet",
        "vendor",
        "venture",
        "venue",
        "verb",
        "verify",
        "version",
        "very",
        "vessel",
        "veteran",
        "viable",
        "vibrant",
        "vicious",
        "victory",
        "video",
        "view",
        "village",
        "vintage",
        "violin",
        "virtual",
        "virus",
        "visa",
        "visit",
        "visual",
        "vital",
        "vivid",
        "vocal",
        "voice",
        "void",
        "volcano",
        "volume",
        "vote",
        "voyage",
        "wage",
        "wagon",
        "wait",
        "walk",
        "wall",
        "walnut",
        "want",
        "warfare",
        "warm",
        "warrior",
        "wash",
        "wasp",
        "waste",
        "water",
        "wave",
        "way",
        "wealth",
        "weapon",
        "wear",
        "weasel",
        "weather",
        "web",
        "wedding",
        "weekend",
        "weird",
        "welcome",
        "west",
        "wet",
        "whale",
        "what",
        "wheat",
        "wheel",
        "when",
        "where",
        "whip",
        "whisper",
        "wide",
        "width",
        "wife",
        "wild",
        "will",
        "win",
        "window",
        "wine",
        "wing",
        "wink",
        "winner",
        "winter",
        "wire",
        "wisdom",
        "wise",
        "wish",
        "witness",
        "wolf",
        "woman",
        "wonder",
        "wood",
        "wool",
        "word",
        "work",
        "world",
        "worry",
        "worth",
        "wrap",
        "wreck",
        "wrestle",
        "wrist",
        "write",
        "wrong",
        "yard",
        "year",
        "yellow",
        "you",
        "young",
        "youth",
        "zebra",
        "zero",
        "zone",
        "zoo"
      ];
    }
  });

  // ../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/_wordlists.js
  var require_wordlists = __commonJS({
    "../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/_wordlists.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var wordlists2 = {};
      exports.wordlists = wordlists2;
      var _default3;
      exports._default = _default3;
      try {
        exports._default = _default3 = require_czech();
        wordlists2.czech = _default3;
      } catch (err2) {
      }
      try {
        exports._default = _default3 = require_chinese_simplified();
        wordlists2.chinese_simplified = _default3;
      } catch (err2) {
      }
      try {
        exports._default = _default3 = require_chinese_traditional();
        wordlists2.chinese_traditional = _default3;
      } catch (err2) {
      }
      try {
        exports._default = _default3 = require_korean();
        wordlists2.korean = _default3;
      } catch (err2) {
      }
      try {
        exports._default = _default3 = require_french();
        wordlists2.french = _default3;
      } catch (err2) {
      }
      try {
        exports._default = _default3 = require_italian();
        wordlists2.italian = _default3;
      } catch (err2) {
      }
      try {
        exports._default = _default3 = require_spanish();
        wordlists2.spanish = _default3;
      } catch (err2) {
      }
      try {
        exports._default = _default3 = require_japanese();
        wordlists2.japanese = _default3;
        wordlists2.JA = _default3;
      } catch (err2) {
      }
      try {
        exports._default = _default3 = require_portuguese();
        wordlists2.portuguese = _default3;
      } catch (err2) {
      }
      try {
        exports._default = _default3 = require_english();
        wordlists2.english = _default3;
        wordlists2.EN = _default3;
      } catch (err2) {
      }
    }
  });

  // ../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/index.js
  var require_src = __commonJS({
    "../../node_modules/.pnpm/bip39@3.1.0/node_modules/bip39/src/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var sha256_1 = require_sha256();
      var sha512_1 = require_sha512();
      var pbkdf2_1 = require_pbkdf2();
      var utils_12 = require_utils();
      var _wordlists_1 = require_wordlists();
      var DEFAULT_WORDLIST = _wordlists_1._default;
      var INVALID_MNEMONIC = "Invalid mnemonic";
      var INVALID_ENTROPY = "Invalid entropy";
      var INVALID_CHECKSUM = "Invalid mnemonic checksum";
      var WORDLIST_REQUIRED = "A wordlist is required but a default could not be found.\nPlease pass a 2048 word array explicitly.";
      function normalize2(str) {
        return (str || "").normalize("NFKD");
      }
      function lpad(str, padString, length2) {
        while (str.length < length2) {
          str = padString + str;
        }
        return str;
      }
      function binaryToByte(bin) {
        return parseInt(bin, 2);
      }
      function bytesToBinary(bytes) {
        return bytes.map((x13) => lpad(x13.toString(2), "0", 8)).join("");
      }
      function deriveChecksumBits(entropyBuffer) {
        const ENT = entropyBuffer.length * 8;
        const CS = ENT / 32;
        const hash5 = sha256_1.sha256(Uint8Array.from(entropyBuffer));
        return bytesToBinary(Array.from(hash5)).slice(0, CS);
      }
      function salt(password) {
        return "mnemonic" + (password || "");
      }
      function mnemonicToSeedSync5(mnemonic, password) {
        const mnemonicBuffer = Uint8Array.from(Buffer2.from(normalize2(mnemonic), "utf8"));
        const saltBuffer = Uint8Array.from(Buffer2.from(salt(normalize2(password)), "utf8"));
        const res = pbkdf2_1.pbkdf2(sha512_1.sha512, mnemonicBuffer, saltBuffer, {
          c: 2048,
          dkLen: 64
        });
        return Buffer2.from(res);
      }
      exports.mnemonicToSeedSync = mnemonicToSeedSync5;
      function mnemonicToSeed(mnemonic, password) {
        const mnemonicBuffer = Uint8Array.from(Buffer2.from(normalize2(mnemonic), "utf8"));
        const saltBuffer = Uint8Array.from(Buffer2.from(salt(normalize2(password)), "utf8"));
        return pbkdf2_1.pbkdf2Async(sha512_1.sha512, mnemonicBuffer, saltBuffer, {
          c: 2048,
          dkLen: 64
        }).then((res) => Buffer2.from(res));
      }
      exports.mnemonicToSeed = mnemonicToSeed;
      function mnemonicToEntropy(mnemonic, wordlist) {
        wordlist = wordlist || DEFAULT_WORDLIST;
        if (!wordlist) {
          throw new Error(WORDLIST_REQUIRED);
        }
        const words = normalize2(mnemonic).split(" ");
        if (words.length % 3 !== 0) {
          throw new Error(INVALID_MNEMONIC);
        }
        const bits = words.map((word) => {
          const index2 = wordlist.indexOf(word);
          if (index2 === -1) {
            throw new Error(INVALID_MNEMONIC);
          }
          return lpad(index2.toString(2), "0", 11);
        }).join("");
        const dividerIndex = Math.floor(bits.length / 33) * 32;
        const entropyBits = bits.slice(0, dividerIndex);
        const checksumBits = bits.slice(dividerIndex);
        const entropyBytes = entropyBits.match(/(.{1,8})/g).map(binaryToByte);
        if (entropyBytes.length < 16) {
          throw new Error(INVALID_ENTROPY);
        }
        if (entropyBytes.length > 32) {
          throw new Error(INVALID_ENTROPY);
        }
        if (entropyBytes.length % 4 !== 0) {
          throw new Error(INVALID_ENTROPY);
        }
        const entropy = Buffer2.from(entropyBytes);
        const newChecksum = deriveChecksumBits(entropy);
        if (newChecksum !== checksumBits) {
          throw new Error(INVALID_CHECKSUM);
        }
        return entropy.toString("hex");
      }
      exports.mnemonicToEntropy = mnemonicToEntropy;
      function entropyToMnemonic(entropy, wordlist) {
        if (!Buffer2.isBuffer(entropy)) {
          entropy = Buffer2.from(entropy, "hex");
        }
        wordlist = wordlist || DEFAULT_WORDLIST;
        if (!wordlist) {
          throw new Error(WORDLIST_REQUIRED);
        }
        if (entropy.length < 16) {
          throw new TypeError(INVALID_ENTROPY);
        }
        if (entropy.length > 32) {
          throw new TypeError(INVALID_ENTROPY);
        }
        if (entropy.length % 4 !== 0) {
          throw new TypeError(INVALID_ENTROPY);
        }
        const entropyBits = bytesToBinary(Array.from(entropy));
        const checksumBits = deriveChecksumBits(entropy);
        const bits = entropyBits + checksumBits;
        const chunks = bits.match(/(.{1,11})/g);
        const words = chunks.map((binary) => {
          const index2 = binaryToByte(binary);
          return wordlist[index2];
        });
        return wordlist[0] === "\u3042\u3044\u3053\u304F\u3057\u3093" ? words.join("\u3000") : words.join(" ");
      }
      exports.entropyToMnemonic = entropyToMnemonic;
      function generateMnemonic2(strength, rng2, wordlist) {
        strength = strength || 128;
        if (strength % 32 !== 0) {
          throw new TypeError(INVALID_ENTROPY);
        }
        rng2 = rng2 || ((size5) => Buffer2.from(utils_12.randomBytes(size5)));
        return entropyToMnemonic(rng2(strength / 8), wordlist);
      }
      exports.generateMnemonic = generateMnemonic2;
      function validateMnemonic4(mnemonic, wordlist) {
        try {
          mnemonicToEntropy(mnemonic, wordlist);
        } catch (e2) {
          return false;
        }
        return true;
      }
      exports.validateMnemonic = validateMnemonic4;
      function setDefaultWordlist(language) {
        const result = _wordlists_1.wordlists[language];
        if (result) {
          DEFAULT_WORDLIST = result;
        } else {
          throw new Error('Could not find wordlist for language "' + language + '"');
        }
      }
      exports.setDefaultWordlist = setDefaultWordlist;
      function getDefaultWordlist() {
        if (!DEFAULT_WORDLIST) {
          throw new Error("No Default Wordlist set");
        }
        return Object.keys(_wordlists_1.wordlists).filter((lang) => {
          if (lang === "JA" || lang === "EN") {
            return false;
          }
          return _wordlists_1.wordlists[lang].every((word, index2) => word === DEFAULT_WORDLIST[index2]);
        })[0];
      }
      exports.getDefaultWordlist = getDefaultWordlist;
      var _wordlists_2 = require_wordlists();
      exports.wordlists = _wordlists_2.wordlists;
    }
  });

  // (disabled):../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
  var require_buffer2 = __commonJS({
    "(disabled):../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js"() {
      "use strict";
      init_node_compat_inject();
    }
  });

  // ../../node_modules/.pnpm/bn.js@5.2.3/node_modules/bn.js/lib/bn.js
  var require_bn = __commonJS({
    "../../node_modules/.pnpm/bn.js@5.2.3/node_modules/bn.js/lib/bn.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      (function(module2, exports2) {
        "use strict";
        function assert12(val, msg) {
          if (!val) throw new Error(msg || "Assertion failed");
        }
        function inherits(ctor, superCtor) {
          ctor.super_ = superCtor;
          var TempCtor = function() {
          };
          TempCtor.prototype = superCtor.prototype;
          ctor.prototype = new TempCtor();
          ctor.prototype.constructor = ctor;
        }
        function BN4(number5, base4, endian) {
          if (BN4.isBN(number5)) {
            return number5;
          }
          this.negative = 0;
          this.words = null;
          this.length = 0;
          this.red = null;
          if (number5 !== null) {
            if (base4 === "le" || base4 === "be") {
              endian = base4;
              base4 = 10;
            }
            this._init(number5 || 0, base4 || 10, endian || "be");
          }
        }
        if (typeof module2 === "object") {
          module2.exports = BN4;
        } else {
          exports2.BN = BN4;
        }
        BN4.BN = BN4;
        BN4.wordSize = 26;
        var Buffer6;
        try {
          if (typeof window !== "undefined" && typeof window.Buffer !== "undefined") {
            Buffer6 = window.Buffer;
          } else {
            Buffer6 = require_buffer2().Buffer;
          }
        } catch (e2) {
        }
        BN4.isBN = function isBN(num2) {
          if (num2 instanceof BN4) {
            return true;
          }
          return num2 !== null && typeof num2 === "object" && num2.constructor.wordSize === BN4.wordSize && Array.isArray(num2.words);
        };
        BN4.max = function max(left, right) {
          if (left.cmp(right) > 0) return left;
          return right;
        };
        BN4.min = function min(left, right) {
          if (left.cmp(right) < 0) return left;
          return right;
        };
        BN4.prototype._init = function init2(number5, base4, endian) {
          if (typeof number5 === "number") {
            return this._initNumber(number5, base4, endian);
          }
          if (typeof number5 === "object") {
            return this._initArray(number5, base4, endian);
          }
          if (base4 === "hex") {
            base4 = 16;
          }
          assert12(base4 === (base4 | 0) && base4 >= 2 && base4 <= 36);
          number5 = number5.toString().replace(/\s+/g, "");
          var start = 0;
          if (number5[0] === "-") {
            start++;
            this.negative = 1;
          }
          if (start < number5.length) {
            if (base4 === 16) {
              this._parseHex(number5, start, endian);
            } else {
              this._parseBase(number5, base4, start);
              if (endian === "le") {
                this._initArray(this.toArray(), base4, endian);
              }
            }
          }
        };
        BN4.prototype._initNumber = function _initNumber(number5, base4, endian) {
          if (number5 < 0) {
            this.negative = 1;
            number5 = -number5;
          }
          if (number5 < 67108864) {
            this.words = [number5 & 67108863];
            this.length = 1;
          } else if (number5 < 4503599627370496) {
            this.words = [
              number5 & 67108863,
              number5 / 67108864 & 67108863
            ];
            this.length = 2;
          } else {
            assert12(number5 < 9007199254740992);
            this.words = [
              number5 & 67108863,
              number5 / 67108864 & 67108863,
              1
            ];
            this.length = 3;
          }
          if (endian !== "le") return;
          this._initArray(this.toArray(), base4, endian);
        };
        BN4.prototype._initArray = function _initArray(number5, base4, endian) {
          assert12(typeof number5.length === "number");
          if (number5.length <= 0) {
            this.words = [0];
            this.length = 1;
            return this;
          }
          this.length = Math.ceil(number5.length / 3);
          this.words = new Array(this.length);
          for (var i5 = 0; i5 < this.length; i5++) {
            this.words[i5] = 0;
          }
          var j6, w7;
          var off = 0;
          if (endian === "be") {
            for (i5 = number5.length - 1, j6 = 0; i5 >= 0; i5 -= 3) {
              w7 = number5[i5] | number5[i5 - 1] << 8 | number5[i5 - 2] << 16;
              this.words[j6] |= w7 << off & 67108863;
              this.words[j6 + 1] = w7 >>> 26 - off & 67108863;
              off += 24;
              if (off >= 26) {
                off -= 26;
                j6++;
              }
            }
          } else if (endian === "le") {
            for (i5 = 0, j6 = 0; i5 < number5.length; i5 += 3) {
              w7 = number5[i5] | number5[i5 + 1] << 8 | number5[i5 + 2] << 16;
              this.words[j6] |= w7 << off & 67108863;
              this.words[j6 + 1] = w7 >>> 26 - off & 67108863;
              off += 24;
              if (off >= 26) {
                off -= 26;
                j6++;
              }
            }
          }
          return this._strip();
        };
        function parseHex4Bits(string7, index2) {
          var c7 = string7.charCodeAt(index2);
          if (c7 >= 48 && c7 <= 57) {
            return c7 - 48;
          } else if (c7 >= 65 && c7 <= 70) {
            return c7 - 55;
          } else if (c7 >= 97 && c7 <= 102) {
            return c7 - 87;
          } else {
            assert12(false, "Invalid character in " + string7);
          }
        }
        function parseHexByte(string7, lowerBound, index2) {
          var r3 = parseHex4Bits(string7, index2);
          if (index2 - 1 >= lowerBound) {
            r3 |= parseHex4Bits(string7, index2 - 1) << 4;
          }
          return r3;
        }
        BN4.prototype._parseHex = function _parseHex(number5, start, endian) {
          this.length = Math.ceil((number5.length - start) / 6);
          this.words = new Array(this.length);
          for (var i5 = 0; i5 < this.length; i5++) {
            this.words[i5] = 0;
          }
          var off = 0;
          var j6 = 0;
          var w7;
          if (endian === "be") {
            for (i5 = number5.length - 1; i5 >= start; i5 -= 2) {
              w7 = parseHexByte(number5, start, i5) << off;
              this.words[j6] |= w7 & 67108863;
              if (off >= 18) {
                off -= 18;
                j6 += 1;
                this.words[j6] |= w7 >>> 26;
              } else {
                off += 8;
              }
            }
          } else {
            var parseLength = number5.length - start;
            for (i5 = parseLength % 2 === 0 ? start + 1 : start; i5 < number5.length; i5 += 2) {
              w7 = parseHexByte(number5, start, i5) << off;
              this.words[j6] |= w7 & 67108863;
              if (off >= 18) {
                off -= 18;
                j6 += 1;
                this.words[j6] |= w7 >>> 26;
              } else {
                off += 8;
              }
            }
          }
          this._strip();
        };
        function parseBase(str, start, end, mul3) {
          var r3 = 0;
          var b9 = 0;
          var len = Math.min(str.length, end);
          for (var i5 = start; i5 < len; i5++) {
            var c7 = str.charCodeAt(i5) - 48;
            r3 *= mul3;
            if (c7 >= 49) {
              b9 = c7 - 49 + 10;
            } else if (c7 >= 17) {
              b9 = c7 - 17 + 10;
            } else {
              b9 = c7;
            }
            assert12(c7 >= 0 && b9 < mul3, "Invalid character");
            r3 += b9;
          }
          return r3;
        }
        BN4.prototype._parseBase = function _parseBase(number5, base4, start) {
          this.words = [0];
          this.length = 1;
          for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base4) {
            limbLen++;
          }
          limbLen--;
          limbPow = limbPow / base4 | 0;
          var total = number5.length - start;
          var mod3 = total % limbLen;
          var end = Math.min(total, total - mod3) + start;
          var word = 0;
          for (var i5 = start; i5 < end; i5 += limbLen) {
            word = parseBase(number5, i5, i5 + limbLen, base4);
            this.imuln(limbPow);
            if (this.words[0] + word < 67108864) {
              this.words[0] += word;
            } else {
              this._iaddn(word);
            }
          }
          if (mod3 !== 0) {
            var pow = 1;
            word = parseBase(number5, i5, number5.length, base4);
            for (i5 = 0; i5 < mod3; i5++) {
              pow *= base4;
            }
            this.imuln(pow);
            if (this.words[0] + word < 67108864) {
              this.words[0] += word;
            } else {
              this._iaddn(word);
            }
          }
          this._strip();
        };
        BN4.prototype.copy = function copy(dest) {
          dest.words = new Array(this.length);
          for (var i5 = 0; i5 < this.length; i5++) {
            dest.words[i5] = this.words[i5];
          }
          dest.length = this.length;
          dest.negative = this.negative;
          dest.red = this.red;
        };
        function move(dest, src2) {
          dest.words = src2.words;
          dest.length = src2.length;
          dest.negative = src2.negative;
          dest.red = src2.red;
        }
        BN4.prototype._move = function _move(dest) {
          move(dest, this);
        };
        BN4.prototype.clone = function clone3() {
          var r3 = new BN4(null);
          this.copy(r3);
          return r3;
        };
        BN4.prototype._expand = function _expand(size5) {
          while (this.length < size5) {
            this.words[this.length++] = 0;
          }
          return this;
        };
        BN4.prototype._strip = function strip() {
          while (this.length > 1 && this.words[this.length - 1] === 0) {
            this.length--;
          }
          return this._normSign();
        };
        BN4.prototype._normSign = function _normSign() {
          if (this.length === 1 && this.words[0] === 0) {
            this.negative = 0;
          }
          return this;
        };
        if (typeof Symbol !== "undefined" && typeof Symbol.for === "function") {
          try {
            BN4.prototype[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = inspect4;
          } catch (e2) {
            BN4.prototype.inspect = inspect4;
          }
        } else {
          BN4.prototype.inspect = inspect4;
        }
        function inspect4() {
          return (this.red ? "<BN-R: " : "<BN: ") + this.toString(16) + ">";
        }
        var zeros = [
          "",
          "0",
          "00",
          "000",
          "0000",
          "00000",
          "000000",
          "0000000",
          "00000000",
          "000000000",
          "0000000000",
          "00000000000",
          "000000000000",
          "0000000000000",
          "00000000000000",
          "000000000000000",
          "0000000000000000",
          "00000000000000000",
          "000000000000000000",
          "0000000000000000000",
          "00000000000000000000",
          "000000000000000000000",
          "0000000000000000000000",
          "00000000000000000000000",
          "000000000000000000000000",
          "0000000000000000000000000"
        ];
        var groupSizes = [
          0,
          0,
          25,
          16,
          12,
          11,
          10,
          9,
          8,
          8,
          7,
          7,
          7,
          7,
          6,
          6,
          6,
          6,
          6,
          6,
          6,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5
        ];
        var groupBases = [
          0,
          0,
          33554432,
          43046721,
          16777216,
          48828125,
          60466176,
          40353607,
          16777216,
          43046721,
          1e7,
          19487171,
          35831808,
          62748517,
          7529536,
          11390625,
          16777216,
          24137569,
          34012224,
          47045881,
          64e6,
          4084101,
          5153632,
          6436343,
          7962624,
          9765625,
          11881376,
          14348907,
          17210368,
          20511149,
          243e5,
          28629151,
          33554432,
          39135393,
          45435424,
          52521875,
          60466176
        ];
        BN4.prototype.toString = function toString5(base4, padding) {
          base4 = base4 || 10;
          padding = padding | 0 || 1;
          var out;
          if (base4 === 16 || base4 === "hex") {
            out = "";
            var off = 0;
            var carry = 0;
            for (var i5 = 0; i5 < this.length; i5++) {
              var w7 = this.words[i5];
              var word = ((w7 << off | carry) & 16777215).toString(16);
              carry = w7 >>> 24 - off & 16777215;
              off += 2;
              if (off >= 26) {
                off -= 26;
                i5--;
              }
              if (carry !== 0 || i5 !== this.length - 1) {
                out = zeros[6 - word.length] + word + out;
              } else {
                out = word + out;
              }
            }
            if (carry !== 0) {
              out = carry.toString(16) + out;
            }
            while (out.length % padding !== 0) {
              out = "0" + out;
            }
            if (this.negative !== 0) {
              out = "-" + out;
            }
            return out;
          }
          if (base4 === (base4 | 0) && base4 >= 2 && base4 <= 36) {
            var groupSize = groupSizes[base4];
            var groupBase = groupBases[base4];
            out = "";
            var c7 = this.clone();
            c7.negative = 0;
            while (!c7.isZero()) {
              var r3 = c7.modrn(groupBase).toString(base4);
              c7 = c7.idivn(groupBase);
              if (!c7.isZero()) {
                out = zeros[groupSize - r3.length] + r3 + out;
              } else {
                out = r3 + out;
              }
            }
            if (this.isZero()) {
              out = "0" + out;
            }
            while (out.length % padding !== 0) {
              out = "0" + out;
            }
            if (this.negative !== 0) {
              out = "-" + out;
            }
            return out;
          }
          assert12(false, "Base should be between 2 and 36");
        };
        BN4.prototype.toNumber = function toNumber3() {
          var ret = this.words[0];
          if (this.length === 2) {
            ret += this.words[1] * 67108864;
          } else if (this.length === 3 && this.words[2] === 1) {
            ret += 4503599627370496 + this.words[1] * 67108864;
          } else if (this.length > 2) {
            assert12(false, "Number can only safely store up to 53 bits");
          }
          return this.negative !== 0 ? -ret : ret;
        };
        BN4.prototype.toJSON = function toJSON2() {
          return this.toString(16, 2);
        };
        if (Buffer6) {
          BN4.prototype.toBuffer = function toBuffer2(endian, length2) {
            return this.toArrayLike(Buffer6, endian, length2);
          };
        }
        BN4.prototype.toArray = function toArray(endian, length2) {
          return this.toArrayLike(Array, endian, length2);
        };
        var allocate = function allocate2(ArrayType, size5) {
          if (ArrayType.allocUnsafe) {
            return ArrayType.allocUnsafe(size5);
          }
          return new ArrayType(size5);
        };
        BN4.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length2) {
          this._strip();
          var byteLength = this.byteLength();
          var reqLength = length2 || Math.max(1, byteLength);
          assert12(byteLength <= reqLength, "byte array longer than desired length");
          assert12(reqLength > 0, "Requested array length <= 0");
          var res = allocate(ArrayType, reqLength);
          var postfix = endian === "le" ? "LE" : "BE";
          this["_toArrayLike" + postfix](res, byteLength);
          return res;
        };
        BN4.prototype._toArrayLikeLE = function _toArrayLikeLE(res, byteLength) {
          var position = 0;
          var carry = 0;
          for (var i5 = 0, shift = 0; i5 < this.length; i5++) {
            var word = this.words[i5] << shift | carry;
            res[position++] = word & 255;
            if (position < res.length) {
              res[position++] = word >> 8 & 255;
            }
            if (position < res.length) {
              res[position++] = word >> 16 & 255;
            }
            if (shift === 6) {
              if (position < res.length) {
                res[position++] = word >> 24 & 255;
              }
              carry = 0;
              shift = 0;
            } else {
              carry = word >>> 24;
              shift += 2;
            }
          }
          if (position < res.length) {
            res[position++] = carry;
            while (position < res.length) {
              res[position++] = 0;
            }
          }
        };
        BN4.prototype._toArrayLikeBE = function _toArrayLikeBE(res, byteLength) {
          var position = res.length - 1;
          var carry = 0;
          for (var i5 = 0, shift = 0; i5 < this.length; i5++) {
            var word = this.words[i5] << shift | carry;
            res[position--] = word & 255;
            if (position >= 0) {
              res[position--] = word >> 8 & 255;
            }
            if (position >= 0) {
              res[position--] = word >> 16 & 255;
            }
            if (shift === 6) {
              if (position >= 0) {
                res[position--] = word >> 24 & 255;
              }
              carry = 0;
              shift = 0;
            } else {
              carry = word >>> 24;
              shift += 2;
            }
          }
          if (position >= 0) {
            res[position--] = carry;
            while (position >= 0) {
              res[position--] = 0;
            }
          }
        };
        if (Math.clz32) {
          BN4.prototype._countBits = function _countBits(w7) {
            return 32 - Math.clz32(w7);
          };
        } else {
          BN4.prototype._countBits = function _countBits(w7) {
            var t = w7;
            var r3 = 0;
            if (t >= 4096) {
              r3 += 13;
              t >>>= 13;
            }
            if (t >= 64) {
              r3 += 7;
              t >>>= 7;
            }
            if (t >= 8) {
              r3 += 4;
              t >>>= 4;
            }
            if (t >= 2) {
              r3 += 2;
              t >>>= 2;
            }
            return r3 + t;
          };
        }
        BN4.prototype._zeroBits = function _zeroBits(w7) {
          if (w7 === 0) return 26;
          var t = w7;
          var r3 = 0;
          if ((t & 8191) === 0) {
            r3 += 13;
            t >>>= 13;
          }
          if ((t & 127) === 0) {
            r3 += 7;
            t >>>= 7;
          }
          if ((t & 15) === 0) {
            r3 += 4;
            t >>>= 4;
          }
          if ((t & 3) === 0) {
            r3 += 2;
            t >>>= 2;
          }
          if ((t & 1) === 0) {
            r3++;
          }
          return r3;
        };
        BN4.prototype.bitLength = function bitLength() {
          var w7 = this.words[this.length - 1];
          var hi2 = this._countBits(w7);
          return (this.length - 1) * 26 + hi2;
        };
        function toBitArray(num2) {
          var w7 = new Array(num2.bitLength());
          for (var bit = 0; bit < w7.length; bit++) {
            var off = bit / 26 | 0;
            var wbit = bit % 26;
            w7[bit] = num2.words[off] >>> wbit & 1;
          }
          return w7;
        }
        BN4.prototype.zeroBits = function zeroBits() {
          if (this.isZero()) return 0;
          var r3 = 0;
          for (var i5 = 0; i5 < this.length; i5++) {
            var b9 = this._zeroBits(this.words[i5]);
            r3 += b9;
            if (b9 !== 26) break;
          }
          return r3;
        };
        BN4.prototype.byteLength = function byteLength() {
          return Math.ceil(this.bitLength() / 8);
        };
        BN4.prototype.toTwos = function toTwos(width) {
          if (this.negative !== 0) {
            return this.abs().inotn(width).iaddn(1);
          }
          return this.clone();
        };
        BN4.prototype.fromTwos = function fromTwos(width) {
          if (this.testn(width - 1)) {
            return this.notn(width).iaddn(1).ineg();
          }
          return this.clone();
        };
        BN4.prototype.isNeg = function isNeg() {
          return this.negative !== 0;
        };
        BN4.prototype.neg = function neg3() {
          return this.clone().ineg();
        };
        BN4.prototype.ineg = function ineg() {
          if (!this.isZero()) {
            this.negative ^= 1;
          }
          return this;
        };
        BN4.prototype.iuor = function iuor(num2) {
          while (this.length < num2.length) {
            this.words[this.length++] = 0;
          }
          for (var i5 = 0; i5 < num2.length; i5++) {
            this.words[i5] = this.words[i5] | num2.words[i5];
          }
          return this._strip();
        };
        BN4.prototype.ior = function ior(num2) {
          assert12((this.negative | num2.negative) === 0);
          return this.iuor(num2);
        };
        BN4.prototype.or = function or5(num2) {
          if (this.length > num2.length) return this.clone().ior(num2);
          return num2.clone().ior(this);
        };
        BN4.prototype.uor = function uor(num2) {
          if (this.length > num2.length) return this.clone().iuor(num2);
          return num2.clone().iuor(this);
        };
        BN4.prototype.iuand = function iuand(num2) {
          var b9;
          if (this.length > num2.length) {
            b9 = num2;
          } else {
            b9 = this;
          }
          for (var i5 = 0; i5 < b9.length; i5++) {
            this.words[i5] = this.words[i5] & num2.words[i5];
          }
          this.length = b9.length;
          return this._strip();
        };
        BN4.prototype.iand = function iand(num2) {
          assert12((this.negative | num2.negative) === 0);
          return this.iuand(num2);
        };
        BN4.prototype.and = function and(num2) {
          if (this.length > num2.length) return this.clone().iand(num2);
          return num2.clone().iand(this);
        };
        BN4.prototype.uand = function uand(num2) {
          if (this.length > num2.length) return this.clone().iuand(num2);
          return num2.clone().iuand(this);
        };
        BN4.prototype.iuxor = function iuxor(num2) {
          var a5;
          var b9;
          if (this.length > num2.length) {
            a5 = this;
            b9 = num2;
          } else {
            a5 = num2;
            b9 = this;
          }
          for (var i5 = 0; i5 < b9.length; i5++) {
            this.words[i5] = a5.words[i5] ^ b9.words[i5];
          }
          if (this !== a5) {
            for (; i5 < a5.length; i5++) {
              this.words[i5] = a5.words[i5];
            }
          }
          this.length = a5.length;
          return this._strip();
        };
        BN4.prototype.ixor = function ixor(num2) {
          assert12((this.negative | num2.negative) === 0);
          return this.iuxor(num2);
        };
        BN4.prototype.xor = function xor4(num2) {
          if (this.length > num2.length) return this.clone().ixor(num2);
          return num2.clone().ixor(this);
        };
        BN4.prototype.uxor = function uxor(num2) {
          if (this.length > num2.length) return this.clone().iuxor(num2);
          return num2.clone().iuxor(this);
        };
        BN4.prototype.inotn = function inotn(width) {
          assert12(typeof width === "number" && width >= 0);
          var bytesNeeded = Math.ceil(width / 26) | 0;
          var bitsLeft = width % 26;
          this._expand(bytesNeeded);
          if (bitsLeft > 0) {
            bytesNeeded--;
          }
          for (var i5 = 0; i5 < bytesNeeded; i5++) {
            this.words[i5] = ~this.words[i5] & 67108863;
          }
          if (bitsLeft > 0) {
            this.words[i5] = ~this.words[i5] & 67108863 >> 26 - bitsLeft;
          }
          return this._strip();
        };
        BN4.prototype.notn = function notn(width) {
          return this.clone().inotn(width);
        };
        BN4.prototype.setn = function setn(bit, val) {
          assert12(typeof bit === "number" && bit >= 0);
          var off = bit / 26 | 0;
          var wbit = bit % 26;
          this._expand(off + 1);
          if (val) {
            this.words[off] = this.words[off] | 1 << wbit;
          } else {
            this.words[off] = this.words[off] & ~(1 << wbit);
          }
          return this._strip();
        };
        BN4.prototype.iadd = function iadd(num2) {
          var r3;
          if (this.negative !== 0 && num2.negative === 0) {
            this.negative = 0;
            r3 = this.isub(num2);
            this.negative ^= 1;
            return this._normSign();
          } else if (this.negative === 0 && num2.negative !== 0) {
            num2.negative = 0;
            r3 = this.isub(num2);
            num2.negative = 1;
            return r3._normSign();
          }
          var a5, b9;
          if (this.length > num2.length) {
            a5 = this;
            b9 = num2;
          } else {
            a5 = num2;
            b9 = this;
          }
          var carry = 0;
          for (var i5 = 0; i5 < b9.length; i5++) {
            r3 = (a5.words[i5] | 0) + (b9.words[i5] | 0) + carry;
            this.words[i5] = r3 & 67108863;
            carry = r3 >>> 26;
          }
          for (; carry !== 0 && i5 < a5.length; i5++) {
            r3 = (a5.words[i5] | 0) + carry;
            this.words[i5] = r3 & 67108863;
            carry = r3 >>> 26;
          }
          this.length = a5.length;
          if (carry !== 0) {
            this.words[this.length] = carry;
            this.length++;
          } else if (a5 !== this) {
            for (; i5 < a5.length; i5++) {
              this.words[i5] = a5.words[i5];
            }
          }
          return this;
        };
        BN4.prototype.add = function add5(num2) {
          var res;
          if (num2.negative !== 0 && this.negative === 0) {
            num2.negative = 0;
            res = this.sub(num2);
            num2.negative ^= 1;
            return res;
          } else if (num2.negative === 0 && this.negative !== 0) {
            this.negative = 0;
            res = num2.sub(this);
            this.negative = 1;
            return res;
          }
          if (this.length > num2.length) return this.clone().iadd(num2);
          return num2.clone().iadd(this);
        };
        BN4.prototype.isub = function isub(num2) {
          if (num2.negative !== 0) {
            num2.negative = 0;
            var r3 = this.iadd(num2);
            num2.negative = 1;
            return r3._normSign();
          } else if (this.negative !== 0) {
            this.negative = 0;
            this.iadd(num2);
            this.negative = 1;
            return this._normSign();
          }
          var cmp = this.cmp(num2);
          if (cmp === 0) {
            this.negative = 0;
            this.length = 1;
            this.words[0] = 0;
            return this;
          }
          var a5, b9;
          if (cmp > 0) {
            a5 = this;
            b9 = num2;
          } else {
            a5 = num2;
            b9 = this;
          }
          var carry = 0;
          for (var i5 = 0; i5 < b9.length; i5++) {
            r3 = (a5.words[i5] | 0) - (b9.words[i5] | 0) + carry;
            carry = r3 >> 26;
            this.words[i5] = r3 & 67108863;
          }
          for (; carry !== 0 && i5 < a5.length; i5++) {
            r3 = (a5.words[i5] | 0) + carry;
            carry = r3 >> 26;
            this.words[i5] = r3 & 67108863;
          }
          if (carry === 0 && i5 < a5.length && a5 !== this) {
            for (; i5 < a5.length; i5++) {
              this.words[i5] = a5.words[i5];
            }
          }
          this.length = Math.max(this.length, i5);
          if (a5 !== this) {
            this.negative = 1;
          }
          return this._strip();
        };
        BN4.prototype.sub = function sub(num2) {
          return this.clone().isub(num2);
        };
        function smallMulTo(self2, num2, out) {
          out.negative = num2.negative ^ self2.negative;
          var len = self2.length + num2.length | 0;
          out.length = len;
          len = len - 1 | 0;
          var a5 = self2.words[0] | 0;
          var b9 = num2.words[0] | 0;
          var r3 = a5 * b9;
          var lo4 = r3 & 67108863;
          var carry = r3 / 67108864 | 0;
          out.words[0] = lo4;
          for (var k7 = 1; k7 < len; k7++) {
            var ncarry = carry >>> 26;
            var rword = carry & 67108863;
            var maxJ = Math.min(k7, num2.length - 1);
            for (var j6 = Math.max(0, k7 - self2.length + 1); j6 <= maxJ; j6++) {
              var i5 = k7 - j6 | 0;
              a5 = self2.words[i5] | 0;
              b9 = num2.words[j6] | 0;
              r3 = a5 * b9 + rword;
              ncarry += r3 / 67108864 | 0;
              rword = r3 & 67108863;
            }
            out.words[k7] = rword | 0;
            carry = ncarry | 0;
          }
          if (carry !== 0) {
            out.words[k7] = carry | 0;
          } else {
            out.length--;
          }
          return out._strip();
        }
        var comb10MulTo = function comb10MulTo2(self2, num2, out) {
          var a5 = self2.words;
          var b9 = num2.words;
          var o5 = out.words;
          var c7 = 0;
          var lo4;
          var mid;
          var hi2;
          var a0 = a5[0] | 0;
          var al0 = a0 & 8191;
          var ah0 = a0 >>> 13;
          var a1 = a5[1] | 0;
          var al1 = a1 & 8191;
          var ah1 = a1 >>> 13;
          var a22 = a5[2] | 0;
          var al2 = a22 & 8191;
          var ah2 = a22 >>> 13;
          var a32 = a5[3] | 0;
          var al3 = a32 & 8191;
          var ah3 = a32 >>> 13;
          var a42 = a5[4] | 0;
          var al4 = a42 & 8191;
          var ah4 = a42 >>> 13;
          var a52 = a5[5] | 0;
          var al5 = a52 & 8191;
          var ah5 = a52 >>> 13;
          var a6 = a5[6] | 0;
          var al6 = a6 & 8191;
          var ah6 = a6 >>> 13;
          var a7 = a5[7] | 0;
          var al7 = a7 & 8191;
          var ah7 = a7 >>> 13;
          var a8 = a5[8] | 0;
          var al8 = a8 & 8191;
          var ah8 = a8 >>> 13;
          var a9 = a5[9] | 0;
          var al9 = a9 & 8191;
          var ah9 = a9 >>> 13;
          var b0 = b9[0] | 0;
          var bl0 = b0 & 8191;
          var bh0 = b0 >>> 13;
          var b1 = b9[1] | 0;
          var bl1 = b1 & 8191;
          var bh1 = b1 >>> 13;
          var b22 = b9[2] | 0;
          var bl2 = b22 & 8191;
          var bh2 = b22 >>> 13;
          var b32 = b9[3] | 0;
          var bl3 = b32 & 8191;
          var bh3 = b32 >>> 13;
          var b42 = b9[4] | 0;
          var bl4 = b42 & 8191;
          var bh4 = b42 >>> 13;
          var b52 = b9[5] | 0;
          var bl5 = b52 & 8191;
          var bh5 = b52 >>> 13;
          var b62 = b9[6] | 0;
          var bl6 = b62 & 8191;
          var bh6 = b62 >>> 13;
          var b72 = b9[7] | 0;
          var bl7 = b72 & 8191;
          var bh7 = b72 >>> 13;
          var b82 = b9[8] | 0;
          var bl8 = b82 & 8191;
          var bh8 = b82 >>> 13;
          var b92 = b9[9] | 0;
          var bl9 = b92 & 8191;
          var bh9 = b92 >>> 13;
          out.negative = self2.negative ^ num2.negative;
          out.length = 19;
          lo4 = Math.imul(al0, bl0);
          mid = Math.imul(al0, bh0);
          mid = mid + Math.imul(ah0, bl0) | 0;
          hi2 = Math.imul(ah0, bh0);
          var w0 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w0 >>> 26) | 0;
          w0 &= 67108863;
          lo4 = Math.imul(al1, bl0);
          mid = Math.imul(al1, bh0);
          mid = mid + Math.imul(ah1, bl0) | 0;
          hi2 = Math.imul(ah1, bh0);
          lo4 = lo4 + Math.imul(al0, bl1) | 0;
          mid = mid + Math.imul(al0, bh1) | 0;
          mid = mid + Math.imul(ah0, bl1) | 0;
          hi2 = hi2 + Math.imul(ah0, bh1) | 0;
          var w1 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w1 >>> 26) | 0;
          w1 &= 67108863;
          lo4 = Math.imul(al2, bl0);
          mid = Math.imul(al2, bh0);
          mid = mid + Math.imul(ah2, bl0) | 0;
          hi2 = Math.imul(ah2, bh0);
          lo4 = lo4 + Math.imul(al1, bl1) | 0;
          mid = mid + Math.imul(al1, bh1) | 0;
          mid = mid + Math.imul(ah1, bl1) | 0;
          hi2 = hi2 + Math.imul(ah1, bh1) | 0;
          lo4 = lo4 + Math.imul(al0, bl2) | 0;
          mid = mid + Math.imul(al0, bh2) | 0;
          mid = mid + Math.imul(ah0, bl2) | 0;
          hi2 = hi2 + Math.imul(ah0, bh2) | 0;
          var w22 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w22 >>> 26) | 0;
          w22 &= 67108863;
          lo4 = Math.imul(al3, bl0);
          mid = Math.imul(al3, bh0);
          mid = mid + Math.imul(ah3, bl0) | 0;
          hi2 = Math.imul(ah3, bh0);
          lo4 = lo4 + Math.imul(al2, bl1) | 0;
          mid = mid + Math.imul(al2, bh1) | 0;
          mid = mid + Math.imul(ah2, bl1) | 0;
          hi2 = hi2 + Math.imul(ah2, bh1) | 0;
          lo4 = lo4 + Math.imul(al1, bl2) | 0;
          mid = mid + Math.imul(al1, bh2) | 0;
          mid = mid + Math.imul(ah1, bl2) | 0;
          hi2 = hi2 + Math.imul(ah1, bh2) | 0;
          lo4 = lo4 + Math.imul(al0, bl3) | 0;
          mid = mid + Math.imul(al0, bh3) | 0;
          mid = mid + Math.imul(ah0, bl3) | 0;
          hi2 = hi2 + Math.imul(ah0, bh3) | 0;
          var w32 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w32 >>> 26) | 0;
          w32 &= 67108863;
          lo4 = Math.imul(al4, bl0);
          mid = Math.imul(al4, bh0);
          mid = mid + Math.imul(ah4, bl0) | 0;
          hi2 = Math.imul(ah4, bh0);
          lo4 = lo4 + Math.imul(al3, bl1) | 0;
          mid = mid + Math.imul(al3, bh1) | 0;
          mid = mid + Math.imul(ah3, bl1) | 0;
          hi2 = hi2 + Math.imul(ah3, bh1) | 0;
          lo4 = lo4 + Math.imul(al2, bl2) | 0;
          mid = mid + Math.imul(al2, bh2) | 0;
          mid = mid + Math.imul(ah2, bl2) | 0;
          hi2 = hi2 + Math.imul(ah2, bh2) | 0;
          lo4 = lo4 + Math.imul(al1, bl3) | 0;
          mid = mid + Math.imul(al1, bh3) | 0;
          mid = mid + Math.imul(ah1, bl3) | 0;
          hi2 = hi2 + Math.imul(ah1, bh3) | 0;
          lo4 = lo4 + Math.imul(al0, bl4) | 0;
          mid = mid + Math.imul(al0, bh4) | 0;
          mid = mid + Math.imul(ah0, bl4) | 0;
          hi2 = hi2 + Math.imul(ah0, bh4) | 0;
          var w42 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w42 >>> 26) | 0;
          w42 &= 67108863;
          lo4 = Math.imul(al5, bl0);
          mid = Math.imul(al5, bh0);
          mid = mid + Math.imul(ah5, bl0) | 0;
          hi2 = Math.imul(ah5, bh0);
          lo4 = lo4 + Math.imul(al4, bl1) | 0;
          mid = mid + Math.imul(al4, bh1) | 0;
          mid = mid + Math.imul(ah4, bl1) | 0;
          hi2 = hi2 + Math.imul(ah4, bh1) | 0;
          lo4 = lo4 + Math.imul(al3, bl2) | 0;
          mid = mid + Math.imul(al3, bh2) | 0;
          mid = mid + Math.imul(ah3, bl2) | 0;
          hi2 = hi2 + Math.imul(ah3, bh2) | 0;
          lo4 = lo4 + Math.imul(al2, bl3) | 0;
          mid = mid + Math.imul(al2, bh3) | 0;
          mid = mid + Math.imul(ah2, bl3) | 0;
          hi2 = hi2 + Math.imul(ah2, bh3) | 0;
          lo4 = lo4 + Math.imul(al1, bl4) | 0;
          mid = mid + Math.imul(al1, bh4) | 0;
          mid = mid + Math.imul(ah1, bl4) | 0;
          hi2 = hi2 + Math.imul(ah1, bh4) | 0;
          lo4 = lo4 + Math.imul(al0, bl5) | 0;
          mid = mid + Math.imul(al0, bh5) | 0;
          mid = mid + Math.imul(ah0, bl5) | 0;
          hi2 = hi2 + Math.imul(ah0, bh5) | 0;
          var w52 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w52 >>> 26) | 0;
          w52 &= 67108863;
          lo4 = Math.imul(al6, bl0);
          mid = Math.imul(al6, bh0);
          mid = mid + Math.imul(ah6, bl0) | 0;
          hi2 = Math.imul(ah6, bh0);
          lo4 = lo4 + Math.imul(al5, bl1) | 0;
          mid = mid + Math.imul(al5, bh1) | 0;
          mid = mid + Math.imul(ah5, bl1) | 0;
          hi2 = hi2 + Math.imul(ah5, bh1) | 0;
          lo4 = lo4 + Math.imul(al4, bl2) | 0;
          mid = mid + Math.imul(al4, bh2) | 0;
          mid = mid + Math.imul(ah4, bl2) | 0;
          hi2 = hi2 + Math.imul(ah4, bh2) | 0;
          lo4 = lo4 + Math.imul(al3, bl3) | 0;
          mid = mid + Math.imul(al3, bh3) | 0;
          mid = mid + Math.imul(ah3, bl3) | 0;
          hi2 = hi2 + Math.imul(ah3, bh3) | 0;
          lo4 = lo4 + Math.imul(al2, bl4) | 0;
          mid = mid + Math.imul(al2, bh4) | 0;
          mid = mid + Math.imul(ah2, bl4) | 0;
          hi2 = hi2 + Math.imul(ah2, bh4) | 0;
          lo4 = lo4 + Math.imul(al1, bl5) | 0;
          mid = mid + Math.imul(al1, bh5) | 0;
          mid = mid + Math.imul(ah1, bl5) | 0;
          hi2 = hi2 + Math.imul(ah1, bh5) | 0;
          lo4 = lo4 + Math.imul(al0, bl6) | 0;
          mid = mid + Math.imul(al0, bh6) | 0;
          mid = mid + Math.imul(ah0, bl6) | 0;
          hi2 = hi2 + Math.imul(ah0, bh6) | 0;
          var w62 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w62 >>> 26) | 0;
          w62 &= 67108863;
          lo4 = Math.imul(al7, bl0);
          mid = Math.imul(al7, bh0);
          mid = mid + Math.imul(ah7, bl0) | 0;
          hi2 = Math.imul(ah7, bh0);
          lo4 = lo4 + Math.imul(al6, bl1) | 0;
          mid = mid + Math.imul(al6, bh1) | 0;
          mid = mid + Math.imul(ah6, bl1) | 0;
          hi2 = hi2 + Math.imul(ah6, bh1) | 0;
          lo4 = lo4 + Math.imul(al5, bl2) | 0;
          mid = mid + Math.imul(al5, bh2) | 0;
          mid = mid + Math.imul(ah5, bl2) | 0;
          hi2 = hi2 + Math.imul(ah5, bh2) | 0;
          lo4 = lo4 + Math.imul(al4, bl3) | 0;
          mid = mid + Math.imul(al4, bh3) | 0;
          mid = mid + Math.imul(ah4, bl3) | 0;
          hi2 = hi2 + Math.imul(ah4, bh3) | 0;
          lo4 = lo4 + Math.imul(al3, bl4) | 0;
          mid = mid + Math.imul(al3, bh4) | 0;
          mid = mid + Math.imul(ah3, bl4) | 0;
          hi2 = hi2 + Math.imul(ah3, bh4) | 0;
          lo4 = lo4 + Math.imul(al2, bl5) | 0;
          mid = mid + Math.imul(al2, bh5) | 0;
          mid = mid + Math.imul(ah2, bl5) | 0;
          hi2 = hi2 + Math.imul(ah2, bh5) | 0;
          lo4 = lo4 + Math.imul(al1, bl6) | 0;
          mid = mid + Math.imul(al1, bh6) | 0;
          mid = mid + Math.imul(ah1, bl6) | 0;
          hi2 = hi2 + Math.imul(ah1, bh6) | 0;
          lo4 = lo4 + Math.imul(al0, bl7) | 0;
          mid = mid + Math.imul(al0, bh7) | 0;
          mid = mid + Math.imul(ah0, bl7) | 0;
          hi2 = hi2 + Math.imul(ah0, bh7) | 0;
          var w7 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w7 >>> 26) | 0;
          w7 &= 67108863;
          lo4 = Math.imul(al8, bl0);
          mid = Math.imul(al8, bh0);
          mid = mid + Math.imul(ah8, bl0) | 0;
          hi2 = Math.imul(ah8, bh0);
          lo4 = lo4 + Math.imul(al7, bl1) | 0;
          mid = mid + Math.imul(al7, bh1) | 0;
          mid = mid + Math.imul(ah7, bl1) | 0;
          hi2 = hi2 + Math.imul(ah7, bh1) | 0;
          lo4 = lo4 + Math.imul(al6, bl2) | 0;
          mid = mid + Math.imul(al6, bh2) | 0;
          mid = mid + Math.imul(ah6, bl2) | 0;
          hi2 = hi2 + Math.imul(ah6, bh2) | 0;
          lo4 = lo4 + Math.imul(al5, bl3) | 0;
          mid = mid + Math.imul(al5, bh3) | 0;
          mid = mid + Math.imul(ah5, bl3) | 0;
          hi2 = hi2 + Math.imul(ah5, bh3) | 0;
          lo4 = lo4 + Math.imul(al4, bl4) | 0;
          mid = mid + Math.imul(al4, bh4) | 0;
          mid = mid + Math.imul(ah4, bl4) | 0;
          hi2 = hi2 + Math.imul(ah4, bh4) | 0;
          lo4 = lo4 + Math.imul(al3, bl5) | 0;
          mid = mid + Math.imul(al3, bh5) | 0;
          mid = mid + Math.imul(ah3, bl5) | 0;
          hi2 = hi2 + Math.imul(ah3, bh5) | 0;
          lo4 = lo4 + Math.imul(al2, bl6) | 0;
          mid = mid + Math.imul(al2, bh6) | 0;
          mid = mid + Math.imul(ah2, bl6) | 0;
          hi2 = hi2 + Math.imul(ah2, bh6) | 0;
          lo4 = lo4 + Math.imul(al1, bl7) | 0;
          mid = mid + Math.imul(al1, bh7) | 0;
          mid = mid + Math.imul(ah1, bl7) | 0;
          hi2 = hi2 + Math.imul(ah1, bh7) | 0;
          lo4 = lo4 + Math.imul(al0, bl8) | 0;
          mid = mid + Math.imul(al0, bh8) | 0;
          mid = mid + Math.imul(ah0, bl8) | 0;
          hi2 = hi2 + Math.imul(ah0, bh8) | 0;
          var w8 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w8 >>> 26) | 0;
          w8 &= 67108863;
          lo4 = Math.imul(al9, bl0);
          mid = Math.imul(al9, bh0);
          mid = mid + Math.imul(ah9, bl0) | 0;
          hi2 = Math.imul(ah9, bh0);
          lo4 = lo4 + Math.imul(al8, bl1) | 0;
          mid = mid + Math.imul(al8, bh1) | 0;
          mid = mid + Math.imul(ah8, bl1) | 0;
          hi2 = hi2 + Math.imul(ah8, bh1) | 0;
          lo4 = lo4 + Math.imul(al7, bl2) | 0;
          mid = mid + Math.imul(al7, bh2) | 0;
          mid = mid + Math.imul(ah7, bl2) | 0;
          hi2 = hi2 + Math.imul(ah7, bh2) | 0;
          lo4 = lo4 + Math.imul(al6, bl3) | 0;
          mid = mid + Math.imul(al6, bh3) | 0;
          mid = mid + Math.imul(ah6, bl3) | 0;
          hi2 = hi2 + Math.imul(ah6, bh3) | 0;
          lo4 = lo4 + Math.imul(al5, bl4) | 0;
          mid = mid + Math.imul(al5, bh4) | 0;
          mid = mid + Math.imul(ah5, bl4) | 0;
          hi2 = hi2 + Math.imul(ah5, bh4) | 0;
          lo4 = lo4 + Math.imul(al4, bl5) | 0;
          mid = mid + Math.imul(al4, bh5) | 0;
          mid = mid + Math.imul(ah4, bl5) | 0;
          hi2 = hi2 + Math.imul(ah4, bh5) | 0;
          lo4 = lo4 + Math.imul(al3, bl6) | 0;
          mid = mid + Math.imul(al3, bh6) | 0;
          mid = mid + Math.imul(ah3, bl6) | 0;
          hi2 = hi2 + Math.imul(ah3, bh6) | 0;
          lo4 = lo4 + Math.imul(al2, bl7) | 0;
          mid = mid + Math.imul(al2, bh7) | 0;
          mid = mid + Math.imul(ah2, bl7) | 0;
          hi2 = hi2 + Math.imul(ah2, bh7) | 0;
          lo4 = lo4 + Math.imul(al1, bl8) | 0;
          mid = mid + Math.imul(al1, bh8) | 0;
          mid = mid + Math.imul(ah1, bl8) | 0;
          hi2 = hi2 + Math.imul(ah1, bh8) | 0;
          lo4 = lo4 + Math.imul(al0, bl9) | 0;
          mid = mid + Math.imul(al0, bh9) | 0;
          mid = mid + Math.imul(ah0, bl9) | 0;
          hi2 = hi2 + Math.imul(ah0, bh9) | 0;
          var w9 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w9 >>> 26) | 0;
          w9 &= 67108863;
          lo4 = Math.imul(al9, bl1);
          mid = Math.imul(al9, bh1);
          mid = mid + Math.imul(ah9, bl1) | 0;
          hi2 = Math.imul(ah9, bh1);
          lo4 = lo4 + Math.imul(al8, bl2) | 0;
          mid = mid + Math.imul(al8, bh2) | 0;
          mid = mid + Math.imul(ah8, bl2) | 0;
          hi2 = hi2 + Math.imul(ah8, bh2) | 0;
          lo4 = lo4 + Math.imul(al7, bl3) | 0;
          mid = mid + Math.imul(al7, bh3) | 0;
          mid = mid + Math.imul(ah7, bl3) | 0;
          hi2 = hi2 + Math.imul(ah7, bh3) | 0;
          lo4 = lo4 + Math.imul(al6, bl4) | 0;
          mid = mid + Math.imul(al6, bh4) | 0;
          mid = mid + Math.imul(ah6, bl4) | 0;
          hi2 = hi2 + Math.imul(ah6, bh4) | 0;
          lo4 = lo4 + Math.imul(al5, bl5) | 0;
          mid = mid + Math.imul(al5, bh5) | 0;
          mid = mid + Math.imul(ah5, bl5) | 0;
          hi2 = hi2 + Math.imul(ah5, bh5) | 0;
          lo4 = lo4 + Math.imul(al4, bl6) | 0;
          mid = mid + Math.imul(al4, bh6) | 0;
          mid = mid + Math.imul(ah4, bl6) | 0;
          hi2 = hi2 + Math.imul(ah4, bh6) | 0;
          lo4 = lo4 + Math.imul(al3, bl7) | 0;
          mid = mid + Math.imul(al3, bh7) | 0;
          mid = mid + Math.imul(ah3, bl7) | 0;
          hi2 = hi2 + Math.imul(ah3, bh7) | 0;
          lo4 = lo4 + Math.imul(al2, bl8) | 0;
          mid = mid + Math.imul(al2, bh8) | 0;
          mid = mid + Math.imul(ah2, bl8) | 0;
          hi2 = hi2 + Math.imul(ah2, bh8) | 0;
          lo4 = lo4 + Math.imul(al1, bl9) | 0;
          mid = mid + Math.imul(al1, bh9) | 0;
          mid = mid + Math.imul(ah1, bl9) | 0;
          hi2 = hi2 + Math.imul(ah1, bh9) | 0;
          var w10 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w10 >>> 26) | 0;
          w10 &= 67108863;
          lo4 = Math.imul(al9, bl2);
          mid = Math.imul(al9, bh2);
          mid = mid + Math.imul(ah9, bl2) | 0;
          hi2 = Math.imul(ah9, bh2);
          lo4 = lo4 + Math.imul(al8, bl3) | 0;
          mid = mid + Math.imul(al8, bh3) | 0;
          mid = mid + Math.imul(ah8, bl3) | 0;
          hi2 = hi2 + Math.imul(ah8, bh3) | 0;
          lo4 = lo4 + Math.imul(al7, bl4) | 0;
          mid = mid + Math.imul(al7, bh4) | 0;
          mid = mid + Math.imul(ah7, bl4) | 0;
          hi2 = hi2 + Math.imul(ah7, bh4) | 0;
          lo4 = lo4 + Math.imul(al6, bl5) | 0;
          mid = mid + Math.imul(al6, bh5) | 0;
          mid = mid + Math.imul(ah6, bl5) | 0;
          hi2 = hi2 + Math.imul(ah6, bh5) | 0;
          lo4 = lo4 + Math.imul(al5, bl6) | 0;
          mid = mid + Math.imul(al5, bh6) | 0;
          mid = mid + Math.imul(ah5, bl6) | 0;
          hi2 = hi2 + Math.imul(ah5, bh6) | 0;
          lo4 = lo4 + Math.imul(al4, bl7) | 0;
          mid = mid + Math.imul(al4, bh7) | 0;
          mid = mid + Math.imul(ah4, bl7) | 0;
          hi2 = hi2 + Math.imul(ah4, bh7) | 0;
          lo4 = lo4 + Math.imul(al3, bl8) | 0;
          mid = mid + Math.imul(al3, bh8) | 0;
          mid = mid + Math.imul(ah3, bl8) | 0;
          hi2 = hi2 + Math.imul(ah3, bh8) | 0;
          lo4 = lo4 + Math.imul(al2, bl9) | 0;
          mid = mid + Math.imul(al2, bh9) | 0;
          mid = mid + Math.imul(ah2, bl9) | 0;
          hi2 = hi2 + Math.imul(ah2, bh9) | 0;
          var w11 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w11 >>> 26) | 0;
          w11 &= 67108863;
          lo4 = Math.imul(al9, bl3);
          mid = Math.imul(al9, bh3);
          mid = mid + Math.imul(ah9, bl3) | 0;
          hi2 = Math.imul(ah9, bh3);
          lo4 = lo4 + Math.imul(al8, bl4) | 0;
          mid = mid + Math.imul(al8, bh4) | 0;
          mid = mid + Math.imul(ah8, bl4) | 0;
          hi2 = hi2 + Math.imul(ah8, bh4) | 0;
          lo4 = lo4 + Math.imul(al7, bl5) | 0;
          mid = mid + Math.imul(al7, bh5) | 0;
          mid = mid + Math.imul(ah7, bl5) | 0;
          hi2 = hi2 + Math.imul(ah7, bh5) | 0;
          lo4 = lo4 + Math.imul(al6, bl6) | 0;
          mid = mid + Math.imul(al6, bh6) | 0;
          mid = mid + Math.imul(ah6, bl6) | 0;
          hi2 = hi2 + Math.imul(ah6, bh6) | 0;
          lo4 = lo4 + Math.imul(al5, bl7) | 0;
          mid = mid + Math.imul(al5, bh7) | 0;
          mid = mid + Math.imul(ah5, bl7) | 0;
          hi2 = hi2 + Math.imul(ah5, bh7) | 0;
          lo4 = lo4 + Math.imul(al4, bl8) | 0;
          mid = mid + Math.imul(al4, bh8) | 0;
          mid = mid + Math.imul(ah4, bl8) | 0;
          hi2 = hi2 + Math.imul(ah4, bh8) | 0;
          lo4 = lo4 + Math.imul(al3, bl9) | 0;
          mid = mid + Math.imul(al3, bh9) | 0;
          mid = mid + Math.imul(ah3, bl9) | 0;
          hi2 = hi2 + Math.imul(ah3, bh9) | 0;
          var w12 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w12 >>> 26) | 0;
          w12 &= 67108863;
          lo4 = Math.imul(al9, bl4);
          mid = Math.imul(al9, bh4);
          mid = mid + Math.imul(ah9, bl4) | 0;
          hi2 = Math.imul(ah9, bh4);
          lo4 = lo4 + Math.imul(al8, bl5) | 0;
          mid = mid + Math.imul(al8, bh5) | 0;
          mid = mid + Math.imul(ah8, bl5) | 0;
          hi2 = hi2 + Math.imul(ah8, bh5) | 0;
          lo4 = lo4 + Math.imul(al7, bl6) | 0;
          mid = mid + Math.imul(al7, bh6) | 0;
          mid = mid + Math.imul(ah7, bl6) | 0;
          hi2 = hi2 + Math.imul(ah7, bh6) | 0;
          lo4 = lo4 + Math.imul(al6, bl7) | 0;
          mid = mid + Math.imul(al6, bh7) | 0;
          mid = mid + Math.imul(ah6, bl7) | 0;
          hi2 = hi2 + Math.imul(ah6, bh7) | 0;
          lo4 = lo4 + Math.imul(al5, bl8) | 0;
          mid = mid + Math.imul(al5, bh8) | 0;
          mid = mid + Math.imul(ah5, bl8) | 0;
          hi2 = hi2 + Math.imul(ah5, bh8) | 0;
          lo4 = lo4 + Math.imul(al4, bl9) | 0;
          mid = mid + Math.imul(al4, bh9) | 0;
          mid = mid + Math.imul(ah4, bl9) | 0;
          hi2 = hi2 + Math.imul(ah4, bh9) | 0;
          var w13 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w13 >>> 26) | 0;
          w13 &= 67108863;
          lo4 = Math.imul(al9, bl5);
          mid = Math.imul(al9, bh5);
          mid = mid + Math.imul(ah9, bl5) | 0;
          hi2 = Math.imul(ah9, bh5);
          lo4 = lo4 + Math.imul(al8, bl6) | 0;
          mid = mid + Math.imul(al8, bh6) | 0;
          mid = mid + Math.imul(ah8, bl6) | 0;
          hi2 = hi2 + Math.imul(ah8, bh6) | 0;
          lo4 = lo4 + Math.imul(al7, bl7) | 0;
          mid = mid + Math.imul(al7, bh7) | 0;
          mid = mid + Math.imul(ah7, bl7) | 0;
          hi2 = hi2 + Math.imul(ah7, bh7) | 0;
          lo4 = lo4 + Math.imul(al6, bl8) | 0;
          mid = mid + Math.imul(al6, bh8) | 0;
          mid = mid + Math.imul(ah6, bl8) | 0;
          hi2 = hi2 + Math.imul(ah6, bh8) | 0;
          lo4 = lo4 + Math.imul(al5, bl9) | 0;
          mid = mid + Math.imul(al5, bh9) | 0;
          mid = mid + Math.imul(ah5, bl9) | 0;
          hi2 = hi2 + Math.imul(ah5, bh9) | 0;
          var w14 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w14 >>> 26) | 0;
          w14 &= 67108863;
          lo4 = Math.imul(al9, bl6);
          mid = Math.imul(al9, bh6);
          mid = mid + Math.imul(ah9, bl6) | 0;
          hi2 = Math.imul(ah9, bh6);
          lo4 = lo4 + Math.imul(al8, bl7) | 0;
          mid = mid + Math.imul(al8, bh7) | 0;
          mid = mid + Math.imul(ah8, bl7) | 0;
          hi2 = hi2 + Math.imul(ah8, bh7) | 0;
          lo4 = lo4 + Math.imul(al7, bl8) | 0;
          mid = mid + Math.imul(al7, bh8) | 0;
          mid = mid + Math.imul(ah7, bl8) | 0;
          hi2 = hi2 + Math.imul(ah7, bh8) | 0;
          lo4 = lo4 + Math.imul(al6, bl9) | 0;
          mid = mid + Math.imul(al6, bh9) | 0;
          mid = mid + Math.imul(ah6, bl9) | 0;
          hi2 = hi2 + Math.imul(ah6, bh9) | 0;
          var w15 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w15 >>> 26) | 0;
          w15 &= 67108863;
          lo4 = Math.imul(al9, bl7);
          mid = Math.imul(al9, bh7);
          mid = mid + Math.imul(ah9, bl7) | 0;
          hi2 = Math.imul(ah9, bh7);
          lo4 = lo4 + Math.imul(al8, bl8) | 0;
          mid = mid + Math.imul(al8, bh8) | 0;
          mid = mid + Math.imul(ah8, bl8) | 0;
          hi2 = hi2 + Math.imul(ah8, bh8) | 0;
          lo4 = lo4 + Math.imul(al7, bl9) | 0;
          mid = mid + Math.imul(al7, bh9) | 0;
          mid = mid + Math.imul(ah7, bl9) | 0;
          hi2 = hi2 + Math.imul(ah7, bh9) | 0;
          var w16 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w16 >>> 26) | 0;
          w16 &= 67108863;
          lo4 = Math.imul(al9, bl8);
          mid = Math.imul(al9, bh8);
          mid = mid + Math.imul(ah9, bl8) | 0;
          hi2 = Math.imul(ah9, bh8);
          lo4 = lo4 + Math.imul(al8, bl9) | 0;
          mid = mid + Math.imul(al8, bh9) | 0;
          mid = mid + Math.imul(ah8, bl9) | 0;
          hi2 = hi2 + Math.imul(ah8, bh9) | 0;
          var w17 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w17 >>> 26) | 0;
          w17 &= 67108863;
          lo4 = Math.imul(al9, bl9);
          mid = Math.imul(al9, bh9);
          mid = mid + Math.imul(ah9, bl9) | 0;
          hi2 = Math.imul(ah9, bh9);
          var w18 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w18 >>> 26) | 0;
          w18 &= 67108863;
          o5[0] = w0;
          o5[1] = w1;
          o5[2] = w22;
          o5[3] = w32;
          o5[4] = w42;
          o5[5] = w52;
          o5[6] = w62;
          o5[7] = w7;
          o5[8] = w8;
          o5[9] = w9;
          o5[10] = w10;
          o5[11] = w11;
          o5[12] = w12;
          o5[13] = w13;
          o5[14] = w14;
          o5[15] = w15;
          o5[16] = w16;
          o5[17] = w17;
          o5[18] = w18;
          if (c7 !== 0) {
            o5[19] = c7;
            out.length++;
          }
          return out;
        };
        if (!Math.imul) {
          comb10MulTo = smallMulTo;
        }
        function bigMulTo(self2, num2, out) {
          out.negative = num2.negative ^ self2.negative;
          out.length = self2.length + num2.length;
          var carry = 0;
          var hncarry = 0;
          for (var k7 = 0; k7 < out.length - 1; k7++) {
            var ncarry = hncarry;
            hncarry = 0;
            var rword = carry & 67108863;
            var maxJ = Math.min(k7, num2.length - 1);
            for (var j6 = Math.max(0, k7 - self2.length + 1); j6 <= maxJ; j6++) {
              var i5 = k7 - j6;
              var a5 = self2.words[i5] | 0;
              var b9 = num2.words[j6] | 0;
              var r3 = a5 * b9;
              var lo4 = r3 & 67108863;
              ncarry = ncarry + (r3 / 67108864 | 0) | 0;
              lo4 = lo4 + rword | 0;
              rword = lo4 & 67108863;
              ncarry = ncarry + (lo4 >>> 26) | 0;
              hncarry += ncarry >>> 26;
              ncarry &= 67108863;
            }
            out.words[k7] = rword;
            carry = ncarry;
            ncarry = hncarry;
          }
          if (carry !== 0) {
            out.words[k7] = carry;
          } else {
            out.length--;
          }
          return out._strip();
        }
        function jumboMulTo(self2, num2, out) {
          return bigMulTo(self2, num2, out);
        }
        BN4.prototype.mulTo = function mulTo(num2, out) {
          var res;
          var len = this.length + num2.length;
          if (this.length === 10 && num2.length === 10) {
            res = comb10MulTo(this, num2, out);
          } else if (len < 63) {
            res = smallMulTo(this, num2, out);
          } else if (len < 1024) {
            res = bigMulTo(this, num2, out);
          } else {
            res = jumboMulTo(this, num2, out);
          }
          return res;
        };
        function FFTM(x13, y11) {
          this.x = x13;
          this.y = y11;
        }
        FFTM.prototype.makeRBT = function makeRBT(N13) {
          var t = new Array(N13);
          var l6 = BN4.prototype._countBits(N13) - 1;
          for (var i5 = 0; i5 < N13; i5++) {
            t[i5] = this.revBin(i5, l6, N13);
          }
          return t;
        };
        FFTM.prototype.revBin = function revBin(x13, l6, N13) {
          if (x13 === 0 || x13 === N13 - 1) return x13;
          var rb = 0;
          for (var i5 = 0; i5 < l6; i5++) {
            rb |= (x13 & 1) << l6 - i5 - 1;
            x13 >>= 1;
          }
          return rb;
        };
        FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N13) {
          for (var i5 = 0; i5 < N13; i5++) {
            rtws[i5] = rws[rbt[i5]];
            itws[i5] = iws[rbt[i5]];
          }
        };
        FFTM.prototype.transform = function transform2(rws, iws, rtws, itws, N13, rbt) {
          this.permute(rbt, rws, iws, rtws, itws, N13);
          for (var s3 = 1; s3 < N13; s3 <<= 1) {
            var l6 = s3 << 1;
            var rtwdf = Math.cos(2 * Math.PI / l6);
            var itwdf = Math.sin(2 * Math.PI / l6);
            for (var p7 = 0; p7 < N13; p7 += l6) {
              var rtwdf_ = rtwdf;
              var itwdf_ = itwdf;
              for (var j6 = 0; j6 < s3; j6++) {
                var re6 = rtws[p7 + j6];
                var ie7 = itws[p7 + j6];
                var ro3 = rtws[p7 + j6 + s3];
                var io3 = itws[p7 + j6 + s3];
                var rx = rtwdf_ * ro3 - itwdf_ * io3;
                io3 = rtwdf_ * io3 + itwdf_ * ro3;
                ro3 = rx;
                rtws[p7 + j6] = re6 + ro3;
                itws[p7 + j6] = ie7 + io3;
                rtws[p7 + j6 + s3] = re6 - ro3;
                itws[p7 + j6 + s3] = ie7 - io3;
                if (j6 !== l6) {
                  rx = rtwdf * rtwdf_ - itwdf * itwdf_;
                  itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;
                  rtwdf_ = rx;
                }
              }
            }
          }
        };
        FFTM.prototype.guessLen13b = function guessLen13b(n6, m3) {
          var N13 = Math.max(m3, n6) | 1;
          var odd = N13 & 1;
          var i5 = 0;
          for (N13 = N13 / 2 | 0; N13; N13 = N13 >>> 1) {
            i5++;
          }
          return 1 << i5 + 1 + odd;
        };
        FFTM.prototype.conjugate = function conjugate(rws, iws, N13) {
          if (N13 <= 1) return;
          for (var i5 = 0; i5 < N13 / 2; i5++) {
            var t = rws[i5];
            rws[i5] = rws[N13 - i5 - 1];
            rws[N13 - i5 - 1] = t;
            t = iws[i5];
            iws[i5] = -iws[N13 - i5 - 1];
            iws[N13 - i5 - 1] = -t;
          }
        };
        FFTM.prototype.normalize13b = function normalize13b(ws2, N13) {
          var carry = 0;
          for (var i5 = 0; i5 < N13 / 2; i5++) {
            var w7 = Math.round(ws2[2 * i5 + 1] / N13) * 8192 + Math.round(ws2[2 * i5] / N13) + carry;
            ws2[i5] = w7 & 67108863;
            if (w7 < 67108864) {
              carry = 0;
            } else {
              carry = w7 / 67108864 | 0;
            }
          }
          return ws2;
        };
        FFTM.prototype.convert13b = function convert13b(ws2, len, rws, N13) {
          var carry = 0;
          for (var i5 = 0; i5 < len; i5++) {
            carry = carry + (ws2[i5] | 0);
            rws[2 * i5] = carry & 8191;
            carry = carry >>> 13;
            rws[2 * i5 + 1] = carry & 8191;
            carry = carry >>> 13;
          }
          for (i5 = 2 * len; i5 < N13; ++i5) {
            rws[i5] = 0;
          }
          assert12(carry === 0);
          assert12((carry & ~8191) === 0);
        };
        FFTM.prototype.stub = function stub(N13) {
          var ph = new Array(N13);
          for (var i5 = 0; i5 < N13; i5++) {
            ph[i5] = 0;
          }
          return ph;
        };
        FFTM.prototype.mulp = function mulp(x13, y11, out) {
          var N13 = 2 * this.guessLen13b(x13.length, y11.length);
          var rbt = this.makeRBT(N13);
          var _6 = this.stub(N13);
          var rws = new Array(N13);
          var rwst = new Array(N13);
          var iwst = new Array(N13);
          var nrws = new Array(N13);
          var nrwst = new Array(N13);
          var niwst = new Array(N13);
          var rmws = out.words;
          rmws.length = N13;
          this.convert13b(x13.words, x13.length, rws, N13);
          this.convert13b(y11.words, y11.length, nrws, N13);
          this.transform(rws, _6, rwst, iwst, N13, rbt);
          this.transform(nrws, _6, nrwst, niwst, N13, rbt);
          for (var i5 = 0; i5 < N13; i5++) {
            var rx = rwst[i5] * nrwst[i5] - iwst[i5] * niwst[i5];
            iwst[i5] = rwst[i5] * niwst[i5] + iwst[i5] * nrwst[i5];
            rwst[i5] = rx;
          }
          this.conjugate(rwst, iwst, N13);
          this.transform(rwst, iwst, rmws, _6, N13, rbt);
          this.conjugate(rmws, _6, N13);
          this.normalize13b(rmws, N13);
          out.negative = x13.negative ^ y11.negative;
          out.length = x13.length + y11.length;
          return out._strip();
        };
        BN4.prototype.mul = function mul3(num2) {
          var out = new BN4(null);
          out.words = new Array(this.length + num2.length);
          return this.mulTo(num2, out);
        };
        BN4.prototype.mulf = function mulf(num2) {
          var out = new BN4(null);
          out.words = new Array(this.length + num2.length);
          return jumboMulTo(this, num2, out);
        };
        BN4.prototype.imul = function imul(num2) {
          return this.clone().mulTo(num2, this);
        };
        BN4.prototype.imuln = function imuln(num2) {
          var isNegNum = num2 < 0;
          if (isNegNum) num2 = -num2;
          assert12(typeof num2 === "number");
          assert12(num2 < 67108864);
          var carry = 0;
          for (var i5 = 0; i5 < this.length; i5++) {
            var w7 = (this.words[i5] | 0) * num2;
            var lo4 = (w7 & 67108863) + (carry & 67108863);
            carry >>= 26;
            carry += w7 / 67108864 | 0;
            carry += lo4 >>> 26;
            this.words[i5] = lo4 & 67108863;
          }
          if (carry !== 0) {
            this.words[i5] = carry;
            this.length++;
          }
          this.length = num2 === 0 ? 1 : this.length;
          return isNegNum ? this.ineg() : this;
        };
        BN4.prototype.muln = function muln(num2) {
          return this.clone().imuln(num2);
        };
        BN4.prototype.sqr = function sqr() {
          return this.mul(this);
        };
        BN4.prototype.isqr = function isqr() {
          return this.imul(this.clone());
        };
        BN4.prototype.pow = function pow(num2) {
          var w7 = toBitArray(num2);
          if (w7.length === 0) return new BN4(1);
          var res = this;
          for (var i5 = 0; i5 < w7.length; i5++, res = res.sqr()) {
            if (w7[i5] !== 0) break;
          }
          if (++i5 < w7.length) {
            for (var q7 = res.sqr(); i5 < w7.length; i5++, q7 = q7.sqr()) {
              if (w7[i5] === 0) continue;
              res = res.mul(q7);
            }
          }
          return res;
        };
        BN4.prototype.iushln = function iushln(bits) {
          assert12(typeof bits === "number" && bits >= 0);
          var r3 = bits % 26;
          var s3 = (bits - r3) / 26;
          var carryMask = 67108863 >>> 26 - r3 << 26 - r3;
          var i5;
          if (r3 !== 0) {
            var carry = 0;
            for (i5 = 0; i5 < this.length; i5++) {
              var newCarry = this.words[i5] & carryMask;
              var c7 = (this.words[i5] | 0) - newCarry << r3;
              this.words[i5] = c7 | carry;
              carry = newCarry >>> 26 - r3;
            }
            if (carry) {
              this.words[i5] = carry;
              this.length++;
            }
          }
          if (s3 !== 0) {
            for (i5 = this.length - 1; i5 >= 0; i5--) {
              this.words[i5 + s3] = this.words[i5];
            }
            for (i5 = 0; i5 < s3; i5++) {
              this.words[i5] = 0;
            }
            this.length += s3;
          }
          return this._strip();
        };
        BN4.prototype.ishln = function ishln(bits) {
          assert12(this.negative === 0);
          return this.iushln(bits);
        };
        BN4.prototype.iushrn = function iushrn(bits, hint, extended) {
          assert12(typeof bits === "number" && bits >= 0);
          var h8;
          if (hint) {
            h8 = (hint - hint % 26) / 26;
          } else {
            h8 = 0;
          }
          var r3 = bits % 26;
          var s3 = Math.min((bits - r3) / 26, this.length);
          var mask2 = 67108863 ^ 67108863 >>> r3 << r3;
          var maskedWords = extended;
          h8 -= s3;
          h8 = Math.max(0, h8);
          if (maskedWords) {
            for (var i5 = 0; i5 < s3; i5++) {
              maskedWords.words[i5] = this.words[i5];
            }
            maskedWords.length = s3;
          }
          if (s3 === 0) {
          } else if (this.length > s3) {
            this.length -= s3;
            for (i5 = 0; i5 < this.length; i5++) {
              this.words[i5] = this.words[i5 + s3];
            }
          } else {
            this.words[0] = 0;
            this.length = 1;
          }
          var carry = 0;
          for (i5 = this.length - 1; i5 >= 0 && (carry !== 0 || i5 >= h8); i5--) {
            var word = this.words[i5] | 0;
            this.words[i5] = carry << 26 - r3 | word >>> r3;
            carry = word & mask2;
          }
          if (maskedWords && carry !== 0) {
            maskedWords.words[maskedWords.length++] = carry;
          }
          if (this.length === 0) {
            this.words[0] = 0;
            this.length = 1;
          }
          return this._strip();
        };
        BN4.prototype.ishrn = function ishrn(bits, hint, extended) {
          assert12(this.negative === 0);
          return this.iushrn(bits, hint, extended);
        };
        BN4.prototype.shln = function shln(bits) {
          return this.clone().ishln(bits);
        };
        BN4.prototype.ushln = function ushln(bits) {
          return this.clone().iushln(bits);
        };
        BN4.prototype.shrn = function shrn(bits) {
          return this.clone().ishrn(bits);
        };
        BN4.prototype.ushrn = function ushrn(bits) {
          return this.clone().iushrn(bits);
        };
        BN4.prototype.testn = function testn(bit) {
          assert12(typeof bit === "number" && bit >= 0);
          var r3 = bit % 26;
          var s3 = (bit - r3) / 26;
          var q7 = 1 << r3;
          if (this.length <= s3) return false;
          var w7 = this.words[s3];
          return !!(w7 & q7);
        };
        BN4.prototype.imaskn = function imaskn(bits) {
          assert12(typeof bits === "number" && bits >= 0);
          var r3 = bits % 26;
          var s3 = (bits - r3) / 26;
          assert12(this.negative === 0, "imaskn works only with positive numbers");
          if (this.length <= s3) {
            return this;
          }
          if (r3 !== 0) {
            s3++;
          }
          this.length = Math.min(s3, this.length);
          if (r3 !== 0) {
            var mask2 = 67108863 ^ 67108863 >>> r3 << r3;
            this.words[this.length - 1] &= mask2;
          }
          if (this.length === 0) {
            this.words[0] = 0;
            this.length = 1;
          }
          return this._strip();
        };
        BN4.prototype.maskn = function maskn(bits) {
          return this.clone().imaskn(bits);
        };
        BN4.prototype.iaddn = function iaddn(num2) {
          assert12(typeof num2 === "number");
          assert12(num2 < 67108864);
          if (num2 < 0) return this.isubn(-num2);
          if (this.negative !== 0) {
            if (this.length === 1 && (this.words[0] | 0) <= num2) {
              this.words[0] = num2 - (this.words[0] | 0);
              this.negative = 0;
              return this;
            }
            this.negative = 0;
            this.isubn(num2);
            this.negative = 1;
            return this;
          }
          return this._iaddn(num2);
        };
        BN4.prototype._iaddn = function _iaddn(num2) {
          this.words[0] += num2;
          for (var i5 = 0; i5 < this.length && this.words[i5] >= 67108864; i5++) {
            this.words[i5] -= 67108864;
            if (i5 === this.length - 1) {
              this.words[i5 + 1] = 1;
            } else {
              this.words[i5 + 1]++;
            }
          }
          this.length = Math.max(this.length, i5 + 1);
          return this;
        };
        BN4.prototype.isubn = function isubn(num2) {
          assert12(typeof num2 === "number");
          assert12(num2 < 67108864);
          if (num2 < 0) return this.iaddn(-num2);
          if (this.negative !== 0) {
            this.negative = 0;
            this.iaddn(num2);
            this.negative = 1;
            return this;
          }
          this.words[0] -= num2;
          if (this.length === 1 && this.words[0] < 0) {
            this.words[0] = -this.words[0];
            this.negative = 1;
          } else {
            for (var i5 = 0; i5 < this.length && this.words[i5] < 0; i5++) {
              this.words[i5] += 67108864;
              this.words[i5 + 1] -= 1;
            }
          }
          return this._strip();
        };
        BN4.prototype.addn = function addn(num2) {
          return this.clone().iaddn(num2);
        };
        BN4.prototype.subn = function subn(num2) {
          return this.clone().isubn(num2);
        };
        BN4.prototype.iabs = function iabs() {
          this.negative = 0;
          return this;
        };
        BN4.prototype.abs = function abs() {
          return this.clone().iabs();
        };
        BN4.prototype._ishlnsubmul = function _ishlnsubmul(num2, mul3, shift) {
          var len = num2.length + shift;
          var i5;
          this._expand(len);
          var w7;
          var carry = 0;
          for (i5 = 0; i5 < num2.length; i5++) {
            w7 = (this.words[i5 + shift] | 0) + carry;
            var right = (num2.words[i5] | 0) * mul3;
            w7 -= right & 67108863;
            carry = (w7 >> 26) - (right / 67108864 | 0);
            this.words[i5 + shift] = w7 & 67108863;
          }
          for (; i5 < this.length - shift; i5++) {
            w7 = (this.words[i5 + shift] | 0) + carry;
            carry = w7 >> 26;
            this.words[i5 + shift] = w7 & 67108863;
          }
          if (carry === 0) return this._strip();
          assert12(carry === -1);
          carry = 0;
          for (i5 = 0; i5 < this.length; i5++) {
            w7 = -(this.words[i5] | 0) + carry;
            carry = w7 >> 26;
            this.words[i5] = w7 & 67108863;
          }
          this.negative = 1;
          return this._strip();
        };
        BN4.prototype._wordDiv = function _wordDiv(num2, mode) {
          var shift = this.length - num2.length;
          var a5 = this.clone();
          var b9 = num2;
          var bhi = b9.words[b9.length - 1] | 0;
          var bhiBits = this._countBits(bhi);
          shift = 26 - bhiBits;
          if (shift !== 0) {
            b9 = b9.ushln(shift);
            a5.iushln(shift);
            bhi = b9.words[b9.length - 1] | 0;
          }
          var m3 = a5.length - b9.length;
          var q7;
          if (mode !== "mod") {
            q7 = new BN4(null);
            q7.length = m3 + 1;
            q7.words = new Array(q7.length);
            for (var i5 = 0; i5 < q7.length; i5++) {
              q7.words[i5] = 0;
            }
          }
          var diff = a5.clone()._ishlnsubmul(b9, 1, m3);
          if (diff.negative === 0) {
            a5 = diff;
            if (q7) {
              q7.words[m3] = 1;
            }
          }
          for (var j6 = m3 - 1; j6 >= 0; j6--) {
            var qj = (a5.words[b9.length + j6] | 0) * 67108864 + (a5.words[b9.length + j6 - 1] | 0);
            qj = Math.min(qj / bhi | 0, 67108863);
            a5._ishlnsubmul(b9, qj, j6);
            while (a5.negative !== 0) {
              qj--;
              a5.negative = 0;
              a5._ishlnsubmul(b9, 1, j6);
              if (!a5.isZero()) {
                a5.negative ^= 1;
              }
            }
            if (q7) {
              q7.words[j6] = qj;
            }
          }
          if (q7) {
            q7._strip();
          }
          a5._strip();
          if (mode !== "div" && shift !== 0) {
            a5.iushrn(shift);
          }
          return {
            div: q7 || null,
            mod: a5
          };
        };
        BN4.prototype.divmod = function divmod(num2, mode, positive) {
          assert12(!num2.isZero());
          if (this.isZero()) {
            return {
              div: new BN4(0),
              mod: new BN4(0)
            };
          }
          var div, mod3, res;
          if (this.negative !== 0 && num2.negative === 0) {
            res = this.neg().divmod(num2, mode);
            if (mode !== "mod") {
              div = res.div.neg();
            }
            if (mode !== "div") {
              mod3 = res.mod.neg();
              if (positive && mod3.negative !== 0) {
                mod3.iadd(num2);
              }
            }
            return {
              div,
              mod: mod3
            };
          }
          if (this.negative === 0 && num2.negative !== 0) {
            res = this.divmod(num2.neg(), mode);
            if (mode !== "mod") {
              div = res.div.neg();
            }
            return {
              div,
              mod: res.mod
            };
          }
          if ((this.negative & num2.negative) !== 0) {
            res = this.neg().divmod(num2.neg(), mode);
            if (mode !== "div") {
              mod3 = res.mod.neg();
              if (positive && mod3.negative !== 0) {
                mod3.isub(num2);
              }
            }
            return {
              div: res.div,
              mod: mod3
            };
          }
          if (num2.length > this.length || this.cmp(num2) < 0) {
            return {
              div: new BN4(0),
              mod: this
            };
          }
          if (num2.length === 1) {
            if (mode === "div") {
              return {
                div: this.divn(num2.words[0]),
                mod: null
              };
            }
            if (mode === "mod") {
              return {
                div: null,
                mod: new BN4(this.modrn(num2.words[0]))
              };
            }
            return {
              div: this.divn(num2.words[0]),
              mod: new BN4(this.modrn(num2.words[0]))
            };
          }
          return this._wordDiv(num2, mode);
        };
        BN4.prototype.div = function div(num2) {
          return this.divmod(num2, "div", false).div;
        };
        BN4.prototype.mod = function mod3(num2) {
          return this.divmod(num2, "mod", false).mod;
        };
        BN4.prototype.umod = function umod(num2) {
          return this.divmod(num2, "mod", true).mod;
        };
        BN4.prototype.divRound = function divRound(num2) {
          var dm = this.divmod(num2);
          if (dm.mod.isZero()) return dm.div;
          var mod3 = dm.div.negative !== 0 ? dm.mod.isub(num2) : dm.mod;
          var half = num2.ushrn(1);
          var r22 = num2.andln(1);
          var cmp = mod3.cmp(half);
          if (cmp < 0 || r22 === 1 && cmp === 0) return dm.div;
          return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
        };
        BN4.prototype.modrn = function modrn(num2) {
          var isNegNum = num2 < 0;
          if (isNegNum) num2 = -num2;
          assert12(num2 <= 67108863);
          var p7 = (1 << 26) % num2;
          var acc = 0;
          for (var i5 = this.length - 1; i5 >= 0; i5--) {
            acc = (p7 * acc + (this.words[i5] | 0)) % num2;
          }
          return isNegNum ? -acc : acc;
        };
        BN4.prototype.modn = function modn(num2) {
          return this.modrn(num2);
        };
        BN4.prototype.idivn = function idivn(num2) {
          var isNegNum = num2 < 0;
          if (isNegNum) num2 = -num2;
          assert12(num2 <= 67108863);
          var carry = 0;
          for (var i5 = this.length - 1; i5 >= 0; i5--) {
            var w7 = (this.words[i5] | 0) + carry * 67108864;
            this.words[i5] = w7 / num2 | 0;
            carry = w7 % num2;
          }
          this._strip();
          return isNegNum ? this.ineg() : this;
        };
        BN4.prototype.divn = function divn(num2) {
          return this.clone().idivn(num2);
        };
        BN4.prototype.egcd = function egcd(p7) {
          assert12(p7.negative === 0);
          assert12(!p7.isZero());
          var x13 = this;
          var y11 = p7.clone();
          if (x13.negative !== 0) {
            x13 = x13.umod(p7);
          } else {
            x13 = x13.clone();
          }
          var A7 = new BN4(1);
          var B7 = new BN4(0);
          var C9 = new BN4(0);
          var D7 = new BN4(1);
          var g8 = 0;
          while (x13.isEven() && y11.isEven()) {
            x13.iushrn(1);
            y11.iushrn(1);
            ++g8;
          }
          var yp = y11.clone();
          var xp = x13.clone();
          while (!x13.isZero()) {
            for (var i5 = 0, im = 1; (x13.words[0] & im) === 0 && i5 < 26; ++i5, im <<= 1) ;
            if (i5 > 0) {
              x13.iushrn(i5);
              while (i5-- > 0) {
                if (A7.isOdd() || B7.isOdd()) {
                  A7.iadd(yp);
                  B7.isub(xp);
                }
                A7.iushrn(1);
                B7.iushrn(1);
              }
            }
            for (var j6 = 0, jm = 1; (y11.words[0] & jm) === 0 && j6 < 26; ++j6, jm <<= 1) ;
            if (j6 > 0) {
              y11.iushrn(j6);
              while (j6-- > 0) {
                if (C9.isOdd() || D7.isOdd()) {
                  C9.iadd(yp);
                  D7.isub(xp);
                }
                C9.iushrn(1);
                D7.iushrn(1);
              }
            }
            if (x13.cmp(y11) >= 0) {
              x13.isub(y11);
              A7.isub(C9);
              B7.isub(D7);
            } else {
              y11.isub(x13);
              C9.isub(A7);
              D7.isub(B7);
            }
          }
          return {
            a: C9,
            b: D7,
            gcd: y11.iushln(g8)
          };
        };
        BN4.prototype._invmp = function _invmp(p7) {
          assert12(p7.negative === 0);
          assert12(!p7.isZero());
          var a5 = this;
          var b9 = p7.clone();
          if (a5.negative !== 0) {
            a5 = a5.umod(p7);
          } else {
            a5 = a5.clone();
          }
          var x1 = new BN4(1);
          var x22 = new BN4(0);
          var delta = b9.clone();
          while (a5.cmpn(1) > 0 && b9.cmpn(1) > 0) {
            for (var i5 = 0, im = 1; (a5.words[0] & im) === 0 && i5 < 26; ++i5, im <<= 1) ;
            if (i5 > 0) {
              a5.iushrn(i5);
              while (i5-- > 0) {
                if (x1.isOdd()) {
                  x1.iadd(delta);
                }
                x1.iushrn(1);
              }
            }
            for (var j6 = 0, jm = 1; (b9.words[0] & jm) === 0 && j6 < 26; ++j6, jm <<= 1) ;
            if (j6 > 0) {
              b9.iushrn(j6);
              while (j6-- > 0) {
                if (x22.isOdd()) {
                  x22.iadd(delta);
                }
                x22.iushrn(1);
              }
            }
            if (a5.cmp(b9) >= 0) {
              a5.isub(b9);
              x1.isub(x22);
            } else {
              b9.isub(a5);
              x22.isub(x1);
            }
          }
          var res;
          if (a5.cmpn(1) === 0) {
            res = x1;
          } else {
            res = x22;
          }
          if (res.cmpn(0) < 0) {
            res.iadd(p7);
          }
          return res;
        };
        BN4.prototype.gcd = function gcd(num2) {
          if (this.isZero()) return num2.abs();
          if (num2.isZero()) return this.abs();
          var a5 = this.clone();
          var b9 = num2.clone();
          a5.negative = 0;
          b9.negative = 0;
          for (var shift = 0; a5.isEven() && b9.isEven(); shift++) {
            a5.iushrn(1);
            b9.iushrn(1);
          }
          do {
            while (a5.isEven()) {
              a5.iushrn(1);
            }
            while (b9.isEven()) {
              b9.iushrn(1);
            }
            var r3 = a5.cmp(b9);
            if (r3 < 0) {
              var t = a5;
              a5 = b9;
              b9 = t;
            } else if (r3 === 0 || b9.cmpn(1) === 0) {
              break;
            }
            a5.isub(b9);
          } while (true);
          return b9.iushln(shift);
        };
        BN4.prototype.invm = function invm(num2) {
          return this.egcd(num2).a.umod(num2);
        };
        BN4.prototype.isEven = function isEven() {
          return (this.words[0] & 1) === 0;
        };
        BN4.prototype.isOdd = function isOdd2() {
          return (this.words[0] & 1) === 1;
        };
        BN4.prototype.andln = function andln(num2) {
          return this.words[0] & num2;
        };
        BN4.prototype.bincn = function bincn(bit) {
          assert12(typeof bit === "number");
          var r3 = bit % 26;
          var s3 = (bit - r3) / 26;
          var q7 = 1 << r3;
          if (this.length <= s3) {
            this._expand(s3 + 1);
            this.words[s3] |= q7;
            return this;
          }
          var carry = q7;
          for (var i5 = s3; carry !== 0 && i5 < this.length; i5++) {
            var w7 = this.words[i5] | 0;
            w7 += carry;
            carry = w7 >>> 26;
            w7 &= 67108863;
            this.words[i5] = w7;
          }
          if (carry !== 0) {
            this.words[i5] = carry;
            this.length++;
          }
          return this;
        };
        BN4.prototype.isZero = function isZero() {
          return this.length === 1 && this.words[0] === 0;
        };
        BN4.prototype.cmpn = function cmpn(num2) {
          var negative = num2 < 0;
          if (this.negative !== 0 && !negative) return -1;
          if (this.negative === 0 && negative) return 1;
          this._strip();
          var res;
          if (this.length > 1) {
            res = 1;
          } else {
            if (negative) {
              num2 = -num2;
            }
            assert12(num2 <= 67108863, "Number is too big");
            var w7 = this.words[0] | 0;
            res = w7 === num2 ? 0 : w7 < num2 ? -1 : 1;
          }
          if (this.negative !== 0) return -res | 0;
          return res;
        };
        BN4.prototype.cmp = function cmp(num2) {
          if (this.negative !== 0 && num2.negative === 0) return -1;
          if (this.negative === 0 && num2.negative !== 0) return 1;
          var res = this.ucmp(num2);
          if (this.negative !== 0) return -res | 0;
          return res;
        };
        BN4.prototype.ucmp = function ucmp(num2) {
          if (this.length > num2.length) return 1;
          if (this.length < num2.length) return -1;
          var res = 0;
          for (var i5 = this.length - 1; i5 >= 0; i5--) {
            var a5 = this.words[i5] | 0;
            var b9 = num2.words[i5] | 0;
            if (a5 === b9) continue;
            if (a5 < b9) {
              res = -1;
            } else if (a5 > b9) {
              res = 1;
            }
            break;
          }
          return res;
        };
        BN4.prototype.gtn = function gtn(num2) {
          return this.cmpn(num2) === 1;
        };
        BN4.prototype.gt = function gt7(num2) {
          return this.cmp(num2) === 1;
        };
        BN4.prototype.gten = function gten(num2) {
          return this.cmpn(num2) >= 0;
        };
        BN4.prototype.gte = function gte(num2) {
          return this.cmp(num2) >= 0;
        };
        BN4.prototype.ltn = function ltn(num2) {
          return this.cmpn(num2) === -1;
        };
        BN4.prototype.lt = function lt6(num2) {
          return this.cmp(num2) === -1;
        };
        BN4.prototype.lten = function lten(num2) {
          return this.cmpn(num2) <= 0;
        };
        BN4.prototype.lte = function lte(num2) {
          return this.cmp(num2) <= 0;
        };
        BN4.prototype.eqn = function eqn(num2) {
          return this.cmpn(num2) === 0;
        };
        BN4.prototype.eq = function eq4(num2) {
          return this.cmp(num2) === 0;
        };
        BN4.red = function red(num2) {
          return new Red(num2);
        };
        BN4.prototype.toRed = function toRed(ctx) {
          assert12(!this.red, "Already a number in reduction context");
          assert12(this.negative === 0, "red works only with positives");
          return ctx.convertTo(this)._forceRed(ctx);
        };
        BN4.prototype.fromRed = function fromRed() {
          assert12(this.red, "fromRed works only with numbers in reduction context");
          return this.red.convertFrom(this);
        };
        BN4.prototype._forceRed = function _forceRed(ctx) {
          this.red = ctx;
          return this;
        };
        BN4.prototype.forceRed = function forceRed(ctx) {
          assert12(!this.red, "Already a number in reduction context");
          return this._forceRed(ctx);
        };
        BN4.prototype.redAdd = function redAdd(num2) {
          assert12(this.red, "redAdd works only with red numbers");
          return this.red.add(this, num2);
        };
        BN4.prototype.redIAdd = function redIAdd(num2) {
          assert12(this.red, "redIAdd works only with red numbers");
          return this.red.iadd(this, num2);
        };
        BN4.prototype.redSub = function redSub(num2) {
          assert12(this.red, "redSub works only with red numbers");
          return this.red.sub(this, num2);
        };
        BN4.prototype.redISub = function redISub(num2) {
          assert12(this.red, "redISub works only with red numbers");
          return this.red.isub(this, num2);
        };
        BN4.prototype.redShl = function redShl(num2) {
          assert12(this.red, "redShl works only with red numbers");
          return this.red.shl(this, num2);
        };
        BN4.prototype.redMul = function redMul(num2) {
          assert12(this.red, "redMul works only with red numbers");
          this.red._verify2(this, num2);
          return this.red.mul(this, num2);
        };
        BN4.prototype.redIMul = function redIMul(num2) {
          assert12(this.red, "redMul works only with red numbers");
          this.red._verify2(this, num2);
          return this.red.imul(this, num2);
        };
        BN4.prototype.redSqr = function redSqr() {
          assert12(this.red, "redSqr works only with red numbers");
          this.red._verify1(this);
          return this.red.sqr(this);
        };
        BN4.prototype.redISqr = function redISqr() {
          assert12(this.red, "redISqr works only with red numbers");
          this.red._verify1(this);
          return this.red.isqr(this);
        };
        BN4.prototype.redSqrt = function redSqrt() {
          assert12(this.red, "redSqrt works only with red numbers");
          this.red._verify1(this);
          return this.red.sqrt(this);
        };
        BN4.prototype.redInvm = function redInvm() {
          assert12(this.red, "redInvm works only with red numbers");
          this.red._verify1(this);
          return this.red.invm(this);
        };
        BN4.prototype.redNeg = function redNeg() {
          assert12(this.red, "redNeg works only with red numbers");
          this.red._verify1(this);
          return this.red.neg(this);
        };
        BN4.prototype.redPow = function redPow(num2) {
          assert12(this.red && !num2.red, "redPow(normalNum)");
          this.red._verify1(this);
          return this.red.pow(this, num2);
        };
        var primes = {
          k256: null,
          p224: null,
          p192: null,
          p25519: null
        };
        function MPrime(name2, p7) {
          this.name = name2;
          this.p = new BN4(p7, 16);
          this.n = this.p.bitLength();
          this.k = new BN4(1).iushln(this.n).isub(this.p);
          this.tmp = this._tmp();
        }
        MPrime.prototype._tmp = function _tmp() {
          var tmp = new BN4(null);
          tmp.words = new Array(Math.ceil(this.n / 13));
          return tmp;
        };
        MPrime.prototype.ireduce = function ireduce(num2) {
          var r3 = num2;
          var rlen;
          do {
            this.split(r3, this.tmp);
            r3 = this.imulK(r3);
            r3 = r3.iadd(this.tmp);
            rlen = r3.bitLength();
          } while (rlen > this.n);
          var cmp = rlen < this.n ? -1 : r3.ucmp(this.p);
          if (cmp === 0) {
            r3.words[0] = 0;
            r3.length = 1;
          } else if (cmp > 0) {
            r3.isub(this.p);
          } else {
            if (r3.strip !== void 0) {
              r3.strip();
            } else {
              r3._strip();
            }
          }
          return r3;
        };
        MPrime.prototype.split = function split3(input, out) {
          input.iushrn(this.n, 0, out);
        };
        MPrime.prototype.imulK = function imulK(num2) {
          return num2.imul(this.k);
        };
        function K256() {
          MPrime.call(
            this,
            "k256",
            "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f"
          );
        }
        inherits(K256, MPrime);
        K256.prototype.split = function split3(input, output) {
          var mask2 = 4194303;
          var outLen = Math.min(input.length, 9);
          for (var i5 = 0; i5 < outLen; i5++) {
            output.words[i5] = input.words[i5];
          }
          output.length = outLen;
          if (input.length <= 9) {
            input.words[0] = 0;
            input.length = 1;
            return;
          }
          var prev = input.words[9];
          output.words[output.length++] = prev & mask2;
          for (i5 = 10; i5 < input.length; i5++) {
            var next = input.words[i5] | 0;
            input.words[i5 - 10] = (next & mask2) << 4 | prev >>> 22;
            prev = next;
          }
          prev >>>= 22;
          input.words[i5 - 10] = prev;
          if (prev === 0 && input.length > 10) {
            input.length -= 10;
          } else {
            input.length -= 9;
          }
        };
        K256.prototype.imulK = function imulK(num2) {
          num2.words[num2.length] = 0;
          num2.words[num2.length + 1] = 0;
          num2.length += 2;
          var lo4 = 0;
          for (var i5 = 0; i5 < num2.length; i5++) {
            var w7 = num2.words[i5] | 0;
            lo4 += w7 * 977;
            num2.words[i5] = lo4 & 67108863;
            lo4 = w7 * 64 + (lo4 / 67108864 | 0);
          }
          if (num2.words[num2.length - 1] === 0) {
            num2.length--;
            if (num2.words[num2.length - 1] === 0) {
              num2.length--;
            }
          }
          return num2;
        };
        function P224() {
          MPrime.call(
            this,
            "p224",
            "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001"
          );
        }
        inherits(P224, MPrime);
        function P192() {
          MPrime.call(
            this,
            "p192",
            "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff"
          );
        }
        inherits(P192, MPrime);
        function P25519() {
          MPrime.call(
            this,
            "25519",
            "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed"
          );
        }
        inherits(P25519, MPrime);
        P25519.prototype.imulK = function imulK(num2) {
          var carry = 0;
          for (var i5 = 0; i5 < num2.length; i5++) {
            var hi2 = (num2.words[i5] | 0) * 19 + carry;
            var lo4 = hi2 & 67108863;
            hi2 >>>= 26;
            num2.words[i5] = lo4;
            carry = hi2;
          }
          if (carry !== 0) {
            num2.words[num2.length++] = carry;
          }
          return num2;
        };
        BN4._prime = function prime(name2) {
          if (primes[name2]) return primes[name2];
          var prime2;
          if (name2 === "k256") {
            prime2 = new K256();
          } else if (name2 === "p224") {
            prime2 = new P224();
          } else if (name2 === "p192") {
            prime2 = new P192();
          } else if (name2 === "p25519") {
            prime2 = new P25519();
          } else {
            throw new Error("Unknown prime " + name2);
          }
          primes[name2] = prime2;
          return prime2;
        };
        function Red(m3) {
          if (typeof m3 === "string") {
            var prime = BN4._prime(m3);
            this.m = prime.p;
            this.prime = prime;
          } else {
            assert12(m3.gtn(1), "modulus must be greater than 1");
            this.m = m3;
            this.prime = null;
          }
        }
        Red.prototype._verify1 = function _verify1(a5) {
          assert12(a5.negative === 0, "red works only with positives");
          assert12(a5.red, "red works only with red numbers");
        };
        Red.prototype._verify2 = function _verify2(a5, b9) {
          assert12((a5.negative | b9.negative) === 0, "red works only with positives");
          assert12(
            a5.red && a5.red === b9.red,
            "red works only with red numbers"
          );
        };
        Red.prototype.imod = function imod(a5) {
          if (this.prime) return this.prime.ireduce(a5)._forceRed(this);
          move(a5, a5.umod(this.m)._forceRed(this));
          return a5;
        };
        Red.prototype.neg = function neg3(a5) {
          if (a5.isZero()) {
            return a5.clone();
          }
          return this.m.sub(a5)._forceRed(this);
        };
        Red.prototype.add = function add5(a5, b9) {
          this._verify2(a5, b9);
          var res = a5.add(b9);
          if (res.cmp(this.m) >= 0) {
            res.isub(this.m);
          }
          return res._forceRed(this);
        };
        Red.prototype.iadd = function iadd(a5, b9) {
          this._verify2(a5, b9);
          var res = a5.iadd(b9);
          if (res.cmp(this.m) >= 0) {
            res.isub(this.m);
          }
          return res;
        };
        Red.prototype.sub = function sub(a5, b9) {
          this._verify2(a5, b9);
          var res = a5.sub(b9);
          if (res.cmpn(0) < 0) {
            res.iadd(this.m);
          }
          return res._forceRed(this);
        };
        Red.prototype.isub = function isub(a5, b9) {
          this._verify2(a5, b9);
          var res = a5.isub(b9);
          if (res.cmpn(0) < 0) {
            res.iadd(this.m);
          }
          return res;
        };
        Red.prototype.shl = function shl(a5, num2) {
          this._verify1(a5);
          return this.imod(a5.ushln(num2));
        };
        Red.prototype.imul = function imul(a5, b9) {
          this._verify2(a5, b9);
          return this.imod(a5.imul(b9));
        };
        Red.prototype.mul = function mul3(a5, b9) {
          this._verify2(a5, b9);
          return this.imod(a5.mul(b9));
        };
        Red.prototype.isqr = function isqr(a5) {
          return this.imul(a5, a5.clone());
        };
        Red.prototype.sqr = function sqr(a5) {
          return this.mul(a5, a5);
        };
        Red.prototype.sqrt = function sqrt(a5) {
          if (a5.isZero()) return a5.clone();
          var mod3 = this.m.andln(3);
          assert12(mod3 % 2 === 1);
          if (mod3 === 3) {
            var pow = this.m.add(new BN4(1)).iushrn(2);
            return this.pow(a5, pow);
          }
          var q7 = this.m.subn(1);
          var s3 = 0;
          while (!q7.isZero() && q7.andln(1) === 0) {
            s3++;
            q7.iushrn(1);
          }
          assert12(!q7.isZero());
          var one = new BN4(1).toRed(this);
          var nOne = one.redNeg();
          var lpow = this.m.subn(1).iushrn(1);
          var z11 = this.m.bitLength();
          z11 = new BN4(2 * z11 * z11).toRed(this);
          while (this.pow(z11, lpow).cmp(nOne) !== 0) {
            z11.redIAdd(nOne);
          }
          var c7 = this.pow(z11, q7);
          var r3 = this.pow(a5, q7.addn(1).iushrn(1));
          var t = this.pow(a5, q7);
          var m3 = s3;
          while (t.cmp(one) !== 0) {
            var tmp = t;
            for (var i5 = 0; tmp.cmp(one) !== 0; i5++) {
              tmp = tmp.redSqr();
            }
            assert12(i5 < m3);
            var b9 = this.pow(c7, new BN4(1).iushln(m3 - i5 - 1));
            r3 = r3.redMul(b9);
            c7 = b9.redSqr();
            t = t.redMul(c7);
            m3 = i5;
          }
          return r3;
        };
        Red.prototype.invm = function invm(a5) {
          var inv = a5._invmp(this.m);
          if (inv.negative !== 0) {
            inv.negative = 0;
            return this.imod(inv).redNeg();
          } else {
            return this.imod(inv);
          }
        };
        Red.prototype.pow = function pow(a5, num2) {
          if (num2.isZero()) return new BN4(1).toRed(this);
          if (num2.cmpn(1) === 0) return a5.clone();
          var windowSize = 4;
          var wnd = new Array(1 << windowSize);
          wnd[0] = new BN4(1).toRed(this);
          wnd[1] = a5;
          for (var i5 = 2; i5 < wnd.length; i5++) {
            wnd[i5] = this.mul(wnd[i5 - 1], a5);
          }
          var res = wnd[0];
          var current = 0;
          var currentLen = 0;
          var start = num2.bitLength() % 26;
          if (start === 0) {
            start = 26;
          }
          for (i5 = num2.length - 1; i5 >= 0; i5--) {
            var word = num2.words[i5];
            for (var j6 = start - 1; j6 >= 0; j6--) {
              var bit = word >> j6 & 1;
              if (res !== wnd[0]) {
                res = this.sqr(res);
              }
              if (bit === 0 && current === 0) {
                currentLen = 0;
                continue;
              }
              current <<= 1;
              current |= bit;
              currentLen++;
              if (currentLen !== windowSize && (i5 !== 0 || j6 !== 0)) continue;
              res = this.mul(res, wnd[current]);
              currentLen = 0;
              current = 0;
            }
            start = 26;
          }
          return res;
        };
        Red.prototype.convertTo = function convertTo(num2) {
          var r3 = num2.umod(this.m);
          return r3 === num2 ? r3.clone() : r3;
        };
        Red.prototype.convertFrom = function convertFrom(num2) {
          var res = num2.clone();
          res.red = null;
          return res;
        };
        BN4.mont = function mont(num2) {
          return new Mont(num2);
        };
        function Mont(m3) {
          Red.call(this, m3);
          this.shift = this.m.bitLength();
          if (this.shift % 26 !== 0) {
            this.shift += 26 - this.shift % 26;
          }
          this.r = new BN4(1).iushln(this.shift);
          this.r2 = this.imod(this.r.sqr());
          this.rinv = this.r._invmp(this.m);
          this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);
          this.minv = this.minv.umod(this.r);
          this.minv = this.r.sub(this.minv);
        }
        inherits(Mont, Red);
        Mont.prototype.convertTo = function convertTo(num2) {
          return this.imod(num2.ushln(this.shift));
        };
        Mont.prototype.convertFrom = function convertFrom(num2) {
          var r3 = this.imod(num2.mul(this.rinv));
          r3.red = null;
          return r3;
        };
        Mont.prototype.imul = function imul(a5, b9) {
          if (a5.isZero() || b9.isZero()) {
            a5.words[0] = 0;
            a5.length = 1;
            return a5;
          }
          var t = a5.imul(b9);
          var c7 = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
          var u4 = t.isub(c7).iushrn(this.shift);
          var res = u4;
          if (u4.cmp(this.m) >= 0) {
            res = u4.isub(this.m);
          } else if (u4.cmpn(0) < 0) {
            res = u4.iadd(this.m);
          }
          return res._forceRed(this);
        };
        Mont.prototype.mul = function mul3(a5, b9) {
          if (a5.isZero() || b9.isZero()) return new BN4(0)._forceRed(this);
          var t = a5.mul(b9);
          var c7 = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
          var u4 = t.isub(c7).iushrn(this.shift);
          var res = u4;
          if (u4.cmp(this.m) >= 0) {
            res = u4.isub(this.m);
          } else if (u4.cmpn(0) < 0) {
            res = u4.iadd(this.m);
          }
          return res._forceRed(this);
        };
        Mont.prototype.invm = function invm(a5) {
          var res = this.imod(a5._invmp(this.m).mul(this.r2));
          return res._forceRed(this);
        };
      })(typeof module === "undefined" || module, exports);
    }
  });

  // ../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js
  var require_safe_buffer = __commonJS({
    "../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var buffer2 = require_buffer();
      var Buffer6 = buffer2.Buffer;
      function copyProps(src2, dst) {
        for (var key2 in src2) {
          dst[key2] = src2[key2];
        }
      }
      if (Buffer6.from && Buffer6.alloc && Buffer6.allocUnsafe && Buffer6.allocUnsafeSlow) {
        module.exports = buffer2;
      } else {
        copyProps(buffer2, exports);
        exports.Buffer = SafeBuffer;
      }
      function SafeBuffer(arg, encodingOrOffset, length2) {
        return Buffer6(arg, encodingOrOffset, length2);
      }
      SafeBuffer.prototype = Object.create(Buffer6.prototype);
      copyProps(Buffer6, SafeBuffer);
      SafeBuffer.from = function(arg, encodingOrOffset, length2) {
        if (typeof arg === "number") {
          throw new TypeError("Argument must not be a number");
        }
        return Buffer6(arg, encodingOrOffset, length2);
      };
      SafeBuffer.alloc = function(size5, fill, encoding) {
        if (typeof size5 !== "number") {
          throw new TypeError("Argument must be a number");
        }
        var buf = Buffer6(size5);
        if (fill !== void 0) {
          if (typeof encoding === "string") {
            buf.fill(fill, encoding);
          } else {
            buf.fill(fill);
          }
        } else {
          buf.fill(0);
        }
        return buf;
      };
      SafeBuffer.allocUnsafe = function(size5) {
        if (typeof size5 !== "number") {
          throw new TypeError("Argument must be a number");
        }
        return Buffer6(size5);
      };
      SafeBuffer.allocUnsafeSlow = function(size5) {
        if (typeof size5 !== "number") {
          throw new TypeError("Argument must be a number");
        }
        return buffer2.SlowBuffer(size5);
      };
    }
  });

  // ../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js
  var require_src2 = __commonJS({
    "../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var _Buffer = require_safe_buffer().Buffer;
      function base4(ALPHABET) {
        if (ALPHABET.length >= 255) {
          throw new TypeError("Alphabet too long");
        }
        var BASE_MAP = new Uint8Array(256);
        for (var j6 = 0; j6 < BASE_MAP.length; j6++) {
          BASE_MAP[j6] = 255;
        }
        for (var i5 = 0; i5 < ALPHABET.length; i5++) {
          var x13 = ALPHABET.charAt(i5);
          var xc = x13.charCodeAt(0);
          if (BASE_MAP[xc] !== 255) {
            throw new TypeError(x13 + " is ambiguous");
          }
          BASE_MAP[xc] = i5;
        }
        var BASE2 = ALPHABET.length;
        var LEADER = ALPHABET.charAt(0);
        var FACTOR = Math.log(BASE2) / Math.log(256);
        var iFACTOR = Math.log(256) / Math.log(BASE2);
        function encode11(source) {
          if (Array.isArray(source) || source instanceof Uint8Array) {
            source = _Buffer.from(source);
          }
          if (!_Buffer.isBuffer(source)) {
            throw new TypeError("Expected Buffer");
          }
          if (source.length === 0) {
            return "";
          }
          var zeroes = 0;
          var length2 = 0;
          var pbegin = 0;
          var pend = source.length;
          while (pbegin !== pend && source[pbegin] === 0) {
            pbegin++;
            zeroes++;
          }
          var size5 = (pend - pbegin) * iFACTOR + 1 >>> 0;
          var b58 = new Uint8Array(size5);
          while (pbegin !== pend) {
            var carry = source[pbegin];
            var i6 = 0;
            for (var it1 = size5 - 1; (carry !== 0 || i6 < length2) && it1 !== -1; it1--, i6++) {
              carry += 256 * b58[it1] >>> 0;
              b58[it1] = carry % BASE2 >>> 0;
              carry = carry / BASE2 >>> 0;
            }
            if (carry !== 0) {
              throw new Error("Non-zero carry");
            }
            length2 = i6;
            pbegin++;
          }
          var it22 = size5 - length2;
          while (it22 !== size5 && b58[it22] === 0) {
            it22++;
          }
          var str = LEADER.repeat(zeroes);
          for (; it22 < size5; ++it22) {
            str += ALPHABET.charAt(b58[it22]);
          }
          return str;
        }
        function decodeUnsafe(source) {
          if (typeof source !== "string") {
            throw new TypeError("Expected String");
          }
          if (source.length === 0) {
            return _Buffer.alloc(0);
          }
          var psz = 0;
          var zeroes = 0;
          var length2 = 0;
          while (source[psz] === LEADER) {
            zeroes++;
            psz++;
          }
          var size5 = (source.length - psz) * FACTOR + 1 >>> 0;
          var b256 = new Uint8Array(size5);
          while (psz < source.length) {
            var charCode = source.charCodeAt(psz);
            if (charCode > 255) {
              return;
            }
            var carry = BASE_MAP[charCode];
            if (carry === 255) {
              return;
            }
            var i6 = 0;
            for (var it32 = size5 - 1; (carry !== 0 || i6 < length2) && it32 !== -1; it32--, i6++) {
              carry += BASE2 * b256[it32] >>> 0;
              b256[it32] = carry % 256 >>> 0;
              carry = carry / 256 >>> 0;
            }
            if (carry !== 0) {
              throw new Error("Non-zero carry");
            }
            length2 = i6;
            psz++;
          }
          var it42 = size5 - length2;
          while (it42 !== size5 && b256[it42] === 0) {
            it42++;
          }
          var vch = _Buffer.allocUnsafe(zeroes + (size5 - it42));
          vch.fill(0, 0, zeroes);
          var j7 = zeroes;
          while (it42 !== size5) {
            vch[j7++] = b256[it42++];
          }
          return vch;
        }
        function decode9(string7) {
          var buffer2 = decodeUnsafe(string7);
          if (buffer2) {
            return buffer2;
          }
          throw new Error("Non-base" + BASE2 + " character");
        }
        return {
          encode: encode11,
          decodeUnsafe,
          decode: decode9
        };
      }
      module.exports = base4;
    }
  });

  // ../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js
  var require_bs58 = __commonJS({
    "../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var basex = require_src2();
      var ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
      module.exports = basex(ALPHABET);
    }
  });

  // ../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js
  var require_encoding_lib = __commonJS({
    "../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js"(exports) {
      "use strict";
      init_node_compat_inject();
      function inRange3(a5, min, max) {
        return min <= a5 && a5 <= max;
      }
      function ToDictionary(o5) {
        if (o5 === void 0) return {};
        if (o5 === Object(o5)) return o5;
        throw TypeError("Could not convert argument to dictionary");
      }
      function stringToCodePoints(string7) {
        var s3 = String(string7);
        var n6 = s3.length;
        var i5 = 0;
        var u4 = [];
        while (i5 < n6) {
          var c7 = s3.charCodeAt(i5);
          if (c7 < 55296 || c7 > 57343) {
            u4.push(c7);
          } else if (56320 <= c7 && c7 <= 57343) {
            u4.push(65533);
          } else if (55296 <= c7 && c7 <= 56319) {
            if (i5 === n6 - 1) {
              u4.push(65533);
            } else {
              var d6 = string7.charCodeAt(i5 + 1);
              if (56320 <= d6 && d6 <= 57343) {
                var a5 = c7 & 1023;
                var b9 = d6 & 1023;
                u4.push(65536 + (a5 << 10) + b9);
                i5 += 1;
              } else {
                u4.push(65533);
              }
            }
          }
          i5 += 1;
        }
        return u4;
      }
      function codePointsToString(code_points) {
        var s3 = "";
        for (var i5 = 0; i5 < code_points.length; ++i5) {
          var cp = code_points[i5];
          if (cp <= 65535) {
            s3 += String.fromCharCode(cp);
          } else {
            cp -= 65536;
            s3 += String.fromCharCode(
              (cp >> 10) + 55296,
              (cp & 1023) + 56320
            );
          }
        }
        return s3;
      }
      var end_of_stream = -1;
      function Stream(tokens) {
        this.tokens = [].slice.call(tokens);
      }
      Stream.prototype = {
        /**
         * @return {boolean} True if end-of-stream has been hit.
         */
        endOfStream: function() {
          return !this.tokens.length;
        },
        /**
         * When a token is read from a stream, the first token in the
         * stream must be returned and subsequently removed, and
         * end-of-stream must be returned otherwise.
         *
         * @return {number} Get the next token from the stream, or
         * end_of_stream.
         */
        read: function() {
          if (!this.tokens.length)
            return end_of_stream;
          return this.tokens.shift();
        },
        /**
         * When one or more tokens are prepended to a stream, those tokens
         * must be inserted, in given order, before the first token in the
         * stream.
         *
         * @param {(number|!Array.<number>)} token The token(s) to prepend to the stream.
         */
        prepend: function(token) {
          if (Array.isArray(token)) {
            var tokens = (
              /**@type {!Array.<number>}*/
              token
            );
            while (tokens.length)
              this.tokens.unshift(tokens.pop());
          } else {
            this.tokens.unshift(token);
          }
        },
        /**
         * When one or more tokens are pushed to a stream, those tokens
         * must be inserted, in given order, after the last token in the
         * stream.
         *
         * @param {(number|!Array.<number>)} token The tokens(s) to prepend to the stream.
         */
        push: function(token) {
          if (Array.isArray(token)) {
            var tokens = (
              /**@type {!Array.<number>}*/
              token
            );
            while (tokens.length)
              this.tokens.push(tokens.shift());
          } else {
            this.tokens.push(token);
          }
        }
      };
      var finished = -1;
      function decoderError(fatal, opt_code_point) {
        if (fatal)
          throw TypeError("Decoder error");
        return opt_code_point || 65533;
      }
      var DEFAULT_ENCODING = "utf-8";
      function TextDecoder2(encoding, options) {
        if (!(this instanceof TextDecoder2)) {
          return new TextDecoder2(encoding, options);
        }
        encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;
        if (encoding !== DEFAULT_ENCODING) {
          throw new Error("Encoding not supported. Only utf-8 is supported");
        }
        options = ToDictionary(options);
        this._streaming = false;
        this._BOMseen = false;
        this._decoder = null;
        this._fatal = Boolean(options["fatal"]);
        this._ignoreBOM = Boolean(options["ignoreBOM"]);
        Object.defineProperty(this, "encoding", { value: "utf-8" });
        Object.defineProperty(this, "fatal", { value: this._fatal });
        Object.defineProperty(this, "ignoreBOM", { value: this._ignoreBOM });
      }
      TextDecoder2.prototype = {
        /**
         * @param {ArrayBufferView=} input The buffer of bytes to decode.
         * @param {Object=} options
         * @return {string} The decoded string.
         */
        decode: function decode9(input, options) {
          var bytes;
          if (typeof input === "object" && input instanceof ArrayBuffer) {
            bytes = new Uint8Array(input);
          } else if (typeof input === "object" && "buffer" in input && input.buffer instanceof ArrayBuffer) {
            bytes = new Uint8Array(
              input.buffer,
              input.byteOffset,
              input.byteLength
            );
          } else {
            bytes = new Uint8Array(0);
          }
          options = ToDictionary(options);
          if (!this._streaming) {
            this._decoder = new UTF8Decoder({ fatal: this._fatal });
            this._BOMseen = false;
          }
          this._streaming = Boolean(options["stream"]);
          var input_stream = new Stream(bytes);
          var code_points = [];
          var result;
          while (!input_stream.endOfStream()) {
            result = this._decoder.handler(input_stream, input_stream.read());
            if (result === finished)
              break;
            if (result === null)
              continue;
            if (Array.isArray(result))
              code_points.push.apply(
                code_points,
                /**@type {!Array.<number>}*/
                result
              );
            else
              code_points.push(result);
          }
          if (!this._streaming) {
            do {
              result = this._decoder.handler(input_stream, input_stream.read());
              if (result === finished)
                break;
              if (result === null)
                continue;
              if (Array.isArray(result))
                code_points.push.apply(
                  code_points,
                  /**@type {!Array.<number>}*/
                  result
                );
              else
                code_points.push(result);
            } while (!input_stream.endOfStream());
            this._decoder = null;
          }
          if (code_points.length) {
            if (["utf-8"].indexOf(this.encoding) !== -1 && !this._ignoreBOM && !this._BOMseen) {
              if (code_points[0] === 65279) {
                this._BOMseen = true;
                code_points.shift();
              } else {
                this._BOMseen = true;
              }
            }
          }
          return codePointsToString(code_points);
        }
      };
      function TextEncoder2(encoding, options) {
        if (!(this instanceof TextEncoder2))
          return new TextEncoder2(encoding, options);
        encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;
        if (encoding !== DEFAULT_ENCODING) {
          throw new Error("Encoding not supported. Only utf-8 is supported");
        }
        options = ToDictionary(options);
        this._streaming = false;
        this._encoder = null;
        this._options = { fatal: Boolean(options["fatal"]) };
        Object.defineProperty(this, "encoding", { value: "utf-8" });
      }
      TextEncoder2.prototype = {
        /**
         * @param {string=} opt_string The string to encode.
         * @param {Object=} options
         * @return {Uint8Array} Encoded bytes, as a Uint8Array.
         */
        encode: function encode11(opt_string, options) {
          opt_string = opt_string ? String(opt_string) : "";
          options = ToDictionary(options);
          if (!this._streaming)
            this._encoder = new UTF8Encoder(this._options);
          this._streaming = Boolean(options["stream"]);
          var bytes = [];
          var input_stream = new Stream(stringToCodePoints(opt_string));
          var result;
          while (!input_stream.endOfStream()) {
            result = this._encoder.handler(input_stream, input_stream.read());
            if (result === finished)
              break;
            if (Array.isArray(result))
              bytes.push.apply(
                bytes,
                /**@type {!Array.<number>}*/
                result
              );
            else
              bytes.push(result);
          }
          if (!this._streaming) {
            while (true) {
              result = this._encoder.handler(input_stream, input_stream.read());
              if (result === finished)
                break;
              if (Array.isArray(result))
                bytes.push.apply(
                  bytes,
                  /**@type {!Array.<number>}*/
                  result
                );
              else
                bytes.push(result);
            }
            this._encoder = null;
          }
          return new Uint8Array(bytes);
        }
      };
      function UTF8Decoder(options) {
        var fatal = options.fatal;
        var utf8_code_point = 0, utf8_bytes_seen = 0, utf8_bytes_needed = 0, utf8_lower_boundary = 128, utf8_upper_boundary = 191;
        this.handler = function(stream, bite) {
          if (bite === end_of_stream && utf8_bytes_needed !== 0) {
            utf8_bytes_needed = 0;
            return decoderError(fatal);
          }
          if (bite === end_of_stream)
            return finished;
          if (utf8_bytes_needed === 0) {
            if (inRange3(bite, 0, 127)) {
              return bite;
            }
            if (inRange3(bite, 194, 223)) {
              utf8_bytes_needed = 1;
              utf8_code_point = bite - 192;
            } else if (inRange3(bite, 224, 239)) {
              if (bite === 224)
                utf8_lower_boundary = 160;
              if (bite === 237)
                utf8_upper_boundary = 159;
              utf8_bytes_needed = 2;
              utf8_code_point = bite - 224;
            } else if (inRange3(bite, 240, 244)) {
              if (bite === 240)
                utf8_lower_boundary = 144;
              if (bite === 244)
                utf8_upper_boundary = 143;
              utf8_bytes_needed = 3;
              utf8_code_point = bite - 240;
            } else {
              return decoderError(fatal);
            }
            utf8_code_point = utf8_code_point << 6 * utf8_bytes_needed;
            return null;
          }
          if (!inRange3(bite, utf8_lower_boundary, utf8_upper_boundary)) {
            utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;
            utf8_lower_boundary = 128;
            utf8_upper_boundary = 191;
            stream.prepend(bite);
            return decoderError(fatal);
          }
          utf8_lower_boundary = 128;
          utf8_upper_boundary = 191;
          utf8_bytes_seen += 1;
          utf8_code_point += bite - 128 << 6 * (utf8_bytes_needed - utf8_bytes_seen);
          if (utf8_bytes_seen !== utf8_bytes_needed)
            return null;
          var code_point = utf8_code_point;
          utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;
          return code_point;
        };
      }
      function UTF8Encoder(options) {
        var fatal = options.fatal;
        this.handler = function(stream, code_point) {
          if (code_point === end_of_stream)
            return finished;
          if (inRange3(code_point, 0, 127))
            return code_point;
          var count, offset2;
          if (inRange3(code_point, 128, 2047)) {
            count = 1;
            offset2 = 192;
          } else if (inRange3(code_point, 2048, 65535)) {
            count = 2;
            offset2 = 224;
          } else if (inRange3(code_point, 65536, 1114111)) {
            count = 3;
            offset2 = 240;
          }
          var bytes = [(code_point >> 6 * count) + offset2];
          while (count > 0) {
            var temp = code_point >> 6 * (count - 1);
            bytes.push(128 | temp & 63);
            count -= 1;
          }
          return bytes;
        };
      }
      exports.TextEncoder = TextEncoder2;
      exports.TextDecoder = TextDecoder2;
    }
  });

  // ../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js
  var require_lib = __commonJS({
    "../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        Object.defineProperty(o5, k22, { enumerable: true, get: function() {
          return m3[k7];
        } });
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o5, v13) {
        Object.defineProperty(o5, "default", { enumerable: true, value: v13 });
      }) : function(o5, v13) {
        o5["default"] = v13;
      });
      var __decorate2 = exports && exports.__decorate || function(decorators, target, key2, desc) {
        var c7 = arguments.length, r3 = c7 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key2) : desc, d6;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key2, desc);
        else for (var i5 = decorators.length - 1; i5 >= 0; i5--) if (d6 = decorators[i5]) r3 = (c7 < 3 ? d6(r3) : c7 > 3 ? d6(target, key2, r3) : d6(target, key2)) || r3;
        return c7 > 3 && r3 && Object.defineProperty(target, key2, r3), r3;
      };
      var __importStar2 = exports && exports.__importStar || function(mod3) {
        if (mod3 && mod3.__esModule) return mod3;
        var result = {};
        if (mod3 != null) {
          for (var k7 in mod3) if (k7 !== "default" && Object.hasOwnProperty.call(mod3, k7)) __createBinding2(result, mod3, k7);
        }
        __setModuleDefault(result, mod3);
        return result;
      };
      var __importDefault2 = exports && exports.__importDefault || function(mod3) {
        return mod3 && mod3.__esModule ? mod3 : { "default": mod3 };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.deserializeUnchecked = exports.deserialize = exports.serialize = exports.BinaryReader = exports.BinaryWriter = exports.BorshError = exports.baseDecode = exports.baseEncode = void 0;
      var bn_js_1 = __importDefault2(require_bn());
      var bs58_1 = __importDefault2(require_bs58());
      var encoding = __importStar2(require_encoding_lib());
      var ResolvedTextDecoder = typeof TextDecoder !== "function" ? encoding.TextDecoder : TextDecoder;
      var textDecoder2 = new ResolvedTextDecoder("utf-8", { fatal: true });
      function baseEncode(value) {
        if (typeof value === "string") {
          value = Buffer2.from(value, "utf8");
        }
        return bs58_1.default.encode(Buffer2.from(value));
      }
      exports.baseEncode = baseEncode;
      function baseDecode(value) {
        return Buffer2.from(bs58_1.default.decode(value));
      }
      exports.baseDecode = baseDecode;
      var INITIAL_LENGTH = 1024;
      var BorshError = class extends Error {
        constructor(message) {
          super(message);
          this.fieldPath = [];
          this.originalMessage = message;
        }
        addToFieldPath(fieldName) {
          this.fieldPath.splice(0, 0, fieldName);
          this.message = this.originalMessage + ": " + this.fieldPath.join(".");
        }
      };
      exports.BorshError = BorshError;
      var BinaryWriter = class {
        constructor() {
          this.buf = Buffer2.alloc(INITIAL_LENGTH);
          this.length = 0;
        }
        maybeResize() {
          if (this.buf.length < 16 + this.length) {
            this.buf = Buffer2.concat([this.buf, Buffer2.alloc(INITIAL_LENGTH)]);
          }
        }
        writeU8(value) {
          this.maybeResize();
          this.buf.writeUInt8(value, this.length);
          this.length += 1;
        }
        writeU16(value) {
          this.maybeResize();
          this.buf.writeUInt16LE(value, this.length);
          this.length += 2;
        }
        writeU32(value) {
          this.maybeResize();
          this.buf.writeUInt32LE(value, this.length);
          this.length += 4;
        }
        writeU64(value) {
          this.maybeResize();
          this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray("le", 8)));
        }
        writeU128(value) {
          this.maybeResize();
          this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray("le", 16)));
        }
        writeU256(value) {
          this.maybeResize();
          this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray("le", 32)));
        }
        writeU512(value) {
          this.maybeResize();
          this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray("le", 64)));
        }
        writeBuffer(buffer2) {
          this.buf = Buffer2.concat([
            Buffer2.from(this.buf.subarray(0, this.length)),
            buffer2,
            Buffer2.alloc(INITIAL_LENGTH)
          ]);
          this.length += buffer2.length;
        }
        writeString(str) {
          this.maybeResize();
          const b9 = Buffer2.from(str, "utf8");
          this.writeU32(b9.length);
          this.writeBuffer(b9);
        }
        writeFixedArray(array3) {
          this.writeBuffer(Buffer2.from(array3));
        }
        writeArray(array3, fn) {
          this.maybeResize();
          this.writeU32(array3.length);
          for (const elem of array3) {
            this.maybeResize();
            fn(elem);
          }
        }
        toArray() {
          return this.buf.subarray(0, this.length);
        }
      };
      exports.BinaryWriter = BinaryWriter;
      function handlingRangeError(target, propertyKey, propertyDescriptor) {
        const originalMethod = propertyDescriptor.value;
        propertyDescriptor.value = function(...args) {
          try {
            return originalMethod.apply(this, args);
          } catch (e2) {
            if (e2 instanceof RangeError) {
              const code2 = e2.code;
              if (["ERR_BUFFER_OUT_OF_BOUNDS", "ERR_OUT_OF_RANGE"].indexOf(code2) >= 0) {
                throw new BorshError("Reached the end of buffer when deserializing");
              }
            }
            throw e2;
          }
        };
      }
      var BinaryReader = class {
        constructor(buf) {
          this.buf = buf;
          this.offset = 0;
        }
        readU8() {
          const value = this.buf.readUInt8(this.offset);
          this.offset += 1;
          return value;
        }
        readU16() {
          const value = this.buf.readUInt16LE(this.offset);
          this.offset += 2;
          return value;
        }
        readU32() {
          const value = this.buf.readUInt32LE(this.offset);
          this.offset += 4;
          return value;
        }
        readU64() {
          const buf = this.readBuffer(8);
          return new bn_js_1.default(buf, "le");
        }
        readU128() {
          const buf = this.readBuffer(16);
          return new bn_js_1.default(buf, "le");
        }
        readU256() {
          const buf = this.readBuffer(32);
          return new bn_js_1.default(buf, "le");
        }
        readU512() {
          const buf = this.readBuffer(64);
          return new bn_js_1.default(buf, "le");
        }
        readBuffer(len) {
          if (this.offset + len > this.buf.length) {
            throw new BorshError(`Expected buffer length ${len} isn't within bounds`);
          }
          const result = this.buf.slice(this.offset, this.offset + len);
          this.offset += len;
          return result;
        }
        readString() {
          const len = this.readU32();
          const buf = this.readBuffer(len);
          try {
            return textDecoder2.decode(buf);
          } catch (e2) {
            throw new BorshError(`Error decoding UTF-8 string: ${e2}`);
          }
        }
        readFixedArray(len) {
          return new Uint8Array(this.readBuffer(len));
        }
        readArray(fn) {
          const len = this.readU32();
          const result = Array();
          for (let i5 = 0; i5 < len; ++i5) {
            result.push(fn());
          }
          return result;
        }
      };
      __decorate2([
        handlingRangeError
      ], BinaryReader.prototype, "readU8", null);
      __decorate2([
        handlingRangeError
      ], BinaryReader.prototype, "readU16", null);
      __decorate2([
        handlingRangeError
      ], BinaryReader.prototype, "readU32", null);
      __decorate2([
        handlingRangeError
      ], BinaryReader.prototype, "readU64", null);
      __decorate2([
        handlingRangeError
      ], BinaryReader.prototype, "readU128", null);
      __decorate2([
        handlingRangeError
      ], BinaryReader.prototype, "readU256", null);
      __decorate2([
        handlingRangeError
      ], BinaryReader.prototype, "readU512", null);
      __decorate2([
        handlingRangeError
      ], BinaryReader.prototype, "readString", null);
      __decorate2([
        handlingRangeError
      ], BinaryReader.prototype, "readFixedArray", null);
      __decorate2([
        handlingRangeError
      ], BinaryReader.prototype, "readArray", null);
      exports.BinaryReader = BinaryReader;
      function capitalizeFirstLetter(string7) {
        return string7.charAt(0).toUpperCase() + string7.slice(1);
      }
      function serializeField(schema, fieldName, value, fieldType, writer) {
        try {
          if (typeof fieldType === "string") {
            writer[`write${capitalizeFirstLetter(fieldType)}`](value);
          } else if (fieldType instanceof Array) {
            if (typeof fieldType[0] === "number") {
              if (value.length !== fieldType[0]) {
                throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);
              }
              writer.writeFixedArray(value);
            } else if (fieldType.length === 2 && typeof fieldType[1] === "number") {
              if (value.length !== fieldType[1]) {
                throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);
              }
              for (let i5 = 0; i5 < fieldType[1]; i5++) {
                serializeField(schema, null, value[i5], fieldType[0], writer);
              }
            } else {
              writer.writeArray(value, (item) => {
                serializeField(schema, fieldName, item, fieldType[0], writer);
              });
            }
          } else if (fieldType.kind !== void 0) {
            switch (fieldType.kind) {
              case "option": {
                if (value === null || value === void 0) {
                  writer.writeU8(0);
                } else {
                  writer.writeU8(1);
                  serializeField(schema, fieldName, value, fieldType.type, writer);
                }
                break;
              }
              case "map": {
                writer.writeU32(value.size);
                value.forEach((val, key2) => {
                  serializeField(schema, fieldName, key2, fieldType.key, writer);
                  serializeField(schema, fieldName, val, fieldType.value, writer);
                });
                break;
              }
              default:
                throw new BorshError(`FieldType ${fieldType} unrecognized`);
            }
          } else {
            serializeStruct(schema, value, writer);
          }
        } catch (error51) {
          if (error51 instanceof BorshError) {
            error51.addToFieldPath(fieldName);
          }
          throw error51;
        }
      }
      function serializeStruct(schema, obj, writer) {
        if (typeof obj.borshSerialize === "function") {
          obj.borshSerialize(writer);
          return;
        }
        const structSchema = schema.get(obj.constructor);
        if (!structSchema) {
          throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);
        }
        if (structSchema.kind === "struct") {
          structSchema.fields.map(([fieldName, fieldType]) => {
            serializeField(schema, fieldName, obj[fieldName], fieldType, writer);
          });
        } else if (structSchema.kind === "enum") {
          const name2 = obj[structSchema.field];
          for (let idx = 0; idx < structSchema.values.length; ++idx) {
            const [fieldName, fieldType] = structSchema.values[idx];
            if (fieldName === name2) {
              writer.writeU8(idx);
              serializeField(schema, fieldName, obj[fieldName], fieldType, writer);
              break;
            }
          }
        } else {
          throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);
        }
      }
      function serialize2(schema, obj, Writer = BinaryWriter) {
        const writer = new Writer();
        serializeStruct(schema, obj, writer);
        return writer.toArray();
      }
      exports.serialize = serialize2;
      function deserializeField(schema, fieldName, fieldType, reader) {
        try {
          if (typeof fieldType === "string") {
            return reader[`read${capitalizeFirstLetter(fieldType)}`]();
          }
          if (fieldType instanceof Array) {
            if (typeof fieldType[0] === "number") {
              return reader.readFixedArray(fieldType[0]);
            } else if (typeof fieldType[1] === "number") {
              const arr = [];
              for (let i5 = 0; i5 < fieldType[1]; i5++) {
                arr.push(deserializeField(schema, null, fieldType[0], reader));
              }
              return arr;
            } else {
              return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));
            }
          }
          if (fieldType.kind === "option") {
            const option = reader.readU8();
            if (option) {
              return deserializeField(schema, fieldName, fieldType.type, reader);
            }
            return void 0;
          }
          if (fieldType.kind === "map") {
            let map2 = /* @__PURE__ */ new Map();
            const length2 = reader.readU32();
            for (let i5 = 0; i5 < length2; i5++) {
              const key2 = deserializeField(schema, fieldName, fieldType.key, reader);
              const val = deserializeField(schema, fieldName, fieldType.value, reader);
              map2.set(key2, val);
            }
            return map2;
          }
          return deserializeStruct(schema, fieldType, reader);
        } catch (error51) {
          if (error51 instanceof BorshError) {
            error51.addToFieldPath(fieldName);
          }
          throw error51;
        }
      }
      function deserializeStruct(schema, classType, reader) {
        if (typeof classType.borshDeserialize === "function") {
          return classType.borshDeserialize(reader);
        }
        const structSchema = schema.get(classType);
        if (!structSchema) {
          throw new BorshError(`Class ${classType.name} is missing in schema`);
        }
        if (structSchema.kind === "struct") {
          const result = {};
          for (const [fieldName, fieldType] of schema.get(classType).fields) {
            result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);
          }
          return new classType(result);
        }
        if (structSchema.kind === "enum") {
          const idx = reader.readU8();
          if (idx >= structSchema.values.length) {
            throw new BorshError(`Enum index: ${idx} is out of range`);
          }
          const [fieldName, fieldType] = structSchema.values[idx];
          const fieldValue = deserializeField(schema, fieldName, fieldType, reader);
          return new classType({ [fieldName]: fieldValue });
        }
        throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);
      }
      function deserialize2(schema, classType, buffer2, Reader = BinaryReader) {
        const reader = new Reader(buffer2);
        const result = deserializeStruct(schema, classType, reader);
        if (reader.offset < buffer2.length) {
          throw new BorshError(`Unexpected ${buffer2.length - reader.offset} bytes after deserialized data`);
        }
        return result;
      }
      exports.deserialize = deserialize2;
      function deserializeUnchecked2(schema, classType, buffer2, Reader = BinaryReader) {
        const reader = new Reader(buffer2);
        return deserializeStruct(schema, classType, reader);
      }
      exports.deserializeUnchecked = deserializeUnchecked2;
    }
  });

  // ../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js
  var require_Layout = __commonJS({
    "../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.s16 = exports.s8 = exports.nu64be = exports.u48be = exports.u40be = exports.u32be = exports.u24be = exports.u16be = exports.nu64 = exports.u48 = exports.u40 = exports.u32 = exports.u24 = exports.u16 = exports.u8 = exports.offset = exports.greedy = exports.Constant = exports.UTF8 = exports.CString = exports.Blob = exports.Boolean = exports.BitField = exports.BitStructure = exports.VariantLayout = exports.Union = exports.UnionLayoutDiscriminator = exports.UnionDiscriminator = exports.Structure = exports.Sequence = exports.DoubleBE = exports.Double = exports.FloatBE = exports.Float = exports.NearInt64BE = exports.NearInt64 = exports.NearUInt64BE = exports.NearUInt64 = exports.IntBE = exports.Int = exports.UIntBE = exports.UInt = exports.OffsetLayout = exports.GreedyCount = exports.ExternalLayout = exports.bindConstructorLayout = exports.nameWithProperty = exports.Layout = exports.uint8ArrayToBuffer = exports.checkUint8Array = void 0;
      exports.constant = exports.utf8 = exports.cstr = exports.blob = exports.unionLayoutDiscriminator = exports.union = exports.seq = exports.bits = exports.struct = exports.f64be = exports.f64 = exports.f32be = exports.f32 = exports.ns64be = exports.s48be = exports.s40be = exports.s32be = exports.s24be = exports.s16be = exports.ns64 = exports.s48 = exports.s40 = exports.s32 = exports.s24 = void 0;
      var buffer_1 = require_buffer();
      function checkUint8Array(b9) {
        if (!(b9 instanceof Uint8Array)) {
          throw new TypeError("b must be a Uint8Array");
        }
      }
      exports.checkUint8Array = checkUint8Array;
      function uint8ArrayToBuffer(b9) {
        checkUint8Array(b9);
        return buffer_1.Buffer.from(b9.buffer, b9.byteOffset, b9.length);
      }
      exports.uint8ArrayToBuffer = uint8ArrayToBuffer;
      var Layout = class {
        constructor(span, property) {
          if (!Number.isInteger(span)) {
            throw new TypeError("span must be an integer");
          }
          this.span = span;
          this.property = property;
        }
        /** Function to create an Object into which decoded properties will
         * be written.
         *
         * Used only for layouts that {@link Layout#decode|decode} to Object
         * instances, which means:
         * * {@link Structure}
         * * {@link Union}
         * * {@link VariantLayout}
         * * {@link BitStructure}
         *
         * If left undefined the JavaScript representation of these layouts
         * will be Object instances.
         *
         * See {@link bindConstructorLayout}.
         */
        makeDestinationObject() {
          return {};
        }
        /**
         * Calculate the span of a specific instance of a layout.
         *
         * @param {Uint8Array} b - the buffer that contains an encoded instance.
         *
         * @param {Number} [offset] - the offset at which the encoded instance
         * starts.  If absent a zero offset is inferred.
         *
         * @return {Number} - the number of bytes covered by the layout
         * instance.  If this method is not overridden in a subclass the
         * definition-time constant {@link Layout#span|span} will be
         * returned.
         *
         * @throws {RangeError} - if the length of the value cannot be
         * determined.
         */
        getSpan(b9, offset2) {
          if (0 > this.span) {
            throw new RangeError("indeterminate span");
          }
          return this.span;
        }
        /**
         * Replicate the layout using a new property.
         *
         * This function must be used to get a structurally-equivalent layout
         * with a different name since all {@link Layout} instances are
         * immutable.
         *
         * **NOTE** This is a shallow copy.  All fields except {@link
         * Layout#property|property} are strictly equal to the origin layout.
         *
         * @param {String} property - the value for {@link
         * Layout#property|property} in the replica.
         *
         * @returns {Layout} - the copy with {@link Layout#property|property}
         * set to `property`.
         */
        replicate(property) {
          const rv = Object.create(this.constructor.prototype);
          Object.assign(rv, this);
          rv.property = property;
          return rv;
        }
        /**
         * Create an object from layout properties and an array of values.
         *
         * **NOTE** This function returns `undefined` if invoked on a layout
         * that does not return its value as an Object.  Objects are
         * returned for things that are a {@link Structure}, which includes
         * {@link VariantLayout|variant layouts} if they are structures, and
         * excludes {@link Union}s.  If you want this feature for a union
         * you must use {@link Union.getVariant|getVariant} to select the
         * desired layout.
         *
         * @param {Array} values - an array of values that correspond to the
         * default order for properties.  As with {@link Layout#decode|decode}
         * layout elements that have no property name are skipped when
         * iterating over the array values.  Only the top-level properties are
         * assigned; arguments are not assigned to properties of contained
         * layouts.  Any unused values are ignored.
         *
         * @return {(Object|undefined)}
         */
        fromArray(values) {
          return void 0;
        }
      };
      exports.Layout = Layout;
      function nameWithProperty(name2, lo4) {
        if (lo4.property) {
          return name2 + "[" + lo4.property + "]";
        }
        return name2;
      }
      exports.nameWithProperty = nameWithProperty;
      function bindConstructorLayout(Class2, layout) {
        if ("function" !== typeof Class2) {
          throw new TypeError("Class must be constructor");
        }
        if (Object.prototype.hasOwnProperty.call(Class2, "layout_")) {
          throw new Error("Class is already bound to a layout");
        }
        if (!(layout && layout instanceof Layout)) {
          throw new TypeError("layout must be a Layout");
        }
        if (Object.prototype.hasOwnProperty.call(layout, "boundConstructor_")) {
          throw new Error("layout is already bound to a constructor");
        }
        Class2.layout_ = layout;
        layout.boundConstructor_ = Class2;
        layout.makeDestinationObject = (() => new Class2());
        Object.defineProperty(Class2.prototype, "encode", {
          value(b9, offset2) {
            return layout.encode(this, b9, offset2);
          },
          writable: true
        });
        Object.defineProperty(Class2, "decode", {
          value(b9, offset2) {
            return layout.decode(b9, offset2);
          },
          writable: true
        });
      }
      exports.bindConstructorLayout = bindConstructorLayout;
      var ExternalLayout = class extends Layout {
        /**
         * Return `true` iff the external layout decodes to an unsigned
         * integer layout.
         *
         * In that case it can be used as the source of {@link
         * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},
         * or as {@link UnionLayoutDiscriminator#layout|external union
         * discriminators}.
         *
         * @abstract
         */
        isCount() {
          throw new Error("ExternalLayout is abstract");
        }
      };
      exports.ExternalLayout = ExternalLayout;
      var GreedyCount = class extends ExternalLayout {
        constructor(elementSpan = 1, property) {
          if (!Number.isInteger(elementSpan) || 0 >= elementSpan) {
            throw new TypeError("elementSpan must be a (positive) integer");
          }
          super(-1, property);
          this.elementSpan = elementSpan;
        }
        /** @override */
        isCount() {
          return true;
        }
        /** @override */
        decode(b9, offset2 = 0) {
          checkUint8Array(b9);
          const rem = b9.length - offset2;
          return Math.floor(rem / this.elementSpan);
        }
        /** @override */
        encode(src2, b9, offset2) {
          return 0;
        }
      };
      exports.GreedyCount = GreedyCount;
      var OffsetLayout = class extends ExternalLayout {
        constructor(layout, offset2 = 0, property) {
          if (!(layout instanceof Layout)) {
            throw new TypeError("layout must be a Layout");
          }
          if (!Number.isInteger(offset2)) {
            throw new TypeError("offset must be integer or undefined");
          }
          super(layout.span, property || layout.property);
          this.layout = layout;
          this.offset = offset2;
        }
        /** @override */
        isCount() {
          return this.layout instanceof UInt || this.layout instanceof UIntBE;
        }
        /** @override */
        decode(b9, offset2 = 0) {
          return this.layout.decode(b9, offset2 + this.offset);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          return this.layout.encode(src2, b9, offset2 + this.offset);
        }
      };
      exports.OffsetLayout = OffsetLayout;
      var UInt = class extends Layout {
        constructor(span, property) {
          super(span, property);
          if (6 < this.span) {
            throw new RangeError("span must not exceed 6 bytes");
          }
        }
        /** @override */
        decode(b9, offset2 = 0) {
          return uint8ArrayToBuffer(b9).readUIntLE(offset2, this.span);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          uint8ArrayToBuffer(b9).writeUIntLE(src2, offset2, this.span);
          return this.span;
        }
      };
      exports.UInt = UInt;
      var UIntBE = class extends Layout {
        constructor(span, property) {
          super(span, property);
          if (6 < this.span) {
            throw new RangeError("span must not exceed 6 bytes");
          }
        }
        /** @override */
        decode(b9, offset2 = 0) {
          return uint8ArrayToBuffer(b9).readUIntBE(offset2, this.span);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          uint8ArrayToBuffer(b9).writeUIntBE(src2, offset2, this.span);
          return this.span;
        }
      };
      exports.UIntBE = UIntBE;
      var Int = class extends Layout {
        constructor(span, property) {
          super(span, property);
          if (6 < this.span) {
            throw new RangeError("span must not exceed 6 bytes");
          }
        }
        /** @override */
        decode(b9, offset2 = 0) {
          return uint8ArrayToBuffer(b9).readIntLE(offset2, this.span);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          uint8ArrayToBuffer(b9).writeIntLE(src2, offset2, this.span);
          return this.span;
        }
      };
      exports.Int = Int;
      var IntBE = class extends Layout {
        constructor(span, property) {
          super(span, property);
          if (6 < this.span) {
            throw new RangeError("span must not exceed 6 bytes");
          }
        }
        /** @override */
        decode(b9, offset2 = 0) {
          return uint8ArrayToBuffer(b9).readIntBE(offset2, this.span);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          uint8ArrayToBuffer(b9).writeIntBE(src2, offset2, this.span);
          return this.span;
        }
      };
      exports.IntBE = IntBE;
      var V2E32 = Math.pow(2, 32);
      function divmodInt64(src2) {
        const hi32 = Math.floor(src2 / V2E32);
        const lo32 = src2 - hi32 * V2E32;
        return { hi32, lo32 };
      }
      function roundedInt64(hi32, lo32) {
        return hi32 * V2E32 + lo32;
      }
      var NearUInt64 = class extends Layout {
        constructor(property) {
          super(8, property);
        }
        /** @override */
        decode(b9, offset2 = 0) {
          const buffer2 = uint8ArrayToBuffer(b9);
          const lo32 = buffer2.readUInt32LE(offset2);
          const hi32 = buffer2.readUInt32LE(offset2 + 4);
          return roundedInt64(hi32, lo32);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          const split3 = divmodInt64(src2);
          const buffer2 = uint8ArrayToBuffer(b9);
          buffer2.writeUInt32LE(split3.lo32, offset2);
          buffer2.writeUInt32LE(split3.hi32, offset2 + 4);
          return 8;
        }
      };
      exports.NearUInt64 = NearUInt64;
      var NearUInt64BE = class extends Layout {
        constructor(property) {
          super(8, property);
        }
        /** @override */
        decode(b9, offset2 = 0) {
          const buffer2 = uint8ArrayToBuffer(b9);
          const hi32 = buffer2.readUInt32BE(offset2);
          const lo32 = buffer2.readUInt32BE(offset2 + 4);
          return roundedInt64(hi32, lo32);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          const split3 = divmodInt64(src2);
          const buffer2 = uint8ArrayToBuffer(b9);
          buffer2.writeUInt32BE(split3.hi32, offset2);
          buffer2.writeUInt32BE(split3.lo32, offset2 + 4);
          return 8;
        }
      };
      exports.NearUInt64BE = NearUInt64BE;
      var NearInt64 = class extends Layout {
        constructor(property) {
          super(8, property);
        }
        /** @override */
        decode(b9, offset2 = 0) {
          const buffer2 = uint8ArrayToBuffer(b9);
          const lo32 = buffer2.readUInt32LE(offset2);
          const hi32 = buffer2.readInt32LE(offset2 + 4);
          return roundedInt64(hi32, lo32);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          const split3 = divmodInt64(src2);
          const buffer2 = uint8ArrayToBuffer(b9);
          buffer2.writeUInt32LE(split3.lo32, offset2);
          buffer2.writeInt32LE(split3.hi32, offset2 + 4);
          return 8;
        }
      };
      exports.NearInt64 = NearInt64;
      var NearInt64BE = class extends Layout {
        constructor(property) {
          super(8, property);
        }
        /** @override */
        decode(b9, offset2 = 0) {
          const buffer2 = uint8ArrayToBuffer(b9);
          const hi32 = buffer2.readInt32BE(offset2);
          const lo32 = buffer2.readUInt32BE(offset2 + 4);
          return roundedInt64(hi32, lo32);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          const split3 = divmodInt64(src2);
          const buffer2 = uint8ArrayToBuffer(b9);
          buffer2.writeInt32BE(split3.hi32, offset2);
          buffer2.writeUInt32BE(split3.lo32, offset2 + 4);
          return 8;
        }
      };
      exports.NearInt64BE = NearInt64BE;
      var Float = class extends Layout {
        constructor(property) {
          super(4, property);
        }
        /** @override */
        decode(b9, offset2 = 0) {
          return uint8ArrayToBuffer(b9).readFloatLE(offset2);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          uint8ArrayToBuffer(b9).writeFloatLE(src2, offset2);
          return 4;
        }
      };
      exports.Float = Float;
      var FloatBE = class extends Layout {
        constructor(property) {
          super(4, property);
        }
        /** @override */
        decode(b9, offset2 = 0) {
          return uint8ArrayToBuffer(b9).readFloatBE(offset2);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          uint8ArrayToBuffer(b9).writeFloatBE(src2, offset2);
          return 4;
        }
      };
      exports.FloatBE = FloatBE;
      var Double = class extends Layout {
        constructor(property) {
          super(8, property);
        }
        /** @override */
        decode(b9, offset2 = 0) {
          return uint8ArrayToBuffer(b9).readDoubleLE(offset2);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          uint8ArrayToBuffer(b9).writeDoubleLE(src2, offset2);
          return 8;
        }
      };
      exports.Double = Double;
      var DoubleBE = class extends Layout {
        constructor(property) {
          super(8, property);
        }
        /** @override */
        decode(b9, offset2 = 0) {
          return uint8ArrayToBuffer(b9).readDoubleBE(offset2);
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          uint8ArrayToBuffer(b9).writeDoubleBE(src2, offset2);
          return 8;
        }
      };
      exports.DoubleBE = DoubleBE;
      var Sequence = class extends Layout {
        constructor(elementLayout, count, property) {
          if (!(elementLayout instanceof Layout)) {
            throw new TypeError("elementLayout must be a Layout");
          }
          if (!(count instanceof ExternalLayout && count.isCount() || Number.isInteger(count) && 0 <= count)) {
            throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");
          }
          let span = -1;
          if (!(count instanceof ExternalLayout) && 0 < elementLayout.span) {
            span = count * elementLayout.span;
          }
          super(span, property);
          this.elementLayout = elementLayout;
          this.count = count;
        }
        /** @override */
        getSpan(b9, offset2 = 0) {
          if (0 <= this.span) {
            return this.span;
          }
          let span = 0;
          let count = this.count;
          if (count instanceof ExternalLayout) {
            count = count.decode(b9, offset2);
          }
          if (0 < this.elementLayout.span) {
            span = count * this.elementLayout.span;
          } else {
            let idx = 0;
            while (idx < count) {
              span += this.elementLayout.getSpan(b9, offset2 + span);
              ++idx;
            }
          }
          return span;
        }
        /** @override */
        decode(b9, offset2 = 0) {
          const rv = [];
          let i5 = 0;
          let count = this.count;
          if (count instanceof ExternalLayout) {
            count = count.decode(b9, offset2);
          }
          while (i5 < count) {
            rv.push(this.elementLayout.decode(b9, offset2));
            offset2 += this.elementLayout.getSpan(b9, offset2);
            i5 += 1;
          }
          return rv;
        }
        /** Implement {@link Layout#encode|encode} for {@link Sequence}.
         *
         * **NOTE** If `src` is shorter than {@link Sequence#count|count} then
         * the unused space in the buffer is left unchanged.  If `src` is
         * longer than {@link Sequence#count|count} the unneeded elements are
         * ignored.
         *
         * **NOTE** If {@link Layout#count|count} is an instance of {@link
         * ExternalLayout} then the length of `src` will be encoded as the
         * count after `src` is encoded. */
        encode(src2, b9, offset2 = 0) {
          const elo = this.elementLayout;
          const span = src2.reduce((span2, v13) => {
            return span2 + elo.encode(v13, b9, offset2 + span2);
          }, 0);
          if (this.count instanceof ExternalLayout) {
            this.count.encode(src2.length, b9, offset2);
          }
          return span;
        }
      };
      exports.Sequence = Sequence;
      var Structure = class extends Layout {
        constructor(fields, property, decodePrefixes) {
          if (!(Array.isArray(fields) && fields.reduce((acc, v13) => acc && v13 instanceof Layout, true))) {
            throw new TypeError("fields must be array of Layout instances");
          }
          if ("boolean" === typeof property && void 0 === decodePrefixes) {
            decodePrefixes = property;
            property = void 0;
          }
          for (const fd of fields) {
            if (0 > fd.span && void 0 === fd.property) {
              throw new Error("fields cannot contain unnamed variable-length layout");
            }
          }
          let span = -1;
          try {
            span = fields.reduce((span2, fd) => span2 + fd.getSpan(), 0);
          } catch (e2) {
          }
          super(span, property);
          this.fields = fields;
          this.decodePrefixes = !!decodePrefixes;
        }
        /** @override */
        getSpan(b9, offset2 = 0) {
          if (0 <= this.span) {
            return this.span;
          }
          let span = 0;
          try {
            span = this.fields.reduce((span2, fd) => {
              const fsp = fd.getSpan(b9, offset2);
              offset2 += fsp;
              return span2 + fsp;
            }, 0);
          } catch (e2) {
            throw new RangeError("indeterminate span");
          }
          return span;
        }
        /** @override */
        decode(b9, offset2 = 0) {
          checkUint8Array(b9);
          const dest = this.makeDestinationObject();
          for (const fd of this.fields) {
            if (void 0 !== fd.property) {
              dest[fd.property] = fd.decode(b9, offset2);
            }
            offset2 += fd.getSpan(b9, offset2);
            if (this.decodePrefixes && b9.length === offset2) {
              break;
            }
          }
          return dest;
        }
        /** Implement {@link Layout#encode|encode} for {@link Structure}.
         *
         * If `src` is missing a property for a member with a defined {@link
         * Layout#property|property} the corresponding region of the buffer is
         * left unmodified. */
        encode(src2, b9, offset2 = 0) {
          const firstOffset = offset2;
          let lastOffset = 0;
          let lastWrote = 0;
          for (const fd of this.fields) {
            let span = fd.span;
            lastWrote = 0 < span ? span : 0;
            if (void 0 !== fd.property) {
              const fv = src2[fd.property];
              if (void 0 !== fv) {
                lastWrote = fd.encode(fv, b9, offset2);
                if (0 > span) {
                  span = fd.getSpan(b9, offset2);
                }
              }
            }
            lastOffset = offset2;
            offset2 += span;
          }
          return lastOffset + lastWrote - firstOffset;
        }
        /** @override */
        fromArray(values) {
          const dest = this.makeDestinationObject();
          for (const fd of this.fields) {
            if (void 0 !== fd.property && 0 < values.length) {
              dest[fd.property] = values.shift();
            }
          }
          return dest;
        }
        /**
         * Get access to the layout of a given property.
         *
         * @param {String} property - the structure member of interest.
         *
         * @return {Layout} - the layout associated with `property`, or
         * undefined if there is no such property.
         */
        layoutFor(property) {
          if ("string" !== typeof property) {
            throw new TypeError("property must be string");
          }
          for (const fd of this.fields) {
            if (fd.property === property) {
              return fd;
            }
          }
          return void 0;
        }
        /**
         * Get the offset of a structure member.
         *
         * @param {String} property - the structure member of interest.
         *
         * @return {Number} - the offset in bytes to the start of `property`
         * within the structure, or undefined if `property` is not a field
         * within the structure.  If the property is a member but follows a
         * variable-length structure member a negative number will be
         * returned.
         */
        offsetOf(property) {
          if ("string" !== typeof property) {
            throw new TypeError("property must be string");
          }
          let offset2 = 0;
          for (const fd of this.fields) {
            if (fd.property === property) {
              return offset2;
            }
            if (0 > fd.span) {
              offset2 = -1;
            } else if (0 <= offset2) {
              offset2 += fd.span;
            }
          }
          return void 0;
        }
      };
      exports.Structure = Structure;
      var UnionDiscriminator = class {
        constructor(property) {
          this.property = property;
        }
        /** Analog to {@link Layout#decode|Layout decode} for union discriminators.
         *
         * The implementation of this method need not reference the buffer if
         * variant information is available through other means. */
        decode(b9, offset2) {
          throw new Error("UnionDiscriminator is abstract");
        }
        /** Analog to {@link Layout#decode|Layout encode} for union discriminators.
         *
         * The implementation of this method need not store the value if
         * variant information is maintained through other means. */
        encode(src2, b9, offset2) {
          throw new Error("UnionDiscriminator is abstract");
        }
      };
      exports.UnionDiscriminator = UnionDiscriminator;
      var UnionLayoutDiscriminator = class extends UnionDiscriminator {
        constructor(layout, property) {
          if (!(layout instanceof ExternalLayout && layout.isCount())) {
            throw new TypeError("layout must be an unsigned integer ExternalLayout");
          }
          super(property || layout.property || "variant");
          this.layout = layout;
        }
        /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */
        decode(b9, offset2) {
          return this.layout.decode(b9, offset2);
        }
        /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */
        encode(src2, b9, offset2) {
          return this.layout.encode(src2, b9, offset2);
        }
      };
      exports.UnionLayoutDiscriminator = UnionLayoutDiscriminator;
      var Union = class extends Layout {
        constructor(discr, defaultLayout, property) {
          let discriminator;
          if (discr instanceof UInt || discr instanceof UIntBE) {
            discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));
          } else if (discr instanceof ExternalLayout && discr.isCount()) {
            discriminator = new UnionLayoutDiscriminator(discr);
          } else if (!(discr instanceof UnionDiscriminator)) {
            throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");
          } else {
            discriminator = discr;
          }
          if (void 0 === defaultLayout) {
            defaultLayout = null;
          }
          if (!(null === defaultLayout || defaultLayout instanceof Layout)) {
            throw new TypeError("defaultLayout must be null or a Layout");
          }
          if (null !== defaultLayout) {
            if (0 > defaultLayout.span) {
              throw new Error("defaultLayout must have constant span");
            }
            if (void 0 === defaultLayout.property) {
              defaultLayout = defaultLayout.replicate("content");
            }
          }
          let span = -1;
          if (defaultLayout) {
            span = defaultLayout.span;
            if (0 <= span && (discr instanceof UInt || discr instanceof UIntBE)) {
              span += discriminator.layout.span;
            }
          }
          super(span, property);
          this.discriminator = discriminator;
          this.usesPrefixDiscriminator = discr instanceof UInt || discr instanceof UIntBE;
          this.defaultLayout = defaultLayout;
          this.registry = {};
          let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);
          this.getSourceVariant = function(src2) {
            return boundGetSourceVariant(src2);
          };
          this.configGetSourceVariant = function(gsv) {
            boundGetSourceVariant = gsv.bind(this);
          };
        }
        /** @override */
        getSpan(b9, offset2 = 0) {
          if (0 <= this.span) {
            return this.span;
          }
          const vlo = this.getVariant(b9, offset2);
          if (!vlo) {
            throw new Error("unable to determine span for unrecognized variant");
          }
          return vlo.getSpan(b9, offset2);
        }
        /**
         * Method to infer a registered Union variant compatible with `src`.
         *
         * The first satisfied rule in the following sequence defines the
         * return value:
         * * If `src` has properties matching the Union discriminator and
         *   the default layout, `undefined` is returned regardless of the
         *   value of the discriminator property (this ensures the default
         *   layout will be used);
         * * If `src` has a property matching the Union discriminator, the
         *   value of the discriminator identifies a registered variant, and
         *   either (a) the variant has no layout, or (b) `src` has the
         *   variant's property, then the variant is returned (because the
         *   source satisfies the constraints of the variant it identifies);
         * * If `src` does not have a property matching the Union
         *   discriminator, but does have a property matching a registered
         *   variant, then the variant is returned (because the source
         *   matches a variant without an explicit conflict);
         * * An error is thrown (because we either can't identify a variant,
         *   or we were explicitly told the variant but can't satisfy it).
         *
         * @param {Object} src - an object presumed to be compatible with
         * the content of the Union.
         *
         * @return {(undefined|VariantLayout)} - as described above.
         *
         * @throws {Error} - if `src` cannot be associated with a default or
         * registered variant.
         */
        defaultGetSourceVariant(src2) {
          if (Object.prototype.hasOwnProperty.call(src2, this.discriminator.property)) {
            if (this.defaultLayout && this.defaultLayout.property && Object.prototype.hasOwnProperty.call(src2, this.defaultLayout.property)) {
              return void 0;
            }
            const vlo = this.registry[src2[this.discriminator.property]];
            if (vlo && (!vlo.layout || vlo.property && Object.prototype.hasOwnProperty.call(src2, vlo.property))) {
              return vlo;
            }
          } else {
            for (const tag in this.registry) {
              const vlo = this.registry[tag];
              if (vlo.property && Object.prototype.hasOwnProperty.call(src2, vlo.property)) {
                return vlo;
              }
            }
          }
          throw new Error("unable to infer src variant");
        }
        /** Implement {@link Layout#decode|decode} for {@link Union}.
         *
         * If the variant is {@link Union#addVariant|registered} the return
         * value is an instance of that variant, with no explicit
         * discriminator.  Otherwise the {@link Union#defaultLayout|default
         * layout} is used to decode the content. */
        decode(b9, offset2 = 0) {
          let dest;
          const dlo = this.discriminator;
          const discr = dlo.decode(b9, offset2);
          const clo = this.registry[discr];
          if (void 0 === clo) {
            const defaultLayout = this.defaultLayout;
            let contentOffset = 0;
            if (this.usesPrefixDiscriminator) {
              contentOffset = dlo.layout.span;
            }
            dest = this.makeDestinationObject();
            dest[dlo.property] = discr;
            dest[defaultLayout.property] = defaultLayout.decode(b9, offset2 + contentOffset);
          } else {
            dest = clo.decode(b9, offset2);
          }
          return dest;
        }
        /** Implement {@link Layout#encode|encode} for {@link Union}.
         *
         * This API assumes the `src` object is consistent with the union's
         * {@link Union#defaultLayout|default layout}.  To encode variants
         * use the appropriate variant-specific {@link VariantLayout#encode}
         * method. */
        encode(src2, b9, offset2 = 0) {
          const vlo = this.getSourceVariant(src2);
          if (void 0 === vlo) {
            const dlo = this.discriminator;
            const clo = this.defaultLayout;
            let contentOffset = 0;
            if (this.usesPrefixDiscriminator) {
              contentOffset = dlo.layout.span;
            }
            dlo.encode(src2[dlo.property], b9, offset2);
            return contentOffset + clo.encode(src2[clo.property], b9, offset2 + contentOffset);
          }
          return vlo.encode(src2, b9, offset2);
        }
        /** Register a new variant structure within a union.  The newly
         * created variant is returned.
         *
         * @param {Number} variant - initializer for {@link
         * VariantLayout#variant|variant}.
         *
         * @param {Layout} layout - initializer for {@link
         * VariantLayout#layout|layout}.
         *
         * @param {String} property - initializer for {@link
         * Layout#property|property}.
         *
         * @return {VariantLayout} */
        addVariant(variant, layout, property) {
          const rv = new VariantLayout(this, variant, layout, property);
          this.registry[variant] = rv;
          return rv;
        }
        /**
         * Get the layout associated with a registered variant.
         *
         * If `vb` does not produce a registered variant the function returns
         * `undefined`.
         *
         * @param {(Number|Uint8Array)} vb - either the variant number, or a
         * buffer from which the discriminator is to be read.
         *
         * @param {Number} offset - offset into `vb` for the start of the
         * union.  Used only when `vb` is an instance of {Uint8Array}.
         *
         * @return {({VariantLayout}|undefined)}
         */
        getVariant(vb, offset2 = 0) {
          let variant;
          if (vb instanceof Uint8Array) {
            variant = this.discriminator.decode(vb, offset2);
          } else {
            variant = vb;
          }
          return this.registry[variant];
        }
      };
      exports.Union = Union;
      var VariantLayout = class extends Layout {
        constructor(union3, variant, layout, property) {
          if (!(union3 instanceof Union)) {
            throw new TypeError("union must be a Union");
          }
          if (!Number.isInteger(variant) || 0 > variant) {
            throw new TypeError("variant must be a (non-negative) integer");
          }
          if ("string" === typeof layout && void 0 === property) {
            property = layout;
            layout = null;
          }
          if (layout) {
            if (!(layout instanceof Layout)) {
              throw new TypeError("layout must be a Layout");
            }
            if (null !== union3.defaultLayout && 0 <= layout.span && layout.span > union3.defaultLayout.span) {
              throw new Error("variant span exceeds span of containing union");
            }
            if ("string" !== typeof property) {
              throw new TypeError("variant must have a String property");
            }
          }
          let span = union3.span;
          if (0 > union3.span) {
            span = layout ? layout.span : 0;
            if (0 <= span && union3.usesPrefixDiscriminator) {
              span += union3.discriminator.layout.span;
            }
          }
          super(span, property);
          this.union = union3;
          this.variant = variant;
          this.layout = layout || null;
        }
        /** @override */
        getSpan(b9, offset2 = 0) {
          if (0 <= this.span) {
            return this.span;
          }
          let contentOffset = 0;
          if (this.union.usesPrefixDiscriminator) {
            contentOffset = this.union.discriminator.layout.span;
          }
          let span = 0;
          if (this.layout) {
            span = this.layout.getSpan(b9, offset2 + contentOffset);
          }
          return contentOffset + span;
        }
        /** @override */
        decode(b9, offset2 = 0) {
          const dest = this.makeDestinationObject();
          if (this !== this.union.getVariant(b9, offset2)) {
            throw new Error("variant mismatch");
          }
          let contentOffset = 0;
          if (this.union.usesPrefixDiscriminator) {
            contentOffset = this.union.discriminator.layout.span;
          }
          if (this.layout) {
            dest[this.property] = this.layout.decode(b9, offset2 + contentOffset);
          } else if (this.property) {
            dest[this.property] = true;
          } else if (this.union.usesPrefixDiscriminator) {
            dest[this.union.discriminator.property] = this.variant;
          }
          return dest;
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          let contentOffset = 0;
          if (this.union.usesPrefixDiscriminator) {
            contentOffset = this.union.discriminator.layout.span;
          }
          if (this.layout && !Object.prototype.hasOwnProperty.call(src2, this.property)) {
            throw new TypeError("variant lacks property " + this.property);
          }
          this.union.discriminator.encode(this.variant, b9, offset2);
          let span = contentOffset;
          if (this.layout) {
            this.layout.encode(src2[this.property], b9, offset2 + contentOffset);
            span += this.layout.getSpan(b9, offset2 + contentOffset);
            if (0 <= this.union.span && span > this.union.span) {
              throw new Error("encoded variant overruns containing union");
            }
          }
          return span;
        }
        /** Delegate {@link Layout#fromArray|fromArray} to {@link
         * VariantLayout#layout|layout}. */
        fromArray(values) {
          if (this.layout) {
            return this.layout.fromArray(values);
          }
          return void 0;
        }
      };
      exports.VariantLayout = VariantLayout;
      function fixBitwiseResult(v13) {
        if (0 > v13) {
          v13 += 4294967296;
        }
        return v13;
      }
      var BitStructure = class extends Layout {
        constructor(word, msb, property) {
          if (!(word instanceof UInt || word instanceof UIntBE)) {
            throw new TypeError("word must be a UInt or UIntBE layout");
          }
          if ("string" === typeof msb && void 0 === property) {
            property = msb;
            msb = false;
          }
          if (4 < word.span) {
            throw new RangeError("word cannot exceed 32 bits");
          }
          super(word.span, property);
          this.word = word;
          this.msb = !!msb;
          this.fields = [];
          let value = 0;
          this._packedSetValue = function(v13) {
            value = fixBitwiseResult(v13);
            return this;
          };
          this._packedGetValue = function() {
            return value;
          };
        }
        /** @override */
        decode(b9, offset2 = 0) {
          const dest = this.makeDestinationObject();
          const value = this.word.decode(b9, offset2);
          this._packedSetValue(value);
          for (const fd of this.fields) {
            if (void 0 !== fd.property) {
              dest[fd.property] = fd.decode(b9);
            }
          }
          return dest;
        }
        /** Implement {@link Layout#encode|encode} for {@link BitStructure}.
         *
         * If `src` is missing a property for a member with a defined {@link
         * Layout#property|property} the corresponding region of the packed
         * value is left unmodified.  Unused bits are also left unmodified. */
        encode(src2, b9, offset2 = 0) {
          const value = this.word.decode(b9, offset2);
          this._packedSetValue(value);
          for (const fd of this.fields) {
            if (void 0 !== fd.property) {
              const fv = src2[fd.property];
              if (void 0 !== fv) {
                fd.encode(fv);
              }
            }
          }
          return this.word.encode(this._packedGetValue(), b9, offset2);
        }
        /** Register a new bitfield with a containing bit structure.  The
         * resulting bitfield is returned.
         *
         * @param {Number} bits - initializer for {@link BitField#bits|bits}.
         *
         * @param {string} property - initializer for {@link
         * Layout#property|property}.
         *
         * @return {BitField} */
        addField(bits, property) {
          const bf = new BitField(this, bits, property);
          this.fields.push(bf);
          return bf;
        }
        /** As with {@link BitStructure#addField|addField} for single-bit
         * fields with `boolean` value representation.
         *
         * @param {string} property - initializer for {@link
         * Layout#property|property}.
         *
         * @return {Boolean} */
        // `Boolean` conflicts with the native primitive type
        // eslint-disable-next-line @typescript-eslint/ban-types
        addBoolean(property) {
          const bf = new Boolean2(this, property);
          this.fields.push(bf);
          return bf;
        }
        /**
         * Get access to the bit field for a given property.
         *
         * @param {String} property - the bit field of interest.
         *
         * @return {BitField} - the field associated with `property`, or
         * undefined if there is no such property.
         */
        fieldFor(property) {
          if ("string" !== typeof property) {
            throw new TypeError("property must be string");
          }
          for (const fd of this.fields) {
            if (fd.property === property) {
              return fd;
            }
          }
          return void 0;
        }
      };
      exports.BitStructure = BitStructure;
      var BitField = class {
        constructor(container, bits, property) {
          if (!(container instanceof BitStructure)) {
            throw new TypeError("container must be a BitStructure");
          }
          if (!Number.isInteger(bits) || 0 >= bits) {
            throw new TypeError("bits must be positive integer");
          }
          const totalBits = 8 * container.span;
          const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);
          if (bits + usedBits > totalBits) {
            throw new Error("bits too long for span remainder (" + (totalBits - usedBits) + " of " + totalBits + " remain)");
          }
          this.container = container;
          this.bits = bits;
          this.valueMask = (1 << bits) - 1;
          if (32 === bits) {
            this.valueMask = 4294967295;
          }
          this.start = usedBits;
          if (this.container.msb) {
            this.start = totalBits - usedBits - bits;
          }
          this.wordMask = fixBitwiseResult(this.valueMask << this.start);
          this.property = property;
        }
        /** Store a value into the corresponding subsequence of the containing
         * bit field. */
        decode(b9, offset2) {
          const word = this.container._packedGetValue();
          const wordValue = fixBitwiseResult(word & this.wordMask);
          const value = wordValue >>> this.start;
          return value;
        }
        /** Store a value into the corresponding subsequence of the containing
         * bit field.
         *
         * **NOTE** This is not a specialization of {@link
         * Layout#encode|Layout.encode} and there is no return value. */
        encode(value) {
          if ("number" !== typeof value || !Number.isInteger(value) || value !== fixBitwiseResult(value & this.valueMask)) {
            throw new TypeError(nameWithProperty("BitField.encode", this) + " value must be integer not exceeding " + this.valueMask);
          }
          const word = this.container._packedGetValue();
          const wordValue = fixBitwiseResult(value << this.start);
          this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask) | wordValue);
        }
      };
      exports.BitField = BitField;
      var Boolean2 = class extends BitField {
        constructor(container, property) {
          super(container, 1, property);
        }
        /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.
         *
         * @returns {boolean} */
        decode(b9, offset2) {
          return !!super.decode(b9, offset2);
        }
        /** @override */
        encode(value) {
          if ("boolean" === typeof value) {
            value = +value;
          }
          super.encode(value);
        }
      };
      exports.Boolean = Boolean2;
      var Blob2 = class extends Layout {
        constructor(length2, property) {
          if (!(length2 instanceof ExternalLayout && length2.isCount() || Number.isInteger(length2) && 0 <= length2)) {
            throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");
          }
          let span = -1;
          if (!(length2 instanceof ExternalLayout)) {
            span = length2;
          }
          super(span, property);
          this.length = length2;
        }
        /** @override */
        getSpan(b9, offset2) {
          let span = this.span;
          if (0 > span) {
            span = this.length.decode(b9, offset2);
          }
          return span;
        }
        /** @override */
        decode(b9, offset2 = 0) {
          let span = this.span;
          if (0 > span) {
            span = this.length.decode(b9, offset2);
          }
          return uint8ArrayToBuffer(b9).slice(offset2, offset2 + span);
        }
        /** Implement {@link Layout#encode|encode} for {@link Blob}.
         *
         * **NOTE** If {@link Layout#count|count} is an instance of {@link
         * ExternalLayout} then the length of `src` will be encoded as the
         * count after `src` is encoded. */
        encode(src2, b9, offset2) {
          let span = this.length;
          if (this.length instanceof ExternalLayout) {
            span = src2.length;
          }
          if (!(src2 instanceof Uint8Array && span === src2.length)) {
            throw new TypeError(nameWithProperty("Blob.encode", this) + " requires (length " + span + ") Uint8Array as src");
          }
          if (offset2 + span > b9.length) {
            throw new RangeError("encoding overruns Uint8Array");
          }
          const srcBuffer = uint8ArrayToBuffer(src2);
          uint8ArrayToBuffer(b9).write(srcBuffer.toString("hex"), offset2, span, "hex");
          if (this.length instanceof ExternalLayout) {
            this.length.encode(span, b9, offset2);
          }
          return span;
        }
      };
      exports.Blob = Blob2;
      var CString = class extends Layout {
        constructor(property) {
          super(-1, property);
        }
        /** @override */
        getSpan(b9, offset2 = 0) {
          checkUint8Array(b9);
          let idx = offset2;
          while (idx < b9.length && 0 !== b9[idx]) {
            idx += 1;
          }
          return 1 + idx - offset2;
        }
        /** @override */
        decode(b9, offset2 = 0) {
          const span = this.getSpan(b9, offset2);
          return uint8ArrayToBuffer(b9).slice(offset2, offset2 + span - 1).toString("utf-8");
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          if ("string" !== typeof src2) {
            src2 = String(src2);
          }
          const srcb = buffer_1.Buffer.from(src2, "utf8");
          const span = srcb.length;
          if (offset2 + span > b9.length) {
            throw new RangeError("encoding overruns Buffer");
          }
          const buffer2 = uint8ArrayToBuffer(b9);
          srcb.copy(buffer2, offset2);
          buffer2[offset2 + span] = 0;
          return span + 1;
        }
      };
      exports.CString = CString;
      var UTF8 = class extends Layout {
        constructor(maxSpan, property) {
          if ("string" === typeof maxSpan && void 0 === property) {
            property = maxSpan;
            maxSpan = void 0;
          }
          if (void 0 === maxSpan) {
            maxSpan = -1;
          } else if (!Number.isInteger(maxSpan)) {
            throw new TypeError("maxSpan must be an integer");
          }
          super(-1, property);
          this.maxSpan = maxSpan;
        }
        /** @override */
        getSpan(b9, offset2 = 0) {
          checkUint8Array(b9);
          return b9.length - offset2;
        }
        /** @override */
        decode(b9, offset2 = 0) {
          const span = this.getSpan(b9, offset2);
          if (0 <= this.maxSpan && this.maxSpan < span) {
            throw new RangeError("text length exceeds maxSpan");
          }
          return uint8ArrayToBuffer(b9).slice(offset2, offset2 + span).toString("utf-8");
        }
        /** @override */
        encode(src2, b9, offset2 = 0) {
          if ("string" !== typeof src2) {
            src2 = String(src2);
          }
          const srcb = buffer_1.Buffer.from(src2, "utf8");
          const span = srcb.length;
          if (0 <= this.maxSpan && this.maxSpan < span) {
            throw new RangeError("text length exceeds maxSpan");
          }
          if (offset2 + span > b9.length) {
            throw new RangeError("encoding overruns Buffer");
          }
          srcb.copy(uint8ArrayToBuffer(b9), offset2);
          return span;
        }
      };
      exports.UTF8 = UTF8;
      var Constant = class extends Layout {
        constructor(value, property) {
          super(0, property);
          this.value = value;
        }
        /** @override */
        decode(b9, offset2) {
          return this.value;
        }
        /** @override */
        encode(src2, b9, offset2) {
          return 0;
        }
      };
      exports.Constant = Constant;
      exports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));
      exports.offset = ((layout, offset2, property) => new OffsetLayout(layout, offset2, property));
      exports.u8 = ((property) => new UInt(1, property));
      exports.u16 = ((property) => new UInt(2, property));
      exports.u24 = ((property) => new UInt(3, property));
      exports.u32 = ((property) => new UInt(4, property));
      exports.u40 = ((property) => new UInt(5, property));
      exports.u48 = ((property) => new UInt(6, property));
      exports.nu64 = ((property) => new NearUInt64(property));
      exports.u16be = ((property) => new UIntBE(2, property));
      exports.u24be = ((property) => new UIntBE(3, property));
      exports.u32be = ((property) => new UIntBE(4, property));
      exports.u40be = ((property) => new UIntBE(5, property));
      exports.u48be = ((property) => new UIntBE(6, property));
      exports.nu64be = ((property) => new NearUInt64BE(property));
      exports.s8 = ((property) => new Int(1, property));
      exports.s16 = ((property) => new Int(2, property));
      exports.s24 = ((property) => new Int(3, property));
      exports.s32 = ((property) => new Int(4, property));
      exports.s40 = ((property) => new Int(5, property));
      exports.s48 = ((property) => new Int(6, property));
      exports.ns64 = ((property) => new NearInt64(property));
      exports.s16be = ((property) => new IntBE(2, property));
      exports.s24be = ((property) => new IntBE(3, property));
      exports.s32be = ((property) => new IntBE(4, property));
      exports.s40be = ((property) => new IntBE(5, property));
      exports.s48be = ((property) => new IntBE(6, property));
      exports.ns64be = ((property) => new NearInt64BE(property));
      exports.f32 = ((property) => new Float(property));
      exports.f32be = ((property) => new FloatBE(property));
      exports.f64 = ((property) => new Double(property));
      exports.f64be = ((property) => new DoubleBE(property));
      exports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));
      exports.bits = ((word, msb, property) => new BitStructure(word, msb, property));
      exports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));
      exports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));
      exports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));
      exports.blob = ((length2, property) => new Blob2(length2, property));
      exports.cstr = ((property) => new CString(property));
      exports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));
      exports.constant = ((value, property) => new Constant(value, property));
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js
  function rng() {
    if (!getRandomValues) {
      getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== "undefined" && typeof msCrypto.getRandomValues === "function" && msCrypto.getRandomValues.bind(msCrypto);
      if (!getRandomValues) {
        throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
      }
    }
    return getRandomValues(rnds8);
  }
  var getRandomValues, rnds8;
  var init_rng = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js"() {
      "use strict";
      init_node_compat_inject();
      rnds8 = new Uint8Array(16);
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js
  var regex_default;
  var init_regex3 = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js"() {
      "use strict";
      init_node_compat_inject();
      regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js
  function validate7(uuid3) {
    return typeof uuid3 === "string" && regex_default.test(uuid3);
  }
  var validate_default;
  var init_validate = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js"() {
      "use strict";
      init_node_compat_inject();
      init_regex3();
      validate_default = validate7;
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js
  function stringify3(arr) {
    var offset2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
    var uuid3 = (byteToHex[arr[offset2 + 0]] + byteToHex[arr[offset2 + 1]] + byteToHex[arr[offset2 + 2]] + byteToHex[arr[offset2 + 3]] + "-" + byteToHex[arr[offset2 + 4]] + byteToHex[arr[offset2 + 5]] + "-" + byteToHex[arr[offset2 + 6]] + byteToHex[arr[offset2 + 7]] + "-" + byteToHex[arr[offset2 + 8]] + byteToHex[arr[offset2 + 9]] + "-" + byteToHex[arr[offset2 + 10]] + byteToHex[arr[offset2 + 11]] + byteToHex[arr[offset2 + 12]] + byteToHex[arr[offset2 + 13]] + byteToHex[arr[offset2 + 14]] + byteToHex[arr[offset2 + 15]]).toLowerCase();
    if (!validate_default(uuid3)) {
      throw TypeError("Stringified UUID is invalid");
    }
    return uuid3;
  }
  var byteToHex, i5, stringify_default;
  var init_stringify2 = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js"() {
      "use strict";
      init_node_compat_inject();
      init_validate();
      byteToHex = [];
      for (i5 = 0; i5 < 256; ++i5) {
        byteToHex.push((i5 + 256).toString(16).substr(1));
      }
      stringify_default = stringify3;
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js
  function v1(options, buf, offset2) {
    var i5 = buf && offset2 || 0;
    var b9 = buf || new Array(16);
    options = options || {};
    var node = options.node || _nodeId;
    var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq;
    if (node == null || clockseq == null) {
      var seedBytes = options.random || (options.rng || rng)();
      if (node == null) {
        node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
      }
      if (clockseq == null) {
        clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;
      }
    }
    var msecs = options.msecs !== void 0 ? options.msecs : Date.now();
    var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1;
    var dt6 = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;
    if (dt6 < 0 && options.clockseq === void 0) {
      clockseq = clockseq + 1 & 16383;
    }
    if ((dt6 < 0 || msecs > _lastMSecs) && options.nsecs === void 0) {
      nsecs = 0;
    }
    if (nsecs >= 1e4) {
      throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
    }
    _lastMSecs = msecs;
    _lastNSecs = nsecs;
    _clockseq = clockseq;
    msecs += 122192928e5;
    var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
    b9[i5++] = tl >>> 24 & 255;
    b9[i5++] = tl >>> 16 & 255;
    b9[i5++] = tl >>> 8 & 255;
    b9[i5++] = tl & 255;
    var tmh = msecs / 4294967296 * 1e4 & 268435455;
    b9[i5++] = tmh >>> 8 & 255;
    b9[i5++] = tmh & 255;
    b9[i5++] = tmh >>> 24 & 15 | 16;
    b9[i5++] = tmh >>> 16 & 255;
    b9[i5++] = clockseq >>> 8 | 128;
    b9[i5++] = clockseq & 255;
    for (var n6 = 0; n6 < 6; ++n6) {
      b9[i5 + n6] = node[n6];
    }
    return buf || stringify_default(b9);
  }
  var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default;
  var init_v1 = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js"() {
      "use strict";
      init_node_compat_inject();
      init_rng();
      init_stringify2();
      _lastMSecs = 0;
      _lastNSecs = 0;
      v1_default = v1;
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js
  function parse(uuid3) {
    if (!validate_default(uuid3)) {
      throw TypeError("Invalid UUID");
    }
    var v13;
    var arr = new Uint8Array(16);
    arr[0] = (v13 = parseInt(uuid3.slice(0, 8), 16)) >>> 24;
    arr[1] = v13 >>> 16 & 255;
    arr[2] = v13 >>> 8 & 255;
    arr[3] = v13 & 255;
    arr[4] = (v13 = parseInt(uuid3.slice(9, 13), 16)) >>> 8;
    arr[5] = v13 & 255;
    arr[6] = (v13 = parseInt(uuid3.slice(14, 18), 16)) >>> 8;
    arr[7] = v13 & 255;
    arr[8] = (v13 = parseInt(uuid3.slice(19, 23), 16)) >>> 8;
    arr[9] = v13 & 255;
    arr[10] = (v13 = parseInt(uuid3.slice(24, 36), 16)) / 1099511627776 & 255;
    arr[11] = v13 / 4294967296 & 255;
    arr[12] = v13 >>> 24 & 255;
    arr[13] = v13 >>> 16 & 255;
    arr[14] = v13 >>> 8 & 255;
    arr[15] = v13 & 255;
    return arr;
  }
  var parse_default;
  var init_parse = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js"() {
      "use strict";
      init_node_compat_inject();
      init_validate();
      parse_default = parse;
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js
  function stringToBytes2(str) {
    str = unescape(encodeURIComponent(str));
    var bytes = [];
    for (var i5 = 0; i5 < str.length; ++i5) {
      bytes.push(str.charCodeAt(i5));
    }
    return bytes;
  }
  function v35_default(name2, version16, hashfunc) {
    function generateUUID(value, namespace, buf, offset2) {
      if (typeof value === "string") {
        value = stringToBytes2(value);
      }
      if (typeof namespace === "string") {
        namespace = parse_default(namespace);
      }
      if (namespace.length !== 16) {
        throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
      }
      var bytes = new Uint8Array(16 + value.length);
      bytes.set(namespace);
      bytes.set(value, namespace.length);
      bytes = hashfunc(bytes);
      bytes[6] = bytes[6] & 15 | version16;
      bytes[8] = bytes[8] & 63 | 128;
      if (buf) {
        offset2 = offset2 || 0;
        for (var i5 = 0; i5 < 16; ++i5) {
          buf[offset2 + i5] = bytes[i5];
        }
        return buf;
      }
      return stringify_default(bytes);
    }
    try {
      generateUUID.name = name2;
    } catch (err2) {
    }
    generateUUID.DNS = DNS;
    generateUUID.URL = URL2;
    return generateUUID;
  }
  var DNS, URL2;
  var init_v35 = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js"() {
      "use strict";
      init_node_compat_inject();
      init_stringify2();
      init_parse();
      DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
      URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js
  function md5(bytes) {
    if (typeof bytes === "string") {
      var msg = unescape(encodeURIComponent(bytes));
      bytes = new Uint8Array(msg.length);
      for (var i5 = 0; i5 < msg.length; ++i5) {
        bytes[i5] = msg.charCodeAt(i5);
      }
    }
    return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
  }
  function md5ToHexEncodedArray(input) {
    var output = [];
    var length32 = input.length * 32;
    var hexTab = "0123456789abcdef";
    for (var i5 = 0; i5 < length32; i5 += 8) {
      var x13 = input[i5 >> 5] >>> i5 % 32 & 255;
      var hex3 = parseInt(hexTab.charAt(x13 >>> 4 & 15) + hexTab.charAt(x13 & 15), 16);
      output.push(hex3);
    }
    return output;
  }
  function getOutputLength(inputLength8) {
    return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
  }
  function wordsToMd5(x13, len) {
    x13[len >> 5] |= 128 << len % 32;
    x13[getOutputLength(len) - 1] = len;
    var a5 = 1732584193;
    var b9 = -271733879;
    var c7 = -1732584194;
    var d6 = 271733878;
    for (var i5 = 0; i5 < x13.length; i5 += 16) {
      var olda = a5;
      var oldb = b9;
      var oldc = c7;
      var oldd = d6;
      a5 = md5ff(a5, b9, c7, d6, x13[i5], 7, -680876936);
      d6 = md5ff(d6, a5, b9, c7, x13[i5 + 1], 12, -389564586);
      c7 = md5ff(c7, d6, a5, b9, x13[i5 + 2], 17, 606105819);
      b9 = md5ff(b9, c7, d6, a5, x13[i5 + 3], 22, -1044525330);
      a5 = md5ff(a5, b9, c7, d6, x13[i5 + 4], 7, -176418897);
      d6 = md5ff(d6, a5, b9, c7, x13[i5 + 5], 12, 1200080426);
      c7 = md5ff(c7, d6, a5, b9, x13[i5 + 6], 17, -1473231341);
      b9 = md5ff(b9, c7, d6, a5, x13[i5 + 7], 22, -45705983);
      a5 = md5ff(a5, b9, c7, d6, x13[i5 + 8], 7, 1770035416);
      d6 = md5ff(d6, a5, b9, c7, x13[i5 + 9], 12, -1958414417);
      c7 = md5ff(c7, d6, a5, b9, x13[i5 + 10], 17, -42063);
      b9 = md5ff(b9, c7, d6, a5, x13[i5 + 11], 22, -1990404162);
      a5 = md5ff(a5, b9, c7, d6, x13[i5 + 12], 7, 1804603682);
      d6 = md5ff(d6, a5, b9, c7, x13[i5 + 13], 12, -40341101);
      c7 = md5ff(c7, d6, a5, b9, x13[i5 + 14], 17, -1502002290);
      b9 = md5ff(b9, c7, d6, a5, x13[i5 + 15], 22, 1236535329);
      a5 = md5gg(a5, b9, c7, d6, x13[i5 + 1], 5, -165796510);
      d6 = md5gg(d6, a5, b9, c7, x13[i5 + 6], 9, -1069501632);
      c7 = md5gg(c7, d6, a5, b9, x13[i5 + 11], 14, 643717713);
      b9 = md5gg(b9, c7, d6, a5, x13[i5], 20, -373897302);
      a5 = md5gg(a5, b9, c7, d6, x13[i5 + 5], 5, -701558691);
      d6 = md5gg(d6, a5, b9, c7, x13[i5 + 10], 9, 38016083);
      c7 = md5gg(c7, d6, a5, b9, x13[i5 + 15], 14, -660478335);
      b9 = md5gg(b9, c7, d6, a5, x13[i5 + 4], 20, -405537848);
      a5 = md5gg(a5, b9, c7, d6, x13[i5 + 9], 5, 568446438);
      d6 = md5gg(d6, a5, b9, c7, x13[i5 + 14], 9, -1019803690);
      c7 = md5gg(c7, d6, a5, b9, x13[i5 + 3], 14, -187363961);
      b9 = md5gg(b9, c7, d6, a5, x13[i5 + 8], 20, 1163531501);
      a5 = md5gg(a5, b9, c7, d6, x13[i5 + 13], 5, -1444681467);
      d6 = md5gg(d6, a5, b9, c7, x13[i5 + 2], 9, -51403784);
      c7 = md5gg(c7, d6, a5, b9, x13[i5 + 7], 14, 1735328473);
      b9 = md5gg(b9, c7, d6, a5, x13[i5 + 12], 20, -1926607734);
      a5 = md5hh(a5, b9, c7, d6, x13[i5 + 5], 4, -378558);
      d6 = md5hh(d6, a5, b9, c7, x13[i5 + 8], 11, -2022574463);
      c7 = md5hh(c7, d6, a5, b9, x13[i5 + 11], 16, 1839030562);
      b9 = md5hh(b9, c7, d6, a5, x13[i5 + 14], 23, -35309556);
      a5 = md5hh(a5, b9, c7, d6, x13[i5 + 1], 4, -1530992060);
      d6 = md5hh(d6, a5, b9, c7, x13[i5 + 4], 11, 1272893353);
      c7 = md5hh(c7, d6, a5, b9, x13[i5 + 7], 16, -155497632);
      b9 = md5hh(b9, c7, d6, a5, x13[i5 + 10], 23, -1094730640);
      a5 = md5hh(a5, b9, c7, d6, x13[i5 + 13], 4, 681279174);
      d6 = md5hh(d6, a5, b9, c7, x13[i5], 11, -358537222);
      c7 = md5hh(c7, d6, a5, b9, x13[i5 + 3], 16, -722521979);
      b9 = md5hh(b9, c7, d6, a5, x13[i5 + 6], 23, 76029189);
      a5 = md5hh(a5, b9, c7, d6, x13[i5 + 9], 4, -640364487);
      d6 = md5hh(d6, a5, b9, c7, x13[i5 + 12], 11, -421815835);
      c7 = md5hh(c7, d6, a5, b9, x13[i5 + 15], 16, 530742520);
      b9 = md5hh(b9, c7, d6, a5, x13[i5 + 2], 23, -995338651);
      a5 = md5ii(a5, b9, c7, d6, x13[i5], 6, -198630844);
      d6 = md5ii(d6, a5, b9, c7, x13[i5 + 7], 10, 1126891415);
      c7 = md5ii(c7, d6, a5, b9, x13[i5 + 14], 15, -1416354905);
      b9 = md5ii(b9, c7, d6, a5, x13[i5 + 5], 21, -57434055);
      a5 = md5ii(a5, b9, c7, d6, x13[i5 + 12], 6, 1700485571);
      d6 = md5ii(d6, a5, b9, c7, x13[i5 + 3], 10, -1894986606);
      c7 = md5ii(c7, d6, a5, b9, x13[i5 + 10], 15, -1051523);
      b9 = md5ii(b9, c7, d6, a5, x13[i5 + 1], 21, -2054922799);
      a5 = md5ii(a5, b9, c7, d6, x13[i5 + 8], 6, 1873313359);
      d6 = md5ii(d6, a5, b9, c7, x13[i5 + 15], 10, -30611744);
      c7 = md5ii(c7, d6, a5, b9, x13[i5 + 6], 15, -1560198380);
      b9 = md5ii(b9, c7, d6, a5, x13[i5 + 13], 21, 1309151649);
      a5 = md5ii(a5, b9, c7, d6, x13[i5 + 4], 6, -145523070);
      d6 = md5ii(d6, a5, b9, c7, x13[i5 + 11], 10, -1120210379);
      c7 = md5ii(c7, d6, a5, b9, x13[i5 + 2], 15, 718787259);
      b9 = md5ii(b9, c7, d6, a5, x13[i5 + 9], 21, -343485551);
      a5 = safeAdd(a5, olda);
      b9 = safeAdd(b9, oldb);
      c7 = safeAdd(c7, oldc);
      d6 = safeAdd(d6, oldd);
    }
    return [a5, b9, c7, d6];
  }
  function bytesToWords(input) {
    if (input.length === 0) {
      return [];
    }
    var length8 = input.length * 8;
    var output = new Uint32Array(getOutputLength(length8));
    for (var i5 = 0; i5 < length8; i5 += 8) {
      output[i5 >> 5] |= (input[i5 / 8] & 255) << i5 % 32;
    }
    return output;
  }
  function safeAdd(x13, y11) {
    var lsw = (x13 & 65535) + (y11 & 65535);
    var msw = (x13 >> 16) + (y11 >> 16) + (lsw >> 16);
    return msw << 16 | lsw & 65535;
  }
  function bitRotateLeft(num2, cnt) {
    return num2 << cnt | num2 >>> 32 - cnt;
  }
  function md5cmn(q7, a5, b9, x13, s3, t) {
    return safeAdd(bitRotateLeft(safeAdd(safeAdd(a5, q7), safeAdd(x13, t)), s3), b9);
  }
  function md5ff(a5, b9, c7, d6, x13, s3, t) {
    return md5cmn(b9 & c7 | ~b9 & d6, a5, b9, x13, s3, t);
  }
  function md5gg(a5, b9, c7, d6, x13, s3, t) {
    return md5cmn(b9 & d6 | c7 & ~d6, a5, b9, x13, s3, t);
  }
  function md5hh(a5, b9, c7, d6, x13, s3, t) {
    return md5cmn(b9 ^ c7 ^ d6, a5, b9, x13, s3, t);
  }
  function md5ii(a5, b9, c7, d6, x13, s3, t) {
    return md5cmn(c7 ^ (b9 | ~d6), a5, b9, x13, s3, t);
  }
  var md5_default;
  var init_md5 = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js"() {
      "use strict";
      init_node_compat_inject();
      md5_default = md5;
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js
  var v3, v3_default;
  var init_v3 = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js"() {
      "use strict";
      init_node_compat_inject();
      init_v35();
      init_md5();
      v3 = v35_default("v3", 48, md5_default);
      v3_default = v3;
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js
  function v4(options, buf, offset2) {
    options = options || {};
    var rnds = options.random || (options.rng || rng)();
    rnds[6] = rnds[6] & 15 | 64;
    rnds[8] = rnds[8] & 63 | 128;
    if (buf) {
      offset2 = offset2 || 0;
      for (var i5 = 0; i5 < 16; ++i5) {
        buf[offset2 + i5] = rnds[i5];
      }
      return buf;
    }
    return stringify_default(rnds);
  }
  var v4_default;
  var init_v4 = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js"() {
      "use strict";
      init_node_compat_inject();
      init_rng();
      init_stringify2();
      v4_default = v4;
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js
  function f(s3, x13, y11, z11) {
    switch (s3) {
      case 0:
        return x13 & y11 ^ ~x13 & z11;
      case 1:
        return x13 ^ y11 ^ z11;
      case 2:
        return x13 & y11 ^ x13 & z11 ^ y11 & z11;
      case 3:
        return x13 ^ y11 ^ z11;
    }
  }
  function ROTL(x13, n6) {
    return x13 << n6 | x13 >>> 32 - n6;
  }
  function sha1(bytes) {
    var K7 = [1518500249, 1859775393, 2400959708, 3395469782];
    var H6 = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
    if (typeof bytes === "string") {
      var msg = unescape(encodeURIComponent(bytes));
      bytes = [];
      for (var i5 = 0; i5 < msg.length; ++i5) {
        bytes.push(msg.charCodeAt(i5));
      }
    } else if (!Array.isArray(bytes)) {
      bytes = Array.prototype.slice.call(bytes);
    }
    bytes.push(128);
    var l6 = bytes.length / 4 + 2;
    var N13 = Math.ceil(l6 / 16);
    var M9 = new Array(N13);
    for (var _i = 0; _i < N13; ++_i) {
      var arr = new Uint32Array(16);
      for (var j6 = 0; j6 < 16; ++j6) {
        arr[j6] = bytes[_i * 64 + j6 * 4] << 24 | bytes[_i * 64 + j6 * 4 + 1] << 16 | bytes[_i * 64 + j6 * 4 + 2] << 8 | bytes[_i * 64 + j6 * 4 + 3];
      }
      M9[_i] = arr;
    }
    M9[N13 - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
    M9[N13 - 1][14] = Math.floor(M9[N13 - 1][14]);
    M9[N13 - 1][15] = (bytes.length - 1) * 8 & 4294967295;
    for (var _i2 = 0; _i2 < N13; ++_i2) {
      var W8 = new Uint32Array(80);
      for (var t = 0; t < 16; ++t) {
        W8[t] = M9[_i2][t];
      }
      for (var _t5 = 16; _t5 < 80; ++_t5) {
        W8[_t5] = ROTL(W8[_t5 - 3] ^ W8[_t5 - 8] ^ W8[_t5 - 14] ^ W8[_t5 - 16], 1);
      }
      var a5 = H6[0];
      var b9 = H6[1];
      var c7 = H6[2];
      var d6 = H6[3];
      var e2 = H6[4];
      for (var _t22 = 0; _t22 < 80; ++_t22) {
        var s3 = Math.floor(_t22 / 20);
        var T6 = ROTL(a5, 5) + f(s3, b9, c7, d6) + e2 + K7[s3] + W8[_t22] >>> 0;
        e2 = d6;
        d6 = c7;
        c7 = ROTL(b9, 30) >>> 0;
        b9 = a5;
        a5 = T6;
      }
      H6[0] = H6[0] + a5 >>> 0;
      H6[1] = H6[1] + b9 >>> 0;
      H6[2] = H6[2] + c7 >>> 0;
      H6[3] = H6[3] + d6 >>> 0;
      H6[4] = H6[4] + e2 >>> 0;
    }
    return [H6[0] >> 24 & 255, H6[0] >> 16 & 255, H6[0] >> 8 & 255, H6[0] & 255, H6[1] >> 24 & 255, H6[1] >> 16 & 255, H6[1] >> 8 & 255, H6[1] & 255, H6[2] >> 24 & 255, H6[2] >> 16 & 255, H6[2] >> 8 & 255, H6[2] & 255, H6[3] >> 24 & 255, H6[3] >> 16 & 255, H6[3] >> 8 & 255, H6[3] & 255, H6[4] >> 24 & 255, H6[4] >> 16 & 255, H6[4] >> 8 & 255, H6[4] & 255];
  }
  var sha1_default;
  var init_sha1 = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js"() {
      "use strict";
      init_node_compat_inject();
      sha1_default = sha1;
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js
  var v5, v5_default;
  var init_v5 = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js"() {
      "use strict";
      init_node_compat_inject();
      init_v35();
      init_sha1();
      v5 = v35_default("v5", 80, sha1_default);
      v5_default = v5;
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js
  var nil_default;
  var init_nil = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js"() {
      "use strict";
      init_node_compat_inject();
      nil_default = "00000000-0000-0000-0000-000000000000";
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js
  function version4(uuid3) {
    if (!validate_default(uuid3)) {
      throw TypeError("Invalid UUID");
    }
    return parseInt(uuid3.substr(14, 1), 16);
  }
  var version_default;
  var init_version4 = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js"() {
      "use strict";
      init_node_compat_inject();
      init_validate();
      version_default = version4;
    }
  });

  // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js
  var esm_browser_exports = {};
  __export(esm_browser_exports, {
    NIL: () => nil_default,
    parse: () => parse_default,
    stringify: () => stringify_default,
    v1: () => v1_default,
    v3: () => v3_default,
    v4: () => v4_default,
    v5: () => v5_default,
    validate: () => validate_default,
    version: () => version_default
  });
  var init_esm_browser = __esm({
    "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js"() {
      "use strict";
      init_node_compat_inject();
      init_v1();
      init_v3();
      init_v4();
      init_v5();
      init_nil();
      init_version4();
      init_validate();
      init_stringify2();
      init_parse();
    }
  });

  // ../../node_modules/.pnpm/jayson@4.3.0_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/jayson/lib/generateRequest.js
  var require_generateRequest = __commonJS({
    "../../node_modules/.pnpm/jayson@4.3.0_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/jayson/lib/generateRequest.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var uuid3 = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;
      var generateRequest = function(method, params, id, options) {
        if (typeof method !== "string") {
          throw new TypeError(method + " must be a string");
        }
        options = options || {};
        const version16 = typeof options.version === "number" ? options.version : 2;
        if (version16 !== 1 && version16 !== 2) {
          throw new TypeError(version16 + " must be 1 or 2");
        }
        const request = {
          method
        };
        if (version16 === 2) {
          request.jsonrpc = "2.0";
        }
        if (params) {
          if (typeof params !== "object" && !Array.isArray(params)) {
            throw new TypeError(params + " must be an object, array or omitted");
          }
          request.params = params;
        }
        if (typeof id === "undefined") {
          const generator = typeof options.generator === "function" ? options.generator : function() {
            return uuid3();
          };
          request.id = generator(request, options);
        } else if (version16 === 2 && id === null) {
          if (options.notificationIdNull) {
            request.id = null;
          }
        } else {
          request.id = id;
        }
        return request;
      };
      module.exports = generateRequest;
    }
  });

  // ../../node_modules/.pnpm/jayson@4.3.0_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/jayson/lib/client/browser/index.js
  var require_browser = __commonJS({
    "../../node_modules/.pnpm/jayson@4.3.0_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/jayson/lib/client/browser/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var uuid3 = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;
      var generateRequest = require_generateRequest();
      var ClientBrowser = function(callServer, options) {
        if (!(this instanceof ClientBrowser)) {
          return new ClientBrowser(callServer, options);
        }
        if (!options) {
          options = {};
        }
        this.options = {
          reviver: typeof options.reviver !== "undefined" ? options.reviver : null,
          replacer: typeof options.replacer !== "undefined" ? options.replacer : null,
          generator: typeof options.generator !== "undefined" ? options.generator : function() {
            return uuid3();
          },
          version: typeof options.version !== "undefined" ? options.version : 2,
          notificationIdNull: typeof options.notificationIdNull === "boolean" ? options.notificationIdNull : false
        };
        this.callServer = callServer;
      };
      module.exports = ClientBrowser;
      ClientBrowser.prototype.request = function(method, params, id, callback) {
        const self2 = this;
        let request = null;
        const isBatch = Array.isArray(method) && typeof params === "function";
        if (this.options.version === 1 && isBatch) {
          throw new TypeError("JSON-RPC 1.0 does not support batching");
        }
        const isRaw = !isBatch && method && typeof method === "object" && typeof params === "function";
        if (isBatch || isRaw) {
          callback = params;
          request = method;
        } else {
          if (typeof id === "function") {
            callback = id;
            id = void 0;
          }
          const hasCallback = typeof callback === "function";
          try {
            request = generateRequest(method, params, id, {
              generator: this.options.generator,
              version: this.options.version,
              notificationIdNull: this.options.notificationIdNull
            });
          } catch (err2) {
            if (hasCallback) {
              callback(err2);
              return;
            }
            throw err2;
          }
          if (!hasCallback) {
            return request;
          }
        }
        let message;
        try {
          message = JSON.stringify(request, this.options.replacer);
        } catch (err2) {
          callback(err2);
          return;
        }
        this.callServer(message, function(err2, response) {
          self2._parseResponse(err2, response, callback);
        });
        return request;
      };
      ClientBrowser.prototype._parseResponse = function(err2, responseText, callback) {
        if (err2) {
          callback(err2);
          return;
        }
        if (!responseText) {
          callback();
          return;
        }
        let response;
        try {
          response = JSON.parse(responseText, this.options.reviver);
        } catch (err3) {
          callback(err3);
          return;
        }
        if (callback.length === 3) {
          if (Array.isArray(response)) {
            const isError = function(res) {
              return typeof res.error !== "undefined";
            };
            const isNotError = function(res) {
              return !isError(res);
            };
            callback(null, response.filter(isError), response.filter(isNotError));
            return;
          } else {
            callback(null, response.error, response.result);
            return;
          }
        }
        callback(null, response);
      };
    }
  });

  // ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js
  var require_eventemitter3 = __commonJS({
    "../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var has = Object.prototype.hasOwnProperty;
      var prefix = "~";
      function Events() {
      }
      if (Object.create) {
        Events.prototype = /* @__PURE__ */ Object.create(null);
        if (!new Events().__proto__) prefix = false;
      }
      function EE(fn, context, once) {
        this.fn = fn;
        this.context = context;
        this.once = once || false;
      }
      function addListener(emitter, event, fn, context, once) {
        if (typeof fn !== "function") {
          throw new TypeError("The listener must be a function");
        }
        var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;
        if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
        else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
        else emitter._events[evt] = [emitter._events[evt], listener];
        return emitter;
      }
      function clearEvent(emitter, evt) {
        if (--emitter._eventsCount === 0) emitter._events = new Events();
        else delete emitter._events[evt];
      }
      function EventEmitter2() {
        this._events = new Events();
        this._eventsCount = 0;
      }
      EventEmitter2.prototype.eventNames = function eventNames() {
        var names = [], events, name2;
        if (this._eventsCount === 0) return names;
        for (name2 in events = this._events) {
          if (has.call(events, name2)) names.push(prefix ? name2.slice(1) : name2);
        }
        if (Object.getOwnPropertySymbols) {
          return names.concat(Object.getOwnPropertySymbols(events));
        }
        return names;
      };
      EventEmitter2.prototype.listeners = function listeners(event) {
        var evt = prefix ? prefix + event : event, handlers = this._events[evt];
        if (!handlers) return [];
        if (handlers.fn) return [handlers.fn];
        for (var i5 = 0, l6 = handlers.length, ee8 = new Array(l6); i5 < l6; i5++) {
          ee8[i5] = handlers[i5].fn;
        }
        return ee8;
      };
      EventEmitter2.prototype.listenerCount = function listenerCount(event) {
        var evt = prefix ? prefix + event : event, listeners = this._events[evt];
        if (!listeners) return 0;
        if (listeners.fn) return 1;
        return listeners.length;
      };
      EventEmitter2.prototype.emit = function emit(event, a1, a22, a32, a42, a5) {
        var evt = prefix ? prefix + event : event;
        if (!this._events[evt]) return false;
        var listeners = this._events[evt], len = arguments.length, args, i5;
        if (listeners.fn) {
          if (listeners.once) this.removeListener(event, listeners.fn, void 0, true);
          switch (len) {
            case 1:
              return listeners.fn.call(listeners.context), true;
            case 2:
              return listeners.fn.call(listeners.context, a1), true;
            case 3:
              return listeners.fn.call(listeners.context, a1, a22), true;
            case 4:
              return listeners.fn.call(listeners.context, a1, a22, a32), true;
            case 5:
              return listeners.fn.call(listeners.context, a1, a22, a32, a42), true;
            case 6:
              return listeners.fn.call(listeners.context, a1, a22, a32, a42, a5), true;
          }
          for (i5 = 1, args = new Array(len - 1); i5 < len; i5++) {
            args[i5 - 1] = arguments[i5];
          }
          listeners.fn.apply(listeners.context, args);
        } else {
          var length2 = listeners.length, j6;
          for (i5 = 0; i5 < length2; i5++) {
            if (listeners[i5].once) this.removeListener(event, listeners[i5].fn, void 0, true);
            switch (len) {
              case 1:
                listeners[i5].fn.call(listeners[i5].context);
                break;
              case 2:
                listeners[i5].fn.call(listeners[i5].context, a1);
                break;
              case 3:
                listeners[i5].fn.call(listeners[i5].context, a1, a22);
                break;
              case 4:
                listeners[i5].fn.call(listeners[i5].context, a1, a22, a32);
                break;
              default:
                if (!args) for (j6 = 1, args = new Array(len - 1); j6 < len; j6++) {
                  args[j6 - 1] = arguments[j6];
                }
                listeners[i5].fn.apply(listeners[i5].context, args);
            }
          }
        }
        return true;
      };
      EventEmitter2.prototype.on = function on4(event, fn, context) {
        return addListener(this, event, fn, context, false);
      };
      EventEmitter2.prototype.once = function once(event, fn, context) {
        return addListener(this, event, fn, context, true);
      };
      EventEmitter2.prototype.removeListener = function removeListener(event, fn, context, once) {
        var evt = prefix ? prefix + event : event;
        if (!this._events[evt]) return this;
        if (!fn) {
          clearEvent(this, evt);
          return this;
        }
        var listeners = this._events[evt];
        if (listeners.fn) {
          if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {
            clearEvent(this, evt);
          }
        } else {
          for (var i5 = 0, events = [], length2 = listeners.length; i5 < length2; i5++) {
            if (listeners[i5].fn !== fn || once && !listeners[i5].once || context && listeners[i5].context !== context) {
              events.push(listeners[i5]);
            }
          }
          if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
          else clearEvent(this, evt);
        }
        return this;
      };
      EventEmitter2.prototype.removeAllListeners = function removeAllListeners(event) {
        var evt;
        if (event) {
          evt = prefix ? prefix + event : event;
          if (this._events[evt]) clearEvent(this, evt);
        } else {
          this._events = new Events();
          this._eventsCount = 0;
        }
        return this;
      };
      EventEmitter2.prototype.off = EventEmitter2.prototype.removeListener;
      EventEmitter2.prototype.addListener = EventEmitter2.prototype.on;
      EventEmitter2.prefixed = prefix;
      EventEmitter2.EventEmitter = EventEmitter2;
      if ("undefined" !== typeof module) {
        module.exports = EventEmitter2;
      }
    }
  });

  // (disabled):crypto
  var require_crypto2 = __commonJS({
    "(disabled):crypto"() {
      "use strict";
      init_node_compat_inject();
    }
  });

  // ../../node_modules/.pnpm/tweetnacl@1.0.3/node_modules/tweetnacl/nacl-fast.js
  var require_nacl_fast = __commonJS({
    "../../node_modules/.pnpm/tweetnacl@1.0.3/node_modules/tweetnacl/nacl-fast.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      (function(nacl3) {
        "use strict";
        var gf = function(init2) {
          var i5, r3 = new Float64Array(16);
          if (init2) for (i5 = 0; i5 < init2.length; i5++) r3[i5] = init2[i5];
          return r3;
        };
        var randombytes = function() {
          throw new Error("no PRNG");
        };
        var _0 = new Uint8Array(16);
        var _9 = new Uint8Array(32);
        _9[0] = 9;
        var gf0 = gf(), gf1 = gf([1]), _121665 = gf([56129, 1]), D7 = gf([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), D22 = gf([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), X4 = gf([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), Y6 = gf([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), I7 = gf([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]);
        function ts64(x13, i5, h8, l6) {
          x13[i5] = h8 >> 24 & 255;
          x13[i5 + 1] = h8 >> 16 & 255;
          x13[i5 + 2] = h8 >> 8 & 255;
          x13[i5 + 3] = h8 & 255;
          x13[i5 + 4] = l6 >> 24 & 255;
          x13[i5 + 5] = l6 >> 16 & 255;
          x13[i5 + 6] = l6 >> 8 & 255;
          x13[i5 + 7] = l6 & 255;
        }
        function vn2(x13, xi, y11, yi2, n6) {
          var i5, d6 = 0;
          for (i5 = 0; i5 < n6; i5++) d6 |= x13[xi + i5] ^ y11[yi2 + i5];
          return (1 & d6 - 1 >>> 8) - 1;
        }
        function crypto_verify_16(x13, xi, y11, yi2) {
          return vn2(x13, xi, y11, yi2, 16);
        }
        function crypto_verify_32(x13, xi, y11, yi2) {
          return vn2(x13, xi, y11, yi2, 32);
        }
        function core_salsa20(o5, p7, k7, c7) {
          var j0 = c7[0] & 255 | (c7[1] & 255) << 8 | (c7[2] & 255) << 16 | (c7[3] & 255) << 24, j1 = k7[0] & 255 | (k7[1] & 255) << 8 | (k7[2] & 255) << 16 | (k7[3] & 255) << 24, j22 = k7[4] & 255 | (k7[5] & 255) << 8 | (k7[6] & 255) << 16 | (k7[7] & 255) << 24, j32 = k7[8] & 255 | (k7[9] & 255) << 8 | (k7[10] & 255) << 16 | (k7[11] & 255) << 24, j42 = k7[12] & 255 | (k7[13] & 255) << 8 | (k7[14] & 255) << 16 | (k7[15] & 255) << 24, j52 = c7[4] & 255 | (c7[5] & 255) << 8 | (c7[6] & 255) << 16 | (c7[7] & 255) << 24, j6 = p7[0] & 255 | (p7[1] & 255) << 8 | (p7[2] & 255) << 16 | (p7[3] & 255) << 24, j7 = p7[4] & 255 | (p7[5] & 255) << 8 | (p7[6] & 255) << 16 | (p7[7] & 255) << 24, j8 = p7[8] & 255 | (p7[9] & 255) << 8 | (p7[10] & 255) << 16 | (p7[11] & 255) << 24, j9 = p7[12] & 255 | (p7[13] & 255) << 8 | (p7[14] & 255) << 16 | (p7[15] & 255) << 24, j10 = c7[8] & 255 | (c7[9] & 255) << 8 | (c7[10] & 255) << 16 | (c7[11] & 255) << 24, j11 = k7[16] & 255 | (k7[17] & 255) << 8 | (k7[18] & 255) << 16 | (k7[19] & 255) << 24, j12 = k7[20] & 255 | (k7[21] & 255) << 8 | (k7[22] & 255) << 16 | (k7[23] & 255) << 24, j13 = k7[24] & 255 | (k7[25] & 255) << 8 | (k7[26] & 255) << 16 | (k7[27] & 255) << 24, j14 = k7[28] & 255 | (k7[29] & 255) << 8 | (k7[30] & 255) << 16 | (k7[31] & 255) << 24, j15 = c7[12] & 255 | (c7[13] & 255) << 8 | (c7[14] & 255) << 16 | (c7[15] & 255) << 24;
          var x0 = j0, x1 = j1, x22 = j22, x32 = j32, x42 = j42, x52 = j52, x62 = j6, x72 = j7, x82 = j8, x92 = j9, x102 = j10, x112 = j11, x122 = j12, x13 = j13, x14 = j14, x15 = j15, u4;
          for (var i5 = 0; i5 < 20; i5 += 2) {
            u4 = x0 + x122 | 0;
            x42 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x42 + x0 | 0;
            x82 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x82 + x42 | 0;
            x122 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x122 + x82 | 0;
            x0 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x52 + x1 | 0;
            x92 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x92 + x52 | 0;
            x13 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x13 + x92 | 0;
            x1 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x1 + x13 | 0;
            x52 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x102 + x62 | 0;
            x14 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x14 + x102 | 0;
            x22 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x22 + x14 | 0;
            x62 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x62 + x22 | 0;
            x102 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x15 + x112 | 0;
            x32 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x32 + x15 | 0;
            x72 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x72 + x32 | 0;
            x112 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x112 + x72 | 0;
            x15 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x0 + x32 | 0;
            x1 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x1 + x0 | 0;
            x22 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x22 + x1 | 0;
            x32 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x32 + x22 | 0;
            x0 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x52 + x42 | 0;
            x62 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x62 + x52 | 0;
            x72 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x72 + x62 | 0;
            x42 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x42 + x72 | 0;
            x52 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x102 + x92 | 0;
            x112 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x112 + x102 | 0;
            x82 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x82 + x112 | 0;
            x92 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x92 + x82 | 0;
            x102 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x15 + x14 | 0;
            x122 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x122 + x15 | 0;
            x13 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x13 + x122 | 0;
            x14 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x14 + x13 | 0;
            x15 ^= u4 << 18 | u4 >>> 32 - 18;
          }
          x0 = x0 + j0 | 0;
          x1 = x1 + j1 | 0;
          x22 = x22 + j22 | 0;
          x32 = x32 + j32 | 0;
          x42 = x42 + j42 | 0;
          x52 = x52 + j52 | 0;
          x62 = x62 + j6 | 0;
          x72 = x72 + j7 | 0;
          x82 = x82 + j8 | 0;
          x92 = x92 + j9 | 0;
          x102 = x102 + j10 | 0;
          x112 = x112 + j11 | 0;
          x122 = x122 + j12 | 0;
          x13 = x13 + j13 | 0;
          x14 = x14 + j14 | 0;
          x15 = x15 + j15 | 0;
          o5[0] = x0 >>> 0 & 255;
          o5[1] = x0 >>> 8 & 255;
          o5[2] = x0 >>> 16 & 255;
          o5[3] = x0 >>> 24 & 255;
          o5[4] = x1 >>> 0 & 255;
          o5[5] = x1 >>> 8 & 255;
          o5[6] = x1 >>> 16 & 255;
          o5[7] = x1 >>> 24 & 255;
          o5[8] = x22 >>> 0 & 255;
          o5[9] = x22 >>> 8 & 255;
          o5[10] = x22 >>> 16 & 255;
          o5[11] = x22 >>> 24 & 255;
          o5[12] = x32 >>> 0 & 255;
          o5[13] = x32 >>> 8 & 255;
          o5[14] = x32 >>> 16 & 255;
          o5[15] = x32 >>> 24 & 255;
          o5[16] = x42 >>> 0 & 255;
          o5[17] = x42 >>> 8 & 255;
          o5[18] = x42 >>> 16 & 255;
          o5[19] = x42 >>> 24 & 255;
          o5[20] = x52 >>> 0 & 255;
          o5[21] = x52 >>> 8 & 255;
          o5[22] = x52 >>> 16 & 255;
          o5[23] = x52 >>> 24 & 255;
          o5[24] = x62 >>> 0 & 255;
          o5[25] = x62 >>> 8 & 255;
          o5[26] = x62 >>> 16 & 255;
          o5[27] = x62 >>> 24 & 255;
          o5[28] = x72 >>> 0 & 255;
          o5[29] = x72 >>> 8 & 255;
          o5[30] = x72 >>> 16 & 255;
          o5[31] = x72 >>> 24 & 255;
          o5[32] = x82 >>> 0 & 255;
          o5[33] = x82 >>> 8 & 255;
          o5[34] = x82 >>> 16 & 255;
          o5[35] = x82 >>> 24 & 255;
          o5[36] = x92 >>> 0 & 255;
          o5[37] = x92 >>> 8 & 255;
          o5[38] = x92 >>> 16 & 255;
          o5[39] = x92 >>> 24 & 255;
          o5[40] = x102 >>> 0 & 255;
          o5[41] = x102 >>> 8 & 255;
          o5[42] = x102 >>> 16 & 255;
          o5[43] = x102 >>> 24 & 255;
          o5[44] = x112 >>> 0 & 255;
          o5[45] = x112 >>> 8 & 255;
          o5[46] = x112 >>> 16 & 255;
          o5[47] = x112 >>> 24 & 255;
          o5[48] = x122 >>> 0 & 255;
          o5[49] = x122 >>> 8 & 255;
          o5[50] = x122 >>> 16 & 255;
          o5[51] = x122 >>> 24 & 255;
          o5[52] = x13 >>> 0 & 255;
          o5[53] = x13 >>> 8 & 255;
          o5[54] = x13 >>> 16 & 255;
          o5[55] = x13 >>> 24 & 255;
          o5[56] = x14 >>> 0 & 255;
          o5[57] = x14 >>> 8 & 255;
          o5[58] = x14 >>> 16 & 255;
          o5[59] = x14 >>> 24 & 255;
          o5[60] = x15 >>> 0 & 255;
          o5[61] = x15 >>> 8 & 255;
          o5[62] = x15 >>> 16 & 255;
          o5[63] = x15 >>> 24 & 255;
        }
        function core_hsalsa20(o5, p7, k7, c7) {
          var j0 = c7[0] & 255 | (c7[1] & 255) << 8 | (c7[2] & 255) << 16 | (c7[3] & 255) << 24, j1 = k7[0] & 255 | (k7[1] & 255) << 8 | (k7[2] & 255) << 16 | (k7[3] & 255) << 24, j22 = k7[4] & 255 | (k7[5] & 255) << 8 | (k7[6] & 255) << 16 | (k7[7] & 255) << 24, j32 = k7[8] & 255 | (k7[9] & 255) << 8 | (k7[10] & 255) << 16 | (k7[11] & 255) << 24, j42 = k7[12] & 255 | (k7[13] & 255) << 8 | (k7[14] & 255) << 16 | (k7[15] & 255) << 24, j52 = c7[4] & 255 | (c7[5] & 255) << 8 | (c7[6] & 255) << 16 | (c7[7] & 255) << 24, j6 = p7[0] & 255 | (p7[1] & 255) << 8 | (p7[2] & 255) << 16 | (p7[3] & 255) << 24, j7 = p7[4] & 255 | (p7[5] & 255) << 8 | (p7[6] & 255) << 16 | (p7[7] & 255) << 24, j8 = p7[8] & 255 | (p7[9] & 255) << 8 | (p7[10] & 255) << 16 | (p7[11] & 255) << 24, j9 = p7[12] & 255 | (p7[13] & 255) << 8 | (p7[14] & 255) << 16 | (p7[15] & 255) << 24, j10 = c7[8] & 255 | (c7[9] & 255) << 8 | (c7[10] & 255) << 16 | (c7[11] & 255) << 24, j11 = k7[16] & 255 | (k7[17] & 255) << 8 | (k7[18] & 255) << 16 | (k7[19] & 255) << 24, j12 = k7[20] & 255 | (k7[21] & 255) << 8 | (k7[22] & 255) << 16 | (k7[23] & 255) << 24, j13 = k7[24] & 255 | (k7[25] & 255) << 8 | (k7[26] & 255) << 16 | (k7[27] & 255) << 24, j14 = k7[28] & 255 | (k7[29] & 255) << 8 | (k7[30] & 255) << 16 | (k7[31] & 255) << 24, j15 = c7[12] & 255 | (c7[13] & 255) << 8 | (c7[14] & 255) << 16 | (c7[15] & 255) << 24;
          var x0 = j0, x1 = j1, x22 = j22, x32 = j32, x42 = j42, x52 = j52, x62 = j6, x72 = j7, x82 = j8, x92 = j9, x102 = j10, x112 = j11, x122 = j12, x13 = j13, x14 = j14, x15 = j15, u4;
          for (var i5 = 0; i5 < 20; i5 += 2) {
            u4 = x0 + x122 | 0;
            x42 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x42 + x0 | 0;
            x82 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x82 + x42 | 0;
            x122 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x122 + x82 | 0;
            x0 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x52 + x1 | 0;
            x92 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x92 + x52 | 0;
            x13 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x13 + x92 | 0;
            x1 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x1 + x13 | 0;
            x52 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x102 + x62 | 0;
            x14 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x14 + x102 | 0;
            x22 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x22 + x14 | 0;
            x62 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x62 + x22 | 0;
            x102 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x15 + x112 | 0;
            x32 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x32 + x15 | 0;
            x72 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x72 + x32 | 0;
            x112 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x112 + x72 | 0;
            x15 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x0 + x32 | 0;
            x1 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x1 + x0 | 0;
            x22 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x22 + x1 | 0;
            x32 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x32 + x22 | 0;
            x0 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x52 + x42 | 0;
            x62 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x62 + x52 | 0;
            x72 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x72 + x62 | 0;
            x42 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x42 + x72 | 0;
            x52 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x102 + x92 | 0;
            x112 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x112 + x102 | 0;
            x82 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x82 + x112 | 0;
            x92 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x92 + x82 | 0;
            x102 ^= u4 << 18 | u4 >>> 32 - 18;
            u4 = x15 + x14 | 0;
            x122 ^= u4 << 7 | u4 >>> 32 - 7;
            u4 = x122 + x15 | 0;
            x13 ^= u4 << 9 | u4 >>> 32 - 9;
            u4 = x13 + x122 | 0;
            x14 ^= u4 << 13 | u4 >>> 32 - 13;
            u4 = x14 + x13 | 0;
            x15 ^= u4 << 18 | u4 >>> 32 - 18;
          }
          o5[0] = x0 >>> 0 & 255;
          o5[1] = x0 >>> 8 & 255;
          o5[2] = x0 >>> 16 & 255;
          o5[3] = x0 >>> 24 & 255;
          o5[4] = x52 >>> 0 & 255;
          o5[5] = x52 >>> 8 & 255;
          o5[6] = x52 >>> 16 & 255;
          o5[7] = x52 >>> 24 & 255;
          o5[8] = x102 >>> 0 & 255;
          o5[9] = x102 >>> 8 & 255;
          o5[10] = x102 >>> 16 & 255;
          o5[11] = x102 >>> 24 & 255;
          o5[12] = x15 >>> 0 & 255;
          o5[13] = x15 >>> 8 & 255;
          o5[14] = x15 >>> 16 & 255;
          o5[15] = x15 >>> 24 & 255;
          o5[16] = x62 >>> 0 & 255;
          o5[17] = x62 >>> 8 & 255;
          o5[18] = x62 >>> 16 & 255;
          o5[19] = x62 >>> 24 & 255;
          o5[20] = x72 >>> 0 & 255;
          o5[21] = x72 >>> 8 & 255;
          o5[22] = x72 >>> 16 & 255;
          o5[23] = x72 >>> 24 & 255;
          o5[24] = x82 >>> 0 & 255;
          o5[25] = x82 >>> 8 & 255;
          o5[26] = x82 >>> 16 & 255;
          o5[27] = x82 >>> 24 & 255;
          o5[28] = x92 >>> 0 & 255;
          o5[29] = x92 >>> 8 & 255;
          o5[30] = x92 >>> 16 & 255;
          o5[31] = x92 >>> 24 & 255;
        }
        function crypto_core_salsa20(out, inp, k7, c7) {
          core_salsa20(out, inp, k7, c7);
        }
        function crypto_core_hsalsa20(out, inp, k7, c7) {
          core_hsalsa20(out, inp, k7, c7);
        }
        var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]);
        function crypto_stream_salsa20_xor(c7, cpos, m3, mpos, b9, n6, k7) {
          var z11 = new Uint8Array(16), x13 = new Uint8Array(64);
          var u4, i5;
          for (i5 = 0; i5 < 16; i5++) z11[i5] = 0;
          for (i5 = 0; i5 < 8; i5++) z11[i5] = n6[i5];
          while (b9 >= 64) {
            crypto_core_salsa20(x13, z11, k7, sigma);
            for (i5 = 0; i5 < 64; i5++) c7[cpos + i5] = m3[mpos + i5] ^ x13[i5];
            u4 = 1;
            for (i5 = 8; i5 < 16; i5++) {
              u4 = u4 + (z11[i5] & 255) | 0;
              z11[i5] = u4 & 255;
              u4 >>>= 8;
            }
            b9 -= 64;
            cpos += 64;
            mpos += 64;
          }
          if (b9 > 0) {
            crypto_core_salsa20(x13, z11, k7, sigma);
            for (i5 = 0; i5 < b9; i5++) c7[cpos + i5] = m3[mpos + i5] ^ x13[i5];
          }
          return 0;
        }
        function crypto_stream_salsa20(c7, cpos, b9, n6, k7) {
          var z11 = new Uint8Array(16), x13 = new Uint8Array(64);
          var u4, i5;
          for (i5 = 0; i5 < 16; i5++) z11[i5] = 0;
          for (i5 = 0; i5 < 8; i5++) z11[i5] = n6[i5];
          while (b9 >= 64) {
            crypto_core_salsa20(x13, z11, k7, sigma);
            for (i5 = 0; i5 < 64; i5++) c7[cpos + i5] = x13[i5];
            u4 = 1;
            for (i5 = 8; i5 < 16; i5++) {
              u4 = u4 + (z11[i5] & 255) | 0;
              z11[i5] = u4 & 255;
              u4 >>>= 8;
            }
            b9 -= 64;
            cpos += 64;
          }
          if (b9 > 0) {
            crypto_core_salsa20(x13, z11, k7, sigma);
            for (i5 = 0; i5 < b9; i5++) c7[cpos + i5] = x13[i5];
          }
          return 0;
        }
        function crypto_stream(c7, cpos, d6, n6, k7) {
          var s3 = new Uint8Array(32);
          crypto_core_hsalsa20(s3, n6, k7, sigma);
          var sn4 = new Uint8Array(8);
          for (var i5 = 0; i5 < 8; i5++) sn4[i5] = n6[i5 + 16];
          return crypto_stream_salsa20(c7, cpos, d6, sn4, s3);
        }
        function crypto_stream_xor(c7, cpos, m3, mpos, d6, n6, k7) {
          var s3 = new Uint8Array(32);
          crypto_core_hsalsa20(s3, n6, k7, sigma);
          var sn4 = new Uint8Array(8);
          for (var i5 = 0; i5 < 8; i5++) sn4[i5] = n6[i5 + 16];
          return crypto_stream_salsa20_xor(c7, cpos, m3, mpos, d6, sn4, s3);
        }
        var poly13052 = function(key2) {
          this.buffer = new Uint8Array(16);
          this.r = new Uint16Array(10);
          this.h = new Uint16Array(10);
          this.pad = new Uint16Array(8);
          this.leftover = 0;
          this.fin = 0;
          var t0, t1, t2, t3, t4, t5, t6, t7;
          t0 = key2[0] & 255 | (key2[1] & 255) << 8;
          this.r[0] = t0 & 8191;
          t1 = key2[2] & 255 | (key2[3] & 255) << 8;
          this.r[1] = (t0 >>> 13 | t1 << 3) & 8191;
          t2 = key2[4] & 255 | (key2[5] & 255) << 8;
          this.r[2] = (t1 >>> 10 | t2 << 6) & 7939;
          t3 = key2[6] & 255 | (key2[7] & 255) << 8;
          this.r[3] = (t2 >>> 7 | t3 << 9) & 8191;
          t4 = key2[8] & 255 | (key2[9] & 255) << 8;
          this.r[4] = (t3 >>> 4 | t4 << 12) & 255;
          this.r[5] = t4 >>> 1 & 8190;
          t5 = key2[10] & 255 | (key2[11] & 255) << 8;
          this.r[6] = (t4 >>> 14 | t5 << 2) & 8191;
          t6 = key2[12] & 255 | (key2[13] & 255) << 8;
          this.r[7] = (t5 >>> 11 | t6 << 5) & 8065;
          t7 = key2[14] & 255 | (key2[15] & 255) << 8;
          this.r[8] = (t6 >>> 8 | t7 << 8) & 8191;
          this.r[9] = t7 >>> 5 & 127;
          this.pad[0] = key2[16] & 255 | (key2[17] & 255) << 8;
          this.pad[1] = key2[18] & 255 | (key2[19] & 255) << 8;
          this.pad[2] = key2[20] & 255 | (key2[21] & 255) << 8;
          this.pad[3] = key2[22] & 255 | (key2[23] & 255) << 8;
          this.pad[4] = key2[24] & 255 | (key2[25] & 255) << 8;
          this.pad[5] = key2[26] & 255 | (key2[27] & 255) << 8;
          this.pad[6] = key2[28] & 255 | (key2[29] & 255) << 8;
          this.pad[7] = key2[30] & 255 | (key2[31] & 255) << 8;
        };
        poly13052.prototype.blocks = function(m3, mpos, bytes) {
          var hibit = this.fin ? 0 : 1 << 11;
          var t0, t1, t2, t3, t4, t5, t6, t7, c7;
          var d0, d1, d22, d32, d42, d52, d6, d7, d8, d9;
          var h0 = this.h[0], h1 = this.h[1], h22 = this.h[2], h32 = this.h[3], h42 = this.h[4], h52 = this.h[5], h62 = this.h[6], h72 = this.h[7], h8 = this.h[8], h9 = this.h[9];
          var r0 = this.r[0], r1 = this.r[1], r22 = this.r[2], r3 = this.r[3], r4 = this.r[4], r5 = this.r[5], r6 = this.r[6], r7 = this.r[7], r8 = this.r[8], r9 = this.r[9];
          while (bytes >= 16) {
            t0 = m3[mpos + 0] & 255 | (m3[mpos + 1] & 255) << 8;
            h0 += t0 & 8191;
            t1 = m3[mpos + 2] & 255 | (m3[mpos + 3] & 255) << 8;
            h1 += (t0 >>> 13 | t1 << 3) & 8191;
            t2 = m3[mpos + 4] & 255 | (m3[mpos + 5] & 255) << 8;
            h22 += (t1 >>> 10 | t2 << 6) & 8191;
            t3 = m3[mpos + 6] & 255 | (m3[mpos + 7] & 255) << 8;
            h32 += (t2 >>> 7 | t3 << 9) & 8191;
            t4 = m3[mpos + 8] & 255 | (m3[mpos + 9] & 255) << 8;
            h42 += (t3 >>> 4 | t4 << 12) & 8191;
            h52 += t4 >>> 1 & 8191;
            t5 = m3[mpos + 10] & 255 | (m3[mpos + 11] & 255) << 8;
            h62 += (t4 >>> 14 | t5 << 2) & 8191;
            t6 = m3[mpos + 12] & 255 | (m3[mpos + 13] & 255) << 8;
            h72 += (t5 >>> 11 | t6 << 5) & 8191;
            t7 = m3[mpos + 14] & 255 | (m3[mpos + 15] & 255) << 8;
            h8 += (t6 >>> 8 | t7 << 8) & 8191;
            h9 += t7 >>> 5 | hibit;
            c7 = 0;
            d0 = c7;
            d0 += h0 * r0;
            d0 += h1 * (5 * r9);
            d0 += h22 * (5 * r8);
            d0 += h32 * (5 * r7);
            d0 += h42 * (5 * r6);
            c7 = d0 >>> 13;
            d0 &= 8191;
            d0 += h52 * (5 * r5);
            d0 += h62 * (5 * r4);
            d0 += h72 * (5 * r3);
            d0 += h8 * (5 * r22);
            d0 += h9 * (5 * r1);
            c7 += d0 >>> 13;
            d0 &= 8191;
            d1 = c7;
            d1 += h0 * r1;
            d1 += h1 * r0;
            d1 += h22 * (5 * r9);
            d1 += h32 * (5 * r8);
            d1 += h42 * (5 * r7);
            c7 = d1 >>> 13;
            d1 &= 8191;
            d1 += h52 * (5 * r6);
            d1 += h62 * (5 * r5);
            d1 += h72 * (5 * r4);
            d1 += h8 * (5 * r3);
            d1 += h9 * (5 * r22);
            c7 += d1 >>> 13;
            d1 &= 8191;
            d22 = c7;
            d22 += h0 * r22;
            d22 += h1 * r1;
            d22 += h22 * r0;
            d22 += h32 * (5 * r9);
            d22 += h42 * (5 * r8);
            c7 = d22 >>> 13;
            d22 &= 8191;
            d22 += h52 * (5 * r7);
            d22 += h62 * (5 * r6);
            d22 += h72 * (5 * r5);
            d22 += h8 * (5 * r4);
            d22 += h9 * (5 * r3);
            c7 += d22 >>> 13;
            d22 &= 8191;
            d32 = c7;
            d32 += h0 * r3;
            d32 += h1 * r22;
            d32 += h22 * r1;
            d32 += h32 * r0;
            d32 += h42 * (5 * r9);
            c7 = d32 >>> 13;
            d32 &= 8191;
            d32 += h52 * (5 * r8);
            d32 += h62 * (5 * r7);
            d32 += h72 * (5 * r6);
            d32 += h8 * (5 * r5);
            d32 += h9 * (5 * r4);
            c7 += d32 >>> 13;
            d32 &= 8191;
            d42 = c7;
            d42 += h0 * r4;
            d42 += h1 * r3;
            d42 += h22 * r22;
            d42 += h32 * r1;
            d42 += h42 * r0;
            c7 = d42 >>> 13;
            d42 &= 8191;
            d42 += h52 * (5 * r9);
            d42 += h62 * (5 * r8);
            d42 += h72 * (5 * r7);
            d42 += h8 * (5 * r6);
            d42 += h9 * (5 * r5);
            c7 += d42 >>> 13;
            d42 &= 8191;
            d52 = c7;
            d52 += h0 * r5;
            d52 += h1 * r4;
            d52 += h22 * r3;
            d52 += h32 * r22;
            d52 += h42 * r1;
            c7 = d52 >>> 13;
            d52 &= 8191;
            d52 += h52 * r0;
            d52 += h62 * (5 * r9);
            d52 += h72 * (5 * r8);
            d52 += h8 * (5 * r7);
            d52 += h9 * (5 * r6);
            c7 += d52 >>> 13;
            d52 &= 8191;
            d6 = c7;
            d6 += h0 * r6;
            d6 += h1 * r5;
            d6 += h22 * r4;
            d6 += h32 * r3;
            d6 += h42 * r22;
            c7 = d6 >>> 13;
            d6 &= 8191;
            d6 += h52 * r1;
            d6 += h62 * r0;
            d6 += h72 * (5 * r9);
            d6 += h8 * (5 * r8);
            d6 += h9 * (5 * r7);
            c7 += d6 >>> 13;
            d6 &= 8191;
            d7 = c7;
            d7 += h0 * r7;
            d7 += h1 * r6;
            d7 += h22 * r5;
            d7 += h32 * r4;
            d7 += h42 * r3;
            c7 = d7 >>> 13;
            d7 &= 8191;
            d7 += h52 * r22;
            d7 += h62 * r1;
            d7 += h72 * r0;
            d7 += h8 * (5 * r9);
            d7 += h9 * (5 * r8);
            c7 += d7 >>> 13;
            d7 &= 8191;
            d8 = c7;
            d8 += h0 * r8;
            d8 += h1 * r7;
            d8 += h22 * r6;
            d8 += h32 * r5;
            d8 += h42 * r4;
            c7 = d8 >>> 13;
            d8 &= 8191;
            d8 += h52 * r3;
            d8 += h62 * r22;
            d8 += h72 * r1;
            d8 += h8 * r0;
            d8 += h9 * (5 * r9);
            c7 += d8 >>> 13;
            d8 &= 8191;
            d9 = c7;
            d9 += h0 * r9;
            d9 += h1 * r8;
            d9 += h22 * r7;
            d9 += h32 * r6;
            d9 += h42 * r5;
            c7 = d9 >>> 13;
            d9 &= 8191;
            d9 += h52 * r4;
            d9 += h62 * r3;
            d9 += h72 * r22;
            d9 += h8 * r1;
            d9 += h9 * r0;
            c7 += d9 >>> 13;
            d9 &= 8191;
            c7 = (c7 << 2) + c7 | 0;
            c7 = c7 + d0 | 0;
            d0 = c7 & 8191;
            c7 = c7 >>> 13;
            d1 += c7;
            h0 = d0;
            h1 = d1;
            h22 = d22;
            h32 = d32;
            h42 = d42;
            h52 = d52;
            h62 = d6;
            h72 = d7;
            h8 = d8;
            h9 = d9;
            mpos += 16;
            bytes -= 16;
          }
          this.h[0] = h0;
          this.h[1] = h1;
          this.h[2] = h22;
          this.h[3] = h32;
          this.h[4] = h42;
          this.h[5] = h52;
          this.h[6] = h62;
          this.h[7] = h72;
          this.h[8] = h8;
          this.h[9] = h9;
        };
        poly13052.prototype.finish = function(mac3, macpos) {
          var g8 = new Uint16Array(10);
          var c7, mask2, f7, i5;
          if (this.leftover) {
            i5 = this.leftover;
            this.buffer[i5++] = 1;
            for (; i5 < 16; i5++) this.buffer[i5] = 0;
            this.fin = 1;
            this.blocks(this.buffer, 0, 16);
          }
          c7 = this.h[1] >>> 13;
          this.h[1] &= 8191;
          for (i5 = 2; i5 < 10; i5++) {
            this.h[i5] += c7;
            c7 = this.h[i5] >>> 13;
            this.h[i5] &= 8191;
          }
          this.h[0] += c7 * 5;
          c7 = this.h[0] >>> 13;
          this.h[0] &= 8191;
          this.h[1] += c7;
          c7 = this.h[1] >>> 13;
          this.h[1] &= 8191;
          this.h[2] += c7;
          g8[0] = this.h[0] + 5;
          c7 = g8[0] >>> 13;
          g8[0] &= 8191;
          for (i5 = 1; i5 < 10; i5++) {
            g8[i5] = this.h[i5] + c7;
            c7 = g8[i5] >>> 13;
            g8[i5] &= 8191;
          }
          g8[9] -= 1 << 13;
          mask2 = (c7 ^ 1) - 1;
          for (i5 = 0; i5 < 10; i5++) g8[i5] &= mask2;
          mask2 = ~mask2;
          for (i5 = 0; i5 < 10; i5++) this.h[i5] = this.h[i5] & mask2 | g8[i5];
          this.h[0] = (this.h[0] | this.h[1] << 13) & 65535;
          this.h[1] = (this.h[1] >>> 3 | this.h[2] << 10) & 65535;
          this.h[2] = (this.h[2] >>> 6 | this.h[3] << 7) & 65535;
          this.h[3] = (this.h[3] >>> 9 | this.h[4] << 4) & 65535;
          this.h[4] = (this.h[4] >>> 12 | this.h[5] << 1 | this.h[6] << 14) & 65535;
          this.h[5] = (this.h[6] >>> 2 | this.h[7] << 11) & 65535;
          this.h[6] = (this.h[7] >>> 5 | this.h[8] << 8) & 65535;
          this.h[7] = (this.h[8] >>> 8 | this.h[9] << 5) & 65535;
          f7 = this.h[0] + this.pad[0];
          this.h[0] = f7 & 65535;
          for (i5 = 1; i5 < 8; i5++) {
            f7 = (this.h[i5] + this.pad[i5] | 0) + (f7 >>> 16) | 0;
            this.h[i5] = f7 & 65535;
          }
          mac3[macpos + 0] = this.h[0] >>> 0 & 255;
          mac3[macpos + 1] = this.h[0] >>> 8 & 255;
          mac3[macpos + 2] = this.h[1] >>> 0 & 255;
          mac3[macpos + 3] = this.h[1] >>> 8 & 255;
          mac3[macpos + 4] = this.h[2] >>> 0 & 255;
          mac3[macpos + 5] = this.h[2] >>> 8 & 255;
          mac3[macpos + 6] = this.h[3] >>> 0 & 255;
          mac3[macpos + 7] = this.h[3] >>> 8 & 255;
          mac3[macpos + 8] = this.h[4] >>> 0 & 255;
          mac3[macpos + 9] = this.h[4] >>> 8 & 255;
          mac3[macpos + 10] = this.h[5] >>> 0 & 255;
          mac3[macpos + 11] = this.h[5] >>> 8 & 255;
          mac3[macpos + 12] = this.h[6] >>> 0 & 255;
          mac3[macpos + 13] = this.h[6] >>> 8 & 255;
          mac3[macpos + 14] = this.h[7] >>> 0 & 255;
          mac3[macpos + 15] = this.h[7] >>> 8 & 255;
        };
        poly13052.prototype.update = function(m3, mpos, bytes) {
          var i5, want;
          if (this.leftover) {
            want = 16 - this.leftover;
            if (want > bytes)
              want = bytes;
            for (i5 = 0; i5 < want; i5++)
              this.buffer[this.leftover + i5] = m3[mpos + i5];
            bytes -= want;
            mpos += want;
            this.leftover += want;
            if (this.leftover < 16)
              return;
            this.blocks(this.buffer, 0, 16);
            this.leftover = 0;
          }
          if (bytes >= 16) {
            want = bytes - bytes % 16;
            this.blocks(m3, mpos, want);
            mpos += want;
            bytes -= want;
          }
          if (bytes) {
            for (i5 = 0; i5 < bytes; i5++)
              this.buffer[this.leftover + i5] = m3[mpos + i5];
            this.leftover += bytes;
          }
        };
        function crypto_onetimeauth(out, outpos, m3, mpos, n6, k7) {
          var s3 = new poly13052(k7);
          s3.update(m3, mpos, n6);
          s3.finish(out, outpos);
          return 0;
        }
        function crypto_onetimeauth_verify(h8, hpos, m3, mpos, n6, k7) {
          var x13 = new Uint8Array(16);
          crypto_onetimeauth(x13, 0, m3, mpos, n6, k7);
          return crypto_verify_16(h8, hpos, x13, 0);
        }
        function crypto_secretbox(c7, m3, d6, n6, k7) {
          var i5;
          if (d6 < 32) return -1;
          crypto_stream_xor(c7, 0, m3, 0, d6, n6, k7);
          crypto_onetimeauth(c7, 16, c7, 32, d6 - 32, c7);
          for (i5 = 0; i5 < 16; i5++) c7[i5] = 0;
          return 0;
        }
        function crypto_secretbox_open(m3, c7, d6, n6, k7) {
          var i5;
          var x13 = new Uint8Array(32);
          if (d6 < 32) return -1;
          crypto_stream(x13, 0, 32, n6, k7);
          if (crypto_onetimeauth_verify(c7, 16, c7, 32, d6 - 32, x13) !== 0) return -1;
          crypto_stream_xor(m3, 0, c7, 0, d6, n6, k7);
          for (i5 = 0; i5 < 32; i5++) m3[i5] = 0;
          return 0;
        }
        function set25519(r3, a5) {
          var i5;
          for (i5 = 0; i5 < 16; i5++) r3[i5] = a5[i5] | 0;
        }
        function car25519(o5) {
          var i5, v13, c7 = 1;
          for (i5 = 0; i5 < 16; i5++) {
            v13 = o5[i5] + c7 + 65535;
            c7 = Math.floor(v13 / 65536);
            o5[i5] = v13 - c7 * 65536;
          }
          o5[0] += c7 - 1 + 37 * (c7 - 1);
        }
        function sel25519(p7, q7, b9) {
          var t, c7 = ~(b9 - 1);
          for (var i5 = 0; i5 < 16; i5++) {
            t = c7 & (p7[i5] ^ q7[i5]);
            p7[i5] ^= t;
            q7[i5] ^= t;
          }
        }
        function pack25519(o5, n6) {
          var i5, j6, b9;
          var m3 = gf(), t = gf();
          for (i5 = 0; i5 < 16; i5++) t[i5] = n6[i5];
          car25519(t);
          car25519(t);
          car25519(t);
          for (j6 = 0; j6 < 2; j6++) {
            m3[0] = t[0] - 65517;
            for (i5 = 1; i5 < 15; i5++) {
              m3[i5] = t[i5] - 65535 - (m3[i5 - 1] >> 16 & 1);
              m3[i5 - 1] &= 65535;
            }
            m3[15] = t[15] - 32767 - (m3[14] >> 16 & 1);
            b9 = m3[15] >> 16 & 1;
            m3[14] &= 65535;
            sel25519(t, m3, 1 - b9);
          }
          for (i5 = 0; i5 < 16; i5++) {
            o5[2 * i5] = t[i5] & 255;
            o5[2 * i5 + 1] = t[i5] >> 8;
          }
        }
        function neq25519(a5, b9) {
          var c7 = new Uint8Array(32), d6 = new Uint8Array(32);
          pack25519(c7, a5);
          pack25519(d6, b9);
          return crypto_verify_32(c7, 0, d6, 0);
        }
        function par25519(a5) {
          var d6 = new Uint8Array(32);
          pack25519(d6, a5);
          return d6[0] & 1;
        }
        function unpack25519(o5, n6) {
          var i5;
          for (i5 = 0; i5 < 16; i5++) o5[i5] = n6[2 * i5] + (n6[2 * i5 + 1] << 8);
          o5[15] &= 32767;
        }
        function A7(o5, a5, b9) {
          for (var i5 = 0; i5 < 16; i5++) o5[i5] = a5[i5] + b9[i5];
        }
        function Z6(o5, a5, b9) {
          for (var i5 = 0; i5 < 16; i5++) o5[i5] = a5[i5] - b9[i5];
        }
        function M9(o5, a5, b9) {
          var v13, c7, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b9[0], b1 = b9[1], b22 = b9[2], b32 = b9[3], b42 = b9[4], b52 = b9[5], b62 = b9[6], b72 = b9[7], b82 = b9[8], b92 = b9[9], b10 = b9[10], b11 = b9[11], b12 = b9[12], b13 = b9[13], b14 = b9[14], b15 = b9[15];
          v13 = a5[0];
          t0 += v13 * b0;
          t1 += v13 * b1;
          t2 += v13 * b22;
          t3 += v13 * b32;
          t4 += v13 * b42;
          t5 += v13 * b52;
          t6 += v13 * b62;
          t7 += v13 * b72;
          t8 += v13 * b82;
          t9 += v13 * b92;
          t10 += v13 * b10;
          t11 += v13 * b11;
          t12 += v13 * b12;
          t13 += v13 * b13;
          t14 += v13 * b14;
          t15 += v13 * b15;
          v13 = a5[1];
          t1 += v13 * b0;
          t2 += v13 * b1;
          t3 += v13 * b22;
          t4 += v13 * b32;
          t5 += v13 * b42;
          t6 += v13 * b52;
          t7 += v13 * b62;
          t8 += v13 * b72;
          t9 += v13 * b82;
          t10 += v13 * b92;
          t11 += v13 * b10;
          t12 += v13 * b11;
          t13 += v13 * b12;
          t14 += v13 * b13;
          t15 += v13 * b14;
          t16 += v13 * b15;
          v13 = a5[2];
          t2 += v13 * b0;
          t3 += v13 * b1;
          t4 += v13 * b22;
          t5 += v13 * b32;
          t6 += v13 * b42;
          t7 += v13 * b52;
          t8 += v13 * b62;
          t9 += v13 * b72;
          t10 += v13 * b82;
          t11 += v13 * b92;
          t12 += v13 * b10;
          t13 += v13 * b11;
          t14 += v13 * b12;
          t15 += v13 * b13;
          t16 += v13 * b14;
          t17 += v13 * b15;
          v13 = a5[3];
          t3 += v13 * b0;
          t4 += v13 * b1;
          t5 += v13 * b22;
          t6 += v13 * b32;
          t7 += v13 * b42;
          t8 += v13 * b52;
          t9 += v13 * b62;
          t10 += v13 * b72;
          t11 += v13 * b82;
          t12 += v13 * b92;
          t13 += v13 * b10;
          t14 += v13 * b11;
          t15 += v13 * b12;
          t16 += v13 * b13;
          t17 += v13 * b14;
          t18 += v13 * b15;
          v13 = a5[4];
          t4 += v13 * b0;
          t5 += v13 * b1;
          t6 += v13 * b22;
          t7 += v13 * b32;
          t8 += v13 * b42;
          t9 += v13 * b52;
          t10 += v13 * b62;
          t11 += v13 * b72;
          t12 += v13 * b82;
          t13 += v13 * b92;
          t14 += v13 * b10;
          t15 += v13 * b11;
          t16 += v13 * b12;
          t17 += v13 * b13;
          t18 += v13 * b14;
          t19 += v13 * b15;
          v13 = a5[5];
          t5 += v13 * b0;
          t6 += v13 * b1;
          t7 += v13 * b22;
          t8 += v13 * b32;
          t9 += v13 * b42;
          t10 += v13 * b52;
          t11 += v13 * b62;
          t12 += v13 * b72;
          t13 += v13 * b82;
          t14 += v13 * b92;
          t15 += v13 * b10;
          t16 += v13 * b11;
          t17 += v13 * b12;
          t18 += v13 * b13;
          t19 += v13 * b14;
          t20 += v13 * b15;
          v13 = a5[6];
          t6 += v13 * b0;
          t7 += v13 * b1;
          t8 += v13 * b22;
          t9 += v13 * b32;
          t10 += v13 * b42;
          t11 += v13 * b52;
          t12 += v13 * b62;
          t13 += v13 * b72;
          t14 += v13 * b82;
          t15 += v13 * b92;
          t16 += v13 * b10;
          t17 += v13 * b11;
          t18 += v13 * b12;
          t19 += v13 * b13;
          t20 += v13 * b14;
          t21 += v13 * b15;
          v13 = a5[7];
          t7 += v13 * b0;
          t8 += v13 * b1;
          t9 += v13 * b22;
          t10 += v13 * b32;
          t11 += v13 * b42;
          t12 += v13 * b52;
          t13 += v13 * b62;
          t14 += v13 * b72;
          t15 += v13 * b82;
          t16 += v13 * b92;
          t17 += v13 * b10;
          t18 += v13 * b11;
          t19 += v13 * b12;
          t20 += v13 * b13;
          t21 += v13 * b14;
          t22 += v13 * b15;
          v13 = a5[8];
          t8 += v13 * b0;
          t9 += v13 * b1;
          t10 += v13 * b22;
          t11 += v13 * b32;
          t12 += v13 * b42;
          t13 += v13 * b52;
          t14 += v13 * b62;
          t15 += v13 * b72;
          t16 += v13 * b82;
          t17 += v13 * b92;
          t18 += v13 * b10;
          t19 += v13 * b11;
          t20 += v13 * b12;
          t21 += v13 * b13;
          t22 += v13 * b14;
          t23 += v13 * b15;
          v13 = a5[9];
          t9 += v13 * b0;
          t10 += v13 * b1;
          t11 += v13 * b22;
          t12 += v13 * b32;
          t13 += v13 * b42;
          t14 += v13 * b52;
          t15 += v13 * b62;
          t16 += v13 * b72;
          t17 += v13 * b82;
          t18 += v13 * b92;
          t19 += v13 * b10;
          t20 += v13 * b11;
          t21 += v13 * b12;
          t22 += v13 * b13;
          t23 += v13 * b14;
          t24 += v13 * b15;
          v13 = a5[10];
          t10 += v13 * b0;
          t11 += v13 * b1;
          t12 += v13 * b22;
          t13 += v13 * b32;
          t14 += v13 * b42;
          t15 += v13 * b52;
          t16 += v13 * b62;
          t17 += v13 * b72;
          t18 += v13 * b82;
          t19 += v13 * b92;
          t20 += v13 * b10;
          t21 += v13 * b11;
          t22 += v13 * b12;
          t23 += v13 * b13;
          t24 += v13 * b14;
          t25 += v13 * b15;
          v13 = a5[11];
          t11 += v13 * b0;
          t12 += v13 * b1;
          t13 += v13 * b22;
          t14 += v13 * b32;
          t15 += v13 * b42;
          t16 += v13 * b52;
          t17 += v13 * b62;
          t18 += v13 * b72;
          t19 += v13 * b82;
          t20 += v13 * b92;
          t21 += v13 * b10;
          t22 += v13 * b11;
          t23 += v13 * b12;
          t24 += v13 * b13;
          t25 += v13 * b14;
          t26 += v13 * b15;
          v13 = a5[12];
          t12 += v13 * b0;
          t13 += v13 * b1;
          t14 += v13 * b22;
          t15 += v13 * b32;
          t16 += v13 * b42;
          t17 += v13 * b52;
          t18 += v13 * b62;
          t19 += v13 * b72;
          t20 += v13 * b82;
          t21 += v13 * b92;
          t22 += v13 * b10;
          t23 += v13 * b11;
          t24 += v13 * b12;
          t25 += v13 * b13;
          t26 += v13 * b14;
          t27 += v13 * b15;
          v13 = a5[13];
          t13 += v13 * b0;
          t14 += v13 * b1;
          t15 += v13 * b22;
          t16 += v13 * b32;
          t17 += v13 * b42;
          t18 += v13 * b52;
          t19 += v13 * b62;
          t20 += v13 * b72;
          t21 += v13 * b82;
          t22 += v13 * b92;
          t23 += v13 * b10;
          t24 += v13 * b11;
          t25 += v13 * b12;
          t26 += v13 * b13;
          t27 += v13 * b14;
          t28 += v13 * b15;
          v13 = a5[14];
          t14 += v13 * b0;
          t15 += v13 * b1;
          t16 += v13 * b22;
          t17 += v13 * b32;
          t18 += v13 * b42;
          t19 += v13 * b52;
          t20 += v13 * b62;
          t21 += v13 * b72;
          t22 += v13 * b82;
          t23 += v13 * b92;
          t24 += v13 * b10;
          t25 += v13 * b11;
          t26 += v13 * b12;
          t27 += v13 * b13;
          t28 += v13 * b14;
          t29 += v13 * b15;
          v13 = a5[15];
          t15 += v13 * b0;
          t16 += v13 * b1;
          t17 += v13 * b22;
          t18 += v13 * b32;
          t19 += v13 * b42;
          t20 += v13 * b52;
          t21 += v13 * b62;
          t22 += v13 * b72;
          t23 += v13 * b82;
          t24 += v13 * b92;
          t25 += v13 * b10;
          t26 += v13 * b11;
          t27 += v13 * b12;
          t28 += v13 * b13;
          t29 += v13 * b14;
          t30 += v13 * b15;
          t0 += 38 * t16;
          t1 += 38 * t17;
          t2 += 38 * t18;
          t3 += 38 * t19;
          t4 += 38 * t20;
          t5 += 38 * t21;
          t6 += 38 * t22;
          t7 += 38 * t23;
          t8 += 38 * t24;
          t9 += 38 * t25;
          t10 += 38 * t26;
          t11 += 38 * t27;
          t12 += 38 * t28;
          t13 += 38 * t29;
          t14 += 38 * t30;
          c7 = 1;
          v13 = t0 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t0 = v13 - c7 * 65536;
          v13 = t1 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t1 = v13 - c7 * 65536;
          v13 = t2 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t2 = v13 - c7 * 65536;
          v13 = t3 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t3 = v13 - c7 * 65536;
          v13 = t4 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t4 = v13 - c7 * 65536;
          v13 = t5 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t5 = v13 - c7 * 65536;
          v13 = t6 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t6 = v13 - c7 * 65536;
          v13 = t7 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t7 = v13 - c7 * 65536;
          v13 = t8 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t8 = v13 - c7 * 65536;
          v13 = t9 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t9 = v13 - c7 * 65536;
          v13 = t10 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t10 = v13 - c7 * 65536;
          v13 = t11 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t11 = v13 - c7 * 65536;
          v13 = t12 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t12 = v13 - c7 * 65536;
          v13 = t13 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t13 = v13 - c7 * 65536;
          v13 = t14 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t14 = v13 - c7 * 65536;
          v13 = t15 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t15 = v13 - c7 * 65536;
          t0 += c7 - 1 + 37 * (c7 - 1);
          c7 = 1;
          v13 = t0 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t0 = v13 - c7 * 65536;
          v13 = t1 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t1 = v13 - c7 * 65536;
          v13 = t2 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t2 = v13 - c7 * 65536;
          v13 = t3 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t3 = v13 - c7 * 65536;
          v13 = t4 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t4 = v13 - c7 * 65536;
          v13 = t5 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t5 = v13 - c7 * 65536;
          v13 = t6 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t6 = v13 - c7 * 65536;
          v13 = t7 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t7 = v13 - c7 * 65536;
          v13 = t8 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t8 = v13 - c7 * 65536;
          v13 = t9 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t9 = v13 - c7 * 65536;
          v13 = t10 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t10 = v13 - c7 * 65536;
          v13 = t11 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t11 = v13 - c7 * 65536;
          v13 = t12 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t12 = v13 - c7 * 65536;
          v13 = t13 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t13 = v13 - c7 * 65536;
          v13 = t14 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t14 = v13 - c7 * 65536;
          v13 = t15 + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          t15 = v13 - c7 * 65536;
          t0 += c7 - 1 + 37 * (c7 - 1);
          o5[0] = t0;
          o5[1] = t1;
          o5[2] = t2;
          o5[3] = t3;
          o5[4] = t4;
          o5[5] = t5;
          o5[6] = t6;
          o5[7] = t7;
          o5[8] = t8;
          o5[9] = t9;
          o5[10] = t10;
          o5[11] = t11;
          o5[12] = t12;
          o5[13] = t13;
          o5[14] = t14;
          o5[15] = t15;
        }
        function S10(o5, a5) {
          M9(o5, a5, a5);
        }
        function inv25519(o5, i5) {
          var c7 = gf();
          var a5;
          for (a5 = 0; a5 < 16; a5++) c7[a5] = i5[a5];
          for (a5 = 253; a5 >= 0; a5--) {
            S10(c7, c7);
            if (a5 !== 2 && a5 !== 4) M9(c7, c7, i5);
          }
          for (a5 = 0; a5 < 16; a5++) o5[a5] = c7[a5];
        }
        function pow2523(o5, i5) {
          var c7 = gf();
          var a5;
          for (a5 = 0; a5 < 16; a5++) c7[a5] = i5[a5];
          for (a5 = 250; a5 >= 0; a5--) {
            S10(c7, c7);
            if (a5 !== 1) M9(c7, c7, i5);
          }
          for (a5 = 0; a5 < 16; a5++) o5[a5] = c7[a5];
        }
        function crypto_scalarmult(q7, n6, p7) {
          var z11 = new Uint8Array(32);
          var x13 = new Float64Array(80), r3, i5;
          var a5 = gf(), b9 = gf(), c7 = gf(), d6 = gf(), e2 = gf(), f7 = gf();
          for (i5 = 0; i5 < 31; i5++) z11[i5] = n6[i5];
          z11[31] = n6[31] & 127 | 64;
          z11[0] &= 248;
          unpack25519(x13, p7);
          for (i5 = 0; i5 < 16; i5++) {
            b9[i5] = x13[i5];
            d6[i5] = a5[i5] = c7[i5] = 0;
          }
          a5[0] = d6[0] = 1;
          for (i5 = 254; i5 >= 0; --i5) {
            r3 = z11[i5 >>> 3] >>> (i5 & 7) & 1;
            sel25519(a5, b9, r3);
            sel25519(c7, d6, r3);
            A7(e2, a5, c7);
            Z6(a5, a5, c7);
            A7(c7, b9, d6);
            Z6(b9, b9, d6);
            S10(d6, e2);
            S10(f7, a5);
            M9(a5, c7, a5);
            M9(c7, b9, e2);
            A7(e2, a5, c7);
            Z6(a5, a5, c7);
            S10(b9, a5);
            Z6(c7, d6, f7);
            M9(a5, c7, _121665);
            A7(a5, a5, d6);
            M9(c7, c7, a5);
            M9(a5, d6, f7);
            M9(d6, b9, x13);
            S10(b9, e2);
            sel25519(a5, b9, r3);
            sel25519(c7, d6, r3);
          }
          for (i5 = 0; i5 < 16; i5++) {
            x13[i5 + 16] = a5[i5];
            x13[i5 + 32] = c7[i5];
            x13[i5 + 48] = b9[i5];
            x13[i5 + 64] = d6[i5];
          }
          var x32 = x13.subarray(32);
          var x16 = x13.subarray(16);
          inv25519(x32, x32);
          M9(x16, x16, x32);
          pack25519(q7, x16);
          return 0;
        }
        function crypto_scalarmult_base(q7, n6) {
          return crypto_scalarmult(q7, n6, _9);
        }
        function crypto_box_keypair(y11, x13) {
          randombytes(x13, 32);
          return crypto_scalarmult_base(y11, x13);
        }
        function crypto_box_beforenm(k7, y11, x13) {
          var s3 = new Uint8Array(32);
          crypto_scalarmult(s3, x13, y11);
          return crypto_core_hsalsa20(k7, _0, s3, sigma);
        }
        var crypto_box_afternm = crypto_secretbox;
        var crypto_box_open_afternm = crypto_secretbox_open;
        function crypto_box(c7, m3, d6, n6, y11, x13) {
          var k7 = new Uint8Array(32);
          crypto_box_beforenm(k7, y11, x13);
          return crypto_box_afternm(c7, m3, d6, n6, k7);
        }
        function crypto_box_open(m3, c7, d6, n6, y11, x13) {
          var k7 = new Uint8Array(32);
          crypto_box_beforenm(k7, y11, x13);
          return crypto_box_open_afternm(m3, c7, d6, n6, k7);
        }
        var K7 = [
          1116352408,
          3609767458,
          1899447441,
          602891725,
          3049323471,
          3964484399,
          3921009573,
          2173295548,
          961987163,
          4081628472,
          1508970993,
          3053834265,
          2453635748,
          2937671579,
          2870763221,
          3664609560,
          3624381080,
          2734883394,
          310598401,
          1164996542,
          607225278,
          1323610764,
          1426881987,
          3590304994,
          1925078388,
          4068182383,
          2162078206,
          991336113,
          2614888103,
          633803317,
          3248222580,
          3479774868,
          3835390401,
          2666613458,
          4022224774,
          944711139,
          264347078,
          2341262773,
          604807628,
          2007800933,
          770255983,
          1495990901,
          1249150122,
          1856431235,
          1555081692,
          3175218132,
          1996064986,
          2198950837,
          2554220882,
          3999719339,
          2821834349,
          766784016,
          2952996808,
          2566594879,
          3210313671,
          3203337956,
          3336571891,
          1034457026,
          3584528711,
          2466948901,
          113926993,
          3758326383,
          338241895,
          168717936,
          666307205,
          1188179964,
          773529912,
          1546045734,
          1294757372,
          1522805485,
          1396182291,
          2643833823,
          1695183700,
          2343527390,
          1986661051,
          1014477480,
          2177026350,
          1206759142,
          2456956037,
          344077627,
          2730485921,
          1290863460,
          2820302411,
          3158454273,
          3259730800,
          3505952657,
          3345764771,
          106217008,
          3516065817,
          3606008344,
          3600352804,
          1432725776,
          4094571909,
          1467031594,
          275423344,
          851169720,
          430227734,
          3100823752,
          506948616,
          1363258195,
          659060556,
          3750685593,
          883997877,
          3785050280,
          958139571,
          3318307427,
          1322822218,
          3812723403,
          1537002063,
          2003034995,
          1747873779,
          3602036899,
          1955562222,
          1575990012,
          2024104815,
          1125592928,
          2227730452,
          2716904306,
          2361852424,
          442776044,
          2428436474,
          593698344,
          2756734187,
          3733110249,
          3204031479,
          2999351573,
          3329325298,
          3815920427,
          3391569614,
          3928383900,
          3515267271,
          566280711,
          3940187606,
          3454069534,
          4118630271,
          4000239992,
          116418474,
          1914138554,
          174292421,
          2731055270,
          289380356,
          3203993006,
          460393269,
          320620315,
          685471733,
          587496836,
          852142971,
          1086792851,
          1017036298,
          365543100,
          1126000580,
          2618297676,
          1288033470,
          3409855158,
          1501505948,
          4234509866,
          1607167915,
          987167468,
          1816402316,
          1246189591
        ];
        function crypto_hashblocks_hl(hh, hl, m3, n6) {
          var wh = new Int32Array(16), wl = new Int32Array(16), bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, th, tl, i5, j6, h8, l6, a5, b9, c7, d6;
          var ah0 = hh[0], ah1 = hh[1], ah2 = hh[2], ah3 = hh[3], ah4 = hh[4], ah5 = hh[5], ah6 = hh[6], ah7 = hh[7], al0 = hl[0], al1 = hl[1], al2 = hl[2], al3 = hl[3], al4 = hl[4], al5 = hl[5], al6 = hl[6], al7 = hl[7];
          var pos = 0;
          while (n6 >= 128) {
            for (i5 = 0; i5 < 16; i5++) {
              j6 = 8 * i5 + pos;
              wh[i5] = m3[j6 + 0] << 24 | m3[j6 + 1] << 16 | m3[j6 + 2] << 8 | m3[j6 + 3];
              wl[i5] = m3[j6 + 4] << 24 | m3[j6 + 5] << 16 | m3[j6 + 6] << 8 | m3[j6 + 7];
            }
            for (i5 = 0; i5 < 80; i5++) {
              bh0 = ah0;
              bh1 = ah1;
              bh2 = ah2;
              bh3 = ah3;
              bh4 = ah4;
              bh5 = ah5;
              bh6 = ah6;
              bh7 = ah7;
              bl0 = al0;
              bl1 = al1;
              bl2 = al2;
              bl3 = al3;
              bl4 = al4;
              bl5 = al5;
              bl6 = al6;
              bl7 = al7;
              h8 = ah7;
              l6 = al7;
              a5 = l6 & 65535;
              b9 = l6 >>> 16;
              c7 = h8 & 65535;
              d6 = h8 >>> 16;
              h8 = (ah4 >>> 14 | al4 << 32 - 14) ^ (ah4 >>> 18 | al4 << 32 - 18) ^ (al4 >>> 41 - 32 | ah4 << 32 - (41 - 32));
              l6 = (al4 >>> 14 | ah4 << 32 - 14) ^ (al4 >>> 18 | ah4 << 32 - 18) ^ (ah4 >>> 41 - 32 | al4 << 32 - (41 - 32));
              a5 += l6 & 65535;
              b9 += l6 >>> 16;
              c7 += h8 & 65535;
              d6 += h8 >>> 16;
              h8 = ah4 & ah5 ^ ~ah4 & ah6;
              l6 = al4 & al5 ^ ~al4 & al6;
              a5 += l6 & 65535;
              b9 += l6 >>> 16;
              c7 += h8 & 65535;
              d6 += h8 >>> 16;
              h8 = K7[i5 * 2];
              l6 = K7[i5 * 2 + 1];
              a5 += l6 & 65535;
              b9 += l6 >>> 16;
              c7 += h8 & 65535;
              d6 += h8 >>> 16;
              h8 = wh[i5 % 16];
              l6 = wl[i5 % 16];
              a5 += l6 & 65535;
              b9 += l6 >>> 16;
              c7 += h8 & 65535;
              d6 += h8 >>> 16;
              b9 += a5 >>> 16;
              c7 += b9 >>> 16;
              d6 += c7 >>> 16;
              th = c7 & 65535 | d6 << 16;
              tl = a5 & 65535 | b9 << 16;
              h8 = th;
              l6 = tl;
              a5 = l6 & 65535;
              b9 = l6 >>> 16;
              c7 = h8 & 65535;
              d6 = h8 >>> 16;
              h8 = (ah0 >>> 28 | al0 << 32 - 28) ^ (al0 >>> 34 - 32 | ah0 << 32 - (34 - 32)) ^ (al0 >>> 39 - 32 | ah0 << 32 - (39 - 32));
              l6 = (al0 >>> 28 | ah0 << 32 - 28) ^ (ah0 >>> 34 - 32 | al0 << 32 - (34 - 32)) ^ (ah0 >>> 39 - 32 | al0 << 32 - (39 - 32));
              a5 += l6 & 65535;
              b9 += l6 >>> 16;
              c7 += h8 & 65535;
              d6 += h8 >>> 16;
              h8 = ah0 & ah1 ^ ah0 & ah2 ^ ah1 & ah2;
              l6 = al0 & al1 ^ al0 & al2 ^ al1 & al2;
              a5 += l6 & 65535;
              b9 += l6 >>> 16;
              c7 += h8 & 65535;
              d6 += h8 >>> 16;
              b9 += a5 >>> 16;
              c7 += b9 >>> 16;
              d6 += c7 >>> 16;
              bh7 = c7 & 65535 | d6 << 16;
              bl7 = a5 & 65535 | b9 << 16;
              h8 = bh3;
              l6 = bl3;
              a5 = l6 & 65535;
              b9 = l6 >>> 16;
              c7 = h8 & 65535;
              d6 = h8 >>> 16;
              h8 = th;
              l6 = tl;
              a5 += l6 & 65535;
              b9 += l6 >>> 16;
              c7 += h8 & 65535;
              d6 += h8 >>> 16;
              b9 += a5 >>> 16;
              c7 += b9 >>> 16;
              d6 += c7 >>> 16;
              bh3 = c7 & 65535 | d6 << 16;
              bl3 = a5 & 65535 | b9 << 16;
              ah1 = bh0;
              ah2 = bh1;
              ah3 = bh2;
              ah4 = bh3;
              ah5 = bh4;
              ah6 = bh5;
              ah7 = bh6;
              ah0 = bh7;
              al1 = bl0;
              al2 = bl1;
              al3 = bl2;
              al4 = bl3;
              al5 = bl4;
              al6 = bl5;
              al7 = bl6;
              al0 = bl7;
              if (i5 % 16 === 15) {
                for (j6 = 0; j6 < 16; j6++) {
                  h8 = wh[j6];
                  l6 = wl[j6];
                  a5 = l6 & 65535;
                  b9 = l6 >>> 16;
                  c7 = h8 & 65535;
                  d6 = h8 >>> 16;
                  h8 = wh[(j6 + 9) % 16];
                  l6 = wl[(j6 + 9) % 16];
                  a5 += l6 & 65535;
                  b9 += l6 >>> 16;
                  c7 += h8 & 65535;
                  d6 += h8 >>> 16;
                  th = wh[(j6 + 1) % 16];
                  tl = wl[(j6 + 1) % 16];
                  h8 = (th >>> 1 | tl << 32 - 1) ^ (th >>> 8 | tl << 32 - 8) ^ th >>> 7;
                  l6 = (tl >>> 1 | th << 32 - 1) ^ (tl >>> 8 | th << 32 - 8) ^ (tl >>> 7 | th << 32 - 7);
                  a5 += l6 & 65535;
                  b9 += l6 >>> 16;
                  c7 += h8 & 65535;
                  d6 += h8 >>> 16;
                  th = wh[(j6 + 14) % 16];
                  tl = wl[(j6 + 14) % 16];
                  h8 = (th >>> 19 | tl << 32 - 19) ^ (tl >>> 61 - 32 | th << 32 - (61 - 32)) ^ th >>> 6;
                  l6 = (tl >>> 19 | th << 32 - 19) ^ (th >>> 61 - 32 | tl << 32 - (61 - 32)) ^ (tl >>> 6 | th << 32 - 6);
                  a5 += l6 & 65535;
                  b9 += l6 >>> 16;
                  c7 += h8 & 65535;
                  d6 += h8 >>> 16;
                  b9 += a5 >>> 16;
                  c7 += b9 >>> 16;
                  d6 += c7 >>> 16;
                  wh[j6] = c7 & 65535 | d6 << 16;
                  wl[j6] = a5 & 65535 | b9 << 16;
                }
              }
            }
            h8 = ah0;
            l6 = al0;
            a5 = l6 & 65535;
            b9 = l6 >>> 16;
            c7 = h8 & 65535;
            d6 = h8 >>> 16;
            h8 = hh[0];
            l6 = hl[0];
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            b9 += a5 >>> 16;
            c7 += b9 >>> 16;
            d6 += c7 >>> 16;
            hh[0] = ah0 = c7 & 65535 | d6 << 16;
            hl[0] = al0 = a5 & 65535 | b9 << 16;
            h8 = ah1;
            l6 = al1;
            a5 = l6 & 65535;
            b9 = l6 >>> 16;
            c7 = h8 & 65535;
            d6 = h8 >>> 16;
            h8 = hh[1];
            l6 = hl[1];
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            b9 += a5 >>> 16;
            c7 += b9 >>> 16;
            d6 += c7 >>> 16;
            hh[1] = ah1 = c7 & 65535 | d6 << 16;
            hl[1] = al1 = a5 & 65535 | b9 << 16;
            h8 = ah2;
            l6 = al2;
            a5 = l6 & 65535;
            b9 = l6 >>> 16;
            c7 = h8 & 65535;
            d6 = h8 >>> 16;
            h8 = hh[2];
            l6 = hl[2];
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            b9 += a5 >>> 16;
            c7 += b9 >>> 16;
            d6 += c7 >>> 16;
            hh[2] = ah2 = c7 & 65535 | d6 << 16;
            hl[2] = al2 = a5 & 65535 | b9 << 16;
            h8 = ah3;
            l6 = al3;
            a5 = l6 & 65535;
            b9 = l6 >>> 16;
            c7 = h8 & 65535;
            d6 = h8 >>> 16;
            h8 = hh[3];
            l6 = hl[3];
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            b9 += a5 >>> 16;
            c7 += b9 >>> 16;
            d6 += c7 >>> 16;
            hh[3] = ah3 = c7 & 65535 | d6 << 16;
            hl[3] = al3 = a5 & 65535 | b9 << 16;
            h8 = ah4;
            l6 = al4;
            a5 = l6 & 65535;
            b9 = l6 >>> 16;
            c7 = h8 & 65535;
            d6 = h8 >>> 16;
            h8 = hh[4];
            l6 = hl[4];
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            b9 += a5 >>> 16;
            c7 += b9 >>> 16;
            d6 += c7 >>> 16;
            hh[4] = ah4 = c7 & 65535 | d6 << 16;
            hl[4] = al4 = a5 & 65535 | b9 << 16;
            h8 = ah5;
            l6 = al5;
            a5 = l6 & 65535;
            b9 = l6 >>> 16;
            c7 = h8 & 65535;
            d6 = h8 >>> 16;
            h8 = hh[5];
            l6 = hl[5];
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            b9 += a5 >>> 16;
            c7 += b9 >>> 16;
            d6 += c7 >>> 16;
            hh[5] = ah5 = c7 & 65535 | d6 << 16;
            hl[5] = al5 = a5 & 65535 | b9 << 16;
            h8 = ah6;
            l6 = al6;
            a5 = l6 & 65535;
            b9 = l6 >>> 16;
            c7 = h8 & 65535;
            d6 = h8 >>> 16;
            h8 = hh[6];
            l6 = hl[6];
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            b9 += a5 >>> 16;
            c7 += b9 >>> 16;
            d6 += c7 >>> 16;
            hh[6] = ah6 = c7 & 65535 | d6 << 16;
            hl[6] = al6 = a5 & 65535 | b9 << 16;
            h8 = ah7;
            l6 = al7;
            a5 = l6 & 65535;
            b9 = l6 >>> 16;
            c7 = h8 & 65535;
            d6 = h8 >>> 16;
            h8 = hh[7];
            l6 = hl[7];
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            b9 += a5 >>> 16;
            c7 += b9 >>> 16;
            d6 += c7 >>> 16;
            hh[7] = ah7 = c7 & 65535 | d6 << 16;
            hl[7] = al7 = a5 & 65535 | b9 << 16;
            pos += 128;
            n6 -= 128;
          }
          return n6;
        }
        function crypto_hash(out, m3, n6) {
          var hh = new Int32Array(8), hl = new Int32Array(8), x13 = new Uint8Array(256), i5, b9 = n6;
          hh[0] = 1779033703;
          hh[1] = 3144134277;
          hh[2] = 1013904242;
          hh[3] = 2773480762;
          hh[4] = 1359893119;
          hh[5] = 2600822924;
          hh[6] = 528734635;
          hh[7] = 1541459225;
          hl[0] = 4089235720;
          hl[1] = 2227873595;
          hl[2] = 4271175723;
          hl[3] = 1595750129;
          hl[4] = 2917565137;
          hl[5] = 725511199;
          hl[6] = 4215389547;
          hl[7] = 327033209;
          crypto_hashblocks_hl(hh, hl, m3, n6);
          n6 %= 128;
          for (i5 = 0; i5 < n6; i5++) x13[i5] = m3[b9 - n6 + i5];
          x13[n6] = 128;
          n6 = 256 - 128 * (n6 < 112 ? 1 : 0);
          x13[n6 - 9] = 0;
          ts64(x13, n6 - 8, b9 / 536870912 | 0, b9 << 3);
          crypto_hashblocks_hl(hh, hl, x13, n6);
          for (i5 = 0; i5 < 8; i5++) ts64(out, 8 * i5, hh[i5], hl[i5]);
          return 0;
        }
        function add5(p7, q7) {
          var a5 = gf(), b9 = gf(), c7 = gf(), d6 = gf(), e2 = gf(), f7 = gf(), g8 = gf(), h8 = gf(), t = gf();
          Z6(a5, p7[1], p7[0]);
          Z6(t, q7[1], q7[0]);
          M9(a5, a5, t);
          A7(b9, p7[0], p7[1]);
          A7(t, q7[0], q7[1]);
          M9(b9, b9, t);
          M9(c7, p7[3], q7[3]);
          M9(c7, c7, D22);
          M9(d6, p7[2], q7[2]);
          A7(d6, d6, d6);
          Z6(e2, b9, a5);
          Z6(f7, d6, c7);
          A7(g8, d6, c7);
          A7(h8, b9, a5);
          M9(p7[0], e2, f7);
          M9(p7[1], h8, g8);
          M9(p7[2], g8, f7);
          M9(p7[3], e2, h8);
        }
        function cswap(p7, q7, b9) {
          var i5;
          for (i5 = 0; i5 < 4; i5++) {
            sel25519(p7[i5], q7[i5], b9);
          }
        }
        function pack(r3, p7) {
          var tx = gf(), ty = gf(), zi2 = gf();
          inv25519(zi2, p7[2]);
          M9(tx, p7[0], zi2);
          M9(ty, p7[1], zi2);
          pack25519(r3, ty);
          r3[31] ^= par25519(tx) << 7;
        }
        function scalarmult(p7, q7, s3) {
          var b9, i5;
          set25519(p7[0], gf0);
          set25519(p7[1], gf1);
          set25519(p7[2], gf1);
          set25519(p7[3], gf0);
          for (i5 = 255; i5 >= 0; --i5) {
            b9 = s3[i5 / 8 | 0] >> (i5 & 7) & 1;
            cswap(p7, q7, b9);
            add5(q7, p7);
            add5(p7, p7);
            cswap(p7, q7, b9);
          }
        }
        function scalarbase(p7, s3) {
          var q7 = [gf(), gf(), gf(), gf()];
          set25519(q7[0], X4);
          set25519(q7[1], Y6);
          set25519(q7[2], gf1);
          M9(q7[3], X4, Y6);
          scalarmult(p7, q7, s3);
        }
        function crypto_sign_keypair(pk, sk, seeded) {
          var d6 = new Uint8Array(64);
          var p7 = [gf(), gf(), gf(), gf()];
          var i5;
          if (!seeded) randombytes(sk, 32);
          crypto_hash(d6, sk, 32);
          d6[0] &= 248;
          d6[31] &= 127;
          d6[31] |= 64;
          scalarbase(p7, d6);
          pack(pk, p7);
          for (i5 = 0; i5 < 32; i5++) sk[i5 + 32] = pk[i5];
          return 0;
        }
        var L6 = new Float64Array([237, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]);
        function modL(r3, x13) {
          var carry, i5, j6, k7;
          for (i5 = 63; i5 >= 32; --i5) {
            carry = 0;
            for (j6 = i5 - 32, k7 = i5 - 12; j6 < k7; ++j6) {
              x13[j6] += carry - 16 * x13[i5] * L6[j6 - (i5 - 32)];
              carry = Math.floor((x13[j6] + 128) / 256);
              x13[j6] -= carry * 256;
            }
            x13[j6] += carry;
            x13[i5] = 0;
          }
          carry = 0;
          for (j6 = 0; j6 < 32; j6++) {
            x13[j6] += carry - (x13[31] >> 4) * L6[j6];
            carry = x13[j6] >> 8;
            x13[j6] &= 255;
          }
          for (j6 = 0; j6 < 32; j6++) x13[j6] -= carry * L6[j6];
          for (i5 = 0; i5 < 32; i5++) {
            x13[i5 + 1] += x13[i5] >> 8;
            r3[i5] = x13[i5] & 255;
          }
        }
        function reduce(r3) {
          var x13 = new Float64Array(64), i5;
          for (i5 = 0; i5 < 64; i5++) x13[i5] = r3[i5];
          for (i5 = 0; i5 < 64; i5++) r3[i5] = 0;
          modL(r3, x13);
        }
        function crypto_sign(sm, m3, n6, sk) {
          var d6 = new Uint8Array(64), h8 = new Uint8Array(64), r3 = new Uint8Array(64);
          var i5, j6, x13 = new Float64Array(64);
          var p7 = [gf(), gf(), gf(), gf()];
          crypto_hash(d6, sk, 32);
          d6[0] &= 248;
          d6[31] &= 127;
          d6[31] |= 64;
          var smlen = n6 + 64;
          for (i5 = 0; i5 < n6; i5++) sm[64 + i5] = m3[i5];
          for (i5 = 0; i5 < 32; i5++) sm[32 + i5] = d6[32 + i5];
          crypto_hash(r3, sm.subarray(32), n6 + 32);
          reduce(r3);
          scalarbase(p7, r3);
          pack(sm, p7);
          for (i5 = 32; i5 < 64; i5++) sm[i5] = sk[i5];
          crypto_hash(h8, sm, n6 + 64);
          reduce(h8);
          for (i5 = 0; i5 < 64; i5++) x13[i5] = 0;
          for (i5 = 0; i5 < 32; i5++) x13[i5] = r3[i5];
          for (i5 = 0; i5 < 32; i5++) {
            for (j6 = 0; j6 < 32; j6++) {
              x13[i5 + j6] += h8[i5] * d6[j6];
            }
          }
          modL(sm.subarray(32), x13);
          return smlen;
        }
        function unpackneg(r3, p7) {
          var t = gf(), chk = gf(), num2 = gf(), den = gf(), den2 = gf(), den4 = gf(), den6 = gf();
          set25519(r3[2], gf1);
          unpack25519(r3[1], p7);
          S10(num2, r3[1]);
          M9(den, num2, D7);
          Z6(num2, num2, r3[2]);
          A7(den, r3[2], den);
          S10(den2, den);
          S10(den4, den2);
          M9(den6, den4, den2);
          M9(t, den6, num2);
          M9(t, t, den);
          pow2523(t, t);
          M9(t, t, num2);
          M9(t, t, den);
          M9(t, t, den);
          M9(r3[0], t, den);
          S10(chk, r3[0]);
          M9(chk, chk, den);
          if (neq25519(chk, num2)) M9(r3[0], r3[0], I7);
          S10(chk, r3[0]);
          M9(chk, chk, den);
          if (neq25519(chk, num2)) return -1;
          if (par25519(r3[0]) === p7[31] >> 7) Z6(r3[0], gf0, r3[0]);
          M9(r3[3], r3[0], r3[1]);
          return 0;
        }
        function crypto_sign_open(m3, sm, n6, pk) {
          var i5;
          var t = new Uint8Array(32), h8 = new Uint8Array(64);
          var p7 = [gf(), gf(), gf(), gf()], q7 = [gf(), gf(), gf(), gf()];
          if (n6 < 64) return -1;
          if (unpackneg(q7, pk)) return -1;
          for (i5 = 0; i5 < n6; i5++) m3[i5] = sm[i5];
          for (i5 = 0; i5 < 32; i5++) m3[i5 + 32] = pk[i5];
          crypto_hash(h8, m3, n6);
          reduce(h8);
          scalarmult(p7, q7, h8);
          scalarbase(q7, sm.subarray(32));
          add5(p7, q7);
          pack(t, p7);
          n6 -= 64;
          if (crypto_verify_32(sm, 0, t, 0)) {
            for (i5 = 0; i5 < n6; i5++) m3[i5] = 0;
            return -1;
          }
          for (i5 = 0; i5 < n6; i5++) m3[i5] = sm[i5 + 64];
          return n6;
        }
        var crypto_secretbox_KEYBYTES = 32, crypto_secretbox_NONCEBYTES = 24, crypto_secretbox_ZEROBYTES = 32, crypto_secretbox_BOXZEROBYTES = 16, crypto_scalarmult_BYTES = 32, crypto_scalarmult_SCALARBYTES = 32, crypto_box_PUBLICKEYBYTES = 32, crypto_box_SECRETKEYBYTES = 32, crypto_box_BEFORENMBYTES = 32, crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, crypto_sign_BYTES = 64, crypto_sign_PUBLICKEYBYTES = 32, crypto_sign_SECRETKEYBYTES = 64, crypto_sign_SEEDBYTES = 32, crypto_hash_BYTES = 64;
        nacl3.lowlevel = {
          crypto_core_hsalsa20,
          crypto_stream_xor,
          crypto_stream,
          crypto_stream_salsa20_xor,
          crypto_stream_salsa20,
          crypto_onetimeauth,
          crypto_onetimeauth_verify,
          crypto_verify_16,
          crypto_verify_32,
          crypto_secretbox,
          crypto_secretbox_open,
          crypto_scalarmult,
          crypto_scalarmult_base,
          crypto_box_beforenm,
          crypto_box_afternm,
          crypto_box,
          crypto_box_open,
          crypto_box_keypair,
          crypto_hash,
          crypto_sign,
          crypto_sign_keypair,
          crypto_sign_open,
          crypto_secretbox_KEYBYTES,
          crypto_secretbox_NONCEBYTES,
          crypto_secretbox_ZEROBYTES,
          crypto_secretbox_BOXZEROBYTES,
          crypto_scalarmult_BYTES,
          crypto_scalarmult_SCALARBYTES,
          crypto_box_PUBLICKEYBYTES,
          crypto_box_SECRETKEYBYTES,
          crypto_box_BEFORENMBYTES,
          crypto_box_NONCEBYTES,
          crypto_box_ZEROBYTES,
          crypto_box_BOXZEROBYTES,
          crypto_sign_BYTES,
          crypto_sign_PUBLICKEYBYTES,
          crypto_sign_SECRETKEYBYTES,
          crypto_sign_SEEDBYTES,
          crypto_hash_BYTES,
          gf,
          D: D7,
          L: L6,
          pack25519,
          unpack25519,
          M: M9,
          A: A7,
          S: S10,
          Z: Z6,
          pow2523,
          add: add5,
          set25519,
          modL,
          scalarmult,
          scalarbase
        };
        function checkLengths(k7, n6) {
          if (k7.length !== crypto_secretbox_KEYBYTES) throw new Error("bad key size");
          if (n6.length !== crypto_secretbox_NONCEBYTES) throw new Error("bad nonce size");
        }
        function checkBoxLengths(pk, sk) {
          if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error("bad public key size");
          if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error("bad secret key size");
        }
        function checkArrayTypes() {
          for (var i5 = 0; i5 < arguments.length; i5++) {
            if (!(arguments[i5] instanceof Uint8Array))
              throw new TypeError("unexpected type, use Uint8Array");
          }
        }
        function cleanup(arr) {
          for (var i5 = 0; i5 < arr.length; i5++) arr[i5] = 0;
        }
        nacl3.randomBytes = function(n6) {
          var b9 = new Uint8Array(n6);
          randombytes(b9, n6);
          return b9;
        };
        nacl3.secretbox = function(msg, nonce, key2) {
          checkArrayTypes(msg, nonce, key2);
          checkLengths(key2, nonce);
          var m3 = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length);
          var c7 = new Uint8Array(m3.length);
          for (var i5 = 0; i5 < msg.length; i5++) m3[i5 + crypto_secretbox_ZEROBYTES] = msg[i5];
          crypto_secretbox(c7, m3, m3.length, nonce, key2);
          return c7.subarray(crypto_secretbox_BOXZEROBYTES);
        };
        nacl3.secretbox.open = function(box, nonce, key2) {
          checkArrayTypes(box, nonce, key2);
          checkLengths(key2, nonce);
          var c7 = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length);
          var m3 = new Uint8Array(c7.length);
          for (var i5 = 0; i5 < box.length; i5++) c7[i5 + crypto_secretbox_BOXZEROBYTES] = box[i5];
          if (c7.length < 32) return null;
          if (crypto_secretbox_open(m3, c7, c7.length, nonce, key2) !== 0) return null;
          return m3.subarray(crypto_secretbox_ZEROBYTES);
        };
        nacl3.secretbox.keyLength = crypto_secretbox_KEYBYTES;
        nacl3.secretbox.nonceLength = crypto_secretbox_NONCEBYTES;
        nacl3.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES;
        nacl3.scalarMult = function(n6, p7) {
          checkArrayTypes(n6, p7);
          if (n6.length !== crypto_scalarmult_SCALARBYTES) throw new Error("bad n size");
          if (p7.length !== crypto_scalarmult_BYTES) throw new Error("bad p size");
          var q7 = new Uint8Array(crypto_scalarmult_BYTES);
          crypto_scalarmult(q7, n6, p7);
          return q7;
        };
        nacl3.scalarMult.base = function(n6) {
          checkArrayTypes(n6);
          if (n6.length !== crypto_scalarmult_SCALARBYTES) throw new Error("bad n size");
          var q7 = new Uint8Array(crypto_scalarmult_BYTES);
          crypto_scalarmult_base(q7, n6);
          return q7;
        };
        nacl3.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES;
        nacl3.scalarMult.groupElementLength = crypto_scalarmult_BYTES;
        nacl3.box = function(msg, nonce, publicKey3, secretKey) {
          var k7 = nacl3.box.before(publicKey3, secretKey);
          return nacl3.secretbox(msg, nonce, k7);
        };
        nacl3.box.before = function(publicKey3, secretKey) {
          checkArrayTypes(publicKey3, secretKey);
          checkBoxLengths(publicKey3, secretKey);
          var k7 = new Uint8Array(crypto_box_BEFORENMBYTES);
          crypto_box_beforenm(k7, publicKey3, secretKey);
          return k7;
        };
        nacl3.box.after = nacl3.secretbox;
        nacl3.box.open = function(msg, nonce, publicKey3, secretKey) {
          var k7 = nacl3.box.before(publicKey3, secretKey);
          return nacl3.secretbox.open(msg, nonce, k7);
        };
        nacl3.box.open.after = nacl3.secretbox.open;
        nacl3.box.keyPair = function() {
          var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES);
          var sk = new Uint8Array(crypto_box_SECRETKEYBYTES);
          crypto_box_keypair(pk, sk);
          return { publicKey: pk, secretKey: sk };
        };
        nacl3.box.keyPair.fromSecretKey = function(secretKey) {
          checkArrayTypes(secretKey);
          if (secretKey.length !== crypto_box_SECRETKEYBYTES)
            throw new Error("bad secret key size");
          var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES);
          crypto_scalarmult_base(pk, secretKey);
          return { publicKey: pk, secretKey: new Uint8Array(secretKey) };
        };
        nacl3.box.publicKeyLength = crypto_box_PUBLICKEYBYTES;
        nacl3.box.secretKeyLength = crypto_box_SECRETKEYBYTES;
        nacl3.box.sharedKeyLength = crypto_box_BEFORENMBYTES;
        nacl3.box.nonceLength = crypto_box_NONCEBYTES;
        nacl3.box.overheadLength = nacl3.secretbox.overheadLength;
        nacl3.sign = function(msg, secretKey) {
          checkArrayTypes(msg, secretKey);
          if (secretKey.length !== crypto_sign_SECRETKEYBYTES)
            throw new Error("bad secret key size");
          var signedMsg = new Uint8Array(crypto_sign_BYTES + msg.length);
          crypto_sign(signedMsg, msg, msg.length, secretKey);
          return signedMsg;
        };
        nacl3.sign.open = function(signedMsg, publicKey3) {
          checkArrayTypes(signedMsg, publicKey3);
          if (publicKey3.length !== crypto_sign_PUBLICKEYBYTES)
            throw new Error("bad public key size");
          var tmp = new Uint8Array(signedMsg.length);
          var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey3);
          if (mlen < 0) return null;
          var m3 = new Uint8Array(mlen);
          for (var i5 = 0; i5 < m3.length; i5++) m3[i5] = tmp[i5];
          return m3;
        };
        nacl3.sign.detached = function(msg, secretKey) {
          var signedMsg = nacl3.sign(msg, secretKey);
          var sig = new Uint8Array(crypto_sign_BYTES);
          for (var i5 = 0; i5 < sig.length; i5++) sig[i5] = signedMsg[i5];
          return sig;
        };
        nacl3.sign.detached.verify = function(msg, sig, publicKey3) {
          checkArrayTypes(msg, sig, publicKey3);
          if (sig.length !== crypto_sign_BYTES)
            throw new Error("bad signature size");
          if (publicKey3.length !== crypto_sign_PUBLICKEYBYTES)
            throw new Error("bad public key size");
          var sm = new Uint8Array(crypto_sign_BYTES + msg.length);
          var m3 = new Uint8Array(crypto_sign_BYTES + msg.length);
          var i5;
          for (i5 = 0; i5 < crypto_sign_BYTES; i5++) sm[i5] = sig[i5];
          for (i5 = 0; i5 < msg.length; i5++) sm[i5 + crypto_sign_BYTES] = msg[i5];
          return crypto_sign_open(m3, sm, sm.length, publicKey3) >= 0;
        };
        nacl3.sign.keyPair = function() {
          var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
          var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES);
          crypto_sign_keypair(pk, sk);
          return { publicKey: pk, secretKey: sk };
        };
        nacl3.sign.keyPair.fromSecretKey = function(secretKey) {
          checkArrayTypes(secretKey);
          if (secretKey.length !== crypto_sign_SECRETKEYBYTES)
            throw new Error("bad secret key size");
          var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
          for (var i5 = 0; i5 < pk.length; i5++) pk[i5] = secretKey[32 + i5];
          return { publicKey: pk, secretKey: new Uint8Array(secretKey) };
        };
        nacl3.sign.keyPair.fromSeed = function(seed) {
          checkArrayTypes(seed);
          if (seed.length !== crypto_sign_SEEDBYTES)
            throw new Error("bad seed size");
          var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
          var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES);
          for (var i5 = 0; i5 < 32; i5++) sk[i5] = seed[i5];
          crypto_sign_keypair(pk, sk, true);
          return { publicKey: pk, secretKey: sk };
        };
        nacl3.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES;
        nacl3.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES;
        nacl3.sign.seedLength = crypto_sign_SEEDBYTES;
        nacl3.sign.signatureLength = crypto_sign_BYTES;
        nacl3.hash = function(msg) {
          checkArrayTypes(msg);
          var h8 = new Uint8Array(crypto_hash_BYTES);
          crypto_hash(h8, msg, msg.length);
          return h8;
        };
        nacl3.hash.hashLength = crypto_hash_BYTES;
        nacl3.verify = function(x13, y11) {
          checkArrayTypes(x13, y11);
          if (x13.length === 0 || y11.length === 0) return false;
          if (x13.length !== y11.length) return false;
          return vn2(x13, 0, y11, 0, x13.length) === 0 ? true : false;
        };
        nacl3.setPRNG = function(fn) {
          randombytes = fn;
        };
        (function() {
          var crypto3 = typeof self !== "undefined" ? self.crypto || self.msCrypto : null;
          if (crypto3 && crypto3.getRandomValues) {
            var QUOTA = 65536;
            nacl3.setPRNG(function(x13, n6) {
              var i5, v13 = new Uint8Array(n6);
              for (i5 = 0; i5 < n6; i5 += QUOTA) {
                crypto3.getRandomValues(v13.subarray(i5, i5 + Math.min(n6 - i5, QUOTA)));
              }
              for (i5 = 0; i5 < n6; i5++) x13[i5] = v13[i5];
              cleanup(v13);
            });
          } else if (typeof __require !== "undefined") {
            crypto3 = require_crypto2();
            if (crypto3 && crypto3.randomBytes) {
              nacl3.setPRNG(function(x13, n6) {
                var i5, v13 = crypto3.randomBytes(n6);
                for (i5 = 0; i5 < n6; i5++) x13[i5] = v13[i5];
                cleanup(v13);
              });
            }
          }
        })();
      })(typeof module !== "undefined" && module.exports ? module.exports : self.nacl = self.nacl || {});
    }
  });

  // ../../node_modules/.pnpm/bigint-buffer@1.1.5/node_modules/bigint-buffer/dist/browser.js
  var require_browser2 = __commonJS({
    "../../node_modules/.pnpm/bigint-buffer@1.1.5/node_modules/bigint-buffer/dist/browser.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var converter;
      function toBigIntLE2(buf) {
        {
          const reversed = Buffer2.from(buf);
          reversed.reverse();
          const hex3 = reversed.toString("hex");
          if (hex3.length === 0) {
            return BigInt(0);
          }
          return BigInt(`0x${hex3}`);
        }
        return converter.toBigInt(buf, false);
      }
      exports.toBigIntLE = toBigIntLE2;
      function toBigIntBE2(buf) {
        {
          const hex3 = buf.toString("hex");
          if (hex3.length === 0) {
            return BigInt(0);
          }
          return BigInt(`0x${hex3}`);
        }
        return converter.toBigInt(buf, true);
      }
      exports.toBigIntBE = toBigIntBE2;
      function toBufferLE2(num2, width) {
        {
          const hex3 = num2.toString(16);
          const buffer2 = Buffer2.from(hex3.padStart(width * 2, "0").slice(0, width * 2), "hex");
          buffer2.reverse();
          return buffer2;
        }
        return converter.fromBigInt(num2, Buffer2.allocUnsafe(width), false);
      }
      exports.toBufferLE = toBufferLE2;
      function toBufferBE2(num2, width) {
        {
          const hex3 = num2.toString(16);
          return Buffer2.from(hex3.padStart(width * 2, "0").slice(0, width * 2), "hex");
        }
        return converter.fromBigInt(num2, Buffer2.allocUnsafe(width), true);
      }
      exports.toBufferBE = toBufferBE2;
    }
  });

  // ../../node_modules/.pnpm/jssha@3.2.0/node_modules/jssha/dist/sha.js
  var require_sha = __commonJS({
    "../../node_modules/.pnpm/jssha@3.2.0/node_modules/jssha/dist/sha.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      !(function(n6, r3) {
        "object" == typeof exports && "undefined" != typeof module ? module.exports = r3() : "function" == typeof define && define.amd ? define(r3) : (n6 = "undefined" != typeof globalThis ? globalThis : n6 || self).jsSHA = r3();
      })(exports, (function() {
        "use strict";
        var n6 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
        function r3(n7, r4, t2, e3) {
          var i6, o6, u5, f8 = r4 || [0], w8 = (t2 = t2 || 0) >>> 3, s4 = -1 === e3 ? 3 : 0;
          for (i6 = 0; i6 < n7.length; i6 += 1) o6 = (u5 = i6 + w8) >>> 2, f8.length <= o6 && f8.push(0), f8[o6] |= n7[i6] << 8 * (s4 + e3 * (u5 % 4));
          return { value: f8, binLen: 8 * n7.length + t2 };
        }
        function t(t2, e3, i6) {
          switch (e3) {
            case "UTF8":
            case "UTF16BE":
            case "UTF16LE":
              break;
            default:
              throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE");
          }
          switch (t2) {
            case "HEX":
              return function(n7, r4, t3) {
                return (function(n8, r5, t4, e4) {
                  var i7, o6, u5, f8;
                  if (0 != n8.length % 2) throw new Error("String of HEX type must be in byte increments");
                  var w8 = r5 || [0], s4 = (t4 = t4 || 0) >>> 3, a6 = -1 === e4 ? 3 : 0;
                  for (i7 = 0; i7 < n8.length; i7 += 2) {
                    if (o6 = parseInt(n8.substr(i7, 2), 16), isNaN(o6)) throw new Error("String of HEX type contains invalid characters");
                    for (u5 = (f8 = (i7 >>> 1) + s4) >>> 2; w8.length <= u5; ) w8.push(0);
                    w8[u5] |= o6 << 8 * (a6 + e4 * (f8 % 4));
                  }
                  return { value: w8, binLen: 4 * n8.length + t4 };
                })(n7, r4, t3, i6);
              };
            case "TEXT":
              return function(n7, r4, t3) {
                return (function(n8, r5, t4, e4, i7) {
                  var o6, u5, f8, w8, s4, a6, h9, c8, v14 = 0, A8 = t4 || [0], E7 = (e4 = e4 || 0) >>> 3;
                  if ("UTF8" === r5) for (h9 = -1 === i7 ? 3 : 0, f8 = 0; f8 < n8.length; f8 += 1) for (u5 = [], 128 > (o6 = n8.charCodeAt(f8)) ? u5.push(o6) : 2048 > o6 ? (u5.push(192 | o6 >>> 6), u5.push(128 | 63 & o6)) : 55296 > o6 || 57344 <= o6 ? u5.push(224 | o6 >>> 12, 128 | o6 >>> 6 & 63, 128 | 63 & o6) : (f8 += 1, o6 = 65536 + ((1023 & o6) << 10 | 1023 & n8.charCodeAt(f8)), u5.push(240 | o6 >>> 18, 128 | o6 >>> 12 & 63, 128 | o6 >>> 6 & 63, 128 | 63 & o6)), w8 = 0; w8 < u5.length; w8 += 1) {
                    for (s4 = (a6 = v14 + E7) >>> 2; A8.length <= s4; ) A8.push(0);
                    A8[s4] |= u5[w8] << 8 * (h9 + i7 * (a6 % 4)), v14 += 1;
                  }
                  else for (h9 = -1 === i7 ? 2 : 0, c8 = "UTF16LE" === r5 && 1 !== i7 || "UTF16LE" !== r5 && 1 === i7, f8 = 0; f8 < n8.length; f8 += 1) {
                    for (o6 = n8.charCodeAt(f8), true === c8 && (o6 = (w8 = 255 & o6) << 8 | o6 >>> 8), s4 = (a6 = v14 + E7) >>> 2; A8.length <= s4; ) A8.push(0);
                    A8[s4] |= o6 << 8 * (h9 + i7 * (a6 % 4)), v14 += 2;
                  }
                  return { value: A8, binLen: 8 * v14 + e4 };
                })(n7, e3, r4, t3, i6);
              };
            case "B64":
              return function(r4, t3, e4) {
                return (function(r5, t4, e5, i7) {
                  var o6, u5, f8, w8, s4, a6, h9 = 0, c8 = t4 || [0], v14 = (e5 = e5 || 0) >>> 3, A8 = -1 === i7 ? 3 : 0, E7 = r5.indexOf("=");
                  if (-1 === r5.search(/^[a-zA-Z0-9=+/]+$/)) throw new Error("Invalid character in base-64 string");
                  if (r5 = r5.replace(/=/g, ""), -1 !== E7 && E7 < r5.length) throw new Error("Invalid '=' found in base-64 string");
                  for (o6 = 0; o6 < r5.length; o6 += 4) {
                    for (w8 = r5.substr(o6, 4), f8 = 0, u5 = 0; u5 < w8.length; u5 += 1) f8 |= n6.indexOf(w8.charAt(u5)) << 18 - 6 * u5;
                    for (u5 = 0; u5 < w8.length - 1; u5 += 1) {
                      for (s4 = (a6 = h9 + v14) >>> 2; c8.length <= s4; ) c8.push(0);
                      c8[s4] |= (f8 >>> 16 - 8 * u5 & 255) << 8 * (A8 + i7 * (a6 % 4)), h9 += 1;
                    }
                  }
                  return { value: c8, binLen: 8 * h9 + e5 };
                })(r4, t3, e4, i6);
              };
            case "BYTES":
              return function(n7, r4, t3) {
                return (function(n8, r5, t4, e4) {
                  var i7, o6, u5, f8, w8 = r5 || [0], s4 = (t4 = t4 || 0) >>> 3, a6 = -1 === e4 ? 3 : 0;
                  for (o6 = 0; o6 < n8.length; o6 += 1) i7 = n8.charCodeAt(o6), u5 = (f8 = o6 + s4) >>> 2, w8.length <= u5 && w8.push(0), w8[u5] |= i7 << 8 * (a6 + e4 * (f8 % 4));
                  return { value: w8, binLen: 8 * n8.length + t4 };
                })(n7, r4, t3, i6);
              };
            case "ARRAYBUFFER":
              try {
                new ArrayBuffer(0);
              } catch (n7) {
                throw new Error("ARRAYBUFFER not supported by this environment");
              }
              return function(n7, t3, e4) {
                return (function(n8, t4, e5, i7) {
                  return r3(new Uint8Array(n8), t4, e5, i7);
                })(n7, t3, e4, i6);
              };
            case "UINT8ARRAY":
              try {
                new Uint8Array(0);
              } catch (n7) {
                throw new Error("UINT8ARRAY not supported by this environment");
              }
              return function(n7, t3, e4) {
                return r3(n7, t3, e4, i6);
              };
            default:
              throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY");
          }
        }
        function e2(r4, t2, e3, i6) {
          switch (r4) {
            case "HEX":
              return function(n7) {
                return (function(n8, r5, t3, e4) {
                  var i7, o6, u5 = "", f8 = r5 / 8, w8 = -1 === t3 ? 3 : 0;
                  for (i7 = 0; i7 < f8; i7 += 1) o6 = n8[i7 >>> 2] >>> 8 * (w8 + t3 * (i7 % 4)), u5 += "0123456789abcdef".charAt(o6 >>> 4 & 15) + "0123456789abcdef".charAt(15 & o6);
                  return e4.outputUpper ? u5.toUpperCase() : u5;
                })(n7, t2, e3, i6);
              };
            case "B64":
              return function(r5) {
                return (function(r6, t3, e4, i7) {
                  var o6, u5, f8, w8, s4, a6 = "", h9 = t3 / 8, c8 = -1 === e4 ? 3 : 0;
                  for (o6 = 0; o6 < h9; o6 += 3) for (w8 = o6 + 1 < h9 ? r6[o6 + 1 >>> 2] : 0, s4 = o6 + 2 < h9 ? r6[o6 + 2 >>> 2] : 0, f8 = (r6[o6 >>> 2] >>> 8 * (c8 + e4 * (o6 % 4)) & 255) << 16 | (w8 >>> 8 * (c8 + e4 * ((o6 + 1) % 4)) & 255) << 8 | s4 >>> 8 * (c8 + e4 * ((o6 + 2) % 4)) & 255, u5 = 0; u5 < 4; u5 += 1) a6 += 8 * o6 + 6 * u5 <= t3 ? n6.charAt(f8 >>> 6 * (3 - u5) & 63) : i7.b64Pad;
                  return a6;
                })(r5, t2, e3, i6);
              };
            case "BYTES":
              return function(n7) {
                return (function(n8, r5, t3) {
                  var e4, i7, o6 = "", u5 = r5 / 8, f8 = -1 === t3 ? 3 : 0;
                  for (e4 = 0; e4 < u5; e4 += 1) i7 = n8[e4 >>> 2] >>> 8 * (f8 + t3 * (e4 % 4)) & 255, o6 += String.fromCharCode(i7);
                  return o6;
                })(n7, t2, e3);
              };
            case "ARRAYBUFFER":
              try {
                new ArrayBuffer(0);
              } catch (n7) {
                throw new Error("ARRAYBUFFER not supported by this environment");
              }
              return function(n7) {
                return (function(n8, r5, t3) {
                  var e4, i7 = r5 / 8, o6 = new ArrayBuffer(i7), u5 = new Uint8Array(o6), f8 = -1 === t3 ? 3 : 0;
                  for (e4 = 0; e4 < i7; e4 += 1) u5[e4] = n8[e4 >>> 2] >>> 8 * (f8 + t3 * (e4 % 4)) & 255;
                  return o6;
                })(n7, t2, e3);
              };
            case "UINT8ARRAY":
              try {
                new Uint8Array(0);
              } catch (n7) {
                throw new Error("UINT8ARRAY not supported by this environment");
              }
              return function(n7) {
                return (function(n8, r5, t3) {
                  var e4, i7 = r5 / 8, o6 = -1 === t3 ? 3 : 0, u5 = new Uint8Array(i7);
                  for (e4 = 0; e4 < i7; e4 += 1) u5[e4] = n8[e4 >>> 2] >>> 8 * (o6 + t3 * (e4 % 4)) & 255;
                  return u5;
                })(n7, t2, e3);
              };
            default:
              throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY");
          }
        }
        var i5 = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], o5 = [3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428], u4 = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225], f7 = "Chosen SHA variant is not supported";
        function w7(n7, r4) {
          var t2, e3, i6 = n7.binLen >>> 3, o6 = r4.binLen >>> 3, u5 = i6 << 3, f8 = 4 - i6 << 3;
          if (i6 % 4 != 0) {
            for (t2 = 0; t2 < o6; t2 += 4) e3 = i6 + t2 >>> 2, n7.value[e3] |= r4.value[t2 >>> 2] << u5, n7.value.push(0), n7.value[e3 + 1] |= r4.value[t2 >>> 2] >>> f8;
            return (n7.value.length << 2) - 4 >= o6 + i6 && n7.value.pop(), { value: n7.value, binLen: n7.binLen + r4.binLen };
          }
          return { value: n7.value.concat(r4.value), binLen: n7.binLen + r4.binLen };
        }
        function s3(n7) {
          var r4 = { outputUpper: false, b64Pad: "=", outputLen: -1 }, t2 = n7 || {}, e3 = "Output length must be a multiple of 8";
          if (r4.outputUpper = t2.outputUpper || false, t2.b64Pad && (r4.b64Pad = t2.b64Pad), t2.outputLen) {
            if (t2.outputLen % 8 != 0) throw new Error(e3);
            r4.outputLen = t2.outputLen;
          } else if (t2.shakeLen) {
            if (t2.shakeLen % 8 != 0) throw new Error(e3);
            r4.outputLen = t2.shakeLen;
          }
          if ("boolean" != typeof r4.outputUpper) throw new Error("Invalid outputUpper formatting option");
          if ("string" != typeof r4.b64Pad) throw new Error("Invalid b64Pad formatting option");
          return r4;
        }
        function a5(n7, r4, e3, i6) {
          var o6 = n7 + " must include a value and format";
          if (!r4) {
            if (!i6) throw new Error(o6);
            return i6;
          }
          if (void 0 === r4.value || !r4.format) throw new Error(o6);
          return t(r4.format, r4.encoding || "UTF8", e3)(r4.value);
        }
        var h8 = (function() {
          function n7(n8, r4, t2) {
            var e3 = t2 || {};
            if (this.t = r4, this.i = e3.encoding || "UTF8", this.numRounds = e3.numRounds || 1, isNaN(this.numRounds) || this.numRounds !== parseInt(this.numRounds, 10) || 1 > this.numRounds) throw new Error("numRounds must a integer >= 1");
            this.o = n8, this.u = [], this.s = 0, this.h = false, this.v = 0, this.A = false, this.l = [], this.H = [];
          }
          return n7.prototype.update = function(n8) {
            var r4, t2 = 0, e3 = this.S >>> 5, i6 = this.p(n8, this.u, this.s), o6 = i6.binLen, u5 = i6.value, f8 = o6 >>> 5;
            for (r4 = 0; r4 < f8; r4 += e3) t2 + this.S <= o6 && (this.m = this.R(u5.slice(r4, r4 + e3), this.m), t2 += this.S);
            this.v += t2, this.u = u5.slice(t2 >>> 5), this.s = o6 % this.S, this.h = true;
          }, n7.prototype.getHash = function(n8, r4) {
            var t2, i6, o6 = this.U, u5 = s3(r4);
            if (this.T) {
              if (-1 === u5.outputLen) throw new Error("Output length must be specified in options");
              o6 = u5.outputLen;
            }
            var f8 = e2(n8, o6, this.C, u5);
            if (this.A && this.F) return f8(this.F(u5));
            for (i6 = this.K(this.u.slice(), this.s, this.v, this.B(this.m), o6), t2 = 1; t2 < this.numRounds; t2 += 1) this.T && o6 % 32 != 0 && (i6[i6.length - 1] &= 16777215 >>> 24 - o6 % 32), i6 = this.K(i6, o6, 0, this.L(this.o), o6);
            return f8(i6);
          }, n7.prototype.setHMACKey = function(n8, r4, e3) {
            if (!this.g) throw new Error("Variant does not support HMAC");
            if (this.h) throw new Error("Cannot set MAC key after calling update");
            var i6 = t(r4, (e3 || {}).encoding || "UTF8", this.C);
            this.k(i6(n8));
          }, n7.prototype.k = function(n8) {
            var r4, t2 = this.S >>> 3, e3 = t2 / 4 - 1;
            if (1 !== this.numRounds) throw new Error("Cannot set numRounds with MAC");
            if (this.A) throw new Error("MAC key already set");
            for (t2 < n8.binLen / 8 && (n8.value = this.K(n8.value, n8.binLen, 0, this.L(this.o), this.U)); n8.value.length <= e3; ) n8.value.push(0);
            for (r4 = 0; r4 <= e3; r4 += 1) this.l[r4] = 909522486 ^ n8.value[r4], this.H[r4] = 1549556828 ^ n8.value[r4];
            this.m = this.R(this.l, this.m), this.v = this.S, this.A = true;
          }, n7.prototype.getHMAC = function(n8, r4) {
            var t2 = s3(r4);
            return e2(n8, this.U, this.C, t2)(this.Y());
          }, n7.prototype.Y = function() {
            var n8;
            if (!this.A) throw new Error("Cannot call getHMAC without first setting MAC key");
            var r4 = this.K(this.u.slice(), this.s, this.v, this.B(this.m), this.U);
            return n8 = this.R(this.H, this.L(this.o)), n8 = this.K(r4, this.U, this.S, n8, this.U);
          }, n7;
        })(), c7 = function(n7, r4) {
          return (c7 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n8, r5) {
            n8.__proto__ = r5;
          } || function(n8, r5) {
            for (var t2 in r5) Object.prototype.hasOwnProperty.call(r5, t2) && (n8[t2] = r5[t2]);
          })(n7, r4);
        };
        function v13(n7, r4) {
          function t2() {
            this.constructor = n7;
          }
          c7(n7, r4), n7.prototype = null === r4 ? Object.create(r4) : (t2.prototype = r4.prototype, new t2());
        }
        function A7(n7, r4) {
          return n7 << r4 | n7 >>> 32 - r4;
        }
        function E6(n7, r4) {
          return n7 >>> r4 | n7 << 32 - r4;
        }
        function l6(n7, r4) {
          return n7 >>> r4;
        }
        function b9(n7, r4, t2) {
          return n7 ^ r4 ^ t2;
        }
        function H6(n7, r4, t2) {
          return n7 & r4 ^ ~n7 & t2;
        }
        function d6(n7, r4, t2) {
          return n7 & r4 ^ n7 & t2 ^ r4 & t2;
        }
        function S10(n7) {
          return E6(n7, 2) ^ E6(n7, 13) ^ E6(n7, 22);
        }
        function p7(n7, r4) {
          var t2 = (65535 & n7) + (65535 & r4);
          return (65535 & (n7 >>> 16) + (r4 >>> 16) + (t2 >>> 16)) << 16 | 65535 & t2;
        }
        function m3(n7, r4, t2, e3) {
          var i6 = (65535 & n7) + (65535 & r4) + (65535 & t2) + (65535 & e3);
          return (65535 & (n7 >>> 16) + (r4 >>> 16) + (t2 >>> 16) + (e3 >>> 16) + (i6 >>> 16)) << 16 | 65535 & i6;
        }
        function y11(n7, r4, t2, e3, i6) {
          var o6 = (65535 & n7) + (65535 & r4) + (65535 & t2) + (65535 & e3) + (65535 & i6);
          return (65535 & (n7 >>> 16) + (r4 >>> 16) + (t2 >>> 16) + (e3 >>> 16) + (i6 >>> 16) + (o6 >>> 16)) << 16 | 65535 & o6;
        }
        function R6(n7) {
          return E6(n7, 7) ^ E6(n7, 18) ^ l6(n7, 3);
        }
        function U8(n7) {
          return E6(n7, 6) ^ E6(n7, 11) ^ E6(n7, 25);
        }
        function T6(n7) {
          return [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
        }
        function C9(n7, r4) {
          var t2, e3, i6, o6, u5, f8, w8, s4 = [];
          for (t2 = r4[0], e3 = r4[1], i6 = r4[2], o6 = r4[3], u5 = r4[4], w8 = 0; w8 < 80; w8 += 1) s4[w8] = w8 < 16 ? n7[w8] : A7(s4[w8 - 3] ^ s4[w8 - 8] ^ s4[w8 - 14] ^ s4[w8 - 16], 1), f8 = w8 < 20 ? y11(A7(t2, 5), H6(e3, i6, o6), u5, 1518500249, s4[w8]) : w8 < 40 ? y11(A7(t2, 5), b9(e3, i6, o6), u5, 1859775393, s4[w8]) : w8 < 60 ? y11(A7(t2, 5), d6(e3, i6, o6), u5, 2400959708, s4[w8]) : y11(A7(t2, 5), b9(e3, i6, o6), u5, 3395469782, s4[w8]), u5 = o6, o6 = i6, i6 = A7(e3, 30), e3 = t2, t2 = f8;
          return r4[0] = p7(t2, r4[0]), r4[1] = p7(e3, r4[1]), r4[2] = p7(i6, r4[2]), r4[3] = p7(o6, r4[3]), r4[4] = p7(u5, r4[4]), r4;
        }
        function F6(n7, r4, t2, e3) {
          for (var i6, o6 = 15 + (r4 + 65 >>> 9 << 4), u5 = r4 + t2; n7.length <= o6; ) n7.push(0);
          for (n7[r4 >>> 5] |= 128 << 24 - r4 % 32, n7[o6] = 4294967295 & u5, n7[o6 - 1] = u5 / 4294967296 | 0, i6 = 0; i6 < n7.length; i6 += 16) e3 = C9(n7.slice(i6, i6 + 16), e3);
          return e3;
        }
        var K7 = (function(n7) {
          function r4(r5, e3, i6) {
            var o6 = this;
            if ("SHA-1" !== r5) throw new Error(f7);
            var u5 = i6 || {};
            return (o6 = n7.call(this, r5, e3, i6) || this).g = true, o6.F = o6.Y, o6.C = -1, o6.p = t(o6.t, o6.i, o6.C), o6.R = C9, o6.B = function(n8) {
              return n8.slice();
            }, o6.L = T6, o6.K = F6, o6.m = [1732584193, 4023233417, 2562383102, 271733878, 3285377520], o6.S = 512, o6.U = 160, o6.T = false, u5.hmacKey && o6.k(a5("hmacKey", u5.hmacKey, o6.C)), o6;
          }
          return v13(r4, n7), r4;
        })(h8);
        function B7(n7) {
          return "SHA-224" == n7 ? o5.slice() : u4.slice();
        }
        function L6(n7, r4) {
          var t2, e3, o6, u5, f8, w8, s4, a6, h9, c8, v14, A8, b10 = [];
          for (t2 = r4[0], e3 = r4[1], o6 = r4[2], u5 = r4[3], f8 = r4[4], w8 = r4[5], s4 = r4[6], a6 = r4[7], v14 = 0; v14 < 64; v14 += 1) b10[v14] = v14 < 16 ? n7[v14] : m3(E6(A8 = b10[v14 - 2], 17) ^ E6(A8, 19) ^ l6(A8, 10), b10[v14 - 7], R6(b10[v14 - 15]), b10[v14 - 16]), h9 = y11(a6, U8(f8), H6(f8, w8, s4), i5[v14], b10[v14]), c8 = p7(S10(t2), d6(t2, e3, o6)), a6 = s4, s4 = w8, w8 = f8, f8 = p7(u5, h9), u5 = o6, o6 = e3, e3 = t2, t2 = p7(h9, c8);
          return r4[0] = p7(t2, r4[0]), r4[1] = p7(e3, r4[1]), r4[2] = p7(o6, r4[2]), r4[3] = p7(u5, r4[3]), r4[4] = p7(f8, r4[4]), r4[5] = p7(w8, r4[5]), r4[6] = p7(s4, r4[6]), r4[7] = p7(a6, r4[7]), r4;
        }
        var g8 = (function(n7) {
          function r4(r5, e3, i6) {
            var o6 = this;
            if ("SHA-224" !== r5 && "SHA-256" !== r5) throw new Error(f7);
            var u5 = i6 || {};
            return (o6 = n7.call(this, r5, e3, i6) || this).F = o6.Y, o6.g = true, o6.C = -1, o6.p = t(o6.t, o6.i, o6.C), o6.R = L6, o6.B = function(n8) {
              return n8.slice();
            }, o6.L = B7, o6.K = function(n8, t2, e4, i7) {
              return (function(n9, r6, t3, e5, i8) {
                for (var o7, u6 = 15 + (r6 + 65 >>> 9 << 4), f8 = r6 + t3; n9.length <= u6; ) n9.push(0);
                for (n9[r6 >>> 5] |= 128 << 24 - r6 % 32, n9[u6] = 4294967295 & f8, n9[u6 - 1] = f8 / 4294967296 | 0, o7 = 0; o7 < n9.length; o7 += 16) e5 = L6(n9.slice(o7, o7 + 16), e5);
                return "SHA-224" === i8 ? [e5[0], e5[1], e5[2], e5[3], e5[4], e5[5], e5[6]] : e5;
              })(n8, t2, e4, i7, r5);
            }, o6.m = B7(r5), o6.S = 512, o6.U = "SHA-224" === r5 ? 224 : 256, o6.T = false, u5.hmacKey && o6.k(a5("hmacKey", u5.hmacKey, o6.C)), o6;
          }
          return v13(r4, n7), r4;
        })(h8), k7 = function(n7, r4) {
          this.N = n7, this.I = r4;
        };
        function Y6(n7, r4) {
          var t2;
          return r4 > 32 ? (t2 = 64 - r4, new k7(n7.I << r4 | n7.N >>> t2, n7.N << r4 | n7.I >>> t2)) : 0 !== r4 ? (t2 = 32 - r4, new k7(n7.N << r4 | n7.I >>> t2, n7.I << r4 | n7.N >>> t2)) : n7;
        }
        function N13(n7, r4) {
          var t2;
          return r4 < 32 ? (t2 = 32 - r4, new k7(n7.N >>> r4 | n7.I << t2, n7.I >>> r4 | n7.N << t2)) : (t2 = 64 - r4, new k7(n7.I >>> r4 | n7.N << t2, n7.N >>> r4 | n7.I << t2));
        }
        function I7(n7, r4) {
          return new k7(n7.N >>> r4, n7.I >>> r4 | n7.N << 32 - r4);
        }
        function M9(n7, r4, t2) {
          return new k7(n7.N & r4.N ^ ~n7.N & t2.N, n7.I & r4.I ^ ~n7.I & t2.I);
        }
        function X4(n7, r4, t2) {
          return new k7(n7.N & r4.N ^ n7.N & t2.N ^ r4.N & t2.N, n7.I & r4.I ^ n7.I & t2.I ^ r4.I & t2.I);
        }
        function z11(n7) {
          var r4 = N13(n7, 28), t2 = N13(n7, 34), e3 = N13(n7, 39);
          return new k7(r4.N ^ t2.N ^ e3.N, r4.I ^ t2.I ^ e3.I);
        }
        function O9(n7, r4) {
          var t2, e3;
          t2 = (65535 & n7.I) + (65535 & r4.I);
          var i6 = (65535 & (e3 = (n7.I >>> 16) + (r4.I >>> 16) + (t2 >>> 16))) << 16 | 65535 & t2;
          return t2 = (65535 & n7.N) + (65535 & r4.N) + (e3 >>> 16), e3 = (n7.N >>> 16) + (r4.N >>> 16) + (t2 >>> 16), new k7((65535 & e3) << 16 | 65535 & t2, i6);
        }
        function j6(n7, r4, t2, e3) {
          var i6, o6;
          i6 = (65535 & n7.I) + (65535 & r4.I) + (65535 & t2.I) + (65535 & e3.I);
          var u5 = (65535 & (o6 = (n7.I >>> 16) + (r4.I >>> 16) + (t2.I >>> 16) + (e3.I >>> 16) + (i6 >>> 16))) << 16 | 65535 & i6;
          return i6 = (65535 & n7.N) + (65535 & r4.N) + (65535 & t2.N) + (65535 & e3.N) + (o6 >>> 16), o6 = (n7.N >>> 16) + (r4.N >>> 16) + (t2.N >>> 16) + (e3.N >>> 16) + (i6 >>> 16), new k7((65535 & o6) << 16 | 65535 & i6, u5);
        }
        function _6(n7, r4, t2, e3, i6) {
          var o6, u5;
          o6 = (65535 & n7.I) + (65535 & r4.I) + (65535 & t2.I) + (65535 & e3.I) + (65535 & i6.I);
          var f8 = (65535 & (u5 = (n7.I >>> 16) + (r4.I >>> 16) + (t2.I >>> 16) + (e3.I >>> 16) + (i6.I >>> 16) + (o6 >>> 16))) << 16 | 65535 & o6;
          return o6 = (65535 & n7.N) + (65535 & r4.N) + (65535 & t2.N) + (65535 & e3.N) + (65535 & i6.N) + (u5 >>> 16), u5 = (n7.N >>> 16) + (r4.N >>> 16) + (t2.N >>> 16) + (e3.N >>> 16) + (i6.N >>> 16) + (o6 >>> 16), new k7((65535 & u5) << 16 | 65535 & o6, f8);
        }
        function P8(n7, r4) {
          return new k7(n7.N ^ r4.N, n7.I ^ r4.I);
        }
        function x13(n7) {
          var r4 = N13(n7, 1), t2 = N13(n7, 8), e3 = I7(n7, 7);
          return new k7(r4.N ^ t2.N ^ e3.N, r4.I ^ t2.I ^ e3.I);
        }
        function V7(n7) {
          var r4 = N13(n7, 14), t2 = N13(n7, 18), e3 = N13(n7, 41);
          return new k7(r4.N ^ t2.N ^ e3.N, r4.I ^ t2.I ^ e3.I);
        }
        var Z6 = [new k7(i5[0], 3609767458), new k7(i5[1], 602891725), new k7(i5[2], 3964484399), new k7(i5[3], 2173295548), new k7(i5[4], 4081628472), new k7(i5[5], 3053834265), new k7(i5[6], 2937671579), new k7(i5[7], 3664609560), new k7(i5[8], 2734883394), new k7(i5[9], 1164996542), new k7(i5[10], 1323610764), new k7(i5[11], 3590304994), new k7(i5[12], 4068182383), new k7(i5[13], 991336113), new k7(i5[14], 633803317), new k7(i5[15], 3479774868), new k7(i5[16], 2666613458), new k7(i5[17], 944711139), new k7(i5[18], 2341262773), new k7(i5[19], 2007800933), new k7(i5[20], 1495990901), new k7(i5[21], 1856431235), new k7(i5[22], 3175218132), new k7(i5[23], 2198950837), new k7(i5[24], 3999719339), new k7(i5[25], 766784016), new k7(i5[26], 2566594879), new k7(i5[27], 3203337956), new k7(i5[28], 1034457026), new k7(i5[29], 2466948901), new k7(i5[30], 3758326383), new k7(i5[31], 168717936), new k7(i5[32], 1188179964), new k7(i5[33], 1546045734), new k7(i5[34], 1522805485), new k7(i5[35], 2643833823), new k7(i5[36], 2343527390), new k7(i5[37], 1014477480), new k7(i5[38], 1206759142), new k7(i5[39], 344077627), new k7(i5[40], 1290863460), new k7(i5[41], 3158454273), new k7(i5[42], 3505952657), new k7(i5[43], 106217008), new k7(i5[44], 3606008344), new k7(i5[45], 1432725776), new k7(i5[46], 1467031594), new k7(i5[47], 851169720), new k7(i5[48], 3100823752), new k7(i5[49], 1363258195), new k7(i5[50], 3750685593), new k7(i5[51], 3785050280), new k7(i5[52], 3318307427), new k7(i5[53], 3812723403), new k7(i5[54], 2003034995), new k7(i5[55], 3602036899), new k7(i5[56], 1575990012), new k7(i5[57], 1125592928), new k7(i5[58], 2716904306), new k7(i5[59], 442776044), new k7(i5[60], 593698344), new k7(i5[61], 3733110249), new k7(i5[62], 2999351573), new k7(i5[63], 3815920427), new k7(3391569614, 3928383900), new k7(3515267271, 566280711), new k7(3940187606, 3454069534), new k7(4118630271, 4000239992), new k7(116418474, 1914138554), new k7(174292421, 2731055270), new k7(289380356, 3203993006), new k7(460393269, 320620315), new k7(685471733, 587496836), new k7(852142971, 1086792851), new k7(1017036298, 365543100), new k7(1126000580, 2618297676), new k7(1288033470, 3409855158), new k7(1501505948, 4234509866), new k7(1607167915, 987167468), new k7(1816402316, 1246189591)];
        function q7(n7) {
          return "SHA-384" === n7 ? [new k7(3418070365, o5[0]), new k7(1654270250, o5[1]), new k7(2438529370, o5[2]), new k7(355462360, o5[3]), new k7(1731405415, o5[4]), new k7(41048885895, o5[5]), new k7(3675008525, o5[6]), new k7(1203062813, o5[7])] : [new k7(u4[0], 4089235720), new k7(u4[1], 2227873595), new k7(u4[2], 4271175723), new k7(u4[3], 1595750129), new k7(u4[4], 2917565137), new k7(u4[5], 725511199), new k7(u4[6], 4215389547), new k7(u4[7], 327033209)];
        }
        function D7(n7, r4) {
          var t2, e3, i6, o6, u5, f8, w8, s4, a6, h9, c8, v14, A8, E7, l7, b10, H7 = [];
          for (t2 = r4[0], e3 = r4[1], i6 = r4[2], o6 = r4[3], u5 = r4[4], f8 = r4[5], w8 = r4[6], s4 = r4[7], c8 = 0; c8 < 80; c8 += 1) c8 < 16 ? (v14 = 2 * c8, H7[c8] = new k7(n7[v14], n7[v14 + 1])) : H7[c8] = j6((A8 = H7[c8 - 2], E7 = void 0, l7 = void 0, b10 = void 0, E7 = N13(A8, 19), l7 = N13(A8, 61), b10 = I7(A8, 6), new k7(E7.N ^ l7.N ^ b10.N, E7.I ^ l7.I ^ b10.I)), H7[c8 - 7], x13(H7[c8 - 15]), H7[c8 - 16]), a6 = _6(s4, V7(u5), M9(u5, f8, w8), Z6[c8], H7[c8]), h9 = O9(z11(t2), X4(t2, e3, i6)), s4 = w8, w8 = f8, f8 = u5, u5 = O9(o6, a6), o6 = i6, i6 = e3, e3 = t2, t2 = O9(a6, h9);
          return r4[0] = O9(t2, r4[0]), r4[1] = O9(e3, r4[1]), r4[2] = O9(i6, r4[2]), r4[3] = O9(o6, r4[3]), r4[4] = O9(u5, r4[4]), r4[5] = O9(f8, r4[5]), r4[6] = O9(w8, r4[6]), r4[7] = O9(s4, r4[7]), r4;
        }
        var G6 = (function(n7) {
          function r4(r5, e3, i6) {
            var o6 = this;
            if ("SHA-384" !== r5 && "SHA-512" !== r5) throw new Error(f7);
            var u5 = i6 || {};
            return (o6 = n7.call(this, r5, e3, i6) || this).F = o6.Y, o6.g = true, o6.C = -1, o6.p = t(o6.t, o6.i, o6.C), o6.R = D7, o6.B = function(n8) {
              return n8.slice();
            }, o6.L = q7, o6.K = function(n8, t2, e4, i7) {
              return (function(n9, r6, t3, e5, i8) {
                for (var o7, u6 = 31 + (r6 + 129 >>> 10 << 5), f8 = r6 + t3; n9.length <= u6; ) n9.push(0);
                for (n9[r6 >>> 5] |= 128 << 24 - r6 % 32, n9[u6] = 4294967295 & f8, n9[u6 - 1] = f8 / 4294967296 | 0, o7 = 0; o7 < n9.length; o7 += 32) e5 = D7(n9.slice(o7, o7 + 32), e5);
                return "SHA-384" === i8 ? [(e5 = e5)[0].N, e5[0].I, e5[1].N, e5[1].I, e5[2].N, e5[2].I, e5[3].N, e5[3].I, e5[4].N, e5[4].I, e5[5].N, e5[5].I] : [e5[0].N, e5[0].I, e5[1].N, e5[1].I, e5[2].N, e5[2].I, e5[3].N, e5[3].I, e5[4].N, e5[4].I, e5[5].N, e5[5].I, e5[6].N, e5[6].I, e5[7].N, e5[7].I];
              })(n8, t2, e4, i7, r5);
            }, o6.m = q7(r5), o6.S = 1024, o6.U = "SHA-384" === r5 ? 384 : 512, o6.T = false, u5.hmacKey && o6.k(a5("hmacKey", u5.hmacKey, o6.C)), o6;
          }
          return v13(r4, n7), r4;
        })(h8), J6 = [new k7(0, 1), new k7(0, 32898), new k7(2147483648, 32906), new k7(2147483648, 2147516416), new k7(0, 32907), new k7(0, 2147483649), new k7(2147483648, 2147516545), new k7(2147483648, 32777), new k7(0, 138), new k7(0, 136), new k7(0, 2147516425), new k7(0, 2147483658), new k7(0, 2147516555), new k7(2147483648, 139), new k7(2147483648, 32905), new k7(2147483648, 32771), new k7(2147483648, 32770), new k7(2147483648, 128), new k7(0, 32778), new k7(2147483648, 2147483658), new k7(2147483648, 2147516545), new k7(2147483648, 32896), new k7(0, 2147483649), new k7(2147483648, 2147516424)], Q7 = [[0, 36, 3, 41, 18], [1, 44, 10, 45, 2], [62, 6, 43, 15, 61], [28, 55, 25, 21, 56], [27, 20, 39, 8, 14]];
        function W8(n7) {
          var r4, t2 = [];
          for (r4 = 0; r4 < 5; r4 += 1) t2[r4] = [new k7(0, 0), new k7(0, 0), new k7(0, 0), new k7(0, 0), new k7(0, 0)];
          return t2;
        }
        function $8(n7) {
          var r4, t2 = [];
          for (r4 = 0; r4 < 5; r4 += 1) t2[r4] = n7[r4].slice();
          return t2;
        }
        function nn5(n7, r4) {
          var t2, e3, i6, o6, u5, f8, w8, s4, a6, h9 = [], c8 = [];
          if (null !== n7) for (e3 = 0; e3 < n7.length; e3 += 2) r4[(e3 >>> 1) % 5][(e3 >>> 1) / 5 | 0] = P8(r4[(e3 >>> 1) % 5][(e3 >>> 1) / 5 | 0], new k7(n7[e3 + 1], n7[e3]));
          for (t2 = 0; t2 < 24; t2 += 1) {
            for (o6 = W8(), e3 = 0; e3 < 5; e3 += 1) h9[e3] = (u5 = r4[e3][0], f8 = r4[e3][1], w8 = r4[e3][2], s4 = r4[e3][3], a6 = r4[e3][4], new k7(u5.N ^ f8.N ^ w8.N ^ s4.N ^ a6.N, u5.I ^ f8.I ^ w8.I ^ s4.I ^ a6.I));
            for (e3 = 0; e3 < 5; e3 += 1) c8[e3] = P8(h9[(e3 + 4) % 5], Y6(h9[(e3 + 1) % 5], 1));
            for (e3 = 0; e3 < 5; e3 += 1) for (i6 = 0; i6 < 5; i6 += 1) r4[e3][i6] = P8(r4[e3][i6], c8[e3]);
            for (e3 = 0; e3 < 5; e3 += 1) for (i6 = 0; i6 < 5; i6 += 1) o6[i6][(2 * e3 + 3 * i6) % 5] = Y6(r4[e3][i6], Q7[e3][i6]);
            for (e3 = 0; e3 < 5; e3 += 1) for (i6 = 0; i6 < 5; i6 += 1) r4[e3][i6] = P8(o6[e3][i6], new k7(~o6[(e3 + 1) % 5][i6].N & o6[(e3 + 2) % 5][i6].N, ~o6[(e3 + 1) % 5][i6].I & o6[(e3 + 2) % 5][i6].I));
            r4[0][0] = P8(r4[0][0], J6[t2]);
          }
          return r4;
        }
        function rn4(n7) {
          var r4, t2, e3 = 0, i6 = [0, 0], o6 = [4294967295 & n7, n7 / 4294967296 & 2097151];
          for (r4 = 6; r4 >= 0; r4--) 0 === (t2 = o6[r4 >> 2] >>> 8 * r4 & 255) && 0 === e3 || (i6[e3 + 1 >> 2] |= t2 << 8 * (e3 + 1), e3 += 1);
          return e3 = 0 !== e3 ? e3 : 1, i6[0] |= e3, { value: e3 + 1 > 4 ? i6 : [i6[0]], binLen: 8 + 8 * e3 };
        }
        function tn4(n7) {
          return w7(rn4(n7.binLen), n7);
        }
        function en4(n7, r4) {
          var t2, e3 = rn4(r4), i6 = r4 >>> 2, o6 = (i6 - (e3 = w7(e3, n7)).value.length % i6) % i6;
          for (t2 = 0; t2 < o6; t2++) e3.value.push(0);
          return e3.value;
        }
        var on4 = (function(n7) {
          function r4(r5, e3, i6) {
            var o6 = this, u5 = 6, w8 = 0, s4 = i6 || {};
            if (1 !== (o6 = n7.call(this, r5, e3, i6) || this).numRounds) {
              if (s4.kmacKey || s4.hmacKey) throw new Error("Cannot set numRounds with MAC");
              if ("CSHAKE128" === o6.o || "CSHAKE256" === o6.o) throw new Error("Cannot set numRounds for CSHAKE variants");
            }
            switch (o6.C = 1, o6.p = t(o6.t, o6.i, o6.C), o6.R = nn5, o6.B = $8, o6.L = W8, o6.m = W8(), o6.T = false, r5) {
              case "SHA3-224":
                o6.S = w8 = 1152, o6.U = 224, o6.g = true, o6.F = o6.Y;
                break;
              case "SHA3-256":
                o6.S = w8 = 1088, o6.U = 256, o6.g = true, o6.F = o6.Y;
                break;
              case "SHA3-384":
                o6.S = w8 = 832, o6.U = 384, o6.g = true, o6.F = o6.Y;
                break;
              case "SHA3-512":
                o6.S = w8 = 576, o6.U = 512, o6.g = true, o6.F = o6.Y;
                break;
              case "SHAKE128":
                u5 = 31, o6.S = w8 = 1344, o6.U = -1, o6.T = true, o6.g = false, o6.F = null;
                break;
              case "SHAKE256":
                u5 = 31, o6.S = w8 = 1088, o6.U = -1, o6.T = true, o6.g = false, o6.F = null;
                break;
              case "KMAC128":
                u5 = 4, o6.S = w8 = 1344, o6.M(i6), o6.U = -1, o6.T = true, o6.g = false, o6.F = o6.X;
                break;
              case "KMAC256":
                u5 = 4, o6.S = w8 = 1088, o6.M(i6), o6.U = -1, o6.T = true, o6.g = false, o6.F = o6.X;
                break;
              case "CSHAKE128":
                o6.S = w8 = 1344, u5 = o6.O(i6), o6.U = -1, o6.T = true, o6.g = false, o6.F = null;
                break;
              case "CSHAKE256":
                o6.S = w8 = 1088, u5 = o6.O(i6), o6.U = -1, o6.T = true, o6.g = false, o6.F = null;
                break;
              default:
                throw new Error(f7);
            }
            return o6.K = function(n8, r6, t2, e4, i7) {
              return (function(n9, r7, t3, e5, i8, o7, u6) {
                var f8, w9, s5 = 0, a6 = [], h9 = i8 >>> 5, c8 = r7 >>> 5;
                for (f8 = 0; f8 < c8 && r7 >= i8; f8 += h9) e5 = nn5(n9.slice(f8, f8 + h9), e5), r7 -= i8;
                for (n9 = n9.slice(f8), r7 %= i8; n9.length < h9; ) n9.push(0);
                for (n9[(f8 = r7 >>> 3) >> 2] ^= o7 << f8 % 4 * 8, n9[h9 - 1] ^= 2147483648, e5 = nn5(n9, e5); 32 * a6.length < u6 && (w9 = e5[s5 % 5][s5 / 5 | 0], a6.push(w9.I), !(32 * a6.length >= u6)); ) a6.push(w9.N), 0 == 64 * (s5 += 1) % i8 && (nn5(null, e5), s5 = 0);
                return a6;
              })(n8, r6, 0, e4, w8, u5, i7);
            }, s4.hmacKey && o6.k(a5("hmacKey", s4.hmacKey, o6.C)), o6;
          }
          return v13(r4, n7), r4.prototype.O = function(n8, r5) {
            var t2 = (function(n9) {
              var r6 = n9 || {};
              return { funcName: a5("funcName", r6.funcName, 1, { value: [], binLen: 0 }), customization: a5("Customization", r6.customization, 1, { value: [], binLen: 0 }) };
            })(n8 || {});
            r5 && (t2.funcName = r5);
            var e3 = w7(tn4(t2.funcName), tn4(t2.customization));
            if (0 !== t2.customization.binLen || 0 !== t2.funcName.binLen) {
              for (var i6 = en4(e3, this.S >>> 3), o6 = 0; o6 < i6.length; o6 += this.S >>> 5) this.m = this.R(i6.slice(o6, o6 + (this.S >>> 5)), this.m), this.v += this.S;
              return 4;
            }
            return 31;
          }, r4.prototype.M = function(n8) {
            var r5 = (function(n9) {
              var r6 = n9 || {};
              return { kmacKey: a5("kmacKey", r6.kmacKey, 1), funcName: { value: [1128353099], binLen: 32 }, customization: a5("Customization", r6.customization, 1, { value: [], binLen: 0 }) };
            })(n8 || {});
            this.O(n8, r5.funcName);
            for (var t2 = en4(tn4(r5.kmacKey), this.S >>> 3), e3 = 0; e3 < t2.length; e3 += this.S >>> 5) this.m = this.R(t2.slice(e3, e3 + (this.S >>> 5)), this.m), this.v += this.S;
            this.A = true;
          }, r4.prototype.X = function(n8) {
            var r5 = w7({ value: this.u.slice(), binLen: this.s }, (function(n9) {
              var r6, t2, e3 = 0, i6 = [0, 0], o6 = [4294967295 & n9, n9 / 4294967296 & 2097151];
              for (r6 = 6; r6 >= 0; r6--) 0 == (t2 = o6[r6 >> 2] >>> 8 * r6 & 255) && 0 === e3 || (i6[e3 >> 2] |= t2 << 8 * e3, e3 += 1);
              return i6[(e3 = 0 !== e3 ? e3 : 1) >> 2] |= e3 << 8 * e3, { value: e3 + 1 > 4 ? i6 : [i6[0]], binLen: 8 + 8 * e3 };
            })(n8.outputLen));
            return this.K(r5.value, r5.binLen, this.v, this.B(this.m), n8.outputLen);
          }, r4;
        })(h8);
        return (function() {
          function n7(n8, r4, t2) {
            if ("SHA-1" == n8) this.j = new K7(n8, r4, t2);
            else if ("SHA-224" == n8 || "SHA-256" == n8) this.j = new g8(n8, r4, t2);
            else if ("SHA-384" == n8 || "SHA-512" == n8) this.j = new G6(n8, r4, t2);
            else {
              if ("SHA3-224" != n8 && "SHA3-256" != n8 && "SHA3-384" != n8 && "SHA3-512" != n8 && "SHAKE128" != n8 && "SHAKE256" != n8 && "CSHAKE128" != n8 && "CSHAKE256" != n8 && "KMAC128" != n8 && "KMAC256" != n8) throw new Error(f7);
              this.j = new on4(n8, r4, t2);
            }
          }
          return n7.prototype.update = function(n8) {
            this.j.update(n8);
          }, n7.prototype.getHash = function(n8, r4) {
            return this.j.getHash(n8, r4);
          }, n7.prototype.setHMACKey = function(n8, r4, t2) {
            this.j.setHMACKey(n8, r4, t2);
          }, n7.prototype.getHMAC = function(n8, r4) {
            return this.j.getHMAC(n8, r4);
          }, n7;
        })();
      }));
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto-primitives@2.1.0/node_modules/@ton/crypto-primitives/dist/browser/getSecureRandom.js
  var require_getSecureRandom = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto-primitives@2.1.0/node_modules/@ton/crypto-primitives/dist/browser/getSecureRandom.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.getSecureRandomWords = exports.getSecureRandomBytes = void 0;
      function getSecureRandomBytes(size5) {
        return Buffer2.from(window.crypto.getRandomValues(new Uint8Array(size5)));
      }
      exports.getSecureRandomBytes = getSecureRandomBytes;
      function getSecureRandomWords(size5) {
        return window.crypto.getRandomValues(new Uint16Array(size5));
      }
      exports.getSecureRandomWords = getSecureRandomWords;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto-primitives@2.1.0/node_modules/@ton/crypto-primitives/dist/browser/hmac_sha512.js
  var require_hmac_sha512 = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto-primitives@2.1.0/node_modules/@ton/crypto-primitives/dist/browser/hmac_sha512.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.hmac_sha512 = void 0;
      async function hmac_sha512(key2, data) {
        let keyBuffer = typeof key2 === "string" ? Buffer2.from(key2, "utf-8") : key2;
        let dataBuffer = typeof data === "string" ? Buffer2.from(data, "utf-8") : data;
        const hmacAlgo = { name: "HMAC", hash: "SHA-512" };
        const hmacKey = await window.crypto.subtle.importKey("raw", keyBuffer, hmacAlgo, false, ["sign"]);
        return Buffer2.from(await crypto.subtle.sign(hmacAlgo, hmacKey, dataBuffer));
      }
      exports.hmac_sha512 = hmac_sha512;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto-primitives@2.1.0/node_modules/@ton/crypto-primitives/dist/browser/pbkdf2_sha512.js
  var require_pbkdf2_sha512 = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto-primitives@2.1.0/node_modules/@ton/crypto-primitives/dist/browser/pbkdf2_sha512.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.pbkdf2_sha512 = void 0;
      async function pbkdf2_sha512(key2, salt, iterations, keyLen) {
        const keyBuffer = typeof key2 === "string" ? Buffer2.from(key2, "utf-8") : key2;
        const saltBuffer = typeof salt === "string" ? Buffer2.from(salt, "utf-8") : salt;
        const pbkdf2_key = await window.crypto.subtle.importKey("raw", keyBuffer, { name: "PBKDF2" }, false, ["deriveBits"]);
        const derivedBits = await window.crypto.subtle.deriveBits({ name: "PBKDF2", hash: "SHA-512", salt: saltBuffer, iterations }, pbkdf2_key, keyLen * 8);
        return Buffer2.from(derivedBits);
      }
      exports.pbkdf2_sha512 = pbkdf2_sha512;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto-primitives@2.1.0/node_modules/@ton/crypto-primitives/dist/browser/sha256.js
  var require_sha2562 = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto-primitives@2.1.0/node_modules/@ton/crypto-primitives/dist/browser/sha256.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.sha256 = void 0;
      async function sha2565(source) {
        if (typeof source === "string") {
          return Buffer2.from(await crypto.subtle.digest("SHA-256", Buffer2.from(source, "utf-8")));
        }
        return Buffer2.from(await crypto.subtle.digest("SHA-256", source));
      }
      exports.sha256 = sha2565;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto-primitives@2.1.0/node_modules/@ton/crypto-primitives/dist/browser/sha512.js
  var require_sha5122 = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto-primitives@2.1.0/node_modules/@ton/crypto-primitives/dist/browser/sha512.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.sha512 = void 0;
      async function sha5124(source) {
        if (typeof source === "string") {
          return Buffer2.from(await crypto.subtle.digest("SHA-512", Buffer2.from(source, "utf-8")));
        }
        return Buffer2.from(await crypto.subtle.digest("SHA-512", source));
      }
      exports.sha512 = sha5124;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto-primitives@2.1.0/node_modules/@ton/crypto-primitives/dist/browser.js
  var require_browser3 = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto-primitives@2.1.0/node_modules/@ton/crypto-primitives/dist/browser.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.sha512 = exports.sha256 = exports.pbkdf2_sha512 = exports.hmac_sha512 = exports.getSecureRandomWords = exports.getSecureRandomBytes = void 0;
      var getSecureRandom_1 = require_getSecureRandom();
      Object.defineProperty(exports, "getSecureRandomBytes", { enumerable: true, get: function() {
        return getSecureRandom_1.getSecureRandomBytes;
      } });
      Object.defineProperty(exports, "getSecureRandomWords", { enumerable: true, get: function() {
        return getSecureRandom_1.getSecureRandomWords;
      } });
      var hmac_sha512_1 = require_hmac_sha512();
      Object.defineProperty(exports, "hmac_sha512", { enumerable: true, get: function() {
        return hmac_sha512_1.hmac_sha512;
      } });
      var pbkdf2_sha512_1 = require_pbkdf2_sha512();
      Object.defineProperty(exports, "pbkdf2_sha512", { enumerable: true, get: function() {
        return pbkdf2_sha512_1.pbkdf2_sha512;
      } });
      var sha256_1 = require_sha2562();
      Object.defineProperty(exports, "sha256", { enumerable: true, get: function() {
        return sha256_1.sha256;
      } });
      var sha512_1 = require_sha5122();
      Object.defineProperty(exports, "sha512", { enumerable: true, get: function() {
        return sha512_1.sha512;
      } });
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/primitives/sha256.js
  var require_sha2563 = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/primitives/sha256.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __importDefault2 = exports && exports.__importDefault || function(mod3) {
        return mod3 && mod3.__esModule ? mod3 : { "default": mod3 };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.sha256 = exports.sha256_fallback = exports.sha256_sync = void 0;
      var jssha_1 = __importDefault2(require_sha());
      var crypto_primitives_1 = require_browser3();
      function sha256_sync(source) {
        let src2;
        if (typeof source === "string") {
          src2 = Buffer2.from(source, "utf-8").toString("hex");
        } else {
          src2 = source.toString("hex");
        }
        let hasher = new jssha_1.default("SHA-256", "HEX");
        hasher.update(src2);
        let res = hasher.getHash("HEX");
        return Buffer2.from(res, "hex");
      }
      exports.sha256_sync = sha256_sync;
      async function sha256_fallback(source) {
        return sha256_sync(source);
      }
      exports.sha256_fallback = sha256_fallback;
      function sha2565(source) {
        return (0, crypto_primitives_1.sha256)(source);
      }
      exports.sha256 = sha2565;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/primitives/sha512.js
  var require_sha5123 = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/primitives/sha512.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __importDefault2 = exports && exports.__importDefault || function(mod3) {
        return mod3 && mod3.__esModule ? mod3 : { "default": mod3 };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.sha512 = exports.sha512_fallback = exports.sha512_sync = void 0;
      var jssha_1 = __importDefault2(require_sha());
      var crypto_primitives_1 = require_browser3();
      function sha512_sync(source) {
        let src2;
        if (typeof source === "string") {
          src2 = Buffer2.from(source, "utf-8").toString("hex");
        } else {
          src2 = source.toString("hex");
        }
        let hasher = new jssha_1.default("SHA-512", "HEX");
        hasher.update(src2);
        let res = hasher.getHash("HEX");
        return Buffer2.from(res, "hex");
      }
      exports.sha512_sync = sha512_sync;
      async function sha512_fallback(source) {
        return sha512_sync(source);
      }
      exports.sha512_fallback = sha512_fallback;
      async function sha5124(source) {
        return (0, crypto_primitives_1.sha512)(source);
      }
      exports.sha512 = sha5124;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/primitives/pbkdf2_sha512.js
  var require_pbkdf2_sha5122 = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/primitives/pbkdf2_sha512.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.pbkdf2_sha512 = void 0;
      var crypto_primitives_1 = require_browser3();
      function pbkdf2_sha512(key2, salt, iterations, keyLen) {
        return (0, crypto_primitives_1.pbkdf2_sha512)(key2, salt, iterations, keyLen);
      }
      exports.pbkdf2_sha512 = pbkdf2_sha512;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/primitives/hmac_sha512.js
  var require_hmac_sha5122 = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/primitives/hmac_sha512.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __importDefault2 = exports && exports.__importDefault || function(mod3) {
        return mod3 && mod3.__esModule ? mod3 : { "default": mod3 };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.hmac_sha512 = exports.hmac_sha512_fallback = void 0;
      var jssha_1 = __importDefault2(require_sha());
      var crypto_primitives_1 = require_browser3();
      async function hmac_sha512_fallback(key2, data) {
        let keyBuffer = typeof key2 === "string" ? Buffer2.from(key2, "utf-8") : key2;
        let dataBuffer = typeof data === "string" ? Buffer2.from(data, "utf-8") : data;
        const shaObj = new jssha_1.default("SHA-512", "HEX", {
          hmacKey: { value: keyBuffer.toString("hex"), format: "HEX" }
        });
        shaObj.update(dataBuffer.toString("hex"));
        const hmac4 = shaObj.getHash("HEX");
        return Buffer2.from(hmac4, "hex");
      }
      exports.hmac_sha512_fallback = hmac_sha512_fallback;
      function hmac_sha512(key2, data) {
        return (0, crypto_primitives_1.hmac_sha512)(key2, data);
      }
      exports.hmac_sha512 = hmac_sha512;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/primitives/getSecureRandom.js
  var require_getSecureRandom2 = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/primitives/getSecureRandom.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.getSecureRandomNumber = exports.getSecureRandomWords = exports.getSecureRandomBytes = void 0;
      var crypto_primitives_1 = require_browser3();
      async function getSecureRandomBytes(size5) {
        return (0, crypto_primitives_1.getSecureRandomBytes)(size5);
      }
      exports.getSecureRandomBytes = getSecureRandomBytes;
      async function getSecureRandomWords(size5) {
        return getSecureRandomWords(size5);
      }
      exports.getSecureRandomWords = getSecureRandomWords;
      async function getSecureRandomNumber(min, max) {
        let range = max - min;
        var bitsNeeded = Math.ceil(Math.log2(range));
        if (bitsNeeded > 53) {
          throw new Error("Range is too large");
        }
        var bytesNeeded = Math.ceil(bitsNeeded / 8);
        var mask2 = Math.pow(2, bitsNeeded) - 1;
        while (true) {
          let res = await getSecureRandomBytes(bitsNeeded);
          let power = (bytesNeeded - 1) * 8;
          let numberValue = 0;
          for (var i5 = 0; i5 < bytesNeeded; i5++) {
            numberValue += res[i5] * Math.pow(2, power);
            power -= 8;
          }
          numberValue = numberValue & mask2;
          if (numberValue >= range) {
            continue;
          }
          return min + numberValue;
        }
      }
      exports.getSecureRandomNumber = getSecureRandomNumber;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/passwords/wordlist.js
  var require_wordlist = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/passwords/wordlist.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.wordlist = void 0;
      exports.wordlist = [
        "abacus",
        "abdomen",
        "abdominal",
        "abide",
        "abiding",
        "ability",
        "ablaze",
        "able",
        "abnormal",
        "abrasion",
        "abrasive",
        "abreast",
        "abridge",
        "abroad",
        "abruptly",
        "absence",
        "absentee",
        "absently",
        "absinthe",
        "absolute",
        "absolve",
        "abstain",
        "abstract",
        "absurd",
        "accent",
        "acclaim",
        "acclimate",
        "accompany",
        "account",
        "accuracy",
        "accurate",
        "accustom",
        "acetone",
        "achiness",
        "aching",
        "acid",
        "acorn",
        "acquaint",
        "acquire",
        "acre",
        "acrobat",
        "acronym",
        "acting",
        "action",
        "activate",
        "activator",
        "active",
        "activism",
        "activist",
        "activity",
        "actress",
        "acts",
        "acutely",
        "acuteness",
        "aeration",
        "aerobics",
        "aerosol",
        "aerospace",
        "afar",
        "affair",
        "affected",
        "affecting",
        "affection",
        "affidavit",
        "affiliate",
        "affirm",
        "affix",
        "afflicted",
        "affluent",
        "afford",
        "affront",
        "aflame",
        "afloat",
        "aflutter",
        "afoot",
        "afraid",
        "afterglow",
        "afterlife",
        "aftermath",
        "aftermost",
        "afternoon",
        "aged",
        "ageless",
        "agency",
        "agenda",
        "agent",
        "aggregate",
        "aghast",
        "agile",
        "agility",
        "aging",
        "agnostic",
        "agonize",
        "agonizing",
        "agony",
        "agreeable",
        "agreeably",
        "agreed",
        "agreeing",
        "agreement",
        "aground",
        "ahead",
        "ahoy",
        "aide",
        "aids",
        "aim",
        "ajar",
        "alabaster",
        "alarm",
        "albatross",
        "album",
        "alfalfa",
        "algebra",
        "algorithm",
        "alias",
        "alibi",
        "alienable",
        "alienate",
        "aliens",
        "alike",
        "alive",
        "alkaline",
        "alkalize",
        "almanac",
        "almighty",
        "almost",
        "aloe",
        "aloft",
        "aloha",
        "alone",
        "alongside",
        "aloof",
        "alphabet",
        "alright",
        "although",
        "altitude",
        "alto",
        "aluminum",
        "alumni",
        "always",
        "amaretto",
        "amaze",
        "amazingly",
        "amber",
        "ambiance",
        "ambiguity",
        "ambiguous",
        "ambition",
        "ambitious",
        "ambulance",
        "ambush",
        "amendable",
        "amendment",
        "amends",
        "amenity",
        "amiable",
        "amicably",
        "amid",
        "amigo",
        "amino",
        "amiss",
        "ammonia",
        "ammonium",
        "amnesty",
        "amniotic",
        "among",
        "amount",
        "amperage",
        "ample",
        "amplifier",
        "amplify",
        "amply",
        "amuck",
        "amulet",
        "amusable",
        "amused",
        "amusement",
        "amuser",
        "amusing",
        "anaconda",
        "anaerobic",
        "anagram",
        "anatomist",
        "anatomy",
        "anchor",
        "anchovy",
        "ancient",
        "android",
        "anemia",
        "anemic",
        "aneurism",
        "anew",
        "angelfish",
        "angelic",
        "anger",
        "angled",
        "angler",
        "angles",
        "angling",
        "angrily",
        "angriness",
        "anguished",
        "angular",
        "animal",
        "animate",
        "animating",
        "animation",
        "animator",
        "anime",
        "animosity",
        "ankle",
        "annex",
        "annotate",
        "announcer",
        "annoying",
        "annually",
        "annuity",
        "anointer",
        "another",
        "answering",
        "antacid",
        "antarctic",
        "anteater",
        "antelope",
        "antennae",
        "anthem",
        "anthill",
        "anthology",
        "antibody",
        "antics",
        "antidote",
        "antihero",
        "antiquely",
        "antiques",
        "antiquity",
        "antirust",
        "antitoxic",
        "antitrust",
        "antiviral",
        "antivirus",
        "antler",
        "antonym",
        "antsy",
        "anvil",
        "anybody",
        "anyhow",
        "anymore",
        "anyone",
        "anyplace",
        "anything",
        "anytime",
        "anyway",
        "anywhere",
        "aorta",
        "apache",
        "apostle",
        "appealing",
        "appear",
        "appease",
        "appeasing",
        "appendage",
        "appendix",
        "appetite",
        "appetizer",
        "applaud",
        "applause",
        "apple",
        "appliance",
        "applicant",
        "applied",
        "apply",
        "appointee",
        "appraisal",
        "appraiser",
        "apprehend",
        "approach",
        "approval",
        "approve",
        "apricot",
        "april",
        "apron",
        "aptitude",
        "aptly",
        "aqua",
        "aqueduct",
        "arbitrary",
        "arbitrate",
        "ardently",
        "area",
        "arena",
        "arguable",
        "arguably",
        "argue",
        "arise",
        "armadillo",
        "armband",
        "armchair",
        "armed",
        "armful",
        "armhole",
        "arming",
        "armless",
        "armoire",
        "armored",
        "armory",
        "armrest",
        "army",
        "aroma",
        "arose",
        "around",
        "arousal",
        "arrange",
        "array",
        "arrest",
        "arrival",
        "arrive",
        "arrogance",
        "arrogant",
        "arson",
        "art",
        "ascend",
        "ascension",
        "ascent",
        "ascertain",
        "ashamed",
        "ashen",
        "ashes",
        "ashy",
        "aside",
        "askew",
        "asleep",
        "asparagus",
        "aspect",
        "aspirate",
        "aspire",
        "aspirin",
        "astonish",
        "astound",
        "astride",
        "astrology",
        "astronaut",
        "astronomy",
        "astute",
        "atlantic",
        "atlas",
        "atom",
        "atonable",
        "atop",
        "atrium",
        "atrocious",
        "atrophy",
        "attach",
        "attain",
        "attempt",
        "attendant",
        "attendee",
        "attention",
        "attentive",
        "attest",
        "attic",
        "attire",
        "attitude",
        "attractor",
        "attribute",
        "atypical",
        "auction",
        "audacious",
        "audacity",
        "audible",
        "audibly",
        "audience",
        "audio",
        "audition",
        "augmented",
        "august",
        "authentic",
        "author",
        "autism",
        "autistic",
        "autograph",
        "automaker",
        "automated",
        "automatic",
        "autopilot",
        "available",
        "avalanche",
        "avatar",
        "avenge",
        "avenging",
        "avenue",
        "average",
        "aversion",
        "avert",
        "aviation",
        "aviator",
        "avid",
        "avoid",
        "await",
        "awaken",
        "award",
        "aware",
        "awhile",
        "awkward",
        "awning",
        "awoke",
        "awry",
        "axis",
        "babble",
        "babbling",
        "babied",
        "baboon",
        "backache",
        "backboard",
        "backboned",
        "backdrop",
        "backed",
        "backer",
        "backfield",
        "backfire",
        "backhand",
        "backing",
        "backlands",
        "backlash",
        "backless",
        "backlight",
        "backlit",
        "backlog",
        "backpack",
        "backpedal",
        "backrest",
        "backroom",
        "backshift",
        "backside",
        "backslid",
        "backspace",
        "backspin",
        "backstab",
        "backstage",
        "backtalk",
        "backtrack",
        "backup",
        "backward",
        "backwash",
        "backwater",
        "backyard",
        "bacon",
        "bacteria",
        "bacterium",
        "badass",
        "badge",
        "badland",
        "badly",
        "badness",
        "baffle",
        "baffling",
        "bagel",
        "bagful",
        "baggage",
        "bagged",
        "baggie",
        "bagginess",
        "bagging",
        "baggy",
        "bagpipe",
        "baguette",
        "baked",
        "bakery",
        "bakeshop",
        "baking",
        "balance",
        "balancing",
        "balcony",
        "balmy",
        "balsamic",
        "bamboo",
        "banana",
        "banish",
        "banister",
        "banjo",
        "bankable",
        "bankbook",
        "banked",
        "banker",
        "banking",
        "banknote",
        "bankroll",
        "banner",
        "bannister",
        "banshee",
        "banter",
        "barbecue",
        "barbed",
        "barbell",
        "barber",
        "barcode",
        "barge",
        "bargraph",
        "barista",
        "baritone",
        "barley",
        "barmaid",
        "barman",
        "barn",
        "barometer",
        "barrack",
        "barracuda",
        "barrel",
        "barrette",
        "barricade",
        "barrier",
        "barstool",
        "bartender",
        "barterer",
        "bash",
        "basically",
        "basics",
        "basil",
        "basin",
        "basis",
        "basket",
        "batboy",
        "batch",
        "bath",
        "baton",
        "bats",
        "battalion",
        "battered",
        "battering",
        "battery",
        "batting",
        "battle",
        "bauble",
        "bazooka",
        "blabber",
        "bladder",
        "blade",
        "blah",
        "blame",
        "blaming",
        "blanching",
        "blandness",
        "blank",
        "blaspheme",
        "blasphemy",
        "blast",
        "blatancy",
        "blatantly",
        "blazer",
        "blazing",
        "bleach",
        "bleak",
        "bleep",
        "blemish",
        "blend",
        "bless",
        "blighted",
        "blimp",
        "bling",
        "blinked",
        "blinker",
        "blinking",
        "blinks",
        "blip",
        "blissful",
        "blitz",
        "blizzard",
        "bloated",
        "bloating",
        "blob",
        "blog",
        "bloomers",
        "blooming",
        "blooper",
        "blot",
        "blouse",
        "blubber",
        "bluff",
        "bluish",
        "blunderer",
        "blunt",
        "blurb",
        "blurred",
        "blurry",
        "blurt",
        "blush",
        "blustery",
        "boaster",
        "boastful",
        "boasting",
        "boat",
        "bobbed",
        "bobbing",
        "bobble",
        "bobcat",
        "bobsled",
        "bobtail",
        "bodacious",
        "body",
        "bogged",
        "boggle",
        "bogus",
        "boil",
        "bok",
        "bolster",
        "bolt",
        "bonanza",
        "bonded",
        "bonding",
        "bondless",
        "boned",
        "bonehead",
        "boneless",
        "bonelike",
        "boney",
        "bonfire",
        "bonnet",
        "bonsai",
        "bonus",
        "bony",
        "boogeyman",
        "boogieman",
        "book",
        "boondocks",
        "booted",
        "booth",
        "bootie",
        "booting",
        "bootlace",
        "bootleg",
        "boots",
        "boozy",
        "borax",
        "boring",
        "borough",
        "borrower",
        "borrowing",
        "boss",
        "botanical",
        "botanist",
        "botany",
        "botch",
        "both",
        "bottle",
        "bottling",
        "bottom",
        "bounce",
        "bouncing",
        "bouncy",
        "bounding",
        "boundless",
        "bountiful",
        "bovine",
        "boxcar",
        "boxer",
        "boxing",
        "boxlike",
        "boxy",
        "breach",
        "breath",
        "breeches",
        "breeching",
        "breeder",
        "breeding",
        "breeze",
        "breezy",
        "brethren",
        "brewery",
        "brewing",
        "briar",
        "bribe",
        "brick",
        "bride",
        "bridged",
        "brigade",
        "bright",
        "brilliant",
        "brim",
        "bring",
        "brink",
        "brisket",
        "briskly",
        "briskness",
        "bristle",
        "brittle",
        "broadband",
        "broadcast",
        "broaden",
        "broadly",
        "broadness",
        "broadside",
        "broadways",
        "broiler",
        "broiling",
        "broken",
        "broker",
        "bronchial",
        "bronco",
        "bronze",
        "bronzing",
        "brook",
        "broom",
        "brought",
        "browbeat",
        "brownnose",
        "browse",
        "browsing",
        "bruising",
        "brunch",
        "brunette",
        "brunt",
        "brush",
        "brussels",
        "brute",
        "brutishly",
        "bubble",
        "bubbling",
        "bubbly",
        "buccaneer",
        "bucked",
        "bucket",
        "buckle",
        "buckshot",
        "buckskin",
        "bucktooth",
        "buckwheat",
        "buddhism",
        "buddhist",
        "budding",
        "buddy",
        "budget",
        "buffalo",
        "buffed",
        "buffer",
        "buffing",
        "buffoon",
        "buggy",
        "bulb",
        "bulge",
        "bulginess",
        "bulgur",
        "bulk",
        "bulldog",
        "bulldozer",
        "bullfight",
        "bullfrog",
        "bullhorn",
        "bullion",
        "bullish",
        "bullpen",
        "bullring",
        "bullseye",
        "bullwhip",
        "bully",
        "bunch",
        "bundle",
        "bungee",
        "bunion",
        "bunkbed",
        "bunkhouse",
        "bunkmate",
        "bunny",
        "bunt",
        "busboy",
        "bush",
        "busily",
        "busload",
        "bust",
        "busybody",
        "buzz",
        "cabana",
        "cabbage",
        "cabbie",
        "cabdriver",
        "cable",
        "caboose",
        "cache",
        "cackle",
        "cacti",
        "cactus",
        "caddie",
        "caddy",
        "cadet",
        "cadillac",
        "cadmium",
        "cage",
        "cahoots",
        "cake",
        "calamari",
        "calamity",
        "calcium",
        "calculate",
        "calculus",
        "caliber",
        "calibrate",
        "calm",
        "caloric",
        "calorie",
        "calzone",
        "camcorder",
        "cameo",
        "camera",
        "camisole",
        "camper",
        "campfire",
        "camping",
        "campsite",
        "campus",
        "canal",
        "canary",
        "cancel",
        "candied",
        "candle",
        "candy",
        "cane",
        "canine",
        "canister",
        "cannabis",
        "canned",
        "canning",
        "cannon",
        "cannot",
        "canola",
        "canon",
        "canopener",
        "canopy",
        "canteen",
        "canyon",
        "capable",
        "capably",
        "capacity",
        "cape",
        "capillary",
        "capital",
        "capitol",
        "capped",
        "capricorn",
        "capsize",
        "capsule",
        "caption",
        "captivate",
        "captive",
        "captivity",
        "capture",
        "caramel",
        "carat",
        "caravan",
        "carbon",
        "cardboard",
        "carded",
        "cardiac",
        "cardigan",
        "cardinal",
        "cardstock",
        "carefully",
        "caregiver",
        "careless",
        "caress",
        "caretaker",
        "cargo",
        "caring",
        "carless",
        "carload",
        "carmaker",
        "carnage",
        "carnation",
        "carnival",
        "carnivore",
        "carol",
        "carpenter",
        "carpentry",
        "carpool",
        "carport",
        "carried",
        "carrot",
        "carrousel",
        "carry",
        "cartel",
        "cartload",
        "carton",
        "cartoon",
        "cartridge",
        "cartwheel",
        "carve",
        "carving",
        "carwash",
        "cascade",
        "case",
        "cash",
        "casing",
        "casino",
        "casket",
        "cassette",
        "casually",
        "casualty",
        "catacomb",
        "catalog",
        "catalyst",
        "catalyze",
        "catapult",
        "cataract",
        "catatonic",
        "catcall",
        "catchable",
        "catcher",
        "catching",
        "catchy",
        "caterer",
        "catering",
        "catfight",
        "catfish",
        "cathedral",
        "cathouse",
        "catlike",
        "catnap",
        "catnip",
        "catsup",
        "cattail",
        "cattishly",
        "cattle",
        "catty",
        "catwalk",
        "caucasian",
        "caucus",
        "causal",
        "causation",
        "cause",
        "causing",
        "cauterize",
        "caution",
        "cautious",
        "cavalier",
        "cavalry",
        "caviar",
        "cavity",
        "cedar",
        "celery",
        "celestial",
        "celibacy",
        "celibate",
        "celtic",
        "cement",
        "census",
        "ceramics",
        "ceremony",
        "certainly",
        "certainty",
        "certified",
        "certify",
        "cesarean",
        "cesspool",
        "chafe",
        "chaffing",
        "chain",
        "chair",
        "chalice",
        "challenge",
        "chamber",
        "chamomile",
        "champion",
        "chance",
        "change",
        "channel",
        "chant",
        "chaos",
        "chaperone",
        "chaplain",
        "chapped",
        "chaps",
        "chapter",
        "character",
        "charbroil",
        "charcoal",
        "charger",
        "charging",
        "chariot",
        "charity",
        "charm",
        "charred",
        "charter",
        "charting",
        "chase",
        "chasing",
        "chaste",
        "chastise",
        "chastity",
        "chatroom",
        "chatter",
        "chatting",
        "chatty",
        "cheating",
        "cheddar",
        "cheek",
        "cheer",
        "cheese",
        "cheesy",
        "chef",
        "chemicals",
        "chemist",
        "chemo",
        "cherisher",
        "cherub",
        "chess",
        "chest",
        "chevron",
        "chevy",
        "chewable",
        "chewer",
        "chewing",
        "chewy",
        "chief",
        "chihuahua",
        "childcare",
        "childhood",
        "childish",
        "childless",
        "childlike",
        "chili",
        "chill",
        "chimp",
        "chip",
        "chirping",
        "chirpy",
        "chitchat",
        "chivalry",
        "chive",
        "chloride",
        "chlorine",
        "choice",
        "chokehold",
        "choking",
        "chomp",
        "chooser",
        "choosing",
        "choosy",
        "chop",
        "chosen",
        "chowder",
        "chowtime",
        "chrome",
        "chubby",
        "chuck",
        "chug",
        "chummy",
        "chump",
        "chunk",
        "churn",
        "chute",
        "cider",
        "cilantro",
        "cinch",
        "cinema",
        "cinnamon",
        "circle",
        "circling",
        "circular",
        "circulate",
        "circus",
        "citable",
        "citadel",
        "citation",
        "citizen",
        "citric",
        "citrus",
        "city",
        "civic",
        "civil",
        "clad",
        "claim",
        "clambake",
        "clammy",
        "clamor",
        "clamp",
        "clamshell",
        "clang",
        "clanking",
        "clapped",
        "clapper",
        "clapping",
        "clarify",
        "clarinet",
        "clarity",
        "clash",
        "clasp",
        "class",
        "clatter",
        "clause",
        "clavicle",
        "claw",
        "clay",
        "clean",
        "clear",
        "cleat",
        "cleaver",
        "cleft",
        "clench",
        "clergyman",
        "clerical",
        "clerk",
        "clever",
        "clicker",
        "client",
        "climate",
        "climatic",
        "cling",
        "clinic",
        "clinking",
        "clip",
        "clique",
        "cloak",
        "clobber",
        "clock",
        "clone",
        "cloning",
        "closable",
        "closure",
        "clothes",
        "clothing",
        "cloud",
        "clover",
        "clubbed",
        "clubbing",
        "clubhouse",
        "clump",
        "clumsily",
        "clumsy",
        "clunky",
        "clustered",
        "clutch",
        "clutter",
        "coach",
        "coagulant",
        "coastal",
        "coaster",
        "coasting",
        "coastland",
        "coastline",
        "coat",
        "coauthor",
        "cobalt",
        "cobbler",
        "cobweb",
        "cocoa",
        "coconut",
        "cod",
        "coeditor",
        "coerce",
        "coexist",
        "coffee",
        "cofounder",
        "cognition",
        "cognitive",
        "cogwheel",
        "coherence",
        "coherent",
        "cohesive",
        "coil",
        "coke",
        "cola",
        "cold",
        "coleslaw",
        "coliseum",
        "collage",
        "collapse",
        "collar",
        "collected",
        "collector",
        "collide",
        "collie",
        "collision",
        "colonial",
        "colonist",
        "colonize",
        "colony",
        "colossal",
        "colt",
        "coma",
        "come",
        "comfort",
        "comfy",
        "comic",
        "coming",
        "comma",
        "commence",
        "commend",
        "comment",
        "commerce",
        "commode",
        "commodity",
        "commodore",
        "common",
        "commotion",
        "commute",
        "commuting",
        "compacted",
        "compacter",
        "compactly",
        "compactor",
        "companion",
        "company",
        "compare",
        "compel",
        "compile",
        "comply",
        "component",
        "composed",
        "composer",
        "composite",
        "compost",
        "composure",
        "compound",
        "compress",
        "comprised",
        "computer",
        "computing",
        "comrade",
        "concave",
        "conceal",
        "conceded",
        "concept",
        "concerned",
        "concert",
        "conch",
        "concierge",
        "concise",
        "conclude",
        "concrete",
        "concur",
        "condense",
        "condiment",
        "condition",
        "condone",
        "conducive",
        "conductor",
        "conduit",
        "cone",
        "confess",
        "confetti",
        "confidant",
        "confident",
        "confider",
        "confiding",
        "configure",
        "confined",
        "confining",
        "confirm",
        "conflict",
        "conform",
        "confound",
        "confront",
        "confused",
        "confusing",
        "confusion",
        "congenial",
        "congested",
        "congrats",
        "congress",
        "conical",
        "conjoined",
        "conjure",
        "conjuror",
        "connected",
        "connector",
        "consensus",
        "consent",
        "console",
        "consoling",
        "consonant",
        "constable",
        "constant",
        "constrain",
        "constrict",
        "construct",
        "consult",
        "consumer",
        "consuming",
        "contact",
        "container",
        "contempt",
        "contend",
        "contented",
        "contently",
        "contents",
        "contest",
        "context",
        "contort",
        "contour",
        "contrite",
        "control",
        "contusion",
        "convene",
        "convent",
        "copartner",
        "cope",
        "copied",
        "copier",
        "copilot",
        "coping",
        "copious",
        "copper",
        "copy",
        "coral",
        "cork",
        "cornball",
        "cornbread",
        "corncob",
        "cornea",
        "corned",
        "corner",
        "cornfield",
        "cornflake",
        "cornhusk",
        "cornmeal",
        "cornstalk",
        "corny",
        "coronary",
        "coroner",
        "corporal",
        "corporate",
        "corral",
        "correct",
        "corridor",
        "corrode",
        "corroding",
        "corrosive",
        "corsage",
        "corset",
        "cortex",
        "cosigner",
        "cosmetics",
        "cosmic",
        "cosmos",
        "cosponsor",
        "cost",
        "cottage",
        "cotton",
        "couch",
        "cough",
        "could",
        "countable",
        "countdown",
        "counting",
        "countless",
        "country",
        "county",
        "courier",
        "covenant",
        "cover",
        "coveted",
        "coveting",
        "coyness",
        "cozily",
        "coziness",
        "cozy",
        "crabbing",
        "crabgrass",
        "crablike",
        "crabmeat",
        "cradle",
        "cradling",
        "crafter",
        "craftily",
        "craftsman",
        "craftwork",
        "crafty",
        "cramp",
        "cranberry",
        "crane",
        "cranial",
        "cranium",
        "crank",
        "crate",
        "crave",
        "craving",
        "crawfish",
        "crawlers",
        "crawling",
        "crayfish",
        "crayon",
        "crazed",
        "crazily",
        "craziness",
        "crazy",
        "creamed",
        "creamer",
        "creamlike",
        "crease",
        "creasing",
        "creatable",
        "create",
        "creation",
        "creative",
        "creature",
        "credible",
        "credibly",
        "credit",
        "creed",
        "creme",
        "creole",
        "crepe",
        "crept",
        "crescent",
        "crested",
        "cresting",
        "crestless",
        "crevice",
        "crewless",
        "crewman",
        "crewmate",
        "crib",
        "cricket",
        "cried",
        "crier",
        "crimp",
        "crimson",
        "cringe",
        "cringing",
        "crinkle",
        "crinkly",
        "crisped",
        "crisping",
        "crisply",
        "crispness",
        "crispy",
        "criteria",
        "critter",
        "croak",
        "crock",
        "crook",
        "croon",
        "crop",
        "cross",
        "crouch",
        "crouton",
        "crowbar",
        "crowd",
        "crown",
        "crucial",
        "crudely",
        "crudeness",
        "cruelly",
        "cruelness",
        "cruelty",
        "crumb",
        "crummiest",
        "crummy",
        "crumpet",
        "crumpled",
        "cruncher",
        "crunching",
        "crunchy",
        "crusader",
        "crushable",
        "crushed",
        "crusher",
        "crushing",
        "crust",
        "crux",
        "crying",
        "cryptic",
        "crystal",
        "cubbyhole",
        "cube",
        "cubical",
        "cubicle",
        "cucumber",
        "cuddle",
        "cuddly",
        "cufflink",
        "culinary",
        "culminate",
        "culpable",
        "culprit",
        "cultivate",
        "cultural",
        "culture",
        "cupbearer",
        "cupcake",
        "cupid",
        "cupped",
        "cupping",
        "curable",
        "curator",
        "curdle",
        "cure",
        "curfew",
        "curing",
        "curled",
        "curler",
        "curliness",
        "curling",
        "curly",
        "curry",
        "curse",
        "cursive",
        "cursor",
        "curtain",
        "curtly",
        "curtsy",
        "curvature",
        "curve",
        "curvy",
        "cushy",
        "cusp",
        "cussed",
        "custard",
        "custodian",
        "custody",
        "customary",
        "customer",
        "customize",
        "customs",
        "cut",
        "cycle",
        "cyclic",
        "cycling",
        "cyclist",
        "cylinder",
        "cymbal",
        "cytoplasm",
        "cytoplast",
        "dab",
        "dad",
        "daffodil",
        "dagger",
        "daily",
        "daintily",
        "dainty",
        "dairy",
        "daisy",
        "dallying",
        "dance",
        "dancing",
        "dandelion",
        "dander",
        "dandruff",
        "dandy",
        "danger",
        "dangle",
        "dangling",
        "daredevil",
        "dares",
        "daringly",
        "darkened",
        "darkening",
        "darkish",
        "darkness",
        "darkroom",
        "darling",
        "darn",
        "dart",
        "darwinism",
        "dash",
        "dastardly",
        "data",
        "datebook",
        "dating",
        "daughter",
        "daunting",
        "dawdler",
        "dawn",
        "daybed",
        "daybreak",
        "daycare",
        "daydream",
        "daylight",
        "daylong",
        "dayroom",
        "daytime",
        "dazzler",
        "dazzling",
        "deacon",
        "deafening",
        "deafness",
        "dealer",
        "dealing",
        "dealmaker",
        "dealt",
        "dean",
        "debatable",
        "debate",
        "debating",
        "debit",
        "debrief",
        "debtless",
        "debtor",
        "debug",
        "debunk",
        "decade",
        "decaf",
        "decal",
        "decathlon",
        "decay",
        "deceased",
        "deceit",
        "deceiver",
        "deceiving",
        "december",
        "decency",
        "decent",
        "deception",
        "deceptive",
        "decibel",
        "decidable",
        "decimal",
        "decimeter",
        "decipher",
        "deck",
        "declared",
        "decline",
        "decode",
        "decompose",
        "decorated",
        "decorator",
        "decoy",
        "decrease",
        "decree",
        "dedicate",
        "dedicator",
        "deduce",
        "deduct",
        "deed",
        "deem",
        "deepen",
        "deeply",
        "deepness",
        "deface",
        "defacing",
        "defame",
        "default",
        "defeat",
        "defection",
        "defective",
        "defendant",
        "defender",
        "defense",
        "defensive",
        "deferral",
        "deferred",
        "defiance",
        "defiant",
        "defile",
        "defiling",
        "define",
        "definite",
        "deflate",
        "deflation",
        "deflator",
        "deflected",
        "deflector",
        "defog",
        "deforest",
        "defraud",
        "defrost",
        "deftly",
        "defuse",
        "defy",
        "degraded",
        "degrading",
        "degrease",
        "degree",
        "dehydrate",
        "deity",
        "dejected",
        "delay",
        "delegate",
        "delegator",
        "delete",
        "deletion",
        "delicacy",
        "delicate",
        "delicious",
        "delighted",
        "delirious",
        "delirium",
        "deliverer",
        "delivery",
        "delouse",
        "delta",
        "deluge",
        "delusion",
        "deluxe",
        "demanding",
        "demeaning",
        "demeanor",
        "demise",
        "democracy",
        "democrat",
        "demote",
        "demotion",
        "demystify",
        "denatured",
        "deniable",
        "denial",
        "denim",
        "denote",
        "dense",
        "density",
        "dental",
        "dentist",
        "denture",
        "deny",
        "deodorant",
        "deodorize",
        "departed",
        "departure",
        "depict",
        "deplete",
        "depletion",
        "deplored",
        "deploy",
        "deport",
        "depose",
        "depraved",
        "depravity",
        "deprecate",
        "depress",
        "deprive",
        "depth",
        "deputize",
        "deputy",
        "derail",
        "deranged",
        "derby",
        "derived",
        "desecrate",
        "deserve",
        "deserving",
        "designate",
        "designed",
        "designer",
        "designing",
        "deskbound",
        "desktop",
        "deskwork",
        "desolate",
        "despair",
        "despise",
        "despite",
        "destiny",
        "destitute",
        "destruct",
        "detached",
        "detail",
        "detection",
        "detective",
        "detector",
        "detention",
        "detergent",
        "detest",
        "detonate",
        "detonator",
        "detoxify",
        "detract",
        "deuce",
        "devalue",
        "deviancy",
        "deviant",
        "deviate",
        "deviation",
        "deviator",
        "device",
        "devious",
        "devotedly",
        "devotee",
        "devotion",
        "devourer",
        "devouring",
        "devoutly",
        "dexterity",
        "dexterous",
        "diabetes",
        "diabetic",
        "diabolic",
        "diagnoses",
        "diagnosis",
        "diagram",
        "dial",
        "diameter",
        "diaper",
        "diaphragm",
        "diary",
        "dice",
        "dicing",
        "dictate",
        "dictation",
        "dictator",
        "difficult",
        "diffused",
        "diffuser",
        "diffusion",
        "diffusive",
        "dig",
        "dilation",
        "diligence",
        "diligent",
        "dill",
        "dilute",
        "dime",
        "diminish",
        "dimly",
        "dimmed",
        "dimmer",
        "dimness",
        "dimple",
        "diner",
        "dingbat",
        "dinghy",
        "dinginess",
        "dingo",
        "dingy",
        "dining",
        "dinner",
        "diocese",
        "dioxide",
        "diploma",
        "dipped",
        "dipper",
        "dipping",
        "directed",
        "direction",
        "directive",
        "directly",
        "directory",
        "direness",
        "dirtiness",
        "disabled",
        "disagree",
        "disallow",
        "disarm",
        "disarray",
        "disaster",
        "disband",
        "disbelief",
        "disburse",
        "discard",
        "discern",
        "discharge",
        "disclose",
        "discolor",
        "discount",
        "discourse",
        "discover",
        "discuss",
        "disdain",
        "disengage",
        "disfigure",
        "disgrace",
        "dish",
        "disinfect",
        "disjoin",
        "disk",
        "dislike",
        "disliking",
        "dislocate",
        "dislodge",
        "disloyal",
        "dismantle",
        "dismay",
        "dismiss",
        "dismount",
        "disobey",
        "disorder",
        "disown",
        "disparate",
        "disparity",
        "dispatch",
        "dispense",
        "dispersal",
        "dispersed",
        "disperser",
        "displace",
        "display",
        "displease",
        "disposal",
        "dispose",
        "disprove",
        "dispute",
        "disregard",
        "disrupt",
        "dissuade",
        "distance",
        "distant",
        "distaste",
        "distill",
        "distinct",
        "distort",
        "distract",
        "distress",
        "district",
        "distrust",
        "ditch",
        "ditto",
        "ditzy",
        "dividable",
        "divided",
        "dividend",
        "dividers",
        "dividing",
        "divinely",
        "diving",
        "divinity",
        "divisible",
        "divisibly",
        "division",
        "divisive",
        "divorcee",
        "dizziness",
        "dizzy",
        "doable",
        "docile",
        "dock",
        "doctrine",
        "document",
        "dodge",
        "dodgy",
        "doily",
        "doing",
        "dole",
        "dollar",
        "dollhouse",
        "dollop",
        "dolly",
        "dolphin",
        "domain",
        "domelike",
        "domestic",
        "dominion",
        "dominoes",
        "donated",
        "donation",
        "donator",
        "donor",
        "donut",
        "doodle",
        "doorbell",
        "doorframe",
        "doorknob",
        "doorman",
        "doormat",
        "doornail",
        "doorpost",
        "doorstep",
        "doorstop",
        "doorway",
        "doozy",
        "dork",
        "dormitory",
        "dorsal",
        "dosage",
        "dose",
        "dotted",
        "doubling",
        "douche",
        "dove",
        "down",
        "dowry",
        "doze",
        "drab",
        "dragging",
        "dragonfly",
        "dragonish",
        "dragster",
        "drainable",
        "drainage",
        "drained",
        "drainer",
        "drainpipe",
        "dramatic",
        "dramatize",
        "drank",
        "drapery",
        "drastic",
        "draw",
        "dreaded",
        "dreadful",
        "dreadlock",
        "dreamboat",
        "dreamily",
        "dreamland",
        "dreamless",
        "dreamlike",
        "dreamt",
        "dreamy",
        "drearily",
        "dreary",
        "drench",
        "dress",
        "drew",
        "dribble",
        "dried",
        "drier",
        "drift",
        "driller",
        "drilling",
        "drinkable",
        "drinking",
        "dripping",
        "drippy",
        "drivable",
        "driven",
        "driver",
        "driveway",
        "driving",
        "drizzle",
        "drizzly",
        "drone",
        "drool",
        "droop",
        "drop-down",
        "dropbox",
        "dropkick",
        "droplet",
        "dropout",
        "dropper",
        "drove",
        "drown",
        "drowsily",
        "drudge",
        "drum",
        "dry",
        "dubbed",
        "dubiously",
        "duchess",
        "duckbill",
        "ducking",
        "duckling",
        "ducktail",
        "ducky",
        "duct",
        "dude",
        "duffel",
        "dugout",
        "duh",
        "duke",
        "duller",
        "dullness",
        "duly",
        "dumping",
        "dumpling",
        "dumpster",
        "duo",
        "dupe",
        "duplex",
        "duplicate",
        "duplicity",
        "durable",
        "durably",
        "duration",
        "duress",
        "during",
        "dusk",
        "dust",
        "dutiful",
        "duty",
        "duvet",
        "dwarf",
        "dweeb",
        "dwelled",
        "dweller",
        "dwelling",
        "dwindle",
        "dwindling",
        "dynamic",
        "dynamite",
        "dynasty",
        "dyslexia",
        "dyslexic",
        "each",
        "eagle",
        "earache",
        "eardrum",
        "earflap",
        "earful",
        "earlobe",
        "early",
        "earmark",
        "earmuff",
        "earphone",
        "earpiece",
        "earplugs",
        "earring",
        "earshot",
        "earthen",
        "earthlike",
        "earthling",
        "earthly",
        "earthworm",
        "earthy",
        "earwig",
        "easeful",
        "easel",
        "easiest",
        "easily",
        "easiness",
        "easing",
        "eastbound",
        "eastcoast",
        "easter",
        "eastward",
        "eatable",
        "eaten",
        "eatery",
        "eating",
        "eats",
        "ebay",
        "ebony",
        "ebook",
        "ecard",
        "eccentric",
        "echo",
        "eclair",
        "eclipse",
        "ecologist",
        "ecology",
        "economic",
        "economist",
        "economy",
        "ecosphere",
        "ecosystem",
        "edge",
        "edginess",
        "edging",
        "edgy",
        "edition",
        "editor",
        "educated",
        "education",
        "educator",
        "eel",
        "effective",
        "effects",
        "efficient",
        "effort",
        "eggbeater",
        "egging",
        "eggnog",
        "eggplant",
        "eggshell",
        "egomaniac",
        "egotism",
        "egotistic",
        "either",
        "eject",
        "elaborate",
        "elastic",
        "elated",
        "elbow",
        "eldercare",
        "elderly",
        "eldest",
        "electable",
        "election",
        "elective",
        "elephant",
        "elevate",
        "elevating",
        "elevation",
        "elevator",
        "eleven",
        "elf",
        "eligible",
        "eligibly",
        "eliminate",
        "elite",
        "elitism",
        "elixir",
        "elk",
        "ellipse",
        "elliptic",
        "elm",
        "elongated",
        "elope",
        "eloquence",
        "eloquent",
        "elsewhere",
        "elude",
        "elusive",
        "elves",
        "email",
        "embargo",
        "embark",
        "embassy",
        "embattled",
        "embellish",
        "ember",
        "embezzle",
        "emblaze",
        "emblem",
        "embody",
        "embolism",
        "emboss",
        "embroider",
        "emcee",
        "emerald",
        "emergency",
        "emission",
        "emit",
        "emote",
        "emoticon",
        "emotion",
        "empathic",
        "empathy",
        "emperor",
        "emphases",
        "emphasis",
        "emphasize",
        "emphatic",
        "empirical",
        "employed",
        "employee",
        "employer",
        "emporium",
        "empower",
        "emptier",
        "emptiness",
        "empty",
        "emu",
        "enable",
        "enactment",
        "enamel",
        "enchanted",
        "enchilada",
        "encircle",
        "enclose",
        "enclosure",
        "encode",
        "encore",
        "encounter",
        "encourage",
        "encroach",
        "encrust",
        "encrypt",
        "endanger",
        "endeared",
        "endearing",
        "ended",
        "ending",
        "endless",
        "endnote",
        "endocrine",
        "endorphin",
        "endorse",
        "endowment",
        "endpoint",
        "endurable",
        "endurance",
        "enduring",
        "energetic",
        "energize",
        "energy",
        "enforced",
        "enforcer",
        "engaged",
        "engaging",
        "engine",
        "engorge",
        "engraved",
        "engraver",
        "engraving",
        "engross",
        "engulf",
        "enhance",
        "enigmatic",
        "enjoyable",
        "enjoyably",
        "enjoyer",
        "enjoying",
        "enjoyment",
        "enlarged",
        "enlarging",
        "enlighten",
        "enlisted",
        "enquirer",
        "enrage",
        "enrich",
        "enroll",
        "enslave",
        "ensnare",
        "ensure",
        "entail",
        "entangled",
        "entering",
        "entertain",
        "enticing",
        "entire",
        "entitle",
        "entity",
        "entomb",
        "entourage",
        "entrap",
        "entree",
        "entrench",
        "entrust",
        "entryway",
        "entwine",
        "enunciate",
        "envelope",
        "enviable",
        "enviably",
        "envious",
        "envision",
        "envoy",
        "envy",
        "enzyme",
        "epic",
        "epidemic",
        "epidermal",
        "epidermis",
        "epidural",
        "epilepsy",
        "epileptic",
        "epilogue",
        "epiphany",
        "episode",
        "equal",
        "equate",
        "equation",
        "equator",
        "equinox",
        "equipment",
        "equity",
        "equivocal",
        "eradicate",
        "erasable",
        "erased",
        "eraser",
        "erasure",
        "ergonomic",
        "errand",
        "errant",
        "erratic",
        "error",
        "erupt",
        "escalate",
        "escalator",
        "escapable",
        "escapade",
        "escapist",
        "escargot",
        "eskimo",
        "esophagus",
        "espionage",
        "espresso",
        "esquire",
        "essay",
        "essence",
        "essential",
        "establish",
        "estate",
        "esteemed",
        "estimate",
        "estimator",
        "estranged",
        "estrogen",
        "etching",
        "eternal",
        "eternity",
        "ethanol",
        "ether",
        "ethically",
        "ethics",
        "euphemism",
        "evacuate",
        "evacuee",
        "evade",
        "evaluate",
        "evaluator",
        "evaporate",
        "evasion",
        "evasive",
        "even",
        "everglade",
        "evergreen",
        "everybody",
        "everyday",
        "everyone",
        "evict",
        "evidence",
        "evident",
        "evil",
        "evoke",
        "evolution",
        "evolve",
        "exact",
        "exalted",
        "example",
        "excavate",
        "excavator",
        "exceeding",
        "exception",
        "excess",
        "exchange",
        "excitable",
        "exciting",
        "exclaim",
        "exclude",
        "excluding",
        "exclusion",
        "exclusive",
        "excretion",
        "excretory",
        "excursion",
        "excusable",
        "excusably",
        "excuse",
        "exemplary",
        "exemplify",
        "exemption",
        "exerciser",
        "exert",
        "exes",
        "exfoliate",
        "exhale",
        "exhaust",
        "exhume",
        "exile",
        "existing",
        "exit",
        "exodus",
        "exonerate",
        "exorcism",
        "exorcist",
        "expand",
        "expanse",
        "expansion",
        "expansive",
        "expectant",
        "expedited",
        "expediter",
        "expel",
        "expend",
        "expenses",
        "expensive",
        "expert",
        "expire",
        "expiring",
        "explain",
        "expletive",
        "explicit",
        "explode",
        "exploit",
        "explore",
        "exploring",
        "exponent",
        "exporter",
        "exposable",
        "expose",
        "exposure",
        "express",
        "expulsion",
        "exquisite",
        "extended",
        "extending",
        "extent",
        "extenuate",
        "exterior",
        "external",
        "extinct",
        "extortion",
        "extradite",
        "extras",
        "extrovert",
        "extrude",
        "extruding",
        "exuberant",
        "fable",
        "fabric",
        "fabulous",
        "facebook",
        "facecloth",
        "facedown",
        "faceless",
        "facelift",
        "faceplate",
        "faceted",
        "facial",
        "facility",
        "facing",
        "facsimile",
        "faction",
        "factoid",
        "factor",
        "factsheet",
        "factual",
        "faculty",
        "fade",
        "fading",
        "failing",
        "falcon",
        "fall",
        "false",
        "falsify",
        "fame",
        "familiar",
        "family",
        "famine",
        "famished",
        "fanatic",
        "fancied",
        "fanciness",
        "fancy",
        "fanfare",
        "fang",
        "fanning",
        "fantasize",
        "fantastic",
        "fantasy",
        "fascism",
        "fastball",
        "faster",
        "fasting",
        "fastness",
        "faucet",
        "favorable",
        "favorably",
        "favored",
        "favoring",
        "favorite",
        "fax",
        "feast",
        "federal",
        "fedora",
        "feeble",
        "feed",
        "feel",
        "feisty",
        "feline",
        "felt-tip",
        "feminine",
        "feminism",
        "feminist",
        "feminize",
        "femur",
        "fence",
        "fencing",
        "fender",
        "ferment",
        "fernlike",
        "ferocious",
        "ferocity",
        "ferret",
        "ferris",
        "ferry",
        "fervor",
        "fester",
        "festival",
        "festive",
        "festivity",
        "fetal",
        "fetch",
        "fever",
        "fiber",
        "fiction",
        "fiddle",
        "fiddling",
        "fidelity",
        "fidgeting",
        "fidgety",
        "fifteen",
        "fifth",
        "fiftieth",
        "fifty",
        "figment",
        "figure",
        "figurine",
        "filing",
        "filled",
        "filler",
        "filling",
        "film",
        "filter",
        "filth",
        "filtrate",
        "finale",
        "finalist",
        "finalize",
        "finally",
        "finance",
        "financial",
        "finch",
        "fineness",
        "finer",
        "finicky",
        "finished",
        "finisher",
        "finishing",
        "finite",
        "finless",
        "finlike",
        "fiscally",
        "fit",
        "five",
        "flaccid",
        "flagman",
        "flagpole",
        "flagship",
        "flagstick",
        "flagstone",
        "flail",
        "flakily",
        "flaky",
        "flame",
        "flammable",
        "flanked",
        "flanking",
        "flannels",
        "flap",
        "flaring",
        "flashback",
        "flashbulb",
        "flashcard",
        "flashily",
        "flashing",
        "flashy",
        "flask",
        "flatbed",
        "flatfoot",
        "flatly",
        "flatness",
        "flatten",
        "flattered",
        "flatterer",
        "flattery",
        "flattop",
        "flatware",
        "flatworm",
        "flavored",
        "flavorful",
        "flavoring",
        "flaxseed",
        "fled",
        "fleshed",
        "fleshy",
        "flick",
        "flier",
        "flight",
        "flinch",
        "fling",
        "flint",
        "flip",
        "flirt",
        "float",
        "flock",
        "flogging",
        "flop",
        "floral",
        "florist",
        "floss",
        "flounder",
        "flyable",
        "flyaway",
        "flyer",
        "flying",
        "flyover",
        "flypaper",
        "foam",
        "foe",
        "fog",
        "foil",
        "folic",
        "folk",
        "follicle",
        "follow",
        "fondling",
        "fondly",
        "fondness",
        "fondue",
        "font",
        "food",
        "fool",
        "footage",
        "football",
        "footbath",
        "footboard",
        "footer",
        "footgear",
        "foothill",
        "foothold",
        "footing",
        "footless",
        "footman",
        "footnote",
        "footpad",
        "footpath",
        "footprint",
        "footrest",
        "footsie",
        "footsore",
        "footwear",
        "footwork",
        "fossil",
        "foster",
        "founder",
        "founding",
        "fountain",
        "fox",
        "foyer",
        "fraction",
        "fracture",
        "fragile",
        "fragility",
        "fragment",
        "fragrance",
        "fragrant",
        "frail",
        "frame",
        "framing",
        "frantic",
        "fraternal",
        "frayed",
        "fraying",
        "frays",
        "freckled",
        "freckles",
        "freebase",
        "freebee",
        "freebie",
        "freedom",
        "freefall",
        "freehand",
        "freeing",
        "freeload",
        "freely",
        "freemason",
        "freeness",
        "freestyle",
        "freeware",
        "freeway",
        "freewill",
        "freezable",
        "freezing",
        "freight",
        "french",
        "frenzied",
        "frenzy",
        "frequency",
        "frequent",
        "fresh",
        "fretful",
        "fretted",
        "friction",
        "friday",
        "fridge",
        "fried",
        "friend",
        "frighten",
        "frightful",
        "frigidity",
        "frigidly",
        "frill",
        "fringe",
        "frisbee",
        "frisk",
        "fritter",
        "frivolous",
        "frolic",
        "from",
        "front",
        "frostbite",
        "frosted",
        "frostily",
        "frosting",
        "frostlike",
        "frosty",
        "froth",
        "frown",
        "frozen",
        "fructose",
        "frugality",
        "frugally",
        "fruit",
        "frustrate",
        "frying",
        "gab",
        "gaffe",
        "gag",
        "gainfully",
        "gaining",
        "gains",
        "gala",
        "gallantly",
        "galleria",
        "gallery",
        "galley",
        "gallon",
        "gallows",
        "gallstone",
        "galore",
        "galvanize",
        "gambling",
        "game",
        "gaming",
        "gamma",
        "gander",
        "gangly",
        "gangrene",
        "gangway",
        "gap",
        "garage",
        "garbage",
        "garden",
        "gargle",
        "garland",
        "garlic",
        "garment",
        "garnet",
        "garnish",
        "garter",
        "gas",
        "gatherer",
        "gathering",
        "gating",
        "gauging",
        "gauntlet",
        "gauze",
        "gave",
        "gawk",
        "gazing",
        "gear",
        "gecko",
        "geek",
        "geiger",
        "gem",
        "gender",
        "generic",
        "generous",
        "genetics",
        "genre",
        "gentile",
        "gentleman",
        "gently",
        "gents",
        "geography",
        "geologic",
        "geologist",
        "geology",
        "geometric",
        "geometry",
        "geranium",
        "gerbil",
        "geriatric",
        "germicide",
        "germinate",
        "germless",
        "germproof",
        "gestate",
        "gestation",
        "gesture",
        "getaway",
        "getting",
        "getup",
        "giant",
        "gibberish",
        "giblet",
        "giddily",
        "giddiness",
        "giddy",
        "gift",
        "gigabyte",
        "gigahertz",
        "gigantic",
        "giggle",
        "giggling",
        "giggly",
        "gigolo",
        "gilled",
        "gills",
        "gimmick",
        "girdle",
        "giveaway",
        "given",
        "giver",
        "giving",
        "gizmo",
        "gizzard",
        "glacial",
        "glacier",
        "glade",
        "gladiator",
        "gladly",
        "glamorous",
        "glamour",
        "glance",
        "glancing",
        "glandular",
        "glare",
        "glaring",
        "glass",
        "glaucoma",
        "glazing",
        "gleaming",
        "gleeful",
        "glider",
        "gliding",
        "glimmer",
        "glimpse",
        "glisten",
        "glitch",
        "glitter",
        "glitzy",
        "gloater",
        "gloating",
        "gloomily",
        "gloomy",
        "glorified",
        "glorifier",
        "glorify",
        "glorious",
        "glory",
        "gloss",
        "glove",
        "glowing",
        "glowworm",
        "glucose",
        "glue",
        "gluten",
        "glutinous",
        "glutton",
        "gnarly",
        "gnat",
        "goal",
        "goatskin",
        "goes",
        "goggles",
        "going",
        "goldfish",
        "goldmine",
        "goldsmith",
        "golf",
        "goliath",
        "gonad",
        "gondola",
        "gone",
        "gong",
        "good",
        "gooey",
        "goofball",
        "goofiness",
        "goofy",
        "google",
        "goon",
        "gopher",
        "gore",
        "gorged",
        "gorgeous",
        "gory",
        "gosling",
        "gossip",
        "gothic",
        "gotten",
        "gout",
        "gown",
        "grab",
        "graceful",
        "graceless",
        "gracious",
        "gradation",
        "graded",
        "grader",
        "gradient",
        "grading",
        "gradually",
        "graduate",
        "graffiti",
        "grafted",
        "grafting",
        "grain",
        "granddad",
        "grandkid",
        "grandly",
        "grandma",
        "grandpa",
        "grandson",
        "granite",
        "granny",
        "granola",
        "grant",
        "granular",
        "grape",
        "graph",
        "grapple",
        "grappling",
        "grasp",
        "grass",
        "gratified",
        "gratify",
        "grating",
        "gratitude",
        "gratuity",
        "gravel",
        "graveness",
        "graves",
        "graveyard",
        "gravitate",
        "gravity",
        "gravy",
        "gray",
        "grazing",
        "greasily",
        "greedily",
        "greedless",
        "greedy",
        "green",
        "greeter",
        "greeting",
        "grew",
        "greyhound",
        "grid",
        "grief",
        "grievance",
        "grieving",
        "grievous",
        "grill",
        "grimace",
        "grimacing",
        "grime",
        "griminess",
        "grimy",
        "grinch",
        "grinning",
        "grip",
        "gristle",
        "grit",
        "groggily",
        "groggy",
        "groin",
        "groom",
        "groove",
        "grooving",
        "groovy",
        "grope",
        "ground",
        "grouped",
        "grout",
        "grove",
        "grower",
        "growing",
        "growl",
        "grub",
        "grudge",
        "grudging",
        "grueling",
        "gruffly",
        "grumble",
        "grumbling",
        "grumbly",
        "grumpily",
        "grunge",
        "grunt",
        "guacamole",
        "guidable",
        "guidance",
        "guide",
        "guiding",
        "guileless",
        "guise",
        "gulf",
        "gullible",
        "gully",
        "gulp",
        "gumball",
        "gumdrop",
        "gumminess",
        "gumming",
        "gummy",
        "gurgle",
        "gurgling",
        "guru",
        "gush",
        "gusto",
        "gusty",
        "gutless",
        "guts",
        "gutter",
        "guy",
        "guzzler",
        "gyration",
        "habitable",
        "habitant",
        "habitat",
        "habitual",
        "hacked",
        "hacker",
        "hacking",
        "hacksaw",
        "had",
        "haggler",
        "haiku",
        "half",
        "halogen",
        "halt",
        "halved",
        "halves",
        "hamburger",
        "hamlet",
        "hammock",
        "hamper",
        "hamster",
        "hamstring",
        "handbag",
        "handball",
        "handbook",
        "handbrake",
        "handcart",
        "handclap",
        "handclasp",
        "handcraft",
        "handcuff",
        "handed",
        "handful",
        "handgrip",
        "handgun",
        "handheld",
        "handiness",
        "handiwork",
        "handlebar",
        "handled",
        "handler",
        "handling",
        "handmade",
        "handoff",
        "handpick",
        "handprint",
        "handrail",
        "handsaw",
        "handset",
        "handsfree",
        "handshake",
        "handstand",
        "handwash",
        "handwork",
        "handwoven",
        "handwrite",
        "handyman",
        "hangnail",
        "hangout",
        "hangover",
        "hangup",
        "hankering",
        "hankie",
        "hanky",
        "haphazard",
        "happening",
        "happier",
        "happiest",
        "happily",
        "happiness",
        "happy",
        "harbor",
        "hardcopy",
        "hardcore",
        "hardcover",
        "harddisk",
        "hardened",
        "hardener",
        "hardening",
        "hardhat",
        "hardhead",
        "hardiness",
        "hardly",
        "hardness",
        "hardship",
        "hardware",
        "hardwired",
        "hardwood",
        "hardy",
        "harmful",
        "harmless",
        "harmonica",
        "harmonics",
        "harmonize",
        "harmony",
        "harness",
        "harpist",
        "harsh",
        "harvest",
        "hash",
        "hassle",
        "haste",
        "hastily",
        "hastiness",
        "hasty",
        "hatbox",
        "hatchback",
        "hatchery",
        "hatchet",
        "hatching",
        "hatchling",
        "hate",
        "hatless",
        "hatred",
        "haunt",
        "haven",
        "hazard",
        "hazelnut",
        "hazily",
        "haziness",
        "hazing",
        "hazy",
        "headache",
        "headband",
        "headboard",
        "headcount",
        "headdress",
        "headed",
        "header",
        "headfirst",
        "headgear",
        "heading",
        "headlamp",
        "headless",
        "headlock",
        "headphone",
        "headpiece",
        "headrest",
        "headroom",
        "headscarf",
        "headset",
        "headsman",
        "headstand",
        "headstone",
        "headway",
        "headwear",
        "heap",
        "heat",
        "heave",
        "heavily",
        "heaviness",
        "heaving",
        "hedge",
        "hedging",
        "heftiness",
        "hefty",
        "helium",
        "helmet",
        "helper",
        "helpful",
        "helping",
        "helpless",
        "helpline",
        "hemlock",
        "hemstitch",
        "hence",
        "henchman",
        "henna",
        "herald",
        "herbal",
        "herbicide",
        "herbs",
        "heritage",
        "hermit",
        "heroics",
        "heroism",
        "herring",
        "herself",
        "hertz",
        "hesitancy",
        "hesitant",
        "hesitate",
        "hexagon",
        "hexagram",
        "hubcap",
        "huddle",
        "huddling",
        "huff",
        "hug",
        "hula",
        "hulk",
        "hull",
        "human",
        "humble",
        "humbling",
        "humbly",
        "humid",
        "humiliate",
        "humility",
        "humming",
        "hummus",
        "humongous",
        "humorist",
        "humorless",
        "humorous",
        "humpback",
        "humped",
        "humvee",
        "hunchback",
        "hundredth",
        "hunger",
        "hungrily",
        "hungry",
        "hunk",
        "hunter",
        "hunting",
        "huntress",
        "huntsman",
        "hurdle",
        "hurled",
        "hurler",
        "hurling",
        "hurray",
        "hurricane",
        "hurried",
        "hurry",
        "hurt",
        "husband",
        "hush",
        "husked",
        "huskiness",
        "hut",
        "hybrid",
        "hydrant",
        "hydrated",
        "hydration",
        "hydrogen",
        "hydroxide",
        "hyperlink",
        "hypertext",
        "hyphen",
        "hypnoses",
        "hypnosis",
        "hypnotic",
        "hypnotism",
        "hypnotist",
        "hypnotize",
        "hypocrisy",
        "hypocrite",
        "ibuprofen",
        "ice",
        "iciness",
        "icing",
        "icky",
        "icon",
        "icy",
        "idealism",
        "idealist",
        "idealize",
        "ideally",
        "idealness",
        "identical",
        "identify",
        "identity",
        "ideology",
        "idiocy",
        "idiom",
        "idly",
        "igloo",
        "ignition",
        "ignore",
        "iguana",
        "illicitly",
        "illusion",
        "illusive",
        "image",
        "imaginary",
        "imagines",
        "imaging",
        "imbecile",
        "imitate",
        "imitation",
        "immature",
        "immerse",
        "immersion",
        "imminent",
        "immobile",
        "immodest",
        "immorally",
        "immortal",
        "immovable",
        "immovably",
        "immunity",
        "immunize",
        "impaired",
        "impale",
        "impart",
        "impatient",
        "impeach",
        "impeding",
        "impending",
        "imperfect",
        "imperial",
        "impish",
        "implant",
        "implement",
        "implicate",
        "implicit",
        "implode",
        "implosion",
        "implosive",
        "imply",
        "impolite",
        "important",
        "importer",
        "impose",
        "imposing",
        "impotence",
        "impotency",
        "impotent",
        "impound",
        "imprecise",
        "imprint",
        "imprison",
        "impromptu",
        "improper",
        "improve",
        "improving",
        "improvise",
        "imprudent",
        "impulse",
        "impulsive",
        "impure",
        "impurity",
        "iodine",
        "iodize",
        "ion",
        "ipad",
        "iphone",
        "ipod",
        "irate",
        "irk",
        "iron",
        "irregular",
        "irrigate",
        "irritable",
        "irritably",
        "irritant",
        "irritate",
        "islamic",
        "islamist",
        "isolated",
        "isolating",
        "isolation",
        "isotope",
        "issue",
        "issuing",
        "italicize",
        "italics",
        "item",
        "itinerary",
        "itunes",
        "ivory",
        "ivy",
        "jab",
        "jackal",
        "jacket",
        "jackknife",
        "jackpot",
        "jailbird",
        "jailbreak",
        "jailer",
        "jailhouse",
        "jalapeno",
        "jam",
        "janitor",
        "january",
        "jargon",
        "jarring",
        "jasmine",
        "jaundice",
        "jaunt",
        "java",
        "jawed",
        "jawless",
        "jawline",
        "jaws",
        "jaybird",
        "jaywalker",
        "jazz",
        "jeep",
        "jeeringly",
        "jellied",
        "jelly",
        "jersey",
        "jester",
        "jet",
        "jiffy",
        "jigsaw",
        "jimmy",
        "jingle",
        "jingling",
        "jinx",
        "jitters",
        "jittery",
        "job",
        "jockey",
        "jockstrap",
        "jogger",
        "jogging",
        "john",
        "joining",
        "jokester",
        "jokingly",
        "jolliness",
        "jolly",
        "jolt",
        "jot",
        "jovial",
        "joyfully",
        "joylessly",
        "joyous",
        "joyride",
        "joystick",
        "jubilance",
        "jubilant",
        "judge",
        "judgingly",
        "judicial",
        "judiciary",
        "judo",
        "juggle",
        "juggling",
        "jugular",
        "juice",
        "juiciness",
        "juicy",
        "jujitsu",
        "jukebox",
        "july",
        "jumble",
        "jumbo",
        "jump",
        "junction",
        "juncture",
        "june",
        "junior",
        "juniper",
        "junkie",
        "junkman",
        "junkyard",
        "jurist",
        "juror",
        "jury",
        "justice",
        "justifier",
        "justify",
        "justly",
        "justness",
        "juvenile",
        "kabob",
        "kangaroo",
        "karaoke",
        "karate",
        "karma",
        "kebab",
        "keenly",
        "keenness",
        "keep",
        "keg",
        "kelp",
        "kennel",
        "kept",
        "kerchief",
        "kerosene",
        "kettle",
        "kick",
        "kiln",
        "kilobyte",
        "kilogram",
        "kilometer",
        "kilowatt",
        "kilt",
        "kimono",
        "kindle",
        "kindling",
        "kindly",
        "kindness",
        "kindred",
        "kinetic",
        "kinfolk",
        "king",
        "kinship",
        "kinsman",
        "kinswoman",
        "kissable",
        "kisser",
        "kissing",
        "kitchen",
        "kite",
        "kitten",
        "kitty",
        "kiwi",
        "kleenex",
        "knapsack",
        "knee",
        "knelt",
        "knickers",
        "knoll",
        "koala",
        "kooky",
        "kosher",
        "krypton",
        "kudos",
        "kung",
        "labored",
        "laborer",
        "laboring",
        "laborious",
        "labrador",
        "ladder",
        "ladies",
        "ladle",
        "ladybug",
        "ladylike",
        "lagged",
        "lagging",
        "lagoon",
        "lair",
        "lake",
        "lance",
        "landed",
        "landfall",
        "landfill",
        "landing",
        "landlady",
        "landless",
        "landline",
        "landlord",
        "landmark",
        "landmass",
        "landmine",
        "landowner",
        "landscape",
        "landside",
        "landslide",
        "language",
        "lankiness",
        "lanky",
        "lantern",
        "lapdog",
        "lapel",
        "lapped",
        "lapping",
        "laptop",
        "lard",
        "large",
        "lark",
        "lash",
        "lasso",
        "last",
        "latch",
        "late",
        "lather",
        "latitude",
        "latrine",
        "latter",
        "latticed",
        "launch",
        "launder",
        "laundry",
        "laurel",
        "lavender",
        "lavish",
        "laxative",
        "lazily",
        "laziness",
        "lazy",
        "lecturer",
        "left",
        "legacy",
        "legal",
        "legend",
        "legged",
        "leggings",
        "legible",
        "legibly",
        "legislate",
        "lego",
        "legroom",
        "legume",
        "legwarmer",
        "legwork",
        "lemon",
        "lend",
        "length",
        "lens",
        "lent",
        "leotard",
        "lesser",
        "letdown",
        "lethargic",
        "lethargy",
        "letter",
        "lettuce",
        "level",
        "leverage",
        "levers",
        "levitate",
        "levitator",
        "liability",
        "liable",
        "liberty",
        "librarian",
        "library",
        "licking",
        "licorice",
        "lid",
        "life",
        "lifter",
        "lifting",
        "liftoff",
        "ligament",
        "likely",
        "likeness",
        "likewise",
        "liking",
        "lilac",
        "lilly",
        "lily",
        "limb",
        "limeade",
        "limelight",
        "limes",
        "limit",
        "limping",
        "limpness",
        "line",
        "lingo",
        "linguini",
        "linguist",
        "lining",
        "linked",
        "linoleum",
        "linseed",
        "lint",
        "lion",
        "lip",
        "liquefy",
        "liqueur",
        "liquid",
        "lisp",
        "list",
        "litigate",
        "litigator",
        "litmus",
        "litter",
        "little",
        "livable",
        "lived",
        "lively",
        "liver",
        "livestock",
        "lividly",
        "living",
        "lizard",
        "lubricant",
        "lubricate",
        "lucid",
        "luckily",
        "luckiness",
        "luckless",
        "lucrative",
        "ludicrous",
        "lugged",
        "lukewarm",
        "lullaby",
        "lumber",
        "luminance",
        "luminous",
        "lumpiness",
        "lumping",
        "lumpish",
        "lunacy",
        "lunar",
        "lunchbox",
        "luncheon",
        "lunchroom",
        "lunchtime",
        "lung",
        "lurch",
        "lure",
        "luridness",
        "lurk",
        "lushly",
        "lushness",
        "luster",
        "lustfully",
        "lustily",
        "lustiness",
        "lustrous",
        "lusty",
        "luxurious",
        "luxury",
        "lying",
        "lyrically",
        "lyricism",
        "lyricist",
        "lyrics",
        "macarena",
        "macaroni",
        "macaw",
        "mace",
        "machine",
        "machinist",
        "magazine",
        "magenta",
        "maggot",
        "magical",
        "magician",
        "magma",
        "magnesium",
        "magnetic",
        "magnetism",
        "magnetize",
        "magnifier",
        "magnify",
        "magnitude",
        "magnolia",
        "mahogany",
        "maimed",
        "majestic",
        "majesty",
        "majorette",
        "majority",
        "makeover",
        "maker",
        "makeshift",
        "making",
        "malformed",
        "malt",
        "mama",
        "mammal",
        "mammary",
        "mammogram",
        "manager",
        "managing",
        "manatee",
        "mandarin",
        "mandate",
        "mandatory",
        "mandolin",
        "manger",
        "mangle",
        "mango",
        "mangy",
        "manhandle",
        "manhole",
        "manhood",
        "manhunt",
        "manicotti",
        "manicure",
        "manifesto",
        "manila",
        "mankind",
        "manlike",
        "manliness",
        "manly",
        "manmade",
        "manned",
        "mannish",
        "manor",
        "manpower",
        "mantis",
        "mantra",
        "manual",
        "many",
        "map",
        "marathon",
        "marauding",
        "marbled",
        "marbles",
        "marbling",
        "march",
        "mardi",
        "margarine",
        "margarita",
        "margin",
        "marigold",
        "marina",
        "marine",
        "marital",
        "maritime",
        "marlin",
        "marmalade",
        "maroon",
        "married",
        "marrow",
        "marry",
        "marshland",
        "marshy",
        "marsupial",
        "marvelous",
        "marxism",
        "mascot",
        "masculine",
        "mashed",
        "mashing",
        "massager",
        "masses",
        "massive",
        "mastiff",
        "matador",
        "matchbook",
        "matchbox",
        "matcher",
        "matching",
        "matchless",
        "material",
        "maternal",
        "maternity",
        "math",
        "mating",
        "matriarch",
        "matrimony",
        "matrix",
        "matron",
        "matted",
        "matter",
        "maturely",
        "maturing",
        "maturity",
        "mauve",
        "maverick",
        "maximize",
        "maximum",
        "maybe",
        "mayday",
        "mayflower",
        "moaner",
        "moaning",
        "mobile",
        "mobility",
        "mobilize",
        "mobster",
        "mocha",
        "mocker",
        "mockup",
        "modified",
        "modify",
        "modular",
        "modulator",
        "module",
        "moisten",
        "moistness",
        "moisture",
        "molar",
        "molasses",
        "mold",
        "molecular",
        "molecule",
        "molehill",
        "mollusk",
        "mom",
        "monastery",
        "monday",
        "monetary",
        "monetize",
        "moneybags",
        "moneyless",
        "moneywise",
        "mongoose",
        "mongrel",
        "monitor",
        "monkhood",
        "monogamy",
        "monogram",
        "monologue",
        "monopoly",
        "monorail",
        "monotone",
        "monotype",
        "monoxide",
        "monsieur",
        "monsoon",
        "monstrous",
        "monthly",
        "monument",
        "moocher",
        "moodiness",
        "moody",
        "mooing",
        "moonbeam",
        "mooned",
        "moonlight",
        "moonlike",
        "moonlit",
        "moonrise",
        "moonscape",
        "moonshine",
        "moonstone",
        "moonwalk",
        "mop",
        "morale",
        "morality",
        "morally",
        "morbidity",
        "morbidly",
        "morphine",
        "morphing",
        "morse",
        "mortality",
        "mortally",
        "mortician",
        "mortified",
        "mortify",
        "mortuary",
        "mosaic",
        "mossy",
        "most",
        "mothball",
        "mothproof",
        "motion",
        "motivate",
        "motivator",
        "motive",
        "motocross",
        "motor",
        "motto",
        "mountable",
        "mountain",
        "mounted",
        "mounting",
        "mourner",
        "mournful",
        "mouse",
        "mousiness",
        "moustache",
        "mousy",
        "mouth",
        "movable",
        "move",
        "movie",
        "moving",
        "mower",
        "mowing",
        "much",
        "muck",
        "mud",
        "mug",
        "mulberry",
        "mulch",
        "mule",
        "mulled",
        "mullets",
        "multiple",
        "multiply",
        "multitask",
        "multitude",
        "mumble",
        "mumbling",
        "mumbo",
        "mummified",
        "mummify",
        "mummy",
        "mumps",
        "munchkin",
        "mundane",
        "municipal",
        "muppet",
        "mural",
        "murkiness",
        "murky",
        "murmuring",
        "muscular",
        "museum",
        "mushily",
        "mushiness",
        "mushroom",
        "mushy",
        "music",
        "musket",
        "muskiness",
        "musky",
        "mustang",
        "mustard",
        "muster",
        "mustiness",
        "musty",
        "mutable",
        "mutate",
        "mutation",
        "mute",
        "mutilated",
        "mutilator",
        "mutiny",
        "mutt",
        "mutual",
        "muzzle",
        "myself",
        "myspace",
        "mystified",
        "mystify",
        "myth",
        "nacho",
        "nag",
        "nail",
        "name",
        "naming",
        "nanny",
        "nanometer",
        "nape",
        "napkin",
        "napped",
        "napping",
        "nappy",
        "narrow",
        "nastily",
        "nastiness",
        "national",
        "native",
        "nativity",
        "natural",
        "nature",
        "naturist",
        "nautical",
        "navigate",
        "navigator",
        "navy",
        "nearby",
        "nearest",
        "nearly",
        "nearness",
        "neatly",
        "neatness",
        "nebula",
        "nebulizer",
        "nectar",
        "negate",
        "negation",
        "negative",
        "neglector",
        "negligee",
        "negligent",
        "negotiate",
        "nemeses",
        "nemesis",
        "neon",
        "nephew",
        "nerd",
        "nervous",
        "nervy",
        "nest",
        "net",
        "neurology",
        "neuron",
        "neurosis",
        "neurotic",
        "neuter",
        "neutron",
        "never",
        "next",
        "nibble",
        "nickname",
        "nicotine",
        "niece",
        "nifty",
        "nimble",
        "nimbly",
        "nineteen",
        "ninetieth",
        "ninja",
        "nintendo",
        "ninth",
        "nuclear",
        "nuclei",
        "nucleus",
        "nugget",
        "nullify",
        "number",
        "numbing",
        "numbly",
        "numbness",
        "numeral",
        "numerate",
        "numerator",
        "numeric",
        "numerous",
        "nuptials",
        "nursery",
        "nursing",
        "nurture",
        "nutcase",
        "nutlike",
        "nutmeg",
        "nutrient",
        "nutshell",
        "nuttiness",
        "nutty",
        "nuzzle",
        "nylon",
        "oaf",
        "oak",
        "oasis",
        "oat",
        "obedience",
        "obedient",
        "obituary",
        "object",
        "obligate",
        "obliged",
        "oblivion",
        "oblivious",
        "oblong",
        "obnoxious",
        "oboe",
        "obscure",
        "obscurity",
        "observant",
        "observer",
        "observing",
        "obsessed",
        "obsession",
        "obsessive",
        "obsolete",
        "obstacle",
        "obstinate",
        "obstruct",
        "obtain",
        "obtrusive",
        "obtuse",
        "obvious",
        "occultist",
        "occupancy",
        "occupant",
        "occupier",
        "occupy",
        "ocean",
        "ocelot",
        "octagon",
        "octane",
        "october",
        "octopus",
        "ogle",
        "oil",
        "oink",
        "ointment",
        "okay",
        "old",
        "olive",
        "olympics",
        "omega",
        "omen",
        "ominous",
        "omission",
        "omit",
        "omnivore",
        "onboard",
        "oncoming",
        "ongoing",
        "onion",
        "online",
        "onlooker",
        "only",
        "onscreen",
        "onset",
        "onshore",
        "onslaught",
        "onstage",
        "onto",
        "onward",
        "onyx",
        "oops",
        "ooze",
        "oozy",
        "opacity",
        "opal",
        "open",
        "operable",
        "operate",
        "operating",
        "operation",
        "operative",
        "operator",
        "opium",
        "opossum",
        "opponent",
        "oppose",
        "opposing",
        "opposite",
        "oppressed",
        "oppressor",
        "opt",
        "opulently",
        "osmosis",
        "other",
        "otter",
        "ouch",
        "ought",
        "ounce",
        "outage",
        "outback",
        "outbid",
        "outboard",
        "outbound",
        "outbreak",
        "outburst",
        "outcast",
        "outclass",
        "outcome",
        "outdated",
        "outdoors",
        "outer",
        "outfield",
        "outfit",
        "outflank",
        "outgoing",
        "outgrow",
        "outhouse",
        "outing",
        "outlast",
        "outlet",
        "outline",
        "outlook",
        "outlying",
        "outmatch",
        "outmost",
        "outnumber",
        "outplayed",
        "outpost",
        "outpour",
        "output",
        "outrage",
        "outrank",
        "outreach",
        "outright",
        "outscore",
        "outsell",
        "outshine",
        "outshoot",
        "outsider",
        "outskirts",
        "outsmart",
        "outsource",
        "outspoken",
        "outtakes",
        "outthink",
        "outward",
        "outweigh",
        "outwit",
        "oval",
        "ovary",
        "oven",
        "overact",
        "overall",
        "overarch",
        "overbid",
        "overbill",
        "overbite",
        "overblown",
        "overboard",
        "overbook",
        "overbuilt",
        "overcast",
        "overcoat",
        "overcome",
        "overcook",
        "overcrowd",
        "overdraft",
        "overdrawn",
        "overdress",
        "overdrive",
        "overdue",
        "overeager",
        "overeater",
        "overexert",
        "overfed",
        "overfeed",
        "overfill",
        "overflow",
        "overfull",
        "overgrown",
        "overhand",
        "overhang",
        "overhaul",
        "overhead",
        "overhear",
        "overheat",
        "overhung",
        "overjoyed",
        "overkill",
        "overlabor",
        "overlaid",
        "overlap",
        "overlay",
        "overload",
        "overlook",
        "overlord",
        "overlying",
        "overnight",
        "overpass",
        "overpay",
        "overplant",
        "overplay",
        "overpower",
        "overprice",
        "overrate",
        "overreach",
        "overreact",
        "override",
        "overripe",
        "overrule",
        "overrun",
        "overshoot",
        "overshot",
        "oversight",
        "oversized",
        "oversleep",
        "oversold",
        "overspend",
        "overstate",
        "overstay",
        "overstep",
        "overstock",
        "overstuff",
        "oversweet",
        "overtake",
        "overthrow",
        "overtime",
        "overtly",
        "overtone",
        "overture",
        "overturn",
        "overuse",
        "overvalue",
        "overview",
        "overwrite",
        "owl",
        "oxford",
        "oxidant",
        "oxidation",
        "oxidize",
        "oxidizing",
        "oxygen",
        "oxymoron",
        "oyster",
        "ozone",
        "paced",
        "pacemaker",
        "pacific",
        "pacifier",
        "pacifism",
        "pacifist",
        "pacify",
        "padded",
        "padding",
        "paddle",
        "paddling",
        "padlock",
        "pagan",
        "pager",
        "paging",
        "pajamas",
        "palace",
        "palatable",
        "palm",
        "palpable",
        "palpitate",
        "paltry",
        "pampered",
        "pamperer",
        "pampers",
        "pamphlet",
        "panama",
        "pancake",
        "pancreas",
        "panda",
        "pandemic",
        "pang",
        "panhandle",
        "panic",
        "panning",
        "panorama",
        "panoramic",
        "panther",
        "pantomime",
        "pantry",
        "pants",
        "pantyhose",
        "paparazzi",
        "papaya",
        "paper",
        "paprika",
        "papyrus",
        "parabola",
        "parachute",
        "parade",
        "paradox",
        "paragraph",
        "parakeet",
        "paralegal",
        "paralyses",
        "paralysis",
        "paralyze",
        "paramedic",
        "parameter",
        "paramount",
        "parasail",
        "parasite",
        "parasitic",
        "parcel",
        "parched",
        "parchment",
        "pardon",
        "parish",
        "parka",
        "parking",
        "parkway",
        "parlor",
        "parmesan",
        "parole",
        "parrot",
        "parsley",
        "parsnip",
        "partake",
        "parted",
        "parting",
        "partition",
        "partly",
        "partner",
        "partridge",
        "party",
        "passable",
        "passably",
        "passage",
        "passcode",
        "passenger",
        "passerby",
        "passing",
        "passion",
        "passive",
        "passivism",
        "passover",
        "passport",
        "password",
        "pasta",
        "pasted",
        "pastel",
        "pastime",
        "pastor",
        "pastrami",
        "pasture",
        "pasty",
        "patchwork",
        "patchy",
        "paternal",
        "paternity",
        "path",
        "patience",
        "patient",
        "patio",
        "patriarch",
        "patriot",
        "patrol",
        "patronage",
        "patronize",
        "pauper",
        "pavement",
        "paver",
        "pavestone",
        "pavilion",
        "paving",
        "pawing",
        "payable",
        "payback",
        "paycheck",
        "payday",
        "payee",
        "payer",
        "paying",
        "payment",
        "payphone",
        "payroll",
        "pebble",
        "pebbly",
        "pecan",
        "pectin",
        "peculiar",
        "peddling",
        "pediatric",
        "pedicure",
        "pedigree",
        "pedometer",
        "pegboard",
        "pelican",
        "pellet",
        "pelt",
        "pelvis",
        "penalize",
        "penalty",
        "pencil",
        "pendant",
        "pending",
        "penholder",
        "penknife",
        "pennant",
        "penniless",
        "penny",
        "penpal",
        "pension",
        "pentagon",
        "pentagram",
        "pep",
        "perceive",
        "percent",
        "perch",
        "percolate",
        "perennial",
        "perfected",
        "perfectly",
        "perfume",
        "periscope",
        "perish",
        "perjurer",
        "perjury",
        "perkiness",
        "perky",
        "perm",
        "peroxide",
        "perpetual",
        "perplexed",
        "persecute",
        "persevere",
        "persuaded",
        "persuader",
        "pesky",
        "peso",
        "pessimism",
        "pessimist",
        "pester",
        "pesticide",
        "petal",
        "petite",
        "petition",
        "petri",
        "petroleum",
        "petted",
        "petticoat",
        "pettiness",
        "petty",
        "petunia",
        "phantom",
        "phobia",
        "phoenix",
        "phonebook",
        "phoney",
        "phonics",
        "phoniness",
        "phony",
        "phosphate",
        "photo",
        "phrase",
        "phrasing",
        "placard",
        "placate",
        "placidly",
        "plank",
        "planner",
        "plant",
        "plasma",
        "plaster",
        "plastic",
        "plated",
        "platform",
        "plating",
        "platinum",
        "platonic",
        "platter",
        "platypus",
        "plausible",
        "plausibly",
        "playable",
        "playback",
        "player",
        "playful",
        "playgroup",
        "playhouse",
        "playing",
        "playlist",
        "playmaker",
        "playmate",
        "playoff",
        "playpen",
        "playroom",
        "playset",
        "plaything",
        "playtime",
        "plaza",
        "pleading",
        "pleat",
        "pledge",
        "plentiful",
        "plenty",
        "plethora",
        "plexiglas",
        "pliable",
        "plod",
        "plop",
        "plot",
        "plow",
        "ploy",
        "pluck",
        "plug",
        "plunder",
        "plunging",
        "plural",
        "plus",
        "plutonium",
        "plywood",
        "poach",
        "pod",
        "poem",
        "poet",
        "pogo",
        "pointed",
        "pointer",
        "pointing",
        "pointless",
        "pointy",
        "poise",
        "poison",
        "poker",
        "poking",
        "polar",
        "police",
        "policy",
        "polio",
        "polish",
        "politely",
        "polka",
        "polo",
        "polyester",
        "polygon",
        "polygraph",
        "polymer",
        "poncho",
        "pond",
        "pony",
        "popcorn",
        "pope",
        "poplar",
        "popper",
        "poppy",
        "popsicle",
        "populace",
        "popular",
        "populate",
        "porcupine",
        "pork",
        "porous",
        "porridge",
        "portable",
        "portal",
        "portfolio",
        "porthole",
        "portion",
        "portly",
        "portside",
        "poser",
        "posh",
        "posing",
        "possible",
        "possibly",
        "possum",
        "postage",
        "postal",
        "postbox",
        "postcard",
        "posted",
        "poster",
        "posting",
        "postnasal",
        "posture",
        "postwar",
        "pouch",
        "pounce",
        "pouncing",
        "pound",
        "pouring",
        "pout",
        "powdered",
        "powdering",
        "powdery",
        "power",
        "powwow",
        "pox",
        "praising",
        "prance",
        "prancing",
        "pranker",
        "prankish",
        "prankster",
        "prayer",
        "praying",
        "preacher",
        "preaching",
        "preachy",
        "preamble",
        "precinct",
        "precise",
        "precision",
        "precook",
        "precut",
        "predator",
        "predefine",
        "predict",
        "preface",
        "prefix",
        "preflight",
        "preformed",
        "pregame",
        "pregnancy",
        "pregnant",
        "preheated",
        "prelaunch",
        "prelaw",
        "prelude",
        "premiere",
        "premises",
        "premium",
        "prenatal",
        "preoccupy",
        "preorder",
        "prepaid",
        "prepay",
        "preplan",
        "preppy",
        "preschool",
        "prescribe",
        "preseason",
        "preset",
        "preshow",
        "president",
        "presoak",
        "press",
        "presume",
        "presuming",
        "preteen",
        "pretended",
        "pretender",
        "pretense",
        "pretext",
        "pretty",
        "pretzel",
        "prevail",
        "prevalent",
        "prevent",
        "preview",
        "previous",
        "prewar",
        "prewashed",
        "prideful",
        "pried",
        "primal",
        "primarily",
        "primary",
        "primate",
        "primer",
        "primp",
        "princess",
        "print",
        "prior",
        "prism",
        "prison",
        "prissy",
        "pristine",
        "privacy",
        "private",
        "privatize",
        "prize",
        "proactive",
        "probable",
        "probably",
        "probation",
        "probe",
        "probing",
        "probiotic",
        "problem",
        "procedure",
        "process",
        "proclaim",
        "procreate",
        "procurer",
        "prodigal",
        "prodigy",
        "produce",
        "product",
        "profane",
        "profanity",
        "professed",
        "professor",
        "profile",
        "profound",
        "profusely",
        "progeny",
        "prognosis",
        "program",
        "progress",
        "projector",
        "prologue",
        "prolonged",
        "promenade",
        "prominent",
        "promoter",
        "promotion",
        "prompter",
        "promptly",
        "prone",
        "prong",
        "pronounce",
        "pronto",
        "proofing",
        "proofread",
        "proofs",
        "propeller",
        "properly",
        "property",
        "proponent",
        "proposal",
        "propose",
        "props",
        "prorate",
        "protector",
        "protegee",
        "proton",
        "prototype",
        "protozoan",
        "protract",
        "protrude",
        "proud",
        "provable",
        "proved",
        "proven",
        "provided",
        "provider",
        "providing",
        "province",
        "proving",
        "provoke",
        "provoking",
        "provolone",
        "prowess",
        "prowler",
        "prowling",
        "proximity",
        "proxy",
        "prozac",
        "prude",
        "prudishly",
        "prune",
        "pruning",
        "pry",
        "psychic",
        "public",
        "publisher",
        "pucker",
        "pueblo",
        "pug",
        "pull",
        "pulmonary",
        "pulp",
        "pulsate",
        "pulse",
        "pulverize",
        "puma",
        "pumice",
        "pummel",
        "punch",
        "punctual",
        "punctuate",
        "punctured",
        "pungent",
        "punisher",
        "punk",
        "pupil",
        "puppet",
        "puppy",
        "purchase",
        "pureblood",
        "purebred",
        "purely",
        "pureness",
        "purgatory",
        "purge",
        "purging",
        "purifier",
        "purify",
        "purist",
        "puritan",
        "purity",
        "purple",
        "purplish",
        "purposely",
        "purr",
        "purse",
        "pursuable",
        "pursuant",
        "pursuit",
        "purveyor",
        "pushcart",
        "pushchair",
        "pusher",
        "pushiness",
        "pushing",
        "pushover",
        "pushpin",
        "pushup",
        "pushy",
        "putdown",
        "putt",
        "puzzle",
        "puzzling",
        "pyramid",
        "pyromania",
        "python",
        "quack",
        "quadrant",
        "quail",
        "quaintly",
        "quake",
        "quaking",
        "qualified",
        "qualifier",
        "qualify",
        "quality",
        "qualm",
        "quantum",
        "quarrel",
        "quarry",
        "quartered",
        "quarterly",
        "quarters",
        "quartet",
        "quench",
        "query",
        "quicken",
        "quickly",
        "quickness",
        "quicksand",
        "quickstep",
        "quiet",
        "quill",
        "quilt",
        "quintet",
        "quintuple",
        "quirk",
        "quit",
        "quiver",
        "quizzical",
        "quotable",
        "quotation",
        "quote",
        "rabid",
        "race",
        "racing",
        "racism",
        "rack",
        "racoon",
        "radar",
        "radial",
        "radiance",
        "radiantly",
        "radiated",
        "radiation",
        "radiator",
        "radio",
        "radish",
        "raffle",
        "raft",
        "rage",
        "ragged",
        "raging",
        "ragweed",
        "raider",
        "railcar",
        "railing",
        "railroad",
        "railway",
        "raisin",
        "rake",
        "raking",
        "rally",
        "ramble",
        "rambling",
        "ramp",
        "ramrod",
        "ranch",
        "rancidity",
        "random",
        "ranged",
        "ranger",
        "ranging",
        "ranked",
        "ranking",
        "ransack",
        "ranting",
        "rants",
        "rare",
        "rarity",
        "rascal",
        "rash",
        "rasping",
        "ravage",
        "raven",
        "ravine",
        "raving",
        "ravioli",
        "ravishing",
        "reabsorb",
        "reach",
        "reacquire",
        "reaction",
        "reactive",
        "reactor",
        "reaffirm",
        "ream",
        "reanalyze",
        "reappear",
        "reapply",
        "reappoint",
        "reapprove",
        "rearrange",
        "rearview",
        "reason",
        "reassign",
        "reassure",
        "reattach",
        "reawake",
        "rebalance",
        "rebate",
        "rebel",
        "rebirth",
        "reboot",
        "reborn",
        "rebound",
        "rebuff",
        "rebuild",
        "rebuilt",
        "reburial",
        "rebuttal",
        "recall",
        "recant",
        "recapture",
        "recast",
        "recede",
        "recent",
        "recess",
        "recharger",
        "recipient",
        "recital",
        "recite",
        "reckless",
        "reclaim",
        "recliner",
        "reclining",
        "recluse",
        "reclusive",
        "recognize",
        "recoil",
        "recollect",
        "recolor",
        "reconcile",
        "reconfirm",
        "reconvene",
        "recopy",
        "record",
        "recount",
        "recoup",
        "recovery",
        "recreate",
        "rectal",
        "rectangle",
        "rectified",
        "rectify",
        "recycled",
        "recycler",
        "recycling",
        "reemerge",
        "reenact",
        "reenter",
        "reentry",
        "reexamine",
        "referable",
        "referee",
        "reference",
        "refill",
        "refinance",
        "refined",
        "refinery",
        "refining",
        "refinish",
        "reflected",
        "reflector",
        "reflex",
        "reflux",
        "refocus",
        "refold",
        "reforest",
        "reformat",
        "reformed",
        "reformer",
        "reformist",
        "refract",
        "refrain",
        "refreeze",
        "refresh",
        "refried",
        "refueling",
        "refund",
        "refurbish",
        "refurnish",
        "refusal",
        "refuse",
        "refusing",
        "refutable",
        "refute",
        "regain",
        "regalia",
        "regally",
        "reggae",
        "regime",
        "region",
        "register",
        "registrar",
        "registry",
        "regress",
        "regretful",
        "regroup",
        "regular",
        "regulate",
        "regulator",
        "rehab",
        "reheat",
        "rehire",
        "rehydrate",
        "reimburse",
        "reissue",
        "reiterate",
        "rejoice",
        "rejoicing",
        "rejoin",
        "rekindle",
        "relapse",
        "relapsing",
        "relatable",
        "related",
        "relation",
        "relative",
        "relax",
        "relay",
        "relearn",
        "release",
        "relenting",
        "reliable",
        "reliably",
        "reliance",
        "reliant",
        "relic",
        "relieve",
        "relieving",
        "relight",
        "relish",
        "relive",
        "reload",
        "relocate",
        "relock",
        "reluctant",
        "rely",
        "remake",
        "remark",
        "remarry",
        "rematch",
        "remedial",
        "remedy",
        "remember",
        "reminder",
        "remindful",
        "remission",
        "remix",
        "remnant",
        "remodeler",
        "remold",
        "remorse",
        "remote",
        "removable",
        "removal",
        "removed",
        "remover",
        "removing",
        "rename",
        "renderer",
        "rendering",
        "rendition",
        "renegade",
        "renewable",
        "renewably",
        "renewal",
        "renewed",
        "renounce",
        "renovate",
        "renovator",
        "rentable",
        "rental",
        "rented",
        "renter",
        "reoccupy",
        "reoccur",
        "reopen",
        "reorder",
        "repackage",
        "repacking",
        "repaint",
        "repair",
        "repave",
        "repaying",
        "repayment",
        "repeal",
        "repeated",
        "repeater",
        "repent",
        "rephrase",
        "replace",
        "replay",
        "replica",
        "reply",
        "reporter",
        "repose",
        "repossess",
        "repost",
        "repressed",
        "reprimand",
        "reprint",
        "reprise",
        "reproach",
        "reprocess",
        "reproduce",
        "reprogram",
        "reps",
        "reptile",
        "reptilian",
        "repugnant",
        "repulsion",
        "repulsive",
        "repurpose",
        "reputable",
        "reputably",
        "request",
        "require",
        "requisite",
        "reroute",
        "rerun",
        "resale",
        "resample",
        "rescuer",
        "reseal",
        "research",
        "reselect",
        "reseller",
        "resemble",
        "resend",
        "resent",
        "reset",
        "reshape",
        "reshoot",
        "reshuffle",
        "residence",
        "residency",
        "resident",
        "residual",
        "residue",
        "resigned",
        "resilient",
        "resistant",
        "resisting",
        "resize",
        "resolute",
        "resolved",
        "resonant",
        "resonate",
        "resort",
        "resource",
        "respect",
        "resubmit",
        "result",
        "resume",
        "resupply",
        "resurface",
        "resurrect",
        "retail",
        "retainer",
        "retaining",
        "retake",
        "retaliate",
        "retention",
        "rethink",
        "retinal",
        "retired",
        "retiree",
        "retiring",
        "retold",
        "retool",
        "retorted",
        "retouch",
        "retrace",
        "retract",
        "retrain",
        "retread",
        "retreat",
        "retrial",
        "retrieval",
        "retriever",
        "retry",
        "return",
        "retying",
        "retype",
        "reunion",
        "reunite",
        "reusable",
        "reuse",
        "reveal",
        "reveler",
        "revenge",
        "revenue",
        "reverb",
        "revered",
        "reverence",
        "reverend",
        "reversal",
        "reverse",
        "reversing",
        "reversion",
        "revert",
        "revisable",
        "revise",
        "revision",
        "revisit",
        "revivable",
        "revival",
        "reviver",
        "reviving",
        "revocable",
        "revoke",
        "revolt",
        "revolver",
        "revolving",
        "reward",
        "rewash",
        "rewind",
        "rewire",
        "reword",
        "rework",
        "rewrap",
        "rewrite",
        "rhyme",
        "ribbon",
        "ribcage",
        "rice",
        "riches",
        "richly",
        "richness",
        "rickety",
        "ricotta",
        "riddance",
        "ridden",
        "ride",
        "riding",
        "rifling",
        "rift",
        "rigging",
        "rigid",
        "rigor",
        "rimless",
        "rimmed",
        "rind",
        "rink",
        "rinse",
        "rinsing",
        "riot",
        "ripcord",
        "ripeness",
        "ripening",
        "ripping",
        "ripple",
        "rippling",
        "riptide",
        "rise",
        "rising",
        "risk",
        "risotto",
        "ritalin",
        "ritzy",
        "rival",
        "riverbank",
        "riverbed",
        "riverboat",
        "riverside",
        "riveter",
        "riveting",
        "roamer",
        "roaming",
        "roast",
        "robbing",
        "robe",
        "robin",
        "robotics",
        "robust",
        "rockband",
        "rocker",
        "rocket",
        "rockfish",
        "rockiness",
        "rocking",
        "rocklike",
        "rockslide",
        "rockstar",
        "rocky",
        "rogue",
        "roman",
        "romp",
        "rope",
        "roping",
        "roster",
        "rosy",
        "rotten",
        "rotting",
        "rotunda",
        "roulette",
        "rounding",
        "roundish",
        "roundness",
        "roundup",
        "roundworm",
        "routine",
        "routing",
        "rover",
        "roving",
        "royal",
        "rubbed",
        "rubber",
        "rubbing",
        "rubble",
        "rubdown",
        "ruby",
        "ruckus",
        "rudder",
        "rug",
        "ruined",
        "rule",
        "rumble",
        "rumbling",
        "rummage",
        "rumor",
        "runaround",
        "rundown",
        "runner",
        "running",
        "runny",
        "runt",
        "runway",
        "rupture",
        "rural",
        "ruse",
        "rush",
        "rust",
        "rut",
        "sabbath",
        "sabotage",
        "sacrament",
        "sacred",
        "sacrifice",
        "sadden",
        "saddlebag",
        "saddled",
        "saddling",
        "sadly",
        "sadness",
        "safari",
        "safeguard",
        "safehouse",
        "safely",
        "safeness",
        "saffron",
        "saga",
        "sage",
        "sagging",
        "saggy",
        "said",
        "saint",
        "sake",
        "salad",
        "salami",
        "salaried",
        "salary",
        "saline",
        "salon",
        "saloon",
        "salsa",
        "salt",
        "salutary",
        "salute",
        "salvage",
        "salvaging",
        "salvation",
        "same",
        "sample",
        "sampling",
        "sanction",
        "sanctity",
        "sanctuary",
        "sandal",
        "sandbag",
        "sandbank",
        "sandbar",
        "sandblast",
        "sandbox",
        "sanded",
        "sandfish",
        "sanding",
        "sandlot",
        "sandpaper",
        "sandpit",
        "sandstone",
        "sandstorm",
        "sandworm",
        "sandy",
        "sanitary",
        "sanitizer",
        "sank",
        "santa",
        "sapling",
        "sappiness",
        "sappy",
        "sarcasm",
        "sarcastic",
        "sardine",
        "sash",
        "sasquatch",
        "sassy",
        "satchel",
        "satiable",
        "satin",
        "satirical",
        "satisfied",
        "satisfy",
        "saturate",
        "saturday",
        "sauciness",
        "saucy",
        "sauna",
        "savage",
        "savanna",
        "saved",
        "savings",
        "savior",
        "savor",
        "saxophone",
        "say",
        "scabbed",
        "scabby",
        "scalded",
        "scalding",
        "scale",
        "scaling",
        "scallion",
        "scallop",
        "scalping",
        "scam",
        "scandal",
        "scanner",
        "scanning",
        "scant",
        "scapegoat",
        "scarce",
        "scarcity",
        "scarecrow",
        "scared",
        "scarf",
        "scarily",
        "scariness",
        "scarring",
        "scary",
        "scavenger",
        "scenic",
        "schedule",
        "schematic",
        "scheme",
        "scheming",
        "schilling",
        "schnapps",
        "scholar",
        "science",
        "scientist",
        "scion",
        "scoff",
        "scolding",
        "scone",
        "scoop",
        "scooter",
        "scope",
        "scorch",
        "scorebook",
        "scorecard",
        "scored",
        "scoreless",
        "scorer",
        "scoring",
        "scorn",
        "scorpion",
        "scotch",
        "scoundrel",
        "scoured",
        "scouring",
        "scouting",
        "scouts",
        "scowling",
        "scrabble",
        "scraggly",
        "scrambled",
        "scrambler",
        "scrap",
        "scratch",
        "scrawny",
        "screen",
        "scribble",
        "scribe",
        "scribing",
        "scrimmage",
        "script",
        "scroll",
        "scrooge",
        "scrounger",
        "scrubbed",
        "scrubber",
        "scruffy",
        "scrunch",
        "scrutiny",
        "scuba",
        "scuff",
        "sculptor",
        "sculpture",
        "scurvy",
        "scuttle",
        "secluded",
        "secluding",
        "seclusion",
        "second",
        "secrecy",
        "secret",
        "sectional",
        "sector",
        "secular",
        "securely",
        "security",
        "sedan",
        "sedate",
        "sedation",
        "sedative",
        "sediment",
        "seduce",
        "seducing",
        "segment",
        "seismic",
        "seizing",
        "seldom",
        "selected",
        "selection",
        "selective",
        "selector",
        "self",
        "seltzer",
        "semantic",
        "semester",
        "semicolon",
        "semifinal",
        "seminar",
        "semisoft",
        "semisweet",
        "senate",
        "senator",
        "send",
        "senior",
        "senorita",
        "sensation",
        "sensitive",
        "sensitize",
        "sensually",
        "sensuous",
        "sepia",
        "september",
        "septic",
        "septum",
        "sequel",
        "sequence",
        "sequester",
        "series",
        "sermon",
        "serotonin",
        "serpent",
        "serrated",
        "serve",
        "service",
        "serving",
        "sesame",
        "sessions",
        "setback",
        "setting",
        "settle",
        "settling",
        "setup",
        "sevenfold",
        "seventeen",
        "seventh",
        "seventy",
        "severity",
        "shabby",
        "shack",
        "shaded",
        "shadily",
        "shadiness",
        "shading",
        "shadow",
        "shady",
        "shaft",
        "shakable",
        "shakily",
        "shakiness",
        "shaking",
        "shaky",
        "shale",
        "shallot",
        "shallow",
        "shame",
        "shampoo",
        "shamrock",
        "shank",
        "shanty",
        "shape",
        "shaping",
        "share",
        "sharpener",
        "sharper",
        "sharpie",
        "sharply",
        "sharpness",
        "shawl",
        "sheath",
        "shed",
        "sheep",
        "sheet",
        "shelf",
        "shell",
        "shelter",
        "shelve",
        "shelving",
        "sherry",
        "shield",
        "shifter",
        "shifting",
        "shiftless",
        "shifty",
        "shimmer",
        "shimmy",
        "shindig",
        "shine",
        "shingle",
        "shininess",
        "shining",
        "shiny",
        "ship",
        "shirt",
        "shivering",
        "shock",
        "shone",
        "shoplift",
        "shopper",
        "shopping",
        "shoptalk",
        "shore",
        "shortage",
        "shortcake",
        "shortcut",
        "shorten",
        "shorter",
        "shorthand",
        "shortlist",
        "shortly",
        "shortness",
        "shorts",
        "shortwave",
        "shorty",
        "shout",
        "shove",
        "showbiz",
        "showcase",
        "showdown",
        "shower",
        "showgirl",
        "showing",
        "showman",
        "shown",
        "showoff",
        "showpiece",
        "showplace",
        "showroom",
        "showy",
        "shrank",
        "shrapnel",
        "shredder",
        "shredding",
        "shrewdly",
        "shriek",
        "shrill",
        "shrimp",
        "shrine",
        "shrink",
        "shrivel",
        "shrouded",
        "shrubbery",
        "shrubs",
        "shrug",
        "shrunk",
        "shucking",
        "shudder",
        "shuffle",
        "shuffling",
        "shun",
        "shush",
        "shut",
        "shy",
        "siamese",
        "siberian",
        "sibling",
        "siding",
        "sierra",
        "siesta",
        "sift",
        "sighing",
        "silenced",
        "silencer",
        "silent",
        "silica",
        "silicon",
        "silk",
        "silliness",
        "silly",
        "silo",
        "silt",
        "silver",
        "similarly",
        "simile",
        "simmering",
        "simple",
        "simplify",
        "simply",
        "sincere",
        "sincerity",
        "singer",
        "singing",
        "single",
        "singular",
        "sinister",
        "sinless",
        "sinner",
        "sinuous",
        "sip",
        "siren",
        "sister",
        "sitcom",
        "sitter",
        "sitting",
        "situated",
        "situation",
        "sixfold",
        "sixteen",
        "sixth",
        "sixties",
        "sixtieth",
        "sixtyfold",
        "sizable",
        "sizably",
        "size",
        "sizing",
        "sizzle",
        "sizzling",
        "skater",
        "skating",
        "skedaddle",
        "skeletal",
        "skeleton",
        "skeptic",
        "sketch",
        "skewed",
        "skewer",
        "skid",
        "skied",
        "skier",
        "skies",
        "skiing",
        "skilled",
        "skillet",
        "skillful",
        "skimmed",
        "skimmer",
        "skimming",
        "skimpily",
        "skincare",
        "skinhead",
        "skinless",
        "skinning",
        "skinny",
        "skintight",
        "skipper",
        "skipping",
        "skirmish",
        "skirt",
        "skittle",
        "skydiver",
        "skylight",
        "skyline",
        "skype",
        "skyrocket",
        "skyward",
        "slab",
        "slacked",
        "slacker",
        "slacking",
        "slackness",
        "slacks",
        "slain",
        "slam",
        "slander",
        "slang",
        "slapping",
        "slapstick",
        "slashed",
        "slashing",
        "slate",
        "slather",
        "slaw",
        "sled",
        "sleek",
        "sleep",
        "sleet",
        "sleeve",
        "slept",
        "sliceable",
        "sliced",
        "slicer",
        "slicing",
        "slick",
        "slider",
        "slideshow",
        "sliding",
        "slighted",
        "slighting",
        "slightly",
        "slimness",
        "slimy",
        "slinging",
        "slingshot",
        "slinky",
        "slip",
        "slit",
        "sliver",
        "slobbery",
        "slogan",
        "sloped",
        "sloping",
        "sloppily",
        "sloppy",
        "slot",
        "slouching",
        "slouchy",
        "sludge",
        "slug",
        "slum",
        "slurp",
        "slush",
        "sly",
        "small",
        "smartly",
        "smartness",
        "smasher",
        "smashing",
        "smashup",
        "smell",
        "smelting",
        "smile",
        "smilingly",
        "smirk",
        "smite",
        "smith",
        "smitten",
        "smock",
        "smog",
        "smoked",
        "smokeless",
        "smokiness",
        "smoking",
        "smoky",
        "smolder",
        "smooth",
        "smother",
        "smudge",
        "smudgy",
        "smuggler",
        "smuggling",
        "smugly",
        "smugness",
        "snack",
        "snagged",
        "snaking",
        "snap",
        "snare",
        "snarl",
        "snazzy",
        "sneak",
        "sneer",
        "sneeze",
        "sneezing",
        "snide",
        "sniff",
        "snippet",
        "snipping",
        "snitch",
        "snooper",
        "snooze",
        "snore",
        "snoring",
        "snorkel",
        "snort",
        "snout",
        "snowbird",
        "snowboard",
        "snowbound",
        "snowcap",
        "snowdrift",
        "snowdrop",
        "snowfall",
        "snowfield",
        "snowflake",
        "snowiness",
        "snowless",
        "snowman",
        "snowplow",
        "snowshoe",
        "snowstorm",
        "snowsuit",
        "snowy",
        "snub",
        "snuff",
        "snuggle",
        "snugly",
        "snugness",
        "speak",
        "spearfish",
        "spearhead",
        "spearman",
        "spearmint",
        "species",
        "specimen",
        "specked",
        "speckled",
        "specks",
        "spectacle",
        "spectator",
        "spectrum",
        "speculate",
        "speech",
        "speed",
        "spellbind",
        "speller",
        "spelling",
        "spendable",
        "spender",
        "spending",
        "spent",
        "spew",
        "sphere",
        "spherical",
        "sphinx",
        "spider",
        "spied",
        "spiffy",
        "spill",
        "spilt",
        "spinach",
        "spinal",
        "spindle",
        "spinner",
        "spinning",
        "spinout",
        "spinster",
        "spiny",
        "spiral",
        "spirited",
        "spiritism",
        "spirits",
        "spiritual",
        "splashed",
        "splashing",
        "splashy",
        "splatter",
        "spleen",
        "splendid",
        "splendor",
        "splice",
        "splicing",
        "splinter",
        "splotchy",
        "splurge",
        "spoilage",
        "spoiled",
        "spoiler",
        "spoiling",
        "spoils",
        "spoken",
        "spokesman",
        "sponge",
        "spongy",
        "sponsor",
        "spoof",
        "spookily",
        "spooky",
        "spool",
        "spoon",
        "spore",
        "sporting",
        "sports",
        "sporty",
        "spotless",
        "spotlight",
        "spotted",
        "spotter",
        "spotting",
        "spotty",
        "spousal",
        "spouse",
        "spout",
        "sprain",
        "sprang",
        "sprawl",
        "spray",
        "spree",
        "sprig",
        "spring",
        "sprinkled",
        "sprinkler",
        "sprint",
        "sprite",
        "sprout",
        "spruce",
        "sprung",
        "spry",
        "spud",
        "spur",
        "sputter",
        "spyglass",
        "squabble",
        "squad",
        "squall",
        "squander",
        "squash",
        "squatted",
        "squatter",
        "squatting",
        "squeak",
        "squealer",
        "squealing",
        "squeamish",
        "squeegee",
        "squeeze",
        "squeezing",
        "squid",
        "squiggle",
        "squiggly",
        "squint",
        "squire",
        "squirt",
        "squishier",
        "squishy",
        "stability",
        "stabilize",
        "stable",
        "stack",
        "stadium",
        "staff",
        "stage",
        "staging",
        "stagnant",
        "stagnate",
        "stainable",
        "stained",
        "staining",
        "stainless",
        "stalemate",
        "staleness",
        "stalling",
        "stallion",
        "stamina",
        "stammer",
        "stamp",
        "stand",
        "stank",
        "staple",
        "stapling",
        "starboard",
        "starch",
        "stardom",
        "stardust",
        "starfish",
        "stargazer",
        "staring",
        "stark",
        "starless",
        "starlet",
        "starlight",
        "starlit",
        "starring",
        "starry",
        "starship",
        "starter",
        "starting",
        "startle",
        "startling",
        "startup",
        "starved",
        "starving",
        "stash",
        "state",
        "static",
        "statistic",
        "statue",
        "stature",
        "status",
        "statute",
        "statutory",
        "staunch",
        "stays",
        "steadfast",
        "steadier",
        "steadily",
        "steadying",
        "steam",
        "steed",
        "steep",
        "steerable",
        "steering",
        "steersman",
        "stegosaur",
        "stellar",
        "stem",
        "stench",
        "stencil",
        "step",
        "stereo",
        "sterile",
        "sterility",
        "sterilize",
        "sterling",
        "sternness",
        "sternum",
        "stew",
        "stick",
        "stiffen",
        "stiffly",
        "stiffness",
        "stifle",
        "stifling",
        "stillness",
        "stilt",
        "stimulant",
        "stimulate",
        "stimuli",
        "stimulus",
        "stinger",
        "stingily",
        "stinging",
        "stingray",
        "stingy",
        "stinking",
        "stinky",
        "stipend",
        "stipulate",
        "stir",
        "stitch",
        "stock",
        "stoic",
        "stoke",
        "stole",
        "stomp",
        "stonewall",
        "stoneware",
        "stonework",
        "stoning",
        "stony",
        "stood",
        "stooge",
        "stool",
        "stoop",
        "stoplight",
        "stoppable",
        "stoppage",
        "stopped",
        "stopper",
        "stopping",
        "stopwatch",
        "storable",
        "storage",
        "storeroom",
        "storewide",
        "storm",
        "stout",
        "stove",
        "stowaway",
        "stowing",
        "straddle",
        "straggler",
        "strained",
        "strainer",
        "straining",
        "strangely",
        "stranger",
        "strangle",
        "strategic",
        "strategy",
        "stratus",
        "straw",
        "stray",
        "streak",
        "stream",
        "street",
        "strength",
        "strenuous",
        "strep",
        "stress",
        "stretch",
        "strewn",
        "stricken",
        "strict",
        "stride",
        "strife",
        "strike",
        "striking",
        "strive",
        "striving",
        "strobe",
        "strode",
        "stroller",
        "strongbox",
        "strongly",
        "strongman",
        "struck",
        "structure",
        "strudel",
        "struggle",
        "strum",
        "strung",
        "strut",
        "stubbed",
        "stubble",
        "stubbly",
        "stubborn",
        "stucco",
        "stuck",
        "student",
        "studied",
        "studio",
        "study",
        "stuffed",
        "stuffing",
        "stuffy",
        "stumble",
        "stumbling",
        "stump",
        "stung",
        "stunned",
        "stunner",
        "stunning",
        "stunt",
        "stupor",
        "sturdily",
        "sturdy",
        "styling",
        "stylishly",
        "stylist",
        "stylized",
        "stylus",
        "suave",
        "subarctic",
        "subatomic",
        "subdivide",
        "subdued",
        "subduing",
        "subfloor",
        "subgroup",
        "subheader",
        "subject",
        "sublease",
        "sublet",
        "sublevel",
        "sublime",
        "submarine",
        "submerge",
        "submersed",
        "submitter",
        "subpanel",
        "subpar",
        "subplot",
        "subprime",
        "subscribe",
        "subscript",
        "subsector",
        "subside",
        "subsiding",
        "subsidize",
        "subsidy",
        "subsoil",
        "subsonic",
        "substance",
        "subsystem",
        "subtext",
        "subtitle",
        "subtly",
        "subtotal",
        "subtract",
        "subtype",
        "suburb",
        "subway",
        "subwoofer",
        "subzero",
        "succulent",
        "such",
        "suction",
        "sudden",
        "sudoku",
        "suds",
        "sufferer",
        "suffering",
        "suffice",
        "suffix",
        "suffocate",
        "suffrage",
        "sugar",
        "suggest",
        "suing",
        "suitable",
        "suitably",
        "suitcase",
        "suitor",
        "sulfate",
        "sulfide",
        "sulfite",
        "sulfur",
        "sulk",
        "sullen",
        "sulphate",
        "sulphuric",
        "sultry",
        "superbowl",
        "superglue",
        "superhero",
        "superior",
        "superjet",
        "superman",
        "supermom",
        "supernova",
        "supervise",
        "supper",
        "supplier",
        "supply",
        "support",
        "supremacy",
        "supreme",
        "surcharge",
        "surely",
        "sureness",
        "surface",
        "surfacing",
        "surfboard",
        "surfer",
        "surgery",
        "surgical",
        "surging",
        "surname",
        "surpass",
        "surplus",
        "surprise",
        "surreal",
        "surrender",
        "surrogate",
        "surround",
        "survey",
        "survival",
        "survive",
        "surviving",
        "survivor",
        "sushi",
        "suspect",
        "suspend",
        "suspense",
        "sustained",
        "sustainer",
        "swab",
        "swaddling",
        "swagger",
        "swampland",
        "swan",
        "swapping",
        "swarm",
        "sway",
        "swear",
        "sweat",
        "sweep",
        "swell",
        "swept",
        "swerve",
        "swifter",
        "swiftly",
        "swiftness",
        "swimmable",
        "swimmer",
        "swimming",
        "swimsuit",
        "swimwear",
        "swinger",
        "swinging",
        "swipe",
        "swirl",
        "switch",
        "swivel",
        "swizzle",
        "swooned",
        "swoop",
        "swoosh",
        "swore",
        "sworn",
        "swung",
        "sycamore",
        "sympathy",
        "symphonic",
        "symphony",
        "symptom",
        "synapse",
        "syndrome",
        "synergy",
        "synopses",
        "synopsis",
        "synthesis",
        "synthetic",
        "syrup",
        "system",
        "t-shirt",
        "tabasco",
        "tabby",
        "tableful",
        "tables",
        "tablet",
        "tableware",
        "tabloid",
        "tackiness",
        "tacking",
        "tackle",
        "tackling",
        "tacky",
        "taco",
        "tactful",
        "tactical",
        "tactics",
        "tactile",
        "tactless",
        "tadpole",
        "taekwondo",
        "tag",
        "tainted",
        "take",
        "taking",
        "talcum",
        "talisman",
        "tall",
        "talon",
        "tamale",
        "tameness",
        "tamer",
        "tamper",
        "tank",
        "tanned",
        "tannery",
        "tanning",
        "tantrum",
        "tapeless",
        "tapered",
        "tapering",
        "tapestry",
        "tapioca",
        "tapping",
        "taps",
        "tarantula",
        "target",
        "tarmac",
        "tarnish",
        "tarot",
        "tartar",
        "tartly",
        "tartness",
        "task",
        "tassel",
        "taste",
        "tastiness",
        "tasting",
        "tasty",
        "tattered",
        "tattle",
        "tattling",
        "tattoo",
        "taunt",
        "tavern",
        "thank",
        "that",
        "thaw",
        "theater",
        "theatrics",
        "thee",
        "theft",
        "theme",
        "theology",
        "theorize",
        "thermal",
        "thermos",
        "thesaurus",
        "these",
        "thesis",
        "thespian",
        "thicken",
        "thicket",
        "thickness",
        "thieving",
        "thievish",
        "thigh",
        "thimble",
        "thing",
        "think",
        "thinly",
        "thinner",
        "thinness",
        "thinning",
        "thirstily",
        "thirsting",
        "thirsty",
        "thirteen",
        "thirty",
        "thong",
        "thorn",
        "those",
        "thousand",
        "thrash",
        "thread",
        "threaten",
        "threefold",
        "thrift",
        "thrill",
        "thrive",
        "thriving",
        "throat",
        "throbbing",
        "throng",
        "throttle",
        "throwaway",
        "throwback",
        "thrower",
        "throwing",
        "thud",
        "thumb",
        "thumping",
        "thursday",
        "thus",
        "thwarting",
        "thyself",
        "tiara",
        "tibia",
        "tidal",
        "tidbit",
        "tidiness",
        "tidings",
        "tidy",
        "tiger",
        "tighten",
        "tightly",
        "tightness",
        "tightrope",
        "tightwad",
        "tigress",
        "tile",
        "tiling",
        "till",
        "tilt",
        "timid",
        "timing",
        "timothy",
        "tinderbox",
        "tinfoil",
        "tingle",
        "tingling",
        "tingly",
        "tinker",
        "tinkling",
        "tinsel",
        "tinsmith",
        "tint",
        "tinwork",
        "tiny",
        "tipoff",
        "tipped",
        "tipper",
        "tipping",
        "tiptoeing",
        "tiptop",
        "tiring",
        "tissue",
        "trace",
        "tracing",
        "track",
        "traction",
        "tractor",
        "trade",
        "trading",
        "tradition",
        "traffic",
        "tragedy",
        "trailing",
        "trailside",
        "train",
        "traitor",
        "trance",
        "tranquil",
        "transfer",
        "transform",
        "translate",
        "transpire",
        "transport",
        "transpose",
        "trapdoor",
        "trapeze",
        "trapezoid",
        "trapped",
        "trapper",
        "trapping",
        "traps",
        "trash",
        "travel",
        "traverse",
        "travesty",
        "tray",
        "treachery",
        "treading",
        "treadmill",
        "treason",
        "treat",
        "treble",
        "tree",
        "trekker",
        "tremble",
        "trembling",
        "tremor",
        "trench",
        "trend",
        "trespass",
        "triage",
        "trial",
        "triangle",
        "tribesman",
        "tribunal",
        "tribune",
        "tributary",
        "tribute",
        "triceps",
        "trickery",
        "trickily",
        "tricking",
        "trickle",
        "trickster",
        "tricky",
        "tricolor",
        "tricycle",
        "trident",
        "tried",
        "trifle",
        "trifocals",
        "trillion",
        "trilogy",
        "trimester",
        "trimmer",
        "trimming",
        "trimness",
        "trinity",
        "trio",
        "tripod",
        "tripping",
        "triumph",
        "trivial",
        "trodden",
        "trolling",
        "trombone",
        "trophy",
        "tropical",
        "tropics",
        "trouble",
        "troubling",
        "trough",
        "trousers",
        "trout",
        "trowel",
        "truce",
        "truck",
        "truffle",
        "trump",
        "trunks",
        "trustable",
        "trustee",
        "trustful",
        "trusting",
        "trustless",
        "truth",
        "try",
        "tubby",
        "tubeless",
        "tubular",
        "tucking",
        "tuesday",
        "tug",
        "tuition",
        "tulip",
        "tumble",
        "tumbling",
        "tummy",
        "turban",
        "turbine",
        "turbofan",
        "turbojet",
        "turbulent",
        "turf",
        "turkey",
        "turmoil",
        "turret",
        "turtle",
        "tusk",
        "tutor",
        "tutu",
        "tux",
        "tweak",
        "tweed",
        "tweet",
        "tweezers",
        "twelve",
        "twentieth",
        "twenty",
        "twerp",
        "twice",
        "twiddle",
        "twiddling",
        "twig",
        "twilight",
        "twine",
        "twins",
        "twirl",
        "twistable",
        "twisted",
        "twister",
        "twisting",
        "twisty",
        "twitch",
        "twitter",
        "tycoon",
        "tying",
        "tyke",
        "udder",
        "ultimate",
        "ultimatum",
        "ultra",
        "umbilical",
        "umbrella",
        "umpire",
        "unabashed",
        "unable",
        "unadorned",
        "unadvised",
        "unafraid",
        "unaired",
        "unaligned",
        "unaltered",
        "unarmored",
        "unashamed",
        "unaudited",
        "unawake",
        "unaware",
        "unbaked",
        "unbalance",
        "unbeaten",
        "unbend",
        "unbent",
        "unbiased",
        "unbitten",
        "unblended",
        "unblessed",
        "unblock",
        "unbolted",
        "unbounded",
        "unboxed",
        "unbraided",
        "unbridle",
        "unbroken",
        "unbuckled",
        "unbundle",
        "unburned",
        "unbutton",
        "uncanny",
        "uncapped",
        "uncaring",
        "uncertain",
        "unchain",
        "unchanged",
        "uncharted",
        "uncheck",
        "uncivil",
        "unclad",
        "unclaimed",
        "unclamped",
        "unclasp",
        "uncle",
        "unclip",
        "uncloak",
        "unclog",
        "unclothed",
        "uncoated",
        "uncoiled",
        "uncolored",
        "uncombed",
        "uncommon",
        "uncooked",
        "uncork",
        "uncorrupt",
        "uncounted",
        "uncouple",
        "uncouth",
        "uncover",
        "uncross",
        "uncrown",
        "uncrushed",
        "uncured",
        "uncurious",
        "uncurled",
        "uncut",
        "undamaged",
        "undated",
        "undaunted",
        "undead",
        "undecided",
        "undefined",
        "underage",
        "underarm",
        "undercoat",
        "undercook",
        "undercut",
        "underdog",
        "underdone",
        "underfed",
        "underfeed",
        "underfoot",
        "undergo",
        "undergrad",
        "underhand",
        "underline",
        "underling",
        "undermine",
        "undermost",
        "underpaid",
        "underpass",
        "underpay",
        "underrate",
        "undertake",
        "undertone",
        "undertook",
        "undertow",
        "underuse",
        "underwear",
        "underwent",
        "underwire",
        "undesired",
        "undiluted",
        "undivided",
        "undocked",
        "undoing",
        "undone",
        "undrafted",
        "undress",
        "undrilled",
        "undusted",
        "undying",
        "unearned",
        "unearth",
        "unease",
        "uneasily",
        "uneasy",
        "uneatable",
        "uneaten",
        "unedited",
        "unelected",
        "unending",
        "unengaged",
        "unenvied",
        "unequal",
        "unethical",
        "uneven",
        "unexpired",
        "unexposed",
        "unfailing",
        "unfair",
        "unfasten",
        "unfazed",
        "unfeeling",
        "unfiled",
        "unfilled",
        "unfitted",
        "unfitting",
        "unfixable",
        "unfixed",
        "unflawed",
        "unfocused",
        "unfold",
        "unfounded",
        "unframed",
        "unfreeze",
        "unfrosted",
        "unfrozen",
        "unfunded",
        "unglazed",
        "ungloved",
        "unglue",
        "ungodly",
        "ungraded",
        "ungreased",
        "unguarded",
        "unguided",
        "unhappily",
        "unhappy",
        "unharmed",
        "unhealthy",
        "unheard",
        "unhearing",
        "unheated",
        "unhelpful",
        "unhidden",
        "unhinge",
        "unhitched",
        "unholy",
        "unhook",
        "unicorn",
        "unicycle",
        "unified",
        "unifier",
        "uniformed",
        "uniformly",
        "unify",
        "unimpeded",
        "uninjured",
        "uninstall",
        "uninsured",
        "uninvited",
        "union",
        "uniquely",
        "unisexual",
        "unison",
        "unissued",
        "unit",
        "universal",
        "universe",
        "unjustly",
        "unkempt",
        "unkind",
        "unknotted",
        "unknowing",
        "unknown",
        "unlaced",
        "unlatch",
        "unlawful",
        "unleaded",
        "unlearned",
        "unleash",
        "unless",
        "unleveled",
        "unlighted",
        "unlikable",
        "unlimited",
        "unlined",
        "unlinked",
        "unlisted",
        "unlit",
        "unlivable",
        "unloaded",
        "unloader",
        "unlocked",
        "unlocking",
        "unlovable",
        "unloved",
        "unlovely",
        "unloving",
        "unluckily",
        "unlucky",
        "unmade",
        "unmanaged",
        "unmanned",
        "unmapped",
        "unmarked",
        "unmasked",
        "unmasking",
        "unmatched",
        "unmindful",
        "unmixable",
        "unmixed",
        "unmolded",
        "unmoral",
        "unmovable",
        "unmoved",
        "unmoving",
        "unnamable",
        "unnamed",
        "unnatural",
        "unneeded",
        "unnerve",
        "unnerving",
        "unnoticed",
        "unopened",
        "unopposed",
        "unpack",
        "unpadded",
        "unpaid",
        "unpainted",
        "unpaired",
        "unpaved",
        "unpeeled",
        "unpicked",
        "unpiloted",
        "unpinned",
        "unplanned",
        "unplanted",
        "unpleased",
        "unpledged",
        "unplowed",
        "unplug",
        "unpopular",
        "unproven",
        "unquote",
        "unranked",
        "unrated",
        "unraveled",
        "unreached",
        "unread",
        "unreal",
        "unreeling",
        "unrefined",
        "unrelated",
        "unrented",
        "unrest",
        "unretired",
        "unrevised",
        "unrigged",
        "unripe",
        "unrivaled",
        "unroasted",
        "unrobed",
        "unroll",
        "unruffled",
        "unruly",
        "unrushed",
        "unsaddle",
        "unsafe",
        "unsaid",
        "unsalted",
        "unsaved",
        "unsavory",
        "unscathed",
        "unscented",
        "unscrew",
        "unsealed",
        "unseated",
        "unsecured",
        "unseeing",
        "unseemly",
        "unseen",
        "unselect",
        "unselfish",
        "unsent",
        "unsettled",
        "unshackle",
        "unshaken",
        "unshaved",
        "unshaven",
        "unsheathe",
        "unshipped",
        "unsightly",
        "unsigned",
        "unskilled",
        "unsliced",
        "unsmooth",
        "unsnap",
        "unsocial",
        "unsoiled",
        "unsold",
        "unsolved",
        "unsorted",
        "unspoiled",
        "unspoken",
        "unstable",
        "unstaffed",
        "unstamped",
        "unsteady",
        "unsterile",
        "unstirred",
        "unstitch",
        "unstopped",
        "unstuck",
        "unstuffed",
        "unstylish",
        "unsubtle",
        "unsubtly",
        "unsuited",
        "unsure",
        "unsworn",
        "untagged",
        "untainted",
        "untaken",
        "untamed",
        "untangled",
        "untapped",
        "untaxed",
        "unthawed",
        "unthread",
        "untidy",
        "untie",
        "until",
        "untimed",
        "untimely",
        "untitled",
        "untoasted",
        "untold",
        "untouched",
        "untracked",
        "untrained",
        "untreated",
        "untried",
        "untrimmed",
        "untrue",
        "untruth",
        "unturned",
        "untwist",
        "untying",
        "unusable",
        "unused",
        "unusual",
        "unvalued",
        "unvaried",
        "unvarying",
        "unveiled",
        "unveiling",
        "unvented",
        "unviable",
        "unvisited",
        "unvocal",
        "unwanted",
        "unwarlike",
        "unwary",
        "unwashed",
        "unwatched",
        "unweave",
        "unwed",
        "unwelcome",
        "unwell",
        "unwieldy",
        "unwilling",
        "unwind",
        "unwired",
        "unwitting",
        "unwomanly",
        "unworldly",
        "unworn",
        "unworried",
        "unworthy",
        "unwound",
        "unwoven",
        "unwrapped",
        "unwritten",
        "unzip",
        "upbeat",
        "upchuck",
        "upcoming",
        "upcountry",
        "update",
        "upfront",
        "upgrade",
        "upheaval",
        "upheld",
        "uphill",
        "uphold",
        "uplifted",
        "uplifting",
        "upload",
        "upon",
        "upper",
        "upright",
        "uprising",
        "upriver",
        "uproar",
        "uproot",
        "upscale",
        "upside",
        "upstage",
        "upstairs",
        "upstart",
        "upstate",
        "upstream",
        "upstroke",
        "upswing",
        "uptake",
        "uptight",
        "uptown",
        "upturned",
        "upward",
        "upwind",
        "uranium",
        "urban",
        "urchin",
        "urethane",
        "urgency",
        "urgent",
        "urging",
        "urologist",
        "urology",
        "usable",
        "usage",
        "useable",
        "used",
        "uselessly",
        "user",
        "usher",
        "usual",
        "utensil",
        "utility",
        "utilize",
        "utmost",
        "utopia",
        "utter",
        "vacancy",
        "vacant",
        "vacate",
        "vacation",
        "vagabond",
        "vagrancy",
        "vagrantly",
        "vaguely",
        "vagueness",
        "valiant",
        "valid",
        "valium",
        "valley",
        "valuables",
        "value",
        "vanilla",
        "vanish",
        "vanity",
        "vanquish",
        "vantage",
        "vaporizer",
        "variable",
        "variably",
        "varied",
        "variety",
        "various",
        "varmint",
        "varnish",
        "varsity",
        "varying",
        "vascular",
        "vaseline",
        "vastly",
        "vastness",
        "veal",
        "vegan",
        "veggie",
        "vehicular",
        "velcro",
        "velocity",
        "velvet",
        "vendetta",
        "vending",
        "vendor",
        "veneering",
        "vengeful",
        "venomous",
        "ventricle",
        "venture",
        "venue",
        "venus",
        "verbalize",
        "verbally",
        "verbose",
        "verdict",
        "verify",
        "verse",
        "version",
        "versus",
        "vertebrae",
        "vertical",
        "vertigo",
        "very",
        "vessel",
        "vest",
        "veteran",
        "veto",
        "vexingly",
        "viability",
        "viable",
        "vibes",
        "vice",
        "vicinity",
        "victory",
        "video",
        "viewable",
        "viewer",
        "viewing",
        "viewless",
        "viewpoint",
        "vigorous",
        "village",
        "villain",
        "vindicate",
        "vineyard",
        "vintage",
        "violate",
        "violation",
        "violator",
        "violet",
        "violin",
        "viper",
        "viral",
        "virtual",
        "virtuous",
        "virus",
        "visa",
        "viscosity",
        "viscous",
        "viselike",
        "visible",
        "visibly",
        "vision",
        "visiting",
        "visitor",
        "visor",
        "vista",
        "vitality",
        "vitalize",
        "vitally",
        "vitamins",
        "vivacious",
        "vividly",
        "vividness",
        "vixen",
        "vocalist",
        "vocalize",
        "vocally",
        "vocation",
        "voice",
        "voicing",
        "void",
        "volatile",
        "volley",
        "voltage",
        "volumes",
        "voter",
        "voting",
        "voucher",
        "vowed",
        "vowel",
        "voyage",
        "wackiness",
        "wad",
        "wafer",
        "waffle",
        "waged",
        "wager",
        "wages",
        "waggle",
        "wagon",
        "wake",
        "waking",
        "walk",
        "walmart",
        "walnut",
        "walrus",
        "waltz",
        "wand",
        "wannabe",
        "wanted",
        "wanting",
        "wasabi",
        "washable",
        "washbasin",
        "washboard",
        "washbowl",
        "washcloth",
        "washday",
        "washed",
        "washer",
        "washhouse",
        "washing",
        "washout",
        "washroom",
        "washstand",
        "washtub",
        "wasp",
        "wasting",
        "watch",
        "water",
        "waviness",
        "waving",
        "wavy",
        "whacking",
        "whacky",
        "wham",
        "wharf",
        "wheat",
        "whenever",
        "whiff",
        "whimsical",
        "whinny",
        "whiny",
        "whisking",
        "whoever",
        "whole",
        "whomever",
        "whoopee",
        "whooping",
        "whoops",
        "why",
        "wick",
        "widely",
        "widen",
        "widget",
        "widow",
        "width",
        "wieldable",
        "wielder",
        "wife",
        "wifi",
        "wikipedia",
        "wildcard",
        "wildcat",
        "wilder",
        "wildfire",
        "wildfowl",
        "wildland",
        "wildlife",
        "wildly",
        "wildness",
        "willed",
        "willfully",
        "willing",
        "willow",
        "willpower",
        "wilt",
        "wimp",
        "wince",
        "wincing",
        "wind",
        "wing",
        "winking",
        "winner",
        "winnings",
        "winter",
        "wipe",
        "wired",
        "wireless",
        "wiring",
        "wiry",
        "wisdom",
        "wise",
        "wish",
        "wisplike",
        "wispy",
        "wistful",
        "wizard",
        "wobble",
        "wobbling",
        "wobbly",
        "wok",
        "wolf",
        "wolverine",
        "womanhood",
        "womankind",
        "womanless",
        "womanlike",
        "womanly",
        "womb",
        "woof",
        "wooing",
        "wool",
        "woozy",
        "word",
        "work",
        "worried",
        "worrier",
        "worrisome",
        "worry",
        "worsening",
        "worshiper",
        "worst",
        "wound",
        "woven",
        "wow",
        "wrangle",
        "wrath",
        "wreath",
        "wreckage",
        "wrecker",
        "wrecking",
        "wrench",
        "wriggle",
        "wriggly",
        "wrinkle",
        "wrinkly",
        "wrist",
        "writing",
        "written",
        "wrongdoer",
        "wronged",
        "wrongful",
        "wrongly",
        "wrongness",
        "wrought",
        "xbox",
        "xerox",
        "yahoo",
        "yam",
        "yanking",
        "yapping",
        "yard",
        "yarn",
        "yeah",
        "yearbook",
        "yearling",
        "yearly",
        "yearning",
        "yeast",
        "yelling",
        "yelp",
        "yen",
        "yesterday",
        "yiddish",
        "yield",
        "yin",
        "yippee",
        "yo-yo",
        "yodel",
        "yoga",
        "yogurt",
        "yonder",
        "yoyo",
        "yummy",
        "zap",
        "zealous",
        "zebra",
        "zen",
        "zeppelin",
        "zero",
        "zestfully",
        "zesty",
        "zigzagged",
        "zipfile",
        "zipping",
        "zippy",
        "zips",
        "zit",
        "zodiac",
        "zombie",
        "zone",
        "zoning",
        "zookeeper",
        "zoologist",
        "zoology",
        "zoom"
      ];
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/passwords/newSecureWords.js
  var require_newSecureWords = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/passwords/newSecureWords.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.newSecureWords = void 0;
      var getSecureRandom_1 = require_getSecureRandom2();
      var wordlist_1 = require_wordlist();
      async function newSecureWords(size5 = 6) {
        let words = [];
        for (let i5 = 0; i5 < size5; i5++) {
          words.push(wordlist_1.wordlist[await (0, getSecureRandom_1.getSecureRandomNumber)(0, wordlist_1.wordlist.length)]);
        }
        return words;
      }
      exports.newSecureWords = newSecureWords;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/passwords/newSecurePassphrase.js
  var require_newSecurePassphrase = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/passwords/newSecurePassphrase.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.newSecurePassphrase = void 0;
      var __1 = require_dist();
      async function newSecurePassphrase(size5 = 6) {
        return (await (0, __1.newSecureWords)(size5)).join("-");
      }
      exports.newSecurePassphrase = newSecurePassphrase;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/utils/binary.js
  var require_binary = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/utils/binary.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.bitsToBytes = exports.bytesToBits = exports.lpad = void 0;
      function lpad(str, padString, length2) {
        while (str.length < length2) {
          str = padString + str;
        }
        return str;
      }
      exports.lpad = lpad;
      function bytesToBits(bytes) {
        let res = "";
        for (let i5 = 0; i5 < bytes.length; i5++) {
          let x13 = bytes.at(i5);
          res += lpad(x13.toString(2), "0", 8);
        }
        return res;
      }
      exports.bytesToBits = bytesToBits;
      function bitsToBytes(src2) {
        if (src2.length % 8 !== 0) {
          throw Error("Uneven bits");
        }
        let res = [];
        while (src2.length > 0) {
          res.push(parseInt(src2.slice(0, 8), 2));
          src2 = src2.slice(8);
        }
        return Buffer2.from(res);
      }
      exports.bitsToBytes = bitsToBytes;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/mnemonic/wordlist.js
  var require_wordlist2 = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/mnemonic/wordlist.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.wordlist = void 0;
      var EN = [
        "abandon",
        "ability",
        "able",
        "about",
        "above",
        "absent",
        "absorb",
        "abstract",
        "absurd",
        "abuse",
        "access",
        "accident",
        "account",
        "accuse",
        "achieve",
        "acid",
        "acoustic",
        "acquire",
        "across",
        "act",
        "action",
        "actor",
        "actress",
        "actual",
        "adapt",
        "add",
        "addict",
        "address",
        "adjust",
        "admit",
        "adult",
        "advance",
        "advice",
        "aerobic",
        "affair",
        "afford",
        "afraid",
        "again",
        "age",
        "agent",
        "agree",
        "ahead",
        "aim",
        "air",
        "airport",
        "aisle",
        "alarm",
        "album",
        "alcohol",
        "alert",
        "alien",
        "all",
        "alley",
        "allow",
        "almost",
        "alone",
        "alpha",
        "already",
        "also",
        "alter",
        "always",
        "amateur",
        "amazing",
        "among",
        "amount",
        "amused",
        "analyst",
        "anchor",
        "ancient",
        "anger",
        "angle",
        "angry",
        "animal",
        "ankle",
        "announce",
        "annual",
        "another",
        "answer",
        "antenna",
        "antique",
        "anxiety",
        "any",
        "apart",
        "apology",
        "appear",
        "apple",
        "approve",
        "april",
        "arch",
        "arctic",
        "area",
        "arena",
        "argue",
        "arm",
        "armed",
        "armor",
        "army",
        "around",
        "arrange",
        "arrest",
        "arrive",
        "arrow",
        "art",
        "artefact",
        "artist",
        "artwork",
        "ask",
        "aspect",
        "assault",
        "asset",
        "assist",
        "assume",
        "asthma",
        "athlete",
        "atom",
        "attack",
        "attend",
        "attitude",
        "attract",
        "auction",
        "audit",
        "august",
        "aunt",
        "author",
        "auto",
        "autumn",
        "average",
        "avocado",
        "avoid",
        "awake",
        "aware",
        "away",
        "awesome",
        "awful",
        "awkward",
        "axis",
        "baby",
        "bachelor",
        "bacon",
        "badge",
        "bag",
        "balance",
        "balcony",
        "ball",
        "bamboo",
        "banana",
        "banner",
        "bar",
        "barely",
        "bargain",
        "barrel",
        "base",
        "basic",
        "basket",
        "battle",
        "beach",
        "bean",
        "beauty",
        "because",
        "become",
        "beef",
        "before",
        "begin",
        "behave",
        "behind",
        "believe",
        "below",
        "belt",
        "bench",
        "benefit",
        "best",
        "betray",
        "better",
        "between",
        "beyond",
        "bicycle",
        "bid",
        "bike",
        "bind",
        "biology",
        "bird",
        "birth",
        "bitter",
        "black",
        "blade",
        "blame",
        "blanket",
        "blast",
        "bleak",
        "bless",
        "blind",
        "blood",
        "blossom",
        "blouse",
        "blue",
        "blur",
        "blush",
        "board",
        "boat",
        "body",
        "boil",
        "bomb",
        "bone",
        "bonus",
        "book",
        "boost",
        "border",
        "boring",
        "borrow",
        "boss",
        "bottom",
        "bounce",
        "box",
        "boy",
        "bracket",
        "brain",
        "brand",
        "brass",
        "brave",
        "bread",
        "breeze",
        "brick",
        "bridge",
        "brief",
        "bright",
        "bring",
        "brisk",
        "broccoli",
        "broken",
        "bronze",
        "broom",
        "brother",
        "brown",
        "brush",
        "bubble",
        "buddy",
        "budget",
        "buffalo",
        "build",
        "bulb",
        "bulk",
        "bullet",
        "bundle",
        "bunker",
        "burden",
        "burger",
        "burst",
        "bus",
        "business",
        "busy",
        "butter",
        "buyer",
        "buzz",
        "cabbage",
        "cabin",
        "cable",
        "cactus",
        "cage",
        "cake",
        "call",
        "calm",
        "camera",
        "camp",
        "can",
        "canal",
        "cancel",
        "candy",
        "cannon",
        "canoe",
        "canvas",
        "canyon",
        "capable",
        "capital",
        "captain",
        "car",
        "carbon",
        "card",
        "cargo",
        "carpet",
        "carry",
        "cart",
        "case",
        "cash",
        "casino",
        "castle",
        "casual",
        "cat",
        "catalog",
        "catch",
        "category",
        "cattle",
        "caught",
        "cause",
        "caution",
        "cave",
        "ceiling",
        "celery",
        "cement",
        "census",
        "century",
        "cereal",
        "certain",
        "chair",
        "chalk",
        "champion",
        "change",
        "chaos",
        "chapter",
        "charge",
        "chase",
        "chat",
        "cheap",
        "check",
        "cheese",
        "chef",
        "cherry",
        "chest",
        "chicken",
        "chief",
        "child",
        "chimney",
        "choice",
        "choose",
        "chronic",
        "chuckle",
        "chunk",
        "churn",
        "cigar",
        "cinnamon",
        "circle",
        "citizen",
        "city",
        "civil",
        "claim",
        "clap",
        "clarify",
        "claw",
        "clay",
        "clean",
        "clerk",
        "clever",
        "click",
        "client",
        "cliff",
        "climb",
        "clinic",
        "clip",
        "clock",
        "clog",
        "close",
        "cloth",
        "cloud",
        "clown",
        "club",
        "clump",
        "cluster",
        "clutch",
        "coach",
        "coast",
        "coconut",
        "code",
        "coffee",
        "coil",
        "coin",
        "collect",
        "color",
        "column",
        "combine",
        "come",
        "comfort",
        "comic",
        "common",
        "company",
        "concert",
        "conduct",
        "confirm",
        "congress",
        "connect",
        "consider",
        "control",
        "convince",
        "cook",
        "cool",
        "copper",
        "copy",
        "coral",
        "core",
        "corn",
        "correct",
        "cost",
        "cotton",
        "couch",
        "country",
        "couple",
        "course",
        "cousin",
        "cover",
        "coyote",
        "crack",
        "cradle",
        "craft",
        "cram",
        "crane",
        "crash",
        "crater",
        "crawl",
        "crazy",
        "cream",
        "credit",
        "creek",
        "crew",
        "cricket",
        "crime",
        "crisp",
        "critic",
        "crop",
        "cross",
        "crouch",
        "crowd",
        "crucial",
        "cruel",
        "cruise",
        "crumble",
        "crunch",
        "crush",
        "cry",
        "crystal",
        "cube",
        "culture",
        "cup",
        "cupboard",
        "curious",
        "current",
        "curtain",
        "curve",
        "cushion",
        "custom",
        "cute",
        "cycle",
        "dad",
        "damage",
        "damp",
        "dance",
        "danger",
        "daring",
        "dash",
        "daughter",
        "dawn",
        "day",
        "deal",
        "debate",
        "debris",
        "decade",
        "december",
        "decide",
        "decline",
        "decorate",
        "decrease",
        "deer",
        "defense",
        "define",
        "defy",
        "degree",
        "delay",
        "deliver",
        "demand",
        "demise",
        "denial",
        "dentist",
        "deny",
        "depart",
        "depend",
        "deposit",
        "depth",
        "deputy",
        "derive",
        "describe",
        "desert",
        "design",
        "desk",
        "despair",
        "destroy",
        "detail",
        "detect",
        "develop",
        "device",
        "devote",
        "diagram",
        "dial",
        "diamond",
        "diary",
        "dice",
        "diesel",
        "diet",
        "differ",
        "digital",
        "dignity",
        "dilemma",
        "dinner",
        "dinosaur",
        "direct",
        "dirt",
        "disagree",
        "discover",
        "disease",
        "dish",
        "dismiss",
        "disorder",
        "display",
        "distance",
        "divert",
        "divide",
        "divorce",
        "dizzy",
        "doctor",
        "document",
        "dog",
        "doll",
        "dolphin",
        "domain",
        "donate",
        "donkey",
        "donor",
        "door",
        "dose",
        "double",
        "dove",
        "draft",
        "dragon",
        "drama",
        "drastic",
        "draw",
        "dream",
        "dress",
        "drift",
        "drill",
        "drink",
        "drip",
        "drive",
        "drop",
        "drum",
        "dry",
        "duck",
        "dumb",
        "dune",
        "during",
        "dust",
        "dutch",
        "duty",
        "dwarf",
        "dynamic",
        "eager",
        "eagle",
        "early",
        "earn",
        "earth",
        "easily",
        "east",
        "easy",
        "echo",
        "ecology",
        "economy",
        "edge",
        "edit",
        "educate",
        "effort",
        "egg",
        "eight",
        "either",
        "elbow",
        "elder",
        "electric",
        "elegant",
        "element",
        "elephant",
        "elevator",
        "elite",
        "else",
        "embark",
        "embody",
        "embrace",
        "emerge",
        "emotion",
        "employ",
        "empower",
        "empty",
        "enable",
        "enact",
        "end",
        "endless",
        "endorse",
        "enemy",
        "energy",
        "enforce",
        "engage",
        "engine",
        "enhance",
        "enjoy",
        "enlist",
        "enough",
        "enrich",
        "enroll",
        "ensure",
        "enter",
        "entire",
        "entry",
        "envelope",
        "episode",
        "equal",
        "equip",
        "era",
        "erase",
        "erode",
        "erosion",
        "error",
        "erupt",
        "escape",
        "essay",
        "essence",
        "estate",
        "eternal",
        "ethics",
        "evidence",
        "evil",
        "evoke",
        "evolve",
        "exact",
        "example",
        "excess",
        "exchange",
        "excite",
        "exclude",
        "excuse",
        "execute",
        "exercise",
        "exhaust",
        "exhibit",
        "exile",
        "exist",
        "exit",
        "exotic",
        "expand",
        "expect",
        "expire",
        "explain",
        "expose",
        "express",
        "extend",
        "extra",
        "eye",
        "eyebrow",
        "fabric",
        "face",
        "faculty",
        "fade",
        "faint",
        "faith",
        "fall",
        "false",
        "fame",
        "family",
        "famous",
        "fan",
        "fancy",
        "fantasy",
        "farm",
        "fashion",
        "fat",
        "fatal",
        "father",
        "fatigue",
        "fault",
        "favorite",
        "feature",
        "february",
        "federal",
        "fee",
        "feed",
        "feel",
        "female",
        "fence",
        "festival",
        "fetch",
        "fever",
        "few",
        "fiber",
        "fiction",
        "field",
        "figure",
        "file",
        "film",
        "filter",
        "final",
        "find",
        "fine",
        "finger",
        "finish",
        "fire",
        "firm",
        "first",
        "fiscal",
        "fish",
        "fit",
        "fitness",
        "fix",
        "flag",
        "flame",
        "flash",
        "flat",
        "flavor",
        "flee",
        "flight",
        "flip",
        "float",
        "flock",
        "floor",
        "flower",
        "fluid",
        "flush",
        "fly",
        "foam",
        "focus",
        "fog",
        "foil",
        "fold",
        "follow",
        "food",
        "foot",
        "force",
        "forest",
        "forget",
        "fork",
        "fortune",
        "forum",
        "forward",
        "fossil",
        "foster",
        "found",
        "fox",
        "fragile",
        "frame",
        "frequent",
        "fresh",
        "friend",
        "fringe",
        "frog",
        "front",
        "frost",
        "frown",
        "frozen",
        "fruit",
        "fuel",
        "fun",
        "funny",
        "furnace",
        "fury",
        "future",
        "gadget",
        "gain",
        "galaxy",
        "gallery",
        "game",
        "gap",
        "garage",
        "garbage",
        "garden",
        "garlic",
        "garment",
        "gas",
        "gasp",
        "gate",
        "gather",
        "gauge",
        "gaze",
        "general",
        "genius",
        "genre",
        "gentle",
        "genuine",
        "gesture",
        "ghost",
        "giant",
        "gift",
        "giggle",
        "ginger",
        "giraffe",
        "girl",
        "give",
        "glad",
        "glance",
        "glare",
        "glass",
        "glide",
        "glimpse",
        "globe",
        "gloom",
        "glory",
        "glove",
        "glow",
        "glue",
        "goat",
        "goddess",
        "gold",
        "good",
        "goose",
        "gorilla",
        "gospel",
        "gossip",
        "govern",
        "gown",
        "grab",
        "grace",
        "grain",
        "grant",
        "grape",
        "grass",
        "gravity",
        "great",
        "green",
        "grid",
        "grief",
        "grit",
        "grocery",
        "group",
        "grow",
        "grunt",
        "guard",
        "guess",
        "guide",
        "guilt",
        "guitar",
        "gun",
        "gym",
        "habit",
        "hair",
        "half",
        "hammer",
        "hamster",
        "hand",
        "happy",
        "harbor",
        "hard",
        "harsh",
        "harvest",
        "hat",
        "have",
        "hawk",
        "hazard",
        "head",
        "health",
        "heart",
        "heavy",
        "hedgehog",
        "height",
        "hello",
        "helmet",
        "help",
        "hen",
        "hero",
        "hidden",
        "high",
        "hill",
        "hint",
        "hip",
        "hire",
        "history",
        "hobby",
        "hockey",
        "hold",
        "hole",
        "holiday",
        "hollow",
        "home",
        "honey",
        "hood",
        "hope",
        "horn",
        "horror",
        "horse",
        "hospital",
        "host",
        "hotel",
        "hour",
        "hover",
        "hub",
        "huge",
        "human",
        "humble",
        "humor",
        "hundred",
        "hungry",
        "hunt",
        "hurdle",
        "hurry",
        "hurt",
        "husband",
        "hybrid",
        "ice",
        "icon",
        "idea",
        "identify",
        "idle",
        "ignore",
        "ill",
        "illegal",
        "illness",
        "image",
        "imitate",
        "immense",
        "immune",
        "impact",
        "impose",
        "improve",
        "impulse",
        "inch",
        "include",
        "income",
        "increase",
        "index",
        "indicate",
        "indoor",
        "industry",
        "infant",
        "inflict",
        "inform",
        "inhale",
        "inherit",
        "initial",
        "inject",
        "injury",
        "inmate",
        "inner",
        "innocent",
        "input",
        "inquiry",
        "insane",
        "insect",
        "inside",
        "inspire",
        "install",
        "intact",
        "interest",
        "into",
        "invest",
        "invite",
        "involve",
        "iron",
        "island",
        "isolate",
        "issue",
        "item",
        "ivory",
        "jacket",
        "jaguar",
        "jar",
        "jazz",
        "jealous",
        "jeans",
        "jelly",
        "jewel",
        "job",
        "join",
        "joke",
        "journey",
        "joy",
        "judge",
        "juice",
        "jump",
        "jungle",
        "junior",
        "junk",
        "just",
        "kangaroo",
        "keen",
        "keep",
        "ketchup",
        "key",
        "kick",
        "kid",
        "kidney",
        "kind",
        "kingdom",
        "kiss",
        "kit",
        "kitchen",
        "kite",
        "kitten",
        "kiwi",
        "knee",
        "knife",
        "knock",
        "know",
        "lab",
        "label",
        "labor",
        "ladder",
        "lady",
        "lake",
        "lamp",
        "language",
        "laptop",
        "large",
        "later",
        "latin",
        "laugh",
        "laundry",
        "lava",
        "law",
        "lawn",
        "lawsuit",
        "layer",
        "lazy",
        "leader",
        "leaf",
        "learn",
        "leave",
        "lecture",
        "left",
        "leg",
        "legal",
        "legend",
        "leisure",
        "lemon",
        "lend",
        "length",
        "lens",
        "leopard",
        "lesson",
        "letter",
        "level",
        "liar",
        "liberty",
        "library",
        "license",
        "life",
        "lift",
        "light",
        "like",
        "limb",
        "limit",
        "link",
        "lion",
        "liquid",
        "list",
        "little",
        "live",
        "lizard",
        "load",
        "loan",
        "lobster",
        "local",
        "lock",
        "logic",
        "lonely",
        "long",
        "loop",
        "lottery",
        "loud",
        "lounge",
        "love",
        "loyal",
        "lucky",
        "luggage",
        "lumber",
        "lunar",
        "lunch",
        "luxury",
        "lyrics",
        "machine",
        "mad",
        "magic",
        "magnet",
        "maid",
        "mail",
        "main",
        "major",
        "make",
        "mammal",
        "man",
        "manage",
        "mandate",
        "mango",
        "mansion",
        "manual",
        "maple",
        "marble",
        "march",
        "margin",
        "marine",
        "market",
        "marriage",
        "mask",
        "mass",
        "master",
        "match",
        "material",
        "math",
        "matrix",
        "matter",
        "maximum",
        "maze",
        "meadow",
        "mean",
        "measure",
        "meat",
        "mechanic",
        "medal",
        "media",
        "melody",
        "melt",
        "member",
        "memory",
        "mention",
        "menu",
        "mercy",
        "merge",
        "merit",
        "merry",
        "mesh",
        "message",
        "metal",
        "method",
        "middle",
        "midnight",
        "milk",
        "million",
        "mimic",
        "mind",
        "minimum",
        "minor",
        "minute",
        "miracle",
        "mirror",
        "misery",
        "miss",
        "mistake",
        "mix",
        "mixed",
        "mixture",
        "mobile",
        "model",
        "modify",
        "mom",
        "moment",
        "monitor",
        "monkey",
        "monster",
        "month",
        "moon",
        "moral",
        "more",
        "morning",
        "mosquito",
        "mother",
        "motion",
        "motor",
        "mountain",
        "mouse",
        "move",
        "movie",
        "much",
        "muffin",
        "mule",
        "multiply",
        "muscle",
        "museum",
        "mushroom",
        "music",
        "must",
        "mutual",
        "myself",
        "mystery",
        "myth",
        "naive",
        "name",
        "napkin",
        "narrow",
        "nasty",
        "nation",
        "nature",
        "near",
        "neck",
        "need",
        "negative",
        "neglect",
        "neither",
        "nephew",
        "nerve",
        "nest",
        "net",
        "network",
        "neutral",
        "never",
        "news",
        "next",
        "nice",
        "night",
        "noble",
        "noise",
        "nominee",
        "noodle",
        "normal",
        "north",
        "nose",
        "notable",
        "note",
        "nothing",
        "notice",
        "novel",
        "now",
        "nuclear",
        "number",
        "nurse",
        "nut",
        "oak",
        "obey",
        "object",
        "oblige",
        "obscure",
        "observe",
        "obtain",
        "obvious",
        "occur",
        "ocean",
        "october",
        "odor",
        "off",
        "offer",
        "office",
        "often",
        "oil",
        "okay",
        "old",
        "olive",
        "olympic",
        "omit",
        "once",
        "one",
        "onion",
        "online",
        "only",
        "open",
        "opera",
        "opinion",
        "oppose",
        "option",
        "orange",
        "orbit",
        "orchard",
        "order",
        "ordinary",
        "organ",
        "orient",
        "original",
        "orphan",
        "ostrich",
        "other",
        "outdoor",
        "outer",
        "output",
        "outside",
        "oval",
        "oven",
        "over",
        "own",
        "owner",
        "oxygen",
        "oyster",
        "ozone",
        "pact",
        "paddle",
        "page",
        "pair",
        "palace",
        "palm",
        "panda",
        "panel",
        "panic",
        "panther",
        "paper",
        "parade",
        "parent",
        "park",
        "parrot",
        "party",
        "pass",
        "patch",
        "path",
        "patient",
        "patrol",
        "pattern",
        "pause",
        "pave",
        "payment",
        "peace",
        "peanut",
        "pear",
        "peasant",
        "pelican",
        "pen",
        "penalty",
        "pencil",
        "people",
        "pepper",
        "perfect",
        "permit",
        "person",
        "pet",
        "phone",
        "photo",
        "phrase",
        "physical",
        "piano",
        "picnic",
        "picture",
        "piece",
        "pig",
        "pigeon",
        "pill",
        "pilot",
        "pink",
        "pioneer",
        "pipe",
        "pistol",
        "pitch",
        "pizza",
        "place",
        "planet",
        "plastic",
        "plate",
        "play",
        "please",
        "pledge",
        "pluck",
        "plug",
        "plunge",
        "poem",
        "poet",
        "point",
        "polar",
        "pole",
        "police",
        "pond",
        "pony",
        "pool",
        "popular",
        "portion",
        "position",
        "possible",
        "post",
        "potato",
        "pottery",
        "poverty",
        "powder",
        "power",
        "practice",
        "praise",
        "predict",
        "prefer",
        "prepare",
        "present",
        "pretty",
        "prevent",
        "price",
        "pride",
        "primary",
        "print",
        "priority",
        "prison",
        "private",
        "prize",
        "problem",
        "process",
        "produce",
        "profit",
        "program",
        "project",
        "promote",
        "proof",
        "property",
        "prosper",
        "protect",
        "proud",
        "provide",
        "public",
        "pudding",
        "pull",
        "pulp",
        "pulse",
        "pumpkin",
        "punch",
        "pupil",
        "puppy",
        "purchase",
        "purity",
        "purpose",
        "purse",
        "push",
        "put",
        "puzzle",
        "pyramid",
        "quality",
        "quantum",
        "quarter",
        "question",
        "quick",
        "quit",
        "quiz",
        "quote",
        "rabbit",
        "raccoon",
        "race",
        "rack",
        "radar",
        "radio",
        "rail",
        "rain",
        "raise",
        "rally",
        "ramp",
        "ranch",
        "random",
        "range",
        "rapid",
        "rare",
        "rate",
        "rather",
        "raven",
        "raw",
        "razor",
        "ready",
        "real",
        "reason",
        "rebel",
        "rebuild",
        "recall",
        "receive",
        "recipe",
        "record",
        "recycle",
        "reduce",
        "reflect",
        "reform",
        "refuse",
        "region",
        "regret",
        "regular",
        "reject",
        "relax",
        "release",
        "relief",
        "rely",
        "remain",
        "remember",
        "remind",
        "remove",
        "render",
        "renew",
        "rent",
        "reopen",
        "repair",
        "repeat",
        "replace",
        "report",
        "require",
        "rescue",
        "resemble",
        "resist",
        "resource",
        "response",
        "result",
        "retire",
        "retreat",
        "return",
        "reunion",
        "reveal",
        "review",
        "reward",
        "rhythm",
        "rib",
        "ribbon",
        "rice",
        "rich",
        "ride",
        "ridge",
        "rifle",
        "right",
        "rigid",
        "ring",
        "riot",
        "ripple",
        "risk",
        "ritual",
        "rival",
        "river",
        "road",
        "roast",
        "robot",
        "robust",
        "rocket",
        "romance",
        "roof",
        "rookie",
        "room",
        "rose",
        "rotate",
        "rough",
        "round",
        "route",
        "royal",
        "rubber",
        "rude",
        "rug",
        "rule",
        "run",
        "runway",
        "rural",
        "sad",
        "saddle",
        "sadness",
        "safe",
        "sail",
        "salad",
        "salmon",
        "salon",
        "salt",
        "salute",
        "same",
        "sample",
        "sand",
        "satisfy",
        "satoshi",
        "sauce",
        "sausage",
        "save",
        "say",
        "scale",
        "scan",
        "scare",
        "scatter",
        "scene",
        "scheme",
        "school",
        "science",
        "scissors",
        "scorpion",
        "scout",
        "scrap",
        "screen",
        "script",
        "scrub",
        "sea",
        "search",
        "season",
        "seat",
        "second",
        "secret",
        "section",
        "security",
        "seed",
        "seek",
        "segment",
        "select",
        "sell",
        "seminar",
        "senior",
        "sense",
        "sentence",
        "series",
        "service",
        "session",
        "settle",
        "setup",
        "seven",
        "shadow",
        "shaft",
        "shallow",
        "share",
        "shed",
        "shell",
        "sheriff",
        "shield",
        "shift",
        "shine",
        "ship",
        "shiver",
        "shock",
        "shoe",
        "shoot",
        "shop",
        "short",
        "shoulder",
        "shove",
        "shrimp",
        "shrug",
        "shuffle",
        "shy",
        "sibling",
        "sick",
        "side",
        "siege",
        "sight",
        "sign",
        "silent",
        "silk",
        "silly",
        "silver",
        "similar",
        "simple",
        "since",
        "sing",
        "siren",
        "sister",
        "situate",
        "six",
        "size",
        "skate",
        "sketch",
        "ski",
        "skill",
        "skin",
        "skirt",
        "skull",
        "slab",
        "slam",
        "sleep",
        "slender",
        "slice",
        "slide",
        "slight",
        "slim",
        "slogan",
        "slot",
        "slow",
        "slush",
        "small",
        "smart",
        "smile",
        "smoke",
        "smooth",
        "snack",
        "snake",
        "snap",
        "sniff",
        "snow",
        "soap",
        "soccer",
        "social",
        "sock",
        "soda",
        "soft",
        "solar",
        "soldier",
        "solid",
        "solution",
        "solve",
        "someone",
        "song",
        "soon",
        "sorry",
        "sort",
        "soul",
        "sound",
        "soup",
        "source",
        "south",
        "space",
        "spare",
        "spatial",
        "spawn",
        "speak",
        "special",
        "speed",
        "spell",
        "spend",
        "sphere",
        "spice",
        "spider",
        "spike",
        "spin",
        "spirit",
        "split",
        "spoil",
        "sponsor",
        "spoon",
        "sport",
        "spot",
        "spray",
        "spread",
        "spring",
        "spy",
        "square",
        "squeeze",
        "squirrel",
        "stable",
        "stadium",
        "staff",
        "stage",
        "stairs",
        "stamp",
        "stand",
        "start",
        "state",
        "stay",
        "steak",
        "steel",
        "stem",
        "step",
        "stereo",
        "stick",
        "still",
        "sting",
        "stock",
        "stomach",
        "stone",
        "stool",
        "story",
        "stove",
        "strategy",
        "street",
        "strike",
        "strong",
        "struggle",
        "student",
        "stuff",
        "stumble",
        "style",
        "subject",
        "submit",
        "subway",
        "success",
        "such",
        "sudden",
        "suffer",
        "sugar",
        "suggest",
        "suit",
        "summer",
        "sun",
        "sunny",
        "sunset",
        "super",
        "supply",
        "supreme",
        "sure",
        "surface",
        "surge",
        "surprise",
        "surround",
        "survey",
        "suspect",
        "sustain",
        "swallow",
        "swamp",
        "swap",
        "swarm",
        "swear",
        "sweet",
        "swift",
        "swim",
        "swing",
        "switch",
        "sword",
        "symbol",
        "symptom",
        "syrup",
        "system",
        "table",
        "tackle",
        "tag",
        "tail",
        "talent",
        "talk",
        "tank",
        "tape",
        "target",
        "task",
        "taste",
        "tattoo",
        "taxi",
        "teach",
        "team",
        "tell",
        "ten",
        "tenant",
        "tennis",
        "tent",
        "term",
        "test",
        "text",
        "thank",
        "that",
        "theme",
        "then",
        "theory",
        "there",
        "they",
        "thing",
        "this",
        "thought",
        "three",
        "thrive",
        "throw",
        "thumb",
        "thunder",
        "ticket",
        "tide",
        "tiger",
        "tilt",
        "timber",
        "time",
        "tiny",
        "tip",
        "tired",
        "tissue",
        "title",
        "toast",
        "tobacco",
        "today",
        "toddler",
        "toe",
        "together",
        "toilet",
        "token",
        "tomato",
        "tomorrow",
        "tone",
        "tongue",
        "tonight",
        "tool",
        "tooth",
        "top",
        "topic",
        "topple",
        "torch",
        "tornado",
        "tortoise",
        "toss",
        "total",
        "tourist",
        "toward",
        "tower",
        "town",
        "toy",
        "track",
        "trade",
        "traffic",
        "tragic",
        "train",
        "transfer",
        "trap",
        "trash",
        "travel",
        "tray",
        "treat",
        "tree",
        "trend",
        "trial",
        "tribe",
        "trick",
        "trigger",
        "trim",
        "trip",
        "trophy",
        "trouble",
        "truck",
        "true",
        "truly",
        "trumpet",
        "trust",
        "truth",
        "try",
        "tube",
        "tuition",
        "tumble",
        "tuna",
        "tunnel",
        "turkey",
        "turn",
        "turtle",
        "twelve",
        "twenty",
        "twice",
        "twin",
        "twist",
        "two",
        "type",
        "typical",
        "ugly",
        "umbrella",
        "unable",
        "unaware",
        "uncle",
        "uncover",
        "under",
        "undo",
        "unfair",
        "unfold",
        "unhappy",
        "uniform",
        "unique",
        "unit",
        "universe",
        "unknown",
        "unlock",
        "until",
        "unusual",
        "unveil",
        "update",
        "upgrade",
        "uphold",
        "upon",
        "upper",
        "upset",
        "urban",
        "urge",
        "usage",
        "use",
        "used",
        "useful",
        "useless",
        "usual",
        "utility",
        "vacant",
        "vacuum",
        "vague",
        "valid",
        "valley",
        "valve",
        "van",
        "vanish",
        "vapor",
        "various",
        "vast",
        "vault",
        "vehicle",
        "velvet",
        "vendor",
        "venture",
        "venue",
        "verb",
        "verify",
        "version",
        "very",
        "vessel",
        "veteran",
        "viable",
        "vibrant",
        "vicious",
        "victory",
        "video",
        "view",
        "village",
        "vintage",
        "violin",
        "virtual",
        "virus",
        "visa",
        "visit",
        "visual",
        "vital",
        "vivid",
        "vocal",
        "voice",
        "void",
        "volcano",
        "volume",
        "vote",
        "voyage",
        "wage",
        "wagon",
        "wait",
        "walk",
        "wall",
        "walnut",
        "want",
        "warfare",
        "warm",
        "warrior",
        "wash",
        "wasp",
        "waste",
        "water",
        "wave",
        "way",
        "wealth",
        "weapon",
        "wear",
        "weasel",
        "weather",
        "web",
        "wedding",
        "weekend",
        "weird",
        "welcome",
        "west",
        "wet",
        "whale",
        "what",
        "wheat",
        "wheel",
        "when",
        "where",
        "whip",
        "whisper",
        "wide",
        "width",
        "wife",
        "wild",
        "will",
        "win",
        "window",
        "wine",
        "wing",
        "wink",
        "winner",
        "winter",
        "wire",
        "wisdom",
        "wise",
        "wish",
        "witness",
        "wolf",
        "woman",
        "wonder",
        "wood",
        "wool",
        "word",
        "work",
        "world",
        "worry",
        "worth",
        "wrap",
        "wreck",
        "wrestle",
        "wrist",
        "write",
        "wrong",
        "yard",
        "year",
        "yellow",
        "you",
        "young",
        "youth",
        "zebra",
        "zero",
        "zone",
        "zoo"
      ];
      exports.wordlist = EN;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/mnemonic/mnemonic.js
  var require_mnemonic = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/mnemonic/mnemonic.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __importDefault2 = exports && exports.__importDefault || function(mod3) {
        return mod3 && mod3.__esModule ? mod3 : { "default": mod3 };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.mnemonicFromRandomSeed = exports.mnemonicIndexesToBytes = exports.bytesToMnemonics = exports.bytesToMnemonicIndexes = exports.mnemonicNew = exports.mnemonicValidate = exports.mnemonicToHDSeed = exports.mnemonicToWalletKey = exports.mnemonicToPrivateKey = exports.mnemonicToSeed = exports.mnemonicToEntropy = void 0;
      var tweetnacl_1 = __importDefault2(require_nacl_fast());
      var getSecureRandom_1 = require_getSecureRandom2();
      var hmac_sha512_1 = require_hmac_sha5122();
      var pbkdf2_sha512_1 = require_pbkdf2_sha5122();
      var binary_1 = require_binary();
      var wordlist_1 = require_wordlist2();
      var PBKDF_ITERATIONS = 1e5;
      async function isPasswordNeeded(mnemonicArray) {
        const passlessEntropy = await mnemonicToEntropy(mnemonicArray);
        return await isPasswordSeed(passlessEntropy) && !await isBasicSeed(passlessEntropy);
      }
      function normalizeMnemonic(src2) {
        return src2.map((v13) => v13.toLowerCase().trim());
      }
      async function isBasicSeed(entropy) {
        const seed = await (0, pbkdf2_sha512_1.pbkdf2_sha512)(entropy, "TON seed version", Math.max(1, Math.floor(PBKDF_ITERATIONS / 256)), 64);
        return seed[0] == 0;
      }
      async function isPasswordSeed(entropy) {
        const seed = await (0, pbkdf2_sha512_1.pbkdf2_sha512)(entropy, "TON fast seed version", 1, 64);
        return seed[0] == 1;
      }
      async function mnemonicToEntropy(mnemonicArray, password) {
        return await (0, hmac_sha512_1.hmac_sha512)(mnemonicArray.join(" "), password && password.length > 0 ? password : "");
      }
      exports.mnemonicToEntropy = mnemonicToEntropy;
      async function mnemonicToSeed(mnemonicArray, seed, password) {
        const entropy = await mnemonicToEntropy(mnemonicArray, password);
        return await (0, pbkdf2_sha512_1.pbkdf2_sha512)(entropy, seed, PBKDF_ITERATIONS, 64);
      }
      exports.mnemonicToSeed = mnemonicToSeed;
      async function mnemonicToPrivateKey(mnemonicArray, password) {
        mnemonicArray = normalizeMnemonic(mnemonicArray);
        const seed = await mnemonicToSeed(mnemonicArray, "TON default seed", password);
        let keyPair2 = tweetnacl_1.default.sign.keyPair.fromSeed(seed.slice(0, 32));
        return {
          publicKey: Buffer2.from(keyPair2.publicKey),
          secretKey: Buffer2.from(keyPair2.secretKey)
        };
      }
      exports.mnemonicToPrivateKey = mnemonicToPrivateKey;
      async function mnemonicToWalletKey2(mnemonicArray, password) {
        let seedPk = await mnemonicToPrivateKey(mnemonicArray, password);
        let seedSecret = seedPk.secretKey.slice(0, 32);
        const keyPair2 = tweetnacl_1.default.sign.keyPair.fromSeed(seedSecret);
        return {
          publicKey: Buffer2.from(keyPair2.publicKey),
          secretKey: Buffer2.from(keyPair2.secretKey)
        };
      }
      exports.mnemonicToWalletKey = mnemonicToWalletKey2;
      async function mnemonicToHDSeed(mnemonicArray, password) {
        mnemonicArray = normalizeMnemonic(mnemonicArray);
        return await mnemonicToSeed(mnemonicArray, "TON HD Keys seed", password);
      }
      exports.mnemonicToHDSeed = mnemonicToHDSeed;
      async function mnemonicValidate2(mnemonicArray, password) {
        mnemonicArray = normalizeMnemonic(mnemonicArray);
        for (let word of mnemonicArray) {
          if (wordlist_1.wordlist.indexOf(word) < 0) {
            return false;
          }
        }
        if (password && password.length > 0) {
          if (!await isPasswordNeeded(mnemonicArray)) {
            return false;
          }
        }
        return await isBasicSeed(await mnemonicToEntropy(mnemonicArray, password));
      }
      exports.mnemonicValidate = mnemonicValidate2;
      async function mnemonicNew(wordsCount = 24, password) {
        let mnemonicArray = [];
        while (true) {
          mnemonicArray = [];
          for (let i5 = 0; i5 < wordsCount; i5++) {
            let ind = await (0, getSecureRandom_1.getSecureRandomNumber)(0, wordlist_1.wordlist.length);
            mnemonicArray.push(wordlist_1.wordlist[ind]);
          }
          if (password && password.length > 0) {
            if (!await isPasswordNeeded(mnemonicArray)) {
              continue;
            }
          }
          if (!await isBasicSeed(await mnemonicToEntropy(mnemonicArray, password))) {
            continue;
          }
          break;
        }
        return mnemonicArray;
      }
      exports.mnemonicNew = mnemonicNew;
      function bytesToMnemonicIndexes(src2, wordsCount) {
        let bits = (0, binary_1.bytesToBits)(src2);
        let indexes = [];
        for (let i5 = 0; i5 < wordsCount; i5++) {
          let sl = bits.slice(i5 * 11, i5 * 11 + 11);
          indexes.push(parseInt(sl, 2));
        }
        return indexes;
      }
      exports.bytesToMnemonicIndexes = bytesToMnemonicIndexes;
      function bytesToMnemonics(src2, wordsCount) {
        let mnemonics = bytesToMnemonicIndexes(src2, wordsCount);
        let res = [];
        for (let m3 of mnemonics) {
          res.push(wordlist_1.wordlist[m3]);
        }
        return res;
      }
      exports.bytesToMnemonics = bytesToMnemonics;
      function mnemonicIndexesToBytes(src2) {
        let res = "";
        for (let s3 of src2) {
          if (!Number.isSafeInteger(s3)) {
            throw Error("Invalid input");
          }
          if (s3 < 0 || s3 >= 2028) {
            throw Error("Invalid input");
          }
          res += (0, binary_1.lpad)(s3.toString(2), "0", 11);
        }
        while (res.length % 8 !== 0) {
          res = res + "0";
        }
        return (0, binary_1.bitsToBytes)(res);
      }
      exports.mnemonicIndexesToBytes = mnemonicIndexesToBytes;
      async function mnemonicFromRandomSeed(seed, wordsCount = 24, password) {
        const bytesLength = Math.ceil(wordsCount * 11 / 8);
        let currentSeed = seed;
        while (true) {
          let entropy = await (0, pbkdf2_sha512_1.pbkdf2_sha512)(currentSeed, "TON mnemonic seed", Math.max(1, Math.floor(PBKDF_ITERATIONS / 256)), bytesLength);
          let mnemonics = bytesToMnemonics(entropy, wordsCount);
          if (await mnemonicValidate2(mnemonics, password)) {
            return mnemonics;
          }
          currentSeed = entropy;
        }
      }
      exports.mnemonicFromRandomSeed = mnemonicFromRandomSeed;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/primitives/nacl.js
  var require_nacl = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/primitives/nacl.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __importDefault2 = exports && exports.__importDefault || function(mod3) {
        return mod3 && mod3.__esModule ? mod3 : { "default": mod3 };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.openBox = exports.sealBox = exports.signVerify = exports.sign = exports.keyPairFromSeed = exports.keyPairFromSecretKey = void 0;
      var tweetnacl_1 = __importDefault2(require_nacl_fast());
      function keyPairFromSecretKey(secretKey) {
        let res = tweetnacl_1.default.sign.keyPair.fromSecretKey(new Uint8Array(secretKey));
        return {
          publicKey: Buffer2.from(res.publicKey),
          secretKey: Buffer2.from(res.secretKey)
        };
      }
      exports.keyPairFromSecretKey = keyPairFromSecretKey;
      function keyPairFromSeed(secretKey) {
        let res = tweetnacl_1.default.sign.keyPair.fromSeed(new Uint8Array(secretKey));
        return {
          publicKey: Buffer2.from(res.publicKey),
          secretKey: Buffer2.from(res.secretKey)
        };
      }
      exports.keyPairFromSeed = keyPairFromSeed;
      function sign6(data, secretKey) {
        return Buffer2.from(tweetnacl_1.default.sign.detached(new Uint8Array(data), new Uint8Array(secretKey)));
      }
      exports.sign = sign6;
      function signVerify(data, signature2, publicKey3) {
        return tweetnacl_1.default.sign.detached.verify(new Uint8Array(data), new Uint8Array(signature2), new Uint8Array(publicKey3));
      }
      exports.signVerify = signVerify;
      function sealBox(data, nonce, key2) {
        return Buffer2.from(tweetnacl_1.default.secretbox(data, nonce, key2));
      }
      exports.sealBox = sealBox;
      function openBox(data, nonce, key2) {
        let res = tweetnacl_1.default.secretbox.open(data, nonce, key2);
        if (!res) {
          return null;
        }
        return Buffer2.from(res);
      }
      exports.openBox = openBox;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/hd/ed25519.js
  var require_ed25519 = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/hd/ed25519.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.deriveEd25519Path = exports.deriveED25519HardenedKey = exports.getED25519MasterKeyFromSeed = void 0;
      var hmac_sha512_1 = require_hmac_sha5122();
      var ED25519_CURVE2 = "ed25519 seed";
      var HARDENED_OFFSET3 = 2147483648;
      async function getED25519MasterKeyFromSeed(seed) {
        const I7 = await (0, hmac_sha512_1.hmac_sha512)(ED25519_CURVE2, seed);
        const IL = I7.slice(0, 32);
        const IR = I7.slice(32);
        return {
          key: IL,
          chainCode: IR
        };
      }
      exports.getED25519MasterKeyFromSeed = getED25519MasterKeyFromSeed;
      async function deriveED25519HardenedKey(parent, index2) {
        if (index2 >= HARDENED_OFFSET3) {
          throw Error("Key index must be less than offset");
        }
        const indexBuffer = Buffer2.alloc(4);
        indexBuffer.writeUInt32BE(index2 + HARDENED_OFFSET3, 0);
        const data = Buffer2.concat([Buffer2.alloc(1, 0), parent.key, indexBuffer]);
        const I7 = await (0, hmac_sha512_1.hmac_sha512)(parent.chainCode, data);
        const IL = I7.slice(0, 32);
        const IR = I7.slice(32);
        return {
          key: IL,
          chainCode: IR
        };
      }
      exports.deriveED25519HardenedKey = deriveED25519HardenedKey;
      async function deriveEd25519Path(seed, path) {
        let state = await getED25519MasterKeyFromSeed(seed);
        let remaining = [...path];
        while (remaining.length > 0) {
          let index2 = remaining[0];
          remaining = remaining.slice(1);
          state = await deriveED25519HardenedKey(state, index2);
        }
        return state.key;
      }
      exports.deriveEd25519Path = deriveEd25519Path;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/hd/symmetric.js
  var require_symmetric = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/hd/symmetric.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.deriveSymmetricPath = exports.deriveSymmetricHardenedKey = exports.getSymmetricMasterKeyFromSeed = void 0;
      var hmac_sha512_1 = require_hmac_sha5122();
      var SYMMETRIC_SEED = "Symmetric key seed";
      async function getSymmetricMasterKeyFromSeed(seed) {
        const I7 = await (0, hmac_sha512_1.hmac_sha512)(SYMMETRIC_SEED, seed);
        const IL = I7.slice(32);
        const IR = I7.slice(0, 32);
        return {
          key: IL,
          chainCode: IR
        };
      }
      exports.getSymmetricMasterKeyFromSeed = getSymmetricMasterKeyFromSeed;
      async function deriveSymmetricHardenedKey(parent, offset2) {
        const data = Buffer2.concat([Buffer2.alloc(1, 0), Buffer2.from(offset2)]);
        const I7 = await (0, hmac_sha512_1.hmac_sha512)(parent.chainCode, data);
        const IL = I7.slice(32);
        const IR = I7.slice(0, 32);
        return {
          key: IL,
          chainCode: IR
        };
      }
      exports.deriveSymmetricHardenedKey = deriveSymmetricHardenedKey;
      async function deriveSymmetricPath(seed, path) {
        let state = await getSymmetricMasterKeyFromSeed(seed);
        let remaining = [...path];
        while (remaining.length > 0) {
          let index2 = remaining[0];
          remaining = remaining.slice(1);
          state = await deriveSymmetricHardenedKey(state, index2);
        }
        return state.key;
      }
      exports.deriveSymmetricPath = deriveSymmetricPath;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/hd/mnemonics.js
  var require_mnemonics = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/hd/mnemonics.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.deriveMnemonicsPath = exports.deriveMnemonicHardenedKey = exports.getMnemonicsMasterKeyFromSeed = void 0;
      var mnemonic_1 = require_mnemonic();
      var hmac_sha512_1 = require_hmac_sha5122();
      var HARDENED_OFFSET3 = 2147483648;
      var MNEMONICS_SEED = "TON Mnemonics HD seed";
      async function getMnemonicsMasterKeyFromSeed(seed) {
        const I7 = await (0, hmac_sha512_1.hmac_sha512)(MNEMONICS_SEED, seed);
        const IL = I7.slice(0, 32);
        const IR = I7.slice(32);
        return {
          key: IL,
          chainCode: IR
        };
      }
      exports.getMnemonicsMasterKeyFromSeed = getMnemonicsMasterKeyFromSeed;
      async function deriveMnemonicHardenedKey(parent, index2) {
        if (index2 >= HARDENED_OFFSET3) {
          throw Error("Key index must be less than offset");
        }
        const indexBuffer = Buffer2.alloc(4);
        indexBuffer.writeUInt32BE(index2 + HARDENED_OFFSET3, 0);
        const data = Buffer2.concat([Buffer2.alloc(1, 0), parent.key, indexBuffer]);
        const I7 = await (0, hmac_sha512_1.hmac_sha512)(parent.chainCode, data);
        const IL = I7.slice(0, 32);
        const IR = I7.slice(32);
        return {
          key: IL,
          chainCode: IR
        };
      }
      exports.deriveMnemonicHardenedKey = deriveMnemonicHardenedKey;
      async function deriveMnemonicsPath(seed, path, wordsCount = 24, password) {
        let state = await getMnemonicsMasterKeyFromSeed(seed);
        let remaining = [...path];
        while (remaining.length > 0) {
          let index2 = remaining[0];
          remaining = remaining.slice(1);
          state = await deriveMnemonicHardenedKey(state, index2);
        }
        return await (0, mnemonic_1.mnemonicFromRandomSeed)(state.key, wordsCount, password);
      }
      exports.deriveMnemonicsPath = deriveMnemonicsPath;
    }
  });

  // ../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/index.js
  var require_dist = __commonJS({
    "../../node_modules/.pnpm/@ton+crypto@3.3.0/node_modules/@ton/crypto/dist/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.getMnemonicsMasterKeyFromSeed = exports.deriveMnemonicHardenedKey = exports.deriveMnemonicsPath = exports.deriveSymmetricPath = exports.deriveSymmetricHardenedKey = exports.getSymmetricMasterKeyFromSeed = exports.deriveEd25519Path = exports.deriveED25519HardenedKey = exports.getED25519MasterKeyFromSeed = exports.signVerify = exports.sign = exports.keyPairFromSecretKey = exports.keyPairFromSeed = exports.openBox = exports.sealBox = exports.mnemonicWordList = exports.mnemonicToHDSeed = exports.mnemonicToSeed = exports.mnemonicToWalletKey = exports.mnemonicToPrivateKey = exports.mnemonicValidate = exports.mnemonicNew = exports.newSecurePassphrase = exports.newSecureWords = exports.getSecureRandomNumber = exports.getSecureRandomWords = exports.getSecureRandomBytes = exports.hmac_sha512 = exports.pbkdf2_sha512 = exports.sha512_sync = exports.sha512 = exports.sha256_sync = exports.sha256 = void 0;
      var sha256_1 = require_sha2563();
      Object.defineProperty(exports, "sha256", { enumerable: true, get: function() {
        return sha256_1.sha256;
      } });
      Object.defineProperty(exports, "sha256_sync", { enumerable: true, get: function() {
        return sha256_1.sha256_sync;
      } });
      var sha512_1 = require_sha5123();
      Object.defineProperty(exports, "sha512", { enumerable: true, get: function() {
        return sha512_1.sha512;
      } });
      Object.defineProperty(exports, "sha512_sync", { enumerable: true, get: function() {
        return sha512_1.sha512_sync;
      } });
      var pbkdf2_sha512_1 = require_pbkdf2_sha5122();
      Object.defineProperty(exports, "pbkdf2_sha512", { enumerable: true, get: function() {
        return pbkdf2_sha512_1.pbkdf2_sha512;
      } });
      var hmac_sha512_1 = require_hmac_sha5122();
      Object.defineProperty(exports, "hmac_sha512", { enumerable: true, get: function() {
        return hmac_sha512_1.hmac_sha512;
      } });
      var getSecureRandom_1 = require_getSecureRandom2();
      Object.defineProperty(exports, "getSecureRandomBytes", { enumerable: true, get: function() {
        return getSecureRandom_1.getSecureRandomBytes;
      } });
      Object.defineProperty(exports, "getSecureRandomWords", { enumerable: true, get: function() {
        return getSecureRandom_1.getSecureRandomWords;
      } });
      Object.defineProperty(exports, "getSecureRandomNumber", { enumerable: true, get: function() {
        return getSecureRandom_1.getSecureRandomNumber;
      } });
      var newSecureWords_1 = require_newSecureWords();
      Object.defineProperty(exports, "newSecureWords", { enumerable: true, get: function() {
        return newSecureWords_1.newSecureWords;
      } });
      var newSecurePassphrase_1 = require_newSecurePassphrase();
      Object.defineProperty(exports, "newSecurePassphrase", { enumerable: true, get: function() {
        return newSecurePassphrase_1.newSecurePassphrase;
      } });
      var mnemonic_1 = require_mnemonic();
      Object.defineProperty(exports, "mnemonicNew", { enumerable: true, get: function() {
        return mnemonic_1.mnemonicNew;
      } });
      Object.defineProperty(exports, "mnemonicValidate", { enumerable: true, get: function() {
        return mnemonic_1.mnemonicValidate;
      } });
      Object.defineProperty(exports, "mnemonicToPrivateKey", { enumerable: true, get: function() {
        return mnemonic_1.mnemonicToPrivateKey;
      } });
      Object.defineProperty(exports, "mnemonicToWalletKey", { enumerable: true, get: function() {
        return mnemonic_1.mnemonicToWalletKey;
      } });
      Object.defineProperty(exports, "mnemonicToSeed", { enumerable: true, get: function() {
        return mnemonic_1.mnemonicToSeed;
      } });
      Object.defineProperty(exports, "mnemonicToHDSeed", { enumerable: true, get: function() {
        return mnemonic_1.mnemonicToHDSeed;
      } });
      var wordlist_1 = require_wordlist2();
      Object.defineProperty(exports, "mnemonicWordList", { enumerable: true, get: function() {
        return wordlist_1.wordlist;
      } });
      var nacl_1 = require_nacl();
      Object.defineProperty(exports, "sealBox", { enumerable: true, get: function() {
        return nacl_1.sealBox;
      } });
      Object.defineProperty(exports, "openBox", { enumerable: true, get: function() {
        return nacl_1.openBox;
      } });
      var nacl_2 = require_nacl();
      Object.defineProperty(exports, "keyPairFromSeed", { enumerable: true, get: function() {
        return nacl_2.keyPairFromSeed;
      } });
      Object.defineProperty(exports, "keyPairFromSecretKey", { enumerable: true, get: function() {
        return nacl_2.keyPairFromSecretKey;
      } });
      Object.defineProperty(exports, "sign", { enumerable: true, get: function() {
        return nacl_2.sign;
      } });
      Object.defineProperty(exports, "signVerify", { enumerable: true, get: function() {
        return nacl_2.signVerify;
      } });
      var ed25519_1 = require_ed25519();
      Object.defineProperty(exports, "getED25519MasterKeyFromSeed", { enumerable: true, get: function() {
        return ed25519_1.getED25519MasterKeyFromSeed;
      } });
      Object.defineProperty(exports, "deriveED25519HardenedKey", { enumerable: true, get: function() {
        return ed25519_1.deriveED25519HardenedKey;
      } });
      Object.defineProperty(exports, "deriveEd25519Path", { enumerable: true, get: function() {
        return ed25519_1.deriveEd25519Path;
      } });
      var symmetric_1 = require_symmetric();
      Object.defineProperty(exports, "getSymmetricMasterKeyFromSeed", { enumerable: true, get: function() {
        return symmetric_1.getSymmetricMasterKeyFromSeed;
      } });
      Object.defineProperty(exports, "deriveSymmetricHardenedKey", { enumerable: true, get: function() {
        return symmetric_1.deriveSymmetricHardenedKey;
      } });
      Object.defineProperty(exports, "deriveSymmetricPath", { enumerable: true, get: function() {
        return symmetric_1.deriveSymmetricPath;
      } });
      var mnemonics_1 = require_mnemonics();
      Object.defineProperty(exports, "deriveMnemonicsPath", { enumerable: true, get: function() {
        return mnemonics_1.deriveMnemonicsPath;
      } });
      Object.defineProperty(exports, "deriveMnemonicHardenedKey", { enumerable: true, get: function() {
        return mnemonics_1.deriveMnemonicHardenedKey;
      } });
      Object.defineProperty(exports, "getMnemonicsMasterKeyFromSeed", { enumerable: true, get: function() {
        return mnemonics_1.getMnemonicsMasterKeyFromSeed;
      } });
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/inspect.js
  var require_inspect = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/inspect.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.inspectSymbol = void 0;
      exports.inspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/utils/crc16.js
  var require_crc16 = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/utils/crc16.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.crc16 = void 0;
      function crc16(data) {
        const poly = 4129;
        let reg = 0;
        const message = Buffer2.alloc(data.length + 2);
        message.set(data);
        for (let byte of message) {
          let mask2 = 128;
          while (mask2 > 0) {
            reg <<= 1;
            if (byte & mask2) {
              reg += 1;
            }
            mask2 >>= 1;
            if (reg > 65535) {
              reg &= 65535;
              reg ^= poly;
            }
          }
        }
        return Buffer2.from([Math.floor(reg / 256), reg % 256]);
      }
      exports.crc16 = crc16;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/address/Address.js
  var require_Address = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/address/Address.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var _a4;
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.address = exports.Address = void 0;
      var inspect_1 = require_inspect();
      var crc16_1 = require_crc16();
      var bounceable_tag = 17;
      var non_bounceable_tag = 81;
      var test_flag = 128;
      function parseFriendlyAddress(src2) {
        if (typeof src2 === "string" && !Address.isFriendly(src2)) {
          throw new Error("Unknown address type");
        }
        const data = Buffer2.isBuffer(src2) ? src2 : Buffer2.from(src2, "base64");
        if (data.length !== 36) {
          throw new Error("Unknown address type: byte length is not equal to 36");
        }
        const addr = data.subarray(0, 34);
        const crc = data.subarray(34, 36);
        const calcedCrc = (0, crc16_1.crc16)(addr);
        if (!(calcedCrc[0] === crc[0] && calcedCrc[1] === crc[1])) {
          throw new Error("Invalid checksum: " + src2);
        }
        let tag = addr[0];
        let isTestOnly = false;
        let isBounceable = false;
        if (tag & test_flag) {
          isTestOnly = true;
          tag = tag ^ test_flag;
        }
        if (tag !== bounceable_tag && tag !== non_bounceable_tag)
          throw "Unknown address tag";
        isBounceable = tag === bounceable_tag;
        let workchain = null;
        if (addr[1] === 255) {
          workchain = -1;
        } else {
          workchain = addr[1];
        }
        const hashPart = addr.subarray(2, 34);
        return { isTestOnly, isBounceable, workchain, hashPart };
      }
      var Address = class _Address {
        static isAddress(src2) {
          return src2 instanceof _Address;
        }
        static isFriendly(source) {
          if (source.length !== 48) {
            return false;
          }
          if (!/^[A-Za-z0-9+/_-]+$/.test(source)) {
            return false;
          }
          return true;
        }
        static isRaw(source) {
          if (source.indexOf(":") === -1) {
            return false;
          }
          let [wc, hash5] = source.split(":");
          if (!Number.isInteger(parseFloat(wc))) {
            return false;
          }
          if (!/[a-f0-9]+/.test(hash5.toLowerCase())) {
            return false;
          }
          if (hash5.length !== 64) {
            return false;
          }
          return true;
        }
        static normalize(source) {
          if (typeof source === "string") {
            return _Address.parse(source).toString();
          } else {
            return source.toString();
          }
        }
        static parse(source) {
          if (_Address.isFriendly(source)) {
            return this.parseFriendly(source).address;
          } else if (_Address.isRaw(source)) {
            return this.parseRaw(source);
          } else {
            throw new Error("Unknown address type: " + source);
          }
        }
        static parseRaw(source) {
          let workChain = parseInt(source.split(":")[0]);
          let hash5 = Buffer2.from(source.split(":")[1], "hex");
          return new _Address(workChain, hash5);
        }
        static parseFriendly(source) {
          if (Buffer2.isBuffer(source)) {
            let r3 = parseFriendlyAddress(source);
            return {
              isBounceable: r3.isBounceable,
              isTestOnly: r3.isTestOnly,
              address: new _Address(r3.workchain, r3.hashPart)
            };
          } else {
            let addr = source.replace(/\-/g, "+").replace(/_/g, "/");
            let r3 = parseFriendlyAddress(addr);
            return {
              isBounceable: r3.isBounceable,
              isTestOnly: r3.isTestOnly,
              address: new _Address(r3.workchain, r3.hashPart)
            };
          }
        }
        constructor(workChain, hash5) {
          this.toRawString = () => {
            return this.workChain + ":" + this.hash.toString("hex");
          };
          this.toRaw = () => {
            const addressWithChecksum = Buffer2.alloc(36);
            addressWithChecksum.set(this.hash);
            addressWithChecksum.set([this.workChain, this.workChain, this.workChain, this.workChain], 32);
            return addressWithChecksum;
          };
          this.toStringBuffer = (args) => {
            let testOnly = args && args.testOnly !== void 0 ? args.testOnly : false;
            let bounceable = args && args.bounceable !== void 0 ? args.bounceable : true;
            let tag = bounceable ? bounceable_tag : non_bounceable_tag;
            if (testOnly) {
              tag |= test_flag;
            }
            const addr = Buffer2.alloc(34);
            addr[0] = tag;
            addr[1] = this.workChain;
            addr.set(this.hash, 2);
            const addressWithChecksum = Buffer2.alloc(36);
            addressWithChecksum.set(addr);
            addressWithChecksum.set((0, crc16_1.crc16)(addr), 34);
            return addressWithChecksum;
          };
          this.toString = (args) => {
            let urlSafe = args && args.urlSafe !== void 0 ? args.urlSafe : true;
            let buffer2 = this.toStringBuffer(args);
            if (urlSafe) {
              return buffer2.toString("base64").replace(/\+/g, "-").replace(/\//g, "_");
            } else {
              return buffer2.toString("base64");
            }
          };
          this[_a4] = () => this.toString();
          if (hash5.length !== 32) {
            throw new Error("Invalid address hash length: " + hash5.length);
          }
          this.workChain = workChain;
          this.hash = hash5;
          Object.freeze(this);
        }
        equals(src2) {
          if (src2.workChain !== this.workChain) {
            return false;
          }
          return src2.hash.equals(this.hash);
        }
      };
      exports.Address = Address;
      _a4 = inspect_1.inspectSymbol;
      function address(src2) {
        return Address.parse(src2);
      }
      exports.address = address;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/address/ExternalAddress.js
  var require_ExternalAddress = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/address/ExternalAddress.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var _a4;
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.ExternalAddress = void 0;
      var inspect_1 = require_inspect();
      var ExternalAddress = class _ExternalAddress {
        static isAddress(src2) {
          return src2 instanceof _ExternalAddress;
        }
        constructor(value, bits) {
          this[_a4] = () => this.toString();
          this.value = value;
          this.bits = bits;
        }
        toString() {
          return `External<${this.bits}:${this.value}>`;
        }
      };
      exports.ExternalAddress = ExternalAddress;
      _a4 = inspect_1.inspectSymbol;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/utils/base32.js
  var require_base32 = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/utils/base32.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.base32Decode = exports.base32Encode = void 0;
      var alphabet3 = "abcdefghijklmnopqrstuvwxyz234567";
      function base32Encode(buffer2) {
        const length2 = buffer2.byteLength;
        let bits = 0;
        let value = 0;
        let output = "";
        for (let i5 = 0; i5 < length2; i5++) {
          value = value << 8 | buffer2[i5];
          bits += 8;
          while (bits >= 5) {
            output += alphabet3[value >>> bits - 5 & 31];
            bits -= 5;
          }
        }
        if (bits > 0) {
          output += alphabet3[value << 5 - bits & 31];
        }
        return output;
      }
      exports.base32Encode = base32Encode;
      function readChar(alphabet4, char) {
        const idx = alphabet4.indexOf(char);
        if (idx === -1) {
          throw new Error("Invalid character found: " + char);
        }
        return idx;
      }
      function base32Decode(input) {
        let cleanedInput;
        cleanedInput = input.toLowerCase();
        const { length: length2 } = cleanedInput;
        let bits = 0;
        let value = 0;
        let index2 = 0;
        const output = Buffer2.alloc(length2 * 5 / 8 | 0);
        for (let i5 = 0; i5 < length2; i5++) {
          value = value << 5 | readChar(alphabet3, cleanedInput[i5]);
          bits += 5;
          if (bits >= 8) {
            output[index2++] = value >>> bits - 8 & 255;
            bits -= 8;
          }
        }
        return output;
      }
      exports.base32Decode = base32Decode;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/address/ADNLAddress.js
  var require_ADNLAddress = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/address/ADNLAddress.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var _a4;
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.ADNLAddress = void 0;
      var inspect_1 = require_inspect();
      var base32_1 = require_base32();
      var crc16_1 = require_crc16();
      var ADNLAddress = class _ADNLAddress {
        static parseFriendly(src2) {
          if (src2.length !== 55) {
            throw Error("Invalid address");
          }
          src2 = "f" + src2;
          let decoded = (0, base32_1.base32Decode)(src2);
          if (decoded[0] !== 45) {
            throw Error("Invalid address");
          }
          let gotHash = decoded.slice(33);
          let hash5 = (0, crc16_1.crc16)(decoded.slice(0, 33));
          if (!hash5.equals(gotHash)) {
            throw Error("Invalid address");
          }
          return new _ADNLAddress(decoded.slice(1, 33));
        }
        static parseRaw(src2) {
          const data = Buffer2.from(src2, "base64");
          return new _ADNLAddress(data);
        }
        constructor(address) {
          this.toRaw = () => {
            return this.address.toString("hex").toUpperCase();
          };
          this.toString = () => {
            let data = Buffer2.concat([Buffer2.from([45]), this.address]);
            let hash5 = (0, crc16_1.crc16)(data);
            data = Buffer2.concat([data, hash5]);
            return (0, base32_1.base32Encode)(data).slice(1);
          };
          this[_a4] = () => this.toString();
          if (address.length !== 32) {
            throw Error("Invalid address");
          }
          this.address = address;
        }
        equals(b9) {
          return this.address.equals(b9.address);
        }
      };
      exports.ADNLAddress = ADNLAddress;
      _a4 = inspect_1.inspectSymbol;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/utils/paddedBits.js
  var require_paddedBits = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/utils/paddedBits.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.paddedBufferToBits = exports.bitsToPaddedBuffer = void 0;
      var BitBuilder_1 = require_BitBuilder();
      var BitString_1 = require_BitString();
      function bitsToPaddedBuffer(bits) {
        let builder = new BitBuilder_1.BitBuilder(Math.ceil(bits.length / 8) * 8);
        builder.writeBits(bits);
        let padding = Math.ceil(bits.length / 8) * 8 - bits.length;
        for (let i5 = 0; i5 < padding; i5++) {
          if (i5 === 0) {
            builder.writeBit(1);
          } else {
            builder.writeBit(0);
          }
        }
        return builder.buffer();
      }
      exports.bitsToPaddedBuffer = bitsToPaddedBuffer;
      function paddedBufferToBits(buff) {
        let bitLen3 = 0;
        for (let i5 = buff.length - 1; i5 >= 0; i5--) {
          if (buff[i5] !== 0) {
            const testByte = buff[i5];
            let bitPos = testByte & -testByte;
            if ((bitPos & 1) == 0) {
              bitPos = Math.log2(bitPos) + 1;
            }
            if (i5 > 0) {
              bitLen3 = i5 << 3;
            }
            bitLen3 += 8 - bitPos;
            break;
          }
        }
        return new BitString_1.BitString(buff, 0, bitLen3);
      }
      exports.paddedBufferToBits = paddedBufferToBits;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/BitString.js
  var require_BitString = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/BitString.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var _a4;
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.BitString = void 0;
      var paddedBits_1 = require_paddedBits();
      var inspect_1 = require_inspect();
      var BitString = class _BitString {
        /**
         * Checks if supplied object is BitString
         * @param src is unknow object
         * @returns true if object is BitString and false otherwise
         **/
        static isBitString(src2) {
          return src2 instanceof _BitString;
        }
        /**
         * Constructing BitString from a buffer
         * @param data data that contains the bitstring data. NOTE: We are expecting this buffer to be NOT modified
         * @param offset offset in bits from the start of the buffer
         * @param length length of the bitstring in bits
         */
        constructor(data, offset2, length2) {
          this[_a4] = () => this.toString();
          if (length2 < 0) {
            throw new Error(`Length ${length2} is out of bounds`);
          }
          this._length = length2;
          this._data = data;
          this._offset = offset2;
        }
        /**
         * Returns the length of the bitstring
         */
        get length() {
          return this._length;
        }
        /**
         * Returns the bit at the specified index
         * @param index index of the bit
         * @throws Error if index is out of bounds
         * @returns true if the bit is set, false otherwise
         */
        at(index2) {
          if (index2 >= this._length) {
            throw new Error(`Index ${index2} > ${this._length} is out of bounds`);
          }
          if (index2 < 0) {
            throw new Error(`Index ${index2} < 0 is out of bounds`);
          }
          let byteIndex = this._offset + index2 >> 3;
          let bitIndex = 7 - (this._offset + index2) % 8;
          return (this._data[byteIndex] & 1 << bitIndex) !== 0;
        }
        /**
         * Get a substring of the bitstring
         * @param offset
         * @param length
         * @returns
         */
        substring(offset2, length2) {
          if (offset2 > this._length) {
            throw new Error(`Offset(${offset2}) > ${this._length} is out of bounds`);
          }
          if (offset2 < 0) {
            throw new Error(`Offset(${offset2}) < 0 is out of bounds`);
          }
          if (length2 === 0) {
            return _BitString.EMPTY;
          }
          if (offset2 + length2 > this._length) {
            throw new Error(`Offset ${offset2} + Length ${length2} > ${this._length} is out of bounds`);
          }
          return new _BitString(this._data, this._offset + offset2, length2);
        }
        /**
         * Try to get a buffer from the bitstring without allocations
         * @param offset offset in bits
         * @param length length in bits
         * @returns buffer if the bitstring is aligned to bytes, null otherwise
         */
        subbuffer(offset2, length2) {
          if (offset2 > this._length) {
            throw new Error(`Offset ${offset2} is out of bounds`);
          }
          if (offset2 < 0) {
            throw new Error(`Offset ${offset2} is out of bounds`);
          }
          if (offset2 + length2 > this._length) {
            throw new Error(`Offset + Length = ${offset2 + length2} is out of bounds`);
          }
          if (length2 % 8 !== 0) {
            return null;
          }
          if ((this._offset + offset2) % 8 !== 0) {
            return null;
          }
          let start = this._offset + offset2 >> 3;
          let end = start + (length2 >> 3);
          return this._data.subarray(start, end);
        }
        /**
         * Checks for equality
         * @param b other bitstring
         * @returns true if the bitstrings are equal, false otherwise
         */
        equals(b9) {
          if (this._length !== b9._length) {
            return false;
          }
          for (let i5 = 0; i5 < this._length; i5++) {
            if (this.at(i5) !== b9.at(i5)) {
              return false;
            }
          }
          return true;
        }
        /**
         * Format to canonical string
         * @returns formatted bits as a string
         */
        toString() {
          const padded = (0, paddedBits_1.bitsToPaddedBuffer)(this);
          if (this._length % 4 === 0) {
            const s3 = padded.subarray(0, Math.ceil(this._length / 8)).toString("hex").toUpperCase();
            if (this._length % 8 === 0) {
              return s3;
            } else {
              return s3.substring(0, s3.length - 1);
            }
          } else {
            const hex3 = padded.toString("hex").toUpperCase();
            if (this._length % 8 <= 4) {
              return hex3.substring(0, hex3.length - 1) + "_";
            } else {
              return hex3 + "_";
            }
          }
        }
      };
      exports.BitString = BitString;
      _a4 = inspect_1.inspectSymbol;
      BitString.EMPTY = new BitString(Buffer2.alloc(0), 0, 0);
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/BitBuilder.js
  var require_BitBuilder = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/BitBuilder.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.BitBuilder = void 0;
      var Address_1 = require_Address();
      var ExternalAddress_1 = require_ExternalAddress();
      var BitString_1 = require_BitString();
      var BitBuilder = class {
        constructor(size5 = 1023) {
          this._buffer = Buffer2.alloc(Math.ceil(size5 / 8));
          this._length = 0;
        }
        /**
         * Current number of bits written
         */
        get length() {
          return this._length;
        }
        /**
         * Write a single bit
         * @param value bit to write, true or positive number for 1, false or zero or negative for 0
         */
        writeBit(value) {
          let n6 = this._length;
          if (n6 > this._buffer.length * 8) {
            throw new Error("BitBuilder overflow");
          }
          if (typeof value === "boolean" && value === true || typeof value === "number" && value > 0) {
            this._buffer[n6 / 8 | 0] |= 1 << 7 - n6 % 8;
          }
          this._length++;
        }
        /**
         * Copy bits from BitString
         * @param src source bits
         */
        writeBits(src2) {
          for (let i5 = 0; i5 < src2.length; i5++) {
            this.writeBit(src2.at(i5));
          }
        }
        /**
         * Write bits from buffer
         * @param src source buffer
         */
        writeBuffer(src2) {
          if (this._length % 8 === 0) {
            if (this._length + src2.length * 8 > this._buffer.length * 8) {
              throw new Error("BitBuilder overflow");
            }
            src2.copy(this._buffer, this._length / 8);
            this._length += src2.length * 8;
          } else {
            for (let i5 = 0; i5 < src2.length; i5++) {
              this.writeUint(src2[i5], 8);
            }
          }
        }
        /**
         * Write uint value
         * @param value value as bigint or number
         * @param bits number of bits to write
         */
        writeUint(value, bits) {
          if (bits < 0 || !Number.isSafeInteger(bits)) {
            throw Error(`invalid bit length. Got ${bits}`);
          }
          const v13 = BigInt(value);
          if (bits === 0) {
            if (v13 !== 0n) {
              throw Error(`value is not zero for ${bits} bits. Got ${value}`);
            } else {
              return;
            }
          }
          const vBits = 1n << BigInt(bits);
          if (v13 < 0 || v13 >= vBits) {
            throw Error(`bitLength is too small for a value ${value}. Got ${bits}`);
          }
          if (this._length + bits > this._buffer.length * 8) {
            throw new Error("BitBuilder overflow");
          }
          const tillByte = 8 - this._length % 8;
          if (tillByte > 0) {
            const bidx = Math.floor(this._length / 8);
            if (bits < tillByte) {
              const wb = Number(v13);
              this._buffer[bidx] |= wb << tillByte - bits;
              this._length += bits;
            } else {
              const wb = Number(v13 >> BigInt(bits - tillByte));
              this._buffer[bidx] |= wb;
              this._length += tillByte;
            }
          }
          bits -= tillByte;
          while (bits > 0) {
            if (bits >= 8) {
              this._buffer[this._length / 8] = Number(v13 >> BigInt(bits - 8) & 0xffn);
              this._length += 8;
              bits -= 8;
            } else {
              this._buffer[this._length / 8] = Number(v13 << BigInt(8 - bits) & 0xffn);
              this._length += bits;
              bits = 0;
            }
          }
        }
        /**
         * Write int value
         * @param value value as bigint or number
         * @param bits number of bits to write
         */
        writeInt(value, bits) {
          let v13 = BigInt(value);
          if (bits < 0 || !Number.isSafeInteger(bits)) {
            throw Error(`invalid bit length. Got ${bits}`);
          }
          if (bits === 0) {
            if (v13 !== 0n) {
              throw Error(`value is not zero for ${bits} bits. Got ${value}`);
            } else {
              return;
            }
          }
          if (bits === 1) {
            if (v13 !== -1n && v13 !== 0n) {
              throw Error(`value is not zero or -1 for ${bits} bits. Got ${value}`);
            } else {
              this.writeBit(v13 === -1n);
              return;
            }
          }
          let vBits = 1n << BigInt(bits) - 1n;
          if (v13 < -vBits || v13 >= vBits) {
            throw Error(`value is out of range for ${bits} bits. Got ${value}`);
          }
          if (v13 < 0) {
            this.writeBit(true);
            v13 = vBits + v13;
          } else {
            this.writeBit(false);
          }
          this.writeUint(v13, bits - 1);
        }
        /**
         * Write var uint value, used for serializing coins
         * @param value value to write as bigint or number
         * @param bits header bits to write size
         */
        writeVarUint(value, bits) {
          let v13 = BigInt(value);
          if (bits < 0 || !Number.isSafeInteger(bits)) {
            throw Error(`invalid bit length. Got ${bits}`);
          }
          if (v13 < 0) {
            throw Error(`value is negative. Got ${value}`);
          }
          if (v13 === 0n) {
            this.writeUint(0, bits);
            return;
          }
          const sizeBytes = Math.ceil(v13.toString(2).length / 8);
          const sizeBits = sizeBytes * 8;
          this.writeUint(sizeBytes, bits);
          this.writeUint(v13, sizeBits);
        }
        /**
         * Write var int value, used for serializing coins
         * @param value value to write as bigint or number
         * @param bits header bits to write size
         */
        writeVarInt(value, bits) {
          let v13 = BigInt(value);
          if (bits < 0 || !Number.isSafeInteger(bits)) {
            throw Error(`invalid bit length. Got ${bits}`);
          }
          if (v13 === 0n) {
            this.writeUint(0, bits);
            return;
          }
          let v22 = v13 > 0 ? v13 : -v13;
          const sizeBytes = Math.ceil((v22.toString(2).length + 1) / 8);
          const sizeBits = sizeBytes * 8;
          this.writeUint(sizeBytes, bits);
          this.writeInt(v13, sizeBits);
        }
        /**
         * Write coins in var uint format
         * @param amount amount to write
         */
        writeCoins(amount) {
          this.writeVarUint(amount, 4);
        }
        /**
         * Write address
         * @param address write address or address external
         */
        writeAddress(address) {
          if (address === null || address === void 0) {
            this.writeUint(0, 2);
            return;
          }
          if (Address_1.Address.isAddress(address)) {
            this.writeUint(2, 2);
            this.writeUint(0, 1);
            this.writeInt(address.workChain, 8);
            this.writeBuffer(address.hash);
            return;
          }
          if (ExternalAddress_1.ExternalAddress.isAddress(address)) {
            this.writeUint(1, 2);
            this.writeUint(address.bits, 9);
            this.writeUint(address.value, address.bits);
            return;
          }
          throw Error(`Invalid address. Got ${address}`);
        }
        /**
         * Build BitString
         * @returns result bit string
         */
        build() {
          return new BitString_1.BitString(this._buffer, 0, this._length);
        }
        /**
         * Build into Buffer
         * @returns result buffer
         */
        buffer() {
          if (this._length % 8 !== 0) {
            throw new Error("BitBuilder buffer is not byte aligned");
          }
          return this._buffer.subarray(0, this._length / 8);
        }
      };
      exports.BitBuilder = BitBuilder;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/CellType.js
  var require_CellType = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/CellType.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.CellType = void 0;
      var CellType;
      (function(CellType2) {
        CellType2[CellType2["Ordinary"] = -1] = "Ordinary";
        CellType2[CellType2["PrunedBranch"] = 1] = "PrunedBranch";
        CellType2[CellType2["Library"] = 2] = "Library";
        CellType2[CellType2["MerkleProof"] = 3] = "MerkleProof";
        CellType2[CellType2["MerkleUpdate"] = 4] = "MerkleUpdate";
      })(CellType || (exports.CellType = CellType = {}));
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/utils/readUnaryLength.js
  var require_readUnaryLength = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/utils/readUnaryLength.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.readUnaryLength = void 0;
      function readUnaryLength(slice4) {
        let res = 0;
        while (slice4.loadBit()) {
          res++;
        }
        return res;
      }
      exports.readUnaryLength = readUnaryLength;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/BitReader.js
  var require_BitReader = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/BitReader.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.BitReader = void 0;
      var Address_1 = require_Address();
      var ExternalAddress_1 = require_ExternalAddress();
      var BitReader = class _BitReader {
        constructor(bits, offset2 = 0) {
          this._checkpoints = [];
          this._bits = bits;
          this._offset = offset2;
        }
        /**
         * Offset in source bit string
         */
        get offset() {
          return this._offset;
        }
        /**
         * Number of bits remaining
         */
        get remaining() {
          return this._bits.length - this._offset;
        }
        /**
         * Skip bits
         * @param bits number of bits to skip
         */
        skip(bits) {
          if (bits < 0 || this._offset + bits > this._bits.length) {
            throw new Error(`Index ${this._offset + bits} is out of bounds`);
          }
          this._offset += bits;
        }
        /**
         * Reset to the beginning or latest checkpoint
         */
        reset() {
          if (this._checkpoints.length > 0) {
            this._offset = this._checkpoints.pop();
          } else {
            this._offset = 0;
          }
        }
        /**
         * Save checkpoint
         */
        save() {
          this._checkpoints.push(this._offset);
        }
        /**
         * Load a single bit
         * @returns true if the bit is set, false otherwise
         */
        loadBit() {
          let r3 = this._bits.at(this._offset);
          this._offset++;
          return r3;
        }
        /**
         * Preload bit
         * @returns true if the bit is set, false otherwise
         */
        preloadBit() {
          return this._bits.at(this._offset);
        }
        /**
         * Load bit string
         * @param bits number of bits to read
         * @returns new bitstring
         */
        loadBits(bits) {
          let r3 = this._bits.substring(this._offset, bits);
          this._offset += bits;
          return r3;
        }
        /**
         * Preload bit string
         * @param bits number of bits to read
         * @returns new bitstring
         */
        preloadBits(bits) {
          return this._bits.substring(this._offset, bits);
        }
        /**
         * Load buffer
         * @param bytes number of bytes
         * @returns new buffer
         */
        loadBuffer(bytes) {
          let buf = this._preloadBuffer(bytes, this._offset);
          this._offset += bytes * 8;
          return buf;
        }
        /**
         * Preload buffer
         * @param bytes number of bytes
         * @returns new buffer
         */
        preloadBuffer(bytes) {
          return this._preloadBuffer(bytes, this._offset);
        }
        /**
         * Load uint value
         * @param bits uint bits
         * @returns read value as number
         */
        loadUint(bits) {
          return this._toSafeInteger(this.loadUintBig(bits), "loadUintBig");
        }
        /**
         * Load uint value as bigint
         * @param bits uint bits
         * @returns read value as bigint
         */
        loadUintBig(bits) {
          let loaded = this.preloadUintBig(bits);
          this._offset += bits;
          return loaded;
        }
        /**
         * Preload uint value
         * @param bits uint bits
         * @returns read value as number
         */
        preloadUint(bits) {
          return this._toSafeInteger(this._preloadUint(bits, this._offset), "preloadUintBig");
        }
        /**
         * Preload uint value as bigint
         * @param bits uint bits
         * @returns read value as bigint
         */
        preloadUintBig(bits) {
          return this._preloadUint(bits, this._offset);
        }
        /**
         * Load int value
         * @param bits int bits
         * @returns read value as bigint
         */
        loadInt(bits) {
          let res = this._preloadInt(bits, this._offset);
          this._offset += bits;
          return this._toSafeInteger(res, "loadUintBig");
        }
        /**
         * Load int value as bigint
         * @param bits int bits
         * @returns read value as bigint
         */
        loadIntBig(bits) {
          let res = this._preloadInt(bits, this._offset);
          this._offset += bits;
          return res;
        }
        /**
         * Preload int value
         * @param bits int bits
         * @returns read value as bigint
         */
        preloadInt(bits) {
          return this._toSafeInteger(this._preloadInt(bits, this._offset), "preloadIntBig");
        }
        /**
         * Preload int value
         * @param bits int bits
         * @returns read value as bigint
         */
        preloadIntBig(bits) {
          return this._preloadInt(bits, this._offset);
        }
        /**
         * Load varuint value
         * @param bits number of bits to read the size
         * @returns read value as bigint
         */
        loadVarUint(bits) {
          let size5 = Number(this.loadUint(bits));
          return this._toSafeInteger(this.loadUintBig(size5 * 8), "loadVarUintBig");
        }
        /**
         * Load varuint value
         * @param bits number of bits to read the size
         * @returns read value as bigint
         */
        loadVarUintBig(bits) {
          let size5 = Number(this.loadUint(bits));
          return this.loadUintBig(size5 * 8);
        }
        /**
         * Preload varuint value
         * @param bits number of bits to read the size
         * @returns read value as bigint
         */
        preloadVarUint(bits) {
          let size5 = Number(this._preloadUint(bits, this._offset));
          return this._toSafeInteger(this._preloadUint(size5 * 8, this._offset + bits), "preloadVarUintBig");
        }
        /**
         * Preload varuint value
         * @param bits number of bits to read the size
         * @returns read value as bigint
         */
        preloadVarUintBig(bits) {
          let size5 = Number(this._preloadUint(bits, this._offset));
          return this._preloadUint(size5 * 8, this._offset + bits);
        }
        /**
         * Load varint value
         * @param bits number of bits to read the size
         * @returns read value as bigint
         */
        loadVarInt(bits) {
          let size5 = Number(this.loadUint(bits));
          return this._toSafeInteger(this.loadIntBig(size5 * 8), "loadVarIntBig");
        }
        /**
         * Load varint value
         * @param bits number of bits to read the size
         * @returns read value as bigint
         */
        loadVarIntBig(bits) {
          let size5 = Number(this.loadUint(bits));
          return this.loadIntBig(size5 * 8);
        }
        /**
         * Preload varint value
         * @param bits number of bits to read the size
         * @returns read value as bigint
         */
        preloadVarInt(bits) {
          let size5 = Number(this._preloadUint(bits, this._offset));
          return this._toSafeInteger(this._preloadInt(size5 * 8, this._offset + bits), "preloadVarIntBig");
        }
        /**
         * Preload varint value
         * @param bits number of bits to read the size
         * @returns read value as bigint
         */
        preloadVarIntBig(bits) {
          let size5 = Number(this._preloadUint(bits, this._offset));
          return this._preloadInt(size5 * 8, this._offset + bits);
        }
        /**
         * Load coins value
         * @returns read value as bigint
         */
        loadCoins() {
          return this.loadVarUintBig(4);
        }
        /**
         * Preload coins value
         * @returns read value as bigint
         */
        preloadCoins() {
          return this.preloadVarUintBig(4);
        }
        /**
         * Load Address
         * @returns Address
         */
        loadAddress() {
          let type2 = Number(this._preloadUint(2, this._offset));
          if (type2 === 2) {
            return this._loadInternalAddress();
          } else {
            throw new Error("Invalid address: " + type2);
          }
        }
        /**
         * Load internal address
         * @returns Address or null
         */
        loadMaybeAddress() {
          let type2 = Number(this._preloadUint(2, this._offset));
          if (type2 === 0) {
            this._offset += 2;
            return null;
          } else if (type2 === 2) {
            return this._loadInternalAddress();
          } else {
            throw new Error("Invalid address");
          }
        }
        /**
         * Load external address
         * @returns ExternalAddress
         */
        loadExternalAddress() {
          let type2 = Number(this._preloadUint(2, this._offset));
          if (type2 === 1) {
            return this._loadExternalAddress();
          } else {
            throw new Error("Invalid address");
          }
        }
        /**
         * Load external address
         * @returns ExternalAddress or null
         */
        loadMaybeExternalAddress() {
          let type2 = Number(this._preloadUint(2, this._offset));
          if (type2 === 0) {
            this._offset += 2;
            return null;
          } else if (type2 === 1) {
            return this._loadExternalAddress();
          } else {
            throw new Error("Invalid address");
          }
        }
        /**
         * Read address of any type
         * @returns Address or ExternalAddress or null
         */
        loadAddressAny() {
          let type2 = Number(this._preloadUint(2, this._offset));
          if (type2 === 0) {
            this._offset += 2;
            return null;
          } else if (type2 === 2) {
            return this._loadInternalAddress();
          } else if (type2 === 1) {
            return this._loadExternalAddress();
          } else if (type2 === 3) {
            throw Error("Unsupported");
          } else {
            throw Error("Unreachable");
          }
        }
        /**
         * Load bit string that was padded to make it byte alligned. Used in BOC serialization
         * @param bits number of bytes to read
         */
        loadPaddedBits(bits) {
          if (bits % 8 !== 0) {
            throw new Error("Invalid number of bits");
          }
          let length2 = bits;
          while (true) {
            if (this._bits.at(this._offset + length2 - 1)) {
              length2--;
              break;
            } else {
              length2--;
            }
          }
          let r3 = this._bits.substring(this._offset, length2);
          this._offset += bits;
          return r3;
        }
        /**
         * Clone BitReader
         */
        clone() {
          return new _BitReader(this._bits, this._offset);
        }
        /**
         * Preload int from specific offset
         * @param bits bits to preload
         * @param offset offset to start from
         * @returns read value as bigint
         */
        _preloadInt(bits, offset2) {
          if (bits == 0) {
            return 0n;
          }
          let sign6 = this._bits.at(offset2);
          let res = 0n;
          for (let i5 = 0; i5 < bits - 1; i5++) {
            if (this._bits.at(offset2 + 1 + i5)) {
              res += 1n << BigInt(bits - i5 - 1 - 1);
            }
          }
          if (sign6) {
            res = res - (1n << BigInt(bits - 1));
          }
          return res;
        }
        /**
         * Preload uint from specific offset
         * @param bits bits to preload
         * @param offset offset to start from
         * @returns read value as bigint
         */
        _preloadUint(bits, offset2) {
          if (bits == 0) {
            return 0n;
          }
          let res = 0n;
          for (let i5 = 0; i5 < bits; i5++) {
            if (this._bits.at(offset2 + i5)) {
              res += 1n << BigInt(bits - i5 - 1);
            }
          }
          return res;
        }
        _preloadBuffer(bytes, offset2) {
          let fastBuffer = this._bits.subbuffer(offset2, bytes * 8);
          if (fastBuffer) {
            return fastBuffer;
          }
          let buf = Buffer2.alloc(bytes);
          for (let i5 = 0; i5 < bytes; i5++) {
            buf[i5] = Number(this._preloadUint(8, offset2 + i5 * 8));
          }
          return buf;
        }
        _loadInternalAddress() {
          let type2 = Number(this._preloadUint(2, this._offset));
          if (type2 !== 2) {
            throw Error("Invalid address");
          }
          let rewrite_pfx = void 0;
          let rewrite_depth = void 0;
          if (this._preloadUint(1, this._offset + 2) !== 0n) {
            rewrite_depth = Number(this._preloadUint(5, this._offset + 3));
            rewrite_pfx = this._preloadUint(rewrite_depth, this._offset + 8);
            this._offset += 5 + rewrite_depth;
          }
          let wc = Number(this._preloadInt(8, this._offset + 3));
          let hash5 = this._preloadBuffer(32, this._offset + 11);
          if (rewrite_depth !== void 0 && rewrite_pfx !== void 0) {
            let pfx = Number(rewrite_pfx);
            let byteIndex = 0;
            let bitIndex = 0;
            let bitsRemaining = rewrite_depth;
            while (bitsRemaining > 0) {
              let bitsInThisByte = Math.min(8 - bitIndex, bitsRemaining);
              let mask2 = (1 << bitsInThisByte) - 1 << 8 - bitIndex - bitsInThisByte;
              let bits = (pfx >> bitsRemaining - bitsInThisByte & (1 << bitsInThisByte) - 1) << 8 - bitIndex - bitsInThisByte;
              hash5[byteIndex] = hash5[byteIndex] & ~mask2 | bits;
              bitsRemaining -= bitsInThisByte;
              bitIndex += bitsInThisByte;
              if (bitIndex === 8) {
                byteIndex++;
                bitIndex = 0;
              }
            }
          }
          this._offset += 267;
          return new Address_1.Address(wc, hash5);
        }
        _loadExternalAddress() {
          let type2 = Number(this._preloadUint(2, this._offset));
          if (type2 !== 1) {
            throw Error("Invalid address");
          }
          let bits = Number(this._preloadUint(9, this._offset + 2));
          let value = this._preloadUint(bits, this._offset + 11);
          this._offset += 11 + bits;
          return new ExternalAddress_1.ExternalAddress(value, bits);
        }
        _toSafeInteger(src2, alt) {
          if (BigInt(Number.MAX_SAFE_INTEGER) < src2 || src2 < BigInt(Number.MIN_SAFE_INTEGER)) {
            throw new TypeError(`${src2} is out of safe integer range. Use ${alt} instead`);
          }
          return Number(src2);
        }
      };
      exports.BitReader = BitReader;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/exoticMerkleProof.js
  var require_exoticMerkleProof = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/exoticMerkleProof.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.convertToMerkleProof = exports.exoticMerkleProof = void 0;
      var BitReader_1 = require_BitReader();
      var Builder_1 = require_Builder();
      function exoticMerkleProof(bits, refs) {
        const reader = new BitReader_1.BitReader(bits);
        const size5 = 8 + 256 + 16;
        if (bits.length !== size5) {
          throw new Error(`Merkle Proof cell must have exactly (8 + 256 + 16) bits, got "${bits.length}"`);
        }
        if (refs.length !== 1) {
          throw new Error(`Merkle Proof cell must have exactly 1 ref, got "${refs.length}"`);
        }
        let type2 = reader.loadUint(8);
        if (type2 !== 3) {
          throw new Error(`Merkle Proof cell must have type 3, got "${type2}"`);
        }
        const proofHash = reader.loadBuffer(32);
        const proofDepth = reader.loadUint(16);
        const refHash = refs[0].hash(0);
        const refDepth = refs[0].depth(0);
        if (proofDepth !== refDepth) {
          throw new Error(`Merkle Proof cell ref depth must be exactly "${proofDepth}", got "${refDepth}"`);
        }
        if (!proofHash.equals(refHash)) {
          throw new Error(`Merkle Proof cell ref hash must be exactly "${proofHash.toString("hex")}", got "${refHash.toString("hex")}"`);
        }
        return {
          proofDepth,
          proofHash
        };
      }
      exports.exoticMerkleProof = exoticMerkleProof;
      function convertToMerkleProof(c7) {
        return (0, Builder_1.beginCell)().storeUint(3, 8).storeBuffer(c7.hash(0)).storeUint(c7.depth(0), 16).storeRef(c7).endCell({ exotic: true });
      }
      exports.convertToMerkleProof = convertToMerkleProof;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/generateMerkleProof.js
  var require_generateMerkleProof = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/generateMerkleProof.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.generateMerkleProof = exports.generateMerkleProofDirect = void 0;
      var Builder_1 = require_Builder();
      var readUnaryLength_1 = require_readUnaryLength();
      var exoticMerkleProof_1 = require_exoticMerkleProof();
      function convertToPrunedBranch(c7) {
        return (0, Builder_1.beginCell)().storeUint(1, 8).storeUint(1, 8).storeBuffer(c7.hash(0)).storeUint(c7.depth(0), 16).endCell({ exotic: true });
      }
      function doGenerateMerkleProof(prefix, slice4, n6, keys2) {
        const originalCell = slice4.asCell();
        if (keys2.length == 0) {
          return convertToPrunedBranch(originalCell);
        }
        let lb0 = slice4.loadBit() ? 1 : 0;
        let prefixLength = 0;
        let pp = prefix;
        if (lb0 === 0) {
          prefixLength = (0, readUnaryLength_1.readUnaryLength)(slice4);
          for (let i5 = 0; i5 < prefixLength; i5++) {
            pp += slice4.loadBit() ? "1" : "0";
          }
        } else {
          let lb1 = slice4.loadBit() ? 1 : 0;
          if (lb1 === 0) {
            prefixLength = slice4.loadUint(Math.ceil(Math.log2(n6 + 1)));
            for (let i5 = 0; i5 < prefixLength; i5++) {
              pp += slice4.loadBit() ? "1" : "0";
            }
          } else {
            let bit = slice4.loadBit() ? "1" : "0";
            prefixLength = slice4.loadUint(Math.ceil(Math.log2(n6 + 1)));
            for (let i5 = 0; i5 < prefixLength; i5++) {
              pp += bit;
            }
          }
        }
        if (n6 - prefixLength === 0) {
          return originalCell;
        } else {
          let sl = originalCell.beginParse();
          let left = sl.loadRef();
          let right = sl.loadRef();
          if (!left.isExotic) {
            const leftKeys = keys2.filter((key2) => {
              return pp + "0" === key2.slice(0, pp.length + 1);
            });
            left = doGenerateMerkleProof(pp + "0", left.beginParse(), n6 - prefixLength - 1, leftKeys);
          }
          if (!right.isExotic) {
            const rightKeys = keys2.filter((key2) => {
              return pp + "1" === key2.slice(0, pp.length + 1);
            });
            right = doGenerateMerkleProof(pp + "1", right.beginParse(), n6 - prefixLength - 1, rightKeys);
          }
          return (0, Builder_1.beginCell)().storeSlice(sl).storeRef(left).storeRef(right).endCell();
        }
      }
      function generateMerkleProofDirect(dict, keys2, keyObject) {
        keys2.forEach((key2) => {
          if (!dict.has(key2)) {
            throw new Error(`Trying to generate merkle proof for a missing key "${key2}"`);
          }
        });
        const s3 = (0, Builder_1.beginCell)().storeDictDirect(dict).asSlice();
        return doGenerateMerkleProof("", s3, keyObject.bits, keys2.map((key2) => keyObject.serialize(key2).toString(2).padStart(keyObject.bits, "0")));
      }
      exports.generateMerkleProofDirect = generateMerkleProofDirect;
      function generateMerkleProof(dict, keys2, keyObject) {
        return (0, exoticMerkleProof_1.convertToMerkleProof)(generateMerkleProofDirect(dict, keys2, keyObject));
      }
      exports.generateMerkleProof = generateMerkleProof;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/generateMerkleUpdate.js
  var require_generateMerkleUpdate = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/generateMerkleUpdate.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.generateMerkleUpdate = void 0;
      var Builder_1 = require_Builder();
      var generateMerkleProof_1 = require_generateMerkleProof();
      function convertToMerkleUpdate(c1, c22) {
        return (0, Builder_1.beginCell)().storeUint(4, 8).storeBuffer(c1.hash(0)).storeBuffer(c22.hash(0)).storeUint(c1.depth(0), 16).storeUint(c22.depth(0), 16).storeRef(c1).storeRef(c22).endCell({ exotic: true });
      }
      function generateMerkleUpdate(dict, key2, keyObject, newValue) {
        const oldProof = (0, generateMerkleProof_1.generateMerkleProof)(dict, [key2], keyObject).refs[0];
        dict.set(key2, newValue);
        const newProof = (0, generateMerkleProof_1.generateMerkleProof)(dict, [key2], keyObject).refs[0];
        return convertToMerkleUpdate(oldProof, newProof);
      }
      exports.generateMerkleUpdate = generateMerkleUpdate;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/parseDict.js
  var require_parseDict = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/parseDict.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.parseDict = void 0;
      function readUnaryLength(slice4) {
        let res = 0;
        while (slice4.loadBit()) {
          res++;
        }
        return res;
      }
      function doParse(prefix, slice4, n6, res, extractor) {
        let lb0 = slice4.loadBit() ? 1 : 0;
        let prefixLength = 0;
        let pp = prefix;
        if (lb0 === 0) {
          prefixLength = readUnaryLength(slice4);
          for (let i5 = 0; i5 < prefixLength; i5++) {
            pp += slice4.loadBit() ? "1" : "0";
          }
        } else {
          let lb1 = slice4.loadBit() ? 1 : 0;
          if (lb1 === 0) {
            prefixLength = slice4.loadUint(Math.ceil(Math.log2(n6 + 1)));
            for (let i5 = 0; i5 < prefixLength; i5++) {
              pp += slice4.loadBit() ? "1" : "0";
            }
          } else {
            let bit = slice4.loadBit() ? "1" : "0";
            prefixLength = slice4.loadUint(Math.ceil(Math.log2(n6 + 1)));
            for (let i5 = 0; i5 < prefixLength; i5++) {
              pp += bit;
            }
          }
        }
        if (n6 - prefixLength === 0) {
          res.set(BigInt("0b" + pp), extractor(slice4));
        } else {
          let left = slice4.loadRef();
          let right = slice4.loadRef();
          if (!left.isExotic) {
            doParse(pp + "0", left.beginParse(), n6 - prefixLength - 1, res, extractor);
          }
          if (!right.isExotic) {
            doParse(pp + "1", right.beginParse(), n6 - prefixLength - 1, res, extractor);
          }
        }
      }
      function parseDict(sc, keySize, extractor) {
        let res = /* @__PURE__ */ new Map();
        if (sc) {
          doParse("", sc, keySize, res, extractor);
        }
        return res;
      }
      exports.parseDict = parseDict;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/utils/findCommonPrefix.js
  var require_findCommonPrefix = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/utils/findCommonPrefix.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.findCommonPrefix = void 0;
      function findCommonPrefix(src2, startPos = 0) {
        if (src2.length === 0) {
          return "";
        }
        let r3 = src2[0].slice(startPos);
        for (let i5 = 1; i5 < src2.length; i5++) {
          const s3 = src2[i5];
          while (s3.indexOf(r3, startPos) !== startPos) {
            r3 = r3.substring(0, r3.length - 1);
            if (r3 === "") {
              return r3;
            }
          }
        }
        return r3;
      }
      exports.findCommonPrefix = findCommonPrefix;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/serializeDict.js
  var require_serializeDict = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/serializeDict.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.serializeDict = exports.detectLabelType = exports.writeLabelSame = exports.writeLabelLong = exports.writeLabelShort = exports.buildTree = void 0;
      var Builder_1 = require_Builder();
      var findCommonPrefix_1 = require_findCommonPrefix();
      function pad4(src2, size5) {
        while (src2.length < size5) {
          src2 = "0" + src2;
        }
        return src2;
      }
      function forkMap(src2, prefixLen) {
        if (src2.size === 0) {
          throw Error("Internal inconsistency");
        }
        let left = /* @__PURE__ */ new Map();
        let right = /* @__PURE__ */ new Map();
        for (let [k7, d6] of src2.entries()) {
          if (k7[prefixLen] === "0") {
            left.set(k7, d6);
          } else {
            right.set(k7, d6);
          }
        }
        if (left.size === 0) {
          throw Error("Internal inconsistency. Left emtpy.");
        }
        if (right.size === 0) {
          throw Error("Internal inconsistency. Right emtpy.");
        }
        return { left, right };
      }
      function buildNode(src2, prefixLen) {
        if (src2.size === 0) {
          throw Error("Internal inconsistency");
        }
        if (src2.size === 1) {
          return { type: "leaf", value: Array.from(src2.values())[0] };
        }
        let { left, right } = forkMap(src2, prefixLen);
        return {
          type: "fork",
          left: buildEdge(left, prefixLen + 1),
          right: buildEdge(right, prefixLen + 1)
        };
      }
      function buildEdge(src2, prefixLen = 0) {
        if (src2.size === 0) {
          throw Error("Internal inconsistency");
        }
        const label = (0, findCommonPrefix_1.findCommonPrefix)(Array.from(src2.keys()), prefixLen);
        return { label, node: buildNode(src2, label.length + prefixLen) };
      }
      function buildTree(src2, keyLength) {
        let converted = /* @__PURE__ */ new Map();
        for (let k7 of Array.from(src2.keys())) {
          const padded = pad4(k7.toString(2), keyLength);
          converted.set(padded, src2.get(k7));
        }
        return buildEdge(converted);
      }
      exports.buildTree = buildTree;
      function writeLabelShort(src2, to3) {
        to3.storeBit(0);
        for (let i5 = 0; i5 < src2.length; i5++) {
          to3.storeBit(1);
        }
        to3.storeBit(0);
        if (src2.length > 0) {
          to3.storeUint(BigInt("0b" + src2), src2.length);
        }
        return to3;
      }
      exports.writeLabelShort = writeLabelShort;
      function labelShortLength(src2) {
        return 1 + src2.length + 1 + src2.length;
      }
      function writeLabelLong(src2, keyLength, to3) {
        to3.storeBit(1);
        to3.storeBit(0);
        let length2 = Math.ceil(Math.log2(keyLength + 1));
        to3.storeUint(src2.length, length2);
        if (src2.length > 0) {
          to3.storeUint(BigInt("0b" + src2), src2.length);
        }
        return to3;
      }
      exports.writeLabelLong = writeLabelLong;
      function labelLongLength(src2, keyLength) {
        return 1 + 1 + Math.ceil(Math.log2(keyLength + 1)) + src2.length;
      }
      function writeLabelSame(value, length2, keyLength, to3) {
        to3.storeBit(1);
        to3.storeBit(1);
        to3.storeBit(value);
        let lenLen = Math.ceil(Math.log2(keyLength + 1));
        to3.storeUint(length2, lenLen);
      }
      exports.writeLabelSame = writeLabelSame;
      function labelSameLength(keyLength) {
        return 1 + 1 + 1 + Math.ceil(Math.log2(keyLength + 1));
      }
      function isSame(src2) {
        if (src2.length === 0 || src2.length === 1) {
          return true;
        }
        for (let i5 = 1; i5 < src2.length; i5++) {
          if (src2[i5] !== src2[0]) {
            return false;
          }
        }
        return true;
      }
      function detectLabelType(src2, keyLength) {
        let kind = "short";
        let kindLength = labelShortLength(src2);
        let longLength = labelLongLength(src2, keyLength);
        if (longLength < kindLength) {
          kindLength = longLength;
          kind = "long";
        }
        if (isSame(src2)) {
          let sameLength = labelSameLength(keyLength);
          if (sameLength < kindLength) {
            kindLength = sameLength;
            kind = "same";
          }
        }
        return kind;
      }
      exports.detectLabelType = detectLabelType;
      function writeLabel(src2, keyLength, to3) {
        let type2 = detectLabelType(src2, keyLength);
        if (type2 === "short") {
          writeLabelShort(src2, to3);
        } else if (type2 === "long") {
          writeLabelLong(src2, keyLength, to3);
        } else if (type2 === "same") {
          writeLabelSame(src2[0] === "1", src2.length, keyLength, to3);
        }
      }
      function writeNode(src2, keyLength, serializer, to3) {
        if (src2.type === "leaf") {
          serializer(src2.value, to3);
        }
        if (src2.type === "fork") {
          const leftCell = (0, Builder_1.beginCell)();
          const rightCell = (0, Builder_1.beginCell)();
          writeEdge(src2.left, keyLength - 1, serializer, leftCell);
          writeEdge(src2.right, keyLength - 1, serializer, rightCell);
          to3.storeRef(leftCell);
          to3.storeRef(rightCell);
        }
      }
      function writeEdge(src2, keyLength, serializer, to3) {
        writeLabel(src2.label, keyLength, to3);
        writeNode(src2.node, keyLength - src2.label.length, serializer, to3);
      }
      function serializeDict(src2, keyLength, serializer, to3) {
        const tree = buildTree(src2, keyLength);
        writeEdge(tree, keyLength, serializer, to3);
      }
      exports.serializeDict = serializeDict;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/utils/internalKeySerializer.js
  var require_internalKeySerializer = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/utils/internalKeySerializer.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.deserializeInternalKey = exports.serializeInternalKey = void 0;
      var Address_1 = require_Address();
      var BitString_1 = require_BitString();
      var paddedBits_1 = require_paddedBits();
      function serializeInternalKey(value) {
        if (typeof value === "number") {
          if (!Number.isSafeInteger(value)) {
            throw Error("Invalid key type: not a safe integer: " + value);
          }
          return "n:" + value.toString(10);
        } else if (typeof value === "bigint") {
          return "b:" + value.toString(10);
        } else if (Address_1.Address.isAddress(value)) {
          return "a:" + value.toString();
        } else if (Buffer2.isBuffer(value)) {
          return "f:" + value.toString("hex");
        } else if (BitString_1.BitString.isBitString(value)) {
          return "B:" + value.toString();
        } else {
          throw Error("Invalid key type");
        }
      }
      exports.serializeInternalKey = serializeInternalKey;
      function deserializeInternalKey(value) {
        let k7 = value.slice(0, 2);
        let v13 = value.slice(2);
        if (k7 === "n:") {
          return parseInt(v13, 10);
        } else if (k7 === "b:") {
          return BigInt(v13);
        } else if (k7 === "a:") {
          return Address_1.Address.parse(v13);
        } else if (k7 === "f:") {
          return Buffer2.from(v13, "hex");
        } else if (k7 === "B:") {
          const lastDash = v13.slice(-1) == "_";
          const isPadded = lastDash || v13.length % 2 != 0;
          if (isPadded) {
            let charLen = lastDash ? v13.length - 1 : v13.length;
            const padded = v13.substr(0, charLen) + "0";
            if (!lastDash && (charLen & 1) !== 0) {
              return new BitString_1.BitString(Buffer2.from(padded, "hex"), 0, charLen << 2);
            } else {
              return (0, paddedBits_1.paddedBufferToBits)(Buffer2.from(padded, "hex"));
            }
          } else {
            return new BitString_1.BitString(Buffer2.from(v13, "hex"), 0, v13.length << 2);
          }
        }
        throw Error("Invalid key type: " + k7);
      }
      exports.deserializeInternalKey = deserializeInternalKey;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/Dictionary.js
  var require_Dictionary = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/dict/Dictionary.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.Dictionary = void 0;
      var Address_1 = require_Address();
      var Builder_1 = require_Builder();
      var Cell_1 = require_Cell();
      var BitString_1 = require_BitString();
      var generateMerkleProof_1 = require_generateMerkleProof();
      var generateMerkleUpdate_1 = require_generateMerkleUpdate();
      var parseDict_1 = require_parseDict();
      var serializeDict_1 = require_serializeDict();
      var internalKeySerializer_1 = require_internalKeySerializer();
      var Dictionary = class _Dictionary {
        /**
         * Create an empty map
         * @param key key type
         * @param value value type
         * @returns Dictionary<K, V>
         */
        static empty(key2, value) {
          if (key2 && value) {
            return new _Dictionary(/* @__PURE__ */ new Map(), key2, value);
          } else {
            return new _Dictionary(/* @__PURE__ */ new Map(), null, null);
          }
        }
        /**
         * Load dictionary from slice
         * @param key key description
         * @param value value description
         * @param sc slice
         * @returns Dictionary<K, V>
         */
        static load(key2, value, sc) {
          let slice4;
          if (sc instanceof Cell_1.Cell) {
            if (sc.isExotic) {
              return _Dictionary.empty(key2, value);
            }
            slice4 = sc.beginParse();
          } else {
            slice4 = sc;
          }
          let cell = slice4.loadMaybeRef();
          if (cell && !cell.isExotic) {
            return _Dictionary.loadDirect(key2, value, cell.beginParse());
          } else {
            return _Dictionary.empty(key2, value);
          }
        }
        /**
         * Low level method for rare dictionaries from system contracts.
         * Loads dictionary from slice directly without going to the ref.
         *
         * @param key key description
         * @param value value description
         * @param sc slice
         * @returns Dictionary<K, V>
         */
        static loadDirect(key2, value, sc) {
          if (!sc) {
            return _Dictionary.empty(key2, value);
          }
          let slice4;
          if (sc instanceof Cell_1.Cell) {
            slice4 = sc.beginParse();
          } else {
            slice4 = sc;
          }
          let values = (0, parseDict_1.parseDict)(slice4, key2.bits, value.parse);
          let prepare = /* @__PURE__ */ new Map();
          for (let [k7, v13] of values) {
            prepare.set((0, internalKeySerializer_1.serializeInternalKey)(key2.parse(k7)), v13);
          }
          return new _Dictionary(prepare, key2, value);
        }
        constructor(values, key2, value) {
          this._key = key2;
          this._value = value;
          this._map = values;
        }
        get size() {
          return this._map.size;
        }
        get(key2) {
          return this._map.get((0, internalKeySerializer_1.serializeInternalKey)(key2));
        }
        has(key2) {
          return this._map.has((0, internalKeySerializer_1.serializeInternalKey)(key2));
        }
        set(key2, value) {
          this._map.set((0, internalKeySerializer_1.serializeInternalKey)(key2), value);
          return this;
        }
        delete(key2) {
          const k7 = (0, internalKeySerializer_1.serializeInternalKey)(key2);
          return this._map.delete(k7);
        }
        clear() {
          this._map.clear();
        }
        *[Symbol.iterator]() {
          for (const [k7, v13] of this._map) {
            const key2 = (0, internalKeySerializer_1.deserializeInternalKey)(k7);
            yield [key2, v13];
          }
        }
        keys() {
          return Array.from(this._map.keys()).map((v13) => (0, internalKeySerializer_1.deserializeInternalKey)(v13));
        }
        values() {
          return Array.from(this._map.values());
        }
        store(builder, key2, value) {
          if (this._map.size === 0) {
            builder.storeBit(0);
          } else {
            let resolvedKey = this._key;
            if (key2 !== null && key2 !== void 0) {
              resolvedKey = key2;
            }
            let resolvedValue = this._value;
            if (value !== null && value !== void 0) {
              resolvedValue = value;
            }
            if (!resolvedKey) {
              throw Error("Key serializer is not defined");
            }
            if (!resolvedValue) {
              throw Error("Value serializer is not defined");
            }
            let prepared = /* @__PURE__ */ new Map();
            for (const [k7, v13] of this._map) {
              prepared.set(resolvedKey.serialize((0, internalKeySerializer_1.deserializeInternalKey)(k7)), v13);
            }
            builder.storeBit(1);
            let dd = (0, Builder_1.beginCell)();
            (0, serializeDict_1.serializeDict)(prepared, resolvedKey.bits, resolvedValue.serialize, dd);
            builder.storeRef(dd.endCell());
          }
        }
        storeDirect(builder, key2, value) {
          if (this._map.size === 0) {
            throw Error("Cannot store empty dictionary directly");
          }
          let resolvedKey = this._key;
          if (key2 !== null && key2 !== void 0) {
            resolvedKey = key2;
          }
          let resolvedValue = this._value;
          if (value !== null && value !== void 0) {
            resolvedValue = value;
          }
          if (!resolvedKey) {
            throw Error("Key serializer is not defined");
          }
          if (!resolvedValue) {
            throw Error("Value serializer is not defined");
          }
          let prepared = /* @__PURE__ */ new Map();
          for (const [k7, v13] of this._map) {
            prepared.set(resolvedKey.serialize((0, internalKeySerializer_1.deserializeInternalKey)(k7)), v13);
          }
          (0, serializeDict_1.serializeDict)(prepared, resolvedKey.bits, resolvedValue.serialize, builder);
        }
        /**
         * Generate merkle proof for multiple keys in the dictionary
         * @param keys an array of the keys
         * @returns generated merkle proof cell
         */
        generateMerkleProof(keys2) {
          return (0, generateMerkleProof_1.generateMerkleProof)(this, keys2, this._key);
        }
        /**
         * Low level method for generating pruned dictionary directly.
         * The result can be used as a part of a bigger merkle proof
         * @param keys an array of the keys
         * @returns cell that contains the pruned dictionary
         */
        generateMerkleProofDirect(keys2) {
          return (0, generateMerkleProof_1.generateMerkleProofDirect)(this, keys2, this._key);
        }
        generateMerkleUpdate(key2, newValue) {
          return (0, generateMerkleUpdate_1.generateMerkleUpdate)(this, key2, this._key, newValue);
        }
      };
      exports.Dictionary = Dictionary;
      Dictionary.Keys = {
        /**
         * Standard address key
         * @returns DictionaryKey<Address>
         */
        Address: () => {
          return createAddressKey();
        },
        /**
         * Create standard big integer key
         * @param bits number of bits
         * @returns DictionaryKey<bigint>
         */
        BigInt: (bits) => {
          return createBigIntKey(bits);
        },
        /**
         * Create integer key
         * @param bits bits of integer
         * @returns DictionaryKey<number>
         */
        Int: (bits) => {
          return createIntKey(bits);
        },
        /**
         * Create standard unsigned big integer key
         * @param bits number of bits
         * @returns DictionaryKey<bigint>
         */
        BigUint: (bits) => {
          return createBigUintKey(bits);
        },
        /**
         * Create standard unsigned integer key
         * @param bits number of bits
         * @returns DictionaryKey<number>
         */
        Uint: (bits) => {
          return createUintKey(bits);
        },
        /**
         * Create standard buffer key
         * @param bytes number of bytes of a buffer
         * @returns DictionaryKey<Buffer>
         */
        Buffer: (bytes) => {
          return createBufferKey(bytes);
        },
        /**
         * Create BitString key
         * @param bits key length
         * @returns DictionaryKey<BitString>
         * Point is that Buffer has to be 8 bit aligned,
         * while key is TVM dictionary doesn't have to be
         * aligned at all.
         */
        BitString: (bits) => {
          return createBitStringKey(bits);
        }
      };
      Dictionary.Values = {
        /**
         * Create standard integer value
         * @returns DictionaryValue<bigint>
         */
        BigInt: (bits) => {
          return createBigIntValue(bits);
        },
        /**
         * Create standard integer value
         * @returns DictionaryValue<number>
         */
        Int: (bits) => {
          return createIntValue(bits);
        },
        /**
         * Create big var int
         * @param bits number of header bits
         * @returns DictionaryValue<bigint>
         */
        BigVarInt: (bits) => {
          return createBigVarIntValue(bits);
        },
        /**
         * Create standard unsigned integer value
         * @param bits number of bits
         * @returns DictionaryValue<bigint>
         */
        BigUint: (bits) => {
          return createBigUintValue(bits);
        },
        /**
         * Create standard unsigned integer value
         * @param bits number of bits
         * @returns DictionaryValue<bigint>
         */
        Uint: (bits) => {
          return createUintValue(bits);
        },
        /**
         * Create big var int
         * @param bits number of header bits
         * @returns DictionaryValue<bigint>
         */
        BigVarUint: (bits) => {
          return createBigVarUintValue(bits);
        },
        /**
         * Create standard boolean value
         * @returns DictionaryValue<boolean>
         */
        Bool: () => {
          return createBooleanValue();
        },
        /**
         * Create standard address value
         * @returns DictionaryValue<Address>
         */
        Address: () => {
          return createAddressValue();
        },
        /**
         * Create standard cell value
         * @returns DictionaryValue<Cell>
         */
        Cell: () => {
          return createCellValue();
        },
        /**
         * Create Builder value
         * @param bytes number of bytes of a buffer
         * @returns DictionaryValue<Builder>
         */
        Buffer: (bytes) => {
          return createBufferValue(bytes);
        },
        /**
         * Create BitString value
         * @param bits bit length
         * @returns DictionaryValue<BitString>
         * Point is that Buffer is not applicable
         * when length is not 8 bit alligned.
         */
        BitString: (bits) => {
          return createBitStringValue(bits);
        },
        /**
         * Create dictionary value
         * @param key
         * @param value
         */
        Dictionary: (key2, value) => {
          return createDictionaryValue(key2, value);
        }
      };
      function createAddressKey() {
        return {
          bits: 267,
          serialize: (src2) => {
            if (!Address_1.Address.isAddress(src2)) {
              throw Error("Key is not an address");
            }
            return (0, Builder_1.beginCell)().storeAddress(src2).endCell().beginParse().preloadUintBig(267);
          },
          parse: (src2) => {
            return (0, Builder_1.beginCell)().storeUint(src2, 267).endCell().beginParse().loadAddress();
          }
        };
      }
      function createBigIntKey(bits) {
        return {
          bits,
          serialize: (src2) => {
            if (typeof src2 !== "bigint") {
              throw Error("Key is not a bigint");
            }
            return (0, Builder_1.beginCell)().storeInt(src2, bits).endCell().beginParse().loadUintBig(bits);
          },
          parse: (src2) => {
            return (0, Builder_1.beginCell)().storeUint(src2, bits).endCell().beginParse().loadIntBig(bits);
          }
        };
      }
      function createIntKey(bits) {
        return {
          bits,
          serialize: (src2) => {
            if (typeof src2 !== "number") {
              throw Error("Key is not a number");
            }
            if (!Number.isSafeInteger(src2)) {
              throw Error("Key is not a safe integer: " + src2);
            }
            return (0, Builder_1.beginCell)().storeInt(src2, bits).endCell().beginParse().loadUintBig(bits);
          },
          parse: (src2) => {
            return (0, Builder_1.beginCell)().storeUint(src2, bits).endCell().beginParse().loadInt(bits);
          }
        };
      }
      function createBigUintKey(bits) {
        return {
          bits,
          serialize: (src2) => {
            if (typeof src2 !== "bigint") {
              throw Error("Key is not a bigint");
            }
            if (src2 < 0) {
              throw Error("Key is negative: " + src2);
            }
            return (0, Builder_1.beginCell)().storeUint(src2, bits).endCell().beginParse().loadUintBig(bits);
          },
          parse: (src2) => {
            return (0, Builder_1.beginCell)().storeUint(src2, bits).endCell().beginParse().loadUintBig(bits);
          }
        };
      }
      function createUintKey(bits) {
        return {
          bits,
          serialize: (src2) => {
            if (typeof src2 !== "number") {
              throw Error("Key is not a number");
            }
            if (!Number.isSafeInteger(src2)) {
              throw Error("Key is not a safe integer: " + src2);
            }
            if (src2 < 0) {
              throw Error("Key is negative: " + src2);
            }
            return (0, Builder_1.beginCell)().storeUint(src2, bits).endCell().beginParse().loadUintBig(bits);
          },
          parse: (src2) => {
            return Number((0, Builder_1.beginCell)().storeUint(src2, bits).endCell().beginParse().loadUint(bits));
          }
        };
      }
      function createBufferKey(bytes) {
        return {
          bits: bytes * 8,
          serialize: (src2) => {
            if (!Buffer2.isBuffer(src2)) {
              throw Error("Key is not a buffer");
            }
            return (0, Builder_1.beginCell)().storeBuffer(src2).endCell().beginParse().loadUintBig(bytes * 8);
          },
          parse: (src2) => {
            return (0, Builder_1.beginCell)().storeUint(src2, bytes * 8).endCell().beginParse().loadBuffer(bytes);
          }
        };
      }
      function createBitStringKey(bits) {
        return {
          bits,
          serialize: (src2) => {
            if (!BitString_1.BitString.isBitString(src2))
              throw Error("Key is not a BitString");
            return (0, Builder_1.beginCell)().storeBits(src2).endCell().beginParse().loadUintBig(bits);
          },
          parse: (src2) => {
            return (0, Builder_1.beginCell)().storeUint(src2, bits).endCell().beginParse().loadBits(bits);
          }
        };
      }
      function createIntValue(bits) {
        return {
          serialize: (src2, buidler) => {
            buidler.storeInt(src2, bits);
          },
          parse: (src2) => {
            let value = src2.loadInt(bits);
            src2.endParse();
            return value;
          }
        };
      }
      function createBigIntValue(bits) {
        return {
          serialize: (src2, buidler) => {
            buidler.storeInt(src2, bits);
          },
          parse: (src2) => {
            let value = src2.loadIntBig(bits);
            src2.endParse();
            return value;
          }
        };
      }
      function createBigVarIntValue(bits) {
        return {
          serialize: (src2, buidler) => {
            buidler.storeVarInt(src2, bits);
          },
          parse: (src2) => {
            let value = src2.loadVarIntBig(bits);
            src2.endParse();
            return value;
          }
        };
      }
      function createBigVarUintValue(bits) {
        return {
          serialize: (src2, buidler) => {
            buidler.storeVarUint(src2, bits);
          },
          parse: (src2) => {
            let value = src2.loadVarUintBig(bits);
            src2.endParse();
            return value;
          }
        };
      }
      function createUintValue(bits) {
        return {
          serialize: (src2, buidler) => {
            buidler.storeUint(src2, bits);
          },
          parse: (src2) => {
            let value = src2.loadUint(bits);
            src2.endParse();
            return value;
          }
        };
      }
      function createBigUintValue(bits) {
        return {
          serialize: (src2, buidler) => {
            buidler.storeUint(src2, bits);
          },
          parse: (src2) => {
            let value = src2.loadUintBig(bits);
            src2.endParse();
            return value;
          }
        };
      }
      function createBooleanValue() {
        return {
          serialize: (src2, buidler) => {
            buidler.storeBit(src2);
          },
          parse: (src2) => {
            let value = src2.loadBit();
            src2.endParse();
            return value;
          }
        };
      }
      function createAddressValue() {
        return {
          serialize: (src2, buidler) => {
            buidler.storeAddress(src2);
          },
          parse: (src2) => {
            let addr = src2.loadAddress();
            src2.endParse();
            return addr;
          }
        };
      }
      function createCellValue() {
        return {
          serialize: (src2, buidler) => {
            buidler.storeRef(src2);
          },
          parse: (src2) => {
            let value = src2.loadRef();
            src2.endParse();
            return value;
          }
        };
      }
      function createDictionaryValue(key2, value) {
        return {
          serialize: (src2, buidler) => {
            src2.store(buidler);
          },
          parse: (src2) => {
            let dict = Dictionary.load(key2, value, src2);
            src2.endParse();
            return dict;
          }
        };
      }
      function createBufferValue(size5) {
        return {
          serialize: (src2, buidler) => {
            if (src2.length !== size5) {
              throw Error("Invalid buffer size");
            }
            buidler.storeBuffer(src2);
          },
          parse: (src2) => {
            let value = src2.loadBuffer(size5);
            src2.endParse();
            return value;
          }
        };
      }
      function createBitStringValue(bits) {
        return {
          serialize: (src2, builder) => {
            if (src2.length !== bits) {
              throw Error("Invalid BitString size");
            }
            builder.storeBits(src2);
          },
          parse: (src2) => {
            let value = src2.loadBits(bits);
            src2.endParse();
            return value;
          }
        };
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/utils/strings.js
  var require_strings = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/utils/strings.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.writeString = exports.stringToCell = exports.readString = void 0;
      var Builder_1 = require_Builder();
      function readBuffer(slice4) {
        if (slice4.remainingBits % 8 !== 0) {
          throw new Error(`Invalid string length: ${slice4.remainingBits}`);
        }
        if (slice4.remainingRefs !== 0 && slice4.remainingRefs !== 1) {
          throw new Error(`invalid number of refs: ${slice4.remainingRefs}`);
        }
        let res;
        if (slice4.remainingBits === 0) {
          res = Buffer2.alloc(0);
        } else {
          res = slice4.loadBuffer(slice4.remainingBits / 8);
        }
        if (slice4.remainingRefs === 1) {
          res = Buffer2.concat([res, readBuffer(slice4.loadRef().beginParse())]);
        }
        return res;
      }
      function readString(slice4) {
        return readBuffer(slice4).toString();
      }
      exports.readString = readString;
      function writeBuffer(src2, builder) {
        if (src2.length > 0) {
          let bytes = Math.floor(builder.availableBits / 8);
          if (src2.length > bytes) {
            let a5 = src2.subarray(0, bytes);
            let t = src2.subarray(bytes);
            builder = builder.storeBuffer(a5);
            let bb = (0, Builder_1.beginCell)();
            writeBuffer(t, bb);
            builder = builder.storeRef(bb.endCell());
          } else {
            builder = builder.storeBuffer(src2);
          }
        }
      }
      function stringToCell(src2) {
        let builder = (0, Builder_1.beginCell)();
        writeBuffer(Buffer2.from(src2), builder);
        return builder.endCell();
      }
      exports.stringToCell = stringToCell;
      function writeString(src2, builder) {
        writeBuffer(Buffer2.from(src2), builder);
      }
      exports.writeString = writeString;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/Slice.js
  var require_Slice = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/Slice.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var _a4;
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.Slice = void 0;
      var inspect_1 = require_inspect();
      var Dictionary_1 = require_Dictionary();
      var Builder_1 = require_Builder();
      var strings_1 = require_strings();
      var Slice = class _Slice {
        constructor(reader, refs) {
          this[_a4] = () => this.toString();
          this._reader = reader.clone();
          this._refs = [...refs];
          this._refsOffset = 0;
        }
        /**
         * Get remaining bits
         */
        get remainingBits() {
          return this._reader.remaining;
        }
        /**
         * Get offset bits
         */
        get offsetBits() {
          return this._reader.offset;
        }
        /**
         * Get remaining refs
         */
        get remainingRefs() {
          return this._refs.length - this._refsOffset;
        }
        /**
         * Get offset refs
         */
        get offsetRefs() {
          return this._refsOffset;
        }
        /**
         * Skip bits
         * @param bits
         */
        skip(bits) {
          this._reader.skip(bits);
          return this;
        }
        /**
         * Load a single bit
         * @returns true or false depending on the bit value
         */
        loadBit() {
          return this._reader.loadBit();
        }
        /**
         * Preload a signle bit
         * @returns true or false depending on the bit value
         */
        preloadBit() {
          return this._reader.preloadBit();
        }
        /**
         * Load a boolean
         * @returns true or false depending on the bit value
         */
        loadBoolean() {
          return this.loadBit();
        }
        /**
         * Load maybe boolean
         * @returns true or false depending on the bit value or null
         */
        loadMaybeBoolean() {
          if (this.loadBit()) {
            return this.loadBoolean();
          } else {
            return null;
          }
        }
        /**
         * Load bits as a new BitString
         * @param bits number of bits to read
         * @returns new BitString
         */
        loadBits(bits) {
          return this._reader.loadBits(bits);
        }
        /**
         * Preload bits as a new BitString
         * @param bits number of bits to read
         * @returns new BitString
         */
        preloadBits(bits) {
          return this._reader.preloadBits(bits);
        }
        /**
         * Load uint
         * @param bits number of bits to read
         * @returns uint value
         */
        loadUint(bits) {
          return this._reader.loadUint(bits);
        }
        /**
         * Load uint
         * @param bits number of bits to read
         * @returns uint value
         */
        loadUintBig(bits) {
          return this._reader.loadUintBig(bits);
        }
        /**
         * Preload uint
         * @param bits number of bits to read
         * @returns uint value
         */
        preloadUint(bits) {
          return this._reader.preloadUint(bits);
        }
        /**
         * Preload uint
         * @param bits number of bits to read
         * @returns uint value
         */
        preloadUintBig(bits) {
          return this._reader.preloadUintBig(bits);
        }
        /**
         * Load maybe uint
         * @param bits number of bits to read
         * @returns uint value or null
         */
        loadMaybeUint(bits) {
          if (this.loadBit()) {
            return this.loadUint(bits);
          } else {
            return null;
          }
        }
        /**
         * Load maybe uint
         * @param bits number of bits to read
         * @returns uint value or null
         */
        loadMaybeUintBig(bits) {
          if (this.loadBit()) {
            return this.loadUintBig(bits);
          } else {
            return null;
          }
        }
        /**
         * Load int
         * @param bits number of bits to read
         * @returns int value
         */
        loadInt(bits) {
          return this._reader.loadInt(bits);
        }
        /**
         * Load int
         * @param bits number of bits to read
         * @returns int value
         */
        loadIntBig(bits) {
          return this._reader.loadIntBig(bits);
        }
        /**
         * Preload int
         * @param bits number of bits to read
         * @returns int value
         */
        preloadInt(bits) {
          return this._reader.preloadInt(bits);
        }
        /**
         * Preload int
         * @param bits number of bits to read
         * @returns int value
         */
        preloadIntBig(bits) {
          return this._reader.preloadIntBig(bits);
        }
        /**
         * Load maybe uint
         * @param bits number of bits to read
         * @returns uint value or null
         */
        loadMaybeInt(bits) {
          if (this.loadBit()) {
            return this.loadInt(bits);
          } else {
            return null;
          }
        }
        /**
         * Load maybe uint
         * @param bits number of bits to read
         * @returns uint value or null
         */
        loadMaybeIntBig(bits) {
          if (this.loadBit()) {
            return this.loadIntBig(bits);
          } else {
            return null;
          }
        }
        /**
         * Load varuint
         * @param bits number of bits to read in header
         * @returns varuint value
         */
        loadVarUint(bits) {
          return this._reader.loadVarUint(bits);
        }
        /**
         * Load varuint
         * @param bits number of bits to read in header
         * @returns varuint value
         */
        loadVarUintBig(bits) {
          return this._reader.loadVarUintBig(bits);
        }
        /**
         * Preload varuint
         * @param bits number of bits to read in header
         * @returns varuint value
         */
        preloadVarUint(bits) {
          return this._reader.preloadVarUint(bits);
        }
        /**
         * Preload varuint
         * @param bits number of bits to read in header
         * @returns varuint value
         */
        preloadVarUintBig(bits) {
          return this._reader.preloadVarUintBig(bits);
        }
        /**
         * Load varint
         * @param bits number of bits to read in header
         * @returns varint value
         */
        loadVarInt(bits) {
          return this._reader.loadVarInt(bits);
        }
        /**
         * Load varint
         * @param bits number of bits to read in header
         * @returns varint value
         */
        loadVarIntBig(bits) {
          return this._reader.loadVarIntBig(bits);
        }
        /**
         * Preload varint
         * @param bits number of bits to read in header
         * @returns varint value
         */
        preloadVarInt(bits) {
          return this._reader.preloadVarInt(bits);
        }
        /**
         * Preload varint
         * @param bits number of bits to read in header
         * @returns varint value
         */
        preloadVarIntBig(bits) {
          return this._reader.preloadVarIntBig(bits);
        }
        /**
         * Load coins
         * @returns coins value
         */
        loadCoins() {
          return this._reader.loadCoins();
        }
        /**
         * Preload coins
         * @returns coins value
         */
        preloadCoins() {
          return this._reader.preloadCoins();
        }
        /**
         * Load maybe coins
         * @returns coins value or null
         */
        loadMaybeCoins() {
          if (this._reader.loadBit()) {
            return this._reader.loadCoins();
          } else {
            return null;
          }
        }
        /**
         * Load internal Address
         * @returns Address
         */
        loadAddress() {
          return this._reader.loadAddress();
        }
        /**
         * Load optional internal Address
         * @returns Address or null
         */
        loadMaybeAddress() {
          return this._reader.loadMaybeAddress();
        }
        /**
         * Load external address
         * @returns ExternalAddress
         */
        loadExternalAddress() {
          return this._reader.loadExternalAddress();
        }
        /**
         * Load optional external address
         * @returns ExternalAddress or null
         */
        loadMaybeExternalAddress() {
          return this._reader.loadMaybeExternalAddress();
        }
        /**
         * Load address
         * @returns Address, ExternalAddress or null
         */
        loadAddressAny() {
          return this._reader.loadAddressAny();
        }
        /**
         * Load reference
         * @returns Cell
         */
        loadRef() {
          if (this._refsOffset >= this._refs.length) {
            throw new Error("No more references");
          }
          return this._refs[this._refsOffset++];
        }
        /**
         * Preload reference
         * @returns Cell
         */
        preloadRef() {
          if (this._refsOffset >= this._refs.length) {
            throw new Error("No more references");
          }
          return this._refs[this._refsOffset];
        }
        /**
         * Load optional reference
         * @returns Cell or null
         */
        loadMaybeRef() {
          if (this.loadBit()) {
            return this.loadRef();
          } else {
            return null;
          }
        }
        /**
         * Preload optional reference
         * @returns Cell or null
         */
        preloadMaybeRef() {
          if (this.preloadBit()) {
            return this.preloadRef();
          } else {
            return null;
          }
        }
        /**
         * Load byte buffer
         * @param bytes number of bytes to load
         * @returns Buffer
         */
        loadBuffer(bytes) {
          return this._reader.loadBuffer(bytes);
        }
        /**
         * Load byte buffer
         * @param bytes number of bytes to load
         * @returns Buffer
         */
        preloadBuffer(bytes) {
          return this._reader.preloadBuffer(bytes);
        }
        /**
         * Load string tail
         */
        loadStringTail() {
          return (0, strings_1.readString)(this);
        }
        /**
         * Load maybe string tail
         * @returns string or null
         */
        loadMaybeStringTail() {
          if (this.loadBit()) {
            return (0, strings_1.readString)(this);
          } else {
            return null;
          }
        }
        /**
         * Load string tail from ref
         * @returns string
         */
        loadStringRefTail() {
          return (0, strings_1.readString)(this.loadRef().beginParse());
        }
        /**
         * Load maybe string tail from ref
         * @returns string or null
         */
        loadMaybeStringRefTail() {
          const ref = this.loadMaybeRef();
          if (ref) {
            return (0, strings_1.readString)(ref.beginParse());
          } else {
            return null;
          }
        }
        /**
         * Loads dictionary
         * @param key key description
         * @param value value description
         * @returns Dictionary<K, V>
         */
        loadDict(key2, value) {
          return Dictionary_1.Dictionary.load(key2, value, this);
        }
        /**
         * Loads dictionary directly from current slice
         * @param key key description
         * @param value value description
         * @returns Dictionary<K, V>
         */
        loadDictDirect(key2, value) {
          return Dictionary_1.Dictionary.loadDirect(key2, value, this);
        }
        /**
         * Checks if slice is empty
         */
        endParse() {
          if (this.remainingBits > 0 || this.remainingRefs > 0) {
            throw new Error("Slice is not empty");
          }
        }
        /**
         * Convert slice to cell
         */
        asCell() {
          return (0, Builder_1.beginCell)().storeSlice(this).endCell();
        }
        /**
         *
         * @returns
         */
        asBuilder() {
          return (0, Builder_1.beginCell)().storeSlice(this);
        }
        /**
         * Clone slice
         * @returns cloned slice
         */
        clone(fromStart = false) {
          if (fromStart) {
            let reader = this._reader.clone();
            reader.reset();
            return new _Slice(reader, this._refs);
          } else {
            let res = new _Slice(this._reader, this._refs);
            res._refsOffset = this._refsOffset;
            return res;
          }
        }
        /**
         * Print slice as string by converting it to cell
         * @returns string
         */
        toString() {
          return this.asCell().toString();
        }
      };
      exports.Slice = Slice;
      _a4 = inspect_1.inspectSymbol;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/exoticLibrary.js
  var require_exoticLibrary = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/exoticLibrary.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.exoticLibrary = void 0;
      var BitReader_1 = require_BitReader();
      function exoticLibrary(bits, refs) {
        const reader = new BitReader_1.BitReader(bits);
        const size5 = 8 + 256;
        if (bits.length !== size5) {
          throw new Error(`Library cell must have exactly (8 + 256) bits, got "${bits.length}"`);
        }
        let type2 = reader.loadUint(8);
        if (type2 !== 2) {
          throw new Error(`Library cell must have type 2, got "${type2}"`);
        }
        return {};
      }
      exports.exoticLibrary = exoticLibrary;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/exoticMerkleUpdate.js
  var require_exoticMerkleUpdate = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/exoticMerkleUpdate.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.exoticMerkleUpdate = void 0;
      var BitReader_1 = require_BitReader();
      function exoticMerkleUpdate(bits, refs) {
        const reader = new BitReader_1.BitReader(bits);
        const size5 = 8 + 2 * (256 + 16);
        if (bits.length !== size5) {
          throw new Error(`Merkle Update cell must have exactly (8 + (2 * (256 + 16))) bits, got "${bits.length}"`);
        }
        if (refs.length !== 2) {
          throw new Error(`Merkle Update cell must have exactly 2 refs, got "${refs.length}"`);
        }
        let type2 = reader.loadUint(8);
        if (type2 !== 4) {
          throw new Error(`Merkle Update cell type must be exactly 4, got "${type2}"`);
        }
        const proofHash1 = reader.loadBuffer(32);
        const proofHash2 = reader.loadBuffer(32);
        const proofDepth1 = reader.loadUint(16);
        const proofDepth2 = reader.loadUint(16);
        if (proofDepth1 !== refs[0].depth(0)) {
          throw new Error(`Merkle Update cell ref depth must be exactly "${proofDepth1}", got "${refs[0].depth(0)}"`);
        }
        if (!proofHash1.equals(refs[0].hash(0))) {
          throw new Error(`Merkle Update cell ref hash must be exactly "${proofHash1.toString("hex")}", got "${refs[0].hash(0).toString("hex")}"`);
        }
        if (proofDepth2 !== refs[1].depth(0)) {
          throw new Error(`Merkle Update cell ref depth must be exactly "${proofDepth2}", got "${refs[1].depth(0)}"`);
        }
        if (!proofHash2.equals(refs[1].hash(0))) {
          throw new Error(`Merkle Update cell ref hash must be exactly "${proofHash2.toString("hex")}", got "${refs[1].hash(0).toString("hex")}"`);
        }
        return {
          proofDepth1,
          proofDepth2,
          proofHash1,
          proofHash2
        };
      }
      exports.exoticMerkleUpdate = exoticMerkleUpdate;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/LevelMask.js
  var require_LevelMask = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/LevelMask.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.LevelMask = void 0;
      var LevelMask = class _LevelMask {
        constructor(mask2 = 0) {
          this._mask = 0;
          this._mask = mask2;
          this._hashIndex = countSetBits(this._mask);
          this._hashCount = this._hashIndex + 1;
        }
        get value() {
          return this._mask;
        }
        get level() {
          return 32 - Math.clz32(this._mask);
        }
        get hashIndex() {
          return this._hashIndex;
        }
        get hashCount() {
          return this._hashCount;
        }
        apply(level) {
          return new _LevelMask(this._mask & (1 << level) - 1);
        }
        isSignificant(level) {
          let res = level === 0 || (this._mask >> level - 1) % 2 !== 0;
          return res;
        }
      };
      exports.LevelMask = LevelMask;
      function countSetBits(n6) {
        n6 = n6 - (n6 >> 1 & 1431655765);
        n6 = (n6 & 858993459) + (n6 >> 2 & 858993459);
        return (n6 + (n6 >> 4) & 252645135) * 16843009 >> 24;
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/exoticPruned.js
  var require_exoticPruned = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/exoticPruned.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.exoticPruned = void 0;
      var BitReader_1 = require_BitReader();
      var LevelMask_1 = require_LevelMask();
      function exoticPruned(bits, refs) {
        let reader = new BitReader_1.BitReader(bits);
        let type2 = reader.loadUint(8);
        if (type2 !== 1) {
          throw new Error(`Pruned branch cell must have type 1, got "${type2}"`);
        }
        if (refs.length !== 0) {
          throw new Error(`Pruned Branch cell can't has refs, got "${refs.length}"`);
        }
        let mask2;
        if (bits.length === 280) {
          mask2 = new LevelMask_1.LevelMask(1);
        } else {
          mask2 = new LevelMask_1.LevelMask(reader.loadUint(8));
          if (mask2.level < 1 || mask2.level > 3) {
            throw new Error(`Pruned Branch cell level must be >= 1 and <= 3, got "${mask2.level}/${mask2.value}"`);
          }
          const size5 = 8 + 8 + mask2.apply(mask2.level - 1).hashCount * (256 + 16);
          if (bits.length !== size5) {
            throw new Error(`Pruned branch cell must have exactly ${size5} bits, got "${bits.length}"`);
          }
        }
        let pruned = [];
        let hashes3 = [];
        let depths = [];
        for (let i5 = 0; i5 < mask2.level; i5++) {
          hashes3.push(reader.loadBuffer(32));
        }
        for (let i5 = 0; i5 < mask2.level; i5++) {
          depths.push(reader.loadUint(16));
        }
        for (let i5 = 0; i5 < mask2.level; i5++) {
          pruned.push({
            depth: depths[i5],
            hash: hashes3[i5]
          });
        }
        return {
          mask: mask2.value,
          pruned
        };
      }
      exports.exoticPruned = exoticPruned;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/resolveExotic.js
  var require_resolveExotic = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/resolveExotic.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.resolveExotic = void 0;
      var BitReader_1 = require_BitReader();
      var CellType_1 = require_CellType();
      var exoticLibrary_1 = require_exoticLibrary();
      var exoticMerkleProof_1 = require_exoticMerkleProof();
      var exoticMerkleUpdate_1 = require_exoticMerkleUpdate();
      var exoticPruned_1 = require_exoticPruned();
      var LevelMask_1 = require_LevelMask();
      function resolvePruned(bits, refs) {
        let pruned = (0, exoticPruned_1.exoticPruned)(bits, refs);
        let depths = [];
        let hashes3 = [];
        let mask2 = new LevelMask_1.LevelMask(pruned.mask);
        for (let i5 = 0; i5 < pruned.pruned.length; i5++) {
          depths.push(pruned.pruned[i5].depth);
          hashes3.push(pruned.pruned[i5].hash);
        }
        return {
          type: CellType_1.CellType.PrunedBranch,
          depths,
          hashes: hashes3,
          mask: mask2
        };
      }
      function resolveLibrary(bits, refs) {
        let pruned = (0, exoticLibrary_1.exoticLibrary)(bits, refs);
        let depths = [];
        let hashes3 = [];
        let mask2 = new LevelMask_1.LevelMask();
        return {
          type: CellType_1.CellType.Library,
          depths,
          hashes: hashes3,
          mask: mask2
        };
      }
      function resolveMerkleProof(bits, refs) {
        let merkleProof = (0, exoticMerkleProof_1.exoticMerkleProof)(bits, refs);
        let depths = [];
        let hashes3 = [];
        let mask2 = new LevelMask_1.LevelMask(refs[0].level() >> 1);
        return {
          type: CellType_1.CellType.MerkleProof,
          depths,
          hashes: hashes3,
          mask: mask2
        };
      }
      function resolveMerkleUpdate(bits, refs) {
        let merkleUpdate = (0, exoticMerkleUpdate_1.exoticMerkleUpdate)(bits, refs);
        let depths = [];
        let hashes3 = [];
        let mask2 = new LevelMask_1.LevelMask((refs[0].level() | refs[1].level()) >> 1);
        return {
          type: CellType_1.CellType.MerkleUpdate,
          depths,
          hashes: hashes3,
          mask: mask2
        };
      }
      function resolveExotic(bits, refs) {
        let reader = new BitReader_1.BitReader(bits);
        let type2 = reader.preloadUint(8);
        if (type2 === 1) {
          return resolvePruned(bits, refs);
        }
        if (type2 === 2) {
          return resolveLibrary(bits, refs);
        }
        if (type2 === 3) {
          return resolveMerkleProof(bits, refs);
        }
        if (type2 === 4) {
          return resolveMerkleUpdate(bits, refs);
        }
        throw Error("Invalid exotic cell type: " + type2);
      }
      exports.resolveExotic = resolveExotic;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/descriptor.js
  var require_descriptor = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/descriptor.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.getRepr = exports.getBitsDescriptor = exports.getRefsDescriptor = void 0;
      var CellType_1 = require_CellType();
      var paddedBits_1 = require_paddedBits();
      function getRefsDescriptor(refs, levelMask, type2) {
        return refs.length + (type2 !== CellType_1.CellType.Ordinary ? 1 : 0) * 8 + levelMask * 32;
      }
      exports.getRefsDescriptor = getRefsDescriptor;
      function getBitsDescriptor(bits) {
        let len = bits.length;
        return Math.ceil(len / 8) + Math.floor(len / 8);
      }
      exports.getBitsDescriptor = getBitsDescriptor;
      function getRepr(originalBits, bits, refs, level, levelMask, type2) {
        const bitsLen = Math.ceil(bits.length / 8);
        const repr = Buffer2.alloc(2 + bitsLen + (2 + 32) * refs.length);
        let reprCursor = 0;
        repr[reprCursor++] = getRefsDescriptor(refs, levelMask, type2);
        repr[reprCursor++] = getBitsDescriptor(originalBits);
        (0, paddedBits_1.bitsToPaddedBuffer)(bits).copy(repr, reprCursor);
        reprCursor += bitsLen;
        for (const c7 of refs) {
          let childDepth;
          if (type2 == CellType_1.CellType.MerkleProof || type2 == CellType_1.CellType.MerkleUpdate) {
            childDepth = c7.depth(level + 1);
          } else {
            childDepth = c7.depth(level);
          }
          repr[reprCursor++] = Math.floor(childDepth / 256);
          repr[reprCursor++] = childDepth % 256;
        }
        for (const c7 of refs) {
          let childHash;
          if (type2 == CellType_1.CellType.MerkleProof || type2 == CellType_1.CellType.MerkleUpdate) {
            childHash = c7.hash(level + 1);
          } else {
            childHash = c7.hash(level);
          }
          childHash.copy(repr, reprCursor);
          reprCursor += 32;
        }
        return repr;
      }
      exports.getRepr = getRepr;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/wonderCalculator.js
  var require_wonderCalculator = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/wonderCalculator.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.wonderCalculator = void 0;
      var BitString_1 = require_BitString();
      var CellType_1 = require_CellType();
      var LevelMask_1 = require_LevelMask();
      var exoticPruned_1 = require_exoticPruned();
      var exoticMerkleProof_1 = require_exoticMerkleProof();
      var descriptor_1 = require_descriptor();
      var crypto_1 = require_dist();
      var exoticMerkleUpdate_1 = require_exoticMerkleUpdate();
      var exoticLibrary_1 = require_exoticLibrary();
      function wonderCalculator(type2, bits, refs) {
        let levelMask;
        let pruned = null;
        if (type2 === CellType_1.CellType.Ordinary) {
          let mask2 = 0;
          for (let r3 of refs) {
            mask2 = mask2 | r3.mask.value;
          }
          levelMask = new LevelMask_1.LevelMask(mask2);
        } else if (type2 === CellType_1.CellType.PrunedBranch) {
          pruned = (0, exoticPruned_1.exoticPruned)(bits, refs);
          levelMask = new LevelMask_1.LevelMask(pruned.mask);
        } else if (type2 === CellType_1.CellType.MerkleProof) {
          let loaded = (0, exoticMerkleProof_1.exoticMerkleProof)(bits, refs);
          levelMask = new LevelMask_1.LevelMask(refs[0].mask.value >> 1);
        } else if (type2 === CellType_1.CellType.MerkleUpdate) {
          let loaded = (0, exoticMerkleUpdate_1.exoticMerkleUpdate)(bits, refs);
          levelMask = new LevelMask_1.LevelMask((refs[0].mask.value | refs[1].mask.value) >> 1);
        } else if (type2 === CellType_1.CellType.Library) {
          let loaded = (0, exoticLibrary_1.exoticLibrary)(bits, refs);
          levelMask = new LevelMask_1.LevelMask();
        } else {
          throw new Error("Unsupported exotic type");
        }
        let depths = [];
        let hashes3 = [];
        let hashCount = type2 === CellType_1.CellType.PrunedBranch ? 1 : levelMask.hashCount;
        let totalHashCount = levelMask.hashCount;
        let hashIOffset = totalHashCount - hashCount;
        for (let levelI = 0, hashI = 0; levelI <= levelMask.level; levelI++) {
          if (!levelMask.isSignificant(levelI)) {
            continue;
          }
          if (hashI < hashIOffset) {
            hashI++;
            continue;
          }
          let currentBits;
          if (hashI === hashIOffset) {
            if (!(levelI === 0 || type2 === CellType_1.CellType.PrunedBranch)) {
              throw Error("Invalid");
            }
            currentBits = bits;
          } else {
            if (!(levelI !== 0 && type2 !== CellType_1.CellType.PrunedBranch)) {
              throw Error("Invalid: " + levelI + ", " + type2);
            }
            currentBits = new BitString_1.BitString(hashes3[hashI - hashIOffset - 1], 0, 256);
          }
          let currentDepth = 0;
          for (let c7 of refs) {
            let childDepth;
            if (type2 == CellType_1.CellType.MerkleProof || type2 == CellType_1.CellType.MerkleUpdate) {
              childDepth = c7.depth(levelI + 1);
            } else {
              childDepth = c7.depth(levelI);
            }
            currentDepth = Math.max(currentDepth, childDepth);
          }
          if (refs.length > 0) {
            currentDepth++;
          }
          let repr = (0, descriptor_1.getRepr)(bits, currentBits, refs, levelI, levelMask.apply(levelI).value, type2);
          let hash5 = (0, crypto_1.sha256_sync)(repr);
          let destI = hashI - hashIOffset;
          depths[destI] = currentDepth;
          hashes3[destI] = hash5;
          hashI++;
        }
        let resolvedHashes = [];
        let resolvedDepths = [];
        if (pruned) {
          for (let i5 = 0; i5 < 4; i5++) {
            const { hashIndex } = levelMask.apply(i5);
            const { hashIndex: thisHashIndex } = levelMask;
            if (hashIndex !== thisHashIndex) {
              resolvedHashes.push(pruned.pruned[hashIndex].hash);
              resolvedDepths.push(pruned.pruned[hashIndex].depth);
            } else {
              resolvedHashes.push(hashes3[0]);
              resolvedDepths.push(depths[0]);
            }
          }
        } else {
          for (let i5 = 0; i5 < 4; i5++) {
            resolvedHashes.push(hashes3[levelMask.apply(i5).hashIndex]);
            resolvedDepths.push(depths[levelMask.apply(i5).hashIndex]);
          }
        }
        return {
          mask: levelMask,
          hashes: resolvedHashes,
          depths: resolvedDepths
        };
      }
      exports.wonderCalculator = wonderCalculator;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/utils/topologicalSort.js
  var require_topologicalSort = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/utils/topologicalSort.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.topologicalSort = void 0;
      function topologicalSort(src2) {
        let pending = [src2];
        let allCells = /* @__PURE__ */ new Map();
        let notPermCells = /* @__PURE__ */ new Set();
        let sorted = [];
        while (pending.length > 0) {
          const cells = [...pending];
          pending = [];
          for (let cell of cells) {
            const hash5 = cell.hash().toString("hex");
            if (allCells.has(hash5)) {
              continue;
            }
            notPermCells.add(hash5);
            allCells.set(hash5, {
              cell,
              refs: cell.refs.map((v13) => v13.hash().toString("hex"))
            });
            for (let r3 of cell.refs) {
              pending.push(r3);
            }
          }
        }
        let tempMark = /* @__PURE__ */ new Set();
        function visit(hash5) {
          if (!notPermCells.has(hash5)) {
            return;
          }
          if (tempMark.has(hash5)) {
            throw Error("Not a DAG");
          }
          tempMark.add(hash5);
          let refs = allCells.get(hash5).refs;
          for (let ci2 = refs.length - 1; ci2 >= 0; ci2--) {
            visit(refs[ci2]);
          }
          sorted.push(hash5);
          tempMark.delete(hash5);
          notPermCells.delete(hash5);
        }
        while (notPermCells.size > 0) {
          const id = Array.from(notPermCells)[0];
          visit(id);
        }
        let indexes = /* @__PURE__ */ new Map();
        for (let i5 = 0; i5 < sorted.length; i5++) {
          indexes.set(sorted[sorted.length - i5 - 1], i5);
        }
        let result = [];
        for (let i5 = sorted.length - 1; i5 >= 0; i5--) {
          let ent = sorted[i5];
          const rrr = allCells.get(ent);
          result.push({
            cell: rrr.cell,
            refs: rrr.refs.map((v13) => indexes.get(v13))
          });
        }
        return result;
      }
      exports.topologicalSort = topologicalSort;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/utils/bitsForNumber.js
  var require_bitsForNumber = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/utils/bitsForNumber.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.bitsForNumber = void 0;
      function bitsForNumber(src2, mode) {
        let v13 = BigInt(src2);
        if (mode === "int") {
          if (v13 === 0n || v13 === -1n) {
            return 1;
          }
          let v22 = v13 > 0 ? v13 : -v13;
          return v22.toString(2).length + 1;
        } else if (mode === "uint") {
          if (v13 < 0) {
            throw Error(`value is negative. Got ${src2}`);
          }
          return v13.toString(2).length;
        } else {
          throw Error(`invalid mode. Got ${mode}`);
        }
      }
      exports.bitsForNumber = bitsForNumber;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/utils/crc32c.js
  var require_crc32c = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/utils/crc32c.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.crc32c = void 0;
      var POLY = 2197175160;
      function crc32c(source) {
        let crc = 0 ^ 4294967295;
        for (let n6 = 0; n6 < source.length; n6++) {
          crc ^= source[n6];
          crc = crc & 1 ? crc >>> 1 ^ POLY : crc >>> 1;
          crc = crc & 1 ? crc >>> 1 ^ POLY : crc >>> 1;
          crc = crc & 1 ? crc >>> 1 ^ POLY : crc >>> 1;
          crc = crc & 1 ? crc >>> 1 ^ POLY : crc >>> 1;
          crc = crc & 1 ? crc >>> 1 ^ POLY : crc >>> 1;
          crc = crc & 1 ? crc >>> 1 ^ POLY : crc >>> 1;
          crc = crc & 1 ? crc >>> 1 ^ POLY : crc >>> 1;
          crc = crc & 1 ? crc >>> 1 ^ POLY : crc >>> 1;
        }
        crc = crc ^ 4294967295;
        let res = Buffer2.alloc(4);
        res.writeInt32LE(crc);
        return res;
      }
      exports.crc32c = crc32c;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/serialization.js
  var require_serialization = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/cell/serialization.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.serializeBoc = exports.deserializeBoc = exports.parseBoc = void 0;
      var BitReader_1 = require_BitReader();
      var BitString_1 = require_BitString();
      var Cell_1 = require_Cell();
      var topologicalSort_1 = require_topologicalSort();
      var bitsForNumber_1 = require_bitsForNumber();
      var BitBuilder_1 = require_BitBuilder();
      var descriptor_1 = require_descriptor();
      var paddedBits_1 = require_paddedBits();
      var crc32c_1 = require_crc32c();
      function getHashesCount(levelMask) {
        return getHashesCountFromMask(levelMask & 7);
      }
      function getHashesCountFromMask(mask2) {
        let n6 = 0;
        for (let i5 = 0; i5 < 3; i5++) {
          n6 += mask2 & 1;
          mask2 = mask2 >> 1;
        }
        return n6 + 1;
      }
      function readCell(reader, sizeBytes) {
        const d1 = reader.loadUint(8);
        const refsCount = d1 % 8;
        const exotic = !!(d1 & 8);
        const d22 = reader.loadUint(8);
        const dataBytesize = Math.ceil(d22 / 2);
        const paddingAdded = !!(d22 % 2);
        const levelMask = d1 >> 5;
        const hasHashes = (d1 & 16) != 0;
        const hash_bytes = 32;
        const hashesSize = hasHashes ? getHashesCount(levelMask) * hash_bytes : 0;
        const depthSize = hasHashes ? getHashesCount(levelMask) * 2 : 0;
        reader.skip(hashesSize * 8);
        reader.skip(depthSize * 8);
        let bits = BitString_1.BitString.EMPTY;
        if (dataBytesize > 0) {
          if (paddingAdded) {
            bits = reader.loadPaddedBits(dataBytesize * 8);
          } else {
            bits = reader.loadBits(dataBytesize * 8);
          }
        }
        let refs = [];
        for (let i5 = 0; i5 < refsCount; i5++) {
          refs.push(reader.loadUint(sizeBytes * 8));
        }
        return {
          bits,
          refs,
          exotic
        };
      }
      function calcCellSize(cell, sizeBytes) {
        return 2 + Math.ceil(cell.bits.length / 8) + cell.refs.length * sizeBytes;
      }
      function parseBoc(src2) {
        let reader = new BitReader_1.BitReader(new BitString_1.BitString(src2, 0, src2.length * 8));
        let magic = reader.loadUint(32);
        if (magic === 1761568243) {
          let size5 = reader.loadUint(8);
          let offBytes = reader.loadUint(8);
          let cells = reader.loadUint(size5 * 8);
          let roots = reader.loadUint(size5 * 8);
          let absent = reader.loadUint(size5 * 8);
          let totalCellSize = reader.loadUint(offBytes * 8);
          let index2 = reader.loadBuffer(cells * offBytes);
          let cellData = reader.loadBuffer(totalCellSize);
          return {
            size: size5,
            offBytes,
            cells,
            roots,
            absent,
            totalCellSize,
            index: index2,
            cellData,
            root: [0]
          };
        } else if (magic === 2898503464) {
          let size5 = reader.loadUint(8);
          let offBytes = reader.loadUint(8);
          let cells = reader.loadUint(size5 * 8);
          let roots = reader.loadUint(size5 * 8);
          let absent = reader.loadUint(size5 * 8);
          let totalCellSize = reader.loadUint(offBytes * 8);
          let index2 = reader.loadBuffer(cells * offBytes);
          let cellData = reader.loadBuffer(totalCellSize);
          let crc32 = reader.loadBuffer(4);
          if (!(0, crc32c_1.crc32c)(src2.subarray(0, src2.length - 4)).equals(crc32)) {
            throw Error("Invalid CRC32C");
          }
          return {
            size: size5,
            offBytes,
            cells,
            roots,
            absent,
            totalCellSize,
            index: index2,
            cellData,
            root: [0]
          };
        } else if (magic === 3052313714) {
          let hasIdx = reader.loadUint(1);
          let hasCrc32c = reader.loadUint(1);
          let hasCacheBits = reader.loadUint(1);
          let flags = reader.loadUint(2);
          let size5 = reader.loadUint(3);
          let offBytes = reader.loadUint(8);
          let cells = reader.loadUint(size5 * 8);
          let roots = reader.loadUint(size5 * 8);
          let absent = reader.loadUint(size5 * 8);
          let totalCellSize = reader.loadUint(offBytes * 8);
          let root = [];
          for (let i5 = 0; i5 < roots; i5++) {
            root.push(reader.loadUint(size5 * 8));
          }
          let index2 = null;
          if (hasIdx) {
            index2 = reader.loadBuffer(cells * offBytes);
          }
          let cellData = reader.loadBuffer(totalCellSize);
          if (hasCrc32c) {
            let crc32 = reader.loadBuffer(4);
            if (!(0, crc32c_1.crc32c)(src2.subarray(0, src2.length - 4)).equals(crc32)) {
              throw Error("Invalid CRC32C");
            }
          }
          return {
            size: size5,
            offBytes,
            cells,
            roots,
            absent,
            totalCellSize,
            index: index2,
            cellData,
            root
          };
        } else {
          throw Error("Invalid magic");
        }
      }
      exports.parseBoc = parseBoc;
      function deserializeBoc(src2) {
        let boc = parseBoc(src2);
        let reader = new BitReader_1.BitReader(new BitString_1.BitString(boc.cellData, 0, boc.cellData.length * 8));
        let cells = [];
        for (let i5 = 0; i5 < boc.cells; i5++) {
          let cll = readCell(reader, boc.size);
          cells.push({ ...cll, result: null });
        }
        for (let i5 = cells.length - 1; i5 >= 0; i5--) {
          if (cells[i5].result) {
            throw Error("Impossible");
          }
          let refs = [];
          for (let r3 of cells[i5].refs) {
            if (!cells[r3].result) {
              throw Error("Invalid BOC file");
            }
            refs.push(cells[r3].result);
          }
          cells[i5].result = new Cell_1.Cell({
            bits: cells[i5].bits,
            refs,
            exotic: cells[i5].exotic
          });
        }
        let roots = [];
        for (let i5 = 0; i5 < boc.root.length; i5++) {
          roots.push(cells[boc.root[i5]].result);
        }
        return roots;
      }
      exports.deserializeBoc = deserializeBoc;
      function writeCellToBuilder(cell, refs, sizeBytes, to3) {
        let d1 = (0, descriptor_1.getRefsDescriptor)(cell.refs, cell.mask.value, cell.type);
        let d22 = (0, descriptor_1.getBitsDescriptor)(cell.bits);
        to3.writeUint(d1, 8);
        to3.writeUint(d22, 8);
        to3.writeBuffer((0, paddedBits_1.bitsToPaddedBuffer)(cell.bits));
        for (let r3 of refs) {
          to3.writeUint(r3, sizeBytes * 8);
        }
      }
      function serializeBoc(root, opts) {
        let allCells = (0, topologicalSort_1.topologicalSort)(root);
        let cellsNum = allCells.length;
        let has_idx = opts.idx;
        let has_crc32c = opts.crc32;
        let has_cache_bits = false;
        let flags = 0;
        let sizeBytes = Math.max(Math.ceil((0, bitsForNumber_1.bitsForNumber)(cellsNum, "uint") / 8), 1);
        let totalCellSize = 0;
        let index2 = [];
        for (let c7 of allCells) {
          let sz = calcCellSize(c7.cell, sizeBytes);
          totalCellSize += sz;
          index2.push(totalCellSize);
        }
        let offsetBytes = Math.max(Math.ceil((0, bitsForNumber_1.bitsForNumber)(totalCellSize, "uint") / 8), 1);
        let totalSize = (4 + // magic
        1 + // flags and s_bytes
        1 + // offset_bytes
        3 * sizeBytes + // cells_num, roots, complete
        offsetBytes + // full_size
        1 * sizeBytes + // root_idx
        (has_idx ? cellsNum * offsetBytes : 0) + totalCellSize + (has_crc32c ? 4 : 0)) * 8;
        let builder = new BitBuilder_1.BitBuilder(totalSize);
        builder.writeUint(3052313714, 32);
        builder.writeBit(has_idx);
        builder.writeBit(has_crc32c);
        builder.writeBit(has_cache_bits);
        builder.writeUint(flags, 2);
        builder.writeUint(sizeBytes, 3);
        builder.writeUint(offsetBytes, 8);
        builder.writeUint(cellsNum, sizeBytes * 8);
        builder.writeUint(1, sizeBytes * 8);
        builder.writeUint(0, sizeBytes * 8);
        builder.writeUint(totalCellSize, offsetBytes * 8);
        builder.writeUint(0, sizeBytes * 8);
        if (has_idx) {
          for (let i5 = 0; i5 < cellsNum; i5++) {
            builder.writeUint(index2[i5], offsetBytes * 8);
          }
        }
        for (let i5 = 0; i5 < cellsNum; i5++) {
          writeCellToBuilder(allCells[i5].cell, allCells[i5].refs, sizeBytes, builder);
        }
        if (has_crc32c) {
          let crc32 = (0, crc32c_1.crc32c)(builder.buffer());
          builder.writeBuffer(crc32);
        }
        let res = builder.buffer();
        if (res.length !== totalSize / 8) {
          throw Error("Internal error");
        }
        return res;
      }
      exports.serializeBoc = serializeBoc;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/Cell.js
  var require_Cell = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/Cell.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var _a4;
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.Cell = void 0;
      var inspect_1 = require_inspect();
      var BitString_1 = require_BitString();
      var CellType_1 = require_CellType();
      var Slice_1 = require_Slice();
      var resolveExotic_1 = require_resolveExotic();
      var wonderCalculator_1 = require_wonderCalculator();
      var serialization_1 = require_serialization();
      var BitReader_1 = require_BitReader();
      var Builder_1 = require_Builder();
      var Cell = class _Cell {
        /**
         * Deserialize cells from BOC
         * @param src source buffer
         * @returns array of cells
         */
        static fromBoc(src2) {
          return (0, serialization_1.deserializeBoc)(src2);
        }
        /**
         * Helper function that deserializes a single cell from BOC in base64
         * @param src source string
         */
        static fromBase64(src2) {
          let parsed = _Cell.fromBoc(Buffer2.from(src2, "base64"));
          if (parsed.length !== 1) {
            throw new Error("Deserialized more than one cell");
          }
          return parsed[0];
        }
        /**
         * Helper function that deserializes a single cell from BOC in hex
         * @param src source string
         */
        static fromHex(src2) {
          let parsed = _Cell.fromBoc(Buffer2.from(src2, "hex"));
          if (parsed.length !== 1) {
            throw new Error("Deserialized more than one cell");
          }
          return parsed[0];
        }
        constructor(opts) {
          this._hashes = [];
          this._depths = [];
          this.beginParse = (allowExotic = false) => {
            if (this.isExotic && !allowExotic) {
              throw new Error("Exotic cells cannot be parsed");
            }
            return new Slice_1.Slice(new BitReader_1.BitReader(this.bits), this.refs);
          };
          this.hash = (level = 3) => {
            return this._hashes[Math.min(this._hashes.length - 1, level)];
          };
          this.depth = (level = 3) => {
            return this._depths[Math.min(this._depths.length - 1, level)];
          };
          this.level = () => {
            return this.mask.level;
          };
          this.equals = (other) => {
            return this.hash().equals(other.hash());
          };
          this[_a4] = () => this.toString();
          let bits = BitString_1.BitString.EMPTY;
          if (opts && opts.bits) {
            bits = opts.bits;
          }
          let refs = [];
          if (opts && opts.refs) {
            refs = [...opts.refs];
          }
          let hashes3;
          let depths;
          let mask2;
          let type2 = CellType_1.CellType.Ordinary;
          if (opts && opts.exotic) {
            let resolved = (0, resolveExotic_1.resolveExotic)(bits, refs);
            let wonders = (0, wonderCalculator_1.wonderCalculator)(resolved.type, bits, refs);
            mask2 = wonders.mask;
            depths = wonders.depths;
            hashes3 = wonders.hashes;
            type2 = resolved.type;
          } else {
            if (refs.length > 4) {
              throw new Error("Invalid number of references");
            }
            if (bits.length > 1023) {
              throw new Error(`Bits overflow: ${bits.length} > 1023`);
            }
            let wonders = (0, wonderCalculator_1.wonderCalculator)(CellType_1.CellType.Ordinary, bits, refs);
            mask2 = wonders.mask;
            depths = wonders.depths;
            hashes3 = wonders.hashes;
            type2 = CellType_1.CellType.Ordinary;
          }
          this.type = type2;
          this.bits = bits;
          this.refs = refs;
          this.mask = mask2;
          this._depths = depths;
          this._hashes = hashes3;
          Object.freeze(this);
          Object.freeze(this.refs);
          Object.freeze(this.bits);
          Object.freeze(this.mask);
          Object.freeze(this._depths);
          Object.freeze(this._hashes);
        }
        /**
         * Check if cell is exotic
         */
        get isExotic() {
          return this.type !== CellType_1.CellType.Ordinary;
        }
        /**
         * Serializes cell to BOC
         * @param opts options
         */
        toBoc(opts) {
          let idx = opts && opts.idx !== null && opts.idx !== void 0 ? opts.idx : false;
          let crc32 = opts && opts.crc32 !== null && opts.crc32 !== void 0 ? opts.crc32 : true;
          return (0, serialization_1.serializeBoc)(this, { idx, crc32 });
        }
        /**
         * Format cell to string
         * @param indent indentation
         * @returns string representation
         */
        toString(indent) {
          let id = indent || "";
          let t = "x";
          if (this.isExotic) {
            if (this.type === CellType_1.CellType.MerkleProof) {
              t = "p";
            } else if (this.type === CellType_1.CellType.MerkleUpdate) {
              t = "u";
            } else if (this.type === CellType_1.CellType.PrunedBranch) {
              t = "p";
            }
          }
          let s3 = id + (this.isExotic ? t : "x") + "{" + this.bits.toString() + "}";
          for (let k7 in this.refs) {
            const i5 = this.refs[k7];
            s3 += "\n" + i5.toString(id + " ");
          }
          return s3;
        }
        /**
         * Covnert cell to slice
         * @returns slice
         */
        asSlice() {
          return this.beginParse();
        }
        /**
         * Convert cell to a builder that has this cell stored
         * @returns builder
         */
        asBuilder() {
          return (0, Builder_1.beginCell)().storeSlice(this.asSlice());
        }
      };
      exports.Cell = Cell;
      _a4 = inspect_1.inspectSymbol;
      Cell.EMPTY = new Cell();
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/Builder.js
  var require_Builder = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/boc/Builder.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.Builder = exports.beginCell = void 0;
      var BitBuilder_1 = require_BitBuilder();
      var Cell_1 = require_Cell();
      var strings_1 = require_strings();
      function beginCell() {
        return new Builder();
      }
      exports.beginCell = beginCell;
      var Builder = class _Builder {
        constructor() {
          this._bits = new BitBuilder_1.BitBuilder();
          this._refs = [];
        }
        /**
         * Bits written so far
         */
        get bits() {
          return this._bits.length;
        }
        /**
         * References written so far
         */
        get refs() {
          return this._refs.length;
        }
        /**
         * Available bits
         */
        get availableBits() {
          return 1023 - this.bits;
        }
        /**
         * Available references
         */
        get availableRefs() {
          return 4 - this.refs;
        }
        /**
         * Write a single bit
         * @param value bit to write, true or positive number for 1, false or zero or negative for 0
         * @returns this builder
         */
        storeBit(value) {
          this._bits.writeBit(value);
          return this;
        }
        /**
         * Write bits from BitString
         * @param src source bits
         * @returns this builder
         */
        storeBits(src2) {
          this._bits.writeBits(src2);
          return this;
        }
        /**
         * Store Buffer
         * @param src source buffer
         * @param bytes optional number of bytes to write
         * @returns this builder
         */
        storeBuffer(src2, bytes) {
          if (bytes !== void 0 && bytes !== null) {
            if (src2.length !== bytes) {
              throw Error(`Buffer length ${src2.length} is not equal to ${bytes}`);
            }
          }
          this._bits.writeBuffer(src2);
          return this;
        }
        /**
         * Store Maybe Buffer
         * @param src source buffer or null
         * @param bytes optional number of bytes to write
         * @returns this builder
         */
        storeMaybeBuffer(src2, bytes) {
          if (src2 !== null) {
            this.storeBit(1);
            this.storeBuffer(src2, bytes);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store uint value
         * @param value value as bigint or number
         * @param bits number of bits to write
         * @returns this builder
         */
        storeUint(value, bits) {
          this._bits.writeUint(value, bits);
          return this;
        }
        /**
         * Store maybe uint value
         * @param value value as bigint or number, null or undefined
         * @param bits number of bits to write
         * @returns this builder
         */
        storeMaybeUint(value, bits) {
          if (value !== null && value !== void 0) {
            this.storeBit(1);
            this.storeUint(value, bits);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store int value
         * @param value value as bigint or number
         * @param bits number of bits to write
         * @returns this builder
         */
        storeInt(value, bits) {
          this._bits.writeInt(value, bits);
          return this;
        }
        /**
         * Store maybe int value
         * @param value value as bigint or number, null or undefined
         * @param bits number of bits to write
         * @returns this builder
         */
        storeMaybeInt(value, bits) {
          if (value !== null && value !== void 0) {
            this.storeBit(1);
            this.storeInt(value, bits);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store varuint value
         * @param value value as bigint or number
         * @param bits number of bits to write to header
         * @returns this builder
         */
        storeVarUint(value, bits) {
          this._bits.writeVarUint(value, bits);
          return this;
        }
        /**
         * Store maybe varuint value
         * @param value value as bigint or number, null or undefined
         * @param bits number of bits to write to header
         * @returns this builder
         */
        storeMaybeVarUint(value, bits) {
          if (value !== null && value !== void 0) {
            this.storeBit(1);
            this.storeVarUint(value, bits);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store varint value
         * @param value value as bigint or number
         * @param bits number of bits to write to header
         * @returns this builder
         */
        storeVarInt(value, bits) {
          this._bits.writeVarInt(value, bits);
          return this;
        }
        /**
         * Store maybe varint value
         * @param value value as bigint or number, null or undefined
         * @param bits number of bits to write to header
         * @returns this builder
         */
        storeMaybeVarInt(value, bits) {
          if (value !== null && value !== void 0) {
            this.storeBit(1);
            this.storeVarInt(value, bits);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store coins value
         * @param amount amount of coins
         * @returns this builder
         */
        storeCoins(amount) {
          this._bits.writeCoins(amount);
          return this;
        }
        /**
         * Store maybe coins value
         * @param amount amount of coins, null or undefined
         * @returns this builder
         */
        storeMaybeCoins(amount) {
          if (amount !== null && amount !== void 0) {
            this.storeBit(1);
            this.storeCoins(amount);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store address
         * @param address address to store
         * @returns this builder
         */
        storeAddress(address) {
          this._bits.writeAddress(address);
          return this;
        }
        /**
         * Store reference
         * @param cell cell or builder to store
         * @returns this builder
         */
        storeRef(cell) {
          if (this._refs.length >= 4) {
            throw new Error("Too many references");
          }
          if (cell instanceof Cell_1.Cell) {
            this._refs.push(cell);
          } else if (cell instanceof _Builder) {
            this._refs.push(cell.endCell());
          } else {
            throw new Error("Invalid argument");
          }
          return this;
        }
        /**
         * Store reference if not null
         * @param cell cell or builder to store
         * @returns this builder
         */
        storeMaybeRef(cell) {
          if (cell) {
            this.storeBit(1);
            this.storeRef(cell);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store slice it in this builder
         * @param src source slice
         */
        storeSlice(src2) {
          let c7 = src2.clone();
          if (c7.remainingBits > 0) {
            this.storeBits(c7.loadBits(c7.remainingBits));
          }
          while (c7.remainingRefs > 0) {
            this.storeRef(c7.loadRef());
          }
          return this;
        }
        /**
         * Store slice in this builder if not null
         * @param src source slice
         */
        storeMaybeSlice(src2) {
          if (src2) {
            this.storeBit(1);
            this.storeSlice(src2);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store builder
         * @param src builder to store
         * @returns this builder
         */
        storeBuilder(src2) {
          return this.storeSlice(src2.endCell().beginParse());
        }
        /**
         * Store builder if not null
         * @param src builder to store
         * @returns this builder
         */
        storeMaybeBuilder(src2) {
          if (src2) {
            this.storeBit(1);
            this.storeBuilder(src2);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store writer or builder
         * @param writer writer or builder to store
         * @returns this builder
         */
        storeWritable(writer) {
          if (typeof writer === "object") {
            writer.writeTo(this);
          } else {
            writer(this);
          }
          return this;
        }
        /**
         * Store writer or builder if not null
         * @param writer writer or builder to store
         * @returns this builder
         */
        storeMaybeWritable(writer) {
          if (writer) {
            this.storeBit(1);
            this.storeWritable(writer);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store object in this builder
         * @param writer Writable or writer functuin
         */
        store(writer) {
          this.storeWritable(writer);
          return this;
        }
        /**
         * Store string tail
         * @param src source string
         * @returns this builder
         */
        storeStringTail(src2) {
          (0, strings_1.writeString)(src2, this);
          return this;
        }
        /**
         * Store string tail
         * @param src source string
         * @returns this builder
         */
        storeMaybeStringTail(src2) {
          if (src2 !== null && src2 !== void 0) {
            this.storeBit(1);
            (0, strings_1.writeString)(src2, this);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store string tail in ref
         * @param src source string
         * @returns this builder
         */
        storeStringRefTail(src2) {
          this.storeRef(beginCell().storeStringTail(src2));
          return this;
        }
        /**
         * Store maybe string tail in ref
         * @param src source string
         * @returns this builder
         */
        storeMaybeStringRefTail(src2) {
          if (src2 !== null && src2 !== void 0) {
            this.storeBit(1);
            this.storeStringRefTail(src2);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store dictionary in this builder
         * @param dict dictionary to store
         * @param key key description
         * @param value value description
         * @returns this builder
         */
        storeDict(dict, key2, value) {
          if (dict) {
            dict.store(this, key2, value);
          } else {
            this.storeBit(0);
          }
          return this;
        }
        /**
         * Store dictionary in this builder directly
         * @param dict dictionary to store
         * @param key key description
         * @param value value description
         * @returns this builder
         */
        storeDictDirect(dict, key2, value) {
          dict.storeDirect(this, key2, value);
          return this;
        }
        /**
         * Complete cell
         * @param opts options
         * @returns cell
         */
        endCell(opts) {
          return new Cell_1.Cell({
            bits: this._bits.build(),
            refs: this._refs,
            exotic: opts?.exotic
          });
        }
        /**
         * Convert to cell
         * @returns cell
         */
        asCell() {
          return this.endCell();
        }
        /**
         * Convert to slice
         * @returns slice
         */
        asSlice() {
          return this.endCell().beginParse();
        }
      };
      exports.Builder = Builder;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/SimpleLibrary.js
  var require_SimpleLibrary = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/SimpleLibrary.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.SimpleLibraryValue = exports.storeSimpleLibrary = exports.loadSimpleLibrary = void 0;
      function loadSimpleLibrary(slice4) {
        return {
          public: slice4.loadBit(),
          root: slice4.loadRef()
        };
      }
      exports.loadSimpleLibrary = loadSimpleLibrary;
      function storeSimpleLibrary(src2) {
        return (builder) => {
          builder.storeBit(src2.public);
          builder.storeRef(src2.root);
        };
      }
      exports.storeSimpleLibrary = storeSimpleLibrary;
      exports.SimpleLibraryValue = {
        serialize(src2, builder) {
          storeSimpleLibrary(src2)(builder);
        },
        parse(src2) {
          return loadSimpleLibrary(src2);
        }
      };
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TickTock.js
  var require_TickTock = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TickTock.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeTickTock = exports.loadTickTock = void 0;
      function loadTickTock(slice4) {
        return {
          tick: slice4.loadBit(),
          tock: slice4.loadBit()
        };
      }
      exports.loadTickTock = loadTickTock;
      function storeTickTock(src2) {
        return (builder) => {
          builder.storeBit(src2.tick);
          builder.storeBit(src2.tock);
        };
      }
      exports.storeTickTock = storeTickTock;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/StateInit.js
  var require_StateInit = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/StateInit.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeStateInit = exports.loadStateInit = void 0;
      var Dictionary_1 = require_Dictionary();
      var SimpleLibrary_1 = require_SimpleLibrary();
      var TickTock_1 = require_TickTock();
      function loadStateInit(slice4) {
        let splitDepth;
        if (slice4.loadBit()) {
          splitDepth = slice4.loadUint(5);
        }
        let special;
        if (slice4.loadBit()) {
          special = (0, TickTock_1.loadTickTock)(slice4);
        }
        let code2 = slice4.loadMaybeRef();
        let data = slice4.loadMaybeRef();
        let libraries = slice4.loadDict(Dictionary_1.Dictionary.Keys.BigUint(256), SimpleLibrary_1.SimpleLibraryValue);
        if (libraries.size === 0) {
          libraries = void 0;
        }
        return {
          splitDepth,
          special,
          code: code2,
          data,
          libraries
        };
      }
      exports.loadStateInit = loadStateInit;
      function storeStateInit(src2) {
        return (builder) => {
          if (src2.splitDepth !== null && src2.splitDepth !== void 0) {
            builder.storeBit(true);
            builder.storeUint(src2.splitDepth, 5);
          } else {
            builder.storeBit(false);
          }
          if (src2.special !== null && src2.special !== void 0) {
            builder.storeBit(true);
            builder.store((0, TickTock_1.storeTickTock)(src2.special));
          } else {
            builder.storeBit(false);
          }
          builder.storeMaybeRef(src2.code);
          builder.storeMaybeRef(src2.data);
          builder.storeDict(src2.libraries);
        };
      }
      exports.storeStateInit = storeStateInit;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/address/contractAddress.js
  var require_contractAddress = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/address/contractAddress.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.contractAddress = void 0;
      var Builder_1 = require_Builder();
      var StateInit_1 = require_StateInit();
      var Address_1 = require_Address();
      function contractAddress(workchain, init2) {
        let hash5 = (0, Builder_1.beginCell)().store((0, StateInit_1.storeStateInit)(init2)).endCell().hash();
        return new Address_1.Address(workchain, hash5);
      }
      exports.contractAddress = contractAddress;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/tuple/tuple.js
  var require_tuple = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/tuple/tuple.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.parseTuple = exports.serializeTuple = exports.parseTupleItem = exports.serializeTupleItem = void 0;
      var Builder_1 = require_Builder();
      var INT64_MIN = BigInt("-9223372036854775808");
      var INT64_MAX = BigInt("9223372036854775807");
      function serializeTupleItem(src2, builder) {
        if (src2.type === "null") {
          builder.storeUint(0, 8);
        } else if (src2.type === "int") {
          if (src2.value <= INT64_MAX && src2.value >= INT64_MIN) {
            builder.storeUint(1, 8);
            builder.storeInt(src2.value, 64);
          } else {
            builder.storeUint(256, 15);
            builder.storeInt(src2.value, 257);
          }
        } else if (src2.type === "nan") {
          builder.storeInt(767, 16);
        } else if (src2.type === "cell") {
          builder.storeUint(3, 8);
          builder.storeRef(src2.cell);
        } else if (src2.type === "slice") {
          builder.storeUint(4, 8);
          builder.storeUint(0, 10);
          builder.storeUint(src2.cell.bits.length, 10);
          builder.storeUint(0, 3);
          builder.storeUint(src2.cell.refs.length, 3);
          builder.storeRef(src2.cell);
        } else if (src2.type === "builder") {
          builder.storeUint(5, 8);
          builder.storeRef(src2.cell);
        } else if (src2.type === "tuple") {
          let head = null;
          let tail = null;
          for (let i5 = 0; i5 < src2.items.length; i5++) {
            let s3 = head;
            head = tail;
            tail = s3;
            if (i5 > 1) {
              head = (0, Builder_1.beginCell)().storeRef(tail).storeRef(head).endCell();
            }
            let bc = (0, Builder_1.beginCell)();
            serializeTupleItem(src2.items[i5], bc);
            tail = bc.endCell();
          }
          builder.storeUint(7, 8);
          builder.storeUint(src2.items.length, 16);
          if (head) {
            builder.storeRef(head);
          }
          if (tail) {
            builder.storeRef(tail);
          }
        } else {
          throw Error("Invalid value");
        }
      }
      exports.serializeTupleItem = serializeTupleItem;
      function parseTupleItem(cs) {
        let kind = cs.loadUint(8);
        if (kind === 0) {
          return { type: "null" };
        } else if (kind === 1) {
          return { type: "int", value: cs.loadIntBig(64) };
        } else if (kind === 2) {
          if (cs.loadUint(7) === 0) {
            return { type: "int", value: cs.loadIntBig(257) };
          } else {
            cs.loadBit();
            return { type: "nan" };
          }
        } else if (kind === 3) {
          return { type: "cell", cell: cs.loadRef() };
        } else if (kind === 4) {
          let startBits = cs.loadUint(10);
          let endBits = cs.loadUint(10);
          let startRefs = cs.loadUint(3);
          let endRefs = cs.loadUint(3);
          let rs = cs.loadRef().beginParse();
          rs.skip(startBits);
          let dt6 = rs.loadBits(endBits - startBits);
          let builder = (0, Builder_1.beginCell)().storeBits(dt6);
          if (startRefs < endRefs) {
            for (let i5 = 0; i5 < startRefs; i5++) {
              rs.loadRef();
            }
            for (let i5 = 0; i5 < endRefs - startRefs; i5++) {
              builder.storeRef(rs.loadRef());
            }
          }
          return { type: "slice", cell: builder.endCell() };
        } else if (kind === 5) {
          return { type: "builder", cell: cs.loadRef() };
        } else if (kind === 7) {
          let length2 = cs.loadUint(16);
          let items = [];
          if (length2 > 1) {
            let head = cs.loadRef().beginParse();
            let tail = cs.loadRef().beginParse();
            items.unshift(parseTupleItem(tail));
            for (let i5 = 0; i5 < length2 - 2; i5++) {
              let ohead = head;
              head = ohead.loadRef().beginParse();
              tail = ohead.loadRef().beginParse();
              items.unshift(parseTupleItem(tail));
            }
            items.unshift(parseTupleItem(head));
          } else if (length2 === 1) {
            items.push(parseTupleItem(cs.loadRef().beginParse()));
          }
          return { type: "tuple", items };
        } else {
          throw Error("Unsupported stack item");
        }
      }
      exports.parseTupleItem = parseTupleItem;
      function serializeTupleTail(src2, builder) {
        if (src2.length > 0) {
          let tail = (0, Builder_1.beginCell)();
          serializeTupleTail(src2.slice(0, src2.length - 1), tail);
          builder.storeRef(tail.endCell());
          serializeTupleItem(src2[src2.length - 1], builder);
        }
      }
      function serializeTuple(src2) {
        let builder = (0, Builder_1.beginCell)();
        builder.storeUint(src2.length, 24);
        let r3 = [...src2];
        serializeTupleTail(r3, builder);
        return builder.endCell();
      }
      exports.serializeTuple = serializeTuple;
      function parseTuple(src2) {
        let res = [];
        let cs = src2.beginParse();
        let size5 = cs.loadUint(24);
        for (let i5 = 0; i5 < size5; i5++) {
          let next = cs.loadRef();
          res.unshift(parseTupleItem(cs));
          cs = next.beginParse();
        }
        return res;
      }
      exports.parseTuple = parseTuple;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/tuple/reader.js
  var require_reader = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/tuple/reader.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.TupleReader = void 0;
      var TupleReader = class _TupleReader {
        constructor(items) {
          this.items = [...items];
        }
        get remaining() {
          return this.items.length;
        }
        peek() {
          if (this.items.length === 0) {
            throw Error("EOF");
          }
          return this.items[0];
        }
        pop() {
          if (this.items.length === 0) {
            throw Error("EOF");
          }
          let res = this.items[0];
          this.items.splice(0, 1);
          return res;
        }
        skip(num2 = 1) {
          for (let i5 = 0; i5 < num2; i5++) {
            this.pop();
          }
          return this;
        }
        readBigNumber() {
          let popped = this.pop();
          if (popped.type !== "int") {
            throw Error("Not a number");
          }
          return popped.value;
        }
        readBigNumberOpt() {
          let popped = this.pop();
          if (popped.type === "null") {
            return null;
          }
          if (popped.type !== "int") {
            throw Error("Not a number");
          }
          return popped.value;
        }
        readNumber() {
          return Number(this.readBigNumber());
        }
        readNumberOpt() {
          let r3 = this.readBigNumberOpt();
          if (r3 !== null) {
            return Number(r3);
          } else {
            return null;
          }
        }
        readBoolean() {
          let res = this.readNumber();
          return res === 0 ? false : true;
        }
        readBooleanOpt() {
          let res = this.readNumberOpt();
          if (res !== null) {
            return res === 0 ? false : true;
          } else {
            return null;
          }
        }
        readAddress() {
          let r3 = this.readCell().beginParse().loadAddress();
          if (r3 !== null) {
            return r3;
          } else {
            throw Error("Not an address");
          }
        }
        readAddressOpt() {
          let r3 = this.readCellOpt();
          if (r3 !== null) {
            return r3.beginParse().loadMaybeAddress();
          } else {
            return null;
          }
        }
        readCell() {
          let popped = this.pop();
          if (popped.type !== "cell" && popped.type !== "slice" && popped.type !== "builder") {
            throw Error("Not a cell: " + popped.type);
          }
          return popped.cell;
        }
        readCellOpt() {
          let popped = this.pop();
          if (popped.type === "null") {
            return null;
          }
          if (popped.type !== "cell" && popped.type !== "slice" && popped.type !== "builder") {
            throw Error("Not a cell");
          }
          return popped.cell;
        }
        readTuple() {
          let popped = this.pop();
          if (popped.type !== "tuple") {
            throw Error("Not a tuple");
          }
          return new _TupleReader(popped.items);
        }
        readTupleOpt() {
          let popped = this.pop();
          if (popped.type === "null") {
            return null;
          }
          if (popped.type !== "tuple") {
            throw Error("Not a tuple");
          }
          return new _TupleReader(popped.items);
        }
        static readLispList(reader) {
          const result = [];
          let tail = reader;
          while (tail !== null) {
            var head = tail.pop();
            if (tail.items.length === 0 || tail.items[0].type !== "tuple" && tail.items[0].type !== "null") {
              throw Error("Lisp list consists only from (any, tuple) elements and ends with null");
            }
            tail = tail.readTupleOpt();
            result.push(head);
          }
          return result;
        }
        readLispListDirect() {
          if (this.items.length === 1 && this.items[0].type === "null") {
            return [];
          }
          return _TupleReader.readLispList(this);
        }
        readLispList() {
          return _TupleReader.readLispList(this.readTupleOpt());
        }
        readBuffer() {
          let s3 = this.readCell().beginParse();
          if (s3.remainingRefs !== 0) {
            throw Error("Not a buffer");
          }
          if (s3.remainingBits % 8 !== 0) {
            throw Error("Not a buffer");
          }
          return s3.loadBuffer(s3.remainingBits / 8);
        }
        readBufferOpt() {
          let r3 = this.readCellOpt();
          if (r3 !== null) {
            let s3 = r3.beginParse();
            if (s3.remainingRefs !== 0 || s3.remainingBits % 8 !== 0) {
              throw Error("Not a buffer");
            }
            return s3.loadBuffer(s3.remainingBits / 8);
          } else {
            return null;
          }
        }
        readString() {
          let s3 = this.readCell().beginParse();
          return s3.loadStringTail();
        }
        readStringOpt() {
          let r3 = this.readCellOpt();
          if (r3 !== null) {
            let s3 = r3.beginParse();
            return s3.loadStringTail();
          } else {
            return null;
          }
        }
      };
      exports.TupleReader = TupleReader;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/tuple/builder.js
  var require_builder = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/tuple/builder.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.TupleBuilder = void 0;
      var Builder_1 = require_Builder();
      var Cell_1 = require_Cell();
      var Slice_1 = require_Slice();
      var TupleBuilder = class {
        constructor() {
          this._tuple = [];
        }
        writeNumber(v13) {
          if (v13 === null || v13 === void 0) {
            this._tuple.push({ type: "null" });
          } else {
            this._tuple.push({ type: "int", value: BigInt(v13) });
          }
        }
        writeBoolean(v13) {
          if (v13 === null || v13 === void 0) {
            this._tuple.push({ type: "null" });
          } else {
            this._tuple.push({ type: "int", value: v13 ? -1n : 0n });
          }
        }
        writeBuffer(v13) {
          if (v13 === null || v13 === void 0) {
            this._tuple.push({ type: "null" });
          } else {
            this._tuple.push({
              type: "slice",
              cell: (0, Builder_1.beginCell)().storeBuffer(v13).endCell()
            });
          }
        }
        writeString(v13) {
          if (v13 === null || v13 === void 0) {
            this._tuple.push({ type: "null" });
          } else {
            this._tuple.push({
              type: "slice",
              cell: (0, Builder_1.beginCell)().storeStringTail(v13).endCell()
            });
          }
        }
        writeCell(v13) {
          if (v13 === null || v13 === void 0) {
            this._tuple.push({ type: "null" });
          } else {
            if (v13 instanceof Cell_1.Cell) {
              this._tuple.push({ type: "cell", cell: v13 });
            } else if (v13 instanceof Slice_1.Slice) {
              this._tuple.push({ type: "cell", cell: v13.asCell() });
            }
          }
        }
        writeSlice(v13) {
          if (v13 === null || v13 === void 0) {
            this._tuple.push({ type: "null" });
          } else {
            if (v13 instanceof Cell_1.Cell) {
              this._tuple.push({ type: "slice", cell: v13 });
            } else if (v13 instanceof Slice_1.Slice) {
              this._tuple.push({ type: "slice", cell: v13.asCell() });
            }
          }
        }
        writeBuilder(v13) {
          if (v13 === null || v13 === void 0) {
            this._tuple.push({ type: "null" });
          } else {
            if (v13 instanceof Cell_1.Cell) {
              this._tuple.push({ type: "builder", cell: v13 });
            } else if (v13 instanceof Slice_1.Slice) {
              this._tuple.push({ type: "builder", cell: v13.asCell() });
            }
          }
        }
        writeTuple(v13) {
          if (v13 === null || v13 === void 0) {
            this._tuple.push({ type: "null" });
          } else {
            this._tuple.push({ type: "tuple", items: v13 });
          }
        }
        writeAddress(v13) {
          if (v13 === null || v13 === void 0) {
            this._tuple.push({ type: "null" });
          } else {
            this._tuple.push({
              type: "slice",
              cell: (0, Builder_1.beginCell)().storeAddress(v13).endCell()
            });
          }
        }
        build() {
          return [...this._tuple];
        }
      };
      exports.TupleBuilder = TupleBuilder;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/utils/convert.js
  var require_convert = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/utils/convert.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.fromNano = exports.toNano = void 0;
      function toNano(src2) {
        if (typeof src2 === "bigint") {
          return src2 * 1000000000n;
        } else {
          if (typeof src2 === "number") {
            if (!Number.isFinite(src2)) {
              throw Error("Invalid number");
            }
            if (Math.log10(src2) <= 6) {
              src2 = src2.toLocaleString("en", {
                minimumFractionDigits: 9,
                useGrouping: false
              });
            } else if (src2 - Math.trunc(src2) === 0) {
              src2 = src2.toLocaleString("en", {
                maximumFractionDigits: 0,
                useGrouping: false
              });
            } else {
              throw Error("Not enough precision for a number value. Use string value instead");
            }
          }
          let neg3 = false;
          while (src2.startsWith("-")) {
            neg3 = !neg3;
            src2 = src2.slice(1);
          }
          if (src2 === ".") {
            throw Error("Invalid number");
          }
          let parts = src2.split(".");
          if (parts.length > 2) {
            throw Error("Invalid number");
          }
          let whole = parts[0];
          let frac = parts[1];
          if (!whole) {
            whole = "0";
          }
          if (!frac) {
            frac = "0";
          }
          if (frac.length > 9) {
            throw Error("Invalid number");
          }
          while (frac.length < 9) {
            frac += "0";
          }
          let r3 = BigInt(whole) * 1000000000n + BigInt(frac);
          if (neg3) {
            r3 = -r3;
          }
          return r3;
        }
      }
      exports.toNano = toNano;
      function fromNano(src2) {
        let v13 = BigInt(src2);
        let neg3 = false;
        if (v13 < 0) {
          neg3 = true;
          v13 = -v13;
        }
        let frac = v13 % 1000000000n;
        let facStr = frac.toString();
        while (facStr.length < 9) {
          facStr = "0" + facStr;
        }
        facStr = facStr.match(/^([0-9]*[1-9]|0)(0*)/)[1];
        let whole = v13 / 1000000000n;
        let wholeStr = whole.toString();
        let value = `${wholeStr}${facStr === "0" ? "" : `.${facStr}`}`;
        if (neg3) {
          value = "-" + value;
        }
        return value;
      }
      exports.fromNano = fromNano;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ExtraCurrency.js
  var require_ExtraCurrency = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ExtraCurrency.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.packExtraCurrencyCell = exports.packExtraCurrencyDict = exports.storeExtraCurrency = exports.loadMaybeExtraCurrency = exports.loadExtraCurrency = void 0;
      var Builder_1 = require_Builder();
      var Dictionary_1 = require_Dictionary();
      function loadExtraCurrency(data) {
        let ecDict = data instanceof Dictionary_1.Dictionary ? data : Dictionary_1.Dictionary.loadDirect(Dictionary_1.Dictionary.Keys.Uint(32), Dictionary_1.Dictionary.Values.BigVarUint(5), data);
        let ecMap = {};
        for (let [k7, v13] of ecDict) {
          ecMap[k7] = v13;
        }
        return ecMap;
      }
      exports.loadExtraCurrency = loadExtraCurrency;
      function loadMaybeExtraCurrency(data) {
        const ecData = data.loadMaybeRef();
        return ecData === null ? ecData : loadExtraCurrency(ecData);
      }
      exports.loadMaybeExtraCurrency = loadMaybeExtraCurrency;
      function storeExtraCurrency(extracurrency) {
        return (builder) => {
          builder.storeDict(packExtraCurrencyDict(extracurrency));
        };
      }
      exports.storeExtraCurrency = storeExtraCurrency;
      function packExtraCurrencyDict(extracurrency) {
        const resEc = Dictionary_1.Dictionary.empty(Dictionary_1.Dictionary.Keys.Uint(32), Dictionary_1.Dictionary.Values.BigVarUint(5));
        Object.entries(extracurrency).map(([k7, v13]) => resEc.set(Number(k7), v13));
        return resEc;
      }
      exports.packExtraCurrencyDict = packExtraCurrencyDict;
      function packExtraCurrencyCell(extracurrency) {
        return (0, Builder_1.beginCell)().storeDictDirect(packExtraCurrencyDict(extracurrency)).endCell();
      }
      exports.packExtraCurrencyCell = packExtraCurrencyCell;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/_helpers.js
  var require_helpers = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/_helpers.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.comment = exports.external = exports.internal = void 0;
      var Address_1 = require_Address();
      var Cell_1 = require_Cell();
      var Builder_1 = require_Builder();
      var convert_1 = require_convert();
      var ExtraCurrency_1 = require_ExtraCurrency();
      function internal2(src2) {
        let bounce = true;
        if (src2.bounce !== null && src2.bounce !== void 0) {
          bounce = src2.bounce;
        }
        let to3;
        if (typeof src2.to === "string") {
          to3 = Address_1.Address.parse(src2.to);
        } else if (Address_1.Address.isAddress(src2.to)) {
          to3 = src2.to;
        } else {
          throw new Error(`Invalid address ${src2.to}`);
        }
        let value;
        if (typeof src2.value === "string") {
          value = (0, convert_1.toNano)(src2.value);
        } else {
          value = src2.value;
        }
        let other;
        if (src2.extracurrency) {
          other = (0, ExtraCurrency_1.packExtraCurrencyDict)(src2.extracurrency);
        }
        let body = Cell_1.Cell.EMPTY;
        if (typeof src2.body === "string") {
          body = (0, Builder_1.beginCell)().storeUint(0, 32).storeStringTail(src2.body).endCell();
        } else if (src2.body) {
          body = src2.body;
        }
        return {
          info: {
            type: "internal",
            dest: to3,
            value: { coins: value, other },
            bounce,
            ihrDisabled: true,
            bounced: false,
            ihrFee: 0n,
            forwardFee: 0n,
            createdAt: 0,
            createdLt: 0n
          },
          init: src2.init ?? void 0,
          body
        };
      }
      exports.internal = internal2;
      function external(src2) {
        let to3;
        if (typeof src2.to === "string") {
          to3 = Address_1.Address.parse(src2.to);
        } else if (Address_1.Address.isAddress(src2.to)) {
          to3 = src2.to;
        } else {
          throw new Error(`Invalid address ${src2.to}`);
        }
        return {
          info: {
            type: "external-in",
            dest: to3,
            importFee: 0n
          },
          init: src2.init ?? void 0,
          body: src2.body || Cell_1.Cell.EMPTY
        };
      }
      exports.external = external;
      function comment(src2) {
        return (0, Builder_1.beginCell)().storeUint(0, 32).storeStringTail(src2).endCell();
      }
      exports.comment = comment;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/AccountState.js
  var require_AccountState = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/AccountState.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeAccountState = exports.loadAccountState = void 0;
      var StateInit_1 = require_StateInit();
      function loadAccountState(cs) {
        if (cs.loadBit()) {
          return { type: "active", state: (0, StateInit_1.loadStateInit)(cs) };
        } else if (cs.loadBit()) {
          return { type: "frozen", stateHash: cs.loadUintBig(256) };
        } else {
          return { type: "uninit" };
        }
      }
      exports.loadAccountState = loadAccountState;
      function storeAccountState(src2) {
        return (builder) => {
          if (src2.type === "active") {
            builder.storeBit(true);
            builder.store((0, StateInit_1.storeStateInit)(src2.state));
          } else if (src2.type === "frozen") {
            builder.storeBit(false);
            builder.storeBit(true);
            builder.storeUint(src2.stateHash, 256);
          } else if (src2.type === "uninit") {
            builder.storeBit(false);
            builder.storeBit(false);
          }
        };
      }
      exports.storeAccountState = storeAccountState;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/CurrencyCollection.js
  var require_CurrencyCollection = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/CurrencyCollection.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeCurrencyCollection = exports.loadCurrencyCollection = void 0;
      var Dictionary_1 = require_Dictionary();
      function loadCurrencyCollection(slice4) {
        const coins = slice4.loadCoins();
        const other = slice4.loadDict(Dictionary_1.Dictionary.Keys.Uint(32), Dictionary_1.Dictionary.Values.BigVarUint(
          5
          /* log2(32) */
        ));
        if (other.size === 0) {
          return { coins };
        } else {
          return { other, coins };
        }
      }
      exports.loadCurrencyCollection = loadCurrencyCollection;
      function storeCurrencyCollection(collection) {
        return (builder) => {
          builder.storeCoins(collection.coins);
          if (collection.other) {
            builder.storeDict(collection.other);
          } else {
            builder.storeBit(0);
          }
        };
      }
      exports.storeCurrencyCollection = storeCurrencyCollection;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/AccountStorage.js
  var require_AccountStorage = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/AccountStorage.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeAccountStorage = exports.loadAccountStorage = void 0;
      var AccountState_1 = require_AccountState();
      var CurrencyCollection_1 = require_CurrencyCollection();
      function loadAccountStorage(slice4) {
        return {
          lastTransLt: slice4.loadUintBig(64),
          balance: (0, CurrencyCollection_1.loadCurrencyCollection)(slice4),
          state: (0, AccountState_1.loadAccountState)(slice4)
        };
      }
      exports.loadAccountStorage = loadAccountStorage;
      function storeAccountStorage(src2) {
        return (builder) => {
          builder.storeUint(src2.lastTransLt, 64);
          builder.store((0, CurrencyCollection_1.storeCurrencyCollection)(src2.balance));
          builder.store((0, AccountState_1.storeAccountState)(src2.state));
        };
      }
      exports.storeAccountStorage = storeAccountStorage;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/StorageExtraInfo.js
  var require_StorageExtraInfo = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/StorageExtraInfo.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeStorageExtraInfo = exports.loadStorageExtraInfo = void 0;
      function loadStorageExtraInfo(slice4) {
        let header = slice4.loadUint(3);
        if (header === 0) {
          return null;
        }
        if (header === 1) {
          return {
            dictHash: slice4.loadUintBig(256)
          };
        }
        throw new Error(`Invalid storage extra info header: ${header}`);
      }
      exports.loadStorageExtraInfo = loadStorageExtraInfo;
      function storeStorageExtraInfo(src2) {
        return (builder) => {
          if (src2 === null || typeof src2 === "undefined") {
            builder.storeUint(0, 3);
          } else {
            builder.storeUint(1, 3);
            builder.storeUint(src2.dictHash, 256);
          }
        };
      }
      exports.storeStorageExtraInfo = storeStorageExtraInfo;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/StorageUsed.js
  var require_StorageUsed = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/StorageUsed.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeStorageUsed = exports.loadStorageUsed = void 0;
      function loadStorageUsed(cs) {
        return {
          cells: cs.loadVarUintBig(3),
          bits: cs.loadVarUintBig(3)
        };
      }
      exports.loadStorageUsed = loadStorageUsed;
      function storeStorageUsed(src2) {
        return (builder) => {
          builder.storeVarUint(src2.cells, 3);
          builder.storeVarUint(src2.bits, 3);
        };
      }
      exports.storeStorageUsed = storeStorageUsed;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/StorageInfo.js
  var require_StorageInfo = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/StorageInfo.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeStorageInfo = exports.loadStorageInfo = void 0;
      var StorageExtraInfo_1 = require_StorageExtraInfo();
      var StorageUsed_1 = require_StorageUsed();
      function loadStorageInfo(slice4) {
        return {
          used: (0, StorageUsed_1.loadStorageUsed)(slice4),
          storageExtra: (0, StorageExtraInfo_1.loadStorageExtraInfo)(slice4),
          lastPaid: slice4.loadUint(32),
          duePayment: slice4.loadMaybeCoins()
        };
      }
      exports.loadStorageInfo = loadStorageInfo;
      function storeStorageInfo(src2) {
        return (builder) => {
          builder.store((0, StorageUsed_1.storeStorageUsed)(src2.used));
          builder.store((0, StorageExtraInfo_1.storeStorageExtraInfo)(src2.storageExtra));
          builder.storeUint(src2.lastPaid, 32);
          builder.storeMaybeCoins(src2.duePayment);
        };
      }
      exports.storeStorageInfo = storeStorageInfo;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/Account.js
  var require_Account = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/Account.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeAccount = exports.loadAccount = void 0;
      var AccountStorage_1 = require_AccountStorage();
      var StorageInfo_1 = require_StorageInfo();
      function loadAccount(slice4) {
        return {
          addr: slice4.loadAddress(),
          storageStats: (0, StorageInfo_1.loadStorageInfo)(slice4),
          storage: (0, AccountStorage_1.loadAccountStorage)(slice4)
        };
      }
      exports.loadAccount = loadAccount;
      function storeAccount(src2) {
        return (builder) => {
          builder.storeAddress(src2.addr);
          builder.store((0, StorageInfo_1.storeStorageInfo)(src2.storageStats));
          builder.store((0, AccountStorage_1.storeAccountStorage)(src2.storage));
        };
      }
      exports.storeAccount = storeAccount;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/AccountStatus.js
  var require_AccountStatus = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/AccountStatus.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeAccountStatus = exports.loadAccountStatus = void 0;
      function loadAccountStatus(slice4) {
        const status = slice4.loadUint(2);
        if (status === 0) {
          return "uninitialized";
        }
        if (status === 1) {
          return "frozen";
        }
        if (status === 2) {
          return "active";
        }
        if (status === 3) {
          return "non-existing";
        }
        throw Error("Invalid data");
      }
      exports.loadAccountStatus = loadAccountStatus;
      function storeAccountStatus(src2) {
        return (builder) => {
          if (src2 === "uninitialized") {
            builder.storeUint(0, 2);
          } else if (src2 === "frozen") {
            builder.storeUint(1, 2);
          } else if (src2 === "active") {
            builder.storeUint(2, 2);
          } else if (src2 === "non-existing") {
            builder.storeUint(3, 2);
          } else {
            throw Error("Invalid data");
          }
          return builder;
        };
      }
      exports.storeAccountStatus = storeAccountStatus;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/AccountStatusChange.js
  var require_AccountStatusChange = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/AccountStatusChange.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeAccountStatusChange = exports.loadAccountStatusChange = void 0;
      function loadAccountStatusChange(slice4) {
        if (!slice4.loadBit()) {
          return "unchanged";
        }
        if (slice4.loadBit()) {
          return "deleted";
        } else {
          return "frozen";
        }
      }
      exports.loadAccountStatusChange = loadAccountStatusChange;
      function storeAccountStatusChange(src2) {
        return (builder) => {
          if (src2 == "unchanged") {
            builder.storeBit(0);
          } else if (src2 === "frozen") {
            builder.storeBit(1);
            builder.storeBit(0);
          } else if (src2 === "deleted") {
            builder.storeBit(1);
            builder.storeBit(1);
          } else {
            throw Error("Invalid account status change");
          }
        };
      }
      exports.storeAccountStatusChange = storeAccountStatusChange;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/CommonMessageInfoRelaxed.js
  var require_CommonMessageInfoRelaxed = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/CommonMessageInfoRelaxed.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeCommonMessageInfoRelaxed = exports.loadCommonMessageInfoRelaxed = void 0;
      var CurrencyCollection_1 = require_CurrencyCollection();
      function loadCommonMessageInfoRelaxed(slice4) {
        if (!slice4.loadBit()) {
          const ihrDisabled = slice4.loadBit();
          const bounce = slice4.loadBit();
          const bounced = slice4.loadBit();
          const src3 = slice4.loadMaybeAddress();
          const dest2 = slice4.loadAddress();
          const value = (0, CurrencyCollection_1.loadCurrencyCollection)(slice4);
          const ihrFee = slice4.loadCoins();
          const forwardFee = slice4.loadCoins();
          const createdLt2 = slice4.loadUintBig(64);
          const createdAt2 = slice4.loadUint(32);
          return {
            type: "internal",
            ihrDisabled,
            bounce,
            bounced,
            src: src3,
            dest: dest2,
            value,
            ihrFee,
            forwardFee,
            createdLt: createdLt2,
            createdAt: createdAt2
          };
        }
        if (!slice4.loadBit()) {
          throw Error("External In message is not possible for CommonMessageInfoRelaxed");
        }
        const src2 = slice4.loadMaybeAddress();
        const dest = slice4.loadMaybeExternalAddress();
        const createdLt = slice4.loadUintBig(64);
        const createdAt = slice4.loadUint(32);
        return {
          type: "external-out",
          src: src2,
          dest,
          createdLt,
          createdAt
        };
      }
      exports.loadCommonMessageInfoRelaxed = loadCommonMessageInfoRelaxed;
      function storeCommonMessageInfoRelaxed(source) {
        return (builder) => {
          if (source.type === "internal") {
            builder.storeBit(0);
            builder.storeBit(source.ihrDisabled);
            builder.storeBit(source.bounce);
            builder.storeBit(source.bounced);
            builder.storeAddress(source.src);
            builder.storeAddress(source.dest);
            builder.store((0, CurrencyCollection_1.storeCurrencyCollection)(source.value));
            builder.storeCoins(source.ihrFee);
            builder.storeCoins(source.forwardFee);
            builder.storeUint(source.createdLt, 64);
            builder.storeUint(source.createdAt, 32);
          } else if (source.type === "external-out") {
            builder.storeBit(1);
            builder.storeBit(1);
            builder.storeAddress(source.src);
            builder.storeAddress(source.dest);
            builder.storeUint(source.createdLt, 64);
            builder.storeUint(source.createdAt, 32);
          } else {
            throw new Error("Unknown CommonMessageInfo type");
          }
        };
      }
      exports.storeCommonMessageInfoRelaxed = storeCommonMessageInfoRelaxed;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/MessageRelaxed.js
  var require_MessageRelaxed = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/MessageRelaxed.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeMessageRelaxed = exports.loadMessageRelaxed = void 0;
      var Builder_1 = require_Builder();
      var CommonMessageInfoRelaxed_1 = require_CommonMessageInfoRelaxed();
      var StateInit_1 = require_StateInit();
      function loadMessageRelaxed(slice4) {
        const info = (0, CommonMessageInfoRelaxed_1.loadCommonMessageInfoRelaxed)(slice4);
        let init2 = null;
        if (slice4.loadBit()) {
          if (!slice4.loadBit()) {
            init2 = (0, StateInit_1.loadStateInit)(slice4);
          } else {
            init2 = (0, StateInit_1.loadStateInit)(slice4.loadRef().beginParse());
          }
        }
        const body = slice4.loadBit() ? slice4.loadRef() : slice4.asCell();
        return {
          info,
          init: init2,
          body
        };
      }
      exports.loadMessageRelaxed = loadMessageRelaxed;
      function storeMessageRelaxed(message, opts) {
        return (builder) => {
          builder.store((0, CommonMessageInfoRelaxed_1.storeCommonMessageInfoRelaxed)(message.info));
          if (message.init) {
            builder.storeBit(true);
            let initCell = (0, Builder_1.beginCell)().store((0, StateInit_1.storeStateInit)(message.init));
            let needRef2 = false;
            if (opts && opts.forceRef) {
              needRef2 = true;
            } else {
              if (builder.availableBits - 2 >= initCell.bits) {
                needRef2 = false;
              } else {
                needRef2 = true;
              }
            }
            if (needRef2) {
              builder.storeBit(true);
              builder.storeRef(initCell);
            } else {
              builder.storeBit(false);
              builder.storeBuilder(initCell);
            }
          } else {
            builder.storeBit(false);
          }
          let needRef = false;
          if (opts && opts.forceRef) {
            needRef = true;
          } else {
            if (builder.availableBits - 1 >= message.body.bits.length && builder.refs + message.body.refs.length <= 4 && !message.body.isExotic) {
              needRef = false;
            } else {
              needRef = true;
            }
          }
          if (needRef) {
            builder.storeBit(true);
            builder.storeRef(message.body);
          } else {
            builder.storeBit(false);
            builder.storeBuilder(message.body.asBuilder());
          }
        };
      }
      exports.storeMessageRelaxed = storeMessageRelaxed;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/LibRef.js
  var require_LibRef = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/LibRef.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeLibRef = exports.loadLibRef = void 0;
      function loadLibRef(slice4) {
        const type2 = slice4.loadUint(1);
        if (type2 === 0) {
          return {
            type: "hash",
            libHash: slice4.loadBuffer(32)
          };
        } else {
          return {
            type: "ref",
            library: slice4.loadRef()
          };
        }
      }
      exports.loadLibRef = loadLibRef;
      function storeLibRef(src2) {
        return (builder) => {
          if (src2.type === "hash") {
            builder.storeUint(0, 1);
            builder.storeBuffer(src2.libHash);
          } else {
            builder.storeUint(1, 1);
            builder.storeRef(src2.library);
          }
        };
      }
      exports.storeLibRef = storeLibRef;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/OutList.js
  var require_OutList = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/OutList.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.loadOutList = exports.storeOutList = exports.loadOutAction = exports.storeOutAction = void 0;
      var MessageRelaxed_1 = require_MessageRelaxed();
      var Builder_1 = require_Builder();
      var CurrencyCollection_1 = require_CurrencyCollection();
      var LibRef_1 = require_LibRef();
      function storeOutAction(action) {
        switch (action.type) {
          case "sendMsg":
            return storeOutActionSendMsg(action);
          case "setCode":
            return storeOutActionSetCode(action);
          case "reserve":
            return storeOutActionReserve(action);
          case "changeLibrary":
            return storeOutActionChangeLibrary(action);
          default:
            throw new Error(`Unknown action type ${action.type}`);
        }
      }
      exports.storeOutAction = storeOutAction;
      var outActionSendMsgTag = 247711853;
      function storeOutActionSendMsg(action) {
        return (builder) => {
          builder.storeUint(outActionSendMsgTag, 32).storeUint(action.mode, 8).storeRef((0, Builder_1.beginCell)().store((0, MessageRelaxed_1.storeMessageRelaxed)(action.outMsg)).endCell());
        };
      }
      var outActionSetCodeTag = 2907562126;
      function storeOutActionSetCode(action) {
        return (builder) => {
          builder.storeUint(outActionSetCodeTag, 32).storeRef(action.newCode);
        };
      }
      var outActionReserveTag = 921090057;
      function storeOutActionReserve(action) {
        return (builder) => {
          builder.storeUint(outActionReserveTag, 32).storeUint(action.mode, 8).store((0, CurrencyCollection_1.storeCurrencyCollection)(action.currency));
        };
      }
      var outActionChangeLibraryTag = 653925844;
      function storeOutActionChangeLibrary(action) {
        return (builder) => {
          builder.storeUint(outActionChangeLibraryTag, 32).storeUint(action.mode, 7).store((0, LibRef_1.storeLibRef)(action.libRef));
        };
      }
      function loadOutAction(slice4) {
        const tag = slice4.loadUint(32);
        if (tag === outActionSendMsgTag) {
          const mode = slice4.loadUint(8);
          const outMsg = (0, MessageRelaxed_1.loadMessageRelaxed)(slice4.loadRef().beginParse());
          return {
            type: "sendMsg",
            mode,
            outMsg
          };
        }
        if (tag === outActionSetCodeTag) {
          const newCode = slice4.loadRef();
          return {
            type: "setCode",
            newCode
          };
        }
        if (tag === outActionReserveTag) {
          const mode = slice4.loadUint(8);
          const currency = (0, CurrencyCollection_1.loadCurrencyCollection)(slice4);
          return {
            type: "reserve",
            mode,
            currency
          };
        }
        if (tag === outActionChangeLibraryTag) {
          const mode = slice4.loadUint(7);
          const libRef = (0, LibRef_1.loadLibRef)(slice4);
          return {
            type: "changeLibrary",
            mode,
            libRef
          };
        }
        throw new Error(`Unknown out action tag 0x${tag.toString(16)}`);
      }
      exports.loadOutAction = loadOutAction;
      function storeOutList(actions) {
        const cell = actions.reduce((cell2, action) => (0, Builder_1.beginCell)().storeRef(cell2).store(storeOutAction(action)).endCell(), (0, Builder_1.beginCell)().endCell());
        return (builder) => {
          builder.storeSlice(cell.beginParse());
        };
      }
      exports.storeOutList = storeOutList;
      function loadOutList(slice4) {
        const actions = [];
        while (slice4.remainingRefs) {
          const nextCell = slice4.loadRef();
          actions.push(loadOutAction(slice4));
          slice4 = nextCell.beginParse();
        }
        return actions.reverse();
      }
      exports.loadOutList = loadOutList;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/CommonMessageInfo.js
  var require_CommonMessageInfo = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/CommonMessageInfo.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeCommonMessageInfo = exports.loadCommonMessageInfo = void 0;
      var CurrencyCollection_1 = require_CurrencyCollection();
      function loadCommonMessageInfo(slice4) {
        if (!slice4.loadBit()) {
          const ihrDisabled = slice4.loadBit();
          const bounce = slice4.loadBit();
          const bounced = slice4.loadBit();
          const src3 = slice4.loadAddress();
          const dest2 = slice4.loadAddress();
          const value = (0, CurrencyCollection_1.loadCurrencyCollection)(slice4);
          const ihrFee = slice4.loadCoins();
          const forwardFee = slice4.loadCoins();
          const createdLt2 = slice4.loadUintBig(64);
          const createdAt2 = slice4.loadUint(32);
          return {
            type: "internal",
            ihrDisabled,
            bounce,
            bounced,
            src: src3,
            dest: dest2,
            value,
            ihrFee,
            forwardFee,
            createdLt: createdLt2,
            createdAt: createdAt2
          };
        }
        if (!slice4.loadBit()) {
          const src3 = slice4.loadMaybeExternalAddress();
          const dest2 = slice4.loadAddress();
          const importFee = slice4.loadCoins();
          return {
            type: "external-in",
            src: src3,
            dest: dest2,
            importFee
          };
        }
        const src2 = slice4.loadAddress();
        const dest = slice4.loadMaybeExternalAddress();
        const createdLt = slice4.loadUintBig(64);
        const createdAt = slice4.loadUint(32);
        return {
          type: "external-out",
          src: src2,
          dest,
          createdLt,
          createdAt
        };
      }
      exports.loadCommonMessageInfo = loadCommonMessageInfo;
      function storeCommonMessageInfo(source) {
        return (builder) => {
          if (source.type === "internal") {
            builder.storeBit(0);
            builder.storeBit(source.ihrDisabled);
            builder.storeBit(source.bounce);
            builder.storeBit(source.bounced);
            builder.storeAddress(source.src);
            builder.storeAddress(source.dest);
            builder.store((0, CurrencyCollection_1.storeCurrencyCollection)(source.value));
            builder.storeCoins(source.ihrFee);
            builder.storeCoins(source.forwardFee);
            builder.storeUint(source.createdLt, 64);
            builder.storeUint(source.createdAt, 32);
          } else if (source.type === "external-in") {
            builder.storeBit(1);
            builder.storeBit(0);
            builder.storeAddress(source.src);
            builder.storeAddress(source.dest);
            builder.storeCoins(source.importFee);
          } else if (source.type === "external-out") {
            builder.storeBit(1);
            builder.storeBit(1);
            builder.storeAddress(source.src);
            builder.storeAddress(source.dest);
            builder.storeUint(source.createdLt, 64);
            builder.storeUint(source.createdAt, 32);
          } else {
            throw new Error("Unknown CommonMessageInfo type");
          }
        };
      }
      exports.storeCommonMessageInfo = storeCommonMessageInfo;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ComputeSkipReason.js
  var require_ComputeSkipReason = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ComputeSkipReason.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeComputeSkipReason = exports.loadComputeSkipReason = void 0;
      function loadComputeSkipReason(slice4) {
        let reason = slice4.loadUint(2);
        if (reason === 0) {
          return "no-state";
        } else if (reason === 1) {
          return "bad-state";
        } else if (reason === 2) {
          return "no-gas";
        }
        throw new Error(`Unknown ComputeSkipReason: ${reason}`);
      }
      exports.loadComputeSkipReason = loadComputeSkipReason;
      function storeComputeSkipReason(src2) {
        return (builder) => {
          if (src2 === "no-state") {
            builder.storeUint(0, 2);
          } else if (src2 === "bad-state") {
            builder.storeUint(1, 2);
          } else if (src2 === "no-gas") {
            builder.storeUint(2, 2);
          } else {
            throw new Error(`Unknown ComputeSkipReason: ${src2}`);
          }
        };
      }
      exports.storeComputeSkipReason = storeComputeSkipReason;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/DepthBalanceInfo.js
  var require_DepthBalanceInfo = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/DepthBalanceInfo.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeDepthBalanceInfo = exports.loadDepthBalanceInfo = void 0;
      var CurrencyCollection_1 = require_CurrencyCollection();
      function loadDepthBalanceInfo(slice4) {
        let splitDepth = slice4.loadUint(5);
        return {
          splitDepth,
          balance: (0, CurrencyCollection_1.loadCurrencyCollection)(slice4)
        };
      }
      exports.loadDepthBalanceInfo = loadDepthBalanceInfo;
      function storeDepthBalanceInfo(src2) {
        return (builder) => {
          builder.storeUint(src2.splitDepth, 5);
          builder.store((0, CurrencyCollection_1.storeCurrencyCollection)(src2.balance));
        };
      }
      exports.storeDepthBalanceInfo = storeDepthBalanceInfo;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/HashUpdate.js
  var require_HashUpdate = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/HashUpdate.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeHashUpdate = exports.loadHashUpdate = void 0;
      function loadHashUpdate(slice4) {
        if (slice4.loadUint(8) !== 114) {
          throw Error("Invalid data");
        }
        const oldHash = slice4.loadBuffer(32);
        const newHash = slice4.loadBuffer(32);
        return { oldHash, newHash };
      }
      exports.loadHashUpdate = loadHashUpdate;
      function storeHashUpdate(src2) {
        return (builder) => {
          builder.storeUint(114, 8);
          builder.storeBuffer(src2.oldHash);
          builder.storeBuffer(src2.newHash);
        };
      }
      exports.storeHashUpdate = storeHashUpdate;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/MasterchainStateExtra.js
  var require_MasterchainStateExtra = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/MasterchainStateExtra.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.loadMasterchainStateExtra = void 0;
      var Dictionary_1 = require_Dictionary();
      var CurrencyCollection_1 = require_CurrencyCollection();
      function loadMasterchainStateExtra(cs) {
        if (cs.loadUint(16) !== 52262) {
          throw Error("Invalid data");
        }
        if (cs.loadBit()) {
          cs.loadRef();
        }
        let configAddress = cs.loadUintBig(256);
        let config2 = Dictionary_1.Dictionary.load(Dictionary_1.Dictionary.Keys.Int(32), Dictionary_1.Dictionary.Values.Cell(), cs);
        const globalBalance = (0, CurrencyCollection_1.loadCurrencyCollection)(cs);
        return {
          config: config2,
          configAddress,
          globalBalance
        };
      }
      exports.loadMasterchainStateExtra = loadMasterchainStateExtra;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/Message.js
  var require_Message = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/Message.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.MessageValue = exports.storeMessage = exports.loadMessage = void 0;
      var Builder_1 = require_Builder();
      var CommonMessageInfo_1 = require_CommonMessageInfo();
      var StateInit_1 = require_StateInit();
      function loadMessage(slice4) {
        const info = (0, CommonMessageInfo_1.loadCommonMessageInfo)(slice4);
        let init2 = null;
        if (slice4.loadBit()) {
          if (!slice4.loadBit()) {
            init2 = (0, StateInit_1.loadStateInit)(slice4);
          } else {
            init2 = (0, StateInit_1.loadStateInit)(slice4.loadRef().beginParse());
          }
        }
        const body = slice4.loadBit() ? slice4.loadRef() : slice4.asCell();
        return {
          info,
          init: init2,
          body
        };
      }
      exports.loadMessage = loadMessage;
      function storeMessage(message, opts) {
        return (builder) => {
          builder.store((0, CommonMessageInfo_1.storeCommonMessageInfo)(message.info));
          if (message.init) {
            builder.storeBit(true);
            let initCell = (0, Builder_1.beginCell)().store((0, StateInit_1.storeStateInit)(message.init));
            let needRef2 = false;
            if (opts && opts.forceRef) {
              needRef2 = true;
            } else {
              needRef2 = builder.availableBits - 2 < initCell.bits + message.body.bits.length;
            }
            if (needRef2) {
              builder.storeBit(true);
              builder.storeRef(initCell);
            } else {
              builder.storeBit(false);
              builder.storeBuilder(initCell);
            }
          } else {
            builder.storeBit(false);
          }
          let needRef = false;
          if (opts && opts.forceRef) {
            needRef = true;
          } else {
            needRef = builder.availableBits - 1 < message.body.bits.length || builder.refs + message.body.refs.length > 4;
          }
          if (needRef) {
            builder.storeBit(true);
            builder.storeRef(message.body);
          } else {
            builder.storeBit(false);
            builder.storeBuilder(message.body.asBuilder());
          }
        };
      }
      exports.storeMessage = storeMessage;
      exports.MessageValue = {
        serialize(src2, builder) {
          builder.storeRef((0, Builder_1.beginCell)().store(storeMessage(src2)));
        },
        parse(slice4) {
          return loadMessage(slice4.loadRef().beginParse());
        }
      };
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/SendMode.js
  var require_SendMode = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/SendMode.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.SendMode = void 0;
      var SendMode2;
      (function(SendMode3) {
        SendMode3[SendMode3["CARRY_ALL_REMAINING_BALANCE"] = 128] = "CARRY_ALL_REMAINING_BALANCE";
        SendMode3[SendMode3["CARRY_ALL_REMAINING_INCOMING_VALUE"] = 64] = "CARRY_ALL_REMAINING_INCOMING_VALUE";
        SendMode3[SendMode3["DESTROY_ACCOUNT_IF_ZERO"] = 32] = "DESTROY_ACCOUNT_IF_ZERO";
        SendMode3[SendMode3["PAY_GAS_SEPARATELY"] = 1] = "PAY_GAS_SEPARATELY";
        SendMode3[SendMode3["IGNORE_ERRORS"] = 2] = "IGNORE_ERRORS";
        SendMode3[SendMode3["NONE"] = 0] = "NONE";
      })(SendMode2 || (exports.SendMode = SendMode2 = {}));
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ReserveMode.js
  var require_ReserveMode = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ReserveMode.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.ReserveMode = void 0;
      var ReserveMode;
      (function(ReserveMode2) {
        ReserveMode2[ReserveMode2["THIS_AMOUNT"] = 0] = "THIS_AMOUNT";
        ReserveMode2[ReserveMode2["LEAVE_THIS_AMOUNT"] = 1] = "LEAVE_THIS_AMOUNT";
        ReserveMode2[ReserveMode2["AT_MOST_THIS_AMOUNT"] = 2] = "AT_MOST_THIS_AMOUNT";
        ReserveMode2[ReserveMode2["LEAVE_MAX_THIS_AMOUNT"] = 3] = "LEAVE_MAX_THIS_AMOUNT";
        ReserveMode2[ReserveMode2["BEFORE_BALANCE_PLUS_THIS_AMOUNT"] = 4] = "BEFORE_BALANCE_PLUS_THIS_AMOUNT";
        ReserveMode2[ReserveMode2["LEAVE_BBALANCE_PLUS_THIS_AMOUNT"] = 5] = "LEAVE_BBALANCE_PLUS_THIS_AMOUNT";
        ReserveMode2[ReserveMode2["BEFORE_BALANCE_MINUS_THIS_AMOUNT"] = 12] = "BEFORE_BALANCE_MINUS_THIS_AMOUNT";
        ReserveMode2[ReserveMode2["LEAVE_BEFORE_BALANCE_MINUS_THIS_AMOUNT"] = 13] = "LEAVE_BEFORE_BALANCE_MINUS_THIS_AMOUNT";
      })(ReserveMode || (exports.ReserveMode = ReserveMode = {}));
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ShardAccount.js
  var require_ShardAccount = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ShardAccount.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeShardAccount = exports.loadShardAccount = void 0;
      var Builder_1 = require_Builder();
      var Account_1 = require_Account();
      function loadShardAccount(slice4) {
        let accountRef = slice4.loadRef();
        let account = void 0;
        if (!accountRef.isExotic) {
          let accountSlice = accountRef.beginParse();
          if (accountSlice.loadBit()) {
            account = (0, Account_1.loadAccount)(accountSlice);
          }
        }
        return {
          account,
          lastTransactionHash: slice4.loadUintBig(256),
          lastTransactionLt: slice4.loadUintBig(64)
        };
      }
      exports.loadShardAccount = loadShardAccount;
      function storeShardAccount(src2) {
        return (builder) => {
          if (src2.account) {
            builder.storeRef((0, Builder_1.beginCell)().storeBit(true).store((0, Account_1.storeAccount)(src2.account)));
          } else {
            builder.storeRef((0, Builder_1.beginCell)().storeBit(false));
          }
          builder.storeUint(src2.lastTransactionHash, 256);
          builder.storeUint(src2.lastTransactionLt, 64);
        };
      }
      exports.storeShardAccount = storeShardAccount;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ShardAccounts.js
  var require_ShardAccounts = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ShardAccounts.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeShardAccounts = exports.loadShardAccounts = exports.ShardAccountRefValue = void 0;
      var Dictionary_1 = require_Dictionary();
      var DepthBalanceInfo_1 = require_DepthBalanceInfo();
      var ShardAccount_1 = require_ShardAccount();
      exports.ShardAccountRefValue = {
        parse: (cs) => {
          let depthBalanceInfo = (0, DepthBalanceInfo_1.loadDepthBalanceInfo)(cs);
          let shardAccount = (0, ShardAccount_1.loadShardAccount)(cs);
          return {
            depthBalanceInfo,
            shardAccount
          };
        },
        serialize(src2, builder) {
          builder.store((0, DepthBalanceInfo_1.storeDepthBalanceInfo)(src2.depthBalanceInfo));
          builder.store((0, ShardAccount_1.storeShardAccount)(src2.shardAccount));
        }
      };
      function loadShardAccounts(cs) {
        return Dictionary_1.Dictionary.load(Dictionary_1.Dictionary.Keys.BigUint(256), exports.ShardAccountRefValue, cs);
      }
      exports.loadShardAccounts = loadShardAccounts;
      function storeShardAccounts(src2) {
        return (Builder) => {
          Builder.storeDict(src2);
        };
      }
      exports.storeShardAccounts = storeShardAccounts;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ShardIdent.js
  var require_ShardIdent = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ShardIdent.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeShardIdent = exports.loadShardIdent = void 0;
      function loadShardIdent(slice4) {
        if (slice4.loadUint(2) !== 0) {
          throw Error("Invalid data");
        }
        return {
          shardPrefixBits: slice4.loadUint(6),
          workchainId: slice4.loadInt(32),
          shardPrefix: slice4.loadUintBig(64)
        };
      }
      exports.loadShardIdent = loadShardIdent;
      function storeShardIdent(src2) {
        return (builder) => {
          builder.storeUint(0, 2);
          builder.storeUint(src2.shardPrefixBits, 6);
          builder.storeInt(src2.workchainId, 32);
          builder.storeUint(src2.shardPrefix, 64);
        };
      }
      exports.storeShardIdent = storeShardIdent;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ShardStateUnsplit.js
  var require_ShardStateUnsplit = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/ShardStateUnsplit.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.loadShardStateUnsplit = void 0;
      var MasterchainStateExtra_1 = require_MasterchainStateExtra();
      var ShardAccounts_1 = require_ShardAccounts();
      var ShardIdent_1 = require_ShardIdent();
      function loadShardStateUnsplit(cs) {
        if (cs.loadUint(32) !== 2418257890) {
          throw Error("Invalid data");
        }
        let globalId = cs.loadInt(32);
        let shardId = (0, ShardIdent_1.loadShardIdent)(cs);
        let seqno = cs.loadUint(32);
        let vertSeqNo = cs.loadUint(32);
        let genUtime = cs.loadUint(32);
        let genLt = cs.loadUintBig(64);
        let minRefMcSeqno = cs.loadUint(32);
        cs.loadRef();
        let beforeSplit = cs.loadBit();
        let shardAccountsRef = cs.loadRef();
        let accounts = void 0;
        if (!shardAccountsRef.isExotic) {
          accounts = (0, ShardAccounts_1.loadShardAccounts)(shardAccountsRef.beginParse());
        }
        cs.loadRef();
        let mcStateExtra = cs.loadBit();
        let extras = null;
        if (mcStateExtra) {
          let cell = cs.loadRef();
          if (!cell.isExotic) {
            extras = (0, MasterchainStateExtra_1.loadMasterchainStateExtra)(cell.beginParse());
          }
        }
        return {
          globalId,
          shardId,
          seqno,
          vertSeqNo,
          genUtime,
          genLt,
          minRefMcSeqno,
          beforeSplit,
          accounts,
          extras
        };
      }
      exports.loadShardStateUnsplit = loadShardStateUnsplit;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/SignatureDomain.js
  var require_SignatureDomain = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/SignatureDomain.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.signatureDomainEmptyTag = exports.signatureDomainL2Tag = void 0;
      exports.signatureDomainL2Tag = 1907576545;
      exports.signatureDomainEmptyTag = 236803867;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/SplitMergeInfo.js
  var require_SplitMergeInfo = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/SplitMergeInfo.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeSplitMergeInfo = exports.loadSplitMergeInfo = void 0;
      function loadSplitMergeInfo(slice4) {
        let currentShardPrefixLength = slice4.loadUint(6);
        let accountSplitDepth = slice4.loadUint(6);
        let thisAddress = slice4.loadUintBig(256);
        let siblingAddress = slice4.loadUintBig(256);
        return {
          currentShardPrefixLength,
          accountSplitDepth,
          thisAddress,
          siblingAddress
        };
      }
      exports.loadSplitMergeInfo = loadSplitMergeInfo;
      function storeSplitMergeInfo(src2) {
        return (builder) => {
          builder.storeUint(src2.currentShardPrefixLength, 6);
          builder.storeUint(src2.accountSplitDepth, 6);
          builder.storeUint(src2.thisAddress, 256);
          builder.storeUint(src2.siblingAddress, 256);
        };
      }
      exports.storeSplitMergeInfo = storeSplitMergeInfo;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TransactionActionPhase.js
  var require_TransactionActionPhase = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TransactionActionPhase.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeTransactionActionPhase = exports.loadTransactionActionPhase = void 0;
      var AccountStatusChange_1 = require_AccountStatusChange();
      var StorageUsed_1 = require_StorageUsed();
      function loadTransactionActionPhase(slice4) {
        let success2 = slice4.loadBit();
        let valid = slice4.loadBit();
        let noFunds = slice4.loadBit();
        let statusChange = (0, AccountStatusChange_1.loadAccountStatusChange)(slice4);
        let totalFwdFees = slice4.loadBit() ? slice4.loadCoins() : void 0;
        let totalActionFees = slice4.loadBit() ? slice4.loadCoins() : void 0;
        let resultCode = slice4.loadInt(32);
        let resultArg = slice4.loadBit() ? slice4.loadInt(32) : void 0;
        let totalActions = slice4.loadUint(16);
        let specActions = slice4.loadUint(16);
        let skippedActions = slice4.loadUint(16);
        let messagesCreated = slice4.loadUint(16);
        let actionListHash = slice4.loadUintBig(256);
        let totalMessageSize = (0, StorageUsed_1.loadStorageUsed)(slice4);
        return {
          success: success2,
          valid,
          noFunds,
          statusChange,
          totalFwdFees,
          totalActionFees,
          resultCode,
          resultArg,
          totalActions,
          specActions,
          skippedActions,
          messagesCreated,
          actionListHash,
          totalMessageSize
        };
      }
      exports.loadTransactionActionPhase = loadTransactionActionPhase;
      function storeTransactionActionPhase(src2) {
        return (builder) => {
          builder.storeBit(src2.success);
          builder.storeBit(src2.valid);
          builder.storeBit(src2.noFunds);
          builder.store((0, AccountStatusChange_1.storeAccountStatusChange)(src2.statusChange));
          builder.storeMaybeCoins(src2.totalFwdFees);
          builder.storeMaybeCoins(src2.totalActionFees);
          builder.storeInt(src2.resultCode, 32);
          builder.storeMaybeInt(src2.resultArg, 32);
          builder.storeUint(src2.totalActions, 16);
          builder.storeUint(src2.specActions, 16);
          builder.storeUint(src2.skippedActions, 16);
          builder.storeUint(src2.messagesCreated, 16);
          builder.storeUint(src2.actionListHash, 256);
          builder.store((0, StorageUsed_1.storeStorageUsed)(src2.totalMessageSize));
        };
      }
      exports.storeTransactionActionPhase = storeTransactionActionPhase;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TransactionBouncePhase.js
  var require_TransactionBouncePhase = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TransactionBouncePhase.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeTransactionBouncePhase = exports.loadTransactionBouncePhase = void 0;
      var StorageUsed_1 = require_StorageUsed();
      function loadTransactionBouncePhase(slice4) {
        if (slice4.loadBit()) {
          let messageSize = (0, StorageUsed_1.loadStorageUsed)(slice4);
          let messageFees = slice4.loadCoins();
          let forwardFees = slice4.loadCoins();
          return {
            type: "ok",
            messageSize,
            messageFees,
            forwardFees
          };
        }
        if (slice4.loadBit()) {
          let messageSize = (0, StorageUsed_1.loadStorageUsed)(slice4);
          let requiredForwardFees = slice4.loadCoins();
          return {
            type: "no-funds",
            messageSize,
            requiredForwardFees
          };
        }
        return {
          type: "negative-funds"
        };
      }
      exports.loadTransactionBouncePhase = loadTransactionBouncePhase;
      function storeTransactionBouncePhase(src2) {
        return (builder) => {
          if (src2.type === "ok") {
            builder.storeBit(true);
            builder.store((0, StorageUsed_1.storeStorageUsed)(src2.messageSize));
            builder.storeCoins(src2.messageFees);
            builder.storeCoins(src2.forwardFees);
          } else if (src2.type === "negative-funds") {
            builder.storeBit(false);
            builder.storeBit(false);
          } else if (src2.type === "no-funds") {
            builder.storeBit(false);
            builder.storeBit(true);
            builder.store((0, StorageUsed_1.storeStorageUsed)(src2.messageSize));
            builder.storeCoins(src2.requiredForwardFees);
          } else {
            throw new Error("Invalid TransactionBouncePhase type");
          }
        };
      }
      exports.storeTransactionBouncePhase = storeTransactionBouncePhase;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TransactionComputePhase.js
  var require_TransactionComputePhase = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TransactionComputePhase.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeTransactionComputePhase = exports.loadTransactionComputePhase = void 0;
      var Builder_1 = require_Builder();
      var ComputeSkipReason_1 = require_ComputeSkipReason();
      function loadTransactionComputePhase(slice4) {
        if (!slice4.loadBit()) {
          let reason = (0, ComputeSkipReason_1.loadComputeSkipReason)(slice4);
          return {
            type: "skipped",
            reason
          };
        }
        let success2 = slice4.loadBit();
        let messageStateUsed = slice4.loadBit();
        let accountActivated = slice4.loadBit();
        let gasFees = slice4.loadCoins();
        const vmState = slice4.loadRef().beginParse();
        let gasUsed = vmState.loadVarUintBig(3);
        let gasLimit = vmState.loadVarUintBig(3);
        let gasCredit = vmState.loadBit() ? vmState.loadVarUintBig(2) : void 0;
        let mode = vmState.loadUint(8);
        let exitCode = vmState.loadInt(32);
        let exitArg = vmState.loadBit() ? vmState.loadInt(32) : void 0;
        let vmSteps = vmState.loadUint(32);
        let vmInitStateHash = vmState.loadUintBig(256);
        let vmFinalStateHash = vmState.loadUintBig(256);
        return {
          type: "vm",
          success: success2,
          messageStateUsed,
          accountActivated,
          gasFees,
          gasUsed,
          gasLimit,
          gasCredit,
          mode,
          exitCode,
          exitArg,
          vmSteps,
          vmInitStateHash,
          vmFinalStateHash
        };
      }
      exports.loadTransactionComputePhase = loadTransactionComputePhase;
      function storeTransactionComputePhase(src2) {
        return (builder) => {
          if (src2.type === "skipped") {
            builder.storeBit(0);
            builder.store((0, ComputeSkipReason_1.storeComputeSkipReason)(src2.reason));
            return;
          }
          builder.storeBit(1);
          builder.storeBit(src2.success);
          builder.storeBit(src2.messageStateUsed);
          builder.storeBit(src2.accountActivated);
          builder.storeCoins(src2.gasFees);
          builder.storeRef((0, Builder_1.beginCell)().storeVarUint(src2.gasUsed, 3).storeVarUint(src2.gasLimit, 3).store((b9) => src2.gasCredit !== void 0 && src2.gasCredit !== null ? b9.storeBit(1).storeVarUint(src2.gasCredit, 2) : b9.storeBit(0)).storeUint(src2.mode, 8).storeInt(src2.exitCode, 32).store((b9) => src2.exitArg !== void 0 && src2.exitArg !== null ? b9.storeBit(1).storeInt(src2.exitArg, 32) : b9.storeBit(0)).storeUint(src2.vmSteps, 32).storeUint(src2.vmInitStateHash, 256).storeUint(src2.vmFinalStateHash, 256).endCell());
        };
      }
      exports.storeTransactionComputePhase = storeTransactionComputePhase;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TransactionCreditPhase.js
  var require_TransactionCreditPhase = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TransactionCreditPhase.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeTransactionCreditPhase = exports.loadTransactionCreditPhase = void 0;
      var CurrencyCollection_1 = require_CurrencyCollection();
      function loadTransactionCreditPhase(slice4) {
        const dueFeesColelcted = slice4.loadBit() ? slice4.loadCoins() : void 0;
        const credit = (0, CurrencyCollection_1.loadCurrencyCollection)(slice4);
        return {
          dueFeesColelcted,
          credit
        };
      }
      exports.loadTransactionCreditPhase = loadTransactionCreditPhase;
      function storeTransactionCreditPhase(src2) {
        return (builder) => {
          if (src2.dueFeesColelcted === null || src2.dueFeesColelcted === void 0) {
            builder.storeBit(false);
          } else {
            builder.storeBit(true);
            builder.storeCoins(src2.dueFeesColelcted);
          }
          builder.store((0, CurrencyCollection_1.storeCurrencyCollection)(src2.credit));
        };
      }
      exports.storeTransactionCreditPhase = storeTransactionCreditPhase;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TransactionStoragePhase.js
  var require_TransactionStoragePhase = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TransactionStoragePhase.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeTransactionsStoragePhase = exports.loadTransactionStoragePhase = void 0;
      var AccountStatusChange_1 = require_AccountStatusChange();
      function loadTransactionStoragePhase(slice4) {
        const storageFeesCollected = slice4.loadCoins();
        let storageFeesDue = void 0;
        if (slice4.loadBit()) {
          storageFeesDue = slice4.loadCoins();
        }
        const statusChange = (0, AccountStatusChange_1.loadAccountStatusChange)(slice4);
        return {
          storageFeesCollected,
          storageFeesDue,
          statusChange
        };
      }
      exports.loadTransactionStoragePhase = loadTransactionStoragePhase;
      function storeTransactionsStoragePhase(src2) {
        return (builder) => {
          builder.storeCoins(src2.storageFeesCollected);
          if (src2.storageFeesDue === null || src2.storageFeesDue === void 0) {
            builder.storeBit(false);
          } else {
            builder.storeBit(true);
            builder.storeCoins(src2.storageFeesDue);
          }
          builder.store((0, AccountStatusChange_1.storeAccountStatusChange)(src2.statusChange));
        };
      }
      exports.storeTransactionsStoragePhase = storeTransactionsStoragePhase;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TransactionDescription.js
  var require_TransactionDescription = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/TransactionDescription.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeTransactionDescription = exports.loadTransactionDescription = void 0;
      var Builder_1 = require_Builder();
      var SplitMergeInfo_1 = require_SplitMergeInfo();
      var Transaction_1 = require_Transaction();
      var TransactionActionPhase_1 = require_TransactionActionPhase();
      var TransactionBouncePhase_1 = require_TransactionBouncePhase();
      var TransactionComputePhase_1 = require_TransactionComputePhase();
      var TransactionCreditPhase_1 = require_TransactionCreditPhase();
      var TransactionStoragePhase_1 = require_TransactionStoragePhase();
      function loadTransactionDescription(slice4) {
        let type2 = slice4.loadUint(4);
        if (type2 === 0) {
          const creditFirst = slice4.loadBit();
          let storagePhase = void 0;
          if (slice4.loadBit()) {
            storagePhase = (0, TransactionStoragePhase_1.loadTransactionStoragePhase)(slice4);
          }
          let creditPhase = void 0;
          if (slice4.loadBit()) {
            creditPhase = (0, TransactionCreditPhase_1.loadTransactionCreditPhase)(slice4);
          }
          let computePhase = (0, TransactionComputePhase_1.loadTransactionComputePhase)(slice4);
          let actionPhase = void 0;
          if (slice4.loadBit()) {
            actionPhase = (0, TransactionActionPhase_1.loadTransactionActionPhase)(slice4.loadRef().beginParse());
          }
          let aborted2 = slice4.loadBit();
          let bouncePhase = void 0;
          if (slice4.loadBit()) {
            bouncePhase = (0, TransactionBouncePhase_1.loadTransactionBouncePhase)(slice4);
          }
          const destroyed = slice4.loadBit();
          return {
            type: "generic",
            creditFirst,
            storagePhase,
            creditPhase,
            computePhase,
            actionPhase,
            bouncePhase,
            aborted: aborted2,
            destroyed
          };
        }
        if (type2 === 1) {
          return {
            type: "storage",
            storagePhase: (0, TransactionStoragePhase_1.loadTransactionStoragePhase)(slice4)
          };
        }
        if (type2 === 2 || type2 === 3) {
          const isTock = type2 === 3;
          let storagePhase = (0, TransactionStoragePhase_1.loadTransactionStoragePhase)(slice4);
          let computePhase = (0, TransactionComputePhase_1.loadTransactionComputePhase)(slice4);
          let actionPhase = void 0;
          if (slice4.loadBit()) {
            actionPhase = (0, TransactionActionPhase_1.loadTransactionActionPhase)(slice4.loadRef().beginParse());
          }
          const aborted2 = slice4.loadBit();
          const destroyed = slice4.loadBit();
          return {
            type: "tick-tock",
            isTock,
            storagePhase,
            computePhase,
            actionPhase,
            aborted: aborted2,
            destroyed
          };
        }
        if (type2 === 4) {
          let splitInfo = (0, SplitMergeInfo_1.loadSplitMergeInfo)(slice4);
          let storagePhase = void 0;
          if (slice4.loadBit()) {
            storagePhase = (0, TransactionStoragePhase_1.loadTransactionStoragePhase)(slice4);
          }
          let computePhase = (0, TransactionComputePhase_1.loadTransactionComputePhase)(slice4);
          let actionPhase = void 0;
          if (slice4.loadBit()) {
            actionPhase = (0, TransactionActionPhase_1.loadTransactionActionPhase)(slice4.loadRef().beginParse());
          }
          const aborted2 = slice4.loadBit();
          const destroyed = slice4.loadBit();
          return {
            type: "split-prepare",
            splitInfo,
            storagePhase,
            computePhase,
            actionPhase,
            aborted: aborted2,
            destroyed
          };
        }
        if (type2 === 5) {
          let splitInfo = (0, SplitMergeInfo_1.loadSplitMergeInfo)(slice4);
          let prepareTransaction = (0, Transaction_1.loadTransaction)(slice4.loadRef().beginParse());
          const installed = slice4.loadBit();
          return {
            type: "split-install",
            splitInfo,
            prepareTransaction,
            installed
          };
        }
        throw Error(`Unsupported transaction description type ${type2}`);
      }
      exports.loadTransactionDescription = loadTransactionDescription;
      function storeTransactionDescription(src2) {
        return (builder) => {
          if (src2.type === "generic") {
            builder.storeUint(0, 4);
            builder.storeBit(src2.creditFirst);
            if (src2.storagePhase) {
              builder.storeBit(true);
              builder.store((0, TransactionStoragePhase_1.storeTransactionsStoragePhase)(src2.storagePhase));
            } else {
              builder.storeBit(false);
            }
            if (src2.creditPhase) {
              builder.storeBit(true);
              builder.store((0, TransactionCreditPhase_1.storeTransactionCreditPhase)(src2.creditPhase));
            } else {
              builder.storeBit(false);
            }
            builder.store((0, TransactionComputePhase_1.storeTransactionComputePhase)(src2.computePhase));
            if (src2.actionPhase) {
              builder.storeBit(true);
              builder.storeRef((0, Builder_1.beginCell)().store((0, TransactionActionPhase_1.storeTransactionActionPhase)(src2.actionPhase)));
            } else {
              builder.storeBit(false);
            }
            builder.storeBit(src2.aborted);
            if (src2.bouncePhase) {
              builder.storeBit(true);
              builder.store((0, TransactionBouncePhase_1.storeTransactionBouncePhase)(src2.bouncePhase));
            } else {
              builder.storeBit(false);
            }
            builder.storeBit(src2.destroyed);
          } else if (src2.type === "storage") {
            builder.storeUint(1, 4);
            builder.store((0, TransactionStoragePhase_1.storeTransactionsStoragePhase)(src2.storagePhase));
          } else if (src2.type === "tick-tock") {
            builder.storeUint(src2.isTock ? 3 : 2, 4);
            builder.store((0, TransactionStoragePhase_1.storeTransactionsStoragePhase)(src2.storagePhase));
            builder.store((0, TransactionComputePhase_1.storeTransactionComputePhase)(src2.computePhase));
            if (src2.actionPhase) {
              builder.storeBit(true);
              builder.storeRef((0, Builder_1.beginCell)().store((0, TransactionActionPhase_1.storeTransactionActionPhase)(src2.actionPhase)));
            } else {
              builder.storeBit(false);
            }
            builder.storeBit(src2.aborted);
            builder.storeBit(src2.destroyed);
          } else if (src2.type === "split-prepare") {
            builder.storeUint(4, 4);
            builder.store((0, SplitMergeInfo_1.storeSplitMergeInfo)(src2.splitInfo));
            if (src2.storagePhase) {
              builder.storeBit(true);
              builder.store((0, TransactionStoragePhase_1.storeTransactionsStoragePhase)(src2.storagePhase));
            } else {
              builder.storeBit(false);
            }
            builder.store((0, TransactionComputePhase_1.storeTransactionComputePhase)(src2.computePhase));
            if (src2.actionPhase) {
              builder.storeBit(true);
              builder.store((0, TransactionActionPhase_1.storeTransactionActionPhase)(src2.actionPhase));
            } else {
              builder.storeBit(false);
            }
            builder.storeBit(src2.aborted);
            builder.storeBit(src2.destroyed);
          } else if (src2.type === "split-install") {
            builder.storeUint(5, 4);
            builder.store((0, SplitMergeInfo_1.storeSplitMergeInfo)(src2.splitInfo));
            builder.storeRef((0, Builder_1.beginCell)().store((0, Transaction_1.storeTransaction)(src2.prepareTransaction)));
            builder.storeBit(src2.installed);
          } else {
            throw Error(`Unsupported transaction description type ${src2.type}`);
          }
        };
      }
      exports.storeTransactionDescription = storeTransactionDescription;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/Transaction.js
  var require_Transaction = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/Transaction.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeTransaction = exports.loadTransaction = void 0;
      var Builder_1 = require_Builder();
      var Dictionary_1 = require_Dictionary();
      var AccountStatus_1 = require_AccountStatus();
      var CurrencyCollection_1 = require_CurrencyCollection();
      var HashUpdate_1 = require_HashUpdate();
      var Message_1 = require_Message();
      var TransactionDescription_1 = require_TransactionDescription();
      function loadTransaction(slice4) {
        let raw = slice4.asCell();
        if (slice4.loadUint(4) !== 7) {
          throw Error("Invalid data");
        }
        let address = slice4.loadUintBig(256);
        let lt6 = slice4.loadUintBig(64);
        let prevTransactionHash = slice4.loadUintBig(256);
        let prevTransactionLt = slice4.loadUintBig(64);
        let now = slice4.loadUint(32);
        let outMessagesCount = slice4.loadUint(15);
        let oldStatus = (0, AccountStatus_1.loadAccountStatus)(slice4);
        let endStatus = (0, AccountStatus_1.loadAccountStatus)(slice4);
        let msgRef = slice4.loadRef();
        let msgSlice = msgRef.beginParse();
        let inMessage = msgSlice.loadBit() ? (0, Message_1.loadMessage)(msgSlice.loadRef().beginParse()) : void 0;
        let outMessages = msgSlice.loadDict(Dictionary_1.Dictionary.Keys.Uint(15), Message_1.MessageValue);
        msgSlice.endParse();
        let totalFees = (0, CurrencyCollection_1.loadCurrencyCollection)(slice4);
        let stateUpdate = (0, HashUpdate_1.loadHashUpdate)(slice4.loadRef().beginParse());
        let description = (0, TransactionDescription_1.loadTransactionDescription)(slice4.loadRef().beginParse());
        return {
          address,
          lt: lt6,
          prevTransactionHash,
          prevTransactionLt,
          now,
          outMessagesCount,
          oldStatus,
          endStatus,
          inMessage,
          outMessages,
          totalFees,
          stateUpdate,
          description,
          raw,
          hash: () => raw.hash()
        };
      }
      exports.loadTransaction = loadTransaction;
      function storeTransaction(src2) {
        return (builder) => {
          builder.storeUint(7, 4);
          builder.storeUint(src2.address, 256);
          builder.storeUint(src2.lt, 64);
          builder.storeUint(src2.prevTransactionHash, 256);
          builder.storeUint(src2.prevTransactionLt, 64);
          builder.storeUint(src2.now, 32);
          builder.storeUint(src2.outMessagesCount, 15);
          builder.store((0, AccountStatus_1.storeAccountStatus)(src2.oldStatus));
          builder.store((0, AccountStatus_1.storeAccountStatus)(src2.endStatus));
          let msgBuilder = (0, Builder_1.beginCell)();
          if (src2.inMessage) {
            msgBuilder.storeBit(true);
            msgBuilder.storeRef((0, Builder_1.beginCell)().store((0, Message_1.storeMessage)(src2.inMessage)));
          } else {
            msgBuilder.storeBit(false);
          }
          msgBuilder.storeDict(src2.outMessages);
          builder.storeRef(msgBuilder);
          builder.store((0, CurrencyCollection_1.storeCurrencyCollection)(src2.totalFees));
          builder.storeRef((0, Builder_1.beginCell)().store((0, HashUpdate_1.storeHashUpdate)(src2.stateUpdate)));
          builder.storeRef((0, Builder_1.beginCell)().store((0, TransactionDescription_1.storeTransactionDescription)(src2.description)));
        };
      }
      exports.storeTransaction = storeTransaction;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/_export.js
  var require_export = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/types/_export.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.signatureDomainEmptyTag = exports.loadShardStateUnsplit = exports.storeShardIdent = exports.loadShardIdent = exports.storeShardAccounts = exports.loadShardAccounts = exports.ShardAccountRefValue = exports.storeShardAccount = exports.loadShardAccount = exports.ReserveMode = exports.SendMode = exports.storeMessageRelaxed = exports.loadMessageRelaxed = exports.storeMessage = exports.loadMessage = exports.loadMasterchainStateExtra = exports.storeHashUpdate = exports.loadHashUpdate = exports.storeExtraCurrency = exports.loadMaybeExtraCurrency = exports.loadExtraCurrency = exports.packExtraCurrencyDict = exports.packExtraCurrencyCell = exports.storeDepthBalanceInfo = exports.loadDepthBalanceInfo = exports.storeCurrencyCollection = exports.loadCurrencyCollection = exports.storeComputeSkipReason = exports.loadComputeSkipReason = exports.storeCommonMessageInfoRelaxed = exports.loadCommonMessageInfoRelaxed = exports.storeCommonMessageInfo = exports.loadCommonMessageInfo = exports.storeOutList = exports.loadOutList = exports.storeOutAction = exports.loadOutAction = exports.storeAccountStorage = exports.loadAccountStorage = exports.storeAccountStatusChange = exports.loadAccountStatusChange = exports.storeAccountStatus = exports.loadAccountStatus = exports.storeAccountState = exports.loadAccountState = exports.storeAccount = exports.loadAccount = exports.comment = exports.external = exports.internal = void 0;
      exports.storeTransactionsStoragePhase = exports.loadTransactionStoragePhase = exports.storeTransactionDescription = exports.loadTransactionDescription = exports.storeTransactionCreditPhase = exports.loadTransactionCreditPhase = exports.storeTransactionComputePhase = exports.loadTransactionComputePhase = exports.storeTransactionBouncePhase = exports.loadTransactionBouncePhase = exports.storeTransactionActionPhase = exports.loadTransactionActionPhase = exports.storeTransaction = exports.loadTransaction = exports.storeTickTock = exports.loadTickTock = exports.storeStorageUsed = exports.loadStorageUsed = exports.storeStorageInfo = exports.loadStorageInfo = exports.storeStateInit = exports.loadStateInit = exports.storeSplitMergeInfo = exports.loadSplitMergeInfo = exports.storeLibRef = exports.loadLibRef = exports.storeSimpleLibrary = exports.loadSimpleLibrary = exports.signatureDomainL2Tag = void 0;
      var _helpers_1 = require_helpers();
      Object.defineProperty(exports, "internal", { enumerable: true, get: function() {
        return _helpers_1.internal;
      } });
      Object.defineProperty(exports, "external", { enumerable: true, get: function() {
        return _helpers_1.external;
      } });
      Object.defineProperty(exports, "comment", { enumerable: true, get: function() {
        return _helpers_1.comment;
      } });
      var Account_1 = require_Account();
      Object.defineProperty(exports, "loadAccount", { enumerable: true, get: function() {
        return Account_1.loadAccount;
      } });
      Object.defineProperty(exports, "storeAccount", { enumerable: true, get: function() {
        return Account_1.storeAccount;
      } });
      var AccountState_1 = require_AccountState();
      Object.defineProperty(exports, "loadAccountState", { enumerable: true, get: function() {
        return AccountState_1.loadAccountState;
      } });
      Object.defineProperty(exports, "storeAccountState", { enumerable: true, get: function() {
        return AccountState_1.storeAccountState;
      } });
      var AccountStatus_1 = require_AccountStatus();
      Object.defineProperty(exports, "loadAccountStatus", { enumerable: true, get: function() {
        return AccountStatus_1.loadAccountStatus;
      } });
      Object.defineProperty(exports, "storeAccountStatus", { enumerable: true, get: function() {
        return AccountStatus_1.storeAccountStatus;
      } });
      var AccountStatusChange_1 = require_AccountStatusChange();
      Object.defineProperty(exports, "loadAccountStatusChange", { enumerable: true, get: function() {
        return AccountStatusChange_1.loadAccountStatusChange;
      } });
      Object.defineProperty(exports, "storeAccountStatusChange", { enumerable: true, get: function() {
        return AccountStatusChange_1.storeAccountStatusChange;
      } });
      var AccountStorage_1 = require_AccountStorage();
      Object.defineProperty(exports, "loadAccountStorage", { enumerable: true, get: function() {
        return AccountStorage_1.loadAccountStorage;
      } });
      Object.defineProperty(exports, "storeAccountStorage", { enumerable: true, get: function() {
        return AccountStorage_1.storeAccountStorage;
      } });
      var OutList_1 = require_OutList();
      Object.defineProperty(exports, "loadOutAction", { enumerable: true, get: function() {
        return OutList_1.loadOutAction;
      } });
      Object.defineProperty(exports, "storeOutAction", { enumerable: true, get: function() {
        return OutList_1.storeOutAction;
      } });
      Object.defineProperty(exports, "loadOutList", { enumerable: true, get: function() {
        return OutList_1.loadOutList;
      } });
      Object.defineProperty(exports, "storeOutList", { enumerable: true, get: function() {
        return OutList_1.storeOutList;
      } });
      var CommonMessageInfo_1 = require_CommonMessageInfo();
      Object.defineProperty(exports, "loadCommonMessageInfo", { enumerable: true, get: function() {
        return CommonMessageInfo_1.loadCommonMessageInfo;
      } });
      Object.defineProperty(exports, "storeCommonMessageInfo", { enumerable: true, get: function() {
        return CommonMessageInfo_1.storeCommonMessageInfo;
      } });
      var CommonMessageInfoRelaxed_1 = require_CommonMessageInfoRelaxed();
      Object.defineProperty(exports, "loadCommonMessageInfoRelaxed", { enumerable: true, get: function() {
        return CommonMessageInfoRelaxed_1.loadCommonMessageInfoRelaxed;
      } });
      Object.defineProperty(exports, "storeCommonMessageInfoRelaxed", { enumerable: true, get: function() {
        return CommonMessageInfoRelaxed_1.storeCommonMessageInfoRelaxed;
      } });
      var ComputeSkipReason_1 = require_ComputeSkipReason();
      Object.defineProperty(exports, "loadComputeSkipReason", { enumerable: true, get: function() {
        return ComputeSkipReason_1.loadComputeSkipReason;
      } });
      Object.defineProperty(exports, "storeComputeSkipReason", { enumerable: true, get: function() {
        return ComputeSkipReason_1.storeComputeSkipReason;
      } });
      var CurrencyCollection_1 = require_CurrencyCollection();
      Object.defineProperty(exports, "loadCurrencyCollection", { enumerable: true, get: function() {
        return CurrencyCollection_1.loadCurrencyCollection;
      } });
      Object.defineProperty(exports, "storeCurrencyCollection", { enumerable: true, get: function() {
        return CurrencyCollection_1.storeCurrencyCollection;
      } });
      var DepthBalanceInfo_1 = require_DepthBalanceInfo();
      Object.defineProperty(exports, "loadDepthBalanceInfo", { enumerable: true, get: function() {
        return DepthBalanceInfo_1.loadDepthBalanceInfo;
      } });
      Object.defineProperty(exports, "storeDepthBalanceInfo", { enumerable: true, get: function() {
        return DepthBalanceInfo_1.storeDepthBalanceInfo;
      } });
      var ExtraCurrency_1 = require_ExtraCurrency();
      Object.defineProperty(exports, "packExtraCurrencyCell", { enumerable: true, get: function() {
        return ExtraCurrency_1.packExtraCurrencyCell;
      } });
      Object.defineProperty(exports, "packExtraCurrencyDict", { enumerable: true, get: function() {
        return ExtraCurrency_1.packExtraCurrencyDict;
      } });
      Object.defineProperty(exports, "loadExtraCurrency", { enumerable: true, get: function() {
        return ExtraCurrency_1.loadExtraCurrency;
      } });
      Object.defineProperty(exports, "loadMaybeExtraCurrency", { enumerable: true, get: function() {
        return ExtraCurrency_1.loadMaybeExtraCurrency;
      } });
      Object.defineProperty(exports, "storeExtraCurrency", { enumerable: true, get: function() {
        return ExtraCurrency_1.storeExtraCurrency;
      } });
      var HashUpdate_1 = require_HashUpdate();
      Object.defineProperty(exports, "loadHashUpdate", { enumerable: true, get: function() {
        return HashUpdate_1.loadHashUpdate;
      } });
      Object.defineProperty(exports, "storeHashUpdate", { enumerable: true, get: function() {
        return HashUpdate_1.storeHashUpdate;
      } });
      var MasterchainStateExtra_1 = require_MasterchainStateExtra();
      Object.defineProperty(exports, "loadMasterchainStateExtra", { enumerable: true, get: function() {
        return MasterchainStateExtra_1.loadMasterchainStateExtra;
      } });
      var Message_1 = require_Message();
      Object.defineProperty(exports, "loadMessage", { enumerable: true, get: function() {
        return Message_1.loadMessage;
      } });
      Object.defineProperty(exports, "storeMessage", { enumerable: true, get: function() {
        return Message_1.storeMessage;
      } });
      var MessageRelaxed_1 = require_MessageRelaxed();
      Object.defineProperty(exports, "loadMessageRelaxed", { enumerable: true, get: function() {
        return MessageRelaxed_1.loadMessageRelaxed;
      } });
      Object.defineProperty(exports, "storeMessageRelaxed", { enumerable: true, get: function() {
        return MessageRelaxed_1.storeMessageRelaxed;
      } });
      var SendMode_1 = require_SendMode();
      Object.defineProperty(exports, "SendMode", { enumerable: true, get: function() {
        return SendMode_1.SendMode;
      } });
      var ReserveMode_1 = require_ReserveMode();
      Object.defineProperty(exports, "ReserveMode", { enumerable: true, get: function() {
        return ReserveMode_1.ReserveMode;
      } });
      var ShardAccount_1 = require_ShardAccount();
      Object.defineProperty(exports, "loadShardAccount", { enumerable: true, get: function() {
        return ShardAccount_1.loadShardAccount;
      } });
      Object.defineProperty(exports, "storeShardAccount", { enumerable: true, get: function() {
        return ShardAccount_1.storeShardAccount;
      } });
      var ShardAccounts_1 = require_ShardAccounts();
      Object.defineProperty(exports, "ShardAccountRefValue", { enumerable: true, get: function() {
        return ShardAccounts_1.ShardAccountRefValue;
      } });
      Object.defineProperty(exports, "loadShardAccounts", { enumerable: true, get: function() {
        return ShardAccounts_1.loadShardAccounts;
      } });
      Object.defineProperty(exports, "storeShardAccounts", { enumerable: true, get: function() {
        return ShardAccounts_1.storeShardAccounts;
      } });
      var ShardIdent_1 = require_ShardIdent();
      Object.defineProperty(exports, "loadShardIdent", { enumerable: true, get: function() {
        return ShardIdent_1.loadShardIdent;
      } });
      Object.defineProperty(exports, "storeShardIdent", { enumerable: true, get: function() {
        return ShardIdent_1.storeShardIdent;
      } });
      var ShardStateUnsplit_1 = require_ShardStateUnsplit();
      Object.defineProperty(exports, "loadShardStateUnsplit", { enumerable: true, get: function() {
        return ShardStateUnsplit_1.loadShardStateUnsplit;
      } });
      var SignatureDomain_1 = require_SignatureDomain();
      Object.defineProperty(exports, "signatureDomainEmptyTag", { enumerable: true, get: function() {
        return SignatureDomain_1.signatureDomainEmptyTag;
      } });
      Object.defineProperty(exports, "signatureDomainL2Tag", { enumerable: true, get: function() {
        return SignatureDomain_1.signatureDomainL2Tag;
      } });
      var SimpleLibrary_1 = require_SimpleLibrary();
      Object.defineProperty(exports, "loadSimpleLibrary", { enumerable: true, get: function() {
        return SimpleLibrary_1.loadSimpleLibrary;
      } });
      Object.defineProperty(exports, "storeSimpleLibrary", { enumerable: true, get: function() {
        return SimpleLibrary_1.storeSimpleLibrary;
      } });
      var LibRef_1 = require_LibRef();
      Object.defineProperty(exports, "loadLibRef", { enumerable: true, get: function() {
        return LibRef_1.loadLibRef;
      } });
      Object.defineProperty(exports, "storeLibRef", { enumerable: true, get: function() {
        return LibRef_1.storeLibRef;
      } });
      var SplitMergeInfo_1 = require_SplitMergeInfo();
      Object.defineProperty(exports, "loadSplitMergeInfo", { enumerable: true, get: function() {
        return SplitMergeInfo_1.loadSplitMergeInfo;
      } });
      Object.defineProperty(exports, "storeSplitMergeInfo", { enumerable: true, get: function() {
        return SplitMergeInfo_1.storeSplitMergeInfo;
      } });
      var StateInit_1 = require_StateInit();
      Object.defineProperty(exports, "loadStateInit", { enumerable: true, get: function() {
        return StateInit_1.loadStateInit;
      } });
      Object.defineProperty(exports, "storeStateInit", { enumerable: true, get: function() {
        return StateInit_1.storeStateInit;
      } });
      var StorageInfo_1 = require_StorageInfo();
      Object.defineProperty(exports, "loadStorageInfo", { enumerable: true, get: function() {
        return StorageInfo_1.loadStorageInfo;
      } });
      Object.defineProperty(exports, "storeStorageInfo", { enumerable: true, get: function() {
        return StorageInfo_1.storeStorageInfo;
      } });
      var StorageUsed_1 = require_StorageUsed();
      Object.defineProperty(exports, "loadStorageUsed", { enumerable: true, get: function() {
        return StorageUsed_1.loadStorageUsed;
      } });
      Object.defineProperty(exports, "storeStorageUsed", { enumerable: true, get: function() {
        return StorageUsed_1.storeStorageUsed;
      } });
      var TickTock_1 = require_TickTock();
      Object.defineProperty(exports, "loadTickTock", { enumerable: true, get: function() {
        return TickTock_1.loadTickTock;
      } });
      Object.defineProperty(exports, "storeTickTock", { enumerable: true, get: function() {
        return TickTock_1.storeTickTock;
      } });
      var Transaction_1 = require_Transaction();
      Object.defineProperty(exports, "loadTransaction", { enumerable: true, get: function() {
        return Transaction_1.loadTransaction;
      } });
      Object.defineProperty(exports, "storeTransaction", { enumerable: true, get: function() {
        return Transaction_1.storeTransaction;
      } });
      var TransactionActionPhase_1 = require_TransactionActionPhase();
      Object.defineProperty(exports, "loadTransactionActionPhase", { enumerable: true, get: function() {
        return TransactionActionPhase_1.loadTransactionActionPhase;
      } });
      Object.defineProperty(exports, "storeTransactionActionPhase", { enumerable: true, get: function() {
        return TransactionActionPhase_1.storeTransactionActionPhase;
      } });
      var TransactionBouncePhase_1 = require_TransactionBouncePhase();
      Object.defineProperty(exports, "loadTransactionBouncePhase", { enumerable: true, get: function() {
        return TransactionBouncePhase_1.loadTransactionBouncePhase;
      } });
      Object.defineProperty(exports, "storeTransactionBouncePhase", { enumerable: true, get: function() {
        return TransactionBouncePhase_1.storeTransactionBouncePhase;
      } });
      var TransactionComputePhase_1 = require_TransactionComputePhase();
      Object.defineProperty(exports, "loadTransactionComputePhase", { enumerable: true, get: function() {
        return TransactionComputePhase_1.loadTransactionComputePhase;
      } });
      Object.defineProperty(exports, "storeTransactionComputePhase", { enumerable: true, get: function() {
        return TransactionComputePhase_1.storeTransactionComputePhase;
      } });
      var TransactionCreditPhase_1 = require_TransactionCreditPhase();
      Object.defineProperty(exports, "loadTransactionCreditPhase", { enumerable: true, get: function() {
        return TransactionCreditPhase_1.loadTransactionCreditPhase;
      } });
      Object.defineProperty(exports, "storeTransactionCreditPhase", { enumerable: true, get: function() {
        return TransactionCreditPhase_1.storeTransactionCreditPhase;
      } });
      var TransactionDescription_1 = require_TransactionDescription();
      Object.defineProperty(exports, "loadTransactionDescription", { enumerable: true, get: function() {
        return TransactionDescription_1.loadTransactionDescription;
      } });
      Object.defineProperty(exports, "storeTransactionDescription", { enumerable: true, get: function() {
        return TransactionDescription_1.storeTransactionDescription;
      } });
      var TransactionStoragePhase_1 = require_TransactionStoragePhase();
      Object.defineProperty(exports, "loadTransactionStoragePhase", { enumerable: true, get: function() {
        return TransactionStoragePhase_1.loadTransactionStoragePhase;
      } });
      Object.defineProperty(exports, "storeTransactionsStoragePhase", { enumerable: true, get: function() {
        return TransactionStoragePhase_1.storeTransactionsStoragePhase;
      } });
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/contract/openContract.js
  var require_openContract = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/contract/openContract.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.openContract = void 0;
      var Address_1 = require_Address();
      var Cell_1 = require_Cell();
      function openContract(src2, factory) {
        let address;
        let init2 = null;
        if (!Address_1.Address.isAddress(src2.address)) {
          throw Error("Invalid address");
        }
        address = src2.address;
        if (src2.init) {
          if (!(src2.init.code instanceof Cell_1.Cell)) {
            throw Error("Invalid init.code");
          }
          if (!(src2.init.data instanceof Cell_1.Cell)) {
            throw Error("Invalid init.data");
          }
          init2 = src2.init;
        }
        let executor = factory({ address, init: init2 });
        return new Proxy(src2, {
          get(target, prop) {
            const value = target[prop];
            if (typeof prop === "string" && (prop.startsWith("get") || prop.startsWith("send") || prop.startsWith("is"))) {
              if (typeof value === "function") {
                return (...args) => value.apply(target, [executor, ...args]);
              }
            }
            return value;
          }
        });
      }
      exports.openContract = openContract;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/contract/ComputeError.js
  var require_ComputeError = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/contract/ComputeError.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.ComputeError = void 0;
      var ComputeError = class _ComputeError extends Error {
        constructor(message, exitCode, opts) {
          super(message);
          this.exitCode = exitCode;
          this.debugLogs = opts && opts.debugLogs ? opts.debugLogs : null;
          this.logs = opts && opts.logs ? opts.logs : null;
          Object.setPrototypeOf(this, _ComputeError.prototype);
        }
      };
      exports.ComputeError = ComputeError;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/utils/getMethodId.js
  var require_getMethodId = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/utils/getMethodId.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.getMethodId = void 0;
      var TABLE = new Int16Array([
        0,
        4129,
        8258,
        12387,
        16516,
        20645,
        24774,
        28903,
        33032,
        37161,
        41290,
        45419,
        49548,
        53677,
        57806,
        61935,
        4657,
        528,
        12915,
        8786,
        21173,
        17044,
        29431,
        25302,
        37689,
        33560,
        45947,
        41818,
        54205,
        50076,
        62463,
        58334,
        9314,
        13379,
        1056,
        5121,
        25830,
        29895,
        17572,
        21637,
        42346,
        46411,
        34088,
        38153,
        58862,
        62927,
        50604,
        54669,
        13907,
        9842,
        5649,
        1584,
        30423,
        26358,
        22165,
        18100,
        46939,
        42874,
        38681,
        34616,
        63455,
        59390,
        55197,
        51132,
        18628,
        22757,
        26758,
        30887,
        2112,
        6241,
        10242,
        14371,
        51660,
        55789,
        59790,
        63919,
        35144,
        39273,
        43274,
        47403,
        23285,
        19156,
        31415,
        27286,
        6769,
        2640,
        14899,
        10770,
        56317,
        52188,
        64447,
        60318,
        39801,
        35672,
        47931,
        43802,
        27814,
        31879,
        19684,
        23749,
        11298,
        15363,
        3168,
        7233,
        60846,
        64911,
        52716,
        56781,
        44330,
        48395,
        36200,
        40265,
        32407,
        28342,
        24277,
        20212,
        15891,
        11826,
        7761,
        3696,
        65439,
        61374,
        57309,
        53244,
        48923,
        44858,
        40793,
        36728,
        37256,
        33193,
        45514,
        41451,
        53516,
        49453,
        61774,
        57711,
        4224,
        161,
        12482,
        8419,
        20484,
        16421,
        28742,
        24679,
        33721,
        37784,
        41979,
        46042,
        49981,
        54044,
        58239,
        62302,
        689,
        4752,
        8947,
        13010,
        16949,
        21012,
        25207,
        29270,
        46570,
        42443,
        38312,
        34185,
        62830,
        58703,
        54572,
        50445,
        13538,
        9411,
        5280,
        1153,
        29798,
        25671,
        21540,
        17413,
        42971,
        47098,
        34713,
        38840,
        59231,
        63358,
        50973,
        55100,
        9939,
        14066,
        1681,
        5808,
        26199,
        30326,
        17941,
        22068,
        55628,
        51565,
        63758,
        59695,
        39368,
        35305,
        47498,
        43435,
        22596,
        18533,
        30726,
        26663,
        6336,
        2273,
        14466,
        10403,
        52093,
        56156,
        60223,
        64286,
        35833,
        39896,
        43963,
        48026,
        19061,
        23124,
        27191,
        31254,
        2801,
        6864,
        10931,
        14994,
        64814,
        60687,
        56684,
        52557,
        48554,
        44427,
        40424,
        36297,
        31782,
        27655,
        23652,
        19525,
        15522,
        11395,
        7392,
        3265,
        61215,
        65342,
        53085,
        57212,
        44955,
        49082,
        36825,
        40952,
        28183,
        32310,
        20053,
        24180,
        11923,
        16050,
        3793,
        7920
      ]);
      function crc16(data) {
        if (!(data instanceof Buffer2)) {
          data = Buffer2.from(data);
        }
        let crc = 0;
        for (let index2 = 0; index2 < data.length; index2++) {
          const byte = data[index2];
          crc = (TABLE[(crc >> 8 ^ byte) & 255] ^ crc << 8) & 65535;
        }
        return crc;
      }
      function getMethodId(name2) {
        return crc16(name2) & 65535 | 65536;
      }
      exports.getMethodId = getMethodId;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/crypto/safeSign.js
  var require_safeSign = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/crypto/safeSign.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.safeSignVerify = exports.safeSign = void 0;
      var crypto_1 = require_dist();
      var MIN_SEED_LENGTH = 8;
      var MAX_SEED_LENGTH2 = 64;
      function createSafeSignHash(cell, seed) {
        let seedData = Buffer2.from(seed);
        if (seedData.length > MAX_SEED_LENGTH2) {
          throw Error("Seed can	 be longer than 64 bytes");
        }
        if (seedData.length < MIN_SEED_LENGTH) {
          throw Error("Seed must be at least 8 bytes");
        }
        return (0, crypto_1.sha256_sync)(Buffer2.concat([Buffer2.from([255, 255]), seedData, cell.hash()]));
      }
      function safeSign(cell, secretKey, seed = "ton-safe-sign-magic") {
        return (0, crypto_1.sign)(createSafeSignHash(cell, seed), secretKey);
      }
      exports.safeSign = safeSign;
      function safeSignVerify(cell, signature2, publicKey3, seed = "ton-safe-sign-magic") {
        return (0, crypto_1.signVerify)(createSafeSignHash(cell, seed), signature2, publicKey3);
      }
      exports.safeSignVerify = safeSignVerify;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/crypto/domainSignature.js
  var require_domainSignature = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/crypto/domainSignature.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.domainSignVerify = exports.domainSign = exports.domainDataToSign = exports.signatureDomainPrefix = exports.signatureDomainHash = void 0;
      var crypto_1 = require_dist();
      var SignatureDomain_1 = require_SignatureDomain();
      function signatureDomainHash(domain2) {
        switch (domain2.type) {
          case "empty":
            const tl = Buffer2.alloc(4);
            tl.writeInt32LE(SignatureDomain_1.signatureDomainEmptyTag);
            return (0, crypto_1.sha256_sync)(tl);
          case "l2": {
            const tl2 = Buffer2.alloc(8);
            tl2.writeInt32LE(SignatureDomain_1.signatureDomainL2Tag);
            tl2.writeInt32LE(domain2.globalId, 4);
            return (0, crypto_1.sha256_sync)(tl2);
          }
          default:
            throw new Error(`Unknown SignatureDomain type ${domain2.type}`);
        }
      }
      exports.signatureDomainHash = signatureDomainHash;
      var signatureDomainEmptyHash = signatureDomainHash({ type: "empty" });
      function signatureDomainPrefix(domainOrHash) {
        const domainHash = Buffer2.isBuffer(domainOrHash) ? domainOrHash : signatureDomainHash(domainOrHash);
        if (domainHash.length !== 32) {
          throw new Error("Invalid signature domain hash length");
        }
        if (domainHash.equals(signatureDomainEmptyHash)) {
          return null;
        }
        return domainHash;
      }
      exports.signatureDomainPrefix = signatureDomainPrefix;
      function domainDataToSign(data, domain2) {
        const prefix = signatureDomainPrefix(domain2);
        return prefix ? Buffer2.concat([prefix, data]) : data;
      }
      exports.domainDataToSign = domainDataToSign;
      function domainSign({ data, secretKey, domain: domain2 = { type: "empty" } }) {
        const dataToSign = domainDataToSign(data, domain2);
        return (0, crypto_1.sign)(dataToSign, secretKey);
      }
      exports.domainSign = domainSign;
      function domainSignVerify({ data, signature: signature2, publicKey: publicKey3, domain: domain2 = { type: "empty" } }) {
        const dataToSign = domainDataToSign(data, domain2);
        return (0, crypto_1.signVerify)(dataToSign, signature2, publicKey3);
      }
      exports.domainSignVerify = domainSignVerify;
    }
  });

  // ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/index.js
  var require_dist2 = __commonJS({
    "../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.domainDataToSign = exports.domainSignVerify = exports.domainSign = exports.signatureDomainPrefix = exports.signatureDomainHash = exports.safeSignVerify = exports.safeSign = exports.getMethodId = exports.base32Encode = exports.base32Decode = exports.crc32c = exports.crc16 = exports.fromNano = exports.toNano = exports.ComputeError = exports.openContract = exports.TupleBuilder = exports.TupleReader = exports.serializeTupleItem = exports.parseTupleItem = exports.serializeTuple = exports.parseTuple = exports.generateMerkleUpdate = exports.generateMerkleProofDirect = exports.generateMerkleProof = exports.exoticPruned = exports.exoticMerkleUpdate = exports.convertToMerkleProof = exports.exoticMerkleProof = exports.Dictionary = exports.Cell = exports.CellType = exports.Slice = exports.beginCell = exports.Builder = exports.BitBuilder = exports.BitReader = exports.BitString = exports.contractAddress = exports.ADNLAddress = exports.ExternalAddress = exports.address = exports.Address = void 0;
      var Address_1 = require_Address();
      Object.defineProperty(exports, "Address", { enumerable: true, get: function() {
        return Address_1.Address;
      } });
      Object.defineProperty(exports, "address", { enumerable: true, get: function() {
        return Address_1.address;
      } });
      var ExternalAddress_1 = require_ExternalAddress();
      Object.defineProperty(exports, "ExternalAddress", { enumerable: true, get: function() {
        return ExternalAddress_1.ExternalAddress;
      } });
      var ADNLAddress_1 = require_ADNLAddress();
      Object.defineProperty(exports, "ADNLAddress", { enumerable: true, get: function() {
        return ADNLAddress_1.ADNLAddress;
      } });
      var contractAddress_1 = require_contractAddress();
      Object.defineProperty(exports, "contractAddress", { enumerable: true, get: function() {
        return contractAddress_1.contractAddress;
      } });
      var BitString_1 = require_BitString();
      Object.defineProperty(exports, "BitString", { enumerable: true, get: function() {
        return BitString_1.BitString;
      } });
      var BitReader_1 = require_BitReader();
      Object.defineProperty(exports, "BitReader", { enumerable: true, get: function() {
        return BitReader_1.BitReader;
      } });
      var BitBuilder_1 = require_BitBuilder();
      Object.defineProperty(exports, "BitBuilder", { enumerable: true, get: function() {
        return BitBuilder_1.BitBuilder;
      } });
      var Builder_1 = require_Builder();
      Object.defineProperty(exports, "Builder", { enumerable: true, get: function() {
        return Builder_1.Builder;
      } });
      Object.defineProperty(exports, "beginCell", { enumerable: true, get: function() {
        return Builder_1.beginCell;
      } });
      var Slice_1 = require_Slice();
      Object.defineProperty(exports, "Slice", { enumerable: true, get: function() {
        return Slice_1.Slice;
      } });
      var CellType_1 = require_CellType();
      Object.defineProperty(exports, "CellType", { enumerable: true, get: function() {
        return CellType_1.CellType;
      } });
      var Cell_1 = require_Cell();
      Object.defineProperty(exports, "Cell", { enumerable: true, get: function() {
        return Cell_1.Cell;
      } });
      var Dictionary_1 = require_Dictionary();
      Object.defineProperty(exports, "Dictionary", { enumerable: true, get: function() {
        return Dictionary_1.Dictionary;
      } });
      var exoticMerkleProof_1 = require_exoticMerkleProof();
      Object.defineProperty(exports, "exoticMerkleProof", { enumerable: true, get: function() {
        return exoticMerkleProof_1.exoticMerkleProof;
      } });
      Object.defineProperty(exports, "convertToMerkleProof", { enumerable: true, get: function() {
        return exoticMerkleProof_1.convertToMerkleProof;
      } });
      var exoticMerkleUpdate_1 = require_exoticMerkleUpdate();
      Object.defineProperty(exports, "exoticMerkleUpdate", { enumerable: true, get: function() {
        return exoticMerkleUpdate_1.exoticMerkleUpdate;
      } });
      var exoticPruned_1 = require_exoticPruned();
      Object.defineProperty(exports, "exoticPruned", { enumerable: true, get: function() {
        return exoticPruned_1.exoticPruned;
      } });
      var generateMerkleProof_1 = require_generateMerkleProof();
      Object.defineProperty(exports, "generateMerkleProof", { enumerable: true, get: function() {
        return generateMerkleProof_1.generateMerkleProof;
      } });
      Object.defineProperty(exports, "generateMerkleProofDirect", { enumerable: true, get: function() {
        return generateMerkleProof_1.generateMerkleProofDirect;
      } });
      var generateMerkleUpdate_1 = require_generateMerkleUpdate();
      Object.defineProperty(exports, "generateMerkleUpdate", { enumerable: true, get: function() {
        return generateMerkleUpdate_1.generateMerkleUpdate;
      } });
      var tuple_1 = require_tuple();
      Object.defineProperty(exports, "parseTuple", { enumerable: true, get: function() {
        return tuple_1.parseTuple;
      } });
      Object.defineProperty(exports, "serializeTuple", { enumerable: true, get: function() {
        return tuple_1.serializeTuple;
      } });
      Object.defineProperty(exports, "parseTupleItem", { enumerable: true, get: function() {
        return tuple_1.parseTupleItem;
      } });
      Object.defineProperty(exports, "serializeTupleItem", { enumerable: true, get: function() {
        return tuple_1.serializeTupleItem;
      } });
      var reader_1 = require_reader();
      Object.defineProperty(exports, "TupleReader", { enumerable: true, get: function() {
        return reader_1.TupleReader;
      } });
      var builder_1 = require_builder();
      Object.defineProperty(exports, "TupleBuilder", { enumerable: true, get: function() {
        return builder_1.TupleBuilder;
      } });
      __exportStar2(require_export(), exports);
      var openContract_1 = require_openContract();
      Object.defineProperty(exports, "openContract", { enumerable: true, get: function() {
        return openContract_1.openContract;
      } });
      var ComputeError_1 = require_ComputeError();
      Object.defineProperty(exports, "ComputeError", { enumerable: true, get: function() {
        return ComputeError_1.ComputeError;
      } });
      var convert_1 = require_convert();
      Object.defineProperty(exports, "toNano", { enumerable: true, get: function() {
        return convert_1.toNano;
      } });
      Object.defineProperty(exports, "fromNano", { enumerable: true, get: function() {
        return convert_1.fromNano;
      } });
      var crc16_1 = require_crc16();
      Object.defineProperty(exports, "crc16", { enumerable: true, get: function() {
        return crc16_1.crc16;
      } });
      var crc32c_1 = require_crc32c();
      Object.defineProperty(exports, "crc32c", { enumerable: true, get: function() {
        return crc32c_1.crc32c;
      } });
      var base32_1 = require_base32();
      Object.defineProperty(exports, "base32Decode", { enumerable: true, get: function() {
        return base32_1.base32Decode;
      } });
      Object.defineProperty(exports, "base32Encode", { enumerable: true, get: function() {
        return base32_1.base32Encode;
      } });
      var getMethodId_1 = require_getMethodId();
      Object.defineProperty(exports, "getMethodId", { enumerable: true, get: function() {
        return getMethodId_1.getMethodId;
      } });
      var safeSign_1 = require_safeSign();
      Object.defineProperty(exports, "safeSign", { enumerable: true, get: function() {
        return safeSign_1.safeSign;
      } });
      Object.defineProperty(exports, "safeSignVerify", { enumerable: true, get: function() {
        return safeSign_1.safeSignVerify;
      } });
      var domainSignature_1 = require_domainSignature();
      Object.defineProperty(exports, "signatureDomainHash", { enumerable: true, get: function() {
        return domainSignature_1.signatureDomainHash;
      } });
      Object.defineProperty(exports, "signatureDomainPrefix", { enumerable: true, get: function() {
        return domainSignature_1.signatureDomainPrefix;
      } });
      Object.defineProperty(exports, "domainSign", { enumerable: true, get: function() {
        return domainSignature_1.domainSign;
      } });
      Object.defineProperty(exports, "domainSignVerify", { enumerable: true, get: function() {
        return domainSignature_1.domainSignVerify;
      } });
      Object.defineProperty(exports, "domainDataToSign", { enumerable: true, get: function() {
        return domainSignature_1.domainDataToSign;
      } });
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/client/api/TonCache.js
  var require_TonCache = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/client/api/TonCache.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.InMemoryCache = void 0;
      var InMemoryCache = class {
        constructor() {
          this.cache = /* @__PURE__ */ new Map();
          this.set = async (namespace, key2, value) => {
            if (value !== null) {
              this.cache.set(namespace + "$$" + key2, value);
            } else {
              this.cache.delete(namespace + "$$" + key2);
            }
          };
          this.get = async (namespace, key2) => {
            let res = this.cache.get(namespace + "$$" + key2);
            if (res !== void 0) {
              return res;
            } else {
              return null;
            }
          };
        }
      };
      exports.InMemoryCache = InMemoryCache;
    }
  });

  // ../../node_modules/.pnpm/dataloader@2.2.3/node_modules/dataloader/index.js
  var require_dataloader = __commonJS({
    "../../node_modules/.pnpm/dataloader@2.2.3/node_modules/dataloader/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var DataLoader = /* @__PURE__ */ (function() {
        function DataLoader2(batchLoadFn, options) {
          if (typeof batchLoadFn !== "function") {
            throw new TypeError("DataLoader must be constructed with a function which accepts " + ("Array<key> and returns Promise<Array<value>>, but got: " + batchLoadFn + "."));
          }
          this._batchLoadFn = batchLoadFn;
          this._maxBatchSize = getValidMaxBatchSize(options);
          this._batchScheduleFn = getValidBatchScheduleFn(options);
          this._cacheKeyFn = getValidCacheKeyFn(options);
          this._cacheMap = getValidCacheMap(options);
          this._batch = null;
          this.name = getValidName(options);
        }
        var _proto = DataLoader2.prototype;
        _proto.load = function load(key2) {
          if (key2 === null || key2 === void 0) {
            throw new TypeError("The loader.load() function must be called with a value, " + ("but got: " + String(key2) + "."));
          }
          var batch = getCurrentBatch(this);
          var cacheMap = this._cacheMap;
          var cacheKey2;
          if (cacheMap) {
            cacheKey2 = this._cacheKeyFn(key2);
            var cachedPromise = cacheMap.get(cacheKey2);
            if (cachedPromise) {
              var cacheHits = batch.cacheHits || (batch.cacheHits = []);
              return new Promise(function(resolve) {
                cacheHits.push(function() {
                  resolve(cachedPromise);
                });
              });
            }
          }
          batch.keys.push(key2);
          var promise2 = new Promise(function(resolve, reject2) {
            batch.callbacks.push({
              resolve,
              reject: reject2
            });
          });
          if (cacheMap) {
            cacheMap.set(cacheKey2, promise2);
          }
          return promise2;
        };
        _proto.loadMany = function loadMany(keys2) {
          if (!isArrayLike(keys2)) {
            throw new TypeError("The loader.loadMany() function must be called with Array<key> " + ("but got: " + keys2 + "."));
          }
          var loadPromises = [];
          for (var i5 = 0; i5 < keys2.length; i5++) {
            loadPromises.push(this.load(keys2[i5])["catch"](function(error51) {
              return error51;
            }));
          }
          return Promise.all(loadPromises);
        };
        _proto.clear = function clear2(key2) {
          var cacheMap = this._cacheMap;
          if (cacheMap) {
            var cacheKey2 = this._cacheKeyFn(key2);
            cacheMap["delete"](cacheKey2);
          }
          return this;
        };
        _proto.clearAll = function clearAll() {
          var cacheMap = this._cacheMap;
          if (cacheMap) {
            cacheMap.clear();
          }
          return this;
        };
        _proto.prime = function prime(key2, value) {
          var cacheMap = this._cacheMap;
          if (cacheMap) {
            var cacheKey2 = this._cacheKeyFn(key2);
            if (cacheMap.get(cacheKey2) === void 0) {
              var promise2;
              if (value instanceof Error) {
                promise2 = Promise.reject(value);
                promise2["catch"](function() {
                });
              } else {
                promise2 = Promise.resolve(value);
              }
              cacheMap.set(cacheKey2, promise2);
            }
          }
          return this;
        };
        return DataLoader2;
      })();
      var enqueuePostPromiseJob = typeof process === "object" && typeof process.nextTick === "function" ? function(fn) {
        if (!resolvedPromise) {
          resolvedPromise = Promise.resolve();
        }
        resolvedPromise.then(function() {
          process.nextTick(fn);
        });
      } : typeof setImmediate === "function" ? function(fn) {
        setImmediate(fn);
      } : function(fn) {
        setTimeout(fn);
      };
      var resolvedPromise;
      function getCurrentBatch(loader) {
        var existingBatch = loader._batch;
        if (existingBatch !== null && !existingBatch.hasDispatched && existingBatch.keys.length < loader._maxBatchSize) {
          return existingBatch;
        }
        var newBatch = {
          hasDispatched: false,
          keys: [],
          callbacks: []
        };
        loader._batch = newBatch;
        loader._batchScheduleFn(function() {
          dispatchBatch(loader, newBatch);
        });
        return newBatch;
      }
      function dispatchBatch(loader, batch) {
        batch.hasDispatched = true;
        if (batch.keys.length === 0) {
          resolveCacheHits(batch);
          return;
        }
        var batchPromise;
        try {
          batchPromise = loader._batchLoadFn(batch.keys);
        } catch (e2) {
          return failedDispatch(loader, batch, new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function " + ("errored synchronously: " + String(e2) + ".")));
        }
        if (!batchPromise || typeof batchPromise.then !== "function") {
          return failedDispatch(loader, batch, new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did " + ("not return a Promise: " + String(batchPromise) + ".")));
        }
        batchPromise.then(function(values) {
          if (!isArrayLike(values)) {
            throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did " + ("not return a Promise of an Array: " + String(values) + "."));
          }
          if (values.length !== batch.keys.length) {
            throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys." + ("\n\nKeys:\n" + String(batch.keys)) + ("\n\nValues:\n" + String(values)));
          }
          resolveCacheHits(batch);
          for (var i5 = 0; i5 < batch.callbacks.length; i5++) {
            var _value = values[i5];
            if (_value instanceof Error) {
              batch.callbacks[i5].reject(_value);
            } else {
              batch.callbacks[i5].resolve(_value);
            }
          }
        })["catch"](function(error51) {
          failedDispatch(loader, batch, error51);
        });
      }
      function failedDispatch(loader, batch, error51) {
        resolveCacheHits(batch);
        for (var i5 = 0; i5 < batch.keys.length; i5++) {
          loader.clear(batch.keys[i5]);
          batch.callbacks[i5].reject(error51);
        }
      }
      function resolveCacheHits(batch) {
        if (batch.cacheHits) {
          for (var i5 = 0; i5 < batch.cacheHits.length; i5++) {
            batch.cacheHits[i5]();
          }
        }
      }
      function getValidMaxBatchSize(options) {
        var shouldBatch = !options || options.batch !== false;
        if (!shouldBatch) {
          return 1;
        }
        var maxBatchSize = options && options.maxBatchSize;
        if (maxBatchSize === void 0) {
          return Infinity;
        }
        if (typeof maxBatchSize !== "number" || maxBatchSize < 1) {
          throw new TypeError("maxBatchSize must be a positive number: " + maxBatchSize);
        }
        return maxBatchSize;
      }
      function getValidBatchScheduleFn(options) {
        var batchScheduleFn = options && options.batchScheduleFn;
        if (batchScheduleFn === void 0) {
          return enqueuePostPromiseJob;
        }
        if (typeof batchScheduleFn !== "function") {
          throw new TypeError("batchScheduleFn must be a function: " + batchScheduleFn);
        }
        return batchScheduleFn;
      }
      function getValidCacheKeyFn(options) {
        var cacheKeyFn = options && options.cacheKeyFn;
        if (cacheKeyFn === void 0) {
          return function(key2) {
            return key2;
          };
        }
        if (typeof cacheKeyFn !== "function") {
          throw new TypeError("cacheKeyFn must be a function: " + cacheKeyFn);
        }
        return cacheKeyFn;
      }
      function getValidCacheMap(options) {
        var shouldCache = !options || options.cache !== false;
        if (!shouldCache) {
          return null;
        }
        var cacheMap = options && options.cacheMap;
        if (cacheMap === void 0) {
          return /* @__PURE__ */ new Map();
        }
        if (cacheMap !== null) {
          var cacheFunctions = ["get", "set", "delete", "clear"];
          var missingFunctions = cacheFunctions.filter(function(fnName) {
            return cacheMap && typeof cacheMap[fnName] !== "function";
          });
          if (missingFunctions.length !== 0) {
            throw new TypeError("Custom cacheMap missing methods: " + missingFunctions.join(", "));
          }
        }
        return cacheMap;
      }
      function getValidName(options) {
        if (options && options.name) {
          return options.name;
        }
        return null;
      }
      function isArrayLike(x13) {
        return typeof x13 === "object" && x13 !== null && typeof x13.length === "number" && (x13.length === 0 || x13.length > 0 && Object.prototype.hasOwnProperty.call(x13, x13.length - 1));
      }
      module.exports = DataLoader;
    }
  });

  // ../../node_modules/.pnpm/axios@1.16.1/node_modules/axios/dist/browser/axios.cjs
  var require_axios = __commonJS({
    "../../node_modules/.pnpm/axios@1.16.1/node_modules/axios/dist/browser/axios.cjs"(exports, module) {
      "use strict";
      init_node_compat_inject();
      function bind(fn, thisArg) {
        return function wrap3() {
          return fn.apply(thisArg, arguments);
        };
      }
      var { toString: toString5 } = Object.prototype;
      var { getPrototypeOf } = Object;
      var { iterator, toStringTag } = Symbol;
      var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
        const str = toString5.call(thing);
        return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
      })(/* @__PURE__ */ Object.create(null));
      var kindOfTest = (type2) => {
        type2 = type2.toLowerCase();
        return (thing) => kindOf(thing) === type2;
      };
      var typeOfTest = (type2) => (thing) => typeof thing === type2;
      var { isArray } = Array;
      var isUndefined = typeOfTest("undefined");
      function isBuffer(val) {
        return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
      }
      var isArrayBuffer = kindOfTest("ArrayBuffer");
      function isArrayBufferView(val) {
        let result;
        if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
          result = ArrayBuffer.isView(val);
        } else {
          result = val && val.buffer && isArrayBuffer(val.buffer);
        }
        return result;
      }
      var isString = typeOfTest("string");
      var isFunction$1 = typeOfTest("function");
      var isNumber = typeOfTest("number");
      var isObject3 = (thing) => thing !== null && typeof thing === "object";
      var isBoolean = (thing) => thing === true || thing === false;
      var isPlainObject3 = (val) => {
        if (kindOf(val) !== "object") {
          return false;
        }
        const prototype2 = getPrototypeOf(val);
        return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
      };
      var isEmptyObject = (val) => {
        if (!isObject3(val) || isBuffer(val)) {
          return false;
        }
        try {
          return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
        } catch (e2) {
          return false;
        }
      };
      var isDate = kindOfTest("Date");
      var isFile = kindOfTest("File");
      var isReactNativeBlob = (value) => {
        return !!(value && typeof value.uri !== "undefined");
      };
      var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
      var isBlob = kindOfTest("Blob");
      var isFileList = kindOfTest("FileList");
      var isStream = (val) => isObject3(val) && isFunction$1(val.pipe);
      function getGlobal() {
        if (typeof globalThis !== "undefined") return globalThis;
        if (typeof self !== "undefined") return self;
        if (typeof window !== "undefined") return window;
        if (typeof global !== "undefined") return global;
        return {};
      }
      var G6 = getGlobal();
      var FormDataCtor = typeof G6.FormData !== "undefined" ? G6.FormData : void 0;
      var isFormData = (thing) => {
        if (!thing) return false;
        if (FormDataCtor && thing instanceof FormDataCtor) return true;
        const proto = getPrototypeOf(thing);
        if (!proto || proto === Object.prototype) return false;
        if (!isFunction$1(thing.append)) return false;
        const kind = kindOf(thing);
        return kind === "formdata" || // detect form-data instance
        kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]";
      };
      var isURLSearchParams = kindOfTest("URLSearchParams");
      var [isReadableStream, isRequest, isResponse, isHeaders] = [
        "ReadableStream",
        "Request",
        "Response",
        "Headers"
      ].map(kindOfTest);
      var trim4 = (str) => {
        return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
      };
      function forEach(obj, fn, { allOwnKeys = false } = {}) {
        if (obj === null || typeof obj === "undefined") {
          return;
        }
        let i5;
        let l6;
        if (typeof obj !== "object") {
          obj = [obj];
        }
        if (isArray(obj)) {
          for (i5 = 0, l6 = obj.length; i5 < l6; i5++) {
            fn.call(null, obj[i5], i5, obj);
          }
        } else {
          if (isBuffer(obj)) {
            return;
          }
          const keys2 = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
          const len = keys2.length;
          let key2;
          for (i5 = 0; i5 < len; i5++) {
            key2 = keys2[i5];
            fn.call(null, obj[key2], key2, obj);
          }
        }
      }
      function findKey(obj, key2) {
        if (isBuffer(obj)) {
          return null;
        }
        key2 = key2.toLowerCase();
        const keys2 = Object.keys(obj);
        let i5 = keys2.length;
        let _key;
        while (i5-- > 0) {
          _key = keys2[i5];
          if (key2 === _key.toLowerCase()) {
            return _key;
          }
        }
        return null;
      }
      var _global = (() => {
        if (typeof globalThis !== "undefined") return globalThis;
        return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
      })();
      var isContextDefined = (context) => !isUndefined(context) && context !== _global;
      function merge2(...objs) {
        const { caseless, skipUndefined } = isContextDefined(this) && this || {};
        const result = {};
        const assignValue = (val, key2) => {
          if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") {
            return;
          }
          const targetKey = caseless && findKey(result, key2) || key2;
          const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
          if (isPlainObject3(existing) && isPlainObject3(val)) {
            result[targetKey] = merge2(existing, val);
          } else if (isPlainObject3(val)) {
            result[targetKey] = merge2({}, val);
          } else if (isArray(val)) {
            result[targetKey] = val.slice();
          } else if (!skipUndefined || !isUndefined(val)) {
            result[targetKey] = val;
          }
        };
        for (let i5 = 0, l6 = objs.length; i5 < l6; i5++) {
          objs[i5] && forEach(objs[i5], assignValue);
        }
        return result;
      }
      var extend2 = (a5, b9, thisArg, { allOwnKeys } = {}) => {
        forEach(
          b9,
          (val, key2) => {
            if (thisArg && isFunction$1(val)) {
              Object.defineProperty(a5, key2, {
                // Null-proto descriptor so a polluted Object.prototype.get cannot
                // hijack defineProperty's accessor-vs-data resolution.
                __proto__: null,
                value: bind(val, thisArg),
                writable: true,
                enumerable: true,
                configurable: true
              });
            } else {
              Object.defineProperty(a5, key2, {
                __proto__: null,
                value: val,
                writable: true,
                enumerable: true,
                configurable: true
              });
            }
          },
          { allOwnKeys }
        );
        return a5;
      };
      var stripBOM = (content) => {
        if (content.charCodeAt(0) === 65279) {
          content = content.slice(1);
        }
        return content;
      };
      var inherits = (constructor, superConstructor, props, descriptors) => {
        constructor.prototype = Object.create(superConstructor.prototype, descriptors);
        Object.defineProperty(constructor.prototype, "constructor", {
          __proto__: null,
          value: constructor,
          writable: true,
          enumerable: false,
          configurable: true
        });
        Object.defineProperty(constructor, "super", {
          __proto__: null,
          value: superConstructor.prototype
        });
        props && Object.assign(constructor.prototype, props);
      };
      var toFlatObject = (sourceObj, destObj, filter, propFilter) => {
        let props;
        let i5;
        let prop;
        const merged = {};
        destObj = destObj || {};
        if (sourceObj == null) return destObj;
        do {
          props = Object.getOwnPropertyNames(sourceObj);
          i5 = props.length;
          while (i5-- > 0) {
            prop = props[i5];
            if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
              destObj[prop] = sourceObj[prop];
              merged[prop] = true;
            }
          }
          sourceObj = filter !== false && getPrototypeOf(sourceObj);
        } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
        return destObj;
      };
      var endsWith = (str, searchString, position) => {
        str = String(str);
        if (position === void 0 || position > str.length) {
          position = str.length;
        }
        position -= searchString.length;
        const lastIndex = str.indexOf(searchString, position);
        return lastIndex !== -1 && lastIndex === position;
      };
      var toArray = (thing) => {
        if (!thing) return null;
        if (isArray(thing)) return thing;
        let i5 = thing.length;
        if (!isNumber(i5)) return null;
        const arr = new Array(i5);
        while (i5-- > 0) {
          arr[i5] = thing[i5];
        }
        return arr;
      };
      var isTypedArray = /* @__PURE__ */ ((TypedArray) => {
        return (thing) => {
          return TypedArray && thing instanceof TypedArray;
        };
      })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
      var forEachEntry = (obj, fn) => {
        const generator = obj && obj[iterator];
        const _iterator = generator.call(obj);
        let result;
        while ((result = _iterator.next()) && !result.done) {
          const pair = result.value;
          fn.call(obj, pair[0], pair[1]);
        }
      };
      var matchAll = (regExp, str) => {
        let matches;
        const arr = [];
        while ((matches = regExp.exec(str)) !== null) {
          arr.push(matches);
        }
        return arr;
      };
      var isHTMLForm = kindOfTest("HTMLFormElement");
      var toCamelCase = (str) => {
        return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m3, p1, p22) {
          return p1.toUpperCase() + p22;
        });
      };
      var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
      var isRegExp = kindOfTest("RegExp");
      var reduceDescriptors = (obj, reducer) => {
        const descriptors = Object.getOwnPropertyDescriptors(obj);
        const reducedDescriptors = {};
        forEach(descriptors, (descriptor, name2) => {
          let ret;
          if ((ret = reducer(descriptor, name2, obj)) !== false) {
            reducedDescriptors[name2] = ret || descriptor;
          }
        });
        Object.defineProperties(obj, reducedDescriptors);
      };
      var freezeMethods = (obj) => {
        reduceDescriptors(obj, (descriptor, name2) => {
          if (isFunction$1(obj) && ["arguments", "caller", "callee"].includes(name2)) {
            return false;
          }
          const value = obj[name2];
          if (!isFunction$1(value)) return;
          descriptor.enumerable = false;
          if ("writable" in descriptor) {
            descriptor.writable = false;
            return;
          }
          if (!descriptor.set) {
            descriptor.set = () => {
              throw Error("Can not rewrite read-only method '" + name2 + "'");
            };
          }
        });
      };
      var toObjectSet = (arrayOrString, delimiter) => {
        const obj = {};
        const define3 = (arr) => {
          arr.forEach((value) => {
            obj[value] = true;
          });
        };
        isArray(arrayOrString) ? define3(arrayOrString) : define3(String(arrayOrString).split(delimiter));
        return obj;
      };
      var noop2 = () => {
      };
      var toFiniteNumber = (value, defaultValue) => {
        return value != null && Number.isFinite(value = +value) ? value : defaultValue;
      };
      function isSpecCompliantForm(thing) {
        return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
      }
      var toJSONObject = (obj) => {
        const visited = /* @__PURE__ */ new WeakSet();
        const visit = (source) => {
          if (isObject3(source)) {
            if (visited.has(source)) {
              return;
            }
            if (isBuffer(source)) {
              return source;
            }
            if (!("toJSON" in source)) {
              visited.add(source);
              const target = isArray(source) ? [] : {};
              forEach(source, (value, key2) => {
                const reducedValue = visit(value);
                !isUndefined(reducedValue) && (target[key2] = reducedValue);
              });
              visited.delete(source);
              return target;
            }
          }
          return source;
        };
        return visit(obj);
      };
      var isAsyncFn = kindOfTest("AsyncFunction");
      var isThenable = (thing) => thing && (isObject3(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
      var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
        if (setImmediateSupported) {
          return setImmediate;
        }
        return postMessageSupported ? ((token, callbacks) => {
          _global.addEventListener(
            "message",
            ({ source, data }) => {
              if (source === _global && data === token) {
                callbacks.length && callbacks.shift()();
              }
            },
            false
          );
          return (cb) => {
            callbacks.push(cb);
            _global.postMessage(token, "*");
          };
        })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
      })(typeof setImmediate === "function", isFunction$1(_global.postMessage));
      var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
      var isIterable2 = (thing) => thing != null && isFunction$1(thing[iterator]);
      var utils$1 = {
        isArray,
        isArrayBuffer,
        isBuffer,
        isFormData,
        isArrayBufferView,
        isString,
        isNumber,
        isBoolean,
        isObject: isObject3,
        isPlainObject: isPlainObject3,
        isEmptyObject,
        isReadableStream,
        isRequest,
        isResponse,
        isHeaders,
        isUndefined,
        isDate,
        isFile,
        isReactNativeBlob,
        isReactNative,
        isBlob,
        isRegExp,
        isFunction: isFunction$1,
        isStream,
        isURLSearchParams,
        isTypedArray,
        isFileList,
        forEach,
        merge: merge2,
        extend: extend2,
        trim: trim4,
        stripBOM,
        inherits,
        toFlatObject,
        kindOf,
        kindOfTest,
        endsWith,
        toArray,
        forEachEntry,
        matchAll,
        isHTMLForm,
        hasOwnProperty,
        hasOwnProp: hasOwnProperty,
        // an alias to avoid ESLint no-prototype-builtins detection
        reduceDescriptors,
        freezeMethods,
        toObjectSet,
        toCamelCase,
        noop: noop2,
        toFiniteNumber,
        findKey,
        global: _global,
        isContextDefined,
        isSpecCompliantForm,
        toJSONObject,
        isAsyncFn,
        isThenable,
        setImmediate: _setImmediate,
        asap,
        isIterable: isIterable2
      };
      var ignoreDuplicateOf = utils$1.toObjectSet([
        "age",
        "authorization",
        "content-length",
        "content-type",
        "etag",
        "expires",
        "from",
        "host",
        "if-modified-since",
        "if-unmodified-since",
        "last-modified",
        "location",
        "max-forwards",
        "proxy-authorization",
        "referer",
        "retry-after",
        "user-agent"
      ]);
      var parseHeaders = (rawHeaders) => {
        const parsed = {};
        let key2;
        let val;
        let i5;
        rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
          i5 = line.indexOf(":");
          key2 = line.substring(0, i5).trim().toLowerCase();
          val = line.substring(i5 + 1).trim();
          if (!key2 || parsed[key2] && ignoreDuplicateOf[key2]) {
            return;
          }
          if (key2 === "set-cookie") {
            if (parsed[key2]) {
              parsed[key2].push(val);
            } else {
              parsed[key2] = [val];
            }
          } else {
            parsed[key2] = parsed[key2] ? parsed[key2] + ", " + val : val;
          }
        });
        return parsed;
      };
      function trimSPorHTAB(str) {
        let start = 0;
        let end = str.length;
        while (start < end) {
          const code2 = str.charCodeAt(start);
          if (code2 !== 9 && code2 !== 32) {
            break;
          }
          start += 1;
        }
        while (end > start) {
          const code2 = str.charCodeAt(end - 1);
          if (code2 !== 9 && code2 !== 32) {
            break;
          }
          end -= 1;
        }
        return start === 0 && end === str.length ? str : str.slice(start, end);
      }
      var INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g");
      var INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
      function sanitizeValue(value, invalidChars) {
        if (utils$1.isArray(value)) {
          return value.map((item) => sanitizeValue(item, invalidChars));
        }
        return trimSPorHTAB(String(value).replace(invalidChars, ""));
      }
      var sanitizeHeaderValue = (value) => sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);
      var sanitizeByteStringHeaderValue = (value) => sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);
      function toByteStringHeaderObject(headers) {
        const byteStringHeaders = /* @__PURE__ */ Object.create(null);
        utils$1.forEach(headers.toJSON(), (value, header) => {
          byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);
        });
        return byteStringHeaders;
      }
      var $internals = /* @__PURE__ */ Symbol("internals");
      function normalizeHeader(header) {
        return header && String(header).trim().toLowerCase();
      }
      function normalizeValue(value) {
        if (value === false || value == null) {
          return value;
        }
        return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
      }
      function parseTokens(str) {
        const tokens = /* @__PURE__ */ Object.create(null);
        const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
        let match;
        while (match = tokensRE.exec(str)) {
          tokens[match[1]] = match[2];
        }
        return tokens;
      }
      var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
      function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
        if (utils$1.isFunction(filter)) {
          return filter.call(this, value, header);
        }
        if (isHeaderNameFilter) {
          value = header;
        }
        if (!utils$1.isString(value)) return;
        if (utils$1.isString(filter)) {
          return value.indexOf(filter) !== -1;
        }
        if (utils$1.isRegExp(filter)) {
          return filter.test(value);
        }
      }
      function formatHeader(header) {
        return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w7, char, str) => {
          return char.toUpperCase() + str;
        });
      }
      function buildAccessors(obj, header) {
        const accessorName = utils$1.toCamelCase(" " + header);
        ["get", "set", "has"].forEach((methodName) => {
          Object.defineProperty(obj, methodName + accessorName, {
            // Null-proto descriptor so a polluted Object.prototype.get cannot turn
            // this data descriptor into an accessor descriptor on the way in.
            __proto__: null,
            value: function(arg1, arg2, arg3) {
              return this[methodName].call(this, header, arg1, arg2, arg3);
            },
            configurable: true
          });
        });
      }
      var AxiosHeaders = class {
        constructor(headers) {
          headers && this.set(headers);
        }
        set(header, valueOrRewrite, rewrite) {
          const self2 = this;
          function setHeader(_value, _header, _rewrite) {
            const lHeader = normalizeHeader(_header);
            if (!lHeader) {
              throw new Error("header name must be a non-empty string");
            }
            const key2 = utils$1.findKey(self2, lHeader);
            if (!key2 || self2[key2] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key2] !== false) {
              self2[key2 || _header] = normalizeValue(_value);
            }
          }
          const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
          if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
            setHeaders(header, valueOrRewrite);
          } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
            setHeaders(parseHeaders(header), valueOrRewrite);
          } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
            let obj = {}, dest, key2;
            for (const entry of header) {
              if (!utils$1.isArray(entry)) {
                throw TypeError("Object iterator must return a key-value pair");
              }
              obj[key2 = entry[0]] = (dest = obj[key2]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
            }
            setHeaders(obj, valueOrRewrite);
          } else {
            header != null && setHeader(valueOrRewrite, header, rewrite);
          }
          return this;
        }
        get(header, parser) {
          header = normalizeHeader(header);
          if (header) {
            const key2 = utils$1.findKey(this, header);
            if (key2) {
              const value = this[key2];
              if (!parser) {
                return value;
              }
              if (parser === true) {
                return parseTokens(value);
              }
              if (utils$1.isFunction(parser)) {
                return parser.call(this, value, key2);
              }
              if (utils$1.isRegExp(parser)) {
                return parser.exec(value);
              }
              throw new TypeError("parser must be boolean|regexp|function");
            }
          }
        }
        has(header, matcher) {
          header = normalizeHeader(header);
          if (header) {
            const key2 = utils$1.findKey(this, header);
            return !!(key2 && this[key2] !== void 0 && (!matcher || matchHeaderValue(this, this[key2], key2, matcher)));
          }
          return false;
        }
        delete(header, matcher) {
          const self2 = this;
          let deleted = false;
          function deleteHeader(_header) {
            _header = normalizeHeader(_header);
            if (_header) {
              const key2 = utils$1.findKey(self2, _header);
              if (key2 && (!matcher || matchHeaderValue(self2, self2[key2], key2, matcher))) {
                delete self2[key2];
                deleted = true;
              }
            }
          }
          if (utils$1.isArray(header)) {
            header.forEach(deleteHeader);
          } else {
            deleteHeader(header);
          }
          return deleted;
        }
        clear(matcher) {
          const keys2 = Object.keys(this);
          let i5 = keys2.length;
          let deleted = false;
          while (i5--) {
            const key2 = keys2[i5];
            if (!matcher || matchHeaderValue(this, this[key2], key2, matcher, true)) {
              delete this[key2];
              deleted = true;
            }
          }
          return deleted;
        }
        normalize(format) {
          const self2 = this;
          const headers = {};
          utils$1.forEach(this, (value, header) => {
            const key2 = utils$1.findKey(headers, header);
            if (key2) {
              self2[key2] = normalizeValue(value);
              delete self2[header];
              return;
            }
            const normalized = format ? formatHeader(header) : String(header).trim();
            if (normalized !== header) {
              delete self2[header];
            }
            self2[normalized] = normalizeValue(value);
            headers[normalized] = true;
          });
          return this;
        }
        concat(...targets) {
          return this.constructor.concat(this, ...targets);
        }
        toJSON(asStrings) {
          const obj = /* @__PURE__ */ Object.create(null);
          utils$1.forEach(this, (value, header) => {
            value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
          });
          return obj;
        }
        [Symbol.iterator]() {
          return Object.entries(this.toJSON())[Symbol.iterator]();
        }
        toString() {
          return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
        }
        getSetCookie() {
          return this.get("set-cookie") || [];
        }
        get [Symbol.toStringTag]() {
          return "AxiosHeaders";
        }
        static from(thing) {
          return thing instanceof this ? thing : new this(thing);
        }
        static concat(first, ...targets) {
          const computed = new this(first);
          targets.forEach((target) => computed.set(target));
          return computed;
        }
        static accessor(header) {
          const internals = this[$internals] = this[$internals] = {
            accessors: {}
          };
          const accessors = internals.accessors;
          const prototype2 = this.prototype;
          function defineAccessor(_header) {
            const lHeader = normalizeHeader(_header);
            if (!accessors[lHeader]) {
              buildAccessors(prototype2, _header);
              accessors[lHeader] = true;
            }
          }
          utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
          return this;
        }
      };
      AxiosHeaders.accessor([
        "Content-Type",
        "Content-Length",
        "Accept",
        "Accept-Encoding",
        "User-Agent",
        "Authorization"
      ]);
      utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key2) => {
        let mapped = key2[0].toUpperCase() + key2.slice(1);
        return {
          get: () => value,
          set(headerValue) {
            this[mapped] = headerValue;
          }
        };
      });
      utils$1.freezeMethods(AxiosHeaders);
      var REDACTED = "[REDACTED ****]";
      function hasOwnOrPrototypeToJSON(source) {
        if (utils$1.hasOwnProp(source, "toJSON")) {
          return true;
        }
        let prototype2 = Object.getPrototypeOf(source);
        while (prototype2 && prototype2 !== Object.prototype) {
          if (utils$1.hasOwnProp(prototype2, "toJSON")) {
            return true;
          }
          prototype2 = Object.getPrototypeOf(prototype2);
        }
        return false;
      }
      function redactConfig(config2, redactKeys) {
        const lowerKeys = new Set(redactKeys.map((k7) => String(k7).toLowerCase()));
        const seen = [];
        const visit = (source) => {
          if (source === null || typeof source !== "object") return source;
          if (utils$1.isBuffer(source)) return source;
          if (seen.indexOf(source) !== -1) return void 0;
          if (source instanceof AxiosHeaders) {
            source = source.toJSON();
          }
          seen.push(source);
          let result;
          if (utils$1.isArray(source)) {
            result = [];
            source.forEach((v13, i5) => {
              const reducedValue = visit(v13);
              if (!utils$1.isUndefined(reducedValue)) {
                result[i5] = reducedValue;
              }
            });
          } else {
            if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
              seen.pop();
              return source;
            }
            result = /* @__PURE__ */ Object.create(null);
            for (const [key2, value] of Object.entries(source)) {
              const reducedValue = lowerKeys.has(key2.toLowerCase()) ? REDACTED : visit(value);
              if (!utils$1.isUndefined(reducedValue)) {
                result[key2] = reducedValue;
              }
            }
          }
          seen.pop();
          return result;
        };
        return visit(config2);
      }
      var AxiosError = class _AxiosError extends Error {
        static from(error51, code2, config2, request, response, customProps) {
          const axiosError = new _AxiosError(error51.message, code2 || error51.code, config2, request, response);
          axiosError.cause = error51;
          axiosError.name = error51.name;
          if (error51.status != null && axiosError.status == null) {
            axiosError.status = error51.status;
          }
          customProps && Object.assign(axiosError, customProps);
          return axiosError;
        }
        /**
         * Create an Error with the specified message, config, error code, request and response.
         *
         * @param {string} message The error message.
         * @param {string} [code] The error code (for example, 'ECONNABORTED').
         * @param {Object} [config] The config.
         * @param {Object} [request] The request.
         * @param {Object} [response] The response.
         *
         * @returns {Error} The created error.
         */
        constructor(message, code2, config2, request, response) {
          super(message);
          Object.defineProperty(this, "message", {
            // Null-proto descriptor so a polluted Object.prototype.get cannot turn
            // this data descriptor into an accessor descriptor on the way in.
            __proto__: null,
            value: message,
            enumerable: true,
            writable: true,
            configurable: true
          });
          this.name = "AxiosError";
          this.isAxiosError = true;
          code2 && (this.code = code2);
          config2 && (this.config = config2);
          request && (this.request = request);
          if (response) {
            this.response = response;
            this.status = response.status;
          }
        }
        toJSON() {
          const config2 = this.config;
          const redactKeys = config2 && utils$1.hasOwnProp(config2, "redact") ? config2.redact : void 0;
          const serializedConfig = utils$1.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config2, redactKeys) : utils$1.toJSONObject(config2);
          return {
            // Standard
            message: this.message,
            name: this.name,
            // Microsoft
            description: this.description,
            number: this.number,
            // Mozilla
            fileName: this.fileName,
            lineNumber: this.lineNumber,
            columnNumber: this.columnNumber,
            stack: this.stack,
            // Axios
            config: serializedConfig,
            code: this.code,
            status: this.status
          };
        }
      };
      AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
      AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
      AxiosError.ECONNABORTED = "ECONNABORTED";
      AxiosError.ETIMEDOUT = "ETIMEDOUT";
      AxiosError.ECONNREFUSED = "ECONNREFUSED";
      AxiosError.ERR_NETWORK = "ERR_NETWORK";
      AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
      AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
      AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
      AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
      AxiosError.ERR_CANCELED = "ERR_CANCELED";
      AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
      AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
      AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
      var httpAdapter = null;
      function isVisitable(thing) {
        return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
      }
      function removeBrackets(key2) {
        return utils$1.endsWith(key2, "[]") ? key2.slice(0, -2) : key2;
      }
      function renderKey(path, key2, dots) {
        if (!path) return key2;
        return path.concat(key2).map(function each(token, i5) {
          token = removeBrackets(token);
          return !dots && i5 ? "[" + token + "]" : token;
        }).join(dots ? "." : "");
      }
      function isFlatArray(arr) {
        return utils$1.isArray(arr) && !arr.some(isVisitable);
      }
      var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
        return /^is[A-Z]/.test(prop);
      });
      function toFormData(obj, formData, options) {
        if (!utils$1.isObject(obj)) {
          throw new TypeError("target must be an object");
        }
        formData = formData || new FormData();
        options = utils$1.toFlatObject(
          options,
          {
            metaTokens: true,
            dots: false,
            indexes: false
          },
          false,
          function defined(option, source) {
            return !utils$1.isUndefined(source[option]);
          }
        );
        const metaTokens = options.metaTokens;
        const visitor = options.visitor || defaultVisitor;
        const dots = options.dots;
        const indexes = options.indexes;
        const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
        const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
        const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
        if (!utils$1.isFunction(visitor)) {
          throw new TypeError("visitor must be a function");
        }
        function convertValue(value) {
          if (value === null) return "";
          if (utils$1.isDate(value)) {
            return value.toISOString();
          }
          if (utils$1.isBoolean(value)) {
            return value.toString();
          }
          if (!useBlob && utils$1.isBlob(value)) {
            throw new AxiosError("Blob is not supported. Use a Buffer instead.");
          }
          if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
            return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer2.from(value);
          }
          return value;
        }
        function defaultVisitor(value, key2, path) {
          let arr = value;
          if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
            formData.append(renderKey(path, key2, dots), convertValue(value));
            return false;
          }
          if (value && !path && typeof value === "object") {
            if (utils$1.endsWith(key2, "{}")) {
              key2 = metaTokens ? key2 : key2.slice(0, -2);
              value = JSON.stringify(value);
            } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key2, "[]")) && (arr = utils$1.toArray(value))) {
              key2 = removeBrackets(key2);
              arr.forEach(function each(el, index2) {
                !(utils$1.isUndefined(el) || el === null) && formData.append(
                  // eslint-disable-next-line no-nested-ternary
                  indexes === true ? renderKey([key2], index2, dots) : indexes === null ? key2 : key2 + "[]",
                  convertValue(el)
                );
              });
              return false;
            }
          }
          if (isVisitable(value)) {
            return true;
          }
          formData.append(renderKey(path, key2, dots), convertValue(value));
          return false;
        }
        const stack = [];
        const exposedHelpers = Object.assign(predicates, {
          defaultVisitor,
          convertValue,
          isVisitable
        });
        function build(value, path, depth = 0) {
          if (utils$1.isUndefined(value)) return;
          if (depth > maxDepth) {
            throw new AxiosError(
              "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
              AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED
            );
          }
          if (stack.indexOf(value) !== -1) {
            throw Error("Circular reference detected in " + path.join("."));
          }
          stack.push(value);
          utils$1.forEach(value, function each(el, key2) {
            const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key2) ? key2.trim() : key2, path, exposedHelpers);
            if (result === true) {
              build(el, path ? path.concat(key2) : [key2], depth + 1);
            }
          });
          stack.pop();
        }
        if (!utils$1.isObject(obj)) {
          throw new TypeError("data must be an object");
        }
        build(obj);
        return formData;
      }
      function encode$1(str) {
        const charMap = {
          "!": "%21",
          "'": "%27",
          "(": "%28",
          ")": "%29",
          "~": "%7E",
          "%20": "+"
        };
        return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
          return charMap[match];
        });
      }
      function AxiosURLSearchParams(params, options) {
        this._pairs = [];
        params && toFormData(params, this, options);
      }
      var prototype = AxiosURLSearchParams.prototype;
      prototype.append = function append(name2, value) {
        this._pairs.push([name2, value]);
      };
      prototype.toString = function toString6(encoder5) {
        const _encode3 = encoder5 ? function(value) {
          return encoder5.call(this, value, encode$1);
        } : encode$1;
        return this._pairs.map(function each(pair) {
          return _encode3(pair[0]) + "=" + _encode3(pair[1]);
        }, "").join("&");
      };
      function encode11(val) {
        return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
      }
      function buildURL(url2, params, options) {
        if (!params) {
          return url2;
        }
        const _encode3 = options && options.encode || encode11;
        const _options = utils$1.isFunction(options) ? {
          serialize: options
        } : options;
        const serializeFn = _options && _options.serialize;
        let serializedParams;
        if (serializeFn) {
          serializedParams = serializeFn(params, _options);
        } else {
          serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode3);
        }
        if (serializedParams) {
          const hashmarkIndex = url2.indexOf("#");
          if (hashmarkIndex !== -1) {
            url2 = url2.slice(0, hashmarkIndex);
          }
          url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
        }
        return url2;
      }
      var InterceptorManager = class {
        constructor() {
          this.handlers = [];
        }
        /**
         * Add a new interceptor to the stack
         *
         * @param {Function} fulfilled The function to handle `then` for a `Promise`
         * @param {Function} rejected The function to handle `reject` for a `Promise`
         * @param {Object} options The options for the interceptor, synchronous and runWhen
         *
         * @return {Number} An ID used to remove interceptor later
         */
        use(fulfilled, rejected, options) {
          this.handlers.push({
            fulfilled,
            rejected,
            synchronous: options ? options.synchronous : false,
            runWhen: options ? options.runWhen : null
          });
          return this.handlers.length - 1;
        }
        /**
         * Remove an interceptor from the stack
         *
         * @param {Number} id The ID that was returned by `use`
         *
         * @returns {void}
         */
        eject(id) {
          if (this.handlers[id]) {
            this.handlers[id] = null;
          }
        }
        /**
         * Clear all interceptors from the stack
         *
         * @returns {void}
         */
        clear() {
          if (this.handlers) {
            this.handlers = [];
          }
        }
        /**
         * Iterate over all the registered interceptors
         *
         * This method is particularly useful for skipping over any
         * interceptors that may have become `null` calling `eject`.
         *
         * @param {Function} fn The function to call for each interceptor
         *
         * @returns {void}
         */
        forEach(fn) {
          utils$1.forEach(this.handlers, function forEachHandler(h8) {
            if (h8 !== null) {
              fn(h8);
            }
          });
        }
      };
      var transitionalDefaults = {
        silentJSONParsing: true,
        forcedJSONParsing: true,
        clarifyTimeoutError: false,
        legacyInterceptorReqResOrdering: true
      };
      var URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
      var FormData$1 = typeof FormData !== "undefined" ? FormData : null;
      var Blob$1 = typeof Blob !== "undefined" ? Blob : null;
      var platform$1 = {
        isBrowser: true,
        classes: {
          URLSearchParams: URLSearchParams$1,
          FormData: FormData$1,
          Blob: Blob$1
        },
        protocols: ["http", "https", "file", "blob", "url", "data"]
      };
      var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
      var _navigator = typeof navigator === "object" && navigator || void 0;
      var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
      var hasStandardBrowserWebWorkerEnv = (() => {
        return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
        self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
      })();
      var origin2 = hasBrowserEnv && window.location.href || "http://localhost";
      var utils = /* @__PURE__ */ Object.freeze({
        __proto__: null,
        hasBrowserEnv,
        hasStandardBrowserEnv,
        hasStandardBrowserWebWorkerEnv,
        navigator: _navigator,
        origin: origin2
      });
      var platform = {
        ...utils,
        ...platform$1
      };
      function toURLEncodedForm(data, options) {
        return toFormData(data, new platform.classes.URLSearchParams(), {
          visitor: function(value, key2, path, helpers) {
            if (platform.isNode && utils$1.isBuffer(value)) {
              this.append(key2, value.toString("base64"));
              return false;
            }
            return helpers.defaultVisitor.apply(this, arguments);
          },
          ...options
        });
      }
      function parsePropPath(name2) {
        return utils$1.matchAll(/\w+|\[(\w*)]/g, name2).map((match) => {
          return match[0] === "[]" ? "" : match[1] || match[0];
        });
      }
      function arrayToObject(arr) {
        const obj = {};
        const keys2 = Object.keys(arr);
        let i5;
        const len = keys2.length;
        let key2;
        for (i5 = 0; i5 < len; i5++) {
          key2 = keys2[i5];
          obj[key2] = arr[key2];
        }
        return obj;
      }
      function formDataToJSON(formData) {
        function buildPath(path, value, target, index2) {
          let name2 = path[index2++];
          if (name2 === "__proto__") return true;
          const isNumericKey = Number.isFinite(+name2);
          const isLast = index2 >= path.length;
          name2 = !name2 && utils$1.isArray(target) ? target.length : name2;
          if (isLast) {
            if (utils$1.hasOwnProp(target, name2)) {
              target[name2] = utils$1.isArray(target[name2]) ? target[name2].concat(value) : [target[name2], value];
            } else {
              target[name2] = value;
            }
            return !isNumericKey;
          }
          if (!utils$1.hasOwnProp(target, name2) || !utils$1.isObject(target[name2])) {
            target[name2] = [];
          }
          const result = buildPath(path, value, target[name2], index2);
          if (result && utils$1.isArray(target[name2])) {
            target[name2] = arrayToObject(target[name2]);
          }
          return !isNumericKey;
        }
        if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
          const obj = {};
          utils$1.forEachEntry(formData, (name2, value) => {
            buildPath(parsePropPath(name2), value, obj, 0);
          });
          return obj;
        }
        return null;
      }
      var own = (obj, key2) => obj != null && utils$1.hasOwnProp(obj, key2) ? obj[key2] : void 0;
      function stringifySafely(rawValue, parser, encoder5) {
        if (utils$1.isString(rawValue)) {
          try {
            (parser || JSON.parse)(rawValue);
            return utils$1.trim(rawValue);
          } catch (e2) {
            if (e2.name !== "SyntaxError") {
              throw e2;
            }
          }
        }
        return (encoder5 || JSON.stringify)(rawValue);
      }
      var defaults = {
        transitional: transitionalDefaults,
        adapter: ["xhr", "http", "fetch"],
        transformRequest: [
          function transformRequest(data, headers) {
            const contentType = headers.getContentType() || "";
            const hasJSONContentType = contentType.indexOf("application/json") > -1;
            const isObjectPayload = utils$1.isObject(data);
            if (isObjectPayload && utils$1.isHTMLForm(data)) {
              data = new FormData(data);
            }
            const isFormData2 = utils$1.isFormData(data);
            if (isFormData2) {
              return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
            }
            if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
              return data;
            }
            if (utils$1.isArrayBufferView(data)) {
              return data.buffer;
            }
            if (utils$1.isURLSearchParams(data)) {
              headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
              return data.toString();
            }
            let isFileList2;
            if (isObjectPayload) {
              const formSerializer = own(this, "formSerializer");
              if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
                return toURLEncodedForm(data, formSerializer).toString();
              }
              if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
                const env = own(this, "env");
                const _FormData = env && env.FormData;
                return toFormData(
                  isFileList2 ? { "files[]": data } : data,
                  _FormData && new _FormData(),
                  formSerializer
                );
              }
            }
            if (isObjectPayload || hasJSONContentType) {
              headers.setContentType("application/json", false);
              return stringifySafely(data);
            }
            return data;
          }
        ],
        transformResponse: [
          function transformResponse(data) {
            const transitional = own(this, "transitional") || defaults.transitional;
            const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
            const responseType = own(this, "responseType");
            const JSONRequested = responseType === "json";
            if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
              return data;
            }
            if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
              const silentJSONParsing = transitional && transitional.silentJSONParsing;
              const strictJSONParsing = !silentJSONParsing && JSONRequested;
              try {
                return JSON.parse(data, own(this, "parseReviver"));
              } catch (e2) {
                if (strictJSONParsing) {
                  if (e2.name === "SyntaxError") {
                    throw AxiosError.from(e2, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, "response"));
                  }
                  throw e2;
                }
              }
            }
            return data;
          }
        ],
        /**
         * A timeout in milliseconds to abort a request. If set to 0 (default) a
         * timeout is not created.
         */
        timeout: 0,
        xsrfCookieName: "XSRF-TOKEN",
        xsrfHeaderName: "X-XSRF-TOKEN",
        maxContentLength: -1,
        maxBodyLength: -1,
        env: {
          FormData: platform.classes.FormData,
          Blob: platform.classes.Blob
        },
        validateStatus: function validateStatus(status) {
          return status >= 200 && status < 300;
        },
        headers: {
          common: {
            Accept: "application/json, text/plain, */*",
            "Content-Type": void 0
          }
        }
      };
      utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
        defaults.headers[method] = {};
      });
      function transformData(fns, response) {
        const config2 = this || defaults;
        const context = response || config2;
        const headers = AxiosHeaders.from(context.headers);
        let data = context.data;
        utils$1.forEach(fns, function transform2(fn) {
          data = fn.call(config2, data, headers.normalize(), response ? response.status : void 0);
        });
        headers.normalize();
        return data;
      }
      function isCancel(value) {
        return !!(value && value.__CANCEL__);
      }
      var CanceledError = class extends AxiosError {
        /**
         * A `CanceledError` is an object that is thrown when an operation is canceled.
         *
         * @param {string=} message The message.
         * @param {Object=} config The config.
         * @param {Object=} request The request.
         *
         * @returns {CanceledError} The created error.
         */
        constructor(message, config2, request) {
          super(message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config2, request);
          this.name = "CanceledError";
          this.__CANCEL__ = true;
        }
      };
      function settle(resolve, reject2, response) {
        const validateStatus = response.config.validateStatus;
        if (!response.status || !validateStatus || validateStatus(response.status)) {
          resolve(response);
        } else {
          reject2(new AxiosError(
            "Request failed with status code " + response.status,
            response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE,
            response.config,
            response.request,
            response
          ));
        }
      }
      function parseProtocol(url2) {
        const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
        return match && match[1] || "";
      }
      function speedometer(samplesCount, min) {
        samplesCount = samplesCount || 10;
        const bytes = new Array(samplesCount);
        const timestamps = new Array(samplesCount);
        let head = 0;
        let tail = 0;
        let firstSampleTS;
        min = min !== void 0 ? min : 1e3;
        return function push(chunkLength) {
          const now = Date.now();
          const startedAt = timestamps[tail];
          if (!firstSampleTS) {
            firstSampleTS = now;
          }
          bytes[head] = chunkLength;
          timestamps[head] = now;
          let i5 = tail;
          let bytesCount = 0;
          while (i5 !== head) {
            bytesCount += bytes[i5++];
            i5 = i5 % samplesCount;
          }
          head = (head + 1) % samplesCount;
          if (head === tail) {
            tail = (tail + 1) % samplesCount;
          }
          if (now - firstSampleTS < min) {
            return;
          }
          const passed = startedAt && now - startedAt;
          return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
        };
      }
      function throttle(fn, freq) {
        let timestamp = 0;
        let threshold = 1e3 / freq;
        let lastArgs;
        let timer;
        const invoke = (args, now = Date.now()) => {
          timestamp = now;
          lastArgs = null;
          if (timer) {
            clearTimeout(timer);
            timer = null;
          }
          fn(...args);
        };
        const throttled = (...args) => {
          const now = Date.now();
          const passed = now - timestamp;
          if (passed >= threshold) {
            invoke(args, now);
          } else {
            lastArgs = args;
            if (!timer) {
              timer = setTimeout(() => {
                timer = null;
                invoke(lastArgs);
              }, threshold - passed);
            }
          }
        };
        const flush = () => lastArgs && invoke(lastArgs);
        return [throttled, flush];
      }
      var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
        let bytesNotified = 0;
        const _speedometer = speedometer(50, 250);
        return throttle((e2) => {
          if (!e2 || typeof e2.loaded !== "number") {
            return;
          }
          const rawLoaded = e2.loaded;
          const total = e2.lengthComputable ? e2.total : void 0;
          const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
          const progressBytes = Math.max(0, loaded - bytesNotified);
          const rate = _speedometer(progressBytes);
          bytesNotified = Math.max(bytesNotified, loaded);
          const data = {
            loaded,
            total,
            progress: total ? loaded / total : void 0,
            bytes: progressBytes,
            rate: rate ? rate : void 0,
            estimated: rate && total ? (total - loaded) / rate : void 0,
            event: e2,
            lengthComputable: total != null,
            [isDownloadStream ? "download" : "upload"]: true
          };
          listener(data);
        }, freq);
      };
      var progressEventDecorator = (total, throttled) => {
        const lengthComputable = total != null;
        return [
          (loaded) => throttled[0]({
            lengthComputable,
            total,
            loaded
          }),
          throttled[1]
        ];
      };
      var asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
      var isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin3, isMSIE) => (url2) => {
        url2 = new URL(url2, platform.origin);
        return origin3.protocol === url2.protocol && origin3.host === url2.host && (isMSIE || origin3.port === url2.port);
      })(
        new URL(platform.origin),
        platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
      ) : () => true;
      var cookies = platform.hasStandardBrowserEnv ? (
        // Standard browser envs support document.cookie
        {
          write(name2, value, expires, path, domain2, secure, sameSite) {
            if (typeof document === "undefined") return;
            const cookie = [`${name2}=${encodeURIComponent(value)}`];
            if (utils$1.isNumber(expires)) {
              cookie.push(`expires=${new Date(expires).toUTCString()}`);
            }
            if (utils$1.isString(path)) {
              cookie.push(`path=${path}`);
            }
            if (utils$1.isString(domain2)) {
              cookie.push(`domain=${domain2}`);
            }
            if (secure === true) {
              cookie.push("secure");
            }
            if (utils$1.isString(sameSite)) {
              cookie.push(`SameSite=${sameSite}`);
            }
            document.cookie = cookie.join("; ");
          },
          read(name2) {
            if (typeof document === "undefined") return null;
            const cookies2 = document.cookie.split(";");
            for (let i5 = 0; i5 < cookies2.length; i5++) {
              const cookie = cookies2[i5].replace(/^\s+/, "");
              const eq4 = cookie.indexOf("=");
              if (eq4 !== -1 && cookie.slice(0, eq4) === name2) {
                return decodeURIComponent(cookie.slice(eq4 + 1));
              }
            }
            return null;
          },
          remove(name2) {
            this.write(name2, "", Date.now() - 864e5, "/");
          }
        }
      ) : (
        // Non-standard browser env (web workers, react-native) lack needed support.
        {
          write() {
          },
          read() {
            return null;
          },
          remove() {
          }
        }
      );
      function isAbsoluteURL(url2) {
        if (typeof url2 !== "string") {
          return false;
        }
        return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
      }
      function combineURLs(baseURL, relativeURL) {
        return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
      }
      function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
        let isRelativeUrl = !isAbsoluteURL(requestedURL);
        if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
          return combineURLs(baseURL, requestedURL);
        }
        return requestedURL;
      }
      var headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
      function mergeConfig(config1, config2) {
        config2 = config2 || {};
        const config3 = /* @__PURE__ */ Object.create(null);
        Object.defineProperty(config3, "hasOwnProperty", {
          // Null-proto descriptor so a polluted Object.prototype.get cannot turn
          // this data descriptor into an accessor descriptor on the way in.
          __proto__: null,
          value: Object.prototype.hasOwnProperty,
          enumerable: false,
          writable: true,
          configurable: true
        });
        function getMergedValue(target, source, prop, caseless) {
          if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
            return utils$1.merge.call({ caseless }, target, source);
          } else if (utils$1.isPlainObject(source)) {
            return utils$1.merge({}, source);
          } else if (utils$1.isArray(source)) {
            return source.slice();
          }
          return source;
        }
        function mergeDeepProperties(a5, b9, prop, caseless) {
          if (!utils$1.isUndefined(b9)) {
            return getMergedValue(a5, b9, prop, caseless);
          } else if (!utils$1.isUndefined(a5)) {
            return getMergedValue(void 0, a5, prop, caseless);
          }
        }
        function valueFromConfig2(a5, b9) {
          if (!utils$1.isUndefined(b9)) {
            return getMergedValue(void 0, b9);
          }
        }
        function defaultToConfig2(a5, b9) {
          if (!utils$1.isUndefined(b9)) {
            return getMergedValue(void 0, b9);
          } else if (!utils$1.isUndefined(a5)) {
            return getMergedValue(void 0, a5);
          }
        }
        function mergeDirectKeys(a5, b9, prop) {
          if (utils$1.hasOwnProp(config2, prop)) {
            return getMergedValue(a5, b9);
          } else if (utils$1.hasOwnProp(config1, prop)) {
            return getMergedValue(void 0, a5);
          }
        }
        const mergeMap = {
          url: valueFromConfig2,
          method: valueFromConfig2,
          data: valueFromConfig2,
          baseURL: defaultToConfig2,
          transformRequest: defaultToConfig2,
          transformResponse: defaultToConfig2,
          paramsSerializer: defaultToConfig2,
          timeout: defaultToConfig2,
          timeoutMessage: defaultToConfig2,
          withCredentials: defaultToConfig2,
          withXSRFToken: defaultToConfig2,
          adapter: defaultToConfig2,
          responseType: defaultToConfig2,
          xsrfCookieName: defaultToConfig2,
          xsrfHeaderName: defaultToConfig2,
          onUploadProgress: defaultToConfig2,
          onDownloadProgress: defaultToConfig2,
          decompress: defaultToConfig2,
          maxContentLength: defaultToConfig2,
          maxBodyLength: defaultToConfig2,
          beforeRedirect: defaultToConfig2,
          transport: defaultToConfig2,
          httpAgent: defaultToConfig2,
          httpsAgent: defaultToConfig2,
          cancelToken: defaultToConfig2,
          socketPath: defaultToConfig2,
          allowedSocketPaths: defaultToConfig2,
          responseEncoding: defaultToConfig2,
          validateStatus: mergeDirectKeys,
          headers: (a5, b9, prop) => mergeDeepProperties(headersToObject(a5), headersToObject(b9), prop, true)
        };
        utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
          if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
          const merge3 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
          const a5 = utils$1.hasOwnProp(config1, prop) ? config1[prop] : void 0;
          const b9 = utils$1.hasOwnProp(config2, prop) ? config2[prop] : void 0;
          const configValue = merge3(a5, b9, prop);
          utils$1.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config3[prop] = configValue);
        });
        return config3;
      }
      var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
      function setFormDataHeaders(headers, formHeaders, policy) {
        if (policy !== "content-only") {
          headers.set(formHeaders);
          return;
        }
        Object.entries(formHeaders).forEach(([key2, val]) => {
          if (FORM_DATA_CONTENT_HEADERS.includes(key2.toLowerCase())) {
            headers.set(key2, val);
          }
        });
      }
      var encodeUTF8 = (str) => encodeURIComponent(str).replace(
        /%([0-9A-F]{2})/gi,
        (_6, hex3) => String.fromCharCode(parseInt(hex3, 16))
      );
      var resolveConfig = (config2) => {
        const newConfig = mergeConfig({}, config2);
        const own2 = (key2) => utils$1.hasOwnProp(newConfig, key2) ? newConfig[key2] : void 0;
        const data = own2("data");
        let withXSRFToken = own2("withXSRFToken");
        const xsrfHeaderName = own2("xsrfHeaderName");
        const xsrfCookieName = own2("xsrfCookieName");
        let headers = own2("headers");
        const auth = own2("auth");
        const baseURL = own2("baseURL");
        const allowAbsoluteUrls = own2("allowAbsoluteUrls");
        const url2 = own2("url");
        newConfig.headers = headers = AxiosHeaders.from(headers);
        newConfig.url = buildURL(
          buildFullPath(baseURL, url2, allowAbsoluteUrls),
          config2.params,
          config2.paramsSerializer
        );
        if (auth) {
          headers.set(
            "Authorization",
            "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : ""))
          );
        }
        if (utils$1.isFormData(data)) {
          if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
            headers.setContentType(void 0);
          } else if (utils$1.isFunction(data.getHeaders)) {
            setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
          }
        }
        if (platform.hasStandardBrowserEnv) {
          if (utils$1.isFunction(withXSRFToken)) {
            withXSRFToken = withXSRFToken(newConfig);
          }
          const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin(newConfig.url);
          if (shouldSendXSRF) {
            const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
            if (xsrfValue) {
              headers.set(xsrfHeaderName, xsrfValue);
            }
          }
        }
        return newConfig;
      };
      var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
      var xhrAdapter = isXHRAdapterSupported && function(config2) {
        return new Promise(function dispatchXhrRequest(resolve, reject2) {
          const _config = resolveConfig(config2);
          let requestData = _config.data;
          const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
          let { responseType, onUploadProgress, onDownloadProgress } = _config;
          let onCanceled;
          let uploadThrottled, downloadThrottled;
          let flushUpload, flushDownload;
          function done() {
            flushUpload && flushUpload();
            flushDownload && flushDownload();
            _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
            _config.signal && _config.signal.removeEventListener("abort", onCanceled);
          }
          let request = new XMLHttpRequest();
          request.open(_config.method.toUpperCase(), _config.url, true);
          request.timeout = _config.timeout;
          function onloadend() {
            if (!request) {
              return;
            }
            const responseHeaders = AxiosHeaders.from(
              "getAllResponseHeaders" in request && request.getAllResponseHeaders()
            );
            const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
            const response = {
              data: responseData,
              status: request.status,
              statusText: request.statusText,
              headers: responseHeaders,
              config: config2,
              request
            };
            settle(
              function _resolve(value) {
                resolve(value);
                done();
              },
              function _reject(err2) {
                reject2(err2);
                done();
              },
              response
            );
            request = null;
          }
          if ("onloadend" in request) {
            request.onloadend = onloadend;
          } else {
            request.onreadystatechange = function handleLoad() {
              if (!request || request.readyState !== 4) {
                return;
              }
              if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) {
                return;
              }
              setTimeout(onloadend);
            };
          }
          request.onabort = function handleAbort() {
            if (!request) {
              return;
            }
            reject2(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config2, request));
            done();
            request = null;
          };
          request.onerror = function handleError(event) {
            const msg = event && event.message ? event.message : "Network Error";
            const err2 = new AxiosError(msg, AxiosError.ERR_NETWORK, config2, request);
            err2.event = event || null;
            reject2(err2);
            done();
            request = null;
          };
          request.ontimeout = function handleTimeout() {
            let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
            const transitional = _config.transitional || transitionalDefaults;
            if (_config.timeoutErrorMessage) {
              timeoutErrorMessage = _config.timeoutErrorMessage;
            }
            reject2(
              new AxiosError(
                timeoutErrorMessage,
                transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
                config2,
                request
              )
            );
            done();
            request = null;
          };
          requestData === void 0 && requestHeaders.setContentType(null);
          if ("setRequestHeader" in request) {
            utils$1.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key2) {
              request.setRequestHeader(key2, val);
            });
          }
          if (!utils$1.isUndefined(_config.withCredentials)) {
            request.withCredentials = !!_config.withCredentials;
          }
          if (responseType && responseType !== "json") {
            request.responseType = _config.responseType;
          }
          if (onDownloadProgress) {
            [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
            request.addEventListener("progress", downloadThrottled);
          }
          if (onUploadProgress && request.upload) {
            [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
            request.upload.addEventListener("progress", uploadThrottled);
            request.upload.addEventListener("loadend", flushUpload);
          }
          if (_config.cancelToken || _config.signal) {
            onCanceled = (cancel) => {
              if (!request) {
                return;
              }
              reject2(!cancel || cancel.type ? new CanceledError(null, config2, request) : cancel);
              request.abort();
              done();
              request = null;
            };
            _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
            if (_config.signal) {
              _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
            }
          }
          const protocol = parseProtocol(_config.url);
          if (protocol && !platform.protocols.includes(protocol)) {
            reject2(
              new AxiosError(
                "Unsupported protocol " + protocol + ":",
                AxiosError.ERR_BAD_REQUEST,
                config2
              )
            );
            return;
          }
          request.send(requestData || null);
        });
      };
      var composeSignals = (signals, timeout) => {
        signals = signals ? signals.filter(Boolean) : [];
        if (!timeout && !signals.length) {
          return;
        }
        const controller = new AbortController();
        let aborted2 = false;
        const onabort = function(reason) {
          if (!aborted2) {
            aborted2 = true;
            unsubscribe();
            const err2 = reason instanceof Error ? reason : this.reason;
            controller.abort(
              err2 instanceof AxiosError ? err2 : new CanceledError(err2 instanceof Error ? err2.message : err2)
            );
          }
        };
        let timer = timeout && setTimeout(() => {
          timer = null;
          onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
        }, timeout);
        const unsubscribe = () => {
          if (!signals) {
            return;
          }
          timer && clearTimeout(timer);
          timer = null;
          signals.forEach((signal2) => {
            signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
          });
          signals = null;
        };
        signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
        const { signal } = controller;
        signal.unsubscribe = () => utils$1.asap(unsubscribe);
        return signal;
      };
      var streamChunk = function* (chunk, chunkSize) {
        let len = chunk.byteLength;
        if (len < chunkSize) {
          yield chunk;
          return;
        }
        let pos = 0;
        let end;
        while (pos < len) {
          end = pos + chunkSize;
          yield chunk.slice(pos, end);
          pos = end;
        }
      };
      var readBytes = async function* (iterable, chunkSize) {
        for await (const chunk of readStream(iterable)) {
          yield* streamChunk(chunk, chunkSize);
        }
      };
      var readStream = async function* (stream) {
        if (stream[Symbol.asyncIterator]) {
          yield* stream;
          return;
        }
        const reader = stream.getReader();
        try {
          for (; ; ) {
            const { done, value } = await reader.read();
            if (done) {
              break;
            }
            yield value;
          }
        } finally {
          await reader.cancel();
        }
      };
      var trackStream = (stream, chunkSize, onProgress, onFinish) => {
        const iterator2 = readBytes(stream, chunkSize);
        let bytes = 0;
        let done;
        let _onFinish = (e2) => {
          if (!done) {
            done = true;
            onFinish && onFinish(e2);
          }
        };
        return new ReadableStream(
          {
            async pull(controller) {
              try {
                const { done: done2, value } = await iterator2.next();
                if (done2) {
                  _onFinish();
                  controller.close();
                  return;
                }
                let len = value.byteLength;
                if (onProgress) {
                  let loadedBytes = bytes += len;
                  onProgress(loadedBytes);
                }
                controller.enqueue(new Uint8Array(value));
              } catch (err2) {
                _onFinish(err2);
                throw err2;
              }
            },
            cancel(reason) {
              _onFinish(reason);
              return iterator2.return();
            }
          },
          {
            highWaterMark: 2
          }
        );
      };
      function estimateDataURLDecodedBytes(url2) {
        if (!url2 || typeof url2 !== "string") return 0;
        if (!url2.startsWith("data:")) return 0;
        const comma = url2.indexOf(",");
        if (comma < 0) return 0;
        const meta3 = url2.slice(5, comma);
        const body = url2.slice(comma + 1);
        const isBase64 = /;base64/i.test(meta3);
        if (isBase64) {
          let effectiveLen = body.length;
          const len = body.length;
          for (let i5 = 0; i5 < len; i5++) {
            if (body.charCodeAt(i5) === 37 && i5 + 2 < len) {
              const a5 = body.charCodeAt(i5 + 1);
              const b9 = body.charCodeAt(i5 + 2);
              const isHex2 = (a5 >= 48 && a5 <= 57 || a5 >= 65 && a5 <= 70 || a5 >= 97 && a5 <= 102) && (b9 >= 48 && b9 <= 57 || b9 >= 65 && b9 <= 70 || b9 >= 97 && b9 <= 102);
              if (isHex2) {
                effectiveLen -= 2;
                i5 += 2;
              }
            }
          }
          let pad4 = 0;
          let idx = len - 1;
          const tailIsPct3D = (j6) => j6 >= 2 && body.charCodeAt(j6 - 2) === 37 && // '%'
          body.charCodeAt(j6 - 1) === 51 && // '3'
          (body.charCodeAt(j6) === 68 || body.charCodeAt(j6) === 100);
          if (idx >= 0) {
            if (body.charCodeAt(idx) === 61) {
              pad4++;
              idx--;
            } else if (tailIsPct3D(idx)) {
              pad4++;
              idx -= 3;
            }
          }
          if (pad4 === 1 && idx >= 0) {
            if (body.charCodeAt(idx) === 61) {
              pad4++;
            } else if (tailIsPct3D(idx)) {
              pad4++;
            }
          }
          const groups = Math.floor(effectiveLen / 4);
          const bytes2 = groups * 3 - (pad4 || 0);
          return bytes2 > 0 ? bytes2 : 0;
        }
        if (typeof Buffer2 !== "undefined" && typeof Buffer2.byteLength === "function") {
          return Buffer2.byteLength(body, "utf8");
        }
        let bytes = 0;
        for (let i5 = 0, len = body.length; i5 < len; i5++) {
          const c7 = body.charCodeAt(i5);
          if (c7 < 128) {
            bytes += 1;
          } else if (c7 < 2048) {
            bytes += 2;
          } else if (c7 >= 55296 && c7 <= 56319 && i5 + 1 < len) {
            const next = body.charCodeAt(i5 + 1);
            if (next >= 56320 && next <= 57343) {
              bytes += 4;
              i5++;
            } else {
              bytes += 3;
            }
          } else {
            bytes += 3;
          }
        }
        return bytes;
      }
      var VERSION = "1.16.1";
      var DEFAULT_CHUNK_SIZE = 64 * 1024;
      var { isFunction } = utils$1;
      var test = (fn, ...args) => {
        try {
          return !!fn(...args);
        } catch (e2) {
          return false;
        }
      };
      var factory = (env) => {
        const globalObject = utils$1.global !== void 0 && utils$1.global !== null ? utils$1.global : globalThis;
        const { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = globalObject;
        env = utils$1.merge.call(
          {
            skipUndefined: true
          },
          {
            Request: globalObject.Request,
            Response: globalObject.Response
          },
          env
        );
        const { fetch: envFetch, Request: Request2, Response } = env;
        const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function";
        const isRequestSupported = isFunction(Request2);
        const isResponseSupported = isFunction(Response);
        if (!isFetchSupported) {
          return false;
        }
        const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream2);
        const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder5) => (str) => encoder5.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request2(str).arrayBuffer()));
        const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
          let duplexAccessed = false;
          const request = new Request2(platform.origin, {
            body: new ReadableStream2(),
            method: "POST",
            get duplex() {
              duplexAccessed = true;
              return "half";
            }
          });
          const hasContentType = request.headers.has("Content-Type");
          if (request.body != null) {
            request.body.cancel();
          }
          return duplexAccessed && !hasContentType;
        });
        const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
        const resolvers = {
          stream: supportsResponseStream && ((res) => res.body)
        };
        isFetchSupported && (() => {
          ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type2) => {
            !resolvers[type2] && (resolvers[type2] = (res, config2) => {
              let method = res && res[type2];
              if (method) {
                return method.call(res);
              }
              throw new AxiosError(
                `Response type '${type2}' is not supported`,
                AxiosError.ERR_NOT_SUPPORT,
                config2
              );
            });
          });
        })();
        const getBodyLength = async (body) => {
          if (body == null) {
            return 0;
          }
          if (utils$1.isBlob(body)) {
            return body.size;
          }
          if (utils$1.isSpecCompliantForm(body)) {
            const _request = new Request2(platform.origin, {
              method: "POST",
              body
            });
            return (await _request.arrayBuffer()).byteLength;
          }
          if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
            return body.byteLength;
          }
          if (utils$1.isURLSearchParams(body)) {
            body = body + "";
          }
          if (utils$1.isString(body)) {
            return (await encodeText(body)).byteLength;
          }
        };
        const resolveBodyLength = async (headers, body) => {
          const length2 = utils$1.toFiniteNumber(headers.getContentLength());
          return length2 == null ? getBodyLength(body) : length2;
        };
        return async (config2) => {
          let {
            url: url2,
            method,
            data,
            signal,
            cancelToken,
            timeout,
            onDownloadProgress,
            onUploadProgress,
            responseType,
            headers,
            withCredentials = "same-origin",
            fetchOptions,
            maxContentLength,
            maxBodyLength
          } = resolveConfig(config2);
          const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
          const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
          let _fetch = envFetch || fetch;
          responseType = responseType ? (responseType + "").toLowerCase() : "text";
          let composedSignal = composeSignals(
            [signal, cancelToken && cancelToken.toAbortSignal()],
            timeout
          );
          let request = null;
          const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
            composedSignal.unsubscribe();
          });
          let requestContentLength;
          try {
            if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
              const estimated = estimateDataURLDecodedBytes(url2);
              if (estimated > maxContentLength) {
                throw new AxiosError(
                  "maxContentLength size of " + maxContentLength + " exceeded",
                  AxiosError.ERR_BAD_RESPONSE,
                  config2,
                  request
                );
              }
            }
            if (hasMaxBodyLength && method !== "get" && method !== "head") {
              const outboundLength = await resolveBodyLength(headers, data);
              if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
                throw new AxiosError(
                  "Request body larger than maxBodyLength limit",
                  AxiosError.ERR_BAD_REQUEST,
                  config2,
                  request
                );
              }
            }
            if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
              let _request = new Request2(url2, {
                method: "POST",
                body: data,
                duplex: "half"
              });
              let contentTypeHeader;
              if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
                headers.setContentType(contentTypeHeader);
              }
              if (_request.body) {
                const [onProgress, flush] = progressEventDecorator(
                  requestContentLength,
                  progressEventReducer(asyncDecorator(onUploadProgress))
                );
                data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
              }
            }
            if (!utils$1.isString(withCredentials)) {
              withCredentials = withCredentials ? "include" : "omit";
            }
            const isCredentialsSupported = isRequestSupported && "credentials" in Request2.prototype;
            if (utils$1.isFormData(data)) {
              const contentType = headers.getContentType();
              if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) {
                headers.delete("content-type");
              }
            }
            headers.set("User-Agent", "axios/" + VERSION, false);
            const resolvedOptions = {
              ...fetchOptions,
              signal: composedSignal,
              method: method.toUpperCase(),
              headers: toByteStringHeaderObject(headers.normalize()),
              body: data,
              duplex: "half",
              credentials: isCredentialsSupported ? withCredentials : void 0
            };
            request = isRequestSupported && new Request2(url2, resolvedOptions);
            let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
            if (hasMaxContentLength) {
              const declaredLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
              if (declaredLength != null && declaredLength > maxContentLength) {
                throw new AxiosError(
                  "maxContentLength size of " + maxContentLength + " exceeded",
                  AxiosError.ERR_BAD_RESPONSE,
                  config2,
                  request
                );
              }
            }
            const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
            if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
              const options = {};
              ["status", "statusText", "headers"].forEach((prop) => {
                options[prop] = response[prop];
              });
              const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
              const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
                responseContentLength,
                progressEventReducer(asyncDecorator(onDownloadProgress), true)
              ) || [];
              let bytesRead = 0;
              const onChunkProgress = (loadedBytes) => {
                if (hasMaxContentLength) {
                  bytesRead = loadedBytes;
                  if (bytesRead > maxContentLength) {
                    throw new AxiosError(
                      "maxContentLength size of " + maxContentLength + " exceeded",
                      AxiosError.ERR_BAD_RESPONSE,
                      config2,
                      request
                    );
                  }
                }
                onProgress && onProgress(loadedBytes);
              };
              response = new Response(
                trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
                  flush && flush();
                  unsubscribe && unsubscribe();
                }),
                options
              );
            }
            responseType = responseType || "text";
            let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](
              response,
              config2
            );
            if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
              let materializedSize;
              if (responseData != null) {
                if (typeof responseData.byteLength === "number") {
                  materializedSize = responseData.byteLength;
                } else if (typeof responseData.size === "number") {
                  materializedSize = responseData.size;
                } else if (typeof responseData === "string") {
                  materializedSize = typeof TextEncoder2 === "function" ? new TextEncoder2().encode(responseData).byteLength : responseData.length;
                }
              }
              if (typeof materializedSize === "number" && materializedSize > maxContentLength) {
                throw new AxiosError(
                  "maxContentLength size of " + maxContentLength + " exceeded",
                  AxiosError.ERR_BAD_RESPONSE,
                  config2,
                  request
                );
              }
            }
            !isStreamResponse && unsubscribe && unsubscribe();
            return await new Promise((resolve, reject2) => {
              settle(resolve, reject2, {
                data: responseData,
                headers: AxiosHeaders.from(response.headers),
                status: response.status,
                statusText: response.statusText,
                config: config2,
                request
              });
            });
          } catch (err2) {
            unsubscribe && unsubscribe();
            if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {
              const canceledError = composedSignal.reason;
              canceledError.config = config2;
              request && (canceledError.request = request);
              err2 !== canceledError && (canceledError.cause = err2);
              throw canceledError;
            }
            if (err2 && err2.name === "TypeError" && /Load failed|fetch/i.test(err2.message)) {
              throw Object.assign(
                new AxiosError(
                  "Network Error",
                  AxiosError.ERR_NETWORK,
                  config2,
                  request,
                  err2 && err2.response
                ),
                {
                  cause: err2.cause || err2
                }
              );
            }
            throw AxiosError.from(err2, err2 && err2.code, config2, request, err2 && err2.response);
          }
        };
      };
      var seedCache = /* @__PURE__ */ new Map();
      var getFetch = (config2) => {
        let env = config2 && config2.env || {};
        const { fetch: fetch2, Request: Request2, Response } = env;
        const seeds = [Request2, Response, fetch2];
        let len = seeds.length, i5 = len, seed, target, map2 = seedCache;
        while (i5--) {
          seed = seeds[i5];
          target = map2.get(seed);
          target === void 0 && map2.set(seed, target = i5 ? /* @__PURE__ */ new Map() : factory(env));
          map2 = target;
        }
        return target;
      };
      getFetch();
      var knownAdapters = {
        http: httpAdapter,
        xhr: xhrAdapter,
        fetch: {
          get: getFetch
        }
      };
      utils$1.forEach(knownAdapters, (fn, value) => {
        if (fn) {
          try {
            Object.defineProperty(fn, "name", { __proto__: null, value });
          } catch (e2) {
          }
          Object.defineProperty(fn, "adapterName", { __proto__: null, value });
        }
      });
      var renderReason = (reason) => `- ${reason}`;
      var isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
      function getAdapter(adapters2, config2) {
        adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
        const { length: length2 } = adapters2;
        let nameOrAdapter;
        let adapter;
        const rejectedReasons = {};
        for (let i5 = 0; i5 < length2; i5++) {
          nameOrAdapter = adapters2[i5];
          let id;
          adapter = nameOrAdapter;
          if (!isResolvedHandle(nameOrAdapter)) {
            adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
            if (adapter === void 0) {
              throw new AxiosError(`Unknown adapter '${id}'`);
            }
          }
          if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config2)))) {
            break;
          }
          rejectedReasons[id || "#" + i5] = adapter;
        }
        if (!adapter) {
          const reasons = Object.entries(rejectedReasons).map(
            ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
          );
          let s3 = length2 ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
          throw new AxiosError(
            `There is no suitable adapter to dispatch the request ` + s3,
            "ERR_NOT_SUPPORT"
          );
        }
        return adapter;
      }
      var adapters = {
        /**
         * Resolve an adapter from a list of adapter names or functions.
         * @type {Function}
         */
        getAdapter,
        /**
         * Exposes all known adapters
         * @type {Object<string, Function|Object>}
         */
        adapters: knownAdapters
      };
      function throwIfCancellationRequested(config2) {
        if (config2.cancelToken) {
          config2.cancelToken.throwIfRequested();
        }
        if (config2.signal && config2.signal.aborted) {
          throw new CanceledError(null, config2);
        }
      }
      function dispatchRequest(config2) {
        throwIfCancellationRequested(config2);
        config2.headers = AxiosHeaders.from(config2.headers);
        config2.data = transformData.call(config2, config2.transformRequest);
        if (["post", "put", "patch"].indexOf(config2.method) !== -1) {
          config2.headers.setContentType("application/x-www-form-urlencoded", false);
        }
        const adapter = adapters.getAdapter(config2.adapter || defaults.adapter, config2);
        return adapter(config2).then(
          function onAdapterResolution(response) {
            throwIfCancellationRequested(config2);
            config2.response = response;
            try {
              response.data = transformData.call(config2, config2.transformResponse, response);
            } finally {
              delete config2.response;
            }
            response.headers = AxiosHeaders.from(response.headers);
            return response;
          },
          function onAdapterRejection(reason) {
            if (!isCancel(reason)) {
              throwIfCancellationRequested(config2);
              if (reason && reason.response) {
                config2.response = reason.response;
                try {
                  reason.response.data = transformData.call(
                    config2,
                    config2.transformResponse,
                    reason.response
                  );
                } finally {
                  delete config2.response;
                }
                reason.response.headers = AxiosHeaders.from(reason.response.headers);
              }
            }
            return Promise.reject(reason);
          }
        );
      }
      var validators$1 = {};
      ["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i5) => {
        validators$1[type2] = function validator2(thing) {
          return typeof thing === type2 || "a" + (i5 < 1 ? "n " : " ") + type2;
        };
      });
      var deprecatedWarnings = {};
      validators$1.transitional = function transitional(validator2, version16, message) {
        function formatMessage(opt, desc) {
          return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
        }
        return (value, opt, opts) => {
          if (validator2 === false) {
            throw new AxiosError(
              formatMessage(opt, " has been removed" + (version16 ? " in " + version16 : "")),
              AxiosError.ERR_DEPRECATED
            );
          }
          if (version16 && !deprecatedWarnings[opt]) {
            deprecatedWarnings[opt] = true;
            console.warn(
              formatMessage(
                opt,
                " has been deprecated since v" + version16 + " and will be removed in the near future"
              )
            );
          }
          return validator2 ? validator2(value, opt, opts) : true;
        };
      };
      validators$1.spelling = function spelling(correctSpelling) {
        return (value, opt) => {
          console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
          return true;
        };
      };
      function assertOptions(options, schema, allowUnknown) {
        if (typeof options !== "object") {
          throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
        }
        const keys2 = Object.keys(options);
        let i5 = keys2.length;
        while (i5-- > 0) {
          const opt = keys2[i5];
          const validator2 = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0;
          if (validator2) {
            const value = options[opt];
            const result = value === void 0 || validator2(value, opt, options);
            if (result !== true) {
              throw new AxiosError(
                "option " + opt + " must be " + result,
                AxiosError.ERR_BAD_OPTION_VALUE
              );
            }
            continue;
          }
          if (allowUnknown !== true) {
            throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
          }
        }
      }
      var validator = {
        assertOptions,
        validators: validators$1
      };
      var validators = validator.validators;
      var Axios = class {
        constructor(instanceConfig) {
          this.defaults = instanceConfig || {};
          this.interceptors = {
            request: new InterceptorManager(),
            response: new InterceptorManager()
          };
        }
        /**
         * Dispatch a request
         *
         * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
         * @param {?Object} config
         *
         * @returns {Promise} The Promise to be fulfilled
         */
        async request(configOrUrl, config2) {
          try {
            return await this._request(configOrUrl, config2);
          } catch (err2) {
            if (err2 instanceof Error) {
              let dummy = {};
              Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
              const stack = (() => {
                if (!dummy.stack) {
                  return "";
                }
                const firstNewlineIndex = dummy.stack.indexOf("\n");
                return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
              })();
              try {
                if (!err2.stack) {
                  err2.stack = stack;
                } else if (stack) {
                  const firstNewlineIndex = stack.indexOf("\n");
                  const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
                  const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
                  if (!String(err2.stack).endsWith(stackWithoutTwoTopLines)) {
                    err2.stack += "\n" + stack;
                  }
                }
              } catch (e2) {
              }
            }
            throw err2;
          }
        }
        _request(configOrUrl, config2) {
          if (typeof configOrUrl === "string") {
            config2 = config2 || {};
            config2.url = configOrUrl;
          } else {
            config2 = configOrUrl || {};
          }
          config2 = mergeConfig(this.defaults, config2);
          const { transitional, paramsSerializer, headers } = config2;
          if (transitional !== void 0) {
            validator.assertOptions(
              transitional,
              {
                silentJSONParsing: validators.transitional(validators.boolean),
                forcedJSONParsing: validators.transitional(validators.boolean),
                clarifyTimeoutError: validators.transitional(validators.boolean),
                legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
              },
              false
            );
          }
          if (paramsSerializer != null) {
            if (utils$1.isFunction(paramsSerializer)) {
              config2.paramsSerializer = {
                serialize: paramsSerializer
              };
            } else {
              validator.assertOptions(
                paramsSerializer,
                {
                  encode: validators.function,
                  serialize: validators.function
                },
                true
              );
            }
          }
          if (config2.allowAbsoluteUrls !== void 0) ;
          else if (this.defaults.allowAbsoluteUrls !== void 0) {
            config2.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
          } else {
            config2.allowAbsoluteUrls = true;
          }
          validator.assertOptions(
            config2,
            {
              baseUrl: validators.spelling("baseURL"),
              withXsrfToken: validators.spelling("withXSRFToken")
            },
            true
          );
          config2.method = (config2.method || this.defaults.method || "get").toLowerCase();
          let contextHeaders = headers && utils$1.merge(headers.common, headers[config2.method]);
          headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
            delete headers[method];
          });
          config2.headers = AxiosHeaders.concat(contextHeaders, headers);
          const requestInterceptorChain = [];
          let synchronousRequestInterceptors = true;
          this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
            if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config2) === false) {
              return;
            }
            synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
            const transitional2 = config2.transitional || transitionalDefaults;
            const legacyInterceptorReqResOrdering = transitional2 && transitional2.legacyInterceptorReqResOrdering;
            if (legacyInterceptorReqResOrdering) {
              requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
            } else {
              requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
            }
          });
          const responseInterceptorChain = [];
          this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
            responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
          });
          let promise2;
          let i5 = 0;
          let len;
          if (!synchronousRequestInterceptors) {
            const chain2 = [dispatchRequest.bind(this), void 0];
            chain2.unshift(...requestInterceptorChain);
            chain2.push(...responseInterceptorChain);
            len = chain2.length;
            promise2 = Promise.resolve(config2);
            while (i5 < len) {
              promise2 = promise2.then(chain2[i5++], chain2[i5++]);
            }
            return promise2;
          }
          len = requestInterceptorChain.length;
          let newConfig = config2;
          while (i5 < len) {
            const onFulfilled = requestInterceptorChain[i5++];
            const onRejected = requestInterceptorChain[i5++];
            try {
              newConfig = onFulfilled(newConfig);
            } catch (error51) {
              onRejected.call(this, error51);
              break;
            }
          }
          try {
            promise2 = dispatchRequest.call(this, newConfig);
          } catch (error51) {
            return Promise.reject(error51);
          }
          i5 = 0;
          len = responseInterceptorChain.length;
          while (i5 < len) {
            promise2 = promise2.then(responseInterceptorChain[i5++], responseInterceptorChain[i5++]);
          }
          return promise2;
        }
        getUri(config2) {
          config2 = mergeConfig(this.defaults, config2);
          const fullPath = buildFullPath(config2.baseURL, config2.url, config2.allowAbsoluteUrls);
          return buildURL(fullPath, config2.params, config2.paramsSerializer);
        }
      };
      utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
        Axios.prototype[method] = function(url2, config2) {
          return this.request(
            mergeConfig(config2 || {}, {
              method,
              url: url2,
              data: (config2 || {}).data
            })
          );
        };
      });
      utils$1.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
        function generateHTTPMethod(isForm) {
          return function httpMethod(url2, data, config2) {
            return this.request(
              mergeConfig(config2 || {}, {
                method,
                headers: isForm ? {
                  "Content-Type": "multipart/form-data"
                } : {},
                url: url2,
                data
              })
            );
          };
        }
        Axios.prototype[method] = generateHTTPMethod();
        if (method !== "query") {
          Axios.prototype[method + "Form"] = generateHTTPMethod(true);
        }
      });
      var CancelToken = class _CancelToken {
        constructor(executor) {
          if (typeof executor !== "function") {
            throw new TypeError("executor must be a function.");
          }
          let resolvePromise;
          this.promise = new Promise(function promiseExecutor(resolve) {
            resolvePromise = resolve;
          });
          const token = this;
          this.promise.then((cancel) => {
            if (!token._listeners) return;
            let i5 = token._listeners.length;
            while (i5-- > 0) {
              token._listeners[i5](cancel);
            }
            token._listeners = null;
          });
          this.promise.then = (onfulfilled) => {
            let _resolve;
            const promise2 = new Promise((resolve) => {
              token.subscribe(resolve);
              _resolve = resolve;
            }).then(onfulfilled);
            promise2.cancel = function reject2() {
              token.unsubscribe(_resolve);
            };
            return promise2;
          };
          executor(function cancel(message, config2, request) {
            if (token.reason) {
              return;
            }
            token.reason = new CanceledError(message, config2, request);
            resolvePromise(token.reason);
          });
        }
        /**
         * Throws a `CanceledError` if cancellation has been requested.
         */
        throwIfRequested() {
          if (this.reason) {
            throw this.reason;
          }
        }
        /**
         * Subscribe to the cancel signal
         */
        subscribe(listener) {
          if (this.reason) {
            listener(this.reason);
            return;
          }
          if (this._listeners) {
            this._listeners.push(listener);
          } else {
            this._listeners = [listener];
          }
        }
        /**
         * Unsubscribe from the cancel signal
         */
        unsubscribe(listener) {
          if (!this._listeners) {
            return;
          }
          const index2 = this._listeners.indexOf(listener);
          if (index2 !== -1) {
            this._listeners.splice(index2, 1);
          }
        }
        toAbortSignal() {
          const controller = new AbortController();
          const abort = (err2) => {
            controller.abort(err2);
          };
          this.subscribe(abort);
          controller.signal.unsubscribe = () => this.unsubscribe(abort);
          return controller.signal;
        }
        /**
         * Returns an object that contains a new `CancelToken` and a function that, when called,
         * cancels the `CancelToken`.
         */
        static source() {
          let cancel;
          const token = new _CancelToken(function executor(c7) {
            cancel = c7;
          });
          return {
            token,
            cancel
          };
        }
      };
      function spread(callback) {
        return function wrap3(arr) {
          return callback.apply(null, arr);
        };
      }
      function isAxiosError(payload) {
        return utils$1.isObject(payload) && payload.isAxiosError === true;
      }
      var HttpStatusCode = {
        Continue: 100,
        SwitchingProtocols: 101,
        Processing: 102,
        EarlyHints: 103,
        Ok: 200,
        Created: 201,
        Accepted: 202,
        NonAuthoritativeInformation: 203,
        NoContent: 204,
        ResetContent: 205,
        PartialContent: 206,
        MultiStatus: 207,
        AlreadyReported: 208,
        ImUsed: 226,
        MultipleChoices: 300,
        MovedPermanently: 301,
        Found: 302,
        SeeOther: 303,
        NotModified: 304,
        UseProxy: 305,
        Unused: 306,
        TemporaryRedirect: 307,
        PermanentRedirect: 308,
        BadRequest: 400,
        Unauthorized: 401,
        PaymentRequired: 402,
        Forbidden: 403,
        NotFound: 404,
        MethodNotAllowed: 405,
        NotAcceptable: 406,
        ProxyAuthenticationRequired: 407,
        RequestTimeout: 408,
        Conflict: 409,
        Gone: 410,
        LengthRequired: 411,
        PreconditionFailed: 412,
        PayloadTooLarge: 413,
        UriTooLong: 414,
        UnsupportedMediaType: 415,
        RangeNotSatisfiable: 416,
        ExpectationFailed: 417,
        ImATeapot: 418,
        MisdirectedRequest: 421,
        UnprocessableEntity: 422,
        Locked: 423,
        FailedDependency: 424,
        TooEarly: 425,
        UpgradeRequired: 426,
        PreconditionRequired: 428,
        TooManyRequests: 429,
        RequestHeaderFieldsTooLarge: 431,
        UnavailableForLegalReasons: 451,
        InternalServerError: 500,
        NotImplemented: 501,
        BadGateway: 502,
        ServiceUnavailable: 503,
        GatewayTimeout: 504,
        HttpVersionNotSupported: 505,
        VariantAlsoNegotiates: 506,
        InsufficientStorage: 507,
        LoopDetected: 508,
        NotExtended: 510,
        NetworkAuthenticationRequired: 511,
        WebServerIsDown: 521,
        ConnectionTimedOut: 522,
        OriginIsUnreachable: 523,
        TimeoutOccurred: 524,
        SslHandshakeFailed: 525,
        InvalidSslCertificate: 526
      };
      Object.entries(HttpStatusCode).forEach(([key2, value]) => {
        HttpStatusCode[value] = key2;
      });
      function createInstance(defaultConfig) {
        const context = new Axios(defaultConfig);
        const instance2 = bind(Axios.prototype.request, context);
        utils$1.extend(instance2, Axios.prototype, context, { allOwnKeys: true });
        utils$1.extend(instance2, context, null, { allOwnKeys: true });
        instance2.create = function create4(instanceConfig) {
          return createInstance(mergeConfig(defaultConfig, instanceConfig));
        };
        return instance2;
      }
      var axios = createInstance(defaults);
      axios.Axios = Axios;
      axios.CanceledError = CanceledError;
      axios.CancelToken = CancelToken;
      axios.isCancel = isCancel;
      axios.VERSION = VERSION;
      axios.toFormData = toFormData;
      axios.AxiosError = AxiosError;
      axios.Cancel = axios.CanceledError;
      axios.all = function all(promises) {
        return Promise.all(promises);
      };
      axios.spread = spread;
      axios.isAxiosError = isAxiosError;
      axios.mergeConfig = mergeConfig;
      axios.AxiosHeaders = AxiosHeaders;
      axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
      axios.getAdapter = adapters.getAdapter;
      axios.HttpStatusCode = HttpStatusCode;
      axios.default = axios;
      module.exports = axios;
    }
  });

  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.cjs
  var require_util = __commonJS({
    "../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.cjs"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.getParsedType = exports.ZodParsedType = exports.objectUtil = exports.util = void 0;
      var util;
      (function(util2) {
        util2.assertEqual = (_6) => {
        };
        function assertIs2(_arg) {
        }
        util2.assertIs = assertIs2;
        function assertNever2(_x) {
          throw new Error();
        }
        util2.assertNever = assertNever2;
        util2.arrayToEnum = (items) => {
          const obj = {};
          for (const item of items) {
            obj[item] = item;
          }
          return obj;
        };
        util2.getValidEnumValues = (obj) => {
          const validKeys = util2.objectKeys(obj).filter((k7) => typeof obj[obj[k7]] !== "number");
          const filtered = {};
          for (const k7 of validKeys) {
            filtered[k7] = obj[k7];
          }
          return util2.objectValues(filtered);
        };
        util2.objectValues = (obj) => {
          return util2.objectKeys(obj).map(function(e2) {
            return obj[e2];
          });
        };
        util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object2) => {
          const keys2 = [];
          for (const key2 in object2) {
            if (Object.prototype.hasOwnProperty.call(object2, key2)) {
              keys2.push(key2);
            }
          }
          return keys2;
        };
        util2.find = (arr, checker) => {
          for (const item of arr) {
            if (checker(item))
              return item;
          }
          return void 0;
        };
        util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
        function joinValues2(array3, separator = " | ") {
          return array3.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
        }
        util2.joinValues = joinValues2;
        util2.jsonStringifyReplacer = (_6, value) => {
          if (typeof value === "bigint") {
            return value.toString();
          }
          return value;
        };
      })(util || (exports.util = util = {}));
      var objectUtil;
      (function(objectUtil2) {
        objectUtil2.mergeShapes = (first, second) => {
          return {
            ...first,
            ...second
            // second overwrites first
          };
        };
      })(objectUtil || (exports.objectUtil = objectUtil = {}));
      exports.ZodParsedType = util.arrayToEnum([
        "string",
        "nan",
        "number",
        "integer",
        "float",
        "boolean",
        "date",
        "bigint",
        "symbol",
        "function",
        "undefined",
        "null",
        "array",
        "object",
        "unknown",
        "promise",
        "void",
        "never",
        "map",
        "set"
      ]);
      var getParsedType2 = (data) => {
        const t = typeof data;
        switch (t) {
          case "undefined":
            return exports.ZodParsedType.undefined;
          case "string":
            return exports.ZodParsedType.string;
          case "number":
            return Number.isNaN(data) ? exports.ZodParsedType.nan : exports.ZodParsedType.number;
          case "boolean":
            return exports.ZodParsedType.boolean;
          case "function":
            return exports.ZodParsedType.function;
          case "bigint":
            return exports.ZodParsedType.bigint;
          case "symbol":
            return exports.ZodParsedType.symbol;
          case "object":
            if (Array.isArray(data)) {
              return exports.ZodParsedType.array;
            }
            if (data === null) {
              return exports.ZodParsedType.null;
            }
            if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
              return exports.ZodParsedType.promise;
            }
            if (typeof Map !== "undefined" && data instanceof Map) {
              return exports.ZodParsedType.map;
            }
            if (typeof Set !== "undefined" && data instanceof Set) {
              return exports.ZodParsedType.set;
            }
            if (typeof Date !== "undefined" && data instanceof Date) {
              return exports.ZodParsedType.date;
            }
            return exports.ZodParsedType.object;
          default:
            return exports.ZodParsedType.unknown;
        }
      };
      exports.getParsedType = getParsedType2;
    }
  });

  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.cjs
  var require_ZodError = __commonJS({
    "../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.cjs"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.ZodError = exports.quotelessJson = exports.ZodIssueCode = void 0;
      var util_js_1 = require_util();
      exports.ZodIssueCode = util_js_1.util.arrayToEnum([
        "invalid_type",
        "invalid_literal",
        "custom",
        "invalid_union",
        "invalid_union_discriminator",
        "invalid_enum_value",
        "unrecognized_keys",
        "invalid_arguments",
        "invalid_return_type",
        "invalid_date",
        "invalid_string",
        "too_small",
        "too_big",
        "invalid_intersection_types",
        "not_multiple_of",
        "not_finite"
      ]);
      var quotelessJson = (obj) => {
        const json2 = JSON.stringify(obj, null, 2);
        return json2.replace(/"([^"]+)":/g, "$1:");
      };
      exports.quotelessJson = quotelessJson;
      var ZodError2 = class _ZodError extends Error {
        get errors() {
          return this.issues;
        }
        constructor(issues) {
          super();
          this.issues = [];
          this.addIssue = (sub) => {
            this.issues = [...this.issues, sub];
          };
          this.addIssues = (subs = []) => {
            this.issues = [...this.issues, ...subs];
          };
          const actualProto = new.target.prototype;
          if (Object.setPrototypeOf) {
            Object.setPrototypeOf(this, actualProto);
          } else {
            this.__proto__ = actualProto;
          }
          this.name = "ZodError";
          this.issues = issues;
        }
        format(_mapper) {
          const mapper = _mapper || function(issue2) {
            return issue2.message;
          };
          const fieldErrors = { _errors: [] };
          const processError = (error51) => {
            for (const issue2 of error51.issues) {
              if (issue2.code === "invalid_union") {
                issue2.unionErrors.map(processError);
              } else if (issue2.code === "invalid_return_type") {
                processError(issue2.returnTypeError);
              } else if (issue2.code === "invalid_arguments") {
                processError(issue2.argumentsError);
              } else if (issue2.path.length === 0) {
                fieldErrors._errors.push(mapper(issue2));
              } else {
                let curr = fieldErrors;
                let i5 = 0;
                while (i5 < issue2.path.length) {
                  const el = issue2.path[i5];
                  const terminal = i5 === issue2.path.length - 1;
                  if (!terminal) {
                    curr[el] = curr[el] || { _errors: [] };
                  } else {
                    curr[el] = curr[el] || { _errors: [] };
                    curr[el]._errors.push(mapper(issue2));
                  }
                  curr = curr[el];
                  i5++;
                }
              }
            }
          };
          processError(this);
          return fieldErrors;
        }
        static assert(value) {
          if (!(value instanceof _ZodError)) {
            throw new Error(`Not a ZodError: ${value}`);
          }
        }
        toString() {
          return this.message;
        }
        get message() {
          return JSON.stringify(this.issues, util_js_1.util.jsonStringifyReplacer, 2);
        }
        get isEmpty() {
          return this.issues.length === 0;
        }
        flatten(mapper = (issue2) => issue2.message) {
          const fieldErrors = {};
          const formErrors = [];
          for (const sub of this.issues) {
            if (sub.path.length > 0) {
              const firstEl = sub.path[0];
              fieldErrors[firstEl] = fieldErrors[firstEl] || [];
              fieldErrors[firstEl].push(mapper(sub));
            } else {
              formErrors.push(mapper(sub));
            }
          }
          return { formErrors, fieldErrors };
        }
        get formErrors() {
          return this.flatten();
        }
      };
      exports.ZodError = ZodError2;
      ZodError2.create = (issues) => {
        const error51 = new ZodError2(issues);
        return error51;
      };
    }
  });

  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.cjs
  var require_en = __commonJS({
    "../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.cjs"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var ZodError_js_1 = require_ZodError();
      var util_js_1 = require_util();
      var errorMap = (issue2, _ctx) => {
        let message;
        switch (issue2.code) {
          case ZodError_js_1.ZodIssueCode.invalid_type:
            if (issue2.received === util_js_1.ZodParsedType.undefined) {
              message = "Required";
            } else {
              message = `Expected ${issue2.expected}, received ${issue2.received}`;
            }
            break;
          case ZodError_js_1.ZodIssueCode.invalid_literal:
            message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util_js_1.util.jsonStringifyReplacer)}`;
            break;
          case ZodError_js_1.ZodIssueCode.unrecognized_keys:
            message = `Unrecognized key(s) in object: ${util_js_1.util.joinValues(issue2.keys, ", ")}`;
            break;
          case ZodError_js_1.ZodIssueCode.invalid_union:
            message = `Invalid input`;
            break;
          case ZodError_js_1.ZodIssueCode.invalid_union_discriminator:
            message = `Invalid discriminator value. Expected ${util_js_1.util.joinValues(issue2.options)}`;
            break;
          case ZodError_js_1.ZodIssueCode.invalid_enum_value:
            message = `Invalid enum value. Expected ${util_js_1.util.joinValues(issue2.options)}, received '${issue2.received}'`;
            break;
          case ZodError_js_1.ZodIssueCode.invalid_arguments:
            message = `Invalid function arguments`;
            break;
          case ZodError_js_1.ZodIssueCode.invalid_return_type:
            message = `Invalid function return type`;
            break;
          case ZodError_js_1.ZodIssueCode.invalid_date:
            message = `Invalid date`;
            break;
          case ZodError_js_1.ZodIssueCode.invalid_string:
            if (typeof issue2.validation === "object") {
              if ("includes" in issue2.validation) {
                message = `Invalid input: must include "${issue2.validation.includes}"`;
                if (typeof issue2.validation.position === "number") {
                  message = `${message} at one or more positions greater than or equal to ${issue2.validation.position}`;
                }
              } else if ("startsWith" in issue2.validation) {
                message = `Invalid input: must start with "${issue2.validation.startsWith}"`;
              } else if ("endsWith" in issue2.validation) {
                message = `Invalid input: must end with "${issue2.validation.endsWith}"`;
              } else {
                util_js_1.util.assertNever(issue2.validation);
              }
            } else if (issue2.validation !== "regex") {
              message = `Invalid ${issue2.validation}`;
            } else {
              message = "Invalid";
            }
            break;
          case ZodError_js_1.ZodIssueCode.too_small:
            if (issue2.type === "array")
              message = `Array must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `more than`} ${issue2.minimum} element(s)`;
            else if (issue2.type === "string")
              message = `String must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `over`} ${issue2.minimum} character(s)`;
            else if (issue2.type === "number")
              message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`;
            else if (issue2.type === "bigint")
              message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`;
            else if (issue2.type === "date")
              message = `Date must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue2.minimum))}`;
            else
              message = "Invalid input";
            break;
          case ZodError_js_1.ZodIssueCode.too_big:
            if (issue2.type === "array")
              message = `Array must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `less than`} ${issue2.maximum} element(s)`;
            else if (issue2.type === "string")
              message = `String must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `under`} ${issue2.maximum} character(s)`;
            else if (issue2.type === "number")
              message = `Number must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`;
            else if (issue2.type === "bigint")
              message = `BigInt must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`;
            else if (issue2.type === "date")
              message = `Date must be ${issue2.exact ? `exactly` : issue2.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue2.maximum))}`;
            else
              message = "Invalid input";
            break;
          case ZodError_js_1.ZodIssueCode.custom:
            message = `Invalid input`;
            break;
          case ZodError_js_1.ZodIssueCode.invalid_intersection_types:
            message = `Intersection results could not be merged`;
            break;
          case ZodError_js_1.ZodIssueCode.not_multiple_of:
            message = `Number must be a multiple of ${issue2.multipleOf}`;
            break;
          case ZodError_js_1.ZodIssueCode.not_finite:
            message = "Number must be finite";
            break;
          default:
            message = _ctx.defaultError;
            util_js_1.util.assertNever(issue2);
        }
        return { message };
      };
      exports.default = errorMap;
    }
  });

  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.cjs
  var require_errors = __commonJS({
    "../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.cjs"(exports) {
      "use strict";
      init_node_compat_inject();
      var __importDefault2 = exports && exports.__importDefault || function(mod3) {
        return mod3 && mod3.__esModule ? mod3 : { "default": mod3 };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.defaultErrorMap = void 0;
      exports.setErrorMap = setErrorMap2;
      exports.getErrorMap = getErrorMap2;
      var en_js_1 = __importDefault2(require_en());
      exports.defaultErrorMap = en_js_1.default;
      var overrideErrorMap = en_js_1.default;
      function setErrorMap2(map2) {
        overrideErrorMap = map2;
      }
      function getErrorMap2() {
        return overrideErrorMap;
      }
    }
  });

  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.cjs
  var require_parseUtil = __commonJS({
    "../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.cjs"(exports) {
      "use strict";
      init_node_compat_inject();
      var __importDefault2 = exports && exports.__importDefault || function(mod3) {
        return mod3 && mod3.__esModule ? mod3 : { "default": mod3 };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.EMPTY_PATH = exports.makeIssue = void 0;
      exports.addIssueToContext = addIssueToContext;
      var errors_js_1 = require_errors();
      var en_js_1 = __importDefault2(require_en());
      var makeIssue = (params) => {
        const { data, path, errorMaps, issueData } = params;
        const fullPath = [...path, ...issueData.path || []];
        const fullIssue = {
          ...issueData,
          path: fullPath
        };
        if (issueData.message !== void 0) {
          return {
            ...issueData,
            path: fullPath,
            message: issueData.message
          };
        }
        let errorMessage = "";
        const maps = errorMaps.filter((m3) => !!m3).slice().reverse();
        for (const map2 of maps) {
          errorMessage = map2(fullIssue, { data, defaultError: errorMessage }).message;
        }
        return {
          ...issueData,
          path: fullPath,
          message: errorMessage
        };
      };
      exports.makeIssue = makeIssue;
      exports.EMPTY_PATH = [];
      function addIssueToContext(ctx, issueData) {
        const overrideMap = (0, errors_js_1.getErrorMap)();
        const issue2 = (0, exports.makeIssue)({
          issueData,
          data: ctx.data,
          path: ctx.path,
          errorMaps: [
            ctx.common.contextualErrorMap,
            // contextual error map is first priority
            ctx.schemaErrorMap,
            // then schema-bound map if available
            overrideMap,
            // then global override map
            overrideMap === en_js_1.default ? void 0 : en_js_1.default
            // then global default map
          ].filter((x13) => !!x13)
        });
        ctx.common.issues.push(issue2);
      }
      var ParseStatus = class _ParseStatus {
        constructor() {
          this.value = "valid";
        }
        dirty() {
          if (this.value === "valid")
            this.value = "dirty";
        }
        abort() {
          if (this.value !== "aborted")
            this.value = "aborted";
        }
        static mergeArray(status, results) {
          const arrayValue = [];
          for (const s3 of results) {
            if (s3.status === "aborted")
              return exports.INVALID;
            if (s3.status === "dirty")
              status.dirty();
            arrayValue.push(s3.value);
          }
          return { status: status.value, value: arrayValue };
        }
        static async mergeObjectAsync(status, pairs) {
          const syncPairs = [];
          for (const pair of pairs) {
            const key2 = await pair.key;
            const value = await pair.value;
            syncPairs.push({
              key: key2,
              value
            });
          }
          return _ParseStatus.mergeObjectSync(status, syncPairs);
        }
        static mergeObjectSync(status, pairs) {
          const finalObject = {};
          for (const pair of pairs) {
            const { key: key2, value } = pair;
            if (key2.status === "aborted")
              return exports.INVALID;
            if (value.status === "aborted")
              return exports.INVALID;
            if (key2.status === "dirty")
              status.dirty();
            if (value.status === "dirty")
              status.dirty();
            if (key2.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
              finalObject[key2.value] = value.value;
            }
          }
          return { status: status.value, value: finalObject };
        }
      };
      exports.ParseStatus = ParseStatus;
      exports.INVALID = Object.freeze({
        status: "aborted"
      });
      var DIRTY = (value) => ({ status: "dirty", value });
      exports.DIRTY = DIRTY;
      var OK = (value) => ({ status: "valid", value });
      exports.OK = OK;
      var isAborted = (x13) => x13.status === "aborted";
      exports.isAborted = isAborted;
      var isDirty = (x13) => x13.status === "dirty";
      exports.isDirty = isDirty;
      var isValid = (x13) => x13.status === "valid";
      exports.isValid = isValid;
      var isAsync = (x13) => typeof Promise !== "undefined" && x13 instanceof Promise;
      exports.isAsync = isAsync;
    }
  });

  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.cjs
  var require_typeAliases = __commonJS({
    "../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.cjs"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
    }
  });

  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.cjs
  var require_errorUtil = __commonJS({
    "../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.cjs"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.errorUtil = void 0;
      var errorUtil;
      (function(errorUtil2) {
        errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
        errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
      })(errorUtil || (exports.errorUtil = errorUtil = {}));
    }
  });

  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.cjs
  var require_types = __commonJS({
    "../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.cjs"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.discriminatedUnion = exports.date = exports.boolean = exports.bigint = exports.array = exports.any = exports.coerce = exports.ZodFirstPartyTypeKind = exports.late = exports.ZodSchema = exports.Schema = exports.ZodReadonly = exports.ZodPipeline = exports.ZodBranded = exports.BRAND = exports.ZodNaN = exports.ZodCatch = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = exports.ZodTransformer = exports.ZodEffects = exports.ZodPromise = exports.ZodNativeEnum = exports.ZodEnum = exports.ZodLiteral = exports.ZodLazy = exports.ZodFunction = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodDate = exports.ZodBoolean = exports.ZodBigInt = exports.ZodNumber = exports.ZodString = exports.ZodType = void 0;
      exports.NEVER = exports.void = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.symbol = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.pipeline = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports.null = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports.instanceof = exports.function = exports.enum = exports.effect = void 0;
      exports.datetimeRegex = datetimeRegex;
      exports.custom = custom2;
      var ZodError_js_1 = require_ZodError();
      var errors_js_1 = require_errors();
      var errorUtil_js_1 = require_errorUtil();
      var parseUtil_js_1 = require_parseUtil();
      var util_js_1 = require_util();
      var ParseInputLazyPath = class {
        constructor(parent, value, path, key2) {
          this._cachedPath = [];
          this.parent = parent;
          this.data = value;
          this._path = path;
          this._key = key2;
        }
        get path() {
          if (!this._cachedPath.length) {
            if (Array.isArray(this._key)) {
              this._cachedPath.push(...this._path, ...this._key);
            } else {
              this._cachedPath.push(...this._path, this._key);
            }
          }
          return this._cachedPath;
        }
      };
      var handleResult = (ctx, result) => {
        if ((0, parseUtil_js_1.isValid)(result)) {
          return { success: true, data: result.value };
        } else {
          if (!ctx.common.issues.length) {
            throw new Error("Validation failed but no issues detected.");
          }
          return {
            success: false,
            get error() {
              if (this._error)
                return this._error;
              const error51 = new ZodError_js_1.ZodError(ctx.common.issues);
              this._error = error51;
              return this._error;
            }
          };
        }
      };
      function processCreateParams(params) {
        if (!params)
          return {};
        const { errorMap, invalid_type_error, required_error, description } = params;
        if (errorMap && (invalid_type_error || required_error)) {
          throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
        }
        if (errorMap)
          return { errorMap, description };
        const customMap = (iss, ctx) => {
          const { message } = params;
          if (iss.code === "invalid_enum_value") {
            return { message: message ?? ctx.defaultError };
          }
          if (typeof ctx.data === "undefined") {
            return { message: message ?? required_error ?? ctx.defaultError };
          }
          if (iss.code !== "invalid_type")
            return { message: ctx.defaultError };
          return { message: message ?? invalid_type_error ?? ctx.defaultError };
        };
        return { errorMap: customMap, description };
      }
      var ZodType2 = class {
        get description() {
          return this._def.description;
        }
        _getType(input) {
          return (0, util_js_1.getParsedType)(input.data);
        }
        _getOrReturnCtx(input, ctx) {
          return ctx || {
            common: input.parent.common,
            data: input.data,
            parsedType: (0, util_js_1.getParsedType)(input.data),
            schemaErrorMap: this._def.errorMap,
            path: input.path,
            parent: input.parent
          };
        }
        _processInputParams(input) {
          return {
            status: new parseUtil_js_1.ParseStatus(),
            ctx: {
              common: input.parent.common,
              data: input.data,
              parsedType: (0, util_js_1.getParsedType)(input.data),
              schemaErrorMap: this._def.errorMap,
              path: input.path,
              parent: input.parent
            }
          };
        }
        _parseSync(input) {
          const result = this._parse(input);
          if ((0, parseUtil_js_1.isAsync)(result)) {
            throw new Error("Synchronous parse encountered promise.");
          }
          return result;
        }
        _parseAsync(input) {
          const result = this._parse(input);
          return Promise.resolve(result);
        }
        parse(data, params) {
          const result = this.safeParse(data, params);
          if (result.success)
            return result.data;
          throw result.error;
        }
        safeParse(data, params) {
          const ctx = {
            common: {
              issues: [],
              async: params?.async ?? false,
              contextualErrorMap: params?.errorMap
            },
            path: params?.path || [],
            schemaErrorMap: this._def.errorMap,
            parent: null,
            data,
            parsedType: (0, util_js_1.getParsedType)(data)
          };
          const result = this._parseSync({ data, path: ctx.path, parent: ctx });
          return handleResult(ctx, result);
        }
        "~validate"(data) {
          const ctx = {
            common: {
              issues: [],
              async: !!this["~standard"].async
            },
            path: [],
            schemaErrorMap: this._def.errorMap,
            parent: null,
            data,
            parsedType: (0, util_js_1.getParsedType)(data)
          };
          if (!this["~standard"].async) {
            try {
              const result = this._parseSync({ data, path: [], parent: ctx });
              return (0, parseUtil_js_1.isValid)(result) ? {
                value: result.value
              } : {
                issues: ctx.common.issues
              };
            } catch (err2) {
              if (err2?.message?.toLowerCase()?.includes("encountered")) {
                this["~standard"].async = true;
              }
              ctx.common = {
                issues: [],
                async: true
              };
            }
          }
          return this._parseAsync({ data, path: [], parent: ctx }).then((result) => (0, parseUtil_js_1.isValid)(result) ? {
            value: result.value
          } : {
            issues: ctx.common.issues
          });
        }
        async parseAsync(data, params) {
          const result = await this.safeParseAsync(data, params);
          if (result.success)
            return result.data;
          throw result.error;
        }
        async safeParseAsync(data, params) {
          const ctx = {
            common: {
              issues: [],
              contextualErrorMap: params?.errorMap,
              async: true
            },
            path: params?.path || [],
            schemaErrorMap: this._def.errorMap,
            parent: null,
            data,
            parsedType: (0, util_js_1.getParsedType)(data)
          };
          const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });
          const result = await ((0, parseUtil_js_1.isAsync)(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));
          return handleResult(ctx, result);
        }
        refine(check2, message) {
          const getIssueProperties = (val) => {
            if (typeof message === "string" || typeof message === "undefined") {
              return { message };
            } else if (typeof message === "function") {
              return message(val);
            } else {
              return message;
            }
          };
          return this._refinement((val, ctx) => {
            const result = check2(val);
            const setError = () => ctx.addIssue({
              code: ZodError_js_1.ZodIssueCode.custom,
              ...getIssueProperties(val)
            });
            if (typeof Promise !== "undefined" && result instanceof Promise) {
              return result.then((data) => {
                if (!data) {
                  setError();
                  return false;
                } else {
                  return true;
                }
              });
            }
            if (!result) {
              setError();
              return false;
            } else {
              return true;
            }
          });
        }
        refinement(check2, refinementData) {
          return this._refinement((val, ctx) => {
            if (!check2(val)) {
              ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData);
              return false;
            } else {
              return true;
            }
          });
        }
        _refinement(refinement) {
          return new ZodEffects({
            schema: this,
            typeName: ZodFirstPartyTypeKind2.ZodEffects,
            effect: { type: "refinement", refinement }
          });
        }
        superRefine(refinement) {
          return this._refinement(refinement);
        }
        constructor(def) {
          this.spa = this.safeParseAsync;
          this._def = def;
          this.parse = this.parse.bind(this);
          this.safeParse = this.safeParse.bind(this);
          this.parseAsync = this.parseAsync.bind(this);
          this.safeParseAsync = this.safeParseAsync.bind(this);
          this.spa = this.spa.bind(this);
          this.refine = this.refine.bind(this);
          this.refinement = this.refinement.bind(this);
          this.superRefine = this.superRefine.bind(this);
          this.optional = this.optional.bind(this);
          this.nullable = this.nullable.bind(this);
          this.nullish = this.nullish.bind(this);
          this.array = this.array.bind(this);
          this.promise = this.promise.bind(this);
          this.or = this.or.bind(this);
          this.and = this.and.bind(this);
          this.transform = this.transform.bind(this);
          this.brand = this.brand.bind(this);
          this.default = this.default.bind(this);
          this.catch = this.catch.bind(this);
          this.describe = this.describe.bind(this);
          this.pipe = this.pipe.bind(this);
          this.readonly = this.readonly.bind(this);
          this.isNullable = this.isNullable.bind(this);
          this.isOptional = this.isOptional.bind(this);
          this["~standard"] = {
            version: 1,
            vendor: "zod",
            validate: (data) => this["~validate"](data)
          };
        }
        optional() {
          return ZodOptional2.create(this, this._def);
        }
        nullable() {
          return ZodNullable2.create(this, this._def);
        }
        nullish() {
          return this.nullable().optional();
        }
        array() {
          return ZodArray2.create(this);
        }
        promise() {
          return ZodPromise2.create(this, this._def);
        }
        or(option) {
          return ZodUnion2.create([this, option], this._def);
        }
        and(incoming) {
          return ZodIntersection2.create(this, incoming, this._def);
        }
        transform(transform2) {
          return new ZodEffects({
            ...processCreateParams(this._def),
            schema: this,
            typeName: ZodFirstPartyTypeKind2.ZodEffects,
            effect: { type: "transform", transform: transform2 }
          });
        }
        default(def) {
          const defaultValueFunc = typeof def === "function" ? def : () => def;
          return new ZodDefault2({
            ...processCreateParams(this._def),
            innerType: this,
            defaultValue: defaultValueFunc,
            typeName: ZodFirstPartyTypeKind2.ZodDefault
          });
        }
        brand() {
          return new ZodBranded({
            typeName: ZodFirstPartyTypeKind2.ZodBranded,
            type: this,
            ...processCreateParams(this._def)
          });
        }
        catch(def) {
          const catchValueFunc = typeof def === "function" ? def : () => def;
          return new ZodCatch2({
            ...processCreateParams(this._def),
            innerType: this,
            catchValue: catchValueFunc,
            typeName: ZodFirstPartyTypeKind2.ZodCatch
          });
        }
        describe(description) {
          const This = this.constructor;
          return new This({
            ...this._def,
            description
          });
        }
        pipe(target) {
          return ZodPipeline.create(this, target);
        }
        readonly() {
          return ZodReadonly2.create(this);
        }
        isOptional() {
          return this.safeParse(void 0).success;
        }
        isNullable() {
          return this.safeParse(null).success;
        }
      };
      exports.ZodType = ZodType2;
      exports.Schema = ZodType2;
      exports.ZodSchema = ZodType2;
      var cuidRegex = /^c[^\s-]{8,}$/i;
      var cuid2Regex = /^[0-9a-z]+$/;
      var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
      var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
      var nanoidRegex = /^[a-z0-9_-]{21}$/i;
      var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
      var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
      var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
      var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
      var emojiRegex;
      var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
      var ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
      var ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
      var ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
      var base64Regex2 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
      var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
      var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
      var dateRegex = new RegExp(`^${dateRegexSource}$`);
      function timeRegexSource(args) {
        let secondsRegexSource = `[0-5]\\d`;
        if (args.precision) {
          secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
        } else if (args.precision == null) {
          secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
        }
        const secondsQuantifier = args.precision ? "+" : "?";
        return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
      }
      function timeRegex(args) {
        return new RegExp(`^${timeRegexSource(args)}$`);
      }
      function datetimeRegex(args) {
        let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
        const opts = [];
        opts.push(args.local ? `Z?` : `Z`);
        if (args.offset)
          opts.push(`([+-]\\d{2}:?\\d{2})`);
        regex = `${regex}(${opts.join("|")})`;
        return new RegExp(`^${regex}$`);
      }
      function isValidIP(ip, version16) {
        if ((version16 === "v4" || !version16) && ipv4Regex.test(ip)) {
          return true;
        }
        if ((version16 === "v6" || !version16) && ipv6Regex.test(ip)) {
          return true;
        }
        return false;
      }
      function isValidJWT2(jwt2, alg) {
        if (!jwtRegex.test(jwt2))
          return false;
        try {
          const [header] = jwt2.split(".");
          if (!header)
            return false;
          const base644 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
          const decoded = JSON.parse(atob(base644));
          if (typeof decoded !== "object" || decoded === null)
            return false;
          if ("typ" in decoded && decoded?.typ !== "JWT")
            return false;
          if (!decoded.alg)
            return false;
          if (alg && decoded.alg !== alg)
            return false;
          return true;
        } catch {
          return false;
        }
      }
      function isValidCidr(ip, version16) {
        if ((version16 === "v4" || !version16) && ipv4CidrRegex.test(ip)) {
          return true;
        }
        if ((version16 === "v6" || !version16) && ipv6CidrRegex.test(ip)) {
          return true;
        }
        return false;
      }
      var ZodString2 = class _ZodString2 extends ZodType2 {
        _parse(input) {
          if (this._def.coerce) {
            input.data = String(input.data);
          }
          const parsedType2 = this._getType(input);
          if (parsedType2 !== util_js_1.ZodParsedType.string) {
            const ctx2 = this._getOrReturnCtx(input);
            (0, parseUtil_js_1.addIssueToContext)(ctx2, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.string,
              received: ctx2.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          const status = new parseUtil_js_1.ParseStatus();
          let ctx = void 0;
          for (const check2 of this._def.checks) {
            if (check2.kind === "min") {
              if (input.data.length < check2.value) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.too_small,
                  minimum: check2.value,
                  type: "string",
                  inclusive: true,
                  exact: false,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "max") {
              if (input.data.length > check2.value) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.too_big,
                  maximum: check2.value,
                  type: "string",
                  inclusive: true,
                  exact: false,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "length") {
              const tooBig = input.data.length > check2.value;
              const tooSmall = input.data.length < check2.value;
              if (tooBig || tooSmall) {
                ctx = this._getOrReturnCtx(input, ctx);
                if (tooBig) {
                  (0, parseUtil_js_1.addIssueToContext)(ctx, {
                    code: ZodError_js_1.ZodIssueCode.too_big,
                    maximum: check2.value,
                    type: "string",
                    inclusive: true,
                    exact: true,
                    message: check2.message
                  });
                } else if (tooSmall) {
                  (0, parseUtil_js_1.addIssueToContext)(ctx, {
                    code: ZodError_js_1.ZodIssueCode.too_small,
                    minimum: check2.value,
                    type: "string",
                    inclusive: true,
                    exact: true,
                    message: check2.message
                  });
                }
                status.dirty();
              }
            } else if (check2.kind === "email") {
              if (!emailRegex.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "email",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "emoji") {
              if (!emojiRegex) {
                emojiRegex = new RegExp(_emojiRegex, "u");
              }
              if (!emojiRegex.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "emoji",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "uuid") {
              if (!uuidRegex.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "uuid",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "nanoid") {
              if (!nanoidRegex.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "nanoid",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "cuid") {
              if (!cuidRegex.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "cuid",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "cuid2") {
              if (!cuid2Regex.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "cuid2",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "ulid") {
              if (!ulidRegex.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "ulid",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "url") {
              try {
                new URL(input.data);
              } catch {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "url",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "regex") {
              check2.regex.lastIndex = 0;
              const testResult = check2.regex.test(input.data);
              if (!testResult) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "regex",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "trim") {
              input.data = input.data.trim();
            } else if (check2.kind === "includes") {
              if (!input.data.includes(check2.value, check2.position)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  validation: { includes: check2.value, position: check2.position },
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "toLowerCase") {
              input.data = input.data.toLowerCase();
            } else if (check2.kind === "toUpperCase") {
              input.data = input.data.toUpperCase();
            } else if (check2.kind === "startsWith") {
              if (!input.data.startsWith(check2.value)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  validation: { startsWith: check2.value },
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "endsWith") {
              if (!input.data.endsWith(check2.value)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  validation: { endsWith: check2.value },
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "datetime") {
              const regex = datetimeRegex(check2);
              if (!regex.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  validation: "datetime",
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "date") {
              const regex = dateRegex;
              if (!regex.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  validation: "date",
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "time") {
              const regex = timeRegex(check2);
              if (!regex.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  validation: "time",
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "duration") {
              if (!durationRegex.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "duration",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "ip") {
              if (!isValidIP(input.data, check2.version)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "ip",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "jwt") {
              if (!isValidJWT2(input.data, check2.alg)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "jwt",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "cidr") {
              if (!isValidCidr(input.data, check2.version)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "cidr",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "base64") {
              if (!base64Regex2.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "base64",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "base64url") {
              if (!base64urlRegex.test(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  validation: "base64url",
                  code: ZodError_js_1.ZodIssueCode.invalid_string,
                  message: check2.message
                });
                status.dirty();
              }
            } else {
              util_js_1.util.assertNever(check2);
            }
          }
          return { status: status.value, value: input.data };
        }
        _regex(regex, validation, message) {
          return this.refinement((data) => regex.test(data), {
            validation,
            code: ZodError_js_1.ZodIssueCode.invalid_string,
            ...errorUtil_js_1.errorUtil.errToObj(message)
          });
        }
        _addCheck(check2) {
          return new _ZodString2({
            ...this._def,
            checks: [...this._def.checks, check2]
          });
        }
        email(message) {
          return this._addCheck({ kind: "email", ...errorUtil_js_1.errorUtil.errToObj(message) });
        }
        url(message) {
          return this._addCheck({ kind: "url", ...errorUtil_js_1.errorUtil.errToObj(message) });
        }
        emoji(message) {
          return this._addCheck({ kind: "emoji", ...errorUtil_js_1.errorUtil.errToObj(message) });
        }
        uuid(message) {
          return this._addCheck({ kind: "uuid", ...errorUtil_js_1.errorUtil.errToObj(message) });
        }
        nanoid(message) {
          return this._addCheck({ kind: "nanoid", ...errorUtil_js_1.errorUtil.errToObj(message) });
        }
        cuid(message) {
          return this._addCheck({ kind: "cuid", ...errorUtil_js_1.errorUtil.errToObj(message) });
        }
        cuid2(message) {
          return this._addCheck({ kind: "cuid2", ...errorUtil_js_1.errorUtil.errToObj(message) });
        }
        ulid(message) {
          return this._addCheck({ kind: "ulid", ...errorUtil_js_1.errorUtil.errToObj(message) });
        }
        base64(message) {
          return this._addCheck({ kind: "base64", ...errorUtil_js_1.errorUtil.errToObj(message) });
        }
        base64url(message) {
          return this._addCheck({
            kind: "base64url",
            ...errorUtil_js_1.errorUtil.errToObj(message)
          });
        }
        jwt(options) {
          return this._addCheck({ kind: "jwt", ...errorUtil_js_1.errorUtil.errToObj(options) });
        }
        ip(options) {
          return this._addCheck({ kind: "ip", ...errorUtil_js_1.errorUtil.errToObj(options) });
        }
        cidr(options) {
          return this._addCheck({ kind: "cidr", ...errorUtil_js_1.errorUtil.errToObj(options) });
        }
        datetime(options) {
          if (typeof options === "string") {
            return this._addCheck({
              kind: "datetime",
              precision: null,
              offset: false,
              local: false,
              message: options
            });
          }
          return this._addCheck({
            kind: "datetime",
            precision: typeof options?.precision === "undefined" ? null : options?.precision,
            offset: options?.offset ?? false,
            local: options?.local ?? false,
            ...errorUtil_js_1.errorUtil.errToObj(options?.message)
          });
        }
        date(message) {
          return this._addCheck({ kind: "date", message });
        }
        time(options) {
          if (typeof options === "string") {
            return this._addCheck({
              kind: "time",
              precision: null,
              message: options
            });
          }
          return this._addCheck({
            kind: "time",
            precision: typeof options?.precision === "undefined" ? null : options?.precision,
            ...errorUtil_js_1.errorUtil.errToObj(options?.message)
          });
        }
        duration(message) {
          return this._addCheck({ kind: "duration", ...errorUtil_js_1.errorUtil.errToObj(message) });
        }
        regex(regex, message) {
          return this._addCheck({
            kind: "regex",
            regex,
            ...errorUtil_js_1.errorUtil.errToObj(message)
          });
        }
        includes(value, options) {
          return this._addCheck({
            kind: "includes",
            value,
            position: options?.position,
            ...errorUtil_js_1.errorUtil.errToObj(options?.message)
          });
        }
        startsWith(value, message) {
          return this._addCheck({
            kind: "startsWith",
            value,
            ...errorUtil_js_1.errorUtil.errToObj(message)
          });
        }
        endsWith(value, message) {
          return this._addCheck({
            kind: "endsWith",
            value,
            ...errorUtil_js_1.errorUtil.errToObj(message)
          });
        }
        min(minLength, message) {
          return this._addCheck({
            kind: "min",
            value: minLength,
            ...errorUtil_js_1.errorUtil.errToObj(message)
          });
        }
        max(maxLength, message) {
          return this._addCheck({
            kind: "max",
            value: maxLength,
            ...errorUtil_js_1.errorUtil.errToObj(message)
          });
        }
        length(len, message) {
          return this._addCheck({
            kind: "length",
            value: len,
            ...errorUtil_js_1.errorUtil.errToObj(message)
          });
        }
        /**
         * Equivalent to `.min(1)`
         */
        nonempty(message) {
          return this.min(1, errorUtil_js_1.errorUtil.errToObj(message));
        }
        trim() {
          return new _ZodString2({
            ...this._def,
            checks: [...this._def.checks, { kind: "trim" }]
          });
        }
        toLowerCase() {
          return new _ZodString2({
            ...this._def,
            checks: [...this._def.checks, { kind: "toLowerCase" }]
          });
        }
        toUpperCase() {
          return new _ZodString2({
            ...this._def,
            checks: [...this._def.checks, { kind: "toUpperCase" }]
          });
        }
        get isDatetime() {
          return !!this._def.checks.find((ch) => ch.kind === "datetime");
        }
        get isDate() {
          return !!this._def.checks.find((ch) => ch.kind === "date");
        }
        get isTime() {
          return !!this._def.checks.find((ch) => ch.kind === "time");
        }
        get isDuration() {
          return !!this._def.checks.find((ch) => ch.kind === "duration");
        }
        get isEmail() {
          return !!this._def.checks.find((ch) => ch.kind === "email");
        }
        get isURL() {
          return !!this._def.checks.find((ch) => ch.kind === "url");
        }
        get isEmoji() {
          return !!this._def.checks.find((ch) => ch.kind === "emoji");
        }
        get isUUID() {
          return !!this._def.checks.find((ch) => ch.kind === "uuid");
        }
        get isNANOID() {
          return !!this._def.checks.find((ch) => ch.kind === "nanoid");
        }
        get isCUID() {
          return !!this._def.checks.find((ch) => ch.kind === "cuid");
        }
        get isCUID2() {
          return !!this._def.checks.find((ch) => ch.kind === "cuid2");
        }
        get isULID() {
          return !!this._def.checks.find((ch) => ch.kind === "ulid");
        }
        get isIP() {
          return !!this._def.checks.find((ch) => ch.kind === "ip");
        }
        get isCIDR() {
          return !!this._def.checks.find((ch) => ch.kind === "cidr");
        }
        get isBase64() {
          return !!this._def.checks.find((ch) => ch.kind === "base64");
        }
        get isBase64url() {
          return !!this._def.checks.find((ch) => ch.kind === "base64url");
        }
        get minLength() {
          let min = null;
          for (const ch of this._def.checks) {
            if (ch.kind === "min") {
              if (min === null || ch.value > min)
                min = ch.value;
            }
          }
          return min;
        }
        get maxLength() {
          let max = null;
          for (const ch of this._def.checks) {
            if (ch.kind === "max") {
              if (max === null || ch.value < max)
                max = ch.value;
            }
          }
          return max;
        }
      };
      exports.ZodString = ZodString2;
      ZodString2.create = (params) => {
        return new ZodString2({
          checks: [],
          typeName: ZodFirstPartyTypeKind2.ZodString,
          coerce: params?.coerce ?? false,
          ...processCreateParams(params)
        });
      };
      function floatSafeRemainder2(val, step) {
        const valDecCount = (val.toString().split(".")[1] || "").length;
        const stepDecCount = (step.toString().split(".")[1] || "").length;
        const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
        const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
        const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
        return valInt % stepInt / 10 ** decCount;
      }
      var ZodNumber2 = class _ZodNumber extends ZodType2 {
        constructor() {
          super(...arguments);
          this.min = this.gte;
          this.max = this.lte;
          this.step = this.multipleOf;
        }
        _parse(input) {
          if (this._def.coerce) {
            input.data = Number(input.data);
          }
          const parsedType2 = this._getType(input);
          if (parsedType2 !== util_js_1.ZodParsedType.number) {
            const ctx2 = this._getOrReturnCtx(input);
            (0, parseUtil_js_1.addIssueToContext)(ctx2, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.number,
              received: ctx2.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          let ctx = void 0;
          const status = new parseUtil_js_1.ParseStatus();
          for (const check2 of this._def.checks) {
            if (check2.kind === "int") {
              if (!util_js_1.util.isInteger(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.invalid_type,
                  expected: "integer",
                  received: "float",
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "min") {
              const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;
              if (tooSmall) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.too_small,
                  minimum: check2.value,
                  type: "number",
                  inclusive: check2.inclusive,
                  exact: false,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "max") {
              const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;
              if (tooBig) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.too_big,
                  maximum: check2.value,
                  type: "number",
                  inclusive: check2.inclusive,
                  exact: false,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "multipleOf") {
              if (floatSafeRemainder2(input.data, check2.value) !== 0) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.not_multiple_of,
                  multipleOf: check2.value,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "finite") {
              if (!Number.isFinite(input.data)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.not_finite,
                  message: check2.message
                });
                status.dirty();
              }
            } else {
              util_js_1.util.assertNever(check2);
            }
          }
          return { status: status.value, value: input.data };
        }
        gte(value, message) {
          return this.setLimit("min", value, true, errorUtil_js_1.errorUtil.toString(message));
        }
        gt(value, message) {
          return this.setLimit("min", value, false, errorUtil_js_1.errorUtil.toString(message));
        }
        lte(value, message) {
          return this.setLimit("max", value, true, errorUtil_js_1.errorUtil.toString(message));
        }
        lt(value, message) {
          return this.setLimit("max", value, false, errorUtil_js_1.errorUtil.toString(message));
        }
        setLimit(kind, value, inclusive, message) {
          return new _ZodNumber({
            ...this._def,
            checks: [
              ...this._def.checks,
              {
                kind,
                value,
                inclusive,
                message: errorUtil_js_1.errorUtil.toString(message)
              }
            ]
          });
        }
        _addCheck(check2) {
          return new _ZodNumber({
            ...this._def,
            checks: [...this._def.checks, check2]
          });
        }
        int(message) {
          return this._addCheck({
            kind: "int",
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        positive(message) {
          return this._addCheck({
            kind: "min",
            value: 0,
            inclusive: false,
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        negative(message) {
          return this._addCheck({
            kind: "max",
            value: 0,
            inclusive: false,
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        nonpositive(message) {
          return this._addCheck({
            kind: "max",
            value: 0,
            inclusive: true,
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        nonnegative(message) {
          return this._addCheck({
            kind: "min",
            value: 0,
            inclusive: true,
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        multipleOf(value, message) {
          return this._addCheck({
            kind: "multipleOf",
            value,
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        finite(message) {
          return this._addCheck({
            kind: "finite",
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        safe(message) {
          return this._addCheck({
            kind: "min",
            inclusive: true,
            value: Number.MIN_SAFE_INTEGER,
            message: errorUtil_js_1.errorUtil.toString(message)
          })._addCheck({
            kind: "max",
            inclusive: true,
            value: Number.MAX_SAFE_INTEGER,
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        get minValue() {
          let min = null;
          for (const ch of this._def.checks) {
            if (ch.kind === "min") {
              if (min === null || ch.value > min)
                min = ch.value;
            }
          }
          return min;
        }
        get maxValue() {
          let max = null;
          for (const ch of this._def.checks) {
            if (ch.kind === "max") {
              if (max === null || ch.value < max)
                max = ch.value;
            }
          }
          return max;
        }
        get isInt() {
          return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util_js_1.util.isInteger(ch.value));
        }
        get isFinite() {
          let max = null;
          let min = null;
          for (const ch of this._def.checks) {
            if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
              return true;
            } else if (ch.kind === "min") {
              if (min === null || ch.value > min)
                min = ch.value;
            } else if (ch.kind === "max") {
              if (max === null || ch.value < max)
                max = ch.value;
            }
          }
          return Number.isFinite(min) && Number.isFinite(max);
        }
      };
      exports.ZodNumber = ZodNumber2;
      ZodNumber2.create = (params) => {
        return new ZodNumber2({
          checks: [],
          typeName: ZodFirstPartyTypeKind2.ZodNumber,
          coerce: params?.coerce || false,
          ...processCreateParams(params)
        });
      };
      var ZodBigInt2 = class _ZodBigInt extends ZodType2 {
        constructor() {
          super(...arguments);
          this.min = this.gte;
          this.max = this.lte;
        }
        _parse(input) {
          if (this._def.coerce) {
            try {
              input.data = BigInt(input.data);
            } catch {
              return this._getInvalidInput(input);
            }
          }
          const parsedType2 = this._getType(input);
          if (parsedType2 !== util_js_1.ZodParsedType.bigint) {
            return this._getInvalidInput(input);
          }
          let ctx = void 0;
          const status = new parseUtil_js_1.ParseStatus();
          for (const check2 of this._def.checks) {
            if (check2.kind === "min") {
              const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;
              if (tooSmall) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.too_small,
                  type: "bigint",
                  minimum: check2.value,
                  inclusive: check2.inclusive,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "max") {
              const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;
              if (tooBig) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.too_big,
                  type: "bigint",
                  maximum: check2.value,
                  inclusive: check2.inclusive,
                  message: check2.message
                });
                status.dirty();
              }
            } else if (check2.kind === "multipleOf") {
              if (input.data % check2.value !== BigInt(0)) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.not_multiple_of,
                  multipleOf: check2.value,
                  message: check2.message
                });
                status.dirty();
              }
            } else {
              util_js_1.util.assertNever(check2);
            }
          }
          return { status: status.value, value: input.data };
        }
        _getInvalidInput(input) {
          const ctx = this._getOrReturnCtx(input);
          (0, parseUtil_js_1.addIssueToContext)(ctx, {
            code: ZodError_js_1.ZodIssueCode.invalid_type,
            expected: util_js_1.ZodParsedType.bigint,
            received: ctx.parsedType
          });
          return parseUtil_js_1.INVALID;
        }
        gte(value, message) {
          return this.setLimit("min", value, true, errorUtil_js_1.errorUtil.toString(message));
        }
        gt(value, message) {
          return this.setLimit("min", value, false, errorUtil_js_1.errorUtil.toString(message));
        }
        lte(value, message) {
          return this.setLimit("max", value, true, errorUtil_js_1.errorUtil.toString(message));
        }
        lt(value, message) {
          return this.setLimit("max", value, false, errorUtil_js_1.errorUtil.toString(message));
        }
        setLimit(kind, value, inclusive, message) {
          return new _ZodBigInt({
            ...this._def,
            checks: [
              ...this._def.checks,
              {
                kind,
                value,
                inclusive,
                message: errorUtil_js_1.errorUtil.toString(message)
              }
            ]
          });
        }
        _addCheck(check2) {
          return new _ZodBigInt({
            ...this._def,
            checks: [...this._def.checks, check2]
          });
        }
        positive(message) {
          return this._addCheck({
            kind: "min",
            value: BigInt(0),
            inclusive: false,
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        negative(message) {
          return this._addCheck({
            kind: "max",
            value: BigInt(0),
            inclusive: false,
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        nonpositive(message) {
          return this._addCheck({
            kind: "max",
            value: BigInt(0),
            inclusive: true,
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        nonnegative(message) {
          return this._addCheck({
            kind: "min",
            value: BigInt(0),
            inclusive: true,
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        multipleOf(value, message) {
          return this._addCheck({
            kind: "multipleOf",
            value,
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        get minValue() {
          let min = null;
          for (const ch of this._def.checks) {
            if (ch.kind === "min") {
              if (min === null || ch.value > min)
                min = ch.value;
            }
          }
          return min;
        }
        get maxValue() {
          let max = null;
          for (const ch of this._def.checks) {
            if (ch.kind === "max") {
              if (max === null || ch.value < max)
                max = ch.value;
            }
          }
          return max;
        }
      };
      exports.ZodBigInt = ZodBigInt2;
      ZodBigInt2.create = (params) => {
        return new ZodBigInt2({
          checks: [],
          typeName: ZodFirstPartyTypeKind2.ZodBigInt,
          coerce: params?.coerce ?? false,
          ...processCreateParams(params)
        });
      };
      var ZodBoolean2 = class extends ZodType2 {
        _parse(input) {
          if (this._def.coerce) {
            input.data = Boolean(input.data);
          }
          const parsedType2 = this._getType(input);
          if (parsedType2 !== util_js_1.ZodParsedType.boolean) {
            const ctx = this._getOrReturnCtx(input);
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.boolean,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          return (0, parseUtil_js_1.OK)(input.data);
        }
      };
      exports.ZodBoolean = ZodBoolean2;
      ZodBoolean2.create = (params) => {
        return new ZodBoolean2({
          typeName: ZodFirstPartyTypeKind2.ZodBoolean,
          coerce: params?.coerce || false,
          ...processCreateParams(params)
        });
      };
      var ZodDate2 = class _ZodDate extends ZodType2 {
        _parse(input) {
          if (this._def.coerce) {
            input.data = new Date(input.data);
          }
          const parsedType2 = this._getType(input);
          if (parsedType2 !== util_js_1.ZodParsedType.date) {
            const ctx2 = this._getOrReturnCtx(input);
            (0, parseUtil_js_1.addIssueToContext)(ctx2, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.date,
              received: ctx2.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          if (Number.isNaN(input.data.getTime())) {
            const ctx2 = this._getOrReturnCtx(input);
            (0, parseUtil_js_1.addIssueToContext)(ctx2, {
              code: ZodError_js_1.ZodIssueCode.invalid_date
            });
            return parseUtil_js_1.INVALID;
          }
          const status = new parseUtil_js_1.ParseStatus();
          let ctx = void 0;
          for (const check2 of this._def.checks) {
            if (check2.kind === "min") {
              if (input.data.getTime() < check2.value) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.too_small,
                  message: check2.message,
                  inclusive: true,
                  exact: false,
                  minimum: check2.value,
                  type: "date"
                });
                status.dirty();
              }
            } else if (check2.kind === "max") {
              if (input.data.getTime() > check2.value) {
                ctx = this._getOrReturnCtx(input, ctx);
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.too_big,
                  message: check2.message,
                  inclusive: true,
                  exact: false,
                  maximum: check2.value,
                  type: "date"
                });
                status.dirty();
              }
            } else {
              util_js_1.util.assertNever(check2);
            }
          }
          return {
            status: status.value,
            value: new Date(input.data.getTime())
          };
        }
        _addCheck(check2) {
          return new _ZodDate({
            ...this._def,
            checks: [...this._def.checks, check2]
          });
        }
        min(minDate, message) {
          return this._addCheck({
            kind: "min",
            value: minDate.getTime(),
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        max(maxDate, message) {
          return this._addCheck({
            kind: "max",
            value: maxDate.getTime(),
            message: errorUtil_js_1.errorUtil.toString(message)
          });
        }
        get minDate() {
          let min = null;
          for (const ch of this._def.checks) {
            if (ch.kind === "min") {
              if (min === null || ch.value > min)
                min = ch.value;
            }
          }
          return min != null ? new Date(min) : null;
        }
        get maxDate() {
          let max = null;
          for (const ch of this._def.checks) {
            if (ch.kind === "max") {
              if (max === null || ch.value < max)
                max = ch.value;
            }
          }
          return max != null ? new Date(max) : null;
        }
      };
      exports.ZodDate = ZodDate2;
      ZodDate2.create = (params) => {
        return new ZodDate2({
          checks: [],
          coerce: params?.coerce || false,
          typeName: ZodFirstPartyTypeKind2.ZodDate,
          ...processCreateParams(params)
        });
      };
      var ZodSymbol2 = class extends ZodType2 {
        _parse(input) {
          const parsedType2 = this._getType(input);
          if (parsedType2 !== util_js_1.ZodParsedType.symbol) {
            const ctx = this._getOrReturnCtx(input);
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.symbol,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          return (0, parseUtil_js_1.OK)(input.data);
        }
      };
      exports.ZodSymbol = ZodSymbol2;
      ZodSymbol2.create = (params) => {
        return new ZodSymbol2({
          typeName: ZodFirstPartyTypeKind2.ZodSymbol,
          ...processCreateParams(params)
        });
      };
      var ZodUndefined2 = class extends ZodType2 {
        _parse(input) {
          const parsedType2 = this._getType(input);
          if (parsedType2 !== util_js_1.ZodParsedType.undefined) {
            const ctx = this._getOrReturnCtx(input);
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.undefined,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          return (0, parseUtil_js_1.OK)(input.data);
        }
      };
      exports.ZodUndefined = ZodUndefined2;
      ZodUndefined2.create = (params) => {
        return new ZodUndefined2({
          typeName: ZodFirstPartyTypeKind2.ZodUndefined,
          ...processCreateParams(params)
        });
      };
      var ZodNull2 = class extends ZodType2 {
        _parse(input) {
          const parsedType2 = this._getType(input);
          if (parsedType2 !== util_js_1.ZodParsedType.null) {
            const ctx = this._getOrReturnCtx(input);
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.null,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          return (0, parseUtil_js_1.OK)(input.data);
        }
      };
      exports.ZodNull = ZodNull2;
      ZodNull2.create = (params) => {
        return new ZodNull2({
          typeName: ZodFirstPartyTypeKind2.ZodNull,
          ...processCreateParams(params)
        });
      };
      var ZodAny2 = class extends ZodType2 {
        constructor() {
          super(...arguments);
          this._any = true;
        }
        _parse(input) {
          return (0, parseUtil_js_1.OK)(input.data);
        }
      };
      exports.ZodAny = ZodAny2;
      ZodAny2.create = (params) => {
        return new ZodAny2({
          typeName: ZodFirstPartyTypeKind2.ZodAny,
          ...processCreateParams(params)
        });
      };
      var ZodUnknown2 = class extends ZodType2 {
        constructor() {
          super(...arguments);
          this._unknown = true;
        }
        _parse(input) {
          return (0, parseUtil_js_1.OK)(input.data);
        }
      };
      exports.ZodUnknown = ZodUnknown2;
      ZodUnknown2.create = (params) => {
        return new ZodUnknown2({
          typeName: ZodFirstPartyTypeKind2.ZodUnknown,
          ...processCreateParams(params)
        });
      };
      var ZodNever2 = class extends ZodType2 {
        _parse(input) {
          const ctx = this._getOrReturnCtx(input);
          (0, parseUtil_js_1.addIssueToContext)(ctx, {
            code: ZodError_js_1.ZodIssueCode.invalid_type,
            expected: util_js_1.ZodParsedType.never,
            received: ctx.parsedType
          });
          return parseUtil_js_1.INVALID;
        }
      };
      exports.ZodNever = ZodNever2;
      ZodNever2.create = (params) => {
        return new ZodNever2({
          typeName: ZodFirstPartyTypeKind2.ZodNever,
          ...processCreateParams(params)
        });
      };
      var ZodVoid2 = class extends ZodType2 {
        _parse(input) {
          const parsedType2 = this._getType(input);
          if (parsedType2 !== util_js_1.ZodParsedType.undefined) {
            const ctx = this._getOrReturnCtx(input);
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.void,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          return (0, parseUtil_js_1.OK)(input.data);
        }
      };
      exports.ZodVoid = ZodVoid2;
      ZodVoid2.create = (params) => {
        return new ZodVoid2({
          typeName: ZodFirstPartyTypeKind2.ZodVoid,
          ...processCreateParams(params)
        });
      };
      var ZodArray2 = class _ZodArray extends ZodType2 {
        _parse(input) {
          const { ctx, status } = this._processInputParams(input);
          const def = this._def;
          if (ctx.parsedType !== util_js_1.ZodParsedType.array) {
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.array,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          if (def.exactLength !== null) {
            const tooBig = ctx.data.length > def.exactLength.value;
            const tooSmall = ctx.data.length < def.exactLength.value;
            if (tooBig || tooSmall) {
              (0, parseUtil_js_1.addIssueToContext)(ctx, {
                code: tooBig ? ZodError_js_1.ZodIssueCode.too_big : ZodError_js_1.ZodIssueCode.too_small,
                minimum: tooSmall ? def.exactLength.value : void 0,
                maximum: tooBig ? def.exactLength.value : void 0,
                type: "array",
                inclusive: true,
                exact: true,
                message: def.exactLength.message
              });
              status.dirty();
            }
          }
          if (def.minLength !== null) {
            if (ctx.data.length < def.minLength.value) {
              (0, parseUtil_js_1.addIssueToContext)(ctx, {
                code: ZodError_js_1.ZodIssueCode.too_small,
                minimum: def.minLength.value,
                type: "array",
                inclusive: true,
                exact: false,
                message: def.minLength.message
              });
              status.dirty();
            }
          }
          if (def.maxLength !== null) {
            if (ctx.data.length > def.maxLength.value) {
              (0, parseUtil_js_1.addIssueToContext)(ctx, {
                code: ZodError_js_1.ZodIssueCode.too_big,
                maximum: def.maxLength.value,
                type: "array",
                inclusive: true,
                exact: false,
                message: def.maxLength.message
              });
              status.dirty();
            }
          }
          if (ctx.common.async) {
            return Promise.all([...ctx.data].map((item, i5) => {
              return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i5));
            })).then((result2) => {
              return parseUtil_js_1.ParseStatus.mergeArray(status, result2);
            });
          }
          const result = [...ctx.data].map((item, i5) => {
            return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i5));
          });
          return parseUtil_js_1.ParseStatus.mergeArray(status, result);
        }
        get element() {
          return this._def.type;
        }
        min(minLength, message) {
          return new _ZodArray({
            ...this._def,
            minLength: { value: minLength, message: errorUtil_js_1.errorUtil.toString(message) }
          });
        }
        max(maxLength, message) {
          return new _ZodArray({
            ...this._def,
            maxLength: { value: maxLength, message: errorUtil_js_1.errorUtil.toString(message) }
          });
        }
        length(len, message) {
          return new _ZodArray({
            ...this._def,
            exactLength: { value: len, message: errorUtil_js_1.errorUtil.toString(message) }
          });
        }
        nonempty(message) {
          return this.min(1, message);
        }
      };
      exports.ZodArray = ZodArray2;
      ZodArray2.create = (schema, params) => {
        return new ZodArray2({
          type: schema,
          minLength: null,
          maxLength: null,
          exactLength: null,
          typeName: ZodFirstPartyTypeKind2.ZodArray,
          ...processCreateParams(params)
        });
      };
      function deepPartialify(schema) {
        if (schema instanceof ZodObject2) {
          const newShape = {};
          for (const key2 in schema.shape) {
            const fieldSchema = schema.shape[key2];
            newShape[key2] = ZodOptional2.create(deepPartialify(fieldSchema));
          }
          return new ZodObject2({
            ...schema._def,
            shape: () => newShape
          });
        } else if (schema instanceof ZodArray2) {
          return new ZodArray2({
            ...schema._def,
            type: deepPartialify(schema.element)
          });
        } else if (schema instanceof ZodOptional2) {
          return ZodOptional2.create(deepPartialify(schema.unwrap()));
        } else if (schema instanceof ZodNullable2) {
          return ZodNullable2.create(deepPartialify(schema.unwrap()));
        } else if (schema instanceof ZodTuple2) {
          return ZodTuple2.create(schema.items.map((item) => deepPartialify(item)));
        } else {
          return schema;
        }
      }
      var ZodObject2 = class _ZodObject extends ZodType2 {
        constructor() {
          super(...arguments);
          this._cached = null;
          this.nonstrict = this.passthrough;
          this.augment = this.extend;
        }
        _getCached() {
          if (this._cached !== null)
            return this._cached;
          const shape = this._def.shape();
          const keys2 = util_js_1.util.objectKeys(shape);
          this._cached = { shape, keys: keys2 };
          return this._cached;
        }
        _parse(input) {
          const parsedType2 = this._getType(input);
          if (parsedType2 !== util_js_1.ZodParsedType.object) {
            const ctx2 = this._getOrReturnCtx(input);
            (0, parseUtil_js_1.addIssueToContext)(ctx2, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.object,
              received: ctx2.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          const { status, ctx } = this._processInputParams(input);
          const { shape, keys: shapeKeys } = this._getCached();
          const extraKeys = [];
          if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === "strip")) {
            for (const key2 in ctx.data) {
              if (!shapeKeys.includes(key2)) {
                extraKeys.push(key2);
              }
            }
          }
          const pairs = [];
          for (const key2 of shapeKeys) {
            const keyValidator = shape[key2];
            const value = ctx.data[key2];
            pairs.push({
              key: { status: "valid", value: key2 },
              value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key2)),
              alwaysSet: key2 in ctx.data
            });
          }
          if (this._def.catchall instanceof ZodNever2) {
            const unknownKeys = this._def.unknownKeys;
            if (unknownKeys === "passthrough") {
              for (const key2 of extraKeys) {
                pairs.push({
                  key: { status: "valid", value: key2 },
                  value: { status: "valid", value: ctx.data[key2] }
                });
              }
            } else if (unknownKeys === "strict") {
              if (extraKeys.length > 0) {
                (0, parseUtil_js_1.addIssueToContext)(ctx, {
                  code: ZodError_js_1.ZodIssueCode.unrecognized_keys,
                  keys: extraKeys
                });
                status.dirty();
              }
            } else if (unknownKeys === "strip") {
            } else {
              throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
            }
          } else {
            const catchall = this._def.catchall;
            for (const key2 of extraKeys) {
              const value = ctx.data[key2];
              pairs.push({
                key: { status: "valid", value: key2 },
                value: catchall._parse(
                  new ParseInputLazyPath(ctx, value, ctx.path, key2)
                  //, ctx.child(key), value, getParsedType(value)
                ),
                alwaysSet: key2 in ctx.data
              });
            }
          }
          if (ctx.common.async) {
            return Promise.resolve().then(async () => {
              const syncPairs = [];
              for (const pair of pairs) {
                const key2 = await pair.key;
                const value = await pair.value;
                syncPairs.push({
                  key: key2,
                  value,
                  alwaysSet: pair.alwaysSet
                });
              }
              return syncPairs;
            }).then((syncPairs) => {
              return parseUtil_js_1.ParseStatus.mergeObjectSync(status, syncPairs);
            });
          } else {
            return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);
          }
        }
        get shape() {
          return this._def.shape();
        }
        strict(message) {
          errorUtil_js_1.errorUtil.errToObj;
          return new _ZodObject({
            ...this._def,
            unknownKeys: "strict",
            ...message !== void 0 ? {
              errorMap: (issue2, ctx) => {
                const defaultError = this._def.errorMap?.(issue2, ctx).message ?? ctx.defaultError;
                if (issue2.code === "unrecognized_keys")
                  return {
                    message: errorUtil_js_1.errorUtil.errToObj(message).message ?? defaultError
                  };
                return {
                  message: defaultError
                };
              }
            } : {}
          });
        }
        strip() {
          return new _ZodObject({
            ...this._def,
            unknownKeys: "strip"
          });
        }
        passthrough() {
          return new _ZodObject({
            ...this._def,
            unknownKeys: "passthrough"
          });
        }
        // const AugmentFactory =
        //   <Def extends ZodObjectDef>(def: Def) =>
        //   <Augmentation extends ZodRawShape>(
        //     augmentation: Augmentation
        //   ): ZodObject<
        //     extendShape<ReturnType<Def["shape"]>, Augmentation>,
        //     Def["unknownKeys"],
        //     Def["catchall"]
        //   > => {
        //     return new ZodObject({
        //       ...def,
        //       shape: () => ({
        //         ...def.shape(),
        //         ...augmentation,
        //       }),
        //     }) as any;
        //   };
        extend(augmentation) {
          return new _ZodObject({
            ...this._def,
            shape: () => ({
              ...this._def.shape(),
              ...augmentation
            })
          });
        }
        /**
         * Prior to zod@1.0.12 there was a bug in the
         * inferred type of merged objects. Please
         * upgrade if you are experiencing issues.
         */
        merge(merging) {
          const merged = new _ZodObject({
            unknownKeys: merging._def.unknownKeys,
            catchall: merging._def.catchall,
            shape: () => ({
              ...this._def.shape(),
              ...merging._def.shape()
            }),
            typeName: ZodFirstPartyTypeKind2.ZodObject
          });
          return merged;
        }
        // merge<
        //   Incoming extends AnyZodObject,
        //   Augmentation extends Incoming["shape"],
        //   NewOutput extends {
        //     [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
        //       ? Augmentation[k]["_output"]
        //       : k extends keyof Output
        //       ? Output[k]
        //       : never;
        //   },
        //   NewInput extends {
        //     [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
        //       ? Augmentation[k]["_input"]
        //       : k extends keyof Input
        //       ? Input[k]
        //       : never;
        //   }
        // >(
        //   merging: Incoming
        // ): ZodObject<
        //   extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
        //   Incoming["_def"]["unknownKeys"],
        //   Incoming["_def"]["catchall"],
        //   NewOutput,
        //   NewInput
        // > {
        //   const merged: any = new ZodObject({
        //     unknownKeys: merging._def.unknownKeys,
        //     catchall: merging._def.catchall,
        //     shape: () =>
        //       objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
        //     typeName: ZodFirstPartyTypeKind.ZodObject,
        //   }) as any;
        //   return merged;
        // }
        setKey(key2, schema) {
          return this.augment({ [key2]: schema });
        }
        // merge<Incoming extends AnyZodObject>(
        //   merging: Incoming
        // ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => {
        // ZodObject<
        //   extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
        //   Incoming["_def"]["unknownKeys"],
        //   Incoming["_def"]["catchall"]
        // > {
        //   // const mergedShape = objectUtil.mergeShapes(
        //   //   this._def.shape(),
        //   //   merging._def.shape()
        //   // );
        //   const merged: any = new ZodObject({
        //     unknownKeys: merging._def.unknownKeys,
        //     catchall: merging._def.catchall,
        //     shape: () =>
        //       objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
        //     typeName: ZodFirstPartyTypeKind.ZodObject,
        //   }) as any;
        //   return merged;
        // }
        catchall(index2) {
          return new _ZodObject({
            ...this._def,
            catchall: index2
          });
        }
        pick(mask2) {
          const shape = {};
          for (const key2 of util_js_1.util.objectKeys(mask2)) {
            if (mask2[key2] && this.shape[key2]) {
              shape[key2] = this.shape[key2];
            }
          }
          return new _ZodObject({
            ...this._def,
            shape: () => shape
          });
        }
        omit(mask2) {
          const shape = {};
          for (const key2 of util_js_1.util.objectKeys(this.shape)) {
            if (!mask2[key2]) {
              shape[key2] = this.shape[key2];
            }
          }
          return new _ZodObject({
            ...this._def,
            shape: () => shape
          });
        }
        /**
         * @deprecated
         */
        deepPartial() {
          return deepPartialify(this);
        }
        partial(mask2) {
          const newShape = {};
          for (const key2 of util_js_1.util.objectKeys(this.shape)) {
            const fieldSchema = this.shape[key2];
            if (mask2 && !mask2[key2]) {
              newShape[key2] = fieldSchema;
            } else {
              newShape[key2] = fieldSchema.optional();
            }
          }
          return new _ZodObject({
            ...this._def,
            shape: () => newShape
          });
        }
        required(mask2) {
          const newShape = {};
          for (const key2 of util_js_1.util.objectKeys(this.shape)) {
            if (mask2 && !mask2[key2]) {
              newShape[key2] = this.shape[key2];
            } else {
              const fieldSchema = this.shape[key2];
              let newField = fieldSchema;
              while (newField instanceof ZodOptional2) {
                newField = newField._def.innerType;
              }
              newShape[key2] = newField;
            }
          }
          return new _ZodObject({
            ...this._def,
            shape: () => newShape
          });
        }
        keyof() {
          return createZodEnum(util_js_1.util.objectKeys(this.shape));
        }
      };
      exports.ZodObject = ZodObject2;
      ZodObject2.create = (shape, params) => {
        return new ZodObject2({
          shape: () => shape,
          unknownKeys: "strip",
          catchall: ZodNever2.create(),
          typeName: ZodFirstPartyTypeKind2.ZodObject,
          ...processCreateParams(params)
        });
      };
      ZodObject2.strictCreate = (shape, params) => {
        return new ZodObject2({
          shape: () => shape,
          unknownKeys: "strict",
          catchall: ZodNever2.create(),
          typeName: ZodFirstPartyTypeKind2.ZodObject,
          ...processCreateParams(params)
        });
      };
      ZodObject2.lazycreate = (shape, params) => {
        return new ZodObject2({
          shape,
          unknownKeys: "strip",
          catchall: ZodNever2.create(),
          typeName: ZodFirstPartyTypeKind2.ZodObject,
          ...processCreateParams(params)
        });
      };
      var ZodUnion2 = class extends ZodType2 {
        _parse(input) {
          const { ctx } = this._processInputParams(input);
          const options = this._def.options;
          function handleResults(results) {
            for (const result of results) {
              if (result.result.status === "valid") {
                return result.result;
              }
            }
            for (const result of results) {
              if (result.result.status === "dirty") {
                ctx.common.issues.push(...result.ctx.common.issues);
                return result.result;
              }
            }
            const unionErrors = results.map((result) => new ZodError_js_1.ZodError(result.ctx.common.issues));
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_union,
              unionErrors
            });
            return parseUtil_js_1.INVALID;
          }
          if (ctx.common.async) {
            return Promise.all(options.map(async (option) => {
              const childCtx = {
                ...ctx,
                common: {
                  ...ctx.common,
                  issues: []
                },
                parent: null
              };
              return {
                result: await option._parseAsync({
                  data: ctx.data,
                  path: ctx.path,
                  parent: childCtx
                }),
                ctx: childCtx
              };
            })).then(handleResults);
          } else {
            let dirty = void 0;
            const issues = [];
            for (const option of options) {
              const childCtx = {
                ...ctx,
                common: {
                  ...ctx.common,
                  issues: []
                },
                parent: null
              };
              const result = option._parseSync({
                data: ctx.data,
                path: ctx.path,
                parent: childCtx
              });
              if (result.status === "valid") {
                return result;
              } else if (result.status === "dirty" && !dirty) {
                dirty = { result, ctx: childCtx };
              }
              if (childCtx.common.issues.length) {
                issues.push(childCtx.common.issues);
              }
            }
            if (dirty) {
              ctx.common.issues.push(...dirty.ctx.common.issues);
              return dirty.result;
            }
            const unionErrors = issues.map((issues2) => new ZodError_js_1.ZodError(issues2));
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_union,
              unionErrors
            });
            return parseUtil_js_1.INVALID;
          }
        }
        get options() {
          return this._def.options;
        }
      };
      exports.ZodUnion = ZodUnion2;
      ZodUnion2.create = (types, params) => {
        return new ZodUnion2({
          options: types,
          typeName: ZodFirstPartyTypeKind2.ZodUnion,
          ...processCreateParams(params)
        });
      };
      var getDiscriminator = (type2) => {
        if (type2 instanceof ZodLazy2) {
          return getDiscriminator(type2.schema);
        } else if (type2 instanceof ZodEffects) {
          return getDiscriminator(type2.innerType());
        } else if (type2 instanceof ZodLiteral2) {
          return [type2.value];
        } else if (type2 instanceof ZodEnum2) {
          return type2.options;
        } else if (type2 instanceof ZodNativeEnum) {
          return util_js_1.util.objectValues(type2.enum);
        } else if (type2 instanceof ZodDefault2) {
          return getDiscriminator(type2._def.innerType);
        } else if (type2 instanceof ZodUndefined2) {
          return [void 0];
        } else if (type2 instanceof ZodNull2) {
          return [null];
        } else if (type2 instanceof ZodOptional2) {
          return [void 0, ...getDiscriminator(type2.unwrap())];
        } else if (type2 instanceof ZodNullable2) {
          return [null, ...getDiscriminator(type2.unwrap())];
        } else if (type2 instanceof ZodBranded) {
          return getDiscriminator(type2.unwrap());
        } else if (type2 instanceof ZodReadonly2) {
          return getDiscriminator(type2.unwrap());
        } else if (type2 instanceof ZodCatch2) {
          return getDiscriminator(type2._def.innerType);
        } else {
          return [];
        }
      };
      var ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 {
        _parse(input) {
          const { ctx } = this._processInputParams(input);
          if (ctx.parsedType !== util_js_1.ZodParsedType.object) {
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.object,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          const discriminator = this.discriminator;
          const discriminatorValue = ctx.data[discriminator];
          const option = this.optionsMap.get(discriminatorValue);
          if (!option) {
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_union_discriminator,
              options: Array.from(this.optionsMap.keys()),
              path: [discriminator]
            });
            return parseUtil_js_1.INVALID;
          }
          if (ctx.common.async) {
            return option._parseAsync({
              data: ctx.data,
              path: ctx.path,
              parent: ctx
            });
          } else {
            return option._parseSync({
              data: ctx.data,
              path: ctx.path,
              parent: ctx
            });
          }
        }
        get discriminator() {
          return this._def.discriminator;
        }
        get options() {
          return this._def.options;
        }
        get optionsMap() {
          return this._def.optionsMap;
        }
        /**
         * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
         * However, it only allows a union of objects, all of which need to share a discriminator property. This property must
         * have a different value for each object in the union.
         * @param discriminator the name of the discriminator property
         * @param types an array of object schemas
         * @param params
         */
        static create(discriminator, options, params) {
          const optionsMap = /* @__PURE__ */ new Map();
          for (const type2 of options) {
            const discriminatorValues = getDiscriminator(type2.shape[discriminator]);
            if (!discriminatorValues.length) {
              throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
            }
            for (const value of discriminatorValues) {
              if (optionsMap.has(value)) {
                throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
              }
              optionsMap.set(value, type2);
            }
          }
          return new _ZodDiscriminatedUnion({
            typeName: ZodFirstPartyTypeKind2.ZodDiscriminatedUnion,
            discriminator,
            options,
            optionsMap,
            ...processCreateParams(params)
          });
        }
      };
      exports.ZodDiscriminatedUnion = ZodDiscriminatedUnion2;
      function mergeValues2(a5, b9) {
        const aType = (0, util_js_1.getParsedType)(a5);
        const bType = (0, util_js_1.getParsedType)(b9);
        if (a5 === b9) {
          return { valid: true, data: a5 };
        } else if (aType === util_js_1.ZodParsedType.object && bType === util_js_1.ZodParsedType.object) {
          const bKeys = util_js_1.util.objectKeys(b9);
          const sharedKeys = util_js_1.util.objectKeys(a5).filter((key2) => bKeys.indexOf(key2) !== -1);
          const newObj = { ...a5, ...b9 };
          for (const key2 of sharedKeys) {
            const sharedValue = mergeValues2(a5[key2], b9[key2]);
            if (!sharedValue.valid) {
              return { valid: false };
            }
            newObj[key2] = sharedValue.data;
          }
          return { valid: true, data: newObj };
        } else if (aType === util_js_1.ZodParsedType.array && bType === util_js_1.ZodParsedType.array) {
          if (a5.length !== b9.length) {
            return { valid: false };
          }
          const newArray = [];
          for (let index2 = 0; index2 < a5.length; index2++) {
            const itemA = a5[index2];
            const itemB = b9[index2];
            const sharedValue = mergeValues2(itemA, itemB);
            if (!sharedValue.valid) {
              return { valid: false };
            }
            newArray.push(sharedValue.data);
          }
          return { valid: true, data: newArray };
        } else if (aType === util_js_1.ZodParsedType.date && bType === util_js_1.ZodParsedType.date && +a5 === +b9) {
          return { valid: true, data: a5 };
        } else {
          return { valid: false };
        }
      }
      var ZodIntersection2 = class extends ZodType2 {
        _parse(input) {
          const { status, ctx } = this._processInputParams(input);
          const handleParsed = (parsedLeft, parsedRight) => {
            if ((0, parseUtil_js_1.isAborted)(parsedLeft) || (0, parseUtil_js_1.isAborted)(parsedRight)) {
              return parseUtil_js_1.INVALID;
            }
            const merged = mergeValues2(parsedLeft.value, parsedRight.value);
            if (!merged.valid) {
              (0, parseUtil_js_1.addIssueToContext)(ctx, {
                code: ZodError_js_1.ZodIssueCode.invalid_intersection_types
              });
              return parseUtil_js_1.INVALID;
            }
            if ((0, parseUtil_js_1.isDirty)(parsedLeft) || (0, parseUtil_js_1.isDirty)(parsedRight)) {
              status.dirty();
            }
            return { status: status.value, value: merged.data };
          };
          if (ctx.common.async) {
            return Promise.all([
              this._def.left._parseAsync({
                data: ctx.data,
                path: ctx.path,
                parent: ctx
              }),
              this._def.right._parseAsync({
                data: ctx.data,
                path: ctx.path,
                parent: ctx
              })
            ]).then(([left, right]) => handleParsed(left, right));
          } else {
            return handleParsed(this._def.left._parseSync({
              data: ctx.data,
              path: ctx.path,
              parent: ctx
            }), this._def.right._parseSync({
              data: ctx.data,
              path: ctx.path,
              parent: ctx
            }));
          }
        }
      };
      exports.ZodIntersection = ZodIntersection2;
      ZodIntersection2.create = (left, right, params) => {
        return new ZodIntersection2({
          left,
          right,
          typeName: ZodFirstPartyTypeKind2.ZodIntersection,
          ...processCreateParams(params)
        });
      };
      var ZodTuple2 = class _ZodTuple extends ZodType2 {
        _parse(input) {
          const { status, ctx } = this._processInputParams(input);
          if (ctx.parsedType !== util_js_1.ZodParsedType.array) {
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.array,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          if (ctx.data.length < this._def.items.length) {
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.too_small,
              minimum: this._def.items.length,
              inclusive: true,
              exact: false,
              type: "array"
            });
            return parseUtil_js_1.INVALID;
          }
          const rest = this._def.rest;
          if (!rest && ctx.data.length > this._def.items.length) {
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.too_big,
              maximum: this._def.items.length,
              inclusive: true,
              exact: false,
              type: "array"
            });
            status.dirty();
          }
          const items = [...ctx.data].map((item, itemIndex) => {
            const schema = this._def.items[itemIndex] || this._def.rest;
            if (!schema)
              return null;
            return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
          }).filter((x13) => !!x13);
          if (ctx.common.async) {
            return Promise.all(items).then((results) => {
              return parseUtil_js_1.ParseStatus.mergeArray(status, results);
            });
          } else {
            return parseUtil_js_1.ParseStatus.mergeArray(status, items);
          }
        }
        get items() {
          return this._def.items;
        }
        rest(rest) {
          return new _ZodTuple({
            ...this._def,
            rest
          });
        }
      };
      exports.ZodTuple = ZodTuple2;
      ZodTuple2.create = (schemas, params) => {
        if (!Array.isArray(schemas)) {
          throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
        }
        return new ZodTuple2({
          items: schemas,
          typeName: ZodFirstPartyTypeKind2.ZodTuple,
          rest: null,
          ...processCreateParams(params)
        });
      };
      var ZodRecord2 = class _ZodRecord extends ZodType2 {
        get keySchema() {
          return this._def.keyType;
        }
        get valueSchema() {
          return this._def.valueType;
        }
        _parse(input) {
          const { status, ctx } = this._processInputParams(input);
          if (ctx.parsedType !== util_js_1.ZodParsedType.object) {
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.object,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          const pairs = [];
          const keyType = this._def.keyType;
          const valueType = this._def.valueType;
          for (const key2 in ctx.data) {
            pairs.push({
              key: keyType._parse(new ParseInputLazyPath(ctx, key2, ctx.path, key2)),
              value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key2], ctx.path, key2)),
              alwaysSet: key2 in ctx.data
            });
          }
          if (ctx.common.async) {
            return parseUtil_js_1.ParseStatus.mergeObjectAsync(status, pairs);
          } else {
            return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);
          }
        }
        get element() {
          return this._def.valueType;
        }
        static create(first, second, third) {
          if (second instanceof ZodType2) {
            return new _ZodRecord({
              keyType: first,
              valueType: second,
              typeName: ZodFirstPartyTypeKind2.ZodRecord,
              ...processCreateParams(third)
            });
          }
          return new _ZodRecord({
            keyType: ZodString2.create(),
            valueType: first,
            typeName: ZodFirstPartyTypeKind2.ZodRecord,
            ...processCreateParams(second)
          });
        }
      };
      exports.ZodRecord = ZodRecord2;
      var ZodMap2 = class extends ZodType2 {
        get keySchema() {
          return this._def.keyType;
        }
        get valueSchema() {
          return this._def.valueType;
        }
        _parse(input) {
          const { status, ctx } = this._processInputParams(input);
          if (ctx.parsedType !== util_js_1.ZodParsedType.map) {
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.map,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          const keyType = this._def.keyType;
          const valueType = this._def.valueType;
          const pairs = [...ctx.data.entries()].map(([key2, value], index2) => {
            return {
              key: keyType._parse(new ParseInputLazyPath(ctx, key2, ctx.path, [index2, "key"])),
              value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index2, "value"]))
            };
          });
          if (ctx.common.async) {
            const finalMap = /* @__PURE__ */ new Map();
            return Promise.resolve().then(async () => {
              for (const pair of pairs) {
                const key2 = await pair.key;
                const value = await pair.value;
                if (key2.status === "aborted" || value.status === "aborted") {
                  return parseUtil_js_1.INVALID;
                }
                if (key2.status === "dirty" || value.status === "dirty") {
                  status.dirty();
                }
                finalMap.set(key2.value, value.value);
              }
              return { status: status.value, value: finalMap };
            });
          } else {
            const finalMap = /* @__PURE__ */ new Map();
            for (const pair of pairs) {
              const key2 = pair.key;
              const value = pair.value;
              if (key2.status === "aborted" || value.status === "aborted") {
                return parseUtil_js_1.INVALID;
              }
              if (key2.status === "dirty" || value.status === "dirty") {
                status.dirty();
              }
              finalMap.set(key2.value, value.value);
            }
            return { status: status.value, value: finalMap };
          }
        }
      };
      exports.ZodMap = ZodMap2;
      ZodMap2.create = (keyType, valueType, params) => {
        return new ZodMap2({
          valueType,
          keyType,
          typeName: ZodFirstPartyTypeKind2.ZodMap,
          ...processCreateParams(params)
        });
      };
      var ZodSet2 = class _ZodSet extends ZodType2 {
        _parse(input) {
          const { status, ctx } = this._processInputParams(input);
          if (ctx.parsedType !== util_js_1.ZodParsedType.set) {
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.set,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          const def = this._def;
          if (def.minSize !== null) {
            if (ctx.data.size < def.minSize.value) {
              (0, parseUtil_js_1.addIssueToContext)(ctx, {
                code: ZodError_js_1.ZodIssueCode.too_small,
                minimum: def.minSize.value,
                type: "set",
                inclusive: true,
                exact: false,
                message: def.minSize.message
              });
              status.dirty();
            }
          }
          if (def.maxSize !== null) {
            if (ctx.data.size > def.maxSize.value) {
              (0, parseUtil_js_1.addIssueToContext)(ctx, {
                code: ZodError_js_1.ZodIssueCode.too_big,
                maximum: def.maxSize.value,
                type: "set",
                inclusive: true,
                exact: false,
                message: def.maxSize.message
              });
              status.dirty();
            }
          }
          const valueType = this._def.valueType;
          function finalizeSet(elements2) {
            const parsedSet = /* @__PURE__ */ new Set();
            for (const element of elements2) {
              if (element.status === "aborted")
                return parseUtil_js_1.INVALID;
              if (element.status === "dirty")
                status.dirty();
              parsedSet.add(element.value);
            }
            return { status: status.value, value: parsedSet };
          }
          const elements = [...ctx.data.values()].map((item, i5) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i5)));
          if (ctx.common.async) {
            return Promise.all(elements).then((elements2) => finalizeSet(elements2));
          } else {
            return finalizeSet(elements);
          }
        }
        min(minSize, message) {
          return new _ZodSet({
            ...this._def,
            minSize: { value: minSize, message: errorUtil_js_1.errorUtil.toString(message) }
          });
        }
        max(maxSize, message) {
          return new _ZodSet({
            ...this._def,
            maxSize: { value: maxSize, message: errorUtil_js_1.errorUtil.toString(message) }
          });
        }
        size(size5, message) {
          return this.min(size5, message).max(size5, message);
        }
        nonempty(message) {
          return this.min(1, message);
        }
      };
      exports.ZodSet = ZodSet2;
      ZodSet2.create = (valueType, params) => {
        return new ZodSet2({
          valueType,
          minSize: null,
          maxSize: null,
          typeName: ZodFirstPartyTypeKind2.ZodSet,
          ...processCreateParams(params)
        });
      };
      var ZodFunction2 = class _ZodFunction extends ZodType2 {
        constructor() {
          super(...arguments);
          this.validate = this.implement;
        }
        _parse(input) {
          const { ctx } = this._processInputParams(input);
          if (ctx.parsedType !== util_js_1.ZodParsedType.function) {
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.function,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          function makeArgsIssue(args, error51) {
            return (0, parseUtil_js_1.makeIssue)({
              data: args,
              path: ctx.path,
              errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x13) => !!x13),
              issueData: {
                code: ZodError_js_1.ZodIssueCode.invalid_arguments,
                argumentsError: error51
              }
            });
          }
          function makeReturnsIssue(returns, error51) {
            return (0, parseUtil_js_1.makeIssue)({
              data: returns,
              path: ctx.path,
              errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x13) => !!x13),
              issueData: {
                code: ZodError_js_1.ZodIssueCode.invalid_return_type,
                returnTypeError: error51
              }
            });
          }
          const params = { errorMap: ctx.common.contextualErrorMap };
          const fn = ctx.data;
          if (this._def.returns instanceof ZodPromise2) {
            const me8 = this;
            return (0, parseUtil_js_1.OK)(async function(...args) {
              const error51 = new ZodError_js_1.ZodError([]);
              const parsedArgs = await me8._def.args.parseAsync(args, params).catch((e2) => {
                error51.addIssue(makeArgsIssue(args, e2));
                throw error51;
              });
              const result = await Reflect.apply(fn, this, parsedArgs);
              const parsedReturns = await me8._def.returns._def.type.parseAsync(result, params).catch((e2) => {
                error51.addIssue(makeReturnsIssue(result, e2));
                throw error51;
              });
              return parsedReturns;
            });
          } else {
            const me8 = this;
            return (0, parseUtil_js_1.OK)(function(...args) {
              const parsedArgs = me8._def.args.safeParse(args, params);
              if (!parsedArgs.success) {
                throw new ZodError_js_1.ZodError([makeArgsIssue(args, parsedArgs.error)]);
              }
              const result = Reflect.apply(fn, this, parsedArgs.data);
              const parsedReturns = me8._def.returns.safeParse(result, params);
              if (!parsedReturns.success) {
                throw new ZodError_js_1.ZodError([makeReturnsIssue(result, parsedReturns.error)]);
              }
              return parsedReturns.data;
            });
          }
        }
        parameters() {
          return this._def.args;
        }
        returnType() {
          return this._def.returns;
        }
        args(...items) {
          return new _ZodFunction({
            ...this._def,
            args: ZodTuple2.create(items).rest(ZodUnknown2.create())
          });
        }
        returns(returnType) {
          return new _ZodFunction({
            ...this._def,
            returns: returnType
          });
        }
        implement(func) {
          const validatedFunc = this.parse(func);
          return validatedFunc;
        }
        strictImplement(func) {
          const validatedFunc = this.parse(func);
          return validatedFunc;
        }
        static create(args, returns, params) {
          return new _ZodFunction({
            args: args ? args : ZodTuple2.create([]).rest(ZodUnknown2.create()),
            returns: returns || ZodUnknown2.create(),
            typeName: ZodFirstPartyTypeKind2.ZodFunction,
            ...processCreateParams(params)
          });
        }
      };
      exports.ZodFunction = ZodFunction2;
      var ZodLazy2 = class extends ZodType2 {
        get schema() {
          return this._def.getter();
        }
        _parse(input) {
          const { ctx } = this._processInputParams(input);
          const lazySchema = this._def.getter();
          return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });
        }
      };
      exports.ZodLazy = ZodLazy2;
      ZodLazy2.create = (getter, params) => {
        return new ZodLazy2({
          getter,
          typeName: ZodFirstPartyTypeKind2.ZodLazy,
          ...processCreateParams(params)
        });
      };
      var ZodLiteral2 = class extends ZodType2 {
        _parse(input) {
          if (input.data !== this._def.value) {
            const ctx = this._getOrReturnCtx(input);
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              received: ctx.data,
              code: ZodError_js_1.ZodIssueCode.invalid_literal,
              expected: this._def.value
            });
            return parseUtil_js_1.INVALID;
          }
          return { status: "valid", value: input.data };
        }
        get value() {
          return this._def.value;
        }
      };
      exports.ZodLiteral = ZodLiteral2;
      ZodLiteral2.create = (value, params) => {
        return new ZodLiteral2({
          value,
          typeName: ZodFirstPartyTypeKind2.ZodLiteral,
          ...processCreateParams(params)
        });
      };
      function createZodEnum(values, params) {
        return new ZodEnum2({
          values,
          typeName: ZodFirstPartyTypeKind2.ZodEnum,
          ...processCreateParams(params)
        });
      }
      var ZodEnum2 = class _ZodEnum extends ZodType2 {
        _parse(input) {
          if (typeof input.data !== "string") {
            const ctx = this._getOrReturnCtx(input);
            const expectedValues = this._def.values;
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              expected: util_js_1.util.joinValues(expectedValues),
              received: ctx.parsedType,
              code: ZodError_js_1.ZodIssueCode.invalid_type
            });
            return parseUtil_js_1.INVALID;
          }
          if (!this._cache) {
            this._cache = new Set(this._def.values);
          }
          if (!this._cache.has(input.data)) {
            const ctx = this._getOrReturnCtx(input);
            const expectedValues = this._def.values;
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              received: ctx.data,
              code: ZodError_js_1.ZodIssueCode.invalid_enum_value,
              options: expectedValues
            });
            return parseUtil_js_1.INVALID;
          }
          return (0, parseUtil_js_1.OK)(input.data);
        }
        get options() {
          return this._def.values;
        }
        get enum() {
          const enumValues = {};
          for (const val of this._def.values) {
            enumValues[val] = val;
          }
          return enumValues;
        }
        get Values() {
          const enumValues = {};
          for (const val of this._def.values) {
            enumValues[val] = val;
          }
          return enumValues;
        }
        get Enum() {
          const enumValues = {};
          for (const val of this._def.values) {
            enumValues[val] = val;
          }
          return enumValues;
        }
        extract(values, newDef = this._def) {
          return _ZodEnum.create(values, {
            ...this._def,
            ...newDef
          });
        }
        exclude(values, newDef = this._def) {
          return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {
            ...this._def,
            ...newDef
          });
        }
      };
      exports.ZodEnum = ZodEnum2;
      ZodEnum2.create = createZodEnum;
      var ZodNativeEnum = class extends ZodType2 {
        _parse(input) {
          const nativeEnumValues = util_js_1.util.getValidEnumValues(this._def.values);
          const ctx = this._getOrReturnCtx(input);
          if (ctx.parsedType !== util_js_1.ZodParsedType.string && ctx.parsedType !== util_js_1.ZodParsedType.number) {
            const expectedValues = util_js_1.util.objectValues(nativeEnumValues);
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              expected: util_js_1.util.joinValues(expectedValues),
              received: ctx.parsedType,
              code: ZodError_js_1.ZodIssueCode.invalid_type
            });
            return parseUtil_js_1.INVALID;
          }
          if (!this._cache) {
            this._cache = new Set(util_js_1.util.getValidEnumValues(this._def.values));
          }
          if (!this._cache.has(input.data)) {
            const expectedValues = util_js_1.util.objectValues(nativeEnumValues);
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              received: ctx.data,
              code: ZodError_js_1.ZodIssueCode.invalid_enum_value,
              options: expectedValues
            });
            return parseUtil_js_1.INVALID;
          }
          return (0, parseUtil_js_1.OK)(input.data);
        }
        get enum() {
          return this._def.values;
        }
      };
      exports.ZodNativeEnum = ZodNativeEnum;
      ZodNativeEnum.create = (values, params) => {
        return new ZodNativeEnum({
          values,
          typeName: ZodFirstPartyTypeKind2.ZodNativeEnum,
          ...processCreateParams(params)
        });
      };
      var ZodPromise2 = class extends ZodType2 {
        unwrap() {
          return this._def.type;
        }
        _parse(input) {
          const { ctx } = this._processInputParams(input);
          if (ctx.parsedType !== util_js_1.ZodParsedType.promise && ctx.common.async === false) {
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.promise,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          const promisified = ctx.parsedType === util_js_1.ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);
          return (0, parseUtil_js_1.OK)(promisified.then((data) => {
            return this._def.type.parseAsync(data, {
              path: ctx.path,
              errorMap: ctx.common.contextualErrorMap
            });
          }));
        }
      };
      exports.ZodPromise = ZodPromise2;
      ZodPromise2.create = (schema, params) => {
        return new ZodPromise2({
          type: schema,
          typeName: ZodFirstPartyTypeKind2.ZodPromise,
          ...processCreateParams(params)
        });
      };
      var ZodEffects = class extends ZodType2 {
        innerType() {
          return this._def.schema;
        }
        sourceType() {
          return this._def.schema._def.typeName === ZodFirstPartyTypeKind2.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
        }
        _parse(input) {
          const { status, ctx } = this._processInputParams(input);
          const effect = this._def.effect || null;
          const checkCtx = {
            addIssue: (arg) => {
              (0, parseUtil_js_1.addIssueToContext)(ctx, arg);
              if (arg.fatal) {
                status.abort();
              } else {
                status.dirty();
              }
            },
            get path() {
              return ctx.path;
            }
          };
          checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
          if (effect.type === "preprocess") {
            const processed = effect.transform(ctx.data, checkCtx);
            if (ctx.common.async) {
              return Promise.resolve(processed).then(async (processed2) => {
                if (status.value === "aborted")
                  return parseUtil_js_1.INVALID;
                const result = await this._def.schema._parseAsync({
                  data: processed2,
                  path: ctx.path,
                  parent: ctx
                });
                if (result.status === "aborted")
                  return parseUtil_js_1.INVALID;
                if (result.status === "dirty")
                  return (0, parseUtil_js_1.DIRTY)(result.value);
                if (status.value === "dirty")
                  return (0, parseUtil_js_1.DIRTY)(result.value);
                return result;
              });
            } else {
              if (status.value === "aborted")
                return parseUtil_js_1.INVALID;
              const result = this._def.schema._parseSync({
                data: processed,
                path: ctx.path,
                parent: ctx
              });
              if (result.status === "aborted")
                return parseUtil_js_1.INVALID;
              if (result.status === "dirty")
                return (0, parseUtil_js_1.DIRTY)(result.value);
              if (status.value === "dirty")
                return (0, parseUtil_js_1.DIRTY)(result.value);
              return result;
            }
          }
          if (effect.type === "refinement") {
            const executeRefinement = (acc) => {
              const result = effect.refinement(acc, checkCtx);
              if (ctx.common.async) {
                return Promise.resolve(result);
              }
              if (result instanceof Promise) {
                throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
              }
              return acc;
            };
            if (ctx.common.async === false) {
              const inner = this._def.schema._parseSync({
                data: ctx.data,
                path: ctx.path,
                parent: ctx
              });
              if (inner.status === "aborted")
                return parseUtil_js_1.INVALID;
              if (inner.status === "dirty")
                status.dirty();
              executeRefinement(inner.value);
              return { status: status.value, value: inner.value };
            } else {
              return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {
                if (inner.status === "aborted")
                  return parseUtil_js_1.INVALID;
                if (inner.status === "dirty")
                  status.dirty();
                return executeRefinement(inner.value).then(() => {
                  return { status: status.value, value: inner.value };
                });
              });
            }
          }
          if (effect.type === "transform") {
            if (ctx.common.async === false) {
              const base4 = this._def.schema._parseSync({
                data: ctx.data,
                path: ctx.path,
                parent: ctx
              });
              if (!(0, parseUtil_js_1.isValid)(base4))
                return parseUtil_js_1.INVALID;
              const result = effect.transform(base4.value, checkCtx);
              if (result instanceof Promise) {
                throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
              }
              return { status: status.value, value: result };
            } else {
              return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base4) => {
                if (!(0, parseUtil_js_1.isValid)(base4))
                  return parseUtil_js_1.INVALID;
                return Promise.resolve(effect.transform(base4.value, checkCtx)).then((result) => ({
                  status: status.value,
                  value: result
                }));
              });
            }
          }
          util_js_1.util.assertNever(effect);
        }
      };
      exports.ZodEffects = ZodEffects;
      exports.ZodTransformer = ZodEffects;
      ZodEffects.create = (schema, effect, params) => {
        return new ZodEffects({
          schema,
          typeName: ZodFirstPartyTypeKind2.ZodEffects,
          effect,
          ...processCreateParams(params)
        });
      };
      ZodEffects.createWithPreprocess = (preprocess2, schema, params) => {
        return new ZodEffects({
          schema,
          effect: { type: "preprocess", transform: preprocess2 },
          typeName: ZodFirstPartyTypeKind2.ZodEffects,
          ...processCreateParams(params)
        });
      };
      var ZodOptional2 = class extends ZodType2 {
        _parse(input) {
          const parsedType2 = this._getType(input);
          if (parsedType2 === util_js_1.ZodParsedType.undefined) {
            return (0, parseUtil_js_1.OK)(void 0);
          }
          return this._def.innerType._parse(input);
        }
        unwrap() {
          return this._def.innerType;
        }
      };
      exports.ZodOptional = ZodOptional2;
      ZodOptional2.create = (type2, params) => {
        return new ZodOptional2({
          innerType: type2,
          typeName: ZodFirstPartyTypeKind2.ZodOptional,
          ...processCreateParams(params)
        });
      };
      var ZodNullable2 = class extends ZodType2 {
        _parse(input) {
          const parsedType2 = this._getType(input);
          if (parsedType2 === util_js_1.ZodParsedType.null) {
            return (0, parseUtil_js_1.OK)(null);
          }
          return this._def.innerType._parse(input);
        }
        unwrap() {
          return this._def.innerType;
        }
      };
      exports.ZodNullable = ZodNullable2;
      ZodNullable2.create = (type2, params) => {
        return new ZodNullable2({
          innerType: type2,
          typeName: ZodFirstPartyTypeKind2.ZodNullable,
          ...processCreateParams(params)
        });
      };
      var ZodDefault2 = class extends ZodType2 {
        _parse(input) {
          const { ctx } = this._processInputParams(input);
          let data = ctx.data;
          if (ctx.parsedType === util_js_1.ZodParsedType.undefined) {
            data = this._def.defaultValue();
          }
          return this._def.innerType._parse({
            data,
            path: ctx.path,
            parent: ctx
          });
        }
        removeDefault() {
          return this._def.innerType;
        }
      };
      exports.ZodDefault = ZodDefault2;
      ZodDefault2.create = (type2, params) => {
        return new ZodDefault2({
          innerType: type2,
          typeName: ZodFirstPartyTypeKind2.ZodDefault,
          defaultValue: typeof params.default === "function" ? params.default : () => params.default,
          ...processCreateParams(params)
        });
      };
      var ZodCatch2 = class extends ZodType2 {
        _parse(input) {
          const { ctx } = this._processInputParams(input);
          const newCtx = {
            ...ctx,
            common: {
              ...ctx.common,
              issues: []
            }
          };
          const result = this._def.innerType._parse({
            data: newCtx.data,
            path: newCtx.path,
            parent: {
              ...newCtx
            }
          });
          if ((0, parseUtil_js_1.isAsync)(result)) {
            return result.then((result2) => {
              return {
                status: "valid",
                value: result2.status === "valid" ? result2.value : this._def.catchValue({
                  get error() {
                    return new ZodError_js_1.ZodError(newCtx.common.issues);
                  },
                  input: newCtx.data
                })
              };
            });
          } else {
            return {
              status: "valid",
              value: result.status === "valid" ? result.value : this._def.catchValue({
                get error() {
                  return new ZodError_js_1.ZodError(newCtx.common.issues);
                },
                input: newCtx.data
              })
            };
          }
        }
        removeCatch() {
          return this._def.innerType;
        }
      };
      exports.ZodCatch = ZodCatch2;
      ZodCatch2.create = (type2, params) => {
        return new ZodCatch2({
          innerType: type2,
          typeName: ZodFirstPartyTypeKind2.ZodCatch,
          catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
          ...processCreateParams(params)
        });
      };
      var ZodNaN2 = class extends ZodType2 {
        _parse(input) {
          const parsedType2 = this._getType(input);
          if (parsedType2 !== util_js_1.ZodParsedType.nan) {
            const ctx = this._getOrReturnCtx(input);
            (0, parseUtil_js_1.addIssueToContext)(ctx, {
              code: ZodError_js_1.ZodIssueCode.invalid_type,
              expected: util_js_1.ZodParsedType.nan,
              received: ctx.parsedType
            });
            return parseUtil_js_1.INVALID;
          }
          return { status: "valid", value: input.data };
        }
      };
      exports.ZodNaN = ZodNaN2;
      ZodNaN2.create = (params) => {
        return new ZodNaN2({
          typeName: ZodFirstPartyTypeKind2.ZodNaN,
          ...processCreateParams(params)
        });
      };
      exports.BRAND = /* @__PURE__ */ Symbol("zod_brand");
      var ZodBranded = class extends ZodType2 {
        _parse(input) {
          const { ctx } = this._processInputParams(input);
          const data = ctx.data;
          return this._def.type._parse({
            data,
            path: ctx.path,
            parent: ctx
          });
        }
        unwrap() {
          return this._def.type;
        }
      };
      exports.ZodBranded = ZodBranded;
      var ZodPipeline = class _ZodPipeline extends ZodType2 {
        _parse(input) {
          const { status, ctx } = this._processInputParams(input);
          if (ctx.common.async) {
            const handleAsync = async () => {
              const inResult = await this._def.in._parseAsync({
                data: ctx.data,
                path: ctx.path,
                parent: ctx
              });
              if (inResult.status === "aborted")
                return parseUtil_js_1.INVALID;
              if (inResult.status === "dirty") {
                status.dirty();
                return (0, parseUtil_js_1.DIRTY)(inResult.value);
              } else {
                return this._def.out._parseAsync({
                  data: inResult.value,
                  path: ctx.path,
                  parent: ctx
                });
              }
            };
            return handleAsync();
          } else {
            const inResult = this._def.in._parseSync({
              data: ctx.data,
              path: ctx.path,
              parent: ctx
            });
            if (inResult.status === "aborted")
              return parseUtil_js_1.INVALID;
            if (inResult.status === "dirty") {
              status.dirty();
              return {
                status: "dirty",
                value: inResult.value
              };
            } else {
              return this._def.out._parseSync({
                data: inResult.value,
                path: ctx.path,
                parent: ctx
              });
            }
          }
        }
        static create(a5, b9) {
          return new _ZodPipeline({
            in: a5,
            out: b9,
            typeName: ZodFirstPartyTypeKind2.ZodPipeline
          });
        }
      };
      exports.ZodPipeline = ZodPipeline;
      var ZodReadonly2 = class extends ZodType2 {
        _parse(input) {
          const result = this._def.innerType._parse(input);
          const freeze = (data) => {
            if ((0, parseUtil_js_1.isValid)(data)) {
              data.value = Object.freeze(data.value);
            }
            return data;
          };
          return (0, parseUtil_js_1.isAsync)(result) ? result.then((data) => freeze(data)) : freeze(result);
        }
        unwrap() {
          return this._def.innerType;
        }
      };
      exports.ZodReadonly = ZodReadonly2;
      ZodReadonly2.create = (type2, params) => {
        return new ZodReadonly2({
          innerType: type2,
          typeName: ZodFirstPartyTypeKind2.ZodReadonly,
          ...processCreateParams(params)
        });
      };
      function cleanParams(params, data) {
        const p7 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
        const p22 = typeof p7 === "string" ? { message: p7 } : p7;
        return p22;
      }
      function custom2(check2, _params = {}, fatal) {
        if (check2)
          return ZodAny2.create().superRefine((data, ctx) => {
            const r3 = check2(data);
            if (r3 instanceof Promise) {
              return r3.then((r4) => {
                if (!r4) {
                  const params = cleanParams(_params, data);
                  const _fatal = params.fatal ?? fatal ?? true;
                  ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
                }
              });
            }
            if (!r3) {
              const params = cleanParams(_params, data);
              const _fatal = params.fatal ?? fatal ?? true;
              ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
            }
            return;
          });
        return ZodAny2.create();
      }
      exports.late = {
        object: ZodObject2.lazycreate
      };
      var ZodFirstPartyTypeKind2;
      (function(ZodFirstPartyTypeKind3) {
        ZodFirstPartyTypeKind3["ZodString"] = "ZodString";
        ZodFirstPartyTypeKind3["ZodNumber"] = "ZodNumber";
        ZodFirstPartyTypeKind3["ZodNaN"] = "ZodNaN";
        ZodFirstPartyTypeKind3["ZodBigInt"] = "ZodBigInt";
        ZodFirstPartyTypeKind3["ZodBoolean"] = "ZodBoolean";
        ZodFirstPartyTypeKind3["ZodDate"] = "ZodDate";
        ZodFirstPartyTypeKind3["ZodSymbol"] = "ZodSymbol";
        ZodFirstPartyTypeKind3["ZodUndefined"] = "ZodUndefined";
        ZodFirstPartyTypeKind3["ZodNull"] = "ZodNull";
        ZodFirstPartyTypeKind3["ZodAny"] = "ZodAny";
        ZodFirstPartyTypeKind3["ZodUnknown"] = "ZodUnknown";
        ZodFirstPartyTypeKind3["ZodNever"] = "ZodNever";
        ZodFirstPartyTypeKind3["ZodVoid"] = "ZodVoid";
        ZodFirstPartyTypeKind3["ZodArray"] = "ZodArray";
        ZodFirstPartyTypeKind3["ZodObject"] = "ZodObject";
        ZodFirstPartyTypeKind3["ZodUnion"] = "ZodUnion";
        ZodFirstPartyTypeKind3["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion";
        ZodFirstPartyTypeKind3["ZodIntersection"] = "ZodIntersection";
        ZodFirstPartyTypeKind3["ZodTuple"] = "ZodTuple";
        ZodFirstPartyTypeKind3["ZodRecord"] = "ZodRecord";
        ZodFirstPartyTypeKind3["ZodMap"] = "ZodMap";
        ZodFirstPartyTypeKind3["ZodSet"] = "ZodSet";
        ZodFirstPartyTypeKind3["ZodFunction"] = "ZodFunction";
        ZodFirstPartyTypeKind3["ZodLazy"] = "ZodLazy";
        ZodFirstPartyTypeKind3["ZodLiteral"] = "ZodLiteral";
        ZodFirstPartyTypeKind3["ZodEnum"] = "ZodEnum";
        ZodFirstPartyTypeKind3["ZodEffects"] = "ZodEffects";
        ZodFirstPartyTypeKind3["ZodNativeEnum"] = "ZodNativeEnum";
        ZodFirstPartyTypeKind3["ZodOptional"] = "ZodOptional";
        ZodFirstPartyTypeKind3["ZodNullable"] = "ZodNullable";
        ZodFirstPartyTypeKind3["ZodDefault"] = "ZodDefault";
        ZodFirstPartyTypeKind3["ZodCatch"] = "ZodCatch";
        ZodFirstPartyTypeKind3["ZodPromise"] = "ZodPromise";
        ZodFirstPartyTypeKind3["ZodBranded"] = "ZodBranded";
        ZodFirstPartyTypeKind3["ZodPipeline"] = "ZodPipeline";
        ZodFirstPartyTypeKind3["ZodReadonly"] = "ZodReadonly";
      })(ZodFirstPartyTypeKind2 || (exports.ZodFirstPartyTypeKind = ZodFirstPartyTypeKind2 = {}));
      var instanceOfType = (cls, params = {
        message: `Input not instance of ${cls.name}`
      }) => custom2((data) => data instanceof cls, params);
      exports.instanceof = instanceOfType;
      var stringType = ZodString2.create;
      exports.string = stringType;
      var numberType = ZodNumber2.create;
      exports.number = numberType;
      var nanType = ZodNaN2.create;
      exports.nan = nanType;
      var bigIntType = ZodBigInt2.create;
      exports.bigint = bigIntType;
      var booleanType = ZodBoolean2.create;
      exports.boolean = booleanType;
      var dateType = ZodDate2.create;
      exports.date = dateType;
      var symbolType = ZodSymbol2.create;
      exports.symbol = symbolType;
      var undefinedType = ZodUndefined2.create;
      exports.undefined = undefinedType;
      var nullType = ZodNull2.create;
      exports.null = nullType;
      var anyType = ZodAny2.create;
      exports.any = anyType;
      var unknownType = ZodUnknown2.create;
      exports.unknown = unknownType;
      var neverType = ZodNever2.create;
      exports.never = neverType;
      var voidType = ZodVoid2.create;
      exports.void = voidType;
      var arrayType = ZodArray2.create;
      exports.array = arrayType;
      var objectType = ZodObject2.create;
      exports.object = objectType;
      var strictObjectType = ZodObject2.strictCreate;
      exports.strictObject = strictObjectType;
      var unionType = ZodUnion2.create;
      exports.union = unionType;
      var discriminatedUnionType = ZodDiscriminatedUnion2.create;
      exports.discriminatedUnion = discriminatedUnionType;
      var intersectionType = ZodIntersection2.create;
      exports.intersection = intersectionType;
      var tupleType = ZodTuple2.create;
      exports.tuple = tupleType;
      var recordType = ZodRecord2.create;
      exports.record = recordType;
      var mapType = ZodMap2.create;
      exports.map = mapType;
      var setType = ZodSet2.create;
      exports.set = setType;
      var functionType = ZodFunction2.create;
      exports.function = functionType;
      var lazyType = ZodLazy2.create;
      exports.lazy = lazyType;
      var literalType = ZodLiteral2.create;
      exports.literal = literalType;
      var enumType = ZodEnum2.create;
      exports.enum = enumType;
      var nativeEnumType = ZodNativeEnum.create;
      exports.nativeEnum = nativeEnumType;
      var promiseType = ZodPromise2.create;
      exports.promise = promiseType;
      var effectsType = ZodEffects.create;
      exports.effect = effectsType;
      exports.transformer = effectsType;
      var optionalType = ZodOptional2.create;
      exports.optional = optionalType;
      var nullableType = ZodNullable2.create;
      exports.nullable = nullableType;
      var preprocessType = ZodEffects.createWithPreprocess;
      exports.preprocess = preprocessType;
      var pipelineType = ZodPipeline.create;
      exports.pipeline = pipelineType;
      var ostring = () => stringType().optional();
      exports.ostring = ostring;
      var onumber = () => numberType().optional();
      exports.onumber = onumber;
      var oboolean = () => booleanType().optional();
      exports.oboolean = oboolean;
      exports.coerce = {
        string: ((arg) => ZodString2.create({ ...arg, coerce: true })),
        number: ((arg) => ZodNumber2.create({ ...arg, coerce: true })),
        boolean: ((arg) => ZodBoolean2.create({
          ...arg,
          coerce: true
        })),
        bigint: ((arg) => ZodBigInt2.create({ ...arg, coerce: true })),
        date: ((arg) => ZodDate2.create({ ...arg, coerce: true }))
      };
      exports.NEVER = parseUtil_js_1.INVALID;
    }
  });

  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.cjs
  var require_external = __commonJS({
    "../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.cjs"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      __exportStar2(require_errors(), exports);
      __exportStar2(require_parseUtil(), exports);
      __exportStar2(require_typeAliases(), exports);
      __exportStar2(require_util(), exports);
      __exportStar2(require_types(), exports);
      __exportStar2(require_ZodError(), exports);
    }
  });

  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.cjs
  var require_zod = __commonJS({
    "../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.cjs"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o5, v13) {
        Object.defineProperty(o5, "default", { enumerable: true, value: v13 });
      }) : function(o5, v13) {
        o5["default"] = v13;
      });
      var __importStar2 = exports && exports.__importStar || function(mod3) {
        if (mod3 && mod3.__esModule) return mod3;
        var result = {};
        if (mod3 != null) {
          for (var k7 in mod3) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod3, k7)) __createBinding2(result, mod3, k7);
        }
        __setModuleDefault(result, mod3);
        return result;
      };
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.z = void 0;
      var z11 = __importStar2(require_external());
      exports.z = z11;
      __exportStar2(require_external(), exports);
      exports.default = z11;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/package.json
  var require_package = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/package.json"(exports, module) {
      module.exports = {
        name: "@ton/ton",
        version: "16.3.0",
        repository: "https://github.com/ton-org/ton.git",
        author: "Whales Corp. <developers@whalescorp.com>",
        license: "MIT",
        main: "dist/index.js",
        files: [
          "dist",
          "!*.test.*",
          "!*.spec.*",
          "!*.trait.*",
          "!__snapshots__",
          "!__testdata__",
          "!__tests__"
        ],
        scripts: {
          build: "rm -fr dist && tsc -p ./tsconfig.build.json",
          typecheck: "tsc",
          test: "jest --verbose",
          format: "biome format --write .",
          "format:check": "biome format .",
          coverage: "jest -c ./jest-coverage.config.js",
          release: "yarn build && yarn release-it --npm.yarn1"
        },
        devDependencies: {
          "@biomejs/biome": "2.3.8",
          "@release-it/keep-a-changelog": "^5.0.0",
          "@swc/core": "^1.15.3",
          "@swc/jest": "^0.2.39",
          "@ton/core": "^0.63.0",
          "@ton/crypto": "3.2.0",
          "@ton/sandbox": "^0.40.0",
          "@ton/test-utils": "^0.12.0",
          "@types/jest": "^29.5.12",
          "@types/node": "^20.11.30",
          jest: "^29.7.0",
          "release-it": "^17.1.1",
          typescript: "^5.6.3"
        },
        dependencies: {
          axios: "^1.15.0",
          dataloader: "^2.0.0",
          zod: "^3.21.4"
        },
        peerDependencies: {
          "@ton/core": ">=0.63.0 <1.0.0",
          "@ton/crypto": ">=3.2.0"
        },
        publishConfig: {
          access: "public",
          registry: "https://registry.npmjs.org/"
        },
        "release-it": {
          github: {
            release: true
          },
          plugins: {
            "@release-it/keep-a-changelog": {
              filename: "CHANGELOG.md"
            }
          }
        },
        packageManager: "yarn@3.4.1"
      };
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/client/api/HttpApi.js
  var require_HttpApi = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/client/api/HttpApi.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __importDefault2 = exports && exports.__importDefault || function(mod3) {
        return mod3 && mod3.__esModule ? mod3 : { "default": mod3 };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.HttpApi = void 0;
      var TonCache_1 = require_TonCache();
      var dataloader_1 = __importDefault2(require_dataloader());
      var axios_1 = __importDefault2(require_axios());
      var zod_1 = require_zod();
      var version16 = require_package().version;
      var blockIdExt = zod_1.z.object({
        "@type": zod_1.z.literal("ton.blockIdExt"),
        workchain: zod_1.z.number(),
        shard: zod_1.z.string(),
        seqno: zod_1.z.number(),
        root_hash: zod_1.z.string(),
        file_hash: zod_1.z.string()
      });
      var addressInformation = zod_1.z.object({
        balance: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]),
        extra_currencies: zod_1.z.optional(zod_1.z.array(zod_1.z.object({
          "@type": zod_1.z.literal("extraCurrency"),
          id: zod_1.z.number(),
          amount: zod_1.z.string()
        }))),
        state: zod_1.z.union([
          zod_1.z.literal("active"),
          zod_1.z.literal("uninitialized"),
          zod_1.z.literal("frozen")
        ]),
        data: zod_1.z.string(),
        code: zod_1.z.string(),
        last_transaction_id: zod_1.z.object({
          "@type": zod_1.z.literal("internal.transactionId"),
          lt: zod_1.z.string(),
          hash: zod_1.z.string()
        }),
        block_id: blockIdExt,
        sync_utime: zod_1.z.number()
      });
      var bocResponse = zod_1.z.object({
        "@type": zod_1.z.literal("ok")
      });
      var feeResponse = zod_1.z.object({
        "@type": zod_1.z.literal("query.fees"),
        source_fees: zod_1.z.object({
          "@type": zod_1.z.literal("fees"),
          in_fwd_fee: zod_1.z.number(),
          storage_fee: zod_1.z.number(),
          gas_fee: zod_1.z.number(),
          fwd_fee: zod_1.z.number()
        })
      });
      var callGetMethod = zod_1.z.object({
        gas_used: zod_1.z.number(),
        exit_code: zod_1.z.number(),
        stack: zod_1.z.array(zod_1.z.unknown())
      });
      var messageData = zod_1.z.union([
        zod_1.z.object({
          "@type": zod_1.z.literal("msg.dataRaw"),
          body: zod_1.z.string()
        }),
        zod_1.z.object({
          "@type": zod_1.z.literal("msg.dataText"),
          text: zod_1.z.string()
        }),
        zod_1.z.object({
          "@type": zod_1.z.literal("msg.dataDecryptedText"),
          text: zod_1.z.string()
        }),
        zod_1.z.object({
          "@type": zod_1.z.literal("msg.dataEncryptedText"),
          text: zod_1.z.string()
        })
      ]);
      var message = zod_1.z.object({
        source: zod_1.z.string(),
        destination: zod_1.z.string(),
        value: zod_1.z.string(),
        fwd_fee: zod_1.z.string(),
        ihr_fee: zod_1.z.string(),
        created_lt: zod_1.z.string(),
        body_hash: zod_1.z.string(),
        msg_data: messageData,
        message: zod_1.z.string().optional()
      });
      var transaction = zod_1.z.object({
        data: zod_1.z.string(),
        utime: zod_1.z.number(),
        transaction_id: zod_1.z.object({
          lt: zod_1.z.string(),
          hash: zod_1.z.string()
        }),
        fee: zod_1.z.string(),
        storage_fee: zod_1.z.string(),
        other_fee: zod_1.z.string(),
        in_msg: zod_1.z.union([zod_1.z.undefined(), message]),
        out_msgs: zod_1.z.array(message)
      });
      var getTransactions = zod_1.z.array(transaction);
      var getMasterchain = zod_1.z.object({
        state_root_hash: zod_1.z.string(),
        last: blockIdExt,
        init: blockIdExt
      });
      var getShards = zod_1.z.object({
        shards: zod_1.z.array(blockIdExt)
      });
      var blockShortTxt = zod_1.z.object({
        "@type": zod_1.z.literal("blocks.shortTxId"),
        mode: zod_1.z.number(),
        account: zod_1.z.string(),
        lt: zod_1.z.string(),
        hash: zod_1.z.string()
      });
      var getBlockTransactions = zod_1.z.object({
        id: blockIdExt,
        req_count: zod_1.z.number(),
        incomplete: zod_1.z.boolean(),
        transactions: zod_1.z.array(blockShortTxt)
      });
      var TypedCache = class {
        constructor(namespace, cache, codec2, keyEncoder) {
          this.namespace = namespace;
          this.cache = cache;
          this.codec = codec2;
          this.keyEncoder = keyEncoder;
        }
        async get(key2) {
          let ex = await this.cache.get(this.namespace, this.keyEncoder(key2));
          if (ex) {
            let decoded = this.codec.safeParse(JSON.parse(ex));
            if (decoded.success) {
              return decoded.data;
            }
          }
          return null;
        }
        async set(key2, value) {
          if (value !== null) {
            await this.cache.set(this.namespace, this.keyEncoder(key2), JSON.stringify(value));
          } else {
            await this.cache.set(this.namespace, this.keyEncoder(key2), null);
          }
        }
      };
      var HttpApi = class {
        constructor(endpoint2, parameters) {
          this.endpoint = endpoint2;
          this.cache = new TonCache_1.InMemoryCache();
          this.parameters = {
            timeout: parameters?.timeout || 3e4,
            // 30 seconds by default
            apiKey: parameters?.apiKey,
            adapter: parameters?.adapter
          };
          this.shardCache = new TypedCache("ton-shard", this.cache, zod_1.z.array(blockIdExt), (src2) => src2 + "");
          this.shardLoader = new dataloader_1.default(async (src2) => {
            return await Promise.all(src2.map(async (v13) => {
              const cached2 = await this.shardCache.get(v13);
              if (cached2) {
                return cached2;
              }
              let loaded = (await this.doCall("shards", { seqno: v13 }, getShards)).shards;
              await this.shardCache.set(v13, loaded);
              return loaded;
            }));
          });
          this.shardTransactionsCache = new TypedCache("ton-shard-tx", this.cache, getBlockTransactions, (src2) => src2.workchain + ":" + src2.shard + ":" + src2.seqno);
          this.shardTransactionsLoader = new dataloader_1.default(async (src2) => {
            return await Promise.all(src2.map(async (v13) => {
              const cached2 = await this.shardTransactionsCache.get(v13);
              if (cached2) {
                return cached2;
              }
              let loaded = await this.doCall("getBlockTransactions", {
                workchain: v13.workchain,
                seqno: v13.seqno,
                shard: v13.shard
              }, getBlockTransactions);
              await this.shardTransactionsCache.set(v13, loaded);
              return loaded;
            }));
          }, {
            cacheKeyFn: (src2) => src2.workchain + ":" + src2.shard + ":" + src2.seqno
          });
        }
        getAddressInformation(address) {
          return this.doCall("getAddressInformation", { address: address.toString() }, addressInformation);
        }
        async getTransactions(address, opts) {
          const inclusive = opts.inclusive;
          delete opts.inclusive;
          let hash5 = void 0;
          if (opts.hash) {
            hash5 = Buffer2.from(opts.hash, "base64").toString("hex");
          }
          let limit = opts.limit;
          if (opts.hash && opts.lt && inclusive !== true) {
            limit++;
          }
          let res = await this.doCall("getTransactions", { address: address.toString(), ...opts, limit, hash: hash5 }, getTransactions);
          if (res.length > limit) {
            res = res.slice(0, limit);
          }
          if (opts.hash && opts.lt && inclusive !== true) {
            res.shift();
            return res;
          } else {
            return res;
          }
        }
        async getMasterchainInfo() {
          return await this.doCall("getMasterchainInfo", {}, getMasterchain);
        }
        async getShards(seqno) {
          return await this.shardLoader.load(seqno);
        }
        async getBlockTransactions(workchain, seqno, shard) {
          return await this.shardTransactionsLoader.load({
            workchain,
            seqno,
            shard
          });
        }
        async getTransaction(address, lt6, hash5) {
          let convHash = Buffer2.from(hash5, "base64").toString("hex");
          let res = await this.doCall("getTransactions", { address: address.toString(), lt: lt6, hash: convHash, limit: 1 }, getTransactions);
          let ex = res.find((v13) => v13.transaction_id.lt === lt6 && v13.transaction_id.hash === hash5);
          if (ex) {
            return ex;
          } else {
            return null;
          }
        }
        async callGetMethod(address, method, stack) {
          return await this.doCall("runGetMethod", {
            address: address.toString(),
            method,
            stack: serializeStack(stack)
          }, callGetMethod);
        }
        async sendBoc(body) {
          await this.doCall("sendBoc", { boc: body.toString("base64") }, bocResponse);
        }
        async estimateFee(address, args) {
          return await this.doCall("estimateFee", {
            address: address.toString(),
            body: args.body.toBoc().toString("base64"),
            init_data: args.initData ? args.initData.toBoc().toString("base64") : "",
            init_code: args.initCode ? args.initCode.toBoc().toString("base64") : "",
            ignore_chksig: args.ignoreSignature
          }, feeResponse);
        }
        async tryLocateResultTx(source, destination, created_lt) {
          return await this.doCall("tryLocateResultTx", {
            source: source.toString(),
            destination: destination.toString(),
            created_lt
          }, transaction);
        }
        async tryLocateSourceTx(source, destination, created_lt) {
          return await this.doCall("tryLocateSourceTx", {
            source: source.toString(),
            destination: destination.toString(),
            created_lt
          }, transaction);
        }
        async doCall(method, body, codec2) {
          let headers = {
            "Content-Type": "application/json",
            "X-Ton-Client-Version": version16
          };
          if (this.parameters.apiKey) {
            headers["X-API-Key"] = this.parameters.apiKey;
          }
          let res = await axios_1.default.post(this.endpoint, JSON.stringify({
            id: "1",
            jsonrpc: "2.0",
            method,
            params: body
          }), {
            headers,
            timeout: this.parameters.timeout,
            adapter: this.parameters.adapter
          });
          if (res.status !== 200 || !res.data.ok) {
            throw Error("Received error: " + JSON.stringify(res.data));
          }
          let decoded = codec2.safeParse(res.data.result);
          if (decoded.success) {
            return decoded.data;
          } else {
            throw Error("Malformed response: " + decoded.error.format()._errors.join(", "));
          }
        }
      };
      exports.HttpApi = HttpApi;
      function serializeStack(src2) {
        let stack = [];
        for (let s3 of src2) {
          if (s3.type === "int") {
            stack.push(["num", s3.value.toString()]);
          } else if (s3.type === "cell") {
            stack.push(["tvm.Cell", s3.cell.toBoc().toString("base64")]);
          } else if (s3.type === "slice") {
            stack.push(["tvm.Slice", s3.cell.toBoc().toString("base64")]);
          } else if (s3.type === "builder") {
            stack.push(["tvm.Builder", s3.cell.toBoc().toString("base64")]);
          } else {
            throw Error("Unsupported stack item type: " + s3.type);
          }
        }
        return stack;
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/client/TonClient.js
  var require_TonClient = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/client/TonClient.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.TonClient = void 0;
      var HttpApi_1 = require_HttpApi();
      var core_1 = require_dist2();
      var TonClient2 = class {
        constructor(parameters) {
          this.parameters = {
            endpoint: parameters.endpoint
          };
          this.api = new HttpApi_1.HttpApi(this.parameters.endpoint, {
            timeout: parameters.timeout,
            apiKey: parameters.apiKey,
            adapter: parameters.httpAdapter
          });
        }
        /**
         * Get Address Balance
         * @param address address for balance check
         * @returns balance
         */
        async getBalance(address) {
          return (await this.getContractState(address)).balance;
        }
        /**
         * Invoke get method
         * @param address contract address
         * @param name name of method
         * @param params optional parameters
         * @returns stack and gas_used field
         */
        async runMethod(address, name2, stack = []) {
          let res = await this.api.callGetMethod(address, name2, stack);
          if (res.exit_code !== 0) {
            throw Error("Unable to execute get method. Got exit_code: " + res.exit_code);
          }
          return { gas_used: res.gas_used, stack: parseStack(res.stack) };
        }
        /**
         * Invoke get method
         * @param address contract address
         * @param name name of method
         * @param params optional parameters
         * @returns stack and gas_used field
         * @deprecated use runMethod instead
         */
        async callGetMethod(address, name2, stack = []) {
          return this.runMethod(address, name2, stack);
        }
        /**
         * Invoke get method that returns error code instead of throwing error
         * @param address contract address
         * @param name name of method
         * @param params optional parameters
         * @returns stack and gas_used field
         */
        async runMethodWithError(address, name2, params = []) {
          let res = await this.api.callGetMethod(address, name2, params);
          return {
            gas_used: res.gas_used,
            stack: parseStack(res.stack),
            exit_code: res.exit_code
          };
        }
        /**
         * Invoke get method that returns error code instead of throwing error
         * @param address contract address
         * @param name name of method
         * @param params optional parameters
         * @returns stack and gas_used field
         * @deprecated use runMethodWithError instead
         */
        async callGetMethodWithError(address, name2, stack = []) {
          return this.runMethodWithError(address, name2, stack);
        }
        /**
         * Get transactions
         * @param address address
         */
        async getTransactions(address, opts) {
          let tx = await this.api.getTransactions(address, opts);
          let res = [];
          for (let r3 of tx) {
            res.push((0, core_1.loadTransaction)(core_1.Cell.fromBoc(Buffer2.from(r3.data, "base64"))[0].beginParse()));
          }
          return res;
        }
        /**
         * Get transaction by it's id
         * @param address address
         * @param lt logical time
         * @param hash transaction hash
         * @returns transaction or null if not exist
         */
        async getTransaction(address, lt6, hash5) {
          let res = await this.api.getTransaction(address, lt6, hash5);
          if (res) {
            return (0, core_1.loadTransaction)(core_1.Cell.fromBoc(Buffer2.from(res.data, "base64"))[0].beginParse());
          } else {
            return null;
          }
        }
        /**
         * Locate outcoming transaction of destination address by incoming message
         * @param source message source address
         * @param destination message destination address
         * @param created_lt message's created lt
         * @returns transaction
         */
        async tryLocateResultTx(source, destination, created_lt) {
          let res = await this.api.tryLocateResultTx(source, destination, created_lt);
          return (0, core_1.loadTransaction)(core_1.Cell.fromBase64(res.data).beginParse());
        }
        /**
         * Locate incoming transaction of source address by outcoming message
         * @param source message source address
         * @param destination message destination address
         * @param created_lt message's created lt
         * @returns transaction
         */
        async tryLocateSourceTx(source, destination, created_lt) {
          let res = await this.api.tryLocateSourceTx(source, destination, created_lt);
          return (0, core_1.loadTransaction)(core_1.Cell.fromBase64(res.data).beginParse());
        }
        /**
         * Fetch latest masterchain info
         * @returns masterchain info
         */
        async getMasterchainInfo() {
          let r3 = await this.api.getMasterchainInfo();
          return {
            workchain: r3.init.workchain,
            shard: r3.last.shard,
            initSeqno: r3.init.seqno,
            latestSeqno: r3.last.seqno
          };
        }
        /**
         * Fetch latest workchain shards
         * @param seqno masterchain seqno
         */
        async getWorkchainShards(seqno) {
          let r3 = await this.api.getShards(seqno);
          return r3.map((m3) => ({
            workchain: m3.workchain,
            shard: m3.shard,
            seqno: m3.seqno
          }));
        }
        /**
         * Fetch transactions inf shards
         * @param workchain
         * @param seqno
         * @param shard
         */
        async getShardTransactions(workchain, seqno, shard) {
          let tx = await this.api.getBlockTransactions(workchain, seqno, shard);
          if (tx.incomplete) {
            throw Error("Unsupported");
          }
          return tx.transactions.map((v13) => ({
            account: core_1.Address.parseRaw(v13.account),
            lt: v13.lt,
            hash: v13.hash
          }));
        }
        /**
         * Send message to a network
         * @param src source message
         */
        async sendMessage(src2) {
          const boc = (0, core_1.beginCell)().store((0, core_1.storeMessage)(src2)).endCell().toBoc();
          await this.api.sendBoc(boc);
        }
        /**
         * Send file to a network
         * @param src source file
         */
        async sendFile(src2) {
          await this.api.sendBoc(src2);
        }
        /**
         * Estimate fees for external message
         * @param address target address
         * @returns
         */
        async estimateExternalMessageFee(address, args) {
          return await this.api.estimateFee(address, {
            body: args.body,
            initCode: args.initCode,
            initData: args.initData,
            ignoreSignature: args.ignoreSignature
          });
        }
        /**
         * Send external message to contract
         * @param contract contract to send message
         * @param src message body
         */
        async sendExternalMessage(contract, src2) {
          if (await this.isContractDeployed(contract.address) || !contract.init) {
            const message = (0, core_1.external)({
              to: contract.address,
              body: src2
            });
            await this.sendMessage(message);
          } else {
            const message = (0, core_1.external)({
              to: contract.address,
              init: contract.init,
              body: src2
            });
            await this.sendMessage(message);
          }
        }
        /**
         * Check if contract is deployed
         * @param address addres to check
         * @returns true if contract is in active state
         */
        async isContractDeployed(address) {
          return (await this.getContractState(address)).state === "active";
        }
        /**
         * Resolves contract state
         * @param address contract address
         */
        async getContractState(address) {
          let info = await this.api.getAddressInformation(address);
          let balance = BigInt(info.balance);
          let state = info.state;
          return {
            balance,
            extra_currencies: info.extra_currencies,
            state,
            code: info.code !== "" ? Buffer2.from(info.code, "base64") : null,
            data: info.data !== "" ? Buffer2.from(info.data, "base64") : null,
            lastTransaction: info.last_transaction_id.lt !== "0" ? {
              lt: info.last_transaction_id.lt,
              hash: info.last_transaction_id.hash
            } : null,
            blockId: {
              workchain: info.block_id.workchain,
              shard: info.block_id.shard,
              seqno: info.block_id.seqno
            },
            timestampt: info.sync_utime
          };
        }
        /**
         * Open contract
         * @param src source contract
         * @returns contract
         */
        open(src2) {
          return (0, core_1.openContract)(src2, (args) => createProvider(this, args.address, args.init));
        }
        /**
         * Create a provider
         * @param address address
         * @param init optional init
         * @returns provider
         */
        provider(address, init2) {
          return createProvider(this, address, init2 ?? null);
        }
      };
      exports.TonClient = TonClient2;
      function parseStackEntry(x13) {
        const typeName = x13["@type"];
        switch (typeName) {
          case "tvm.list":
          case "tvm.tuple":
            return x13.elements.map(parseStackEntry);
          case "tvm.cell":
            return core_1.Cell.fromBoc(Buffer2.from(x13.bytes, "base64"))[0];
          case "tvm.slice":
            return core_1.Cell.fromBoc(Buffer2.from(x13.bytes, "base64"))[0];
          case "tvm.stackEntryCell":
            return parseStackEntry(x13.cell);
          case "tvm.stackEntrySlice":
            return parseStackEntry(x13.slice);
          case "tvm.stackEntryTuple":
            return parseStackEntry(x13.tuple);
          case "tvm.stackEntryList":
            return parseStackEntry(x13.list);
          case "tvm.stackEntryNumber":
            return parseStackEntry(x13.number);
          case "tvm.numberDecimal":
            return BigInt(x13.number);
          default:
            throw Error("Unsupported item type: " + typeName);
        }
      }
      function parseStackItem(s3) {
        if (s3[0] === "num") {
          let val = s3[1];
          if (val.startsWith("-")) {
            return { type: "int", value: -BigInt(val.slice(1)) };
          } else {
            return { type: "int", value: BigInt(val) };
          }
        } else if (s3[0] === "null") {
          return { type: "null" };
        } else if (s3[0] === "cell") {
          return {
            type: "cell",
            cell: core_1.Cell.fromBoc(Buffer2.from(s3[1].bytes, "base64"))[0]
          };
        } else if (s3[0] === "slice") {
          return {
            type: "slice",
            cell: core_1.Cell.fromBoc(Buffer2.from(s3[1].bytes, "base64"))[0]
          };
        } else if (s3[0] === "builder") {
          return {
            type: "builder",
            cell: core_1.Cell.fromBoc(Buffer2.from(s3[1].bytes, "base64"))[0]
          };
        } else if (s3[0] === "tuple" || s3[0] === "list") {
          if (s3[1].elements.length === 0) {
            return { type: "null" };
          }
          return { type: "tuple", items: s3[1].elements.map(parseStackEntry) };
        } else {
          throw Error("Unsupported stack item type: " + s3[0]);
        }
      }
      function parseStack(src2) {
        let stack = [];
        for (let s3 of src2) {
          stack.push(parseStackItem(s3));
        }
        return new core_1.TupleReader(stack);
      }
      function createProvider(client, address, init2) {
        return {
          async getState() {
            let state = await client.getContractState(address);
            let balance = state.balance;
            let last = state.lastTransaction ? {
              lt: BigInt(state.lastTransaction.lt),
              hash: Buffer2.from(state.lastTransaction.hash, "base64")
            } : null;
            let ecMap = null;
            let storage;
            if (state.state === "active") {
              storage = {
                type: "active",
                code: state.code ? state.code : null,
                data: state.data ? state.data : null
              };
            } else if (state.state === "uninitialized") {
              storage = {
                type: "uninit"
              };
            } else if (state.state === "frozen") {
              storage = {
                type: "frozen",
                stateHash: Buffer2.alloc(0)
              };
            } else {
              throw Error("Unsupported state");
            }
            if (state.extra_currencies && state.extra_currencies.length > 0) {
              ecMap = {};
              for (let ec2 of state.extra_currencies) {
                ecMap[ec2.id] = BigInt(ec2.amount);
              }
            }
            return {
              balance,
              extracurrency: ecMap,
              last,
              state: storage
            };
          },
          async get(name2, args) {
            if (typeof name2 !== "string") {
              throw new Error("Method name must be a string for TonClient provider");
            }
            let method = await client.runMethod(address, name2, args);
            return { stack: method.stack };
          },
          async external(message) {
            let neededInit = null;
            if (init2 && !await client.isContractDeployed(address)) {
              neededInit = init2;
            }
            const ext = (0, core_1.external)({
              to: address,
              init: neededInit,
              body: message
            });
            let boc = (0, core_1.beginCell)().store((0, core_1.storeMessage)(ext)).endCell().toBoc();
            await client.sendFile(boc);
          },
          async internal(via, message) {
            let neededInit = null;
            if (init2 && !await client.isContractDeployed(address)) {
              neededInit = init2;
            }
            let bounce = true;
            if (message.bounce !== null && message.bounce !== void 0) {
              bounce = message.bounce;
            }
            let value;
            if (typeof message.value === "string") {
              value = (0, core_1.toNano)(message.value);
            } else {
              value = message.value;
            }
            let body = null;
            if (typeof message.body === "string") {
              body = (0, core_1.comment)(message.body);
            } else if (message.body) {
              body = message.body;
            }
            await via.send({
              to: address,
              value,
              bounce,
              sendMode: message.sendMode,
              extracurrency: message.extracurrency,
              init: neededInit,
              body
            });
          },
          open(contract) {
            return (0, core_1.openContract)(contract, (args) => createProvider(client, args.address, args.init ?? null));
          },
          getTransactions(address2, lt6, hash5, limit) {
            return client.getTransactions(address2, {
              limit: limit ?? 100,
              lt: lt6.toString(),
              hash: hash5.toString("base64"),
              inclusive: true
            });
          }
        };
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/utils/toUrlSafe.js
  var require_toUrlSafe = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/utils/toUrlSafe.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.toUrlSafe = toUrlSafe;
      function toUrlSafe(src2) {
        while (src2.indexOf("/") >= 0) {
          src2 = src2.replace("/", "_");
        }
        while (src2.indexOf("+") >= 0) {
          src2 = src2.replace("+", "-");
        }
        while (src2.indexOf("=") >= 0) {
          src2 = src2.replace("=", "");
        }
        return src2;
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/client/TonClient4.js
  var require_TonClient4 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/client/TonClient4.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f7) {
        if (kind === "m") throw new TypeError("Private method is not writable");
        if (kind === "a" && !f7) throw new TypeError("Private accessor was defined without a setter");
        if (typeof state === "function" ? receiver !== state || !f7 : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
        return kind === "a" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;
      };
      var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f7) {
        if (kind === "a" && !f7) throw new TypeError("Private accessor was defined without a getter");
        if (typeof state === "function" ? receiver !== state || !f7 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
        return kind === "m" ? f7 : kind === "a" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);
      };
      var __importDefault2 = exports && exports.__importDefault || function(mod3) {
        return mod3 && mod3.__esModule ? mod3 : { "default": mod3 };
      };
      var _TonClient4_endpoint;
      var _TonClient4_timeout;
      var _TonClient4_adapter;
      var _TonClient4_axios;
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.TonClient4 = void 0;
      var axios_1 = __importDefault2(require_axios());
      var core_1 = require_dist2();
      var toUrlSafe_1 = require_toUrlSafe();
      var zod_1 = require_zod();
      var TonClient4 = class {
        constructor(args) {
          _TonClient4_endpoint.set(this, void 0);
          _TonClient4_timeout.set(this, void 0);
          _TonClient4_adapter.set(this, void 0);
          _TonClient4_axios.set(this, void 0);
          __classPrivateFieldSet2(this, _TonClient4_axios, axios_1.default.create(), "f");
          __classPrivateFieldSet2(this, _TonClient4_endpoint, args.endpoint, "f");
          __classPrivateFieldSet2(this, _TonClient4_timeout, args.timeout || 5e3, "f");
          __classPrivateFieldSet2(this, _TonClient4_adapter, args.httpAdapter, "f");
          if (args.requestInterceptor) {
            __classPrivateFieldGet2(this, _TonClient4_axios, "f").interceptors.request.use(args.requestInterceptor);
          }
        }
        /**
         * Get Last Block
         * @returns last block info
         */
        async getLastBlock() {
          let res = await __classPrivateFieldGet2(this, _TonClient4_axios, "f").get(__classPrivateFieldGet2(this, _TonClient4_endpoint, "f") + "/block/latest", {
            adapter: __classPrivateFieldGet2(this, _TonClient4_adapter, "f"),
            timeout: __classPrivateFieldGet2(this, _TonClient4_timeout, "f")
          });
          let lastBlock = lastBlockCodec.safeParse(res.data);
          if (!lastBlock.success) {
            throw Error("Mailformed response: " + lastBlock.error.format()._errors.join(", "));
          }
          return lastBlock.data;
        }
        /**
         * Get block info
         * @param seqno block sequence number
         * @returns block info
         */
        async getBlock(seqno) {
          let res = await __classPrivateFieldGet2(this, _TonClient4_axios, "f").get(__classPrivateFieldGet2(this, _TonClient4_endpoint, "f") + "/block/" + seqno, {
            adapter: __classPrivateFieldGet2(this, _TonClient4_adapter, "f"),
            timeout: __classPrivateFieldGet2(this, _TonClient4_timeout, "f")
          });
          let block = blockCodec.safeParse(res.data);
          if (!block.success) {
            throw Error("Mailformed response");
          }
          if (!block.data.exist) {
            throw Error("Block is out of scope");
          }
          return block.data.block;
        }
        /**
         * Get block info by unix timestamp
         * @param ts unix timestamp
         * @returns block info
         */
        async getBlockByUtime(ts2) {
          let res = await __classPrivateFieldGet2(this, _TonClient4_axios, "f").get(__classPrivateFieldGet2(this, _TonClient4_endpoint, "f") + "/block/utime/" + ts2, {
            adapter: __classPrivateFieldGet2(this, _TonClient4_adapter, "f"),
            timeout: __classPrivateFieldGet2(this, _TonClient4_timeout, "f")
          });
          let block = blockCodec.safeParse(res.data);
          if (!block.success) {
            throw Error("Mailformed response");
          }
          if (!block.data.exist) {
            throw Error("Block is out of scope");
          }
          return block.data.block;
        }
        /**
         * Get block info by unix timestamp
         * @param seqno block sequence number
         * @param address account address
         * @returns account info
         */
        async getAccount(seqno, address) {
          let res = await __classPrivateFieldGet2(this, _TonClient4_axios, "f").get(__classPrivateFieldGet2(this, _TonClient4_endpoint, "f") + "/block/" + seqno + "/" + address.toString({ urlSafe: true }), { adapter: __classPrivateFieldGet2(this, _TonClient4_adapter, "f"), timeout: __classPrivateFieldGet2(this, _TonClient4_timeout, "f") });
          let account = accountCodec.safeParse(res.data);
          if (!account.success) {
            throw Error("Mailformed response");
          }
          return account.data;
        }
        /**
         * Get account lite info (without code and data)
         * @param seqno block sequence number
         * @param address account address
         * @returns account lite info
         */
        async getAccountLite(seqno, address) {
          let res = await __classPrivateFieldGet2(this, _TonClient4_axios, "f").get(__classPrivateFieldGet2(this, _TonClient4_endpoint, "f") + "/block/" + seqno + "/" + address.toString({ urlSafe: true }) + "/lite", { adapter: __classPrivateFieldGet2(this, _TonClient4_adapter, "f"), timeout: __classPrivateFieldGet2(this, _TonClient4_timeout, "f") });
          let account = accountLiteCodec.safeParse(res.data);
          if (!account.success) {
            throw Error("Mailformed response");
          }
          return account.data;
        }
        /**
         * Check if contract is deployed
         * @param address addres to check
         * @returns true if contract is in active state
         */
        async isContractDeployed(seqno, address) {
          let account = await this.getAccountLite(seqno, address);
          return account.account.state.type === "active";
        }
        /**
         * Check if account was updated since
         * @param seqno block sequence number
         * @param address account address
         * @param lt account last transaction lt
         * @returns account change info
         */
        async isAccountChanged(seqno, address, lt6) {
          let res = await __classPrivateFieldGet2(this, _TonClient4_axios, "f").get(__classPrivateFieldGet2(this, _TonClient4_endpoint, "f") + "/block/" + seqno + "/" + address.toString({ urlSafe: true }) + "/changed/" + lt6.toString(10), { adapter: __classPrivateFieldGet2(this, _TonClient4_adapter, "f"), timeout: __classPrivateFieldGet2(this, _TonClient4_timeout, "f") });
          let changed = changedCodec.safeParse(res.data);
          if (!changed.success) {
            throw Error("Mailformed response");
          }
          return changed.data;
        }
        /**
         * Load unparsed account transactions
         * @param address address
         * @param lt last transaction lt
         * @param hash last transaction hash
         * @returns unparsed transactions
         */
        async getAccountTransactions(address, lt6, hash5) {
          let res = await __classPrivateFieldGet2(this, _TonClient4_axios, "f").get(__classPrivateFieldGet2(this, _TonClient4_endpoint, "f") + "/account/" + address.toString({ urlSafe: true }) + "/tx/" + lt6.toString(10) + "/" + (0, toUrlSafe_1.toUrlSafe)(hash5.toString("base64")), { adapter: __classPrivateFieldGet2(this, _TonClient4_adapter, "f"), timeout: __classPrivateFieldGet2(this, _TonClient4_timeout, "f") });
          let transactions = transactionsCodec.safeParse(res.data);
          if (!transactions.success) {
            throw Error("Mailformed response");
          }
          let data = transactions.data;
          let tx = [];
          let cells = core_1.Cell.fromBoc(Buffer2.from(data.boc, "base64"));
          for (let i5 = 0; i5 < data.blocks.length; i5++) {
            tx.push({
              block: data.blocks[i5],
              tx: (0, core_1.loadTransaction)(cells[i5].beginParse())
            });
          }
          return tx;
        }
        /**
         * Load parsed account transactions
         * @param address address
         * @param lt last transaction lt
         * @param hash last transaction hash
         * @param count number of transactions to load
         * @returns parsed transactions
         */
        async getAccountTransactionsParsed(address, lt6, hash5, count = 20) {
          let res = await __classPrivateFieldGet2(this, _TonClient4_axios, "f").get(__classPrivateFieldGet2(this, _TonClient4_endpoint, "f") + "/account/" + address.toString({ urlSafe: true }) + "/tx/parsed/" + lt6.toString(10) + "/" + (0, toUrlSafe_1.toUrlSafe)(hash5.toString("base64")), {
            adapter: __classPrivateFieldGet2(this, _TonClient4_adapter, "f"),
            timeout: __classPrivateFieldGet2(this, _TonClient4_timeout, "f"),
            params: {
              count
            }
          });
          let parsedTransactionsRes = parsedTransactionsCodec.safeParse(res.data);
          if (!parsedTransactionsRes.success) {
            throw Error("Mailformed response");
          }
          return parsedTransactionsRes.data;
        }
        /**
         * Get network config
         * @param seqno block sequence number
         * @param ids optional config ids
         * @returns network config
         */
        async getConfig(seqno, ids) {
          let tail = "";
          if (ids && ids.length > 0) {
            tail = "/" + [...ids].sort().join(",");
          }
          let res = await __classPrivateFieldGet2(this, _TonClient4_axios, "f").get(__classPrivateFieldGet2(this, _TonClient4_endpoint, "f") + "/block/" + seqno + "/config" + tail, { adapter: __classPrivateFieldGet2(this, _TonClient4_adapter, "f"), timeout: __classPrivateFieldGet2(this, _TonClient4_timeout, "f") });
          let config2 = configCodec.safeParse(res.data);
          if (!config2.success) {
            throw Error("Mailformed response");
          }
          return config2.data;
        }
        /**
         * Execute run method
         * @param seqno block sequence number
         * @param address account address
         * @param name method name
         * @param args method arguments
         * @returns method result
         */
        async runMethod(seqno, address, name2, args) {
          let tail = args && args.length > 0 ? "/" + (0, toUrlSafe_1.toUrlSafe)((0, core_1.serializeTuple)(args).toBoc({ idx: false, crc32: false }).toString("base64")) : "";
          let url2 = __classPrivateFieldGet2(this, _TonClient4_endpoint, "f") + "/block/" + seqno + "/" + address.toString({ urlSafe: true }) + "/run/" + encodeURIComponent(name2) + tail;
          let res = await __classPrivateFieldGet2(this, _TonClient4_axios, "f").get(url2, {
            adapter: __classPrivateFieldGet2(this, _TonClient4_adapter, "f"),
            timeout: __classPrivateFieldGet2(this, _TonClient4_timeout, "f")
          });
          let runMethod = runMethodCodec.safeParse(res.data);
          if (!runMethod.success) {
            throw Error("Mailformed response");
          }
          let resultTuple = runMethod.data.resultRaw ? (0, core_1.parseTuple)(core_1.Cell.fromBoc(Buffer2.from(runMethod.data.resultRaw, "base64"))[0]) : [];
          return {
            exitCode: runMethod.data.exitCode,
            result: resultTuple,
            resultRaw: runMethod.data.resultRaw,
            block: runMethod.data.block,
            shardBlock: runMethod.data.shardBlock,
            reader: new core_1.TupleReader(resultTuple)
          };
        }
        /**
         * Send external message
         * @param message message boc
         * @returns message status
         */
        async sendMessage(message) {
          let res = await __classPrivateFieldGet2(this, _TonClient4_axios, "f").post(__classPrivateFieldGet2(this, _TonClient4_endpoint, "f") + "/send", { boc: message.toString("base64") }, { adapter: __classPrivateFieldGet2(this, _TonClient4_adapter, "f"), timeout: __classPrivateFieldGet2(this, _TonClient4_timeout, "f") });
          let send = sendCodec.safeParse(res.data);
          if (!send.success) {
            throw Error("Mailformed response");
          }
          return { status: res.data.status };
        }
        /**
         * Open smart contract
         * @param contract contract
         * @returns opened contract
         */
        open(contract) {
          return (0, core_1.openContract)(contract, (args) => createProvider(this, null, args.address, args.init));
        }
        /**
         * Open smart contract
         * @param block block number
         * @param contract contract
         * @returns opened contract
         */
        openAt(block, contract) {
          return (0, core_1.openContract)(contract, (args) => createProvider(this, block, args.address, args.init));
        }
        /**
         * Create provider
         * @param address address
         * @param init optional init data
         * @returns provider
         */
        provider(address, init2) {
          return createProvider(this, null, address, init2 ?? null);
        }
        /**
         * Create provider at specified block number
         * @param block block number
         * @param address address
         * @param init optional init data
         * @returns provider
         */
        providerAt(block, address, init2) {
          return createProvider(this, block, address, init2 ?? null);
        }
      };
      exports.TonClient4 = TonClient4;
      _TonClient4_endpoint = /* @__PURE__ */ new WeakMap(), _TonClient4_timeout = /* @__PURE__ */ new WeakMap(), _TonClient4_adapter = /* @__PURE__ */ new WeakMap(), _TonClient4_axios = /* @__PURE__ */ new WeakMap();
      function createProvider(client, block, address, init2) {
        return {
          async getState() {
            let sq = block;
            if (sq === null) {
              let res = await client.getLastBlock();
              sq = res.last.seqno;
            }
            let state = await client.getAccount(sq, address);
            let last = state.account.last ? {
              lt: BigInt(state.account.last.lt),
              hash: Buffer2.from(state.account.last.hash, "base64")
            } : null;
            let storage;
            if (state.account.state.type === "active") {
              storage = {
                type: "active",
                code: state.account.state.code ? Buffer2.from(state.account.state.code, "base64") : null,
                data: state.account.state.data ? Buffer2.from(state.account.state.data, "base64") : null
              };
            } else if (state.account.state.type === "uninit") {
              storage = {
                type: "uninit"
              };
            } else if (state.account.state.type === "frozen") {
              storage = {
                type: "frozen",
                stateHash: Buffer2.from(state.account.state.stateHash, "base64")
              };
            } else {
              throw Error("Unsupported state");
            }
            let ecMap = null;
            if (state.account.balance.currencies) {
              ecMap = {};
              let currencies = state.account.balance.currencies;
              for (let [k7, v13] of Object.entries(currencies)) {
                ecMap[Number(k7)] = BigInt(v13);
              }
            }
            return {
              balance: BigInt(state.account.balance.coins),
              extracurrency: ecMap,
              last,
              state: storage
            };
          },
          async get(name2, args) {
            if (typeof name2 !== "string") {
              throw new Error("Method name must be a string for TonClient4 provider");
            }
            let sq = block;
            if (sq === null) {
              let res = await client.getLastBlock();
              sq = res.last.seqno;
            }
            let method = await client.runMethod(sq, address, name2, args);
            if (method.exitCode !== 0 && method.exitCode !== 1) {
              throw Error("Exit code: " + method.exitCode);
            }
            return {
              stack: new core_1.TupleReader(method.result)
            };
          },
          async external(message) {
            let last = await client.getLastBlock();
            let neededInit = null;
            if (init2 && (await client.getAccountLite(last.last.seqno, address)).account.state.type !== "active") {
              neededInit = init2;
            }
            const ext = (0, core_1.external)({
              to: address,
              init: neededInit,
              body: message
            });
            let pkg = (0, core_1.beginCell)().store((0, core_1.storeMessage)(ext)).endCell().toBoc();
            await client.sendMessage(pkg);
          },
          async internal(via, message) {
            let last = await client.getLastBlock();
            let neededInit = null;
            if (init2 && (await client.getAccountLite(last.last.seqno, address)).account.state.type !== "active") {
              neededInit = init2;
            }
            let bounce = true;
            if (message.bounce !== null && message.bounce !== void 0) {
              bounce = message.bounce;
            }
            let value;
            if (typeof message.value === "string") {
              value = (0, core_1.toNano)(message.value);
            } else {
              value = message.value;
            }
            let body = null;
            if (typeof message.body === "string") {
              body = (0, core_1.comment)(message.body);
            } else if (message.body) {
              body = message.body;
            }
            await via.send({
              to: address,
              value,
              extracurrency: message.extracurrency,
              bounce,
              sendMode: message.sendMode,
              init: neededInit,
              body
            });
          },
          open(contract) {
            return (0, core_1.openContract)(contract, (args) => createProvider(client, block, args.address, args.init ?? null));
          },
          async getTransactions(address2, lt6, hash5, limit) {
            const useLimit = typeof limit === "number";
            if (useLimit && limit <= 0) {
              return [];
            }
            let transactions = [];
            do {
              const txs = await client.getAccountTransactions(address2, lt6, hash5);
              const firstTx = txs[0].tx;
              const [firstLt, firstHash] = [firstTx.lt, firstTx.hash()];
              const needSkipFirst = transactions.length > 0 && firstLt === lt6 && firstHash.equals(hash5);
              if (needSkipFirst) {
                txs.shift();
              }
              if (txs.length === 0) {
                break;
              }
              const lastTx = txs[txs.length - 1].tx;
              const [lastLt, lastHash] = [lastTx.lt, lastTx.hash()];
              if (lastLt === lt6 && lastHash.equals(hash5)) {
                break;
              }
              transactions.push(...txs.map((tx) => tx.tx));
              lt6 = lastLt;
              hash5 = lastHash;
            } while (useLimit && transactions.length < limit);
            if (useLimit) {
              transactions = transactions.slice(0, limit);
            }
            return transactions;
          }
        };
      }
      var lastBlockCodec = zod_1.z.object({
        last: zod_1.z.object({
          seqno: zod_1.z.number(),
          shard: zod_1.z.string(),
          workchain: zod_1.z.number(),
          fileHash: zod_1.z.string(),
          rootHash: zod_1.z.string()
        }),
        init: zod_1.z.object({
          fileHash: zod_1.z.string(),
          rootHash: zod_1.z.string()
        }),
        stateRootHash: zod_1.z.string(),
        now: zod_1.z.number()
      });
      var blockCodec = zod_1.z.union([
        zod_1.z.object({
          exist: zod_1.z.literal(false)
        }),
        zod_1.z.object({
          exist: zod_1.z.literal(true),
          block: zod_1.z.object({
            shards: zod_1.z.array(zod_1.z.object({
              workchain: zod_1.z.number(),
              seqno: zod_1.z.number(),
              shard: zod_1.z.string(),
              rootHash: zod_1.z.string(),
              fileHash: zod_1.z.string(),
              transactions: zod_1.z.array(zod_1.z.object({
                account: zod_1.z.string(),
                hash: zod_1.z.string(),
                lt: zod_1.z.string()
              }))
            }))
          })
        })
      ]);
      var storageStatCodec = zod_1.z.object({
        lastPaid: zod_1.z.number(),
        duePayment: zod_1.z.union([zod_1.z.null(), zod_1.z.string()]),
        used: zod_1.z.object({
          bits: zod_1.z.number(),
          cells: zod_1.z.number(),
          publicCells: zod_1.z.number().optional()
        })
      });
      var accountCodec = zod_1.z.object({
        account: zod_1.z.object({
          state: zod_1.z.union([
            zod_1.z.object({ type: zod_1.z.literal("uninit") }),
            zod_1.z.object({
              type: zod_1.z.literal("active"),
              code: zod_1.z.union([zod_1.z.string(), zod_1.z.null()]),
              data: zod_1.z.union([zod_1.z.string(), zod_1.z.null()])
            }),
            zod_1.z.object({ type: zod_1.z.literal("frozen"), stateHash: zod_1.z.string() })
          ]),
          balance: zod_1.z.object({
            coins: zod_1.z.string(),
            currencies: zod_1.z.record(zod_1.z.string(), zod_1.z.string())
          }),
          last: zod_1.z.union([
            zod_1.z.null(),
            zod_1.z.object({
              lt: zod_1.z.string(),
              hash: zod_1.z.string()
            })
          ]),
          storageStat: zod_1.z.union([zod_1.z.null(), storageStatCodec])
        }),
        block: zod_1.z.object({
          workchain: zod_1.z.number(),
          seqno: zod_1.z.number(),
          shard: zod_1.z.string(),
          rootHash: zod_1.z.string(),
          fileHash: zod_1.z.string()
        })
      });
      var accountLiteCodec = zod_1.z.object({
        account: zod_1.z.object({
          state: zod_1.z.union([
            zod_1.z.object({ type: zod_1.z.literal("uninit") }),
            zod_1.z.object({
              type: zod_1.z.literal("active"),
              codeHash: zod_1.z.string(),
              dataHash: zod_1.z.string()
            }),
            zod_1.z.object({ type: zod_1.z.literal("frozen"), stateHash: zod_1.z.string() })
          ]),
          balance: zod_1.z.object({
            coins: zod_1.z.string(),
            currencies: zod_1.z.record(zod_1.z.string(), zod_1.z.string())
          }),
          last: zod_1.z.union([
            zod_1.z.null(),
            zod_1.z.object({
              lt: zod_1.z.string(),
              hash: zod_1.z.string()
            })
          ]),
          storageStat: zod_1.z.union([zod_1.z.null(), storageStatCodec])
        })
      });
      var changedCodec = zod_1.z.object({
        changed: zod_1.z.boolean(),
        block: zod_1.z.object({
          workchain: zod_1.z.number(),
          seqno: zod_1.z.number(),
          shard: zod_1.z.string(),
          rootHash: zod_1.z.string(),
          fileHash: zod_1.z.string()
        })
      });
      var runMethodCodec = zod_1.z.object({
        exitCode: zod_1.z.number(),
        resultRaw: zod_1.z.union([zod_1.z.string(), zod_1.z.null()]),
        block: zod_1.z.object({
          workchain: zod_1.z.number(),
          seqno: zod_1.z.number(),
          shard: zod_1.z.string(),
          rootHash: zod_1.z.string(),
          fileHash: zod_1.z.string()
        }),
        shardBlock: zod_1.z.object({
          workchain: zod_1.z.number(),
          seqno: zod_1.z.number(),
          shard: zod_1.z.string(),
          rootHash: zod_1.z.string(),
          fileHash: zod_1.z.string()
        })
      });
      var configCodec = zod_1.z.object({
        config: zod_1.z.object({
          cell: zod_1.z.string(),
          address: zod_1.z.string(),
          globalBalance: zod_1.z.object({
            coins: zod_1.z.string()
          })
        })
      });
      var sendCodec = zod_1.z.object({
        status: zod_1.z.number()
      });
      var blocksCodec = zod_1.z.array(zod_1.z.object({
        workchain: zod_1.z.number(),
        seqno: zod_1.z.number(),
        shard: zod_1.z.string(),
        rootHash: zod_1.z.string(),
        fileHash: zod_1.z.string()
      }));
      var transactionsCodec = zod_1.z.object({
        blocks: blocksCodec,
        boc: zod_1.z.string()
      });
      var parsedAddressExternalCodec = zod_1.z.object({
        bits: zod_1.z.number(),
        data: zod_1.z.string()
      });
      var parsedMessageInfoCodec = zod_1.z.union([
        zod_1.z.object({
          type: zod_1.z.literal("internal"),
          value: zod_1.z.string(),
          dest: zod_1.z.string(),
          src: zod_1.z.string(),
          bounced: zod_1.z.boolean(),
          bounce: zod_1.z.boolean(),
          ihrDisabled: zod_1.z.boolean(),
          createdAt: zod_1.z.number(),
          createdLt: zod_1.z.string(),
          fwdFee: zod_1.z.string(),
          ihrFee: zod_1.z.string()
        }),
        zod_1.z.object({
          type: zod_1.z.literal("external-in"),
          dest: zod_1.z.string(),
          src: zod_1.z.union([parsedAddressExternalCodec, zod_1.z.null()]),
          importFee: zod_1.z.string()
        }),
        zod_1.z.object({
          type: zod_1.z.literal("external-out"),
          dest: zod_1.z.union([parsedAddressExternalCodec, zod_1.z.null()])
        })
      ]);
      var parsedStateInitCodec = zod_1.z.object({
        splitDepth: zod_1.z.union([zod_1.z.number(), zod_1.z.null()]),
        code: zod_1.z.union([zod_1.z.string(), zod_1.z.null()]),
        data: zod_1.z.union([zod_1.z.string(), zod_1.z.null()]),
        special: zod_1.z.union([
          zod_1.z.object({ tick: zod_1.z.boolean(), tock: zod_1.z.boolean() }),
          zod_1.z.null()
        ])
      });
      var parsedMessageCodec = zod_1.z.object({
        body: zod_1.z.string(),
        info: parsedMessageInfoCodec,
        init: zod_1.z.union([parsedStateInitCodec, zod_1.z.null()])
      });
      var accountStatusCodec = zod_1.z.union([
        zod_1.z.literal("uninitialized"),
        zod_1.z.literal("frozen"),
        zod_1.z.literal("active"),
        zod_1.z.literal("non-existing")
      ]);
      var txBodyCodec = zod_1.z.union([
        zod_1.z.object({ type: zod_1.z.literal("comment"), comment: zod_1.z.string() }),
        zod_1.z.object({ type: zod_1.z.literal("payload"), cell: zod_1.z.string() })
      ]);
      var parsedOperationItemCodec = zod_1.z.union([
        zod_1.z.object({ kind: zod_1.z.literal("ton"), amount: zod_1.z.string() }),
        zod_1.z.object({ kind: zod_1.z.literal("token"), amount: zod_1.z.string() })
      ]);
      var supportedMessageTypeCodec = zod_1.z.union([
        zod_1.z.literal("jetton::excesses"),
        zod_1.z.literal("jetton::transfer"),
        zod_1.z.literal("jetton::transfer_notification"),
        zod_1.z.literal("deposit"),
        zod_1.z.literal("deposit::ok"),
        zod_1.z.literal("withdraw"),
        zod_1.z.literal("withdraw::all"),
        zod_1.z.literal("withdraw::delayed"),
        zod_1.z.literal("withdraw::ok"),
        zod_1.z.literal("airdrop")
      ]);
      var opCodec = zod_1.z.object({
        type: supportedMessageTypeCodec,
        options: zod_1.z.optional(zod_1.z.record(zod_1.z.string()))
      });
      var parsedOperationCodec = zod_1.z.object({
        address: zod_1.z.string(),
        comment: zod_1.z.optional(zod_1.z.string()),
        items: zod_1.z.array(parsedOperationItemCodec),
        op: zod_1.z.optional(opCodec)
      });
      var parsedTransactionCodec = zod_1.z.object({
        address: zod_1.z.string(),
        lt: zod_1.z.string(),
        hash: zod_1.z.string(),
        prevTransaction: zod_1.z.object({
          lt: zod_1.z.string(),
          hash: zod_1.z.string()
        }),
        time: zod_1.z.number(),
        outMessagesCount: zod_1.z.number(),
        oldStatus: accountStatusCodec,
        newStatus: accountStatusCodec,
        fees: zod_1.z.string(),
        update: zod_1.z.object({
          oldHash: zod_1.z.string(),
          newHash: zod_1.z.string()
        }),
        inMessage: zod_1.z.union([parsedMessageCodec, zod_1.z.null()]),
        outMessages: zod_1.z.array(parsedMessageCodec),
        parsed: zod_1.z.object({
          seqno: zod_1.z.union([zod_1.z.number(), zod_1.z.null()]),
          body: zod_1.z.union([txBodyCodec, zod_1.z.null()]),
          status: zod_1.z.union([
            zod_1.z.literal("success"),
            zod_1.z.literal("failed"),
            zod_1.z.literal("pending")
          ]),
          dest: zod_1.z.union([zod_1.z.string(), zod_1.z.null()]),
          kind: zod_1.z.union([zod_1.z.literal("out"), zod_1.z.literal("in")]),
          amount: zod_1.z.string(),
          resolvedAddress: zod_1.z.string(),
          bounced: zod_1.z.boolean(),
          mentioned: zod_1.z.array(zod_1.z.string())
        }),
        operation: parsedOperationCodec
      });
      var parsedTransactionsCodec = zod_1.z.object({
        blocks: blocksCodec,
        transactions: zod_1.z.array(parsedTransactionCodec)
      });
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5beta/WalletV5BetaWalletId.js
  var require_WalletV5BetaWalletId = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5beta/WalletV5BetaWalletId.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.loadWalletIdV5Beta = loadWalletIdV5Beta;
      exports.storeWalletIdV5Beta = storeWalletIdV5Beta;
      var core_1 = require_dist2();
      var walletV5BetaVersionsSerialisation = {
        v5: 0
      };
      function loadWalletIdV5Beta(value) {
        const bitReader = new core_1.BitReader(new core_1.BitString(typeof value === "bigint" ? Buffer2.from(value.toString(16), "hex") : value instanceof core_1.Slice ? value.loadBuffer(10) : value, 0, 80));
        const networkGlobalId = bitReader.loadInt(32);
        const workchain = bitReader.loadInt(8);
        const walletVersionRaw = bitReader.loadUint(8);
        const subwalletNumber = bitReader.loadUint(32);
        const walletVersion = Object.entries(walletV5BetaVersionsSerialisation).find(([_6, value2]) => value2 === walletVersionRaw)?.[0];
        if (walletVersion === void 0) {
          throw new Error(`Can't deserialize walletId: unknown wallet version ${walletVersionRaw}`);
        }
        return { networkGlobalId, workchain, walletVersion, subwalletNumber };
      }
      function storeWalletIdV5Beta(walletId) {
        return (builder) => {
          builder.storeInt(walletId.networkGlobalId, 32);
          builder.storeInt(walletId.workchain, 8);
          builder.storeUint(walletV5BetaVersionsSerialisation[walletId.walletVersion], 8);
          builder.storeUint(walletId.subwalletNumber, 32);
        };
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5beta/WalletContractV5Beta.js
  var require_WalletContractV5Beta = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5beta/WalletContractV5Beta.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.WalletContractV5Beta = void 0;
      var core_1 = require_dist2();
      var createWalletTransfer_1 = require_createWalletTransfer();
      var WalletV5BetaWalletId_1 = require_WalletV5BetaWalletId();
      var WalletContractV5Beta = class _WalletContractV5Beta {
        static create(args) {
          const walletId = {
            networkGlobalId: args.walletId?.networkGlobalId ?? -239,
            workchain: args?.walletId?.workchain ?? 0,
            subwalletNumber: args?.walletId?.subwalletNumber ?? 0,
            walletVersion: args?.walletId?.walletVersion ?? "v5"
          };
          return new _WalletContractV5Beta(walletId, args.publicKey, args.domain);
        }
        constructor(walletId, publicKey3, domain2) {
          this.walletId = walletId;
          this.publicKey = publicKey3;
          this.walletId = walletId;
          this.domain = domain2;
          let code2 = core_1.Cell.fromBoc(Buffer2.from("te6cckEBAQEAIwAIQgLkzzsvTG1qYeoPK1RH0mZ4WyavNjfbLe7mvNGqgm80Eg3NjhE=", "base64"))[0];
          let data = (0, core_1.beginCell)().storeInt(0, 33).store((0, WalletV5BetaWalletId_1.storeWalletIdV5Beta)(this.walletId)).storeBuffer(this.publicKey, 32).storeBit(0).endCell();
          this.init = { code: code2, data };
          this.address = (0, core_1.contractAddress)(this.walletId.workchain, { code: code2, data });
        }
        /**
         * Get Wallet Balance
         */
        async getBalance(provider) {
          let state = await provider.getState();
          return state.balance;
        }
        /**
         * Get Wallet Seqno
         */
        async getSeqno(provider) {
          let state = await provider.getState();
          if (state.state.type === "active") {
            let res = await provider.get("seqno", []);
            return res.stack.readNumber();
          } else {
            return 0;
          }
        }
        /**
         * Get Wallet Extensions
         */
        async getExtensions(provider) {
          let state = await provider.getState();
          if (state.state.type === "active") {
            const result = await provider.get("get_extensions", []);
            return result.stack.readCellOpt();
          } else {
            return null;
          }
        }
        /**
         * Get Wallet Extensions
         */
        async getExtensionsArray(provider) {
          const extensions = await this.getExtensions(provider);
          if (!extensions) {
            return [];
          }
          const dict = core_1.Dictionary.loadDirect(core_1.Dictionary.Keys.BigUint(256), core_1.Dictionary.Values.BigInt(8), extensions);
          return dict.keys().map((key2) => {
            const wc = dict.get(key2);
            const addressHex = key2 ^ wc + 1n;
            return core_1.Address.parseRaw(`${wc}:${addressHex.toString(16).padStart(64, "0")}`);
          });
        }
        /**
         * Get is secret-key authentication enabled
         */
        async getIsSecretKeyAuthEnabled(provider) {
          let res = await provider.get("get_is_signature_auth_allowed", []);
          const result = res.stack.readNumber();
          return result !== 0;
        }
        /**
         * Send signed transfer
         */
        async send(provider, message) {
          await provider.external(message);
        }
        /**
         * Sign and send transfer
         */
        async sendTransfer(provider, args) {
          const transfer = await this.createTransfer(args);
          await this.send(provider, transfer);
        }
        /**
         * Sign and send add extension request
         */
        async sendAddExtension(provider, args) {
          const request = await this.createAddExtension(args);
          await this.send(provider, request);
        }
        /**
         * Sign and send remove extension request
         */
        async sendRemoveExtension(provider, args) {
          const request = await this.createRemoveExtension(args);
          await this.send(provider, request);
        }
        /**
         * Sign and send actions batch
         */
        async sendActionsBatch(provider, args) {
          const request = await this.createRequest(args);
          await this.send(provider, request);
        }
        createActions(args) {
          const actions = args.messages.map((message) => ({
            type: "sendMsg",
            mode: args.sendMode,
            outMsg: message
          }));
          return actions;
        }
        /**
         * Create signed transfer
         */
        createTransfer(args) {
          return this.createRequest({
            ...args,
            actions: this.createActions({
              messages: args.messages,
              sendMode: args.sendMode
            })
          });
        }
        /**
         * Create signed add extension request
         */
        createAddExtension(args) {
          return this.createRequest({
            ...args,
            actions: [
              {
                type: "addExtension",
                address: args.extensionAddress
              }
            ]
          });
        }
        /**
         * Create signed remove extension request
         */
        createRemoveExtension(args) {
          return this.createRequest({
            ...args,
            actions: [
              {
                type: "removeExtension",
                address: args.extensionAddress
              }
            ]
          });
        }
        /**
         * Create signed request or extension auth request
         */
        createRequest(args) {
          if (args.authType === "extension") {
            return (0, createWalletTransfer_1.createWalletTransferV5Beta)(args);
          }
          return (0, createWalletTransfer_1.createWalletTransferV5Beta)({
            ...args,
            walletId: (0, WalletV5BetaWalletId_1.storeWalletIdV5Beta)(this.walletId),
            domain: this.domain
          });
        }
        /**
         * Create sender
         */
        sender(provider, secretKey) {
          return {
            send: async (args) => {
              let seqno = await this.getSeqno(provider);
              let transfer = this.createTransfer({
                seqno,
                secretKey,
                sendMode: args.sendMode ?? core_1.SendMode.PAY_GAS_SEPARATELY + core_1.SendMode.IGNORE_ERRORS,
                messages: [
                  (0, core_1.internal)({
                    to: args.to,
                    value: args.value,
                    extracurrency: args.extracurrency,
                    init: args.init,
                    body: args.body,
                    bounce: args.bounce
                  })
                ]
              });
              await this.send(provider, transfer);
            }
          };
        }
      };
      exports.WalletContractV5Beta = WalletContractV5Beta;
      WalletContractV5Beta.OpCodes = {
        auth_extension: 1702392942,
        auth_signed_external: 1936287598,
        auth_signed_internal: 1936289396
      };
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5beta/WalletV5OutActions.js
  var require_WalletV5OutActions = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5beta/WalletV5OutActions.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.isOutActionExtended = isOutActionExtended;
      exports.isOutActionBasic = isOutActionBasic;
      function isOutActionExtended(action) {
        return action.type === "setIsPublicKeyEnabled" || action.type === "addExtension" || action.type === "removeExtension";
      }
      function isOutActionBasic(action) {
        return !isOutActionExtended(action);
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5beta/WalletV5BetaActions.js
  var require_WalletV5BetaActions = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5beta/WalletV5BetaActions.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeOutActionExtendedV5Beta = storeOutActionExtendedV5Beta;
      exports.loadOutActionV5BetaExtended = loadOutActionV5BetaExtended;
      exports.storeOutListExtendedV5Beta = storeOutListExtendedV5Beta;
      exports.loadOutListExtendedV5Beta = loadOutListExtendedV5Beta;
      var core_1 = require_dist2();
      var WalletV5OutActions_1 = require_WalletV5OutActions();
      var outActionSetIsPublicKeyEnabledTag = 550222170;
      function storeOutActionSetIsPublicKeyEnabled(action) {
        return (builder) => {
          builder.storeUint(outActionSetIsPublicKeyEnabledTag, 32).storeUint(action.isEnabled ? 1 : 0, 1);
        };
      }
      var outActionAddExtensionTag = 474012575;
      function storeOutActionAddExtension(action) {
        return (builder) => {
          builder.storeUint(outActionAddExtensionTag, 32).storeAddress(action.address);
        };
      }
      var outActionRemoveExtensionTag = 1588524196;
      function storeOutActionRemoveExtension(action) {
        return (builder) => {
          builder.storeUint(outActionRemoveExtensionTag, 32).storeAddress(action.address);
        };
      }
      function storeOutActionExtendedV5Beta(action) {
        switch (action.type) {
          case "setIsPublicKeyEnabled":
            return storeOutActionSetIsPublicKeyEnabled(action);
          case "addExtension":
            return storeOutActionAddExtension(action);
          case "removeExtension":
            return storeOutActionRemoveExtension(action);
          default:
            throw new Error("Unknown action type" + action?.type);
        }
      }
      function loadOutActionV5BetaExtended(slice4) {
        const tag = slice4.loadUint(32);
        switch (tag) {
          case outActionSetIsPublicKeyEnabledTag:
            return {
              type: "setIsPublicKeyEnabled",
              isEnabled: !!slice4.loadUint(1)
            };
          case outActionAddExtensionTag:
            return {
              type: "addExtension",
              address: slice4.loadAddress()
            };
          case outActionRemoveExtensionTag:
            return {
              type: "removeExtension",
              address: slice4.loadAddress()
            };
          default:
            throw new Error(`Unknown extended out action tag 0x${tag.toString(16)}`);
        }
      }
      function storeOutListExtendedV5Beta(actions) {
        const [action, ...rest] = actions;
        if (!action || !(0, WalletV5OutActions_1.isOutActionExtended)(action)) {
          if (actions.some(WalletV5OutActions_1.isOutActionExtended)) {
            throw new Error("Can't serialize actions list: all extended actions must be placed before out actions");
          }
          return (builder) => {
            builder.storeUint(0, 1).storeRef((0, core_1.beginCell)().store((0, core_1.storeOutList)(actions)).endCell());
          };
        }
        return (builder) => {
          builder.storeUint(1, 1).store(storeOutActionExtendedV5Beta(action)).storeRef((0, core_1.beginCell)().store(storeOutListExtendedV5Beta(rest)).endCell());
        };
      }
      function loadOutListExtendedV5Beta(slice4) {
        const actions = [];
        while (slice4.loadUint(1)) {
          const action = loadOutActionV5BetaExtended(slice4);
          actions.push(action);
          slice4 = slice4.loadRef().beginParse();
        }
        const commonAction = (0, core_1.loadOutList)(slice4.loadRef().beginParse());
        if (commonAction.some((i5) => i5.type === "setCode")) {
          throw new Error("Can't deserialize actions list: only sendMsg actions are allowed for wallet v5");
        }
        return actions.concat(commonAction);
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/signing/singer.js
  var require_singer = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/signing/singer.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.signPayload = signPayload;
      var core_1 = require_dist2();
      function signPayload(args, signingMessage, packMessage) {
        if ("secretKey" in args) {
          const signature2 = (0, core_1.domainSign)({
            data: signingMessage.endCell().hash(),
            secretKey: args.secretKey,
            domain: args.domain
          });
          return packMessage(signature2, signingMessage);
        } else {
          return args.signer(signingMessage.endCell()).then((signature2) => packMessage(signature2, signingMessage));
        }
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5r1/WalletV5R1WalletId.js
  var require_WalletV5R1WalletId = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5r1/WalletV5R1WalletId.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.isWalletIdV5R1ClientContext = isWalletIdV5R1ClientContext;
      exports.loadWalletIdV5R1 = loadWalletIdV5R1;
      exports.storeWalletIdV5R1 = storeWalletIdV5R1;
      var core_1 = require_dist2();
      function isWalletIdV5R1ClientContext(context) {
        return typeof context !== "number";
      }
      var walletV5R1VersionsSerialisation = {
        v5r1: 0
      };
      function loadWalletIdV5R1(value, networkGlobalId) {
        const val = new core_1.BitReader(new core_1.BitString(typeof value === "bigint" ? Buffer2.from(value.toString(16).padStart(8, "0"), "hex") : value instanceof core_1.Slice ? value.loadBuffer(4) : value, 0, 32)).loadInt(32);
        const context = BigInt(val) ^ BigInt(networkGlobalId);
        const bitReader = (0, core_1.beginCell)().storeInt(context, 32).endCell().beginParse();
        const isClientContext = bitReader.loadUint(1);
        if (isClientContext) {
          const workchain = bitReader.loadInt(8);
          const walletVersionRaw = bitReader.loadUint(8);
          const subwalletNumber = bitReader.loadUint(15);
          const walletVersion = Object.entries(walletV5R1VersionsSerialisation).find(([_6, value2]) => value2 === walletVersionRaw)?.[0];
          if (walletVersion === void 0) {
            throw new Error(`Can't deserialize walletId: unknown wallet version ${walletVersionRaw}`);
          }
          return {
            networkGlobalId,
            context: {
              walletVersion,
              workchain,
              subwalletNumber
            }
          };
        } else {
          const context2 = bitReader.loadUint(31);
          return {
            networkGlobalId,
            context: context2
          };
        }
      }
      function storeWalletIdV5R1(walletId) {
        return (builder) => {
          let context;
          if (isWalletIdV5R1ClientContext(walletId.context)) {
            context = (0, core_1.beginCell)().storeUint(1, 1).storeInt(walletId.context.workchain, 8).storeUint(walletV5R1VersionsSerialisation[walletId.context.walletVersion], 8).storeUint(walletId.context.subwalletNumber, 15).endCell().beginParse().loadInt(32);
          } else {
            context = (0, core_1.beginCell)().storeUint(0, 1).storeUint(walletId.context, 31).endCell().beginParse().loadInt(32);
          }
          return builder.storeInt(BigInt(walletId.networkGlobalId) ^ BigInt(context), 32);
        };
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5r1/WalletContractV5R1.js
  var require_WalletContractV5R1 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5r1/WalletContractV5R1.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.WalletContractV5R1 = void 0;
      var core_1 = require_dist2();
      var createWalletTransfer_1 = require_createWalletTransfer();
      var WalletV5R1WalletId_1 = require_WalletV5R1WalletId();
      var WalletContractV5R1 = class _WalletContractV5R1 {
        static create(args) {
          let workchain = 0;
          if ("workchain" in args && args.workchain != void 0) {
            workchain = args.workchain;
          }
          if (args.walletId?.context && (0, WalletV5R1WalletId_1.isWalletIdV5R1ClientContext)(args.walletId.context) && args.walletId.context.workchain != void 0) {
            workchain = args.walletId.context.workchain;
          }
          return new _WalletContractV5R1(workchain, args.publicKey, {
            networkGlobalId: args.walletId?.networkGlobalId ?? -239,
            context: args.walletId?.context ?? {
              workchain: 0,
              walletVersion: "v5r1",
              subwalletNumber: 0
            }
          }, args.domain);
        }
        constructor(workchain, publicKey3, walletId, domain2, globalId) {
          this.publicKey = publicKey3;
          this.walletId = walletId;
          this.globalId = globalId;
          this.walletId = walletId;
          this.domain = domain2;
          let code2 = core_1.Cell.fromBoc(Buffer2.from("b5ee9c7241021401000281000114ff00f4a413f4bcf2c80b01020120020d020148030402dcd020d749c120915b8f6320d70b1f2082106578746ebd21821073696e74bdb0925f03e082106578746eba8eb48020d72101d074d721fa4030fa44f828fa443058bd915be0ed44d0810141d721f4058307f40e6fa1319130e18040d721707fdb3ce03120d749810280b99130e070e2100f020120050c020120060902016e07080019adce76a2684020eb90eb85ffc00019af1df6a2684010eb90eb858fc00201480a0b0017b325fb51341c75c875c2c7e00011b262fb513435c280200019be5f0f6a2684080a0eb90fa02c0102f20e011e20d70b1f82107369676ebaf2e08a7f0f01e68ef0eda2edfb218308d722028308d723208020d721d31fd31fd31fed44d0d200d31f20d31fd3ffd70a000af90140ccf9109a28945f0adb31e1f2c087df02b35007b0f2d0845125baf2e0855036baf2e086f823bbf2d0882292f800de01a47fc8ca00cb1f01cf16c9ed542092f80fde70db3cd81003f6eda2edfb02f404216e926c218e4c0221d73930709421c700b38e2d01d72820761e436c20d749c008f2e09320d74ac002f2e09320d71d06c712c2005230b0f2d089d74cd7393001a4e86c128407bbf2e093d74ac000f2e093ed55e2d20001c000915be0ebd72c08142091709601d72c081c12e25210b1e30f20d74a111213009601fa4001fa44f828fa443058baf2e091ed44d0810141d718f405049d7fc8ca0040048307f453f2e08b8e14038307f45bf2e08c22d70a00216e01b3b0f2d090e2c85003cf1612f400c9ed54007230d72c08248e2d21f2e092d200ed44d0d2005113baf2d08f54503091319c01810140d721d70a00f2e08ee2c8ca0058cf16c9ed5493f2c08de20010935bdb31e1d74cd0b4d6c35e", "hex"))[0];
          let data = (0, core_1.beginCell)().storeUint(1, 1).storeUint(0, 32).store((0, WalletV5R1WalletId_1.storeWalletIdV5R1)(this.walletId)).storeBuffer(this.publicKey, 32).storeBit(0).endCell();
          this.init = { code: code2, data };
          this.address = (0, core_1.contractAddress)(workchain, { code: code2, data });
        }
        /**
         * Get Wallet Balance
         */
        async getBalance(provider) {
          let state = await provider.getState();
          return state.balance;
        }
        /**
         * Get Wallet Seqno
         */
        async getSeqno(provider) {
          let state = await provider.getState();
          if (state.state.type === "active") {
            let res = await provider.get("seqno", []);
            return res.stack.readNumber();
          } else {
            return 0;
          }
        }
        /**
         * Get Wallet Extensions
         */
        async getExtensions(provider) {
          let state = await provider.getState();
          if (state.state.type === "active") {
            const result = await provider.get("get_extensions", []);
            return result.stack.readCellOpt();
          } else {
            return null;
          }
        }
        /**
         * Get Wallet Extensions
         */
        async getExtensionsArray(provider) {
          const extensions = await this.getExtensions(provider);
          if (!extensions) {
            return [];
          }
          const dict = core_1.Dictionary.loadDirect(core_1.Dictionary.Keys.BigUint(256), core_1.Dictionary.Values.BigInt(1), extensions);
          return dict.keys().map((addressHex) => {
            const wc = this.address.workChain;
            return core_1.Address.parseRaw(`${wc}:${addressHex.toString(16).padStart(64, "0")}`);
          });
        }
        /**
         * Get is secret-key authentication enabled
         */
        async getIsSecretKeyAuthEnabled(provider) {
          let res = await provider.get("is_signature_allowed", []);
          return res.stack.readBoolean();
        }
        /**
         * Send signed transfer
         */
        async send(provider, message) {
          await provider.external(message);
        }
        /**
         * Sign and send transfer
         */
        async sendTransfer(provider, args) {
          const transfer = await this.createTransfer(args);
          await this.send(provider, transfer);
        }
        /**
         * Sign and send add extension request
         */
        async sendAddExtension(provider, args) {
          const request = await this.createAddExtension(args);
          await this.send(provider, request);
        }
        /**
         * Sign and send remove extension request
         */
        async sendRemoveExtension(provider, args) {
          const request = await this.createRemoveExtension(args);
          await this.send(provider, request);
        }
        createActions(args) {
          const actions = args.messages.map((message) => ({
            type: "sendMsg",
            mode: args.sendMode,
            outMsg: message
          }));
          return actions;
        }
        /**
         * Create signed transfer
         */
        createTransfer(args) {
          return this.createRequest({
            actions: this.createActions({
              messages: args.messages,
              sendMode: args.sendMode
            }),
            ...args
          });
        }
        /**
         * Create signed add extension request
         */
        createAddExtension(args) {
          return this.createRequest({
            actions: [
              {
                type: "addExtension",
                address: args.extensionAddress
              }
            ],
            ...args
          });
        }
        /**
         * Create signed remove extension request
         */
        createRemoveExtension(args) {
          return this.createRequest({
            actions: [
              {
                type: "removeExtension",
                address: args.extensionAddress
              }
            ],
            ...args
          });
        }
        /**
         * Create signed request or extension auth request
         */
        createRequest(args) {
          if (args.authType === "extension") {
            return (0, createWalletTransfer_1.createWalletTransferV5R1)(args);
          }
          return (0, createWalletTransfer_1.createWalletTransferV5R1)({
            ...args,
            walletId: (0, WalletV5R1WalletId_1.storeWalletIdV5R1)(this.walletId),
            domain: this.domain
          });
        }
        /**
         * Create sender
         */
        sender(provider, secretKey) {
          return {
            send: async (args) => {
              let seqno = await this.getSeqno(provider);
              let transfer = this.createTransfer({
                seqno,
                secretKey,
                sendMode: args.sendMode ?? core_1.SendMode.PAY_GAS_SEPARATELY + core_1.SendMode.IGNORE_ERRORS,
                messages: [
                  (0, core_1.internal)({
                    to: args.to,
                    value: args.value,
                    extracurrency: args.extracurrency,
                    init: args.init,
                    body: args.body,
                    bounce: args.bounce
                  })
                ]
              });
              await this.send(provider, transfer);
            }
          };
        }
      };
      exports.WalletContractV5R1 = WalletContractV5R1;
      WalletContractV5R1.OpCodes = {
        auth_extension: 1702392942,
        auth_signed_external: 1936287598,
        auth_signed_internal: 1936289396
      };
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5r1/WalletV5R1Actions.js
  var require_WalletV5R1Actions = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v5r1/WalletV5R1Actions.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeOutActionExtendedV5R1 = storeOutActionExtendedV5R1;
      exports.loadOutActionExtendedV5R1 = loadOutActionExtendedV5R1;
      exports.storeOutListExtendedV5R1 = storeOutListExtendedV5R1;
      exports.loadOutListExtendedV5R1 = loadOutListExtendedV5R1;
      exports.toSafeV5R1SendMode = toSafeV5R1SendMode;
      exports.patchV5R1ActionsSendMode = patchV5R1ActionsSendMode;
      var core_1 = require_dist2();
      var WalletV5OutActions_1 = require_WalletV5OutActions();
      var outActionSetIsPublicKeyEnabledTag = 4;
      function storeOutActionSetIsPublicKeyEnabled(action) {
        return (builder) => {
          builder.storeUint(outActionSetIsPublicKeyEnabledTag, 8).storeUint(action.isEnabled ? 1 : 0, 1);
        };
      }
      var outActionAddExtensionTag = 2;
      function storeOutActionAddExtension(action) {
        return (builder) => {
          builder.storeUint(outActionAddExtensionTag, 8).storeAddress(action.address);
        };
      }
      var outActionRemoveExtensionTag = 3;
      function storeOutActionRemoveExtension(action) {
        return (builder) => {
          builder.storeUint(outActionRemoveExtensionTag, 8).storeAddress(action.address);
        };
      }
      function storeOutActionExtendedV5R1(action) {
        switch (action.type) {
          case "setIsPublicKeyEnabled":
            return storeOutActionSetIsPublicKeyEnabled(action);
          case "addExtension":
            return storeOutActionAddExtension(action);
          case "removeExtension":
            return storeOutActionRemoveExtension(action);
          default:
            throw new Error("Unknown action type" + action?.type);
        }
      }
      function loadOutActionExtendedV5R1(slice4) {
        const tag = slice4.loadUint(8);
        switch (tag) {
          case outActionSetIsPublicKeyEnabledTag:
            return {
              type: "setIsPublicKeyEnabled",
              isEnabled: !!slice4.loadUint(1)
            };
          case outActionAddExtensionTag:
            return {
              type: "addExtension",
              address: slice4.loadAddress()
            };
          case outActionRemoveExtensionTag:
            return {
              type: "removeExtension",
              address: slice4.loadAddress()
            };
          default:
            throw new Error(`Unknown extended out action tag 0x${tag.toString(16)}`);
        }
      }
      function storeOutListExtendedV5R1(actions) {
        const extendedActions = actions.filter(WalletV5OutActions_1.isOutActionExtended);
        const basicActions = actions.filter(WalletV5OutActions_1.isOutActionBasic);
        return (builder) => {
          const outListPacked = basicActions.length ? (0, core_1.beginCell)().store((0, core_1.storeOutList)(basicActions)) : null;
          builder.storeMaybeRef(outListPacked);
          if (extendedActions.length === 0) {
            builder.storeUint(0, 1);
          } else {
            const [first, ...rest] = extendedActions;
            builder.storeUint(1, 1).store(storeOutActionExtendedV5R1(first));
            if (rest.length > 0) {
              builder.storeRef(packExtendedActionsRec(rest));
            }
          }
        };
      }
      function packExtendedActionsRec(extendedActions) {
        const [first, ...rest] = extendedActions;
        let builder = (0, core_1.beginCell)().store(storeOutActionExtendedV5R1(first));
        if (rest.length > 0) {
          builder = builder.storeRef(packExtendedActionsRec(rest));
        }
        return builder.endCell();
      }
      function loadOutListExtendedV5R1(slice4) {
        const actions = [];
        const outListPacked = slice4.loadMaybeRef();
        if (outListPacked) {
          const loadedActions = (0, core_1.loadOutList)(outListPacked.beginParse());
          if (loadedActions.some((a5) => a5.type !== "sendMsg")) {
            throw new Error("Can't deserialize actions list: only sendMsg actions are allowed for wallet v5r1");
          }
          actions.push(...loadedActions);
        }
        if (slice4.loadBoolean()) {
          const action = loadOutActionExtendedV5R1(slice4);
          actions.push(action);
        }
        while (slice4.remainingRefs > 0) {
          slice4 = slice4.loadRef().beginParse();
          const action = loadOutActionExtendedV5R1(slice4);
          actions.push(action);
        }
        return actions;
      }
      function toSafeV5R1SendMode(sendMode, authType) {
        if (authType === "internal" || authType === "extension") {
          return sendMode;
        }
        return sendMode | core_1.SendMode.IGNORE_ERRORS;
      }
      function patchV5R1ActionsSendMode(actions, authType) {
        return actions.map((action) => action.type === "sendMsg" ? {
          ...action,
          mode: toSafeV5R1SendMode(action.mode, authType)
        } : action);
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v4/WalletContractV4Actions.js
  var require_WalletContractV4Actions = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v4/WalletContractV4Actions.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.storeExtendedAction = storeExtendedAction;
      exports.loadExtendedAction = loadExtendedAction;
      var core_1 = require_dist2();
      function storeExtendedAction(action) {
        return (builder) => {
          switch (action.type) {
            case "sendMsg":
              builder.storeUint(0, 8);
              for (let m3 of action.messages) {
                builder.storeUint(action.sendMode ?? core_1.SendMode.NONE, 8);
                builder.storeRef((0, core_1.beginCell)().store((0, core_1.storeMessageRelaxed)(m3)));
              }
              break;
            case "addAndDeployPlugin":
              builder.storeUint(1, 8);
              builder.storeInt(action.workchain, 8);
              builder.storeCoins(action.forwardAmount);
              builder.storeRef((0, core_1.beginCell)().store((0, core_1.storeStateInit)(action.stateInit)));
              builder.storeRef(action.body);
              break;
            case "addPlugin":
              builder.storeUint(2, 8);
              builder.storeInt(action.address.workChain, 8);
              builder.storeBuffer(action.address.hash);
              builder.storeCoins(action.forwardAmount);
              builder.storeUint(action.queryId ?? 0n, 64);
              break;
            case "removePlugin":
              builder.storeUint(3, 8);
              builder.storeInt(action.address.workChain, 8);
              builder.storeBuffer(action.address.hash);
              builder.storeCoins(action.forwardAmount);
              builder.storeUint(action.queryId ?? 0n, 64);
              break;
            default:
              throw new Error(`Unsupported plugin action`);
          }
        };
      }
      function loadExtendedAction(slice4) {
        const actionType = slice4.loadUint(8);
        switch (actionType) {
          case 0: {
            const messages = [];
            let sendModeValue = void 0;
            while (slice4.remainingRefs > 0) {
              if (slice4.remainingBits < 8) {
                throw new Error("Invalid sendMsg action: insufficient bits for send mode");
              }
              const mode = slice4.loadUint(8);
              const messageCell = slice4.loadRef();
              const message = (0, core_1.loadMessageRelaxed)(messageCell.beginParse());
              if (sendModeValue === void 0) {
                sendModeValue = mode;
              } else if (sendModeValue !== mode) {
                throw new Error("Invalid sendMsg action: mixed send modes are not supported");
              }
              messages.push(message);
            }
            return {
              type: "sendMsg",
              messages,
              sendMode: sendModeValue
            };
          }
          case 1: {
            const workchain = slice4.loadInt(8);
            const forwardAmount = slice4.loadCoins();
            const stateInit = (0, core_1.loadStateInit)(slice4.loadRef().beginParse());
            const body = slice4.loadRef();
            return {
              type: "addAndDeployPlugin",
              workchain,
              stateInit,
              body,
              forwardAmount
            };
          }
          case 2: {
            const workchain = slice4.loadInt(8);
            const hash5 = slice4.loadBuffer(32);
            const forwardAmount = slice4.loadCoins();
            const queryId = slice4.loadUintBig(64);
            return {
              type: "addPlugin",
              address: new core_1.Address(workchain, hash5),
              forwardAmount,
              queryId: queryId === 0n ? void 0 : queryId
            };
          }
          case 3: {
            const workchain = slice4.loadInt(8);
            const hash5 = slice4.loadBuffer(32);
            const forwardAmount = slice4.loadCoins();
            const queryId = slice4.loadUintBig(64);
            return {
              type: "removePlugin",
              address: new core_1.Address(workchain, hash5),
              forwardAmount,
              queryId: queryId === 0n ? void 0 : queryId
            };
          }
          default:
            throw new Error(`Unsupported action with opcode ${actionType}`);
        }
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/signing/createWalletTransfer.js
  var require_createWalletTransfer = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/signing/createWalletTransfer.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.createWalletTransferV1 = createWalletTransferV1;
      exports.createWalletTransferV2 = createWalletTransferV2;
      exports.createWalletTransferV3 = createWalletTransferV3;
      exports.createWalletTransferV4 = createWalletTransferV4;
      exports.createWalletTransferV5Beta = createWalletTransferV5Beta;
      exports.createWalletTransferV5R1 = createWalletTransferV5R1;
      var core_1 = require_dist2();
      var WalletContractV5Beta_1 = require_WalletContractV5Beta();
      var WalletV5BetaActions_1 = require_WalletV5BetaActions();
      var singer_1 = require_singer();
      var WalletContractV5R1_1 = require_WalletContractV5R1();
      var WalletV5R1Actions_1 = require_WalletV5R1Actions();
      var WalletContractV4Actions_1 = require_WalletContractV4Actions();
      function packSignatureToFront(signature2, signingMessage) {
        const body = (0, core_1.beginCell)().storeBuffer(signature2).storeBuilder(signingMessage).endCell();
        return body;
      }
      function packSignatureToTail(signature2, signingMessage) {
        const body = (0, core_1.beginCell)().storeBuilder(signingMessage).storeBuffer(signature2).endCell();
        return body;
      }
      function createWalletTransferV1(args) {
        let signingMessage = (0, core_1.beginCell)().storeUint(args.seqno, 32);
        if (args.message) {
          signingMessage.storeUint(args.sendMode, 8);
          signingMessage.storeRef((0, core_1.beginCell)().store((0, core_1.storeMessageRelaxed)(args.message)));
        }
        let signature2 = (0, core_1.domainSign)({
          data: signingMessage.endCell().hash(),
          secretKey: args.secretKey,
          domain: args.domain
        });
        const body = (0, core_1.beginCell)().storeBuffer(signature2).storeBuilder(signingMessage).endCell();
        return body;
      }
      function createWalletTransferV2(args) {
        if (args.messages.length > 4) {
          throw Error("Maximum number of messages in a single transfer is 4");
        }
        let signingMessage = (0, core_1.beginCell)().storeUint(args.seqno, 32);
        signingMessage.storeUint(args.timeout || Math.floor(Date.now() / 1e3) + 60, 32);
        for (let m3 of args.messages) {
          signingMessage.storeUint(args.sendMode, 8);
          signingMessage.storeRef((0, core_1.beginCell)().store((0, core_1.storeMessageRelaxed)(m3)));
        }
        let signature2 = (0, core_1.domainSign)({
          data: signingMessage.endCell().hash(),
          secretKey: args.secretKey,
          domain: args.domain
        });
        const body = (0, core_1.beginCell)().storeBuffer(signature2).storeBuilder(signingMessage).endCell();
        return body;
      }
      function createWalletTransferV3(args) {
        if (args.messages.length > 4) {
          throw Error("Maximum number of messages in a single transfer is 4");
        }
        let signingMessage = (0, core_1.beginCell)().storeUint(args.walletId, 32);
        signingMessage.storeUint(args.timeout || Math.floor(Date.now() / 1e3) + 60, 32);
        signingMessage.storeUint(args.seqno, 32);
        for (let m3 of args.messages) {
          signingMessage.storeUint(args.sendMode, 8);
          signingMessage.storeRef((0, core_1.beginCell)().store((0, core_1.storeMessageRelaxed)(m3)));
        }
        return (0, singer_1.signPayload)(args, signingMessage, packSignatureToFront);
      }
      function createWalletTransferV4(args) {
        let signingMessage = (0, core_1.beginCell)().storeUint(args.walletId, 32);
        signingMessage.storeUint(args.timeout || Math.floor(Date.now() / 1e3) + 60, 32);
        signingMessage.storeUint(args.seqno, 32);
        signingMessage.store((0, WalletContractV4Actions_1.storeExtendedAction)(args.action));
        return (0, singer_1.signPayload)(args, signingMessage, packSignatureToFront);
      }
      function createWalletTransferV5Beta(args) {
        if (args.actions.length > 255) {
          throw Error("Maximum number of OutActions in a single request is 255");
        }
        if (args.authType === "extension") {
          return (0, core_1.beginCell)().storeUint(WalletContractV5Beta_1.WalletContractV5Beta.OpCodes.auth_extension, 32).store((0, WalletV5BetaActions_1.storeOutListExtendedV5Beta)(args.actions)).endCell();
        }
        const signingMessage = (0, core_1.beginCell)().storeUint(args.authType === "internal" ? WalletContractV5Beta_1.WalletContractV5Beta.OpCodes.auth_signed_internal : WalletContractV5Beta_1.WalletContractV5Beta.OpCodes.auth_signed_external, 32).store(args.walletId);
        signingMessage.storeUint(args.timeout || Math.floor(Date.now() / 1e3) + 60, 32);
        signingMessage.storeUint(args.seqno, 32).store((0, WalletV5BetaActions_1.storeOutListExtendedV5Beta)(args.actions));
        return (0, singer_1.signPayload)(args, signingMessage, packSignatureToTail);
      }
      function createWalletTransferV5R1(args) {
        if (args.actions.length > 255) {
          throw Error("Maximum number of OutActions in a single request is 255");
        }
        args = { ...args };
        if (args.authType === "extension") {
          return (0, core_1.beginCell)().storeUint(WalletContractV5R1_1.WalletContractV5R1.OpCodes.auth_extension, 32).storeUint(args.queryId ?? 0, 64).store((0, WalletV5R1Actions_1.storeOutListExtendedV5R1)(args.actions)).endCell();
        }
        args.actions = (0, WalletV5R1Actions_1.patchV5R1ActionsSendMode)(args.actions, args.authType);
        const signingMessage = (0, core_1.beginCell)().storeUint(args.authType === "internal" ? WalletContractV5R1_1.WalletContractV5R1.OpCodes.auth_signed_internal : WalletContractV5R1_1.WalletContractV5R1.OpCodes.auth_signed_external, 32).store(args.walletId);
        signingMessage.storeUint(args.timeout || Math.floor(Date.now() / 1e3) + 60, 32);
        signingMessage.storeUint(args.seqno, 32).store((0, WalletV5R1Actions_1.storeOutListExtendedV5R1)(args.actions));
        return (0, singer_1.signPayload)(args, signingMessage, packSignatureToTail);
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v1/r1.js
  var require_r1 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v1/r1.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.WalletContractV1R1 = void 0;
      var core_1 = require_dist2();
      var createWalletTransfer_1 = require_createWalletTransfer();
      var WalletContractV1R1 = class _WalletContractV1R1 {
        static create(args) {
          return new _WalletContractV1R1(args.workchain, args.publicKey, args.domain);
        }
        constructor(workchain, publicKey3, domain2) {
          this.workchain = workchain;
          this.publicKey = publicKey3;
          this.domain = domain2;
          let code2 = core_1.Cell.fromBoc(Buffer2.from("te6cckEBAQEARAAAhP8AIN2k8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVEH98Ik=", "base64"))[0];
          let data = (0, core_1.beginCell)().storeUint(0, 32).storeBuffer(publicKey3).endCell();
          this.init = { code: code2, data };
          this.address = (0, core_1.contractAddress)(workchain, { code: code2, data });
        }
        /**
         * Get Wallet Balance
         */
        async getBalance(provider) {
          let state = await provider.getState();
          return state.balance;
        }
        /**
         * Get Wallet Seqno
         */
        async getSeqno(provider) {
          let state = await provider.getState();
          if (state.state.type === "active") {
            return core_1.Cell.fromBoc(state.state.data)[0].beginParse().loadUint(32);
          } else {
            return 0;
          }
        }
        /**
         * Send signed transfer
         */
        async send(provider, message) {
          await provider.external(message);
        }
        /**
         * Sign and send transfer
         */
        async sendTransfer(provider, args) {
          let transfer = this.createTransfer(args);
          await this.send(provider, transfer);
        }
        /**
         * Create signed transfer
         */
        createTransfer(args) {
          let sendMode = core_1.SendMode.PAY_GAS_SEPARATELY;
          if (args.sendMode !== null && args.sendMode !== void 0) {
            sendMode = args.sendMode;
          }
          return (0, createWalletTransfer_1.createWalletTransferV1)({
            seqno: args.seqno,
            sendMode,
            secretKey: args.secretKey,
            message: args.message,
            domain: this.domain
          });
        }
        /**
         * Create sender
         */
        sender(provider, secretKey) {
          return {
            send: async (args) => {
              let seqno = await this.getSeqno(provider);
              let transfer = this.createTransfer({
                seqno,
                secretKey,
                sendMode: args.sendMode,
                message: (0, core_1.internal)({
                  to: args.to,
                  value: args.value,
                  extracurrency: args.extracurrency,
                  init: args.init,
                  body: args.body,
                  bounce: args.bounce
                })
              });
              await this.send(provider, transfer);
            }
          };
        }
      };
      exports.WalletContractV1R1 = WalletContractV1R1;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV1R1.js
  var require_WalletContractV1R1 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV1R1.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      __exportStar2(require_r1(), exports);
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v1/r2.js
  var require_r2 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v1/r2.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.WalletContractV1R2 = void 0;
      var core_1 = require_dist2();
      var createWalletTransfer_1 = require_createWalletTransfer();
      var WalletContractV1R2 = class _WalletContractV1R2 {
        static create(args) {
          return new _WalletContractV1R2(args.workchain, args.publicKey, args.domain);
        }
        constructor(workchain, publicKey3, domain2) {
          this.workchain = workchain;
          this.publicKey = publicKey3;
          this.domain = domain2;
          let code2 = core_1.Cell.fromBoc(Buffer2.from("te6cckEBAQEAUwAAov8AIN0gggFMl7qXMO1E0NcLH+Ck8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVNDieG8=", "base64"))[0];
          let data = (0, core_1.beginCell)().storeUint(0, 32).storeBuffer(publicKey3).endCell();
          this.init = { code: code2, data };
          this.address = (0, core_1.contractAddress)(workchain, { code: code2, data });
        }
        /**
         * Get Wallet Balance
         */
        async getBalance(provider) {
          let state = await provider.getState();
          return state.balance;
        }
        /**
         * Get Wallet Seqno
         */
        async getSeqno(provider) {
          let state = await provider.getState();
          if (state.state.type === "active") {
            let res = await provider.get("seqno", []);
            return res.stack.readNumber();
          } else {
            return 0;
          }
        }
        /**
         * Send signed transfer
         */
        async send(provider, message) {
          await provider.external(message);
        }
        /**
         * Sign and send transfer
         */
        async sendTransfer(provider, args) {
          let transfer = this.createTransfer(args);
          await this.send(provider, transfer);
        }
        /**
         * Create signed transfer
         */
        createTransfer(args) {
          let sendMode = core_1.SendMode.PAY_GAS_SEPARATELY;
          if (args.sendMode !== null && args.sendMode !== void 0) {
            sendMode = args.sendMode;
          }
          return (0, createWalletTransfer_1.createWalletTransferV1)({
            seqno: args.seqno,
            sendMode,
            secretKey: args.secretKey,
            message: args.message,
            domain: this.domain
          });
        }
        /**
         * Create sender
         */
        sender(provider, secretKey) {
          return {
            send: async (args) => {
              let seqno = await this.getSeqno(provider);
              let transfer = this.createTransfer({
                seqno,
                secretKey,
                sendMode: args.sendMode,
                message: (0, core_1.internal)({
                  to: args.to,
                  value: args.value,
                  extracurrency: args.extracurrency,
                  init: args.init,
                  body: args.body,
                  bounce: args.bounce
                })
              });
              await this.send(provider, transfer);
            }
          };
        }
      };
      exports.WalletContractV1R2 = WalletContractV1R2;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV1R2.js
  var require_WalletContractV1R2 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV1R2.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      __exportStar2(require_r2(), exports);
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v1/r3.js
  var require_r3 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v1/r3.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.WalletContractV1R3 = void 0;
      var core_1 = require_dist2();
      var createWalletTransfer_1 = require_createWalletTransfer();
      var WalletContractV1R3 = class _WalletContractV1R3 {
        static create(args) {
          return new _WalletContractV1R3(args.workchain, args.publicKey, args.domain);
        }
        constructor(workchain, publicKey3, domain2) {
          this.workchain = workchain;
          this.publicKey = publicKey3;
          this.domain = domain2;
          let code2 = core_1.Cell.fromBoc(Buffer2.from("te6cckEBAQEAXwAAuv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVLW4bkI=", "base64"))[0];
          let data = (0, core_1.beginCell)().storeUint(0, 32).storeBuffer(publicKey3).endCell();
          this.init = { code: code2, data };
          this.address = (0, core_1.contractAddress)(workchain, { code: code2, data });
        }
        /**
         * Get Wallet Balance
         */
        async getBalance(provider) {
          let state = await provider.getState();
          return state.balance;
        }
        /**
         * Get Wallet Seqno
         */
        async getSeqno(provider) {
          let state = await provider.getState();
          if (state.state.type === "active") {
            let res = await provider.get("seqno", []);
            return res.stack.readNumber();
          } else {
            return 0;
          }
        }
        /**
         * Send signed transfer
         */
        async send(executor, message) {
          await executor.external(message);
        }
        /**
         * Sign and send transfer
         */
        async sendTransfer(provider, args) {
          let transfer = this.createTransfer(args);
          await this.send(provider, transfer);
        }
        /**
         * Create signed transfer
         */
        createTransfer(args) {
          let sendMode = core_1.SendMode.PAY_GAS_SEPARATELY;
          if (args.sendMode !== null && args.sendMode !== void 0) {
            sendMode = args.sendMode;
          }
          return (0, createWalletTransfer_1.createWalletTransferV1)({
            seqno: args.seqno,
            sendMode,
            secretKey: args.secretKey,
            message: args.message,
            domain: this.domain
          });
        }
        /**
         * Create sender
         */
        sender(provider, secretKey) {
          return {
            send: async (args) => {
              let seqno = await this.getSeqno(provider);
              let transfer = this.createTransfer({
                seqno,
                secretKey,
                sendMode: args.sendMode,
                message: (0, core_1.internal)({
                  to: args.to,
                  value: args.value,
                  init: args.init,
                  body: args.body,
                  bounce: args.bounce
                })
              });
              await this.send(provider, transfer);
            }
          };
        }
      };
      exports.WalletContractV1R3 = WalletContractV1R3;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV1R3.js
  var require_WalletContractV1R3 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV1R3.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      __exportStar2(require_r3(), exports);
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v2/r1.js
  var require_r12 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v2/r1.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.WalletContractV2R1 = void 0;
      var core_1 = require_dist2();
      var createWalletTransfer_1 = require_createWalletTransfer();
      var WalletContractV2R1 = class _WalletContractV2R1 {
        static create(args) {
          return new _WalletContractV2R1(args.workchain, args.publicKey, args.domain);
        }
        constructor(workchain, publicKey3, domain2) {
          this.workchain = workchain;
          this.publicKey = publicKey3;
          this.domain = domain2;
          let code2 = core_1.Cell.fromBoc(Buffer2.from("te6cckEBAQEAVwAAqv8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VShNwu2", "base64"))[0];
          let data = (0, core_1.beginCell)().storeUint(0, 32).storeBuffer(publicKey3).endCell();
          this.init = { code: code2, data };
          this.address = (0, core_1.contractAddress)(workchain, { code: code2, data });
        }
        /**
         * Get Wallet Balance
         */
        async getBalance(provider) {
          let state = await provider.getState();
          return state.balance;
        }
        /**
         * Get Wallet Seqno
         */
        async getSeqno(provider) {
          let state = await provider.getState();
          if (state.state.type === "active") {
            let res = await provider.get("seqno", []);
            return res.stack.readNumber();
          } else {
            return 0;
          }
        }
        /**
         * Send signed transfer
         */
        async send(provider, message) {
          await provider.external(message);
        }
        /**
         * Sign and send transfer
         */
        async sendTransfer(provider, args) {
          let transfer = this.createTransfer(args);
          await this.send(provider, transfer);
        }
        /**
         * Create signed transfer
         */
        createTransfer(args) {
          let sendMode = core_1.SendMode.PAY_GAS_SEPARATELY;
          if (args.sendMode !== null && args.sendMode !== void 0) {
            sendMode = args.sendMode;
          }
          return (0, createWalletTransfer_1.createWalletTransferV2)({
            seqno: args.seqno,
            sendMode,
            secretKey: args.secretKey,
            messages: args.messages,
            timeout: args.timeout,
            domain: this.domain
          });
        }
        /**
         * Create sender
         */
        sender(provider, secretKey) {
          return {
            send: async (args) => {
              let seqno = await this.getSeqno(provider);
              let transfer = this.createTransfer({
                seqno,
                secretKey,
                sendMode: args.sendMode,
                messages: [
                  (0, core_1.internal)({
                    to: args.to,
                    value: args.value,
                    extracurrency: args.extracurrency,
                    init: args.init,
                    body: args.body,
                    bounce: args.bounce
                  })
                ]
              });
              await this.send(provider, transfer);
            }
          };
        }
      };
      exports.WalletContractV2R1 = WalletContractV2R1;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV2R1.js
  var require_WalletContractV2R1 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV2R1.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      __exportStar2(require_r12(), exports);
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v2/r2.js
  var require_r22 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v2/r2.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.WalletContractV2R2 = void 0;
      var core_1 = require_dist2();
      var createWalletTransfer_1 = require_createWalletTransfer();
      var WalletContractV2R2 = class _WalletContractV2R2 {
        static create(args) {
          return new _WalletContractV2R2(args.workchain, args.publicKey, args.domain);
        }
        constructor(workchain, publicKey3, domain2) {
          this.workchain = workchain;
          this.publicKey = publicKey3;
          this.domain = domain2;
          let code2 = core_1.Cell.fromBoc(Buffer2.from("te6cckEBAQEAYwAAwv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VQETNeh", "base64"))[0];
          let data = (0, core_1.beginCell)().storeUint(0, 32).storeBuffer(publicKey3).endCell();
          this.init = { code: code2, data };
          this.address = (0, core_1.contractAddress)(workchain, { code: code2, data });
        }
        /**
         * Get Wallet Balance
         */
        async getBalance(provider) {
          let state = await provider.getState();
          return state.balance;
        }
        /**
         * Get Wallet Seqno
         */
        async getSeqno(provider) {
          let state = await provider.getState();
          if (state.state.type === "active") {
            let res = await provider.get("seqno", []);
            return res.stack.readNumber();
          } else {
            return 0;
          }
        }
        /**
         * Send signed transfer
         */
        async send(provider, message) {
          await provider.external(message);
        }
        /**
         * Sign and send transfer
         */
        async sendTransfer(provider, args) {
          let transfer = this.createTransfer(args);
          await this.send(provider, transfer);
        }
        /**
         * Create signed transfer
         */
        createTransfer(args) {
          let sendMode = core_1.SendMode.PAY_GAS_SEPARATELY;
          if (args.sendMode !== null && args.sendMode !== void 0) {
            sendMode = args.sendMode;
          }
          return (0, createWalletTransfer_1.createWalletTransferV2)({
            seqno: args.seqno,
            sendMode,
            secretKey: args.secretKey,
            messages: args.messages,
            timeout: args.timeout,
            domain: this.domain
          });
        }
        /**
         * Create sender
         */
        sender(provider, secretKey) {
          return {
            send: async (args) => {
              let seqno = await this.getSeqno(provider);
              let transfer = this.createTransfer({
                seqno,
                secretKey,
                sendMode: args.sendMode,
                messages: [
                  (0, core_1.internal)({
                    to: args.to,
                    value: args.value,
                    extracurrency: args.extracurrency,
                    init: args.init,
                    body: args.body,
                    bounce: args.bounce
                  })
                ]
              });
              await this.send(provider, transfer);
            }
          };
        }
      };
      exports.WalletContractV2R2 = WalletContractV2R2;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV2R2.js
  var require_WalletContractV2R2 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV2R2.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      __exportStar2(require_r22(), exports);
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v3/r1.js
  var require_r13 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v3/r1.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.WalletContractV3R1 = void 0;
      var core_1 = require_dist2();
      var createWalletTransfer_1 = require_createWalletTransfer();
      var WalletContractV3R1 = class _WalletContractV3R1 {
        static create(args) {
          return new _WalletContractV3R1(args.workchain, args.publicKey, args.walletId, args.domain);
        }
        constructor(workchain, publicKey3, walletId, domain2) {
          this.workchain = workchain;
          this.publicKey = publicKey3;
          this.domain = domain2;
          if (walletId !== null && walletId !== void 0) {
            this.walletId = walletId;
          } else {
            this.walletId = 698983191 + workchain;
          }
          let code2 = core_1.Cell.fromBoc(Buffer2.from("te6cckEBAQEAYgAAwP8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVD++buA=", "base64"))[0];
          let data = (0, core_1.beginCell)().storeUint(0, 32).storeUint(this.walletId, 32).storeBuffer(publicKey3).endCell();
          this.init = { code: code2, data };
          this.address = (0, core_1.contractAddress)(workchain, { code: code2, data });
        }
        /**
         * Get wallet balance
         */
        async getBalance(provider) {
          let state = await provider.getState();
          return state.balance;
        }
        /**
         * Get Wallet Seqno
         */
        async getSeqno(provider) {
          let state = await provider.getState();
          if (state.state.type === "active") {
            let res = await provider.get("seqno", []);
            return res.stack.readNumber();
          } else {
            return 0;
          }
        }
        /**
         * Send signed transfer
         */
        async send(provider, message) {
          await provider.external(message);
        }
        /**
         * Sign and send transfer
         */
        async sendTransfer(provider, args) {
          let transfer = this.createTransfer(args);
          await this.send(provider, transfer);
        }
        /**
         * Create transfer
         */
        createTransfer(args) {
          return (0, createWalletTransfer_1.createWalletTransferV3)({
            ...args,
            sendMode: args.sendMode ?? core_1.SendMode.PAY_GAS_SEPARATELY,
            walletId: this.walletId,
            domain: this.domain
          });
        }
        /**
         * Create sender
         */
        sender(provider, secretKey) {
          return {
            send: async (args) => {
              let seqno = await this.getSeqno(provider);
              let transfer = this.createTransfer({
                seqno,
                secretKey,
                sendMode: args.sendMode,
                messages: [
                  (0, core_1.internal)({
                    to: args.to,
                    value: args.value,
                    extracurrency: args.extracurrency,
                    init: args.init,
                    body: args.body,
                    bounce: args.bounce
                  })
                ]
              });
              await this.send(provider, transfer);
            }
          };
        }
      };
      exports.WalletContractV3R1 = WalletContractV3R1;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV3R1.js
  var require_WalletContractV3R1 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV3R1.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      __exportStar2(require_r13(), exports);
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v3/r2.js
  var require_r23 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v3/r2.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.WalletContractV3R2 = void 0;
      var core_1 = require_dist2();
      var createWalletTransfer_1 = require_createWalletTransfer();
      var WalletContractV3R2 = class _WalletContractV3R2 {
        static create(args) {
          return new _WalletContractV3R2(args.workchain, args.publicKey, args.walletId, args.domain);
        }
        constructor(workchain, publicKey3, walletId, domain2) {
          this.workchain = workchain;
          this.publicKey = publicKey3;
          this.domain = domain2;
          if (walletId !== null && walletId !== void 0) {
            this.walletId = walletId;
          } else {
            this.walletId = 698983191 + workchain;
          }
          let code2 = core_1.Cell.fromBoc(Buffer2.from("te6cckEBAQEAcQAA3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVBC9ba0=", "base64"))[0];
          let data = (0, core_1.beginCell)().storeUint(0, 32).storeUint(this.walletId, 32).storeBuffer(publicKey3).endCell();
          this.init = { code: code2, data };
          this.address = (0, core_1.contractAddress)(workchain, { code: code2, data });
        }
        /**
         * Get wallet balance
         */
        async getBalance(provider) {
          let state = await provider.getState();
          return state.balance;
        }
        /**
         * Get Wallet Seqno
         */
        async getSeqno(provider) {
          let state = await provider.getState();
          if (state.state.type === "active") {
            let res = await provider.get("seqno", []);
            return res.stack.readNumber();
          } else {
            return 0;
          }
        }
        /**
         * Send signed transfer
         */
        async send(provider, message) {
          await provider.external(message);
        }
        /**
         * Sign and send transfer
         */
        async sendTransfer(provider, args) {
          let transfer = this.createTransfer(args);
          await this.send(provider, transfer);
        }
        /**
         * Create transfer
         */
        createTransfer(args) {
          return (0, createWalletTransfer_1.createWalletTransferV3)({
            ...args,
            sendMode: args.sendMode ?? core_1.SendMode.PAY_GAS_SEPARATELY,
            walletId: this.walletId,
            domain: this.domain
          });
        }
        /**
         * Create sender
         */
        sender(provider, secretKey) {
          return {
            send: async (args) => {
              let seqno = await this.getSeqno(provider);
              let transfer = this.createTransfer({
                seqno,
                secretKey,
                sendMode: args.sendMode,
                messages: [
                  (0, core_1.internal)({
                    to: args.to,
                    value: args.value,
                    extracurrency: args.extracurrency,
                    init: args.init,
                    body: args.body,
                    bounce: args.bounce
                  })
                ]
              });
              await this.send(provider, transfer);
            }
          };
        }
      };
      exports.WalletContractV3R2 = WalletContractV3R2;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV3R2.js
  var require_WalletContractV3R2 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV3R2.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      __exportStar2(require_r23(), exports);
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v4/WalletContractV4.js
  var require_WalletContractV4 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/v4/WalletContractV4.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.WalletContractV4 = void 0;
      var core_1 = require_dist2();
      var createWalletTransfer_1 = require_createWalletTransfer();
      var WalletContractV42 = class _WalletContractV4 {
        static create(args) {
          return new _WalletContractV4(args.workchain, args.publicKey, args.walletId, args.domain);
        }
        constructor(workchain, publicKey3, walletId, domain2) {
          this.workchain = workchain;
          this.publicKey = publicKey3;
          this.domain = domain2;
          if (walletId !== null && walletId !== void 0) {
            this.walletId = walletId;
          } else {
            this.walletId = 698983191 + workchain;
          }
          let code2 = core_1.Cell.fromBoc(Buffer2.from("te6ccgECFAEAAtQAART/APSkE/S88sgLAQIBIAIDAgFIBAUE+PKDCNcYINMf0x/THwL4I7vyZO1E0NMf0x/T//QE0VFDuvKhUVG68qIF+QFUEGT5EPKj+AAkpMjLH1JAyx9SMMv/UhD0AMntVPgPAdMHIcAAn2xRkyDXSpbTB9QC+wDoMOAhwAHjACHAAuMAAcADkTDjDQOkyMsfEssfy/8QERITAubQAdDTAyFxsJJfBOAi10nBIJJfBOAC0x8hghBwbHVnvSKCEGRzdHK9sJJfBeAD+kAwIPpEAcjKB8v/ydDtRNCBAUDXIfQEMFyBAQj0Cm+hMbOSXwfgBdM/yCWCEHBsdWe6kjgw4w0DghBkc3RyupJfBuMNBgcCASAICQB4AfoA9AQw+CdvIjBQCqEhvvLgUIIQcGx1Z4MesXCAGFAEywUmzxZY+gIZ9ADLaRfLH1Jgyz8gyYBA+wAGAIpQBIEBCPRZMO1E0IEBQNcgyAHPFvQAye1UAXKwjiOCEGRzdHKDHrFwgBhQBcsFUAPPFiP6AhPLassfyz/JgED7AJJfA+ICASAKCwBZvSQrb2omhAgKBrkPoCGEcNQICEekk30pkQzmkD6f+YN4EoAbeBAUiYcVnzGEAgFYDA0AEbjJftRNDXCx+AA9sp37UTQgQFA1yH0BDACyMoHy//J0AGBAQj0Cm+hMYAIBIA4PABmtznaiaEAga5Drhf/AABmvHfaiaEAQa5DrhY/AAG7SB/oA1NQi+QAFyMoHFcv/ydB3dIAYyMsFywIizxZQBfoCFMtrEszMyXP7AMhAFIEBCPRR8qcCAHCBAQjXGPoA0z/IVCBHgQEI9FHyp4IQbm90ZXB0gBjIywXLAlAGzxZQBPoCFMtqEssfyz/Jc/sAAgBsgQEI1xj6ANM/MFIkgQEI9Fnyp4IQZHN0cnB0gBjIywXLAlAFzxZQA/oCE8tqyx8Syz/Jc/sAAAr0AMntVA==", "base64"))[0];
          let data = (0, core_1.beginCell)().storeUint(0, 32).storeUint(this.walletId, 32).storeBuffer(this.publicKey).storeBit(0).endCell();
          this.init = { code: code2, data };
          this.address = (0, core_1.contractAddress)(workchain, { code: code2, data });
        }
        /**
         * Get Wallet Balance
         */
        async getBalance(provider) {
          let state = await provider.getState();
          return state.balance;
        }
        /**
         * Get Wallet Seqno
         */
        async getSeqno(provider) {
          let state = await provider.getState();
          if (state.state.type === "active") {
            let res = await provider.get("seqno", []);
            return res.stack.readNumber();
          } else {
            return 0;
          }
        }
        async getIsPluginInstalled(provider, pluginAddress) {
          const state = await provider.getState();
          if (state.state.type !== "active") {
            return false;
          }
          const wc = BigInt(pluginAddress.workChain);
          const addrHash = BigInt("0x" + pluginAddress.hash.toString("hex"));
          const res = await provider.get("is_plugin_installed", [
            { type: "int", value: wc },
            { type: "int", value: addrHash }
          ]);
          return res.stack.readBoolean();
        }
        async getPluginsArray(provider) {
          const state = await provider.getState();
          if (state.state.type !== "active") {
            return [];
          }
          const res = await provider.get("get_plugin_list", []);
          return res.stack.readLispList().map((item) => {
            if (item.type !== "tuple") {
              throw Error("Not a tuple");
            }
            const entry = new core_1.TupleReader(item.items);
            const workchain = entry.readNumber();
            const addrHash = entry.readBigNumber();
            const addressHex = addrHash.toString(16).padStart(64, "0");
            return core_1.Address.parseRaw(`${workchain}:${addressHex}`);
          });
        }
        /**
         * Send signed transfer
         */
        async send(provider, message) {
          await provider.external(message);
        }
        /**
         * Sign and send transfer
         */
        async sendTransfer(provider, args) {
          let transfer = this.createTransfer(args);
          await this.send(provider, transfer);
        }
        /**
         * Create signed transfer
         */
        createTransfer(args) {
          return this.createRequest({
            seqno: args.seqno,
            timeout: args.timeout,
            action: {
              type: "sendMsg",
              messages: args.messages,
              sendMode: args.sendMode
            },
            ..."secretKey" in args ? { secretKey: args.secretKey } : { signer: args.signer }
          });
        }
        async sendRequest(provider, args) {
          const action = await this.createRequest(args);
          await this.send(provider, action);
        }
        createRequest(args) {
          return (0, createWalletTransfer_1.createWalletTransferV4)({
            ...args,
            walletId: this.walletId,
            domain: this.domain
          });
        }
        /**
         * Create sender
         */
        sender(provider, secretKey) {
          return {
            send: async (args) => {
              let seqno = await this.getSeqno(provider);
              let transfer = this.createTransfer({
                seqno,
                secretKey,
                sendMode: args.sendMode,
                messages: [
                  (0, core_1.internal)({
                    to: args.to,
                    value: args.value,
                    extracurrency: args.extracurrency,
                    init: args.init,
                    body: args.body,
                    bounce: args.bounce
                  })
                ]
              });
              await this.send(provider, transfer);
            }
          };
        }
        async sendAddPlugin(provider, args) {
          const request = await this.createAddPlugin(args);
          return await this.send(provider, request);
        }
        async sendRemovePlugin(provider, args) {
          const request = await this.createRemovePlugin(args);
          return await this.send(provider, request);
        }
        async sendAddAndDeployPlugin(provider, args) {
          const request = await this.createAddAndDeployPlugin(args);
          return await this.send(provider, request);
        }
        createAddPlugin(args) {
          return this.createRequest({
            action: {
              type: "addPlugin",
              address: args.address,
              forwardAmount: args.forwardAmount,
              queryId: args.queryId
            },
            ...args
          });
        }
        createRemovePlugin(args) {
          return this.createRequest({
            action: {
              type: "removePlugin",
              address: args.address,
              forwardAmount: args.forwardAmount,
              queryId: args.queryId
            },
            ...args
          });
        }
        createAddAndDeployPlugin(args) {
          return this.createRequest({
            action: {
              type: "addAndDeployPlugin",
              workchain: args.workchain,
              stateInit: args.stateInit,
              body: args.body,
              forwardAmount: args.forwardAmount
            },
            ...args
          });
        }
        async sendPluginRequestFunds(provider, sender, args) {
          await provider.internal(sender, {
            value: args.forwardAmount,
            body: this.createPluginRequestFundsMessage(args),
            sendMode: args.sendMode
          });
        }
        createPluginRequestFundsMessage(args) {
          return (0, core_1.beginCell)().storeUint(1886156135, 32).storeUint(args.queryId ?? 0, 64).storeCoins(args.toncoinsToWithdraw).storeDict(null).endCell();
        }
        async sendPluginRemovePlugin(provider, sender, amount, queryId) {
          await provider.internal(sender, {
            value: amount,
            body: this.createPluginRemovePluginMessage(queryId)
          });
        }
        createPluginRemovePluginMessage(queryId) {
          return (0, core_1.beginCell)().storeUint(1685288050, 32).storeUint(queryId ?? 0, 64).endCell();
        }
      };
      exports.WalletContractV4 = WalletContractV42;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV4.js
  var require_WalletContractV42 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV4.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      __exportStar2(require_WalletContractV4(), exports);
      __exportStar2(require_WalletContractV4Actions(), exports);
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV5Beta.js
  var require_WalletContractV5Beta2 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV5Beta.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      __exportStar2(require_WalletContractV5Beta(), exports);
      __exportStar2(require_WalletV5BetaActions(), exports);
      __exportStar2(require_WalletV5BetaWalletId(), exports);
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV5R1.js
  var require_WalletContractV5R12 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/wallets/WalletContractV5R1.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      __exportStar2(require_WalletContractV5R1(), exports);
      __exportStar2(require_WalletV5R1Actions(), exports);
      __exportStar2(require_WalletV5R1WalletId(), exports);
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/jetton/JettonMaster.js
  var require_JettonMaster = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/jetton/JettonMaster.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.JettonMaster = void 0;
      var core_1 = require_dist2();
      var JettonMaster = class _JettonMaster {
        static create(address) {
          return new _JettonMaster(address);
        }
        constructor(address) {
          this.address = address;
        }
        async getWalletAddress(provider, owner) {
          let res = await provider.get("get_wallet_address", [
            { type: "slice", cell: (0, core_1.beginCell)().storeAddress(owner).endCell() }
          ]);
          return res.stack.readAddress();
        }
        async getJettonData(provider) {
          let res = await provider.get("get_jetton_data", []);
          let totalSupply = res.stack.readBigNumber();
          let mintable = res.stack.readBoolean();
          let adminAddress = res.stack.readAddress();
          let content = res.stack.readCell();
          let walletCode = res.stack.readCell();
          return {
            totalSupply,
            mintable,
            adminAddress,
            content,
            walletCode
          };
        }
      };
      exports.JettonMaster = JettonMaster;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/jetton/JettonWallet.js
  var require_JettonWallet = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/jetton/JettonWallet.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.JettonWallet = void 0;
      var JettonWallet = class _JettonWallet {
        static create(address) {
          return new _JettonWallet(address);
        }
        constructor(address) {
          this.address = address;
        }
        async getBalance(provider) {
          let state = await provider.getState();
          if (state.state.type !== "active") {
            return 0n;
          }
          let res = await provider.get("get_wallet_data", []);
          return res.stack.readBigNumber();
        }
      };
      exports.JettonWallet = JettonWallet;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/multisig/MultisigOrder.js
  var require_MultisigOrder = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/multisig/MultisigOrder.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.MultisigOrder = void 0;
      var crypto_1 = require_dist();
      var core_1 = require_dist2();
      var MultisigOrder = class _MultisigOrder {
        constructor(payload) {
          this.signatures = {};
          this.payload = payload;
        }
        static fromCell(cell) {
          let s3 = cell.beginParse();
          let signatures = s3.loadMaybeRef()?.beginParse();
          const messagesCell = s3.asCell();
          let order = new _MultisigOrder(messagesCell);
          if (signatures) {
            while (signatures.remainingBits > 0) {
              const signature2 = signatures.loadBuffer(64);
              const ownerId = signatures.loadUint(8);
              order.signatures[ownerId] = signature2;
              if (signatures.remainingRefs > 0) {
                signatures = signatures.loadRef().asSlice();
              } else {
                signatures.skip(1);
              }
            }
            signatures.endParse();
          }
          return order;
        }
        static fromPayload(payload) {
          return new _MultisigOrder(payload);
        }
        addSignature(ownerId, signature2, multisig) {
          const signingHash = this.payload.hash();
          if (!(0, crypto_1.signVerify)(signingHash, signature2, multisig.owners.get(ownerId).slice(0, -1))) {
            throw Error("invalid signature");
          }
          this.signatures[ownerId] = signature2;
        }
        sign(ownerId, secretKey) {
          const signingHash = this.payload.hash();
          this.signatures[ownerId] = (0, crypto_1.sign)(signingHash, secretKey);
          return signingHash;
        }
        unionSignatures(other) {
          this.signatures = Object.assign({}, this.signatures, other.signatures);
        }
        clearSignatures() {
          this.signatures = {};
        }
        toCell(ownerId) {
          let b9 = (0, core_1.beginCell)().storeBit(0);
          for (const ownerId2 in this.signatures) {
            const signature2 = this.signatures[ownerId2];
            b9 = (0, core_1.beginCell)().storeBit(1).storeRef((0, core_1.beginCell)().storeBuffer(signature2).storeUint(parseInt(ownerId2), 8).storeBuilder(b9).endCell());
          }
          return (0, core_1.beginCell)().storeUint(ownerId, 8).storeBuilder(b9).storeBuilder(this.payload.asBuilder()).endCell();
        }
      };
      exports.MultisigOrder = MultisigOrder;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/multisig/MultisigOrderBuilder.js
  var require_MultisigOrderBuilder = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/multisig/MultisigOrderBuilder.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.MultisigOrderBuilder = void 0;
      var core_1 = require_dist2();
      var MultisigOrder_1 = require_MultisigOrder();
      var MultisigOrderBuilder = class {
        constructor(walletId, offset2) {
          this.messages = (0, core_1.beginCell)();
          this.queryId = 0n;
          this.walletId = walletId;
          this.queryOffset = offset2 || 7200;
        }
        addMessage(message, mode) {
          if (this.messages.refs >= 4) {
            throw Error("only 4 refs are allowed");
          }
          this.updateQueryId();
          this.messages.storeUint(mode, 8);
          this.messages.storeRef((0, core_1.beginCell)().store((0, core_1.storeMessageRelaxed)(message)).endCell());
        }
        clearMessages() {
          this.messages = (0, core_1.beginCell)();
        }
        build() {
          return MultisigOrder_1.MultisigOrder.fromPayload((0, core_1.beginCell)().storeUint(this.walletId, 32).storeUint(this.queryId, 64).storeBuilder(this.messages).endCell());
        }
        updateQueryId() {
          const time3 = BigInt(Math.floor(Date.now() / 1e3 + this.queryOffset));
          this.queryId = time3 << 32n;
        }
      };
      exports.MultisigOrderBuilder = MultisigOrderBuilder;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/multisig/MultisigWallet.js
  var require_MultisigWallet = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/multisig/MultisigWallet.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.MultisigWallet = void 0;
      var crypto_1 = require_dist();
      var core_1 = require_dist2();
      var MULTISIG_CODE = core_1.Cell.fromBase64("te6ccgECKwEABBgAART/APSkE/S88sgLAQIBIAIDAgFIBAUE2vIgxwCOgzDbPOCDCNcYIPkBAdMH2zwiwAAToVNxePQOb6Hyn9s8VBq6+RDyoAb0BCD5AQHTH1EYuvKq0z9wUwHwCgHCCAGDCryx8mhTFYBA9A5voSCYDqQgwgryZw7f+COqH1NAufJhVCOjU04gIyEiAgLMBgcCASAMDQIBIAgJAgFmCgsAA9GEAiPymAvHoHN9CYbZ5S7Z4BPHohwhJQAtAKkItdJEqCTItdKlwLUAdAT8ArobBKAATwhbpEx4CBukTDgAdAg10rDAJrUAvALyFjPFszJ4HHXI8gBzxb0AMmACASAODwIBIBQVARW77ZbVA0cFUg2zyCoCAUgQEQIBIBITAXOxHXQgwjXGCD5AQHTB4IB1MTtQ9hTIHj0Dm+h8p/XC/9eMfkQ8qCuAfQEIW6TW3Ey4PkBWNs8AaQBgJwA9rtqA6ADoAPoCAXoCEfyAgPyA3XlP+AXkegAA54tkwAAXrhlXP8EA1WZ2oexAAgEgFhcCASAYGQFRtyVbZ4YmRmpGEAgegc30McJNhFpAADMaYeYuAFrgJhwLb+4cC3d0bhAjAYm1WZtnhqvgb+2xxsoicAgej430pBHEoFpAADHDhBACGuQkuuBk9kUWE5kAOeLKhACQCB6IYFImHFImHFImXEA2YlzNijAjAgEgGhsAF7UGtc4QQDVZnah7EAIBIBwdAgOZOB4fARGsGm2eL4G2CUAjABWt+UEAzJV2oewYQAENqTbPBVfBYCMAFa3f3CCAarM7UPYgAiDbPALyZfgAUENxQxPbPO1UIyoACtP/0wcwBKDbPC+uUyCw8mISsQKkJbNTHLmwJYEA4aojoCi8sPJpggGGoPgBBZcCERACPj4wjo0REB/bPEDXePRDEL0F4lQWW1Rz51YQU9zbPFRxClR6vCQlKCYAIO1E0NMf0wfTB9M/9AT0BNEAXgGOGjDSAAHyo9MH0wdQA9cBIPkBBfkBFbrypFAD4GwhIddKqgIi10m68qtwVCATAAwByMv/ywcE1ts87VT4D3AlblOJvrGYEG4QLVDHXwePGzBUJANQTds8UFWgRlAQSRA6SwlTuds8UFQWf+L4AAeDJaGOLCaAQPSWb6UglDBTA7neII4WODk5CNIAAZfTBzAW8AcFkTDifwgHBZJsMeKz5jAGKicoKQBgcI4pA9CDCNcY0wf0BDBTFnj0Dm+h8qXXC/9URUT5EPKmrlIgsVIDvRShI27mbCIyAH5SML6OIF8D+ACTItdKmALTB9QC+wAC6DJwyMoAQBSAQPRDAvAHjhdxyMsAFMsHEssHWM8BWM8WQBOAQPRDAeIBII6KEEUQNEMA2zztVJJfBuIqABzIyx/LB8sHyz/0APQAyQ==");
      var MultisigWallet = class _MultisigWallet {
        constructor(publicKeys, workchain, walletId, k7, opts) {
          this.provider = null;
          this.owners = core_1.Dictionary.empty();
          this.workchain = workchain;
          this.walletId = walletId;
          this.k = k7;
          for (let i5 = 0; i5 < publicKeys.length; i5 += 1) {
            this.owners.set(i5, Buffer2.concat([publicKeys[i5], Buffer2.alloc(1)]));
          }
          this.init = {
            code: MULTISIG_CODE,
            data: (0, core_1.beginCell)().storeUint(this.walletId, 32).storeUint(this.owners.size, 8).storeUint(this.k, 8).storeUint(0, 64).storeDict(this.owners, core_1.Dictionary.Keys.Uint(8), core_1.Dictionary.Values.Buffer(33)).storeBit(0).endCell()
          };
          this.address = opts?.address || (0, core_1.contractAddress)(workchain, this.init);
          if (opts?.provider) {
            this.provider = opts.provider;
          } else if (opts?.client) {
            this.provider = opts.client.provider(this.address, {
              code: this.init.code,
              data: this.init.data
            });
          }
        }
        static async fromAddress(address, opts) {
          let provider;
          if (opts.provider) {
            provider = opts.provider;
          } else {
            if (!opts.client) {
              throw Error("Either provider or client must be specified");
            }
            provider = opts.client.provider(address, {
              code: null,
              data: null
            });
          }
          const contractState = (await provider.getState()).state;
          if (contractState.type !== "active") {
            throw Error("Contract must be active");
          }
          const data = core_1.Cell.fromBoc(contractState.data)[0].beginParse();
          const walletId = data.loadUint(32);
          data.skip(8);
          const k7 = data.loadUint(8);
          data.skip(64);
          const owners = data.loadDict(core_1.Dictionary.Keys.Uint(8), core_1.Dictionary.Values.Buffer(33));
          let publicKeys = [];
          for (const [key2, value] of owners) {
            const publicKey3 = value.subarray(0, 32);
            publicKeys.push(publicKey3);
          }
          return new _MultisigWallet(publicKeys, address.workChain, walletId, k7, {
            address,
            provider,
            client: opts.client
          });
        }
        async deployExternal(provider) {
          if (!provider && !this.provider) {
            throw Error("you must specify provider if there is no such property in MultisigWallet instance");
          }
          if (!provider) {
            provider = this.provider;
          }
          await provider.external(core_1.Cell.EMPTY);
        }
        async deployInternal(sender, value = 1000000000n) {
          await sender.send({
            sendMode: core_1.SendMode.PAY_GAS_SEPARATELY + core_1.SendMode.IGNORE_ERRORS,
            to: this.address,
            value,
            init: this.init,
            body: core_1.Cell.EMPTY,
            bounce: true
          });
        }
        async sendOrder(order, secretKey, provider) {
          if (!provider && !this.provider) {
            throw Error("you must specify provider if there is no such property in MultisigWallet instance");
          }
          if (!provider) {
            provider = this.provider;
          }
          let publicKey3 = (0, crypto_1.keyPairFromSecretKey)(secretKey).publicKey;
          let ownerId = this.getOwnerIdByPubkey(publicKey3);
          let cell = order.toCell(ownerId);
          let signature2 = (0, crypto_1.sign)(cell.hash(), secretKey);
          cell = (0, core_1.beginCell)().storeBuffer(signature2).storeSlice(cell.asSlice()).endCell();
          await provider.external(cell);
        }
        async sendOrderWithoutSecretKey(order, signature2, ownerId, provider) {
          if (!provider && !this.provider) {
            throw Error("you must specify provider if there is no such property in MultisigWallet instance");
          }
          if (!provider) {
            provider = this.provider;
          }
          let cell = order.toCell(ownerId);
          cell = (0, core_1.beginCell)().storeBuffer(signature2).storeSlice(cell.asSlice()).endCell();
          await provider.external(cell);
        }
        getOwnerIdByPubkey(publicKey3) {
          for (const [key2, value] of this.owners) {
            if (value.subarray(0, 32).equals(publicKey3)) {
              return key2;
            }
          }
          throw Error("public key is not an owner");
        }
      };
      exports.MultisigWallet = MultisigWallet;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/elector/ElectorContract.js
  var require_ElectorContract = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/elector/ElectorContract.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.ElectorContract = void 0;
      var core_1 = require_dist2();
      var FrozenDictValue = {
        serialize(src2, builder) {
          throw Error("not implemented");
        },
        parse(src2) {
          const address = new core_1.Address(-1, src2.loadBuffer(32));
          const weight = src2.loadUintBig(64);
          const stake = src2.loadCoins();
          return { address, weight, stake };
        }
      };
      var EntitiesDictValue = {
        serialize(src2, builder) {
          throw Error("not implemented");
        },
        parse(src2) {
          const stake = src2.loadCoins();
          src2.skip(64);
          const address = new core_1.Address(-1, src2.loadBuffer(32));
          const adnl = src2.loadBuffer(32);
          return { stake, address, adnl };
        }
      };
      var ElectorContract = class _ElectorContract {
        //readonly source: ContractSource = new UnknownContractSource('org.ton.elector', -1, 'Elector Contract');
        static create() {
          return new _ElectorContract();
        }
        constructor() {
          this.address = core_1.Address.parseRaw("-1:3333333333333333333333333333333333333333333333333333333333333333");
        }
        async getReturnedStake(provider, address) {
          if (address.workChain !== -1) {
            throw Error("Only masterchain addresses could have stake");
          }
          const res = await provider.get("compute_returned_stake", [
            { type: "int", value: BigInt("0x" + address.hash.toString("hex")) }
          ]);
          return res.stack.readBigNumber();
        }
        async getPastElectionsList(provider) {
          const res = await provider.get("past_elections_list", []);
          const electionsListRaw = new core_1.TupleReader(res.stack.readLispList());
          const elections = [];
          while (electionsListRaw.remaining > 0) {
            const electionsListEntry = electionsListRaw.readTuple();
            const id = electionsListEntry.readNumber();
            const unfreezeAt = electionsListEntry.readNumber();
            electionsListEntry.pop();
            const stakeHeld = electionsListEntry.readNumber();
            elections.push({ id, unfreezeAt, stakeHeld });
          }
          return elections;
        }
        async getPastElections(provider) {
          const res = await provider.get("past_elections", []);
          const electionsRaw = new core_1.TupleReader(res.stack.readLispList());
          const elections = [];
          while (electionsRaw.remaining > 0) {
            const electionsEntry = electionsRaw.readTuple();
            const id = electionsEntry.readNumber();
            const unfreezeAt = electionsEntry.readNumber();
            const stakeHeld = electionsEntry.readNumber();
            electionsEntry.pop();
            const frozenDict = electionsEntry.readCell();
            const totalStake = electionsEntry.readBigNumber();
            const bonuses = electionsEntry.readBigNumber();
            let frozen = /* @__PURE__ */ new Map();
            const frozenData = frozenDict.beginParse().loadDictDirect(core_1.Dictionary.Keys.Buffer(32), FrozenDictValue);
            for (const [key2, value] of frozenData) {
              frozen.set(BigInt("0x" + key2.toString("hex")).toString(10), {
                address: value["address"],
                weight: value["weight"],
                stake: value["stake"]
              });
            }
            elections.push({
              id,
              unfreezeAt,
              stakeHeld,
              totalStake,
              bonuses,
              frozen
            });
          }
          return elections;
        }
        async getElectionEntities(provider) {
          const account = await provider.getState();
          if (account.state.type !== "active") {
            throw Error("Unexpected error");
          }
          const cell = core_1.Cell.fromBoc(account.state.data)[0];
          const cs = cell.beginParse();
          if (!cs.loadBit()) {
            return null;
          }
          const sc = cs.loadRef().beginParse();
          const startWorkTime = sc.loadUint(32);
          const endElectionsTime = sc.loadUint(32);
          const minStake = sc.loadCoins();
          const allStakes = sc.loadCoins();
          const entitiesData = sc.loadDict(core_1.Dictionary.Keys.Buffer(32), EntitiesDictValue);
          let entities = [];
          if (entitiesData) {
            for (const [key2, value] of entitiesData) {
              entities.push({
                pubkey: key2,
                stake: value["stake"],
                address: value["address"],
                adnl: value["adnl"]
              });
            }
          }
          return {
            minStake,
            allStakes,
            endElectionsTime,
            startWorkTime,
            entities
          };
        }
        // possible code for fetching data via get method if it is possible to set gas limit by request
        // async getElectionEntities(block: number) {
        //     const res = await this.client.runMethod(block, this.address, 'participant_list_extended');
        //     if (res.exitCode !== 0 && res.exitCode !== 1) {
        //         throw Error('Exit code: ' + res.exitCode);
        //     }
        //     let tuple = new TupleReader(res.result);
        //     const startWorkTime = tuple.readNumber();
        //     const endElectionsTime = tuple.readNumber();
        //     const minStake = tuple.readBigNumber();
        //     const allStakes = tuple.readBigNumber();
        //     let entriesTuple = tuple.readTuple();
        //     const entriesRaw = new TupleReader(entriesTuple.readLispList());
        //     let entities: { pubkey: Buffer, stake: bigint, address: Address, adnl: Buffer }[] = [];
        //     while (entriesRaw.remaining > 0) {
        //         const electionsEntry = entriesRaw.readTuple();
        //         const pubkey = electionsEntry.readBuffer();
        //         const stake = electionsEntry.readBigNumber();
        //         const address = electionsEntry.readAddress();
        //         const adnl = electionsEntry.readBuffer();
        //         entities.push({ pubkey, stake, address, adnl });
        //     }
        //     return { minStake, allStakes, endElectionsTime, startWorkTime, entities };
        // }
        async getActiveElectionId(provider) {
          const res = await provider.get("active_election_id", []);
          const electionId = res.stack.readNumber();
          return electionId > 0 ? electionId : null;
        }
        async getComplaints(provider, electionId) {
          const b9 = new core_1.TupleBuilder();
          b9.writeNumber(electionId);
          const res = await provider.get("list_complaints", b9.build());
          if (res.stack.peek().type === "null") {
            return [];
          }
          const complaintsRaw = new core_1.TupleReader(res.stack.readLispList());
          const results = [];
          while (complaintsRaw.remaining > 0) {
            const complaintsEntry = complaintsRaw.readTuple();
            const id = complaintsEntry.readBigNumber();
            const completeUnpackedComplaint = complaintsEntry.readTuple();
            const unpackedComplaints = completeUnpackedComplaint.readTuple();
            const publicKey3 = Buffer2.from(unpackedComplaints.readBigNumber().toString(16), "hex");
            const description = unpackedComplaints.readCell();
            const createdAt = unpackedComplaints.readNumber();
            const severity = unpackedComplaints.readNumber();
            const rewardAddress = new core_1.Address(-1, Buffer2.from(unpackedComplaints.readBigNumber().toString(16), "hex"));
            const paid = unpackedComplaints.readBigNumber();
            const suggestedFine = unpackedComplaints.readBigNumber();
            const suggestedFinePart = unpackedComplaints.readBigNumber();
            const votes = [];
            const votersListRaw = new core_1.TupleReader(completeUnpackedComplaint.readLispList());
            while (votersListRaw.remaining > 0) {
              votes.push(votersListRaw.readNumber());
            }
            const vsetId = completeUnpackedComplaint.readBigNumber();
            const remainingWeight = completeUnpackedComplaint.readBigNumber();
            results.push({
              id,
              publicKey: publicKey3,
              createdAt,
              severity,
              paid,
              suggestedFine,
              suggestedFinePart,
              rewardAddress,
              votes,
              remainingWeight,
              vsetId
            });
          }
          return results;
        }
      };
      exports.ElectorContract = ElectorContract;
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/config/ConfigParser.js
  var require_ConfigParser = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/config/ConfigParser.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.configParseMasterAddress = configParseMasterAddress;
      exports.parseValidatorSet = parseValidatorSet;
      exports.parseBridge = parseBridge;
      exports.configParseMasterAddressRequired = configParseMasterAddressRequired;
      exports.configParse5 = configParse5;
      exports.configParse6 = configParse6;
      exports.configParse7 = configParse7;
      exports.configParse9 = configParse9;
      exports.configParse10 = configParse10;
      exports.configParse13 = configParse13;
      exports.configParse14 = configParse14;
      exports.configParse15 = configParse15;
      exports.configParse16 = configParse16;
      exports.configParse17 = configParse17;
      exports.configParse18 = configParse18;
      exports.configParse8 = configParse8;
      exports.configParse40 = configParse40;
      exports.configParseWorkchainDescriptor = configParseWorkchainDescriptor;
      exports.configParse12 = configParse12;
      exports.configParseValidatorSet = configParseValidatorSet;
      exports.configParseBridge = configParseBridge;
      exports.loadJettonBridgeParams = loadJettonBridgeParams;
      exports.configParseGasLimitsPrices = configParseGasLimitsPrices;
      exports.configParseBlockLimits = configParseBlockLimits;
      exports.configParseMsgPrices = configParseMsgPrices;
      exports.configParse28 = configParse28;
      exports.configParse29 = configParse29;
      exports.configParse31 = configParse31;
      exports.configParse44 = configParse44;
      exports.configParse45 = configParse45;
      exports.parseProposalSetup = parseProposalSetup;
      exports.parseVotingSetup = parseVotingSetup;
      exports.loadConfigParamById = loadConfigParamById;
      exports.loadConfigParamsAsSlice = loadConfigParamsAsSlice;
      exports.parseFullConfig = parseFullConfig;
      exports.parseFullerConfig = parseFullerConfig;
      var core_1 = require_dist2();
      function configParseMasterAddress(slice4) {
        if (slice4) {
          return new core_1.Address(-1, slice4.loadBuffer(32));
        } else {
          return null;
        }
      }
      function readPublicKey(slice4) {
        if (slice4.loadUint(32) !== 2390828938) {
          throw Error("Invalid publicKey");
        }
        return slice4.loadBuffer(32);
      }
      var ValidatorDescriptionDictValue = {
        serialize(src2, builder) {
          throw Error("not implemented");
        },
        parse(src2) {
          const header = src2.loadUint(8);
          if (header === 83) {
            return {
              publicKey: readPublicKey(src2),
              weight: src2.loadUintBig(64),
              adnlAddress: null
            };
          } else if (header === 115) {
            return {
              publicKey: readPublicKey(src2),
              weight: src2.loadUintBig(64),
              adnlAddress: src2.loadBuffer(32)
            };
          } else {
            throw Error("Invalid validator description dict");
          }
        }
      };
      function parseValidatorSet(slice4) {
        const header = slice4.loadUint(8);
        if (header === 17) {
          const timeSince = slice4.loadUint(32);
          const timeUntil = slice4.loadUint(32);
          const total = slice4.loadUint(16);
          const main = slice4.loadUint(16);
          const list = slice4.loadDictDirect(core_1.Dictionary.Keys.Uint(16), ValidatorDescriptionDictValue);
          return {
            timeSince,
            timeUntil,
            total,
            main,
            totalWeight: null,
            list
          };
        } else if (header === 18) {
          const timeSince = slice4.loadUint(32);
          const timeUntil = slice4.loadUint(32);
          const total = slice4.loadUint(16);
          const main = slice4.loadUint(16);
          const totalWeight = slice4.loadUintBig(64);
          const list = slice4.loadDict(core_1.Dictionary.Keys.Uint(16), ValidatorDescriptionDictValue);
          return {
            timeSince,
            timeUntil,
            total,
            main,
            totalWeight,
            list
          };
        }
        return null;
      }
      function parseBridge(slice4) {
        const bridgeAddress = new core_1.Address(-1, slice4.loadBuffer(32));
        const oracleMultisigAddress = new core_1.Address(-1, slice4.loadBuffer(32));
        const oraclesDict = slice4.loadDict(core_1.Dictionary.Keys.Buffer(32), core_1.Dictionary.Values.Buffer(32));
        const oracles = /* @__PURE__ */ new Map();
        for (const [local, remote] of oraclesDict) {
          oracles.set(new core_1.Address(-1, local).toString(), remote);
        }
        const externalChainAddress = slice4.loadBuffer(32);
        return {
          bridgeAddress,
          oracleMultisigAddress,
          oracles,
          externalChainAddress
        };
      }
      function configParseMasterAddressRequired(slice4) {
        if (!slice4) {
          throw Error("Invalid master address");
        }
        return configParseMasterAddress(slice4);
      }
      function configParse5(slice4) {
        if (!slice4) {
          throw Error("No config5 slice");
        }
        const magic = slice4.loadUint(8);
        if (magic === 1) {
          const blackholeAddr = slice4.loadBit() ? new core_1.Address(-1, slice4.loadBuffer(32)) : null;
          const feeBurnNominator = slice4.loadUint(32);
          const feeBurnDenominator = slice4.loadUint(32);
          return {
            blackholeAddr,
            feeBurnNominator,
            feeBurnDenominator
          };
        }
        throw new Error("Invalid config5");
      }
      function configParse6(slice4) {
        if (!slice4) {
          return null;
        }
        const mintNewPrice = slice4.loadCoins();
        const mintAddPrice = slice4.loadCoins();
        return {
          mintNewPrice,
          mintAddPrice
        };
      }
      function configParse7(slice4) {
        if (!slice4) {
          throw Error("No config7 slice");
        }
        return {
          toMint: (0, core_1.loadExtraCurrency)(slice4.loadRef())
        };
      }
      function configParse9(slice4) {
        if (!slice4) {
          throw Error("No config9 slice");
        }
        return new Set(slice4.loadDictDirect(core_1.Dictionary.Keys.Int(32), core_1.Dictionary.Values.Uint(0)).keys());
      }
      function configParse10(slice4) {
        if (!slice4) {
          throw Error("No config10 slice");
        }
        return new Set(slice4.loadDictDirect(core_1.Dictionary.Keys.Int(32), core_1.Dictionary.Values.Uint(0)).keys());
      }
      function configParse13(slice4) {
        if (!slice4) {
          throw Error("No config13 slice");
        }
        const magic = slice4.loadUint(8);
        if (magic !== 26) {
          throw new Error("Invalid config13");
        }
        const deposit = slice4.loadCoins();
        const bitPrice = slice4.loadCoins();
        const cellPrice = slice4.loadCoins();
        return {
          deposit,
          bitPrice,
          cellPrice
        };
      }
      function configParse14(slice4) {
        if (!slice4) {
          throw Error("No config14 slice");
        }
        const magic = slice4.loadUint(8);
        if (magic !== 107) {
          throw new Error("Invalid config14");
        }
        const masterchainBlockFee = slice4.loadCoins();
        const workchainBlockFee = slice4.loadCoins();
        return {
          masterchainBlockFee,
          workchainBlockFee
        };
      }
      function configParse15(slice4) {
        if (!slice4) {
          throw Error("No config15 slice");
        }
        const validatorsElectedFor = slice4.loadUint(32);
        const electorsStartBefore = slice4.loadUint(32);
        const electorsEndBefore = slice4.loadUint(32);
        const stakeHeldFor = slice4.loadUint(32);
        return {
          validatorsElectedFor,
          electorsStartBefore,
          electorsEndBefore,
          stakeHeldFor
        };
      }
      function configParse16(slice4) {
        if (!slice4) {
          throw Error("No config16 slice");
        }
        const maxValidators = slice4.loadUint(16);
        const maxMainValidators = slice4.loadUint(16);
        const minValidators = slice4.loadUint(16);
        return {
          maxValidators,
          maxMainValidators,
          minValidators
        };
      }
      function configParse17(slice4) {
        if (!slice4) {
          throw Error("No config17 slice");
        }
        const minStake = slice4.loadCoins();
        const maxStake = slice4.loadCoins();
        const minTotalStake = slice4.loadCoins();
        const maxStakeFactor = slice4.loadUint(32);
        return {
          minStake,
          maxStake,
          minTotalStake,
          maxStakeFactor
        };
      }
      var StoragePricesDictValue = {
        serialize(src2, builder) {
          throw Error("not implemented");
        },
        parse(src2) {
          const header = src2.loadUint(8);
          if (header !== 204) {
            throw Error("Invalid storage prices dict");
          }
          const utime_since = src2.loadUint(32);
          const bit_price_ps = src2.loadUintBig(64);
          const cell_price_ps = src2.loadUintBig(64);
          const mc_bit_price_ps = src2.loadUintBig(64);
          const mc_cell_price_ps = src2.loadUintBig(64);
          return {
            utime_since,
            bit_price_ps,
            cell_price_ps,
            mc_bit_price_ps,
            mc_cell_price_ps
          };
        }
      };
      function configParse18(slice4) {
        if (!slice4) {
          throw Error("No config18 slice");
        }
        return slice4.loadDictDirect(core_1.Dictionary.Keys.Buffer(4), StoragePricesDictValue).values();
      }
      function configParse8(slice4) {
        if (!slice4) {
          return {
            version: 0,
            capabilities: 0n
          };
        }
        const version16 = slice4.loadUint(32);
        const capabilities = slice4.loadUintBig(64);
        return {
          version: version16,
          capabilities
        };
      }
      function configParse40(slice4) {
        if (!slice4) {
          return null;
        }
        const header = slice4.loadUint(8);
        if (header !== 1) {
          throw Error("Invalid config40");
        }
        const defaultFlatFine = slice4.loadCoins();
        const defaultProportionaFine = slice4.loadCoins();
        const severityFlatMult = slice4.loadUint(16);
        const severityProportionalMult = slice4.loadUint(16);
        const unfunishableInterval = slice4.loadUint(16);
        const longInterval = slice4.loadUint(16);
        const longFlatMult = slice4.loadUint(16);
        const longProportionalMult = slice4.loadUint(16);
        const mediumInterval = slice4.loadUint(16);
        const mediumFlatMult = slice4.loadUint(16);
        const mediumProportionalMult = slice4.loadUint(16);
        return {
          defaultFlatFine,
          defaultProportionaFine,
          severityFlatMult,
          severityProportionalMult,
          unfunishableInterval,
          longInterval,
          longFlatMult,
          longProportionalMult,
          mediumInterval,
          mediumFlatMult,
          mediumProportionalMult
        };
      }
      function configParseWorkchainDescriptor(slice4) {
        const constructorTag = slice4.loadUint(8);
        if (!(constructorTag == 166 || constructorTag == 167)) {
          throw Error("Invalid workchain descriptor");
        }
        const enabledSince = slice4.loadUint(32);
        const actialMinSplit = slice4.loadUint(8);
        const min_split = slice4.loadUint(8);
        const max_split = slice4.loadUint(8);
        const basic = slice4.loadBit();
        const active = slice4.loadBit();
        const accept_msgs = slice4.loadBit();
        const flags = slice4.loadUint(13);
        const zerostateRootHash = slice4.loadBuffer(32);
        const zerostateFileHash = slice4.loadBuffer(32);
        const version16 = slice4.loadUint(32);
        if (!slice4.loadUint(4)) {
          throw Error("Not basic workchain descriptor");
        }
        const vmVersion = slice4.loadInt(32);
        const vmMode = slice4.loadUintBig(64);
        let extension = void 0;
        if (constructorTag == 167) {
          const splitMergeTimings = parseWorkchainSplitMergeTimings(slice4);
          const stateSplitDepth = slice4.loadUint(8);
          if (stateSplitDepth > 63) {
            throw RangeError(`Invalid persistent_state_split_depth: ${stateSplitDepth} expected <= 63`);
          }
          extension = {
            split_merge_timings: splitMergeTimings,
            persistent_state_split_depth: stateSplitDepth
          };
        }
        return {
          enabledSince,
          actialMinSplit,
          min_split,
          max_split,
          basic,
          active,
          accept_msgs,
          flags,
          zerostateRootHash,
          zerostateFileHash,
          version: version16,
          format: {
            vmVersion,
            vmMode
          },
          workchain_v2: extension
        };
      }
      function parseWorkchainSplitMergeTimings(slice4) {
        if (slice4.loadUint(4) !== 0) {
          throw Error(`Invalid WcSplitMergeTimings tag expected 0!`);
        }
        return {
          split_merge_delay: slice4.loadUint(32),
          split_merge_interval: slice4.loadUint(32),
          min_split_merge_interval: slice4.loadUint(32),
          max_split_merge_delay: slice4.loadUint(32)
        };
      }
      var WorkchainDescriptorDictValue = {
        serialize(src2, builder) {
          throw Error("not implemented");
        },
        parse(src2) {
          return configParseWorkchainDescriptor(src2);
        }
      };
      function configParse12(slice4) {
        if (!slice4) {
          throw Error("No config12 slice");
        }
        const wd = slice4.loadDict(core_1.Dictionary.Keys.Uint(32), WorkchainDescriptorDictValue);
        if (wd) {
          return wd;
        }
        throw Error("No workchains exist");
      }
      function configParseValidatorSet(slice4) {
        if (!slice4) {
          return null;
        }
        return parseValidatorSet(slice4);
      }
      function configParseBridge(slice4) {
        if (!slice4) {
          return null;
        }
        return parseBridge(slice4);
      }
      function loadJettonBridgeParams(slice4) {
        if (!slice4) {
          return null;
        }
        const magic = slice4.loadUint(8);
        if (magic === 0) {
          const bridgeAddress = new core_1.Address(-1, slice4.loadBuffer(32));
          const oracleAddress = new core_1.Address(-1, slice4.loadBuffer(32));
          const oraclesRaw = slice4.loadDict(core_1.Dictionary.Keys.Buffer(32), core_1.Dictionary.Values.Buffer(32));
          const oracles = [...oraclesRaw].map((e2) => ({
            addr: new core_1.Address(-1, e2[0]),
            pubkey: e2[1]
          }));
          const flags = slice4.loadUint(8);
          const bridgeBurnFee = slice4.loadCoins();
          return {
            bridgeAddress,
            oracleAddress,
            oracles,
            flags,
            bridgeBurnFee
          };
        }
        if (magic === 1) {
          const bridgeAddress = new core_1.Address(-1, slice4.loadBuffer(32));
          const oracleAddress = new core_1.Address(-1, slice4.loadBuffer(32));
          const oraclesRaw = slice4.loadDict(core_1.Dictionary.Keys.Buffer(32), core_1.Dictionary.Values.Buffer(32));
          const oracles = [...oraclesRaw].map((e2) => ({
            addr: new core_1.Address(-1, e2[0]),
            pubkey: e2[1]
          }));
          const flags = slice4.loadUint(8);
          const pricesRef = slice4.loadRef().beginParse();
          const bridgeBurnFee = pricesRef.loadCoins();
          const bridgeMintFee = pricesRef.loadCoins();
          const walletMinTonsForStorage = pricesRef.loadCoins();
          const walletGasConsumption = pricesRef.loadCoins();
          const minterMinTonsForStorage = pricesRef.loadCoins();
          const discoverGasConsumption = pricesRef.loadCoins();
          const externalChainAddress = slice4.loadBuffer(32);
          return {
            bridgeAddress,
            oracleAddress,
            oracles,
            flags,
            jettonBridgePrices: {
              bridgeBurnFee,
              bridgeMintFee,
              walletMinTonsForStorage,
              walletGasConsumption,
              minterMinTonsForStorage,
              discoverGasConsumption
            },
            externalChainAddress
          };
        }
        throw new Error("Invalid msg prices param");
      }
      function parseGasLimitsInternal(slice4) {
        const tag = slice4.loadUint(8);
        if (tag === 222) {
          const gasPrice = slice4.loadUintBig(64);
          const gasLimit = slice4.loadUintBig(64);
          const specialGasLimit = slice4.loadUintBig(64);
          const gasCredit = slice4.loadUintBig(64);
          const blockGasLimit = slice4.loadUintBig(64);
          const freezeDueLimit = slice4.loadUintBig(64);
          const deleteDueLimit = slice4.loadUintBig(64);
          return {
            gasPrice,
            gasLimit,
            specialGasLimit,
            gasCredit,
            blockGasLimit,
            freezeDueLimit,
            deleteDueLimit
          };
        } else if (tag === 221) {
          const gasPrice = slice4.loadUintBig(64);
          const gasLimit = slice4.loadUintBig(64);
          const gasCredit = slice4.loadUintBig(64);
          const blockGasLimit = slice4.loadUintBig(64);
          const freezeDueLimit = slice4.loadUintBig(64);
          const deleteDueLimit = slice4.loadUintBig(64);
          return {
            gasPrice,
            gasLimit,
            gasCredit,
            blockGasLimit,
            freezeDueLimit,
            deleteDueLimit
          };
        } else {
          throw Error("Invalid gas limits internal");
        }
      }
      function configParseGasLimitsPrices(slice4) {
        if (!slice4) {
          throw Error("No gas limits slice");
        }
        const tag = slice4.loadUint(8);
        if (tag === 209) {
          const flatLimit = slice4.loadUintBig(64);
          const flatGasPrice = slice4.loadUintBig(64);
          const other = parseGasLimitsInternal(slice4);
          return {
            flatLimit,
            flatGasPrice,
            other
          };
        } else {
          throw Error("Invalid gas limits");
        }
      }
      function configParseLimitParams(slice4) {
        const paramsLimitTag = slice4.loadUint(8);
        if (paramsLimitTag !== 195) {
          throw Error("Invalid params limit slice");
        }
        const underload = slice4.loadUint(32);
        const softLimit = slice4.loadUint(32);
        const hardLimit = slice4.loadUint(32);
        if (underload > softLimit || softLimit > hardLimit) {
          throw Error("Incosistent limitParams");
        }
        return {
          underload,
          softLimit,
          hardLimit
        };
      }
      function configParseBlockLimits(slice4) {
        if (!slice4) {
          throw Error("No block limits slice");
        }
        const blockLimitTag = slice4.loadUint(8);
        if (blockLimitTag === 93) {
          const bytes = configParseLimitParams(slice4);
          const gas = configParseLimitParams(slice4);
          const ltDelta = configParseLimitParams(slice4);
          return {
            bytes,
            gas,
            ltDelta
          };
        }
        if (blockLimitTag === 94) {
          const bytes = configParseLimitParams(slice4);
          const gas = configParseLimitParams(slice4);
          const ltDelta = configParseLimitParams(slice4);
          const collatedData = configParseLimitParams(slice4);
          const importedMsgQueueTag = slice4.loadUint(8);
          if (importedMsgQueueTag !== 211) {
            throw Error("Invalid importedMsgQueue");
          }
          const maxBytes = slice4.loadUint(32);
          const maxMsgs = slice4.loadUint(32);
          return {
            bytes,
            gas,
            ltDelta,
            collatedData,
            importedMsgQueue: {
              maxBytes,
              maxMsgs
            }
          };
        }
        throw Error("Invalid block limits");
      }
      function configParseMsgPrices(slice4) {
        if (!slice4) {
          throw new Error("No msg prices slice");
        }
        const magic = slice4.loadUint(8);
        if (magic !== 234) {
          throw new Error("Invalid msg prices param");
        }
        return {
          lumpPrice: slice4.loadUintBig(64),
          bitPrice: slice4.loadUintBig(64),
          cellPrice: slice4.loadUintBig(64),
          ihrPriceFactor: slice4.loadUint(32),
          firstFrac: slice4.loadUint(16),
          nextFrac: slice4.loadUint(16)
        };
      }
      function configParse28(slice4) {
        if (!slice4) {
          throw new Error("No config28 slice");
        }
        const magic = slice4.loadUint(8);
        if (magic === 193) {
          const masterCatchainLifetime = slice4.loadUint(32);
          const shardCatchainLifetime = slice4.loadUint(32);
          const shardValidatorsLifetime = slice4.loadUint(32);
          const shardValidatorsCount = slice4.loadUint(32);
          return {
            masterCatchainLifetime,
            shardCatchainLifetime,
            shardValidatorsLifetime,
            shardValidatorsCount
          };
        }
        if (magic === 194) {
          const flags = slice4.loadUint(7);
          const suffleMasterValidators = slice4.loadBit();
          const masterCatchainLifetime = slice4.loadUint(32);
          const shardCatchainLifetime = slice4.loadUint(32);
          const shardValidatorsLifetime = slice4.loadUint(32);
          const shardValidatorsCount = slice4.loadUint(32);
          return {
            flags,
            suffleMasterValidators,
            masterCatchainLifetime,
            shardCatchainLifetime,
            shardValidatorsLifetime,
            shardValidatorsCount
          };
        }
        throw new Error("Invalid config28");
      }
      function configParse29(slice4) {
        if (!slice4) {
          throw new Error("No config29 slice");
        }
        const magic = slice4.loadUint(8);
        if (magic === 214) {
          const roundCandidates = slice4.loadUint(32);
          const nextCandidateDelay = slice4.loadUint(32);
          const consensusTimeout = slice4.loadUint(32);
          const fastAttempts = slice4.loadUint(32);
          const attemptDuration = slice4.loadUint(32);
          const catchainMaxDeps = slice4.loadUint(32);
          const maxBlockBytes = slice4.loadUint(32);
          const maxColaltedBytes = slice4.loadUint(32);
          return {
            roundCandidates,
            nextCandidateDelay,
            consensusTimeout,
            fastAttempts,
            attemptDuration,
            catchainMaxDeps,
            maxBlockBytes,
            maxColaltedBytes
          };
        } else if (magic === 215) {
          const flags = slice4.loadUint(7);
          const newCatchainIds = slice4.loadBit();
          const roundCandidates = slice4.loadUint(8);
          const nextCandidateDelay = slice4.loadUint(32);
          const consensusTimeout = slice4.loadUint(32);
          const fastAttempts = slice4.loadUint(32);
          const attemptDuration = slice4.loadUint(32);
          const catchainMaxDeps = slice4.loadUint(32);
          const maxBlockBytes = slice4.loadUint(32);
          const maxColaltedBytes = slice4.loadUint(32);
          return {
            flags,
            newCatchainIds,
            roundCandidates,
            nextCandidateDelay,
            consensusTimeout,
            fastAttempts,
            attemptDuration,
            catchainMaxDeps,
            maxBlockBytes,
            maxColaltedBytes
          };
        } else if (magic === 216) {
          const flags = slice4.loadUint(7);
          const newCatchainIds = slice4.loadBit();
          const roundCandidates = slice4.loadUint(8);
          const nextCandidateDelay = slice4.loadUint(32);
          const consensusTimeout = slice4.loadUint(32);
          const fastAttempts = slice4.loadUint(32);
          const attemptDuration = slice4.loadUint(32);
          const catchainMaxDeps = slice4.loadUint(32);
          const maxBlockBytes = slice4.loadUint(32);
          const maxColaltedBytes = slice4.loadUint(32);
          const protoVersion = slice4.loadUint(16);
          return {
            flags,
            newCatchainIds,
            roundCandidates,
            nextCandidateDelay,
            consensusTimeout,
            fastAttempts,
            attemptDuration,
            catchainMaxDeps,
            maxBlockBytes,
            maxColaltedBytes,
            protoVersion
          };
        } else if (magic === 217) {
          const flags = slice4.loadUint(7);
          const newCatchainIds = slice4.loadBit();
          const roundCandidates = slice4.loadUint(8);
          const nextCandidateDelay = slice4.loadUint(32);
          const consensusTimeout = slice4.loadUint(32);
          const fastAttempts = slice4.loadUint(32);
          const attemptDuration = slice4.loadUint(32);
          const catchainMaxDeps = slice4.loadUint(32);
          const maxBlockBytes = slice4.loadUint(32);
          const maxColaltedBytes = slice4.loadUint(32);
          const protoVersion = slice4.loadUint(16);
          const catchainMaxBlocksCoeff = slice4.loadUint(32);
          return {
            flags,
            newCatchainIds,
            roundCandidates,
            nextCandidateDelay,
            consensusTimeout,
            fastAttempts,
            attemptDuration,
            catchainMaxDeps,
            maxBlockBytes,
            maxColaltedBytes,
            protoVersion,
            catchainMaxBlocksCoeff
          };
        }
        throw new Error("Invalid config29");
      }
      function configParse31(slice4) {
        if (!slice4) {
          throw Error("No config31 slice");
        }
        const rawAddrsDict = slice4.loadDict(core_1.Dictionary.Keys.Buffer(32), core_1.Dictionary.Values.Uint(0));
        return [...rawAddrsDict].map((e2) => new core_1.Address(-1, e2[0]));
      }
      function configParse44(slice4) {
        if (!slice4) {
          throw Error("No config44 slice");
        }
        const magic = slice4.loadUint(8);
        if (magic !== 0) {
          throw new Error("Invalid config44");
        }
        const rawAddrsDict = slice4.loadDict(core_1.Dictionary.Keys.Buffer(36), core_1.Dictionary.Values.Uint(0));
        const suspendedUntil = slice4.loadUint(32);
        const constructedAddrs = [...rawAddrsDict].map((e2) => new core_1.Address(e2[0].readInt32BE(), e2[0].subarray(4)));
        return {
          addresses: constructedAddrs,
          suspendedUntil
        };
      }
      var PrecompiledContractsDictValue = {
        serialize: () => {
          throw Error("not implemented");
        },
        parse: (src2) => {
          const tag = src2.loadUint(8);
          if (tag !== 176) {
            throw new Error("Invalid precompiled contracts dict");
          }
          return src2.loadUintBig(64);
        }
      };
      function configParse45(slice4) {
        if (!slice4) {
          throw Error("No config45 slice");
        }
        const magic = slice4.loadUint(8);
        if (magic !== 192) {
          throw new Error("Invalid config45");
        }
        const precompiledContracts = slice4.loadDict(core_1.Dictionary.Keys.Buffer(32), PrecompiledContractsDictValue);
        return [...precompiledContracts].map((e2) => ({
          hash: e2[0],
          gasUsed: e2[1]
        }));
      }
      function parseProposalSetup(slice4) {
        const magic = slice4.loadUint(8);
        if (magic !== 54) {
          throw new Error("Invalid proposal setup");
        }
        const minTotalRounds = slice4.loadUint(8);
        const maxTotalRounds = slice4.loadUint(8);
        const minWins = slice4.loadUint(8);
        const maxLoses = slice4.loadUint(8);
        const minStoreSec = slice4.loadUint(32);
        const maxStoreSec = slice4.loadUint(32);
        const bitPrice = slice4.loadUint(32);
        const cellPrice = slice4.loadUint(32);
        return {
          minTotalRounds,
          maxTotalRounds,
          minWins,
          maxLoses,
          minStoreSec,
          maxStoreSec,
          bitPrice,
          cellPrice
        };
      }
      function parseVotingSetup(slice4) {
        if (!slice4) {
          throw new Error("No voting setup");
        }
        const magic = slice4.loadUint(8);
        if (magic !== 145) {
          throw new Error("Invalid voting setup");
        }
        const normalParams = parseProposalSetup(slice4.loadRef().beginParse());
        const criticalParams = parseProposalSetup(slice4.loadRef().beginParse());
        return { normalParams, criticalParams };
      }
      function loadConfigParams(configBase64) {
        const comfigMap = core_1.Cell.fromBase64(configBase64).beginParse().loadDictDirect(core_1.Dictionary.Keys.Int(32), core_1.Dictionary.Values.Cell());
        return comfigMap;
      }
      function loadConfigParamById(configBase64, id) {
        return loadConfigParams(configBase64).get(id);
      }
      function loadConfigParamsAsSlice(configBase64) {
        const pramsAsCells = loadConfigParams(configBase64);
        const params = /* @__PURE__ */ new Map();
        for (const [key2, value] of pramsAsCells) {
          params.set(key2, value.beginParse());
        }
        return params;
      }
      function parseFullConfig(configs) {
        return {
          configAddress: configParseMasterAddressRequired(configs.get(0)),
          electorAddress: configParseMasterAddressRequired(configs.get(1)),
          minterAddress: configParseMasterAddress(configs.get(2)),
          feeCollectorAddress: configParseMasterAddress(configs.get(3)),
          dnsRootAddress: configParseMasterAddress(configs.get(4)),
          burningConfig: configParse5(configs.get(5)),
          globalVersion: configParse8(configs.get(8)),
          workchains: configParse12(configs.get(12)),
          voting: parseVotingSetup(configs.get(11)),
          validators: {
            ...configParse15(configs.get(15)),
            ...configParse16(configs.get(16)),
            ...configParse17(configs.get(17))
          },
          storagePrices: configParse18(configs.get(18)),
          gasPrices: {
            masterchain: configParseGasLimitsPrices(configs.get(20)),
            workchain: configParseGasLimitsPrices(configs.get(21))
          },
          msgPrices: {
            masterchain: configParseMsgPrices(configs.get(24)),
            workchain: configParseMsgPrices(configs.get(25))
          },
          validatorSets: {
            prevValidators: configParseValidatorSet(configs.get(32)),
            prevTempValidators: configParseValidatorSet(configs.get(33)),
            currentValidators: configParseValidatorSet(configs.get(34)),
            currentTempValidators: configParseValidatorSet(configs.get(35)),
            nextValidators: configParseValidatorSet(configs.get(36)),
            nextTempValidators: configParseValidatorSet(configs.get(37))
          },
          validatorsPunish: configParse40(configs.get(40)),
          bridges: {
            ethereum: configParseBridge(configs.get(71)),
            binance: configParseBridge(configs.get(72)),
            polygon: configParseBridge(configs.get(73))
          },
          catchain: configParse28(configs.get(28)),
          consensus: configParse29(configs.get(29))
        };
      }
      function parseFullerConfig(configs) {
        return {
          configAddress: configParseMasterAddressRequired(configs.get(0)),
          electorAddress: configParseMasterAddressRequired(configs.get(1)),
          minterAddress: configParseMasterAddress(configs.get(2)),
          feeCollectorAddress: configParseMasterAddress(configs.get(3)),
          dnsRootAddress: configParseMasterAddress(configs.get(4)),
          burningConfig: configParse5(configs.get(5)),
          extraCurrenciesMintPrices: configParse6(configs.get(6)),
          extraCurrencies: configParse7(configs.get(7)),
          globalVersion: configParse8(configs.get(8)),
          configMandatoryParams: configParse9(configs.get(9)),
          configCriticalParams: configParse10(configs.get(10)),
          voting: parseVotingSetup(configs.get(11)),
          workchains: configParse12(configs.get(12)),
          complaintCost: configParse13(configs.get(13)),
          blockCreationRewards: configParse14(configs.get(14)),
          validators: {
            ...configParse15(configs.get(15)),
            ...configParse16(configs.get(16)),
            ...configParse17(configs.get(17))
          },
          storagePrices: configParse18(configs.get(18)),
          gasPrices: {
            masterchain: configParseGasLimitsPrices(configs.get(20)),
            workchain: configParseGasLimitsPrices(configs.get(21))
          },
          blockLimits: {
            masterchain: configParseBlockLimits(configs.get(22)),
            workchain: configParseBlockLimits(configs.get(23))
          },
          msgPrices: {
            masterchain: configParseMsgPrices(configs.get(24)),
            workchain: configParseMsgPrices(configs.get(25))
          },
          catchain: configParse28(configs.get(28)),
          consensus: configParse29(configs.get(29)),
          fundamentalSmcAddr: configParse31(configs.get(31)),
          validatorSets: {
            prevValidators: configParseValidatorSet(configs.get(32)),
            prevTempValidators: configParseValidatorSet(configs.get(33)),
            currentValidators: configParseValidatorSet(configs.get(34)),
            currentTempValidators: configParseValidatorSet(configs.get(35)),
            nextValidators: configParseValidatorSet(configs.get(36)),
            nextTempValidators: configParseValidatorSet(configs.get(37))
          },
          validatorsPunish: configParse40(configs.get(40)),
          suspended: configParse44(configs.get(44)),
          precompiledContracts: configParse45(configs.get(45)),
          bridges: {
            ethereum: configParseBridge(configs.get(71)),
            binance: configParseBridge(configs.get(72)),
            polygon: configParseBridge(configs.get(73))
          },
          tokenBridges: {
            ethereum: loadJettonBridgeParams(configs.get(79)),
            binance: loadJettonBridgeParams(configs.get(81)),
            polygon: loadJettonBridgeParams(configs.get(82))
          }
        };
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/utils/fees.js
  var require_fees = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/utils/fees.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.computeStorageFees = computeStorageFees;
      exports.computeFwdFees = computeFwdFees;
      exports.computeGasPrices = computeGasPrices;
      exports.computeExternalMessageFees = computeExternalMessageFees;
      exports.computeMessageForwardFees = computeMessageForwardFees;
      var core_1 = require_dist2();
      function computeStorageFees(data) {
        const { lastPaid, now, storagePrices, storageStat, special, masterchain } = data;
        if (now <= lastPaid || storagePrices.length === 0 || now < storagePrices[0].utime_since || special) {
          return BigInt(0);
        }
        let upto = Math.max(lastPaid, storagePrices[0].utime_since);
        let total = BigInt(0);
        for (let i5 = 0; i5 < storagePrices.length && upto < now; i5++) {
          let valid_until = i5 < storagePrices.length - 1 ? Math.min(now, storagePrices[i5 + 1].utime_since) : now;
          let payment = BigInt(0);
          if (upto < valid_until) {
            let delta = valid_until - upto;
            payment += BigInt(storageStat.cells) * (masterchain ? storagePrices[i5].mc_cell_price_ps : storagePrices[i5].cell_price_ps);
            payment += BigInt(storageStat.bits) * (masterchain ? storagePrices[i5].mc_bit_price_ps : storagePrices[i5].bit_price_ps);
            payment = payment * BigInt(delta);
          }
          upto = valid_until;
          total += payment;
        }
        return shr16ceil(total);
      }
      function computeFwdFees(msgPrices, cells, bits) {
        return msgPrices.lumpPrice + shr16ceil(msgPrices.bitPrice * bits + msgPrices.cellPrice * cells);
      }
      function computeGasPrices(gasUsed, prices) {
        if (gasUsed <= prices.flatLimit) {
          return prices.flatPrice;
        } else {
          return prices.flatPrice + (prices.price * (gasUsed - prices.flatLimit) >> 16n);
        }
      }
      function computeExternalMessageFees(msgPrices, cell) {
        let storageStats = collectCellStats(cell);
        storageStats.bits -= cell.bits.length;
        storageStats.cells -= 1;
        return computeFwdFees(msgPrices, BigInt(storageStats.cells), BigInt(storageStats.bits));
      }
      function computeMessageForwardFees(msgPrices, cell) {
        let msg = (0, core_1.loadMessageRelaxed)(cell.beginParse());
        let storageStats = { bits: 0, cells: 0 };
        if (msg.init) {
          const rawBuilder = new core_1.Cell().asBuilder();
          (0, core_1.storeStateInit)(msg.init)(rawBuilder);
          const raw = rawBuilder.endCell();
          let c7 = collectCellStats(raw);
          c7.bits -= raw.bits.length;
          c7.cells -= 1;
          storageStats.bits += c7.bits;
          storageStats.cells += c7.cells;
        }
        let bc = collectCellStats(msg.body);
        bc.bits -= msg.body.bits.length;
        bc.cells -= 1;
        storageStats.bits += bc.bits;
        storageStats.cells += bc.cells;
        let fees = computeFwdFees(msgPrices, BigInt(storageStats.cells), BigInt(storageStats.bits));
        let res = fees * BigInt(msgPrices.firstFrac) >> 16n;
        let remaining = fees - res;
        return { fees: res, remaining };
      }
      function collectCellStats(cell) {
        let bits = cell.bits.length;
        let cells = 1;
        for (let ref of cell.refs) {
          let r3 = collectCellStats(ref);
          cells += r3.cells;
          bits += r3.bits;
        }
        return { bits, cells };
      }
      function shr16ceil(src2) {
        let rem = src2 % 65536n;
        let res = src2 >> 16n;
        if (rem !== 0n) {
          res += 1n;
        }
        return res;
      }
    }
  });

  // ../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/index.js
  var require_dist3 = __commonJS({
    "../../node_modules/.pnpm/@ton+ton@16.3.0_@ton+core@0_d1a994d5bf1b7d98e23ee1c703e329ac/node_modules/@ton/ton/dist/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        var desc = Object.getOwnPropertyDescriptor(m3, k7);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k7];
          } };
        }
        Object.defineProperty(o5, k22, desc);
      }) : (function(o5, m3, k7, k22) {
        if (k22 === void 0) k22 = k7;
        o5[k22] = m3[k7];
      }));
      var __exportStar2 = exports && exports.__exportStar || function(m3, exports2) {
        for (var p7 in m3) if (p7 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p7)) __createBinding2(exports2, m3, p7);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.computeStorageFees = exports.computeMessageForwardFees = exports.computeGasPrices = exports.computeFwdFees = exports.computeExternalMessageFees = exports.loadConfigParamsAsSlice = exports.loadConfigParamById = exports.parseFullerConfig = exports.parseFullConfig = exports.parseVotingSetup = exports.parseValidatorSet = exports.parseProposalSetup = exports.parseBridge = exports.configParseWorkchainDescriptor = exports.configParseValidatorSet = exports.configParseMsgPrices = exports.configParseMasterAddressRequired = exports.configParseMasterAddress = exports.configParseGasLimitsPrices = exports.configParseBridge = exports.configParse40 = exports.configParse29 = exports.configParse28 = exports.configParse18 = exports.configParse17 = exports.configParse16 = exports.configParse15 = exports.configParse13 = exports.configParse12 = exports.configParse8 = exports.configParse5 = exports.ElectorContract = exports.MultisigWallet = exports.MultisigOrderBuilder = exports.MultisigOrder = exports.JettonWallet = exports.JettonMaster = exports.WalletContractV5R1 = exports.WalletContractV5Beta = exports.WalletContractV4 = exports.WalletContractV3R2 = exports.WalletContractV3R1 = exports.WalletContractV2R2 = exports.WalletContractV2R1 = exports.WalletContractV1R3 = exports.WalletContractV1R2 = exports.WalletContractV1R1 = exports.TonClient4 = exports.TonClient = exports.HttpApi = void 0;
      __exportStar2(require_dist2(), exports);
      var HttpApi_1 = require_HttpApi();
      Object.defineProperty(exports, "HttpApi", { enumerable: true, get: function() {
        return HttpApi_1.HttpApi;
      } });
      var TonClient_1 = require_TonClient();
      Object.defineProperty(exports, "TonClient", { enumerable: true, get: function() {
        return TonClient_1.TonClient;
      } });
      var TonClient4_1 = require_TonClient4();
      Object.defineProperty(exports, "TonClient4", { enumerable: true, get: function() {
        return TonClient4_1.TonClient4;
      } });
      var WalletContractV1R1_1 = require_WalletContractV1R1();
      Object.defineProperty(exports, "WalletContractV1R1", { enumerable: true, get: function() {
        return WalletContractV1R1_1.WalletContractV1R1;
      } });
      var WalletContractV1R2_1 = require_WalletContractV1R2();
      Object.defineProperty(exports, "WalletContractV1R2", { enumerable: true, get: function() {
        return WalletContractV1R2_1.WalletContractV1R2;
      } });
      var WalletContractV1R3_1 = require_WalletContractV1R3();
      Object.defineProperty(exports, "WalletContractV1R3", { enumerable: true, get: function() {
        return WalletContractV1R3_1.WalletContractV1R3;
      } });
      var WalletContractV2R1_1 = require_WalletContractV2R1();
      Object.defineProperty(exports, "WalletContractV2R1", { enumerable: true, get: function() {
        return WalletContractV2R1_1.WalletContractV2R1;
      } });
      var WalletContractV2R2_1 = require_WalletContractV2R2();
      Object.defineProperty(exports, "WalletContractV2R2", { enumerable: true, get: function() {
        return WalletContractV2R2_1.WalletContractV2R2;
      } });
      var WalletContractV3R1_1 = require_WalletContractV3R1();
      Object.defineProperty(exports, "WalletContractV3R1", { enumerable: true, get: function() {
        return WalletContractV3R1_1.WalletContractV3R1;
      } });
      var WalletContractV3R2_1 = require_WalletContractV3R2();
      Object.defineProperty(exports, "WalletContractV3R2", { enumerable: true, get: function() {
        return WalletContractV3R2_1.WalletContractV3R2;
      } });
      var WalletContractV4_1 = require_WalletContractV42();
      Object.defineProperty(exports, "WalletContractV4", { enumerable: true, get: function() {
        return WalletContractV4_1.WalletContractV4;
      } });
      var WalletContractV5Beta_1 = require_WalletContractV5Beta2();
      Object.defineProperty(exports, "WalletContractV5Beta", { enumerable: true, get: function() {
        return WalletContractV5Beta_1.WalletContractV5Beta;
      } });
      var WalletContractV5R1_1 = require_WalletContractV5R12();
      Object.defineProperty(exports, "WalletContractV5R1", { enumerable: true, get: function() {
        return WalletContractV5R1_1.WalletContractV5R1;
      } });
      var JettonMaster_1 = require_JettonMaster();
      Object.defineProperty(exports, "JettonMaster", { enumerable: true, get: function() {
        return JettonMaster_1.JettonMaster;
      } });
      var JettonWallet_1 = require_JettonWallet();
      Object.defineProperty(exports, "JettonWallet", { enumerable: true, get: function() {
        return JettonWallet_1.JettonWallet;
      } });
      var MultisigOrder_1 = require_MultisigOrder();
      Object.defineProperty(exports, "MultisigOrder", { enumerable: true, get: function() {
        return MultisigOrder_1.MultisigOrder;
      } });
      var MultisigOrderBuilder_1 = require_MultisigOrderBuilder();
      Object.defineProperty(exports, "MultisigOrderBuilder", { enumerable: true, get: function() {
        return MultisigOrderBuilder_1.MultisigOrderBuilder;
      } });
      var MultisigWallet_1 = require_MultisigWallet();
      Object.defineProperty(exports, "MultisigWallet", { enumerable: true, get: function() {
        return MultisigWallet_1.MultisigWallet;
      } });
      var ElectorContract_1 = require_ElectorContract();
      Object.defineProperty(exports, "ElectorContract", { enumerable: true, get: function() {
        return ElectorContract_1.ElectorContract;
      } });
      var ConfigParser_1 = require_ConfigParser();
      Object.defineProperty(exports, "configParse5", { enumerable: true, get: function() {
        return ConfigParser_1.configParse5;
      } });
      Object.defineProperty(exports, "configParse8", { enumerable: true, get: function() {
        return ConfigParser_1.configParse8;
      } });
      Object.defineProperty(exports, "configParse12", { enumerable: true, get: function() {
        return ConfigParser_1.configParse12;
      } });
      Object.defineProperty(exports, "configParse13", { enumerable: true, get: function() {
        return ConfigParser_1.configParse13;
      } });
      Object.defineProperty(exports, "configParse15", { enumerable: true, get: function() {
        return ConfigParser_1.configParse15;
      } });
      Object.defineProperty(exports, "configParse16", { enumerable: true, get: function() {
        return ConfigParser_1.configParse16;
      } });
      Object.defineProperty(exports, "configParse17", { enumerable: true, get: function() {
        return ConfigParser_1.configParse17;
      } });
      Object.defineProperty(exports, "configParse18", { enumerable: true, get: function() {
        return ConfigParser_1.configParse18;
      } });
      Object.defineProperty(exports, "configParse28", { enumerable: true, get: function() {
        return ConfigParser_1.configParse28;
      } });
      Object.defineProperty(exports, "configParse29", { enumerable: true, get: function() {
        return ConfigParser_1.configParse29;
      } });
      Object.defineProperty(exports, "configParse40", { enumerable: true, get: function() {
        return ConfigParser_1.configParse40;
      } });
      Object.defineProperty(exports, "configParseBridge", { enumerable: true, get: function() {
        return ConfigParser_1.configParseBridge;
      } });
      Object.defineProperty(exports, "configParseGasLimitsPrices", { enumerable: true, get: function() {
        return ConfigParser_1.configParseGasLimitsPrices;
      } });
      Object.defineProperty(exports, "configParseMasterAddress", { enumerable: true, get: function() {
        return ConfigParser_1.configParseMasterAddress;
      } });
      Object.defineProperty(exports, "configParseMasterAddressRequired", { enumerable: true, get: function() {
        return ConfigParser_1.configParseMasterAddressRequired;
      } });
      Object.defineProperty(exports, "configParseMsgPrices", { enumerable: true, get: function() {
        return ConfigParser_1.configParseMsgPrices;
      } });
      Object.defineProperty(exports, "configParseValidatorSet", { enumerable: true, get: function() {
        return ConfigParser_1.configParseValidatorSet;
      } });
      Object.defineProperty(exports, "configParseWorkchainDescriptor", { enumerable: true, get: function() {
        return ConfigParser_1.configParseWorkchainDescriptor;
      } });
      Object.defineProperty(exports, "parseBridge", { enumerable: true, get: function() {
        return ConfigParser_1.parseBridge;
      } });
      Object.defineProperty(exports, "parseProposalSetup", { enumerable: true, get: function() {
        return ConfigParser_1.parseProposalSetup;
      } });
      Object.defineProperty(exports, "parseValidatorSet", { enumerable: true, get: function() {
        return ConfigParser_1.parseValidatorSet;
      } });
      Object.defineProperty(exports, "parseVotingSetup", { enumerable: true, get: function() {
        return ConfigParser_1.parseVotingSetup;
      } });
      Object.defineProperty(exports, "parseFullConfig", { enumerable: true, get: function() {
        return ConfigParser_1.parseFullConfig;
      } });
      Object.defineProperty(exports, "parseFullerConfig", { enumerable: true, get: function() {
        return ConfigParser_1.parseFullerConfig;
      } });
      Object.defineProperty(exports, "loadConfigParamById", { enumerable: true, get: function() {
        return ConfigParser_1.loadConfigParamById;
      } });
      Object.defineProperty(exports, "loadConfigParamsAsSlice", { enumerable: true, get: function() {
        return ConfigParser_1.loadConfigParamsAsSlice;
      } });
      var fees_1 = require_fees();
      Object.defineProperty(exports, "computeExternalMessageFees", { enumerable: true, get: function() {
        return fees_1.computeExternalMessageFees;
      } });
      Object.defineProperty(exports, "computeFwdFees", { enumerable: true, get: function() {
        return fees_1.computeFwdFees;
      } });
      Object.defineProperty(exports, "computeGasPrices", { enumerable: true, get: function() {
        return fees_1.computeGasPrices;
      } });
      Object.defineProperty(exports, "computeMessageForwardFees", { enumerable: true, get: function() {
        return fees_1.computeMessageForwardFees;
      } });
      Object.defineProperty(exports, "computeStorageFees", { enumerable: true, get: function() {
        return fees_1.computeStorageFees;
      } });
    }
  });

  // ../../node_modules/.pnpm/events@3.3.0/node_modules/events/events.js
  var require_events = __commonJS({
    "../../node_modules/.pnpm/events@3.3.0/node_modules/events/events.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var R6 = typeof Reflect === "object" ? Reflect : null;
      var ReflectApply = R6 && typeof R6.apply === "function" ? R6.apply : function ReflectApply2(target, receiver, args) {
        return Function.prototype.apply.call(target, receiver, args);
      };
      var ReflectOwnKeys;
      if (R6 && typeof R6.ownKeys === "function") {
        ReflectOwnKeys = R6.ownKeys;
      } else if (Object.getOwnPropertySymbols) {
        ReflectOwnKeys = function ReflectOwnKeys2(target) {
          return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
        };
      } else {
        ReflectOwnKeys = function ReflectOwnKeys2(target) {
          return Object.getOwnPropertyNames(target);
        };
      }
      function ProcessEmitWarning(warning) {
        if (console && console.warn) console.warn(warning);
      }
      var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
        return value !== value;
      };
      function EventEmitter2() {
        EventEmitter2.init.call(this);
      }
      module.exports = EventEmitter2;
      module.exports.once = once;
      EventEmitter2.EventEmitter = EventEmitter2;
      EventEmitter2.prototype._events = void 0;
      EventEmitter2.prototype._eventsCount = 0;
      EventEmitter2.prototype._maxListeners = void 0;
      var defaultMaxListeners = 10;
      function checkListener(listener) {
        if (typeof listener !== "function") {
          throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
        }
      }
      Object.defineProperty(EventEmitter2, "defaultMaxListeners", {
        enumerable: true,
        get: function() {
          return defaultMaxListeners;
        },
        set: function(arg) {
          if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
            throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
          }
          defaultMaxListeners = arg;
        }
      });
      EventEmitter2.init = function() {
        if (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;
      };
      EventEmitter2.prototype.setMaxListeners = function setMaxListeners(n6) {
        if (typeof n6 !== "number" || n6 < 0 || NumberIsNaN(n6)) {
          throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n6 + ".");
        }
        this._maxListeners = n6;
        return this;
      };
      function _getMaxListeners(that) {
        if (that._maxListeners === void 0)
          return EventEmitter2.defaultMaxListeners;
        return that._maxListeners;
      }
      EventEmitter2.prototype.getMaxListeners = function getMaxListeners() {
        return _getMaxListeners(this);
      };
      EventEmitter2.prototype.emit = function emit(type2) {
        var args = [];
        for (var i5 = 1; i5 < arguments.length; i5++) args.push(arguments[i5]);
        var doError = type2 === "error";
        var events = this._events;
        if (events !== void 0)
          doError = doError && events.error === void 0;
        else if (!doError)
          return false;
        if (doError) {
          var er5;
          if (args.length > 0)
            er5 = args[0];
          if (er5 instanceof Error) {
            throw er5;
          }
          var err2 = new Error("Unhandled error." + (er5 ? " (" + er5.message + ")" : ""));
          err2.context = er5;
          throw err2;
        }
        var handler = events[type2];
        if (handler === void 0)
          return false;
        if (typeof handler === "function") {
          ReflectApply(handler, this, args);
        } else {
          var len = handler.length;
          var listeners = arrayClone(handler, len);
          for (var i5 = 0; i5 < len; ++i5)
            ReflectApply(listeners[i5], this, args);
        }
        return true;
      };
      function _addListener(target, type2, listener, prepend) {
        var m3;
        var events;
        var existing;
        checkListener(listener);
        events = target._events;
        if (events === void 0) {
          events = target._events = /* @__PURE__ */ Object.create(null);
          target._eventsCount = 0;
        } else {
          if (events.newListener !== void 0) {
            target.emit(
              "newListener",
              type2,
              listener.listener ? listener.listener : listener
            );
            events = target._events;
          }
          existing = events[type2];
        }
        if (existing === void 0) {
          existing = events[type2] = listener;
          ++target._eventsCount;
        } else {
          if (typeof existing === "function") {
            existing = events[type2] = prepend ? [listener, existing] : [existing, listener];
          } else if (prepend) {
            existing.unshift(listener);
          } else {
            existing.push(listener);
          }
          m3 = _getMaxListeners(target);
          if (m3 > 0 && existing.length > m3 && !existing.warned) {
            existing.warned = true;
            var w7 = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + String(type2) + " listeners added. Use emitter.setMaxListeners() to increase limit");
            w7.name = "MaxListenersExceededWarning";
            w7.emitter = target;
            w7.type = type2;
            w7.count = existing.length;
            ProcessEmitWarning(w7);
          }
        }
        return target;
      }
      EventEmitter2.prototype.addListener = function addListener(type2, listener) {
        return _addListener(this, type2, listener, false);
      };
      EventEmitter2.prototype.on = EventEmitter2.prototype.addListener;
      EventEmitter2.prototype.prependListener = function prependListener(type2, listener) {
        return _addListener(this, type2, listener, true);
      };
      function onceWrapper() {
        if (!this.fired) {
          this.target.removeListener(this.type, this.wrapFn);
          this.fired = true;
          if (arguments.length === 0)
            return this.listener.call(this.target);
          return this.listener.apply(this.target, arguments);
        }
      }
      function _onceWrap(target, type2, listener) {
        var state = { fired: false, wrapFn: void 0, target, type: type2, listener };
        var wrapped = onceWrapper.bind(state);
        wrapped.listener = listener;
        state.wrapFn = wrapped;
        return wrapped;
      }
      EventEmitter2.prototype.once = function once2(type2, listener) {
        checkListener(listener);
        this.on(type2, _onceWrap(this, type2, listener));
        return this;
      };
      EventEmitter2.prototype.prependOnceListener = function prependOnceListener(type2, listener) {
        checkListener(listener);
        this.prependListener(type2, _onceWrap(this, type2, listener));
        return this;
      };
      EventEmitter2.prototype.removeListener = function removeListener(type2, listener) {
        var list, events, position, i5, originalListener;
        checkListener(listener);
        events = this._events;
        if (events === void 0)
          return this;
        list = events[type2];
        if (list === void 0)
          return this;
        if (list === listener || list.listener === listener) {
          if (--this._eventsCount === 0)
            this._events = /* @__PURE__ */ Object.create(null);
          else {
            delete events[type2];
            if (events.removeListener)
              this.emit("removeListener", type2, list.listener || listener);
          }
        } else if (typeof list !== "function") {
          position = -1;
          for (i5 = list.length - 1; i5 >= 0; i5--) {
            if (list[i5] === listener || list[i5].listener === listener) {
              originalListener = list[i5].listener;
              position = i5;
              break;
            }
          }
          if (position < 0)
            return this;
          if (position === 0)
            list.shift();
          else {
            spliceOne(list, position);
          }
          if (list.length === 1)
            events[type2] = list[0];
          if (events.removeListener !== void 0)
            this.emit("removeListener", type2, originalListener || listener);
        }
        return this;
      };
      EventEmitter2.prototype.off = EventEmitter2.prototype.removeListener;
      EventEmitter2.prototype.removeAllListeners = function removeAllListeners(type2) {
        var listeners, events, i5;
        events = this._events;
        if (events === void 0)
          return this;
        if (events.removeListener === void 0) {
          if (arguments.length === 0) {
            this._events = /* @__PURE__ */ Object.create(null);
            this._eventsCount = 0;
          } else if (events[type2] !== void 0) {
            if (--this._eventsCount === 0)
              this._events = /* @__PURE__ */ Object.create(null);
            else
              delete events[type2];
          }
          return this;
        }
        if (arguments.length === 0) {
          var keys2 = Object.keys(events);
          var key2;
          for (i5 = 0; i5 < keys2.length; ++i5) {
            key2 = keys2[i5];
            if (key2 === "removeListener") continue;
            this.removeAllListeners(key2);
          }
          this.removeAllListeners("removeListener");
          this._events = /* @__PURE__ */ Object.create(null);
          this._eventsCount = 0;
          return this;
        }
        listeners = events[type2];
        if (typeof listeners === "function") {
          this.removeListener(type2, listeners);
        } else if (listeners !== void 0) {
          for (i5 = listeners.length - 1; i5 >= 0; i5--) {
            this.removeListener(type2, listeners[i5]);
          }
        }
        return this;
      };
      function _listeners(target, type2, unwrap3) {
        var events = target._events;
        if (events === void 0)
          return [];
        var evlistener = events[type2];
        if (evlistener === void 0)
          return [];
        if (typeof evlistener === "function")
          return unwrap3 ? [evlistener.listener || evlistener] : [evlistener];
        return unwrap3 ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
      }
      EventEmitter2.prototype.listeners = function listeners(type2) {
        return _listeners(this, type2, true);
      };
      EventEmitter2.prototype.rawListeners = function rawListeners(type2) {
        return _listeners(this, type2, false);
      };
      EventEmitter2.listenerCount = function(emitter, type2) {
        if (typeof emitter.listenerCount === "function") {
          return emitter.listenerCount(type2);
        } else {
          return listenerCount.call(emitter, type2);
        }
      };
      EventEmitter2.prototype.listenerCount = listenerCount;
      function listenerCount(type2) {
        var events = this._events;
        if (events !== void 0) {
          var evlistener = events[type2];
          if (typeof evlistener === "function") {
            return 1;
          } else if (evlistener !== void 0) {
            return evlistener.length;
          }
        }
        return 0;
      }
      EventEmitter2.prototype.eventNames = function eventNames() {
        return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
      };
      function arrayClone(arr, n6) {
        var copy = new Array(n6);
        for (var i5 = 0; i5 < n6; ++i5)
          copy[i5] = arr[i5];
        return copy;
      }
      function spliceOne(list, index2) {
        for (; index2 + 1 < list.length; index2++)
          list[index2] = list[index2 + 1];
        list.pop();
      }
      function unwrapListeners(arr) {
        var ret = new Array(arr.length);
        for (var i5 = 0; i5 < ret.length; ++i5) {
          ret[i5] = arr[i5].listener || arr[i5];
        }
        return ret;
      }
      function once(emitter, name2) {
        return new Promise(function(resolve, reject2) {
          function errorListener(err2) {
            emitter.removeListener(name2, resolver);
            reject2(err2);
          }
          function resolver() {
            if (typeof emitter.removeListener === "function") {
              emitter.removeListener("error", errorListener);
            }
            resolve([].slice.call(arguments));
          }
          ;
          eventTargetAgnosticAddListener(emitter, name2, resolver, { once: true });
          if (name2 !== "error") {
            addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
          }
        });
      }
      function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
        if (typeof emitter.on === "function") {
          eventTargetAgnosticAddListener(emitter, "error", handler, flags);
        }
      }
      function eventTargetAgnosticAddListener(emitter, name2, listener, flags) {
        if (typeof emitter.on === "function") {
          if (flags.once) {
            emitter.once(name2, listener);
          } else {
            emitter.on(name2, listener);
          }
        } else if (typeof emitter.addEventListener === "function") {
          emitter.addEventListener(name2, function wrapListener(arg) {
            if (flags.once) {
              emitter.removeEventListener(name2, wrapListener);
            }
            listener(arg);
          });
        } else {
          throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
        }
      }
    }
  });

  // ../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.es6.js
  var tslib_es6_exports = {};
  __export(tslib_es6_exports, {
    __assign: () => __assign,
    __asyncDelegator: () => __asyncDelegator,
    __asyncGenerator: () => __asyncGenerator,
    __asyncValues: () => __asyncValues,
    __await: () => __await,
    __awaiter: () => __awaiter,
    __classPrivateFieldGet: () => __classPrivateFieldGet,
    __classPrivateFieldSet: () => __classPrivateFieldSet,
    __createBinding: () => __createBinding,
    __decorate: () => __decorate,
    __exportStar: () => __exportStar,
    __extends: () => __extends,
    __generator: () => __generator,
    __importDefault: () => __importDefault,
    __importStar: () => __importStar,
    __makeTemplateObject: () => __makeTemplateObject,
    __metadata: () => __metadata,
    __param: () => __param,
    __read: () => __read,
    __rest: () => __rest,
    __spread: () => __spread,
    __spreadArrays: () => __spreadArrays,
    __values: () => __values
  });
  function __extends(d6, b9) {
    extendStatics(d6, b9);
    function __() {
      this.constructor = d6;
    }
    d6.prototype = b9 === null ? Object.create(b9) : (__.prototype = b9.prototype, new __());
  }
  function __rest(s3, e2) {
    var t = {};
    for (var p7 in s3) if (Object.prototype.hasOwnProperty.call(s3, p7) && e2.indexOf(p7) < 0)
      t[p7] = s3[p7];
    if (s3 != null && typeof Object.getOwnPropertySymbols === "function")
      for (var i5 = 0, p7 = Object.getOwnPropertySymbols(s3); i5 < p7.length; i5++) {
        if (e2.indexOf(p7[i5]) < 0 && Object.prototype.propertyIsEnumerable.call(s3, p7[i5]))
          t[p7[i5]] = s3[p7[i5]];
      }
    return t;
  }
  function __decorate(decorators, target, key2, desc) {
    var c7 = arguments.length, r3 = c7 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key2) : desc, d6;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key2, desc);
    else for (var i5 = decorators.length - 1; i5 >= 0; i5--) if (d6 = decorators[i5]) r3 = (c7 < 3 ? d6(r3) : c7 > 3 ? d6(target, key2, r3) : d6(target, key2)) || r3;
    return c7 > 3 && r3 && Object.defineProperty(target, key2, r3), r3;
  }
  function __param(paramIndex, decorator) {
    return function(target, key2) {
      decorator(target, key2, paramIndex);
    };
  }
  function __metadata(metadataKey, metadataValue) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
  }
  function __awaiter(thisArg, _arguments, P8, generator) {
    function adopt(value) {
      return value instanceof P8 ? value : new P8(function(resolve) {
        resolve(value);
      });
    }
    return new (P8 || (P8 = Promise))(function(resolve, reject2) {
      function fulfilled(value) {
        try {
          step(generator.next(value));
        } catch (e2) {
          reject2(e2);
        }
      }
      function rejected(value) {
        try {
          step(generator["throw"](value));
        } catch (e2) {
          reject2(e2);
        }
      }
      function step(result) {
        result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
      }
      step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
  }
  function __generator(thisArg, body) {
    var _6 = { label: 0, sent: function() {
      if (t[0] & 1) throw t[1];
      return t[1];
    }, trys: [], ops: [] }, f7, y11, t, g8;
    return g8 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g8[Symbol.iterator] = function() {
      return this;
    }), g8;
    function verb(n6) {
      return function(v13) {
        return step([n6, v13]);
      };
    }
    function step(op) {
      if (f7) throw new TypeError("Generator is already executing.");
      while (_6) try {
        if (f7 = 1, y11 && (t = op[0] & 2 ? y11["return"] : op[0] ? y11["throw"] || ((t = y11["return"]) && t.call(y11), 0) : y11.next) && !(t = t.call(y11, op[1])).done) return t;
        if (y11 = 0, t) op = [op[0] & 2, t.value];
        switch (op[0]) {
          case 0:
          case 1:
            t = op;
            break;
          case 4:
            _6.label++;
            return { value: op[1], done: false };
          case 5:
            _6.label++;
            y11 = op[1];
            op = [0];
            continue;
          case 7:
            op = _6.ops.pop();
            _6.trys.pop();
            continue;
          default:
            if (!(t = _6.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
              _6 = 0;
              continue;
            }
            if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
              _6.label = op[1];
              break;
            }
            if (op[0] === 6 && _6.label < t[1]) {
              _6.label = t[1];
              t = op;
              break;
            }
            if (t && _6.label < t[2]) {
              _6.label = t[2];
              _6.ops.push(op);
              break;
            }
            if (t[2]) _6.ops.pop();
            _6.trys.pop();
            continue;
        }
        op = body.call(thisArg, _6);
      } catch (e2) {
        op = [6, e2];
        y11 = 0;
      } finally {
        f7 = t = 0;
      }
      if (op[0] & 5) throw op[1];
      return { value: op[0] ? op[1] : void 0, done: true };
    }
  }
  function __createBinding(o5, m3, k7, k22) {
    if (k22 === void 0) k22 = k7;
    o5[k22] = m3[k7];
  }
  function __exportStar(m3, exports) {
    for (var p7 in m3) if (p7 !== "default" && !exports.hasOwnProperty(p7)) exports[p7] = m3[p7];
  }
  function __values(o5) {
    var s3 = typeof Symbol === "function" && Symbol.iterator, m3 = s3 && o5[s3], i5 = 0;
    if (m3) return m3.call(o5);
    if (o5 && typeof o5.length === "number") return {
      next: function() {
        if (o5 && i5 >= o5.length) o5 = void 0;
        return { value: o5 && o5[i5++], done: !o5 };
      }
    };
    throw new TypeError(s3 ? "Object is not iterable." : "Symbol.iterator is not defined.");
  }
  function __read(o5, n6) {
    var m3 = typeof Symbol === "function" && o5[Symbol.iterator];
    if (!m3) return o5;
    var i5 = m3.call(o5), r3, ar5 = [], e2;
    try {
      while ((n6 === void 0 || n6-- > 0) && !(r3 = i5.next()).done) ar5.push(r3.value);
    } catch (error51) {
      e2 = { error: error51 };
    } finally {
      try {
        if (r3 && !r3.done && (m3 = i5["return"])) m3.call(i5);
      } finally {
        if (e2) throw e2.error;
      }
    }
    return ar5;
  }
  function __spread() {
    for (var ar5 = [], i5 = 0; i5 < arguments.length; i5++)
      ar5 = ar5.concat(__read(arguments[i5]));
    return ar5;
  }
  function __spreadArrays() {
    for (var s3 = 0, i5 = 0, il = arguments.length; i5 < il; i5++) s3 += arguments[i5].length;
    for (var r3 = Array(s3), k7 = 0, i5 = 0; i5 < il; i5++)
      for (var a5 = arguments[i5], j6 = 0, jl = a5.length; j6 < jl; j6++, k7++)
        r3[k7] = a5[j6];
    return r3;
  }
  function __await(v13) {
    return this instanceof __await ? (this.v = v13, this) : new __await(v13);
  }
  function __asyncGenerator(thisArg, _arguments, generator) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var g8 = generator.apply(thisArg, _arguments || []), i5, q7 = [];
    return i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() {
      return this;
    }, i5;
    function verb(n6) {
      if (g8[n6]) i5[n6] = function(v13) {
        return new Promise(function(a5, b9) {
          q7.push([n6, v13, a5, b9]) > 1 || resume(n6, v13);
        });
      };
    }
    function resume(n6, v13) {
      try {
        step(g8[n6](v13));
      } catch (e2) {
        settle(q7[0][3], e2);
      }
    }
    function step(r3) {
      r3.value instanceof __await ? Promise.resolve(r3.value.v).then(fulfill, reject2) : settle(q7[0][2], r3);
    }
    function fulfill(value) {
      resume("next", value);
    }
    function reject2(value) {
      resume("throw", value);
    }
    function settle(f7, v13) {
      if (f7(v13), q7.shift(), q7.length) resume(q7[0][0], q7[0][1]);
    }
  }
  function __asyncDelegator(o5) {
    var i5, p7;
    return i5 = {}, verb("next"), verb("throw", function(e2) {
      throw e2;
    }), verb("return"), i5[Symbol.iterator] = function() {
      return this;
    }, i5;
    function verb(n6, f7) {
      i5[n6] = o5[n6] ? function(v13) {
        return (p7 = !p7) ? { value: __await(o5[n6](v13)), done: n6 === "return" } : f7 ? f7(v13) : v13;
      } : f7;
    }
  }
  function __asyncValues(o5) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var m3 = o5[Symbol.asyncIterator], i5;
    return m3 ? m3.call(o5) : (o5 = typeof __values === "function" ? __values(o5) : o5[Symbol.iterator](), i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() {
      return this;
    }, i5);
    function verb(n6) {
      i5[n6] = o5[n6] && function(v13) {
        return new Promise(function(resolve, reject2) {
          v13 = o5[n6](v13), settle(resolve, reject2, v13.done, v13.value);
        });
      };
    }
    function settle(resolve, reject2, d6, v13) {
      Promise.resolve(v13).then(function(v14) {
        resolve({ value: v14, done: d6 });
      }, reject2);
    }
  }
  function __makeTemplateObject(cooked, raw) {
    if (Object.defineProperty) {
      Object.defineProperty(cooked, "raw", { value: raw });
    } else {
      cooked.raw = raw;
    }
    return cooked;
  }
  function __importStar(mod3) {
    if (mod3 && mod3.__esModule) return mod3;
    var result = {};
    if (mod3 != null) {
      for (var k7 in mod3) if (Object.hasOwnProperty.call(mod3, k7)) result[k7] = mod3[k7];
    }
    result.default = mod3;
    return result;
  }
  function __importDefault(mod3) {
    return mod3 && mod3.__esModule ? mod3 : { default: mod3 };
  }
  function __classPrivateFieldGet(receiver, privateMap) {
    if (!privateMap.has(receiver)) {
      throw new TypeError("attempted to get private field on non-instance");
    }
    return privateMap.get(receiver);
  }
  function __classPrivateFieldSet(receiver, privateMap, value) {
    if (!privateMap.has(receiver)) {
      throw new TypeError("attempted to set private field on non-instance");
    }
    privateMap.set(receiver, value);
    return value;
  }
  var extendStatics, __assign;
  var init_tslib_es6 = __esm({
    "../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.es6.js"() {
      "use strict";
      init_node_compat_inject();
      extendStatics = function(d6, b9) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d7, b10) {
          d7.__proto__ = b10;
        } || function(d7, b10) {
          for (var p7 in b10) if (b10.hasOwnProperty(p7)) d7[p7] = b10[p7];
        };
        return extendStatics(d6, b9);
      };
      __assign = function() {
        __assign = Object.assign || function __assign2(t) {
          for (var s3, i5 = 1, n6 = arguments.length; i5 < n6; i5++) {
            s3 = arguments[i5];
            for (var p7 in s3) if (Object.prototype.hasOwnProperty.call(s3, p7)) t[p7] = s3[p7];
          }
          return t;
        };
        return __assign.apply(this, arguments);
      };
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/utils/delay.js
  var require_delay = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/utils/delay.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.delay = void 0;
      function delay(timeout) {
        return new Promise((resolve) => {
          setTimeout(() => {
            resolve(true);
          }, timeout);
        });
      }
      exports.delay = delay;
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/constants/misc.js
  var require_misc = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/constants/misc.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.ONE_THOUSAND = exports.ONE_HUNDRED = void 0;
      exports.ONE_HUNDRED = 100;
      exports.ONE_THOUSAND = 1e3;
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/constants/time.js
  var require_time = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/constants/time.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.ONE_YEAR = exports.FOUR_WEEKS = exports.THREE_WEEKS = exports.TWO_WEEKS = exports.ONE_WEEK = exports.THIRTY_DAYS = exports.SEVEN_DAYS = exports.FIVE_DAYS = exports.THREE_DAYS = exports.ONE_DAY = exports.TWENTY_FOUR_HOURS = exports.TWELVE_HOURS = exports.SIX_HOURS = exports.THREE_HOURS = exports.ONE_HOUR = exports.SIXTY_MINUTES = exports.THIRTY_MINUTES = exports.TEN_MINUTES = exports.FIVE_MINUTES = exports.ONE_MINUTE = exports.SIXTY_SECONDS = exports.THIRTY_SECONDS = exports.TEN_SECONDS = exports.FIVE_SECONDS = exports.ONE_SECOND = void 0;
      exports.ONE_SECOND = 1;
      exports.FIVE_SECONDS = 5;
      exports.TEN_SECONDS = 10;
      exports.THIRTY_SECONDS = 30;
      exports.SIXTY_SECONDS = 60;
      exports.ONE_MINUTE = exports.SIXTY_SECONDS;
      exports.FIVE_MINUTES = exports.ONE_MINUTE * 5;
      exports.TEN_MINUTES = exports.ONE_MINUTE * 10;
      exports.THIRTY_MINUTES = exports.ONE_MINUTE * 30;
      exports.SIXTY_MINUTES = exports.ONE_MINUTE * 60;
      exports.ONE_HOUR = exports.SIXTY_MINUTES;
      exports.THREE_HOURS = exports.ONE_HOUR * 3;
      exports.SIX_HOURS = exports.ONE_HOUR * 6;
      exports.TWELVE_HOURS = exports.ONE_HOUR * 12;
      exports.TWENTY_FOUR_HOURS = exports.ONE_HOUR * 24;
      exports.ONE_DAY = exports.TWENTY_FOUR_HOURS;
      exports.THREE_DAYS = exports.ONE_DAY * 3;
      exports.FIVE_DAYS = exports.ONE_DAY * 5;
      exports.SEVEN_DAYS = exports.ONE_DAY * 7;
      exports.THIRTY_DAYS = exports.ONE_DAY * 30;
      exports.ONE_WEEK = exports.SEVEN_DAYS;
      exports.TWO_WEEKS = exports.ONE_WEEK * 2;
      exports.THREE_WEEKS = exports.ONE_WEEK * 3;
      exports.FOUR_WEEKS = exports.ONE_WEEK * 4;
      exports.ONE_YEAR = exports.ONE_DAY * 365;
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/constants/index.js
  var require_constants = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/constants/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
      tslib_1.__exportStar(require_misc(), exports);
      tslib_1.__exportStar(require_time(), exports);
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/utils/convert.js
  var require_convert2 = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/utils/convert.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.fromMiliseconds = exports.toMiliseconds = void 0;
      var constants_1 = require_constants();
      function toMiliseconds(seconds) {
        return seconds * constants_1.ONE_THOUSAND;
      }
      exports.toMiliseconds = toMiliseconds;
      function fromMiliseconds2(miliseconds) {
        return Math.floor(miliseconds / constants_1.ONE_THOUSAND);
      }
      exports.fromMiliseconds = fromMiliseconds2;
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/utils/index.js
  var require_utils2 = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/utils/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
      tslib_1.__exportStar(require_delay(), exports);
      tslib_1.__exportStar(require_convert2(), exports);
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/watch.js
  var require_watch = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/watch.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.Watch = void 0;
      var Watch = class {
        constructor() {
          this.timestamps = /* @__PURE__ */ new Map();
        }
        start(label) {
          if (this.timestamps.has(label)) {
            throw new Error(`Watch already started for label: ${label}`);
          }
          this.timestamps.set(label, { started: Date.now() });
        }
        stop(label) {
          const timestamp = this.get(label);
          if (typeof timestamp.elapsed !== "undefined") {
            throw new Error(`Watch already stopped for label: ${label}`);
          }
          const elapsed = Date.now() - timestamp.started;
          this.timestamps.set(label, { started: timestamp.started, elapsed });
        }
        get(label) {
          const timestamp = this.timestamps.get(label);
          if (typeof timestamp === "undefined") {
            throw new Error(`No timestamp found for label: ${label}`);
          }
          return timestamp;
        }
        elapsed(label) {
          const timestamp = this.get(label);
          const elapsed = timestamp.elapsed || Date.now() - timestamp.started;
          return elapsed;
        }
      };
      exports.Watch = Watch;
      exports.default = Watch;
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/types/watch.js
  var require_watch2 = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/types/watch.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.IWatch = void 0;
      var IWatch = class {
      };
      exports.IWatch = IWatch;
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/types/index.js
  var require_types2 = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/types/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
      tslib_1.__exportStar(require_watch2(), exports);
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/index.js
  var require_cjs = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
      tslib_1.__exportStar(require_utils2(), exports);
      tslib_1.__exportStar(require_watch(), exports);
      tslib_1.__exportStar(require_types2(), exports);
      tslib_1.__exportStar(require_constants(), exports);
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+window-getters@1.0.1/node_modules/@walletconnect/window-getters/dist/cjs/index.js
  var require_cjs2 = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+window-getters@1.0.1/node_modules/@walletconnect/window-getters/dist/cjs/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.getLocalStorage = exports.getLocalStorageOrThrow = exports.getCrypto = exports.getCryptoOrThrow = exports.getLocation = exports.getLocationOrThrow = exports.getNavigator = exports.getNavigatorOrThrow = exports.getDocument = exports.getDocumentOrThrow = exports.getFromWindowOrThrow = exports.getFromWindow = void 0;
      function getFromWindow(name2) {
        let res = void 0;
        if (typeof window !== "undefined" && typeof window[name2] !== "undefined") {
          res = window[name2];
        }
        return res;
      }
      exports.getFromWindow = getFromWindow;
      function getFromWindowOrThrow(name2) {
        const res = getFromWindow(name2);
        if (!res) {
          throw new Error(`${name2} is not defined in Window`);
        }
        return res;
      }
      exports.getFromWindowOrThrow = getFromWindowOrThrow;
      function getDocumentOrThrow() {
        return getFromWindowOrThrow("document");
      }
      exports.getDocumentOrThrow = getDocumentOrThrow;
      function getDocument() {
        return getFromWindow("document");
      }
      exports.getDocument = getDocument;
      function getNavigatorOrThrow() {
        return getFromWindowOrThrow("navigator");
      }
      exports.getNavigatorOrThrow = getNavigatorOrThrow;
      function getNavigator() {
        return getFromWindow("navigator");
      }
      exports.getNavigator = getNavigator;
      function getLocationOrThrow() {
        return getFromWindowOrThrow("location");
      }
      exports.getLocationOrThrow = getLocationOrThrow;
      function getLocation() {
        return getFromWindow("location");
      }
      exports.getLocation = getLocation;
      function getCryptoOrThrow() {
        return getFromWindowOrThrow("crypto");
      }
      exports.getCryptoOrThrow = getCryptoOrThrow;
      function getCrypto() {
        return getFromWindow("crypto");
      }
      exports.getCrypto = getCrypto;
      function getLocalStorageOrThrow() {
        return getFromWindowOrThrow("localStorage");
      }
      exports.getLocalStorageOrThrow = getLocalStorageOrThrow;
      function getLocalStorage() {
        return getFromWindow("localStorage");
      }
      exports.getLocalStorage = getLocalStorage;
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+window-metadata@1.0.1/node_modules/@walletconnect/window-metadata/dist/cjs/index.js
  var require_cjs3 = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+window-metadata@1.0.1/node_modules/@walletconnect/window-metadata/dist/cjs/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.getWindowMetadata = void 0;
      var window_getters_1 = require_cjs2();
      function getWindowMetadata() {
        let doc;
        let loc;
        try {
          doc = window_getters_1.getDocumentOrThrow();
          loc = window_getters_1.getLocationOrThrow();
        } catch (e2) {
          return null;
        }
        function getIcons() {
          const links = doc.getElementsByTagName("link");
          const icons2 = [];
          for (let i5 = 0; i5 < links.length; i5++) {
            const link = links[i5];
            const rel = link.getAttribute("rel");
            if (rel) {
              if (rel.toLowerCase().indexOf("icon") > -1) {
                const href = link.getAttribute("href");
                if (href) {
                  if (href.toLowerCase().indexOf("https:") === -1 && href.toLowerCase().indexOf("http:") === -1 && href.indexOf("//") !== 0) {
                    let absoluteHref = loc.protocol + "//" + loc.host;
                    if (href.indexOf("/") === 0) {
                      absoluteHref += href;
                    } else {
                      const path = loc.pathname.split("/");
                      path.pop();
                      const finalPath = path.join("/");
                      absoluteHref += finalPath + "/" + href;
                    }
                    icons2.push(absoluteHref);
                  } else if (href.indexOf("//") === 0) {
                    const absoluteUrl = loc.protocol + href;
                    icons2.push(absoluteUrl);
                  } else {
                    icons2.push(href);
                  }
                }
              }
            }
          }
          return icons2;
        }
        function getWindowMetadataOfAny(...args) {
          const metaTags = doc.getElementsByTagName("meta");
          for (let i5 = 0; i5 < metaTags.length; i5++) {
            const tag = metaTags[i5];
            const attributes = ["itemprop", "property", "name"].map((target) => tag.getAttribute(target)).filter((attr) => {
              if (attr) {
                return args.includes(attr);
              }
              return false;
            });
            if (attributes.length && attributes) {
              const content = tag.getAttribute("content");
              if (content) {
                return content;
              }
            }
          }
          return "";
        }
        function getName() {
          let name3 = getWindowMetadataOfAny("name", "og:site_name", "og:title", "twitter:title");
          if (!name3) {
            name3 = doc.title;
          }
          return name3;
        }
        function getDescription() {
          const description2 = getWindowMetadataOfAny("description", "og:description", "twitter:description", "keywords");
          return description2;
        }
        const name2 = getName();
        const description = getDescription();
        const url2 = loc.origin;
        const icons = getIcons();
        const meta3 = {
          description,
          url: url2,
          icons,
          name: name2
        };
        return meta3;
      }
      exports.getWindowMetadata = getWindowMetadata;
    }
  });

  // ../../node_modules/.pnpm/blakejs@1.2.1/node_modules/blakejs/util.js
  var require_util2 = __commonJS({
    "../../node_modules/.pnpm/blakejs@1.2.1/node_modules/blakejs/util.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var ERROR_MSG_INPUT = "Input must be an string, Buffer or Uint8Array";
      function normalizeInput(input) {
        let ret;
        if (input instanceof Uint8Array) {
          ret = input;
        } else if (typeof input === "string") {
          const encoder5 = new TextEncoder();
          ret = encoder5.encode(input);
        } else {
          throw new Error(ERROR_MSG_INPUT);
        }
        return ret;
      }
      function toHex3(bytes) {
        return Array.prototype.map.call(bytes, function(n6) {
          return (n6 < 16 ? "0" : "") + n6.toString(16);
        }).join("");
      }
      function uint32ToHex(val) {
        return (4294967296 + val).toString(16).substring(1);
      }
      function debugPrint(label, arr, size5) {
        let msg = "\n" + label + " = ";
        for (let i5 = 0; i5 < arr.length; i5 += 2) {
          if (size5 === 32) {
            msg += uint32ToHex(arr[i5]).toUpperCase();
            msg += " ";
            msg += uint32ToHex(arr[i5 + 1]).toUpperCase();
          } else if (size5 === 64) {
            msg += uint32ToHex(arr[i5 + 1]).toUpperCase();
            msg += uint32ToHex(arr[i5]).toUpperCase();
          } else throw new Error("Invalid size " + size5);
          if (i5 % 6 === 4) {
            msg += "\n" + new Array(label.length + 4).join(" ");
          } else if (i5 < arr.length - 2) {
            msg += " ";
          }
        }
        console.log(msg);
      }
      function testSpeed(hashFn, N13, M9) {
        let startMs = (/* @__PURE__ */ new Date()).getTime();
        const input = new Uint8Array(N13);
        for (let i5 = 0; i5 < N13; i5++) {
          input[i5] = i5 % 256;
        }
        const genMs = (/* @__PURE__ */ new Date()).getTime();
        console.log("Generated random input in " + (genMs - startMs) + "ms");
        startMs = genMs;
        for (let i5 = 0; i5 < M9; i5++) {
          const hashHex = hashFn(input);
          const hashMs = (/* @__PURE__ */ new Date()).getTime();
          const ms2 = hashMs - startMs;
          startMs = hashMs;
          console.log("Hashed in " + ms2 + "ms: " + hashHex.substring(0, 20) + "...");
          console.log(
            Math.round(N13 / (1 << 20) / (ms2 / 1e3) * 100) / 100 + " MB PER SECOND"
          );
        }
      }
      module.exports = {
        normalizeInput,
        toHex: toHex3,
        debugPrint,
        testSpeed
      };
    }
  });

  // ../../node_modules/.pnpm/blakejs@1.2.1/node_modules/blakejs/blake2b.js
  var require_blake2b = __commonJS({
    "../../node_modules/.pnpm/blakejs@1.2.1/node_modules/blakejs/blake2b.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var util = require_util2();
      function ADD64AA(v14, a5, b9) {
        const o0 = v14[a5] + v14[b9];
        let o1 = v14[a5 + 1] + v14[b9 + 1];
        if (o0 >= 4294967296) {
          o1++;
        }
        v14[a5] = o0;
        v14[a5 + 1] = o1;
      }
      function ADD64AC(v14, a5, b0, b1) {
        let o0 = v14[a5] + b0;
        if (b0 < 0) {
          o0 += 4294967296;
        }
        let o1 = v14[a5 + 1] + b1;
        if (o0 >= 4294967296) {
          o1++;
        }
        v14[a5] = o0;
        v14[a5 + 1] = o1;
      }
      function B2B_GET32(arr, i5) {
        return arr[i5] ^ arr[i5 + 1] << 8 ^ arr[i5 + 2] << 16 ^ arr[i5 + 3] << 24;
      }
      function B2B_G(a5, b9, c7, d6, ix, iy) {
        const x0 = m3[ix];
        const x1 = m3[ix + 1];
        const y0 = m3[iy];
        const y1 = m3[iy + 1];
        ADD64AA(v13, a5, b9);
        ADD64AC(v13, a5, x0, x1);
        let xor0 = v13[d6] ^ v13[a5];
        let xor1 = v13[d6 + 1] ^ v13[a5 + 1];
        v13[d6] = xor1;
        v13[d6 + 1] = xor0;
        ADD64AA(v13, c7, d6);
        xor0 = v13[b9] ^ v13[c7];
        xor1 = v13[b9 + 1] ^ v13[c7 + 1];
        v13[b9] = xor0 >>> 24 ^ xor1 << 8;
        v13[b9 + 1] = xor1 >>> 24 ^ xor0 << 8;
        ADD64AA(v13, a5, b9);
        ADD64AC(v13, a5, y0, y1);
        xor0 = v13[d6] ^ v13[a5];
        xor1 = v13[d6 + 1] ^ v13[a5 + 1];
        v13[d6] = xor0 >>> 16 ^ xor1 << 16;
        v13[d6 + 1] = xor1 >>> 16 ^ xor0 << 16;
        ADD64AA(v13, c7, d6);
        xor0 = v13[b9] ^ v13[c7];
        xor1 = v13[b9 + 1] ^ v13[c7 + 1];
        v13[b9] = xor1 >>> 31 ^ xor0 << 1;
        v13[b9 + 1] = xor0 >>> 31 ^ xor1 << 1;
      }
      var BLAKE2B_IV32 = new Uint32Array([
        4089235720,
        1779033703,
        2227873595,
        3144134277,
        4271175723,
        1013904242,
        1595750129,
        2773480762,
        2917565137,
        1359893119,
        725511199,
        2600822924,
        4215389547,
        528734635,
        327033209,
        1541459225
      ]);
      var SIGMA8 = [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        14,
        10,
        4,
        8,
        9,
        15,
        13,
        6,
        1,
        12,
        0,
        2,
        11,
        7,
        5,
        3,
        11,
        8,
        12,
        0,
        5,
        2,
        15,
        13,
        10,
        14,
        3,
        6,
        7,
        1,
        9,
        4,
        7,
        9,
        3,
        1,
        13,
        12,
        11,
        14,
        2,
        6,
        5,
        10,
        4,
        0,
        15,
        8,
        9,
        0,
        5,
        7,
        2,
        4,
        10,
        15,
        14,
        1,
        11,
        12,
        6,
        8,
        3,
        13,
        2,
        12,
        6,
        10,
        0,
        11,
        8,
        3,
        4,
        13,
        7,
        5,
        15,
        14,
        1,
        9,
        12,
        5,
        1,
        15,
        14,
        13,
        4,
        10,
        0,
        7,
        6,
        3,
        9,
        2,
        8,
        11,
        13,
        11,
        7,
        14,
        12,
        1,
        3,
        9,
        5,
        0,
        15,
        4,
        8,
        6,
        2,
        10,
        6,
        15,
        14,
        9,
        11,
        3,
        0,
        8,
        12,
        2,
        13,
        7,
        1,
        4,
        10,
        5,
        10,
        2,
        8,
        4,
        7,
        6,
        1,
        5,
        15,
        11,
        9,
        14,
        3,
        12,
        13,
        0,
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        14,
        10,
        4,
        8,
        9,
        15,
        13,
        6,
        1,
        12,
        0,
        2,
        11,
        7,
        5,
        3
      ];
      var SIGMA82 = new Uint8Array(
        SIGMA8.map(function(x13) {
          return x13 * 2;
        })
      );
      var v13 = new Uint32Array(32);
      var m3 = new Uint32Array(32);
      function blake2bCompress(ctx, last) {
        let i5 = 0;
        for (i5 = 0; i5 < 16; i5++) {
          v13[i5] = ctx.h[i5];
          v13[i5 + 16] = BLAKE2B_IV32[i5];
        }
        v13[24] = v13[24] ^ ctx.t;
        v13[25] = v13[25] ^ ctx.t / 4294967296;
        if (last) {
          v13[28] = ~v13[28];
          v13[29] = ~v13[29];
        }
        for (i5 = 0; i5 < 32; i5++) {
          m3[i5] = B2B_GET32(ctx.b, 4 * i5);
        }
        for (i5 = 0; i5 < 12; i5++) {
          B2B_G(0, 8, 16, 24, SIGMA82[i5 * 16 + 0], SIGMA82[i5 * 16 + 1]);
          B2B_G(2, 10, 18, 26, SIGMA82[i5 * 16 + 2], SIGMA82[i5 * 16 + 3]);
          B2B_G(4, 12, 20, 28, SIGMA82[i5 * 16 + 4], SIGMA82[i5 * 16 + 5]);
          B2B_G(6, 14, 22, 30, SIGMA82[i5 * 16 + 6], SIGMA82[i5 * 16 + 7]);
          B2B_G(0, 10, 20, 30, SIGMA82[i5 * 16 + 8], SIGMA82[i5 * 16 + 9]);
          B2B_G(2, 12, 22, 24, SIGMA82[i5 * 16 + 10], SIGMA82[i5 * 16 + 11]);
          B2B_G(4, 14, 16, 26, SIGMA82[i5 * 16 + 12], SIGMA82[i5 * 16 + 13]);
          B2B_G(6, 8, 18, 28, SIGMA82[i5 * 16 + 14], SIGMA82[i5 * 16 + 15]);
        }
        for (i5 = 0; i5 < 16; i5++) {
          ctx.h[i5] = ctx.h[i5] ^ v13[i5] ^ v13[i5 + 16];
        }
      }
      var parameterBlock = new Uint8Array([
        0,
        0,
        0,
        0,
        //  0: outlen, keylen, fanout, depth
        0,
        0,
        0,
        0,
        //  4: leaf length, sequential mode
        0,
        0,
        0,
        0,
        //  8: node offset
        0,
        0,
        0,
        0,
        // 12: node offset
        0,
        0,
        0,
        0,
        // 16: node depth, inner length, rfu
        0,
        0,
        0,
        0,
        // 20: rfu
        0,
        0,
        0,
        0,
        // 24: rfu
        0,
        0,
        0,
        0,
        // 28: rfu
        0,
        0,
        0,
        0,
        // 32: salt
        0,
        0,
        0,
        0,
        // 36: salt
        0,
        0,
        0,
        0,
        // 40: salt
        0,
        0,
        0,
        0,
        // 44: salt
        0,
        0,
        0,
        0,
        // 48: personal
        0,
        0,
        0,
        0,
        // 52: personal
        0,
        0,
        0,
        0,
        // 56: personal
        0,
        0,
        0,
        0
        // 60: personal
      ]);
      function blake2bInit(outlen, key2, salt, personal) {
        if (outlen === 0 || outlen > 64) {
          throw new Error("Illegal output length, expected 0 < length <= 64");
        }
        if (key2 && key2.length > 64) {
          throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");
        }
        if (salt && salt.length !== 16) {
          throw new Error("Illegal salt, expected Uint8Array with length is 16");
        }
        if (personal && personal.length !== 16) {
          throw new Error("Illegal personal, expected Uint8Array with length is 16");
        }
        const ctx = {
          b: new Uint8Array(128),
          h: new Uint32Array(16),
          t: 0,
          // input count
          c: 0,
          // pointer within buffer
          outlen
          // output length in bytes
        };
        parameterBlock.fill(0);
        parameterBlock[0] = outlen;
        if (key2) parameterBlock[1] = key2.length;
        parameterBlock[2] = 1;
        parameterBlock[3] = 1;
        if (salt) parameterBlock.set(salt, 32);
        if (personal) parameterBlock.set(personal, 48);
        for (let i5 = 0; i5 < 16; i5++) {
          ctx.h[i5] = BLAKE2B_IV32[i5] ^ B2B_GET32(parameterBlock, i5 * 4);
        }
        if (key2) {
          blake2bUpdate(ctx, key2);
          ctx.c = 128;
        }
        return ctx;
      }
      function blake2bUpdate(ctx, input) {
        for (let i5 = 0; i5 < input.length; i5++) {
          if (ctx.c === 128) {
            ctx.t += ctx.c;
            blake2bCompress(ctx, false);
            ctx.c = 0;
          }
          ctx.b[ctx.c++] = input[i5];
        }
      }
      function blake2bFinal(ctx) {
        ctx.t += ctx.c;
        while (ctx.c < 128) {
          ctx.b[ctx.c++] = 0;
        }
        blake2bCompress(ctx, true);
        const out = new Uint8Array(ctx.outlen);
        for (let i5 = 0; i5 < ctx.outlen; i5++) {
          out[i5] = ctx.h[i5 >> 2] >> 8 * (i5 & 3);
        }
        return out;
      }
      function blake2b(input, key2, outlen, salt, personal) {
        outlen = outlen || 64;
        input = util.normalizeInput(input);
        if (salt) {
          salt = util.normalizeInput(salt);
        }
        if (personal) {
          personal = util.normalizeInput(personal);
        }
        const ctx = blake2bInit(outlen, key2, salt, personal);
        blake2bUpdate(ctx, input);
        return blake2bFinal(ctx);
      }
      function blake2bHex(input, key2, outlen, salt, personal) {
        const output = blake2b(input, key2, outlen, salt, personal);
        return util.toHex(output);
      }
      module.exports = {
        blake2b,
        blake2bHex,
        blake2bInit,
        blake2bUpdate,
        blake2bFinal
      };
    }
  });

  // ../../node_modules/.pnpm/blakejs@1.2.1/node_modules/blakejs/blake2s.js
  var require_blake2s = __commonJS({
    "../../node_modules/.pnpm/blakejs@1.2.1/node_modules/blakejs/blake2s.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var util = require_util2();
      function B2S_GET32(v14, i5) {
        return v14[i5] ^ v14[i5 + 1] << 8 ^ v14[i5 + 2] << 16 ^ v14[i5 + 3] << 24;
      }
      function B2S_G(a5, b9, c7, d6, x13, y11) {
        v13[a5] = v13[a5] + v13[b9] + x13;
        v13[d6] = ROTR32(v13[d6] ^ v13[a5], 16);
        v13[c7] = v13[c7] + v13[d6];
        v13[b9] = ROTR32(v13[b9] ^ v13[c7], 12);
        v13[a5] = v13[a5] + v13[b9] + y11;
        v13[d6] = ROTR32(v13[d6] ^ v13[a5], 8);
        v13[c7] = v13[c7] + v13[d6];
        v13[b9] = ROTR32(v13[b9] ^ v13[c7], 7);
      }
      function ROTR32(x13, y11) {
        return x13 >>> y11 ^ x13 << 32 - y11;
      }
      var BLAKE2S_IV = new Uint32Array([
        1779033703,
        3144134277,
        1013904242,
        2773480762,
        1359893119,
        2600822924,
        528734635,
        1541459225
      ]);
      var SIGMA = new Uint8Array([
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        14,
        10,
        4,
        8,
        9,
        15,
        13,
        6,
        1,
        12,
        0,
        2,
        11,
        7,
        5,
        3,
        11,
        8,
        12,
        0,
        5,
        2,
        15,
        13,
        10,
        14,
        3,
        6,
        7,
        1,
        9,
        4,
        7,
        9,
        3,
        1,
        13,
        12,
        11,
        14,
        2,
        6,
        5,
        10,
        4,
        0,
        15,
        8,
        9,
        0,
        5,
        7,
        2,
        4,
        10,
        15,
        14,
        1,
        11,
        12,
        6,
        8,
        3,
        13,
        2,
        12,
        6,
        10,
        0,
        11,
        8,
        3,
        4,
        13,
        7,
        5,
        15,
        14,
        1,
        9,
        12,
        5,
        1,
        15,
        14,
        13,
        4,
        10,
        0,
        7,
        6,
        3,
        9,
        2,
        8,
        11,
        13,
        11,
        7,
        14,
        12,
        1,
        3,
        9,
        5,
        0,
        15,
        4,
        8,
        6,
        2,
        10,
        6,
        15,
        14,
        9,
        11,
        3,
        0,
        8,
        12,
        2,
        13,
        7,
        1,
        4,
        10,
        5,
        10,
        2,
        8,
        4,
        7,
        6,
        1,
        5,
        15,
        11,
        9,
        14,
        3,
        12,
        13,
        0
      ]);
      var v13 = new Uint32Array(16);
      var m3 = new Uint32Array(16);
      function blake2sCompress(ctx, last) {
        let i5 = 0;
        for (i5 = 0; i5 < 8; i5++) {
          v13[i5] = ctx.h[i5];
          v13[i5 + 8] = BLAKE2S_IV[i5];
        }
        v13[12] ^= ctx.t;
        v13[13] ^= ctx.t / 4294967296;
        if (last) {
          v13[14] = ~v13[14];
        }
        for (i5 = 0; i5 < 16; i5++) {
          m3[i5] = B2S_GET32(ctx.b, 4 * i5);
        }
        for (i5 = 0; i5 < 10; i5++) {
          B2S_G(0, 4, 8, 12, m3[SIGMA[i5 * 16 + 0]], m3[SIGMA[i5 * 16 + 1]]);
          B2S_G(1, 5, 9, 13, m3[SIGMA[i5 * 16 + 2]], m3[SIGMA[i5 * 16 + 3]]);
          B2S_G(2, 6, 10, 14, m3[SIGMA[i5 * 16 + 4]], m3[SIGMA[i5 * 16 + 5]]);
          B2S_G(3, 7, 11, 15, m3[SIGMA[i5 * 16 + 6]], m3[SIGMA[i5 * 16 + 7]]);
          B2S_G(0, 5, 10, 15, m3[SIGMA[i5 * 16 + 8]], m3[SIGMA[i5 * 16 + 9]]);
          B2S_G(1, 6, 11, 12, m3[SIGMA[i5 * 16 + 10]], m3[SIGMA[i5 * 16 + 11]]);
          B2S_G(2, 7, 8, 13, m3[SIGMA[i5 * 16 + 12]], m3[SIGMA[i5 * 16 + 13]]);
          B2S_G(3, 4, 9, 14, m3[SIGMA[i5 * 16 + 14]], m3[SIGMA[i5 * 16 + 15]]);
        }
        for (i5 = 0; i5 < 8; i5++) {
          ctx.h[i5] ^= v13[i5] ^ v13[i5 + 8];
        }
      }
      function blake2sInit(outlen, key2) {
        if (!(outlen > 0 && outlen <= 32)) {
          throw new Error("Incorrect output length, should be in [1, 32]");
        }
        const keylen = key2 ? key2.length : 0;
        if (key2 && !(keylen > 0 && keylen <= 32)) {
          throw new Error("Incorrect key length, should be in [1, 32]");
        }
        const ctx = {
          h: new Uint32Array(BLAKE2S_IV),
          // hash state
          b: new Uint8Array(64),
          // input block
          c: 0,
          // pointer within block
          t: 0,
          // input count
          outlen
          // output length in bytes
        };
        ctx.h[0] ^= 16842752 ^ keylen << 8 ^ outlen;
        if (keylen > 0) {
          blake2sUpdate(ctx, key2);
          ctx.c = 64;
        }
        return ctx;
      }
      function blake2sUpdate(ctx, input) {
        for (let i5 = 0; i5 < input.length; i5++) {
          if (ctx.c === 64) {
            ctx.t += ctx.c;
            blake2sCompress(ctx, false);
            ctx.c = 0;
          }
          ctx.b[ctx.c++] = input[i5];
        }
      }
      function blake2sFinal(ctx) {
        ctx.t += ctx.c;
        while (ctx.c < 64) {
          ctx.b[ctx.c++] = 0;
        }
        blake2sCompress(ctx, true);
        const out = new Uint8Array(ctx.outlen);
        for (let i5 = 0; i5 < ctx.outlen; i5++) {
          out[i5] = ctx.h[i5 >> 2] >> 8 * (i5 & 3) & 255;
        }
        return out;
      }
      function blake2s(input, key2, outlen) {
        outlen = outlen || 32;
        input = util.normalizeInput(input);
        const ctx = blake2sInit(outlen, key2);
        blake2sUpdate(ctx, input);
        return blake2sFinal(ctx);
      }
      function blake2sHex(input, key2, outlen) {
        const output = blake2s(input, key2, outlen);
        return util.toHex(output);
      }
      module.exports = {
        blake2s,
        blake2sHex,
        blake2sInit,
        blake2sUpdate,
        blake2sFinal
      };
    }
  });

  // ../../node_modules/.pnpm/blakejs@1.2.1/node_modules/blakejs/index.js
  var require_blakejs = __commonJS({
    "../../node_modules/.pnpm/blakejs@1.2.1/node_modules/blakejs/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var b2b = require_blake2b();
      var b2s = require_blake2s();
      module.exports = {
        blake2b: b2b.blake2b,
        blake2bHex: b2b.blake2bHex,
        blake2bInit: b2b.blake2bInit,
        blake2bUpdate: b2b.blake2bUpdate,
        blake2bFinal: b2b.blake2bFinal,
        blake2s: b2s.blake2s,
        blake2sHex: b2s.blake2sHex,
        blake2sInit: b2s.blake2sInit,
        blake2sUpdate: b2s.blake2sUpdate,
        blake2sFinal: b2s.blake2sFinal
      };
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/crypto.js
  var require_crypto3 = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/crypto.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.isBrowserCryptoAvailable = exports.getSubtleCrypto = exports.getBrowerCrypto = void 0;
      function getBrowerCrypto() {
        return (global === null || global === void 0 ? void 0 : global.crypto) || (global === null || global === void 0 ? void 0 : global.msCrypto) || {};
      }
      exports.getBrowerCrypto = getBrowerCrypto;
      function getSubtleCrypto() {
        const browserCrypto = getBrowerCrypto();
        return browserCrypto.subtle || browserCrypto.webkitSubtle;
      }
      exports.getSubtleCrypto = getSubtleCrypto;
      function isBrowserCryptoAvailable() {
        return !!getBrowerCrypto() && !!getSubtleCrypto();
      }
      exports.isBrowserCryptoAvailable = isBrowserCryptoAvailable;
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/env.js
  var require_env = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/env.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.isBrowser = exports.isNode = exports.isReactNative = void 0;
      function isReactNative() {
        return typeof document === "undefined" && typeof navigator !== "undefined" && navigator.product === "ReactNative";
      }
      exports.isReactNative = isReactNative;
      function isNode2() {
        return typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined";
      }
      exports.isNode = isNode2;
      function isBrowser() {
        return !isReactNative() && !isNode2();
      }
      exports.isBrowser = isBrowser;
    }
  });

  // ../../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/index.js
  var require_cjs4 = __commonJS({
    "../../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
      tslib_1.__exportStar(require_crypto3(), exports);
      tslib_1.__exportStar(require_env(), exports);
    }
  });

  // ../../node_modules/.pnpm/ws@7.5.10_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/browser.js
  var require_browser4 = __commonJS({
    "../../node_modules/.pnpm/ws@7.5.10_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/browser.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      module.exports = function() {
        throw new Error(
          "ws does not work in the browser. Browser clients must use the native WebSocket object"
        );
      };
    }
  });

  // ../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js
  var require_quick_format_unescaped = __commonJS({
    "../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      function tryStringify(o5) {
        try {
          return JSON.stringify(o5);
        } catch (e2) {
          return '"[Circular]"';
        }
      }
      module.exports = format;
      function format(f7, args, opts) {
        var ss2 = opts && opts.stringify || tryStringify;
        var offset2 = 1;
        if (typeof f7 === "object" && f7 !== null) {
          var len = args.length + offset2;
          if (len === 1) return f7;
          var objects = new Array(len);
          objects[0] = ss2(f7);
          for (var index2 = 1; index2 < len; index2++) {
            objects[index2] = ss2(args[index2]);
          }
          return objects.join(" ");
        }
        if (typeof f7 !== "string") {
          return f7;
        }
        var argLen = args.length;
        if (argLen === 0) return f7;
        var str = "";
        var a5 = 1 - offset2;
        var lastPos = -1;
        var flen = f7 && f7.length || 0;
        for (var i5 = 0; i5 < flen; ) {
          if (f7.charCodeAt(i5) === 37 && i5 + 1 < flen) {
            lastPos = lastPos > -1 ? lastPos : 0;
            switch (f7.charCodeAt(i5 + 1)) {
              case 100:
              // 'd'
              case 102:
                if (a5 >= argLen)
                  break;
                if (args[a5] == null) break;
                if (lastPos < i5)
                  str += f7.slice(lastPos, i5);
                str += Number(args[a5]);
                lastPos = i5 + 2;
                i5++;
                break;
              case 105:
                if (a5 >= argLen)
                  break;
                if (args[a5] == null) break;
                if (lastPos < i5)
                  str += f7.slice(lastPos, i5);
                str += Math.floor(Number(args[a5]));
                lastPos = i5 + 2;
                i5++;
                break;
              case 79:
              // 'O'
              case 111:
              // 'o'
              case 106:
                if (a5 >= argLen)
                  break;
                if (args[a5] === void 0) break;
                if (lastPos < i5)
                  str += f7.slice(lastPos, i5);
                var type2 = typeof args[a5];
                if (type2 === "string") {
                  str += "'" + args[a5] + "'";
                  lastPos = i5 + 2;
                  i5++;
                  break;
                }
                if (type2 === "function") {
                  str += args[a5].name || "<anonymous>";
                  lastPos = i5 + 2;
                  i5++;
                  break;
                }
                str += ss2(args[a5]);
                lastPos = i5 + 2;
                i5++;
                break;
              case 115:
                if (a5 >= argLen)
                  break;
                if (lastPos < i5)
                  str += f7.slice(lastPos, i5);
                str += String(args[a5]);
                lastPos = i5 + 2;
                i5++;
                break;
              case 37:
                if (lastPos < i5)
                  str += f7.slice(lastPos, i5);
                str += "%";
                lastPos = i5 + 2;
                i5++;
                a5--;
                break;
            }
            ++a5;
          }
          ++i5;
        }
        if (lastPos === -1)
          return f7;
        else if (lastPos < flen) {
          str += f7.slice(lastPos);
        }
        return str;
      }
    }
  });

  // ../../node_modules/.pnpm/pino@7.11.0/node_modules/pino/browser.js
  var require_browser5 = __commonJS({
    "../../node_modules/.pnpm/pino@7.11.0/node_modules/pino/browser.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var format = require_quick_format_unescaped();
      module.exports = pino;
      var _console = pfGlobalThisOrFallback().console || {};
      var stdSerializers = {
        mapHttpRequest: mock,
        mapHttpResponse: mock,
        wrapRequestSerializer: passthrough,
        wrapResponseSerializer: passthrough,
        wrapErrorSerializer: passthrough,
        req: mock,
        res: mock,
        err: asErrValue
      };
      function shouldSerialize(serialize2, serializers3) {
        if (Array.isArray(serialize2)) {
          const hasToFilter = serialize2.filter(function(k7) {
            return k7 !== "!stdSerializers.err";
          });
          return hasToFilter;
        } else if (serialize2 === true) {
          return Object.keys(serializers3);
        }
        return false;
      }
      function pino(opts) {
        opts = opts || {};
        opts.browser = opts.browser || {};
        const transmit2 = opts.browser.transmit;
        if (transmit2 && typeof transmit2.send !== "function") {
          throw Error("pino: transmit option must have a send function");
        }
        const proto = opts.browser.write || _console;
        if (opts.browser.write) opts.browser.asObject = true;
        const serializers3 = opts.serializers || {};
        const serialize2 = shouldSerialize(opts.browser.serialize, serializers3);
        let stdErrSerialize = opts.browser.serialize;
        if (Array.isArray(opts.browser.serialize) && opts.browser.serialize.indexOf("!stdSerializers.err") > -1) stdErrSerialize = false;
        const levels = ["error", "fatal", "warn", "info", "debug", "trace"];
        if (typeof proto === "function") {
          proto.error = proto.fatal = proto.warn = proto.info = proto.debug = proto.trace = proto;
        }
        if (opts.enabled === false) opts.level = "silent";
        const level = opts.level || "info";
        const logger9 = Object.create(proto);
        if (!logger9.log) logger9.log = noop2;
        Object.defineProperty(logger9, "levelVal", {
          get: getLevelVal
        });
        Object.defineProperty(logger9, "level", {
          get: getLevel,
          set: setLevel
        });
        const setOpts = {
          transmit: transmit2,
          serialize: serialize2,
          asObject: opts.browser.asObject,
          levels,
          timestamp: getTimeFunction(opts)
        };
        logger9.levels = pino.levels;
        logger9.level = level;
        logger9.setMaxListeners = logger9.getMaxListeners = logger9.emit = logger9.addListener = logger9.on = logger9.prependListener = logger9.once = logger9.prependOnceListener = logger9.removeListener = logger9.removeAllListeners = logger9.listeners = logger9.listenerCount = logger9.eventNames = logger9.write = logger9.flush = noop2;
        logger9.serializers = serializers3;
        logger9._serialize = serialize2;
        logger9._stdErrSerialize = stdErrSerialize;
        logger9.child = child;
        if (transmit2) logger9._logEvent = createLogEventShape();
        function getLevelVal() {
          return this.level === "silent" ? Infinity : this.levels.values[this.level];
        }
        function getLevel() {
          return this._level;
        }
        function setLevel(level2) {
          if (level2 !== "silent" && !this.levels.values[level2]) {
            throw Error("unknown level " + level2);
          }
          this._level = level2;
          set3(setOpts, logger9, "error", "log");
          set3(setOpts, logger9, "fatal", "error");
          set3(setOpts, logger9, "warn", "error");
          set3(setOpts, logger9, "info", "log");
          set3(setOpts, logger9, "debug", "log");
          set3(setOpts, logger9, "trace", "log");
        }
        function child(bindings, childOptions) {
          if (!bindings) {
            throw new Error("missing bindings for child Pino");
          }
          childOptions = childOptions || {};
          if (serialize2 && bindings.serializers) {
            childOptions.serializers = bindings.serializers;
          }
          const childOptionsSerializers = childOptions.serializers;
          if (serialize2 && childOptionsSerializers) {
            var childSerializers = Object.assign({}, serializers3, childOptionsSerializers);
            var childSerialize = opts.browser.serialize === true ? Object.keys(childSerializers) : serialize2;
            delete bindings.serializers;
            applySerializers([bindings], childSerialize, childSerializers, this._stdErrSerialize);
          }
          function Child(parent) {
            this._childLevel = (parent._childLevel | 0) + 1;
            this.error = bind(parent, bindings, "error");
            this.fatal = bind(parent, bindings, "fatal");
            this.warn = bind(parent, bindings, "warn");
            this.info = bind(parent, bindings, "info");
            this.debug = bind(parent, bindings, "debug");
            this.trace = bind(parent, bindings, "trace");
            if (childSerializers) {
              this.serializers = childSerializers;
              this._serialize = childSerialize;
            }
            if (transmit2) {
              this._logEvent = createLogEventShape(
                [].concat(parent._logEvent.bindings, bindings)
              );
            }
          }
          Child.prototype = this;
          return new Child(this);
        }
        return logger9;
      }
      pino.levels = {
        values: {
          fatal: 60,
          error: 50,
          warn: 40,
          info: 30,
          debug: 20,
          trace: 10
        },
        labels: {
          10: "trace",
          20: "debug",
          30: "info",
          40: "warn",
          50: "error",
          60: "fatal"
        }
      };
      pino.stdSerializers = stdSerializers;
      pino.stdTimeFunctions = Object.assign({}, { nullTime, epochTime, unixTime, isoTime });
      function set3(opts, logger9, level, fallback) {
        const proto = Object.getPrototypeOf(logger9);
        logger9[level] = logger9.levelVal > logger9.levels.values[level] ? noop2 : proto[level] ? proto[level] : _console[level] || _console[fallback] || noop2;
        wrap3(opts, logger9, level);
      }
      function wrap3(opts, logger9, level) {
        if (!opts.transmit && logger9[level] === noop2) return;
        logger9[level] = /* @__PURE__ */ (function(write) {
          return function LOG() {
            const ts2 = opts.timestamp();
            const args = new Array(arguments.length);
            const proto = Object.getPrototypeOf && Object.getPrototypeOf(this) === _console ? _console : this;
            for (var i5 = 0; i5 < args.length; i5++) args[i5] = arguments[i5];
            if (opts.serialize && !opts.asObject) {
              applySerializers(args, this._serialize, this.serializers, this._stdErrSerialize);
            }
            if (opts.asObject) write.call(proto, asObject(this, level, args, ts2));
            else write.apply(proto, args);
            if (opts.transmit) {
              const transmitLevel = opts.transmit.level || logger9.level;
              const transmitValue = pino.levels.values[transmitLevel];
              const methodValue = pino.levels.values[level];
              if (methodValue < transmitValue) return;
              transmit(this, {
                ts: ts2,
                methodLevel: level,
                methodValue,
                transmitLevel,
                transmitValue: pino.levels.values[opts.transmit.level || logger9.level],
                send: opts.transmit.send,
                val: logger9.levelVal
              }, args);
            }
          };
        })(logger9[level]);
      }
      function asObject(logger9, level, args, ts2) {
        if (logger9._serialize) applySerializers(args, logger9._serialize, logger9.serializers, logger9._stdErrSerialize);
        const argsCloned = args.slice();
        let msg = argsCloned[0];
        const o5 = {};
        if (ts2) {
          o5.time = ts2;
        }
        o5.level = pino.levels.values[level];
        let lvl = (logger9._childLevel | 0) + 1;
        if (lvl < 1) lvl = 1;
        if (msg !== null && typeof msg === "object") {
          while (lvl-- && typeof argsCloned[0] === "object") {
            Object.assign(o5, argsCloned.shift());
          }
          msg = argsCloned.length ? format(argsCloned.shift(), argsCloned) : void 0;
        } else if (typeof msg === "string") msg = format(argsCloned.shift(), argsCloned);
        if (msg !== void 0) o5.msg = msg;
        return o5;
      }
      function applySerializers(args, serialize2, serializers3, stdErrSerialize) {
        for (const i5 in args) {
          if (stdErrSerialize && args[i5] instanceof Error) {
            args[i5] = pino.stdSerializers.err(args[i5]);
          } else if (typeof args[i5] === "object" && !Array.isArray(args[i5])) {
            for (const k7 in args[i5]) {
              if (serialize2 && serialize2.indexOf(k7) > -1 && k7 in serializers3) {
                args[i5][k7] = serializers3[k7](args[i5][k7]);
              }
            }
          }
        }
      }
      function bind(parent, bindings, level) {
        return function() {
          const args = new Array(1 + arguments.length);
          args[0] = bindings;
          for (var i5 = 1; i5 < args.length; i5++) {
            args[i5] = arguments[i5 - 1];
          }
          return parent[level].apply(this, args);
        };
      }
      function transmit(logger9, opts, args) {
        const send = opts.send;
        const ts2 = opts.ts;
        const methodLevel = opts.methodLevel;
        const methodValue = opts.methodValue;
        const val = opts.val;
        const bindings = logger9._logEvent.bindings;
        applySerializers(
          args,
          logger9._serialize || Object.keys(logger9.serializers),
          logger9.serializers,
          logger9._stdErrSerialize === void 0 ? true : logger9._stdErrSerialize
        );
        logger9._logEvent.ts = ts2;
        logger9._logEvent.messages = args.filter(function(arg) {
          return bindings.indexOf(arg) === -1;
        });
        logger9._logEvent.level.label = methodLevel;
        logger9._logEvent.level.value = methodValue;
        send(methodLevel, logger9._logEvent, val);
        logger9._logEvent = createLogEventShape(bindings);
      }
      function createLogEventShape(bindings) {
        return {
          ts: 0,
          messages: [],
          bindings: bindings || [],
          level: { label: "", value: 0 }
        };
      }
      function asErrValue(err2) {
        const obj = {
          type: err2.constructor.name,
          msg: err2.message,
          stack: err2.stack
        };
        for (const key2 in err2) {
          if (obj[key2] === void 0) {
            obj[key2] = err2[key2];
          }
        }
        return obj;
      }
      function getTimeFunction(opts) {
        if (typeof opts.timestamp === "function") {
          return opts.timestamp;
        }
        if (opts.timestamp === false) {
          return nullTime;
        }
        return epochTime;
      }
      function mock() {
        return {};
      }
      function passthrough(a5) {
        return a5;
      }
      function noop2() {
      }
      function nullTime() {
        return false;
      }
      function epochTime() {
        return Date.now();
      }
      function unixTime() {
        return Math.round(Date.now() / 1e3);
      }
      function isoTime() {
        return new Date(Date.now()).toISOString();
      }
      function pfGlobalThisOrFallback() {
        function defd(o5) {
          return typeof o5 !== "undefined" && o5;
        }
        try {
          if (typeof globalThis !== "undefined") return globalThis;
          Object.defineProperty(Object.prototype, "globalThis", {
            get: function() {
              delete Object.prototype.globalThis;
              return this.globalThis = this;
            },
            configurable: true
          });
          return globalThis;
        } catch (e2) {
          return defd(self) || defd(window) || defd(this) || {};
        }
      }
    }
  });

  // ../../node_modules/.pnpm/strict-uri-encode@2.0.0/node_modules/strict-uri-encode/index.js
  var require_strict_uri_encode = __commonJS({
    "../../node_modules/.pnpm/strict-uri-encode@2.0.0/node_modules/strict-uri-encode/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      module.exports = (str) => encodeURIComponent(str).replace(/[!'()*]/g, (x13) => `%${x13.charCodeAt(0).toString(16).toUpperCase()}`);
    }
  });

  // ../../node_modules/.pnpm/decode-uri-component@0.2.2/node_modules/decode-uri-component/index.js
  var require_decode_uri_component = __commonJS({
    "../../node_modules/.pnpm/decode-uri-component@0.2.2/node_modules/decode-uri-component/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var token = "%[a-f0-9]{2}";
      var singleMatcher = new RegExp("(" + token + ")|([^%]+?)", "gi");
      var multiMatcher = new RegExp("(" + token + ")+", "gi");
      function decodeComponents(components, split3) {
        try {
          return [decodeURIComponent(components.join(""))];
        } catch (err2) {
        }
        if (components.length === 1) {
          return components;
        }
        split3 = split3 || 1;
        var left = components.slice(0, split3);
        var right = components.slice(split3);
        return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));
      }
      function decode9(input) {
        try {
          return decodeURIComponent(input);
        } catch (err2) {
          var tokens = input.match(singleMatcher) || [];
          for (var i5 = 1; i5 < tokens.length; i5++) {
            input = decodeComponents(tokens, i5).join("");
            tokens = input.match(singleMatcher) || [];
          }
          return input;
        }
      }
      function customDecodeURIComponent(input) {
        var replaceMap = {
          "%FE%FF": "\uFFFD\uFFFD",
          "%FF%FE": "\uFFFD\uFFFD"
        };
        var match = multiMatcher.exec(input);
        while (match) {
          try {
            replaceMap[match[0]] = decodeURIComponent(match[0]);
          } catch (err2) {
            var result = decode9(match[0]);
            if (result !== match[0]) {
              replaceMap[match[0]] = result;
            }
          }
          match = multiMatcher.exec(input);
        }
        replaceMap["%C2"] = "\uFFFD";
        var entries = Object.keys(replaceMap);
        for (var i5 = 0; i5 < entries.length; i5++) {
          var key2 = entries[i5];
          input = input.replace(new RegExp(key2, "g"), replaceMap[key2]);
        }
        return input;
      }
      module.exports = function(encodedURI) {
        if (typeof encodedURI !== "string") {
          throw new TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof encodedURI + "`");
        }
        try {
          encodedURI = encodedURI.replace(/\+/g, " ");
          return decodeURIComponent(encodedURI);
        } catch (err2) {
          return customDecodeURIComponent(encodedURI);
        }
      };
    }
  });

  // ../../node_modules/.pnpm/split-on-first@1.1.0/node_modules/split-on-first/index.js
  var require_split_on_first = __commonJS({
    "../../node_modules/.pnpm/split-on-first@1.1.0/node_modules/split-on-first/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      module.exports = (string7, separator) => {
        if (!(typeof string7 === "string" && typeof separator === "string")) {
          throw new TypeError("Expected the arguments to be of type `string`");
        }
        if (separator === "") {
          return [string7];
        }
        const separatorIndex = string7.indexOf(separator);
        if (separatorIndex === -1) {
          return [string7];
        }
        return [
          string7.slice(0, separatorIndex),
          string7.slice(separatorIndex + separator.length)
        ];
      };
    }
  });

  // ../../node_modules/.pnpm/filter-obj@1.1.0/node_modules/filter-obj/index.js
  var require_filter_obj = __commonJS({
    "../../node_modules/.pnpm/filter-obj@1.1.0/node_modules/filter-obj/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      module.exports = function(obj, predicate) {
        var ret = {};
        var keys2 = Object.keys(obj);
        var isArr = Array.isArray(predicate);
        for (var i5 = 0; i5 < keys2.length; i5++) {
          var key2 = keys2[i5];
          var val = obj[key2];
          if (isArr ? predicate.indexOf(key2) !== -1 : predicate(key2, val, obj)) {
            ret[key2] = val;
          }
        }
        return ret;
      };
    }
  });

  // ../../node_modules/.pnpm/query-string@7.1.3/node_modules/query-string/index.js
  var require_query_string = __commonJS({
    "../../node_modules/.pnpm/query-string@7.1.3/node_modules/query-string/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var strictUriEncode = require_strict_uri_encode();
      var decodeComponent = require_decode_uri_component();
      var splitOnFirst = require_split_on_first();
      var filterObject = require_filter_obj();
      var isNullOrUndefined = (value) => value === null || value === void 0;
      var encodeFragmentIdentifier = /* @__PURE__ */ Symbol("encodeFragmentIdentifier");
      function encoderForArrayFormat(options) {
        switch (options.arrayFormat) {
          case "index":
            return (key2) => (result, value) => {
              const index2 = result.length;
              if (value === void 0 || options.skipNull && value === null || options.skipEmptyString && value === "") {
                return result;
              }
              if (value === null) {
                return [...result, [encode11(key2, options), "[", index2, "]"].join("")];
              }
              return [
                ...result,
                [encode11(key2, options), "[", encode11(index2, options), "]=", encode11(value, options)].join("")
              ];
            };
          case "bracket":
            return (key2) => (result, value) => {
              if (value === void 0 || options.skipNull && value === null || options.skipEmptyString && value === "") {
                return result;
              }
              if (value === null) {
                return [...result, [encode11(key2, options), "[]"].join("")];
              }
              return [...result, [encode11(key2, options), "[]=", encode11(value, options)].join("")];
            };
          case "colon-list-separator":
            return (key2) => (result, value) => {
              if (value === void 0 || options.skipNull && value === null || options.skipEmptyString && value === "") {
                return result;
              }
              if (value === null) {
                return [...result, [encode11(key2, options), ":list="].join("")];
              }
              return [...result, [encode11(key2, options), ":list=", encode11(value, options)].join("")];
            };
          case "comma":
          case "separator":
          case "bracket-separator": {
            const keyValueSep = options.arrayFormat === "bracket-separator" ? "[]=" : "=";
            return (key2) => (result, value) => {
              if (value === void 0 || options.skipNull && value === null || options.skipEmptyString && value === "") {
                return result;
              }
              value = value === null ? "" : value;
              if (result.length === 0) {
                return [[encode11(key2, options), keyValueSep, encode11(value, options)].join("")];
              }
              return [[result, encode11(value, options)].join(options.arrayFormatSeparator)];
            };
          }
          default:
            return (key2) => (result, value) => {
              if (value === void 0 || options.skipNull && value === null || options.skipEmptyString && value === "") {
                return result;
              }
              if (value === null) {
                return [...result, encode11(key2, options)];
              }
              return [...result, [encode11(key2, options), "=", encode11(value, options)].join("")];
            };
        }
      }
      function parserForArrayFormat(options) {
        let result;
        switch (options.arrayFormat) {
          case "index":
            return (key2, value, accumulator) => {
              result = /\[(\d*)\]$/.exec(key2);
              key2 = key2.replace(/\[\d*\]$/, "");
              if (!result) {
                accumulator[key2] = value;
                return;
              }
              if (accumulator[key2] === void 0) {
                accumulator[key2] = {};
              }
              accumulator[key2][result[1]] = value;
            };
          case "bracket":
            return (key2, value, accumulator) => {
              result = /(\[\])$/.exec(key2);
              key2 = key2.replace(/\[\]$/, "");
              if (!result) {
                accumulator[key2] = value;
                return;
              }
              if (accumulator[key2] === void 0) {
                accumulator[key2] = [value];
                return;
              }
              accumulator[key2] = [].concat(accumulator[key2], value);
            };
          case "colon-list-separator":
            return (key2, value, accumulator) => {
              result = /(:list)$/.exec(key2);
              key2 = key2.replace(/:list$/, "");
              if (!result) {
                accumulator[key2] = value;
                return;
              }
              if (accumulator[key2] === void 0) {
                accumulator[key2] = [value];
                return;
              }
              accumulator[key2] = [].concat(accumulator[key2], value);
            };
          case "comma":
          case "separator":
            return (key2, value, accumulator) => {
              const isArray = typeof value === "string" && value.includes(options.arrayFormatSeparator);
              const isEncodedArray = typeof value === "string" && !isArray && decode9(value, options).includes(options.arrayFormatSeparator);
              value = isEncodedArray ? decode9(value, options) : value;
              const newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map((item) => decode9(item, options)) : value === null ? value : decode9(value, options);
              accumulator[key2] = newValue;
            };
          case "bracket-separator":
            return (key2, value, accumulator) => {
              const isArray = /(\[\])$/.test(key2);
              key2 = key2.replace(/\[\]$/, "");
              if (!isArray) {
                accumulator[key2] = value ? decode9(value, options) : value;
                return;
              }
              const arrayValue = value === null ? [] : value.split(options.arrayFormatSeparator).map((item) => decode9(item, options));
              if (accumulator[key2] === void 0) {
                accumulator[key2] = arrayValue;
                return;
              }
              accumulator[key2] = [].concat(accumulator[key2], arrayValue);
            };
          default:
            return (key2, value, accumulator) => {
              if (accumulator[key2] === void 0) {
                accumulator[key2] = value;
                return;
              }
              accumulator[key2] = [].concat(accumulator[key2], value);
            };
        }
      }
      function validateArrayFormatSeparator(value) {
        if (typeof value !== "string" || value.length !== 1) {
          throw new TypeError("arrayFormatSeparator must be single character string");
        }
      }
      function encode11(value, options) {
        if (options.encode) {
          return options.strict ? strictUriEncode(value) : encodeURIComponent(value);
        }
        return value;
      }
      function decode9(value, options) {
        if (options.decode) {
          return decodeComponent(value);
        }
        return value;
      }
      function keysSorter(input) {
        if (Array.isArray(input)) {
          return input.sort();
        }
        if (typeof input === "object") {
          return keysSorter(Object.keys(input)).sort((a5, b9) => Number(a5) - Number(b9)).map((key2) => input[key2]);
        }
        return input;
      }
      function removeHash(input) {
        const hashStart = input.indexOf("#");
        if (hashStart !== -1) {
          input = input.slice(0, hashStart);
        }
        return input;
      }
      function getHash2(url2) {
        let hash5 = "";
        const hashStart = url2.indexOf("#");
        if (hashStart !== -1) {
          hash5 = url2.slice(hashStart);
        }
        return hash5;
      }
      function extract4(input) {
        input = removeHash(input);
        const queryStart = input.indexOf("?");
        if (queryStart === -1) {
          return "";
        }
        return input.slice(queryStart + 1);
      }
      function parseValue(value, options) {
        if (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === "string" && value.trim() !== "")) {
          value = Number(value);
        } else if (options.parseBooleans && value !== null && (value.toLowerCase() === "true" || value.toLowerCase() === "false")) {
          value = value.toLowerCase() === "true";
        }
        return value;
      }
      function parse5(query, options) {
        options = Object.assign({
          decode: true,
          sort: true,
          arrayFormat: "none",
          arrayFormatSeparator: ",",
          parseNumbers: false,
          parseBooleans: false
        }, options);
        validateArrayFormatSeparator(options.arrayFormatSeparator);
        const formatter = parserForArrayFormat(options);
        const ret = /* @__PURE__ */ Object.create(null);
        if (typeof query !== "string") {
          return ret;
        }
        query = query.trim().replace(/^[?#&]/, "");
        if (!query) {
          return ret;
        }
        for (const param of query.split("&")) {
          if (param === "") {
            continue;
          }
          let [key2, value] = splitOnFirst(options.decode ? param.replace(/\+/g, " ") : param, "=");
          value = value === void 0 ? null : ["comma", "separator", "bracket-separator"].includes(options.arrayFormat) ? value : decode9(value, options);
          formatter(decode9(key2, options), value, ret);
        }
        for (const key2 of Object.keys(ret)) {
          const value = ret[key2];
          if (typeof value === "object" && value !== null) {
            for (const k7 of Object.keys(value)) {
              value[k7] = parseValue(value[k7], options);
            }
          } else {
            ret[key2] = parseValue(value, options);
          }
        }
        if (options.sort === false) {
          return ret;
        }
        return (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key2) => {
          const value = ret[key2];
          if (Boolean(value) && typeof value === "object" && !Array.isArray(value)) {
            result[key2] = keysSorter(value);
          } else {
            result[key2] = value;
          }
          return result;
        }, /* @__PURE__ */ Object.create(null));
      }
      exports.extract = extract4;
      exports.parse = parse5;
      exports.stringify = (object2, options) => {
        if (!object2) {
          return "";
        }
        options = Object.assign({
          encode: true,
          strict: true,
          arrayFormat: "none",
          arrayFormatSeparator: ","
        }, options);
        validateArrayFormatSeparator(options.arrayFormatSeparator);
        const shouldFilter = (key2) => options.skipNull && isNullOrUndefined(object2[key2]) || options.skipEmptyString && object2[key2] === "";
        const formatter = encoderForArrayFormat(options);
        const objectCopy = {};
        for (const key2 of Object.keys(object2)) {
          if (!shouldFilter(key2)) {
            objectCopy[key2] = object2[key2];
          }
        }
        const keys2 = Object.keys(objectCopy);
        if (options.sort !== false) {
          keys2.sort(options.sort);
        }
        return keys2.map((key2) => {
          const value = object2[key2];
          if (value === void 0) {
            return "";
          }
          if (value === null) {
            return encode11(key2, options);
          }
          if (Array.isArray(value)) {
            if (value.length === 0 && options.arrayFormat === "bracket-separator") {
              return encode11(key2, options) + "[]";
            }
            return value.reduce(formatter(key2), []).join("&");
          }
          return encode11(key2, options) + "=" + encode11(value, options);
        }).filter((x13) => x13.length > 0).join("&");
      };
      exports.parseUrl = (url2, options) => {
        options = Object.assign({
          decode: true
        }, options);
        const [url_, hash5] = splitOnFirst(url2, "#");
        return Object.assign(
          {
            url: url_.split("?")[0] || "",
            query: parse5(extract4(url2), options)
          },
          options && options.parseFragmentIdentifier && hash5 ? { fragmentIdentifier: decode9(hash5, options) } : {}
        );
      };
      exports.stringifyUrl = (object2, options) => {
        options = Object.assign({
          encode: true,
          strict: true,
          [encodeFragmentIdentifier]: true
        }, options);
        const url2 = removeHash(object2.url).split("?")[0] || "";
        const queryFromUrl = exports.extract(object2.url);
        const parsedQueryFromUrl = exports.parse(queryFromUrl, { sort: false });
        const query = Object.assign(parsedQueryFromUrl, object2.query);
        let queryString = exports.stringify(query, options);
        if (queryString) {
          queryString = `?${queryString}`;
        }
        let hash5 = getHash2(object2.url);
        if (object2.fragmentIdentifier) {
          hash5 = `#${options[encodeFragmentIdentifier] ? encode11(object2.fragmentIdentifier, options) : object2.fragmentIdentifier}`;
        }
        return `${url2}${queryString}${hash5}`;
      };
      exports.pick = (input, filter, options) => {
        options = Object.assign({
          parseFragmentIdentifier: true,
          [encodeFragmentIdentifier]: false
        }, options);
        const { url: url2, query, fragmentIdentifier } = exports.parseUrl(input, options);
        return exports.stringifyUrl({
          url: url2,
          query: filterObject(query, filter),
          fragmentIdentifier
        }, options);
      };
      exports.exclude = (input, filter, options) => {
        const exclusionFilter = Array.isArray(filter) ? (key2) => !filter.includes(key2) : (key2, value) => !filter(key2, value);
        return exports.pick(input, exclusionFilter, options);
      };
    }
  });

  // ../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js
  var require_sha3 = __commonJS({
    "../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      (function() {
        "use strict";
        var INPUT_ERROR = "input is invalid type";
        var FINALIZE_ERROR = "finalize already called";
        var WINDOW = typeof window === "object";
        var root = WINDOW ? window : {};
        if (root.JS_SHA3_NO_WINDOW) {
          WINDOW = false;
        }
        var WEB_WORKER = !WINDOW && typeof self === "object";
        var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === "object" && process.versions && process.versions.node;
        if (NODE_JS) {
          root = global;
        } else if (WEB_WORKER) {
          root = self;
        }
        var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === "object" && module.exports;
        var AMD = typeof define === "function" && define.amd;
        var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== "undefined";
        var HEX_CHARS = "0123456789abcdef".split("");
        var SHAKE_PADDING = [31, 7936, 2031616, 520093696];
        var CSHAKE_PADDING = [4, 1024, 262144, 67108864];
        var KECCAK_PADDING = [1, 256, 65536, 16777216];
        var PADDING = [6, 1536, 393216, 100663296];
        var SHIFT = [0, 8, 16, 24];
        var RC = [
          1,
          0,
          32898,
          0,
          32906,
          2147483648,
          2147516416,
          2147483648,
          32907,
          0,
          2147483649,
          0,
          2147516545,
          2147483648,
          32777,
          2147483648,
          138,
          0,
          136,
          0,
          2147516425,
          0,
          2147483658,
          0,
          2147516555,
          0,
          139,
          2147483648,
          32905,
          2147483648,
          32771,
          2147483648,
          32770,
          2147483648,
          128,
          2147483648,
          32778,
          0,
          2147483658,
          2147483648,
          2147516545,
          2147483648,
          32896,
          2147483648,
          2147483649,
          0,
          2147516424,
          2147483648
        ];
        var BITS = [224, 256, 384, 512];
        var SHAKE_BITS = [128, 256];
        var OUTPUT_TYPES = ["hex", "buffer", "arrayBuffer", "array", "digest"];
        var CSHAKE_BYTEPAD = {
          "128": 168,
          "256": 136
        };
        if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {
          Array.isArray = function(obj) {
            return Object.prototype.toString.call(obj) === "[object Array]";
          };
        }
        if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {
          ArrayBuffer.isView = function(obj) {
            return typeof obj === "object" && obj.buffer && obj.buffer.constructor === ArrayBuffer;
          };
        }
        var createOutputMethod = function(bits2, padding, outputType) {
          return function(message) {
            return new Keccak2(bits2, padding, bits2).update(message)[outputType]();
          };
        };
        var createShakeOutputMethod = function(bits2, padding, outputType) {
          return function(message, outputBits) {
            return new Keccak2(bits2, padding, outputBits).update(message)[outputType]();
          };
        };
        var createCshakeOutputMethod = function(bits2, padding, outputType) {
          return function(message, outputBits, n6, s3) {
            return methods["cshake" + bits2].update(message, outputBits, n6, s3)[outputType]();
          };
        };
        var createKmacOutputMethod = function(bits2, padding, outputType) {
          return function(key2, message, outputBits, s3) {
            return methods["kmac" + bits2].update(key2, message, outputBits, s3)[outputType]();
          };
        };
        var createOutputMethods = function(method, createMethod2, bits2, padding) {
          for (var i6 = 0; i6 < OUTPUT_TYPES.length; ++i6) {
            var type2 = OUTPUT_TYPES[i6];
            method[type2] = createMethod2(bits2, padding, type2);
          }
          return method;
        };
        var createMethod = function(bits2, padding) {
          var method = createOutputMethod(bits2, padding, "hex");
          method.create = function() {
            return new Keccak2(bits2, padding, bits2);
          };
          method.update = function(message) {
            return method.create().update(message);
          };
          return createOutputMethods(method, createOutputMethod, bits2, padding);
        };
        var createShakeMethod = function(bits2, padding) {
          var method = createShakeOutputMethod(bits2, padding, "hex");
          method.create = function(outputBits) {
            return new Keccak2(bits2, padding, outputBits);
          };
          method.update = function(message, outputBits) {
            return method.create(outputBits).update(message);
          };
          return createOutputMethods(method, createShakeOutputMethod, bits2, padding);
        };
        var createCshakeMethod = function(bits2, padding) {
          var w7 = CSHAKE_BYTEPAD[bits2];
          var method = createCshakeOutputMethod(bits2, padding, "hex");
          method.create = function(outputBits, n6, s3) {
            if (!n6 && !s3) {
              return methods["shake" + bits2].create(outputBits);
            } else {
              return new Keccak2(bits2, padding, outputBits).bytepad([n6, s3], w7);
            }
          };
          method.update = function(message, outputBits, n6, s3) {
            return method.create(outputBits, n6, s3).update(message);
          };
          return createOutputMethods(method, createCshakeOutputMethod, bits2, padding);
        };
        var createKmacMethod = function(bits2, padding) {
          var w7 = CSHAKE_BYTEPAD[bits2];
          var method = createKmacOutputMethod(bits2, padding, "hex");
          method.create = function(key2, outputBits, s3) {
            return new Kmac(bits2, padding, outputBits).bytepad(["KMAC", s3], w7).bytepad([key2], w7);
          };
          method.update = function(key2, message, outputBits, s3) {
            return method.create(key2, outputBits, s3).update(message);
          };
          return createOutputMethods(method, createKmacOutputMethod, bits2, padding);
        };
        var algorithms = [
          { name: "keccak", padding: KECCAK_PADDING, bits: BITS, createMethod },
          { name: "sha3", padding: PADDING, bits: BITS, createMethod },
          { name: "shake", padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },
          { name: "cshake", padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },
          { name: "kmac", padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }
        ];
        var methods = {}, methodNames = [];
        for (var i5 = 0; i5 < algorithms.length; ++i5) {
          var algorithm = algorithms[i5];
          var bits = algorithm.bits;
          for (var j6 = 0; j6 < bits.length; ++j6) {
            var methodName = algorithm.name + "_" + bits[j6];
            methodNames.push(methodName);
            methods[methodName] = algorithm.createMethod(bits[j6], algorithm.padding);
            if (algorithm.name !== "sha3") {
              var newMethodName = algorithm.name + bits[j6];
              methodNames.push(newMethodName);
              methods[newMethodName] = methods[methodName];
            }
          }
        }
        function Keccak2(bits2, padding, outputBits) {
          this.blocks = [];
          this.s = [];
          this.padding = padding;
          this.outputBits = outputBits;
          this.reset = true;
          this.finalized = false;
          this.block = 0;
          this.start = 0;
          this.blockCount = 1600 - (bits2 << 1) >> 5;
          this.byteCount = this.blockCount << 2;
          this.outputBlocks = outputBits >> 5;
          this.extraBytes = (outputBits & 31) >> 3;
          for (var i6 = 0; i6 < 50; ++i6) {
            this.s[i6] = 0;
          }
        }
        Keccak2.prototype.update = function(message) {
          if (this.finalized) {
            throw new Error(FINALIZE_ERROR);
          }
          var notString, type2 = typeof message;
          if (type2 !== "string") {
            if (type2 === "object") {
              if (message === null) {
                throw new Error(INPUT_ERROR);
              } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {
                message = new Uint8Array(message);
              } else if (!Array.isArray(message)) {
                if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {
                  throw new Error(INPUT_ERROR);
                }
              }
            } else {
              throw new Error(INPUT_ERROR);
            }
            notString = true;
          }
          var blocks = this.blocks, byteCount = this.byteCount, length2 = message.length, blockCount = this.blockCount, index2 = 0, s3 = this.s, i6, code2;
          while (index2 < length2) {
            if (this.reset) {
              this.reset = false;
              blocks[0] = this.block;
              for (i6 = 1; i6 < blockCount + 1; ++i6) {
                blocks[i6] = 0;
              }
            }
            if (notString) {
              for (i6 = this.start; index2 < length2 && i6 < byteCount; ++index2) {
                blocks[i6 >> 2] |= message[index2] << SHIFT[i6++ & 3];
              }
            } else {
              for (i6 = this.start; index2 < length2 && i6 < byteCount; ++index2) {
                code2 = message.charCodeAt(index2);
                if (code2 < 128) {
                  blocks[i6 >> 2] |= code2 << SHIFT[i6++ & 3];
                } else if (code2 < 2048) {
                  blocks[i6 >> 2] |= (192 | code2 >> 6) << SHIFT[i6++ & 3];
                  blocks[i6 >> 2] |= (128 | code2 & 63) << SHIFT[i6++ & 3];
                } else if (code2 < 55296 || code2 >= 57344) {
                  blocks[i6 >> 2] |= (224 | code2 >> 12) << SHIFT[i6++ & 3];
                  blocks[i6 >> 2] |= (128 | code2 >> 6 & 63) << SHIFT[i6++ & 3];
                  blocks[i6 >> 2] |= (128 | code2 & 63) << SHIFT[i6++ & 3];
                } else {
                  code2 = 65536 + ((code2 & 1023) << 10 | message.charCodeAt(++index2) & 1023);
                  blocks[i6 >> 2] |= (240 | code2 >> 18) << SHIFT[i6++ & 3];
                  blocks[i6 >> 2] |= (128 | code2 >> 12 & 63) << SHIFT[i6++ & 3];
                  blocks[i6 >> 2] |= (128 | code2 >> 6 & 63) << SHIFT[i6++ & 3];
                  blocks[i6 >> 2] |= (128 | code2 & 63) << SHIFT[i6++ & 3];
                }
              }
            }
            this.lastByteIndex = i6;
            if (i6 >= byteCount) {
              this.start = i6 - byteCount;
              this.block = blocks[blockCount];
              for (i6 = 0; i6 < blockCount; ++i6) {
                s3[i6] ^= blocks[i6];
              }
              f7(s3);
              this.reset = true;
            } else {
              this.start = i6;
            }
          }
          return this;
        };
        Keccak2.prototype.encode = function(x13, right) {
          var o5 = x13 & 255, n6 = 1;
          var bytes = [o5];
          x13 = x13 >> 8;
          o5 = x13 & 255;
          while (o5 > 0) {
            bytes.unshift(o5);
            x13 = x13 >> 8;
            o5 = x13 & 255;
            ++n6;
          }
          if (right) {
            bytes.push(n6);
          } else {
            bytes.unshift(n6);
          }
          this.update(bytes);
          return bytes.length;
        };
        Keccak2.prototype.encodeString = function(str) {
          var notString, type2 = typeof str;
          if (type2 !== "string") {
            if (type2 === "object") {
              if (str === null) {
                throw new Error(INPUT_ERROR);
              } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {
                str = new Uint8Array(str);
              } else if (!Array.isArray(str)) {
                if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {
                  throw new Error(INPUT_ERROR);
                }
              }
            } else {
              throw new Error(INPUT_ERROR);
            }
            notString = true;
          }
          var bytes = 0, length2 = str.length;
          if (notString) {
            bytes = length2;
          } else {
            for (var i6 = 0; i6 < str.length; ++i6) {
              var code2 = str.charCodeAt(i6);
              if (code2 < 128) {
                bytes += 1;
              } else if (code2 < 2048) {
                bytes += 2;
              } else if (code2 < 55296 || code2 >= 57344) {
                bytes += 3;
              } else {
                code2 = 65536 + ((code2 & 1023) << 10 | str.charCodeAt(++i6) & 1023);
                bytes += 4;
              }
            }
          }
          bytes += this.encode(bytes * 8);
          this.update(str);
          return bytes;
        };
        Keccak2.prototype.bytepad = function(strs, w7) {
          var bytes = this.encode(w7);
          for (var i6 = 0; i6 < strs.length; ++i6) {
            bytes += this.encodeString(strs[i6]);
          }
          var paddingBytes = w7 - bytes % w7;
          var zeros = [];
          zeros.length = paddingBytes;
          this.update(zeros);
          return this;
        };
        Keccak2.prototype.finalize = function() {
          if (this.finalized) {
            return;
          }
          this.finalized = true;
          var blocks = this.blocks, i6 = this.lastByteIndex, blockCount = this.blockCount, s3 = this.s;
          blocks[i6 >> 2] |= this.padding[i6 & 3];
          if (this.lastByteIndex === this.byteCount) {
            blocks[0] = blocks[blockCount];
            for (i6 = 1; i6 < blockCount + 1; ++i6) {
              blocks[i6] = 0;
            }
          }
          blocks[blockCount - 1] |= 2147483648;
          for (i6 = 0; i6 < blockCount; ++i6) {
            s3[i6] ^= blocks[i6];
          }
          f7(s3);
        };
        Keccak2.prototype.toString = Keccak2.prototype.hex = function() {
          this.finalize();
          var blockCount = this.blockCount, s3 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i6 = 0, j7 = 0;
          var hex3 = "", block;
          while (j7 < outputBlocks) {
            for (i6 = 0; i6 < blockCount && j7 < outputBlocks; ++i6, ++j7) {
              block = s3[i6];
              hex3 += HEX_CHARS[block >> 4 & 15] + HEX_CHARS[block & 15] + HEX_CHARS[block >> 12 & 15] + HEX_CHARS[block >> 8 & 15] + HEX_CHARS[block >> 20 & 15] + HEX_CHARS[block >> 16 & 15] + HEX_CHARS[block >> 28 & 15] + HEX_CHARS[block >> 24 & 15];
            }
            if (j7 % blockCount === 0) {
              f7(s3);
              i6 = 0;
            }
          }
          if (extraBytes) {
            block = s3[i6];
            hex3 += HEX_CHARS[block >> 4 & 15] + HEX_CHARS[block & 15];
            if (extraBytes > 1) {
              hex3 += HEX_CHARS[block >> 12 & 15] + HEX_CHARS[block >> 8 & 15];
            }
            if (extraBytes > 2) {
              hex3 += HEX_CHARS[block >> 20 & 15] + HEX_CHARS[block >> 16 & 15];
            }
          }
          return hex3;
        };
        Keccak2.prototype.arrayBuffer = function() {
          this.finalize();
          var blockCount = this.blockCount, s3 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i6 = 0, j7 = 0;
          var bytes = this.outputBits >> 3;
          var buffer2;
          if (extraBytes) {
            buffer2 = new ArrayBuffer(outputBlocks + 1 << 2);
          } else {
            buffer2 = new ArrayBuffer(bytes);
          }
          var array3 = new Uint32Array(buffer2);
          while (j7 < outputBlocks) {
            for (i6 = 0; i6 < blockCount && j7 < outputBlocks; ++i6, ++j7) {
              array3[j7] = s3[i6];
            }
            if (j7 % blockCount === 0) {
              f7(s3);
            }
          }
          if (extraBytes) {
            array3[i6] = s3[i6];
            buffer2 = buffer2.slice(0, bytes);
          }
          return buffer2;
        };
        Keccak2.prototype.buffer = Keccak2.prototype.arrayBuffer;
        Keccak2.prototype.digest = Keccak2.prototype.array = function() {
          this.finalize();
          var blockCount = this.blockCount, s3 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i6 = 0, j7 = 0;
          var array3 = [], offset2, block;
          while (j7 < outputBlocks) {
            for (i6 = 0; i6 < blockCount && j7 < outputBlocks; ++i6, ++j7) {
              offset2 = j7 << 2;
              block = s3[i6];
              array3[offset2] = block & 255;
              array3[offset2 + 1] = block >> 8 & 255;
              array3[offset2 + 2] = block >> 16 & 255;
              array3[offset2 + 3] = block >> 24 & 255;
            }
            if (j7 % blockCount === 0) {
              f7(s3);
            }
          }
          if (extraBytes) {
            offset2 = j7 << 2;
            block = s3[i6];
            array3[offset2] = block & 255;
            if (extraBytes > 1) {
              array3[offset2 + 1] = block >> 8 & 255;
            }
            if (extraBytes > 2) {
              array3[offset2 + 2] = block >> 16 & 255;
            }
          }
          return array3;
        };
        function Kmac(bits2, padding, outputBits) {
          Keccak2.call(this, bits2, padding, outputBits);
        }
        Kmac.prototype = new Keccak2();
        Kmac.prototype.finalize = function() {
          this.encode(this.outputBits, true);
          return Keccak2.prototype.finalize.call(this);
        };
        var f7 = function(s3) {
          var h8, l6, n6, c0, c1, c22, c32, c42, c52, c62, c7, c8, c9, b0, b1, b22, b32, b42, b52, b62, b72, b82, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b222, b23, b24, b25, b26, b27, b28, b29, b30, b31, b322, b33, b34, b35, b36, b37, b38, b39, b40, b41, b422, b43, b44, b45, b46, b47, b48, b49;
          for (n6 = 0; n6 < 48; n6 += 2) {
            c0 = s3[0] ^ s3[10] ^ s3[20] ^ s3[30] ^ s3[40];
            c1 = s3[1] ^ s3[11] ^ s3[21] ^ s3[31] ^ s3[41];
            c22 = s3[2] ^ s3[12] ^ s3[22] ^ s3[32] ^ s3[42];
            c32 = s3[3] ^ s3[13] ^ s3[23] ^ s3[33] ^ s3[43];
            c42 = s3[4] ^ s3[14] ^ s3[24] ^ s3[34] ^ s3[44];
            c52 = s3[5] ^ s3[15] ^ s3[25] ^ s3[35] ^ s3[45];
            c62 = s3[6] ^ s3[16] ^ s3[26] ^ s3[36] ^ s3[46];
            c7 = s3[7] ^ s3[17] ^ s3[27] ^ s3[37] ^ s3[47];
            c8 = s3[8] ^ s3[18] ^ s3[28] ^ s3[38] ^ s3[48];
            c9 = s3[9] ^ s3[19] ^ s3[29] ^ s3[39] ^ s3[49];
            h8 = c8 ^ (c22 << 1 | c32 >>> 31);
            l6 = c9 ^ (c32 << 1 | c22 >>> 31);
            s3[0] ^= h8;
            s3[1] ^= l6;
            s3[10] ^= h8;
            s3[11] ^= l6;
            s3[20] ^= h8;
            s3[21] ^= l6;
            s3[30] ^= h8;
            s3[31] ^= l6;
            s3[40] ^= h8;
            s3[41] ^= l6;
            h8 = c0 ^ (c42 << 1 | c52 >>> 31);
            l6 = c1 ^ (c52 << 1 | c42 >>> 31);
            s3[2] ^= h8;
            s3[3] ^= l6;
            s3[12] ^= h8;
            s3[13] ^= l6;
            s3[22] ^= h8;
            s3[23] ^= l6;
            s3[32] ^= h8;
            s3[33] ^= l6;
            s3[42] ^= h8;
            s3[43] ^= l6;
            h8 = c22 ^ (c62 << 1 | c7 >>> 31);
            l6 = c32 ^ (c7 << 1 | c62 >>> 31);
            s3[4] ^= h8;
            s3[5] ^= l6;
            s3[14] ^= h8;
            s3[15] ^= l6;
            s3[24] ^= h8;
            s3[25] ^= l6;
            s3[34] ^= h8;
            s3[35] ^= l6;
            s3[44] ^= h8;
            s3[45] ^= l6;
            h8 = c42 ^ (c8 << 1 | c9 >>> 31);
            l6 = c52 ^ (c9 << 1 | c8 >>> 31);
            s3[6] ^= h8;
            s3[7] ^= l6;
            s3[16] ^= h8;
            s3[17] ^= l6;
            s3[26] ^= h8;
            s3[27] ^= l6;
            s3[36] ^= h8;
            s3[37] ^= l6;
            s3[46] ^= h8;
            s3[47] ^= l6;
            h8 = c62 ^ (c0 << 1 | c1 >>> 31);
            l6 = c7 ^ (c1 << 1 | c0 >>> 31);
            s3[8] ^= h8;
            s3[9] ^= l6;
            s3[18] ^= h8;
            s3[19] ^= l6;
            s3[28] ^= h8;
            s3[29] ^= l6;
            s3[38] ^= h8;
            s3[39] ^= l6;
            s3[48] ^= h8;
            s3[49] ^= l6;
            b0 = s3[0];
            b1 = s3[1];
            b322 = s3[11] << 4 | s3[10] >>> 28;
            b33 = s3[10] << 4 | s3[11] >>> 28;
            b14 = s3[20] << 3 | s3[21] >>> 29;
            b15 = s3[21] << 3 | s3[20] >>> 29;
            b46 = s3[31] << 9 | s3[30] >>> 23;
            b47 = s3[30] << 9 | s3[31] >>> 23;
            b28 = s3[40] << 18 | s3[41] >>> 14;
            b29 = s3[41] << 18 | s3[40] >>> 14;
            b20 = s3[2] << 1 | s3[3] >>> 31;
            b21 = s3[3] << 1 | s3[2] >>> 31;
            b22 = s3[13] << 12 | s3[12] >>> 20;
            b32 = s3[12] << 12 | s3[13] >>> 20;
            b34 = s3[22] << 10 | s3[23] >>> 22;
            b35 = s3[23] << 10 | s3[22] >>> 22;
            b16 = s3[33] << 13 | s3[32] >>> 19;
            b17 = s3[32] << 13 | s3[33] >>> 19;
            b48 = s3[42] << 2 | s3[43] >>> 30;
            b49 = s3[43] << 2 | s3[42] >>> 30;
            b40 = s3[5] << 30 | s3[4] >>> 2;
            b41 = s3[4] << 30 | s3[5] >>> 2;
            b222 = s3[14] << 6 | s3[15] >>> 26;
            b23 = s3[15] << 6 | s3[14] >>> 26;
            b42 = s3[25] << 11 | s3[24] >>> 21;
            b52 = s3[24] << 11 | s3[25] >>> 21;
            b36 = s3[34] << 15 | s3[35] >>> 17;
            b37 = s3[35] << 15 | s3[34] >>> 17;
            b18 = s3[45] << 29 | s3[44] >>> 3;
            b19 = s3[44] << 29 | s3[45] >>> 3;
            b10 = s3[6] << 28 | s3[7] >>> 4;
            b11 = s3[7] << 28 | s3[6] >>> 4;
            b422 = s3[17] << 23 | s3[16] >>> 9;
            b43 = s3[16] << 23 | s3[17] >>> 9;
            b24 = s3[26] << 25 | s3[27] >>> 7;
            b25 = s3[27] << 25 | s3[26] >>> 7;
            b62 = s3[36] << 21 | s3[37] >>> 11;
            b72 = s3[37] << 21 | s3[36] >>> 11;
            b38 = s3[47] << 24 | s3[46] >>> 8;
            b39 = s3[46] << 24 | s3[47] >>> 8;
            b30 = s3[8] << 27 | s3[9] >>> 5;
            b31 = s3[9] << 27 | s3[8] >>> 5;
            b12 = s3[18] << 20 | s3[19] >>> 12;
            b13 = s3[19] << 20 | s3[18] >>> 12;
            b44 = s3[29] << 7 | s3[28] >>> 25;
            b45 = s3[28] << 7 | s3[29] >>> 25;
            b26 = s3[38] << 8 | s3[39] >>> 24;
            b27 = s3[39] << 8 | s3[38] >>> 24;
            b82 = s3[48] << 14 | s3[49] >>> 18;
            b9 = s3[49] << 14 | s3[48] >>> 18;
            s3[0] = b0 ^ ~b22 & b42;
            s3[1] = b1 ^ ~b32 & b52;
            s3[10] = b10 ^ ~b12 & b14;
            s3[11] = b11 ^ ~b13 & b15;
            s3[20] = b20 ^ ~b222 & b24;
            s3[21] = b21 ^ ~b23 & b25;
            s3[30] = b30 ^ ~b322 & b34;
            s3[31] = b31 ^ ~b33 & b35;
            s3[40] = b40 ^ ~b422 & b44;
            s3[41] = b41 ^ ~b43 & b45;
            s3[2] = b22 ^ ~b42 & b62;
            s3[3] = b32 ^ ~b52 & b72;
            s3[12] = b12 ^ ~b14 & b16;
            s3[13] = b13 ^ ~b15 & b17;
            s3[22] = b222 ^ ~b24 & b26;
            s3[23] = b23 ^ ~b25 & b27;
            s3[32] = b322 ^ ~b34 & b36;
            s3[33] = b33 ^ ~b35 & b37;
            s3[42] = b422 ^ ~b44 & b46;
            s3[43] = b43 ^ ~b45 & b47;
            s3[4] = b42 ^ ~b62 & b82;
            s3[5] = b52 ^ ~b72 & b9;
            s3[14] = b14 ^ ~b16 & b18;
            s3[15] = b15 ^ ~b17 & b19;
            s3[24] = b24 ^ ~b26 & b28;
            s3[25] = b25 ^ ~b27 & b29;
            s3[34] = b34 ^ ~b36 & b38;
            s3[35] = b35 ^ ~b37 & b39;
            s3[44] = b44 ^ ~b46 & b48;
            s3[45] = b45 ^ ~b47 & b49;
            s3[6] = b62 ^ ~b82 & b0;
            s3[7] = b72 ^ ~b9 & b1;
            s3[16] = b16 ^ ~b18 & b10;
            s3[17] = b17 ^ ~b19 & b11;
            s3[26] = b26 ^ ~b28 & b20;
            s3[27] = b27 ^ ~b29 & b21;
            s3[36] = b36 ^ ~b38 & b30;
            s3[37] = b37 ^ ~b39 & b31;
            s3[46] = b46 ^ ~b48 & b40;
            s3[47] = b47 ^ ~b49 & b41;
            s3[8] = b82 ^ ~b0 & b22;
            s3[9] = b9 ^ ~b1 & b32;
            s3[18] = b18 ^ ~b10 & b12;
            s3[19] = b19 ^ ~b11 & b13;
            s3[28] = b28 ^ ~b20 & b222;
            s3[29] = b29 ^ ~b21 & b23;
            s3[38] = b38 ^ ~b30 & b322;
            s3[39] = b39 ^ ~b31 & b33;
            s3[48] = b48 ^ ~b40 & b422;
            s3[49] = b49 ^ ~b41 & b43;
            s3[0] ^= RC[n6];
            s3[1] ^= RC[n6 + 1];
          }
        };
        if (COMMON_JS) {
          module.exports = methods;
        } else {
          for (i5 = 0; i5 < methodNames.length; ++i5) {
            root[methodNames[i5]] = methods[methodNames[i5]];
          }
          if (AMD) {
            define(function() {
              return methods;
            });
          }
        }
      })();
    }
  });

  // ../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js
  var require_minimalistic_assert = __commonJS({
    "../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      module.exports = assert12;
      function assert12(val, msg) {
        if (!val)
          throw new Error(msg || "Assertion failed");
      }
      assert12.equal = function assertEqual3(l6, r3, msg) {
        if (l6 != r3)
          throw new Error(msg || "Assertion failed: " + l6 + " != " + r3);
      };
    }
  });

  // ../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js
  var require_inherits_browser = __commonJS({
    "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      if (typeof Object.create === "function") {
        module.exports = function inherits(ctor, superCtor) {
          if (superCtor) {
            ctor.super_ = superCtor;
            ctor.prototype = Object.create(superCtor.prototype, {
              constructor: {
                value: ctor,
                enumerable: false,
                writable: true,
                configurable: true
              }
            });
          }
        };
      } else {
        module.exports = function inherits(ctor, superCtor) {
          if (superCtor) {
            ctor.super_ = superCtor;
            var TempCtor = function() {
            };
            TempCtor.prototype = superCtor.prototype;
            ctor.prototype = new TempCtor();
            ctor.prototype.constructor = ctor;
          }
        };
      }
    }
  });

  // ../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js
  var require_utils3 = __commonJS({
    "../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var assert12 = require_minimalistic_assert();
      var inherits = require_inherits_browser();
      exports.inherits = inherits;
      function isSurrogatePair(msg, i5) {
        if ((msg.charCodeAt(i5) & 64512) !== 55296) {
          return false;
        }
        if (i5 < 0 || i5 + 1 >= msg.length) {
          return false;
        }
        return (msg.charCodeAt(i5 + 1) & 64512) === 56320;
      }
      function toArray(msg, enc) {
        if (Array.isArray(msg))
          return msg.slice();
        if (!msg)
          return [];
        var res = [];
        if (typeof msg === "string") {
          if (!enc) {
            var p7 = 0;
            for (var i5 = 0; i5 < msg.length; i5++) {
              var c7 = msg.charCodeAt(i5);
              if (c7 < 128) {
                res[p7++] = c7;
              } else if (c7 < 2048) {
                res[p7++] = c7 >> 6 | 192;
                res[p7++] = c7 & 63 | 128;
              } else if (isSurrogatePair(msg, i5)) {
                c7 = 65536 + ((c7 & 1023) << 10) + (msg.charCodeAt(++i5) & 1023);
                res[p7++] = c7 >> 18 | 240;
                res[p7++] = c7 >> 12 & 63 | 128;
                res[p7++] = c7 >> 6 & 63 | 128;
                res[p7++] = c7 & 63 | 128;
              } else {
                res[p7++] = c7 >> 12 | 224;
                res[p7++] = c7 >> 6 & 63 | 128;
                res[p7++] = c7 & 63 | 128;
              }
            }
          } else if (enc === "hex") {
            msg = msg.replace(/[^a-z0-9]+/ig, "");
            if (msg.length % 2 !== 0)
              msg = "0" + msg;
            for (i5 = 0; i5 < msg.length; i5 += 2)
              res.push(parseInt(msg[i5] + msg[i5 + 1], 16));
          }
        } else {
          for (i5 = 0; i5 < msg.length; i5++)
            res[i5] = msg[i5] | 0;
        }
        return res;
      }
      exports.toArray = toArray;
      function toHex3(msg) {
        var res = "";
        for (var i5 = 0; i5 < msg.length; i5++)
          res += zero2(msg[i5].toString(16));
        return res;
      }
      exports.toHex = toHex3;
      function htonl(w7) {
        var res = w7 >>> 24 | w7 >>> 8 & 65280 | w7 << 8 & 16711680 | (w7 & 255) << 24;
        return res >>> 0;
      }
      exports.htonl = htonl;
      function toHex32(msg, endian) {
        var res = "";
        for (var i5 = 0; i5 < msg.length; i5++) {
          var w7 = msg[i5];
          if (endian === "little")
            w7 = htonl(w7);
          res += zero8(w7.toString(16));
        }
        return res;
      }
      exports.toHex32 = toHex32;
      function zero2(word) {
        if (word.length === 1)
          return "0" + word;
        else
          return word;
      }
      exports.zero2 = zero2;
      function zero8(word) {
        if (word.length === 7)
          return "0" + word;
        else if (word.length === 6)
          return "00" + word;
        else if (word.length === 5)
          return "000" + word;
        else if (word.length === 4)
          return "0000" + word;
        else if (word.length === 3)
          return "00000" + word;
        else if (word.length === 2)
          return "000000" + word;
        else if (word.length === 1)
          return "0000000" + word;
        else
          return word;
      }
      exports.zero8 = zero8;
      function join32(msg, start, end, endian) {
        var len = end - start;
        assert12(len % 4 === 0);
        var res = new Array(len / 4);
        for (var i5 = 0, k7 = start; i5 < res.length; i5++, k7 += 4) {
          var w7;
          if (endian === "big")
            w7 = msg[k7] << 24 | msg[k7 + 1] << 16 | msg[k7 + 2] << 8 | msg[k7 + 3];
          else
            w7 = msg[k7 + 3] << 24 | msg[k7 + 2] << 16 | msg[k7 + 1] << 8 | msg[k7];
          res[i5] = w7 >>> 0;
        }
        return res;
      }
      exports.join32 = join32;
      function split32(msg, endian) {
        var res = new Array(msg.length * 4);
        for (var i5 = 0, k7 = 0; i5 < msg.length; i5++, k7 += 4) {
          var m3 = msg[i5];
          if (endian === "big") {
            res[k7] = m3 >>> 24;
            res[k7 + 1] = m3 >>> 16 & 255;
            res[k7 + 2] = m3 >>> 8 & 255;
            res[k7 + 3] = m3 & 255;
          } else {
            res[k7 + 3] = m3 >>> 24;
            res[k7 + 2] = m3 >>> 16 & 255;
            res[k7 + 1] = m3 >>> 8 & 255;
            res[k7] = m3 & 255;
          }
        }
        return res;
      }
      exports.split32 = split32;
      function rotr32(w7, b9) {
        return w7 >>> b9 | w7 << 32 - b9;
      }
      exports.rotr32 = rotr32;
      function rotl32(w7, b9) {
        return w7 << b9 | w7 >>> 32 - b9;
      }
      exports.rotl32 = rotl32;
      function sum32(a5, b9) {
        return a5 + b9 >>> 0;
      }
      exports.sum32 = sum32;
      function sum32_3(a5, b9, c7) {
        return a5 + b9 + c7 >>> 0;
      }
      exports.sum32_3 = sum32_3;
      function sum32_4(a5, b9, c7, d6) {
        return a5 + b9 + c7 + d6 >>> 0;
      }
      exports.sum32_4 = sum32_4;
      function sum32_5(a5, b9, c7, d6, e2) {
        return a5 + b9 + c7 + d6 + e2 >>> 0;
      }
      exports.sum32_5 = sum32_5;
      function sum64(buf, pos, ah, al) {
        var bh = buf[pos];
        var bl = buf[pos + 1];
        var lo4 = al + bl >>> 0;
        var hi2 = (lo4 < al ? 1 : 0) + ah + bh;
        buf[pos] = hi2 >>> 0;
        buf[pos + 1] = lo4;
      }
      exports.sum64 = sum64;
      function sum64_hi(ah, al, bh, bl) {
        var lo4 = al + bl >>> 0;
        var hi2 = (lo4 < al ? 1 : 0) + ah + bh;
        return hi2 >>> 0;
      }
      exports.sum64_hi = sum64_hi;
      function sum64_lo(ah, al, bh, bl) {
        var lo4 = al + bl;
        return lo4 >>> 0;
      }
      exports.sum64_lo = sum64_lo;
      function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {
        var carry = 0;
        var lo4 = al;
        lo4 = lo4 + bl >>> 0;
        carry += lo4 < al ? 1 : 0;
        lo4 = lo4 + cl >>> 0;
        carry += lo4 < cl ? 1 : 0;
        lo4 = lo4 + dl >>> 0;
        carry += lo4 < dl ? 1 : 0;
        var hi2 = ah + bh + ch + dh + carry;
        return hi2 >>> 0;
      }
      exports.sum64_4_hi = sum64_4_hi;
      function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {
        var lo4 = al + bl + cl + dl;
        return lo4 >>> 0;
      }
      exports.sum64_4_lo = sum64_4_lo;
      function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
        var carry = 0;
        var lo4 = al;
        lo4 = lo4 + bl >>> 0;
        carry += lo4 < al ? 1 : 0;
        lo4 = lo4 + cl >>> 0;
        carry += lo4 < cl ? 1 : 0;
        lo4 = lo4 + dl >>> 0;
        carry += lo4 < dl ? 1 : 0;
        lo4 = lo4 + el >>> 0;
        carry += lo4 < el ? 1 : 0;
        var hi2 = ah + bh + ch + dh + eh + carry;
        return hi2 >>> 0;
      }
      exports.sum64_5_hi = sum64_5_hi;
      function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
        var lo4 = al + bl + cl + dl + el;
        return lo4 >>> 0;
      }
      exports.sum64_5_lo = sum64_5_lo;
      function rotr64_hi(ah, al, num2) {
        var r3 = al << 32 - num2 | ah >>> num2;
        return r3 >>> 0;
      }
      exports.rotr64_hi = rotr64_hi;
      function rotr64_lo(ah, al, num2) {
        var r3 = ah << 32 - num2 | al >>> num2;
        return r3 >>> 0;
      }
      exports.rotr64_lo = rotr64_lo;
      function shr64_hi(ah, al, num2) {
        return ah >>> num2;
      }
      exports.shr64_hi = shr64_hi;
      function shr64_lo(ah, al, num2) {
        var r3 = ah << 32 - num2 | al >>> num2;
        return r3 >>> 0;
      }
      exports.shr64_lo = shr64_lo;
    }
  });

  // ../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js
  var require_common = __commonJS({
    "../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var utils = require_utils3();
      var assert12 = require_minimalistic_assert();
      function BlockHash() {
        this.pending = null;
        this.pendingTotal = 0;
        this.blockSize = this.constructor.blockSize;
        this.outSize = this.constructor.outSize;
        this.hmacStrength = this.constructor.hmacStrength;
        this.padLength = this.constructor.padLength / 8;
        this.endian = "big";
        this._delta8 = this.blockSize / 8;
        this._delta32 = this.blockSize / 32;
      }
      exports.BlockHash = BlockHash;
      BlockHash.prototype.update = function update2(msg, enc) {
        msg = utils.toArray(msg, enc);
        if (!this.pending)
          this.pending = msg;
        else
          this.pending = this.pending.concat(msg);
        this.pendingTotal += msg.length;
        if (this.pending.length >= this._delta8) {
          msg = this.pending;
          var r3 = msg.length % this._delta8;
          this.pending = msg.slice(msg.length - r3, msg.length);
          if (this.pending.length === 0)
            this.pending = null;
          msg = utils.join32(msg, 0, msg.length - r3, this.endian);
          for (var i5 = 0; i5 < msg.length; i5 += this._delta32)
            this._update(msg, i5, i5 + this._delta32);
        }
        return this;
      };
      BlockHash.prototype.digest = function digest2(enc) {
        this.update(this._pad());
        assert12(this.pending === null);
        return this._digest(enc);
      };
      BlockHash.prototype._pad = function pad4() {
        var len = this.pendingTotal;
        var bytes = this._delta8;
        var k7 = bytes - (len + this.padLength) % bytes;
        var res = new Array(k7 + this.padLength);
        res[0] = 128;
        for (var i5 = 1; i5 < k7; i5++)
          res[i5] = 0;
        len <<= 3;
        if (this.endian === "big") {
          for (var t = 8; t < this.padLength; t++)
            res[i5++] = 0;
          res[i5++] = 0;
          res[i5++] = 0;
          res[i5++] = 0;
          res[i5++] = 0;
          res[i5++] = len >>> 24 & 255;
          res[i5++] = len >>> 16 & 255;
          res[i5++] = len >>> 8 & 255;
          res[i5++] = len & 255;
        } else {
          res[i5++] = len & 255;
          res[i5++] = len >>> 8 & 255;
          res[i5++] = len >>> 16 & 255;
          res[i5++] = len >>> 24 & 255;
          res[i5++] = 0;
          res[i5++] = 0;
          res[i5++] = 0;
          res[i5++] = 0;
          for (t = 8; t < this.padLength; t++)
            res[i5++] = 0;
        }
        return res;
      };
    }
  });

  // ../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js
  var require_common2 = __commonJS({
    "../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var utils = require_utils3();
      var rotr32 = utils.rotr32;
      function ft_1(s3, x13, y11, z11) {
        if (s3 === 0)
          return ch32(x13, y11, z11);
        if (s3 === 1 || s3 === 3)
          return p32(x13, y11, z11);
        if (s3 === 2)
          return maj32(x13, y11, z11);
      }
      exports.ft_1 = ft_1;
      function ch32(x13, y11, z11) {
        return x13 & y11 ^ ~x13 & z11;
      }
      exports.ch32 = ch32;
      function maj32(x13, y11, z11) {
        return x13 & y11 ^ x13 & z11 ^ y11 & z11;
      }
      exports.maj32 = maj32;
      function p32(x13, y11, z11) {
        return x13 ^ y11 ^ z11;
      }
      exports.p32 = p32;
      function s0_256(x13) {
        return rotr32(x13, 2) ^ rotr32(x13, 13) ^ rotr32(x13, 22);
      }
      exports.s0_256 = s0_256;
      function s1_256(x13) {
        return rotr32(x13, 6) ^ rotr32(x13, 11) ^ rotr32(x13, 25);
      }
      exports.s1_256 = s1_256;
      function g0_256(x13) {
        return rotr32(x13, 7) ^ rotr32(x13, 18) ^ x13 >>> 3;
      }
      exports.g0_256 = g0_256;
      function g1_256(x13) {
        return rotr32(x13, 17) ^ rotr32(x13, 19) ^ x13 >>> 10;
      }
      exports.g1_256 = g1_256;
    }
  });

  // ../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js
  var require__ = __commonJS({
    "../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var utils = require_utils3();
      var common = require_common();
      var shaCommon = require_common2();
      var rotl32 = utils.rotl32;
      var sum32 = utils.sum32;
      var sum32_5 = utils.sum32_5;
      var ft_1 = shaCommon.ft_1;
      var BlockHash = common.BlockHash;
      var sha1_K = [
        1518500249,
        1859775393,
        2400959708,
        3395469782
      ];
      function SHA1() {
        if (!(this instanceof SHA1))
          return new SHA1();
        BlockHash.call(this);
        this.h = [
          1732584193,
          4023233417,
          2562383102,
          271733878,
          3285377520
        ];
        this.W = new Array(80);
      }
      utils.inherits(SHA1, BlockHash);
      module.exports = SHA1;
      SHA1.blockSize = 512;
      SHA1.outSize = 160;
      SHA1.hmacStrength = 80;
      SHA1.padLength = 64;
      SHA1.prototype._update = function _update(msg, start) {
        var W8 = this.W;
        for (var i5 = 0; i5 < 16; i5++)
          W8[i5] = msg[start + i5];
        for (; i5 < W8.length; i5++)
          W8[i5] = rotl32(W8[i5 - 3] ^ W8[i5 - 8] ^ W8[i5 - 14] ^ W8[i5 - 16], 1);
        var a5 = this.h[0];
        var b9 = this.h[1];
        var c7 = this.h[2];
        var d6 = this.h[3];
        var e2 = this.h[4];
        for (i5 = 0; i5 < W8.length; i5++) {
          var s3 = ~~(i5 / 20);
          var t = sum32_5(rotl32(a5, 5), ft_1(s3, b9, c7, d6), e2, W8[i5], sha1_K[s3]);
          e2 = d6;
          d6 = c7;
          c7 = rotl32(b9, 30);
          b9 = a5;
          a5 = t;
        }
        this.h[0] = sum32(this.h[0], a5);
        this.h[1] = sum32(this.h[1], b9);
        this.h[2] = sum32(this.h[2], c7);
        this.h[3] = sum32(this.h[3], d6);
        this.h[4] = sum32(this.h[4], e2);
      };
      SHA1.prototype._digest = function digest2(enc) {
        if (enc === "hex")
          return utils.toHex32(this.h, "big");
        else
          return utils.split32(this.h, "big");
      };
    }
  });

  // ../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js
  var require__2 = __commonJS({
    "../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var utils = require_utils3();
      var common = require_common();
      var shaCommon = require_common2();
      var assert12 = require_minimalistic_assert();
      var sum32 = utils.sum32;
      var sum32_4 = utils.sum32_4;
      var sum32_5 = utils.sum32_5;
      var ch32 = shaCommon.ch32;
      var maj32 = shaCommon.maj32;
      var s0_256 = shaCommon.s0_256;
      var s1_256 = shaCommon.s1_256;
      var g0_256 = shaCommon.g0_256;
      var g1_256 = shaCommon.g1_256;
      var BlockHash = common.BlockHash;
      var sha256_K = [
        1116352408,
        1899447441,
        3049323471,
        3921009573,
        961987163,
        1508970993,
        2453635748,
        2870763221,
        3624381080,
        310598401,
        607225278,
        1426881987,
        1925078388,
        2162078206,
        2614888103,
        3248222580,
        3835390401,
        4022224774,
        264347078,
        604807628,
        770255983,
        1249150122,
        1555081692,
        1996064986,
        2554220882,
        2821834349,
        2952996808,
        3210313671,
        3336571891,
        3584528711,
        113926993,
        338241895,
        666307205,
        773529912,
        1294757372,
        1396182291,
        1695183700,
        1986661051,
        2177026350,
        2456956037,
        2730485921,
        2820302411,
        3259730800,
        3345764771,
        3516065817,
        3600352804,
        4094571909,
        275423344,
        430227734,
        506948616,
        659060556,
        883997877,
        958139571,
        1322822218,
        1537002063,
        1747873779,
        1955562222,
        2024104815,
        2227730452,
        2361852424,
        2428436474,
        2756734187,
        3204031479,
        3329325298
      ];
      function SHA2562() {
        if (!(this instanceof SHA2562))
          return new SHA2562();
        BlockHash.call(this);
        this.h = [
          1779033703,
          3144134277,
          1013904242,
          2773480762,
          1359893119,
          2600822924,
          528734635,
          1541459225
        ];
        this.k = sha256_K;
        this.W = new Array(64);
      }
      utils.inherits(SHA2562, BlockHash);
      module.exports = SHA2562;
      SHA2562.blockSize = 512;
      SHA2562.outSize = 256;
      SHA2562.hmacStrength = 192;
      SHA2562.padLength = 64;
      SHA2562.prototype._update = function _update(msg, start) {
        var W8 = this.W;
        for (var i5 = 0; i5 < 16; i5++)
          W8[i5] = msg[start + i5];
        for (; i5 < W8.length; i5++)
          W8[i5] = sum32_4(g1_256(W8[i5 - 2]), W8[i5 - 7], g0_256(W8[i5 - 15]), W8[i5 - 16]);
        var a5 = this.h[0];
        var b9 = this.h[1];
        var c7 = this.h[2];
        var d6 = this.h[3];
        var e2 = this.h[4];
        var f7 = this.h[5];
        var g8 = this.h[6];
        var h8 = this.h[7];
        assert12(this.k.length === W8.length);
        for (i5 = 0; i5 < W8.length; i5++) {
          var T1 = sum32_5(h8, s1_256(e2), ch32(e2, f7, g8), this.k[i5], W8[i5]);
          var T22 = sum32(s0_256(a5), maj32(a5, b9, c7));
          h8 = g8;
          g8 = f7;
          f7 = e2;
          e2 = sum32(d6, T1);
          d6 = c7;
          c7 = b9;
          b9 = a5;
          a5 = sum32(T1, T22);
        }
        this.h[0] = sum32(this.h[0], a5);
        this.h[1] = sum32(this.h[1], b9);
        this.h[2] = sum32(this.h[2], c7);
        this.h[3] = sum32(this.h[3], d6);
        this.h[4] = sum32(this.h[4], e2);
        this.h[5] = sum32(this.h[5], f7);
        this.h[6] = sum32(this.h[6], g8);
        this.h[7] = sum32(this.h[7], h8);
      };
      SHA2562.prototype._digest = function digest2(enc) {
        if (enc === "hex")
          return utils.toHex32(this.h, "big");
        else
          return utils.split32(this.h, "big");
      };
    }
  });

  // ../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js
  var require__3 = __commonJS({
    "../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var utils = require_utils3();
      var SHA2562 = require__2();
      function SHA2242() {
        if (!(this instanceof SHA2242))
          return new SHA2242();
        SHA2562.call(this);
        this.h = [
          3238371032,
          914150663,
          812702999,
          4144912697,
          4290775857,
          1750603025,
          1694076839,
          3204075428
        ];
      }
      utils.inherits(SHA2242, SHA2562);
      module.exports = SHA2242;
      SHA2242.blockSize = 512;
      SHA2242.outSize = 224;
      SHA2242.hmacStrength = 192;
      SHA2242.padLength = 64;
      SHA2242.prototype._digest = function digest2(enc) {
        if (enc === "hex")
          return utils.toHex32(this.h.slice(0, 7), "big");
        else
          return utils.split32(this.h.slice(0, 7), "big");
      };
    }
  });

  // ../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js
  var require__4 = __commonJS({
    "../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var utils = require_utils3();
      var common = require_common();
      var assert12 = require_minimalistic_assert();
      var rotr64_hi = utils.rotr64_hi;
      var rotr64_lo = utils.rotr64_lo;
      var shr64_hi = utils.shr64_hi;
      var shr64_lo = utils.shr64_lo;
      var sum64 = utils.sum64;
      var sum64_hi = utils.sum64_hi;
      var sum64_lo = utils.sum64_lo;
      var sum64_4_hi = utils.sum64_4_hi;
      var sum64_4_lo = utils.sum64_4_lo;
      var sum64_5_hi = utils.sum64_5_hi;
      var sum64_5_lo = utils.sum64_5_lo;
      var BlockHash = common.BlockHash;
      var sha512_K = [
        1116352408,
        3609767458,
        1899447441,
        602891725,
        3049323471,
        3964484399,
        3921009573,
        2173295548,
        961987163,
        4081628472,
        1508970993,
        3053834265,
        2453635748,
        2937671579,
        2870763221,
        3664609560,
        3624381080,
        2734883394,
        310598401,
        1164996542,
        607225278,
        1323610764,
        1426881987,
        3590304994,
        1925078388,
        4068182383,
        2162078206,
        991336113,
        2614888103,
        633803317,
        3248222580,
        3479774868,
        3835390401,
        2666613458,
        4022224774,
        944711139,
        264347078,
        2341262773,
        604807628,
        2007800933,
        770255983,
        1495990901,
        1249150122,
        1856431235,
        1555081692,
        3175218132,
        1996064986,
        2198950837,
        2554220882,
        3999719339,
        2821834349,
        766784016,
        2952996808,
        2566594879,
        3210313671,
        3203337956,
        3336571891,
        1034457026,
        3584528711,
        2466948901,
        113926993,
        3758326383,
        338241895,
        168717936,
        666307205,
        1188179964,
        773529912,
        1546045734,
        1294757372,
        1522805485,
        1396182291,
        2643833823,
        1695183700,
        2343527390,
        1986661051,
        1014477480,
        2177026350,
        1206759142,
        2456956037,
        344077627,
        2730485921,
        1290863460,
        2820302411,
        3158454273,
        3259730800,
        3505952657,
        3345764771,
        106217008,
        3516065817,
        3606008344,
        3600352804,
        1432725776,
        4094571909,
        1467031594,
        275423344,
        851169720,
        430227734,
        3100823752,
        506948616,
        1363258195,
        659060556,
        3750685593,
        883997877,
        3785050280,
        958139571,
        3318307427,
        1322822218,
        3812723403,
        1537002063,
        2003034995,
        1747873779,
        3602036899,
        1955562222,
        1575990012,
        2024104815,
        1125592928,
        2227730452,
        2716904306,
        2361852424,
        442776044,
        2428436474,
        593698344,
        2756734187,
        3733110249,
        3204031479,
        2999351573,
        3329325298,
        3815920427,
        3391569614,
        3928383900,
        3515267271,
        566280711,
        3940187606,
        3454069534,
        4118630271,
        4000239992,
        116418474,
        1914138554,
        174292421,
        2731055270,
        289380356,
        3203993006,
        460393269,
        320620315,
        685471733,
        587496836,
        852142971,
        1086792851,
        1017036298,
        365543100,
        1126000580,
        2618297676,
        1288033470,
        3409855158,
        1501505948,
        4234509866,
        1607167915,
        987167468,
        1816402316,
        1246189591
      ];
      function SHA5122() {
        if (!(this instanceof SHA5122))
          return new SHA5122();
        BlockHash.call(this);
        this.h = [
          1779033703,
          4089235720,
          3144134277,
          2227873595,
          1013904242,
          4271175723,
          2773480762,
          1595750129,
          1359893119,
          2917565137,
          2600822924,
          725511199,
          528734635,
          4215389547,
          1541459225,
          327033209
        ];
        this.k = sha512_K;
        this.W = new Array(160);
      }
      utils.inherits(SHA5122, BlockHash);
      module.exports = SHA5122;
      SHA5122.blockSize = 1024;
      SHA5122.outSize = 512;
      SHA5122.hmacStrength = 192;
      SHA5122.padLength = 128;
      SHA5122.prototype._prepareBlock = function _prepareBlock(msg, start) {
        var W8 = this.W;
        for (var i5 = 0; i5 < 32; i5++)
          W8[i5] = msg[start + i5];
        for (; i5 < W8.length; i5 += 2) {
          var c0_hi = g1_512_hi(W8[i5 - 4], W8[i5 - 3]);
          var c0_lo = g1_512_lo(W8[i5 - 4], W8[i5 - 3]);
          var c1_hi = W8[i5 - 14];
          var c1_lo = W8[i5 - 13];
          var c2_hi = g0_512_hi(W8[i5 - 30], W8[i5 - 29]);
          var c2_lo = g0_512_lo(W8[i5 - 30], W8[i5 - 29]);
          var c3_hi = W8[i5 - 32];
          var c3_lo = W8[i5 - 31];
          W8[i5] = sum64_4_hi(
            c0_hi,
            c0_lo,
            c1_hi,
            c1_lo,
            c2_hi,
            c2_lo,
            c3_hi,
            c3_lo
          );
          W8[i5 + 1] = sum64_4_lo(
            c0_hi,
            c0_lo,
            c1_hi,
            c1_lo,
            c2_hi,
            c2_lo,
            c3_hi,
            c3_lo
          );
        }
      };
      SHA5122.prototype._update = function _update(msg, start) {
        this._prepareBlock(msg, start);
        var W8 = this.W;
        var ah = this.h[0];
        var al = this.h[1];
        var bh = this.h[2];
        var bl = this.h[3];
        var ch = this.h[4];
        var cl = this.h[5];
        var dh = this.h[6];
        var dl = this.h[7];
        var eh = this.h[8];
        var el = this.h[9];
        var fh = this.h[10];
        var fl = this.h[11];
        var gh = this.h[12];
        var gl = this.h[13];
        var hh = this.h[14];
        var hl = this.h[15];
        assert12(this.k.length === W8.length);
        for (var i5 = 0; i5 < W8.length; i5 += 2) {
          var c0_hi = hh;
          var c0_lo = hl;
          var c1_hi = s1_512_hi(eh, el);
          var c1_lo = s1_512_lo(eh, el);
          var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);
          var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);
          var c3_hi = this.k[i5];
          var c3_lo = this.k[i5 + 1];
          var c4_hi = W8[i5];
          var c4_lo = W8[i5 + 1];
          var T1_hi = sum64_5_hi(
            c0_hi,
            c0_lo,
            c1_hi,
            c1_lo,
            c2_hi,
            c2_lo,
            c3_hi,
            c3_lo,
            c4_hi,
            c4_lo
          );
          var T1_lo = sum64_5_lo(
            c0_hi,
            c0_lo,
            c1_hi,
            c1_lo,
            c2_hi,
            c2_lo,
            c3_hi,
            c3_lo,
            c4_hi,
            c4_lo
          );
          c0_hi = s0_512_hi(ah, al);
          c0_lo = s0_512_lo(ah, al);
          c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);
          c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);
          var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);
          var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);
          hh = gh;
          hl = gl;
          gh = fh;
          gl = fl;
          fh = eh;
          fl = el;
          eh = sum64_hi(dh, dl, T1_hi, T1_lo);
          el = sum64_lo(dl, dl, T1_hi, T1_lo);
          dh = ch;
          dl = cl;
          ch = bh;
          cl = bl;
          bh = ah;
          bl = al;
          ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);
          al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);
        }
        sum64(this.h, 0, ah, al);
        sum64(this.h, 2, bh, bl);
        sum64(this.h, 4, ch, cl);
        sum64(this.h, 6, dh, dl);
        sum64(this.h, 8, eh, el);
        sum64(this.h, 10, fh, fl);
        sum64(this.h, 12, gh, gl);
        sum64(this.h, 14, hh, hl);
      };
      SHA5122.prototype._digest = function digest2(enc) {
        if (enc === "hex")
          return utils.toHex32(this.h, "big");
        else
          return utils.split32(this.h, "big");
      };
      function ch64_hi(xh, xl, yh, yl, zh) {
        var r3 = xh & yh ^ ~xh & zh;
        if (r3 < 0)
          r3 += 4294967296;
        return r3;
      }
      function ch64_lo(xh, xl, yh, yl, zh, zl) {
        var r3 = xl & yl ^ ~xl & zl;
        if (r3 < 0)
          r3 += 4294967296;
        return r3;
      }
      function maj64_hi(xh, xl, yh, yl, zh) {
        var r3 = xh & yh ^ xh & zh ^ yh & zh;
        if (r3 < 0)
          r3 += 4294967296;
        return r3;
      }
      function maj64_lo(xh, xl, yh, yl, zh, zl) {
        var r3 = xl & yl ^ xl & zl ^ yl & zl;
        if (r3 < 0)
          r3 += 4294967296;
        return r3;
      }
      function s0_512_hi(xh, xl) {
        var c0_hi = rotr64_hi(xh, xl, 28);
        var c1_hi = rotr64_hi(xl, xh, 2);
        var c2_hi = rotr64_hi(xl, xh, 7);
        var r3 = c0_hi ^ c1_hi ^ c2_hi;
        if (r3 < 0)
          r3 += 4294967296;
        return r3;
      }
      function s0_512_lo(xh, xl) {
        var c0_lo = rotr64_lo(xh, xl, 28);
        var c1_lo = rotr64_lo(xl, xh, 2);
        var c2_lo = rotr64_lo(xl, xh, 7);
        var r3 = c0_lo ^ c1_lo ^ c2_lo;
        if (r3 < 0)
          r3 += 4294967296;
        return r3;
      }
      function s1_512_hi(xh, xl) {
        var c0_hi = rotr64_hi(xh, xl, 14);
        var c1_hi = rotr64_hi(xh, xl, 18);
        var c2_hi = rotr64_hi(xl, xh, 9);
        var r3 = c0_hi ^ c1_hi ^ c2_hi;
        if (r3 < 0)
          r3 += 4294967296;
        return r3;
      }
      function s1_512_lo(xh, xl) {
        var c0_lo = rotr64_lo(xh, xl, 14);
        var c1_lo = rotr64_lo(xh, xl, 18);
        var c2_lo = rotr64_lo(xl, xh, 9);
        var r3 = c0_lo ^ c1_lo ^ c2_lo;
        if (r3 < 0)
          r3 += 4294967296;
        return r3;
      }
      function g0_512_hi(xh, xl) {
        var c0_hi = rotr64_hi(xh, xl, 1);
        var c1_hi = rotr64_hi(xh, xl, 8);
        var c2_hi = shr64_hi(xh, xl, 7);
        var r3 = c0_hi ^ c1_hi ^ c2_hi;
        if (r3 < 0)
          r3 += 4294967296;
        return r3;
      }
      function g0_512_lo(xh, xl) {
        var c0_lo = rotr64_lo(xh, xl, 1);
        var c1_lo = rotr64_lo(xh, xl, 8);
        var c2_lo = shr64_lo(xh, xl, 7);
        var r3 = c0_lo ^ c1_lo ^ c2_lo;
        if (r3 < 0)
          r3 += 4294967296;
        return r3;
      }
      function g1_512_hi(xh, xl) {
        var c0_hi = rotr64_hi(xh, xl, 19);
        var c1_hi = rotr64_hi(xl, xh, 29);
        var c2_hi = shr64_hi(xh, xl, 6);
        var r3 = c0_hi ^ c1_hi ^ c2_hi;
        if (r3 < 0)
          r3 += 4294967296;
        return r3;
      }
      function g1_512_lo(xh, xl) {
        var c0_lo = rotr64_lo(xh, xl, 19);
        var c1_lo = rotr64_lo(xl, xh, 29);
        var c2_lo = shr64_lo(xh, xl, 6);
        var r3 = c0_lo ^ c1_lo ^ c2_lo;
        if (r3 < 0)
          r3 += 4294967296;
        return r3;
      }
    }
  });

  // ../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js
  var require__5 = __commonJS({
    "../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var utils = require_utils3();
      var SHA5122 = require__4();
      function SHA3842() {
        if (!(this instanceof SHA3842))
          return new SHA3842();
        SHA5122.call(this);
        this.h = [
          3418070365,
          3238371032,
          1654270250,
          914150663,
          2438529370,
          812702999,
          355462360,
          4144912697,
          1731405415,
          4290775857,
          2394180231,
          1750603025,
          3675008525,
          1694076839,
          1203062813,
          3204075428
        ];
      }
      utils.inherits(SHA3842, SHA5122);
      module.exports = SHA3842;
      SHA3842.blockSize = 1024;
      SHA3842.outSize = 384;
      SHA3842.hmacStrength = 192;
      SHA3842.padLength = 128;
      SHA3842.prototype._digest = function digest2(enc) {
        if (enc === "hex")
          return utils.toHex32(this.h.slice(0, 12), "big");
        else
          return utils.split32(this.h.slice(0, 12), "big");
      };
    }
  });

  // ../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js
  var require_sha4 = __commonJS({
    "../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js"(exports) {
      "use strict";
      init_node_compat_inject();
      exports.sha1 = require__();
      exports.sha224 = require__3();
      exports.sha256 = require__2();
      exports.sha384 = require__5();
      exports.sha512 = require__4();
    }
  });

  // ../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js
  var require_ripemd = __commonJS({
    "../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var utils = require_utils3();
      var common = require_common();
      var rotl32 = utils.rotl32;
      var sum32 = utils.sum32;
      var sum32_3 = utils.sum32_3;
      var sum32_4 = utils.sum32_4;
      var BlockHash = common.BlockHash;
      function RIPEMD1602() {
        if (!(this instanceof RIPEMD1602))
          return new RIPEMD1602();
        BlockHash.call(this);
        this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
        this.endian = "little";
      }
      utils.inherits(RIPEMD1602, BlockHash);
      exports.ripemd160 = RIPEMD1602;
      RIPEMD1602.blockSize = 512;
      RIPEMD1602.outSize = 160;
      RIPEMD1602.hmacStrength = 192;
      RIPEMD1602.padLength = 64;
      RIPEMD1602.prototype._update = function update2(msg, start) {
        var A7 = this.h[0];
        var B7 = this.h[1];
        var C9 = this.h[2];
        var D7 = this.h[3];
        var E6 = this.h[4];
        var Ah = A7;
        var Bh = B7;
        var Ch = C9;
        var Dh = D7;
        var Eh = E6;
        for (var j6 = 0; j6 < 80; j6++) {
          var T6 = sum32(
            rotl32(
              sum32_4(A7, f7(j6, B7, C9, D7), msg[r3[j6] + start], K7(j6)),
              s3[j6]
            ),
            E6
          );
          A7 = E6;
          E6 = D7;
          D7 = rotl32(C9, 10);
          C9 = B7;
          B7 = T6;
          T6 = sum32(
            rotl32(
              sum32_4(Ah, f7(79 - j6, Bh, Ch, Dh), msg[rh[j6] + start], Kh(j6)),
              sh[j6]
            ),
            Eh
          );
          Ah = Eh;
          Eh = Dh;
          Dh = rotl32(Ch, 10);
          Ch = Bh;
          Bh = T6;
        }
        T6 = sum32_3(this.h[1], C9, Dh);
        this.h[1] = sum32_3(this.h[2], D7, Eh);
        this.h[2] = sum32_3(this.h[3], E6, Ah);
        this.h[3] = sum32_3(this.h[4], A7, Bh);
        this.h[4] = sum32_3(this.h[0], B7, Ch);
        this.h[0] = T6;
      };
      RIPEMD1602.prototype._digest = function digest2(enc) {
        if (enc === "hex")
          return utils.toHex32(this.h, "little");
        else
          return utils.split32(this.h, "little");
      };
      function f7(j6, x13, y11, z11) {
        if (j6 <= 15)
          return x13 ^ y11 ^ z11;
        else if (j6 <= 31)
          return x13 & y11 | ~x13 & z11;
        else if (j6 <= 47)
          return (x13 | ~y11) ^ z11;
        else if (j6 <= 63)
          return x13 & z11 | y11 & ~z11;
        else
          return x13 ^ (y11 | ~z11);
      }
      function K7(j6) {
        if (j6 <= 15)
          return 0;
        else if (j6 <= 31)
          return 1518500249;
        else if (j6 <= 47)
          return 1859775393;
        else if (j6 <= 63)
          return 2400959708;
        else
          return 2840853838;
      }
      function Kh(j6) {
        if (j6 <= 15)
          return 1352829926;
        else if (j6 <= 31)
          return 1548603684;
        else if (j6 <= 47)
          return 1836072691;
        else if (j6 <= 63)
          return 2053994217;
        else
          return 0;
      }
      var r3 = [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        7,
        4,
        13,
        1,
        10,
        6,
        15,
        3,
        12,
        0,
        9,
        5,
        2,
        14,
        11,
        8,
        3,
        10,
        14,
        4,
        9,
        15,
        8,
        1,
        2,
        7,
        0,
        6,
        13,
        11,
        5,
        12,
        1,
        9,
        11,
        10,
        0,
        8,
        12,
        4,
        13,
        3,
        7,
        15,
        14,
        5,
        6,
        2,
        4,
        0,
        5,
        9,
        7,
        12,
        2,
        10,
        14,
        1,
        3,
        8,
        11,
        6,
        15,
        13
      ];
      var rh = [
        5,
        14,
        7,
        0,
        9,
        2,
        11,
        4,
        13,
        6,
        15,
        8,
        1,
        10,
        3,
        12,
        6,
        11,
        3,
        7,
        0,
        13,
        5,
        10,
        14,
        15,
        8,
        12,
        4,
        9,
        1,
        2,
        15,
        5,
        1,
        3,
        7,
        14,
        6,
        9,
        11,
        8,
        12,
        2,
        10,
        0,
        4,
        13,
        8,
        6,
        4,
        1,
        3,
        11,
        15,
        0,
        5,
        12,
        2,
        13,
        9,
        7,
        10,
        14,
        12,
        15,
        10,
        4,
        1,
        5,
        8,
        7,
        6,
        2,
        13,
        14,
        0,
        3,
        9,
        11
      ];
      var s3 = [
        11,
        14,
        15,
        12,
        5,
        8,
        7,
        9,
        11,
        13,
        14,
        15,
        6,
        7,
        9,
        8,
        7,
        6,
        8,
        13,
        11,
        9,
        7,
        15,
        7,
        12,
        15,
        9,
        11,
        7,
        13,
        12,
        11,
        13,
        6,
        7,
        14,
        9,
        13,
        15,
        14,
        8,
        13,
        6,
        5,
        12,
        7,
        5,
        11,
        12,
        14,
        15,
        14,
        15,
        9,
        8,
        9,
        14,
        5,
        6,
        8,
        6,
        5,
        12,
        9,
        15,
        5,
        11,
        6,
        8,
        13,
        12,
        5,
        12,
        13,
        14,
        11,
        8,
        5,
        6
      ];
      var sh = [
        8,
        9,
        9,
        11,
        13,
        15,
        15,
        5,
        7,
        7,
        8,
        11,
        14,
        14,
        12,
        6,
        9,
        13,
        15,
        7,
        12,
        8,
        9,
        11,
        7,
        7,
        12,
        7,
        6,
        15,
        13,
        11,
        9,
        7,
        15,
        11,
        8,
        6,
        6,
        14,
        12,
        13,
        5,
        14,
        13,
        13,
        7,
        5,
        15,
        5,
        8,
        11,
        14,
        14,
        6,
        14,
        6,
        9,
        12,
        9,
        12,
        5,
        15,
        8,
        8,
        5,
        12,
        9,
        12,
        5,
        14,
        6,
        8,
        13,
        6,
        5,
        15,
        13,
        11,
        11
      ];
    }
  });

  // ../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js
  var require_hmac2 = __commonJS({
    "../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var utils = require_utils3();
      var assert12 = require_minimalistic_assert();
      function Hmac(hash5, key2, enc) {
        if (!(this instanceof Hmac))
          return new Hmac(hash5, key2, enc);
        this.Hash = hash5;
        this.blockSize = hash5.blockSize / 8;
        this.outSize = hash5.outSize / 8;
        this.inner = null;
        this.outer = null;
        this._init(utils.toArray(key2, enc));
      }
      module.exports = Hmac;
      Hmac.prototype._init = function init2(key2) {
        if (key2.length > this.blockSize)
          key2 = new this.Hash().update(key2).digest();
        assert12(key2.length <= this.blockSize);
        for (var i5 = key2.length; i5 < this.blockSize; i5++)
          key2.push(0);
        for (i5 = 0; i5 < key2.length; i5++)
          key2[i5] ^= 54;
        this.inner = new this.Hash().update(key2);
        for (i5 = 0; i5 < key2.length; i5++)
          key2[i5] ^= 106;
        this.outer = new this.Hash().update(key2);
      };
      Hmac.prototype.update = function update2(msg, enc) {
        this.inner.update(msg, enc);
        return this;
      };
      Hmac.prototype.digest = function digest2(enc) {
        this.outer.update(this.inner.digest());
        return this.outer.digest(enc);
      };
    }
  });

  // ../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js
  var require_hash = __commonJS({
    "../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var hash5 = exports;
      hash5.utils = require_utils3();
      hash5.common = require_common();
      hash5.sha = require_sha4();
      hash5.ripemd = require_ripemd();
      hash5.hmac = require_hmac2();
      hash5.sha1 = hash5.sha.sha1;
      hash5.sha256 = hash5.sha.sha256;
      hash5.sha224 = hash5.sha.sha224;
      hash5.sha384 = hash5.sha.sha384;
      hash5.sha512 = hash5.sha.sha512;
      hash5.ripemd160 = hash5.ripemd.ripemd160;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+int@1.0.1/node_modules/@stablelib/int/lib/int.js
  var require_int = __commonJS({
    "../../node_modules/.pnpm/@stablelib+int@1.0.1/node_modules/@stablelib/int/lib/int.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      function imulShim(a5, b9) {
        var ah = a5 >>> 16 & 65535, al = a5 & 65535;
        var bh = b9 >>> 16 & 65535, bl = b9 & 65535;
        return al * bl + (ah * bl + al * bh << 16 >>> 0) | 0;
      }
      exports.mul = Math.imul || imulShim;
      function add5(a5, b9) {
        return a5 + b9 | 0;
      }
      exports.add = add5;
      function sub(a5, b9) {
        return a5 - b9 | 0;
      }
      exports.sub = sub;
      function rotl3(x13, n6) {
        return x13 << n6 | x13 >>> 32 - n6;
      }
      exports.rotl = rotl3;
      function rotr3(x13, n6) {
        return x13 << 32 - n6 | x13 >>> n6;
      }
      exports.rotr = rotr3;
      function isIntegerShim(n6) {
        return typeof n6 === "number" && isFinite(n6) && Math.floor(n6) === n6;
      }
      exports.isInteger = Number.isInteger || isIntegerShim;
      exports.MAX_SAFE_INTEGER = 9007199254740991;
      exports.isSafeInteger = function(n6) {
        return exports.isInteger(n6) && (n6 >= -exports.MAX_SAFE_INTEGER && n6 <= exports.MAX_SAFE_INTEGER);
      };
    }
  });

  // ../../node_modules/.pnpm/@stablelib+binary@1.0.1/node_modules/@stablelib/binary/lib/binary.js
  var require_binary2 = __commonJS({
    "../../node_modules/.pnpm/@stablelib+binary@1.0.1/node_modules/@stablelib/binary/lib/binary.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var int_1 = require_int();
      function readInt16BE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        return (array3[offset2 + 0] << 8 | array3[offset2 + 1]) << 16 >> 16;
      }
      exports.readInt16BE = readInt16BE;
      function readUint16BE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        return (array3[offset2 + 0] << 8 | array3[offset2 + 1]) >>> 0;
      }
      exports.readUint16BE = readUint16BE;
      function readInt16LE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        return (array3[offset2 + 1] << 8 | array3[offset2]) << 16 >> 16;
      }
      exports.readInt16LE = readInt16LE;
      function readUint16LE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        return (array3[offset2 + 1] << 8 | array3[offset2]) >>> 0;
      }
      exports.readUint16LE = readUint16LE;
      function writeUint16BE(value, out, offset2) {
        if (out === void 0) {
          out = new Uint8Array(2);
        }
        if (offset2 === void 0) {
          offset2 = 0;
        }
        out[offset2 + 0] = value >>> 8;
        out[offset2 + 1] = value >>> 0;
        return out;
      }
      exports.writeUint16BE = writeUint16BE;
      exports.writeInt16BE = writeUint16BE;
      function writeUint16LE(value, out, offset2) {
        if (out === void 0) {
          out = new Uint8Array(2);
        }
        if (offset2 === void 0) {
          offset2 = 0;
        }
        out[offset2 + 0] = value >>> 0;
        out[offset2 + 1] = value >>> 8;
        return out;
      }
      exports.writeUint16LE = writeUint16LE;
      exports.writeInt16LE = writeUint16LE;
      function readInt32BE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        return array3[offset2] << 24 | array3[offset2 + 1] << 16 | array3[offset2 + 2] << 8 | array3[offset2 + 3];
      }
      exports.readInt32BE = readInt32BE;
      function readUint32BE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        return (array3[offset2] << 24 | array3[offset2 + 1] << 16 | array3[offset2 + 2] << 8 | array3[offset2 + 3]) >>> 0;
      }
      exports.readUint32BE = readUint32BE;
      function readInt32LE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        return array3[offset2 + 3] << 24 | array3[offset2 + 2] << 16 | array3[offset2 + 1] << 8 | array3[offset2];
      }
      exports.readInt32LE = readInt32LE;
      function readUint32LE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        return (array3[offset2 + 3] << 24 | array3[offset2 + 2] << 16 | array3[offset2 + 1] << 8 | array3[offset2]) >>> 0;
      }
      exports.readUint32LE = readUint32LE;
      function writeUint32BE(value, out, offset2) {
        if (out === void 0) {
          out = new Uint8Array(4);
        }
        if (offset2 === void 0) {
          offset2 = 0;
        }
        out[offset2 + 0] = value >>> 24;
        out[offset2 + 1] = value >>> 16;
        out[offset2 + 2] = value >>> 8;
        out[offset2 + 3] = value >>> 0;
        return out;
      }
      exports.writeUint32BE = writeUint32BE;
      exports.writeInt32BE = writeUint32BE;
      function writeUint32LE(value, out, offset2) {
        if (out === void 0) {
          out = new Uint8Array(4);
        }
        if (offset2 === void 0) {
          offset2 = 0;
        }
        out[offset2 + 0] = value >>> 0;
        out[offset2 + 1] = value >>> 8;
        out[offset2 + 2] = value >>> 16;
        out[offset2 + 3] = value >>> 24;
        return out;
      }
      exports.writeUint32LE = writeUint32LE;
      exports.writeInt32LE = writeUint32LE;
      function readInt64BE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        var hi2 = readInt32BE(array3, offset2);
        var lo4 = readInt32BE(array3, offset2 + 4);
        return hi2 * 4294967296 + lo4 - (lo4 >> 31) * 4294967296;
      }
      exports.readInt64BE = readInt64BE;
      function readUint64BE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        var hi2 = readUint32BE(array3, offset2);
        var lo4 = readUint32BE(array3, offset2 + 4);
        return hi2 * 4294967296 + lo4;
      }
      exports.readUint64BE = readUint64BE;
      function readInt64LE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        var lo4 = readInt32LE(array3, offset2);
        var hi2 = readInt32LE(array3, offset2 + 4);
        return hi2 * 4294967296 + lo4 - (lo4 >> 31) * 4294967296;
      }
      exports.readInt64LE = readInt64LE;
      function readUint64LE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        var lo4 = readUint32LE(array3, offset2);
        var hi2 = readUint32LE(array3, offset2 + 4);
        return hi2 * 4294967296 + lo4;
      }
      exports.readUint64LE = readUint64LE;
      function writeUint64BE(value, out, offset2) {
        if (out === void 0) {
          out = new Uint8Array(8);
        }
        if (offset2 === void 0) {
          offset2 = 0;
        }
        writeUint32BE(value / 4294967296 >>> 0, out, offset2);
        writeUint32BE(value >>> 0, out, offset2 + 4);
        return out;
      }
      exports.writeUint64BE = writeUint64BE;
      exports.writeInt64BE = writeUint64BE;
      function writeUint64LE(value, out, offset2) {
        if (out === void 0) {
          out = new Uint8Array(8);
        }
        if (offset2 === void 0) {
          offset2 = 0;
        }
        writeUint32LE(value >>> 0, out, offset2);
        writeUint32LE(value / 4294967296 >>> 0, out, offset2 + 4);
        return out;
      }
      exports.writeUint64LE = writeUint64LE;
      exports.writeInt64LE = writeUint64LE;
      function readUintBE(bitLength, array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        if (bitLength % 8 !== 0) {
          throw new Error("readUintBE supports only bitLengths divisible by 8");
        }
        if (bitLength / 8 > array3.length - offset2) {
          throw new Error("readUintBE: array is too short for the given bitLength");
        }
        var result = 0;
        var mul3 = 1;
        for (var i5 = bitLength / 8 + offset2 - 1; i5 >= offset2; i5--) {
          result += array3[i5] * mul3;
          mul3 *= 256;
        }
        return result;
      }
      exports.readUintBE = readUintBE;
      function readUintLE(bitLength, array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        if (bitLength % 8 !== 0) {
          throw new Error("readUintLE supports only bitLengths divisible by 8");
        }
        if (bitLength / 8 > array3.length - offset2) {
          throw new Error("readUintLE: array is too short for the given bitLength");
        }
        var result = 0;
        var mul3 = 1;
        for (var i5 = offset2; i5 < offset2 + bitLength / 8; i5++) {
          result += array3[i5] * mul3;
          mul3 *= 256;
        }
        return result;
      }
      exports.readUintLE = readUintLE;
      function writeUintBE(bitLength, value, out, offset2) {
        if (out === void 0) {
          out = new Uint8Array(bitLength / 8);
        }
        if (offset2 === void 0) {
          offset2 = 0;
        }
        if (bitLength % 8 !== 0) {
          throw new Error("writeUintBE supports only bitLengths divisible by 8");
        }
        if (!int_1.isSafeInteger(value)) {
          throw new Error("writeUintBE value must be an integer");
        }
        var div = 1;
        for (var i5 = bitLength / 8 + offset2 - 1; i5 >= offset2; i5--) {
          out[i5] = value / div & 255;
          div *= 256;
        }
        return out;
      }
      exports.writeUintBE = writeUintBE;
      function writeUintLE(bitLength, value, out, offset2) {
        if (out === void 0) {
          out = new Uint8Array(bitLength / 8);
        }
        if (offset2 === void 0) {
          offset2 = 0;
        }
        if (bitLength % 8 !== 0) {
          throw new Error("writeUintLE supports only bitLengths divisible by 8");
        }
        if (!int_1.isSafeInteger(value)) {
          throw new Error("writeUintLE value must be an integer");
        }
        var div = 1;
        for (var i5 = offset2; i5 < offset2 + bitLength / 8; i5++) {
          out[i5] = value / div & 255;
          div *= 256;
        }
        return out;
      }
      exports.writeUintLE = writeUintLE;
      function readFloat32BE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        var view = new DataView(array3.buffer, array3.byteOffset, array3.byteLength);
        return view.getFloat32(offset2);
      }
      exports.readFloat32BE = readFloat32BE;
      function readFloat32LE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        var view = new DataView(array3.buffer, array3.byteOffset, array3.byteLength);
        return view.getFloat32(offset2, true);
      }
      exports.readFloat32LE = readFloat32LE;
      function readFloat64BE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        var view = new DataView(array3.buffer, array3.byteOffset, array3.byteLength);
        return view.getFloat64(offset2);
      }
      exports.readFloat64BE = readFloat64BE;
      function readFloat64LE(array3, offset2) {
        if (offset2 === void 0) {
          offset2 = 0;
        }
        var view = new DataView(array3.buffer, array3.byteOffset, array3.byteLength);
        return view.getFloat64(offset2, true);
      }
      exports.readFloat64LE = readFloat64LE;
      function writeFloat32BE(value, out, offset2) {
        if (out === void 0) {
          out = new Uint8Array(4);
        }
        if (offset2 === void 0) {
          offset2 = 0;
        }
        var view = new DataView(out.buffer, out.byteOffset, out.byteLength);
        view.setFloat32(offset2, value);
        return out;
      }
      exports.writeFloat32BE = writeFloat32BE;
      function writeFloat32LE(value, out, offset2) {
        if (out === void 0) {
          out = new Uint8Array(4);
        }
        if (offset2 === void 0) {
          offset2 = 0;
        }
        var view = new DataView(out.buffer, out.byteOffset, out.byteLength);
        view.setFloat32(offset2, value, true);
        return out;
      }
      exports.writeFloat32LE = writeFloat32LE;
      function writeFloat64BE(value, out, offset2) {
        if (out === void 0) {
          out = new Uint8Array(8);
        }
        if (offset2 === void 0) {
          offset2 = 0;
        }
        var view = new DataView(out.buffer, out.byteOffset, out.byteLength);
        view.setFloat64(offset2, value);
        return out;
      }
      exports.writeFloat64BE = writeFloat64BE;
      function writeFloat64LE(value, out, offset2) {
        if (out === void 0) {
          out = new Uint8Array(8);
        }
        if (offset2 === void 0) {
          offset2 = 0;
        }
        var view = new DataView(out.buffer, out.byteOffset, out.byteLength);
        view.setFloat64(offset2, value, true);
        return out;
      }
      exports.writeFloat64LE = writeFloat64LE;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+wipe@1.0.1/node_modules/@stablelib/wipe/lib/wipe.js
  var require_wipe = __commonJS({
    "../../node_modules/.pnpm/@stablelib+wipe@1.0.1/node_modules/@stablelib/wipe/lib/wipe.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      function wipe(array3) {
        for (var i5 = 0; i5 < array3.length; i5++) {
          array3[i5] = 0;
        }
        return array3;
      }
      exports.wipe = wipe;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+chacha@1.0.1/node_modules/@stablelib/chacha/lib/chacha.js
  var require_chacha = __commonJS({
    "../../node_modules/.pnpm/@stablelib+chacha@1.0.1/node_modules/@stablelib/chacha/lib/chacha.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var binary_1 = require_binary2();
      var wipe_1 = require_wipe();
      var ROUNDS = 20;
      function core(out, input, key2) {
        var j0 = 1634760805;
        var j1 = 857760878;
        var j22 = 2036477234;
        var j32 = 1797285236;
        var j42 = key2[3] << 24 | key2[2] << 16 | key2[1] << 8 | key2[0];
        var j52 = key2[7] << 24 | key2[6] << 16 | key2[5] << 8 | key2[4];
        var j6 = key2[11] << 24 | key2[10] << 16 | key2[9] << 8 | key2[8];
        var j7 = key2[15] << 24 | key2[14] << 16 | key2[13] << 8 | key2[12];
        var j8 = key2[19] << 24 | key2[18] << 16 | key2[17] << 8 | key2[16];
        var j9 = key2[23] << 24 | key2[22] << 16 | key2[21] << 8 | key2[20];
        var j10 = key2[27] << 24 | key2[26] << 16 | key2[25] << 8 | key2[24];
        var j11 = key2[31] << 24 | key2[30] << 16 | key2[29] << 8 | key2[28];
        var j12 = input[3] << 24 | input[2] << 16 | input[1] << 8 | input[0];
        var j13 = input[7] << 24 | input[6] << 16 | input[5] << 8 | input[4];
        var j14 = input[11] << 24 | input[10] << 16 | input[9] << 8 | input[8];
        var j15 = input[15] << 24 | input[14] << 16 | input[13] << 8 | input[12];
        var x0 = j0;
        var x1 = j1;
        var x22 = j22;
        var x32 = j32;
        var x42 = j42;
        var x52 = j52;
        var x62 = j6;
        var x72 = j7;
        var x82 = j8;
        var x92 = j9;
        var x102 = j10;
        var x112 = j11;
        var x122 = j12;
        var x13 = j13;
        var x14 = j14;
        var x15 = j15;
        for (var i5 = 0; i5 < ROUNDS; i5 += 2) {
          x0 = x0 + x42 | 0;
          x122 ^= x0;
          x122 = x122 >>> 32 - 16 | x122 << 16;
          x82 = x82 + x122 | 0;
          x42 ^= x82;
          x42 = x42 >>> 32 - 12 | x42 << 12;
          x1 = x1 + x52 | 0;
          x13 ^= x1;
          x13 = x13 >>> 32 - 16 | x13 << 16;
          x92 = x92 + x13 | 0;
          x52 ^= x92;
          x52 = x52 >>> 32 - 12 | x52 << 12;
          x22 = x22 + x62 | 0;
          x14 ^= x22;
          x14 = x14 >>> 32 - 16 | x14 << 16;
          x102 = x102 + x14 | 0;
          x62 ^= x102;
          x62 = x62 >>> 32 - 12 | x62 << 12;
          x32 = x32 + x72 | 0;
          x15 ^= x32;
          x15 = x15 >>> 32 - 16 | x15 << 16;
          x112 = x112 + x15 | 0;
          x72 ^= x112;
          x72 = x72 >>> 32 - 12 | x72 << 12;
          x22 = x22 + x62 | 0;
          x14 ^= x22;
          x14 = x14 >>> 32 - 8 | x14 << 8;
          x102 = x102 + x14 | 0;
          x62 ^= x102;
          x62 = x62 >>> 32 - 7 | x62 << 7;
          x32 = x32 + x72 | 0;
          x15 ^= x32;
          x15 = x15 >>> 32 - 8 | x15 << 8;
          x112 = x112 + x15 | 0;
          x72 ^= x112;
          x72 = x72 >>> 32 - 7 | x72 << 7;
          x1 = x1 + x52 | 0;
          x13 ^= x1;
          x13 = x13 >>> 32 - 8 | x13 << 8;
          x92 = x92 + x13 | 0;
          x52 ^= x92;
          x52 = x52 >>> 32 - 7 | x52 << 7;
          x0 = x0 + x42 | 0;
          x122 ^= x0;
          x122 = x122 >>> 32 - 8 | x122 << 8;
          x82 = x82 + x122 | 0;
          x42 ^= x82;
          x42 = x42 >>> 32 - 7 | x42 << 7;
          x0 = x0 + x52 | 0;
          x15 ^= x0;
          x15 = x15 >>> 32 - 16 | x15 << 16;
          x102 = x102 + x15 | 0;
          x52 ^= x102;
          x52 = x52 >>> 32 - 12 | x52 << 12;
          x1 = x1 + x62 | 0;
          x122 ^= x1;
          x122 = x122 >>> 32 - 16 | x122 << 16;
          x112 = x112 + x122 | 0;
          x62 ^= x112;
          x62 = x62 >>> 32 - 12 | x62 << 12;
          x22 = x22 + x72 | 0;
          x13 ^= x22;
          x13 = x13 >>> 32 - 16 | x13 << 16;
          x82 = x82 + x13 | 0;
          x72 ^= x82;
          x72 = x72 >>> 32 - 12 | x72 << 12;
          x32 = x32 + x42 | 0;
          x14 ^= x32;
          x14 = x14 >>> 32 - 16 | x14 << 16;
          x92 = x92 + x14 | 0;
          x42 ^= x92;
          x42 = x42 >>> 32 - 12 | x42 << 12;
          x22 = x22 + x72 | 0;
          x13 ^= x22;
          x13 = x13 >>> 32 - 8 | x13 << 8;
          x82 = x82 + x13 | 0;
          x72 ^= x82;
          x72 = x72 >>> 32 - 7 | x72 << 7;
          x32 = x32 + x42 | 0;
          x14 ^= x32;
          x14 = x14 >>> 32 - 8 | x14 << 8;
          x92 = x92 + x14 | 0;
          x42 ^= x92;
          x42 = x42 >>> 32 - 7 | x42 << 7;
          x1 = x1 + x62 | 0;
          x122 ^= x1;
          x122 = x122 >>> 32 - 8 | x122 << 8;
          x112 = x112 + x122 | 0;
          x62 ^= x112;
          x62 = x62 >>> 32 - 7 | x62 << 7;
          x0 = x0 + x52 | 0;
          x15 ^= x0;
          x15 = x15 >>> 32 - 8 | x15 << 8;
          x102 = x102 + x15 | 0;
          x52 ^= x102;
          x52 = x52 >>> 32 - 7 | x52 << 7;
        }
        binary_1.writeUint32LE(x0 + j0 | 0, out, 0);
        binary_1.writeUint32LE(x1 + j1 | 0, out, 4);
        binary_1.writeUint32LE(x22 + j22 | 0, out, 8);
        binary_1.writeUint32LE(x32 + j32 | 0, out, 12);
        binary_1.writeUint32LE(x42 + j42 | 0, out, 16);
        binary_1.writeUint32LE(x52 + j52 | 0, out, 20);
        binary_1.writeUint32LE(x62 + j6 | 0, out, 24);
        binary_1.writeUint32LE(x72 + j7 | 0, out, 28);
        binary_1.writeUint32LE(x82 + j8 | 0, out, 32);
        binary_1.writeUint32LE(x92 + j9 | 0, out, 36);
        binary_1.writeUint32LE(x102 + j10 | 0, out, 40);
        binary_1.writeUint32LE(x112 + j11 | 0, out, 44);
        binary_1.writeUint32LE(x122 + j12 | 0, out, 48);
        binary_1.writeUint32LE(x13 + j13 | 0, out, 52);
        binary_1.writeUint32LE(x14 + j14 | 0, out, 56);
        binary_1.writeUint32LE(x15 + j15 | 0, out, 60);
      }
      function streamXOR(key2, nonce, src2, dst, nonceInplaceCounterLength) {
        if (nonceInplaceCounterLength === void 0) {
          nonceInplaceCounterLength = 0;
        }
        if (key2.length !== 32) {
          throw new Error("ChaCha: key size must be 32 bytes");
        }
        if (dst.length < src2.length) {
          throw new Error("ChaCha: destination is shorter than source");
        }
        var nc;
        var counterLength;
        if (nonceInplaceCounterLength === 0) {
          if (nonce.length !== 8 && nonce.length !== 12) {
            throw new Error("ChaCha nonce must be 8 or 12 bytes");
          }
          nc = new Uint8Array(16);
          counterLength = nc.length - nonce.length;
          nc.set(nonce, counterLength);
        } else {
          if (nonce.length !== 16) {
            throw new Error("ChaCha nonce with counter must be 16 bytes");
          }
          nc = nonce;
          counterLength = nonceInplaceCounterLength;
        }
        var block = new Uint8Array(64);
        for (var i5 = 0; i5 < src2.length; i5 += 64) {
          core(block, nc, key2);
          for (var j6 = i5; j6 < i5 + 64 && j6 < src2.length; j6++) {
            dst[j6] = src2[j6] ^ block[j6 - i5];
          }
          incrementCounter(nc, 0, counterLength);
        }
        wipe_1.wipe(block);
        if (nonceInplaceCounterLength === 0) {
          wipe_1.wipe(nc);
        }
        return dst;
      }
      exports.streamXOR = streamXOR;
      function stream(key2, nonce, dst, nonceInplaceCounterLength) {
        if (nonceInplaceCounterLength === void 0) {
          nonceInplaceCounterLength = 0;
        }
        wipe_1.wipe(dst);
        return streamXOR(key2, nonce, dst, dst, nonceInplaceCounterLength);
      }
      exports.stream = stream;
      function incrementCounter(counter, pos, len) {
        var carry = 1;
        while (len--) {
          carry = carry + (counter[pos] & 255) | 0;
          counter[pos] = carry & 255;
          carry >>>= 8;
          pos++;
        }
        if (carry > 0) {
          throw new Error("ChaCha: counter overflow");
        }
      }
    }
  });

  // ../../node_modules/.pnpm/@stablelib+constant-time@1.0.1/node_modules/@stablelib/constant-time/lib/constant-time.js
  var require_constant_time = __commonJS({
    "../../node_modules/.pnpm/@stablelib+constant-time@1.0.1/node_modules/@stablelib/constant-time/lib/constant-time.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      function select(subject, resultIfOne, resultIfZero) {
        return ~(subject - 1) & resultIfOne | subject - 1 & resultIfZero;
      }
      exports.select = select;
      function lessOrEqual(a5, b9) {
        return (a5 | 0) - (b9 | 0) - 1 >>> 31 & 1;
      }
      exports.lessOrEqual = lessOrEqual;
      function compare4(a5, b9) {
        if (a5.length !== b9.length) {
          return 0;
        }
        var result = 0;
        for (var i5 = 0; i5 < a5.length; i5++) {
          result |= a5[i5] ^ b9[i5];
        }
        return 1 & result - 1 >>> 8;
      }
      exports.compare = compare4;
      function equal(a5, b9) {
        if (a5.length === 0 || b9.length === 0) {
          return false;
        }
        return compare4(a5, b9) !== 0;
      }
      exports.equal = equal;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+poly1305@1.0.1/node_modules/@stablelib/poly1305/lib/poly1305.js
  var require_poly1305 = __commonJS({
    "../../node_modules/.pnpm/@stablelib+poly1305@1.0.1/node_modules/@stablelib/poly1305/lib/poly1305.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var constant_time_1 = require_constant_time();
      var wipe_1 = require_wipe();
      exports.DIGEST_LENGTH = 16;
      var Poly13052 = (
        /** @class */
        (function() {
          function Poly13053(key2) {
            this.digestLength = exports.DIGEST_LENGTH;
            this._buffer = new Uint8Array(16);
            this._r = new Uint16Array(10);
            this._h = new Uint16Array(10);
            this._pad = new Uint16Array(8);
            this._leftover = 0;
            this._fin = 0;
            this._finished = false;
            var t0 = key2[0] | key2[1] << 8;
            this._r[0] = t0 & 8191;
            var t1 = key2[2] | key2[3] << 8;
            this._r[1] = (t0 >>> 13 | t1 << 3) & 8191;
            var t2 = key2[4] | key2[5] << 8;
            this._r[2] = (t1 >>> 10 | t2 << 6) & 7939;
            var t3 = key2[6] | key2[7] << 8;
            this._r[3] = (t2 >>> 7 | t3 << 9) & 8191;
            var t4 = key2[8] | key2[9] << 8;
            this._r[4] = (t3 >>> 4 | t4 << 12) & 255;
            this._r[5] = t4 >>> 1 & 8190;
            var t5 = key2[10] | key2[11] << 8;
            this._r[6] = (t4 >>> 14 | t5 << 2) & 8191;
            var t6 = key2[12] | key2[13] << 8;
            this._r[7] = (t5 >>> 11 | t6 << 5) & 8065;
            var t7 = key2[14] | key2[15] << 8;
            this._r[8] = (t6 >>> 8 | t7 << 8) & 8191;
            this._r[9] = t7 >>> 5 & 127;
            this._pad[0] = key2[16] | key2[17] << 8;
            this._pad[1] = key2[18] | key2[19] << 8;
            this._pad[2] = key2[20] | key2[21] << 8;
            this._pad[3] = key2[22] | key2[23] << 8;
            this._pad[4] = key2[24] | key2[25] << 8;
            this._pad[5] = key2[26] | key2[27] << 8;
            this._pad[6] = key2[28] | key2[29] << 8;
            this._pad[7] = key2[30] | key2[31] << 8;
          }
          Poly13053.prototype._blocks = function(m3, mpos, bytes) {
            var hibit = this._fin ? 0 : 1 << 11;
            var h0 = this._h[0], h1 = this._h[1], h22 = this._h[2], h32 = this._h[3], h42 = this._h[4], h52 = this._h[5], h62 = this._h[6], h72 = this._h[7], h8 = this._h[8], h9 = this._h[9];
            var r0 = this._r[0], r1 = this._r[1], r22 = this._r[2], r3 = this._r[3], r4 = this._r[4], r5 = this._r[5], r6 = this._r[6], r7 = this._r[7], r8 = this._r[8], r9 = this._r[9];
            while (bytes >= 16) {
              var t0 = m3[mpos + 0] | m3[mpos + 1] << 8;
              h0 += t0 & 8191;
              var t1 = m3[mpos + 2] | m3[mpos + 3] << 8;
              h1 += (t0 >>> 13 | t1 << 3) & 8191;
              var t2 = m3[mpos + 4] | m3[mpos + 5] << 8;
              h22 += (t1 >>> 10 | t2 << 6) & 8191;
              var t3 = m3[mpos + 6] | m3[mpos + 7] << 8;
              h32 += (t2 >>> 7 | t3 << 9) & 8191;
              var t4 = m3[mpos + 8] | m3[mpos + 9] << 8;
              h42 += (t3 >>> 4 | t4 << 12) & 8191;
              h52 += t4 >>> 1 & 8191;
              var t5 = m3[mpos + 10] | m3[mpos + 11] << 8;
              h62 += (t4 >>> 14 | t5 << 2) & 8191;
              var t6 = m3[mpos + 12] | m3[mpos + 13] << 8;
              h72 += (t5 >>> 11 | t6 << 5) & 8191;
              var t7 = m3[mpos + 14] | m3[mpos + 15] << 8;
              h8 += (t6 >>> 8 | t7 << 8) & 8191;
              h9 += t7 >>> 5 | hibit;
              var c7 = 0;
              var d0 = c7;
              d0 += h0 * r0;
              d0 += h1 * (5 * r9);
              d0 += h22 * (5 * r8);
              d0 += h32 * (5 * r7);
              d0 += h42 * (5 * r6);
              c7 = d0 >>> 13;
              d0 &= 8191;
              d0 += h52 * (5 * r5);
              d0 += h62 * (5 * r4);
              d0 += h72 * (5 * r3);
              d0 += h8 * (5 * r22);
              d0 += h9 * (5 * r1);
              c7 += d0 >>> 13;
              d0 &= 8191;
              var d1 = c7;
              d1 += h0 * r1;
              d1 += h1 * r0;
              d1 += h22 * (5 * r9);
              d1 += h32 * (5 * r8);
              d1 += h42 * (5 * r7);
              c7 = d1 >>> 13;
              d1 &= 8191;
              d1 += h52 * (5 * r6);
              d1 += h62 * (5 * r5);
              d1 += h72 * (5 * r4);
              d1 += h8 * (5 * r3);
              d1 += h9 * (5 * r22);
              c7 += d1 >>> 13;
              d1 &= 8191;
              var d22 = c7;
              d22 += h0 * r22;
              d22 += h1 * r1;
              d22 += h22 * r0;
              d22 += h32 * (5 * r9);
              d22 += h42 * (5 * r8);
              c7 = d22 >>> 13;
              d22 &= 8191;
              d22 += h52 * (5 * r7);
              d22 += h62 * (5 * r6);
              d22 += h72 * (5 * r5);
              d22 += h8 * (5 * r4);
              d22 += h9 * (5 * r3);
              c7 += d22 >>> 13;
              d22 &= 8191;
              var d32 = c7;
              d32 += h0 * r3;
              d32 += h1 * r22;
              d32 += h22 * r1;
              d32 += h32 * r0;
              d32 += h42 * (5 * r9);
              c7 = d32 >>> 13;
              d32 &= 8191;
              d32 += h52 * (5 * r8);
              d32 += h62 * (5 * r7);
              d32 += h72 * (5 * r6);
              d32 += h8 * (5 * r5);
              d32 += h9 * (5 * r4);
              c7 += d32 >>> 13;
              d32 &= 8191;
              var d42 = c7;
              d42 += h0 * r4;
              d42 += h1 * r3;
              d42 += h22 * r22;
              d42 += h32 * r1;
              d42 += h42 * r0;
              c7 = d42 >>> 13;
              d42 &= 8191;
              d42 += h52 * (5 * r9);
              d42 += h62 * (5 * r8);
              d42 += h72 * (5 * r7);
              d42 += h8 * (5 * r6);
              d42 += h9 * (5 * r5);
              c7 += d42 >>> 13;
              d42 &= 8191;
              var d52 = c7;
              d52 += h0 * r5;
              d52 += h1 * r4;
              d52 += h22 * r3;
              d52 += h32 * r22;
              d52 += h42 * r1;
              c7 = d52 >>> 13;
              d52 &= 8191;
              d52 += h52 * r0;
              d52 += h62 * (5 * r9);
              d52 += h72 * (5 * r8);
              d52 += h8 * (5 * r7);
              d52 += h9 * (5 * r6);
              c7 += d52 >>> 13;
              d52 &= 8191;
              var d6 = c7;
              d6 += h0 * r6;
              d6 += h1 * r5;
              d6 += h22 * r4;
              d6 += h32 * r3;
              d6 += h42 * r22;
              c7 = d6 >>> 13;
              d6 &= 8191;
              d6 += h52 * r1;
              d6 += h62 * r0;
              d6 += h72 * (5 * r9);
              d6 += h8 * (5 * r8);
              d6 += h9 * (5 * r7);
              c7 += d6 >>> 13;
              d6 &= 8191;
              var d7 = c7;
              d7 += h0 * r7;
              d7 += h1 * r6;
              d7 += h22 * r5;
              d7 += h32 * r4;
              d7 += h42 * r3;
              c7 = d7 >>> 13;
              d7 &= 8191;
              d7 += h52 * r22;
              d7 += h62 * r1;
              d7 += h72 * r0;
              d7 += h8 * (5 * r9);
              d7 += h9 * (5 * r8);
              c7 += d7 >>> 13;
              d7 &= 8191;
              var d8 = c7;
              d8 += h0 * r8;
              d8 += h1 * r7;
              d8 += h22 * r6;
              d8 += h32 * r5;
              d8 += h42 * r4;
              c7 = d8 >>> 13;
              d8 &= 8191;
              d8 += h52 * r3;
              d8 += h62 * r22;
              d8 += h72 * r1;
              d8 += h8 * r0;
              d8 += h9 * (5 * r9);
              c7 += d8 >>> 13;
              d8 &= 8191;
              var d9 = c7;
              d9 += h0 * r9;
              d9 += h1 * r8;
              d9 += h22 * r7;
              d9 += h32 * r6;
              d9 += h42 * r5;
              c7 = d9 >>> 13;
              d9 &= 8191;
              d9 += h52 * r4;
              d9 += h62 * r3;
              d9 += h72 * r22;
              d9 += h8 * r1;
              d9 += h9 * r0;
              c7 += d9 >>> 13;
              d9 &= 8191;
              c7 = (c7 << 2) + c7 | 0;
              c7 = c7 + d0 | 0;
              d0 = c7 & 8191;
              c7 = c7 >>> 13;
              d1 += c7;
              h0 = d0;
              h1 = d1;
              h22 = d22;
              h32 = d32;
              h42 = d42;
              h52 = d52;
              h62 = d6;
              h72 = d7;
              h8 = d8;
              h9 = d9;
              mpos += 16;
              bytes -= 16;
            }
            this._h[0] = h0;
            this._h[1] = h1;
            this._h[2] = h22;
            this._h[3] = h32;
            this._h[4] = h42;
            this._h[5] = h52;
            this._h[6] = h62;
            this._h[7] = h72;
            this._h[8] = h8;
            this._h[9] = h9;
          };
          Poly13053.prototype.finish = function(mac3, macpos) {
            if (macpos === void 0) {
              macpos = 0;
            }
            var g8 = new Uint16Array(10);
            var c7;
            var mask2;
            var f7;
            var i5;
            if (this._leftover) {
              i5 = this._leftover;
              this._buffer[i5++] = 1;
              for (; i5 < 16; i5++) {
                this._buffer[i5] = 0;
              }
              this._fin = 1;
              this._blocks(this._buffer, 0, 16);
            }
            c7 = this._h[1] >>> 13;
            this._h[1] &= 8191;
            for (i5 = 2; i5 < 10; i5++) {
              this._h[i5] += c7;
              c7 = this._h[i5] >>> 13;
              this._h[i5] &= 8191;
            }
            this._h[0] += c7 * 5;
            c7 = this._h[0] >>> 13;
            this._h[0] &= 8191;
            this._h[1] += c7;
            c7 = this._h[1] >>> 13;
            this._h[1] &= 8191;
            this._h[2] += c7;
            g8[0] = this._h[0] + 5;
            c7 = g8[0] >>> 13;
            g8[0] &= 8191;
            for (i5 = 1; i5 < 10; i5++) {
              g8[i5] = this._h[i5] + c7;
              c7 = g8[i5] >>> 13;
              g8[i5] &= 8191;
            }
            g8[9] -= 1 << 13;
            mask2 = (c7 ^ 1) - 1;
            for (i5 = 0; i5 < 10; i5++) {
              g8[i5] &= mask2;
            }
            mask2 = ~mask2;
            for (i5 = 0; i5 < 10; i5++) {
              this._h[i5] = this._h[i5] & mask2 | g8[i5];
            }
            this._h[0] = (this._h[0] | this._h[1] << 13) & 65535;
            this._h[1] = (this._h[1] >>> 3 | this._h[2] << 10) & 65535;
            this._h[2] = (this._h[2] >>> 6 | this._h[3] << 7) & 65535;
            this._h[3] = (this._h[3] >>> 9 | this._h[4] << 4) & 65535;
            this._h[4] = (this._h[4] >>> 12 | this._h[5] << 1 | this._h[6] << 14) & 65535;
            this._h[5] = (this._h[6] >>> 2 | this._h[7] << 11) & 65535;
            this._h[6] = (this._h[7] >>> 5 | this._h[8] << 8) & 65535;
            this._h[7] = (this._h[8] >>> 8 | this._h[9] << 5) & 65535;
            f7 = this._h[0] + this._pad[0];
            this._h[0] = f7 & 65535;
            for (i5 = 1; i5 < 8; i5++) {
              f7 = (this._h[i5] + this._pad[i5] | 0) + (f7 >>> 16) | 0;
              this._h[i5] = f7 & 65535;
            }
            mac3[macpos + 0] = this._h[0] >>> 0;
            mac3[macpos + 1] = this._h[0] >>> 8;
            mac3[macpos + 2] = this._h[1] >>> 0;
            mac3[macpos + 3] = this._h[1] >>> 8;
            mac3[macpos + 4] = this._h[2] >>> 0;
            mac3[macpos + 5] = this._h[2] >>> 8;
            mac3[macpos + 6] = this._h[3] >>> 0;
            mac3[macpos + 7] = this._h[3] >>> 8;
            mac3[macpos + 8] = this._h[4] >>> 0;
            mac3[macpos + 9] = this._h[4] >>> 8;
            mac3[macpos + 10] = this._h[5] >>> 0;
            mac3[macpos + 11] = this._h[5] >>> 8;
            mac3[macpos + 12] = this._h[6] >>> 0;
            mac3[macpos + 13] = this._h[6] >>> 8;
            mac3[macpos + 14] = this._h[7] >>> 0;
            mac3[macpos + 15] = this._h[7] >>> 8;
            this._finished = true;
            return this;
          };
          Poly13053.prototype.update = function(m3) {
            var mpos = 0;
            var bytes = m3.length;
            var want;
            if (this._leftover) {
              want = 16 - this._leftover;
              if (want > bytes) {
                want = bytes;
              }
              for (var i5 = 0; i5 < want; i5++) {
                this._buffer[this._leftover + i5] = m3[mpos + i5];
              }
              bytes -= want;
              mpos += want;
              this._leftover += want;
              if (this._leftover < 16) {
                return this;
              }
              this._blocks(this._buffer, 0, 16);
              this._leftover = 0;
            }
            if (bytes >= 16) {
              want = bytes - bytes % 16;
              this._blocks(m3, mpos, want);
              mpos += want;
              bytes -= want;
            }
            if (bytes) {
              for (var i5 = 0; i5 < bytes; i5++) {
                this._buffer[this._leftover + i5] = m3[mpos + i5];
              }
              this._leftover += bytes;
            }
            return this;
          };
          Poly13053.prototype.digest = function() {
            if (this._finished) {
              throw new Error("Poly1305 was finished");
            }
            var mac3 = new Uint8Array(16);
            this.finish(mac3);
            return mac3;
          };
          Poly13053.prototype.clean = function() {
            wipe_1.wipe(this._buffer);
            wipe_1.wipe(this._r);
            wipe_1.wipe(this._h);
            wipe_1.wipe(this._pad);
            this._leftover = 0;
            this._fin = 0;
            this._finished = true;
            return this;
          };
          return Poly13053;
        })()
      );
      exports.Poly1305 = Poly13052;
      function oneTimeAuth(key2, data) {
        var h8 = new Poly13052(key2);
        h8.update(data);
        var digest2 = h8.digest();
        h8.clean();
        return digest2;
      }
      exports.oneTimeAuth = oneTimeAuth;
      function equal(a5, b9) {
        if (a5.length !== exports.DIGEST_LENGTH || b9.length !== exports.DIGEST_LENGTH) {
          return false;
        }
        return constant_time_1.equal(a5, b9);
      }
      exports.equal = equal;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+chacha20poly1305@1.0.1/node_modules/@stablelib/chacha20poly1305/lib/chacha20poly1305.js
  var require_chacha20poly1305 = __commonJS({
    "../../node_modules/.pnpm/@stablelib+chacha20poly1305@1.0.1/node_modules/@stablelib/chacha20poly1305/lib/chacha20poly1305.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var chacha_1 = require_chacha();
      var poly1305_1 = require_poly1305();
      var wipe_1 = require_wipe();
      var binary_1 = require_binary2();
      var constant_time_1 = require_constant_time();
      exports.KEY_LENGTH = 32;
      exports.NONCE_LENGTH = 12;
      exports.TAG_LENGTH = 16;
      var ZEROS = new Uint8Array(16);
      var ChaCha20Poly1305 = (
        /** @class */
        (function() {
          function ChaCha20Poly13052(key2) {
            this.nonceLength = exports.NONCE_LENGTH;
            this.tagLength = exports.TAG_LENGTH;
            if (key2.length !== exports.KEY_LENGTH) {
              throw new Error("ChaCha20Poly1305 needs 32-byte key");
            }
            this._key = new Uint8Array(key2);
          }
          ChaCha20Poly13052.prototype.seal = function(nonce, plaintext, associatedData, dst) {
            if (nonce.length > 16) {
              throw new Error("ChaCha20Poly1305: incorrect nonce length");
            }
            var counter = new Uint8Array(16);
            counter.set(nonce, counter.length - nonce.length);
            var authKey = new Uint8Array(32);
            chacha_1.stream(this._key, counter, authKey, 4);
            var resultLength = plaintext.length + this.tagLength;
            var result;
            if (dst) {
              if (dst.length !== resultLength) {
                throw new Error("ChaCha20Poly1305: incorrect destination length");
              }
              result = dst;
            } else {
              result = new Uint8Array(resultLength);
            }
            chacha_1.streamXOR(this._key, counter, plaintext, result, 4);
            this._authenticate(result.subarray(result.length - this.tagLength, result.length), authKey, result.subarray(0, result.length - this.tagLength), associatedData);
            wipe_1.wipe(counter);
            return result;
          };
          ChaCha20Poly13052.prototype.open = function(nonce, sealed, associatedData, dst) {
            if (nonce.length > 16) {
              throw new Error("ChaCha20Poly1305: incorrect nonce length");
            }
            if (sealed.length < this.tagLength) {
              return null;
            }
            var counter = new Uint8Array(16);
            counter.set(nonce, counter.length - nonce.length);
            var authKey = new Uint8Array(32);
            chacha_1.stream(this._key, counter, authKey, 4);
            var calculatedTag = new Uint8Array(this.tagLength);
            this._authenticate(calculatedTag, authKey, sealed.subarray(0, sealed.length - this.tagLength), associatedData);
            if (!constant_time_1.equal(calculatedTag, sealed.subarray(sealed.length - this.tagLength, sealed.length))) {
              return null;
            }
            var resultLength = sealed.length - this.tagLength;
            var result;
            if (dst) {
              if (dst.length !== resultLength) {
                throw new Error("ChaCha20Poly1305: incorrect destination length");
              }
              result = dst;
            } else {
              result = new Uint8Array(resultLength);
            }
            chacha_1.streamXOR(this._key, counter, sealed.subarray(0, sealed.length - this.tagLength), result, 4);
            wipe_1.wipe(counter);
            return result;
          };
          ChaCha20Poly13052.prototype.clean = function() {
            wipe_1.wipe(this._key);
            return this;
          };
          ChaCha20Poly13052.prototype._authenticate = function(tagOut, authKey, ciphertext, associatedData) {
            var h8 = new poly1305_1.Poly1305(authKey);
            if (associatedData) {
              h8.update(associatedData);
              if (associatedData.length % 16 > 0) {
                h8.update(ZEROS.subarray(associatedData.length % 16));
              }
            }
            h8.update(ciphertext);
            if (ciphertext.length % 16 > 0) {
              h8.update(ZEROS.subarray(ciphertext.length % 16));
            }
            var length2 = new Uint8Array(8);
            if (associatedData) {
              binary_1.writeUint64LE(associatedData.length, length2);
            }
            h8.update(length2);
            binary_1.writeUint64LE(ciphertext.length, length2);
            h8.update(length2);
            var tag = h8.digest();
            for (var i5 = 0; i5 < tag.length; i5++) {
              tagOut[i5] = tag[i5];
            }
            h8.clean();
            wipe_1.wipe(tag);
            wipe_1.wipe(length2);
          };
          return ChaCha20Poly13052;
        })()
      );
      exports.ChaCha20Poly1305 = ChaCha20Poly1305;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+hash@1.0.1/node_modules/@stablelib/hash/lib/hash.js
  var require_hash2 = __commonJS({
    "../../node_modules/.pnpm/@stablelib+hash@1.0.1/node_modules/@stablelib/hash/lib/hash.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      function isSerializableHash(h8) {
        return typeof h8.saveState !== "undefined" && typeof h8.restoreState !== "undefined" && typeof h8.cleanSavedState !== "undefined";
      }
      exports.isSerializableHash = isSerializableHash;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+hmac@1.0.1/node_modules/@stablelib/hmac/lib/hmac.js
  var require_hmac3 = __commonJS({
    "../../node_modules/.pnpm/@stablelib+hmac@1.0.1/node_modules/@stablelib/hmac/lib/hmac.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var hash_1 = require_hash2();
      var constant_time_1 = require_constant_time();
      var wipe_1 = require_wipe();
      var HMAC2 = (
        /** @class */
        (function() {
          function HMAC3(hash5, key2) {
            this._finished = false;
            this._inner = new hash5();
            this._outer = new hash5();
            this.blockSize = this._outer.blockSize;
            this.digestLength = this._outer.digestLength;
            var pad4 = new Uint8Array(this.blockSize);
            if (key2.length > this.blockSize) {
              this._inner.update(key2).finish(pad4).clean();
            } else {
              pad4.set(key2);
            }
            for (var i5 = 0; i5 < pad4.length; i5++) {
              pad4[i5] ^= 54;
            }
            this._inner.update(pad4);
            for (var i5 = 0; i5 < pad4.length; i5++) {
              pad4[i5] ^= 54 ^ 92;
            }
            this._outer.update(pad4);
            if (hash_1.isSerializableHash(this._inner) && hash_1.isSerializableHash(this._outer)) {
              this._innerKeyedState = this._inner.saveState();
              this._outerKeyedState = this._outer.saveState();
            }
            wipe_1.wipe(pad4);
          }
          HMAC3.prototype.reset = function() {
            if (!hash_1.isSerializableHash(this._inner) || !hash_1.isSerializableHash(this._outer)) {
              throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");
            }
            this._inner.restoreState(this._innerKeyedState);
            this._outer.restoreState(this._outerKeyedState);
            this._finished = false;
            return this;
          };
          HMAC3.prototype.clean = function() {
            if (hash_1.isSerializableHash(this._inner)) {
              this._inner.cleanSavedState(this._innerKeyedState);
            }
            if (hash_1.isSerializableHash(this._outer)) {
              this._outer.cleanSavedState(this._outerKeyedState);
            }
            this._inner.clean();
            this._outer.clean();
          };
          HMAC3.prototype.update = function(data) {
            this._inner.update(data);
            return this;
          };
          HMAC3.prototype.finish = function(out) {
            if (this._finished) {
              this._outer.finish(out);
              return this;
            }
            this._inner.finish(out);
            this._outer.update(out.subarray(0, this.digestLength)).finish(out);
            this._finished = true;
            return this;
          };
          HMAC3.prototype.digest = function() {
            var out = new Uint8Array(this.digestLength);
            this.finish(out);
            return out;
          };
          HMAC3.prototype.saveState = function() {
            if (!hash_1.isSerializableHash(this._inner)) {
              throw new Error("hmac: can't saveState() because hash doesn't implement it");
            }
            return this._inner.saveState();
          };
          HMAC3.prototype.restoreState = function(savedState) {
            if (!hash_1.isSerializableHash(this._inner) || !hash_1.isSerializableHash(this._outer)) {
              throw new Error("hmac: can't restoreState() because hash doesn't implement it");
            }
            this._inner.restoreState(savedState);
            this._outer.restoreState(this._outerKeyedState);
            this._finished = false;
            return this;
          };
          HMAC3.prototype.cleanSavedState = function(savedState) {
            if (!hash_1.isSerializableHash(this._inner)) {
              throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");
            }
            this._inner.cleanSavedState(savedState);
          };
          return HMAC3;
        })()
      );
      exports.HMAC = HMAC2;
      function hmac4(hash5, key2, data) {
        var h8 = new HMAC2(hash5, key2);
        h8.update(data);
        var digest2 = h8.digest();
        h8.clean();
        return digest2;
      }
      exports.hmac = hmac4;
      exports.equal = constant_time_1.equal;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+hkdf@1.0.1/node_modules/@stablelib/hkdf/lib/hkdf.js
  var require_hkdf = __commonJS({
    "../../node_modules/.pnpm/@stablelib+hkdf@1.0.1/node_modules/@stablelib/hkdf/lib/hkdf.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var hmac_1 = require_hmac3();
      var wipe_1 = require_wipe();
      var HKDF = (
        /** @class */
        (function() {
          function HKDF2(hash5, key2, salt, info) {
            if (salt === void 0) {
              salt = new Uint8Array(0);
            }
            this._counter = new Uint8Array(1);
            this._hash = hash5;
            this._info = info;
            var okm = hmac_1.hmac(this._hash, salt, key2);
            this._hmac = new hmac_1.HMAC(hash5, okm);
            this._buffer = new Uint8Array(this._hmac.digestLength);
            this._bufpos = this._buffer.length;
          }
          HKDF2.prototype._fillBuffer = function() {
            this._counter[0]++;
            var ctr = this._counter[0];
            if (ctr === 0) {
              throw new Error("hkdf: cannot expand more");
            }
            this._hmac.reset();
            if (ctr > 1) {
              this._hmac.update(this._buffer);
            }
            if (this._info) {
              this._hmac.update(this._info);
            }
            this._hmac.update(this._counter);
            this._hmac.finish(this._buffer);
            this._bufpos = 0;
          };
          HKDF2.prototype.expand = function(length2) {
            var out = new Uint8Array(length2);
            for (var i5 = 0; i5 < out.length; i5++) {
              if (this._bufpos === this._buffer.length) {
                this._fillBuffer();
              }
              out[i5] = this._buffer[this._bufpos++];
            }
            return out;
          };
          HKDF2.prototype.clean = function() {
            this._hmac.clean();
            wipe_1.wipe(this._buffer);
            wipe_1.wipe(this._counter);
            this._bufpos = 0;
          };
          return HKDF2;
        })()
      );
      exports.HKDF = HKDF;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/browser.js
  var require_browser6 = __commonJS({
    "../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/browser.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.BrowserRandomSource = void 0;
      var QUOTA = 65536;
      var BrowserRandomSource = class {
        constructor() {
          this.isAvailable = false;
          this.isInstantiated = false;
          const browserCrypto = typeof self !== "undefined" ? self.crypto || self.msCrypto : null;
          if (browserCrypto && browserCrypto.getRandomValues !== void 0) {
            this._crypto = browserCrypto;
            this.isAvailable = true;
            this.isInstantiated = true;
          }
        }
        randomBytes(length2) {
          if (!this.isAvailable || !this._crypto) {
            throw new Error("Browser random byte generator is not available.");
          }
          const out = new Uint8Array(length2);
          for (let i5 = 0; i5 < out.length; i5 += QUOTA) {
            this._crypto.getRandomValues(out.subarray(i5, i5 + Math.min(out.length - i5, QUOTA)));
          }
          return out;
        }
      };
      exports.BrowserRandomSource = BrowserRandomSource;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/node.js
  var require_node = __commonJS({
    "../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/node.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.NodeRandomSource = void 0;
      var wipe_1 = require_wipe();
      var NodeRandomSource = class {
        constructor() {
          this.isAvailable = false;
          this.isInstantiated = false;
          if (typeof __require !== "undefined") {
            const nodeCrypto = require_crypto2();
            if (nodeCrypto && nodeCrypto.randomBytes) {
              this._crypto = nodeCrypto;
              this.isAvailable = true;
              this.isInstantiated = true;
            }
          }
        }
        randomBytes(length2) {
          if (!this.isAvailable || !this._crypto) {
            throw new Error("Node.js random byte generator is not available.");
          }
          let buffer2 = this._crypto.randomBytes(length2);
          if (buffer2.length !== length2) {
            throw new Error("NodeRandomSource: got fewer bytes than requested");
          }
          const out = new Uint8Array(length2);
          for (let i5 = 0; i5 < out.length; i5++) {
            out[i5] = buffer2[i5];
          }
          (0, wipe_1.wipe)(buffer2);
          return out;
        }
      };
      exports.NodeRandomSource = NodeRandomSource;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/system.js
  var require_system = __commonJS({
    "../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/system.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.SystemRandomSource = void 0;
      var browser_1 = require_browser6();
      var node_1 = require_node();
      var SystemRandomSource = class {
        constructor() {
          this.isAvailable = false;
          this.name = "";
          this._source = new browser_1.BrowserRandomSource();
          if (this._source.isAvailable) {
            this.isAvailable = true;
            this.name = "Browser";
            return;
          }
          this._source = new node_1.NodeRandomSource();
          if (this._source.isAvailable) {
            this.isAvailable = true;
            this.name = "Node";
            return;
          }
        }
        randomBytes(length2) {
          if (!this.isAvailable) {
            throw new Error("System random byte generator is not available.");
          }
          return this._source.randomBytes(length2);
        }
      };
      exports.SystemRandomSource = SystemRandomSource;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/random.js
  var require_random = __commonJS({
    "../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/random.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.randomStringForEntropy = exports.randomString = exports.randomUint32 = exports.randomBytes = exports.defaultRandomSource = void 0;
      var system_1 = require_system();
      var binary_1 = require_binary2();
      var wipe_1 = require_wipe();
      exports.defaultRandomSource = new system_1.SystemRandomSource();
      function randomBytes3(length2, prng = exports.defaultRandomSource) {
        return prng.randomBytes(length2);
      }
      exports.randomBytes = randomBytes3;
      function randomUint32(prng = exports.defaultRandomSource) {
        const buf = randomBytes3(4, prng);
        const result = (0, binary_1.readUint32LE)(buf);
        (0, wipe_1.wipe)(buf);
        return result;
      }
      exports.randomUint32 = randomUint32;
      var ALPHANUMERIC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
      function randomString2(length2, charset = ALPHANUMERIC, prng = exports.defaultRandomSource) {
        if (charset.length < 2) {
          throw new Error("randomString charset is too short");
        }
        if (charset.length > 256) {
          throw new Error("randomString charset is too long");
        }
        let out = "";
        const charsLen = charset.length;
        const maxByte = 256 - 256 % charsLen;
        while (length2 > 0) {
          const buf = randomBytes3(Math.ceil(length2 * 256 / maxByte), prng);
          for (let i5 = 0; i5 < buf.length && length2 > 0; i5++) {
            const randomByte = buf[i5];
            if (randomByte < maxByte) {
              out += charset.charAt(randomByte % charsLen);
              length2--;
            }
          }
          (0, wipe_1.wipe)(buf);
        }
        return out;
      }
      exports.randomString = randomString2;
      function randomStringForEntropy(bits, charset = ALPHANUMERIC, prng = exports.defaultRandomSource) {
        const length2 = Math.ceil(bits / (Math.log(charset.length) / Math.LN2));
        return randomString2(length2, charset, prng);
      }
      exports.randomStringForEntropy = randomStringForEntropy;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+sha256@1.0.1/node_modules/@stablelib/sha256/lib/sha256.js
  var require_sha2564 = __commonJS({
    "../../node_modules/.pnpm/@stablelib+sha256@1.0.1/node_modules/@stablelib/sha256/lib/sha256.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var binary_1 = require_binary2();
      var wipe_1 = require_wipe();
      exports.DIGEST_LENGTH = 32;
      exports.BLOCK_SIZE = 64;
      var SHA2562 = (
        /** @class */
        (function() {
          function SHA2563() {
            this.digestLength = exports.DIGEST_LENGTH;
            this.blockSize = exports.BLOCK_SIZE;
            this._state = new Int32Array(8);
            this._temp = new Int32Array(64);
            this._buffer = new Uint8Array(128);
            this._bufferLength = 0;
            this._bytesHashed = 0;
            this._finished = false;
            this.reset();
          }
          SHA2563.prototype._initState = function() {
            this._state[0] = 1779033703;
            this._state[1] = 3144134277;
            this._state[2] = 1013904242;
            this._state[3] = 2773480762;
            this._state[4] = 1359893119;
            this._state[5] = 2600822924;
            this._state[6] = 528734635;
            this._state[7] = 1541459225;
          };
          SHA2563.prototype.reset = function() {
            this._initState();
            this._bufferLength = 0;
            this._bytesHashed = 0;
            this._finished = false;
            return this;
          };
          SHA2563.prototype.clean = function() {
            wipe_1.wipe(this._buffer);
            wipe_1.wipe(this._temp);
            this.reset();
          };
          SHA2563.prototype.update = function(data, dataLength) {
            if (dataLength === void 0) {
              dataLength = data.length;
            }
            if (this._finished) {
              throw new Error("SHA256: can't update because hash was finished.");
            }
            var dataPos = 0;
            this._bytesHashed += dataLength;
            if (this._bufferLength > 0) {
              while (this._bufferLength < this.blockSize && dataLength > 0) {
                this._buffer[this._bufferLength++] = data[dataPos++];
                dataLength--;
              }
              if (this._bufferLength === this.blockSize) {
                hashBlocks(this._temp, this._state, this._buffer, 0, this.blockSize);
                this._bufferLength = 0;
              }
            }
            if (dataLength >= this.blockSize) {
              dataPos = hashBlocks(this._temp, this._state, data, dataPos, dataLength);
              dataLength %= this.blockSize;
            }
            while (dataLength > 0) {
              this._buffer[this._bufferLength++] = data[dataPos++];
              dataLength--;
            }
            return this;
          };
          SHA2563.prototype.finish = function(out) {
            if (!this._finished) {
              var bytesHashed = this._bytesHashed;
              var left = this._bufferLength;
              var bitLenHi = bytesHashed / 536870912 | 0;
              var bitLenLo = bytesHashed << 3;
              var padLength = bytesHashed % 64 < 56 ? 64 : 128;
              this._buffer[left] = 128;
              for (var i5 = left + 1; i5 < padLength - 8; i5++) {
                this._buffer[i5] = 0;
              }
              binary_1.writeUint32BE(bitLenHi, this._buffer, padLength - 8);
              binary_1.writeUint32BE(bitLenLo, this._buffer, padLength - 4);
              hashBlocks(this._temp, this._state, this._buffer, 0, padLength);
              this._finished = true;
            }
            for (var i5 = 0; i5 < this.digestLength / 4; i5++) {
              binary_1.writeUint32BE(this._state[i5], out, i5 * 4);
            }
            return this;
          };
          SHA2563.prototype.digest = function() {
            var out = new Uint8Array(this.digestLength);
            this.finish(out);
            return out;
          };
          SHA2563.prototype.saveState = function() {
            if (this._finished) {
              throw new Error("SHA256: cannot save finished state");
            }
            return {
              state: new Int32Array(this._state),
              buffer: this._bufferLength > 0 ? new Uint8Array(this._buffer) : void 0,
              bufferLength: this._bufferLength,
              bytesHashed: this._bytesHashed
            };
          };
          SHA2563.prototype.restoreState = function(savedState) {
            this._state.set(savedState.state);
            this._bufferLength = savedState.bufferLength;
            if (savedState.buffer) {
              this._buffer.set(savedState.buffer);
            }
            this._bytesHashed = savedState.bytesHashed;
            this._finished = false;
            return this;
          };
          SHA2563.prototype.cleanSavedState = function(savedState) {
            wipe_1.wipe(savedState.state);
            if (savedState.buffer) {
              wipe_1.wipe(savedState.buffer);
            }
            savedState.bufferLength = 0;
            savedState.bytesHashed = 0;
          };
          return SHA2563;
        })()
      );
      exports.SHA256 = SHA2562;
      var K7 = new Int32Array([
        1116352408,
        1899447441,
        3049323471,
        3921009573,
        961987163,
        1508970993,
        2453635748,
        2870763221,
        3624381080,
        310598401,
        607225278,
        1426881987,
        1925078388,
        2162078206,
        2614888103,
        3248222580,
        3835390401,
        4022224774,
        264347078,
        604807628,
        770255983,
        1249150122,
        1555081692,
        1996064986,
        2554220882,
        2821834349,
        2952996808,
        3210313671,
        3336571891,
        3584528711,
        113926993,
        338241895,
        666307205,
        773529912,
        1294757372,
        1396182291,
        1695183700,
        1986661051,
        2177026350,
        2456956037,
        2730485921,
        2820302411,
        3259730800,
        3345764771,
        3516065817,
        3600352804,
        4094571909,
        275423344,
        430227734,
        506948616,
        659060556,
        883997877,
        958139571,
        1322822218,
        1537002063,
        1747873779,
        1955562222,
        2024104815,
        2227730452,
        2361852424,
        2428436474,
        2756734187,
        3204031479,
        3329325298
      ]);
      function hashBlocks(w7, v13, p7, pos, len) {
        while (len >= 64) {
          var a5 = v13[0];
          var b9 = v13[1];
          var c7 = v13[2];
          var d6 = v13[3];
          var e2 = v13[4];
          var f7 = v13[5];
          var g8 = v13[6];
          var h8 = v13[7];
          for (var i5 = 0; i5 < 16; i5++) {
            var j6 = pos + i5 * 4;
            w7[i5] = binary_1.readUint32BE(p7, j6);
          }
          for (var i5 = 16; i5 < 64; i5++) {
            var u4 = w7[i5 - 2];
            var t1 = (u4 >>> 17 | u4 << 32 - 17) ^ (u4 >>> 19 | u4 << 32 - 19) ^ u4 >>> 10;
            u4 = w7[i5 - 15];
            var t2 = (u4 >>> 7 | u4 << 32 - 7) ^ (u4 >>> 18 | u4 << 32 - 18) ^ u4 >>> 3;
            w7[i5] = (t1 + w7[i5 - 7] | 0) + (t2 + w7[i5 - 16] | 0);
          }
          for (var i5 = 0; i5 < 64; i5++) {
            var t1 = (((e2 >>> 6 | e2 << 32 - 6) ^ (e2 >>> 11 | e2 << 32 - 11) ^ (e2 >>> 25 | e2 << 32 - 25)) + (e2 & f7 ^ ~e2 & g8) | 0) + (h8 + (K7[i5] + w7[i5] | 0) | 0) | 0;
            var t2 = ((a5 >>> 2 | a5 << 32 - 2) ^ (a5 >>> 13 | a5 << 32 - 13) ^ (a5 >>> 22 | a5 << 32 - 22)) + (a5 & b9 ^ a5 & c7 ^ b9 & c7) | 0;
            h8 = g8;
            g8 = f7;
            f7 = e2;
            e2 = d6 + t1 | 0;
            d6 = c7;
            c7 = b9;
            b9 = a5;
            a5 = t1 + t2 | 0;
          }
          v13[0] += a5;
          v13[1] += b9;
          v13[2] += c7;
          v13[3] += d6;
          v13[4] += e2;
          v13[5] += f7;
          v13[6] += g8;
          v13[7] += h8;
          pos += 64;
          len -= 64;
        }
        return pos;
      }
      function hash5(data) {
        var h8 = new SHA2562();
        h8.update(data);
        var digest2 = h8.digest();
        h8.clean();
        return digest2;
      }
      exports.hash = hash5;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+x25519@1.0.3/node_modules/@stablelib/x25519/lib/x25519.js
  var require_x25519 = __commonJS({
    "../../node_modules/.pnpm/@stablelib+x25519@1.0.3/node_modules/@stablelib/x25519/lib/x25519.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.sharedKey = exports.generateKeyPair = exports.generateKeyPairFromSeed = exports.scalarMultBase = exports.scalarMult = exports.SHARED_KEY_LENGTH = exports.SECRET_KEY_LENGTH = exports.PUBLIC_KEY_LENGTH = void 0;
      var random_1 = require_random();
      var wipe_1 = require_wipe();
      exports.PUBLIC_KEY_LENGTH = 32;
      exports.SECRET_KEY_LENGTH = 32;
      exports.SHARED_KEY_LENGTH = 32;
      function gf(init2) {
        const r3 = new Float64Array(16);
        if (init2) {
          for (let i5 = 0; i5 < init2.length; i5++) {
            r3[i5] = init2[i5];
          }
        }
        return r3;
      }
      var _9 = new Uint8Array(32);
      _9[0] = 9;
      var _121665 = gf([56129, 1]);
      function car25519(o5) {
        let c7 = 1;
        for (let i5 = 0; i5 < 16; i5++) {
          let v13 = o5[i5] + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          o5[i5] = v13 - c7 * 65536;
        }
        o5[0] += c7 - 1 + 37 * (c7 - 1);
      }
      function sel25519(p7, q7, b9) {
        const c7 = ~(b9 - 1);
        for (let i5 = 0; i5 < 16; i5++) {
          const t = c7 & (p7[i5] ^ q7[i5]);
          p7[i5] ^= t;
          q7[i5] ^= t;
        }
      }
      function pack25519(o5, n6) {
        const m3 = gf();
        const t = gf();
        for (let i5 = 0; i5 < 16; i5++) {
          t[i5] = n6[i5];
        }
        car25519(t);
        car25519(t);
        car25519(t);
        for (let j6 = 0; j6 < 2; j6++) {
          m3[0] = t[0] - 65517;
          for (let i5 = 1; i5 < 15; i5++) {
            m3[i5] = t[i5] - 65535 - (m3[i5 - 1] >> 16 & 1);
            m3[i5 - 1] &= 65535;
          }
          m3[15] = t[15] - 32767 - (m3[14] >> 16 & 1);
          const b9 = m3[15] >> 16 & 1;
          m3[14] &= 65535;
          sel25519(t, m3, 1 - b9);
        }
        for (let i5 = 0; i5 < 16; i5++) {
          o5[2 * i5] = t[i5] & 255;
          o5[2 * i5 + 1] = t[i5] >> 8;
        }
      }
      function unpack25519(o5, n6) {
        for (let i5 = 0; i5 < 16; i5++) {
          o5[i5] = n6[2 * i5] + (n6[2 * i5 + 1] << 8);
        }
        o5[15] &= 32767;
      }
      function add5(o5, a5, b9) {
        for (let i5 = 0; i5 < 16; i5++) {
          o5[i5] = a5[i5] + b9[i5];
        }
      }
      function sub(o5, a5, b9) {
        for (let i5 = 0; i5 < 16; i5++) {
          o5[i5] = a5[i5] - b9[i5];
        }
      }
      function mul3(o5, a5, b9) {
        let v13, c7, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b9[0], b1 = b9[1], b22 = b9[2], b32 = b9[3], b42 = b9[4], b52 = b9[5], b62 = b9[6], b72 = b9[7], b82 = b9[8], b92 = b9[9], b10 = b9[10], b11 = b9[11], b12 = b9[12], b13 = b9[13], b14 = b9[14], b15 = b9[15];
        v13 = a5[0];
        t0 += v13 * b0;
        t1 += v13 * b1;
        t2 += v13 * b22;
        t3 += v13 * b32;
        t4 += v13 * b42;
        t5 += v13 * b52;
        t6 += v13 * b62;
        t7 += v13 * b72;
        t8 += v13 * b82;
        t9 += v13 * b92;
        t10 += v13 * b10;
        t11 += v13 * b11;
        t12 += v13 * b12;
        t13 += v13 * b13;
        t14 += v13 * b14;
        t15 += v13 * b15;
        v13 = a5[1];
        t1 += v13 * b0;
        t2 += v13 * b1;
        t3 += v13 * b22;
        t4 += v13 * b32;
        t5 += v13 * b42;
        t6 += v13 * b52;
        t7 += v13 * b62;
        t8 += v13 * b72;
        t9 += v13 * b82;
        t10 += v13 * b92;
        t11 += v13 * b10;
        t12 += v13 * b11;
        t13 += v13 * b12;
        t14 += v13 * b13;
        t15 += v13 * b14;
        t16 += v13 * b15;
        v13 = a5[2];
        t2 += v13 * b0;
        t3 += v13 * b1;
        t4 += v13 * b22;
        t5 += v13 * b32;
        t6 += v13 * b42;
        t7 += v13 * b52;
        t8 += v13 * b62;
        t9 += v13 * b72;
        t10 += v13 * b82;
        t11 += v13 * b92;
        t12 += v13 * b10;
        t13 += v13 * b11;
        t14 += v13 * b12;
        t15 += v13 * b13;
        t16 += v13 * b14;
        t17 += v13 * b15;
        v13 = a5[3];
        t3 += v13 * b0;
        t4 += v13 * b1;
        t5 += v13 * b22;
        t6 += v13 * b32;
        t7 += v13 * b42;
        t8 += v13 * b52;
        t9 += v13 * b62;
        t10 += v13 * b72;
        t11 += v13 * b82;
        t12 += v13 * b92;
        t13 += v13 * b10;
        t14 += v13 * b11;
        t15 += v13 * b12;
        t16 += v13 * b13;
        t17 += v13 * b14;
        t18 += v13 * b15;
        v13 = a5[4];
        t4 += v13 * b0;
        t5 += v13 * b1;
        t6 += v13 * b22;
        t7 += v13 * b32;
        t8 += v13 * b42;
        t9 += v13 * b52;
        t10 += v13 * b62;
        t11 += v13 * b72;
        t12 += v13 * b82;
        t13 += v13 * b92;
        t14 += v13 * b10;
        t15 += v13 * b11;
        t16 += v13 * b12;
        t17 += v13 * b13;
        t18 += v13 * b14;
        t19 += v13 * b15;
        v13 = a5[5];
        t5 += v13 * b0;
        t6 += v13 * b1;
        t7 += v13 * b22;
        t8 += v13 * b32;
        t9 += v13 * b42;
        t10 += v13 * b52;
        t11 += v13 * b62;
        t12 += v13 * b72;
        t13 += v13 * b82;
        t14 += v13 * b92;
        t15 += v13 * b10;
        t16 += v13 * b11;
        t17 += v13 * b12;
        t18 += v13 * b13;
        t19 += v13 * b14;
        t20 += v13 * b15;
        v13 = a5[6];
        t6 += v13 * b0;
        t7 += v13 * b1;
        t8 += v13 * b22;
        t9 += v13 * b32;
        t10 += v13 * b42;
        t11 += v13 * b52;
        t12 += v13 * b62;
        t13 += v13 * b72;
        t14 += v13 * b82;
        t15 += v13 * b92;
        t16 += v13 * b10;
        t17 += v13 * b11;
        t18 += v13 * b12;
        t19 += v13 * b13;
        t20 += v13 * b14;
        t21 += v13 * b15;
        v13 = a5[7];
        t7 += v13 * b0;
        t8 += v13 * b1;
        t9 += v13 * b22;
        t10 += v13 * b32;
        t11 += v13 * b42;
        t12 += v13 * b52;
        t13 += v13 * b62;
        t14 += v13 * b72;
        t15 += v13 * b82;
        t16 += v13 * b92;
        t17 += v13 * b10;
        t18 += v13 * b11;
        t19 += v13 * b12;
        t20 += v13 * b13;
        t21 += v13 * b14;
        t22 += v13 * b15;
        v13 = a5[8];
        t8 += v13 * b0;
        t9 += v13 * b1;
        t10 += v13 * b22;
        t11 += v13 * b32;
        t12 += v13 * b42;
        t13 += v13 * b52;
        t14 += v13 * b62;
        t15 += v13 * b72;
        t16 += v13 * b82;
        t17 += v13 * b92;
        t18 += v13 * b10;
        t19 += v13 * b11;
        t20 += v13 * b12;
        t21 += v13 * b13;
        t22 += v13 * b14;
        t23 += v13 * b15;
        v13 = a5[9];
        t9 += v13 * b0;
        t10 += v13 * b1;
        t11 += v13 * b22;
        t12 += v13 * b32;
        t13 += v13 * b42;
        t14 += v13 * b52;
        t15 += v13 * b62;
        t16 += v13 * b72;
        t17 += v13 * b82;
        t18 += v13 * b92;
        t19 += v13 * b10;
        t20 += v13 * b11;
        t21 += v13 * b12;
        t22 += v13 * b13;
        t23 += v13 * b14;
        t24 += v13 * b15;
        v13 = a5[10];
        t10 += v13 * b0;
        t11 += v13 * b1;
        t12 += v13 * b22;
        t13 += v13 * b32;
        t14 += v13 * b42;
        t15 += v13 * b52;
        t16 += v13 * b62;
        t17 += v13 * b72;
        t18 += v13 * b82;
        t19 += v13 * b92;
        t20 += v13 * b10;
        t21 += v13 * b11;
        t22 += v13 * b12;
        t23 += v13 * b13;
        t24 += v13 * b14;
        t25 += v13 * b15;
        v13 = a5[11];
        t11 += v13 * b0;
        t12 += v13 * b1;
        t13 += v13 * b22;
        t14 += v13 * b32;
        t15 += v13 * b42;
        t16 += v13 * b52;
        t17 += v13 * b62;
        t18 += v13 * b72;
        t19 += v13 * b82;
        t20 += v13 * b92;
        t21 += v13 * b10;
        t22 += v13 * b11;
        t23 += v13 * b12;
        t24 += v13 * b13;
        t25 += v13 * b14;
        t26 += v13 * b15;
        v13 = a5[12];
        t12 += v13 * b0;
        t13 += v13 * b1;
        t14 += v13 * b22;
        t15 += v13 * b32;
        t16 += v13 * b42;
        t17 += v13 * b52;
        t18 += v13 * b62;
        t19 += v13 * b72;
        t20 += v13 * b82;
        t21 += v13 * b92;
        t22 += v13 * b10;
        t23 += v13 * b11;
        t24 += v13 * b12;
        t25 += v13 * b13;
        t26 += v13 * b14;
        t27 += v13 * b15;
        v13 = a5[13];
        t13 += v13 * b0;
        t14 += v13 * b1;
        t15 += v13 * b22;
        t16 += v13 * b32;
        t17 += v13 * b42;
        t18 += v13 * b52;
        t19 += v13 * b62;
        t20 += v13 * b72;
        t21 += v13 * b82;
        t22 += v13 * b92;
        t23 += v13 * b10;
        t24 += v13 * b11;
        t25 += v13 * b12;
        t26 += v13 * b13;
        t27 += v13 * b14;
        t28 += v13 * b15;
        v13 = a5[14];
        t14 += v13 * b0;
        t15 += v13 * b1;
        t16 += v13 * b22;
        t17 += v13 * b32;
        t18 += v13 * b42;
        t19 += v13 * b52;
        t20 += v13 * b62;
        t21 += v13 * b72;
        t22 += v13 * b82;
        t23 += v13 * b92;
        t24 += v13 * b10;
        t25 += v13 * b11;
        t26 += v13 * b12;
        t27 += v13 * b13;
        t28 += v13 * b14;
        t29 += v13 * b15;
        v13 = a5[15];
        t15 += v13 * b0;
        t16 += v13 * b1;
        t17 += v13 * b22;
        t18 += v13 * b32;
        t19 += v13 * b42;
        t20 += v13 * b52;
        t21 += v13 * b62;
        t22 += v13 * b72;
        t23 += v13 * b82;
        t24 += v13 * b92;
        t25 += v13 * b10;
        t26 += v13 * b11;
        t27 += v13 * b12;
        t28 += v13 * b13;
        t29 += v13 * b14;
        t30 += v13 * b15;
        t0 += 38 * t16;
        t1 += 38 * t17;
        t2 += 38 * t18;
        t3 += 38 * t19;
        t4 += 38 * t20;
        t5 += 38 * t21;
        t6 += 38 * t22;
        t7 += 38 * t23;
        t8 += 38 * t24;
        t9 += 38 * t25;
        t10 += 38 * t26;
        t11 += 38 * t27;
        t12 += 38 * t28;
        t13 += 38 * t29;
        t14 += 38 * t30;
        c7 = 1;
        v13 = t0 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t0 = v13 - c7 * 65536;
        v13 = t1 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t1 = v13 - c7 * 65536;
        v13 = t2 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t2 = v13 - c7 * 65536;
        v13 = t3 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t3 = v13 - c7 * 65536;
        v13 = t4 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t4 = v13 - c7 * 65536;
        v13 = t5 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t5 = v13 - c7 * 65536;
        v13 = t6 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t6 = v13 - c7 * 65536;
        v13 = t7 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t7 = v13 - c7 * 65536;
        v13 = t8 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t8 = v13 - c7 * 65536;
        v13 = t9 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t9 = v13 - c7 * 65536;
        v13 = t10 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t10 = v13 - c7 * 65536;
        v13 = t11 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t11 = v13 - c7 * 65536;
        v13 = t12 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t12 = v13 - c7 * 65536;
        v13 = t13 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t13 = v13 - c7 * 65536;
        v13 = t14 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t14 = v13 - c7 * 65536;
        v13 = t15 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t15 = v13 - c7 * 65536;
        t0 += c7 - 1 + 37 * (c7 - 1);
        c7 = 1;
        v13 = t0 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t0 = v13 - c7 * 65536;
        v13 = t1 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t1 = v13 - c7 * 65536;
        v13 = t2 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t2 = v13 - c7 * 65536;
        v13 = t3 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t3 = v13 - c7 * 65536;
        v13 = t4 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t4 = v13 - c7 * 65536;
        v13 = t5 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t5 = v13 - c7 * 65536;
        v13 = t6 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t6 = v13 - c7 * 65536;
        v13 = t7 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t7 = v13 - c7 * 65536;
        v13 = t8 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t8 = v13 - c7 * 65536;
        v13 = t9 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t9 = v13 - c7 * 65536;
        v13 = t10 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t10 = v13 - c7 * 65536;
        v13 = t11 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t11 = v13 - c7 * 65536;
        v13 = t12 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t12 = v13 - c7 * 65536;
        v13 = t13 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t13 = v13 - c7 * 65536;
        v13 = t14 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t14 = v13 - c7 * 65536;
        v13 = t15 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t15 = v13 - c7 * 65536;
        t0 += c7 - 1 + 37 * (c7 - 1);
        o5[0] = t0;
        o5[1] = t1;
        o5[2] = t2;
        o5[3] = t3;
        o5[4] = t4;
        o5[5] = t5;
        o5[6] = t6;
        o5[7] = t7;
        o5[8] = t8;
        o5[9] = t9;
        o5[10] = t10;
        o5[11] = t11;
        o5[12] = t12;
        o5[13] = t13;
        o5[14] = t14;
        o5[15] = t15;
      }
      function square(o5, a5) {
        mul3(o5, a5, a5);
      }
      function inv25519(o5, inp) {
        const c7 = gf();
        for (let i5 = 0; i5 < 16; i5++) {
          c7[i5] = inp[i5];
        }
        for (let i5 = 253; i5 >= 0; i5--) {
          square(c7, c7);
          if (i5 !== 2 && i5 !== 4) {
            mul3(c7, c7, inp);
          }
        }
        for (let i5 = 0; i5 < 16; i5++) {
          o5[i5] = c7[i5];
        }
      }
      function scalarMult(n6, p7) {
        const z11 = new Uint8Array(32);
        const x13 = new Float64Array(80);
        const a5 = gf(), b9 = gf(), c7 = gf(), d6 = gf(), e2 = gf(), f7 = gf();
        for (let i5 = 0; i5 < 31; i5++) {
          z11[i5] = n6[i5];
        }
        z11[31] = n6[31] & 127 | 64;
        z11[0] &= 248;
        unpack25519(x13, p7);
        for (let i5 = 0; i5 < 16; i5++) {
          b9[i5] = x13[i5];
        }
        a5[0] = d6[0] = 1;
        for (let i5 = 254; i5 >= 0; --i5) {
          const r3 = z11[i5 >>> 3] >>> (i5 & 7) & 1;
          sel25519(a5, b9, r3);
          sel25519(c7, d6, r3);
          add5(e2, a5, c7);
          sub(a5, a5, c7);
          add5(c7, b9, d6);
          sub(b9, b9, d6);
          square(d6, e2);
          square(f7, a5);
          mul3(a5, c7, a5);
          mul3(c7, b9, e2);
          add5(e2, a5, c7);
          sub(a5, a5, c7);
          square(b9, a5);
          sub(c7, d6, f7);
          mul3(a5, c7, _121665);
          add5(a5, a5, d6);
          mul3(c7, c7, a5);
          mul3(a5, d6, f7);
          mul3(d6, b9, x13);
          square(b9, e2);
          sel25519(a5, b9, r3);
          sel25519(c7, d6, r3);
        }
        for (let i5 = 0; i5 < 16; i5++) {
          x13[i5 + 16] = a5[i5];
          x13[i5 + 32] = c7[i5];
          x13[i5 + 48] = b9[i5];
          x13[i5 + 64] = d6[i5];
        }
        const x32 = x13.subarray(32);
        const x16 = x13.subarray(16);
        inv25519(x32, x32);
        mul3(x16, x16, x32);
        const q7 = new Uint8Array(32);
        pack25519(q7, x16);
        return q7;
      }
      exports.scalarMult = scalarMult;
      function scalarMultBase(n6) {
        return scalarMult(n6, _9);
      }
      exports.scalarMultBase = scalarMultBase;
      function generateKeyPairFromSeed2(seed) {
        if (seed.length !== exports.SECRET_KEY_LENGTH) {
          throw new Error(`x25519: seed must be ${exports.SECRET_KEY_LENGTH} bytes`);
        }
        const secretKey = new Uint8Array(seed);
        const publicKey3 = scalarMultBase(secretKey);
        return {
          publicKey: publicKey3,
          secretKey
        };
      }
      exports.generateKeyPairFromSeed = generateKeyPairFromSeed2;
      function generateKeyPair3(prng) {
        const seed = (0, random_1.randomBytes)(32, prng);
        const result = generateKeyPairFromSeed2(seed);
        (0, wipe_1.wipe)(seed);
        return result;
      }
      exports.generateKeyPair = generateKeyPair3;
      function sharedKey2(mySecretKey, theirPublicKey, rejectZero = false) {
        if (mySecretKey.length !== exports.PUBLIC_KEY_LENGTH) {
          throw new Error("X25519: incorrect secret key length");
        }
        if (theirPublicKey.length !== exports.PUBLIC_KEY_LENGTH) {
          throw new Error("X25519: incorrect public key length");
        }
        const result = scalarMult(mySecretKey, theirPublicKey);
        if (rejectZero) {
          let zeros = 0;
          for (let i5 = 0; i5 < result.length; i5++) {
            zeros |= result[i5];
          }
          if (zeros === 0) {
            throw new Error("X25519: invalid shared key");
          }
        }
        return result;
      }
      exports.sharedKey = sharedKey2;
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/package.json
  var require_package2 = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/package.json"(exports, module) {
      module.exports = {
        name: "elliptic",
        version: "6.5.7",
        description: "EC cryptography",
        main: "lib/elliptic.js",
        files: [
          "lib"
        ],
        scripts: {
          lint: "eslint lib test",
          "lint:fix": "npm run lint -- --fix",
          unit: "istanbul test _mocha --reporter=spec test/index.js",
          test: "npm run lint && npm run unit",
          version: "grunt dist && git add dist/"
        },
        repository: {
          type: "git",
          url: "git@github.com:indutny/elliptic"
        },
        keywords: [
          "EC",
          "Elliptic",
          "curve",
          "Cryptography"
        ],
        author: "Fedor Indutny <fedor@indutny.com>",
        license: "MIT",
        bugs: {
          url: "https://github.com/indutny/elliptic/issues"
        },
        homepage: "https://github.com/indutny/elliptic",
        devDependencies: {
          brfs: "^2.0.2",
          coveralls: "^3.1.0",
          eslint: "^7.6.0",
          grunt: "^1.2.1",
          "grunt-browserify": "^5.3.0",
          "grunt-cli": "^1.3.2",
          "grunt-contrib-connect": "^3.0.0",
          "grunt-contrib-copy": "^1.0.0",
          "grunt-contrib-uglify": "^5.0.0",
          "grunt-mocha-istanbul": "^5.0.2",
          "grunt-saucelabs": "^9.0.1",
          istanbul: "^0.4.5",
          mocha: "^8.0.1"
        },
        dependencies: {
          "bn.js": "^4.11.9",
          brorand: "^1.1.0",
          "hash.js": "^1.0.0",
          "hmac-drbg": "^1.0.1",
          inherits: "^2.0.4",
          "minimalistic-assert": "^1.0.1",
          "minimalistic-crypto-utils": "^1.0.1"
        }
      };
    }
  });

  // ../../node_modules/.pnpm/bn.js@4.12.3/node_modules/bn.js/lib/bn.js
  var require_bn2 = __commonJS({
    "../../node_modules/.pnpm/bn.js@4.12.3/node_modules/bn.js/lib/bn.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      (function(module2, exports2) {
        "use strict";
        function assert12(val, msg) {
          if (!val) throw new Error(msg || "Assertion failed");
        }
        function inherits(ctor, superCtor) {
          ctor.super_ = superCtor;
          var TempCtor = function() {
          };
          TempCtor.prototype = superCtor.prototype;
          ctor.prototype = new TempCtor();
          ctor.prototype.constructor = ctor;
        }
        function BN4(number5, base4, endian) {
          if (BN4.isBN(number5)) {
            return number5;
          }
          this.negative = 0;
          this.words = null;
          this.length = 0;
          this.red = null;
          if (number5 !== null) {
            if (base4 === "le" || base4 === "be") {
              endian = base4;
              base4 = 10;
            }
            this._init(number5 || 0, base4 || 10, endian || "be");
          }
        }
        if (typeof module2 === "object") {
          module2.exports = BN4;
        } else {
          exports2.BN = BN4;
        }
        BN4.BN = BN4;
        BN4.wordSize = 26;
        var Buffer6;
        try {
          if (typeof window !== "undefined" && typeof window.Buffer !== "undefined") {
            Buffer6 = window.Buffer;
          } else {
            Buffer6 = require_buffer2().Buffer;
          }
        } catch (e2) {
        }
        BN4.isBN = function isBN(num2) {
          if (num2 instanceof BN4) {
            return true;
          }
          return num2 !== null && typeof num2 === "object" && num2.constructor.wordSize === BN4.wordSize && Array.isArray(num2.words);
        };
        BN4.max = function max(left, right) {
          if (left.cmp(right) > 0) return left;
          return right;
        };
        BN4.min = function min(left, right) {
          if (left.cmp(right) < 0) return left;
          return right;
        };
        BN4.prototype._init = function init2(number5, base4, endian) {
          if (typeof number5 === "number") {
            return this._initNumber(number5, base4, endian);
          }
          if (typeof number5 === "object") {
            return this._initArray(number5, base4, endian);
          }
          if (base4 === "hex") {
            base4 = 16;
          }
          assert12(base4 === (base4 | 0) && base4 >= 2 && base4 <= 36);
          number5 = number5.toString().replace(/\s+/g, "");
          var start = 0;
          if (number5[0] === "-") {
            start++;
            this.negative = 1;
          }
          if (start < number5.length) {
            if (base4 === 16) {
              this._parseHex(number5, start, endian);
            } else {
              this._parseBase(number5, base4, start);
              if (endian === "le") {
                this._initArray(this.toArray(), base4, endian);
              }
            }
          }
        };
        BN4.prototype._initNumber = function _initNumber(number5, base4, endian) {
          if (number5 < 0) {
            this.negative = 1;
            number5 = -number5;
          }
          if (number5 < 67108864) {
            this.words = [number5 & 67108863];
            this.length = 1;
          } else if (number5 < 4503599627370496) {
            this.words = [
              number5 & 67108863,
              number5 / 67108864 & 67108863
            ];
            this.length = 2;
          } else {
            assert12(number5 < 9007199254740992);
            this.words = [
              number5 & 67108863,
              number5 / 67108864 & 67108863,
              1
            ];
            this.length = 3;
          }
          if (endian !== "le") return;
          this._initArray(this.toArray(), base4, endian);
        };
        BN4.prototype._initArray = function _initArray(number5, base4, endian) {
          assert12(typeof number5.length === "number");
          if (number5.length <= 0) {
            this.words = [0];
            this.length = 1;
            return this;
          }
          this.length = Math.ceil(number5.length / 3);
          this.words = new Array(this.length);
          for (var i5 = 0; i5 < this.length; i5++) {
            this.words[i5] = 0;
          }
          var j6, w7;
          var off = 0;
          if (endian === "be") {
            for (i5 = number5.length - 1, j6 = 0; i5 >= 0; i5 -= 3) {
              w7 = number5[i5] | number5[i5 - 1] << 8 | number5[i5 - 2] << 16;
              this.words[j6] |= w7 << off & 67108863;
              this.words[j6 + 1] = w7 >>> 26 - off & 67108863;
              off += 24;
              if (off >= 26) {
                off -= 26;
                j6++;
              }
            }
          } else if (endian === "le") {
            for (i5 = 0, j6 = 0; i5 < number5.length; i5 += 3) {
              w7 = number5[i5] | number5[i5 + 1] << 8 | number5[i5 + 2] << 16;
              this.words[j6] |= w7 << off & 67108863;
              this.words[j6 + 1] = w7 >>> 26 - off & 67108863;
              off += 24;
              if (off >= 26) {
                off -= 26;
                j6++;
              }
            }
          }
          return this.strip();
        };
        function parseHex4Bits(string7, index2) {
          var c7 = string7.charCodeAt(index2);
          if (c7 >= 65 && c7 <= 70) {
            return c7 - 55;
          } else if (c7 >= 97 && c7 <= 102) {
            return c7 - 87;
          } else {
            return c7 - 48 & 15;
          }
        }
        function parseHexByte(string7, lowerBound, index2) {
          var r3 = parseHex4Bits(string7, index2);
          if (index2 - 1 >= lowerBound) {
            r3 |= parseHex4Bits(string7, index2 - 1) << 4;
          }
          return r3;
        }
        BN4.prototype._parseHex = function _parseHex(number5, start, endian) {
          this.length = Math.ceil((number5.length - start) / 6);
          this.words = new Array(this.length);
          for (var i5 = 0; i5 < this.length; i5++) {
            this.words[i5] = 0;
          }
          var off = 0;
          var j6 = 0;
          var w7;
          if (endian === "be") {
            for (i5 = number5.length - 1; i5 >= start; i5 -= 2) {
              w7 = parseHexByte(number5, start, i5) << off;
              this.words[j6] |= w7 & 67108863;
              if (off >= 18) {
                off -= 18;
                j6 += 1;
                this.words[j6] |= w7 >>> 26;
              } else {
                off += 8;
              }
            }
          } else {
            var parseLength = number5.length - start;
            for (i5 = parseLength % 2 === 0 ? start + 1 : start; i5 < number5.length; i5 += 2) {
              w7 = parseHexByte(number5, start, i5) << off;
              this.words[j6] |= w7 & 67108863;
              if (off >= 18) {
                off -= 18;
                j6 += 1;
                this.words[j6] |= w7 >>> 26;
              } else {
                off += 8;
              }
            }
          }
          this.strip();
        };
        function parseBase(str, start, end, mul3) {
          var r3 = 0;
          var len = Math.min(str.length, end);
          for (var i5 = start; i5 < len; i5++) {
            var c7 = str.charCodeAt(i5) - 48;
            r3 *= mul3;
            if (c7 >= 49) {
              r3 += c7 - 49 + 10;
            } else if (c7 >= 17) {
              r3 += c7 - 17 + 10;
            } else {
              r3 += c7;
            }
          }
          return r3;
        }
        BN4.prototype._parseBase = function _parseBase(number5, base4, start) {
          this.words = [0];
          this.length = 1;
          for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base4) {
            limbLen++;
          }
          limbLen--;
          limbPow = limbPow / base4 | 0;
          var total = number5.length - start;
          var mod3 = total % limbLen;
          var end = Math.min(total, total - mod3) + start;
          var word = 0;
          for (var i5 = start; i5 < end; i5 += limbLen) {
            word = parseBase(number5, i5, i5 + limbLen, base4);
            this.imuln(limbPow);
            if (this.words[0] + word < 67108864) {
              this.words[0] += word;
            } else {
              this._iaddn(word);
            }
          }
          if (mod3 !== 0) {
            var pow = 1;
            word = parseBase(number5, i5, number5.length, base4);
            for (i5 = 0; i5 < mod3; i5++) {
              pow *= base4;
            }
            this.imuln(pow);
            if (this.words[0] + word < 67108864) {
              this.words[0] += word;
            } else {
              this._iaddn(word);
            }
          }
          this.strip();
        };
        BN4.prototype.copy = function copy(dest) {
          dest.words = new Array(this.length);
          for (var i5 = 0; i5 < this.length; i5++) {
            dest.words[i5] = this.words[i5];
          }
          dest.length = this.length;
          dest.negative = this.negative;
          dest.red = this.red;
        };
        BN4.prototype.clone = function clone3() {
          var r3 = new BN4(null);
          this.copy(r3);
          return r3;
        };
        BN4.prototype._expand = function _expand(size5) {
          while (this.length < size5) {
            this.words[this.length++] = 0;
          }
          return this;
        };
        BN4.prototype.strip = function strip() {
          while (this.length > 1 && this.words[this.length - 1] === 0) {
            this.length--;
          }
          return this._normSign();
        };
        BN4.prototype._normSign = function _normSign() {
          if (this.length === 1 && this.words[0] === 0) {
            this.negative = 0;
          }
          return this;
        };
        BN4.prototype.inspect = function inspect4() {
          return (this.red ? "<BN-R: " : "<BN: ") + this.toString(16) + ">";
        };
        var zeros = [
          "",
          "0",
          "00",
          "000",
          "0000",
          "00000",
          "000000",
          "0000000",
          "00000000",
          "000000000",
          "0000000000",
          "00000000000",
          "000000000000",
          "0000000000000",
          "00000000000000",
          "000000000000000",
          "0000000000000000",
          "00000000000000000",
          "000000000000000000",
          "0000000000000000000",
          "00000000000000000000",
          "000000000000000000000",
          "0000000000000000000000",
          "00000000000000000000000",
          "000000000000000000000000",
          "0000000000000000000000000"
        ];
        var groupSizes = [
          0,
          0,
          25,
          16,
          12,
          11,
          10,
          9,
          8,
          8,
          7,
          7,
          7,
          7,
          6,
          6,
          6,
          6,
          6,
          6,
          6,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5,
          5
        ];
        var groupBases = [
          0,
          0,
          33554432,
          43046721,
          16777216,
          48828125,
          60466176,
          40353607,
          16777216,
          43046721,
          1e7,
          19487171,
          35831808,
          62748517,
          7529536,
          11390625,
          16777216,
          24137569,
          34012224,
          47045881,
          64e6,
          4084101,
          5153632,
          6436343,
          7962624,
          9765625,
          11881376,
          14348907,
          17210368,
          20511149,
          243e5,
          28629151,
          33554432,
          39135393,
          45435424,
          52521875,
          60466176
        ];
        BN4.prototype.toString = function toString5(base4, padding) {
          base4 = base4 || 10;
          padding = padding | 0 || 1;
          var out;
          if (base4 === 16 || base4 === "hex") {
            out = "";
            var off = 0;
            var carry = 0;
            for (var i5 = 0; i5 < this.length; i5++) {
              var w7 = this.words[i5];
              var word = ((w7 << off | carry) & 16777215).toString(16);
              carry = w7 >>> 24 - off & 16777215;
              off += 2;
              if (off >= 26) {
                off -= 26;
                i5--;
              }
              if (carry !== 0 || i5 !== this.length - 1) {
                out = zeros[6 - word.length] + word + out;
              } else {
                out = word + out;
              }
            }
            if (carry !== 0) {
              out = carry.toString(16) + out;
            }
            while (out.length % padding !== 0) {
              out = "0" + out;
            }
            if (this.negative !== 0) {
              out = "-" + out;
            }
            return out;
          }
          if (base4 === (base4 | 0) && base4 >= 2 && base4 <= 36) {
            var groupSize = groupSizes[base4];
            var groupBase = groupBases[base4];
            out = "";
            var c7 = this.clone();
            c7.negative = 0;
            while (!c7.isZero()) {
              var r3 = c7.modn(groupBase).toString(base4);
              c7 = c7.idivn(groupBase);
              if (!c7.isZero()) {
                out = zeros[groupSize - r3.length] + r3 + out;
              } else {
                out = r3 + out;
              }
            }
            if (this.isZero()) {
              out = "0" + out;
            }
            while (out.length % padding !== 0) {
              out = "0" + out;
            }
            if (this.negative !== 0) {
              out = "-" + out;
            }
            return out;
          }
          assert12(false, "Base should be between 2 and 36");
        };
        BN4.prototype.toNumber = function toNumber3() {
          var ret = this.words[0];
          if (this.length === 2) {
            ret += this.words[1] * 67108864;
          } else if (this.length === 3 && this.words[2] === 1) {
            ret += 4503599627370496 + this.words[1] * 67108864;
          } else if (this.length > 2) {
            assert12(false, "Number can only safely store up to 53 bits");
          }
          return this.negative !== 0 ? -ret : ret;
        };
        BN4.prototype.toJSON = function toJSON2() {
          return this.toString(16);
        };
        BN4.prototype.toBuffer = function toBuffer2(endian, length2) {
          assert12(typeof Buffer6 !== "undefined");
          return this.toArrayLike(Buffer6, endian, length2);
        };
        BN4.prototype.toArray = function toArray(endian, length2) {
          return this.toArrayLike(Array, endian, length2);
        };
        BN4.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length2) {
          var byteLength = this.byteLength();
          var reqLength = length2 || Math.max(1, byteLength);
          assert12(byteLength <= reqLength, "byte array longer than desired length");
          assert12(reqLength > 0, "Requested array length <= 0");
          this.strip();
          var littleEndian = endian === "le";
          var res = new ArrayType(reqLength);
          var b9, i5;
          var q7 = this.clone();
          if (!littleEndian) {
            for (i5 = 0; i5 < reqLength - byteLength; i5++) {
              res[i5] = 0;
            }
            for (i5 = 0; !q7.isZero(); i5++) {
              b9 = q7.andln(255);
              q7.iushrn(8);
              res[reqLength - i5 - 1] = b9;
            }
          } else {
            for (i5 = 0; !q7.isZero(); i5++) {
              b9 = q7.andln(255);
              q7.iushrn(8);
              res[i5] = b9;
            }
            for (; i5 < reqLength; i5++) {
              res[i5] = 0;
            }
          }
          return res;
        };
        if (Math.clz32) {
          BN4.prototype._countBits = function _countBits(w7) {
            return 32 - Math.clz32(w7);
          };
        } else {
          BN4.prototype._countBits = function _countBits(w7) {
            var t = w7;
            var r3 = 0;
            if (t >= 4096) {
              r3 += 13;
              t >>>= 13;
            }
            if (t >= 64) {
              r3 += 7;
              t >>>= 7;
            }
            if (t >= 8) {
              r3 += 4;
              t >>>= 4;
            }
            if (t >= 2) {
              r3 += 2;
              t >>>= 2;
            }
            return r3 + t;
          };
        }
        BN4.prototype._zeroBits = function _zeroBits(w7) {
          if (w7 === 0) return 26;
          var t = w7;
          var r3 = 0;
          if ((t & 8191) === 0) {
            r3 += 13;
            t >>>= 13;
          }
          if ((t & 127) === 0) {
            r3 += 7;
            t >>>= 7;
          }
          if ((t & 15) === 0) {
            r3 += 4;
            t >>>= 4;
          }
          if ((t & 3) === 0) {
            r3 += 2;
            t >>>= 2;
          }
          if ((t & 1) === 0) {
            r3++;
          }
          return r3;
        };
        BN4.prototype.bitLength = function bitLength() {
          var w7 = this.words[this.length - 1];
          var hi2 = this._countBits(w7);
          return (this.length - 1) * 26 + hi2;
        };
        function toBitArray(num2) {
          var w7 = new Array(num2.bitLength());
          for (var bit = 0; bit < w7.length; bit++) {
            var off = bit / 26 | 0;
            var wbit = bit % 26;
            w7[bit] = (num2.words[off] & 1 << wbit) >>> wbit;
          }
          return w7;
        }
        BN4.prototype.zeroBits = function zeroBits() {
          if (this.isZero()) return 0;
          var r3 = 0;
          for (var i5 = 0; i5 < this.length; i5++) {
            var b9 = this._zeroBits(this.words[i5]);
            r3 += b9;
            if (b9 !== 26) break;
          }
          return r3;
        };
        BN4.prototype.byteLength = function byteLength() {
          return Math.ceil(this.bitLength() / 8);
        };
        BN4.prototype.toTwos = function toTwos(width) {
          if (this.negative !== 0) {
            return this.abs().inotn(width).iaddn(1);
          }
          return this.clone();
        };
        BN4.prototype.fromTwos = function fromTwos(width) {
          if (this.testn(width - 1)) {
            return this.notn(width).iaddn(1).ineg();
          }
          return this.clone();
        };
        BN4.prototype.isNeg = function isNeg() {
          return this.negative !== 0;
        };
        BN4.prototype.neg = function neg3() {
          return this.clone().ineg();
        };
        BN4.prototype.ineg = function ineg() {
          if (!this.isZero()) {
            this.negative ^= 1;
          }
          return this;
        };
        BN4.prototype.iuor = function iuor(num2) {
          while (this.length < num2.length) {
            this.words[this.length++] = 0;
          }
          for (var i5 = 0; i5 < num2.length; i5++) {
            this.words[i5] = this.words[i5] | num2.words[i5];
          }
          return this.strip();
        };
        BN4.prototype.ior = function ior(num2) {
          assert12((this.negative | num2.negative) === 0);
          return this.iuor(num2);
        };
        BN4.prototype.or = function or5(num2) {
          if (this.length > num2.length) return this.clone().ior(num2);
          return num2.clone().ior(this);
        };
        BN4.prototype.uor = function uor(num2) {
          if (this.length > num2.length) return this.clone().iuor(num2);
          return num2.clone().iuor(this);
        };
        BN4.prototype.iuand = function iuand(num2) {
          var b9;
          if (this.length > num2.length) {
            b9 = num2;
          } else {
            b9 = this;
          }
          for (var i5 = 0; i5 < b9.length; i5++) {
            this.words[i5] = this.words[i5] & num2.words[i5];
          }
          this.length = b9.length;
          return this.strip();
        };
        BN4.prototype.iand = function iand(num2) {
          assert12((this.negative | num2.negative) === 0);
          return this.iuand(num2);
        };
        BN4.prototype.and = function and(num2) {
          if (this.length > num2.length) return this.clone().iand(num2);
          return num2.clone().iand(this);
        };
        BN4.prototype.uand = function uand(num2) {
          if (this.length > num2.length) return this.clone().iuand(num2);
          return num2.clone().iuand(this);
        };
        BN4.prototype.iuxor = function iuxor(num2) {
          var a5;
          var b9;
          if (this.length > num2.length) {
            a5 = this;
            b9 = num2;
          } else {
            a5 = num2;
            b9 = this;
          }
          for (var i5 = 0; i5 < b9.length; i5++) {
            this.words[i5] = a5.words[i5] ^ b9.words[i5];
          }
          if (this !== a5) {
            for (; i5 < a5.length; i5++) {
              this.words[i5] = a5.words[i5];
            }
          }
          this.length = a5.length;
          return this.strip();
        };
        BN4.prototype.ixor = function ixor(num2) {
          assert12((this.negative | num2.negative) === 0);
          return this.iuxor(num2);
        };
        BN4.prototype.xor = function xor4(num2) {
          if (this.length > num2.length) return this.clone().ixor(num2);
          return num2.clone().ixor(this);
        };
        BN4.prototype.uxor = function uxor(num2) {
          if (this.length > num2.length) return this.clone().iuxor(num2);
          return num2.clone().iuxor(this);
        };
        BN4.prototype.inotn = function inotn(width) {
          assert12(typeof width === "number" && width >= 0);
          var bytesNeeded = Math.ceil(width / 26) | 0;
          var bitsLeft = width % 26;
          this._expand(bytesNeeded);
          if (bitsLeft > 0) {
            bytesNeeded--;
          }
          for (var i5 = 0; i5 < bytesNeeded; i5++) {
            this.words[i5] = ~this.words[i5] & 67108863;
          }
          if (bitsLeft > 0) {
            this.words[i5] = ~this.words[i5] & 67108863 >> 26 - bitsLeft;
          }
          return this.strip();
        };
        BN4.prototype.notn = function notn(width) {
          return this.clone().inotn(width);
        };
        BN4.prototype.setn = function setn(bit, val) {
          assert12(typeof bit === "number" && bit >= 0);
          var off = bit / 26 | 0;
          var wbit = bit % 26;
          this._expand(off + 1);
          if (val) {
            this.words[off] = this.words[off] | 1 << wbit;
          } else {
            this.words[off] = this.words[off] & ~(1 << wbit);
          }
          return this.strip();
        };
        BN4.prototype.iadd = function iadd(num2) {
          var r3;
          if (this.negative !== 0 && num2.negative === 0) {
            this.negative = 0;
            r3 = this.isub(num2);
            this.negative ^= 1;
            return this._normSign();
          } else if (this.negative === 0 && num2.negative !== 0) {
            num2.negative = 0;
            r3 = this.isub(num2);
            num2.negative = 1;
            return r3._normSign();
          }
          var a5, b9;
          if (this.length > num2.length) {
            a5 = this;
            b9 = num2;
          } else {
            a5 = num2;
            b9 = this;
          }
          var carry = 0;
          for (var i5 = 0; i5 < b9.length; i5++) {
            r3 = (a5.words[i5] | 0) + (b9.words[i5] | 0) + carry;
            this.words[i5] = r3 & 67108863;
            carry = r3 >>> 26;
          }
          for (; carry !== 0 && i5 < a5.length; i5++) {
            r3 = (a5.words[i5] | 0) + carry;
            this.words[i5] = r3 & 67108863;
            carry = r3 >>> 26;
          }
          this.length = a5.length;
          if (carry !== 0) {
            this.words[this.length] = carry;
            this.length++;
          } else if (a5 !== this) {
            for (; i5 < a5.length; i5++) {
              this.words[i5] = a5.words[i5];
            }
          }
          return this;
        };
        BN4.prototype.add = function add5(num2) {
          var res;
          if (num2.negative !== 0 && this.negative === 0) {
            num2.negative = 0;
            res = this.sub(num2);
            num2.negative ^= 1;
            return res;
          } else if (num2.negative === 0 && this.negative !== 0) {
            this.negative = 0;
            res = num2.sub(this);
            this.negative = 1;
            return res;
          }
          if (this.length > num2.length) return this.clone().iadd(num2);
          return num2.clone().iadd(this);
        };
        BN4.prototype.isub = function isub(num2) {
          if (num2.negative !== 0) {
            num2.negative = 0;
            var r3 = this.iadd(num2);
            num2.negative = 1;
            return r3._normSign();
          } else if (this.negative !== 0) {
            this.negative = 0;
            this.iadd(num2);
            this.negative = 1;
            return this._normSign();
          }
          var cmp = this.cmp(num2);
          if (cmp === 0) {
            this.negative = 0;
            this.length = 1;
            this.words[0] = 0;
            return this;
          }
          var a5, b9;
          if (cmp > 0) {
            a5 = this;
            b9 = num2;
          } else {
            a5 = num2;
            b9 = this;
          }
          var carry = 0;
          for (var i5 = 0; i5 < b9.length; i5++) {
            r3 = (a5.words[i5] | 0) - (b9.words[i5] | 0) + carry;
            carry = r3 >> 26;
            this.words[i5] = r3 & 67108863;
          }
          for (; carry !== 0 && i5 < a5.length; i5++) {
            r3 = (a5.words[i5] | 0) + carry;
            carry = r3 >> 26;
            this.words[i5] = r3 & 67108863;
          }
          if (carry === 0 && i5 < a5.length && a5 !== this) {
            for (; i5 < a5.length; i5++) {
              this.words[i5] = a5.words[i5];
            }
          }
          this.length = Math.max(this.length, i5);
          if (a5 !== this) {
            this.negative = 1;
          }
          return this.strip();
        };
        BN4.prototype.sub = function sub(num2) {
          return this.clone().isub(num2);
        };
        function smallMulTo(self2, num2, out) {
          out.negative = num2.negative ^ self2.negative;
          var len = self2.length + num2.length | 0;
          out.length = len;
          len = len - 1 | 0;
          var a5 = self2.words[0] | 0;
          var b9 = num2.words[0] | 0;
          var r3 = a5 * b9;
          var lo4 = r3 & 67108863;
          var carry = r3 / 67108864 | 0;
          out.words[0] = lo4;
          for (var k7 = 1; k7 < len; k7++) {
            var ncarry = carry >>> 26;
            var rword = carry & 67108863;
            var maxJ = Math.min(k7, num2.length - 1);
            for (var j6 = Math.max(0, k7 - self2.length + 1); j6 <= maxJ; j6++) {
              var i5 = k7 - j6 | 0;
              a5 = self2.words[i5] | 0;
              b9 = num2.words[j6] | 0;
              r3 = a5 * b9 + rword;
              ncarry += r3 / 67108864 | 0;
              rword = r3 & 67108863;
            }
            out.words[k7] = rword | 0;
            carry = ncarry | 0;
          }
          if (carry !== 0) {
            out.words[k7] = carry | 0;
          } else {
            out.length--;
          }
          return out.strip();
        }
        var comb10MulTo = function comb10MulTo2(self2, num2, out) {
          var a5 = self2.words;
          var b9 = num2.words;
          var o5 = out.words;
          var c7 = 0;
          var lo4;
          var mid;
          var hi2;
          var a0 = a5[0] | 0;
          var al0 = a0 & 8191;
          var ah0 = a0 >>> 13;
          var a1 = a5[1] | 0;
          var al1 = a1 & 8191;
          var ah1 = a1 >>> 13;
          var a22 = a5[2] | 0;
          var al2 = a22 & 8191;
          var ah2 = a22 >>> 13;
          var a32 = a5[3] | 0;
          var al3 = a32 & 8191;
          var ah3 = a32 >>> 13;
          var a42 = a5[4] | 0;
          var al4 = a42 & 8191;
          var ah4 = a42 >>> 13;
          var a52 = a5[5] | 0;
          var al5 = a52 & 8191;
          var ah5 = a52 >>> 13;
          var a6 = a5[6] | 0;
          var al6 = a6 & 8191;
          var ah6 = a6 >>> 13;
          var a7 = a5[7] | 0;
          var al7 = a7 & 8191;
          var ah7 = a7 >>> 13;
          var a8 = a5[8] | 0;
          var al8 = a8 & 8191;
          var ah8 = a8 >>> 13;
          var a9 = a5[9] | 0;
          var al9 = a9 & 8191;
          var ah9 = a9 >>> 13;
          var b0 = b9[0] | 0;
          var bl0 = b0 & 8191;
          var bh0 = b0 >>> 13;
          var b1 = b9[1] | 0;
          var bl1 = b1 & 8191;
          var bh1 = b1 >>> 13;
          var b22 = b9[2] | 0;
          var bl2 = b22 & 8191;
          var bh2 = b22 >>> 13;
          var b32 = b9[3] | 0;
          var bl3 = b32 & 8191;
          var bh3 = b32 >>> 13;
          var b42 = b9[4] | 0;
          var bl4 = b42 & 8191;
          var bh4 = b42 >>> 13;
          var b52 = b9[5] | 0;
          var bl5 = b52 & 8191;
          var bh5 = b52 >>> 13;
          var b62 = b9[6] | 0;
          var bl6 = b62 & 8191;
          var bh6 = b62 >>> 13;
          var b72 = b9[7] | 0;
          var bl7 = b72 & 8191;
          var bh7 = b72 >>> 13;
          var b82 = b9[8] | 0;
          var bl8 = b82 & 8191;
          var bh8 = b82 >>> 13;
          var b92 = b9[9] | 0;
          var bl9 = b92 & 8191;
          var bh9 = b92 >>> 13;
          out.negative = self2.negative ^ num2.negative;
          out.length = 19;
          lo4 = Math.imul(al0, bl0);
          mid = Math.imul(al0, bh0);
          mid = mid + Math.imul(ah0, bl0) | 0;
          hi2 = Math.imul(ah0, bh0);
          var w0 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w0 >>> 26) | 0;
          w0 &= 67108863;
          lo4 = Math.imul(al1, bl0);
          mid = Math.imul(al1, bh0);
          mid = mid + Math.imul(ah1, bl0) | 0;
          hi2 = Math.imul(ah1, bh0);
          lo4 = lo4 + Math.imul(al0, bl1) | 0;
          mid = mid + Math.imul(al0, bh1) | 0;
          mid = mid + Math.imul(ah0, bl1) | 0;
          hi2 = hi2 + Math.imul(ah0, bh1) | 0;
          var w1 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w1 >>> 26) | 0;
          w1 &= 67108863;
          lo4 = Math.imul(al2, bl0);
          mid = Math.imul(al2, bh0);
          mid = mid + Math.imul(ah2, bl0) | 0;
          hi2 = Math.imul(ah2, bh0);
          lo4 = lo4 + Math.imul(al1, bl1) | 0;
          mid = mid + Math.imul(al1, bh1) | 0;
          mid = mid + Math.imul(ah1, bl1) | 0;
          hi2 = hi2 + Math.imul(ah1, bh1) | 0;
          lo4 = lo4 + Math.imul(al0, bl2) | 0;
          mid = mid + Math.imul(al0, bh2) | 0;
          mid = mid + Math.imul(ah0, bl2) | 0;
          hi2 = hi2 + Math.imul(ah0, bh2) | 0;
          var w22 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w22 >>> 26) | 0;
          w22 &= 67108863;
          lo4 = Math.imul(al3, bl0);
          mid = Math.imul(al3, bh0);
          mid = mid + Math.imul(ah3, bl0) | 0;
          hi2 = Math.imul(ah3, bh0);
          lo4 = lo4 + Math.imul(al2, bl1) | 0;
          mid = mid + Math.imul(al2, bh1) | 0;
          mid = mid + Math.imul(ah2, bl1) | 0;
          hi2 = hi2 + Math.imul(ah2, bh1) | 0;
          lo4 = lo4 + Math.imul(al1, bl2) | 0;
          mid = mid + Math.imul(al1, bh2) | 0;
          mid = mid + Math.imul(ah1, bl2) | 0;
          hi2 = hi2 + Math.imul(ah1, bh2) | 0;
          lo4 = lo4 + Math.imul(al0, bl3) | 0;
          mid = mid + Math.imul(al0, bh3) | 0;
          mid = mid + Math.imul(ah0, bl3) | 0;
          hi2 = hi2 + Math.imul(ah0, bh3) | 0;
          var w32 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w32 >>> 26) | 0;
          w32 &= 67108863;
          lo4 = Math.imul(al4, bl0);
          mid = Math.imul(al4, bh0);
          mid = mid + Math.imul(ah4, bl0) | 0;
          hi2 = Math.imul(ah4, bh0);
          lo4 = lo4 + Math.imul(al3, bl1) | 0;
          mid = mid + Math.imul(al3, bh1) | 0;
          mid = mid + Math.imul(ah3, bl1) | 0;
          hi2 = hi2 + Math.imul(ah3, bh1) | 0;
          lo4 = lo4 + Math.imul(al2, bl2) | 0;
          mid = mid + Math.imul(al2, bh2) | 0;
          mid = mid + Math.imul(ah2, bl2) | 0;
          hi2 = hi2 + Math.imul(ah2, bh2) | 0;
          lo4 = lo4 + Math.imul(al1, bl3) | 0;
          mid = mid + Math.imul(al1, bh3) | 0;
          mid = mid + Math.imul(ah1, bl3) | 0;
          hi2 = hi2 + Math.imul(ah1, bh3) | 0;
          lo4 = lo4 + Math.imul(al0, bl4) | 0;
          mid = mid + Math.imul(al0, bh4) | 0;
          mid = mid + Math.imul(ah0, bl4) | 0;
          hi2 = hi2 + Math.imul(ah0, bh4) | 0;
          var w42 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w42 >>> 26) | 0;
          w42 &= 67108863;
          lo4 = Math.imul(al5, bl0);
          mid = Math.imul(al5, bh0);
          mid = mid + Math.imul(ah5, bl0) | 0;
          hi2 = Math.imul(ah5, bh0);
          lo4 = lo4 + Math.imul(al4, bl1) | 0;
          mid = mid + Math.imul(al4, bh1) | 0;
          mid = mid + Math.imul(ah4, bl1) | 0;
          hi2 = hi2 + Math.imul(ah4, bh1) | 0;
          lo4 = lo4 + Math.imul(al3, bl2) | 0;
          mid = mid + Math.imul(al3, bh2) | 0;
          mid = mid + Math.imul(ah3, bl2) | 0;
          hi2 = hi2 + Math.imul(ah3, bh2) | 0;
          lo4 = lo4 + Math.imul(al2, bl3) | 0;
          mid = mid + Math.imul(al2, bh3) | 0;
          mid = mid + Math.imul(ah2, bl3) | 0;
          hi2 = hi2 + Math.imul(ah2, bh3) | 0;
          lo4 = lo4 + Math.imul(al1, bl4) | 0;
          mid = mid + Math.imul(al1, bh4) | 0;
          mid = mid + Math.imul(ah1, bl4) | 0;
          hi2 = hi2 + Math.imul(ah1, bh4) | 0;
          lo4 = lo4 + Math.imul(al0, bl5) | 0;
          mid = mid + Math.imul(al0, bh5) | 0;
          mid = mid + Math.imul(ah0, bl5) | 0;
          hi2 = hi2 + Math.imul(ah0, bh5) | 0;
          var w52 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w52 >>> 26) | 0;
          w52 &= 67108863;
          lo4 = Math.imul(al6, bl0);
          mid = Math.imul(al6, bh0);
          mid = mid + Math.imul(ah6, bl0) | 0;
          hi2 = Math.imul(ah6, bh0);
          lo4 = lo4 + Math.imul(al5, bl1) | 0;
          mid = mid + Math.imul(al5, bh1) | 0;
          mid = mid + Math.imul(ah5, bl1) | 0;
          hi2 = hi2 + Math.imul(ah5, bh1) | 0;
          lo4 = lo4 + Math.imul(al4, bl2) | 0;
          mid = mid + Math.imul(al4, bh2) | 0;
          mid = mid + Math.imul(ah4, bl2) | 0;
          hi2 = hi2 + Math.imul(ah4, bh2) | 0;
          lo4 = lo4 + Math.imul(al3, bl3) | 0;
          mid = mid + Math.imul(al3, bh3) | 0;
          mid = mid + Math.imul(ah3, bl3) | 0;
          hi2 = hi2 + Math.imul(ah3, bh3) | 0;
          lo4 = lo4 + Math.imul(al2, bl4) | 0;
          mid = mid + Math.imul(al2, bh4) | 0;
          mid = mid + Math.imul(ah2, bl4) | 0;
          hi2 = hi2 + Math.imul(ah2, bh4) | 0;
          lo4 = lo4 + Math.imul(al1, bl5) | 0;
          mid = mid + Math.imul(al1, bh5) | 0;
          mid = mid + Math.imul(ah1, bl5) | 0;
          hi2 = hi2 + Math.imul(ah1, bh5) | 0;
          lo4 = lo4 + Math.imul(al0, bl6) | 0;
          mid = mid + Math.imul(al0, bh6) | 0;
          mid = mid + Math.imul(ah0, bl6) | 0;
          hi2 = hi2 + Math.imul(ah0, bh6) | 0;
          var w62 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w62 >>> 26) | 0;
          w62 &= 67108863;
          lo4 = Math.imul(al7, bl0);
          mid = Math.imul(al7, bh0);
          mid = mid + Math.imul(ah7, bl0) | 0;
          hi2 = Math.imul(ah7, bh0);
          lo4 = lo4 + Math.imul(al6, bl1) | 0;
          mid = mid + Math.imul(al6, bh1) | 0;
          mid = mid + Math.imul(ah6, bl1) | 0;
          hi2 = hi2 + Math.imul(ah6, bh1) | 0;
          lo4 = lo4 + Math.imul(al5, bl2) | 0;
          mid = mid + Math.imul(al5, bh2) | 0;
          mid = mid + Math.imul(ah5, bl2) | 0;
          hi2 = hi2 + Math.imul(ah5, bh2) | 0;
          lo4 = lo4 + Math.imul(al4, bl3) | 0;
          mid = mid + Math.imul(al4, bh3) | 0;
          mid = mid + Math.imul(ah4, bl3) | 0;
          hi2 = hi2 + Math.imul(ah4, bh3) | 0;
          lo4 = lo4 + Math.imul(al3, bl4) | 0;
          mid = mid + Math.imul(al3, bh4) | 0;
          mid = mid + Math.imul(ah3, bl4) | 0;
          hi2 = hi2 + Math.imul(ah3, bh4) | 0;
          lo4 = lo4 + Math.imul(al2, bl5) | 0;
          mid = mid + Math.imul(al2, bh5) | 0;
          mid = mid + Math.imul(ah2, bl5) | 0;
          hi2 = hi2 + Math.imul(ah2, bh5) | 0;
          lo4 = lo4 + Math.imul(al1, bl6) | 0;
          mid = mid + Math.imul(al1, bh6) | 0;
          mid = mid + Math.imul(ah1, bl6) | 0;
          hi2 = hi2 + Math.imul(ah1, bh6) | 0;
          lo4 = lo4 + Math.imul(al0, bl7) | 0;
          mid = mid + Math.imul(al0, bh7) | 0;
          mid = mid + Math.imul(ah0, bl7) | 0;
          hi2 = hi2 + Math.imul(ah0, bh7) | 0;
          var w7 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w7 >>> 26) | 0;
          w7 &= 67108863;
          lo4 = Math.imul(al8, bl0);
          mid = Math.imul(al8, bh0);
          mid = mid + Math.imul(ah8, bl0) | 0;
          hi2 = Math.imul(ah8, bh0);
          lo4 = lo4 + Math.imul(al7, bl1) | 0;
          mid = mid + Math.imul(al7, bh1) | 0;
          mid = mid + Math.imul(ah7, bl1) | 0;
          hi2 = hi2 + Math.imul(ah7, bh1) | 0;
          lo4 = lo4 + Math.imul(al6, bl2) | 0;
          mid = mid + Math.imul(al6, bh2) | 0;
          mid = mid + Math.imul(ah6, bl2) | 0;
          hi2 = hi2 + Math.imul(ah6, bh2) | 0;
          lo4 = lo4 + Math.imul(al5, bl3) | 0;
          mid = mid + Math.imul(al5, bh3) | 0;
          mid = mid + Math.imul(ah5, bl3) | 0;
          hi2 = hi2 + Math.imul(ah5, bh3) | 0;
          lo4 = lo4 + Math.imul(al4, bl4) | 0;
          mid = mid + Math.imul(al4, bh4) | 0;
          mid = mid + Math.imul(ah4, bl4) | 0;
          hi2 = hi2 + Math.imul(ah4, bh4) | 0;
          lo4 = lo4 + Math.imul(al3, bl5) | 0;
          mid = mid + Math.imul(al3, bh5) | 0;
          mid = mid + Math.imul(ah3, bl5) | 0;
          hi2 = hi2 + Math.imul(ah3, bh5) | 0;
          lo4 = lo4 + Math.imul(al2, bl6) | 0;
          mid = mid + Math.imul(al2, bh6) | 0;
          mid = mid + Math.imul(ah2, bl6) | 0;
          hi2 = hi2 + Math.imul(ah2, bh6) | 0;
          lo4 = lo4 + Math.imul(al1, bl7) | 0;
          mid = mid + Math.imul(al1, bh7) | 0;
          mid = mid + Math.imul(ah1, bl7) | 0;
          hi2 = hi2 + Math.imul(ah1, bh7) | 0;
          lo4 = lo4 + Math.imul(al0, bl8) | 0;
          mid = mid + Math.imul(al0, bh8) | 0;
          mid = mid + Math.imul(ah0, bl8) | 0;
          hi2 = hi2 + Math.imul(ah0, bh8) | 0;
          var w8 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w8 >>> 26) | 0;
          w8 &= 67108863;
          lo4 = Math.imul(al9, bl0);
          mid = Math.imul(al9, bh0);
          mid = mid + Math.imul(ah9, bl0) | 0;
          hi2 = Math.imul(ah9, bh0);
          lo4 = lo4 + Math.imul(al8, bl1) | 0;
          mid = mid + Math.imul(al8, bh1) | 0;
          mid = mid + Math.imul(ah8, bl1) | 0;
          hi2 = hi2 + Math.imul(ah8, bh1) | 0;
          lo4 = lo4 + Math.imul(al7, bl2) | 0;
          mid = mid + Math.imul(al7, bh2) | 0;
          mid = mid + Math.imul(ah7, bl2) | 0;
          hi2 = hi2 + Math.imul(ah7, bh2) | 0;
          lo4 = lo4 + Math.imul(al6, bl3) | 0;
          mid = mid + Math.imul(al6, bh3) | 0;
          mid = mid + Math.imul(ah6, bl3) | 0;
          hi2 = hi2 + Math.imul(ah6, bh3) | 0;
          lo4 = lo4 + Math.imul(al5, bl4) | 0;
          mid = mid + Math.imul(al5, bh4) | 0;
          mid = mid + Math.imul(ah5, bl4) | 0;
          hi2 = hi2 + Math.imul(ah5, bh4) | 0;
          lo4 = lo4 + Math.imul(al4, bl5) | 0;
          mid = mid + Math.imul(al4, bh5) | 0;
          mid = mid + Math.imul(ah4, bl5) | 0;
          hi2 = hi2 + Math.imul(ah4, bh5) | 0;
          lo4 = lo4 + Math.imul(al3, bl6) | 0;
          mid = mid + Math.imul(al3, bh6) | 0;
          mid = mid + Math.imul(ah3, bl6) | 0;
          hi2 = hi2 + Math.imul(ah3, bh6) | 0;
          lo4 = lo4 + Math.imul(al2, bl7) | 0;
          mid = mid + Math.imul(al2, bh7) | 0;
          mid = mid + Math.imul(ah2, bl7) | 0;
          hi2 = hi2 + Math.imul(ah2, bh7) | 0;
          lo4 = lo4 + Math.imul(al1, bl8) | 0;
          mid = mid + Math.imul(al1, bh8) | 0;
          mid = mid + Math.imul(ah1, bl8) | 0;
          hi2 = hi2 + Math.imul(ah1, bh8) | 0;
          lo4 = lo4 + Math.imul(al0, bl9) | 0;
          mid = mid + Math.imul(al0, bh9) | 0;
          mid = mid + Math.imul(ah0, bl9) | 0;
          hi2 = hi2 + Math.imul(ah0, bh9) | 0;
          var w9 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w9 >>> 26) | 0;
          w9 &= 67108863;
          lo4 = Math.imul(al9, bl1);
          mid = Math.imul(al9, bh1);
          mid = mid + Math.imul(ah9, bl1) | 0;
          hi2 = Math.imul(ah9, bh1);
          lo4 = lo4 + Math.imul(al8, bl2) | 0;
          mid = mid + Math.imul(al8, bh2) | 0;
          mid = mid + Math.imul(ah8, bl2) | 0;
          hi2 = hi2 + Math.imul(ah8, bh2) | 0;
          lo4 = lo4 + Math.imul(al7, bl3) | 0;
          mid = mid + Math.imul(al7, bh3) | 0;
          mid = mid + Math.imul(ah7, bl3) | 0;
          hi2 = hi2 + Math.imul(ah7, bh3) | 0;
          lo4 = lo4 + Math.imul(al6, bl4) | 0;
          mid = mid + Math.imul(al6, bh4) | 0;
          mid = mid + Math.imul(ah6, bl4) | 0;
          hi2 = hi2 + Math.imul(ah6, bh4) | 0;
          lo4 = lo4 + Math.imul(al5, bl5) | 0;
          mid = mid + Math.imul(al5, bh5) | 0;
          mid = mid + Math.imul(ah5, bl5) | 0;
          hi2 = hi2 + Math.imul(ah5, bh5) | 0;
          lo4 = lo4 + Math.imul(al4, bl6) | 0;
          mid = mid + Math.imul(al4, bh6) | 0;
          mid = mid + Math.imul(ah4, bl6) | 0;
          hi2 = hi2 + Math.imul(ah4, bh6) | 0;
          lo4 = lo4 + Math.imul(al3, bl7) | 0;
          mid = mid + Math.imul(al3, bh7) | 0;
          mid = mid + Math.imul(ah3, bl7) | 0;
          hi2 = hi2 + Math.imul(ah3, bh7) | 0;
          lo4 = lo4 + Math.imul(al2, bl8) | 0;
          mid = mid + Math.imul(al2, bh8) | 0;
          mid = mid + Math.imul(ah2, bl8) | 0;
          hi2 = hi2 + Math.imul(ah2, bh8) | 0;
          lo4 = lo4 + Math.imul(al1, bl9) | 0;
          mid = mid + Math.imul(al1, bh9) | 0;
          mid = mid + Math.imul(ah1, bl9) | 0;
          hi2 = hi2 + Math.imul(ah1, bh9) | 0;
          var w10 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w10 >>> 26) | 0;
          w10 &= 67108863;
          lo4 = Math.imul(al9, bl2);
          mid = Math.imul(al9, bh2);
          mid = mid + Math.imul(ah9, bl2) | 0;
          hi2 = Math.imul(ah9, bh2);
          lo4 = lo4 + Math.imul(al8, bl3) | 0;
          mid = mid + Math.imul(al8, bh3) | 0;
          mid = mid + Math.imul(ah8, bl3) | 0;
          hi2 = hi2 + Math.imul(ah8, bh3) | 0;
          lo4 = lo4 + Math.imul(al7, bl4) | 0;
          mid = mid + Math.imul(al7, bh4) | 0;
          mid = mid + Math.imul(ah7, bl4) | 0;
          hi2 = hi2 + Math.imul(ah7, bh4) | 0;
          lo4 = lo4 + Math.imul(al6, bl5) | 0;
          mid = mid + Math.imul(al6, bh5) | 0;
          mid = mid + Math.imul(ah6, bl5) | 0;
          hi2 = hi2 + Math.imul(ah6, bh5) | 0;
          lo4 = lo4 + Math.imul(al5, bl6) | 0;
          mid = mid + Math.imul(al5, bh6) | 0;
          mid = mid + Math.imul(ah5, bl6) | 0;
          hi2 = hi2 + Math.imul(ah5, bh6) | 0;
          lo4 = lo4 + Math.imul(al4, bl7) | 0;
          mid = mid + Math.imul(al4, bh7) | 0;
          mid = mid + Math.imul(ah4, bl7) | 0;
          hi2 = hi2 + Math.imul(ah4, bh7) | 0;
          lo4 = lo4 + Math.imul(al3, bl8) | 0;
          mid = mid + Math.imul(al3, bh8) | 0;
          mid = mid + Math.imul(ah3, bl8) | 0;
          hi2 = hi2 + Math.imul(ah3, bh8) | 0;
          lo4 = lo4 + Math.imul(al2, bl9) | 0;
          mid = mid + Math.imul(al2, bh9) | 0;
          mid = mid + Math.imul(ah2, bl9) | 0;
          hi2 = hi2 + Math.imul(ah2, bh9) | 0;
          var w11 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w11 >>> 26) | 0;
          w11 &= 67108863;
          lo4 = Math.imul(al9, bl3);
          mid = Math.imul(al9, bh3);
          mid = mid + Math.imul(ah9, bl3) | 0;
          hi2 = Math.imul(ah9, bh3);
          lo4 = lo4 + Math.imul(al8, bl4) | 0;
          mid = mid + Math.imul(al8, bh4) | 0;
          mid = mid + Math.imul(ah8, bl4) | 0;
          hi2 = hi2 + Math.imul(ah8, bh4) | 0;
          lo4 = lo4 + Math.imul(al7, bl5) | 0;
          mid = mid + Math.imul(al7, bh5) | 0;
          mid = mid + Math.imul(ah7, bl5) | 0;
          hi2 = hi2 + Math.imul(ah7, bh5) | 0;
          lo4 = lo4 + Math.imul(al6, bl6) | 0;
          mid = mid + Math.imul(al6, bh6) | 0;
          mid = mid + Math.imul(ah6, bl6) | 0;
          hi2 = hi2 + Math.imul(ah6, bh6) | 0;
          lo4 = lo4 + Math.imul(al5, bl7) | 0;
          mid = mid + Math.imul(al5, bh7) | 0;
          mid = mid + Math.imul(ah5, bl7) | 0;
          hi2 = hi2 + Math.imul(ah5, bh7) | 0;
          lo4 = lo4 + Math.imul(al4, bl8) | 0;
          mid = mid + Math.imul(al4, bh8) | 0;
          mid = mid + Math.imul(ah4, bl8) | 0;
          hi2 = hi2 + Math.imul(ah4, bh8) | 0;
          lo4 = lo4 + Math.imul(al3, bl9) | 0;
          mid = mid + Math.imul(al3, bh9) | 0;
          mid = mid + Math.imul(ah3, bl9) | 0;
          hi2 = hi2 + Math.imul(ah3, bh9) | 0;
          var w12 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w12 >>> 26) | 0;
          w12 &= 67108863;
          lo4 = Math.imul(al9, bl4);
          mid = Math.imul(al9, bh4);
          mid = mid + Math.imul(ah9, bl4) | 0;
          hi2 = Math.imul(ah9, bh4);
          lo4 = lo4 + Math.imul(al8, bl5) | 0;
          mid = mid + Math.imul(al8, bh5) | 0;
          mid = mid + Math.imul(ah8, bl5) | 0;
          hi2 = hi2 + Math.imul(ah8, bh5) | 0;
          lo4 = lo4 + Math.imul(al7, bl6) | 0;
          mid = mid + Math.imul(al7, bh6) | 0;
          mid = mid + Math.imul(ah7, bl6) | 0;
          hi2 = hi2 + Math.imul(ah7, bh6) | 0;
          lo4 = lo4 + Math.imul(al6, bl7) | 0;
          mid = mid + Math.imul(al6, bh7) | 0;
          mid = mid + Math.imul(ah6, bl7) | 0;
          hi2 = hi2 + Math.imul(ah6, bh7) | 0;
          lo4 = lo4 + Math.imul(al5, bl8) | 0;
          mid = mid + Math.imul(al5, bh8) | 0;
          mid = mid + Math.imul(ah5, bl8) | 0;
          hi2 = hi2 + Math.imul(ah5, bh8) | 0;
          lo4 = lo4 + Math.imul(al4, bl9) | 0;
          mid = mid + Math.imul(al4, bh9) | 0;
          mid = mid + Math.imul(ah4, bl9) | 0;
          hi2 = hi2 + Math.imul(ah4, bh9) | 0;
          var w13 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w13 >>> 26) | 0;
          w13 &= 67108863;
          lo4 = Math.imul(al9, bl5);
          mid = Math.imul(al9, bh5);
          mid = mid + Math.imul(ah9, bl5) | 0;
          hi2 = Math.imul(ah9, bh5);
          lo4 = lo4 + Math.imul(al8, bl6) | 0;
          mid = mid + Math.imul(al8, bh6) | 0;
          mid = mid + Math.imul(ah8, bl6) | 0;
          hi2 = hi2 + Math.imul(ah8, bh6) | 0;
          lo4 = lo4 + Math.imul(al7, bl7) | 0;
          mid = mid + Math.imul(al7, bh7) | 0;
          mid = mid + Math.imul(ah7, bl7) | 0;
          hi2 = hi2 + Math.imul(ah7, bh7) | 0;
          lo4 = lo4 + Math.imul(al6, bl8) | 0;
          mid = mid + Math.imul(al6, bh8) | 0;
          mid = mid + Math.imul(ah6, bl8) | 0;
          hi2 = hi2 + Math.imul(ah6, bh8) | 0;
          lo4 = lo4 + Math.imul(al5, bl9) | 0;
          mid = mid + Math.imul(al5, bh9) | 0;
          mid = mid + Math.imul(ah5, bl9) | 0;
          hi2 = hi2 + Math.imul(ah5, bh9) | 0;
          var w14 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w14 >>> 26) | 0;
          w14 &= 67108863;
          lo4 = Math.imul(al9, bl6);
          mid = Math.imul(al9, bh6);
          mid = mid + Math.imul(ah9, bl6) | 0;
          hi2 = Math.imul(ah9, bh6);
          lo4 = lo4 + Math.imul(al8, bl7) | 0;
          mid = mid + Math.imul(al8, bh7) | 0;
          mid = mid + Math.imul(ah8, bl7) | 0;
          hi2 = hi2 + Math.imul(ah8, bh7) | 0;
          lo4 = lo4 + Math.imul(al7, bl8) | 0;
          mid = mid + Math.imul(al7, bh8) | 0;
          mid = mid + Math.imul(ah7, bl8) | 0;
          hi2 = hi2 + Math.imul(ah7, bh8) | 0;
          lo4 = lo4 + Math.imul(al6, bl9) | 0;
          mid = mid + Math.imul(al6, bh9) | 0;
          mid = mid + Math.imul(ah6, bl9) | 0;
          hi2 = hi2 + Math.imul(ah6, bh9) | 0;
          var w15 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w15 >>> 26) | 0;
          w15 &= 67108863;
          lo4 = Math.imul(al9, bl7);
          mid = Math.imul(al9, bh7);
          mid = mid + Math.imul(ah9, bl7) | 0;
          hi2 = Math.imul(ah9, bh7);
          lo4 = lo4 + Math.imul(al8, bl8) | 0;
          mid = mid + Math.imul(al8, bh8) | 0;
          mid = mid + Math.imul(ah8, bl8) | 0;
          hi2 = hi2 + Math.imul(ah8, bh8) | 0;
          lo4 = lo4 + Math.imul(al7, bl9) | 0;
          mid = mid + Math.imul(al7, bh9) | 0;
          mid = mid + Math.imul(ah7, bl9) | 0;
          hi2 = hi2 + Math.imul(ah7, bh9) | 0;
          var w16 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w16 >>> 26) | 0;
          w16 &= 67108863;
          lo4 = Math.imul(al9, bl8);
          mid = Math.imul(al9, bh8);
          mid = mid + Math.imul(ah9, bl8) | 0;
          hi2 = Math.imul(ah9, bh8);
          lo4 = lo4 + Math.imul(al8, bl9) | 0;
          mid = mid + Math.imul(al8, bh9) | 0;
          mid = mid + Math.imul(ah8, bl9) | 0;
          hi2 = hi2 + Math.imul(ah8, bh9) | 0;
          var w17 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w17 >>> 26) | 0;
          w17 &= 67108863;
          lo4 = Math.imul(al9, bl9);
          mid = Math.imul(al9, bh9);
          mid = mid + Math.imul(ah9, bl9) | 0;
          hi2 = Math.imul(ah9, bh9);
          var w18 = (c7 + lo4 | 0) + ((mid & 8191) << 13) | 0;
          c7 = (hi2 + (mid >>> 13) | 0) + (w18 >>> 26) | 0;
          w18 &= 67108863;
          o5[0] = w0;
          o5[1] = w1;
          o5[2] = w22;
          o5[3] = w32;
          o5[4] = w42;
          o5[5] = w52;
          o5[6] = w62;
          o5[7] = w7;
          o5[8] = w8;
          o5[9] = w9;
          o5[10] = w10;
          o5[11] = w11;
          o5[12] = w12;
          o5[13] = w13;
          o5[14] = w14;
          o5[15] = w15;
          o5[16] = w16;
          o5[17] = w17;
          o5[18] = w18;
          if (c7 !== 0) {
            o5[19] = c7;
            out.length++;
          }
          return out;
        };
        if (!Math.imul) {
          comb10MulTo = smallMulTo;
        }
        function bigMulTo(self2, num2, out) {
          out.negative = num2.negative ^ self2.negative;
          out.length = self2.length + num2.length;
          var carry = 0;
          var hncarry = 0;
          for (var k7 = 0; k7 < out.length - 1; k7++) {
            var ncarry = hncarry;
            hncarry = 0;
            var rword = carry & 67108863;
            var maxJ = Math.min(k7, num2.length - 1);
            for (var j6 = Math.max(0, k7 - self2.length + 1); j6 <= maxJ; j6++) {
              var i5 = k7 - j6;
              var a5 = self2.words[i5] | 0;
              var b9 = num2.words[j6] | 0;
              var r3 = a5 * b9;
              var lo4 = r3 & 67108863;
              ncarry = ncarry + (r3 / 67108864 | 0) | 0;
              lo4 = lo4 + rword | 0;
              rword = lo4 & 67108863;
              ncarry = ncarry + (lo4 >>> 26) | 0;
              hncarry += ncarry >>> 26;
              ncarry &= 67108863;
            }
            out.words[k7] = rword;
            carry = ncarry;
            ncarry = hncarry;
          }
          if (carry !== 0) {
            out.words[k7] = carry;
          } else {
            out.length--;
          }
          return out.strip();
        }
        function jumboMulTo(self2, num2, out) {
          var fftm = new FFTM();
          return fftm.mulp(self2, num2, out);
        }
        BN4.prototype.mulTo = function mulTo(num2, out) {
          var res;
          var len = this.length + num2.length;
          if (this.length === 10 && num2.length === 10) {
            res = comb10MulTo(this, num2, out);
          } else if (len < 63) {
            res = smallMulTo(this, num2, out);
          } else if (len < 1024) {
            res = bigMulTo(this, num2, out);
          } else {
            res = jumboMulTo(this, num2, out);
          }
          return res;
        };
        function FFTM(x13, y11) {
          this.x = x13;
          this.y = y11;
        }
        FFTM.prototype.makeRBT = function makeRBT(N13) {
          var t = new Array(N13);
          var l6 = BN4.prototype._countBits(N13) - 1;
          for (var i5 = 0; i5 < N13; i5++) {
            t[i5] = this.revBin(i5, l6, N13);
          }
          return t;
        };
        FFTM.prototype.revBin = function revBin(x13, l6, N13) {
          if (x13 === 0 || x13 === N13 - 1) return x13;
          var rb = 0;
          for (var i5 = 0; i5 < l6; i5++) {
            rb |= (x13 & 1) << l6 - i5 - 1;
            x13 >>= 1;
          }
          return rb;
        };
        FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N13) {
          for (var i5 = 0; i5 < N13; i5++) {
            rtws[i5] = rws[rbt[i5]];
            itws[i5] = iws[rbt[i5]];
          }
        };
        FFTM.prototype.transform = function transform2(rws, iws, rtws, itws, N13, rbt) {
          this.permute(rbt, rws, iws, rtws, itws, N13);
          for (var s3 = 1; s3 < N13; s3 <<= 1) {
            var l6 = s3 << 1;
            var rtwdf = Math.cos(2 * Math.PI / l6);
            var itwdf = Math.sin(2 * Math.PI / l6);
            for (var p7 = 0; p7 < N13; p7 += l6) {
              var rtwdf_ = rtwdf;
              var itwdf_ = itwdf;
              for (var j6 = 0; j6 < s3; j6++) {
                var re6 = rtws[p7 + j6];
                var ie7 = itws[p7 + j6];
                var ro3 = rtws[p7 + j6 + s3];
                var io3 = itws[p7 + j6 + s3];
                var rx = rtwdf_ * ro3 - itwdf_ * io3;
                io3 = rtwdf_ * io3 + itwdf_ * ro3;
                ro3 = rx;
                rtws[p7 + j6] = re6 + ro3;
                itws[p7 + j6] = ie7 + io3;
                rtws[p7 + j6 + s3] = re6 - ro3;
                itws[p7 + j6 + s3] = ie7 - io3;
                if (j6 !== l6) {
                  rx = rtwdf * rtwdf_ - itwdf * itwdf_;
                  itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;
                  rtwdf_ = rx;
                }
              }
            }
          }
        };
        FFTM.prototype.guessLen13b = function guessLen13b(n6, m3) {
          var N13 = Math.max(m3, n6) | 1;
          var odd = N13 & 1;
          var i5 = 0;
          for (N13 = N13 / 2 | 0; N13; N13 = N13 >>> 1) {
            i5++;
          }
          return 1 << i5 + 1 + odd;
        };
        FFTM.prototype.conjugate = function conjugate(rws, iws, N13) {
          if (N13 <= 1) return;
          for (var i5 = 0; i5 < N13 / 2; i5++) {
            var t = rws[i5];
            rws[i5] = rws[N13 - i5 - 1];
            rws[N13 - i5 - 1] = t;
            t = iws[i5];
            iws[i5] = -iws[N13 - i5 - 1];
            iws[N13 - i5 - 1] = -t;
          }
        };
        FFTM.prototype.normalize13b = function normalize13b(ws2, N13) {
          var carry = 0;
          for (var i5 = 0; i5 < N13 / 2; i5++) {
            var w7 = Math.round(ws2[2 * i5 + 1] / N13) * 8192 + Math.round(ws2[2 * i5] / N13) + carry;
            ws2[i5] = w7 & 67108863;
            if (w7 < 67108864) {
              carry = 0;
            } else {
              carry = w7 / 67108864 | 0;
            }
          }
          return ws2;
        };
        FFTM.prototype.convert13b = function convert13b(ws2, len, rws, N13) {
          var carry = 0;
          for (var i5 = 0; i5 < len; i5++) {
            carry = carry + (ws2[i5] | 0);
            rws[2 * i5] = carry & 8191;
            carry = carry >>> 13;
            rws[2 * i5 + 1] = carry & 8191;
            carry = carry >>> 13;
          }
          for (i5 = 2 * len; i5 < N13; ++i5) {
            rws[i5] = 0;
          }
          assert12(carry === 0);
          assert12((carry & ~8191) === 0);
        };
        FFTM.prototype.stub = function stub(N13) {
          var ph = new Array(N13);
          for (var i5 = 0; i5 < N13; i5++) {
            ph[i5] = 0;
          }
          return ph;
        };
        FFTM.prototype.mulp = function mulp(x13, y11, out) {
          var N13 = 2 * this.guessLen13b(x13.length, y11.length);
          var rbt = this.makeRBT(N13);
          var _6 = this.stub(N13);
          var rws = new Array(N13);
          var rwst = new Array(N13);
          var iwst = new Array(N13);
          var nrws = new Array(N13);
          var nrwst = new Array(N13);
          var niwst = new Array(N13);
          var rmws = out.words;
          rmws.length = N13;
          this.convert13b(x13.words, x13.length, rws, N13);
          this.convert13b(y11.words, y11.length, nrws, N13);
          this.transform(rws, _6, rwst, iwst, N13, rbt);
          this.transform(nrws, _6, nrwst, niwst, N13, rbt);
          for (var i5 = 0; i5 < N13; i5++) {
            var rx = rwst[i5] * nrwst[i5] - iwst[i5] * niwst[i5];
            iwst[i5] = rwst[i5] * niwst[i5] + iwst[i5] * nrwst[i5];
            rwst[i5] = rx;
          }
          this.conjugate(rwst, iwst, N13);
          this.transform(rwst, iwst, rmws, _6, N13, rbt);
          this.conjugate(rmws, _6, N13);
          this.normalize13b(rmws, N13);
          out.negative = x13.negative ^ y11.negative;
          out.length = x13.length + y11.length;
          return out.strip();
        };
        BN4.prototype.mul = function mul3(num2) {
          var out = new BN4(null);
          out.words = new Array(this.length + num2.length);
          return this.mulTo(num2, out);
        };
        BN4.prototype.mulf = function mulf(num2) {
          var out = new BN4(null);
          out.words = new Array(this.length + num2.length);
          return jumboMulTo(this, num2, out);
        };
        BN4.prototype.imul = function imul(num2) {
          return this.clone().mulTo(num2, this);
        };
        BN4.prototype.imuln = function imuln(num2) {
          assert12(typeof num2 === "number");
          assert12(num2 < 67108864);
          var carry = 0;
          for (var i5 = 0; i5 < this.length; i5++) {
            var w7 = (this.words[i5] | 0) * num2;
            var lo4 = (w7 & 67108863) + (carry & 67108863);
            carry >>= 26;
            carry += w7 / 67108864 | 0;
            carry += lo4 >>> 26;
            this.words[i5] = lo4 & 67108863;
          }
          if (carry !== 0) {
            this.words[i5] = carry;
            this.length++;
          }
          this.length = num2 === 0 ? 1 : this.length;
          return this;
        };
        BN4.prototype.muln = function muln(num2) {
          return this.clone().imuln(num2);
        };
        BN4.prototype.sqr = function sqr() {
          return this.mul(this);
        };
        BN4.prototype.isqr = function isqr() {
          return this.imul(this.clone());
        };
        BN4.prototype.pow = function pow(num2) {
          var w7 = toBitArray(num2);
          if (w7.length === 0) return new BN4(1);
          var res = this;
          for (var i5 = 0; i5 < w7.length; i5++, res = res.sqr()) {
            if (w7[i5] !== 0) break;
          }
          if (++i5 < w7.length) {
            for (var q7 = res.sqr(); i5 < w7.length; i5++, q7 = q7.sqr()) {
              if (w7[i5] === 0) continue;
              res = res.mul(q7);
            }
          }
          return res;
        };
        BN4.prototype.iushln = function iushln(bits) {
          assert12(typeof bits === "number" && bits >= 0);
          var r3 = bits % 26;
          var s3 = (bits - r3) / 26;
          var carryMask = 67108863 >>> 26 - r3 << 26 - r3;
          var i5;
          if (r3 !== 0) {
            var carry = 0;
            for (i5 = 0; i5 < this.length; i5++) {
              var newCarry = this.words[i5] & carryMask;
              var c7 = (this.words[i5] | 0) - newCarry << r3;
              this.words[i5] = c7 | carry;
              carry = newCarry >>> 26 - r3;
            }
            if (carry) {
              this.words[i5] = carry;
              this.length++;
            }
          }
          if (s3 !== 0) {
            for (i5 = this.length - 1; i5 >= 0; i5--) {
              this.words[i5 + s3] = this.words[i5];
            }
            for (i5 = 0; i5 < s3; i5++) {
              this.words[i5] = 0;
            }
            this.length += s3;
          }
          return this.strip();
        };
        BN4.prototype.ishln = function ishln(bits) {
          assert12(this.negative === 0);
          return this.iushln(bits);
        };
        BN4.prototype.iushrn = function iushrn(bits, hint, extended) {
          assert12(typeof bits === "number" && bits >= 0);
          var h8;
          if (hint) {
            h8 = (hint - hint % 26) / 26;
          } else {
            h8 = 0;
          }
          var r3 = bits % 26;
          var s3 = Math.min((bits - r3) / 26, this.length);
          var mask2 = 67108863 ^ 67108863 >>> r3 << r3;
          var maskedWords = extended;
          h8 -= s3;
          h8 = Math.max(0, h8);
          if (maskedWords) {
            for (var i5 = 0; i5 < s3; i5++) {
              maskedWords.words[i5] = this.words[i5];
            }
            maskedWords.length = s3;
          }
          if (s3 === 0) {
          } else if (this.length > s3) {
            this.length -= s3;
            for (i5 = 0; i5 < this.length; i5++) {
              this.words[i5] = this.words[i5 + s3];
            }
          } else {
            this.words[0] = 0;
            this.length = 1;
          }
          var carry = 0;
          for (i5 = this.length - 1; i5 >= 0 && (carry !== 0 || i5 >= h8); i5--) {
            var word = this.words[i5] | 0;
            this.words[i5] = carry << 26 - r3 | word >>> r3;
            carry = word & mask2;
          }
          if (maskedWords && carry !== 0) {
            maskedWords.words[maskedWords.length++] = carry;
          }
          if (this.length === 0) {
            this.words[0] = 0;
            this.length = 1;
          }
          return this.strip();
        };
        BN4.prototype.ishrn = function ishrn(bits, hint, extended) {
          assert12(this.negative === 0);
          return this.iushrn(bits, hint, extended);
        };
        BN4.prototype.shln = function shln(bits) {
          return this.clone().ishln(bits);
        };
        BN4.prototype.ushln = function ushln(bits) {
          return this.clone().iushln(bits);
        };
        BN4.prototype.shrn = function shrn(bits) {
          return this.clone().ishrn(bits);
        };
        BN4.prototype.ushrn = function ushrn(bits) {
          return this.clone().iushrn(bits);
        };
        BN4.prototype.testn = function testn(bit) {
          assert12(typeof bit === "number" && bit >= 0);
          var r3 = bit % 26;
          var s3 = (bit - r3) / 26;
          var q7 = 1 << r3;
          if (this.length <= s3) return false;
          var w7 = this.words[s3];
          return !!(w7 & q7);
        };
        BN4.prototype.imaskn = function imaskn(bits) {
          assert12(typeof bits === "number" && bits >= 0);
          var r3 = bits % 26;
          var s3 = (bits - r3) / 26;
          assert12(this.negative === 0, "imaskn works only with positive numbers");
          if (this.length <= s3) {
            return this;
          }
          if (r3 !== 0) {
            s3++;
          }
          this.length = Math.min(s3, this.length);
          if (r3 !== 0) {
            var mask2 = 67108863 ^ 67108863 >>> r3 << r3;
            this.words[this.length - 1] &= mask2;
          }
          if (this.length === 0) {
            this.words[0] = 0;
            this.length = 1;
          }
          return this.strip();
        };
        BN4.prototype.maskn = function maskn(bits) {
          return this.clone().imaskn(bits);
        };
        BN4.prototype.iaddn = function iaddn(num2) {
          assert12(typeof num2 === "number");
          assert12(num2 < 67108864);
          if (num2 < 0) return this.isubn(-num2);
          if (this.negative !== 0) {
            if (this.length === 1 && (this.words[0] | 0) < num2) {
              this.words[0] = num2 - (this.words[0] | 0);
              this.negative = 0;
              return this;
            }
            this.negative = 0;
            this.isubn(num2);
            this.negative = 1;
            return this;
          }
          return this._iaddn(num2);
        };
        BN4.prototype._iaddn = function _iaddn(num2) {
          this.words[0] += num2;
          for (var i5 = 0; i5 < this.length && this.words[i5] >= 67108864; i5++) {
            this.words[i5] -= 67108864;
            if (i5 === this.length - 1) {
              this.words[i5 + 1] = 1;
            } else {
              this.words[i5 + 1]++;
            }
          }
          this.length = Math.max(this.length, i5 + 1);
          return this;
        };
        BN4.prototype.isubn = function isubn(num2) {
          assert12(typeof num2 === "number");
          assert12(num2 < 67108864);
          if (num2 < 0) return this.iaddn(-num2);
          if (this.negative !== 0) {
            this.negative = 0;
            this.iaddn(num2);
            this.negative = 1;
            return this;
          }
          this.words[0] -= num2;
          if (this.length === 1 && this.words[0] < 0) {
            this.words[0] = -this.words[0];
            this.negative = 1;
          } else {
            for (var i5 = 0; i5 < this.length && this.words[i5] < 0; i5++) {
              this.words[i5] += 67108864;
              this.words[i5 + 1] -= 1;
            }
          }
          return this.strip();
        };
        BN4.prototype.addn = function addn(num2) {
          return this.clone().iaddn(num2);
        };
        BN4.prototype.subn = function subn(num2) {
          return this.clone().isubn(num2);
        };
        BN4.prototype.iabs = function iabs() {
          this.negative = 0;
          return this;
        };
        BN4.prototype.abs = function abs() {
          return this.clone().iabs();
        };
        BN4.prototype._ishlnsubmul = function _ishlnsubmul(num2, mul3, shift) {
          var len = num2.length + shift;
          var i5;
          this._expand(len);
          var w7;
          var carry = 0;
          for (i5 = 0; i5 < num2.length; i5++) {
            w7 = (this.words[i5 + shift] | 0) + carry;
            var right = (num2.words[i5] | 0) * mul3;
            w7 -= right & 67108863;
            carry = (w7 >> 26) - (right / 67108864 | 0);
            this.words[i5 + shift] = w7 & 67108863;
          }
          for (; i5 < this.length - shift; i5++) {
            w7 = (this.words[i5 + shift] | 0) + carry;
            carry = w7 >> 26;
            this.words[i5 + shift] = w7 & 67108863;
          }
          if (carry === 0) return this.strip();
          assert12(carry === -1);
          carry = 0;
          for (i5 = 0; i5 < this.length; i5++) {
            w7 = -(this.words[i5] | 0) + carry;
            carry = w7 >> 26;
            this.words[i5] = w7 & 67108863;
          }
          this.negative = 1;
          return this.strip();
        };
        BN4.prototype._wordDiv = function _wordDiv(num2, mode) {
          var shift = this.length - num2.length;
          var a5 = this.clone();
          var b9 = num2;
          var bhi = b9.words[b9.length - 1] | 0;
          var bhiBits = this._countBits(bhi);
          shift = 26 - bhiBits;
          if (shift !== 0) {
            b9 = b9.ushln(shift);
            a5.iushln(shift);
            bhi = b9.words[b9.length - 1] | 0;
          }
          var m3 = a5.length - b9.length;
          var q7;
          if (mode !== "mod") {
            q7 = new BN4(null);
            q7.length = m3 + 1;
            q7.words = new Array(q7.length);
            for (var i5 = 0; i5 < q7.length; i5++) {
              q7.words[i5] = 0;
            }
          }
          var diff = a5.clone()._ishlnsubmul(b9, 1, m3);
          if (diff.negative === 0) {
            a5 = diff;
            if (q7) {
              q7.words[m3] = 1;
            }
          }
          for (var j6 = m3 - 1; j6 >= 0; j6--) {
            var qj = (a5.words[b9.length + j6] | 0) * 67108864 + (a5.words[b9.length + j6 - 1] | 0);
            qj = Math.min(qj / bhi | 0, 67108863);
            a5._ishlnsubmul(b9, qj, j6);
            while (a5.negative !== 0) {
              qj--;
              a5.negative = 0;
              a5._ishlnsubmul(b9, 1, j6);
              if (!a5.isZero()) {
                a5.negative ^= 1;
              }
            }
            if (q7) {
              q7.words[j6] = qj;
            }
          }
          if (q7) {
            q7.strip();
          }
          a5.strip();
          if (mode !== "div" && shift !== 0) {
            a5.iushrn(shift);
          }
          return {
            div: q7 || null,
            mod: a5
          };
        };
        BN4.prototype.divmod = function divmod(num2, mode, positive) {
          assert12(!num2.isZero());
          if (this.isZero()) {
            return {
              div: new BN4(0),
              mod: new BN4(0)
            };
          }
          var div, mod3, res;
          if (this.negative !== 0 && num2.negative === 0) {
            res = this.neg().divmod(num2, mode);
            if (mode !== "mod") {
              div = res.div.neg();
            }
            if (mode !== "div") {
              mod3 = res.mod.neg();
              if (positive && mod3.negative !== 0) {
                mod3.iadd(num2);
              }
            }
            return {
              div,
              mod: mod3
            };
          }
          if (this.negative === 0 && num2.negative !== 0) {
            res = this.divmod(num2.neg(), mode);
            if (mode !== "mod") {
              div = res.div.neg();
            }
            return {
              div,
              mod: res.mod
            };
          }
          if ((this.negative & num2.negative) !== 0) {
            res = this.neg().divmod(num2.neg(), mode);
            if (mode !== "div") {
              mod3 = res.mod.neg();
              if (positive && mod3.negative !== 0) {
                mod3.isub(num2);
              }
            }
            return {
              div: res.div,
              mod: mod3
            };
          }
          if (num2.length > this.length || this.cmp(num2) < 0) {
            return {
              div: new BN4(0),
              mod: this
            };
          }
          if (num2.length === 1) {
            if (mode === "div") {
              return {
                div: this.divn(num2.words[0]),
                mod: null
              };
            }
            if (mode === "mod") {
              return {
                div: null,
                mod: new BN4(this.modn(num2.words[0]))
              };
            }
            return {
              div: this.divn(num2.words[0]),
              mod: new BN4(this.modn(num2.words[0]))
            };
          }
          return this._wordDiv(num2, mode);
        };
        BN4.prototype.div = function div(num2) {
          return this.divmod(num2, "div", false).div;
        };
        BN4.prototype.mod = function mod3(num2) {
          return this.divmod(num2, "mod", false).mod;
        };
        BN4.prototype.umod = function umod(num2) {
          return this.divmod(num2, "mod", true).mod;
        };
        BN4.prototype.divRound = function divRound(num2) {
          var dm = this.divmod(num2);
          if (dm.mod.isZero()) return dm.div;
          var mod3 = dm.div.negative !== 0 ? dm.mod.isub(num2) : dm.mod;
          var half = num2.ushrn(1);
          var r22 = num2.andln(1);
          var cmp = mod3.cmp(half);
          if (cmp < 0 || r22 === 1 && cmp === 0) return dm.div;
          return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
        };
        BN4.prototype.modn = function modn(num2) {
          assert12(num2 <= 67108863);
          var p7 = (1 << 26) % num2;
          var acc = 0;
          for (var i5 = this.length - 1; i5 >= 0; i5--) {
            acc = (p7 * acc + (this.words[i5] | 0)) % num2;
          }
          return acc;
        };
        BN4.prototype.idivn = function idivn(num2) {
          assert12(num2 <= 67108863);
          var carry = 0;
          for (var i5 = this.length - 1; i5 >= 0; i5--) {
            var w7 = (this.words[i5] | 0) + carry * 67108864;
            this.words[i5] = w7 / num2 | 0;
            carry = w7 % num2;
          }
          return this.strip();
        };
        BN4.prototype.divn = function divn(num2) {
          return this.clone().idivn(num2);
        };
        BN4.prototype.egcd = function egcd(p7) {
          assert12(p7.negative === 0);
          assert12(!p7.isZero());
          var x13 = this;
          var y11 = p7.clone();
          if (x13.negative !== 0) {
            x13 = x13.umod(p7);
          } else {
            x13 = x13.clone();
          }
          var A7 = new BN4(1);
          var B7 = new BN4(0);
          var C9 = new BN4(0);
          var D7 = new BN4(1);
          var g8 = 0;
          while (x13.isEven() && y11.isEven()) {
            x13.iushrn(1);
            y11.iushrn(1);
            ++g8;
          }
          var yp = y11.clone();
          var xp = x13.clone();
          while (!x13.isZero()) {
            for (var i5 = 0, im = 1; (x13.words[0] & im) === 0 && i5 < 26; ++i5, im <<= 1) ;
            if (i5 > 0) {
              x13.iushrn(i5);
              while (i5-- > 0) {
                if (A7.isOdd() || B7.isOdd()) {
                  A7.iadd(yp);
                  B7.isub(xp);
                }
                A7.iushrn(1);
                B7.iushrn(1);
              }
            }
            for (var j6 = 0, jm = 1; (y11.words[0] & jm) === 0 && j6 < 26; ++j6, jm <<= 1) ;
            if (j6 > 0) {
              y11.iushrn(j6);
              while (j6-- > 0) {
                if (C9.isOdd() || D7.isOdd()) {
                  C9.iadd(yp);
                  D7.isub(xp);
                }
                C9.iushrn(1);
                D7.iushrn(1);
              }
            }
            if (x13.cmp(y11) >= 0) {
              x13.isub(y11);
              A7.isub(C9);
              B7.isub(D7);
            } else {
              y11.isub(x13);
              C9.isub(A7);
              D7.isub(B7);
            }
          }
          return {
            a: C9,
            b: D7,
            gcd: y11.iushln(g8)
          };
        };
        BN4.prototype._invmp = function _invmp(p7) {
          assert12(p7.negative === 0);
          assert12(!p7.isZero());
          var a5 = this;
          var b9 = p7.clone();
          if (a5.negative !== 0) {
            a5 = a5.umod(p7);
          } else {
            a5 = a5.clone();
          }
          var x1 = new BN4(1);
          var x22 = new BN4(0);
          var delta = b9.clone();
          while (a5.cmpn(1) > 0 && b9.cmpn(1) > 0) {
            for (var i5 = 0, im = 1; (a5.words[0] & im) === 0 && i5 < 26; ++i5, im <<= 1) ;
            if (i5 > 0) {
              a5.iushrn(i5);
              while (i5-- > 0) {
                if (x1.isOdd()) {
                  x1.iadd(delta);
                }
                x1.iushrn(1);
              }
            }
            for (var j6 = 0, jm = 1; (b9.words[0] & jm) === 0 && j6 < 26; ++j6, jm <<= 1) ;
            if (j6 > 0) {
              b9.iushrn(j6);
              while (j6-- > 0) {
                if (x22.isOdd()) {
                  x22.iadd(delta);
                }
                x22.iushrn(1);
              }
            }
            if (a5.cmp(b9) >= 0) {
              a5.isub(b9);
              x1.isub(x22);
            } else {
              b9.isub(a5);
              x22.isub(x1);
            }
          }
          var res;
          if (a5.cmpn(1) === 0) {
            res = x1;
          } else {
            res = x22;
          }
          if (res.cmpn(0) < 0) {
            res.iadd(p7);
          }
          return res;
        };
        BN4.prototype.gcd = function gcd(num2) {
          if (this.isZero()) return num2.abs();
          if (num2.isZero()) return this.abs();
          var a5 = this.clone();
          var b9 = num2.clone();
          a5.negative = 0;
          b9.negative = 0;
          for (var shift = 0; a5.isEven() && b9.isEven(); shift++) {
            a5.iushrn(1);
            b9.iushrn(1);
          }
          do {
            while (a5.isEven()) {
              a5.iushrn(1);
            }
            while (b9.isEven()) {
              b9.iushrn(1);
            }
            var r3 = a5.cmp(b9);
            if (r3 < 0) {
              var t = a5;
              a5 = b9;
              b9 = t;
            } else if (r3 === 0 || b9.cmpn(1) === 0) {
              break;
            }
            a5.isub(b9);
          } while (true);
          return b9.iushln(shift);
        };
        BN4.prototype.invm = function invm(num2) {
          return this.egcd(num2).a.umod(num2);
        };
        BN4.prototype.isEven = function isEven() {
          return (this.words[0] & 1) === 0;
        };
        BN4.prototype.isOdd = function isOdd2() {
          return (this.words[0] & 1) === 1;
        };
        BN4.prototype.andln = function andln(num2) {
          return this.words[0] & num2;
        };
        BN4.prototype.bincn = function bincn(bit) {
          assert12(typeof bit === "number");
          var r3 = bit % 26;
          var s3 = (bit - r3) / 26;
          var q7 = 1 << r3;
          if (this.length <= s3) {
            this._expand(s3 + 1);
            this.words[s3] |= q7;
            return this;
          }
          var carry = q7;
          for (var i5 = s3; carry !== 0 && i5 < this.length; i5++) {
            var w7 = this.words[i5] | 0;
            w7 += carry;
            carry = w7 >>> 26;
            w7 &= 67108863;
            this.words[i5] = w7;
          }
          if (carry !== 0) {
            this.words[i5] = carry;
            this.length++;
          }
          return this;
        };
        BN4.prototype.isZero = function isZero() {
          return this.length === 1 && this.words[0] === 0;
        };
        BN4.prototype.cmpn = function cmpn(num2) {
          var negative = num2 < 0;
          if (this.negative !== 0 && !negative) return -1;
          if (this.negative === 0 && negative) return 1;
          this.strip();
          var res;
          if (this.length > 1) {
            res = 1;
          } else {
            if (negative) {
              num2 = -num2;
            }
            assert12(num2 <= 67108863, "Number is too big");
            var w7 = this.words[0] | 0;
            res = w7 === num2 ? 0 : w7 < num2 ? -1 : 1;
          }
          if (this.negative !== 0) return -res | 0;
          return res;
        };
        BN4.prototype.cmp = function cmp(num2) {
          if (this.negative !== 0 && num2.negative === 0) return -1;
          if (this.negative === 0 && num2.negative !== 0) return 1;
          var res = this.ucmp(num2);
          if (this.negative !== 0) return -res | 0;
          return res;
        };
        BN4.prototype.ucmp = function ucmp(num2) {
          if (this.length > num2.length) return 1;
          if (this.length < num2.length) return -1;
          var res = 0;
          for (var i5 = this.length - 1; i5 >= 0; i5--) {
            var a5 = this.words[i5] | 0;
            var b9 = num2.words[i5] | 0;
            if (a5 === b9) continue;
            if (a5 < b9) {
              res = -1;
            } else if (a5 > b9) {
              res = 1;
            }
            break;
          }
          return res;
        };
        BN4.prototype.gtn = function gtn(num2) {
          return this.cmpn(num2) === 1;
        };
        BN4.prototype.gt = function gt7(num2) {
          return this.cmp(num2) === 1;
        };
        BN4.prototype.gten = function gten(num2) {
          return this.cmpn(num2) >= 0;
        };
        BN4.prototype.gte = function gte(num2) {
          return this.cmp(num2) >= 0;
        };
        BN4.prototype.ltn = function ltn(num2) {
          return this.cmpn(num2) === -1;
        };
        BN4.prototype.lt = function lt6(num2) {
          return this.cmp(num2) === -1;
        };
        BN4.prototype.lten = function lten(num2) {
          return this.cmpn(num2) <= 0;
        };
        BN4.prototype.lte = function lte(num2) {
          return this.cmp(num2) <= 0;
        };
        BN4.prototype.eqn = function eqn(num2) {
          return this.cmpn(num2) === 0;
        };
        BN4.prototype.eq = function eq4(num2) {
          return this.cmp(num2) === 0;
        };
        BN4.red = function red(num2) {
          return new Red(num2);
        };
        BN4.prototype.toRed = function toRed(ctx) {
          assert12(!this.red, "Already a number in reduction context");
          assert12(this.negative === 0, "red works only with positives");
          return ctx.convertTo(this)._forceRed(ctx);
        };
        BN4.prototype.fromRed = function fromRed() {
          assert12(this.red, "fromRed works only with numbers in reduction context");
          return this.red.convertFrom(this);
        };
        BN4.prototype._forceRed = function _forceRed(ctx) {
          this.red = ctx;
          return this;
        };
        BN4.prototype.forceRed = function forceRed(ctx) {
          assert12(!this.red, "Already a number in reduction context");
          return this._forceRed(ctx);
        };
        BN4.prototype.redAdd = function redAdd(num2) {
          assert12(this.red, "redAdd works only with red numbers");
          return this.red.add(this, num2);
        };
        BN4.prototype.redIAdd = function redIAdd(num2) {
          assert12(this.red, "redIAdd works only with red numbers");
          return this.red.iadd(this, num2);
        };
        BN4.prototype.redSub = function redSub(num2) {
          assert12(this.red, "redSub works only with red numbers");
          return this.red.sub(this, num2);
        };
        BN4.prototype.redISub = function redISub(num2) {
          assert12(this.red, "redISub works only with red numbers");
          return this.red.isub(this, num2);
        };
        BN4.prototype.redShl = function redShl(num2) {
          assert12(this.red, "redShl works only with red numbers");
          return this.red.shl(this, num2);
        };
        BN4.prototype.redMul = function redMul(num2) {
          assert12(this.red, "redMul works only with red numbers");
          this.red._verify2(this, num2);
          return this.red.mul(this, num2);
        };
        BN4.prototype.redIMul = function redIMul(num2) {
          assert12(this.red, "redMul works only with red numbers");
          this.red._verify2(this, num2);
          return this.red.imul(this, num2);
        };
        BN4.prototype.redSqr = function redSqr() {
          assert12(this.red, "redSqr works only with red numbers");
          this.red._verify1(this);
          return this.red.sqr(this);
        };
        BN4.prototype.redISqr = function redISqr() {
          assert12(this.red, "redISqr works only with red numbers");
          this.red._verify1(this);
          return this.red.isqr(this);
        };
        BN4.prototype.redSqrt = function redSqrt() {
          assert12(this.red, "redSqrt works only with red numbers");
          this.red._verify1(this);
          return this.red.sqrt(this);
        };
        BN4.prototype.redInvm = function redInvm() {
          assert12(this.red, "redInvm works only with red numbers");
          this.red._verify1(this);
          return this.red.invm(this);
        };
        BN4.prototype.redNeg = function redNeg() {
          assert12(this.red, "redNeg works only with red numbers");
          this.red._verify1(this);
          return this.red.neg(this);
        };
        BN4.prototype.redPow = function redPow(num2) {
          assert12(this.red && !num2.red, "redPow(normalNum)");
          this.red._verify1(this);
          return this.red.pow(this, num2);
        };
        var primes = {
          k256: null,
          p224: null,
          p192: null,
          p25519: null
        };
        function MPrime(name2, p7) {
          this.name = name2;
          this.p = new BN4(p7, 16);
          this.n = this.p.bitLength();
          this.k = new BN4(1).iushln(this.n).isub(this.p);
          this.tmp = this._tmp();
        }
        MPrime.prototype._tmp = function _tmp() {
          var tmp = new BN4(null);
          tmp.words = new Array(Math.ceil(this.n / 13));
          return tmp;
        };
        MPrime.prototype.ireduce = function ireduce(num2) {
          var r3 = num2;
          var rlen;
          do {
            this.split(r3, this.tmp);
            r3 = this.imulK(r3);
            r3 = r3.iadd(this.tmp);
            rlen = r3.bitLength();
          } while (rlen > this.n);
          var cmp = rlen < this.n ? -1 : r3.ucmp(this.p);
          if (cmp === 0) {
            r3.words[0] = 0;
            r3.length = 1;
          } else if (cmp > 0) {
            r3.isub(this.p);
          } else {
            if (r3.strip !== void 0) {
              r3.strip();
            } else {
              r3._strip();
            }
          }
          return r3;
        };
        MPrime.prototype.split = function split3(input, out) {
          input.iushrn(this.n, 0, out);
        };
        MPrime.prototype.imulK = function imulK(num2) {
          return num2.imul(this.k);
        };
        function K256() {
          MPrime.call(
            this,
            "k256",
            "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f"
          );
        }
        inherits(K256, MPrime);
        K256.prototype.split = function split3(input, output) {
          var mask2 = 4194303;
          var outLen = Math.min(input.length, 9);
          for (var i5 = 0; i5 < outLen; i5++) {
            output.words[i5] = input.words[i5];
          }
          output.length = outLen;
          if (input.length <= 9) {
            input.words[0] = 0;
            input.length = 1;
            return;
          }
          var prev = input.words[9];
          output.words[output.length++] = prev & mask2;
          for (i5 = 10; i5 < input.length; i5++) {
            var next = input.words[i5] | 0;
            input.words[i5 - 10] = (next & mask2) << 4 | prev >>> 22;
            prev = next;
          }
          prev >>>= 22;
          input.words[i5 - 10] = prev;
          if (prev === 0 && input.length > 10) {
            input.length -= 10;
          } else {
            input.length -= 9;
          }
        };
        K256.prototype.imulK = function imulK(num2) {
          num2.words[num2.length] = 0;
          num2.words[num2.length + 1] = 0;
          num2.length += 2;
          var lo4 = 0;
          for (var i5 = 0; i5 < num2.length; i5++) {
            var w7 = num2.words[i5] | 0;
            lo4 += w7 * 977;
            num2.words[i5] = lo4 & 67108863;
            lo4 = w7 * 64 + (lo4 / 67108864 | 0);
          }
          if (num2.words[num2.length - 1] === 0) {
            num2.length--;
            if (num2.words[num2.length - 1] === 0) {
              num2.length--;
            }
          }
          return num2;
        };
        function P224() {
          MPrime.call(
            this,
            "p224",
            "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001"
          );
        }
        inherits(P224, MPrime);
        function P192() {
          MPrime.call(
            this,
            "p192",
            "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff"
          );
        }
        inherits(P192, MPrime);
        function P25519() {
          MPrime.call(
            this,
            "25519",
            "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed"
          );
        }
        inherits(P25519, MPrime);
        P25519.prototype.imulK = function imulK(num2) {
          var carry = 0;
          for (var i5 = 0; i5 < num2.length; i5++) {
            var hi2 = (num2.words[i5] | 0) * 19 + carry;
            var lo4 = hi2 & 67108863;
            hi2 >>>= 26;
            num2.words[i5] = lo4;
            carry = hi2;
          }
          if (carry !== 0) {
            num2.words[num2.length++] = carry;
          }
          return num2;
        };
        BN4._prime = function prime(name2) {
          if (primes[name2]) return primes[name2];
          var prime2;
          if (name2 === "k256") {
            prime2 = new K256();
          } else if (name2 === "p224") {
            prime2 = new P224();
          } else if (name2 === "p192") {
            prime2 = new P192();
          } else if (name2 === "p25519") {
            prime2 = new P25519();
          } else {
            throw new Error("Unknown prime " + name2);
          }
          primes[name2] = prime2;
          return prime2;
        };
        function Red(m3) {
          if (typeof m3 === "string") {
            var prime = BN4._prime(m3);
            this.m = prime.p;
            this.prime = prime;
          } else {
            assert12(m3.gtn(1), "modulus must be greater than 1");
            this.m = m3;
            this.prime = null;
          }
        }
        Red.prototype._verify1 = function _verify1(a5) {
          assert12(a5.negative === 0, "red works only with positives");
          assert12(a5.red, "red works only with red numbers");
        };
        Red.prototype._verify2 = function _verify2(a5, b9) {
          assert12((a5.negative | b9.negative) === 0, "red works only with positives");
          assert12(
            a5.red && a5.red === b9.red,
            "red works only with red numbers"
          );
        };
        Red.prototype.imod = function imod(a5) {
          if (this.prime) return this.prime.ireduce(a5)._forceRed(this);
          return a5.umod(this.m)._forceRed(this);
        };
        Red.prototype.neg = function neg3(a5) {
          if (a5.isZero()) {
            return a5.clone();
          }
          return this.m.sub(a5)._forceRed(this);
        };
        Red.prototype.add = function add5(a5, b9) {
          this._verify2(a5, b9);
          var res = a5.add(b9);
          if (res.cmp(this.m) >= 0) {
            res.isub(this.m);
          }
          return res._forceRed(this);
        };
        Red.prototype.iadd = function iadd(a5, b9) {
          this._verify2(a5, b9);
          var res = a5.iadd(b9);
          if (res.cmp(this.m) >= 0) {
            res.isub(this.m);
          }
          return res;
        };
        Red.prototype.sub = function sub(a5, b9) {
          this._verify2(a5, b9);
          var res = a5.sub(b9);
          if (res.cmpn(0) < 0) {
            res.iadd(this.m);
          }
          return res._forceRed(this);
        };
        Red.prototype.isub = function isub(a5, b9) {
          this._verify2(a5, b9);
          var res = a5.isub(b9);
          if (res.cmpn(0) < 0) {
            res.iadd(this.m);
          }
          return res;
        };
        Red.prototype.shl = function shl(a5, num2) {
          this._verify1(a5);
          return this.imod(a5.ushln(num2));
        };
        Red.prototype.imul = function imul(a5, b9) {
          this._verify2(a5, b9);
          return this.imod(a5.imul(b9));
        };
        Red.prototype.mul = function mul3(a5, b9) {
          this._verify2(a5, b9);
          return this.imod(a5.mul(b9));
        };
        Red.prototype.isqr = function isqr(a5) {
          return this.imul(a5, a5.clone());
        };
        Red.prototype.sqr = function sqr(a5) {
          return this.mul(a5, a5);
        };
        Red.prototype.sqrt = function sqrt(a5) {
          if (a5.isZero()) return a5.clone();
          var mod3 = this.m.andln(3);
          assert12(mod3 % 2 === 1);
          if (mod3 === 3) {
            var pow = this.m.add(new BN4(1)).iushrn(2);
            return this.pow(a5, pow);
          }
          var q7 = this.m.subn(1);
          var s3 = 0;
          while (!q7.isZero() && q7.andln(1) === 0) {
            s3++;
            q7.iushrn(1);
          }
          assert12(!q7.isZero());
          var one = new BN4(1).toRed(this);
          var nOne = one.redNeg();
          var lpow = this.m.subn(1).iushrn(1);
          var z11 = this.m.bitLength();
          z11 = new BN4(2 * z11 * z11).toRed(this);
          while (this.pow(z11, lpow).cmp(nOne) !== 0) {
            z11.redIAdd(nOne);
          }
          var c7 = this.pow(z11, q7);
          var r3 = this.pow(a5, q7.addn(1).iushrn(1));
          var t = this.pow(a5, q7);
          var m3 = s3;
          while (t.cmp(one) !== 0) {
            var tmp = t;
            for (var i5 = 0; tmp.cmp(one) !== 0; i5++) {
              tmp = tmp.redSqr();
            }
            assert12(i5 < m3);
            var b9 = this.pow(c7, new BN4(1).iushln(m3 - i5 - 1));
            r3 = r3.redMul(b9);
            c7 = b9.redSqr();
            t = t.redMul(c7);
            m3 = i5;
          }
          return r3;
        };
        Red.prototype.invm = function invm(a5) {
          var inv = a5._invmp(this.m);
          if (inv.negative !== 0) {
            inv.negative = 0;
            return this.imod(inv).redNeg();
          } else {
            return this.imod(inv);
          }
        };
        Red.prototype.pow = function pow(a5, num2) {
          if (num2.isZero()) return new BN4(1).toRed(this);
          if (num2.cmpn(1) === 0) return a5.clone();
          var windowSize = 4;
          var wnd = new Array(1 << windowSize);
          wnd[0] = new BN4(1).toRed(this);
          wnd[1] = a5;
          for (var i5 = 2; i5 < wnd.length; i5++) {
            wnd[i5] = this.mul(wnd[i5 - 1], a5);
          }
          var res = wnd[0];
          var current = 0;
          var currentLen = 0;
          var start = num2.bitLength() % 26;
          if (start === 0) {
            start = 26;
          }
          for (i5 = num2.length - 1; i5 >= 0; i5--) {
            var word = num2.words[i5];
            for (var j6 = start - 1; j6 >= 0; j6--) {
              var bit = word >> j6 & 1;
              if (res !== wnd[0]) {
                res = this.sqr(res);
              }
              if (bit === 0 && current === 0) {
                currentLen = 0;
                continue;
              }
              current <<= 1;
              current |= bit;
              currentLen++;
              if (currentLen !== windowSize && (i5 !== 0 || j6 !== 0)) continue;
              res = this.mul(res, wnd[current]);
              currentLen = 0;
              current = 0;
            }
            start = 26;
          }
          return res;
        };
        Red.prototype.convertTo = function convertTo(num2) {
          var r3 = num2.umod(this.m);
          return r3 === num2 ? r3.clone() : r3;
        };
        Red.prototype.convertFrom = function convertFrom(num2) {
          var res = num2.clone();
          res.red = null;
          return res;
        };
        BN4.mont = function mont(num2) {
          return new Mont(num2);
        };
        function Mont(m3) {
          Red.call(this, m3);
          this.shift = this.m.bitLength();
          if (this.shift % 26 !== 0) {
            this.shift += 26 - this.shift % 26;
          }
          this.r = new BN4(1).iushln(this.shift);
          this.r2 = this.imod(this.r.sqr());
          this.rinv = this.r._invmp(this.m);
          this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);
          this.minv = this.minv.umod(this.r);
          this.minv = this.r.sub(this.minv);
        }
        inherits(Mont, Red);
        Mont.prototype.convertTo = function convertTo(num2) {
          return this.imod(num2.ushln(this.shift));
        };
        Mont.prototype.convertFrom = function convertFrom(num2) {
          var r3 = this.imod(num2.mul(this.rinv));
          r3.red = null;
          return r3;
        };
        Mont.prototype.imul = function imul(a5, b9) {
          if (a5.isZero() || b9.isZero()) {
            a5.words[0] = 0;
            a5.length = 1;
            return a5;
          }
          var t = a5.imul(b9);
          var c7 = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
          var u4 = t.isub(c7).iushrn(this.shift);
          var res = u4;
          if (u4.cmp(this.m) >= 0) {
            res = u4.isub(this.m);
          } else if (u4.cmpn(0) < 0) {
            res = u4.iadd(this.m);
          }
          return res._forceRed(this);
        };
        Mont.prototype.mul = function mul3(a5, b9) {
          if (a5.isZero() || b9.isZero()) return new BN4(0)._forceRed(this);
          var t = a5.mul(b9);
          var c7 = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
          var u4 = t.isub(c7).iushrn(this.shift);
          var res = u4;
          if (u4.cmp(this.m) >= 0) {
            res = u4.isub(this.m);
          } else if (u4.cmpn(0) < 0) {
            res = u4.iadd(this.m);
          }
          return res._forceRed(this);
        };
        Mont.prototype.invm = function invm(a5) {
          var res = this.imod(a5._invmp(this.m).mul(this.r2));
          return res._forceRed(this);
        };
      })(typeof module === "undefined" || module, exports);
    }
  });

  // ../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js
  var require_utils4 = __commonJS({
    "../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var utils = exports;
      function toArray(msg, enc) {
        if (Array.isArray(msg))
          return msg.slice();
        if (!msg)
          return [];
        var res = [];
        if (typeof msg !== "string") {
          for (var i5 = 0; i5 < msg.length; i5++)
            res[i5] = msg[i5] | 0;
          return res;
        }
        if (enc === "hex") {
          msg = msg.replace(/[^a-z0-9]+/ig, "");
          if (msg.length % 2 !== 0)
            msg = "0" + msg;
          for (var i5 = 0; i5 < msg.length; i5 += 2)
            res.push(parseInt(msg[i5] + msg[i5 + 1], 16));
        } else {
          for (var i5 = 0; i5 < msg.length; i5++) {
            var c7 = msg.charCodeAt(i5);
            var hi2 = c7 >> 8;
            var lo4 = c7 & 255;
            if (hi2)
              res.push(hi2, lo4);
            else
              res.push(lo4);
          }
        }
        return res;
      }
      utils.toArray = toArray;
      function zero2(word) {
        if (word.length === 1)
          return "0" + word;
        else
          return word;
      }
      utils.zero2 = zero2;
      function toHex3(msg) {
        var res = "";
        for (var i5 = 0; i5 < msg.length; i5++)
          res += zero2(msg[i5].toString(16));
        return res;
      }
      utils.toHex = toHex3;
      utils.encode = function encode11(arr, enc) {
        if (enc === "hex")
          return toHex3(arr);
        else
          return arr;
      };
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/utils.js
  var require_utils5 = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/utils.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var utils = exports;
      var BN4 = require_bn2();
      var minAssert = require_minimalistic_assert();
      var minUtils = require_utils4();
      utils.assert = minAssert;
      utils.toArray = minUtils.toArray;
      utils.zero2 = minUtils.zero2;
      utils.toHex = minUtils.toHex;
      utils.encode = minUtils.encode;
      function getNAF2(num2, w7, bits) {
        var naf = new Array(Math.max(num2.bitLength(), bits) + 1);
        var i5;
        for (i5 = 0; i5 < naf.length; i5 += 1) {
          naf[i5] = 0;
        }
        var ws2 = 1 << w7 + 1;
        var k7 = num2.clone();
        for (i5 = 0; i5 < naf.length; i5++) {
          var z11;
          var mod3 = k7.andln(ws2 - 1);
          if (k7.isOdd()) {
            if (mod3 > (ws2 >> 1) - 1)
              z11 = (ws2 >> 1) - mod3;
            else
              z11 = mod3;
            k7.isubn(z11);
          } else {
            z11 = 0;
          }
          naf[i5] = z11;
          k7.iushrn(1);
        }
        return naf;
      }
      utils.getNAF = getNAF2;
      function getJSF2(k1, k22) {
        var jsf = [
          [],
          []
        ];
        k1 = k1.clone();
        k22 = k22.clone();
        var d1 = 0;
        var d22 = 0;
        var m8;
        while (k1.cmpn(-d1) > 0 || k22.cmpn(-d22) > 0) {
          var m14 = k1.andln(3) + d1 & 3;
          var m24 = k22.andln(3) + d22 & 3;
          if (m14 === 3)
            m14 = -1;
          if (m24 === 3)
            m24 = -1;
          var u1;
          if ((m14 & 1) === 0) {
            u1 = 0;
          } else {
            m8 = k1.andln(7) + d1 & 7;
            if ((m8 === 3 || m8 === 5) && m24 === 2)
              u1 = -m14;
            else
              u1 = m14;
          }
          jsf[0].push(u1);
          var u22;
          if ((m24 & 1) === 0) {
            u22 = 0;
          } else {
            m8 = k22.andln(7) + d22 & 7;
            if ((m8 === 3 || m8 === 5) && m14 === 2)
              u22 = -m24;
            else
              u22 = m24;
          }
          jsf[1].push(u22);
          if (2 * d1 === u1 + 1)
            d1 = 1 - d1;
          if (2 * d22 === u22 + 1)
            d22 = 1 - d22;
          k1.iushrn(1);
          k22.iushrn(1);
        }
        return jsf;
      }
      utils.getJSF = getJSF2;
      function cachedProperty(obj, name2, computer) {
        var key2 = "_" + name2;
        obj.prototype[name2] = function cachedProperty2() {
          return this[key2] !== void 0 ? this[key2] : this[key2] = computer.call(this);
        };
      }
      utils.cachedProperty = cachedProperty;
      function parseBytes(bytes) {
        return typeof bytes === "string" ? utils.toArray(bytes, "hex") : bytes;
      }
      utils.parseBytes = parseBytes;
      function intFromLE(bytes) {
        return new BN4(bytes, "hex", "le");
      }
      utils.intFromLE = intFromLE;
    }
  });

  // ../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js
  var require_brorand = __commonJS({
    "../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var r3;
      module.exports = function rand2(len) {
        if (!r3)
          r3 = new Rand(null);
        return r3.generate(len);
      };
      function Rand(rand2) {
        this.rand = rand2;
      }
      module.exports.Rand = Rand;
      Rand.prototype.generate = function generate2(len) {
        return this._rand(len);
      };
      Rand.prototype._rand = function _rand(n6) {
        if (this.rand.getBytes)
          return this.rand.getBytes(n6);
        var res = new Uint8Array(n6);
        for (var i5 = 0; i5 < res.length; i5++)
          res[i5] = this.rand.getByte();
        return res;
      };
      if (typeof self === "object") {
        if (self.crypto && self.crypto.getRandomValues) {
          Rand.prototype._rand = function _rand(n6) {
            var arr = new Uint8Array(n6);
            self.crypto.getRandomValues(arr);
            return arr;
          };
        } else if (self.msCrypto && self.msCrypto.getRandomValues) {
          Rand.prototype._rand = function _rand(n6) {
            var arr = new Uint8Array(n6);
            self.msCrypto.getRandomValues(arr);
            return arr;
          };
        } else if (typeof window === "object") {
          Rand.prototype._rand = function() {
            throw new Error("Not implemented yet");
          };
        }
      } else {
        try {
          crypto3 = require_crypto2();
          if (typeof crypto3.randomBytes !== "function")
            throw new Error("Not supported");
          Rand.prototype._rand = function _rand(n6) {
            return crypto3.randomBytes(n6);
          };
        } catch (e2) {
        }
      }
      var crypto3;
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/base.js
  var require_base = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/base.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var BN4 = require_bn2();
      var utils = require_utils5();
      var getNAF2 = utils.getNAF;
      var getJSF2 = utils.getJSF;
      var assert12 = utils.assert;
      function BaseCurve2(type2, conf) {
        this.type = type2;
        this.p = new BN4(conf.p, 16);
        this.red = conf.prime ? BN4.red(conf.prime) : BN4.mont(this.p);
        this.zero = new BN4(0).toRed(this.red);
        this.one = new BN4(1).toRed(this.red);
        this.two = new BN4(2).toRed(this.red);
        this.n = conf.n && new BN4(conf.n, 16);
        this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);
        this._wnafT1 = new Array(4);
        this._wnafT2 = new Array(4);
        this._wnafT3 = new Array(4);
        this._wnafT4 = new Array(4);
        this._bitLength = this.n ? this.n.bitLength() : 0;
        var adjustCount = this.n && this.p.div(this.n);
        if (!adjustCount || adjustCount.cmpn(100) > 0) {
          this.redN = null;
        } else {
          this._maxwellTrick = true;
          this.redN = this.n.toRed(this.red);
        }
      }
      module.exports = BaseCurve2;
      BaseCurve2.prototype.point = function point3() {
        throw new Error("Not implemented");
      };
      BaseCurve2.prototype.validate = function validate12() {
        throw new Error("Not implemented");
      };
      BaseCurve2.prototype._fixedNafMul = function _fixedNafMul2(p7, k7) {
        assert12(p7.precomputed);
        var doubles = p7._getDoubles();
        var naf = getNAF2(k7, 1, this._bitLength);
        var I7 = (1 << doubles.step + 1) - (doubles.step % 2 === 0 ? 2 : 1);
        I7 /= 3;
        var repr = [];
        var j6;
        var nafW;
        for (j6 = 0; j6 < naf.length; j6 += doubles.step) {
          nafW = 0;
          for (var l6 = j6 + doubles.step - 1; l6 >= j6; l6--)
            nafW = (nafW << 1) + naf[l6];
          repr.push(nafW);
        }
        var a5 = this.jpoint(null, null, null);
        var b9 = this.jpoint(null, null, null);
        for (var i5 = I7; i5 > 0; i5--) {
          for (j6 = 0; j6 < repr.length; j6++) {
            nafW = repr[j6];
            if (nafW === i5)
              b9 = b9.mixedAdd(doubles.points[j6]);
            else if (nafW === -i5)
              b9 = b9.mixedAdd(doubles.points[j6].neg());
          }
          a5 = a5.add(b9);
        }
        return a5.toP();
      };
      BaseCurve2.prototype._wnafMul = function _wnafMul2(p7, k7) {
        var w7 = 4;
        var nafPoints = p7._getNAFPoints(w7);
        w7 = nafPoints.wnd;
        var wnd = nafPoints.points;
        var naf = getNAF2(k7, w7, this._bitLength);
        var acc = this.jpoint(null, null, null);
        for (var i5 = naf.length - 1; i5 >= 0; i5--) {
          for (var l6 = 0; i5 >= 0 && naf[i5] === 0; i5--)
            l6++;
          if (i5 >= 0)
            l6++;
          acc = acc.dblp(l6);
          if (i5 < 0)
            break;
          var z11 = naf[i5];
          assert12(z11 !== 0);
          if (p7.type === "affine") {
            if (z11 > 0)
              acc = acc.mixedAdd(wnd[z11 - 1 >> 1]);
            else
              acc = acc.mixedAdd(wnd[-z11 - 1 >> 1].neg());
          } else {
            if (z11 > 0)
              acc = acc.add(wnd[z11 - 1 >> 1]);
            else
              acc = acc.add(wnd[-z11 - 1 >> 1].neg());
          }
        }
        return p7.type === "affine" ? acc.toP() : acc;
      };
      BaseCurve2.prototype._wnafMulAdd = function _wnafMulAdd2(defW, points, coeffs, len, jacobianResult) {
        var wndWidth = this._wnafT1;
        var wnd = this._wnafT2;
        var naf = this._wnafT3;
        var max = 0;
        var i5;
        var j6;
        var p7;
        for (i5 = 0; i5 < len; i5++) {
          p7 = points[i5];
          var nafPoints = p7._getNAFPoints(defW);
          wndWidth[i5] = nafPoints.wnd;
          wnd[i5] = nafPoints.points;
        }
        for (i5 = len - 1; i5 >= 1; i5 -= 2) {
          var a5 = i5 - 1;
          var b9 = i5;
          if (wndWidth[a5] !== 1 || wndWidth[b9] !== 1) {
            naf[a5] = getNAF2(coeffs[a5], wndWidth[a5], this._bitLength);
            naf[b9] = getNAF2(coeffs[b9], wndWidth[b9], this._bitLength);
            max = Math.max(naf[a5].length, max);
            max = Math.max(naf[b9].length, max);
            continue;
          }
          var comb = [
            points[a5],
            /* 1 */
            null,
            /* 3 */
            null,
            /* 5 */
            points[b9]
            /* 7 */
          ];
          if (points[a5].y.cmp(points[b9].y) === 0) {
            comb[1] = points[a5].add(points[b9]);
            comb[2] = points[a5].toJ().mixedAdd(points[b9].neg());
          } else if (points[a5].y.cmp(points[b9].y.redNeg()) === 0) {
            comb[1] = points[a5].toJ().mixedAdd(points[b9]);
            comb[2] = points[a5].add(points[b9].neg());
          } else {
            comb[1] = points[a5].toJ().mixedAdd(points[b9]);
            comb[2] = points[a5].toJ().mixedAdd(points[b9].neg());
          }
          var index2 = [
            -3,
            /* -1 -1 */
            -1,
            /* -1 0 */
            -5,
            /* -1 1 */
            -7,
            /* 0 -1 */
            0,
            /* 0 0 */
            7,
            /* 0 1 */
            5,
            /* 1 -1 */
            1,
            /* 1 0 */
            3
            /* 1 1 */
          ];
          var jsf = getJSF2(coeffs[a5], coeffs[b9]);
          max = Math.max(jsf[0].length, max);
          naf[a5] = new Array(max);
          naf[b9] = new Array(max);
          for (j6 = 0; j6 < max; j6++) {
            var ja = jsf[0][j6] | 0;
            var jb = jsf[1][j6] | 0;
            naf[a5][j6] = index2[(ja + 1) * 3 + (jb + 1)];
            naf[b9][j6] = 0;
            wnd[a5] = comb;
          }
        }
        var acc = this.jpoint(null, null, null);
        var tmp = this._wnafT4;
        for (i5 = max; i5 >= 0; i5--) {
          var k7 = 0;
          while (i5 >= 0) {
            var zero = true;
            for (j6 = 0; j6 < len; j6++) {
              tmp[j6] = naf[j6][i5] | 0;
              if (tmp[j6] !== 0)
                zero = false;
            }
            if (!zero)
              break;
            k7++;
            i5--;
          }
          if (i5 >= 0)
            k7++;
          acc = acc.dblp(k7);
          if (i5 < 0)
            break;
          for (j6 = 0; j6 < len; j6++) {
            var z11 = tmp[j6];
            p7;
            if (z11 === 0)
              continue;
            else if (z11 > 0)
              p7 = wnd[j6][z11 - 1 >> 1];
            else if (z11 < 0)
              p7 = wnd[j6][-z11 - 1 >> 1].neg();
            if (p7.type === "affine")
              acc = acc.mixedAdd(p7);
            else
              acc = acc.add(p7);
          }
        }
        for (i5 = 0; i5 < len; i5++)
          wnd[i5] = null;
        if (jacobianResult)
          return acc;
        else
          return acc.toP();
      };
      function BasePoint2(curve, type2) {
        this.curve = curve;
        this.type = type2;
        this.precomputed = null;
      }
      BaseCurve2.BasePoint = BasePoint2;
      BasePoint2.prototype.eq = function eq4() {
        throw new Error("Not implemented");
      };
      BasePoint2.prototype.validate = function validate12() {
        return this.curve.validate(this);
      };
      BaseCurve2.prototype.decodePoint = function decodePoint2(bytes, enc) {
        bytes = utils.toArray(bytes, enc);
        var len = this.p.byteLength();
        if ((bytes[0] === 4 || bytes[0] === 6 || bytes[0] === 7) && bytes.length - 1 === 2 * len) {
          if (bytes[0] === 6)
            assert12(bytes[bytes.length - 1] % 2 === 0);
          else if (bytes[0] === 7)
            assert12(bytes[bytes.length - 1] % 2 === 1);
          var res = this.point(
            bytes.slice(1, 1 + len),
            bytes.slice(1 + len, 1 + 2 * len)
          );
          return res;
        } else if ((bytes[0] === 2 || bytes[0] === 3) && bytes.length - 1 === len) {
          return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 3);
        }
        throw new Error("Unknown point format");
      };
      BasePoint2.prototype.encodeCompressed = function encodeCompressed2(enc) {
        return this.encode(enc, true);
      };
      BasePoint2.prototype._encode = function _encode3(compact) {
        var len = this.curve.p.byteLength();
        var x13 = this.getX().toArray("be", len);
        if (compact)
          return [this.getY().isEven() ? 2 : 3].concat(x13);
        return [4].concat(x13, this.getY().toArray("be", len));
      };
      BasePoint2.prototype.encode = function encode11(enc, compact) {
        return utils.encode(this._encode(compact), enc);
      };
      BasePoint2.prototype.precompute = function precompute3(power) {
        if (this.precomputed)
          return this;
        var precomputed = {
          doubles: null,
          naf: null,
          beta: null
        };
        precomputed.naf = this._getNAFPoints(8);
        precomputed.doubles = this._getDoubles(4, power);
        precomputed.beta = this._getBeta();
        this.precomputed = precomputed;
        return this;
      };
      BasePoint2.prototype._hasDoubles = function _hasDoubles2(k7) {
        if (!this.precomputed)
          return false;
        var doubles = this.precomputed.doubles;
        if (!doubles)
          return false;
        return doubles.points.length >= Math.ceil((k7.bitLength() + 1) / doubles.step);
      };
      BasePoint2.prototype._getDoubles = function _getDoubles2(step, power) {
        if (this.precomputed && this.precomputed.doubles)
          return this.precomputed.doubles;
        var doubles = [this];
        var acc = this;
        for (var i5 = 0; i5 < power; i5 += step) {
          for (var j6 = 0; j6 < step; j6++)
            acc = acc.dbl();
          doubles.push(acc);
        }
        return {
          step,
          points: doubles
        };
      };
      BasePoint2.prototype._getNAFPoints = function _getNAFPoints2(wnd) {
        if (this.precomputed && this.precomputed.naf)
          return this.precomputed.naf;
        var res = [this];
        var max = (1 << wnd) - 1;
        var dbl3 = max === 1 ? null : this.dbl();
        for (var i5 = 1; i5 < max; i5++)
          res[i5] = res[i5 - 1].add(dbl3);
        return {
          wnd,
          points: res
        };
      };
      BasePoint2.prototype._getBeta = function _getBeta3() {
        return null;
      };
      BasePoint2.prototype.dblp = function dblp3(k7) {
        var r3 = this;
        for (var i5 = 0; i5 < k7; i5++)
          r3 = r3.dbl();
        return r3;
      };
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/short.js
  var require_short = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/short.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var utils = require_utils5();
      var BN4 = require_bn2();
      var inherits = require_inherits_browser();
      var Base = require_base();
      var assert12 = utils.assert;
      function ShortCurve2(conf) {
        Base.call(this, "short", conf);
        this.a = new BN4(conf.a, 16).toRed(this.red);
        this.b = new BN4(conf.b, 16).toRed(this.red);
        this.tinv = this.two.redInvm();
        this.zeroA = this.a.fromRed().cmpn(0) === 0;
        this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;
        this.endo = this._getEndomorphism(conf);
        this._endoWnafT1 = new Array(4);
        this._endoWnafT2 = new Array(4);
      }
      inherits(ShortCurve2, Base);
      module.exports = ShortCurve2;
      ShortCurve2.prototype._getEndomorphism = function _getEndomorphism2(conf) {
        if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)
          return;
        var beta;
        var lambda;
        if (conf.beta) {
          beta = new BN4(conf.beta, 16).toRed(this.red);
        } else {
          var betas = this._getEndoRoots(this.p);
          beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];
          beta = beta.toRed(this.red);
        }
        if (conf.lambda) {
          lambda = new BN4(conf.lambda, 16);
        } else {
          var lambdas = this._getEndoRoots(this.n);
          if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {
            lambda = lambdas[0];
          } else {
            lambda = lambdas[1];
            assert12(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);
          }
        }
        var basis;
        if (conf.basis) {
          basis = conf.basis.map(function(vec) {
            return {
              a: new BN4(vec.a, 16),
              b: new BN4(vec.b, 16)
            };
          });
        } else {
          basis = this._getEndoBasis(lambda);
        }
        return {
          beta,
          lambda,
          basis
        };
      };
      ShortCurve2.prototype._getEndoRoots = function _getEndoRoots2(num2) {
        var red = num2 === this.p ? this.red : BN4.mont(num2);
        var tinv = new BN4(2).toRed(red).redInvm();
        var ntinv = tinv.redNeg();
        var s3 = new BN4(3).toRed(red).redNeg().redSqrt().redMul(tinv);
        var l1 = ntinv.redAdd(s3).fromRed();
        var l22 = ntinv.redSub(s3).fromRed();
        return [l1, l22];
      };
      ShortCurve2.prototype._getEndoBasis = function _getEndoBasis2(lambda) {
        var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));
        var u4 = lambda;
        var v13 = this.n.clone();
        var x1 = new BN4(1);
        var y1 = new BN4(0);
        var x22 = new BN4(0);
        var y22 = new BN4(1);
        var a0;
        var b0;
        var a1;
        var b1;
        var a22;
        var b22;
        var prevR;
        var i5 = 0;
        var r3;
        var x13;
        while (u4.cmpn(0) !== 0) {
          var q7 = v13.div(u4);
          r3 = v13.sub(q7.mul(u4));
          x13 = x22.sub(q7.mul(x1));
          var y11 = y22.sub(q7.mul(y1));
          if (!a1 && r3.cmp(aprxSqrt) < 0) {
            a0 = prevR.neg();
            b0 = x1;
            a1 = r3.neg();
            b1 = x13;
          } else if (a1 && ++i5 === 2) {
            break;
          }
          prevR = r3;
          v13 = u4;
          u4 = r3;
          x22 = x1;
          x1 = x13;
          y22 = y1;
          y1 = y11;
        }
        a22 = r3.neg();
        b22 = x13;
        var len1 = a1.sqr().add(b1.sqr());
        var len2 = a22.sqr().add(b22.sqr());
        if (len2.cmp(len1) >= 0) {
          a22 = a0;
          b22 = b0;
        }
        if (a1.negative) {
          a1 = a1.neg();
          b1 = b1.neg();
        }
        if (a22.negative) {
          a22 = a22.neg();
          b22 = b22.neg();
        }
        return [
          { a: a1, b: b1 },
          { a: a22, b: b22 }
        ];
      };
      ShortCurve2.prototype._endoSplit = function _endoSplit2(k7) {
        var basis = this.endo.basis;
        var v13 = basis[0];
        var v22 = basis[1];
        var c1 = v22.b.mul(k7).divRound(this.n);
        var c22 = v13.b.neg().mul(k7).divRound(this.n);
        var p1 = c1.mul(v13.a);
        var p22 = c22.mul(v22.a);
        var q1 = c1.mul(v13.b);
        var q22 = c22.mul(v22.b);
        var k1 = k7.sub(p1).sub(p22);
        var k22 = q1.add(q22).neg();
        return { k1, k2: k22 };
      };
      ShortCurve2.prototype.pointFromX = function pointFromX2(x13, odd) {
        x13 = new BN4(x13, 16);
        if (!x13.red)
          x13 = x13.toRed(this.red);
        var y22 = x13.redSqr().redMul(x13).redIAdd(x13.redMul(this.a)).redIAdd(this.b);
        var y11 = y22.redSqrt();
        if (y11.redSqr().redSub(y22).cmp(this.zero) !== 0)
          throw new Error("invalid point");
        var isOdd2 = y11.fromRed().isOdd();
        if (odd && !isOdd2 || !odd && isOdd2)
          y11 = y11.redNeg();
        return this.point(x13, y11);
      };
      ShortCurve2.prototype.validate = function validate12(point3) {
        if (point3.inf)
          return true;
        var x13 = point3.x;
        var y11 = point3.y;
        var ax = this.a.redMul(x13);
        var rhs = x13.redSqr().redMul(x13).redIAdd(ax).redIAdd(this.b);
        return y11.redSqr().redISub(rhs).cmpn(0) === 0;
      };
      ShortCurve2.prototype._endoWnafMulAdd = function _endoWnafMulAdd2(points, coeffs, jacobianResult) {
        var npoints = this._endoWnafT1;
        var ncoeffs = this._endoWnafT2;
        for (var i5 = 0; i5 < points.length; i5++) {
          var split3 = this._endoSplit(coeffs[i5]);
          var p7 = points[i5];
          var beta = p7._getBeta();
          if (split3.k1.negative) {
            split3.k1.ineg();
            p7 = p7.neg(true);
          }
          if (split3.k2.negative) {
            split3.k2.ineg();
            beta = beta.neg(true);
          }
          npoints[i5 * 2] = p7;
          npoints[i5 * 2 + 1] = beta;
          ncoeffs[i5 * 2] = split3.k1;
          ncoeffs[i5 * 2 + 1] = split3.k2;
        }
        var res = this._wnafMulAdd(1, npoints, ncoeffs, i5 * 2, jacobianResult);
        for (var j6 = 0; j6 < i5 * 2; j6++) {
          npoints[j6] = null;
          ncoeffs[j6] = null;
        }
        return res;
      };
      function Point5(curve, x13, y11, isRed) {
        Base.BasePoint.call(this, curve, "affine");
        if (x13 === null && y11 === null) {
          this.x = null;
          this.y = null;
          this.inf = true;
        } else {
          this.x = new BN4(x13, 16);
          this.y = new BN4(y11, 16);
          if (isRed) {
            this.x.forceRed(this.curve.red);
            this.y.forceRed(this.curve.red);
          }
          if (!this.x.red)
            this.x = this.x.toRed(this.curve.red);
          if (!this.y.red)
            this.y = this.y.toRed(this.curve.red);
          this.inf = false;
        }
      }
      inherits(Point5, Base.BasePoint);
      ShortCurve2.prototype.point = function point3(x13, y11, isRed) {
        return new Point5(this, x13, y11, isRed);
      };
      ShortCurve2.prototype.pointFromJSON = function pointFromJSON2(obj, red) {
        return Point5.fromJSON(this, obj, red);
      };
      Point5.prototype._getBeta = function _getBeta3() {
        if (!this.curve.endo)
          return;
        var pre = this.precomputed;
        if (pre && pre.beta)
          return pre.beta;
        var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);
        if (pre) {
          var curve = this.curve;
          var endoMul = function(p7) {
            return curve.point(p7.x.redMul(curve.endo.beta), p7.y);
          };
          pre.beta = beta;
          beta.precomputed = {
            beta: null,
            naf: pre.naf && {
              wnd: pre.naf.wnd,
              points: pre.naf.points.map(endoMul)
            },
            doubles: pre.doubles && {
              step: pre.doubles.step,
              points: pre.doubles.points.map(endoMul)
            }
          };
        }
        return beta;
      };
      Point5.prototype.toJSON = function toJSON2() {
        if (!this.precomputed)
          return [this.x, this.y];
        return [this.x, this.y, this.precomputed && {
          doubles: this.precomputed.doubles && {
            step: this.precomputed.doubles.step,
            points: this.precomputed.doubles.points.slice(1)
          },
          naf: this.precomputed.naf && {
            wnd: this.precomputed.naf.wnd,
            points: this.precomputed.naf.points.slice(1)
          }
        }];
      };
      Point5.fromJSON = function fromJSON2(curve, obj, red) {
        if (typeof obj === "string")
          obj = JSON.parse(obj);
        var res = curve.point(obj[0], obj[1], red);
        if (!obj[2])
          return res;
        function obj2point(obj2) {
          return curve.point(obj2[0], obj2[1], red);
        }
        var pre = obj[2];
        res.precomputed = {
          beta: null,
          doubles: pre.doubles && {
            step: pre.doubles.step,
            points: [res].concat(pre.doubles.points.map(obj2point))
          },
          naf: pre.naf && {
            wnd: pre.naf.wnd,
            points: [res].concat(pre.naf.points.map(obj2point))
          }
        };
        return res;
      };
      Point5.prototype.inspect = function inspect4() {
        if (this.isInfinity())
          return "<EC Point Infinity>";
        return "<EC Point x: " + this.x.fromRed().toString(16, 2) + " y: " + this.y.fromRed().toString(16, 2) + ">";
      };
      Point5.prototype.isInfinity = function isInfinity3() {
        return this.inf;
      };
      Point5.prototype.add = function add5(p7) {
        if (this.inf)
          return p7;
        if (p7.inf)
          return this;
        if (this.eq(p7))
          return this.dbl();
        if (this.neg().eq(p7))
          return this.curve.point(null, null);
        if (this.x.cmp(p7.x) === 0)
          return this.curve.point(null, null);
        var c7 = this.y.redSub(p7.y);
        if (c7.cmpn(0) !== 0)
          c7 = c7.redMul(this.x.redSub(p7.x).redInvm());
        var nx = c7.redSqr().redISub(this.x).redISub(p7.x);
        var ny = c7.redMul(this.x.redSub(nx)).redISub(this.y);
        return this.curve.point(nx, ny);
      };
      Point5.prototype.dbl = function dbl3() {
        if (this.inf)
          return this;
        var ys1 = this.y.redAdd(this.y);
        if (ys1.cmpn(0) === 0)
          return this.curve.point(null, null);
        var a5 = this.curve.a;
        var x22 = this.x.redSqr();
        var dyinv = ys1.redInvm();
        var c7 = x22.redAdd(x22).redIAdd(x22).redIAdd(a5).redMul(dyinv);
        var nx = c7.redSqr().redISub(this.x.redAdd(this.x));
        var ny = c7.redMul(this.x.redSub(nx)).redISub(this.y);
        return this.curve.point(nx, ny);
      };
      Point5.prototype.getX = function getX2() {
        return this.x.fromRed();
      };
      Point5.prototype.getY = function getY2() {
        return this.y.fromRed();
      };
      Point5.prototype.mul = function mul3(k7) {
        k7 = new BN4(k7, 16);
        if (this.isInfinity())
          return this;
        else if (this._hasDoubles(k7))
          return this.curve._fixedNafMul(this, k7);
        else if (this.curve.endo)
          return this.curve._endoWnafMulAdd([this], [k7]);
        else
          return this.curve._wnafMul(this, k7);
      };
      Point5.prototype.mulAdd = function mulAdd2(k1, p22, k22) {
        var points = [this, p22];
        var coeffs = [k1, k22];
        if (this.curve.endo)
          return this.curve._endoWnafMulAdd(points, coeffs);
        else
          return this.curve._wnafMulAdd(1, points, coeffs, 2);
      };
      Point5.prototype.jmulAdd = function jmulAdd2(k1, p22, k22) {
        var points = [this, p22];
        var coeffs = [k1, k22];
        if (this.curve.endo)
          return this.curve._endoWnafMulAdd(points, coeffs, true);
        else
          return this.curve._wnafMulAdd(1, points, coeffs, 2, true);
      };
      Point5.prototype.eq = function eq4(p7) {
        return this === p7 || this.inf === p7.inf && (this.inf || this.x.cmp(p7.x) === 0 && this.y.cmp(p7.y) === 0);
      };
      Point5.prototype.neg = function neg3(_precompute) {
        if (this.inf)
          return this;
        var res = this.curve.point(this.x, this.y.redNeg());
        if (_precompute && this.precomputed) {
          var pre = this.precomputed;
          var negate = function(p7) {
            return p7.neg();
          };
          res.precomputed = {
            naf: pre.naf && {
              wnd: pre.naf.wnd,
              points: pre.naf.points.map(negate)
            },
            doubles: pre.doubles && {
              step: pre.doubles.step,
              points: pre.doubles.points.map(negate)
            }
          };
        }
        return res;
      };
      Point5.prototype.toJ = function toJ2() {
        if (this.inf)
          return this.curve.jpoint(null, null, null);
        var res = this.curve.jpoint(this.x, this.y, this.curve.one);
        return res;
      };
      function JPoint2(curve, x13, y11, z11) {
        Base.BasePoint.call(this, curve, "jacobian");
        if (x13 === null && y11 === null && z11 === null) {
          this.x = this.curve.one;
          this.y = this.curve.one;
          this.z = new BN4(0);
        } else {
          this.x = new BN4(x13, 16);
          this.y = new BN4(y11, 16);
          this.z = new BN4(z11, 16);
        }
        if (!this.x.red)
          this.x = this.x.toRed(this.curve.red);
        if (!this.y.red)
          this.y = this.y.toRed(this.curve.red);
        if (!this.z.red)
          this.z = this.z.toRed(this.curve.red);
        this.zOne = this.z === this.curve.one;
      }
      inherits(JPoint2, Base.BasePoint);
      ShortCurve2.prototype.jpoint = function jpoint2(x13, y11, z11) {
        return new JPoint2(this, x13, y11, z11);
      };
      JPoint2.prototype.toP = function toP2() {
        if (this.isInfinity())
          return this.curve.point(null, null);
        var zinv = this.z.redInvm();
        var zinv2 = zinv.redSqr();
        var ax = this.x.redMul(zinv2);
        var ay = this.y.redMul(zinv2).redMul(zinv);
        return this.curve.point(ax, ay);
      };
      JPoint2.prototype.neg = function neg3() {
        return this.curve.jpoint(this.x, this.y.redNeg(), this.z);
      };
      JPoint2.prototype.add = function add5(p7) {
        if (this.isInfinity())
          return p7;
        if (p7.isInfinity())
          return this;
        var pz2 = p7.z.redSqr();
        var z22 = this.z.redSqr();
        var u1 = this.x.redMul(pz2);
        var u22 = p7.x.redMul(z22);
        var s1 = this.y.redMul(pz2.redMul(p7.z));
        var s22 = p7.y.redMul(z22.redMul(this.z));
        var h8 = u1.redSub(u22);
        var r3 = s1.redSub(s22);
        if (h8.cmpn(0) === 0) {
          if (r3.cmpn(0) !== 0)
            return this.curve.jpoint(null, null, null);
          else
            return this.dbl();
        }
        var h22 = h8.redSqr();
        var h32 = h22.redMul(h8);
        var v13 = u1.redMul(h22);
        var nx = r3.redSqr().redIAdd(h32).redISub(v13).redISub(v13);
        var ny = r3.redMul(v13.redISub(nx)).redISub(s1.redMul(h32));
        var nz = this.z.redMul(p7.z).redMul(h8);
        return this.curve.jpoint(nx, ny, nz);
      };
      JPoint2.prototype.mixedAdd = function mixedAdd2(p7) {
        if (this.isInfinity())
          return p7.toJ();
        if (p7.isInfinity())
          return this;
        var z22 = this.z.redSqr();
        var u1 = this.x;
        var u22 = p7.x.redMul(z22);
        var s1 = this.y;
        var s22 = p7.y.redMul(z22).redMul(this.z);
        var h8 = u1.redSub(u22);
        var r3 = s1.redSub(s22);
        if (h8.cmpn(0) === 0) {
          if (r3.cmpn(0) !== 0)
            return this.curve.jpoint(null, null, null);
          else
            return this.dbl();
        }
        var h22 = h8.redSqr();
        var h32 = h22.redMul(h8);
        var v13 = u1.redMul(h22);
        var nx = r3.redSqr().redIAdd(h32).redISub(v13).redISub(v13);
        var ny = r3.redMul(v13.redISub(nx)).redISub(s1.redMul(h32));
        var nz = this.z.redMul(h8);
        return this.curve.jpoint(nx, ny, nz);
      };
      JPoint2.prototype.dblp = function dblp3(pow) {
        if (pow === 0)
          return this;
        if (this.isInfinity())
          return this;
        if (!pow)
          return this.dbl();
        var i5;
        if (this.curve.zeroA || this.curve.threeA) {
          var r3 = this;
          for (i5 = 0; i5 < pow; i5++)
            r3 = r3.dbl();
          return r3;
        }
        var a5 = this.curve.a;
        var tinv = this.curve.tinv;
        var jx = this.x;
        var jy = this.y;
        var jz = this.z;
        var jz4 = jz.redSqr().redSqr();
        var jyd = jy.redAdd(jy);
        for (i5 = 0; i5 < pow; i5++) {
          var jx2 = jx.redSqr();
          var jyd2 = jyd.redSqr();
          var jyd4 = jyd2.redSqr();
          var c7 = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a5.redMul(jz4));
          var t1 = jx.redMul(jyd2);
          var nx = c7.redSqr().redISub(t1.redAdd(t1));
          var t2 = t1.redISub(nx);
          var dny = c7.redMul(t2);
          dny = dny.redIAdd(dny).redISub(jyd4);
          var nz = jyd.redMul(jz);
          if (i5 + 1 < pow)
            jz4 = jz4.redMul(jyd4);
          jx = nx;
          jz = nz;
          jyd = dny;
        }
        return this.curve.jpoint(jx, jyd.redMul(tinv), jz);
      };
      JPoint2.prototype.dbl = function dbl3() {
        if (this.isInfinity())
          return this;
        if (this.curve.zeroA)
          return this._zeroDbl();
        else if (this.curve.threeA)
          return this._threeDbl();
        else
          return this._dbl();
      };
      JPoint2.prototype._zeroDbl = function _zeroDbl2() {
        var nx;
        var ny;
        var nz;
        if (this.zOne) {
          var xx = this.x.redSqr();
          var yy = this.y.redSqr();
          var yyyy = yy.redSqr();
          var s3 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
          s3 = s3.redIAdd(s3);
          var m3 = xx.redAdd(xx).redIAdd(xx);
          var t = m3.redSqr().redISub(s3).redISub(s3);
          var yyyy8 = yyyy.redIAdd(yyyy);
          yyyy8 = yyyy8.redIAdd(yyyy8);
          yyyy8 = yyyy8.redIAdd(yyyy8);
          nx = t;
          ny = m3.redMul(s3.redISub(t)).redISub(yyyy8);
          nz = this.y.redAdd(this.y);
        } else {
          var a5 = this.x.redSqr();
          var b9 = this.y.redSqr();
          var c7 = b9.redSqr();
          var d6 = this.x.redAdd(b9).redSqr().redISub(a5).redISub(c7);
          d6 = d6.redIAdd(d6);
          var e2 = a5.redAdd(a5).redIAdd(a5);
          var f7 = e2.redSqr();
          var c8 = c7.redIAdd(c7);
          c8 = c8.redIAdd(c8);
          c8 = c8.redIAdd(c8);
          nx = f7.redISub(d6).redISub(d6);
          ny = e2.redMul(d6.redISub(nx)).redISub(c8);
          nz = this.y.redMul(this.z);
          nz = nz.redIAdd(nz);
        }
        return this.curve.jpoint(nx, ny, nz);
      };
      JPoint2.prototype._threeDbl = function _threeDbl2() {
        var nx;
        var ny;
        var nz;
        if (this.zOne) {
          var xx = this.x.redSqr();
          var yy = this.y.redSqr();
          var yyyy = yy.redSqr();
          var s3 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
          s3 = s3.redIAdd(s3);
          var m3 = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);
          var t = m3.redSqr().redISub(s3).redISub(s3);
          nx = t;
          var yyyy8 = yyyy.redIAdd(yyyy);
          yyyy8 = yyyy8.redIAdd(yyyy8);
          yyyy8 = yyyy8.redIAdd(yyyy8);
          ny = m3.redMul(s3.redISub(t)).redISub(yyyy8);
          nz = this.y.redAdd(this.y);
        } else {
          var delta = this.z.redSqr();
          var gamma = this.y.redSqr();
          var beta = this.x.redMul(gamma);
          var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));
          alpha = alpha.redAdd(alpha).redIAdd(alpha);
          var beta4 = beta.redIAdd(beta);
          beta4 = beta4.redIAdd(beta4);
          var beta8 = beta4.redAdd(beta4);
          nx = alpha.redSqr().redISub(beta8);
          nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);
          var ggamma8 = gamma.redSqr();
          ggamma8 = ggamma8.redIAdd(ggamma8);
          ggamma8 = ggamma8.redIAdd(ggamma8);
          ggamma8 = ggamma8.redIAdd(ggamma8);
          ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);
        }
        return this.curve.jpoint(nx, ny, nz);
      };
      JPoint2.prototype._dbl = function _dbl2() {
        var a5 = this.curve.a;
        var jx = this.x;
        var jy = this.y;
        var jz = this.z;
        var jz4 = jz.redSqr().redSqr();
        var jx2 = jx.redSqr();
        var jy2 = jy.redSqr();
        var c7 = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a5.redMul(jz4));
        var jxd4 = jx.redAdd(jx);
        jxd4 = jxd4.redIAdd(jxd4);
        var t1 = jxd4.redMul(jy2);
        var nx = c7.redSqr().redISub(t1.redAdd(t1));
        var t2 = t1.redISub(nx);
        var jyd8 = jy2.redSqr();
        jyd8 = jyd8.redIAdd(jyd8);
        jyd8 = jyd8.redIAdd(jyd8);
        jyd8 = jyd8.redIAdd(jyd8);
        var ny = c7.redMul(t2).redISub(jyd8);
        var nz = jy.redAdd(jy).redMul(jz);
        return this.curve.jpoint(nx, ny, nz);
      };
      JPoint2.prototype.trpl = function trpl2() {
        if (!this.curve.zeroA)
          return this.dbl().add(this);
        var xx = this.x.redSqr();
        var yy = this.y.redSqr();
        var zz = this.z.redSqr();
        var yyyy = yy.redSqr();
        var m3 = xx.redAdd(xx).redIAdd(xx);
        var mm = m3.redSqr();
        var e2 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
        e2 = e2.redIAdd(e2);
        e2 = e2.redAdd(e2).redIAdd(e2);
        e2 = e2.redISub(mm);
        var ee8 = e2.redSqr();
        var t = yyyy.redIAdd(yyyy);
        t = t.redIAdd(t);
        t = t.redIAdd(t);
        t = t.redIAdd(t);
        var u4 = m3.redIAdd(e2).redSqr().redISub(mm).redISub(ee8).redISub(t);
        var yyu4 = yy.redMul(u4);
        yyu4 = yyu4.redIAdd(yyu4);
        yyu4 = yyu4.redIAdd(yyu4);
        var nx = this.x.redMul(ee8).redISub(yyu4);
        nx = nx.redIAdd(nx);
        nx = nx.redIAdd(nx);
        var ny = this.y.redMul(u4.redMul(t.redISub(u4)).redISub(e2.redMul(ee8)));
        ny = ny.redIAdd(ny);
        ny = ny.redIAdd(ny);
        ny = ny.redIAdd(ny);
        var nz = this.z.redAdd(e2).redSqr().redISub(zz).redISub(ee8);
        return this.curve.jpoint(nx, ny, nz);
      };
      JPoint2.prototype.mul = function mul3(k7, kbase) {
        k7 = new BN4(k7, kbase);
        return this.curve._wnafMul(this, k7);
      };
      JPoint2.prototype.eq = function eq4(p7) {
        if (p7.type === "affine")
          return this.eq(p7.toJ());
        if (this === p7)
          return true;
        var z22 = this.z.redSqr();
        var pz2 = p7.z.redSqr();
        if (this.x.redMul(pz2).redISub(p7.x.redMul(z22)).cmpn(0) !== 0)
          return false;
        var z32 = z22.redMul(this.z);
        var pz3 = pz2.redMul(p7.z);
        return this.y.redMul(pz3).redISub(p7.y.redMul(z32)).cmpn(0) === 0;
      };
      JPoint2.prototype.eqXToP = function eqXToP2(x13) {
        var zs2 = this.z.redSqr();
        var rx = x13.toRed(this.curve.red).redMul(zs2);
        if (this.x.cmp(rx) === 0)
          return true;
        var xc = x13.clone();
        var t = this.curve.redN.redMul(zs2);
        for (; ; ) {
          xc.iadd(this.curve.n);
          if (xc.cmp(this.curve.p) >= 0)
            return false;
          rx.redIAdd(t);
          if (this.x.cmp(rx) === 0)
            return true;
        }
      };
      JPoint2.prototype.inspect = function inspect4() {
        if (this.isInfinity())
          return "<EC JPoint Infinity>";
        return "<EC JPoint x: " + this.x.toString(16, 2) + " y: " + this.y.toString(16, 2) + " z: " + this.z.toString(16, 2) + ">";
      };
      JPoint2.prototype.isInfinity = function isInfinity3() {
        return this.z.cmpn(0) === 0;
      };
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/mont.js
  var require_mont = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/mont.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var BN4 = require_bn2();
      var inherits = require_inherits_browser();
      var Base = require_base();
      var utils = require_utils5();
      function MontCurve(conf) {
        Base.call(this, "mont", conf);
        this.a = new BN4(conf.a, 16).toRed(this.red);
        this.b = new BN4(conf.b, 16).toRed(this.red);
        this.i4 = new BN4(4).toRed(this.red).redInvm();
        this.two = new BN4(2).toRed(this.red);
        this.a24 = this.i4.redMul(this.a.redAdd(this.two));
      }
      inherits(MontCurve, Base);
      module.exports = MontCurve;
      MontCurve.prototype.validate = function validate12(point3) {
        var x13 = point3.normalize().x;
        var x22 = x13.redSqr();
        var rhs = x22.redMul(x13).redAdd(x22.redMul(this.a)).redAdd(x13);
        var y11 = rhs.redSqrt();
        return y11.redSqr().cmp(rhs) === 0;
      };
      function Point5(curve, x13, z11) {
        Base.BasePoint.call(this, curve, "projective");
        if (x13 === null && z11 === null) {
          this.x = this.curve.one;
          this.z = this.curve.zero;
        } else {
          this.x = new BN4(x13, 16);
          this.z = new BN4(z11, 16);
          if (!this.x.red)
            this.x = this.x.toRed(this.curve.red);
          if (!this.z.red)
            this.z = this.z.toRed(this.curve.red);
        }
      }
      inherits(Point5, Base.BasePoint);
      MontCurve.prototype.decodePoint = function decodePoint2(bytes, enc) {
        return this.point(utils.toArray(bytes, enc), 1);
      };
      MontCurve.prototype.point = function point3(x13, z11) {
        return new Point5(this, x13, z11);
      };
      MontCurve.prototype.pointFromJSON = function pointFromJSON2(obj) {
        return Point5.fromJSON(this, obj);
      };
      Point5.prototype.precompute = function precompute3() {
      };
      Point5.prototype._encode = function _encode3() {
        return this.getX().toArray("be", this.curve.p.byteLength());
      };
      Point5.fromJSON = function fromJSON2(curve, obj) {
        return new Point5(curve, obj[0], obj[1] || curve.one);
      };
      Point5.prototype.inspect = function inspect4() {
        if (this.isInfinity())
          return "<EC Point Infinity>";
        return "<EC Point x: " + this.x.fromRed().toString(16, 2) + " z: " + this.z.fromRed().toString(16, 2) + ">";
      };
      Point5.prototype.isInfinity = function isInfinity3() {
        return this.z.cmpn(0) === 0;
      };
      Point5.prototype.dbl = function dbl3() {
        var a5 = this.x.redAdd(this.z);
        var aa = a5.redSqr();
        var b9 = this.x.redSub(this.z);
        var bb = b9.redSqr();
        var c7 = aa.redSub(bb);
        var nx = aa.redMul(bb);
        var nz = c7.redMul(bb.redAdd(this.curve.a24.redMul(c7)));
        return this.curve.point(nx, nz);
      };
      Point5.prototype.add = function add5() {
        throw new Error("Not supported on Montgomery curve");
      };
      Point5.prototype.diffAdd = function diffAdd(p7, diff) {
        var a5 = this.x.redAdd(this.z);
        var b9 = this.x.redSub(this.z);
        var c7 = p7.x.redAdd(p7.z);
        var d6 = p7.x.redSub(p7.z);
        var da = d6.redMul(a5);
        var cb = c7.redMul(b9);
        var nx = diff.z.redMul(da.redAdd(cb).redSqr());
        var nz = diff.x.redMul(da.redISub(cb).redSqr());
        return this.curve.point(nx, nz);
      };
      Point5.prototype.mul = function mul3(k7) {
        var t = k7.clone();
        var a5 = this;
        var b9 = this.curve.point(null, null);
        var c7 = this;
        for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))
          bits.push(t.andln(1));
        for (var i5 = bits.length - 1; i5 >= 0; i5--) {
          if (bits[i5] === 0) {
            a5 = a5.diffAdd(b9, c7);
            b9 = b9.dbl();
          } else {
            b9 = a5.diffAdd(b9, c7);
            a5 = a5.dbl();
          }
        }
        return b9;
      };
      Point5.prototype.mulAdd = function mulAdd2() {
        throw new Error("Not supported on Montgomery curve");
      };
      Point5.prototype.jumlAdd = function jumlAdd() {
        throw new Error("Not supported on Montgomery curve");
      };
      Point5.prototype.eq = function eq4(other) {
        return this.getX().cmp(other.getX()) === 0;
      };
      Point5.prototype.normalize = function normalize2() {
        this.x = this.x.redMul(this.z.redInvm());
        this.z = this.curve.one;
        return this;
      };
      Point5.prototype.getX = function getX2() {
        this.normalize();
        return this.x.fromRed();
      };
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/edwards.js
  var require_edwards = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/edwards.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var utils = require_utils5();
      var BN4 = require_bn2();
      var inherits = require_inherits_browser();
      var Base = require_base();
      var assert12 = utils.assert;
      function EdwardsCurve(conf) {
        this.twisted = (conf.a | 0) !== 1;
        this.mOneA = this.twisted && (conf.a | 0) === -1;
        this.extended = this.mOneA;
        Base.call(this, "edwards", conf);
        this.a = new BN4(conf.a, 16).umod(this.red.m);
        this.a = this.a.toRed(this.red);
        this.c = new BN4(conf.c, 16).toRed(this.red);
        this.c2 = this.c.redSqr();
        this.d = new BN4(conf.d, 16).toRed(this.red);
        this.dd = this.d.redAdd(this.d);
        assert12(!this.twisted || this.c.fromRed().cmpn(1) === 0);
        this.oneC = (conf.c | 0) === 1;
      }
      inherits(EdwardsCurve, Base);
      module.exports = EdwardsCurve;
      EdwardsCurve.prototype._mulA = function _mulA(num2) {
        if (this.mOneA)
          return num2.redNeg();
        else
          return this.a.redMul(num2);
      };
      EdwardsCurve.prototype._mulC = function _mulC(num2) {
        if (this.oneC)
          return num2;
        else
          return this.c.redMul(num2);
      };
      EdwardsCurve.prototype.jpoint = function jpoint2(x13, y11, z11, t) {
        return this.point(x13, y11, z11, t);
      };
      EdwardsCurve.prototype.pointFromX = function pointFromX2(x13, odd) {
        x13 = new BN4(x13, 16);
        if (!x13.red)
          x13 = x13.toRed(this.red);
        var x22 = x13.redSqr();
        var rhs = this.c2.redSub(this.a.redMul(x22));
        var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x22));
        var y22 = rhs.redMul(lhs.redInvm());
        var y11 = y22.redSqrt();
        if (y11.redSqr().redSub(y22).cmp(this.zero) !== 0)
          throw new Error("invalid point");
        var isOdd2 = y11.fromRed().isOdd();
        if (odd && !isOdd2 || !odd && isOdd2)
          y11 = y11.redNeg();
        return this.point(x13, y11);
      };
      EdwardsCurve.prototype.pointFromY = function pointFromY(y11, odd) {
        y11 = new BN4(y11, 16);
        if (!y11.red)
          y11 = y11.toRed(this.red);
        var y22 = y11.redSqr();
        var lhs = y22.redSub(this.c2);
        var rhs = y22.redMul(this.d).redMul(this.c2).redSub(this.a);
        var x22 = lhs.redMul(rhs.redInvm());
        if (x22.cmp(this.zero) === 0) {
          if (odd)
            throw new Error("invalid point");
          else
            return this.point(this.zero, y11);
        }
        var x13 = x22.redSqrt();
        if (x13.redSqr().redSub(x22).cmp(this.zero) !== 0)
          throw new Error("invalid point");
        if (x13.fromRed().isOdd() !== odd)
          x13 = x13.redNeg();
        return this.point(x13, y11);
      };
      EdwardsCurve.prototype.validate = function validate12(point3) {
        if (point3.isInfinity())
          return true;
        point3.normalize();
        var x22 = point3.x.redSqr();
        var y22 = point3.y.redSqr();
        var lhs = x22.redMul(this.a).redAdd(y22);
        var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x22).redMul(y22)));
        return lhs.cmp(rhs) === 0;
      };
      function Point5(curve, x13, y11, z11, t) {
        Base.BasePoint.call(this, curve, "projective");
        if (x13 === null && y11 === null && z11 === null) {
          this.x = this.curve.zero;
          this.y = this.curve.one;
          this.z = this.curve.one;
          this.t = this.curve.zero;
          this.zOne = true;
        } else {
          this.x = new BN4(x13, 16);
          this.y = new BN4(y11, 16);
          this.z = z11 ? new BN4(z11, 16) : this.curve.one;
          this.t = t && new BN4(t, 16);
          if (!this.x.red)
            this.x = this.x.toRed(this.curve.red);
          if (!this.y.red)
            this.y = this.y.toRed(this.curve.red);
          if (!this.z.red)
            this.z = this.z.toRed(this.curve.red);
          if (this.t && !this.t.red)
            this.t = this.t.toRed(this.curve.red);
          this.zOne = this.z === this.curve.one;
          if (this.curve.extended && !this.t) {
            this.t = this.x.redMul(this.y);
            if (!this.zOne)
              this.t = this.t.redMul(this.z.redInvm());
          }
        }
      }
      inherits(Point5, Base.BasePoint);
      EdwardsCurve.prototype.pointFromJSON = function pointFromJSON2(obj) {
        return Point5.fromJSON(this, obj);
      };
      EdwardsCurve.prototype.point = function point3(x13, y11, z11, t) {
        return new Point5(this, x13, y11, z11, t);
      };
      Point5.fromJSON = function fromJSON2(curve, obj) {
        return new Point5(curve, obj[0], obj[1], obj[2]);
      };
      Point5.prototype.inspect = function inspect4() {
        if (this.isInfinity())
          return "<EC Point Infinity>";
        return "<EC Point x: " + this.x.fromRed().toString(16, 2) + " y: " + this.y.fromRed().toString(16, 2) + " z: " + this.z.fromRed().toString(16, 2) + ">";
      };
      Point5.prototype.isInfinity = function isInfinity3() {
        return this.x.cmpn(0) === 0 && (this.y.cmp(this.z) === 0 || this.zOne && this.y.cmp(this.curve.c) === 0);
      };
      Point5.prototype._extDbl = function _extDbl() {
        var a5 = this.x.redSqr();
        var b9 = this.y.redSqr();
        var c7 = this.z.redSqr();
        c7 = c7.redIAdd(c7);
        var d6 = this.curve._mulA(a5);
        var e2 = this.x.redAdd(this.y).redSqr().redISub(a5).redISub(b9);
        var g8 = d6.redAdd(b9);
        var f7 = g8.redSub(c7);
        var h8 = d6.redSub(b9);
        var nx = e2.redMul(f7);
        var ny = g8.redMul(h8);
        var nt5 = e2.redMul(h8);
        var nz = f7.redMul(g8);
        return this.curve.point(nx, ny, nz, nt5);
      };
      Point5.prototype._projDbl = function _projDbl() {
        var b9 = this.x.redAdd(this.y).redSqr();
        var c7 = this.x.redSqr();
        var d6 = this.y.redSqr();
        var nx;
        var ny;
        var nz;
        var e2;
        var h8;
        var j6;
        if (this.curve.twisted) {
          e2 = this.curve._mulA(c7);
          var f7 = e2.redAdd(d6);
          if (this.zOne) {
            nx = b9.redSub(c7).redSub(d6).redMul(f7.redSub(this.curve.two));
            ny = f7.redMul(e2.redSub(d6));
            nz = f7.redSqr().redSub(f7).redSub(f7);
          } else {
            h8 = this.z.redSqr();
            j6 = f7.redSub(h8).redISub(h8);
            nx = b9.redSub(c7).redISub(d6).redMul(j6);
            ny = f7.redMul(e2.redSub(d6));
            nz = f7.redMul(j6);
          }
        } else {
          e2 = c7.redAdd(d6);
          h8 = this.curve._mulC(this.z).redSqr();
          j6 = e2.redSub(h8).redSub(h8);
          nx = this.curve._mulC(b9.redISub(e2)).redMul(j6);
          ny = this.curve._mulC(e2).redMul(c7.redISub(d6));
          nz = e2.redMul(j6);
        }
        return this.curve.point(nx, ny, nz);
      };
      Point5.prototype.dbl = function dbl3() {
        if (this.isInfinity())
          return this;
        if (this.curve.extended)
          return this._extDbl();
        else
          return this._projDbl();
      };
      Point5.prototype._extAdd = function _extAdd(p7) {
        var a5 = this.y.redSub(this.x).redMul(p7.y.redSub(p7.x));
        var b9 = this.y.redAdd(this.x).redMul(p7.y.redAdd(p7.x));
        var c7 = this.t.redMul(this.curve.dd).redMul(p7.t);
        var d6 = this.z.redMul(p7.z.redAdd(p7.z));
        var e2 = b9.redSub(a5);
        var f7 = d6.redSub(c7);
        var g8 = d6.redAdd(c7);
        var h8 = b9.redAdd(a5);
        var nx = e2.redMul(f7);
        var ny = g8.redMul(h8);
        var nt5 = e2.redMul(h8);
        var nz = f7.redMul(g8);
        return this.curve.point(nx, ny, nz, nt5);
      };
      Point5.prototype._projAdd = function _projAdd(p7) {
        var a5 = this.z.redMul(p7.z);
        var b9 = a5.redSqr();
        var c7 = this.x.redMul(p7.x);
        var d6 = this.y.redMul(p7.y);
        var e2 = this.curve.d.redMul(c7).redMul(d6);
        var f7 = b9.redSub(e2);
        var g8 = b9.redAdd(e2);
        var tmp = this.x.redAdd(this.y).redMul(p7.x.redAdd(p7.y)).redISub(c7).redISub(d6);
        var nx = a5.redMul(f7).redMul(tmp);
        var ny;
        var nz;
        if (this.curve.twisted) {
          ny = a5.redMul(g8).redMul(d6.redSub(this.curve._mulA(c7)));
          nz = f7.redMul(g8);
        } else {
          ny = a5.redMul(g8).redMul(d6.redSub(c7));
          nz = this.curve._mulC(f7).redMul(g8);
        }
        return this.curve.point(nx, ny, nz);
      };
      Point5.prototype.add = function add5(p7) {
        if (this.isInfinity())
          return p7;
        if (p7.isInfinity())
          return this;
        if (this.curve.extended)
          return this._extAdd(p7);
        else
          return this._projAdd(p7);
      };
      Point5.prototype.mul = function mul3(k7) {
        if (this._hasDoubles(k7))
          return this.curve._fixedNafMul(this, k7);
        else
          return this.curve._wnafMul(this, k7);
      };
      Point5.prototype.mulAdd = function mulAdd2(k1, p7, k22) {
        return this.curve._wnafMulAdd(1, [this, p7], [k1, k22], 2, false);
      };
      Point5.prototype.jmulAdd = function jmulAdd2(k1, p7, k22) {
        return this.curve._wnafMulAdd(1, [this, p7], [k1, k22], 2, true);
      };
      Point5.prototype.normalize = function normalize2() {
        if (this.zOne)
          return this;
        var zi2 = this.z.redInvm();
        this.x = this.x.redMul(zi2);
        this.y = this.y.redMul(zi2);
        if (this.t)
          this.t = this.t.redMul(zi2);
        this.z = this.curve.one;
        this.zOne = true;
        return this;
      };
      Point5.prototype.neg = function neg3() {
        return this.curve.point(
          this.x.redNeg(),
          this.y,
          this.z,
          this.t && this.t.redNeg()
        );
      };
      Point5.prototype.getX = function getX2() {
        this.normalize();
        return this.x.fromRed();
      };
      Point5.prototype.getY = function getY2() {
        this.normalize();
        return this.y.fromRed();
      };
      Point5.prototype.eq = function eq4(other) {
        return this === other || this.getX().cmp(other.getX()) === 0 && this.getY().cmp(other.getY()) === 0;
      };
      Point5.prototype.eqXToP = function eqXToP2(x13) {
        var rx = x13.toRed(this.curve.red).redMul(this.z);
        if (this.x.cmp(rx) === 0)
          return true;
        var xc = x13.clone();
        var t = this.curve.redN.redMul(this.z);
        for (; ; ) {
          xc.iadd(this.curve.n);
          if (xc.cmp(this.curve.p) >= 0)
            return false;
          rx.redIAdd(t);
          if (this.x.cmp(rx) === 0)
            return true;
        }
      };
      Point5.prototype.toP = Point5.prototype.normalize;
      Point5.prototype.mixedAdd = Point5.prototype.add;
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/index.js
  var require_curve = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/index.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var curve = exports;
      curve.base = require_base();
      curve.short = require_short();
      curve.mont = require_mont();
      curve.edwards = require_edwards();
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js
  var require_secp256k1 = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      module.exports = {
        doubles: {
          step: 4,
          points: [
            [
              "e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a",
              "f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"
            ],
            [
              "8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508",
              "11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"
            ],
            [
              "175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739",
              "d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"
            ],
            [
              "363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640",
              "4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"
            ],
            [
              "8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c",
              "4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"
            ],
            [
              "723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda",
              "96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"
            ],
            [
              "eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa",
              "5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"
            ],
            [
              "100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0",
              "cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"
            ],
            [
              "e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d",
              "9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"
            ],
            [
              "feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d",
              "e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"
            ],
            [
              "da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1",
              "9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"
            ],
            [
              "53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0",
              "5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"
            ],
            [
              "8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047",
              "10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"
            ],
            [
              "385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862",
              "283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"
            ],
            [
              "6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7",
              "7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"
            ],
            [
              "3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd",
              "56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"
            ],
            [
              "85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83",
              "7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"
            ],
            [
              "948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a",
              "53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"
            ],
            [
              "6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8",
              "bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"
            ],
            [
              "e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d",
              "4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"
            ],
            [
              "e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725",
              "7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"
            ],
            [
              "213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754",
              "4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"
            ],
            [
              "4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c",
              "17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"
            ],
            [
              "fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6",
              "6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"
            ],
            [
              "76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39",
              "c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"
            ],
            [
              "c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891",
              "893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"
            ],
            [
              "d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b",
              "febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"
            ],
            [
              "b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03",
              "2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"
            ],
            [
              "e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d",
              "eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"
            ],
            [
              "a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070",
              "7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"
            ],
            [
              "90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4",
              "e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"
            ],
            [
              "8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da",
              "662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"
            ],
            [
              "e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11",
              "1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"
            ],
            [
              "8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e",
              "efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"
            ],
            [
              "e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41",
              "2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"
            ],
            [
              "b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef",
              "67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"
            ],
            [
              "d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8",
              "db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"
            ],
            [
              "324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d",
              "648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"
            ],
            [
              "4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96",
              "35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"
            ],
            [
              "9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd",
              "ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"
            ],
            [
              "6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5",
              "9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"
            ],
            [
              "a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266",
              "40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"
            ],
            [
              "7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71",
              "34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"
            ],
            [
              "928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac",
              "c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"
            ],
            [
              "85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751",
              "1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"
            ],
            [
              "ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e",
              "493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"
            ],
            [
              "827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241",
              "c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"
            ],
            [
              "eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3",
              "be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"
            ],
            [
              "e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f",
              "4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"
            ],
            [
              "1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19",
              "aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"
            ],
            [
              "146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be",
              "b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"
            ],
            [
              "fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9",
              "6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"
            ],
            [
              "da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2",
              "8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"
            ],
            [
              "a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13",
              "7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"
            ],
            [
              "174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c",
              "ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"
            ],
            [
              "959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba",
              "2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"
            ],
            [
              "d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151",
              "e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"
            ],
            [
              "64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073",
              "d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"
            ],
            [
              "8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458",
              "38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"
            ],
            [
              "13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b",
              "69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"
            ],
            [
              "bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366",
              "d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"
            ],
            [
              "8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa",
              "40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"
            ],
            [
              "8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0",
              "620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"
            ],
            [
              "dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787",
              "7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"
            ],
            [
              "f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e",
              "ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"
            ]
          ]
        },
        naf: {
          wnd: 7,
          points: [
            [
              "f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9",
              "388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"
            ],
            [
              "2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4",
              "d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"
            ],
            [
              "5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc",
              "6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"
            ],
            [
              "acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe",
              "cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"
            ],
            [
              "774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb",
              "d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"
            ],
            [
              "f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8",
              "ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"
            ],
            [
              "d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e",
              "581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"
            ],
            [
              "defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34",
              "4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"
            ],
            [
              "2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c",
              "85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"
            ],
            [
              "352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5",
              "321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"
            ],
            [
              "2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f",
              "2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"
            ],
            [
              "9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714",
              "73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"
            ],
            [
              "daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729",
              "a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"
            ],
            [
              "c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db",
              "2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"
            ],
            [
              "6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4",
              "e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"
            ],
            [
              "1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5",
              "b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"
            ],
            [
              "605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479",
              "2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"
            ],
            [
              "62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d",
              "80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"
            ],
            [
              "80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f",
              "1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"
            ],
            [
              "7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb",
              "d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"
            ],
            [
              "d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9",
              "eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"
            ],
            [
              "49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963",
              "758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"
            ],
            [
              "77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74",
              "958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"
            ],
            [
              "f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530",
              "e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"
            ],
            [
              "463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b",
              "5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"
            ],
            [
              "f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247",
              "cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"
            ],
            [
              "caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1",
              "cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"
            ],
            [
              "2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120",
              "4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"
            ],
            [
              "7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435",
              "91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"
            ],
            [
              "754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18",
              "673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"
            ],
            [
              "e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8",
              "59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"
            ],
            [
              "186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb",
              "3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"
            ],
            [
              "df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f",
              "55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"
            ],
            [
              "5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143",
              "efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"
            ],
            [
              "290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba",
              "e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"
            ],
            [
              "af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45",
              "f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"
            ],
            [
              "766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a",
              "744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"
            ],
            [
              "59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e",
              "c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"
            ],
            [
              "f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8",
              "e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"
            ],
            [
              "7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c",
              "30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"
            ],
            [
              "948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519",
              "e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"
            ],
            [
              "7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab",
              "100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"
            ],
            [
              "3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca",
              "ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"
            ],
            [
              "d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf",
              "8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"
            ],
            [
              "1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610",
              "68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"
            ],
            [
              "733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4",
              "f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"
            ],
            [
              "15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c",
              "d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"
            ],
            [
              "a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940",
              "edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"
            ],
            [
              "e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980",
              "a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"
            ],
            [
              "311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3",
              "66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"
            ],
            [
              "34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf",
              "9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"
            ],
            [
              "f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63",
              "4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"
            ],
            [
              "d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448",
              "fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"
            ],
            [
              "32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf",
              "5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"
            ],
            [
              "7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5",
              "8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"
            ],
            [
              "ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6",
              "8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"
            ],
            [
              "16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5",
              "5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"
            ],
            [
              "eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99",
              "f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"
            ],
            [
              "78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51",
              "f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"
            ],
            [
              "494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5",
              "42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"
            ],
            [
              "a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5",
              "204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"
            ],
            [
              "c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997",
              "4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"
            ],
            [
              "841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881",
              "73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"
            ],
            [
              "5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5",
              "39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"
            ],
            [
              "36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66",
              "d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"
            ],
            [
              "336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726",
              "ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"
            ],
            [
              "8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede",
              "6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"
            ],
            [
              "1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94",
              "60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"
            ],
            [
              "85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31",
              "3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"
            ],
            [
              "29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51",
              "b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"
            ],
            [
              "a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252",
              "ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"
            ],
            [
              "4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5",
              "cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"
            ],
            [
              "d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b",
              "6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"
            ],
            [
              "ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4",
              "322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"
            ],
            [
              "af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f",
              "6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"
            ],
            [
              "e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889",
              "2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"
            ],
            [
              "591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246",
              "b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"
            ],
            [
              "11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984",
              "998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"
            ],
            [
              "3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a",
              "b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"
            ],
            [
              "cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030",
              "bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"
            ],
            [
              "c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197",
              "6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"
            ],
            [
              "c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593",
              "c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"
            ],
            [
              "a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef",
              "21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"
            ],
            [
              "347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38",
              "60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"
            ],
            [
              "da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a",
              "49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"
            ],
            [
              "c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111",
              "5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"
            ],
            [
              "4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502",
              "7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"
            ],
            [
              "3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea",
              "be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"
            ],
            [
              "cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26",
              "8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"
            ],
            [
              "b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986",
              "39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"
            ],
            [
              "d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e",
              "62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"
            ],
            [
              "48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4",
              "25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"
            ],
            [
              "dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda",
              "ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"
            ],
            [
              "6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859",
              "cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"
            ],
            [
              "e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f",
              "f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"
            ],
            [
              "eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c",
              "6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"
            ],
            [
              "13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942",
              "fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"
            ],
            [
              "ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a",
              "1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"
            ],
            [
              "b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80",
              "5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"
            ],
            [
              "ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d",
              "438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"
            ],
            [
              "8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1",
              "cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"
            ],
            [
              "52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63",
              "c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"
            ],
            [
              "e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352",
              "6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"
            ],
            [
              "7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193",
              "ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"
            ],
            [
              "5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00",
              "9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"
            ],
            [
              "32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58",
              "ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"
            ],
            [
              "e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7",
              "d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"
            ],
            [
              "8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8",
              "c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"
            ],
            [
              "4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e",
              "67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"
            ],
            [
              "3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d",
              "cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"
            ],
            [
              "674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b",
              "299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"
            ],
            [
              "d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f",
              "f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"
            ],
            [
              "30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6",
              "462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"
            ],
            [
              "be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297",
              "62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"
            ],
            [
              "93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a",
              "7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"
            ],
            [
              "b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c",
              "ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"
            ],
            [
              "d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52",
              "4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"
            ],
            [
              "d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb",
              "bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"
            ],
            [
              "463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065",
              "bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"
            ],
            [
              "7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917",
              "603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"
            ],
            [
              "74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9",
              "cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"
            ],
            [
              "30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3",
              "553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"
            ],
            [
              "9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57",
              "712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"
            ],
            [
              "176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66",
              "ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"
            ],
            [
              "75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8",
              "9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"
            ],
            [
              "809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721",
              "9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"
            ],
            [
              "1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180",
              "4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"
            ]
          ]
        }
      };
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curves.js
  var require_curves = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curves.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var curves = exports;
      var hash5 = require_hash();
      var curve = require_curve();
      var utils = require_utils5();
      var assert12 = utils.assert;
      function PresetCurve(options) {
        if (options.type === "short")
          this.curve = new curve.short(options);
        else if (options.type === "edwards")
          this.curve = new curve.edwards(options);
        else
          this.curve = new curve.mont(options);
        this.g = this.curve.g;
        this.n = this.curve.n;
        this.hash = options.hash;
        assert12(this.g.validate(), "Invalid curve");
        assert12(this.g.mul(this.n).isInfinity(), "Invalid curve, G*N != O");
      }
      curves.PresetCurve = PresetCurve;
      function defineCurve(name2, options) {
        Object.defineProperty(curves, name2, {
          configurable: true,
          enumerable: true,
          get: function() {
            var curve2 = new PresetCurve(options);
            Object.defineProperty(curves, name2, {
              configurable: true,
              enumerable: true,
              value: curve2
            });
            return curve2;
          }
        });
      }
      defineCurve("p192", {
        type: "short",
        prime: "p192",
        p: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",
        a: "ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",
        b: "64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",
        n: "ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",
        hash: hash5.sha256,
        gRed: false,
        g: [
          "188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012",
          "07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"
        ]
      });
      defineCurve("p224", {
        type: "short",
        prime: "p224",
        p: "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",
        a: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",
        b: "b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",
        n: "ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",
        hash: hash5.sha256,
        gRed: false,
        g: [
          "b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21",
          "bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"
        ]
      });
      defineCurve("p256", {
        type: "short",
        prime: null,
        p: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",
        a: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",
        b: "5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",
        n: "ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",
        hash: hash5.sha256,
        gRed: false,
        g: [
          "6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296",
          "4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"
        ]
      });
      defineCurve("p384", {
        type: "short",
        prime: null,
        p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",
        a: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",
        b: "b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",
        n: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",
        hash: hash5.sha384,
        gRed: false,
        g: [
          "aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7",
          "3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"
        ]
      });
      defineCurve("p521", {
        type: "short",
        prime: null,
        p: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",
        a: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",
        b: "00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",
        n: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",
        hash: hash5.sha512,
        gRed: false,
        g: [
          "000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66",
          "00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"
        ]
      });
      defineCurve("curve25519", {
        type: "mont",
        prime: "p25519",
        p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",
        a: "76d06",
        b: "1",
        n: "1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",
        hash: hash5.sha256,
        gRed: false,
        g: [
          "9"
        ]
      });
      defineCurve("ed25519", {
        type: "edwards",
        prime: "p25519",
        p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",
        a: "-1",
        c: "1",
        // -121665 * (121666^(-1)) (mod P)
        d: "52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",
        n: "1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",
        hash: hash5.sha256,
        gRed: false,
        g: [
          "216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a",
          // 4/5
          "6666666666666666666666666666666666666666666666666666666666666658"
        ]
      });
      var pre;
      try {
        pre = require_secp256k1();
      } catch (e2) {
        pre = void 0;
      }
      defineCurve("secp256k1", {
        type: "short",
        prime: "k256",
        p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",
        a: "0",
        b: "7",
        n: "ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",
        h: "1",
        hash: hash5.sha256,
        // Precomputed endomorphism
        beta: "7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",
        lambda: "5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",
        basis: [
          {
            a: "3086d221a7d46bcde86c90e49284eb15",
            b: "-e4437ed6010e88286f547fa90abfe4c3"
          },
          {
            a: "114ca50f7a8e2f3f657c1108d9d44cfd8",
            b: "3086d221a7d46bcde86c90e49284eb15"
          }
        ],
        gRed: false,
        g: [
          "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
          "483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
          pre
        ]
      });
    }
  });

  // ../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js
  var require_hmac_drbg = __commonJS({
    "../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var hash5 = require_hash();
      var utils = require_utils4();
      var assert12 = require_minimalistic_assert();
      function HmacDRBG2(options) {
        if (!(this instanceof HmacDRBG2))
          return new HmacDRBG2(options);
        this.hash = options.hash;
        this.predResist = !!options.predResist;
        this.outLen = this.hash.outSize;
        this.minEntropy = options.minEntropy || this.hash.hmacStrength;
        this._reseed = null;
        this.reseedInterval = null;
        this.K = null;
        this.V = null;
        var entropy = utils.toArray(options.entropy, options.entropyEnc || "hex");
        var nonce = utils.toArray(options.nonce, options.nonceEnc || "hex");
        var pers = utils.toArray(options.pers, options.persEnc || "hex");
        assert12(
          entropy.length >= this.minEntropy / 8,
          "Not enough entropy. Minimum is: " + this.minEntropy + " bits"
        );
        this._init(entropy, nonce, pers);
      }
      module.exports = HmacDRBG2;
      HmacDRBG2.prototype._init = function init2(entropy, nonce, pers) {
        var seed = entropy.concat(nonce).concat(pers);
        this.K = new Array(this.outLen / 8);
        this.V = new Array(this.outLen / 8);
        for (var i5 = 0; i5 < this.V.length; i5++) {
          this.K[i5] = 0;
          this.V[i5] = 1;
        }
        this._update(seed);
        this._reseed = 1;
        this.reseedInterval = 281474976710656;
      };
      HmacDRBG2.prototype._hmac = function hmac4() {
        return new hash5.hmac(this.hash, this.K);
      };
      HmacDRBG2.prototype._update = function update2(seed) {
        var kmac = this._hmac().update(this.V).update([0]);
        if (seed)
          kmac = kmac.update(seed);
        this.K = kmac.digest();
        this.V = this._hmac().update(this.V).digest();
        if (!seed)
          return;
        this.K = this._hmac().update(this.V).update([1]).update(seed).digest();
        this.V = this._hmac().update(this.V).digest();
      };
      HmacDRBG2.prototype.reseed = function reseed2(entropy, entropyEnc, add5, addEnc) {
        if (typeof entropyEnc !== "string") {
          addEnc = add5;
          add5 = entropyEnc;
          entropyEnc = null;
        }
        entropy = utils.toArray(entropy, entropyEnc);
        add5 = utils.toArray(add5, addEnc);
        assert12(
          entropy.length >= this.minEntropy / 8,
          "Not enough entropy. Minimum is: " + this.minEntropy + " bits"
        );
        this._update(entropy.concat(add5 || []));
        this._reseed = 1;
      };
      HmacDRBG2.prototype.generate = function generate2(len, enc, add5, addEnc) {
        if (this._reseed > this.reseedInterval)
          throw new Error("Reseed is required");
        if (typeof enc !== "string") {
          addEnc = add5;
          add5 = enc;
          enc = null;
        }
        if (add5) {
          add5 = utils.toArray(add5, addEnc || "hex");
          this._update(add5);
        }
        var temp = [];
        while (temp.length < len) {
          this.V = this._hmac().update(this.V).digest();
          temp = temp.concat(this.V);
        }
        var res = temp.slice(0, len);
        this._update(add5);
        this._reseed++;
        return utils.encode(res, enc);
      };
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/ec/key.js
  var require_key = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/ec/key.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var BN4 = require_bn2();
      var utils = require_utils5();
      var assert12 = utils.assert;
      function KeyPair2(ec2, options) {
        this.ec = ec2;
        this.priv = null;
        this.pub = null;
        if (options.priv)
          this._importPrivate(options.priv, options.privEnc);
        if (options.pub)
          this._importPublic(options.pub, options.pubEnc);
      }
      module.exports = KeyPair2;
      KeyPair2.fromPublic = function fromPublic2(ec2, pub, enc) {
        if (pub instanceof KeyPair2)
          return pub;
        return new KeyPair2(ec2, {
          pub,
          pubEnc: enc
        });
      };
      KeyPair2.fromPrivate = function fromPrivate2(ec2, priv, enc) {
        if (priv instanceof KeyPair2)
          return priv;
        return new KeyPair2(ec2, {
          priv,
          privEnc: enc
        });
      };
      KeyPair2.prototype.validate = function validate12() {
        var pub = this.getPublic();
        if (pub.isInfinity())
          return { result: false, reason: "Invalid public key" };
        if (!pub.validate())
          return { result: false, reason: "Public key is not a point" };
        if (!pub.mul(this.ec.curve.n).isInfinity())
          return { result: false, reason: "Public key * N != O" };
        return { result: true, reason: null };
      };
      KeyPair2.prototype.getPublic = function getPublic2(compact, enc) {
        if (typeof compact === "string") {
          enc = compact;
          compact = null;
        }
        if (!this.pub)
          this.pub = this.ec.g.mul(this.priv);
        if (!enc)
          return this.pub;
        return this.pub.encode(enc, compact);
      };
      KeyPair2.prototype.getPrivate = function getPrivate2(enc) {
        if (enc === "hex")
          return this.priv.toString(16, 2);
        else
          return this.priv;
      };
      KeyPair2.prototype._importPrivate = function _importPrivate2(key2, enc) {
        this.priv = new BN4(key2, enc || 16);
        this.priv = this.priv.umod(this.ec.curve.n);
      };
      KeyPair2.prototype._importPublic = function _importPublic2(key2, enc) {
        if (key2.x || key2.y) {
          if (this.ec.curve.type === "mont") {
            assert12(key2.x, "Need x coordinate");
          } else if (this.ec.curve.type === "short" || this.ec.curve.type === "edwards") {
            assert12(key2.x && key2.y, "Need both x and y coordinate");
          }
          this.pub = this.ec.curve.point(key2.x, key2.y);
          return;
        }
        this.pub = this.ec.curve.decodePoint(key2, enc);
      };
      KeyPair2.prototype.derive = function derive2(pub) {
        if (!pub.validate()) {
          assert12(pub.validate(), "public point not validated");
        }
        return pub.mul(this.priv).getX();
      };
      KeyPair2.prototype.sign = function sign6(msg, enc, options) {
        return this.ec.sign(msg, this, enc, options);
      };
      KeyPair2.prototype.verify = function verify5(msg, signature2) {
        return this.ec.verify(msg, signature2, this);
      };
      KeyPair2.prototype.inspect = function inspect4() {
        return "<Key priv: " + (this.priv && this.priv.toString(16, 2)) + " pub: " + (this.pub && this.pub.inspect()) + " >";
      };
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/ec/signature.js
  var require_signature = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/ec/signature.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var BN4 = require_bn2();
      var utils = require_utils5();
      var assert12 = utils.assert;
      function Signature2(options, enc) {
        if (options instanceof Signature2)
          return options;
        if (this._importDER(options, enc))
          return;
        assert12(options.r && options.s, "Signature without r or s");
        this.r = new BN4(options.r, 16);
        this.s = new BN4(options.s, 16);
        if (options.recoveryParam === void 0)
          this.recoveryParam = null;
        else
          this.recoveryParam = options.recoveryParam;
      }
      module.exports = Signature2;
      function Position2() {
        this.place = 0;
      }
      function getLength2(buf, p7) {
        var initial = buf[p7.place++];
        if (!(initial & 128)) {
          return initial;
        }
        var octetLen = initial & 15;
        if (octetLen === 0 || octetLen > 4) {
          return false;
        }
        if (buf[p7.place] === 0) {
          return false;
        }
        var val = 0;
        for (var i5 = 0, off = p7.place; i5 < octetLen; i5++, off++) {
          val <<= 8;
          val |= buf[off];
          val >>>= 0;
        }
        if (val <= 127) {
          return false;
        }
        p7.place = off;
        return val;
      }
      function rmPadding2(buf) {
        var i5 = 0;
        var len = buf.length - 1;
        while (!buf[i5] && !(buf[i5 + 1] & 128) && i5 < len) {
          i5++;
        }
        if (i5 === 0) {
          return buf;
        }
        return buf.slice(i5);
      }
      Signature2.prototype._importDER = function _importDER2(data, enc) {
        data = utils.toArray(data, enc);
        var p7 = new Position2();
        if (data[p7.place++] !== 48) {
          return false;
        }
        var len = getLength2(data, p7);
        if (len === false) {
          return false;
        }
        if (len + p7.place !== data.length) {
          return false;
        }
        if (data[p7.place++] !== 2) {
          return false;
        }
        var rlen = getLength2(data, p7);
        if (rlen === false) {
          return false;
        }
        if ((data[p7.place] & 128) !== 0) {
          return false;
        }
        var r3 = data.slice(p7.place, rlen + p7.place);
        p7.place += rlen;
        if (data[p7.place++] !== 2) {
          return false;
        }
        var slen = getLength2(data, p7);
        if (slen === false) {
          return false;
        }
        if (data.length !== slen + p7.place) {
          return false;
        }
        if ((data[p7.place] & 128) !== 0) {
          return false;
        }
        var s3 = data.slice(p7.place, slen + p7.place);
        if (r3[0] === 0) {
          if (r3[1] & 128) {
            r3 = r3.slice(1);
          } else {
            return false;
          }
        }
        if (s3[0] === 0) {
          if (s3[1] & 128) {
            s3 = s3.slice(1);
          } else {
            return false;
          }
        }
        this.r = new BN4(r3);
        this.s = new BN4(s3);
        this.recoveryParam = null;
        return true;
      };
      function constructLength2(arr, len) {
        if (len < 128) {
          arr.push(len);
          return;
        }
        var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);
        arr.push(octets | 128);
        while (--octets) {
          arr.push(len >>> (octets << 3) & 255);
        }
        arr.push(len);
      }
      Signature2.prototype.toDER = function toDER2(enc) {
        var r3 = this.r.toArray();
        var s3 = this.s.toArray();
        if (r3[0] & 128)
          r3 = [0].concat(r3);
        if (s3[0] & 128)
          s3 = [0].concat(s3);
        r3 = rmPadding2(r3);
        s3 = rmPadding2(s3);
        while (!s3[0] && !(s3[1] & 128)) {
          s3 = s3.slice(1);
        }
        var arr = [2];
        constructLength2(arr, r3.length);
        arr = arr.concat(r3);
        arr.push(2);
        constructLength2(arr, s3.length);
        var backHalf = arr.concat(s3);
        var res = [48];
        constructLength2(res, backHalf.length);
        res = res.concat(backHalf);
        return utils.encode(res, enc);
      };
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/ec/index.js
  var require_ec = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/ec/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var BN4 = require_bn2();
      var HmacDRBG2 = require_hmac_drbg();
      var utils = require_utils5();
      var curves = require_curves();
      var rand2 = require_brorand();
      var assert12 = utils.assert;
      var KeyPair2 = require_key();
      var Signature2 = require_signature();
      function EC2(options) {
        if (!(this instanceof EC2))
          return new EC2(options);
        if (typeof options === "string") {
          assert12(
            Object.prototype.hasOwnProperty.call(curves, options),
            "Unknown curve " + options
          );
          options = curves[options];
        }
        if (options instanceof curves.PresetCurve)
          options = { curve: options };
        this.curve = options.curve.curve;
        this.n = this.curve.n;
        this.nh = this.n.ushrn(1);
        this.g = this.curve.g;
        this.g = options.curve.g;
        this.g.precompute(options.curve.n.bitLength() + 1);
        this.hash = options.hash || options.curve.hash;
      }
      module.exports = EC2;
      EC2.prototype.keyPair = function keyPair2(options) {
        return new KeyPair2(this, options);
      };
      EC2.prototype.keyFromPrivate = function keyFromPrivate2(priv, enc) {
        return KeyPair2.fromPrivate(this, priv, enc);
      };
      EC2.prototype.keyFromPublic = function keyFromPublic2(pub, enc) {
        return KeyPair2.fromPublic(this, pub, enc);
      };
      EC2.prototype.genKeyPair = function genKeyPair2(options) {
        if (!options)
          options = {};
        var drbg = new HmacDRBG2({
          hash: this.hash,
          pers: options.pers,
          persEnc: options.persEnc || "utf8",
          entropy: options.entropy || rand2(this.hash.hmacStrength),
          entropyEnc: options.entropy && options.entropyEnc || "utf8",
          nonce: this.n.toArray()
        });
        var bytes = this.n.byteLength();
        var ns2 = this.n.sub(new BN4(2));
        for (; ; ) {
          var priv = new BN4(drbg.generate(bytes));
          if (priv.cmp(ns2) > 0)
            continue;
          priv.iaddn(1);
          return this.keyFromPrivate(priv);
        }
      };
      EC2.prototype._truncateToN = function _truncateToN2(msg, truncOnly) {
        var delta = msg.byteLength() * 8 - this.n.bitLength();
        if (delta > 0)
          msg = msg.ushrn(delta);
        if (!truncOnly && msg.cmp(this.n) >= 0)
          return msg.sub(this.n);
        else
          return msg;
      };
      EC2.prototype.sign = function sign6(msg, key2, enc, options) {
        if (typeof enc === "object") {
          options = enc;
          enc = null;
        }
        if (!options)
          options = {};
        key2 = this.keyFromPrivate(key2, enc);
        msg = this._truncateToN(new BN4(msg, 16));
        var bytes = this.n.byteLength();
        var bkey = key2.getPrivate().toArray("be", bytes);
        var nonce = msg.toArray("be", bytes);
        var drbg = new HmacDRBG2({
          hash: this.hash,
          entropy: bkey,
          nonce,
          pers: options.pers,
          persEnc: options.persEnc || "utf8"
        });
        var ns1 = this.n.sub(new BN4(1));
        for (var iter = 0; ; iter++) {
          var k7 = options.k ? options.k(iter) : new BN4(drbg.generate(this.n.byteLength()));
          k7 = this._truncateToN(k7, true);
          if (k7.cmpn(1) <= 0 || k7.cmp(ns1) >= 0)
            continue;
          var kp = this.g.mul(k7);
          if (kp.isInfinity())
            continue;
          var kpX = kp.getX();
          var r3 = kpX.umod(this.n);
          if (r3.cmpn(0) === 0)
            continue;
          var s3 = k7.invm(this.n).mul(r3.mul(key2.getPrivate()).iadd(msg));
          s3 = s3.umod(this.n);
          if (s3.cmpn(0) === 0)
            continue;
          var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | (kpX.cmp(r3) !== 0 ? 2 : 0);
          if (options.canonical && s3.cmp(this.nh) > 0) {
            s3 = this.n.sub(s3);
            recoveryParam ^= 1;
          }
          return new Signature2({ r: r3, s: s3, recoveryParam });
        }
      };
      EC2.prototype.verify = function verify5(msg, signature2, key2, enc) {
        msg = this._truncateToN(new BN4(msg, 16));
        key2 = this.keyFromPublic(key2, enc);
        signature2 = new Signature2(signature2, "hex");
        var r3 = signature2.r;
        var s3 = signature2.s;
        if (r3.cmpn(1) < 0 || r3.cmp(this.n) >= 0)
          return false;
        if (s3.cmpn(1) < 0 || s3.cmp(this.n) >= 0)
          return false;
        var sinv = s3.invm(this.n);
        var u1 = sinv.mul(msg).umod(this.n);
        var u22 = sinv.mul(r3).umod(this.n);
        var p7;
        if (!this.curve._maxwellTrick) {
          p7 = this.g.mulAdd(u1, key2.getPublic(), u22);
          if (p7.isInfinity())
            return false;
          return p7.getX().umod(this.n).cmp(r3) === 0;
        }
        p7 = this.g.jmulAdd(u1, key2.getPublic(), u22);
        if (p7.isInfinity())
          return false;
        return p7.eqXToP(r3);
      };
      EC2.prototype.recoverPubKey = function(msg, signature2, j6, enc) {
        assert12((3 & j6) === j6, "The recovery param is more than two bits");
        signature2 = new Signature2(signature2, enc);
        var n6 = this.n;
        var e2 = new BN4(msg);
        var r3 = signature2.r;
        var s3 = signature2.s;
        var isYOdd = j6 & 1;
        var isSecondKey = j6 >> 1;
        if (r3.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)
          throw new Error("Unable to find sencond key candinate");
        if (isSecondKey)
          r3 = this.curve.pointFromX(r3.add(this.curve.n), isYOdd);
        else
          r3 = this.curve.pointFromX(r3, isYOdd);
        var rInv = signature2.r.invm(n6);
        var s1 = n6.sub(e2).mul(rInv).umod(n6);
        var s22 = s3.mul(rInv).umod(n6);
        return this.g.mulAdd(s1, r3, s22);
      };
      EC2.prototype.getKeyRecoveryParam = function(e2, signature2, Q7, enc) {
        signature2 = new Signature2(signature2, enc);
        if (signature2.recoveryParam !== null)
          return signature2.recoveryParam;
        for (var i5 = 0; i5 < 4; i5++) {
          var Qprime;
          try {
            Qprime = this.recoverPubKey(e2, signature2, i5);
          } catch (e3) {
            continue;
          }
          if (Qprime.eq(Q7))
            return i5;
        }
        throw new Error("Unable to find valid recovery factor");
      };
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/eddsa/key.js
  var require_key2 = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/eddsa/key.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var utils = require_utils5();
      var assert12 = utils.assert;
      var parseBytes = utils.parseBytes;
      var cachedProperty = utils.cachedProperty;
      function KeyPair2(eddsa2, params) {
        this.eddsa = eddsa2;
        this._secret = parseBytes(params.secret);
        if (eddsa2.isPoint(params.pub))
          this._pub = params.pub;
        else
          this._pubBytes = parseBytes(params.pub);
      }
      KeyPair2.fromPublic = function fromPublic2(eddsa2, pub) {
        if (pub instanceof KeyPair2)
          return pub;
        return new KeyPair2(eddsa2, { pub });
      };
      KeyPair2.fromSecret = function fromSecret(eddsa2, secret) {
        if (secret instanceof KeyPair2)
          return secret;
        return new KeyPair2(eddsa2, { secret });
      };
      KeyPair2.prototype.secret = function secret() {
        return this._secret;
      };
      cachedProperty(KeyPair2, "pubBytes", function pubBytes() {
        return this.eddsa.encodePoint(this.pub());
      });
      cachedProperty(KeyPair2, "pub", function pub() {
        if (this._pubBytes)
          return this.eddsa.decodePoint(this._pubBytes);
        return this.eddsa.g.mul(this.priv());
      });
      cachedProperty(KeyPair2, "privBytes", function privBytes() {
        var eddsa2 = this.eddsa;
        var hash5 = this.hash();
        var lastIx = eddsa2.encodingLength - 1;
        var a5 = hash5.slice(0, eddsa2.encodingLength);
        a5[0] &= 248;
        a5[lastIx] &= 127;
        a5[lastIx] |= 64;
        return a5;
      });
      cachedProperty(KeyPair2, "priv", function priv() {
        return this.eddsa.decodeInt(this.privBytes());
      });
      cachedProperty(KeyPair2, "hash", function hash5() {
        return this.eddsa.hash().update(this.secret()).digest();
      });
      cachedProperty(KeyPair2, "messagePrefix", function messagePrefix3() {
        return this.hash().slice(this.eddsa.encodingLength);
      });
      KeyPair2.prototype.sign = function sign6(message) {
        assert12(this._secret, "KeyPair can only verify");
        return this.eddsa.sign(message, this);
      };
      KeyPair2.prototype.verify = function verify5(message, sig) {
        return this.eddsa.verify(message, sig, this);
      };
      KeyPair2.prototype.getSecret = function getSecret(enc) {
        assert12(this._secret, "KeyPair is public only");
        return utils.encode(this.secret(), enc);
      };
      KeyPair2.prototype.getPublic = function getPublic2(enc) {
        return utils.encode(this.pubBytes(), enc);
      };
      module.exports = KeyPair2;
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/eddsa/signature.js
  var require_signature2 = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/eddsa/signature.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var BN4 = require_bn2();
      var utils = require_utils5();
      var assert12 = utils.assert;
      var cachedProperty = utils.cachedProperty;
      var parseBytes = utils.parseBytes;
      function Signature2(eddsa2, sig) {
        this.eddsa = eddsa2;
        if (typeof sig !== "object")
          sig = parseBytes(sig);
        if (Array.isArray(sig)) {
          assert12(sig.length === eddsa2.encodingLength * 2, "Signature has invalid size");
          sig = {
            R: sig.slice(0, eddsa2.encodingLength),
            S: sig.slice(eddsa2.encodingLength)
          };
        }
        assert12(sig.R && sig.S, "Signature without R or S");
        if (eddsa2.isPoint(sig.R))
          this._R = sig.R;
        if (sig.S instanceof BN4)
          this._S = sig.S;
        this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;
        this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;
      }
      cachedProperty(Signature2, "S", function S10() {
        return this.eddsa.decodeInt(this.Sencoded());
      });
      cachedProperty(Signature2, "R", function R6() {
        return this.eddsa.decodePoint(this.Rencoded());
      });
      cachedProperty(Signature2, "Rencoded", function Rencoded() {
        return this.eddsa.encodePoint(this.R());
      });
      cachedProperty(Signature2, "Sencoded", function Sencoded() {
        return this.eddsa.encodeInt(this.S());
      });
      Signature2.prototype.toBytes = function toBytes5() {
        return this.Rencoded().concat(this.Sencoded());
      };
      Signature2.prototype.toHex = function toHex3() {
        return utils.encode(this.toBytes(), "hex").toUpperCase();
      };
      module.exports = Signature2;
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/eddsa/index.js
  var require_eddsa = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/eddsa/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var hash5 = require_hash();
      var curves = require_curves();
      var utils = require_utils5();
      var assert12 = utils.assert;
      var parseBytes = utils.parseBytes;
      var KeyPair2 = require_key2();
      var Signature2 = require_signature2();
      function EDDSA(curve) {
        assert12(curve === "ed25519", "only tested with ed25519 so far");
        if (!(this instanceof EDDSA))
          return new EDDSA(curve);
        curve = curves[curve].curve;
        this.curve = curve;
        this.g = curve.g;
        this.g.precompute(curve.n.bitLength() + 1);
        this.pointClass = curve.point().constructor;
        this.encodingLength = Math.ceil(curve.n.bitLength() / 8);
        this.hash = hash5.sha512;
      }
      module.exports = EDDSA;
      EDDSA.prototype.sign = function sign6(message, secret) {
        message = parseBytes(message);
        var key2 = this.keyFromSecret(secret);
        var r3 = this.hashInt(key2.messagePrefix(), message);
        var R6 = this.g.mul(r3);
        var Rencoded = this.encodePoint(R6);
        var s_ = this.hashInt(Rencoded, key2.pubBytes(), message).mul(key2.priv());
        var S10 = r3.add(s_).umod(this.curve.n);
        return this.makeSignature({ R: R6, S: S10, Rencoded });
      };
      EDDSA.prototype.verify = function verify5(message, sig, pub) {
        message = parseBytes(message);
        sig = this.makeSignature(sig);
        if (sig.S().gte(sig.eddsa.curve.n) || sig.S().isNeg()) {
          return false;
        }
        var key2 = this.keyFromPublic(pub);
        var h8 = this.hashInt(sig.Rencoded(), key2.pubBytes(), message);
        var SG = this.g.mul(sig.S());
        var RplusAh = sig.R().add(key2.pub().mul(h8));
        return RplusAh.eq(SG);
      };
      EDDSA.prototype.hashInt = function hashInt() {
        var hash6 = this.hash();
        for (var i5 = 0; i5 < arguments.length; i5++)
          hash6.update(arguments[i5]);
        return utils.intFromLE(hash6.digest()).umod(this.curve.n);
      };
      EDDSA.prototype.keyFromPublic = function keyFromPublic2(pub) {
        return KeyPair2.fromPublic(this, pub);
      };
      EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {
        return KeyPair2.fromSecret(this, secret);
      };
      EDDSA.prototype.makeSignature = function makeSignature(sig) {
        if (sig instanceof Signature2)
          return sig;
        return new Signature2(this, sig);
      };
      EDDSA.prototype.encodePoint = function encodePoint(point3) {
        var enc = point3.getY().toArray("le", this.encodingLength);
        enc[this.encodingLength - 1] |= point3.getX().isOdd() ? 128 : 0;
        return enc;
      };
      EDDSA.prototype.decodePoint = function decodePoint2(bytes) {
        bytes = utils.parseBytes(bytes);
        var lastIx = bytes.length - 1;
        var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128);
        var xIsOdd = (bytes[lastIx] & 128) !== 0;
        var y11 = utils.intFromLE(normed);
        return this.curve.pointFromY(y11, xIsOdd);
      };
      EDDSA.prototype.encodeInt = function encodeInt(num2) {
        return num2.toArray("le", this.encodingLength);
      };
      EDDSA.prototype.decodeInt = function decodeInt(bytes) {
        return utils.intFromLE(bytes);
      };
      EDDSA.prototype.isPoint = function isPoint(val) {
        return val instanceof this.pointClass;
      };
    }
  });

  // ../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic.js
  var require_elliptic = __commonJS({
    "../../node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic.js"(exports) {
      "use strict";
      init_node_compat_inject();
      var elliptic = exports;
      elliptic.version = require_package2().version;
      elliptic.utils = require_utils5();
      elliptic.rand = require_brorand();
      elliptic.curve = require_curve();
      elliptic.curves = require_curves();
      elliptic.ec = require_ec();
      elliptic.eddsa = require_eddsa();
    }
  });

  // ../../node_modules/.pnpm/@stablelib+sha512@1.0.1/node_modules/@stablelib/sha512/lib/sha512.js
  var require_sha5124 = __commonJS({
    "../../node_modules/.pnpm/@stablelib+sha512@1.0.1/node_modules/@stablelib/sha512/lib/sha512.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      var binary_1 = require_binary2();
      var wipe_1 = require_wipe();
      exports.DIGEST_LENGTH = 64;
      exports.BLOCK_SIZE = 128;
      var SHA5122 = (
        /** @class */
        (function() {
          function SHA5123() {
            this.digestLength = exports.DIGEST_LENGTH;
            this.blockSize = exports.BLOCK_SIZE;
            this._stateHi = new Int32Array(8);
            this._stateLo = new Int32Array(8);
            this._tempHi = new Int32Array(16);
            this._tempLo = new Int32Array(16);
            this._buffer = new Uint8Array(256);
            this._bufferLength = 0;
            this._bytesHashed = 0;
            this._finished = false;
            this.reset();
          }
          SHA5123.prototype._initState = function() {
            this._stateHi[0] = 1779033703;
            this._stateHi[1] = 3144134277;
            this._stateHi[2] = 1013904242;
            this._stateHi[3] = 2773480762;
            this._stateHi[4] = 1359893119;
            this._stateHi[5] = 2600822924;
            this._stateHi[6] = 528734635;
            this._stateHi[7] = 1541459225;
            this._stateLo[0] = 4089235720;
            this._stateLo[1] = 2227873595;
            this._stateLo[2] = 4271175723;
            this._stateLo[3] = 1595750129;
            this._stateLo[4] = 2917565137;
            this._stateLo[5] = 725511199;
            this._stateLo[6] = 4215389547;
            this._stateLo[7] = 327033209;
          };
          SHA5123.prototype.reset = function() {
            this._initState();
            this._bufferLength = 0;
            this._bytesHashed = 0;
            this._finished = false;
            return this;
          };
          SHA5123.prototype.clean = function() {
            wipe_1.wipe(this._buffer);
            wipe_1.wipe(this._tempHi);
            wipe_1.wipe(this._tempLo);
            this.reset();
          };
          SHA5123.prototype.update = function(data, dataLength) {
            if (dataLength === void 0) {
              dataLength = data.length;
            }
            if (this._finished) {
              throw new Error("SHA512: can't update because hash was finished.");
            }
            var dataPos = 0;
            this._bytesHashed += dataLength;
            if (this._bufferLength > 0) {
              while (this._bufferLength < exports.BLOCK_SIZE && dataLength > 0) {
                this._buffer[this._bufferLength++] = data[dataPos++];
                dataLength--;
              }
              if (this._bufferLength === this.blockSize) {
                hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, this._buffer, 0, this.blockSize);
                this._bufferLength = 0;
              }
            }
            if (dataLength >= this.blockSize) {
              dataPos = hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, data, dataPos, dataLength);
              dataLength %= this.blockSize;
            }
            while (dataLength > 0) {
              this._buffer[this._bufferLength++] = data[dataPos++];
              dataLength--;
            }
            return this;
          };
          SHA5123.prototype.finish = function(out) {
            if (!this._finished) {
              var bytesHashed = this._bytesHashed;
              var left = this._bufferLength;
              var bitLenHi = bytesHashed / 536870912 | 0;
              var bitLenLo = bytesHashed << 3;
              var padLength = bytesHashed % 128 < 112 ? 128 : 256;
              this._buffer[left] = 128;
              for (var i5 = left + 1; i5 < padLength - 8; i5++) {
                this._buffer[i5] = 0;
              }
              binary_1.writeUint32BE(bitLenHi, this._buffer, padLength - 8);
              binary_1.writeUint32BE(bitLenLo, this._buffer, padLength - 4);
              hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, this._buffer, 0, padLength);
              this._finished = true;
            }
            for (var i5 = 0; i5 < this.digestLength / 8; i5++) {
              binary_1.writeUint32BE(this._stateHi[i5], out, i5 * 8);
              binary_1.writeUint32BE(this._stateLo[i5], out, i5 * 8 + 4);
            }
            return this;
          };
          SHA5123.prototype.digest = function() {
            var out = new Uint8Array(this.digestLength);
            this.finish(out);
            return out;
          };
          SHA5123.prototype.saveState = function() {
            if (this._finished) {
              throw new Error("SHA256: cannot save finished state");
            }
            return {
              stateHi: new Int32Array(this._stateHi),
              stateLo: new Int32Array(this._stateLo),
              buffer: this._bufferLength > 0 ? new Uint8Array(this._buffer) : void 0,
              bufferLength: this._bufferLength,
              bytesHashed: this._bytesHashed
            };
          };
          SHA5123.prototype.restoreState = function(savedState) {
            this._stateHi.set(savedState.stateHi);
            this._stateLo.set(savedState.stateLo);
            this._bufferLength = savedState.bufferLength;
            if (savedState.buffer) {
              this._buffer.set(savedState.buffer);
            }
            this._bytesHashed = savedState.bytesHashed;
            this._finished = false;
            return this;
          };
          SHA5123.prototype.cleanSavedState = function(savedState) {
            wipe_1.wipe(savedState.stateHi);
            wipe_1.wipe(savedState.stateLo);
            if (savedState.buffer) {
              wipe_1.wipe(savedState.buffer);
            }
            savedState.bufferLength = 0;
            savedState.bytesHashed = 0;
          };
          return SHA5123;
        })()
      );
      exports.SHA512 = SHA5122;
      var K7 = new Int32Array([
        1116352408,
        3609767458,
        1899447441,
        602891725,
        3049323471,
        3964484399,
        3921009573,
        2173295548,
        961987163,
        4081628472,
        1508970993,
        3053834265,
        2453635748,
        2937671579,
        2870763221,
        3664609560,
        3624381080,
        2734883394,
        310598401,
        1164996542,
        607225278,
        1323610764,
        1426881987,
        3590304994,
        1925078388,
        4068182383,
        2162078206,
        991336113,
        2614888103,
        633803317,
        3248222580,
        3479774868,
        3835390401,
        2666613458,
        4022224774,
        944711139,
        264347078,
        2341262773,
        604807628,
        2007800933,
        770255983,
        1495990901,
        1249150122,
        1856431235,
        1555081692,
        3175218132,
        1996064986,
        2198950837,
        2554220882,
        3999719339,
        2821834349,
        766784016,
        2952996808,
        2566594879,
        3210313671,
        3203337956,
        3336571891,
        1034457026,
        3584528711,
        2466948901,
        113926993,
        3758326383,
        338241895,
        168717936,
        666307205,
        1188179964,
        773529912,
        1546045734,
        1294757372,
        1522805485,
        1396182291,
        2643833823,
        1695183700,
        2343527390,
        1986661051,
        1014477480,
        2177026350,
        1206759142,
        2456956037,
        344077627,
        2730485921,
        1290863460,
        2820302411,
        3158454273,
        3259730800,
        3505952657,
        3345764771,
        106217008,
        3516065817,
        3606008344,
        3600352804,
        1432725776,
        4094571909,
        1467031594,
        275423344,
        851169720,
        430227734,
        3100823752,
        506948616,
        1363258195,
        659060556,
        3750685593,
        883997877,
        3785050280,
        958139571,
        3318307427,
        1322822218,
        3812723403,
        1537002063,
        2003034995,
        1747873779,
        3602036899,
        1955562222,
        1575990012,
        2024104815,
        1125592928,
        2227730452,
        2716904306,
        2361852424,
        442776044,
        2428436474,
        593698344,
        2756734187,
        3733110249,
        3204031479,
        2999351573,
        3329325298,
        3815920427,
        3391569614,
        3928383900,
        3515267271,
        566280711,
        3940187606,
        3454069534,
        4118630271,
        4000239992,
        116418474,
        1914138554,
        174292421,
        2731055270,
        289380356,
        3203993006,
        460393269,
        320620315,
        685471733,
        587496836,
        852142971,
        1086792851,
        1017036298,
        365543100,
        1126000580,
        2618297676,
        1288033470,
        3409855158,
        1501505948,
        4234509866,
        1607167915,
        987167468,
        1816402316,
        1246189591
      ]);
      function hashBlocks(wh, wl, hh, hl, m3, pos, len) {
        var ah0 = hh[0], ah1 = hh[1], ah2 = hh[2], ah3 = hh[3], ah4 = hh[4], ah5 = hh[5], ah6 = hh[6], ah7 = hh[7], al0 = hl[0], al1 = hl[1], al2 = hl[2], al3 = hl[3], al4 = hl[4], al5 = hl[5], al6 = hl[6], al7 = hl[7];
        var h8, l6;
        var th, tl;
        var a5, b9, c7, d6;
        while (len >= 128) {
          for (var i5 = 0; i5 < 16; i5++) {
            var j6 = 8 * i5 + pos;
            wh[i5] = binary_1.readUint32BE(m3, j6);
            wl[i5] = binary_1.readUint32BE(m3, j6 + 4);
          }
          for (var i5 = 0; i5 < 80; i5++) {
            var bh0 = ah0;
            var bh1 = ah1;
            var bh2 = ah2;
            var bh3 = ah3;
            var bh4 = ah4;
            var bh5 = ah5;
            var bh6 = ah6;
            var bh7 = ah7;
            var bl0 = al0;
            var bl1 = al1;
            var bl2 = al2;
            var bl3 = al3;
            var bl4 = al4;
            var bl5 = al5;
            var bl6 = al6;
            var bl7 = al7;
            h8 = ah7;
            l6 = al7;
            a5 = l6 & 65535;
            b9 = l6 >>> 16;
            c7 = h8 & 65535;
            d6 = h8 >>> 16;
            h8 = (ah4 >>> 14 | al4 << 32 - 14) ^ (ah4 >>> 18 | al4 << 32 - 18) ^ (al4 >>> 41 - 32 | ah4 << 32 - (41 - 32));
            l6 = (al4 >>> 14 | ah4 << 32 - 14) ^ (al4 >>> 18 | ah4 << 32 - 18) ^ (ah4 >>> 41 - 32 | al4 << 32 - (41 - 32));
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            h8 = ah4 & ah5 ^ ~ah4 & ah6;
            l6 = al4 & al5 ^ ~al4 & al6;
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            h8 = K7[i5 * 2];
            l6 = K7[i5 * 2 + 1];
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            h8 = wh[i5 % 16];
            l6 = wl[i5 % 16];
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            b9 += a5 >>> 16;
            c7 += b9 >>> 16;
            d6 += c7 >>> 16;
            th = c7 & 65535 | d6 << 16;
            tl = a5 & 65535 | b9 << 16;
            h8 = th;
            l6 = tl;
            a5 = l6 & 65535;
            b9 = l6 >>> 16;
            c7 = h8 & 65535;
            d6 = h8 >>> 16;
            h8 = (ah0 >>> 28 | al0 << 32 - 28) ^ (al0 >>> 34 - 32 | ah0 << 32 - (34 - 32)) ^ (al0 >>> 39 - 32 | ah0 << 32 - (39 - 32));
            l6 = (al0 >>> 28 | ah0 << 32 - 28) ^ (ah0 >>> 34 - 32 | al0 << 32 - (34 - 32)) ^ (ah0 >>> 39 - 32 | al0 << 32 - (39 - 32));
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            h8 = ah0 & ah1 ^ ah0 & ah2 ^ ah1 & ah2;
            l6 = al0 & al1 ^ al0 & al2 ^ al1 & al2;
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            b9 += a5 >>> 16;
            c7 += b9 >>> 16;
            d6 += c7 >>> 16;
            bh7 = c7 & 65535 | d6 << 16;
            bl7 = a5 & 65535 | b9 << 16;
            h8 = bh3;
            l6 = bl3;
            a5 = l6 & 65535;
            b9 = l6 >>> 16;
            c7 = h8 & 65535;
            d6 = h8 >>> 16;
            h8 = th;
            l6 = tl;
            a5 += l6 & 65535;
            b9 += l6 >>> 16;
            c7 += h8 & 65535;
            d6 += h8 >>> 16;
            b9 += a5 >>> 16;
            c7 += b9 >>> 16;
            d6 += c7 >>> 16;
            bh3 = c7 & 65535 | d6 << 16;
            bl3 = a5 & 65535 | b9 << 16;
            ah1 = bh0;
            ah2 = bh1;
            ah3 = bh2;
            ah4 = bh3;
            ah5 = bh4;
            ah6 = bh5;
            ah7 = bh6;
            ah0 = bh7;
            al1 = bl0;
            al2 = bl1;
            al3 = bl2;
            al4 = bl3;
            al5 = bl4;
            al6 = bl5;
            al7 = bl6;
            al0 = bl7;
            if (i5 % 16 === 15) {
              for (var j6 = 0; j6 < 16; j6++) {
                h8 = wh[j6];
                l6 = wl[j6];
                a5 = l6 & 65535;
                b9 = l6 >>> 16;
                c7 = h8 & 65535;
                d6 = h8 >>> 16;
                h8 = wh[(j6 + 9) % 16];
                l6 = wl[(j6 + 9) % 16];
                a5 += l6 & 65535;
                b9 += l6 >>> 16;
                c7 += h8 & 65535;
                d6 += h8 >>> 16;
                th = wh[(j6 + 1) % 16];
                tl = wl[(j6 + 1) % 16];
                h8 = (th >>> 1 | tl << 32 - 1) ^ (th >>> 8 | tl << 32 - 8) ^ th >>> 7;
                l6 = (tl >>> 1 | th << 32 - 1) ^ (tl >>> 8 | th << 32 - 8) ^ (tl >>> 7 | th << 32 - 7);
                a5 += l6 & 65535;
                b9 += l6 >>> 16;
                c7 += h8 & 65535;
                d6 += h8 >>> 16;
                th = wh[(j6 + 14) % 16];
                tl = wl[(j6 + 14) % 16];
                h8 = (th >>> 19 | tl << 32 - 19) ^ (tl >>> 61 - 32 | th << 32 - (61 - 32)) ^ th >>> 6;
                l6 = (tl >>> 19 | th << 32 - 19) ^ (th >>> 61 - 32 | tl << 32 - (61 - 32)) ^ (tl >>> 6 | th << 32 - 6);
                a5 += l6 & 65535;
                b9 += l6 >>> 16;
                c7 += h8 & 65535;
                d6 += h8 >>> 16;
                b9 += a5 >>> 16;
                c7 += b9 >>> 16;
                d6 += c7 >>> 16;
                wh[j6] = c7 & 65535 | d6 << 16;
                wl[j6] = a5 & 65535 | b9 << 16;
              }
            }
          }
          h8 = ah0;
          l6 = al0;
          a5 = l6 & 65535;
          b9 = l6 >>> 16;
          c7 = h8 & 65535;
          d6 = h8 >>> 16;
          h8 = hh[0];
          l6 = hl[0];
          a5 += l6 & 65535;
          b9 += l6 >>> 16;
          c7 += h8 & 65535;
          d6 += h8 >>> 16;
          b9 += a5 >>> 16;
          c7 += b9 >>> 16;
          d6 += c7 >>> 16;
          hh[0] = ah0 = c7 & 65535 | d6 << 16;
          hl[0] = al0 = a5 & 65535 | b9 << 16;
          h8 = ah1;
          l6 = al1;
          a5 = l6 & 65535;
          b9 = l6 >>> 16;
          c7 = h8 & 65535;
          d6 = h8 >>> 16;
          h8 = hh[1];
          l6 = hl[1];
          a5 += l6 & 65535;
          b9 += l6 >>> 16;
          c7 += h8 & 65535;
          d6 += h8 >>> 16;
          b9 += a5 >>> 16;
          c7 += b9 >>> 16;
          d6 += c7 >>> 16;
          hh[1] = ah1 = c7 & 65535 | d6 << 16;
          hl[1] = al1 = a5 & 65535 | b9 << 16;
          h8 = ah2;
          l6 = al2;
          a5 = l6 & 65535;
          b9 = l6 >>> 16;
          c7 = h8 & 65535;
          d6 = h8 >>> 16;
          h8 = hh[2];
          l6 = hl[2];
          a5 += l6 & 65535;
          b9 += l6 >>> 16;
          c7 += h8 & 65535;
          d6 += h8 >>> 16;
          b9 += a5 >>> 16;
          c7 += b9 >>> 16;
          d6 += c7 >>> 16;
          hh[2] = ah2 = c7 & 65535 | d6 << 16;
          hl[2] = al2 = a5 & 65535 | b9 << 16;
          h8 = ah3;
          l6 = al3;
          a5 = l6 & 65535;
          b9 = l6 >>> 16;
          c7 = h8 & 65535;
          d6 = h8 >>> 16;
          h8 = hh[3];
          l6 = hl[3];
          a5 += l6 & 65535;
          b9 += l6 >>> 16;
          c7 += h8 & 65535;
          d6 += h8 >>> 16;
          b9 += a5 >>> 16;
          c7 += b9 >>> 16;
          d6 += c7 >>> 16;
          hh[3] = ah3 = c7 & 65535 | d6 << 16;
          hl[3] = al3 = a5 & 65535 | b9 << 16;
          h8 = ah4;
          l6 = al4;
          a5 = l6 & 65535;
          b9 = l6 >>> 16;
          c7 = h8 & 65535;
          d6 = h8 >>> 16;
          h8 = hh[4];
          l6 = hl[4];
          a5 += l6 & 65535;
          b9 += l6 >>> 16;
          c7 += h8 & 65535;
          d6 += h8 >>> 16;
          b9 += a5 >>> 16;
          c7 += b9 >>> 16;
          d6 += c7 >>> 16;
          hh[4] = ah4 = c7 & 65535 | d6 << 16;
          hl[4] = al4 = a5 & 65535 | b9 << 16;
          h8 = ah5;
          l6 = al5;
          a5 = l6 & 65535;
          b9 = l6 >>> 16;
          c7 = h8 & 65535;
          d6 = h8 >>> 16;
          h8 = hh[5];
          l6 = hl[5];
          a5 += l6 & 65535;
          b9 += l6 >>> 16;
          c7 += h8 & 65535;
          d6 += h8 >>> 16;
          b9 += a5 >>> 16;
          c7 += b9 >>> 16;
          d6 += c7 >>> 16;
          hh[5] = ah5 = c7 & 65535 | d6 << 16;
          hl[5] = al5 = a5 & 65535 | b9 << 16;
          h8 = ah6;
          l6 = al6;
          a5 = l6 & 65535;
          b9 = l6 >>> 16;
          c7 = h8 & 65535;
          d6 = h8 >>> 16;
          h8 = hh[6];
          l6 = hl[6];
          a5 += l6 & 65535;
          b9 += l6 >>> 16;
          c7 += h8 & 65535;
          d6 += h8 >>> 16;
          b9 += a5 >>> 16;
          c7 += b9 >>> 16;
          d6 += c7 >>> 16;
          hh[6] = ah6 = c7 & 65535 | d6 << 16;
          hl[6] = al6 = a5 & 65535 | b9 << 16;
          h8 = ah7;
          l6 = al7;
          a5 = l6 & 65535;
          b9 = l6 >>> 16;
          c7 = h8 & 65535;
          d6 = h8 >>> 16;
          h8 = hh[7];
          l6 = hl[7];
          a5 += l6 & 65535;
          b9 += l6 >>> 16;
          c7 += h8 & 65535;
          d6 += h8 >>> 16;
          b9 += a5 >>> 16;
          c7 += b9 >>> 16;
          d6 += c7 >>> 16;
          hh[7] = ah7 = c7 & 65535 | d6 << 16;
          hl[7] = al7 = a5 & 65535 | b9 << 16;
          pos += 128;
          len -= 128;
        }
        return pos;
      }
      function hash5(data) {
        var h8 = new SHA5122();
        h8.update(data);
        var digest2 = h8.digest();
        h8.clean();
        return digest2;
      }
      exports.hash = hash5;
    }
  });

  // ../../node_modules/.pnpm/@stablelib+ed25519@1.0.3/node_modules/@stablelib/ed25519/lib/ed25519.js
  var require_ed255192 = __commonJS({
    "../../node_modules/.pnpm/@stablelib+ed25519@1.0.3/node_modules/@stablelib/ed25519/lib/ed25519.js"(exports) {
      "use strict";
      init_node_compat_inject();
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.convertSecretKeyToX25519 = exports.convertPublicKeyToX25519 = exports.verify = exports.sign = exports.extractPublicKeyFromSecretKey = exports.generateKeyPair = exports.generateKeyPairFromSeed = exports.SEED_LENGTH = exports.SECRET_KEY_LENGTH = exports.PUBLIC_KEY_LENGTH = exports.SIGNATURE_LENGTH = void 0;
      var random_1 = require_random();
      var sha512_1 = require_sha5124();
      var wipe_1 = require_wipe();
      exports.SIGNATURE_LENGTH = 64;
      exports.PUBLIC_KEY_LENGTH = 32;
      exports.SECRET_KEY_LENGTH = 64;
      exports.SEED_LENGTH = 32;
      function gf(init2) {
        const r3 = new Float64Array(16);
        if (init2) {
          for (let i5 = 0; i5 < init2.length; i5++) {
            r3[i5] = init2[i5];
          }
        }
        return r3;
      }
      var _9 = new Uint8Array(32);
      _9[0] = 9;
      var gf0 = gf();
      var gf1 = gf([1]);
      var D7 = gf([
        30883,
        4953,
        19914,
        30187,
        55467,
        16705,
        2637,
        112,
        59544,
        30585,
        16505,
        36039,
        65139,
        11119,
        27886,
        20995
      ]);
      var D22 = gf([
        61785,
        9906,
        39828,
        60374,
        45398,
        33411,
        5274,
        224,
        53552,
        61171,
        33010,
        6542,
        64743,
        22239,
        55772,
        9222
      ]);
      var X4 = gf([
        54554,
        36645,
        11616,
        51542,
        42930,
        38181,
        51040,
        26924,
        56412,
        64982,
        57905,
        49316,
        21502,
        52590,
        14035,
        8553
      ]);
      var Y6 = gf([
        26200,
        26214,
        26214,
        26214,
        26214,
        26214,
        26214,
        26214,
        26214,
        26214,
        26214,
        26214,
        26214,
        26214,
        26214,
        26214
      ]);
      var I7 = gf([
        41136,
        18958,
        6951,
        50414,
        58488,
        44335,
        6150,
        12099,
        55207,
        15867,
        153,
        11085,
        57099,
        20417,
        9344,
        11139
      ]);
      function set25519(r3, a5) {
        for (let i5 = 0; i5 < 16; i5++) {
          r3[i5] = a5[i5] | 0;
        }
      }
      function car25519(o5) {
        let c7 = 1;
        for (let i5 = 0; i5 < 16; i5++) {
          let v13 = o5[i5] + c7 + 65535;
          c7 = Math.floor(v13 / 65536);
          o5[i5] = v13 - c7 * 65536;
        }
        o5[0] += c7 - 1 + 37 * (c7 - 1);
      }
      function sel25519(p7, q7, b9) {
        const c7 = ~(b9 - 1);
        for (let i5 = 0; i5 < 16; i5++) {
          const t = c7 & (p7[i5] ^ q7[i5]);
          p7[i5] ^= t;
          q7[i5] ^= t;
        }
      }
      function pack25519(o5, n6) {
        const m3 = gf();
        const t = gf();
        for (let i5 = 0; i5 < 16; i5++) {
          t[i5] = n6[i5];
        }
        car25519(t);
        car25519(t);
        car25519(t);
        for (let j6 = 0; j6 < 2; j6++) {
          m3[0] = t[0] - 65517;
          for (let i5 = 1; i5 < 15; i5++) {
            m3[i5] = t[i5] - 65535 - (m3[i5 - 1] >> 16 & 1);
            m3[i5 - 1] &= 65535;
          }
          m3[15] = t[15] - 32767 - (m3[14] >> 16 & 1);
          const b9 = m3[15] >> 16 & 1;
          m3[14] &= 65535;
          sel25519(t, m3, 1 - b9);
        }
        for (let i5 = 0; i5 < 16; i5++) {
          o5[2 * i5] = t[i5] & 255;
          o5[2 * i5 + 1] = t[i5] >> 8;
        }
      }
      function verify32(x13, y11) {
        let d6 = 0;
        for (let i5 = 0; i5 < 32; i5++) {
          d6 |= x13[i5] ^ y11[i5];
        }
        return (1 & d6 - 1 >>> 8) - 1;
      }
      function neq25519(a5, b9) {
        const c7 = new Uint8Array(32);
        const d6 = new Uint8Array(32);
        pack25519(c7, a5);
        pack25519(d6, b9);
        return verify32(c7, d6);
      }
      function par25519(a5) {
        const d6 = new Uint8Array(32);
        pack25519(d6, a5);
        return d6[0] & 1;
      }
      function unpack25519(o5, n6) {
        for (let i5 = 0; i5 < 16; i5++) {
          o5[i5] = n6[2 * i5] + (n6[2 * i5 + 1] << 8);
        }
        o5[15] &= 32767;
      }
      function add5(o5, a5, b9) {
        for (let i5 = 0; i5 < 16; i5++) {
          o5[i5] = a5[i5] + b9[i5];
        }
      }
      function sub(o5, a5, b9) {
        for (let i5 = 0; i5 < 16; i5++) {
          o5[i5] = a5[i5] - b9[i5];
        }
      }
      function mul3(o5, a5, b9) {
        let v13, c7, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b9[0], b1 = b9[1], b22 = b9[2], b32 = b9[3], b42 = b9[4], b52 = b9[5], b62 = b9[6], b72 = b9[7], b82 = b9[8], b92 = b9[9], b10 = b9[10], b11 = b9[11], b12 = b9[12], b13 = b9[13], b14 = b9[14], b15 = b9[15];
        v13 = a5[0];
        t0 += v13 * b0;
        t1 += v13 * b1;
        t2 += v13 * b22;
        t3 += v13 * b32;
        t4 += v13 * b42;
        t5 += v13 * b52;
        t6 += v13 * b62;
        t7 += v13 * b72;
        t8 += v13 * b82;
        t9 += v13 * b92;
        t10 += v13 * b10;
        t11 += v13 * b11;
        t12 += v13 * b12;
        t13 += v13 * b13;
        t14 += v13 * b14;
        t15 += v13 * b15;
        v13 = a5[1];
        t1 += v13 * b0;
        t2 += v13 * b1;
        t3 += v13 * b22;
        t4 += v13 * b32;
        t5 += v13 * b42;
        t6 += v13 * b52;
        t7 += v13 * b62;
        t8 += v13 * b72;
        t9 += v13 * b82;
        t10 += v13 * b92;
        t11 += v13 * b10;
        t12 += v13 * b11;
        t13 += v13 * b12;
        t14 += v13 * b13;
        t15 += v13 * b14;
        t16 += v13 * b15;
        v13 = a5[2];
        t2 += v13 * b0;
        t3 += v13 * b1;
        t4 += v13 * b22;
        t5 += v13 * b32;
        t6 += v13 * b42;
        t7 += v13 * b52;
        t8 += v13 * b62;
        t9 += v13 * b72;
        t10 += v13 * b82;
        t11 += v13 * b92;
        t12 += v13 * b10;
        t13 += v13 * b11;
        t14 += v13 * b12;
        t15 += v13 * b13;
        t16 += v13 * b14;
        t17 += v13 * b15;
        v13 = a5[3];
        t3 += v13 * b0;
        t4 += v13 * b1;
        t5 += v13 * b22;
        t6 += v13 * b32;
        t7 += v13 * b42;
        t8 += v13 * b52;
        t9 += v13 * b62;
        t10 += v13 * b72;
        t11 += v13 * b82;
        t12 += v13 * b92;
        t13 += v13 * b10;
        t14 += v13 * b11;
        t15 += v13 * b12;
        t16 += v13 * b13;
        t17 += v13 * b14;
        t18 += v13 * b15;
        v13 = a5[4];
        t4 += v13 * b0;
        t5 += v13 * b1;
        t6 += v13 * b22;
        t7 += v13 * b32;
        t8 += v13 * b42;
        t9 += v13 * b52;
        t10 += v13 * b62;
        t11 += v13 * b72;
        t12 += v13 * b82;
        t13 += v13 * b92;
        t14 += v13 * b10;
        t15 += v13 * b11;
        t16 += v13 * b12;
        t17 += v13 * b13;
        t18 += v13 * b14;
        t19 += v13 * b15;
        v13 = a5[5];
        t5 += v13 * b0;
        t6 += v13 * b1;
        t7 += v13 * b22;
        t8 += v13 * b32;
        t9 += v13 * b42;
        t10 += v13 * b52;
        t11 += v13 * b62;
        t12 += v13 * b72;
        t13 += v13 * b82;
        t14 += v13 * b92;
        t15 += v13 * b10;
        t16 += v13 * b11;
        t17 += v13 * b12;
        t18 += v13 * b13;
        t19 += v13 * b14;
        t20 += v13 * b15;
        v13 = a5[6];
        t6 += v13 * b0;
        t7 += v13 * b1;
        t8 += v13 * b22;
        t9 += v13 * b32;
        t10 += v13 * b42;
        t11 += v13 * b52;
        t12 += v13 * b62;
        t13 += v13 * b72;
        t14 += v13 * b82;
        t15 += v13 * b92;
        t16 += v13 * b10;
        t17 += v13 * b11;
        t18 += v13 * b12;
        t19 += v13 * b13;
        t20 += v13 * b14;
        t21 += v13 * b15;
        v13 = a5[7];
        t7 += v13 * b0;
        t8 += v13 * b1;
        t9 += v13 * b22;
        t10 += v13 * b32;
        t11 += v13 * b42;
        t12 += v13 * b52;
        t13 += v13 * b62;
        t14 += v13 * b72;
        t15 += v13 * b82;
        t16 += v13 * b92;
        t17 += v13 * b10;
        t18 += v13 * b11;
        t19 += v13 * b12;
        t20 += v13 * b13;
        t21 += v13 * b14;
        t22 += v13 * b15;
        v13 = a5[8];
        t8 += v13 * b0;
        t9 += v13 * b1;
        t10 += v13 * b22;
        t11 += v13 * b32;
        t12 += v13 * b42;
        t13 += v13 * b52;
        t14 += v13 * b62;
        t15 += v13 * b72;
        t16 += v13 * b82;
        t17 += v13 * b92;
        t18 += v13 * b10;
        t19 += v13 * b11;
        t20 += v13 * b12;
        t21 += v13 * b13;
        t22 += v13 * b14;
        t23 += v13 * b15;
        v13 = a5[9];
        t9 += v13 * b0;
        t10 += v13 * b1;
        t11 += v13 * b22;
        t12 += v13 * b32;
        t13 += v13 * b42;
        t14 += v13 * b52;
        t15 += v13 * b62;
        t16 += v13 * b72;
        t17 += v13 * b82;
        t18 += v13 * b92;
        t19 += v13 * b10;
        t20 += v13 * b11;
        t21 += v13 * b12;
        t22 += v13 * b13;
        t23 += v13 * b14;
        t24 += v13 * b15;
        v13 = a5[10];
        t10 += v13 * b0;
        t11 += v13 * b1;
        t12 += v13 * b22;
        t13 += v13 * b32;
        t14 += v13 * b42;
        t15 += v13 * b52;
        t16 += v13 * b62;
        t17 += v13 * b72;
        t18 += v13 * b82;
        t19 += v13 * b92;
        t20 += v13 * b10;
        t21 += v13 * b11;
        t22 += v13 * b12;
        t23 += v13 * b13;
        t24 += v13 * b14;
        t25 += v13 * b15;
        v13 = a5[11];
        t11 += v13 * b0;
        t12 += v13 * b1;
        t13 += v13 * b22;
        t14 += v13 * b32;
        t15 += v13 * b42;
        t16 += v13 * b52;
        t17 += v13 * b62;
        t18 += v13 * b72;
        t19 += v13 * b82;
        t20 += v13 * b92;
        t21 += v13 * b10;
        t22 += v13 * b11;
        t23 += v13 * b12;
        t24 += v13 * b13;
        t25 += v13 * b14;
        t26 += v13 * b15;
        v13 = a5[12];
        t12 += v13 * b0;
        t13 += v13 * b1;
        t14 += v13 * b22;
        t15 += v13 * b32;
        t16 += v13 * b42;
        t17 += v13 * b52;
        t18 += v13 * b62;
        t19 += v13 * b72;
        t20 += v13 * b82;
        t21 += v13 * b92;
        t22 += v13 * b10;
        t23 += v13 * b11;
        t24 += v13 * b12;
        t25 += v13 * b13;
        t26 += v13 * b14;
        t27 += v13 * b15;
        v13 = a5[13];
        t13 += v13 * b0;
        t14 += v13 * b1;
        t15 += v13 * b22;
        t16 += v13 * b32;
        t17 += v13 * b42;
        t18 += v13 * b52;
        t19 += v13 * b62;
        t20 += v13 * b72;
        t21 += v13 * b82;
        t22 += v13 * b92;
        t23 += v13 * b10;
        t24 += v13 * b11;
        t25 += v13 * b12;
        t26 += v13 * b13;
        t27 += v13 * b14;
        t28 += v13 * b15;
        v13 = a5[14];
        t14 += v13 * b0;
        t15 += v13 * b1;
        t16 += v13 * b22;
        t17 += v13 * b32;
        t18 += v13 * b42;
        t19 += v13 * b52;
        t20 += v13 * b62;
        t21 += v13 * b72;
        t22 += v13 * b82;
        t23 += v13 * b92;
        t24 += v13 * b10;
        t25 += v13 * b11;
        t26 += v13 * b12;
        t27 += v13 * b13;
        t28 += v13 * b14;
        t29 += v13 * b15;
        v13 = a5[15];
        t15 += v13 * b0;
        t16 += v13 * b1;
        t17 += v13 * b22;
        t18 += v13 * b32;
        t19 += v13 * b42;
        t20 += v13 * b52;
        t21 += v13 * b62;
        t22 += v13 * b72;
        t23 += v13 * b82;
        t24 += v13 * b92;
        t25 += v13 * b10;
        t26 += v13 * b11;
        t27 += v13 * b12;
        t28 += v13 * b13;
        t29 += v13 * b14;
        t30 += v13 * b15;
        t0 += 38 * t16;
        t1 += 38 * t17;
        t2 += 38 * t18;
        t3 += 38 * t19;
        t4 += 38 * t20;
        t5 += 38 * t21;
        t6 += 38 * t22;
        t7 += 38 * t23;
        t8 += 38 * t24;
        t9 += 38 * t25;
        t10 += 38 * t26;
        t11 += 38 * t27;
        t12 += 38 * t28;
        t13 += 38 * t29;
        t14 += 38 * t30;
        c7 = 1;
        v13 = t0 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t0 = v13 - c7 * 65536;
        v13 = t1 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t1 = v13 - c7 * 65536;
        v13 = t2 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t2 = v13 - c7 * 65536;
        v13 = t3 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t3 = v13 - c7 * 65536;
        v13 = t4 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t4 = v13 - c7 * 65536;
        v13 = t5 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t5 = v13 - c7 * 65536;
        v13 = t6 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t6 = v13 - c7 * 65536;
        v13 = t7 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t7 = v13 - c7 * 65536;
        v13 = t8 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t8 = v13 - c7 * 65536;
        v13 = t9 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t9 = v13 - c7 * 65536;
        v13 = t10 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t10 = v13 - c7 * 65536;
        v13 = t11 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t11 = v13 - c7 * 65536;
        v13 = t12 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t12 = v13 - c7 * 65536;
        v13 = t13 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t13 = v13 - c7 * 65536;
        v13 = t14 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t14 = v13 - c7 * 65536;
        v13 = t15 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t15 = v13 - c7 * 65536;
        t0 += c7 - 1 + 37 * (c7 - 1);
        c7 = 1;
        v13 = t0 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t0 = v13 - c7 * 65536;
        v13 = t1 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t1 = v13 - c7 * 65536;
        v13 = t2 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t2 = v13 - c7 * 65536;
        v13 = t3 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t3 = v13 - c7 * 65536;
        v13 = t4 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t4 = v13 - c7 * 65536;
        v13 = t5 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t5 = v13 - c7 * 65536;
        v13 = t6 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t6 = v13 - c7 * 65536;
        v13 = t7 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t7 = v13 - c7 * 65536;
        v13 = t8 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t8 = v13 - c7 * 65536;
        v13 = t9 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t9 = v13 - c7 * 65536;
        v13 = t10 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t10 = v13 - c7 * 65536;
        v13 = t11 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t11 = v13 - c7 * 65536;
        v13 = t12 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t12 = v13 - c7 * 65536;
        v13 = t13 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t13 = v13 - c7 * 65536;
        v13 = t14 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t14 = v13 - c7 * 65536;
        v13 = t15 + c7 + 65535;
        c7 = Math.floor(v13 / 65536);
        t15 = v13 - c7 * 65536;
        t0 += c7 - 1 + 37 * (c7 - 1);
        o5[0] = t0;
        o5[1] = t1;
        o5[2] = t2;
        o5[3] = t3;
        o5[4] = t4;
        o5[5] = t5;
        o5[6] = t6;
        o5[7] = t7;
        o5[8] = t8;
        o5[9] = t9;
        o5[10] = t10;
        o5[11] = t11;
        o5[12] = t12;
        o5[13] = t13;
        o5[14] = t14;
        o5[15] = t15;
      }
      function square(o5, a5) {
        mul3(o5, a5, a5);
      }
      function inv25519(o5, i5) {
        const c7 = gf();
        let a5;
        for (a5 = 0; a5 < 16; a5++) {
          c7[a5] = i5[a5];
        }
        for (a5 = 253; a5 >= 0; a5--) {
          square(c7, c7);
          if (a5 !== 2 && a5 !== 4) {
            mul3(c7, c7, i5);
          }
        }
        for (a5 = 0; a5 < 16; a5++) {
          o5[a5] = c7[a5];
        }
      }
      function pow2523(o5, i5) {
        const c7 = gf();
        let a5;
        for (a5 = 0; a5 < 16; a5++) {
          c7[a5] = i5[a5];
        }
        for (a5 = 250; a5 >= 0; a5--) {
          square(c7, c7);
          if (a5 !== 1) {
            mul3(c7, c7, i5);
          }
        }
        for (a5 = 0; a5 < 16; a5++) {
          o5[a5] = c7[a5];
        }
      }
      function edadd(p7, q7) {
        const a5 = gf(), b9 = gf(), c7 = gf(), d6 = gf(), e2 = gf(), f7 = gf(), g8 = gf(), h8 = gf(), t = gf();
        sub(a5, p7[1], p7[0]);
        sub(t, q7[1], q7[0]);
        mul3(a5, a5, t);
        add5(b9, p7[0], p7[1]);
        add5(t, q7[0], q7[1]);
        mul3(b9, b9, t);
        mul3(c7, p7[3], q7[3]);
        mul3(c7, c7, D22);
        mul3(d6, p7[2], q7[2]);
        add5(d6, d6, d6);
        sub(e2, b9, a5);
        sub(f7, d6, c7);
        add5(g8, d6, c7);
        add5(h8, b9, a5);
        mul3(p7[0], e2, f7);
        mul3(p7[1], h8, g8);
        mul3(p7[2], g8, f7);
        mul3(p7[3], e2, h8);
      }
      function cswap(p7, q7, b9) {
        for (let i5 = 0; i5 < 4; i5++) {
          sel25519(p7[i5], q7[i5], b9);
        }
      }
      function pack(r3, p7) {
        const tx = gf(), ty = gf(), zi2 = gf();
        inv25519(zi2, p7[2]);
        mul3(tx, p7[0], zi2);
        mul3(ty, p7[1], zi2);
        pack25519(r3, ty);
        r3[31] ^= par25519(tx) << 7;
      }
      function scalarmult(p7, q7, s3) {
        set25519(p7[0], gf0);
        set25519(p7[1], gf1);
        set25519(p7[2], gf1);
        set25519(p7[3], gf0);
        for (let i5 = 255; i5 >= 0; --i5) {
          const b9 = s3[i5 / 8 | 0] >> (i5 & 7) & 1;
          cswap(p7, q7, b9);
          edadd(q7, p7);
          edadd(p7, p7);
          cswap(p7, q7, b9);
        }
      }
      function scalarbase(p7, s3) {
        const q7 = [gf(), gf(), gf(), gf()];
        set25519(q7[0], X4);
        set25519(q7[1], Y6);
        set25519(q7[2], gf1);
        mul3(q7[3], X4, Y6);
        scalarmult(p7, q7, s3);
      }
      function generateKeyPairFromSeed2(seed) {
        if (seed.length !== exports.SEED_LENGTH) {
          throw new Error(`ed25519: seed must be ${exports.SEED_LENGTH} bytes`);
        }
        const d6 = (0, sha512_1.hash)(seed);
        d6[0] &= 248;
        d6[31] &= 127;
        d6[31] |= 64;
        const publicKey3 = new Uint8Array(32);
        const p7 = [gf(), gf(), gf(), gf()];
        scalarbase(p7, d6);
        pack(publicKey3, p7);
        const secretKey = new Uint8Array(64);
        secretKey.set(seed);
        secretKey.set(publicKey3, 32);
        return {
          publicKey: publicKey3,
          secretKey
        };
      }
      exports.generateKeyPairFromSeed = generateKeyPairFromSeed2;
      function generateKeyPair3(prng) {
        const seed = (0, random_1.randomBytes)(32, prng);
        const result = generateKeyPairFromSeed2(seed);
        (0, wipe_1.wipe)(seed);
        return result;
      }
      exports.generateKeyPair = generateKeyPair3;
      function extractPublicKeyFromSecretKey(secretKey) {
        if (secretKey.length !== exports.SECRET_KEY_LENGTH) {
          throw new Error(`ed25519: secret key must be ${exports.SECRET_KEY_LENGTH} bytes`);
        }
        return new Uint8Array(secretKey.subarray(32));
      }
      exports.extractPublicKeyFromSecretKey = extractPublicKeyFromSecretKey;
      var L6 = new Float64Array([
        237,
        211,
        245,
        92,
        26,
        99,
        18,
        88,
        214,
        156,
        247,
        162,
        222,
        249,
        222,
        20,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        16
      ]);
      function modL(r3, x13) {
        let carry;
        let i5;
        let j6;
        let k7;
        for (i5 = 63; i5 >= 32; --i5) {
          carry = 0;
          for (j6 = i5 - 32, k7 = i5 - 12; j6 < k7; ++j6) {
            x13[j6] += carry - 16 * x13[i5] * L6[j6 - (i5 - 32)];
            carry = Math.floor((x13[j6] + 128) / 256);
            x13[j6] -= carry * 256;
          }
          x13[j6] += carry;
          x13[i5] = 0;
        }
        carry = 0;
        for (j6 = 0; j6 < 32; j6++) {
          x13[j6] += carry - (x13[31] >> 4) * L6[j6];
          carry = x13[j6] >> 8;
          x13[j6] &= 255;
        }
        for (j6 = 0; j6 < 32; j6++) {
          x13[j6] -= carry * L6[j6];
        }
        for (i5 = 0; i5 < 32; i5++) {
          x13[i5 + 1] += x13[i5] >> 8;
          r3[i5] = x13[i5] & 255;
        }
      }
      function reduce(r3) {
        const x13 = new Float64Array(64);
        for (let i5 = 0; i5 < 64; i5++) {
          x13[i5] = r3[i5];
        }
        for (let i5 = 0; i5 < 64; i5++) {
          r3[i5] = 0;
        }
        modL(r3, x13);
      }
      function sign6(secretKey, message) {
        const x13 = new Float64Array(64);
        const p7 = [gf(), gf(), gf(), gf()];
        const d6 = (0, sha512_1.hash)(secretKey.subarray(0, 32));
        d6[0] &= 248;
        d6[31] &= 127;
        d6[31] |= 64;
        const signature2 = new Uint8Array(64);
        signature2.set(d6.subarray(32), 32);
        const hs = new sha512_1.SHA512();
        hs.update(signature2.subarray(32));
        hs.update(message);
        const r3 = hs.digest();
        hs.clean();
        reduce(r3);
        scalarbase(p7, r3);
        pack(signature2, p7);
        hs.reset();
        hs.update(signature2.subarray(0, 32));
        hs.update(secretKey.subarray(32));
        hs.update(message);
        const h8 = hs.digest();
        reduce(h8);
        for (let i5 = 0; i5 < 32; i5++) {
          x13[i5] = r3[i5];
        }
        for (let i5 = 0; i5 < 32; i5++) {
          for (let j6 = 0; j6 < 32; j6++) {
            x13[i5 + j6] += h8[i5] * d6[j6];
          }
        }
        modL(signature2.subarray(32), x13);
        return signature2;
      }
      exports.sign = sign6;
      function unpackneg(r3, p7) {
        const t = gf(), chk = gf(), num2 = gf(), den = gf(), den2 = gf(), den4 = gf(), den6 = gf();
        set25519(r3[2], gf1);
        unpack25519(r3[1], p7);
        square(num2, r3[1]);
        mul3(den, num2, D7);
        sub(num2, num2, r3[2]);
        add5(den, r3[2], den);
        square(den2, den);
        square(den4, den2);
        mul3(den6, den4, den2);
        mul3(t, den6, num2);
        mul3(t, t, den);
        pow2523(t, t);
        mul3(t, t, num2);
        mul3(t, t, den);
        mul3(t, t, den);
        mul3(r3[0], t, den);
        square(chk, r3[0]);
        mul3(chk, chk, den);
        if (neq25519(chk, num2)) {
          mul3(r3[0], r3[0], I7);
        }
        square(chk, r3[0]);
        mul3(chk, chk, den);
        if (neq25519(chk, num2)) {
          return -1;
        }
        if (par25519(r3[0]) === p7[31] >> 7) {
          sub(r3[0], gf0, r3[0]);
        }
        mul3(r3[3], r3[0], r3[1]);
        return 0;
      }
      function verify5(publicKey3, message, signature2) {
        const t = new Uint8Array(32);
        const p7 = [gf(), gf(), gf(), gf()];
        const q7 = [gf(), gf(), gf(), gf()];
        if (signature2.length !== exports.SIGNATURE_LENGTH) {
          throw new Error(`ed25519: signature must be ${exports.SIGNATURE_LENGTH} bytes`);
        }
        if (unpackneg(q7, publicKey3)) {
          return false;
        }
        const hs = new sha512_1.SHA512();
        hs.update(signature2.subarray(0, 32));
        hs.update(publicKey3);
        hs.update(message);
        const h8 = hs.digest();
        reduce(h8);
        scalarmult(p7, q7, h8);
        scalarbase(q7, signature2.subarray(32));
        edadd(p7, q7);
        pack(t, p7);
        if (verify32(signature2, t)) {
          return false;
        }
        return true;
      }
      exports.verify = verify5;
      function convertPublicKeyToX25519(publicKey3) {
        let q7 = [gf(), gf(), gf(), gf()];
        if (unpackneg(q7, publicKey3)) {
          throw new Error("Ed25519: invalid public key");
        }
        let a5 = gf();
        let b9 = gf();
        let y11 = q7[1];
        add5(a5, gf1, y11);
        sub(b9, gf1, y11);
        inv25519(b9, b9);
        mul3(a5, a5, b9);
        let z11 = new Uint8Array(32);
        pack25519(z11, a5);
        return z11;
      }
      exports.convertPublicKeyToX25519 = convertPublicKeyToX25519;
      function convertSecretKeyToX25519(secretKey) {
        const d6 = (0, sha512_1.hash)(secretKey.subarray(0, 32));
        d6[0] &= 248;
        d6[31] &= 127;
        d6[31] |= 64;
        const o5 = new Uint8Array(d6.subarray(0, 32));
        (0, wipe_1.wipe)(d6);
        return o5;
      }
      exports.convertSecretKeyToX25519 = convertSecretKeyToX25519;
    }
  });

  // ../../node_modules/.pnpm/unfetch@4.2.0/node_modules/unfetch/dist/unfetch.module.js
  var unfetch_module_exports = {};
  __export(unfetch_module_exports, {
    default: () => unfetch_module_default
  });
  function unfetch_module_default(e2, n6) {
    return n6 = n6 || {}, new Promise(function(t, r3) {
      var s3 = new XMLHttpRequest(), o5 = [], u4 = [], i5 = {}, a5 = function() {
        return { ok: 2 == (s3.status / 100 | 0), statusText: s3.statusText, status: s3.status, url: s3.responseURL, text: function() {
          return Promise.resolve(s3.responseText);
        }, json: function() {
          return Promise.resolve(s3.responseText).then(JSON.parse);
        }, blob: function() {
          return Promise.resolve(new Blob([s3.response]));
        }, clone: a5, headers: { keys: function() {
          return o5;
        }, entries: function() {
          return u4;
        }, get: function(e3) {
          return i5[e3.toLowerCase()];
        }, has: function(e3) {
          return e3.toLowerCase() in i5;
        } } };
      };
      for (var l6 in s3.open(n6.method || "get", e2, true), s3.onload = function() {
        s3.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(e3, n7, t2) {
          o5.push(n7 = n7.toLowerCase()), u4.push([n7, t2]), i5[n7] = i5[n7] ? i5[n7] + "," + t2 : t2;
        }), t(a5());
      }, s3.onerror = r3, s3.withCredentials = "include" == n6.credentials, n6.headers) s3.setRequestHeader(l6, n6.headers[l6]);
      s3.send(n6.body || null);
    });
  }
  var init_unfetch_module = __esm({
    "../../node_modules/.pnpm/unfetch@4.2.0/node_modules/unfetch/dist/unfetch.module.js"() {
      "use strict";
      init_node_compat_inject();
    }
  });

  // ../../node_modules/.pnpm/isomorphic-unfetch@3.1.0/node_modules/isomorphic-unfetch/browser.js
  var require_browser7 = __commonJS({
    "../../node_modules/.pnpm/isomorphic-unfetch@3.1.0/node_modules/isomorphic-unfetch/browser.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      module.exports = self.fetch || (self.fetch = (init_unfetch_module(), __toCommonJS(unfetch_module_exports)).default || (init_unfetch_module(), __toCommonJS(unfetch_module_exports)));
    }
  });

  // ../../node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.js
  var require_lodash = __commonJS({
    "../../node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.js"(exports, module) {
      "use strict";
      init_node_compat_inject();
      var LARGE_ARRAY_SIZE = 200;
      var HASH_UNDEFINED = "__lodash_hash_undefined__";
      var COMPARE_PARTIAL_FLAG = 1;
      var COMPARE_UNORDERED_FLAG = 2;
      var MAX_SAFE_INTEGER3 = 9007199254740991;
      var argsTag = "[object Arguments]";
      var arrayTag2 = "[object Array]";
      var asyncTag = "[object AsyncFunction]";
      var boolTag = "[object Boolean]";
      var dateTag2 = "[object Date]";
      var errorTag2 = "[object Error]";
      var funcTag = "[object Function]";
      var genTag = "[object GeneratorFunction]";
      var mapTag2 = "[object Map]";
      var numberTag2 = "[object Number]";
      var nullTag = "[object Null]";
      var objectTag2 = "[object Object]";
      var promiseTag = "[object Promise]";
      var proxyTag = "[object Proxy]";
      var regexpTag2 = "[object RegExp]";
      var setTag2 = "[object Set]";
      var stringTag2 = "[object String]";
      var symbolTag2 = "[object Symbol]";
      var undefinedTag = "[object Undefined]";
      var weakMapTag = "[object WeakMap]";
      var arrayBufferTag2 = "[object ArrayBuffer]";
      var dataViewTag2 = "[object DataView]";
      var float32Tag = "[object Float32Array]";
      var float64Tag = "[object Float64Array]";
      var int8Tag = "[object Int8Array]";
      var int16Tag = "[object Int16Array]";
      var int32Tag = "[object Int32Array]";
      var uint8Tag = "[object Uint8Array]";
      var uint8ClampedTag = "[object Uint8ClampedArray]";
      var uint16Tag = "[object Uint16Array]";
      var uint32Tag = "[object Uint32Array]";
      var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
      var reIsHostCtor = /^\[object .+?Constructor\]$/;
      var reIsUint = /^(?:0|[1-9]\d*)$/;
      var typedArrayTags = {};
      typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
      typedArrayTags[argsTag] = typedArrayTags[arrayTag2] = typedArrayTags[arrayBufferTag2] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag2] = typedArrayTags[dateTag2] = typedArrayTags[errorTag2] = typedArrayTags[funcTag] = typedArrayTags[mapTag2] = typedArrayTags[numberTag2] = typedArrayTags[objectTag2] = typedArrayTags[regexpTag2] = typedArrayTags[setTag2] = typedArrayTags[stringTag2] = typedArrayTags[weakMapTag] = false;
      var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
      var freeSelf = typeof self == "object" && self && self.Object === Object && self;
      var root = freeGlobal || freeSelf || Function("return this")();
      var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
      var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
      var moduleExports = freeModule && freeModule.exports === freeExports;
      var freeProcess = moduleExports && freeGlobal.process;
      var nodeUtil = (function() {
        try {
          return freeProcess && freeProcess.binding && freeProcess.binding("util");
        } catch (e2) {
        }
      })();
      var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
      function arrayFilter(array3, predicate) {
        var index2 = -1, length2 = array3 == null ? 0 : array3.length, resIndex = 0, result = [];
        while (++index2 < length2) {
          var value = array3[index2];
          if (predicate(value, index2, array3)) {
            result[resIndex++] = value;
          }
        }
        return result;
      }
      function arrayPush(array3, values) {
        var index2 = -1, length2 = values.length, offset2 = array3.length;
        while (++index2 < length2) {
          array3[offset2 + index2] = values[index2];
        }
        return array3;
      }
      function arraySome(array3, predicate) {
        var index2 = -1, length2 = array3 == null ? 0 : array3.length;
        while (++index2 < length2) {
          if (predicate(array3[index2], index2, array3)) {
            return true;
          }
        }
        return false;
      }
      function baseTimes(n6, iteratee) {
        var index2 = -1, result = Array(n6);
        while (++index2 < n6) {
          result[index2] = iteratee(index2);
        }
        return result;
      }
      function baseUnary(func) {
        return function(value) {
          return func(value);
        };
      }
      function cacheHas(cache, key2) {
        return cache.has(key2);
      }
      function getValue(object2, key2) {
        return object2 == null ? void 0 : object2[key2];
      }
      function mapToArray(map2) {
        var index2 = -1, result = Array(map2.size);
        map2.forEach(function(value, key2) {
          result[++index2] = [key2, value];
        });
        return result;
      }
      function overArg(func, transform2) {
        return function(arg) {
          return func(transform2(arg));
        };
      }
      function setToArray(set3) {
        var index2 = -1, result = Array(set3.size);
        set3.forEach(function(value) {
          result[++index2] = value;
        });
        return result;
      }
      var arrayProto = Array.prototype;
      var funcProto = Function.prototype;
      var objectProto = Object.prototype;
      var coreJsData = root["__core-js_shared__"];
      var funcToString = funcProto.toString;
      var hasOwnProperty = objectProto.hasOwnProperty;
      var maskSrcKey = (function() {
        var uid2 = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
        return uid2 ? "Symbol(src)_1." + uid2 : "";
      })();
      var nativeObjectToString = objectProto.toString;
      var reIsNative = RegExp(
        "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
      );
      var Buffer6 = moduleExports ? root.Buffer : void 0;
      var Symbol2 = root.Symbol;
      var Uint8Array2 = root.Uint8Array;
      var propertyIsEnumerable = objectProto.propertyIsEnumerable;
      var splice = arrayProto.splice;
      var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
      var nativeGetSymbols = Object.getOwnPropertySymbols;
      var nativeIsBuffer = Buffer6 ? Buffer6.isBuffer : void 0;
      var nativeKeys = overArg(Object.keys, Object);
      var DataView2 = getNative(root, "DataView");
      var Map2 = getNative(root, "Map");
      var Promise2 = getNative(root, "Promise");
      var Set2 = getNative(root, "Set");
      var WeakMap2 = getNative(root, "WeakMap");
      var nativeCreate = getNative(Object, "create");
      var dataViewCtorString = toSource(DataView2);
      var mapCtorString = toSource(Map2);
      var promiseCtorString = toSource(Promise2);
      var setCtorString = toSource(Set2);
      var weakMapCtorString = toSource(WeakMap2);
      var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
      var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
      function Hash3(entries) {
        var index2 = -1, length2 = entries == null ? 0 : entries.length;
        this.clear();
        while (++index2 < length2) {
          var entry = entries[index2];
          this.set(entry[0], entry[1]);
        }
      }
      function hashClear() {
        this.__data__ = nativeCreate ? nativeCreate(null) : {};
        this.size = 0;
      }
      function hashDelete(key2) {
        var result = this.has(key2) && delete this.__data__[key2];
        this.size -= result ? 1 : 0;
        return result;
      }
      function hashGet(key2) {
        var data = this.__data__;
        if (nativeCreate) {
          var result = data[key2];
          return result === HASH_UNDEFINED ? void 0 : result;
        }
        return hasOwnProperty.call(data, key2) ? data[key2] : void 0;
      }
      function hashHas(key2) {
        var data = this.__data__;
        return nativeCreate ? data[key2] !== void 0 : hasOwnProperty.call(data, key2);
      }
      function hashSet(key2, value) {
        var data = this.__data__;
        this.size += this.has(key2) ? 0 : 1;
        data[key2] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
        return this;
      }
      Hash3.prototype.clear = hashClear;
      Hash3.prototype["delete"] = hashDelete;
      Hash3.prototype.get = hashGet;
      Hash3.prototype.has = hashHas;
      Hash3.prototype.set = hashSet;
      function ListCache(entries) {
        var index2 = -1, length2 = entries == null ? 0 : entries.length;
        this.clear();
        while (++index2 < length2) {
          var entry = entries[index2];
          this.set(entry[0], entry[1]);
        }
      }
      function listCacheClear() {
        this.__data__ = [];
        this.size = 0;
      }
      function listCacheDelete(key2) {
        var data = this.__data__, index2 = assocIndexOf(data, key2);
        if (index2 < 0) {
          return false;
        }
        var lastIndex = data.length - 1;
        if (index2 == lastIndex) {
          data.pop();
        } else {
          splice.call(data, index2, 1);
        }
        --this.size;
        return true;
      }
      function listCacheGet(key2) {
        var data = this.__data__, index2 = assocIndexOf(data, key2);
        return index2 < 0 ? void 0 : data[index2][1];
      }
      function listCacheHas(key2) {
        return assocIndexOf(this.__data__, key2) > -1;
      }
      function listCacheSet(key2, value) {
        var data = this.__data__, index2 = assocIndexOf(data, key2);
        if (index2 < 0) {
          ++this.size;
          data.push([key2, value]);
        } else {
          data[index2][1] = value;
        }
        return this;
      }
      ListCache.prototype.clear = listCacheClear;
      ListCache.prototype["delete"] = listCacheDelete;
      ListCache.prototype.get = listCacheGet;
      ListCache.prototype.has = listCacheHas;
      ListCache.prototype.set = listCacheSet;
      function MapCache(entries) {
        var index2 = -1, length2 = entries == null ? 0 : entries.length;
        this.clear();
        while (++index2 < length2) {
          var entry = entries[index2];
          this.set(entry[0], entry[1]);
        }
      }
      function mapCacheClear() {
        this.size = 0;
        this.__data__ = {
          "hash": new Hash3(),
          "map": new (Map2 || ListCache)(),
          "string": new Hash3()
        };
      }
      function mapCacheDelete(key2) {
        var result = getMapData(this, key2)["delete"](key2);
        this.size -= result ? 1 : 0;
        return result;
      }
      function mapCacheGet(key2) {
        return getMapData(this, key2).get(key2);
      }
      function mapCacheHas(key2) {
        return getMapData(this, key2).has(key2);
      }
      function mapCacheSet(key2, value) {
        var data = getMapData(this, key2), size5 = data.size;
        data.set(key2, value);
        this.size += data.size == size5 ? 0 : 1;
        return this;
      }
      MapCache.prototype.clear = mapCacheClear;
      MapCache.prototype["delete"] = mapCacheDelete;
      MapCache.prototype.get = mapCacheGet;
      MapCache.prototype.has = mapCacheHas;
      MapCache.prototype.set = mapCacheSet;
      function SetCache(values) {
        var index2 = -1, length2 = values == null ? 0 : values.length;
        this.__data__ = new MapCache();
        while (++index2 < length2) {
          this.add(values[index2]);
        }
      }
      function setCacheAdd(value) {
        this.__data__.set(value, HASH_UNDEFINED);
        return this;
      }
      function setCacheHas(value) {
        return this.__data__.has(value);
      }
      SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
      SetCache.prototype.has = setCacheHas;
      function Stack(entries) {
        var data = this.__data__ = new ListCache(entries);
        this.size = data.size;
      }
      function stackClear() {
        this.__data__ = new ListCache();
        this.size = 0;
      }
      function stackDelete(key2) {
        var data = this.__data__, result = data["delete"](key2);
        this.size = data.size;
        return result;
      }
      function stackGet(key2) {
        return this.__data__.get(key2);
      }
      function stackHas(key2) {
        return this.__data__.has(key2);
      }
      function stackSet(key2, value) {
        var data = this.__data__;
        if (data instanceof ListCache) {
          var pairs = data.__data__;
          if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
            pairs.push([key2, value]);
            this.size = ++data.size;
            return this;
          }
          data = this.__data__ = new MapCache(pairs);
        }
        data.set(key2, value);
        this.size = data.size;
        return this;
      }
      Stack.prototype.clear = stackClear;
      Stack.prototype["delete"] = stackDelete;
      Stack.prototype.get = stackGet;
      Stack.prototype.has = stackHas;
      Stack.prototype.set = stackSet;
      function arrayLikeKeys(value, inherited) {
        var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length2 = result.length;
        for (var key2 in value) {
          if ((inherited || hasOwnProperty.call(value, key2)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
          (key2 == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
          isBuff && (key2 == "offset" || key2 == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
          isType && (key2 == "buffer" || key2 == "byteLength" || key2 == "byteOffset") || // Skip index properties.
          isIndex(key2, length2)))) {
            result.push(key2);
          }
        }
        return result;
      }
      function assocIndexOf(array3, key2) {
        var length2 = array3.length;
        while (length2--) {
          if (eq4(array3[length2][0], key2)) {
            return length2;
          }
        }
        return -1;
      }
      function baseGetAllKeys(object2, keysFunc, symbolsFunc) {
        var result = keysFunc(object2);
        return isArray(object2) ? result : arrayPush(result, symbolsFunc(object2));
      }
      function baseGetTag(value) {
        if (value == null) {
          return value === void 0 ? undefinedTag : nullTag;
        }
        return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
      }
      function baseIsArguments(value) {
        return isObjectLike(value) && baseGetTag(value) == argsTag;
      }
      function baseIsEqual(value, other, bitmask, customizer, stack) {
        if (value === other) {
          return true;
        }
        if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
          return value !== value && other !== other;
        }
        return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
      }
      function baseIsEqualDeep(object2, other, bitmask, customizer, equalFunc, stack) {
        var objIsArr = isArray(object2), othIsArr = isArray(other), objTag = objIsArr ? arrayTag2 : getTag2(object2), othTag = othIsArr ? arrayTag2 : getTag2(other);
        objTag = objTag == argsTag ? objectTag2 : objTag;
        othTag = othTag == argsTag ? objectTag2 : othTag;
        var objIsObj = objTag == objectTag2, othIsObj = othTag == objectTag2, isSameTag = objTag == othTag;
        if (isSameTag && isBuffer(object2)) {
          if (!isBuffer(other)) {
            return false;
          }
          objIsArr = true;
          objIsObj = false;
        }
        if (isSameTag && !objIsObj) {
          stack || (stack = new Stack());
          return objIsArr || isTypedArray(object2) ? equalArrays(object2, other, bitmask, customizer, equalFunc, stack) : equalByTag(object2, other, objTag, bitmask, customizer, equalFunc, stack);
        }
        if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
          var objIsWrapped = objIsObj && hasOwnProperty.call(object2, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
          if (objIsWrapped || othIsWrapped) {
            var objUnwrapped = objIsWrapped ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value() : other;
            stack || (stack = new Stack());
            return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
          }
        }
        if (!isSameTag) {
          return false;
        }
        stack || (stack = new Stack());
        return equalObjects(object2, other, bitmask, customizer, equalFunc, stack);
      }
      function baseIsNative(value) {
        if (!isObject3(value) || isMasked(value)) {
          return false;
        }
        var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
        return pattern.test(toSource(value));
      }
      function baseIsTypedArray(value) {
        return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
      }
      function baseKeys(object2) {
        if (!isPrototype(object2)) {
          return nativeKeys(object2);
        }
        var result = [];
        for (var key2 in Object(object2)) {
          if (hasOwnProperty.call(object2, key2) && key2 != "constructor") {
            result.push(key2);
          }
        }
        return result;
      }
      function equalArrays(array3, other, bitmask, customizer, equalFunc, stack) {
        var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array3.length, othLength = other.length;
        if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
          return false;
        }
        var stacked = stack.get(array3);
        if (stacked && stack.get(other)) {
          return stacked == other;
        }
        var index2 = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0;
        stack.set(array3, other);
        stack.set(other, array3);
        while (++index2 < arrLength) {
          var arrValue = array3[index2], othValue = other[index2];
          if (customizer) {
            var compared = isPartial ? customizer(othValue, arrValue, index2, other, array3, stack) : customizer(arrValue, othValue, index2, array3, other, stack);
          }
          if (compared !== void 0) {
            if (compared) {
              continue;
            }
            result = false;
            break;
          }
          if (seen) {
            if (!arraySome(other, function(othValue2, othIndex) {
              if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
                return seen.push(othIndex);
              }
            })) {
              result = false;
              break;
            }
          } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
            result = false;
            break;
          }
        }
        stack["delete"](array3);
        stack["delete"](other);
        return result;
      }
      function equalByTag(object2, other, tag, bitmask, customizer, equalFunc, stack) {
        switch (tag) {
          case dataViewTag2:
            if (object2.byteLength != other.byteLength || object2.byteOffset != other.byteOffset) {
              return false;
            }
            object2 = object2.buffer;
            other = other.buffer;
          case arrayBufferTag2:
            if (object2.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object2), new Uint8Array2(other))) {
              return false;
            }
            return true;
          case boolTag:
          case dateTag2:
          case numberTag2:
            return eq4(+object2, +other);
          case errorTag2:
            return object2.name == other.name && object2.message == other.message;
          case regexpTag2:
          case stringTag2:
            return object2 == other + "";
          case mapTag2:
            var convert = mapToArray;
          case setTag2:
            var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
            convert || (convert = setToArray);
            if (object2.size != other.size && !isPartial) {
              return false;
            }
            var stacked = stack.get(object2);
            if (stacked) {
              return stacked == other;
            }
            bitmask |= COMPARE_UNORDERED_FLAG;
            stack.set(object2, other);
            var result = equalArrays(convert(object2), convert(other), bitmask, customizer, equalFunc, stack);
            stack["delete"](object2);
            return result;
          case symbolTag2:
            if (symbolValueOf) {
              return symbolValueOf.call(object2) == symbolValueOf.call(other);
            }
        }
        return false;
      }
      function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {
        var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object2), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
        if (objLength != othLength && !isPartial) {
          return false;
        }
        var index2 = objLength;
        while (index2--) {
          var key2 = objProps[index2];
          if (!(isPartial ? key2 in other : hasOwnProperty.call(other, key2))) {
            return false;
          }
        }
        var stacked = stack.get(object2);
        if (stacked && stack.get(other)) {
          return stacked == other;
        }
        var result = true;
        stack.set(object2, other);
        stack.set(other, object2);
        var skipCtor = isPartial;
        while (++index2 < objLength) {
          key2 = objProps[index2];
          var objValue = object2[key2], othValue = other[key2];
          if (customizer) {
            var compared = isPartial ? customizer(othValue, objValue, key2, other, object2, stack) : customizer(objValue, othValue, key2, object2, other, stack);
          }
          if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
            result = false;
            break;
          }
          skipCtor || (skipCtor = key2 == "constructor");
        }
        if (result && !skipCtor) {
          var objCtor = object2.constructor, othCtor = other.constructor;
          if (objCtor != othCtor && ("constructor" in object2 && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
            result = false;
          }
        }
        stack["delete"](object2);
        stack["delete"](other);
        return result;
      }
      function getAllKeys(object2) {
        return baseGetAllKeys(object2, keys2, getSymbols2);
      }
      function getMapData(map2, key2) {
        var data = map2.__data__;
        return isKeyable(key2) ? data[typeof key2 == "string" ? "string" : "hash"] : data.map;
      }
      function getNative(object2, key2) {
        var value = getValue(object2, key2);
        return baseIsNative(value) ? value : void 0;
      }
      function getRawTag(value) {
        var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
        try {
          value[symToStringTag] = void 0;
          var unmasked = true;
        } catch (e2) {
        }
        var result = nativeObjectToString.call(value);
        if (unmasked) {
          if (isOwn) {
            value[symToStringTag] = tag;
          } else {
            delete value[symToStringTag];
          }
        }
        return result;
      }
      var getSymbols2 = !nativeGetSymbols ? stubArray : function(object2) {
        if (object2 == null) {
          return [];
        }
        object2 = Object(object2);
        return arrayFilter(nativeGetSymbols(object2), function(symbol2) {
          return propertyIsEnumerable.call(object2, symbol2);
        });
      };
      var getTag2 = baseGetTag;
      if (DataView2 && getTag2(new DataView2(new ArrayBuffer(1))) != dataViewTag2 || Map2 && getTag2(new Map2()) != mapTag2 || Promise2 && getTag2(Promise2.resolve()) != promiseTag || Set2 && getTag2(new Set2()) != setTag2 || WeakMap2 && getTag2(new WeakMap2()) != weakMapTag) {
        getTag2 = function(value) {
          var result = baseGetTag(value), Ctor = result == objectTag2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
          if (ctorString) {
            switch (ctorString) {
              case dataViewCtorString:
                return dataViewTag2;
              case mapCtorString:
                return mapTag2;
              case promiseCtorString:
                return promiseTag;
              case setCtorString:
                return setTag2;
              case weakMapCtorString:
                return weakMapTag;
            }
          }
          return result;
        };
      }
      function isIndex(value, length2) {
        length2 = length2 == null ? MAX_SAFE_INTEGER3 : length2;
        return !!length2 && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length2);
      }
      function isKeyable(value) {
        var type2 = typeof value;
        return type2 == "string" || type2 == "number" || type2 == "symbol" || type2 == "boolean" ? value !== "__proto__" : value === null;
      }
      function isMasked(func) {
        return !!maskSrcKey && maskSrcKey in func;
      }
      function isPrototype(value) {
        var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
        return value === proto;
      }
      function objectToString(value) {
        return nativeObjectToString.call(value);
      }
      function toSource(func) {
        if (func != null) {
          try {
            return funcToString.call(func);
          } catch (e2) {
          }
          try {
            return func + "";
          } catch (e2) {
          }
        }
        return "";
      }
      function eq4(value, other) {
        return value === other || value !== value && other !== other;
      }
      var isArguments = baseIsArguments(/* @__PURE__ */ (function() {
        return arguments;
      })()) ? baseIsArguments : function(value) {
        return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
      };
      var isArray = Array.isArray;
      function isArrayLike(value) {
        return value != null && isLength(value.length) && !isFunction(value);
      }
      var isBuffer = nativeIsBuffer || stubFalse;
      function isEqual3(value, other) {
        return baseIsEqual(value, other);
      }
      function isFunction(value) {
        if (!isObject3(value)) {
          return false;
        }
        var tag = baseGetTag(value);
        return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
      }
      function isLength(value) {
        return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER3;
      }
      function isObject3(value) {
        var type2 = typeof value;
        return value != null && (type2 == "object" || type2 == "function");
      }
      function isObjectLike(value) {
        return value != null && typeof value == "object";
      }
      var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
      function keys2(object2) {
        return isArrayLike(object2) ? arrayLikeKeys(object2) : baseKeys(object2);
      }
      function stubArray() {
        return [];
      }
      function stubFalse() {
        return false;
      }
      module.exports = isEqual3;
    }
  });

  // src/background/index.ts
  init_node_compat_inject();

  // src/background/node-globals.ts
  init_node_compat_inject();
  var import_buffer2 = __toESM(require_buffer(), 1);
  var globalWithNodeCompat2 = globalThis;
  if (!globalWithNodeCompat2.Buffer) {
    globalWithNodeCompat2.Buffer = import_buffer2.Buffer;
  }
  if (!globalWithNodeCompat2.global) {
    globalWithNodeCompat2.global = globalThis;
  }
  if (!globalWithNodeCompat2.process) {
    globalWithNodeCompat2.process = {
      env: {},
      version: "",
      browser: true
    };
  }

  // ../../packages/shared/src/index.ts
  init_node_compat_inject();

  // ../../packages/shared/src/chains.ts
  init_node_compat_inject();
  var DEFAULT_SOLANA_CHAIN_ID = 101;
  var DEFAULT_TRON_CHAIN_ID = "tron-mainnet";
  var DEFAULT_BITCOIN_CHAIN_ID = "bitcoin-mainnet";
  var DEFAULT_TON_CHAIN_ID = "ton-mainnet";
  var EVM_CHAINS = [
    {
      chainId: 1,
      family: "evm",
      name: "Ethereum",
      nativeSymbol: "ETH",
      rpcUrlEnv: "NEXT_PUBLIC_ETH_RPC_URL",
      blockExplorerUrl: "https://etherscan.io"
    },
    {
      chainId: 56,
      family: "evm",
      name: "BNB Smart Chain",
      nativeSymbol: "BNB",
      rpcUrlEnv: "NEXT_PUBLIC_BSC_RPC_URL",
      blockExplorerUrl: "https://bscscan.com"
    },
    {
      chainId: 137,
      family: "evm",
      name: "Polygon",
      nativeSymbol: "MATIC",
      rpcUrlEnv: "NEXT_PUBLIC_POLYGON_RPC_URL",
      blockExplorerUrl: "https://polygonscan.com"
    },
    {
      chainId: 42161,
      family: "evm",
      name: "Arbitrum One",
      nativeSymbol: "ETH",
      rpcUrlEnv: "NEXT_PUBLIC_ARBITRUM_RPC_URL",
      blockExplorerUrl: "https://arbiscan.io"
    },
    {
      chainId: 10,
      family: "evm",
      name: "Optimism",
      nativeSymbol: "ETH",
      rpcUrlEnv: "NEXT_PUBLIC_OPTIMISM_RPC_URL",
      blockExplorerUrl: "https://optimistic.etherscan.io"
    },
    {
      chainId: 8453,
      family: "evm",
      name: "Base",
      nativeSymbol: "ETH",
      rpcUrlEnv: "NEXT_PUBLIC_BASE_RPC_URL",
      blockExplorerUrl: "https://basescan.org"
    },
    {
      chainId: 43114,
      family: "evm",
      name: "Avalanche",
      nativeSymbol: "AVAX",
      rpcUrlEnv: "NEXT_PUBLIC_AVALANCHE_RPC_URL",
      blockExplorerUrl: "https://snowtrace.io"
    },
    {
      chainId: 59144,
      family: "evm",
      name: "Linea",
      nativeSymbol: "ETH",
      rpcUrlEnv: "NEXT_PUBLIC_LINEA_RPC_URL",
      blockExplorerUrl: "https://lineascan.build"
    },
    {
      chainId: 250,
      family: "evm",
      name: "Fantom",
      nativeSymbol: "FTM",
      rpcUrlEnv: "NEXT_PUBLIC_FANTOM_RPC_URL",
      blockExplorerUrl: "https://ftmscan.com"
    },
    {
      chainId: 1329,
      family: "evm",
      name: "Sei",
      nativeSymbol: "SEI",
      rpcUrlEnv: "NEXT_PUBLIC_SEI_RPC_URL",
      blockExplorerUrl: "https://seitrace.com"
    },
    {
      chainId: 204,
      family: "evm",
      name: "opBNB",
      nativeSymbol: "BNB",
      rpcUrlEnv: "NEXT_PUBLIC_OPBNB_RPC_URL",
      blockExplorerUrl: "https://opbnbscan.com"
    },
    {
      chainId: 324,
      family: "evm",
      name: "zkSync Era",
      nativeSymbol: "ETH",
      rpcUrlEnv: "NEXT_PUBLIC_ZKSYNC_RPC_URL",
      blockExplorerUrl: "https://era.zksync.network"
    }
  ];
  var SOLANA_MAINNET_CHAIN = {
    chainId: DEFAULT_SOLANA_CHAIN_ID,
    family: "solana",
    name: "Solana",
    network: "mainnet-beta",
    nativeSymbol: "SOL",
    rpcUrlEnv: "NEXT_PUBLIC_SOLANA_RPC_URL",
    blockExplorerUrl: "https://solscan.io"
  };
  var SOLANA_CHAINS = [SOLANA_MAINNET_CHAIN];
  var TRON_MAINNET_CHAIN = {
    family: "tron",
    chainId: DEFAULT_TRON_CHAIN_ID,
    name: "Tron",
    nativeSymbol: "TRX",
    rpcUrlEnv: "NEXT_PUBLIC_TRON_RPC_URL",
    blockExplorerUrl: "https://tronscan.org/#",
    isEnabled: true,
    isSkeleton: true
  };
  var BITCOIN_MAINNET_CHAIN = {
    family: "utxo",
    chainId: DEFAULT_BITCOIN_CHAIN_ID,
    name: "Bitcoin",
    nativeSymbol: "BTC",
    rpcUrlEnv: "NEXT_PUBLIC_BITCOIN_RPC_URL",
    blockExplorerUrl: "https://mempool.space",
    isEnabled: true,
    isSkeleton: true
  };
  var TON_MAINNET_CHAIN = {
    family: "ton",
    chainId: DEFAULT_TON_CHAIN_ID,
    name: "TON",
    nativeSymbol: "TON",
    rpcUrlEnv: "NEXT_PUBLIC_TON_RPC_URL",
    blockExplorerUrl: "https://tonscan.org",
    isEnabled: true,
    isSkeleton: true
  };
  var UNIVERSAL_CHAINS = [
    ...EVM_CHAINS.map((chain2) => ({
      family: "evm",
      chainId: chain2.chainId,
      name: chain2.name,
      nativeSymbol: chain2.nativeSymbol,
      rpcUrlEnv: chain2.rpcUrlEnv,
      blockExplorerUrl: chain2.blockExplorerUrl,
      isEnabled: true
    })),
    {
      family: SOLANA_MAINNET_CHAIN.family,
      chainId: SOLANA_MAINNET_CHAIN.chainId,
      name: SOLANA_MAINNET_CHAIN.name,
      nativeSymbol: SOLANA_MAINNET_CHAIN.nativeSymbol,
      rpcUrlEnv: SOLANA_MAINNET_CHAIN.rpcUrlEnv,
      blockExplorerUrl: SOLANA_MAINNET_CHAIN.blockExplorerUrl,
      network: SOLANA_MAINNET_CHAIN.network,
      isEnabled: true
    },
    TRON_MAINNET_CHAIN,
    BITCOIN_MAINNET_CHAIN,
    TON_MAINNET_CHAIN
  ];
  function getEvmChainConfig(chainId) {
    const chain2 = EVM_CHAINS.find((item) => item.chainId === chainId);
    if (!chain2) {
      throw new Error(`Unsupported EVM chain: ${chainId}`);
    }
    return chain2;
  }
  function getChainById(chainId) {
    return EVM_CHAINS.find((item) => item.chainId === chainId) ?? SOLANA_CHAINS.find((item) => item.chainId === chainId);
  }
  function getUniversalChain(input) {
    return UNIVERSAL_CHAINS.find(
      (chain2) => String(chain2.chainId) === String(input.chainId) && (!input.family || chain2.family === input.family)
    );
  }
  function getChainsByFamily(family) {
    if (family === "evm") {
      return EVM_CHAINS;
    }
    if (family === "solana") {
      return SOLANA_CHAINS;
    }
    return [];
  }
  function normalizeAddressForChain(chainId, address) {
    const trimmed = (address ?? "").trim();
    if (!trimmed) {
      return "";
    }
    const chain2 = typeof chainId === "number" ? getChainById(chainId) ?? getUniversalChain({ chainId }) : getUniversalChain({ chainId });
    return chain2?.family === "evm" ? trimmed.toLowerCase() : trimmed;
  }

  // ../../packages/shared/src/capabilities.ts
  init_node_compat_inject();

  // ../../packages/shared/src/dapp.ts
  init_node_compat_inject();
  var PREVIEW_DAPP_BRIDGE_ACCOUNT = "0x123400000000000000000000000000000000abcd";
  var PREVIEW_DAPP_BRIDGE_CHAIN_IDS = [1, 137, 8453];
  function createEmptyDappShellSnapshot() {
    return {
      proposals: [],
      sessions: [],
      pendingRequests: [],
      approvalResults: [],
      updatedAt: (/* @__PURE__ */ new Date()).toISOString()
    };
  }
  function buildDappProposalWarning(input) {
    if (input.transport === "walletconnect") {
      return input.providerMode === "wallet_backed" ? "Approve to expose the selected synced Acorus account to this WalletConnect pairing preview. The imported pairing secret is redacted immediately and never persisted. Live relay, signatures, and broadcast remain disabled." : "WalletConnect pairing preview only. The imported pairing secret is redacted immediately and never persisted. Accounts remain preview-backed, and live relay, signatures, and broadcast stay disabled.";
    }
    return input.providerMode === "wallet_backed" ? "The page-to-extension bridge is live, and the approved account now comes from the selected synced local Acorus wallet profile. Signing output and broadcast still remain disabled." : "The page-to-extension bridge is live, and request approval review can continue after connect. Approved accounts still remain preview-backed until wallet profile integration ships.";
  }
  function buildDappSessionWarning(input) {
    if (input.transport === "walletconnect") {
      return input.providerMode === "wallet_backed" ? "Approved in wallet-backed WalletConnect preview mode. The peer can see only the selected synced Acorus account after approval, while live relay, signatures, and broadcast remain disabled." : "Approved in preview-backed WalletConnect mode only. The pairing secret was redacted on import, and live relay, signatures, and broadcast remain disabled.";
    }
    return input.providerMode === "wallet_backed" ? "Approved in wallet-backed bridge mode. The site can now see the selected synced local Acorus account after approval, while real signing output and send execution remain disabled." : "Approved in preview-backed bridge mode only. Request review can continue after connect, but wallet-backed account exposure, real signing, and send execution remain disabled.";
  }
  function buildDappRequestWarning(input) {
    if (input.transport === "walletconnect") {
      return "WalletConnect session request preview only. The peer stays in review mode, and live relay, signatures, and broadcast remain disabled.";
    }
    return "Approval review is live, but the final signature or broadcast remains preview-only in this wave.";
  }
  function buildDappRequestSummary(input) {
    const subject = input.transport === "walletconnect" ? "WalletConnect peer" : "Connected site";
    const chainSuffix = input.chainId ? ` on chain ${input.chainId}` : "";
    switch (input.kind) {
      case "sign_message":
        return `${subject} requested a message signature preview${chainSuffix}.`;
      case "sign_typed_data":
        return `${subject} requested a typed data signature preview${chainSuffix}.`;
      case "sign_transaction":
        return `${subject} requested a transaction signature preview${chainSuffix}.`;
      case "send_transaction":
        return `${subject} requested a transaction broadcast preview${chainSuffix}.`;
      case "add_chain":
        return `${subject} requested a network add preview${chainSuffix}.`;
      case "watch_asset":
        return `${subject} requested a token watch preview${chainSuffix}.`;
      case "multichain_send":
        return `${subject} requested a multichain send preview${chainSuffix}.`;
      case "swap":
        return `${subject} requested a swap preview${chainSuffix}.`;
      default:
        return `${subject} requested a preview action${chainSuffix}.`;
    }
  }
  function parseWalletConnectPairingPreview(uri) {
    const trimmed = uri.trim();
    const match = /^wc:([^@]+)@([^?]+)\?(.*)$/i.exec(trimmed);
    if (!match) {
      throw new Error(
        "WalletConnect pairing URI must look like wc:<topic>@<version>?..."
      );
    }
    const topic = match[1];
    const version16 = match[2];
    const query = match[3];
    if (!topic || !version16 || query === void 0) {
      throw new Error("WalletConnect pairing URI is malformed.");
    }
    const params = new URLSearchParams(query);
    const symKey = params.get("symKey");
    if (!symKey) {
      throw new Error("WalletConnect pairing URI is missing symKey.");
    }
    const relayProtocol = params.get("relay-protocol");
    const topicPreview = topic.slice(0, 10);
    const relaySuffix = relayProtocol ? ` via ${relayProtocol}` : "";
    return {
      origin: `wc://${topicPreview}@${version16}`,
      title: `WalletConnect ${topicPreview}`,
      description: `Preview pairing shell for WalletConnect v${version16}${relaySuffix}. The imported pairing secret is redacted immediately and never persisted.`,
      topic,
      topicPreview,
      version: version16,
      relayProtocol
    };
  }
  function hasDappPermission(session, permission) {
    return session.permissions.includes(permission);
  }
  function getDappSessionActiveChainId(session) {
    return session.activeChainId ?? session.chainIds[0] ?? null;
  }
  function getActiveDappSession(snapshot, origin2) {
    return snapshot.sessions.find(
      (session) => session.origin.origin === origin2 && session.status === "active"
    ) ?? null;
  }
  function getPendingDappProposal(snapshot, origin2) {
    return snapshot.proposals.find(
      (proposal) => proposal.origin.origin === origin2 && proposal.status === "pending"
    ) ?? null;
  }
  function getPendingDappRequest(snapshot, requestId) {
    return snapshot.pendingRequests.find((item) => item.id === requestId) ?? null;
  }
  function getDappRequestPermissionScope(kind) {
    switch (kind) {
      case "sign_message":
        return "sign_message";
      case "sign_typed_data":
        return "sign_typed_data";
      case "sign_transaction":
        return "sign_transaction";
      case "send_transaction":
        return "send_transaction";
      case "add_chain":
        return "add_chain";
      case "watch_asset":
        return "watch_asset";
      case "multichain_send":
        return "multichain_send";
      case "swap":
        return "swap";
      case "connect":
      default:
        return "view_accounts";
    }
  }
  function createDappOriginMetadata(input) {
    const fallbackTitle = getHostnameLabel(input.origin);
    return {
      origin: input.origin,
      title: input.title ?? fallbackTitle,
      description: input.description ?? "Live extension bridge request in preview-backed mode.",
      trustLevel: input.trustLevel ?? "unknown"
    };
  }
  function ensureDappConnectionProposal(snapshot, input) {
    const existing = getPendingDappProposal(snapshot, input.origin);
    if (existing) {
      return {
        snapshot,
        proposal: existing,
        created: false
      };
    }
    const createdAt = (/* @__PURE__ */ new Date()).toISOString();
    const transport = input.transport ?? "injected";
    const providerMode = input.providerMode ?? "preview_accounts";
    const requestedAccounts = [...new Set(input.requestedAccounts ?? [PREVIEW_DAPP_BRIDGE_ACCOUNT])];
    const requestedChainIds = [...new Set(input.requestedChainIds ?? PREVIEW_DAPP_BRIDGE_CHAIN_IDS)];
    const requestedPermissions = [
      ...new Set(
        input.requestedPermissions ?? [
          "view_accounts",
          "view_chain",
          "switch_chain",
          "add_chain",
          "watch_asset",
          "multichain_send",
          "swap"
        ]
      )
    ];
    const proposal = {
      id: `proposal_${sanitizeOrigin(input.origin)}_${Date.now()}`,
      origin: createDappOriginMetadata({
        origin: input.origin,
        title: input.title,
        description: input.description,
        trustLevel: input.trustLevel
      }),
      transport,
      providerMode,
      requestedAccounts,
      requestedChainIds,
      requestedPermissions,
      status: "pending",
      warning: input.warning ?? buildDappProposalWarning({
        transport,
        providerMode
      }),
      createdAt
    };
    return {
      snapshot: {
        ...snapshot,
        proposals: [proposal, ...snapshot.proposals],
        updatedAt: createdAt
      },
      proposal,
      created: true
    };
  }
  function queueWalletConnectPairing(snapshot, input) {
    const pairing = parseWalletConnectPairingPreview(input.uri);
    const trimmedTitle = input.title?.trim();
    return ensureDappConnectionProposal(snapshot, {
      origin: pairing.origin,
      title: trimmedTitle && trimmedTitle.length > 0 ? trimmedTitle : pairing.title,
      description: pairing.description,
      trustLevel: "warning",
      transport: "walletconnect",
      providerMode: input.providerMode,
      requestedAccounts: input.requestedAccounts,
      requestedChainIds: input.requestedChainIds,
      requestedPermissions: input.requestedPermissions ?? [
        "view_accounts",
        "view_chain",
        "switch_chain",
        "add_chain",
        "watch_asset",
        "multichain_send",
        "swap",
        "sign_message",
        "sign_typed_data",
        "sign_transaction",
        "send_transaction"
      ],
      warning: input.warning ?? buildDappProposalWarning({
        transport: "walletconnect",
        providerMode: input.providerMode ?? "preview_accounts"
      })
    });
  }
  function queueDappRequest(snapshot, input) {
    const existing = getPendingDappRequest(snapshot, input.id);
    if (existing) {
      return {
        snapshot,
        request: existing,
        created: false
      };
    }
    const session = snapshot.sessions.find((item) => item.id === input.sessionId);
    const createdAt = (/* @__PURE__ */ new Date()).toISOString();
    const request = {
      id: input.id,
      sessionId: input.sessionId,
      kind: input.kind,
      transport: input.transport ?? session?.transport ?? "injected",
      origin: session?.origin ?? createDappOriginMetadata({ origin: input.origin }),
      account: input.account ?? null,
      chainId: input.chainId ?? null,
      requestedPermissions: input.requestedPermissions ?? [getDappRequestPermissionScope(input.kind)],
      summary: input.summary,
      status: "pending",
      createdAt,
      reviewDetails: input.reviewDetails ?? null,
      warning: input.warning ?? buildDappRequestWarning({
        transport: input.transport ?? session?.transport ?? "injected"
      })
    };
    return {
      snapshot: {
        ...snapshot,
        pendingRequests: [request, ...snapshot.pendingRequests],
        updatedAt: createdAt
      },
      request,
      created: true
    };
  }
  function queueSessionRequestPreview(snapshot, input) {
    const session = snapshot.sessions.find(
      (item) => item.id === input.sessionId && item.status === "active"
    );
    if (!session) {
      throw new Error("Active session was not found for this preview request.");
    }
    const resolvedChainId = input.chainId ?? getDappSessionActiveChainId(session);
    if (resolvedChainId && !session.chainIds.includes(resolvedChainId)) {
      throw new Error("Selected chain is not available for this session.");
    }
    const trimmedSummary = input.summary?.trim();
    return queueDappRequest(snapshot, {
      id: `request_${session.id}_${input.kind}_${Date.now()}`,
      sessionId: session.id,
      kind: input.kind,
      origin: session.origin.origin,
      transport: session.transport,
      account: session.accounts[0] ?? null,
      chainId: resolvedChainId,
      summary: trimmedSummary && trimmedSummary.length > 0 ? trimmedSummary : buildDappRequestSummary({
        transport: session.transport,
        kind: input.kind,
        chainId: resolvedChainId
      }),
      warning: input.warning ?? buildDappRequestWarning({
        transport: session.transport
      })
    });
  }
  function approveDappProposal(snapshot, proposalId) {
    const proposal = snapshot.proposals.find((item) => item.id === proposalId);
    if (!proposal) {
      return snapshot;
    }
    const decidedAt = (/* @__PURE__ */ new Date()).toISOString();
    const nextSession = {
      id: `session_${proposal.id}`,
      origin: proposal.origin,
      transport: proposal.transport,
      providerMode: proposal.providerMode,
      accounts: proposal.requestedAccounts,
      chainIds: proposal.requestedChainIds,
      activeChainId: proposal.requestedChainIds[0] ?? null,
      permissions: proposal.requestedPermissions,
      status: "active",
      connectedAt: decidedAt,
      lastUsedAt: null,
      warning: buildDappSessionWarning({
        transport: proposal.transport,
        providerMode: proposal.providerMode
      })
    };
    return {
      proposals: snapshot.proposals.filter((item) => item.id !== proposalId),
      sessions: [nextSession, ...snapshot.sessions],
      pendingRequests: snapshot.pendingRequests,
      approvalResults: [
        createApprovalResult({
          targetKind: "proposal",
          targetId: proposalId,
          decision: "approved",
          decidedAt
        }),
        ...snapshot.approvalResults
      ],
      updatedAt: decidedAt
    };
  }
  function rejectDappProposal(snapshot, proposalId, reason) {
    if (!snapshot.proposals.some((item) => item.id === proposalId)) {
      return snapshot;
    }
    const decidedAt = (/* @__PURE__ */ new Date()).toISOString();
    return {
      proposals: snapshot.proposals.filter((item) => item.id !== proposalId),
      sessions: snapshot.sessions,
      pendingRequests: snapshot.pendingRequests,
      approvalResults: [
        createApprovalResult({
          targetKind: "proposal",
          targetId: proposalId,
          decision: "rejected",
          reason: reason ?? "Rejected in preview shell.",
          decidedAt
        }),
        ...snapshot.approvalResults
      ],
      updatedAt: decidedAt
    };
  }
  function approveDappRequest(snapshot, requestId) {
    const request = snapshot.pendingRequests.find((item) => item.id === requestId);
    if (!request) {
      return snapshot;
    }
    const decidedAt = (/* @__PURE__ */ new Date()).toISOString();
    return {
      proposals: snapshot.proposals,
      sessions: snapshot.sessions.map(
        (session) => session.id === request.sessionId ? {
          ...session,
          lastUsedAt: decidedAt
        } : session
      ),
      pendingRequests: snapshot.pendingRequests.filter((item) => item.id !== requestId),
      approvalResults: [
        createApprovalResult({
          targetKind: "request",
          targetId: requestId,
          decision: "approved",
          decidedAt
        }),
        ...snapshot.approvalResults
      ],
      updatedAt: decidedAt
    };
  }
  function rejectDappRequest(snapshot, requestId, reason) {
    if (!snapshot.pendingRequests.some((item) => item.id === requestId)) {
      return snapshot;
    }
    const decidedAt = (/* @__PURE__ */ new Date()).toISOString();
    return {
      proposals: snapshot.proposals,
      sessions: snapshot.sessions,
      pendingRequests: snapshot.pendingRequests.filter((item) => item.id !== requestId),
      approvalResults: [
        createApprovalResult({
          targetKind: "request",
          targetId: requestId,
          decision: "rejected",
          reason: reason ?? "Rejected in preview shell.",
          decidedAt
        }),
        ...snapshot.approvalResults
      ],
      updatedAt: decidedAt
    };
  }
  function revokeDappSession(snapshot, sessionId) {
    if (!snapshot.sessions.some((item) => item.id === sessionId)) {
      return snapshot;
    }
    const decidedAt = (/* @__PURE__ */ new Date()).toISOString();
    return {
      proposals: snapshot.proposals,
      sessions: snapshot.sessions.map(
        (session) => session.id === sessionId ? {
          ...session,
          status: "revoked"
        } : session
      ),
      pendingRequests: snapshot.pendingRequests.filter(
        (request) => request.sessionId !== sessionId
      ),
      approvalResults: [
        createApprovalResult({
          targetKind: "session",
          targetId: sessionId,
          decision: "rejected",
          reason: "Session revoked in preview shell.",
          decidedAt
        }),
        ...snapshot.approvalResults
      ],
      updatedAt: decidedAt
    };
  }
  function touchDappSession(snapshot, sessionId) {
    if (!snapshot.sessions.some((item) => item.id === sessionId)) {
      return snapshot;
    }
    const touchedAt = (/* @__PURE__ */ new Date()).toISOString();
    return {
      ...snapshot,
      sessions: snapshot.sessions.map(
        (session) => session.id === sessionId ? {
          ...session,
          lastUsedAt: touchedAt
        } : session
      ),
      updatedAt: touchedAt
    };
  }
  function setDappSessionActiveChain(snapshot, sessionId, chainId) {
    if (!snapshot.sessions.some((item) => item.id === sessionId)) {
      return snapshot;
    }
    const updatedAt = (/* @__PURE__ */ new Date()).toISOString();
    return {
      ...snapshot,
      sessions: snapshot.sessions.map(
        (session) => session.id === sessionId ? {
          ...session,
          activeChainId: chainId,
          lastUsedAt: updatedAt
        } : session
      ),
      updatedAt
    };
  }
  function createDappBridgeSessionView(snapshot, origin2) {
    const activeSession = getActiveDappSession(snapshot, origin2);
    if (activeSession) {
      return {
        origin: origin2,
        status: "connected",
        providerMode: activeSession.providerMode,
        sessionId: activeSession.id,
        proposalId: null,
        accounts: activeSession.accounts,
        chainIds: activeSession.chainIds,
        activeChainId: getDappSessionActiveChainId(activeSession),
        permissions: activeSession.permissions,
        warning: activeSession.warning ?? buildDappSessionWarning({
          transport: activeSession.transport,
          providerMode: activeSession.providerMode
        }),
        updatedAt: snapshot.updatedAt
      };
    }
    const pendingProposal = getPendingDappProposal(snapshot, origin2);
    if (pendingProposal) {
      return {
        origin: origin2,
        status: "approval_required",
        providerMode: pendingProposal.providerMode,
        sessionId: null,
        proposalId: pendingProposal.id,
        accounts: pendingProposal.requestedAccounts,
        chainIds: pendingProposal.requestedChainIds,
        activeChainId: pendingProposal.requestedChainIds[0] ?? null,
        permissions: pendingProposal.requestedPermissions,
        warning: pendingProposal.warning ?? buildDappProposalWarning({
          transport: pendingProposal.transport,
          providerMode: pendingProposal.providerMode
        }),
        updatedAt: snapshot.updatedAt
      };
    }
    return {
      origin: origin2,
      status: "disconnected",
      providerMode: "stub_only",
      sessionId: null,
      proposalId: null,
      accounts: [],
      chainIds: [],
      activeChainId: null,
      permissions: [],
      warning: "No live session exists for this origin yet. The site must request approval first.",
      updatedAt: snapshot.updatedAt
    };
  }
  function createApprovedPreviewDappResult(request, approvedAt) {
    return {
      requestId: request.id,
      kind: request.kind,
      status: "approved_preview",
      account: request.account ?? null,
      chainId: request.chainId ?? null,
      summary: request.summary,
      warning: request.warning ?? "Approved in preview mode only. No real signature or broadcast was produced.",
      approvedAt,
      signature: null,
      transactionHash: null
    };
  }
  function createApprovalResult(input) {
    return {
      id: `approval_${input.targetKind}_${input.targetId}_${Date.now()}`,
      targetKind: input.targetKind,
      targetId: input.targetId,
      decision: input.decision,
      decidedAt: input.decidedAt,
      reason: input.reason ?? null
    };
  }
  function getHostnameLabel(origin2) {
    try {
      const url2 = new URL(origin2);
      const host = url2.hostname.replace(/^www\./, "");
      if (!host) {
        return "Unknown dApp";
      }
      return host.split(".").filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
    } catch {
      return "Unknown dApp";
    }
  }
  function sanitizeOrigin(origin2) {
    return origin2.replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "");
  }

  // ../../packages/shared/src/evm-swap.ts
  init_node_compat_inject();

  // ../../packages/shared/src/tokens.ts
  init_node_compat_inject();
  var CURATED_TOKENS = [
    {
      chainId: 1,
      address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
      symbol: "USDT",
      name: "Tether USD",
      decimals: 6,
      logoUrl: null,
      verified: true
    },
    {
      chainId: 1,
      address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      symbol: "USDC",
      name: "USD Coin",
      decimals: 6,
      logoUrl: null,
      verified: true
    },
    {
      chainId: 56,
      address: "0x55d398326f99059fF775485246999027B3197955",
      symbol: "USDT",
      name: "Tether USD",
      decimals: 18,
      logoUrl: null,
      verified: true
    },
    {
      chainId: 56,
      address: "0x8ac76a51cc950d9822D68b83fE1Ad97B32Cd580d",
      symbol: "USDC",
      name: "USD Coin",
      decimals: 18,
      logoUrl: null,
      verified: true
    },
    {
      chainId: 42161,
      address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      symbol: "USDC",
      name: "USD Coin",
      decimals: 6,
      logoUrl: null,
      verified: true
    },
    {
      chainId: 42161,
      address: "0xFd086bC7CD5C481DCC9C85ebe478A1C0b69FCbb9",
      symbol: "USDT",
      name: "Tether USD",
      decimals: 6,
      logoUrl: null,
      verified: true
    },
    {
      chainId: 10,
      address: "0x0b2C639c533813f4Aa9D7837CaF62653d097Ff85",
      symbol: "USDC",
      name: "USD Coin",
      decimals: 6,
      logoUrl: null,
      verified: true
    },
    {
      chainId: 10,
      address: "0x94b008aA00579c1307B0EF2C499aD98a8Ce58e58",
      symbol: "USDT",
      name: "Tether USD",
      decimals: 6,
      logoUrl: null,
      verified: true
    },
    {
      chainId: 8453,
      address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bDA02913",
      symbol: "USDC",
      name: "USD Coin",
      decimals: 6,
      logoUrl: null,
      verified: true
    },
    {
      chainId: 101,
      address: "Es9vMFrzaCERmJfrF4H2FYD4KCo6b7mLK6fJd6FLy1i",
      symbol: "USDT",
      name: "Tether USD",
      decimals: 6,
      logoUrl: null,
      verified: true
    },
    {
      chainId: 101,
      address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      symbol: "USDC",
      name: "USD Coin",
      decimals: 6,
      logoUrl: null,
      verified: true
    },
    {
      chainId: 101,
      address: "So11111111111111111111111111111111111111112",
      symbol: "WSOL",
      name: "Wrapped SOL",
      decimals: 9,
      logoUrl: null,
      verified: true
    },
    { chainId: 1, address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", symbol: "WETH", name: "Wrapped Ether", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0x6B175474E89094C44Da98b954EedeAC495271d0F", symbol: "DAI", name: "Dai Stablecoin", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", symbol: "UNI", name: "Uniswap", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", symbol: "WBTC", name: "Wrapped Bitcoin", decimals: 8, logoUrl: null, verified: true },
    { chainId: 1, address: "0x514910771AF9Ca656af840dff83E8264EcF986CA", symbol: "LINK", name: "Chainlink", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0x6982508145454Ce325dDbE47a25d4ec3d2311933", symbol: "PEPE", name: "Pepe", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", symbol: "AAVE", name: "Aave", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32", symbol: "LDO", name: "Lido DAO", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE", symbol: "SHIB", name: "Shiba Inu", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0x57e114B691Db790C35207b2e685D4A43181e6061", symbol: "ENA", name: "Ethena", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0xD533a949740bb3306d119CC777fa900bA034cd52", symbol: "CRV", name: "Curve DAO", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0x808507121B80c02388fAd14726482e061B8da827", symbol: "PENDLE", name: "Pendle", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0xfAbA6f8e4a5E8Ab82F62fe7C39859FA577269BE3", symbol: "ONDO", name: "Ondo", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0xA35923162C49cF95e6BF26623385eb431ad920D3", symbol: "TURBO", name: "Turbo", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0x818Ba3343A1c4E34Ce0787e65F76239f804595E2", symbol: "NEIRO", name: "Neiro", decimals: 18, logoUrl: null, verified: true },
    { chainId: 1, address: "0xcf0C122c6b73ff809C693DB761e7BebEbe0aB1a8", symbol: "FLOKI", name: "FLOKI", decimals: 18, logoUrl: null, verified: true },
    { chainId: 56, address: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", symbol: "WBNB", name: "Wrapped BNB", decimals: 18, logoUrl: null, verified: true },
    { chainId: 56, address: "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82", symbol: "CAKE", name: "PancakeSwap", decimals: 18, logoUrl: null, verified: true },
    { chainId: 137, address: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", symbol: "USDC.e", name: "USD Coin", decimals: 6, logoUrl: null, verified: true },
    { chainId: 137, address: "0xc2132D05D31c914a87C6611C10748AEb04B58e8F", symbol: "USDT", name: "Tether USD", decimals: 6, logoUrl: null, verified: true },
    { chainId: 137, address: "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619", symbol: "WETH", name: "Wrapped Ether", decimals: 18, logoUrl: null, verified: true },
    { chainId: 137, address: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6", symbol: "WBTC", name: "Wrapped Bitcoin", decimals: 8, logoUrl: null, verified: true },
    { chainId: 42161, address: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", symbol: "WETH", name: "Wrapped Ether", decimals: 18, logoUrl: null, verified: true },
    { chainId: 42161, address: "0x912CE59144191C1204E64559FE8253a0e49E6548", symbol: "ARB", name: "Arbitrum", decimals: 18, logoUrl: null, verified: true },
    { chainId: 42161, address: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", symbol: "WBTC", name: "Wrapped Bitcoin", decimals: 8, logoUrl: null, verified: true },
    { chainId: 10, address: "0x4200000000000000000000000000000000000006", symbol: "WETH", name: "Wrapped Ether", decimals: 18, logoUrl: null, verified: true },
    { chainId: 10, address: "0x4200000000000000000000000000000000000042", symbol: "OP", name: "Optimism", decimals: 18, logoUrl: null, verified: true },
    { chainId: 8453, address: "0x4200000000000000000000000000000000000006", symbol: "WETH", name: "Wrapped Ether", decimals: 18, logoUrl: null, verified: true },
    { chainId: 8453, address: "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2", symbol: "USDT", name: "Tether USD", decimals: 6, logoUrl: null, verified: true },
    { chainId: 8453, address: "0xacFe6019Ed1A7Dc6f7B508C02d1b04ec88cC21bf", symbol: "VVV", name: "Venice Token", decimals: 18, logoUrl: null, verified: true },
    { chainId: 8453, address: "0x940181a94A35A4569E4529A3CDfB74e38FD98631", symbol: "AERO", name: "Aerodrome", decimals: 18, logoUrl: null, verified: true },
    { chainId: 8453, address: "0x4ed4E862860beD7a9570b96d89aF5E1B0Efefed3", symbol: "DEGEN", name: "Degen", decimals: 18, logoUrl: null, verified: true },
    { chainId: 8453, address: "0x532f27101965dd16442E59d40670FaF5eBB142E4", symbol: "BRETT", name: "Brett", decimals: 18, logoUrl: null, verified: true },
    { chainId: 8453, address: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf", symbol: "cbBTC", name: "Coinbase Wrapped BTC", decimals: 8, logoUrl: null, verified: true },
    { chainId: 43114, address: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", symbol: "WAVAX", name: "Wrapped AVAX", decimals: 18, logoUrl: null, verified: true },
    { chainId: 43114, address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", symbol: "USDC", name: "USD Coin", decimals: 6, logoUrl: null, verified: true },
    { chainId: 43114, address: "0x9702230A8Ea53601f5cD2dc00fDBC13d4dF4A8c7", symbol: "USDT", name: "Tether USD", decimals: 6, logoUrl: null, verified: true },
    { chainId: 59144, address: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5CF34f", symbol: "WETH", name: "Wrapped Ether", decimals: 18, logoUrl: null, verified: true },
    { chainId: 59144, address: "0x176211869cA2b568f2A7D4EE941E073a821EE1ff", symbol: "USDC", name: "USD Coin", decimals: 6, logoUrl: null, verified: true },
    { chainId: "tron-mainnet", address: "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", symbol: "USDT", name: "Tether USD", decimals: 6, logoUrl: null, verified: true }
  ];
  function getCuratedTokens(chainId) {
    return CURATED_TOKENS.filter((item) => item.chainId === chainId);
  }

  // ../../packages/shared/src/evm-swap.ts
  function formatEvmTokenAmount(raw, decimals) {
    if (!/^[0-9]+$/u.test(raw)) {
      throw new Error("Invalid raw amount.");
    }
    if (!Number.isInteger(decimals) || decimals < 0 || decimals > 30) {
      throw new Error("Invalid token decimals.");
    }
    const value = BigInt(raw);
    const base4 = 10n ** BigInt(decimals);
    const whole = value / base4;
    const fraction = value % base4;
    const fractionText = fraction.toString().padStart(decimals, "0").replace(/0+$/u, "");
    return fractionText ? `${whole.toString()}.${fractionText}` : whole.toString();
  }
  function shortenFormattedEvmTokenAmount(raw, decimals, maxFractionDigits = 6) {
    const formatted = formatEvmTokenAmount(raw, decimals);
    const [wholePart = "0", fractionPart] = formatted.split(".");
    if (!fractionPart || maxFractionDigits < 0) {
      return formatted;
    }
    const trimmedFraction = fractionPart.slice(0, maxFractionDigits).replace(/0+$/u, "");
    return trimmedFraction ? `${wholePart}.${trimmedFraction}` : wholePart;
  }

  // ../../packages/shared/src/explore.ts
  init_node_compat_inject();

  // ../../packages/shared/src/market.ts
  init_node_compat_inject();

  // ../../packages/shared/src/multichain.ts
  init_node_compat_inject();

  // ../../packages/shared/src/practice.ts
  init_node_compat_inject();

  // ../../packages/shared/src/types.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/index.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/adapters/index.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/adapters/types.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/adapters/registry.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/adapters/evm-adapter.ts
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/getAction.js
  init_node_compat_inject();
  function getAction(client, actionFn, name2) {
    const action_implicit = client[actionFn.name];
    if (typeof action_implicit === "function")
      return action_implicit;
    const action_explicit = client[name2];
    if (typeof action_explicit === "function")
      return action_explicit;
    return (params) => actionFn(client, params);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/createContractEventFilter.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/encodeEventTopics.js
  init_node_compat_inject();
  init_abi();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/log.js
  init_node_compat_inject();
  init_base();
  var FilterTypeNotSupportedError = class extends BaseError2 {
    constructor(type2) {
      super(`Filter type "${type2}" is not supported.`, {
        name: "FilterTypeNotSupportedError"
      });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/encodeEventTopics.js
  init_toBytes();
  init_keccak256();
  init_toEventSelector();
  init_encodeAbiParameters();
  init_formatAbiItem2();
  init_getAbiItem();
  var docsPath = "/docs/contract/encodeEventTopics";
  function encodeEventTopics(parameters) {
    const { abi: abi2, eventName, args } = parameters;
    let abiItem = abi2[0];
    if (eventName) {
      const item = getAbiItem({ abi: abi2, name: eventName });
      if (!item)
        throw new AbiEventNotFoundError(eventName, { docsPath });
      abiItem = item;
    }
    if (abiItem.type !== "event")
      throw new AbiEventNotFoundError(void 0, { docsPath });
    const definition = formatAbiItem2(abiItem);
    const signature2 = toEventSelector(definition);
    let topics = [];
    if (args && "inputs" in abiItem) {
      const indexedInputs = abiItem.inputs?.filter((param) => "indexed" in param && param.indexed);
      const args_ = Array.isArray(args) ? args : Object.values(args).length > 0 ? indexedInputs?.map((x13) => args[x13.name]) ?? [] : [];
      if (args_.length > 0) {
        topics = indexedInputs?.map((param, i5) => {
          if (Array.isArray(args_[i5]))
            return args_[i5].map((_6, j6) => encodeArg({ param, value: args_[i5][j6] }));
          return typeof args_[i5] !== "undefined" && args_[i5] !== null ? encodeArg({ param, value: args_[i5] }) : null;
        }) ?? [];
      }
    }
    return [signature2, ...topics];
  }
  function encodeArg({ param, value }) {
    if (param.type === "string" || param.type === "bytes")
      return keccak256(toBytes(value));
    if (param.type === "tuple" || param.type.match(/^(.*)\[(\d+)?\]$/))
      throw new FilterTypeNotSupportedError(param.type);
    return encodeAbiParameters([param], [value]);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/createContractEventFilter.js
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js
  init_node_compat_inject();
  function createFilterRequestScope(client, { method }) {
    const requestMap = {};
    if (client.transport.type === "fallback")
      client.transport.onResponse?.(({ method: method_, response: id, status, transport }) => {
        if (status === "success" && method === method_)
          requestMap[id] = transport.request;
      });
    return ((id) => requestMap[id] || client.request);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/createContractEventFilter.js
  async function createContractEventFilter(client, parameters) {
    const { address, abi: abi2, args, eventName, fromBlock, strict, toBlock } = parameters;
    const getRequest = createFilterRequestScope(client, {
      method: "eth_newFilter"
    });
    const topics = eventName ? encodeEventTopics({
      abi: abi2,
      args,
      eventName
    }) : void 0;
    const id = await client.request({
      method: "eth_newFilter",
      params: [
        {
          address,
          fromBlock: typeof fromBlock === "bigint" ? numberToHex(fromBlock) : fromBlock,
          toBlock: typeof toBlock === "bigint" ? numberToHex(toBlock) : toBlock,
          topics
        }
      ]
    });
    return {
      abi: abi2,
      args,
      eventName,
      id,
      request: getRequest(id),
      strict: Boolean(strict),
      type: "event"
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/estimateContractGas.js
  init_node_compat_inject();
  init_parseAccount();
  init_encodeFunctionData();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/errors/getContractError.js
  init_node_compat_inject();
  init_abi();
  init_base();
  init_contract();
  init_request();
  init_rpc();
  var EXECUTION_REVERTED_ERROR_CODE = 3;
  function getContractError(err2, { abi: abi2, address, args, docsPath: docsPath8, functionName, sender }) {
    const error51 = err2 instanceof RawContractError ? err2 : err2 instanceof BaseError2 ? err2.walk((err3) => "data" in err3) || err2.walk() : {};
    const { code: code2, data, details, message, shortMessage } = error51;
    const cause = (() => {
      if (err2 instanceof AbiDecodingZeroDataError)
        return new ContractFunctionZeroDataError({ functionName, cause: err2 });
      if ([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code2) && (data || details || message || shortMessage) || code2 === InvalidInputRpcError.code && details === "execution reverted" && data) {
        return new ContractFunctionRevertedError({
          abi: abi2,
          data: typeof data === "object" ? data.data : data,
          functionName,
          message: error51 instanceof RpcRequestError ? details : shortMessage ?? message,
          cause: err2
        });
      }
      return err2;
    })();
    return new ContractFunctionExecutionError(cause, {
      abi: abi2,
      args,
      contractAddress: address,
      docsPath: docsPath8,
      functionName,
      sender
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/estimateGas.js
  init_node_compat_inject();
  init_parseAccount();
  init_base();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/signature/recoverAddress.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js
  init_node_compat_inject();
  init_getAddress();
  init_keccak256();
  function publicKeyToAddress(publicKey3) {
    const address = keccak256(`0x${publicKey3.substring(4)}`).substring(26);
    return checksumAddress(`0x${address}`);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/signature/recoverPublicKey.js
  init_node_compat_inject();
  init_isHex();
  init_size();
  init_fromHex();
  init_toHex();
  async function recoverPublicKey({ hash: hash5, signature: signature2 }) {
    const hashHex = isHex(hash5) ? hash5 : toHex(hash5);
    const { secp256k1: secp256k13 } = await Promise.resolve().then(() => (init_secp256k1(), secp256k1_exports));
    const signature_ = (() => {
      if (typeof signature2 === "object" && "r" in signature2 && "s" in signature2) {
        const { r: r3, s: s3, v: v13, yParity } = signature2;
        const yParityOrV2 = Number(yParity ?? v13);
        const recoveryBit2 = toRecoveryBit(yParityOrV2);
        return new secp256k13.Signature(hexToBigInt(r3), hexToBigInt(s3)).addRecoveryBit(recoveryBit2);
      }
      const signatureHex = isHex(signature2) ? signature2 : toHex(signature2);
      if (size(signatureHex) !== 65)
        throw new Error("invalid signature length");
      const yParityOrV = hexToNumber(`0x${signatureHex.slice(130)}`);
      const recoveryBit = toRecoveryBit(yParityOrV);
      return secp256k13.Signature.fromCompact(signatureHex.substring(2, 130)).addRecoveryBit(recoveryBit);
    })();
    const publicKey3 = signature_.recoverPublicKey(hashHex.substring(2)).toHex(false);
    return `0x${publicKey3}`;
  }
  function toRecoveryBit(yParityOrV) {
    if (yParityOrV === 0 || yParityOrV === 1)
      return yParityOrV;
    if (yParityOrV === 27)
      return 0;
    if (yParityOrV === 28)
      return 1;
    throw new Error("Invalid yParityOrV value");
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/signature/recoverAddress.js
  async function recoverAddress({ hash: hash5, signature: signature2 }) {
    return publicKeyToAddress(await recoverPublicKey({ hash: hash5, signature: signature2 }));
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/authorization/hashAuthorization.js
  init_node_compat_inject();
  init_concat();
  init_toBytes();
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/encoding/toRlp.js
  init_node_compat_inject();
  init_base();
  init_cursor2();
  init_toBytes();
  init_toHex();
  function toRlp(bytes, to3 = "hex") {
    const encodable = getEncodable(bytes);
    const cursor = createCursor(new Uint8Array(encodable.length));
    encodable.encode(cursor);
    if (to3 === "hex")
      return bytesToHex(cursor.bytes);
    return cursor.bytes;
  }
  function getEncodable(bytes) {
    if (Array.isArray(bytes))
      return getEncodableList(bytes.map((x13) => getEncodable(x13)));
    return getEncodableBytes(bytes);
  }
  function getEncodableList(list) {
    const bodyLength = list.reduce((acc, x13) => acc + x13.length, 0);
    const sizeOfBodyLength = getSizeOfLength(bodyLength);
    const length2 = (() => {
      if (bodyLength <= 55)
        return 1 + bodyLength;
      return 1 + sizeOfBodyLength + bodyLength;
    })();
    return {
      length: length2,
      encode(cursor) {
        if (bodyLength <= 55) {
          cursor.pushByte(192 + bodyLength);
        } else {
          cursor.pushByte(192 + 55 + sizeOfBodyLength);
          if (sizeOfBodyLength === 1)
            cursor.pushUint8(bodyLength);
          else if (sizeOfBodyLength === 2)
            cursor.pushUint16(bodyLength);
          else if (sizeOfBodyLength === 3)
            cursor.pushUint24(bodyLength);
          else
            cursor.pushUint32(bodyLength);
        }
        for (const { encode: encode11 } of list) {
          encode11(cursor);
        }
      }
    };
  }
  function getEncodableBytes(bytesOrHex) {
    const bytes = typeof bytesOrHex === "string" ? hexToBytes(bytesOrHex) : bytesOrHex;
    const sizeOfBytesLength = getSizeOfLength(bytes.length);
    const length2 = (() => {
      if (bytes.length === 1 && bytes[0] < 128)
        return 1;
      if (bytes.length <= 55)
        return 1 + bytes.length;
      return 1 + sizeOfBytesLength + bytes.length;
    })();
    return {
      length: length2,
      encode(cursor) {
        if (bytes.length === 1 && bytes[0] < 128) {
          cursor.pushBytes(bytes);
        } else if (bytes.length <= 55) {
          cursor.pushByte(128 + bytes.length);
          cursor.pushBytes(bytes);
        } else {
          cursor.pushByte(128 + 55 + sizeOfBytesLength);
          if (sizeOfBytesLength === 1)
            cursor.pushUint8(bytes.length);
          else if (sizeOfBytesLength === 2)
            cursor.pushUint16(bytes.length);
          else if (sizeOfBytesLength === 3)
            cursor.pushUint24(bytes.length);
          else
            cursor.pushUint32(bytes.length);
          cursor.pushBytes(bytes);
        }
      }
    };
  }
  function getSizeOfLength(length2) {
    if (length2 < 2 ** 8)
      return 1;
    if (length2 < 2 ** 16)
      return 2;
    if (length2 < 2 ** 24)
      return 3;
    if (length2 < 2 ** 32)
      return 4;
    throw new BaseError2("Length is too large.");
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/authorization/hashAuthorization.js
  init_keccak256();
  function hashAuthorization(parameters) {
    const { chainId, nonce, to: to3 } = parameters;
    const address = parameters.contractAddress ?? parameters.address;
    const hash5 = keccak256(concatHex([
      "0x05",
      toRlp([
        chainId ? numberToHex(chainId) : "0x",
        address,
        nonce ? numberToHex(nonce) : "0x"
      ])
    ]));
    if (to3 === "bytes")
      return hexToBytes(hash5);
    return hash5;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js
  async function recoverAuthorizationAddress(parameters) {
    const { authorization, signature: signature2 } = parameters;
    return recoverAddress({
      hash: hashAuthorization(authorization),
      signature: signature2 ?? authorization
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/estimateGas.js
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/errors/getEstimateGasError.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/estimateGas.js
  init_node_compat_inject();
  init_formatEther();
  init_formatGwei();
  init_base();
  init_transaction();
  var EstimateGasExecutionError = class extends BaseError2 {
    constructor(cause, { account, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to: to3, value }) {
      const prettyArgs = prettyPrint({
        from: account?.address,
        to: to3,
        value: typeof value !== "undefined" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || "ETH"}`,
        data,
        gas,
        gasPrice: typeof gasPrice !== "undefined" && `${formatGwei(gasPrice)} gwei`,
        maxFeePerGas: typeof maxFeePerGas !== "undefined" && `${formatGwei(maxFeePerGas)} gwei`,
        maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== "undefined" && `${formatGwei(maxPriorityFeePerGas)} gwei`,
        nonce
      });
      super(cause.shortMessage, {
        cause,
        docsPath: docsPath8,
        metaMessages: [
          ...cause.metaMessages ? [...cause.metaMessages, " "] : [],
          "Estimate Gas Arguments:",
          prettyArgs
        ].filter(Boolean),
        name: "EstimateGasExecutionError"
      });
      Object.defineProperty(this, "cause", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: void 0
      });
      this.cause = cause;
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/errors/getEstimateGasError.js
  init_node();
  init_getNodeError();
  function getEstimateGasError(err2, { docsPath: docsPath8, ...args }) {
    const cause = (() => {
      const cause2 = getNodeError(err2, args);
      if (cause2 instanceof UnknownNodeError)
        return err2;
      return cause2;
    })();
    return new EstimateGasExecutionError(cause, {
      docsPath: docsPath8,
      ...args
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/estimateGas.js
  init_extract();
  init_transactionRequest();
  init_stateOverride2();
  init_assertRequest();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js
  init_node_compat_inject();
  init_parseAccount();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/fee.js
  init_node_compat_inject();
  init_formatGwei();
  init_base();
  var BaseFeeScalarError = class extends BaseError2 {
    constructor() {
      super("`baseFeeMultiplier` must be greater than 1.", {
        name: "BaseFeeScalarError"
      });
    }
  };
  var Eip1559FeesNotSupportedError = class extends BaseError2 {
    constructor() {
      super("Chain does not support EIP-1559 fees.", {
        name: "Eip1559FeesNotSupportedError"
      });
    }
  };
  var MaxFeePerGasTooLowError = class extends BaseError2 {
    constructor({ maxPriorityFeePerGas }) {
      super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${formatGwei(maxPriorityFeePerGas)} gwei).`, { name: "MaxFeePerGasTooLowError" });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js
  init_node_compat_inject();
  init_fromHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getBlock.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/block.js
  init_node_compat_inject();
  init_base();
  var BlockNotFoundError = class extends BaseError2 {
    constructor({ blockHash, blockNumber }) {
      let identifier = "Block";
      if (blockHash)
        identifier = `Block at hash "${blockHash}"`;
      if (blockNumber)
        identifier = `Block at number "${blockNumber}"`;
      super(`${identifier} could not be found.`, { name: "BlockNotFoundError" });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getBlock.js
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/block.js
  init_node_compat_inject();
  init_formatter();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/transaction.js
  init_node_compat_inject();
  init_fromHex();
  init_formatter();
  var transactionType = {
    "0x0": "legacy",
    "0x1": "eip2930",
    "0x2": "eip1559",
    "0x3": "eip4844",
    "0x4": "eip7702"
  };
  function formatTransaction(transaction, _6) {
    const transaction_ = {
      ...transaction,
      blockHash: transaction.blockHash ? transaction.blockHash : null,
      blockNumber: transaction.blockNumber ? BigInt(transaction.blockNumber) : null,
      ...transaction.blockTimestamp != null && {
        blockTimestamp: BigInt(transaction.blockTimestamp)
      },
      chainId: transaction.chainId ? hexToNumber(transaction.chainId) : void 0,
      gas: transaction.gas ? BigInt(transaction.gas) : void 0,
      gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : void 0,
      maxFeePerBlobGas: transaction.maxFeePerBlobGas ? BigInt(transaction.maxFeePerBlobGas) : void 0,
      maxFeePerGas: transaction.maxFeePerGas ? BigInt(transaction.maxFeePerGas) : void 0,
      maxPriorityFeePerGas: transaction.maxPriorityFeePerGas ? BigInt(transaction.maxPriorityFeePerGas) : void 0,
      nonce: transaction.nonce ? hexToNumber(transaction.nonce) : void 0,
      to: transaction.to ? transaction.to : null,
      transactionIndex: transaction.transactionIndex ? Number(transaction.transactionIndex) : null,
      type: transaction.type ? transactionType[transaction.type] : void 0,
      typeHex: transaction.type ? transaction.type : void 0,
      value: transaction.value ? BigInt(transaction.value) : void 0,
      v: transaction.v ? BigInt(transaction.v) : void 0
    };
    if (transaction.authorizationList)
      transaction_.authorizationList = formatAuthorizationList2(transaction.authorizationList);
    transaction_.yParity = (() => {
      if (transaction.yParity)
        return Number(transaction.yParity);
      if (typeof transaction_.v === "bigint") {
        if (transaction_.v === 0n || transaction_.v === 27n)
          return 0;
        if (transaction_.v === 1n || transaction_.v === 28n)
          return 1;
        if (transaction_.v >= 35n)
          return transaction_.v % 2n === 0n ? 1 : 0;
      }
      return void 0;
    })();
    if (transaction_.type === "legacy") {
      delete transaction_.accessList;
      delete transaction_.maxFeePerBlobGas;
      delete transaction_.maxFeePerGas;
      delete transaction_.maxPriorityFeePerGas;
      delete transaction_.yParity;
    }
    if (transaction_.type === "eip2930") {
      delete transaction_.maxFeePerBlobGas;
      delete transaction_.maxFeePerGas;
      delete transaction_.maxPriorityFeePerGas;
    }
    if (transaction_.type === "eip1559")
      delete transaction_.maxFeePerBlobGas;
    return transaction_;
  }
  var defineTransaction = /* @__PURE__ */ defineFormatter("transaction", formatTransaction);
  function formatAuthorizationList2(authorizationList) {
    return authorizationList.map((authorization) => ({
      address: authorization.address,
      chainId: Number(authorization.chainId),
      nonce: Number(authorization.nonce),
      r: authorization.r,
      s: authorization.s,
      yParity: Number(authorization.yParity)
    }));
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/block.js
  function formatBlock(block, _6) {
    const transactions = (block.transactions ?? []).map((transaction) => {
      if (typeof transaction === "string")
        return transaction;
      return formatTransaction(transaction);
    });
    return {
      ...block,
      baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null,
      blobGasUsed: block.blobGasUsed ? BigInt(block.blobGasUsed) : void 0,
      difficulty: block.difficulty ? BigInt(block.difficulty) : void 0,
      excessBlobGas: block.excessBlobGas ? BigInt(block.excessBlobGas) : void 0,
      gasLimit: block.gasLimit ? BigInt(block.gasLimit) : void 0,
      gasUsed: block.gasUsed ? BigInt(block.gasUsed) : void 0,
      hash: block.hash ? block.hash : null,
      logsBloom: block.logsBloom ? block.logsBloom : null,
      nonce: block.nonce ? block.nonce : null,
      number: block.number ? BigInt(block.number) : null,
      size: block.size ? BigInt(block.size) : void 0,
      timestamp: block.timestamp ? BigInt(block.timestamp) : void 0,
      transactions,
      totalDifficulty: block.totalDifficulty ? BigInt(block.totalDifficulty) : null
    };
  }
  var defineBlock = /* @__PURE__ */ defineFormatter("block", formatBlock);

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getBlock.js
  async function getBlock(client, { blockHash, blockNumber, blockTag = client.experimental_blockTag ?? "latest", includeTransactions: includeTransactions_ } = {}) {
    const includeTransactions = includeTransactions_ ?? false;
    const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;
    let block = null;
    if (blockHash) {
      block = await client.request({
        method: "eth_getBlockByHash",
        params: [blockHash, includeTransactions]
      }, { dedupe: true });
    } else {
      block = await client.request({
        method: "eth_getBlockByNumber",
        params: [blockNumberHex || blockTag, includeTransactions]
      }, { dedupe: Boolean(blockNumberHex) });
    }
    if (!block)
      throw new BlockNotFoundError({ blockHash, blockNumber });
    const format = client.chain?.formatters?.block?.format || formatBlock;
    return format(block, "getBlock");
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getGasPrice.js
  init_node_compat_inject();
  async function getGasPrice(client) {
    const gasPrice = await client.request({
      method: "eth_gasPrice"
    });
    return BigInt(gasPrice);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js
  async function estimateMaxPriorityFeePerGas(client, args) {
    return internal_estimateMaxPriorityFeePerGas(client, args);
  }
  async function internal_estimateMaxPriorityFeePerGas(client, args) {
    const { block: block_, chain: chain2 = client.chain, request } = args || {};
    try {
      const maxPriorityFeePerGas = chain2?.fees?.maxPriorityFeePerGas ?? chain2?.fees?.defaultPriorityFee;
      if (typeof maxPriorityFeePerGas === "function") {
        const block = block_ || await getAction(client, getBlock, "getBlock")({});
        const maxPriorityFeePerGas_ = await maxPriorityFeePerGas({
          block,
          client,
          request
        });
        if (maxPriorityFeePerGas_ === null)
          throw new Error();
        return maxPriorityFeePerGas_;
      }
      if (typeof maxPriorityFeePerGas !== "undefined")
        return maxPriorityFeePerGas;
      const maxPriorityFeePerGasHex = await client.request({
        method: "eth_maxPriorityFeePerGas"
      });
      return hexToBigInt(maxPriorityFeePerGasHex);
    } catch {
      const [block, gasPrice] = await Promise.all([
        block_ ? Promise.resolve(block_) : getAction(client, getBlock, "getBlock")({}),
        getAction(client, getGasPrice, "getGasPrice")({})
      ]);
      if (typeof block.baseFeePerGas !== "bigint")
        throw new Eip1559FeesNotSupportedError();
      const maxPriorityFeePerGas = gasPrice - block.baseFeePerGas;
      if (maxPriorityFeePerGas < 0n)
        return 0n;
      return maxPriorityFeePerGas;
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js
  async function estimateFeesPerGas(client, args) {
    return internal_estimateFeesPerGas(client, args);
  }
  async function internal_estimateFeesPerGas(client, args) {
    const { block: block_, chain: chain2 = client.chain, request, type: type2 = "eip1559" } = args || {};
    const baseFeeMultiplier = await (async () => {
      if (typeof chain2?.fees?.baseFeeMultiplier === "function")
        return chain2.fees.baseFeeMultiplier({
          block: block_,
          client,
          request
        });
      return chain2?.fees?.baseFeeMultiplier ?? 1.2;
    })();
    if (baseFeeMultiplier < 1)
      throw new BaseFeeScalarError();
    const decimals = baseFeeMultiplier.toString().split(".")[1]?.length ?? 0;
    const denominator = 10 ** decimals;
    const multiply = (base4) => base4 * BigInt(Math.ceil(baseFeeMultiplier * denominator)) / BigInt(denominator);
    const block = block_ ? block_ : await getAction(client, getBlock, "getBlock")({});
    if (typeof chain2?.fees?.estimateFeesPerGas === "function") {
      const fees = await chain2.fees.estimateFeesPerGas({
        block: block_,
        client,
        multiply,
        request,
        type: type2
      });
      if (fees !== null)
        return fees;
    }
    if (type2 === "eip1559") {
      if (typeof block.baseFeePerGas !== "bigint")
        throw new Eip1559FeesNotSupportedError();
      const maxPriorityFeePerGas = typeof request?.maxPriorityFeePerGas === "bigint" ? request.maxPriorityFeePerGas : await internal_estimateMaxPriorityFeePerGas(client, {
        block,
        chain: chain2,
        request
      });
      const baseFeePerGas = multiply(block.baseFeePerGas);
      const maxFeePerGas = request?.maxFeePerGas ?? baseFeePerGas + maxPriorityFeePerGas;
      return {
        maxFeePerGas,
        maxPriorityFeePerGas
      };
    }
    const gasPrice = request?.gasPrice ?? multiply(await getAction(client, getGasPrice, "getGasPrice")({}));
    return {
      gasPrice
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getTransactionCount.js
  init_node_compat_inject();
  init_fromHex();
  init_toHex();
  async function getTransactionCount(client, { address, blockTag = "latest", blockNumber }) {
    const count = await client.request({
      method: "eth_getTransactionCount",
      params: [
        address,
        typeof blockNumber === "bigint" ? numberToHex(blockNumber) : blockTag
      ]
    }, {
      dedupe: Boolean(blockNumber)
    });
    return hexToNumber(count);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/blob/blobsToCommitments.js
  init_node_compat_inject();
  init_toBytes();
  init_toHex();
  function blobsToCommitments(parameters) {
    const { kzg } = parameters;
    const to3 = parameters.to ?? (typeof parameters.blobs[0] === "string" ? "hex" : "bytes");
    const blobs = typeof parameters.blobs[0] === "string" ? parameters.blobs.map((x13) => hexToBytes(x13)) : parameters.blobs;
    const commitments = [];
    for (const blob5 of blobs)
      commitments.push(Uint8Array.from(kzg.blobToKzgCommitment(blob5)));
    return to3 === "bytes" ? commitments : commitments.map((x13) => bytesToHex(x13));
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/blob/blobsToProofs.js
  init_node_compat_inject();
  init_toBytes();
  init_toHex();
  function blobsToProofs(parameters) {
    const { kzg } = parameters;
    const to3 = parameters.to ?? (typeof parameters.blobs[0] === "string" ? "hex" : "bytes");
    const blobs = typeof parameters.blobs[0] === "string" ? parameters.blobs.map((x13) => hexToBytes(x13)) : parameters.blobs;
    const commitments = typeof parameters.commitments[0] === "string" ? parameters.commitments.map((x13) => hexToBytes(x13)) : parameters.commitments;
    const proofs = [];
    for (let i5 = 0; i5 < blobs.length; i5++) {
      const blob5 = blobs[i5];
      const commitment = commitments[i5];
      proofs.push(Uint8Array.from(kzg.computeBlobKzgProof(blob5, commitment)));
    }
    return to3 === "bytes" ? proofs : proofs.map((x13) => bytesToHex(x13));
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
  init_node_compat_inject();
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/sha256.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js
  init_node_compat_inject();
  init_sha2();
  var sha2562 = sha256;

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/hash/sha256.js
  init_isHex();
  init_toBytes();
  init_toHex();
  function sha2563(value, to_) {
    const to3 = to_ || "hex";
    const bytes = sha2562(isHex(value, { strict: false }) ? toBytes(value) : value);
    if (to3 === "bytes")
      return bytes;
    return toHex(bytes);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
  function commitmentToVersionedHash(parameters) {
    const { commitment, version: version16 = 1 } = parameters;
    const to3 = parameters.to ?? (typeof commitment === "string" ? "hex" : "bytes");
    const versionedHash = sha2563(commitment, "bytes");
    versionedHash.set([version16], 0);
    return to3 === "bytes" ? versionedHash : bytesToHex(versionedHash);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
  function commitmentsToVersionedHashes(parameters) {
    const { commitments, version: version16 } = parameters;
    const to3 = parameters.to ?? (typeof commitments[0] === "string" ? "hex" : "bytes");
    const hashes3 = [];
    for (const commitment of commitments) {
      hashes3.push(commitmentToVersionedHash({
        commitment,
        to: to3,
        version: version16
      }));
    }
    return hashes3;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/blob/toBlobSidecars.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/blob/toBlobs.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/blob.js
  init_node_compat_inject();
  var blobsPerTransaction = 6;
  var bytesPerFieldElement = 32;
  var fieldElementsPerBlob = 4096;
  var bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;
  var maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - // terminator byte (0x80).
  1 - // zero byte (0x00) appended to each field element.
  1 * fieldElementsPerBlob * blobsPerTransaction;

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/blob.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/kzg.js
  init_node_compat_inject();
  var versionedHashVersionKzg = 1;

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/blob.js
  init_base();
  var BlobSizeTooLargeError = class extends BaseError2 {
    constructor({ maxSize, size: size5 }) {
      super("Blob size is too large.", {
        metaMessages: [`Max: ${maxSize} bytes`, `Given: ${size5} bytes`],
        name: "BlobSizeTooLargeError"
      });
    }
  };
  var EmptyBlobError = class extends BaseError2 {
    constructor() {
      super("Blob data must not be empty.", { name: "EmptyBlobError" });
    }
  };
  var InvalidVersionedHashSizeError = class extends BaseError2 {
    constructor({ hash: hash5, size: size5 }) {
      super(`Versioned hash "${hash5}" size is invalid.`, {
        metaMessages: ["Expected: 32", `Received: ${size5}`],
        name: "InvalidVersionedHashSizeError"
      });
    }
  };
  var InvalidVersionedHashVersionError = class extends BaseError2 {
    constructor({ hash: hash5, version: version16 }) {
      super(`Versioned hash "${hash5}" version is invalid.`, {
        metaMessages: [
          `Expected: ${versionedHashVersionKzg}`,
          `Received: ${version16}`
        ],
        name: "InvalidVersionedHashVersionError"
      });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/blob/toBlobs.js
  init_cursor2();
  init_size();
  init_toBytes();
  init_toHex();
  function toBlobs(parameters) {
    const to3 = parameters.to ?? (typeof parameters.data === "string" ? "hex" : "bytes");
    const data = typeof parameters.data === "string" ? hexToBytes(parameters.data) : parameters.data;
    const size_ = size(data);
    if (!size_)
      throw new EmptyBlobError();
    if (size_ > maxBytesPerTransaction)
      throw new BlobSizeTooLargeError({
        maxSize: maxBytesPerTransaction,
        size: size_
      });
    const blobs = [];
    let active = true;
    let position = 0;
    while (active) {
      const blob5 = createCursor(new Uint8Array(bytesPerBlob));
      let size5 = 0;
      while (size5 < fieldElementsPerBlob) {
        const bytes = data.slice(position, position + (bytesPerFieldElement - 1));
        blob5.pushByte(0);
        blob5.pushBytes(bytes);
        if (bytes.length < 31) {
          blob5.pushByte(128);
          active = false;
          break;
        }
        size5++;
        position += 31;
      }
      blobs.push(blob5);
    }
    return to3 === "bytes" ? blobs.map((x13) => x13.bytes) : blobs.map((x13) => bytesToHex(x13.bytes));
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/blob/toBlobSidecars.js
  function toBlobSidecars(parameters) {
    const { data, kzg, to: to3 } = parameters;
    const blobs = parameters.blobs ?? toBlobs({ data, to: to3 });
    const commitments = parameters.commitments ?? blobsToCommitments({ blobs, kzg, to: to3 });
    const proofs = parameters.proofs ?? blobsToProofs({ blobs, commitments, kzg, to: to3 });
    const sidecars = [];
    for (let i5 = 0; i5 < blobs.length; i5++)
      sidecars.push({
        blob: blobs[i5],
        commitment: commitments[i5],
        proof: proofs[i5]
      });
    return sidecars;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js
  init_lru();
  init_assertRequest();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/transaction/getTransactionType.js
  init_node_compat_inject();
  init_transaction();
  function getTransactionType(transaction) {
    if (transaction.type)
      return transaction.type;
    if (typeof transaction.authorizationList !== "undefined")
      return "eip7702";
    if (typeof transaction.blobs !== "undefined" || typeof transaction.blobVersionedHashes !== "undefined" || typeof transaction.maxFeePerBlobGas !== "undefined" || typeof transaction.sidecars !== "undefined")
      return "eip4844";
    if (typeof transaction.maxFeePerGas !== "undefined" || typeof transaction.maxPriorityFeePerGas !== "undefined") {
      return "eip1559";
    }
    if (typeof transaction.gasPrice !== "undefined") {
      if (typeof transaction.accessList !== "undefined")
        return "eip2930";
      return "legacy";
    }
    throw new InvalidSerializableTransactionError({ transaction });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/fillTransaction.js
  init_node_compat_inject();
  init_parseAccount();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/errors/getTransactionError.js
  init_node_compat_inject();
  init_node();
  init_transaction();
  init_getNodeError();
  function getTransactionError(err2, { docsPath: docsPath8, ...args }) {
    const cause = (() => {
      const cause2 = getNodeError(err2, args);
      if (cause2 instanceof UnknownNodeError)
        return err2;
      return cause2;
    })();
    return new TransactionExecutionError(cause, {
      docsPath: docsPath8,
      ...args
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/fillTransaction.js
  init_extract();
  init_transactionRequest();
  init_assertRequest();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getChainId.js
  init_node_compat_inject();
  init_fromHex();
  async function getChainId(client) {
    const chainIdHex = await client.request({
      method: "eth_chainId"
    }, { dedupe: true });
    return hexToNumber(chainIdHex);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/fillTransaction.js
  async function fillTransaction(client, parameters) {
    const { account = client.account, accessList, authorizationList, chain: chain2 = client.chain, blobVersionedHashes, blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce: nonce_, nonceManager, to: to3, type: type2, value, ...rest } = parameters;
    const nonce = await (async () => {
      if (!account)
        return nonce_;
      if (!nonceManager)
        return nonce_;
      if (typeof nonce_ !== "undefined")
        return nonce_;
      const account_ = parseAccount(account);
      const chainId = chain2 ? chain2.id : await getAction(client, getChainId, "getChainId")({});
      return await nonceManager.consume({
        address: account_.address,
        chainId,
        client
      });
    })();
    assertRequest(parameters);
    const chainFormat = chain2?.formatters?.transactionRequest?.format;
    const format = chainFormat || formatTransactionRequest;
    const request = format({
      // Pick out extra data that might exist on the chain's transaction request type.
      ...extract(rest, { format: chainFormat }),
      account: account ? parseAccount(account) : void 0,
      accessList,
      authorizationList,
      blobs,
      blobVersionedHashes,
      data,
      gas,
      gasPrice,
      maxFeePerBlobGas,
      maxFeePerGas,
      maxPriorityFeePerGas,
      nonce,
      to: to3,
      type: type2,
      value
    }, "fillTransaction");
    try {
      const response = await client.request({
        method: "eth_fillTransaction",
        params: [request]
      });
      const format2 = chain2?.formatters?.transaction?.format || formatTransaction;
      const transaction = format2(response.tx);
      delete transaction.blockHash;
      delete transaction.blockNumber;
      delete transaction.r;
      delete transaction.s;
      delete transaction.transactionIndex;
      delete transaction.v;
      delete transaction.yParity;
      transaction.data = transaction.input;
      if (transaction.gas)
        transaction.gas = parameters.gas ?? transaction.gas;
      if (transaction.gasPrice)
        transaction.gasPrice = parameters.gasPrice ?? transaction.gasPrice;
      if (transaction.maxFeePerBlobGas)
        transaction.maxFeePerBlobGas = parameters.maxFeePerBlobGas ?? transaction.maxFeePerBlobGas;
      if (transaction.maxFeePerGas)
        transaction.maxFeePerGas = parameters.maxFeePerGas ?? transaction.maxFeePerGas;
      if (transaction.maxPriorityFeePerGas)
        transaction.maxPriorityFeePerGas = parameters.maxPriorityFeePerGas ?? transaction.maxPriorityFeePerGas;
      if (typeof transaction.nonce !== "undefined")
        transaction.nonce = parameters.nonce ?? transaction.nonce;
      const feeMultiplier = await (async () => {
        if (typeof chain2?.fees?.baseFeeMultiplier === "function") {
          const block = await getAction(client, getBlock, "getBlock")({});
          return chain2.fees.baseFeeMultiplier({
            block,
            client,
            request: parameters
          });
        }
        return chain2?.fees?.baseFeeMultiplier ?? 1.2;
      })();
      if (feeMultiplier < 1)
        throw new BaseFeeScalarError();
      const decimals = feeMultiplier.toString().split(".")[1]?.length ?? 0;
      const denominator = 10 ** decimals;
      const multiplyFee = (base4) => base4 * BigInt(Math.ceil(feeMultiplier * denominator)) / BigInt(denominator);
      if (!transaction.feePayerSignature) {
        if (transaction.maxFeePerGas && !parameters.maxFeePerGas)
          transaction.maxFeePerGas = multiplyFee(transaction.maxFeePerGas);
        if (transaction.gasPrice && !parameters.gasPrice)
          transaction.gasPrice = multiplyFee(transaction.gasPrice);
      }
      return {
        raw: response.raw,
        transaction: {
          from: request.from,
          ...transaction
        },
        ...response.capabilities ? { capabilities: response.capabilities } : {}
      };
    } catch (err2) {
      throw getTransactionError(err2, {
        ...parameters,
        chain: client.chain
      });
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js
  var defaultParameters = [
    "blobVersionedHashes",
    "chainId",
    "fees",
    "gas",
    "nonce",
    "type"
  ];
  var eip1559NetworkCache = /* @__PURE__ */ new Map();
  var supportsFillTransaction = /* @__PURE__ */ new LruMap(128);
  async function prepareTransactionRequest(client, args) {
    let request = args;
    request.account ??= client.account;
    request.parameters ??= defaultParameters;
    const { account: account_, chain: chain2 = client.chain, nonceManager, parameters } = request;
    const prepareTransactionRequest2 = (() => {
      if (typeof chain2?.prepareTransactionRequest === "function")
        return {
          fn: chain2.prepareTransactionRequest,
          runAt: ["beforeFillTransaction"]
        };
      if (Array.isArray(chain2?.prepareTransactionRequest))
        return {
          fn: chain2.prepareTransactionRequest[0],
          runAt: chain2.prepareTransactionRequest[1].runAt
        };
      return void 0;
    })();
    let chainId;
    async function getChainId2() {
      if (chainId)
        return chainId;
      if (typeof request.chainId !== "undefined")
        return request.chainId;
      if (chain2)
        return chain2.id;
      const chainId_ = await getAction(client, getChainId, "getChainId")({});
      chainId = chainId_;
      return chainId;
    }
    const account = account_ ? parseAccount(account_) : account_;
    let nonce = request.nonce;
    if (parameters.includes("nonce") && typeof nonce === "undefined" && account && nonceManager) {
      const chainId2 = await getChainId2();
      nonce = await nonceManager.consume({
        address: account.address,
        chainId: chainId2,
        client
      });
    }
    if (prepareTransactionRequest2?.fn && prepareTransactionRequest2.runAt?.includes("beforeFillTransaction")) {
      request = await prepareTransactionRequest2.fn({ ...request, chain: chain2 }, {
        phase: "beforeFillTransaction"
      });
      nonce ??= request.nonce;
    }
    const attemptFill = (() => {
      if ((parameters.includes("blobVersionedHashes") || parameters.includes("sidecars")) && request.kzg && request.blobs)
        return false;
      if (supportsFillTransaction.get(client.uid) === false)
        return false;
      const shouldAttempt = ["fees", "gas"].some((parameter) => parameters.includes(parameter));
      if (!shouldAttempt)
        return false;
      if (parameters.includes("chainId") && typeof request.chainId !== "number")
        return true;
      if (parameters.includes("nonce") && typeof nonce !== "number")
        return true;
      if (parameters.includes("fees") && typeof request.gasPrice !== "bigint" && (typeof request.maxFeePerGas !== "bigint" || typeof request.maxPriorityFeePerGas !== "bigint"))
        return true;
      if (parameters.includes("gas") && typeof request.gas !== "bigint")
        return true;
      return false;
    })();
    const fillResult = attemptFill ? await getAction(client, fillTransaction, "fillTransaction")({ ...request, nonce }).then((result) => {
      const { chainId: chainId2, from: from16, gas: gas2, gasPrice, nonce: nonce2, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, type: type3, ...rest } = result.transaction;
      supportsFillTransaction.set(client.uid, true);
      return {
        ...request,
        ...from16 ? { from: from16 } : {},
        ...type3 && !request.type ? { type: type3 } : {},
        ...typeof chainId2 !== "undefined" ? { chainId: chainId2 } : {},
        ...typeof gas2 !== "undefined" ? { gas: gas2 } : {},
        ...typeof gasPrice !== "undefined" ? { gasPrice } : {},
        ...typeof nonce2 !== "undefined" ? { nonce: nonce2 } : {},
        ...typeof maxFeePerBlobGas !== "undefined" && request.type !== "legacy" && request.type !== "eip2930" ? { maxFeePerBlobGas } : {},
        ...typeof maxFeePerGas !== "undefined" && request.type !== "legacy" && request.type !== "eip2930" ? { maxFeePerGas } : {},
        ...typeof maxPriorityFeePerGas !== "undefined" && request.type !== "legacy" && request.type !== "eip2930" ? { maxPriorityFeePerGas } : {},
        ..."nonceKey" in rest && typeof rest.nonceKey !== "undefined" ? { nonceKey: rest.nonceKey } : {},
        ..."keyAuthorization" in rest && typeof rest.keyAuthorization !== "undefined" && rest.keyAuthorization !== null && !("keyAuthorization" in request) ? { keyAuthorization: rest.keyAuthorization } : {},
        ..."feePayerSignature" in rest && typeof rest.feePayerSignature !== "undefined" && rest.feePayerSignature !== null ? { feePayerSignature: rest.feePayerSignature } : {},
        ..."feeToken" in rest && typeof rest.feeToken !== "undefined" && rest.feeToken !== null && !("feeToken" in request) ? { feeToken: rest.feeToken } : {},
        ...result.capabilities ? { _capabilities: result.capabilities } : {}
      };
    }).catch((e2) => {
      const error51 = e2;
      if (error51.name !== "TransactionExecutionError")
        return request;
      const executionReverted = error51.walk?.((e3) => {
        const error52 = e3;
        return error52.name === "ExecutionRevertedError";
      });
      if (executionReverted)
        throw e2;
      const unsupported = error51.walk?.((e3) => {
        const error52 = e3;
        return error52.name === "MethodNotFoundRpcError" || error52.name === "MethodNotSupportedRpcError" || error52.message?.includes("eth_fillTransaction is not available");
      });
      if (unsupported)
        supportsFillTransaction.set(client.uid, false);
      return request;
    }) : request;
    nonce ??= fillResult.nonce;
    request = {
      ...fillResult,
      ...account ? { from: account?.address } : {},
      ...typeof nonce !== "undefined" ? { nonce } : {}
    };
    const { blobs, gas, kzg, type: type2 } = request;
    if (prepareTransactionRequest2?.fn && prepareTransactionRequest2.runAt?.includes("beforeFillParameters")) {
      request = await prepareTransactionRequest2.fn({ ...request, chain: chain2 }, {
        phase: "beforeFillParameters"
      });
    }
    let block;
    async function getBlock2() {
      if (block)
        return block;
      block = await getAction(client, getBlock, "getBlock")({ blockTag: "latest" });
      return block;
    }
    if (parameters.includes("nonce") && typeof nonce === "undefined" && account && !nonceManager)
      request.nonce = await getAction(client, getTransactionCount, "getTransactionCount")({
        address: account.address,
        blockTag: "pending"
      });
    if ((parameters.includes("blobVersionedHashes") || parameters.includes("sidecars")) && blobs && kzg) {
      const commitments = blobsToCommitments({ blobs, kzg });
      if (parameters.includes("blobVersionedHashes")) {
        const versionedHashes = commitmentsToVersionedHashes({
          commitments,
          to: "hex"
        });
        request.blobVersionedHashes = versionedHashes;
      }
      if (parameters.includes("sidecars")) {
        const proofs = blobsToProofs({ blobs, commitments, kzg });
        const sidecars = toBlobSidecars({
          blobs,
          commitments,
          proofs,
          to: "hex"
        });
        request.sidecars = sidecars;
      }
    }
    if (parameters.includes("chainId"))
      request.chainId = await getChainId2();
    if ((parameters.includes("fees") || parameters.includes("type")) && typeof type2 === "undefined") {
      try {
        request.type = getTransactionType(request);
      } catch {
        let isEip1559Network = eip1559NetworkCache.get(client.uid);
        if (typeof isEip1559Network === "undefined") {
          const block2 = await getBlock2();
          isEip1559Network = typeof block2?.baseFeePerGas === "bigint";
          eip1559NetworkCache.set(client.uid, isEip1559Network);
        }
        request.type = isEip1559Network ? "eip1559" : "legacy";
      }
    }
    if (parameters.includes("fees")) {
      if (request.type !== "legacy" && request.type !== "eip2930") {
        if (typeof request.maxFeePerGas === "undefined" || typeof request.maxPriorityFeePerGas === "undefined") {
          const block2 = await getBlock2();
          const { maxFeePerGas, maxPriorityFeePerGas } = await internal_estimateFeesPerGas(client, {
            block: block2,
            chain: chain2,
            request
          });
          if (typeof request.maxPriorityFeePerGas === "undefined" && request.maxFeePerGas && request.maxFeePerGas < maxPriorityFeePerGas)
            throw new MaxFeePerGasTooLowError({
              maxPriorityFeePerGas
            });
          request.maxPriorityFeePerGas = maxPriorityFeePerGas;
          request.maxFeePerGas = maxFeePerGas;
        }
      } else {
        if (typeof request.maxFeePerGas !== "undefined" || typeof request.maxPriorityFeePerGas !== "undefined")
          throw new Eip1559FeesNotSupportedError();
        if (typeof request.gasPrice === "undefined") {
          const block2 = await getBlock2();
          const { gasPrice: gasPrice_ } = await internal_estimateFeesPerGas(client, {
            block: block2,
            chain: chain2,
            request,
            type: "legacy"
          });
          request.gasPrice = gasPrice_;
        }
      }
    }
    if (parameters.includes("gas") && typeof gas === "undefined")
      request.gas = await getAction(client, estimateGas, "estimateGas")({
        ...request,
        account,
        prepare: account?.type === "local" ? [] : ["blobVersionedHashes"]
      });
    if (prepareTransactionRequest2?.fn && prepareTransactionRequest2.runAt?.includes("afterFillParameters"))
      request = await prepareTransactionRequest2.fn({ ...request, chain: chain2 }, {
        phase: "afterFillParameters"
      });
    assertRequest(request);
    delete request.parameters;
    return request;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/estimateGas.js
  async function estimateGas(client, args) {
    const { account: account_ = client.account, prepare = true } = args;
    const account = account_ ? parseAccount(account_) : void 0;
    const parameters = (() => {
      if (Array.isArray(prepare))
        return prepare;
      if (account?.type !== "local")
        return ["blobVersionedHashes"];
      return void 0;
    })();
    try {
      const to3 = await (async () => {
        if (args.to)
          return args.to;
        if (args.authorizationList && args.authorizationList.length > 0)
          return await recoverAuthorizationAddress({
            authorization: args.authorizationList[0]
          }).catch(() => {
            throw new BaseError2("`to` is required. Could not infer from `authorizationList`");
          });
        return void 0;
      })();
      const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value, stateOverride, ...rest } = prepare ? await prepareTransactionRequest(client, {
        ...args,
        parameters,
        to: to3
      }) : args;
      if (gas && args.gas !== gas)
        return gas;
      const blockNumberHex = typeof blockNumber === "bigint" ? numberToHex(blockNumber) : void 0;
      const block = blockNumberHex || blockTag;
      const rpcStateOverride = serializeStateOverride(stateOverride);
      assertRequest(args);
      const chainFormat = client.chain?.formatters?.transactionRequest?.format;
      const format = chainFormat || formatTransactionRequest;
      const request = format({
        // Pick out extra data that might exist on the chain's transaction request type.
        ...extract(rest, { format: chainFormat }),
        account,
        accessList,
        authorizationList,
        blobs,
        blobVersionedHashes,
        data,
        gasPrice,
        maxFeePerBlobGas,
        maxFeePerGas,
        maxPriorityFeePerGas,
        nonce,
        to: to3,
        value
      }, "estimateGas");
      return BigInt(await client.request({
        method: "eth_estimateGas",
        params: rpcStateOverride ? [
          request,
          block ?? client.experimental_blockTag ?? "latest",
          rpcStateOverride
        ] : block ? [request, block] : [request]
      }));
    } catch (err2) {
      throw getEstimateGasError(err2, {
        ...args,
        account,
        chain: client.chain
      });
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/estimateContractGas.js
  async function estimateContractGas(client, parameters) {
    const { abi: abi2, address, args, functionName, dataSuffix = typeof client.dataSuffix === "string" ? client.dataSuffix : client.dataSuffix?.value, ...request } = parameters;
    const data = encodeFunctionData({
      abi: abi2,
      args,
      functionName
    });
    try {
      const gas = await getAction(client, estimateGas, "estimateGas")({
        data: `${data}${dataSuffix ? dataSuffix.replace("0x", "") : ""}`,
        to: address,
        ...request
      });
      return gas;
    } catch (error51) {
      const account = request.account ? parseAccount(request.account) : void 0;
      throw getContractError(error51, {
        abi: abi2,
        address,
        args,
        docsPath: "/docs/contract/estimateContractGas",
        functionName,
        sender: account?.address
      });
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getContractEvents.js
  init_node_compat_inject();
  init_getAbiItem();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getLogs.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/parseEventLogs.js
  init_node_compat_inject();
  init_isAddressEqual();
  init_toBytes();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/log.js
  init_node_compat_inject();
  function formatLog(log, { args, eventName } = {}) {
    return {
      ...log,
      blockHash: log.blockHash ? log.blockHash : null,
      blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,
      blockTimestamp: log.blockTimestamp ? BigInt(log.blockTimestamp) : log.blockTimestamp === null ? null : void 0,
      logIndex: log.logIndex ? Number(log.logIndex) : null,
      transactionHash: log.transactionHash ? log.transactionHash : null,
      transactionIndex: log.transactionIndex ? Number(log.transactionIndex) : null,
      ...eventName ? { args, eventName } : {}
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/parseEventLogs.js
  init_keccak256();
  init_toEventSelector();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/decodeEventLog.js
  init_node_compat_inject();
  init_abi();
  init_cursor();
  init_size();
  init_toEventSelector();
  init_decodeAbiParameters();
  init_formatAbiItem2();
  var docsPath3 = "/docs/contract/decodeEventLog";
  function decodeEventLog(parameters) {
    const { abi: abi2, data, strict: strict_, topics } = parameters;
    const strict = strict_ ?? true;
    const [signature2, ...argTopics] = topics;
    if (!signature2)
      throw new AbiEventSignatureEmptyTopicsError({ docsPath: docsPath3 });
    const abiItem = abi2.find((x13) => x13.type === "event" && signature2 === toEventSelector(formatAbiItem2(x13)));
    if (!(abiItem && "name" in abiItem) || abiItem.type !== "event")
      throw new AbiEventSignatureNotFoundError(signature2, { docsPath: docsPath3 });
    const { name: name2, inputs } = abiItem;
    const isUnnamed = inputs?.some((x13) => !("name" in x13 && x13.name));
    const args = isUnnamed ? [] : {};
    const indexedInputs = inputs.map((x13, i5) => [x13, i5]).filter(([x13]) => "indexed" in x13 && x13.indexed);
    const missingIndexedInputs = [];
    for (let i5 = 0; i5 < indexedInputs.length; i5++) {
      const [param, argIndex] = indexedInputs[i5];
      const topic = argTopics[i5];
      if (!topic) {
        if (strict)
          throw new DecodeLogTopicsMismatch({
            abiItem,
            param
          });
        missingIndexedInputs.push([param, argIndex]);
        continue;
      }
      args[isUnnamed ? argIndex : param.name || argIndex] = decodeTopic({
        param,
        value: topic
      });
    }
    const nonIndexedInputs = inputs.filter((x13) => !("indexed" in x13 && x13.indexed));
    const inputsToDecode = strict ? nonIndexedInputs : [...missingIndexedInputs.map(([param]) => param), ...nonIndexedInputs];
    if (inputsToDecode.length > 0) {
      if (data && data !== "0x") {
        try {
          const decodedData = decodeAbiParameters(inputsToDecode, data);
          if (decodedData) {
            let dataIndex = 0;
            if (!strict) {
              for (const [param, argIndex] of missingIndexedInputs) {
                args[isUnnamed ? argIndex : param.name || argIndex] = decodedData[dataIndex++];
              }
            }
            if (isUnnamed) {
              for (let i5 = 0; i5 < inputs.length; i5++)
                if (args[i5] === void 0 && dataIndex < decodedData.length)
                  args[i5] = decodedData[dataIndex++];
            } else
              for (let i5 = 0; i5 < nonIndexedInputs.length; i5++)
                args[nonIndexedInputs[i5].name] = decodedData[dataIndex++];
          }
        } catch (err2) {
          if (strict) {
            if (err2 instanceof AbiDecodingDataSizeTooSmallError || err2 instanceof PositionOutOfBoundsError)
              throw new DecodeLogDataMismatch({
                abiItem,
                data,
                params: inputsToDecode,
                size: size(data)
              });
            throw err2;
          }
        }
      } else if (strict) {
        throw new DecodeLogDataMismatch({
          abiItem,
          data: "0x",
          params: inputsToDecode,
          size: 0
        });
      }
    }
    return {
      eventName: name2,
      args: Object.values(args).length > 0 ? args : void 0
    };
  }
  function decodeTopic({ param, value }) {
    if (param.type === "string" || param.type === "bytes" || param.type === "tuple" || param.type.match(/^(.*)\[(\d+)?\]$/))
      return value;
    const decodedArg = decodeAbiParameters([param], value) || [];
    return decodedArg[0];
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/abi/parseEventLogs.js
  function parseEventLogs(parameters) {
    const { abi: abi2, args, logs, strict = true } = parameters;
    const eventName = (() => {
      if (!parameters.eventName)
        return void 0;
      if (Array.isArray(parameters.eventName))
        return parameters.eventName;
      return [parameters.eventName];
    })();
    const abiTopics = abi2.filter((abiItem) => abiItem.type === "event").map((abiItem) => ({
      abi: abiItem,
      selector: toEventSelector(abiItem)
    }));
    return logs.map((log) => {
      const formattedLog = typeof log.blockNumber === "string" ? formatLog(log) : log;
      const abiItems = abiTopics.filter((abiTopic) => formattedLog.topics[0] === abiTopic.selector);
      if (abiItems.length === 0)
        return null;
      let event;
      let abiItem;
      for (const item of abiItems) {
        try {
          event = decodeEventLog({
            ...formattedLog,
            abi: [item.abi],
            strict: true
          });
          abiItem = item;
          break;
        } catch {
        }
      }
      if (!event && !strict) {
        abiItem = abiItems[0];
        try {
          event = decodeEventLog({
            data: formattedLog.data,
            topics: formattedLog.topics,
            abi: [abiItem.abi],
            strict: false
          });
        } catch {
          const isUnnamed = abiItem.abi.inputs?.some((x13) => !("name" in x13 && x13.name));
          return {
            ...formattedLog,
            args: isUnnamed ? [] : {},
            eventName: abiItem.abi.name
          };
        }
      }
      if (!event || !abiItem)
        return null;
      if (eventName && !eventName.includes(event.eventName))
        return null;
      if (!includesArgs({
        args: event.args,
        inputs: abiItem.abi.inputs,
        matchArgs: args
      }))
        return null;
      return { ...event, ...formattedLog };
    }).filter(Boolean);
  }
  function includesArgs(parameters) {
    const { args, inputs, matchArgs } = parameters;
    if (!matchArgs)
      return true;
    if (!args)
      return false;
    function isEqual3(input, value, arg) {
      try {
        if (input.type === "address")
          return isAddressEqual(value, arg);
        if (input.type === "string" || input.type === "bytes")
          return keccak256(toBytes(value)) === arg;
        return value === arg;
      } catch {
        return false;
      }
    }
    if (Array.isArray(args) && Array.isArray(matchArgs)) {
      return matchArgs.every((value, index2) => {
        if (value === null || value === void 0)
          return true;
        const input = inputs[index2];
        if (!input)
          return false;
        const value_ = Array.isArray(value) ? value : [value];
        return value_.some((value2) => isEqual3(input, value2, args[index2]));
      });
    }
    if (typeof args === "object" && !Array.isArray(args) && typeof matchArgs === "object" && !Array.isArray(matchArgs))
      return Object.entries(matchArgs).every(([key2, value]) => {
        if (value === null || value === void 0)
          return true;
        const input = inputs.find((input2) => input2.name === key2);
        if (!input)
          return false;
        const value_ = Array.isArray(value) ? value : [value];
        return value_.some((value2) => isEqual3(input, value2, args[key2]));
      });
    return false;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getLogs.js
  init_toHex();
  async function getLogs(client, { address, blockHash, fromBlock, toBlock, event, events: events_, args, strict: strict_ } = {}) {
    const strict = strict_ ?? false;
    const events = events_ ?? (event ? [event] : void 0);
    let topics = [];
    if (events) {
      const encoded = events.flatMap((event2) => encodeEventTopics({
        abi: [event2],
        eventName: event2.name,
        args: events_ ? void 0 : args
      }));
      topics = [encoded];
      if (event)
        topics = topics[0];
    }
    let logs;
    if (blockHash) {
      logs = await client.request({
        method: "eth_getLogs",
        params: [{ address, topics, blockHash }]
      });
    } else {
      logs = await client.request({
        method: "eth_getLogs",
        params: [
          {
            address,
            topics,
            fromBlock: typeof fromBlock === "bigint" ? numberToHex(fromBlock) : fromBlock,
            toBlock: typeof toBlock === "bigint" ? numberToHex(toBlock) : toBlock
          }
        ]
      });
    }
    const formattedLogs = logs.map((log) => formatLog(log));
    if (!events)
      return formattedLogs;
    return parseEventLogs({
      abi: events,
      args,
      logs: formattedLogs,
      strict
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getContractEvents.js
  async function getContractEvents(client, parameters) {
    const { abi: abi2, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;
    const event = eventName ? getAbiItem({ abi: abi2, name: eventName }) : void 0;
    const events = !event ? abi2.filter((x13) => x13.type === "event") : void 0;
    return getAction(client, getLogs, "getLogs")({
      address,
      args,
      blockHash,
      event,
      events,
      fromBlock,
      toBlock,
      strict
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/readContract.js
  init_node_compat_inject();
  init_decodeFunctionResult();
  init_encodeFunctionData();
  init_call();
  async function readContract(client, parameters) {
    const { abi: abi2, address, args, functionName, ...rest } = parameters;
    const calldata = encodeFunctionData({
      abi: abi2,
      args,
      functionName
    });
    try {
      const { data } = await getAction(client, call, "call")({
        ...rest,
        data: calldata,
        to: address
      });
      return decodeFunctionResult({
        abi: abi2,
        args,
        functionName,
        data: data || "0x"
      });
    } catch (error51) {
      throw getContractError(error51, {
        abi: abi2,
        address,
        args,
        docsPath: "/docs/contract/readContract",
        functionName
      });
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/simulateContract.js
  init_node_compat_inject();
  init_parseAccount();
  init_decodeFunctionResult();
  init_encodeFunctionData();
  init_call();
  async function simulateContract(client, parameters) {
    const { abi: abi2, address, args, functionName, dataSuffix = typeof client.dataSuffix === "string" ? client.dataSuffix : client.dataSuffix?.value, ...callRequest } = parameters;
    const account = callRequest.account ? parseAccount(callRequest.account) : client.account;
    const calldata = encodeFunctionData({ abi: abi2, args, functionName });
    try {
      const { data } = await getAction(client, call, "call")({
        batch: false,
        data: `${calldata}${dataSuffix ? dataSuffix.replace("0x", "") : ""}`,
        to: address,
        ...callRequest,
        account
      });
      const result = decodeFunctionResult({
        abi: abi2,
        args,
        functionName,
        data: data || "0x"
      });
      const minimizedAbi = abi2.filter((abiItem) => "name" in abiItem && abiItem.name === parameters.functionName);
      return {
        result,
        request: {
          abi: minimizedAbi,
          address,
          args,
          dataSuffix,
          functionName,
          ...callRequest,
          account
        }
      };
    } catch (error51) {
      throw getContractError(error51, {
        abi: abi2,
        address,
        args,
        docsPath: "/docs/contract/simulateContract",
        functionName,
        sender: account?.address
      });
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/watchContractEvent.js
  init_node_compat_inject();
  init_abi();
  init_rpc();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/observe.js
  init_node_compat_inject();
  var listenersCache = /* @__PURE__ */ new Map();
  var cleanupCache = /* @__PURE__ */ new Map();
  var callbackCount = 0;
  function observe(observerId, callbacks, fn) {
    const callbackId = ++callbackCount;
    const getListeners = () => listenersCache.get(observerId) || [];
    const unsubscribe = () => {
      const listeners2 = getListeners();
      listenersCache.set(observerId, listeners2.filter((cb) => cb.id !== callbackId));
    };
    const unwatch = () => {
      const listeners2 = getListeners();
      if (!listeners2.some((cb) => cb.id === callbackId))
        return;
      const cleanup2 = cleanupCache.get(observerId);
      if (listeners2.length === 1 && cleanup2) {
        const p7 = cleanup2();
        if (p7 instanceof Promise)
          p7.catch(() => {
          });
      }
      unsubscribe();
    };
    const listeners = getListeners();
    listenersCache.set(observerId, [
      ...listeners,
      { id: callbackId, fns: callbacks }
    ]);
    if (listeners && listeners.length > 0)
      return unwatch;
    const emit = {};
    for (const key2 in callbacks) {
      emit[key2] = ((...args) => {
        const listeners2 = getListeners();
        if (listeners2.length === 0)
          return;
        for (const listener of listeners2)
          listener.fns[key2]?.(...args);
      });
    }
    const cleanup = fn(emit);
    if (typeof cleanup === "function")
      cleanupCache.set(observerId, cleanup);
    return unwatch;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/poll.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/wait.js
  init_node_compat_inject();
  init_utils3();
  async function wait(time3, { signal } = {}) {
    return new Promise((resolve, reject2) => {
      if (signal?.aborted) {
        reject2(getAbortError(signal));
        return;
      }
      const cleanup = () => signal?.removeEventListener("abort", onAbort);
      const timeout = setTimeout(() => {
        cleanup();
        resolve();
      }, time3);
      const onAbort = () => {
        clearTimeout(timeout);
        cleanup();
        reject2(getAbortError(signal));
      };
      signal?.addEventListener("abort", onAbort, { once: true });
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/poll.js
  function poll(fn, { emitOnBegin, initialWaitTime, interval }) {
    let active = true;
    const unwatch = () => active = false;
    const watch2 = async () => {
      let data;
      if (emitOnBegin)
        data = await fn({ unpoll: unwatch });
      const initialWait = await initialWaitTime?.(data) ?? interval;
      await wait(initialWait);
      const poll2 = async () => {
        if (!active)
          return;
        await fn({ unpoll: unwatch });
        await wait(interval);
        poll2();
      };
      poll2();
    };
    watch2();
    return unwatch;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/watchContractEvent.js
  init_stringify();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getBlockNumber.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/promise/withCache.js
  init_node_compat_inject();
  var promiseCache = /* @__PURE__ */ new Map();
  var responseCache = /* @__PURE__ */ new Map();
  function getCache(cacheKey2) {
    const buildCache = (cacheKey3, cache) => ({
      clear: () => cache.delete(cacheKey3),
      get: () => cache.get(cacheKey3),
      set: (data) => cache.set(cacheKey3, data)
    });
    const promise2 = buildCache(cacheKey2, promiseCache);
    const response = buildCache(cacheKey2, responseCache);
    return {
      clear: () => {
        promise2.clear();
        response.clear();
      },
      promise: promise2,
      response
    };
  }
  async function withCache(fn, { cacheKey: cacheKey2, cacheTime = Number.POSITIVE_INFINITY }) {
    const cache = getCache(cacheKey2);
    const response = cache.response.get();
    if (response && cacheTime > 0) {
      const age = Date.now() - response.created.getTime();
      if (age < cacheTime)
        return response.data;
    }
    let promise2 = cache.promise.get();
    if (!promise2) {
      promise2 = fn();
      cache.promise.set(promise2);
    }
    try {
      const data = await promise2;
      cache.response.set({ created: /* @__PURE__ */ new Date(), data });
      return data;
    } finally {
      cache.promise.clear();
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getBlockNumber.js
  var cacheKey = (id) => `blockNumber.${id}`;
  async function getBlockNumber(client, { cacheTime = client.cacheTime } = {}) {
    const blockNumberHex = await withCache(() => client.request({
      method: "eth_blockNumber"
    }), { cacheKey: cacheKey(client.uid), cacheTime });
    return BigInt(blockNumberHex);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getFilterChanges.js
  init_node_compat_inject();
  async function getFilterChanges(_client, { filter }) {
    const strict = "strict" in filter && filter.strict;
    const logs = await filter.request({
      method: "eth_getFilterChanges",
      params: [filter.id]
    });
    if (typeof logs[0] === "string")
      return logs;
    const formattedLogs = logs.map((log) => formatLog(log));
    if (!("abi" in filter) || !filter.abi)
      return formattedLogs;
    return parseEventLogs({
      abi: filter.abi,
      logs: formattedLogs,
      strict
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/uninstallFilter.js
  init_node_compat_inject();
  async function uninstallFilter(_client, { filter }) {
    return filter.request({
      method: "eth_uninstallFilter",
      params: [filter.id]
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/watchContractEvent.js
  function watchContractEvent(client, parameters) {
    const { abi: abi2, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;
    const enablePolling = (() => {
      if (typeof poll_ !== "undefined")
        return poll_;
      if (typeof fromBlock === "bigint")
        return true;
      if (client.transport.type === "webSocket" || client.transport.type === "ipc")
        return false;
      if (client.transport.type === "fallback" && (client.transport.transports[0].config.type === "webSocket" || client.transport.transports[0].config.type === "ipc"))
        return false;
      return true;
    })();
    const pollContractEvent = () => {
      const strict = strict_ ?? false;
      const observerId = stringify([
        "watchContractEvent",
        address,
        args,
        batch,
        client.uid,
        eventName,
        pollingInterval,
        strict,
        fromBlock
      ]);
      return observe(observerId, { onLogs, onError }, (emit) => {
        let previousBlockNumber;
        if (fromBlock !== void 0)
          previousBlockNumber = fromBlock - 1n;
        let filter;
        let initialized = false;
        const unwatch = poll(async () => {
          if (!initialized) {
            try {
              filter = await getAction(client, createContractEventFilter, "createContractEventFilter")({
                abi: abi2,
                address,
                args,
                eventName,
                strict,
                fromBlock
              });
            } catch {
            }
            initialized = true;
            return;
          }
          try {
            let logs;
            if (filter) {
              logs = await getAction(client, getFilterChanges, "getFilterChanges")({ filter });
            } else {
              const blockNumber = await getAction(client, getBlockNumber, "getBlockNumber")({});
              if (previousBlockNumber && previousBlockNumber < blockNumber) {
                logs = await getAction(client, getContractEvents, "getContractEvents")({
                  abi: abi2,
                  address,
                  args,
                  eventName,
                  fromBlock: previousBlockNumber + 1n,
                  toBlock: blockNumber,
                  strict
                });
              } else {
                logs = [];
              }
              previousBlockNumber = blockNumber;
            }
            if (logs.length === 0)
              return;
            if (batch)
              emit.onLogs(logs);
            else
              for (const log of logs)
                emit.onLogs([log]);
          } catch (err2) {
            if (filter && err2 instanceof InvalidInputRpcError)
              initialized = false;
            emit.onError?.(err2);
          }
        }, {
          emitOnBegin: true,
          interval: pollingInterval
        });
        return async () => {
          if (filter)
            await getAction(client, uninstallFilter, "uninstallFilter")({ filter });
          unwatch();
        };
      });
    };
    const subscribeContractEvent = () => {
      const strict = strict_ ?? false;
      const observerId = stringify([
        "watchContractEvent",
        address,
        args,
        batch,
        client.uid,
        eventName,
        pollingInterval,
        strict
      ]);
      let active = true;
      let unsubscribe = () => active = false;
      return observe(observerId, { onLogs, onError }, (emit) => {
        ;
        (async () => {
          try {
            const transport = (() => {
              if (client.transport.type === "fallback") {
                const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket" || transport3.config.type === "ipc");
                if (!transport2)
                  return client.transport;
                return transport2.value;
              }
              return client.transport;
            })();
            const topics = eventName ? encodeEventTopics({
              abi: abi2,
              eventName,
              args
            }) : [];
            const { unsubscribe: unsubscribe_ } = await transport.subscribe({
              params: ["logs", { address, topics }],
              onData(data) {
                if (!active)
                  return;
                const log = data.result;
                try {
                  const { eventName: eventName2, args: args2 } = decodeEventLog({
                    abi: abi2,
                    data: log.data,
                    topics: log.topics,
                    strict: strict_
                  });
                  const formatted = formatLog(log, {
                    args: args2,
                    eventName: eventName2
                  });
                  emit.onLogs([formatted]);
                } catch (err2) {
                  let eventName2;
                  let isUnnamed;
                  if (err2 instanceof DecodeLogDataMismatch || err2 instanceof DecodeLogTopicsMismatch) {
                    if (strict_)
                      return;
                    eventName2 = err2.abiItem.name;
                    isUnnamed = err2.abiItem.inputs?.some((x13) => !("name" in x13 && x13.name));
                  }
                  const formatted = formatLog(log, {
                    args: isUnnamed ? [] : {},
                    eventName: eventName2
                  });
                  emit.onLogs([formatted]);
                }
              },
              onError(error51) {
                emit.onError?.(error51);
              }
            });
            unsubscribe = unsubscribe_;
            if (!active)
              unsubscribe();
          } catch (err2) {
            onError?.(err2);
          }
        })();
        return () => unsubscribe();
      });
    };
    return enablePolling ? pollContractEvent() : subscribeContractEvent();
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/writeContract.js
  init_node_compat_inject();
  init_parseAccount();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/account.js
  init_node_compat_inject();
  init_base();
  var AccountNotFoundError = class extends BaseError2 {
    constructor({ docsPath: docsPath8 } = {}) {
      super([
        "Could not find an Account to execute with this Action.",
        "Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."
      ].join("\n"), {
        docsPath: docsPath8,
        docsSlug: "account",
        name: "AccountNotFoundError"
      });
    }
  };
  var AccountTypeNotSupportedError = class extends BaseError2 {
    constructor({ docsPath: docsPath8, metaMessages, type: type2 }) {
      super(`Account type "${type2}" is not supported.`, {
        docsPath: docsPath8,
        metaMessages,
        name: "AccountTypeNotSupportedError"
      });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/writeContract.js
  init_encodeFunctionData();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/sendTransaction.js
  init_node_compat_inject();
  init_parseAccount();
  init_base();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/chain/assertCurrentChain.js
  init_node_compat_inject();
  init_chain();
  function assertCurrentChain({ chain: chain2, currentChainId }) {
    if (!chain2)
      throw new ChainNotFoundError();
    if (currentChainId !== chain2.id)
      throw new ChainMismatchError({ chain: chain2, currentChainId });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/sendTransaction.js
  init_concat();
  init_extract();
  init_transactionRequest();
  init_lru();
  init_assertRequest();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js
  init_node_compat_inject();
  async function sendRawTransaction(client, { serializedTransaction }) {
    return client.request({
      method: "eth_sendRawTransaction",
      params: [serializedTransaction]
    }, { retryCount: 0 });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/sendTransaction.js
  var supportsWalletNamespace = new LruMap(128);
  async function sendTransaction(client, parameters) {
    const { account: account_ = client.account, assertChainId = true, chain: chain2 = client.chain, accessList, authorizationList, blobs, data, dataSuffix = typeof client.dataSuffix === "string" ? client.dataSuffix : client.dataSuffix?.value, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, type: type2, value, ...rest } = parameters;
    if (typeof account_ === "undefined")
      throw new AccountNotFoundError({
        docsPath: "/docs/actions/wallet/sendTransaction"
      });
    const account = account_ ? parseAccount(account_) : null;
    try {
      assertRequest(parameters);
      const to3 = await (async () => {
        if (parameters.to)
          return parameters.to;
        if (parameters.to === null)
          return void 0;
        if (authorizationList && authorizationList.length > 0)
          return await recoverAuthorizationAddress({
            authorization: authorizationList[0]
          }).catch(() => {
            throw new BaseError2("`to` is required. Could not infer from `authorizationList`.");
          });
        return void 0;
      })();
      if (account?.type === "json-rpc" || account === null) {
        let chainId;
        if (chain2 !== null) {
          chainId = await getAction(client, getChainId, "getChainId")({});
          if (assertChainId)
            assertCurrentChain({
              currentChainId: chainId,
              chain: chain2
            });
        }
        const chainFormat = client.chain?.formatters?.transactionRequest?.format;
        const format = chainFormat || formatTransactionRequest;
        const request = format({
          // Pick out extra data that might exist on the chain's transaction request type.
          ...extract(rest, { format: chainFormat }),
          accessList,
          account,
          authorizationList,
          blobs,
          chainId,
          data: dataSuffix ? concat([data ?? "0x", dataSuffix]) : data,
          gas,
          gasPrice,
          maxFeePerBlobGas,
          maxFeePerGas,
          maxPriorityFeePerGas,
          nonce,
          to: to3,
          type: type2,
          value
        }, "sendTransaction");
        const isWalletNamespaceSupported = supportsWalletNamespace.get(client.uid);
        const method = isWalletNamespaceSupported ? "wallet_sendTransaction" : "eth_sendTransaction";
        try {
          return await client.request({
            method,
            params: [request]
          }, { retryCount: 0 });
        } catch (e2) {
          if (isWalletNamespaceSupported === false)
            throw e2;
          const error51 = e2;
          if (error51.name === "InvalidInputRpcError" || error51.name === "InvalidParamsRpcError" || error51.name === "MethodNotFoundRpcError" || error51.name === "MethodNotSupportedRpcError") {
            return await client.request({
              method: "wallet_sendTransaction",
              params: [request]
            }, { retryCount: 0 }).then((hash5) => {
              supportsWalletNamespace.set(client.uid, true);
              return hash5;
            }).catch((e3) => {
              const walletNamespaceError = e3;
              if (walletNamespaceError.name === "MethodNotFoundRpcError" || walletNamespaceError.name === "MethodNotSupportedRpcError") {
                supportsWalletNamespace.set(client.uid, false);
                throw error51;
              }
              throw walletNamespaceError;
            });
          }
          throw error51;
        }
      }
      if (account?.type === "local") {
        const request = await getAction(client, prepareTransactionRequest, "prepareTransactionRequest")({
          account,
          accessList,
          authorizationList,
          blobs,
          chain: chain2,
          data: dataSuffix ? concat([data ?? "0x", dataSuffix]) : data,
          gas,
          gasPrice,
          maxFeePerBlobGas,
          maxFeePerGas,
          maxPriorityFeePerGas,
          nonce,
          nonceManager: account.nonceManager,
          parameters: [...defaultParameters, "sidecars"],
          type: type2,
          value,
          ...rest,
          to: to3
        });
        const serializer = chain2?.serializers?.transaction;
        const serializedTransaction = await account.signTransaction(request, {
          serializer
        });
        return await getAction(client, sendRawTransaction, "sendRawTransaction")({
          serializedTransaction
        });
      }
      if (account?.type === "smart")
        throw new AccountTypeNotSupportedError({
          metaMessages: [
            "Consider using the `sendUserOperation` Action instead."
          ],
          docsPath: "/docs/actions/bundler/sendUserOperation",
          type: "smart"
        });
      throw new AccountTypeNotSupportedError({
        docsPath: "/docs/actions/wallet/sendTransaction",
        type: account?.type
      });
    } catch (err2) {
      if (err2 instanceof AccountTypeNotSupportedError)
        throw err2;
      throw getTransactionError(err2, {
        ...parameters,
        account,
        chain: parameters.chain || void 0
      });
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/writeContract.js
  async function writeContract(client, parameters) {
    return writeContract.internal(client, sendTransaction, "sendTransaction", parameters);
  }
  (function(writeContract2) {
    async function internal2(client, actionFn, name2, parameters) {
      const { abi: abi2, account: account_ = client.account, address, args, functionName, ...request } = parameters;
      if (typeof account_ === "undefined")
        throw new AccountNotFoundError({
          docsPath: "/docs/contract/writeContract"
        });
      const account = account_ ? parseAccount(account_) : null;
      const data = encodeFunctionData({
        abi: abi2,
        args,
        functionName
      });
      try {
        return await getAction(client, actionFn, name2)({
          data,
          to: address,
          account,
          ...request
        });
      } catch (error51) {
        throw getContractError(error51, {
          abi: abi2,
          address,
          args,
          docsPath: "/docs/contract/writeContract",
          functionName,
          sender: account?.address
        });
      }
    }
    writeContract2.internal = internal2;
  })(writeContract || (writeContract = {}));

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/waitForCallsStatus.js
  init_node_compat_inject();
  init_base();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/calls.js
  init_node_compat_inject();
  init_base();
  var BundleFailedError = class extends BaseError2 {
    constructor(result) {
      super(`Call bundle failed with status: ${result.statusCode}`, {
        name: "BundleFailedError"
      });
      Object.defineProperty(this, "result", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: void 0
      });
      this.result = result;
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/waitForCallsStatus.js
  init_withResolvers();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/promise/withRetry.js
  init_node_compat_inject();
  init_utils3();
  function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry: shouldRetry2 = () => true, signal } = {}) {
    return new Promise((resolve, reject2) => {
      const attemptRetry = async ({ count = 0 } = {}) => {
        if (signal?.aborted) {
          reject2(getAbortError(signal));
          return;
        }
        const retry = async ({ error: error51 }) => {
          const delay = typeof delay_ === "function" ? delay_({ count, error: error51 }) : delay_;
          if (delay) {
            try {
              await wait(delay, { signal });
            } catch (err2) {
              reject2(err2);
              return;
            }
          }
          attemptRetry({ count: count + 1 });
        };
        try {
          const data = await fn();
          resolve(data);
        } catch (err2) {
          if (signal?.aborted) {
            reject2(getAbortError(signal));
            return;
          }
          if (isAbortError(err2)) {
            reject2(err2);
            return;
          }
          if (count < retryCount && await shouldRetry2({ count, error: err2 }))
            return retry({ error: err2 });
          reject2(err2);
        }
      };
      attemptRetry();
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/waitForCallsStatus.js
  init_stringify();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/getCallsStatus.js
  init_node_compat_inject();
  init_slice();
  init_trim();
  init_fromHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/transactionReceipt.js
  init_node_compat_inject();
  init_fromHex();
  init_formatter();
  var receiptStatuses = {
    "0x0": "reverted",
    "0x1": "success"
  };
  function formatTransactionReceipt(transactionReceipt, _6) {
    const receipt = {
      ...transactionReceipt,
      blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,
      contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,
      cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,
      effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,
      gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,
      logs: transactionReceipt.logs ? transactionReceipt.logs.map((log) => formatLog(log)) : null,
      to: transactionReceipt.to ? transactionReceipt.to : null,
      transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,
      status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,
      type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null
    };
    if (transactionReceipt.blobGasPrice)
      receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);
    if (transactionReceipt.blobGasUsed)
      receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);
    return receipt;
  }
  var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/sendCalls.js
  init_node_compat_inject();
  init_parseAccount();
  init_base();
  init_rpc();
  init_encodeFunctionData();
  init_concat();
  init_fromHex();
  init_toHex();
  var fallbackMagicIdentifier = "0x5792579257925792579257925792579257925792579257925792579257925792";
  var fallbackTransactionErrorMagicIdentifier = numberToHex(0, {
    size: 32
  });
  async function sendCalls(client, parameters) {
    const { account: account_ = client.account, chain: chain2 = client.chain, experimental_fallback, experimental_fallbackDelay = 32, forceAtomic = false, id, version: version16 = "2.0.0" } = parameters;
    const account = account_ ? parseAccount(account_) : null;
    let capabilities = parameters.capabilities;
    if (client.dataSuffix && !parameters.capabilities?.dataSuffix) {
      if (typeof client.dataSuffix === "string")
        capabilities = {
          ...parameters.capabilities,
          dataSuffix: { value: client.dataSuffix, optional: true }
        };
      else
        capabilities = {
          ...parameters.capabilities,
          dataSuffix: {
            value: client.dataSuffix.value,
            ...client.dataSuffix.required ? {} : { optional: true }
          }
        };
    }
    const calls = parameters.calls.map((call_) => {
      const call2 = call_;
      const data = call2.abi ? encodeFunctionData({
        abi: call2.abi,
        functionName: call2.functionName,
        args: call2.args
      }) : call2.data;
      return {
        data: call2.dataSuffix && data ? concat([data, call2.dataSuffix]) : data,
        to: call2.to,
        value: call2.value ? numberToHex(call2.value) : void 0
      };
    });
    try {
      const response = await client.request({
        method: "wallet_sendCalls",
        params: [
          {
            atomicRequired: forceAtomic,
            calls,
            capabilities,
            chainId: numberToHex(chain2.id),
            from: account?.address,
            id,
            version: version16
          }
        ]
      }, { retryCount: 0 });
      if (typeof response === "string")
        return { id: response };
      return response;
    } catch (err2) {
      const error51 = err2;
      if (experimental_fallback && (error51.name === "MethodNotFoundRpcError" || error51.name === "MethodNotSupportedRpcError" || error51.name === "UnknownRpcError" || error51.details.toLowerCase().includes("does not exist / is not available") || error51.details.toLowerCase().includes("missing or invalid. request()") || error51.details.toLowerCase().includes("did not match any variant of untagged enum") || error51.details.toLowerCase().includes("account upgraded to unsupported contract") || error51.details.toLowerCase().includes("eip-7702 not supported") || error51.details.toLowerCase().includes("unsupported wc_ method") || // magic.link
      error51.details.toLowerCase().includes("feature toggled misconfigured") || // Trust Wallet
      error51.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))) {
        if (capabilities) {
          const hasNonOptionalCapability = Object.values(capabilities).some((capability) => !capability.optional);
          if (hasNonOptionalCapability) {
            const message = "non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";
            throw new UnsupportedNonOptionalCapabilityError(new BaseError2(message, {
              details: message
            }));
          }
        }
        if (forceAtomic && calls.length > 1) {
          const message = "`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";
          throw new AtomicityNotSupportedError(new BaseError2(message, {
            details: message
          }));
        }
        const promises = [];
        for (const call2 of calls) {
          const promise2 = sendTransaction(client, {
            account,
            chain: chain2,
            data: call2.data,
            to: call2.to,
            value: call2.value ? hexToBigInt(call2.value) : void 0
          });
          promises.push(promise2);
          if (experimental_fallbackDelay > 0)
            await new Promise((resolve) => setTimeout(resolve, experimental_fallbackDelay));
        }
        const results = await Promise.allSettled(promises);
        if (results.every((r3) => r3.status === "rejected"))
          throw results[0].reason;
        const hashes3 = results.map((result) => {
          if (result.status === "fulfilled")
            return result.value;
          return fallbackTransactionErrorMagicIdentifier;
        });
        return {
          id: concat([
            ...hashes3,
            numberToHex(chain2.id, { size: 32 }),
            fallbackMagicIdentifier
          ])
        };
      }
      throw getTransactionError(err2, {
        ...parameters,
        account,
        chain: parameters.chain
      });
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/getCallsStatus.js
  async function getCallsStatus(client, parameters) {
    async function getStatus(id) {
      const isTransactions = id.endsWith(fallbackMagicIdentifier.slice(2));
      if (isTransactions) {
        const chainId2 = trim(sliceHex(id, -64, -32));
        const hashes3 = sliceHex(id, 0, -64).slice(2).match(/.{1,64}/g);
        const receipts2 = await Promise.all(hashes3.map((hash5) => fallbackTransactionErrorMagicIdentifier.slice(2) !== hash5 ? client.request({
          method: "eth_getTransactionReceipt",
          params: [`0x${hash5}`]
        }, { dedupe: true }) : void 0));
        const status2 = (() => {
          if (receipts2.some((r3) => r3 === null))
            return 100;
          if (receipts2.every((r3) => r3?.status === "0x1"))
            return 200;
          if (receipts2.every((r3) => r3?.status === "0x0"))
            return 500;
          return 600;
        })();
        return {
          atomic: false,
          chainId: hexToNumber(chainId2),
          receipts: receipts2.filter(Boolean),
          status: status2,
          version: "2.0.0"
        };
      }
      return client.request({
        method: "wallet_getCallsStatus",
        params: [id]
      });
    }
    const { atomic = false, chainId, receipts, version: version16 = "2.0.0", ...response } = await getStatus(parameters.id);
    const [status, statusCode] = (() => {
      const statusCode2 = response.status;
      if (statusCode2 >= 100 && statusCode2 < 200)
        return ["pending", statusCode2];
      if (statusCode2 >= 200 && statusCode2 < 300)
        return ["success", statusCode2];
      if (statusCode2 >= 300 && statusCode2 < 700)
        return ["failure", statusCode2];
      if (statusCode2 === "CONFIRMED")
        return ["success", 200];
      if (statusCode2 === "PENDING")
        return ["pending", 100];
      return [void 0, statusCode2];
    })();
    return {
      ...response,
      atomic,
      // @ts-expect-error: for backwards compatibility
      chainId: chainId ? hexToNumber(chainId) : void 0,
      receipts: receipts?.map((receipt) => ({
        ...receipt,
        blockNumber: hexToBigInt(receipt.blockNumber),
        gasUsed: hexToBigInt(receipt.gasUsed),
        status: receiptStatuses[receipt.status]
      })) ?? [],
      statusCode,
      status,
      version: version16
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/waitForCallsStatus.js
  async function waitForCallsStatus(client, parameters) {
    const {
      id,
      pollingInterval = client.pollingInterval,
      status = ({ statusCode }) => statusCode === 200 || statusCode >= 300,
      retryCount = 4,
      retryDelay = ({ count }) => ~~(1 << count) * 200,
      // exponential backoff
      timeout = 6e4,
      throwOnFailure = false
    } = parameters;
    const observerId = stringify(["waitForCallsStatus", client.uid, id]);
    const { promise: promise2, resolve, reject: reject2 } = withResolvers();
    let timer;
    const unobserve = observe(observerId, { resolve, reject: reject2 }, (emit) => {
      const unpoll = poll(async () => {
        const done = (fn) => {
          clearTimeout(timer);
          unpoll();
          fn();
          unobserve();
        };
        try {
          const result = await withRetry(async () => {
            const result2 = await getAction(client, getCallsStatus, "getCallsStatus")({ id });
            if (throwOnFailure && result2.status === "failure")
              throw new BundleFailedError(result2);
            return result2;
          }, {
            retryCount,
            delay: retryDelay
          });
          if (!status(result))
            return;
          done(() => emit.resolve(result));
        } catch (error51) {
          done(() => emit.reject(error51));
        }
      }, {
        interval: pollingInterval,
        emitOnBegin: true
      });
      return unpoll;
    });
    timer = timeout ? setTimeout(() => {
      unobserve();
      clearTimeout(timer);
      reject2(new WaitForCallsStatusTimeoutError({ id }));
    }, timeout) : void 0;
    return await promise2;
  }
  var WaitForCallsStatusTimeoutError = class extends BaseError2 {
    constructor({ id }) {
      super(`Timed out while waiting for call bundle with id "${id}" to be confirmed.`, { name: "WaitForCallsStatusTimeoutError" });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/createClient.js
  init_node_compat_inject();
  init_parseAccount();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/uid.js
  init_node_compat_inject();
  var size4 = 256;
  var index = size4;
  var buffer;
  function uid(length2 = 11) {
    if (!buffer || index + length2 > size4 * 2) {
      buffer = "";
      index = 0;
      for (let i5 = 0; i5 < size4; i5++) {
        buffer += (256 + Math.random() * 256 | 0).toString(16).substring(1);
      }
    }
    return buffer.substring(index, index++ + length2);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/createClient.js
  function createClient(parameters) {
    const { batch, chain: chain2, ccipRead, dataSuffix, key: key2 = "base", name: name2 = "Base Client", type: type2 = "base" } = parameters;
    const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain2?.experimental_preconfirmationTime === "number" ? "pending" : void 0);
    const blockTime = chain2?.blockTime ?? 12e3;
    const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4e3);
    const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;
    const cacheTime = parameters.cacheTime ?? pollingInterval;
    const account = parameters.account ? parseAccount(parameters.account) : void 0;
    const { config: config2, request, value } = parameters.transport({
      account,
      chain: chain2,
      pollingInterval
    });
    const transport = { ...config2, ...value };
    const client = {
      account,
      batch,
      cacheTime,
      ccipRead,
      chain: chain2,
      dataSuffix,
      key: key2,
      name: name2,
      pollingInterval,
      request,
      transport,
      type: type2,
      uid: uid(),
      ...experimental_blockTag ? { experimental_blockTag } : {}
    };
    function extend2(base4) {
      return (extendFn) => {
        const extended = extendFn(base4);
        for (const key3 in client)
          delete extended[key3];
        const combined = { ...base4, ...extended };
        return Object.assign(combined, { extend: extend2(combined) });
      };
    }
    return Object.assign(client, { extend: extend2(client) });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/createPublicClient.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/decorators/public.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/ens/getEnsAddress.js
  init_node_compat_inject();
  init_abis();
  init_decodeFunctionResult();
  init_encodeFunctionData();
  init_getChainContractAddress();
  init_trim();
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/errors.js
  init_node_compat_inject();
  init_base();
  init_contract();
  function isNullUniversalResolverError(err2) {
    if (!(err2 instanceof BaseError2))
      return false;
    const cause = err2.walk((e2) => e2 instanceof ContractFunctionRevertedError);
    if (!(cause instanceof ContractFunctionRevertedError))
      return false;
    if (cause.data?.errorName === "HttpError")
      return true;
    if (cause.data?.errorName === "ResolverError")
      return true;
    if (cause.data?.errorName === "ResolverNotContract")
      return true;
    if (cause.data?.errorName === "ResolverNotFound")
      return true;
    if (cause.data?.errorName === "ReverseAddressMismatch")
      return true;
    if (cause.data?.errorName === "UnsupportedResolverProfile")
      return true;
    return false;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/ens/getEnsAddress.js
  init_localBatchGatewayRequest();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/namehash.js
  init_node_compat_inject();
  init_concat();
  init_toBytes();
  init_toHex();
  init_keccak256();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js
  init_node_compat_inject();
  init_isHex();
  function encodedLabelToLabelhash(label) {
    if (label.length !== 66)
      return null;
    if (label.indexOf("[") !== 0)
      return null;
    if (label.indexOf("]") !== 65)
      return null;
    const hash5 = `0x${label.slice(1, 65)}`;
    if (!isHex(hash5))
      return null;
    return hash5;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/namehash.js
  function namehash(name2) {
    let result = new Uint8Array(32).fill(0);
    if (!name2)
      return bytesToHex(result);
    const labels = name2.split(".");
    for (let i5 = labels.length - 1; i5 >= 0; i5 -= 1) {
      const hashFromEncodedLabel = encodedLabelToLabelhash(labels[i5]);
      const hashed = hashFromEncodedLabel ? toBytes(hashFromEncodedLabel) : keccak256(stringToBytes(labels[i5]), "bytes");
      result = keccak256(concat([result, hashed]), "bytes");
    }
    return bytesToHex(result);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/packetToBytes.js
  init_node_compat_inject();
  init_toBytes();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/encodeLabelhash.js
  init_node_compat_inject();
  function encodeLabelhash(hash5) {
    return `[${hash5.slice(2)}]`;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/labelhash.js
  init_node_compat_inject();
  init_toBytes();
  init_toHex();
  init_keccak256();
  function labelhash(label) {
    const result = new Uint8Array(32).fill(0);
    if (!label)
      return bytesToHex(result);
    return encodedLabelToLabelhash(label) || keccak256(stringToBytes(label));
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/packetToBytes.js
  function packetToBytes(packet) {
    const value = packet.replace(/^\.|\.$/gm, "");
    if (value.length === 0)
      return new Uint8Array(1);
    const bytes = new Uint8Array(stringToBytes(value).byteLength + 2);
    let offset2 = 0;
    const list = value.split(".");
    for (let i5 = 0; i5 < list.length; i5++) {
      let encoded = stringToBytes(list[i5]);
      if (encoded.byteLength > 255)
        encoded = stringToBytes(encodeLabelhash(labelhash(list[i5])));
      bytes[offset2] = encoded.length;
      bytes.set(encoded, offset2 + 1);
      offset2 += encoded.length + 1;
    }
    if (bytes.byteLength !== offset2 + 1)
      return bytes.slice(0, offset2 + 1);
    return bytes;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/ens/getEnsAddress.js
  async function getEnsAddress(client, parameters) {
    const { blockNumber, blockTag, coinType, name: name2, gatewayUrls, strict } = parameters;
    const { chain: chain2 } = client;
    const universalResolverAddress = (() => {
      if (parameters.universalResolverAddress)
        return parameters.universalResolverAddress;
      if (!chain2)
        throw new Error("client chain not configured. universalResolverAddress is required.");
      return getChainContractAddress({
        blockNumber,
        chain: chain2,
        contract: "ensUniversalResolver"
      });
    })();
    const tlds = chain2?.ensTlds;
    if (tlds && !tlds.some((tld) => name2.endsWith(tld)))
      return null;
    const args = (() => {
      if (coinType != null)
        return [namehash(name2), BigInt(coinType)];
      return [namehash(name2)];
    })();
    try {
      const functionData = encodeFunctionData({
        abi: addressResolverAbi,
        functionName: "addr",
        args
      });
      const readContractParameters = {
        address: universalResolverAddress,
        abi: universalResolverResolveAbi,
        functionName: "resolveWithGateways",
        args: [
          toHex(packetToBytes(name2)),
          functionData,
          gatewayUrls ?? [localBatchGatewayUrl]
        ],
        blockNumber,
        blockTag
      };
      const readContractAction = getAction(client, readContract, "readContract");
      const res = await readContractAction(readContractParameters);
      if (res[0] === "0x")
        return null;
      const address = decodeFunctionResult({
        abi: addressResolverAbi,
        args,
        functionName: "addr",
        data: res[0]
      });
      if (address === "0x")
        return null;
      if (trim(address) === "0x00")
        return null;
      return address;
    } catch (err2) {
      if (strict)
        throw err2;
      if (isNullUniversalResolverError(err2))
        return null;
      throw err2;
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/ens/getEnsAvatar.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/avatar/utils.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/ens.js
  init_node_compat_inject();
  init_base();
  var EnsAvatarInvalidMetadataError = class extends BaseError2 {
    constructor({ data }) {
      super("Unable to extract image from metadata. The metadata may be malformed or invalid.", {
        metaMessages: [
          "- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.",
          "",
          `Provided data: ${JSON.stringify(data)}`
        ],
        name: "EnsAvatarInvalidMetadataError"
      });
    }
  };
  var EnsAvatarInvalidNftUriError = class extends BaseError2 {
    constructor({ reason }) {
      super(`ENS NFT avatar URI is invalid. ${reason}`, {
        name: "EnsAvatarInvalidNftUriError"
      });
    }
  };
  var EnsAvatarUriResolutionError = class extends BaseError2 {
    constructor({ uri }) {
      super(`Unable to resolve ENS avatar URI "${uri}". The URI may be malformed, invalid, or does not respond with a valid image.`, { name: "EnsAvatarUriResolutionError" });
    }
  };
  var EnsAvatarUnsupportedNamespaceError = class extends BaseError2 {
    constructor({ namespace }) {
      super(`ENS NFT avatar namespace "${namespace}" is not supported. Must be "erc721" or "erc1155".`, { name: "EnsAvatarUnsupportedNamespaceError" });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/avatar/utils.js
  var networkRegex = /(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/;
  var ipfsHashRegex = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/;
  var base64Regex = /^data:([a-zA-Z\-/+]*);base64,([^"].*)/;
  var dataURIRegex = /^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;
  async function isImageUri(uri) {
    try {
      const res = await fetch(uri, { method: "HEAD" });
      if (res.status === 200) {
        const contentType = res.headers.get("content-type");
        return contentType?.startsWith("image/");
      }
      return false;
    } catch (error51) {
      if (typeof error51 === "object" && typeof error51.response !== "undefined") {
        return false;
      }
      if (!Object.hasOwn(globalThis, "Image"))
        return false;
      return new Promise((resolve) => {
        const img = new Image();
        img.onload = () => {
          resolve(true);
        };
        img.onerror = () => {
          resolve(false);
        };
        img.src = uri;
      });
    }
  }
  function getGateway(custom2, defaultGateway) {
    if (!custom2)
      return defaultGateway;
    if (custom2.endsWith("/"))
      return custom2.slice(0, -1);
    return custom2;
  }
  function resolveAvatarUri({ uri, gatewayUrls }) {
    const isEncoded = base64Regex.test(uri);
    if (isEncoded)
      return { uri, isOnChain: true, isEncoded };
    const ipfsGateway = getGateway(gatewayUrls?.ipfs, "https://ipfs.io");
    const arweaveGateway = getGateway(gatewayUrls?.arweave, "https://arweave.net");
    const networkRegexMatch = uri.match(networkRegex);
    const { protocol, subpath, target, subtarget = "" } = networkRegexMatch?.groups || {};
    const isIPNS = protocol === "ipns:/" || subpath === "ipns/";
    const isIPFS = protocol === "ipfs:/" || subpath === "ipfs/" || ipfsHashRegex.test(uri);
    if (uri.startsWith("http") && !isIPNS && !isIPFS) {
      let replacedUri = uri;
      if (gatewayUrls?.arweave)
        replacedUri = uri.replace(/https:\/\/arweave.net/g, gatewayUrls?.arweave);
      return { uri: replacedUri, isOnChain: false, isEncoded: false };
    }
    if ((isIPNS || isIPFS) && target) {
      return {
        uri: `${ipfsGateway}/${isIPNS ? "ipns" : "ipfs"}/${target}${subtarget}`,
        isOnChain: false,
        isEncoded: false
      };
    }
    if (protocol === "ar:/" && target) {
      return {
        uri: `${arweaveGateway}/${target}${subtarget || ""}`,
        isOnChain: false,
        isEncoded: false
      };
    }
    let parsedUri = uri.replace(dataURIRegex, "");
    if (parsedUri.startsWith("<svg")) {
      parsedUri = `data:image/svg+xml;base64,${btoa(parsedUri)}`;
    }
    if (parsedUri.startsWith("data:") || parsedUri.startsWith("{")) {
      return {
        uri: parsedUri,
        isOnChain: true,
        isEncoded: false
      };
    }
    throw new EnsAvatarUriResolutionError({ uri });
  }
  function getJsonImage(data) {
    if (typeof data !== "object" || !("image" in data) && !("image_url" in data) && !("image_data" in data)) {
      throw new EnsAvatarInvalidMetadataError({ data });
    }
    return data.image || data.image_url || data.image_data;
  }
  async function getMetadataAvatarUri({ gatewayUrls, uri }) {
    try {
      const res = await fetch(uri).then((res2) => res2.json());
      const image = await parseAvatarUri({
        gatewayUrls,
        uri: getJsonImage(res)
      });
      return image;
    } catch {
      throw new EnsAvatarUriResolutionError({ uri });
    }
  }
  async function parseAvatarUri({ gatewayUrls, uri }) {
    const { uri: resolvedURI, isOnChain } = resolveAvatarUri({ uri, gatewayUrls });
    if (isOnChain)
      return resolvedURI;
    const isImage = await isImageUri(resolvedURI);
    if (isImage)
      return resolvedURI;
    throw new EnsAvatarUriResolutionError({ uri });
  }
  function parseNftUri(uri_) {
    let uri = uri_;
    if (uri.startsWith("did:nft:")) {
      uri = uri.replace("did:nft:", "").replace(/_/g, "/");
    }
    const [reference, asset_namespace, tokenID] = uri.split("/");
    const [eip_namespace, chainID] = reference.split(":");
    const [erc_namespace, contractAddress] = asset_namespace.split(":");
    if (!eip_namespace || eip_namespace.toLowerCase() !== "eip155")
      throw new EnsAvatarInvalidNftUriError({ reason: "Only EIP-155 supported" });
    if (!chainID)
      throw new EnsAvatarInvalidNftUriError({ reason: "Chain ID not found" });
    if (!contractAddress)
      throw new EnsAvatarInvalidNftUriError({
        reason: "Contract address not found"
      });
    if (!tokenID)
      throw new EnsAvatarInvalidNftUriError({ reason: "Token ID not found" });
    if (!erc_namespace)
      throw new EnsAvatarInvalidNftUriError({ reason: "ERC namespace not found" });
    return {
      chainID: Number.parseInt(chainID, 10),
      namespace: erc_namespace.toLowerCase(),
      contractAddress,
      tokenID
    };
  }
  async function getNftTokenUri(client, { nft }) {
    if (nft.namespace === "erc721") {
      return readContract(client, {
        address: nft.contractAddress,
        abi: [
          {
            name: "tokenURI",
            type: "function",
            stateMutability: "view",
            inputs: [{ name: "tokenId", type: "uint256" }],
            outputs: [{ name: "", type: "string" }]
          }
        ],
        functionName: "tokenURI",
        args: [BigInt(nft.tokenID)]
      });
    }
    if (nft.namespace === "erc1155") {
      return readContract(client, {
        address: nft.contractAddress,
        abi: [
          {
            name: "uri",
            type: "function",
            stateMutability: "view",
            inputs: [{ name: "_id", type: "uint256" }],
            outputs: [{ name: "", type: "string" }]
          }
        ],
        functionName: "uri",
        args: [BigInt(nft.tokenID)]
      });
    }
    throw new EnsAvatarUnsupportedNamespaceError({ namespace: nft.namespace });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js
  async function parseAvatarRecord(client, { gatewayUrls, record: record3 }) {
    if (/eip155:/i.test(record3))
      return parseNftAvatarUri(client, { gatewayUrls, record: record3 });
    return parseAvatarUri({ uri: record3, gatewayUrls });
  }
  async function parseNftAvatarUri(client, { gatewayUrls, record: record3 }) {
    const nft = parseNftUri(record3);
    const nftUri = await getNftTokenUri(client, { nft });
    const { uri: resolvedNftUri, isOnChain, isEncoded } = resolveAvatarUri({ uri: nftUri, gatewayUrls });
    if (isOnChain && (resolvedNftUri.includes("data:application/json;base64,") || resolvedNftUri.startsWith("{"))) {
      const encodedJson = isEncoded ? (
        // if it is encoded, decode it
        atob(resolvedNftUri.replace("data:application/json;base64,", ""))
      ) : (
        // if it isn't encoded assume it is a JSON string, but it could be anything (it will error if it is)
        resolvedNftUri
      );
      const decoded = JSON.parse(encodedJson);
      return parseAvatarUri({ uri: getJsonImage(decoded), gatewayUrls });
    }
    let uriTokenId = nft.tokenID;
    if (nft.namespace === "erc1155")
      uriTokenId = uriTokenId.replace("0x", "").padStart(64, "0");
    return getMetadataAvatarUri({
      gatewayUrls,
      uri: resolvedNftUri.replace(/(?:0x)?{id}/, uriTokenId)
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/ens/getEnsText.js
  init_node_compat_inject();
  init_abis();
  init_decodeFunctionResult();
  init_encodeFunctionData();
  init_getChainContractAddress();
  init_toHex();
  init_localBatchGatewayRequest();
  async function getEnsText(client, parameters) {
    const { blockNumber, blockTag, key: key2, name: name2, gatewayUrls, strict } = parameters;
    const { chain: chain2 } = client;
    const universalResolverAddress = (() => {
      if (parameters.universalResolverAddress)
        return parameters.universalResolverAddress;
      if (!chain2)
        throw new Error("client chain not configured. universalResolverAddress is required.");
      return getChainContractAddress({
        blockNumber,
        chain: chain2,
        contract: "ensUniversalResolver"
      });
    })();
    const tlds = chain2?.ensTlds;
    if (tlds && !tlds.some((tld) => name2.endsWith(tld)))
      return null;
    try {
      const readContractParameters = {
        address: universalResolverAddress,
        abi: universalResolverResolveAbi,
        args: [
          toHex(packetToBytes(name2)),
          encodeFunctionData({
            abi: textResolverAbi,
            functionName: "text",
            args: [namehash(name2), key2]
          }),
          gatewayUrls ?? [localBatchGatewayUrl]
        ],
        functionName: "resolveWithGateways",
        blockNumber,
        blockTag
      };
      const readContractAction = getAction(client, readContract, "readContract");
      const res = await readContractAction(readContractParameters);
      if (res[0] === "0x")
        return null;
      const record3 = decodeFunctionResult({
        abi: textResolverAbi,
        functionName: "text",
        data: res[0]
      });
      return record3 === "" ? null : record3;
    } catch (err2) {
      if (strict)
        throw err2;
      if (isNullUniversalResolverError(err2))
        return null;
      throw err2;
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/ens/getEnsAvatar.js
  async function getEnsAvatar(client, { blockNumber, blockTag, assetGatewayUrls, name: name2, gatewayUrls, strict, universalResolverAddress }) {
    const record3 = await getAction(client, getEnsText, "getEnsText")({
      blockNumber,
      blockTag,
      key: "avatar",
      name: name2,
      universalResolverAddress,
      gatewayUrls,
      strict
    });
    if (!record3)
      return null;
    try {
      return await parseAvatarRecord(client, {
        record: record3,
        gatewayUrls: assetGatewayUrls
      });
    } catch {
      return null;
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/ens/getEnsName.js
  init_node_compat_inject();
  init_abis();
  init_getChainContractAddress();
  init_localBatchGatewayRequest();
  async function getEnsName(client, parameters) {
    const { address, blockNumber, blockTag, coinType = 60n, gatewayUrls, strict } = parameters;
    const { chain: chain2 } = client;
    const universalResolverAddress = (() => {
      if (parameters.universalResolverAddress)
        return parameters.universalResolverAddress;
      if (!chain2)
        throw new Error("client chain not configured. universalResolverAddress is required.");
      return getChainContractAddress({
        blockNumber,
        chain: chain2,
        contract: "ensUniversalResolver"
      });
    })();
    try {
      const readContractParameters = {
        address: universalResolverAddress,
        abi: universalResolverReverseAbi,
        args: [address, coinType, gatewayUrls ?? [localBatchGatewayUrl]],
        functionName: "reverseWithGateways",
        blockNumber,
        blockTag
      };
      const readContractAction = getAction(client, readContract, "readContract");
      const [name2] = await readContractAction(readContractParameters);
      return name2 || null;
    } catch (err2) {
      if (strict)
        throw err2;
      if (isNullUniversalResolverError(err2))
        return null;
      throw err2;
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/ens/getEnsResolver.js
  init_node_compat_inject();
  init_getChainContractAddress();
  init_toHex();
  async function getEnsResolver(client, parameters) {
    const { blockNumber, blockTag, name: name2 } = parameters;
    const { chain: chain2 } = client;
    const universalResolverAddress = (() => {
      if (parameters.universalResolverAddress)
        return parameters.universalResolverAddress;
      if (!chain2)
        throw new Error("client chain not configured. universalResolverAddress is required.");
      return getChainContractAddress({
        blockNumber,
        chain: chain2,
        contract: "ensUniversalResolver"
      });
    })();
    const tlds = chain2?.ensTlds;
    if (tlds && !tlds.some((tld) => name2.endsWith(tld)))
      throw new Error(`${name2} is not a valid ENS TLD (${tlds?.join(", ")}) for chain "${chain2.name}" (id: ${chain2.id}).`);
    const [resolverAddress] = await getAction(client, readContract, "readContract")({
      address: universalResolverAddress,
      abi: [
        {
          inputs: [{ type: "bytes" }],
          name: "findResolver",
          outputs: [
            { type: "address" },
            { type: "bytes32" },
            { type: "uint256" }
          ],
          stateMutability: "view",
          type: "function"
        }
      ],
      functionName: "findResolver",
      args: [toHex(packetToBytes(name2))],
      blockNumber,
      blockTag
    });
    return resolverAddress;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/decorators/public.js
  init_call();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/createAccessList.js
  init_node_compat_inject();
  init_parseAccount();
  init_toHex();
  init_getCallError();
  init_extract();
  init_transactionRequest();
  init_assertRequest();
  async function createAccessList(client, args) {
    const { account: account_ = client.account, blockNumber, blockTag = "latest", blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, to: to3, value, ...rest } = args;
    const account = account_ ? parseAccount(account_) : void 0;
    try {
      assertRequest(args);
      const blockNumberHex = typeof blockNumber === "bigint" ? numberToHex(blockNumber) : void 0;
      const block = blockNumberHex || blockTag;
      const chainFormat = client.chain?.formatters?.transactionRequest?.format;
      const format = chainFormat || formatTransactionRequest;
      const request = format({
        // Pick out extra data that might exist on the chain's transaction request type.
        ...extract(rest, { format: chainFormat }),
        account,
        blobs,
        data,
        gas,
        gasPrice,
        maxFeePerBlobGas,
        maxFeePerGas,
        maxPriorityFeePerGas,
        to: to3,
        value
      }, "createAccessList");
      const response = await client.request({
        method: "eth_createAccessList",
        params: [request, block]
      });
      return {
        accessList: response.accessList,
        gasUsed: BigInt(response.gasUsed)
      };
    } catch (err2) {
      throw getCallError(err2, {
        ...args,
        account,
        chain: client.chain
      });
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/createBlockFilter.js
  init_node_compat_inject();
  async function createBlockFilter(client) {
    const getRequest = createFilterRequestScope(client, {
      method: "eth_newBlockFilter"
    });
    const id = await client.request({
      method: "eth_newBlockFilter"
    });
    return { id, request: getRequest(id), type: "block" };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/createEventFilter.js
  init_node_compat_inject();
  init_toHex();
  async function createEventFilter(client, { address, args, event, events: events_, fromBlock, strict, toBlock } = {}) {
    const events = events_ ?? (event ? [event] : void 0);
    const getRequest = createFilterRequestScope(client, {
      method: "eth_newFilter"
    });
    let topics = [];
    if (events) {
      const encoded = events.flatMap((event2) => encodeEventTopics({
        abi: [event2],
        eventName: event2.name,
        args
      }));
      topics = [encoded];
      if (event)
        topics = topics[0];
    }
    const id = await client.request({
      method: "eth_newFilter",
      params: [
        {
          address,
          fromBlock: typeof fromBlock === "bigint" ? numberToHex(fromBlock) : fromBlock,
          toBlock: typeof toBlock === "bigint" ? numberToHex(toBlock) : toBlock,
          ...topics.length ? { topics } : {}
        }
      ]
    });
    return {
      abi: events,
      args,
      eventName: event ? event.name : void 0,
      fromBlock,
      id,
      request: getRequest(id),
      strict: Boolean(strict),
      toBlock,
      type: "event"
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js
  init_node_compat_inject();
  async function createPendingTransactionFilter(client) {
    const getRequest = createFilterRequestScope(client, {
      method: "eth_newPendingTransactionFilter"
    });
    const id = await client.request({
      method: "eth_newPendingTransactionFilter"
    });
    return { id, request: getRequest(id), type: "transaction" };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getBalance.js
  init_node_compat_inject();
  init_abis();
  init_decodeFunctionResult();
  init_encodeFunctionData();
  init_toHex();
  init_call();
  async function getBalance(client, { address, blockNumber, blockTag = client.experimental_blockTag ?? "latest" }) {
    if (client.batch?.multicall && client.chain?.contracts?.multicall3) {
      const multicall3Address = client.chain.contracts.multicall3.address;
      const calldata = encodeFunctionData({
        abi: multicall3Abi,
        functionName: "getEthBalance",
        args: [address]
      });
      const { data } = await getAction(client, call, "call")({
        to: multicall3Address,
        data: calldata,
        blockNumber,
        blockTag
      });
      return decodeFunctionResult({
        abi: multicall3Abi,
        functionName: "getEthBalance",
        args: [address],
        data: data || "0x"
      });
    }
    const blockNumberHex = typeof blockNumber === "bigint" ? numberToHex(blockNumber) : void 0;
    const balance = await client.request({
      method: "eth_getBalance",
      params: [address, blockNumberHex || blockTag]
    });
    return BigInt(balance);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getBlobBaseFee.js
  init_node_compat_inject();
  async function getBlobBaseFee(client) {
    const baseFee = await client.request({
      method: "eth_blobBaseFee"
    });
    return BigInt(baseFee);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js
  init_node_compat_inject();
  init_fromHex();
  init_toHex();
  async function getBlockTransactionCount(client, { blockHash, blockNumber, blockTag = "latest" } = {}) {
    const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;
    let count;
    if (blockHash) {
      count = await client.request({
        method: "eth_getBlockTransactionCountByHash",
        params: [blockHash]
      }, { dedupe: true });
    } else {
      count = await client.request({
        method: "eth_getBlockTransactionCountByNumber",
        params: [blockNumberHex || blockTag]
      }, { dedupe: Boolean(blockNumberHex) });
    }
    return hexToNumber(count);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getCode.js
  init_node_compat_inject();
  init_toHex();
  async function getCode(client, { address, blockNumber, blockTag = "latest" }) {
    const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;
    const hex3 = await client.request({
      method: "eth_getCode",
      params: [address, blockNumberHex || blockTag]
    }, { dedupe: Boolean(blockNumberHex) });
    if (hex3 === "0x")
      return void 0;
    return hex3;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getDelegation.js
  init_node_compat_inject();
  init_getAddress();
  init_size();
  init_slice();
  async function getDelegation(client, { address, blockNumber, blockTag = "latest" }) {
    const code2 = await getCode(client, {
      address,
      ...blockNumber !== void 0 ? { blockNumber } : { blockTag }
    });
    if (!code2)
      return void 0;
    if (size(code2) !== 23)
      return void 0;
    if (!code2.startsWith("0xef0100"))
      return void 0;
    return getAddress(slice(code2, 3, 23));
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getEip712Domain.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/eip712.js
  init_node_compat_inject();
  init_base();
  var Eip712DomainNotFoundError = class extends BaseError2 {
    constructor({ address }) {
      super(`No EIP-712 domain found on contract "${address}".`, {
        metaMessages: [
          "Ensure that:",
          `- The contract is deployed at the address "${address}".`,
          "- `eip712Domain()` function exists on the contract.",
          "- `eip712Domain()` function matches signature to ERC-5267 specification."
        ],
        name: "Eip712DomainNotFoundError"
      });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getEip712Domain.js
  async function getEip712Domain(client, parameters) {
    const { address, factory, factoryData } = parameters;
    try {
      const [fields, name2, version16, chainId, verifyingContract, salt, extensions] = await getAction(client, readContract, "readContract")({
        abi,
        address,
        functionName: "eip712Domain",
        factory,
        factoryData
      });
      return {
        domain: {
          name: name2,
          version: version16,
          chainId: Number(chainId),
          verifyingContract,
          salt
        },
        extensions,
        fields
      };
    } catch (e2) {
      const error51 = e2;
      if (error51.name === "ContractFunctionExecutionError" && error51.cause.name === "ContractFunctionZeroDataError") {
        throw new Eip712DomainNotFoundError({ address });
      }
      throw error51;
    }
  }
  var abi = [
    {
      inputs: [],
      name: "eip712Domain",
      outputs: [
        { name: "fields", type: "bytes1" },
        { name: "name", type: "string" },
        { name: "version", type: "string" },
        { name: "chainId", type: "uint256" },
        { name: "verifyingContract", type: "address" },
        { name: "salt", type: "bytes32" },
        { name: "extensions", type: "uint256[]" }
      ],
      stateMutability: "view",
      type: "function"
    }
  ];

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getFeeHistory.js
  init_node_compat_inject();
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/feeHistory.js
  init_node_compat_inject();
  function formatFeeHistory(feeHistory) {
    return {
      baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),
      gasUsedRatio: feeHistory.gasUsedRatio,
      oldestBlock: BigInt(feeHistory.oldestBlock),
      reward: feeHistory.reward?.map((reward) => reward.map((value) => BigInt(value)))
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getFeeHistory.js
  async function getFeeHistory(client, { blockCount, blockNumber, blockTag = "latest", rewardPercentiles }) {
    const blockNumberHex = typeof blockNumber === "bigint" ? numberToHex(blockNumber) : void 0;
    const feeHistory = await client.request({
      method: "eth_feeHistory",
      params: [
        numberToHex(blockCount),
        blockNumberHex || blockTag,
        rewardPercentiles
      ]
    }, { dedupe: Boolean(blockNumberHex) });
    return formatFeeHistory(feeHistory);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getFilterLogs.js
  init_node_compat_inject();
  async function getFilterLogs(_client, { filter }) {
    const strict = filter.strict ?? false;
    const logs = await filter.request({
      method: "eth_getFilterLogs",
      params: [filter.id]
    });
    const formattedLogs = logs.map((log) => formatLog(log));
    if (!filter.abi)
      return formattedLogs;
    return parseEventLogs({
      abi: filter.abi,
      logs: formattedLogs,
      strict
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getProof.js
  init_node_compat_inject();
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/proof.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
  init_node_compat_inject();
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/transaction/serializeTransaction.js
  init_node_compat_inject();
  init_transaction();
  init_concat();
  init_trim();
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/transaction/assertTransaction.js
  init_node_compat_inject();
  init_number();
  init_address();
  init_base();
  init_chain();
  init_node();
  init_isAddress();
  init_size();
  init_slice();
  init_fromHex();
  function assertTransactionEIP7702(transaction) {
    const { authorizationList } = transaction;
    if (authorizationList) {
      for (const authorization of authorizationList) {
        const { chainId } = authorization;
        const address = authorization.address;
        if (!isAddress(address))
          throw new InvalidAddressError({ address });
        if (chainId < 0)
          throw new InvalidChainIdError({ chainId });
      }
    }
    assertTransactionEIP1559(transaction);
  }
  function assertTransactionEIP4844(transaction) {
    const { blobVersionedHashes } = transaction;
    if (blobVersionedHashes) {
      if (blobVersionedHashes.length === 0)
        throw new EmptyBlobError();
      for (const hash5 of blobVersionedHashes) {
        const size_ = size(hash5);
        const version16 = hexToNumber(slice(hash5, 0, 1));
        if (size_ !== 32)
          throw new InvalidVersionedHashSizeError({ hash: hash5, size: size_ });
        if (version16 !== versionedHashVersionKzg)
          throw new InvalidVersionedHashVersionError({
            hash: hash5,
            version: version16
          });
      }
    }
    assertTransactionEIP1559(transaction);
  }
  function assertTransactionEIP1559(transaction) {
    const { chainId, maxPriorityFeePerGas, maxFeePerGas, to: to3 } = transaction;
    if (chainId <= 0)
      throw new InvalidChainIdError({ chainId });
    if (to3 && !isAddress(to3))
      throw new InvalidAddressError({ address: to3 });
    if (maxFeePerGas && maxFeePerGas > maxUint256)
      throw new FeeCapTooHighError({ maxFeePerGas });
    if (maxPriorityFeePerGas && maxFeePerGas && maxPriorityFeePerGas > maxFeePerGas)
      throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });
  }
  function assertTransactionEIP2930(transaction) {
    const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to: to3 } = transaction;
    if (chainId <= 0)
      throw new InvalidChainIdError({ chainId });
    if (to3 && !isAddress(to3))
      throw new InvalidAddressError({ address: to3 });
    if (maxPriorityFeePerGas || maxFeePerGas)
      throw new BaseError2("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");
    if (gasPrice && gasPrice > maxUint256)
      throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });
  }
  function assertTransactionLegacy(transaction) {
    const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to: to3 } = transaction;
    if (to3 && !isAddress(to3))
      throw new InvalidAddressError({ address: to3 });
    if (typeof chainId !== "undefined" && chainId <= 0)
      throw new InvalidChainIdError({ chainId });
    if (maxPriorityFeePerGas || maxFeePerGas)
      throw new BaseError2("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");
    if (gasPrice && gasPrice > maxUint256)
      throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/transaction/serializeAccessList.js
  init_node_compat_inject();
  init_address();
  init_transaction();
  init_isAddress();
  function serializeAccessList(accessList) {
    if (!accessList || accessList.length === 0)
      return [];
    const serializedAccessList = [];
    for (let i5 = 0; i5 < accessList.length; i5++) {
      const { address, storageKeys } = accessList[i5];
      for (let j6 = 0; j6 < storageKeys.length; j6++) {
        if (storageKeys[j6].length - 2 !== 64) {
          throw new InvalidStorageKeySizeError({ storageKey: storageKeys[j6] });
        }
      }
      if (!isAddress(address, { strict: false })) {
        throw new InvalidAddressError({ address });
      }
      serializedAccessList.push([address, storageKeys]);
    }
    return serializedAccessList;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/transaction/serializeTransaction.js
  function serializeTransaction(transaction, signature2) {
    const type2 = getTransactionType(transaction);
    if (type2 === "eip1559")
      return serializeTransactionEIP1559(transaction, signature2);
    if (type2 === "eip2930")
      return serializeTransactionEIP2930(transaction, signature2);
    if (type2 === "eip4844")
      return serializeTransactionEIP4844(transaction, signature2);
    if (type2 === "eip7702")
      return serializeTransactionEIP7702(transaction, signature2);
    return serializeTransactionLegacy(transaction, signature2);
  }
  function serializeTransactionEIP7702(transaction, signature2) {
    const { authorizationList, chainId, gas, nonce, to: to3, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;
    assertTransactionEIP7702(transaction);
    const serializedAccessList = serializeAccessList(accessList);
    const serializedAuthorizationList = serializeAuthorizationList(authorizationList);
    return concatHex([
      "0x04",
      toRlp([
        numberToHex(chainId),
        nonce ? numberToHex(nonce) : "0x",
        maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : "0x",
        maxFeePerGas ? numberToHex(maxFeePerGas) : "0x",
        gas ? numberToHex(gas) : "0x",
        to3 ?? "0x",
        value ? numberToHex(value) : "0x",
        data ?? "0x",
        serializedAccessList,
        serializedAuthorizationList,
        ...toYParitySignatureArray(transaction, signature2)
      ])
    ]);
  }
  function serializeTransactionEIP4844(transaction, signature2) {
    const { chainId, gas, nonce, to: to3, value, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;
    assertTransactionEIP4844(transaction);
    let blobVersionedHashes = transaction.blobVersionedHashes;
    let sidecars = transaction.sidecars;
    if (transaction.blobs && (typeof blobVersionedHashes === "undefined" || typeof sidecars === "undefined")) {
      const blobs2 = typeof transaction.blobs[0] === "string" ? transaction.blobs : transaction.blobs.map((x13) => bytesToHex(x13));
      const kzg = transaction.kzg;
      const commitments2 = blobsToCommitments({
        blobs: blobs2,
        kzg
      });
      if (typeof blobVersionedHashes === "undefined")
        blobVersionedHashes = commitmentsToVersionedHashes({
          commitments: commitments2
        });
      if (typeof sidecars === "undefined") {
        const proofs2 = blobsToProofs({ blobs: blobs2, commitments: commitments2, kzg });
        sidecars = toBlobSidecars({ blobs: blobs2, commitments: commitments2, proofs: proofs2 });
      }
    }
    const serializedAccessList = serializeAccessList(accessList);
    const serializedTransaction = [
      numberToHex(chainId),
      nonce ? numberToHex(nonce) : "0x",
      maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : "0x",
      maxFeePerGas ? numberToHex(maxFeePerGas) : "0x",
      gas ? numberToHex(gas) : "0x",
      to3 ?? "0x",
      value ? numberToHex(value) : "0x",
      data ?? "0x",
      serializedAccessList,
      maxFeePerBlobGas ? numberToHex(maxFeePerBlobGas) : "0x",
      blobVersionedHashes ?? [],
      ...toYParitySignatureArray(transaction, signature2)
    ];
    const blobs = [];
    const commitments = [];
    const proofs = [];
    if (sidecars)
      for (let i5 = 0; i5 < sidecars.length; i5++) {
        const { blob: blob5, commitment, proof } = sidecars[i5];
        blobs.push(blob5);
        commitments.push(commitment);
        proofs.push(proof);
      }
    return concatHex([
      "0x03",
      sidecars ? (
        // If sidecars are enabled, envelope turns into a "wrapper":
        toRlp([serializedTransaction, blobs, commitments, proofs])
      ) : (
        // If sidecars are disabled, standard envelope is used:
        toRlp(serializedTransaction)
      )
    ]);
  }
  function serializeTransactionEIP1559(transaction, signature2) {
    const { chainId, gas, nonce, to: to3, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;
    assertTransactionEIP1559(transaction);
    const serializedAccessList = serializeAccessList(accessList);
    const serializedTransaction = [
      numberToHex(chainId),
      nonce ? numberToHex(nonce) : "0x",
      maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : "0x",
      maxFeePerGas ? numberToHex(maxFeePerGas) : "0x",
      gas ? numberToHex(gas) : "0x",
      to3 ?? "0x",
      value ? numberToHex(value) : "0x",
      data ?? "0x",
      serializedAccessList,
      ...toYParitySignatureArray(transaction, signature2)
    ];
    return concatHex([
      "0x02",
      toRlp(serializedTransaction)
    ]);
  }
  function serializeTransactionEIP2930(transaction, signature2) {
    const { chainId, gas, data, nonce, to: to3, value, accessList, gasPrice } = transaction;
    assertTransactionEIP2930(transaction);
    const serializedAccessList = serializeAccessList(accessList);
    const serializedTransaction = [
      numberToHex(chainId),
      nonce ? numberToHex(nonce) : "0x",
      gasPrice ? numberToHex(gasPrice) : "0x",
      gas ? numberToHex(gas) : "0x",
      to3 ?? "0x",
      value ? numberToHex(value) : "0x",
      data ?? "0x",
      serializedAccessList,
      ...toYParitySignatureArray(transaction, signature2)
    ];
    return concatHex([
      "0x01",
      toRlp(serializedTransaction)
    ]);
  }
  function serializeTransactionLegacy(transaction, signature2) {
    const { chainId = 0, gas, data, nonce, to: to3, value, gasPrice } = transaction;
    assertTransactionLegacy(transaction);
    let serializedTransaction = [
      nonce ? numberToHex(nonce) : "0x",
      gasPrice ? numberToHex(gasPrice) : "0x",
      gas ? numberToHex(gas) : "0x",
      to3 ?? "0x",
      value ? numberToHex(value) : "0x",
      data ?? "0x"
    ];
    if (signature2) {
      const v13 = (() => {
        if (signature2.v >= 35n) {
          const inferredChainId = (signature2.v - 35n) / 2n;
          if (inferredChainId > 0)
            return signature2.v;
          return 27n + (signature2.v === 35n ? 0n : 1n);
        }
        if (chainId > 0)
          return BigInt(chainId * 2) + BigInt(35n + signature2.v - 27n);
        const v14 = 27n + (signature2.v === 27n ? 0n : 1n);
        if (signature2.v !== v14)
          throw new InvalidLegacyVError({ v: signature2.v });
        return v14;
      })();
      const r3 = trim(signature2.r);
      const s3 = trim(signature2.s);
      serializedTransaction = [
        ...serializedTransaction,
        numberToHex(v13),
        r3 === "0x00" ? "0x" : r3,
        s3 === "0x00" ? "0x" : s3
      ];
    } else if (chainId > 0) {
      serializedTransaction = [
        ...serializedTransaction,
        numberToHex(chainId),
        "0x",
        "0x"
      ];
    }
    return toRlp(serializedTransaction);
  }
  function toYParitySignatureArray(transaction, signature_) {
    const signature2 = signature_ ?? transaction;
    const { v: v13, yParity } = signature2;
    if (typeof signature2.r === "undefined")
      return [];
    if (typeof signature2.s === "undefined")
      return [];
    if (typeof v13 === "undefined" && typeof yParity === "undefined")
      return [];
    const r3 = trim(signature2.r);
    const s3 = trim(signature2.s);
    const yParity_ = (() => {
      if (typeof yParity === "number")
        return yParity ? numberToHex(1) : "0x";
      if (v13 === 0n)
        return "0x";
      if (v13 === 1n)
        return numberToHex(1);
      return v13 === 27n ? "0x" : numberToHex(1);
    })();
    return [yParity_, r3 === "0x00" ? "0x" : r3, s3 === "0x00" ? "0x" : s3];
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
  function serializeAuthorizationList(authorizationList) {
    if (!authorizationList || authorizationList.length === 0)
      return [];
    const serializedAuthorizationList = [];
    for (const authorization of authorizationList) {
      const { chainId, nonce, ...signature2 } = authorization;
      const contractAddress = authorization.address;
      serializedAuthorizationList.push([
        chainId ? toHex(chainId) : "0x",
        contractAddress,
        nonce ? toHex(nonce) : "0x",
        ...toYParitySignatureArray({}, signature2)
      ]);
    }
    return serializedAuthorizationList;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js
  init_node_compat_inject();
  init_getAddress();
  init_isAddressEqual();
  async function verifyAuthorization({ address, authorization, signature: signature2 }) {
    return isAddressEqual(getAddress(address), await recoverAuthorizationAddress({
      authorization,
      signature: signature2
    }));
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/buildRequest.js
  init_node_compat_inject();
  init_base();
  init_request();
  init_rpc();
  init_utils3();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/promise/withDedupe.js
  init_node_compat_inject();
  init_lru();
  var promiseCache2 = /* @__PURE__ */ new LruMap(8192);
  function withDedupe(fn, { enabled = true, id }) {
    if (!enabled || !id)
      return fn();
    if (promiseCache2.get(id))
      return promiseCache2.get(id);
    const promise2 = fn().finally(() => promiseCache2.delete(id));
    promiseCache2.set(id, promise2);
    return promise2;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/buildRequest.js
  init_stringify();
  function buildRequest(request, options = {}) {
    return async (args, overrideOptions = {}) => {
      const { dedupe = false, methods, retryDelay = 150, retryCount = 3, signal, uid: uid2 } = {
        ...options,
        ...overrideOptions
      };
      const { method } = args;
      if (methods?.exclude?.includes(method))
        throw new MethodNotSupportedRpcError(new Error("method not supported"), {
          method
        });
      if (methods?.include && !methods.include.includes(method))
        throw new MethodNotSupportedRpcError(new Error("method not supported"), {
          method
        });
      if (signal?.aborted)
        throw getAbortError(signal);
      const requestId = dedupe ? hashString(`${uid2}.${stringify(args)}`) : void 0;
      return withDedupe(() => withRetry(async () => {
        try {
          return await request(args, signal ? { signal } : void 0);
        } catch (err_) {
          if (signal?.aborted)
            throw getAbortError(signal);
          if (isAbortError(err_))
            throw err_;
          const err2 = err_;
          switch (err2.code) {
            // -32700
            case ParseRpcError.code:
              throw new ParseRpcError(err2);
            // -32600
            case InvalidRequestRpcError.code:
              throw new InvalidRequestRpcError(err2);
            // -32601
            case MethodNotFoundRpcError.code:
              throw new MethodNotFoundRpcError(err2, { method: args.method });
            // -32602
            case InvalidParamsRpcError.code:
              throw new InvalidParamsRpcError(err2);
            // -32603
            case InternalRpcError.code:
              throw new InternalRpcError(err2);
            // -32000
            case InvalidInputRpcError.code:
              throw new InvalidInputRpcError(err2);
            // -32001
            case ResourceNotFoundRpcError.code:
              throw new ResourceNotFoundRpcError(err2);
            // -32002
            case ResourceUnavailableRpcError.code:
              throw new ResourceUnavailableRpcError(err2);
            // -32003
            case TransactionRejectedRpcError.code:
              throw new TransactionRejectedRpcError(err2);
            // -32004
            case MethodNotSupportedRpcError.code:
              throw new MethodNotSupportedRpcError(err2, {
                method: args.method
              });
            // -32005
            case LimitExceededRpcError.code:
              throw new LimitExceededRpcError(err2);
            // -32006
            case JsonRpcVersionUnsupportedError.code:
              throw new JsonRpcVersionUnsupportedError(err2);
            // 4001
            case UserRejectedRequestError.code:
              throw new UserRejectedRequestError(err2);
            // 4100
            case UnauthorizedProviderError.code:
              throw new UnauthorizedProviderError(err2);
            // 4200
            case UnsupportedProviderMethodError.code:
              throw new UnsupportedProviderMethodError(err2);
            // 4900
            case ProviderDisconnectedError.code:
              throw new ProviderDisconnectedError(err2);
            // 4901
            case ChainDisconnectedError.code:
              throw new ChainDisconnectedError(err2);
            // 4902
            case SwitchChainError.code:
              throw new SwitchChainError(err2);
            // 5700
            case UnsupportedNonOptionalCapabilityError.code:
              throw new UnsupportedNonOptionalCapabilityError(err2);
            // 5710
            case UnsupportedChainIdError.code:
              throw new UnsupportedChainIdError(err2);
            // 5720
            case DuplicateIdError.code:
              throw new DuplicateIdError(err2);
            // 5730
            case UnknownBundleIdError.code:
              throw new UnknownBundleIdError(err2);
            // 5740
            case BundleTooLargeError.code:
              throw new BundleTooLargeError(err2);
            // 5750
            case AtomicReadyWalletRejectedUpgradeError.code:
              throw new AtomicReadyWalletRejectedUpgradeError(err2);
            // 5760
            case AtomicityNotSupportedError.code:
              throw new AtomicityNotSupportedError(err2);
            // CAIP-25: User Rejected Error
            // https://docs.walletconnect.com/2.0/specs/clients/sign/error-codes#rejected-caip-25
            case 5e3:
              throw new UserRejectedRequestError(err2);
            // WalletConnect: Session Settlement Failed
            // https://docs.walletconnect.com/2.0/specs/clients/sign/error-codes
            case WalletConnectSessionSettlementError.code:
              throw new WalletConnectSessionSettlementError(err2);
            default:
              if (err_ instanceof BaseError2)
                throw err_;
              throw new UnknownRpcError(err2);
          }
        }
      }, {
        delay: ({ count, error: error51 }) => {
          if (error51 && error51 instanceof HttpRequestError) {
            const retryAfter = error51?.headers?.get("Retry-After");
            if (retryAfter?.match(/\d/))
              return Number.parseInt(retryAfter, 10) * 1e3;
          }
          return ~~(1 << count) * retryDelay;
        },
        retryCount,
        signal,
        shouldRetry: ({ error: error51 }) => shouldRetry(error51)
      }), { enabled: dedupe, id: requestId });
    };
  }
  function shouldRetry(error51) {
    if (isAbortError(error51))
      return false;
    if ("code" in error51 && typeof error51.code === "number") {
      if (error51.code === -1)
        return true;
      if (error51.code === LimitExceededRpcError.code)
        return true;
      if (error51.code === InternalRpcError.code)
        return true;
      if (error51.code === 429)
        return true;
      return false;
    }
    if (error51 instanceof HttpRequestError && error51.status) {
      if (error51.status === 403)
        return true;
      if (error51.status === 408)
        return true;
      if (error51.status === 413)
        return true;
      if (error51.status === 429)
        return true;
      if (error51.status === 500)
        return true;
      if (error51.status === 502)
        return true;
      if (error51.status === 503)
        return true;
      if (error51.status === 504)
        return true;
      return false;
    }
    return true;
  }
  function hashString(str, seed = 0) {
    let h1 = 3735928559 ^ seed;
    let h22 = 1103547991 ^ seed;
    for (let i5 = 0; i5 < str.length; i5++) {
      const ch = str.charCodeAt(i5);
      h1 = Math.imul(h1 ^ ch, 2654435761);
      h22 = Math.imul(h22 ^ ch, 1597334677);
    }
    h1 = Math.imul(h1 ^ h1 >>> 16, 2246822507);
    h1 ^= Math.imul(h22 ^ h22 >>> 16, 3266489909);
    h22 = Math.imul(h22 ^ h22 >>> 16, 2246822507);
    h22 ^= Math.imul(h1 ^ h1 >>> 16, 3266489909);
    return (4294967296 * (2097151 & h22) + (h1 >>> 0)).toString(36);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/chain/defineChain.js
  init_node_compat_inject();
  function defineChain(chain2) {
    const chainInstance = {
      formatters: void 0,
      fees: void 0,
      serializers: void 0,
      ...chain2
    };
    function extend2(base4) {
      return (fnOrExtended) => {
        const properties = typeof fnOrExtended === "function" ? fnOrExtended(base4) : fnOrExtended;
        const combined = { ...base4, ...properties };
        return Object.assign(combined, { extend: extend2(combined) });
      };
    }
    return Object.assign(chainInstance, {
      extend: extend2(chainInstance)
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/index.js
  init_fromHex();

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/legacy.js
  init_node_compat_inject();
  init_md();
  init_utils2();
  var Rho160 = /* @__PURE__ */ Uint8Array.from([
    7,
    4,
    13,
    1,
    10,
    6,
    15,
    3,
    12,
    0,
    9,
    5,
    2,
    14,
    11,
    8
  ]);
  var Id160 = /* @__PURE__ */ (() => Uint8Array.from(new Array(16).fill(0).map((_6, i5) => i5)))();
  var Pi160 = /* @__PURE__ */ (() => Id160.map((i5) => (9 * i5 + 5) % 16))();
  var idxLR = /* @__PURE__ */ (() => {
    const L6 = [Id160];
    const R6 = [Pi160];
    const res = [L6, R6];
    for (let i5 = 0; i5 < 4; i5++)
      for (let j6 of res)
        j6.push(j6[i5].map((k7) => Rho160[k7]));
    return res;
  })();
  var idxL = /* @__PURE__ */ (() => idxLR[0])();
  var idxR = /* @__PURE__ */ (() => idxLR[1])();
  var shifts160 = /* @__PURE__ */ [
    [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
    [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],
    [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
    [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
    [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
  ].map((i5) => Uint8Array.from(i5));
  var shiftsL160 = /* @__PURE__ */ idxL.map((idx, i5) => idx.map((j6) => shifts160[i5][j6]));
  var shiftsR160 = /* @__PURE__ */ idxR.map((idx, i5) => idx.map((j6) => shifts160[i5][j6]));
  var Kl160 = /* @__PURE__ */ Uint32Array.from([
    0,
    1518500249,
    1859775393,
    2400959708,
    2840853838
  ]);
  var Kr160 = /* @__PURE__ */ Uint32Array.from([
    1352829926,
    1548603684,
    1836072691,
    2053994217,
    0
  ]);
  function ripemd_f(group, x13, y11, z11) {
    if (group === 0)
      return x13 ^ y11 ^ z11;
    if (group === 1)
      return x13 & y11 | ~x13 & z11;
    if (group === 2)
      return (x13 | ~y11) ^ z11;
    if (group === 3)
      return x13 & z11 | y11 & ~z11;
    return x13 ^ (y11 | ~z11);
  }
  var BUF_160 = /* @__PURE__ */ new Uint32Array(16);
  var RIPEMD160 = class extends HashMD {
    constructor() {
      super(64, 20, 8, true);
      this.h0 = 1732584193 | 0;
      this.h1 = 4023233417 | 0;
      this.h2 = 2562383102 | 0;
      this.h3 = 271733878 | 0;
      this.h4 = 3285377520 | 0;
    }
    get() {
      const { h0, h1, h2: h22, h3: h32, h4: h42 } = this;
      return [h0, h1, h22, h32, h42];
    }
    set(h0, h1, h22, h32, h42) {
      this.h0 = h0 | 0;
      this.h1 = h1 | 0;
      this.h2 = h22 | 0;
      this.h3 = h32 | 0;
      this.h4 = h42 | 0;
    }
    process(view, offset2) {
      for (let i5 = 0; i5 < 16; i5++, offset2 += 4)
        BUF_160[i5] = view.getUint32(offset2, true);
      let al = this.h0 | 0, ar5 = al, bl = this.h1 | 0, br6 = bl, cl = this.h2 | 0, cr6 = cl, dl = this.h3 | 0, dr5 = dl, el = this.h4 | 0, er5 = el;
      for (let group = 0; group < 5; group++) {
        const rGroup = 4 - group;
        const hbl = Kl160[group], hbr = Kr160[group];
        const rl = idxL[group], rr4 = idxR[group];
        const sl = shiftsL160[group], sr4 = shiftsR160[group];
        for (let i5 = 0; i5 < 16; i5++) {
          const tl = rotl(al + ripemd_f(group, bl, cl, dl) + BUF_160[rl[i5]] + hbl, sl[i5]) + el | 0;
          al = el, el = dl, dl = rotl(cl, 10) | 0, cl = bl, bl = tl;
        }
        for (let i5 = 0; i5 < 16; i5++) {
          const tr4 = rotl(ar5 + ripemd_f(rGroup, br6, cr6, dr5) + BUF_160[rr4[i5]] + hbr, sr4[i5]) + er5 | 0;
          ar5 = er5, er5 = dr5, dr5 = rotl(cr6, 10) | 0, cr6 = br6, br6 = tr4;
        }
      }
      this.set(this.h1 + cl + dr5 | 0, this.h2 + dl + er5 | 0, this.h3 + el + ar5 | 0, this.h4 + al + br6 | 0, this.h0 + bl + cr6 | 0);
    }
    roundClean() {
      clean(BUF_160);
    }
    destroy() {
      this.destroyed = true;
      clean(this.buffer);
      this.set(0, 0, 0, 0, 0);
    }
  };
  var ripemd160 = /* @__PURE__ */ createHasher(() => new RIPEMD160());

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/rpc/http.js
  init_node_compat_inject();
  init_request();
  init_utils3();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/promise/withTimeout.js
  init_node_compat_inject();
  init_utils3();
  function withTimeout(fn, { errorInstance = new Error("timed out"), timeout, signal }) {
    return new Promise((resolve, reject2) => {
      ;
      (async () => {
        let timeoutId;
        const controller = new AbortController();
        try {
          if (timeout > 0) {
            timeoutId = setTimeout(() => {
              if (signal) {
                controller.abort();
              } else {
                reject2(errorInstance);
              }
            }, timeout);
          }
          resolve(await fn({ signal: controller?.signal || null }));
        } catch (err2) {
          if (controller?.signal.aborted && isAbortError(err2)) {
            reject2(errorInstance);
            return;
          }
          reject2(err2);
        } finally {
          clearTimeout(timeoutId);
        }
      })();
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/rpc/http.js
  init_stringify();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/rpc/id.js
  init_node_compat_inject();
  function createIdStore() {
    return {
      current: 0,
      take() {
        return this.current++;
      },
      reset() {
        this.current = 0;
      }
    };
  }
  var idCache = /* @__PURE__ */ createIdStore();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/rpc/http.js
  function getHttpRpcClient(url_, options = {}) {
    const { url: url2, headers: headers_url } = parseUrl(url_);
    return {
      async request(params) {
        const { body, fetchFn = options.fetchFn ?? fetch, onRequest = options.onRequest, onResponse = options.onResponse, timeout = options.timeout ?? 1e4 } = params;
        const fetchOptions = {
          ...options.fetchOptions ?? {},
          ...params.fetchOptions ?? {}
        };
        const { headers, method, signal: signal_ } = fetchOptions;
        try {
          const response = await withTimeout(async ({ signal }) => {
            const init2 = {
              ...fetchOptions,
              body: Array.isArray(body) ? stringify(body.map((body2) => ({
                jsonrpc: "2.0",
                id: body2.id ?? idCache.take(),
                ...body2
              }))) : stringify({
                jsonrpc: "2.0",
                id: body.id ?? idCache.take(),
                ...body
              }),
              headers: {
                ...headers_url,
                "Content-Type": "application/json",
                ...headers
              },
              method: method || "POST",
              signal: signal_ || (timeout > 0 ? signal : null)
            };
            const request = new Request(url2, init2);
            const args = await onRequest?.(request, init2) ?? { ...init2, url: url2 };
            const response2 = await fetchFn(args.url ?? url2, args);
            return response2;
          }, {
            errorInstance: new TimeoutError({ body, url: url2 }),
            timeout,
            signal: true
          });
          if (onResponse)
            await onResponse(response);
          let data;
          if (response.headers.get("Content-Type")?.startsWith("application/json"))
            data = await response.json();
          else {
            data = await response.text();
            try {
              data = JSON.parse(data || "{}");
            } catch (err2) {
              if (response.ok)
                throw err2;
              data = { error: data };
            }
          }
          if (!response.ok) {
            if (typeof data.error?.code === "number" && typeof data.error?.message === "string")
              return data;
            throw new HttpRequestError({
              body,
              details: stringify(data.error) || response.statusText,
              headers: response.headers,
              status: response.status,
              url: url2
            });
          }
          return data;
        } catch (err2) {
          if (signal_?.aborted)
            throw getAbortError(signal_);
          if (isAbortError(err2))
            throw err2;
          if (err2 instanceof HttpRequestError)
            throw err2;
          if (err2 instanceof TimeoutError)
            throw err2;
          throw new HttpRequestError({
            body,
            cause: err2,
            url: url2
          });
        }
      }
    };
  }
  function parseUrl(url_) {
    try {
      const url2 = new URL(url_);
      const result = (() => {
        if (url2.username) {
          const credentials = `${decodeURIComponent(url2.username)}:${decodeURIComponent(url2.password)}`;
          url2.username = "";
          url2.password = "";
          return {
            url: url2.toString(),
            headers: { Authorization: `Basic ${btoa(credentials)}` }
          };
        }
        return;
      })();
      return { url: url2.toString(), ...result };
    } catch {
      return { url: url_ };
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/signature/hashMessage.js
  init_node_compat_inject();
  init_keccak256();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/strings.js
  init_node_compat_inject();
  var presignMessagePrefix = "Ethereum Signed Message:\n";

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js
  init_concat();
  init_size();
  init_toHex();
  function toPrefixedMessage(message_) {
    const message = (() => {
      if (typeof message_ === "string")
        return stringToHex(message_);
      if (typeof message_.raw === "string")
        return message_.raw;
      return bytesToHex(message_.raw);
    })();
    const prefix = stringToHex(`${presignMessagePrefix}${size(message)}`);
    return concat([prefix, message]);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/signature/hashMessage.js
  function hashMessage(message, to_) {
    return keccak256(toPrefixedMessage(message), to_);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/signature/hashTypedData.js
  init_node_compat_inject();
  init_encodeAbiParameters();
  init_concat();
  init_toHex();
  init_keccak256();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/typedData.js
  init_node_compat_inject();
  init_abi();
  init_address();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/typedData.js
  init_node_compat_inject();
  init_stringify();
  init_base();
  var InvalidDomainError = class extends BaseError2 {
    constructor({ domain: domain2 }) {
      super(`Invalid domain "${stringify(domain2)}".`, {
        metaMessages: ["Must be a valid EIP-712 domain."]
      });
    }
  };
  var InvalidPrimaryTypeError = class extends BaseError2 {
    constructor({ primaryType, types }) {
      super(`Invalid primary type \`${primaryType}\` must be one of \`${JSON.stringify(Object.keys(types))}\`.`, {
        docsPath: "/api/glossary/Errors#typeddatainvalidprimarytypeerror",
        metaMessages: ["Check that the primary type is a key in `types`."]
      });
    }
  };
  var InvalidStructTypeError = class extends BaseError2 {
    constructor({ type: type2 }) {
      super(`Struct type "${type2}" is invalid.`, {
        metaMessages: ["Struct type must not be a Solidity type."],
        name: "InvalidStructTypeError"
      });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/typedData.js
  init_isAddress();
  init_size();
  init_toHex();
  init_regex2();
  init_stringify();
  function serializeTypedData(parameters) {
    const { domain: domain_, message: message_, primaryType, types } = parameters;
    const normalizeData = (struct4, data_) => {
      const data = { ...data_ };
      for (const param of struct4) {
        const { name: name2, type: type2 } = param;
        if (type2 === "address")
          data[name2] = data[name2].toLowerCase();
      }
      return data;
    };
    const domain2 = (() => {
      if (!types.EIP712Domain)
        return {};
      if (!domain_)
        return {};
      return normalizeData(types.EIP712Domain, domain_);
    })();
    const message = (() => {
      if (primaryType === "EIP712Domain")
        return void 0;
      return normalizeData(types[primaryType], message_);
    })();
    return stringify({ domain: domain2, message, primaryType, types });
  }
  function validateTypedData(parameters) {
    const { domain: domain2, message, primaryType, types } = parameters;
    const validateData = (struct4, data) => {
      for (const param of struct4) {
        const { name: name2, type: type2 } = param;
        const value = data[name2];
        const integerMatch = type2.match(integerRegex2);
        if (integerMatch && (typeof value === "number" || typeof value === "bigint")) {
          const [_type, base4, size_] = integerMatch;
          numberToHex(value, {
            signed: base4 === "int",
            size: Number.parseInt(size_, 10) / 8
          });
        }
        if (type2 === "address" && typeof value === "string" && !isAddress(value))
          throw new InvalidAddressError({ address: value });
        const bytesMatch = type2.match(bytesRegex2);
        if (bytesMatch) {
          const [_type, size_] = bytesMatch;
          if (size_ && size(value) !== Number.parseInt(size_, 10))
            throw new BytesSizeMismatchError({
              expectedSize: Number.parseInt(size_, 10),
              givenSize: size(value)
            });
        }
        const struct5 = types[type2];
        if (struct5) {
          validateReference(type2);
          validateData(struct5, value);
        }
      }
    };
    if (types.EIP712Domain && domain2) {
      if (typeof domain2 !== "object")
        throw new InvalidDomainError({ domain: domain2 });
      validateData(types.EIP712Domain, domain2);
    }
    if (primaryType !== "EIP712Domain") {
      if (types[primaryType])
        validateData(types[primaryType], message);
      else
        throw new InvalidPrimaryTypeError({ primaryType, types });
    }
  }
  function getTypesForEIP712Domain({ domain: domain2 }) {
    return [
      typeof domain2?.name === "string" && { name: "name", type: "string" },
      domain2?.version && { name: "version", type: "string" },
      (typeof domain2?.chainId === "number" || typeof domain2?.chainId === "bigint") && {
        name: "chainId",
        type: "uint256"
      },
      domain2?.verifyingContract && {
        name: "verifyingContract",
        type: "address"
      },
      domain2?.salt && { name: "salt", type: "bytes32" }
    ].filter(Boolean);
  }
  function validateReference(type2) {
    if (type2 === "address" || type2 === "bool" || type2 === "string" || type2.startsWith("bytes") || type2.startsWith("uint") || type2.startsWith("int"))
      throw new InvalidStructTypeError({ type: type2 });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/signature/hashTypedData.js
  function hashTypedData(parameters) {
    const { domain: domain2 = {}, message, primaryType } = parameters;
    const types = {
      EIP712Domain: getTypesForEIP712Domain({ domain: domain2 }),
      ...parameters.types
    };
    validateTypedData({
      domain: domain2,
      message,
      primaryType,
      types
    });
    const parts = ["0x1901"];
    if (domain2)
      parts.push(hashDomain({
        domain: domain2,
        types
      }));
    if (primaryType !== "EIP712Domain")
      parts.push(hashStruct({
        data: message,
        primaryType,
        types
      }));
    return keccak256(concat(parts));
  }
  function hashDomain({ domain: domain2, types }) {
    return hashStruct({
      data: domain2,
      primaryType: "EIP712Domain",
      types
    });
  }
  function hashStruct({ data, primaryType, types }) {
    const encoded = encodeData({
      data,
      primaryType,
      types
    });
    return keccak256(encoded);
  }
  function encodeData({ data, primaryType, types }) {
    const encodedTypes = [{ type: "bytes32" }];
    const encodedValues = [hashType({ primaryType, types })];
    for (const field of types[primaryType]) {
      const [type2, value] = encodeField({
        types,
        name: field.name,
        type: field.type,
        value: data[field.name]
      });
      encodedTypes.push(type2);
      encodedValues.push(value);
    }
    return encodeAbiParameters(encodedTypes, encodedValues);
  }
  function hashType({ primaryType, types }) {
    const encodedHashType = toHex(encodeType({ primaryType, types }));
    return keccak256(encodedHashType);
  }
  function encodeType({ primaryType, types }) {
    let result = "";
    const unsortedDeps = findTypeDependencies({ primaryType, types });
    unsortedDeps.delete(primaryType);
    const deps = [primaryType, ...Array.from(unsortedDeps).sort()];
    for (const type2 of deps) {
      result += `${type2}(${types[type2].map(({ name: name2, type: t }) => `${t} ${name2}`).join(",")})`;
    }
    return result;
  }
  function findTypeDependencies({ primaryType: primaryType_, types }, results = /* @__PURE__ */ new Set()) {
    const match = primaryType_.match(/^\w*/u);
    const primaryType = match?.[0];
    if (results.has(primaryType) || types[primaryType] === void 0) {
      return results;
    }
    results.add(primaryType);
    for (const field of types[primaryType]) {
      findTypeDependencies({ primaryType: field.type, types }, results);
    }
    return results;
  }
  function encodeField({ types, name: name2, type: type2, value }) {
    if (types[type2] !== void 0) {
      return [
        { type: "bytes32" },
        keccak256(encodeData({ data: value, primaryType: type2, types }))
      ];
    }
    if (type2 === "bytes")
      return [{ type: "bytes32" }, keccak256(value)];
    if (type2 === "string")
      return [{ type: "bytes32" }, keccak256(toHex(value))];
    if (type2.lastIndexOf("]") === type2.length - 1) {
      const parsedType2 = type2.slice(0, type2.lastIndexOf("["));
      const typeValuePairs = value.map((item) => encodeField({
        name: name2,
        type: parsedType2,
        types,
        value: item
      }));
      return [
        { type: "bytes32" },
        keccak256(encodeAbiParameters(typeValuePairs.map(([t]) => t), typeValuePairs.map(([, v13]) => v13)))
      ];
    }
    return [{ type: type2 }, value];
  }

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/erc8010/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/erc8010/SignatureErc8010.js
  var SignatureErc8010_exports = {};
  __export(SignatureErc8010_exports, {
    InvalidWrappedSignatureError: () => InvalidWrappedSignatureError,
    assert: () => assert6,
    from: () => from9,
    magicBytes: () => magicBytes,
    suffixParameters: () => suffixParameters,
    unwrap: () => unwrap,
    validate: () => validate4,
    wrap: () => wrap
  });
  init_node_compat_inject();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/AbiParameters.js
  init_node_compat_inject();
  init_exports();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Address.js
  init_node_compat_inject();
  init_Bytes();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Caches.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/internal/lru.js
  init_node_compat_inject();
  var LruMap2 = class extends Map {
    constructor(size5) {
      super();
      Object.defineProperty(this, "maxSize", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: void 0
      });
      this.maxSize = size5;
    }
    get(key2) {
      const value = super.get(key2);
      if (super.has(key2) && value !== void 0) {
        this.delete(key2);
        super.set(key2, value);
      }
      return value;
    }
    set(key2, value) {
      super.set(key2, value);
      if (this.maxSize && this.size > this.maxSize) {
        const firstKey = this.keys().next().value;
        if (firstKey)
          this.delete(firstKey);
      }
      return this;
    }
  };

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Caches.js
  var caches = {
    checksum: /* @__PURE__ */ new LruMap2(8192)
  };
  var checksum = caches.checksum;

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Address.js
  init_Errors();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Hash.js
  init_node_compat_inject();
  init_sha3();
  init_Bytes();
  init_Hex();
  function keccak2562(value, options = {}) {
    const { as = typeof value === "string" ? "Hex" : "Bytes" } = options;
    const bytes = keccak_256(from(value));
    if (as === "Bytes")
      return bytes;
    return fromBytes(bytes);
  }

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/PublicKey.js
  init_node_compat_inject();
  init_Bytes();
  init_Errors();
  init_Hex();
  init_Json();
  function assert3(publicKey3, options = {}) {
    const { compressed } = options;
    const { prefix, x: x13, y: y11 } = publicKey3;
    if (compressed === false || typeof x13 === "bigint" && typeof y11 === "bigint") {
      if (prefix !== 4)
        throw new InvalidPrefixError({
          prefix,
          cause: new InvalidUncompressedPrefixError()
        });
      return;
    }
    if (compressed === true || typeof x13 === "bigint" && typeof y11 === "undefined") {
      if (prefix !== 3 && prefix !== 2)
        throw new InvalidPrefixError({
          prefix,
          cause: new InvalidCompressedPrefixError()
        });
      return;
    }
    throw new InvalidError({ publicKey: publicKey3 });
  }
  function from3(value) {
    const publicKey3 = (() => {
      if (validate2(value))
        return fromHex2(value);
      if (validate(value))
        return fromBytes2(value);
      const { prefix, x: x13, y: y11 } = value;
      if (typeof x13 === "bigint" && typeof y11 === "bigint")
        return { prefix: prefix ?? 4, x: x13, y: y11 };
      return { prefix, x: x13 };
    })();
    assert3(publicKey3);
    return publicKey3;
  }
  function fromBytes2(publicKey3) {
    return fromHex2(fromBytes(publicKey3));
  }
  function fromHex2(publicKey3) {
    if (publicKey3.length !== 132 && publicKey3.length !== 130 && publicKey3.length !== 68)
      throw new InvalidSerializedSizeError({ publicKey: publicKey3 });
    if (publicKey3.length === 130) {
      const x14 = BigInt(slice3(publicKey3, 0, 32));
      const y11 = BigInt(slice3(publicKey3, 32, 64));
      return {
        prefix: 4,
        x: x14,
        y: y11
      };
    }
    if (publicKey3.length === 132) {
      const prefix2 = Number(slice3(publicKey3, 0, 1));
      const x14 = BigInt(slice3(publicKey3, 1, 33));
      const y11 = BigInt(slice3(publicKey3, 33, 65));
      return {
        prefix: prefix2,
        x: x14,
        y: y11
      };
    }
    const prefix = Number(slice3(publicKey3, 0, 1));
    const x13 = BigInt(slice3(publicKey3, 1, 33));
    return {
      prefix,
      x: x13
    };
  }
  function toHex2(publicKey3, options = {}) {
    assert3(publicKey3);
    const { prefix, x: x13, y: y11 } = publicKey3;
    const { includePrefix = true } = options;
    const publicKey_ = concat2(
      includePrefix ? fromNumber(prefix, { size: 1 }) : "0x",
      fromNumber(x13, { size: 32 }),
      // If the public key is not compressed, add the y coordinate.
      typeof y11 === "bigint" ? fromNumber(y11, { size: 32 }) : "0x"
    );
    return publicKey_;
  }
  var InvalidError = class extends BaseError3 {
    constructor({ publicKey: publicKey3 }) {
      super(`Value \`${stringify2(publicKey3)}\` is not a valid public key.`, {
        metaMessages: [
          "Public key must contain:",
          "- an `x` and `prefix` value (compressed)",
          "- an `x`, `y`, and `prefix` value (uncompressed)"
        ]
      });
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "PublicKey.InvalidError"
      });
    }
  };
  var InvalidPrefixError = class extends BaseError3 {
    constructor({ prefix, cause }) {
      super(`Prefix "${prefix}" is invalid.`, {
        cause
      });
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "PublicKey.InvalidPrefixError"
      });
    }
  };
  var InvalidCompressedPrefixError = class extends BaseError3 {
    constructor() {
      super("Prefix must be 2 or 3 for compressed public keys.");
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "PublicKey.InvalidCompressedPrefixError"
      });
    }
  };
  var InvalidUncompressedPrefixError = class extends BaseError3 {
    constructor() {
      super("Prefix must be 4 for uncompressed public keys.");
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "PublicKey.InvalidUncompressedPrefixError"
      });
    }
  };
  var InvalidSerializedSizeError = class extends BaseError3 {
    constructor({ publicKey: publicKey3 }) {
      super(`Value \`${publicKey3}\` is an invalid public key size.`, {
        metaMessages: [
          "Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",
          `Received ${size3(from2(publicKey3))} bytes.`
        ]
      });
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "PublicKey.InvalidSerializedSizeError"
      });
    }
  };

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Address.js
  var addressRegex2 = /^0x[a-fA-F0-9]{40}$/;
  function assert4(value, options = {}) {
    const { strict = true } = options;
    if (!addressRegex2.test(value))
      throw new InvalidAddressError2({
        address: value,
        cause: new InvalidInputError()
      });
    if (strict) {
      if (value.toLowerCase() === value)
        return;
      if (checksum2(value) !== value)
        throw new InvalidAddressError2({
          address: value,
          cause: new InvalidChecksumError()
        });
    }
  }
  function checksum2(address) {
    if (checksum.has(address))
      return checksum.get(address);
    assert4(address, { strict: false });
    const hexAddress = address.substring(2).toLowerCase();
    const hash5 = keccak2562(fromString(hexAddress), { as: "Bytes" });
    const characters = hexAddress.split("");
    for (let i5 = 0; i5 < 40; i5 += 2) {
      if (hash5[i5 >> 1] >> 4 >= 8 && characters[i5]) {
        characters[i5] = characters[i5].toUpperCase();
      }
      if ((hash5[i5 >> 1] & 15) >= 8 && characters[i5 + 1]) {
        characters[i5 + 1] = characters[i5 + 1].toUpperCase();
      }
    }
    const result = `0x${characters.join("")}`;
    checksum.set(address, result);
    return result;
  }
  function from4(address, options = {}) {
    const { checksum: checksumVal = false } = options;
    assert4(address);
    if (checksumVal)
      return checksum2(address);
    return address;
  }
  function fromPublicKey(publicKey3, options = {}) {
    const address = keccak2562(`0x${toHex2(publicKey3).slice(4)}`).substring(26);
    return from4(`0x${address}`, options);
  }
  function validate3(address, options = {}) {
    const { strict = true } = options ?? {};
    try {
      assert4(address, { strict });
      return true;
    } catch {
      return false;
    }
  }
  var InvalidAddressError2 = class extends BaseError3 {
    constructor({ address, cause }) {
      super(`Address "${address}" is invalid.`, {
        cause
      });
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "Address.InvalidAddressError"
      });
    }
  };
  var InvalidInputError = class extends BaseError3 {
    constructor() {
      super("Address is not a 20 byte (40 hexadecimal character) value.");
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "Address.InvalidInputError"
      });
    }
  };
  var InvalidChecksumError = class extends BaseError3 {
    constructor() {
      super("Address does not match its checksum counterpart.");
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "Address.InvalidChecksumError"
      });
    }
  };

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/AbiParameters.js
  init_Bytes();
  init_Errors();
  init_Hex();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/internal/abiParameters.js
  init_node_compat_inject();
  init_Bytes();
  init_Errors();
  init_Hex();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Solidity.js
  init_node_compat_inject();
  var arrayRegex = /^(.*)\[([0-9]*)\]$/;
  var bytesRegex3 = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
  var integerRegex3 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
  var maxInt82 = 2n ** (8n - 1n) - 1n;
  var maxInt162 = 2n ** (16n - 1n) - 1n;
  var maxInt242 = 2n ** (24n - 1n) - 1n;
  var maxInt322 = 2n ** (32n - 1n) - 1n;
  var maxInt402 = 2n ** (40n - 1n) - 1n;
  var maxInt482 = 2n ** (48n - 1n) - 1n;
  var maxInt562 = 2n ** (56n - 1n) - 1n;
  var maxInt642 = 2n ** (64n - 1n) - 1n;
  var maxInt722 = 2n ** (72n - 1n) - 1n;
  var maxInt802 = 2n ** (80n - 1n) - 1n;
  var maxInt882 = 2n ** (88n - 1n) - 1n;
  var maxInt962 = 2n ** (96n - 1n) - 1n;
  var maxInt1042 = 2n ** (104n - 1n) - 1n;
  var maxInt1122 = 2n ** (112n - 1n) - 1n;
  var maxInt1202 = 2n ** (120n - 1n) - 1n;
  var maxInt1282 = 2n ** (128n - 1n) - 1n;
  var maxInt1362 = 2n ** (136n - 1n) - 1n;
  var maxInt1442 = 2n ** (144n - 1n) - 1n;
  var maxInt1522 = 2n ** (152n - 1n) - 1n;
  var maxInt1602 = 2n ** (160n - 1n) - 1n;
  var maxInt1682 = 2n ** (168n - 1n) - 1n;
  var maxInt1762 = 2n ** (176n - 1n) - 1n;
  var maxInt1842 = 2n ** (184n - 1n) - 1n;
  var maxInt1922 = 2n ** (192n - 1n) - 1n;
  var maxInt2002 = 2n ** (200n - 1n) - 1n;
  var maxInt2082 = 2n ** (208n - 1n) - 1n;
  var maxInt2162 = 2n ** (216n - 1n) - 1n;
  var maxInt2242 = 2n ** (224n - 1n) - 1n;
  var maxInt2322 = 2n ** (232n - 1n) - 1n;
  var maxInt2402 = 2n ** (240n - 1n) - 1n;
  var maxInt2482 = 2n ** (248n - 1n) - 1n;
  var maxInt2562 = 2n ** (256n - 1n) - 1n;
  var minInt82 = -(2n ** (8n - 1n));
  var minInt162 = -(2n ** (16n - 1n));
  var minInt242 = -(2n ** (24n - 1n));
  var minInt322 = -(2n ** (32n - 1n));
  var minInt402 = -(2n ** (40n - 1n));
  var minInt482 = -(2n ** (48n - 1n));
  var minInt562 = -(2n ** (56n - 1n));
  var minInt642 = -(2n ** (64n - 1n));
  var minInt722 = -(2n ** (72n - 1n));
  var minInt802 = -(2n ** (80n - 1n));
  var minInt882 = -(2n ** (88n - 1n));
  var minInt962 = -(2n ** (96n - 1n));
  var minInt1042 = -(2n ** (104n - 1n));
  var minInt1122 = -(2n ** (112n - 1n));
  var minInt1202 = -(2n ** (120n - 1n));
  var minInt1282 = -(2n ** (128n - 1n));
  var minInt1362 = -(2n ** (136n - 1n));
  var minInt1442 = -(2n ** (144n - 1n));
  var minInt1522 = -(2n ** (152n - 1n));
  var minInt1602 = -(2n ** (160n - 1n));
  var minInt1682 = -(2n ** (168n - 1n));
  var minInt1762 = -(2n ** (176n - 1n));
  var minInt1842 = -(2n ** (184n - 1n));
  var minInt1922 = -(2n ** (192n - 1n));
  var minInt2002 = -(2n ** (200n - 1n));
  var minInt2082 = -(2n ** (208n - 1n));
  var minInt2162 = -(2n ** (216n - 1n));
  var minInt2242 = -(2n ** (224n - 1n));
  var minInt2322 = -(2n ** (232n - 1n));
  var minInt2402 = -(2n ** (240n - 1n));
  var minInt2482 = -(2n ** (248n - 1n));
  var minInt2562 = -(2n ** (256n - 1n));
  var maxUint82 = 2n ** 8n - 1n;
  var maxUint162 = 2n ** 16n - 1n;
  var maxUint242 = 2n ** 24n - 1n;
  var maxUint322 = 2n ** 32n - 1n;
  var maxUint402 = 2n ** 40n - 1n;
  var maxUint482 = 2n ** 48n - 1n;
  var maxUint562 = 2n ** 56n - 1n;
  var maxUint642 = 2n ** 64n - 1n;
  var maxUint722 = 2n ** 72n - 1n;
  var maxUint802 = 2n ** 80n - 1n;
  var maxUint882 = 2n ** 88n - 1n;
  var maxUint962 = 2n ** 96n - 1n;
  var maxUint1042 = 2n ** 104n - 1n;
  var maxUint1122 = 2n ** 112n - 1n;
  var maxUint1202 = 2n ** 120n - 1n;
  var maxUint1282 = 2n ** 128n - 1n;
  var maxUint1362 = 2n ** 136n - 1n;
  var maxUint1442 = 2n ** 144n - 1n;
  var maxUint1522 = 2n ** 152n - 1n;
  var maxUint1602 = 2n ** 160n - 1n;
  var maxUint1682 = 2n ** 168n - 1n;
  var maxUint1762 = 2n ** 176n - 1n;
  var maxUint1842 = 2n ** 184n - 1n;
  var maxUint1922 = 2n ** 192n - 1n;
  var maxUint2002 = 2n ** 200n - 1n;
  var maxUint2082 = 2n ** 208n - 1n;
  var maxUint2162 = 2n ** 216n - 1n;
  var maxUint2242 = 2n ** 224n - 1n;
  var maxUint2322 = 2n ** 232n - 1n;
  var maxUint2402 = 2n ** 240n - 1n;
  var maxUint2482 = 2n ** 248n - 1n;
  var maxUint2562 = 2n ** 256n - 1n;

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/internal/abiParameters.js
  function decodeParameter2(cursor, param, options) {
    const { checksumAddress: checksumAddress2, staticPosition } = options;
    const arrayComponents = getArrayComponents2(param.type);
    if (arrayComponents) {
      const [length2, type2] = arrayComponents;
      return decodeArray2(cursor, { ...param, type: type2 }, { checksumAddress: checksumAddress2, length: length2, staticPosition });
    }
    if (param.type === "tuple")
      return decodeTuple2(cursor, param, {
        checksumAddress: checksumAddress2,
        staticPosition
      });
    if (param.type === "address")
      return decodeAddress2(cursor, { checksum: checksumAddress2 });
    if (param.type === "bool")
      return decodeBool2(cursor);
    if (param.type.startsWith("bytes"))
      return decodeBytes2(cursor, param, { staticPosition });
    if (param.type.startsWith("uint") || param.type.startsWith("int"))
      return decodeNumber2(cursor, param);
    if (param.type === "string")
      return decodeString2(cursor, { staticPosition });
    throw new InvalidTypeError(param.type);
  }
  var sizeOfLength2 = 32;
  var sizeOfOffset2 = 32;
  function decodeAddress2(cursor, options = {}) {
    const { checksum: checksum4 = false } = options;
    const value = cursor.readBytes(32);
    const wrap3 = (address) => checksum4 ? checksum2(address) : address;
    return [wrap3(fromBytes(slice2(value, -20))), 32];
  }
  function decodeArray2(cursor, param, options) {
    const { checksumAddress: checksumAddress2, length: length2, staticPosition } = options;
    if (!length2) {
      const offset2 = toNumber2(cursor.readBytes(sizeOfOffset2));
      const start = staticPosition + offset2;
      const startOfData = start + sizeOfLength2;
      cursor.setPosition(start);
      const length3 = toNumber2(cursor.readBytes(sizeOfLength2));
      const dynamicChild = hasDynamicChild2(param);
      let consumed2 = 0;
      const value2 = [];
      for (let i5 = 0; i5 < length3; ++i5) {
        cursor.setPosition(startOfData + (dynamicChild ? i5 * 32 : consumed2));
        const [data, consumed_] = decodeParameter2(cursor, param, {
          checksumAddress: checksumAddress2,
          staticPosition: startOfData
        });
        consumed2 += consumed_;
        value2.push(data);
      }
      cursor.setPosition(staticPosition + 32);
      return [value2, 32];
    }
    if (hasDynamicChild2(param)) {
      const offset2 = toNumber2(cursor.readBytes(sizeOfOffset2));
      const start = staticPosition + offset2;
      const value2 = [];
      for (let i5 = 0; i5 < length2; ++i5) {
        cursor.setPosition(start + i5 * 32);
        const [data] = decodeParameter2(cursor, param, {
          checksumAddress: checksumAddress2,
          staticPosition: start
        });
        value2.push(data);
      }
      cursor.setPosition(staticPosition + 32);
      return [value2, 32];
    }
    let consumed = 0;
    const value = [];
    for (let i5 = 0; i5 < length2; ++i5) {
      const [data, consumed_] = decodeParameter2(cursor, param, {
        checksumAddress: checksumAddress2,
        staticPosition: staticPosition + consumed
      });
      consumed += consumed_;
      value.push(data);
    }
    return [value, consumed];
  }
  function decodeBool2(cursor) {
    return [toBoolean(cursor.readBytes(32), { size: 32 }), 32];
  }
  function decodeBytes2(cursor, param, { staticPosition }) {
    const [_6, size5] = param.type.split("bytes");
    if (!size5) {
      const offset2 = toNumber2(cursor.readBytes(32));
      cursor.setPosition(staticPosition + offset2);
      const length2 = toNumber2(cursor.readBytes(32));
      if (length2 === 0) {
        cursor.setPosition(staticPosition + 32);
        return ["0x", 32];
      }
      const data = cursor.readBytes(length2);
      cursor.setPosition(staticPosition + 32);
      return [fromBytes(data), 32];
    }
    const value = fromBytes(cursor.readBytes(Number.parseInt(size5, 10), 32));
    return [value, 32];
  }
  function decodeNumber2(cursor, param) {
    const signed = param.type.startsWith("int");
    const size5 = Number.parseInt(param.type.split("int")[1] || "256", 10);
    const value = cursor.readBytes(32);
    return [
      size5 > 48 ? toBigInt2(value, { signed }) : toNumber2(value, { signed }),
      32
    ];
  }
  function decodeTuple2(cursor, param, options) {
    const { checksumAddress: checksumAddress2, staticPosition } = options;
    const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name: name2 }) => !name2);
    const value = hasUnnamedChild ? [] : {};
    let consumed = 0;
    if (hasDynamicChild2(param)) {
      const offset2 = toNumber2(cursor.readBytes(sizeOfOffset2));
      const start = staticPosition + offset2;
      for (let i5 = 0; i5 < param.components.length; ++i5) {
        const component = param.components[i5];
        cursor.setPosition(start + consumed);
        const [data, consumed_] = decodeParameter2(cursor, component, {
          checksumAddress: checksumAddress2,
          staticPosition: start
        });
        consumed += consumed_;
        value[hasUnnamedChild ? i5 : component?.name] = data;
      }
      cursor.setPosition(staticPosition + 32);
      return [value, 32];
    }
    for (let i5 = 0; i5 < param.components.length; ++i5) {
      const component = param.components[i5];
      const [data, consumed_] = decodeParameter2(cursor, component, {
        checksumAddress: checksumAddress2,
        staticPosition
      });
      value[hasUnnamedChild ? i5 : component?.name] = data;
      consumed += consumed_;
    }
    return [value, consumed];
  }
  function decodeString2(cursor, { staticPosition }) {
    const offset2 = toNumber2(cursor.readBytes(32));
    const start = staticPosition + offset2;
    cursor.setPosition(start);
    const length2 = toNumber2(cursor.readBytes(32));
    if (length2 === 0) {
      cursor.setPosition(staticPosition + 32);
      return ["", 32];
    }
    const data = cursor.readBytes(length2, 32);
    const value = toString(trimLeft(data));
    cursor.setPosition(staticPosition + 32);
    return [value, 32];
  }
  function prepareParameters({ checksumAddress: checksumAddress2, parameters, values }) {
    const preparedParameters = [];
    for (let i5 = 0; i5 < parameters.length; i5++) {
      preparedParameters.push(prepareParameter({
        checksumAddress: checksumAddress2,
        parameter: parameters[i5],
        value: values[i5]
      }));
    }
    return preparedParameters;
  }
  function prepareParameter({ checksumAddress: checksumAddress2 = false, parameter: parameter_, value }) {
    const parameter = parameter_;
    const arrayComponents = getArrayComponents2(parameter.type);
    if (arrayComponents) {
      const [length2, type2] = arrayComponents;
      return encodeArray2(value, {
        checksumAddress: checksumAddress2,
        length: length2,
        parameter: {
          ...parameter,
          type: type2
        }
      });
    }
    if (parameter.type === "tuple") {
      return encodeTuple2(value, {
        checksumAddress: checksumAddress2,
        parameter
      });
    }
    if (parameter.type === "address") {
      return encodeAddress2(value, {
        checksum: checksumAddress2
      });
    }
    if (parameter.type === "bool") {
      return encodeBoolean(value);
    }
    if (parameter.type.startsWith("uint") || parameter.type.startsWith("int")) {
      const signed = parameter.type.startsWith("int");
      const [, , size5 = "256"] = integerRegex3.exec(parameter.type) ?? [];
      return encodeNumber2(value, {
        signed,
        size: Number(size5)
      });
    }
    if (parameter.type.startsWith("bytes")) {
      return encodeBytes2(value, { type: parameter.type });
    }
    if (parameter.type === "string") {
      return encodeString2(value);
    }
    throw new InvalidTypeError(parameter.type);
  }
  function encode(preparedParameters) {
    let staticSize = 0;
    for (let i5 = 0; i5 < preparedParameters.length; i5++) {
      const { dynamic, encoded } = preparedParameters[i5];
      if (dynamic)
        staticSize += 32;
      else
        staticSize += size3(encoded);
    }
    const staticParameters = [];
    const dynamicParameters = [];
    let dynamicSize = 0;
    for (let i5 = 0; i5 < preparedParameters.length; i5++) {
      const { dynamic, encoded } = preparedParameters[i5];
      if (dynamic) {
        staticParameters.push(fromNumber(staticSize + dynamicSize, { size: 32 }));
        dynamicParameters.push(encoded);
        dynamicSize += size3(encoded);
      } else {
        staticParameters.push(encoded);
      }
    }
    return concat2(...staticParameters, ...dynamicParameters);
  }
  function encodeAddress2(value, options) {
    const { checksum: checksum4 = false } = options;
    assert4(value, { strict: checksum4 });
    return {
      dynamic: false,
      encoded: padLeft(value.toLowerCase())
    };
  }
  function encodeArray2(value, options) {
    const { checksumAddress: checksumAddress2, length: length2, parameter } = options;
    const dynamic = length2 === null;
    if (!Array.isArray(value))
      throw new InvalidArrayError2(value);
    if (!dynamic && value.length !== length2)
      throw new ArrayLengthMismatchError({
        expectedLength: length2,
        givenLength: value.length,
        type: `${parameter.type}[${length2}]`
      });
    let dynamicChild = false;
    const preparedParameters = [];
    for (let i5 = 0; i5 < value.length; i5++) {
      const preparedParam = prepareParameter({
        checksumAddress: checksumAddress2,
        parameter,
        value: value[i5]
      });
      if (preparedParam.dynamic)
        dynamicChild = true;
      preparedParameters.push(preparedParam);
    }
    if (dynamic || dynamicChild) {
      const data = encode(preparedParameters);
      if (dynamic) {
        const length3 = fromNumber(preparedParameters.length, { size: 32 });
        return {
          dynamic: true,
          encoded: preparedParameters.length > 0 ? concat2(length3, data) : length3
        };
      }
      if (dynamicChild)
        return { dynamic: true, encoded: data };
    }
    return {
      dynamic: false,
      encoded: concat2(...preparedParameters.map(({ encoded }) => encoded))
    };
  }
  function encodeBytes2(value, { type: type2 }) {
    const [, parametersize] = type2.split("bytes");
    const bytesSize = size3(value);
    if (!parametersize) {
      let value_ = value;
      if (bytesSize % 32 !== 0)
        value_ = padRight(value_, Math.ceil((value.length - 2) / 2 / 32) * 32);
      return {
        dynamic: true,
        encoded: concat2(padLeft(fromNumber(bytesSize, { size: 32 })), value_)
      };
    }
    if (bytesSize !== Number.parseInt(parametersize, 10))
      throw new BytesSizeMismatchError2({
        expectedSize: Number.parseInt(parametersize, 10),
        value
      });
    return { dynamic: false, encoded: padRight(value) };
  }
  function encodeBoolean(value) {
    if (typeof value !== "boolean")
      throw new BaseError3(`Invalid boolean value: "${value}" (type: ${typeof value}). Expected: \`true\` or \`false\`.`);
    return { dynamic: false, encoded: padLeft(fromBoolean(value)) };
  }
  function encodeNumber2(value, { signed, size: size5 }) {
    if (typeof size5 === "number") {
      const max = 2n ** (BigInt(size5) - (signed ? 1n : 0n)) - 1n;
      const min = signed ? -max - 1n : 0n;
      if (value > max || value < min)
        throw new IntegerOutOfRangeError2({
          max: max.toString(),
          min: min.toString(),
          signed,
          size: size5 / 8,
          value: value.toString()
        });
    }
    return {
      dynamic: false,
      encoded: fromNumber(value, {
        size: 32,
        signed
      })
    };
  }
  function encodeString2(value) {
    const hexValue = fromString2(value);
    const partsLength = Math.ceil(size3(hexValue) / 32);
    const parts = [];
    for (let i5 = 0; i5 < partsLength; i5++) {
      parts.push(padRight(slice3(hexValue, i5 * 32, (i5 + 1) * 32)));
    }
    return {
      dynamic: true,
      encoded: concat2(padRight(fromNumber(size3(hexValue), { size: 32 })), ...parts)
    };
  }
  function encodeTuple2(value, options) {
    const { checksumAddress: checksumAddress2, parameter } = options;
    let dynamic = false;
    const preparedParameters = [];
    for (let i5 = 0; i5 < parameter.components.length; i5++) {
      const param_ = parameter.components[i5];
      const index2 = Array.isArray(value) ? i5 : param_.name;
      const preparedParam = prepareParameter({
        checksumAddress: checksumAddress2,
        parameter: param_,
        value: value[index2]
      });
      preparedParameters.push(preparedParam);
      if (preparedParam.dynamic)
        dynamic = true;
    }
    return {
      dynamic,
      encoded: dynamic ? encode(preparedParameters) : concat2(...preparedParameters.map(({ encoded }) => encoded))
    };
  }
  function getArrayComponents2(type2) {
    const matches = type2.match(/^(.*)\[(\d+)?\]$/);
    return matches ? (
      // Return `null` if the array is dynamic.
      [matches[2] ? Number(matches[2]) : null, matches[1]]
    ) : void 0;
  }
  function hasDynamicChild2(param) {
    const { type: type2 } = param;
    if (type2 === "string")
      return true;
    if (type2 === "bytes")
      return true;
    if (type2.endsWith("[]"))
      return true;
    if (type2 === "tuple")
      return param.components?.some(hasDynamicChild2);
    const arrayComponents = getArrayComponents2(param.type);
    if (arrayComponents && hasDynamicChild2({
      ...param,
      type: arrayComponents[1]
    }))
      return true;
    return false;
  }

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/internal/cursor.js
  init_node_compat_inject();
  init_Errors();
  var staticCursor2 = {
    bytes: new Uint8Array(),
    dataView: new DataView(new ArrayBuffer(0)),
    position: 0,
    positionReadCount: /* @__PURE__ */ new Map(),
    recursiveReadCount: 0,
    recursiveReadLimit: Number.POSITIVE_INFINITY,
    assertReadLimit() {
      if (this.recursiveReadCount >= this.recursiveReadLimit)
        throw new RecursiveReadLimitExceededError2({
          count: this.recursiveReadCount + 1,
          limit: this.recursiveReadLimit
        });
    },
    assertPosition(position) {
      if (position < 0 || position > this.bytes.length - 1)
        throw new PositionOutOfBoundsError2({
          length: this.bytes.length,
          position
        });
    },
    decrementPosition(offset2) {
      if (offset2 < 0)
        throw new NegativeOffsetError2({ offset: offset2 });
      const position = this.position - offset2;
      this.assertPosition(position);
      this.position = position;
    },
    getReadCount(position) {
      return this.positionReadCount.get(position || this.position) || 0;
    },
    incrementPosition(offset2) {
      if (offset2 < 0)
        throw new NegativeOffsetError2({ offset: offset2 });
      const position = this.position + offset2;
      this.assertPosition(position);
      this.position = position;
    },
    inspectByte(position_) {
      const position = position_ ?? this.position;
      this.assertPosition(position);
      return this.bytes[position];
    },
    inspectBytes(length2, position_) {
      const position = position_ ?? this.position;
      this.assertPosition(position + length2 - 1);
      return this.bytes.subarray(position, position + length2);
    },
    inspectUint8(position_) {
      const position = position_ ?? this.position;
      this.assertPosition(position);
      return this.bytes[position];
    },
    inspectUint16(position_) {
      const position = position_ ?? this.position;
      this.assertPosition(position + 1);
      return this.dataView.getUint16(position);
    },
    inspectUint24(position_) {
      const position = position_ ?? this.position;
      this.assertPosition(position + 2);
      return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);
    },
    inspectUint32(position_) {
      const position = position_ ?? this.position;
      this.assertPosition(position + 3);
      return this.dataView.getUint32(position);
    },
    pushByte(byte) {
      this.assertPosition(this.position);
      this.bytes[this.position] = byte;
      this.position++;
    },
    pushBytes(bytes) {
      this.assertPosition(this.position + bytes.length - 1);
      this.bytes.set(bytes, this.position);
      this.position += bytes.length;
    },
    pushUint8(value) {
      this.assertPosition(this.position);
      this.bytes[this.position] = value;
      this.position++;
    },
    pushUint16(value) {
      this.assertPosition(this.position + 1);
      this.dataView.setUint16(this.position, value);
      this.position += 2;
    },
    pushUint24(value) {
      this.assertPosition(this.position + 2);
      this.dataView.setUint16(this.position, value >> 8);
      this.dataView.setUint8(this.position + 2, value & ~4294967040);
      this.position += 3;
    },
    pushUint32(value) {
      this.assertPosition(this.position + 3);
      this.dataView.setUint32(this.position, value);
      this.position += 4;
    },
    readByte() {
      this.assertReadLimit();
      this._touch();
      const value = this.inspectByte();
      this.position++;
      return value;
    },
    readBytes(length2, size5) {
      this.assertReadLimit();
      this._touch();
      const value = this.inspectBytes(length2);
      this.position += size5 ?? length2;
      return value;
    },
    readUint8() {
      this.assertReadLimit();
      this._touch();
      const value = this.inspectUint8();
      this.position += 1;
      return value;
    },
    readUint16() {
      this.assertReadLimit();
      this._touch();
      const value = this.inspectUint16();
      this.position += 2;
      return value;
    },
    readUint24() {
      this.assertReadLimit();
      this._touch();
      const value = this.inspectUint24();
      this.position += 3;
      return value;
    },
    readUint32() {
      this.assertReadLimit();
      this._touch();
      const value = this.inspectUint32();
      this.position += 4;
      return value;
    },
    get remaining() {
      return this.bytes.length - this.position;
    },
    setPosition(position) {
      const oldPosition = this.position;
      this.assertPosition(position);
      this.position = position;
      return () => this.position = oldPosition;
    },
    _touch() {
      if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)
        return;
      const count = this.getReadCount();
      this.positionReadCount.set(this.position, count + 1);
      if (count > 0)
        this.recursiveReadCount++;
    }
  };
  function create(bytes, { recursiveReadLimit = 8192 } = {}) {
    const cursor = Object.create(staticCursor2);
    cursor.bytes = bytes;
    cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
    cursor.positionReadCount = /* @__PURE__ */ new Map();
    cursor.recursiveReadLimit = recursiveReadLimit;
    return cursor;
  }
  var NegativeOffsetError2 = class extends BaseError3 {
    constructor({ offset: offset2 }) {
      super(`Offset \`${offset2}\` cannot be negative.`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "Cursor.NegativeOffsetError"
      });
    }
  };
  var PositionOutOfBoundsError2 = class extends BaseError3 {
    constructor({ length: length2, position }) {
      super(`Position \`${position}\` is out of bounds (\`0 < position < ${length2}\`).`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "Cursor.PositionOutOfBoundsError"
      });
    }
  };
  var RecursiveReadLimitExceededError2 = class extends BaseError3 {
    constructor({ count, limit }) {
      super(`Recursive read limit of \`${limit}\` exceeded (recursive read count: \`${count}\`).`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "Cursor.RecursiveReadLimitExceededError"
      });
    }
  };

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/AbiParameters.js
  function decode(parameters, data, options = {}) {
    const { as = "Array", checksumAddress: checksumAddress2 = false } = options;
    const bytes = typeof data === "string" ? fromHex(data) : data;
    const cursor = create(bytes);
    if (size2(bytes) === 0 && parameters.length > 0)
      throw new ZeroDataError();
    if (size2(bytes) && size2(bytes) < 32)
      throw new DataSizeTooSmallError({
        data: typeof data === "string" ? data : fromBytes(data),
        parameters,
        size: size2(bytes)
      });
    let consumed = 0;
    const values = as === "Array" ? [] : {};
    for (let i5 = 0; i5 < parameters.length; ++i5) {
      const param = parameters[i5];
      cursor.setPosition(consumed);
      const [data2, consumed_] = decodeParameter2(cursor, param, {
        checksumAddress: checksumAddress2,
        staticPosition: 0
      });
      consumed += consumed_;
      if (as === "Array")
        values.push(data2);
      else
        values[param.name ?? i5] = data2;
    }
    return values;
  }
  function encode2(parameters, values, options) {
    const { checksumAddress: checksumAddress2 = false } = options ?? {};
    if (parameters.length !== values.length)
      throw new LengthMismatchError({
        expectedLength: parameters.length,
        givenLength: values.length
      });
    const preparedParameters = prepareParameters({
      checksumAddress: checksumAddress2,
      parameters,
      values
    });
    const data = encode(preparedParameters);
    if (data.length === 0)
      return "0x";
    return data;
  }
  function encodePacked(types, values) {
    if (types.length !== values.length)
      throw new LengthMismatchError({
        expectedLength: types.length,
        givenLength: values.length
      });
    const data = [];
    for (let i5 = 0; i5 < types.length; i5++) {
      const type2 = types[i5];
      const value = values[i5];
      data.push(encodePacked.encode(type2, value));
    }
    return concat2(...data);
  }
  (function(encodePacked2) {
    function encode11(type2, value, isArray = false) {
      if (type2 === "address") {
        const address = value;
        assert4(address);
        return padLeft(address.toLowerCase(), isArray ? 32 : 0);
      }
      if (type2 === "string")
        return fromString2(value);
      if (type2 === "bytes")
        return value;
      if (type2 === "bool")
        return padLeft(fromBoolean(value), isArray ? 32 : 1);
      const intMatch = type2.match(integerRegex3);
      if (intMatch) {
        const [_type, baseType, bits = "256"] = intMatch;
        const size5 = Number.parseInt(bits, 10) / 8;
        return fromNumber(value, {
          size: isArray ? 32 : size5,
          signed: baseType === "int"
        });
      }
      const bytesMatch = type2.match(bytesRegex3);
      if (bytesMatch) {
        const [_type, size5] = bytesMatch;
        if (Number.parseInt(size5, 10) !== (value.length - 2) / 2)
          throw new BytesSizeMismatchError2({
            expectedSize: Number.parseInt(size5, 10),
            value
          });
        return padRight(value, isArray ? 32 : 0);
      }
      const arrayMatch = type2.match(arrayRegex);
      if (arrayMatch && Array.isArray(value)) {
        const [_type, childType] = arrayMatch;
        const data = [];
        for (let i5 = 0; i5 < value.length; i5++) {
          data.push(encode11(childType, value[i5], true));
        }
        if (data.length === 0)
          return "0x";
        return concat2(...data);
      }
      throw new InvalidTypeError(type2);
    }
    encodePacked2.encode = encode11;
  })(encodePacked || (encodePacked = {}));
  function from5(parameters) {
    if (Array.isArray(parameters) && typeof parameters[0] === "string")
      return parseAbiParameters(parameters);
    if (typeof parameters === "string")
      return parseAbiParameters(parameters);
    return parameters;
  }
  var DataSizeTooSmallError = class extends BaseError3 {
    constructor({ data, parameters, size: size5 }) {
      super(`Data size of ${size5} bytes is too small for given parameters.`, {
        metaMessages: [
          `Params: (${formatAbiParameters(parameters)})`,
          `Data:   ${data} (${size5} bytes)`
        ]
      });
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "AbiParameters.DataSizeTooSmallError"
      });
    }
  };
  var ZeroDataError = class extends BaseError3 {
    constructor() {
      super('Cannot decode zero data ("0x") with ABI parameters.');
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "AbiParameters.ZeroDataError"
      });
    }
  };
  var ArrayLengthMismatchError = class extends BaseError3 {
    constructor({ expectedLength, givenLength, type: type2 }) {
      super(`Array length mismatch for type \`${type2}\`. Expected: \`${expectedLength}\`. Given: \`${givenLength}\`.`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "AbiParameters.ArrayLengthMismatchError"
      });
    }
  };
  var BytesSizeMismatchError2 = class extends BaseError3 {
    constructor({ expectedSize, value }) {
      super(`Size of bytes "${value}" (bytes${size3(value)}) does not match expected size (bytes${expectedSize}).`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "AbiParameters.BytesSizeMismatchError"
      });
    }
  };
  var LengthMismatchError = class extends BaseError3 {
    constructor({ expectedLength, givenLength }) {
      super([
        "ABI encoding parameters/values length mismatch.",
        `Expected length (parameters): ${expectedLength}`,
        `Given length (values): ${givenLength}`
      ].join("\n"));
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "AbiParameters.LengthMismatchError"
      });
    }
  };
  var InvalidArrayError2 = class extends BaseError3 {
    constructor(value) {
      super(`Value \`${value}\` is not a valid array.`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "AbiParameters.InvalidArrayError"
      });
    }
  };
  var InvalidTypeError = class extends BaseError3 {
    constructor(type2) {
      super(`Type \`${type2}\` is not a valid ABI Type.`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "AbiParameters.InvalidTypeError"
      });
    }
  };

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Authorization.js
  init_node_compat_inject();
  init_Hex();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Rlp.js
  init_node_compat_inject();
  init_Bytes();
  init_Errors();
  init_Hex();
  function from6(value, options) {
    const { as } = options;
    const encodable = getEncodable2(value);
    const cursor = create(new Uint8Array(encodable.length));
    encodable.encode(cursor);
    if (as === "Hex")
      return fromBytes(cursor.bytes);
    return cursor.bytes;
  }
  function fromHex3(hex3, options = {}) {
    const { as = "Hex" } = options;
    return from6(hex3, { as });
  }
  function getEncodable2(bytes) {
    if (Array.isArray(bytes))
      return getEncodableList2(bytes.map((x13) => getEncodable2(x13)));
    return getEncodableBytes2(bytes);
  }
  function getEncodableList2(list) {
    const bodyLength = list.reduce((acc, x13) => acc + x13.length, 0);
    const sizeOfBodyLength = getSizeOfLength2(bodyLength);
    const length2 = (() => {
      if (bodyLength <= 55)
        return 1 + bodyLength;
      return 1 + sizeOfBodyLength + bodyLength;
    })();
    return {
      length: length2,
      encode(cursor) {
        if (bodyLength <= 55) {
          cursor.pushByte(192 + bodyLength);
        } else {
          cursor.pushByte(192 + 55 + sizeOfBodyLength);
          if (sizeOfBodyLength === 1)
            cursor.pushUint8(bodyLength);
          else if (sizeOfBodyLength === 2)
            cursor.pushUint16(bodyLength);
          else if (sizeOfBodyLength === 3)
            cursor.pushUint24(bodyLength);
          else
            cursor.pushUint32(bodyLength);
        }
        for (const { encode: encode11 } of list) {
          encode11(cursor);
        }
      }
    };
  }
  function getEncodableBytes2(bytesOrHex) {
    const bytes = typeof bytesOrHex === "string" ? fromHex(bytesOrHex) : bytesOrHex;
    const sizeOfBytesLength = getSizeOfLength2(bytes.length);
    const length2 = (() => {
      if (bytes.length === 1 && bytes[0] < 128)
        return 1;
      if (bytes.length <= 55)
        return 1 + bytes.length;
      return 1 + sizeOfBytesLength + bytes.length;
    })();
    return {
      length: length2,
      encode(cursor) {
        if (bytes.length === 1 && bytes[0] < 128) {
          cursor.pushBytes(bytes);
        } else if (bytes.length <= 55) {
          cursor.pushByte(128 + bytes.length);
          cursor.pushBytes(bytes);
        } else {
          cursor.pushByte(128 + 55 + sizeOfBytesLength);
          if (sizeOfBytesLength === 1)
            cursor.pushUint8(bytes.length);
          else if (sizeOfBytesLength === 2)
            cursor.pushUint16(bytes.length);
          else if (sizeOfBytesLength === 3)
            cursor.pushUint24(bytes.length);
          else
            cursor.pushUint32(bytes.length);
          cursor.pushBytes(bytes);
        }
      }
    };
  }
  function getSizeOfLength2(length2) {
    if (length2 <= 255)
      return 1;
    if (length2 <= 65535)
      return 2;
    if (length2 <= 16777215)
      return 3;
    if (length2 <= 4294967295)
      return 4;
    throw new BaseError3("Length is too large.");
  }

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Signature.js
  init_node_compat_inject();
  init_Errors();
  init_Hex();
  init_Json();
  function assert5(signature2, options = {}) {
    const { recovered } = options;
    if (typeof signature2.r === "undefined")
      throw new MissingPropertiesError({ signature: signature2 });
    if (typeof signature2.s === "undefined")
      throw new MissingPropertiesError({ signature: signature2 });
    if (recovered && typeof signature2.yParity === "undefined")
      throw new MissingPropertiesError({ signature: signature2 });
    if (signature2.r < 0n || signature2.r > maxUint2562)
      throw new InvalidRError({ value: signature2.r });
    if (signature2.s < 0n || signature2.s > maxUint2562)
      throw new InvalidSError({ value: signature2.s });
    if (typeof signature2.yParity === "number" && signature2.yParity !== 0 && signature2.yParity !== 1)
      throw new InvalidYParityError({ value: signature2.yParity });
  }
  function fromBytes3(signature2) {
    return fromHex4(fromBytes(signature2));
  }
  function fromHex4(signature2) {
    if (signature2.length !== 130 && signature2.length !== 132)
      throw new InvalidSerializedSizeError2({ signature: signature2 });
    const r3 = BigInt(slice3(signature2, 0, 32));
    const s3 = BigInt(slice3(signature2, 32, 64));
    const yParity = (() => {
      const yParity2 = Number(`0x${signature2.slice(130)}`);
      if (Number.isNaN(yParity2))
        return void 0;
      try {
        return vToYParity(yParity2);
      } catch {
        throw new InvalidYParityError({ value: yParity2 });
      }
    })();
    if (typeof yParity === "undefined")
      return {
        r: r3,
        s: s3
      };
    return {
      r: r3,
      s: s3,
      yParity
    };
  }
  function extract2(value) {
    if (typeof value.r === "undefined")
      return void 0;
    if (typeof value.s === "undefined")
      return void 0;
    return from7(value);
  }
  function from7(signature2) {
    const signature_ = (() => {
      if (typeof signature2 === "string")
        return fromHex4(signature2);
      if (signature2 instanceof Uint8Array)
        return fromBytes3(signature2);
      if (typeof signature2.r === "string")
        return fromRpc2(signature2);
      if (signature2.v)
        return fromLegacy(signature2);
      return {
        r: signature2.r,
        s: signature2.s,
        ...typeof signature2.yParity !== "undefined" ? { yParity: signature2.yParity } : {}
      };
    })();
    assert5(signature_);
    return signature_;
  }
  function fromLegacy(signature2) {
    return {
      r: signature2.r,
      s: signature2.s,
      yParity: vToYParity(signature2.v)
    };
  }
  function fromRpc2(signature2) {
    const yParity = (() => {
      const v13 = signature2.v ? Number(signature2.v) : void 0;
      let yParity2 = signature2.yParity ? Number(signature2.yParity) : void 0;
      if (typeof v13 === "number" && typeof yParity2 !== "number")
        yParity2 = vToYParity(v13);
      if (typeof yParity2 !== "number")
        throw new InvalidYParityError({ value: signature2.yParity });
      return yParity2;
    })();
    return {
      r: BigInt(signature2.r),
      s: BigInt(signature2.s),
      yParity
    };
  }
  function toTuple(signature2) {
    const { r: r3, s: s3, yParity } = signature2;
    return [
      yParity ? "0x01" : "0x",
      r3 === 0n ? "0x" : trimLeft2(fromNumber(r3)),
      s3 === 0n ? "0x" : trimLeft2(fromNumber(s3))
    ];
  }
  function vToYParity(v13) {
    if (v13 === 0 || v13 === 27)
      return 0;
    if (v13 === 1 || v13 === 28)
      return 1;
    if (v13 >= 35)
      return v13 % 2 === 0 ? 1 : 0;
    throw new InvalidVError({ value: v13 });
  }
  var InvalidSerializedSizeError2 = class extends BaseError3 {
    constructor({ signature: signature2 }) {
      super(`Value \`${signature2}\` is an invalid signature size.`, {
        metaMessages: [
          "Expected: 64 bytes or 65 bytes.",
          `Received ${size3(from2(signature2))} bytes.`
        ]
      });
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "Signature.InvalidSerializedSizeError"
      });
    }
  };
  var MissingPropertiesError = class extends BaseError3 {
    constructor({ signature: signature2 }) {
      super(`Signature \`${stringify2(signature2)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "Signature.MissingPropertiesError"
      });
    }
  };
  var InvalidRError = class extends BaseError3 {
    constructor({ value }) {
      super(`Value \`${value}\` is an invalid r value. r must be a positive integer less than 2^256.`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "Signature.InvalidRError"
      });
    }
  };
  var InvalidSError = class extends BaseError3 {
    constructor({ value }) {
      super(`Value \`${value}\` is an invalid s value. s must be a positive integer less than 2^256.`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "Signature.InvalidSError"
      });
    }
  };
  var InvalidYParityError = class extends BaseError3 {
    constructor({ value }) {
      super(`Value \`${value}\` is an invalid y-parity value. Y-parity must be 0 or 1.`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "Signature.InvalidYParityError"
      });
    }
  };
  var InvalidVError = class extends BaseError3 {
    constructor({ value }) {
      super(`Value \`${value}\` is an invalid v value. v must be 27, 28 or >=35.`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "Signature.InvalidVError"
      });
    }
  };

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Authorization.js
  function from8(authorization, options = {}) {
    if (typeof authorization.chainId === "string")
      return fromRpc3(authorization);
    return { ...authorization, ...options.signature };
  }
  function fromRpc3(authorization) {
    const { address, chainId, nonce } = authorization;
    const signature2 = extract2(authorization);
    return {
      address,
      chainId: Number(chainId),
      nonce: BigInt(nonce),
      ...signature2
    };
  }
  function getSignPayload(authorization) {
    return hash2(authorization, { presign: true });
  }
  function hash2(authorization, options = {}) {
    const { presign } = options;
    return keccak2562(concat2("0x05", fromHex3(toTuple2(presign ? {
      address: authorization.address,
      chainId: authorization.chainId,
      nonce: authorization.nonce
    } : authorization))));
  }
  function toTuple2(authorization) {
    const { address, chainId, nonce } = authorization;
    const signature2 = extract2(authorization);
    return [
      chainId ? fromNumber(chainId) : "0x",
      address,
      nonce ? fromNumber(nonce) : "0x",
      ...signature2 ? toTuple(signature2) : []
    ];
  }

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/erc8010/SignatureErc8010.js
  init_Errors();
  init_Hex();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/Secp256k1.js
  init_node_compat_inject();
  init_secp256k1();
  init_Hex();
  function recoverAddress2(options) {
    return fromPublicKey(recoverPublicKey2(options));
  }
  function recoverPublicKey2(options) {
    const { payload, signature: signature2 } = options;
    const { r: r3, s: s3, yParity } = signature2;
    const signature_ = new secp256k1.Signature(BigInt(r3), BigInt(s3)).addRecoveryBit(yParity);
    const point3 = signature_.recoverPublicKey(from2(payload).substring(2));
    return from3(point3);
  }

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/erc8010/SignatureErc8010.js
  var magicBytes = "0x8010801080108010801080108010801080108010801080108010801080108010";
  var suffixParameters = from5("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");
  function assert6(value) {
    if (typeof value === "string") {
      if (slice3(value, -32) !== magicBytes)
        throw new InvalidWrappedSignatureError(value);
    } else
      assert5(value.authorization);
  }
  function from9(value) {
    if (typeof value === "string")
      return unwrap(value);
    return value;
  }
  function unwrap(wrapped) {
    assert6(wrapped);
    const suffixLength = toNumber(slice3(wrapped, -64, -32));
    const suffix = slice3(wrapped, -suffixLength - 64, -64);
    const signature2 = slice3(wrapped, 0, -suffixLength - 64);
    const [auth, to3, data] = decode(suffixParameters, suffix);
    const authorization = from8({
      address: auth.delegation,
      chainId: Number(auth.chainId),
      nonce: auth.nonce,
      yParity: auth.yParity,
      r: auth.r,
      s: auth.s
    });
    return {
      authorization,
      signature: signature2,
      ...data && data !== "0x" ? { data, to: to3 } : {}
    };
  }
  function wrap(value) {
    const { data, signature: signature2 } = value;
    assert6(value);
    const self2 = recoverAddress2({
      payload: getSignPayload(value.authorization),
      signature: from7(value.authorization)
    });
    const suffix = encode2(suffixParameters, [
      {
        ...value.authorization,
        delegation: value.authorization.address,
        chainId: BigInt(value.authorization.chainId)
      },
      value.to ?? self2,
      data ?? "0x"
    ]);
    const suffixLength = fromNumber(size3(suffix), { size: 32 });
    return concat2(signature2, suffix, suffixLength, magicBytes);
  }
  function validate4(value) {
    try {
      assert6(value);
      return true;
    } catch {
      return false;
    }
  }
  var InvalidWrappedSignatureError = class extends BaseError3 {
    constructor(wrapped) {
      super(`Value \`${wrapped}\` is an invalid ERC-8010 wrapped signature.`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "SignatureErc8010.InvalidWrappedSignatureError"
      });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/formatters/proof.js
  function formatStorageProof(storageProof) {
    return storageProof.map((proof) => ({
      ...proof,
      value: BigInt(proof.value)
    }));
  }
  function formatProof(proof) {
    return {
      ...proof,
      balance: proof.balance ? BigInt(proof.balance) : void 0,
      nonce: proof.nonce ? hexToNumber(proof.nonce) : void 0,
      storageProof: proof.storageProof ? formatStorageProof(proof.storageProof) : void 0
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getProof.js
  async function getProof(client, { address, blockNumber, blockTag: blockTag_, storageKeys }) {
    const blockTag = blockTag_ ?? "latest";
    const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;
    const proof = await client.request({
      method: "eth_getProof",
      params: [address, storageKeys, blockNumberHex || blockTag]
    });
    return formatProof(proof);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getStorageAt.js
  init_node_compat_inject();
  init_toHex();
  async function getStorageAt(client, { address, blockNumber, blockTag = "latest", slot }) {
    const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;
    const data = await client.request({
      method: "eth_getStorageAt",
      params: [address, slot, blockNumberHex || blockTag]
    });
    return data;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getTransaction.js
  init_node_compat_inject();
  init_transaction();
  init_toHex();
  async function getTransaction(client, { blockHash, blockNumber, blockTag: blockTag_, hash: hash5, index: index2, sender, nonce }) {
    const blockTag = blockTag_ || "latest";
    const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;
    let transaction = null;
    if (hash5) {
      transaction = await client.request({
        method: "eth_getTransactionByHash",
        params: [hash5]
      }, { dedupe: true });
    } else if (blockHash) {
      transaction = await client.request({
        method: "eth_getTransactionByBlockHashAndIndex",
        params: [blockHash, numberToHex(index2)]
      }, { dedupe: true });
    } else if ((blockNumberHex || blockTag) && typeof index2 === "number") {
      transaction = await client.request({
        method: "eth_getTransactionByBlockNumberAndIndex",
        params: [blockNumberHex || blockTag, numberToHex(index2)]
      }, { dedupe: Boolean(blockNumberHex) });
    } else if (sender && typeof nonce === "number") {
      transaction = await client.request({
        method: "eth_getTransactionBySenderAndNonce",
        params: [sender, numberToHex(nonce)]
      }, { dedupe: true });
    }
    if (!transaction)
      throw new TransactionNotFoundError({
        blockHash,
        blockNumber,
        blockTag,
        hash: hash5,
        index: index2
      });
    const format = client.chain?.formatters?.transaction?.format || formatTransaction;
    return format(transaction, "getTransaction");
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js
  init_node_compat_inject();
  async function getTransactionConfirmations(client, { hash: hash5, transactionReceipt }) {
    const [blockNumber, transaction] = await Promise.all([
      getAction(client, getBlockNumber, "getBlockNumber")({}),
      hash5 ? getAction(client, getTransaction, "getTransaction")({ hash: hash5 }) : void 0
    ]);
    const transactionBlockNumber = transactionReceipt?.blockNumber || transaction?.blockNumber;
    if (!transactionBlockNumber)
      return 0n;
    return blockNumber - transactionBlockNumber + 1n;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/getTransactionReceipt.js
  init_node_compat_inject();
  init_transaction();
  async function getTransactionReceipt(client, { hash: hash5 }) {
    const receipt = await client.request({
      method: "eth_getTransactionReceipt",
      params: [hash5]
    }, { dedupe: true });
    if (!receipt)
      throw new TransactionReceiptNotFoundError({ hash: hash5 });
    const format = client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt;
    return format(receipt, "getTransactionReceipt");
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/multicall.js
  init_node_compat_inject();
  init_abis();
  init_contracts();
  init_abi();
  init_base();
  init_contract();
  init_decodeFunctionResult();
  init_encodeFunctionData();
  init_getChainContractAddress();
  async function multicall(client, parameters) {
    const { account, authorizationList, allowFailure = true, blockNumber, blockOverrides, blockTag, stateOverride } = parameters;
    const contracts2 = parameters.contracts;
    const { batchSize = parameters.batchSize ?? 1024, deployless = parameters.deployless ?? false } = typeof client.batch?.multicall === "object" ? client.batch.multicall : {};
    const multicallAddress = (() => {
      if (parameters.multicallAddress)
        return parameters.multicallAddress;
      if (deployless)
        return null;
      if (client.chain) {
        return getChainContractAddress({
          blockNumber,
          chain: client.chain,
          contract: "multicall3"
        });
      }
      throw new Error("client chain not configured. multicallAddress is required.");
    })();
    const chunkedCalls = [[]];
    let currentChunk = 0;
    let currentChunkSize = 0;
    for (let i5 = 0; i5 < contracts2.length; i5++) {
      const { abi: abi2, address, args, functionName } = contracts2[i5];
      try {
        const callData = encodeFunctionData({ abi: abi2, args, functionName });
        currentChunkSize += (callData.length - 2) / 2;
        if (
          // Check if batching is enabled.
          batchSize > 0 && // Check if the current size of the batch exceeds the size limit.
          currentChunkSize > batchSize && // Check if the current chunk is not already empty.
          chunkedCalls[currentChunk].length > 0
        ) {
          currentChunk++;
          currentChunkSize = (callData.length - 2) / 2;
          chunkedCalls[currentChunk] = [];
        }
        chunkedCalls[currentChunk] = [
          ...chunkedCalls[currentChunk],
          {
            allowFailure: true,
            callData,
            target: address
          }
        ];
      } catch (err2) {
        const error51 = getContractError(err2, {
          abi: abi2,
          address,
          args,
          docsPath: "/docs/contract/multicall",
          functionName,
          sender: account
        });
        if (!allowFailure)
          throw error51;
        chunkedCalls[currentChunk] = [
          ...chunkedCalls[currentChunk],
          {
            allowFailure: true,
            callData: "0x",
            target: address
          }
        ];
      }
    }
    const aggregate3Results = await Promise.allSettled(chunkedCalls.map((calls) => getAction(client, readContract, "readContract")({
      ...multicallAddress === null ? { code: multicall3Bytecode } : { address: multicallAddress },
      abi: multicall3Abi,
      account,
      args: [calls],
      authorizationList,
      blockNumber,
      blockOverrides,
      blockTag,
      functionName: "aggregate3",
      stateOverride
    })));
    const results = [];
    for (let i5 = 0; i5 < aggregate3Results.length; i5++) {
      const result = aggregate3Results[i5];
      if (result.status === "rejected") {
        if (!allowFailure)
          throw result.reason;
        for (let j6 = 0; j6 < chunkedCalls[i5].length; j6++) {
          results.push({
            status: "failure",
            error: result.reason,
            result: void 0
          });
        }
        continue;
      }
      const aggregate3Result = result.value;
      for (let j6 = 0; j6 < aggregate3Result.length; j6++) {
        const { returnData, success: success2 } = aggregate3Result[j6];
        const { callData } = chunkedCalls[i5][j6];
        const { abi: abi2, address, functionName, args } = contracts2[results.length];
        try {
          if (callData === "0x")
            throw new AbiDecodingZeroDataError();
          if (!success2)
            throw new RawContractError({ data: returnData });
          const result2 = decodeFunctionResult({
            abi: abi2,
            args,
            data: returnData,
            functionName
          });
          results.push(allowFailure ? { result: result2, status: "success" } : result2);
        } catch (err2) {
          const error51 = getContractError(err2, {
            abi: abi2,
            address,
            args,
            docsPath: "/docs/contract/multicall",
            functionName
          });
          if (!allowFailure)
            throw error51;
          results.push({ error: error51, result: void 0, status: "failure" });
        }
      }
    }
    if (results.length !== contracts2.length)
      throw new BaseError2("multicall results mismatch");
    return results;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/simulateBlocks.js
  init_node_compat_inject();
  init_BlockOverrides();
  init_parseAccount();
  init_abi();
  init_contract();
  init_node();
  init_decodeFunctionResult();
  init_encodeFunctionData();
  init_concat();
  init_toHex();
  init_getNodeError();
  init_transactionRequest();
  init_stateOverride2();
  init_assertRequest();
  async function simulateBlocks(client, parameters) {
    const { blockNumber, blockTag = client.experimental_blockTag ?? "latest", blocks, returnFullTransactions, traceTransfers, validation } = parameters;
    try {
      const blockStateCalls = [];
      for (const block2 of blocks) {
        const blockOverrides = block2.blockOverrides ? toRpc2(block2.blockOverrides) : void 0;
        const calls = block2.calls.map((call_) => {
          const call2 = call_;
          const account = call2.account ? parseAccount(call2.account) : void 0;
          const data = call2.abi ? encodeFunctionData(call2) : call2.data;
          const request = {
            ...call2,
            account,
            data: call2.dataSuffix ? concat([data || "0x", call2.dataSuffix]) : data,
            from: call2.from ?? account?.address
          };
          assertRequest(request);
          return formatTransactionRequest(request);
        });
        const stateOverrides = block2.stateOverrides ? serializeStateOverride(block2.stateOverrides) : void 0;
        blockStateCalls.push({
          blockOverrides,
          calls,
          stateOverrides
        });
      }
      const blockNumberHex = typeof blockNumber === "bigint" ? numberToHex(blockNumber) : void 0;
      const block = blockNumberHex || blockTag;
      const result = await client.request({
        method: "eth_simulateV1",
        params: [
          { blockStateCalls, returnFullTransactions, traceTransfers, validation },
          block
        ]
      });
      return result.map((block2, i5) => ({
        ...formatBlock(block2),
        calls: block2.calls.map((call2, j6) => {
          const { abi: abi2, args, functionName, to: to3 } = blocks[i5].calls[j6];
          const data = call2.error?.data ?? call2.returnData;
          const gasUsed = BigInt(call2.gasUsed);
          const logs = call2.logs?.map((log) => formatLog(log));
          const status = call2.status === "0x1" ? "success" : "failure";
          const result2 = abi2 && status === "success" && data !== "0x" ? decodeFunctionResult({
            abi: abi2,
            data,
            functionName
          }) : null;
          const error51 = (() => {
            if (status === "success")
              return void 0;
            let error52;
            if (data === "0x")
              error52 = new AbiDecodingZeroDataError();
            else if (data)
              error52 = new RawContractError({ data });
            if (!error52)
              return void 0;
            return getContractError(error52, {
              abi: abi2 ?? [],
              address: to3 ?? "0x",
              args,
              functionName: functionName ?? "<unknown>"
            });
          })();
          return {
            data,
            gasUsed,
            logs,
            status,
            ...status === "success" ? {
              result: result2
            } : {
              error: error51
            }
          };
        })
      }));
    } catch (e2) {
      const cause = e2;
      const error51 = getNodeError(cause, {});
      if (error51 instanceof UnknownNodeError)
        throw cause;
      throw error51;
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/simulateCalls.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/AbiConstructor.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/AbiItem.js
  init_node_compat_inject();
  init_exports();
  init_Errors();
  init_Hex();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/internal/abiItem.js
  init_node_compat_inject();
  init_Errors();
  function normalizeSignature2(signature2) {
    let active = true;
    let current = "";
    let level = 0;
    let result = "";
    let valid = false;
    for (let i5 = 0; i5 < signature2.length; i5++) {
      const char = signature2[i5];
      if (["(", ")", ","].includes(char))
        active = true;
      if (char === "(")
        level++;
      if (char === ")")
        level--;
      if (!active)
        continue;
      if (level === 0) {
        if (char === " " && ["event", "function", "error", ""].includes(result))
          result = "";
        else {
          result += char;
          if (char === ")") {
            valid = true;
            break;
          }
        }
        continue;
      }
      if (char === " ") {
        if (signature2[i5 - 1] !== "," && current !== "," && current !== ",(") {
          current = "";
          active = false;
        }
        continue;
      }
      result += char;
      current += char;
    }
    if (!valid)
      throw new BaseError3("Unable to normalize signature.");
    return result;
  }
  function isArgOfType2(arg, abiParameter) {
    const argType = typeof arg;
    const abiParameterType = abiParameter.type;
    switch (abiParameterType) {
      case "address":
        return validate3(arg, { strict: false });
      case "bool":
        return argType === "boolean";
      case "function":
        return argType === "string";
      case "string":
        return argType === "string";
      default: {
        if (abiParameterType === "tuple" && "components" in abiParameter)
          return Object.values(abiParameter.components).every((component, index2) => {
            return isArgOfType2(Object.values(arg)[index2], component);
          });
        if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))
          return argType === "number" || argType === "bigint";
        if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))
          return argType === "string" || arg instanceof Uint8Array;
        if (/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(abiParameterType)) {
          return Array.isArray(arg) && arg.every((x13) => isArgOfType2(x13, {
            ...abiParameter,
            // Pop off `[]` or `[M]` from end of type
            type: abiParameterType.replace(/(\[[0-9]{0,}\])$/, "")
          }));
        }
        return false;
      }
    }
  }
  function getAmbiguousTypes2(sourceParameters, targetParameters, args) {
    for (const parameterIndex in sourceParameters) {
      const sourceParameter = sourceParameters[parameterIndex];
      const targetParameter = targetParameters[parameterIndex];
      if (sourceParameter.type === "tuple" && targetParameter.type === "tuple" && "components" in sourceParameter && "components" in targetParameter)
        return getAmbiguousTypes2(sourceParameter.components, targetParameter.components, args[parameterIndex]);
      const types = [sourceParameter.type, targetParameter.type];
      const ambiguous = (() => {
        if (types.includes("address") && types.includes("bytes20"))
          return true;
        if (types.includes("address") && types.includes("string"))
          return validate3(args[parameterIndex], {
            strict: false
          });
        if (types.includes("address") && types.includes("bytes"))
          return validate3(args[parameterIndex], {
            strict: false
          });
        return false;
      })();
      if (ambiguous)
        return types;
    }
    return;
  }

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/AbiItem.js
  function from10(abiItem, options = {}) {
    const { prepare = true } = options;
    const item = (() => {
      if (Array.isArray(abiItem))
        return parseAbiItem(abiItem);
      if (typeof abiItem === "string")
        return parseAbiItem(abiItem);
      return abiItem;
    })();
    return {
      ...item,
      ...prepare ? { hash: getSignatureHash(item) } : {}
    };
  }
  function fromAbi(abi2, name2, options) {
    const { args = [], prepare = true } = options ?? {};
    const isSelector = validate2(name2, { strict: false });
    const abiItems = abi2.filter((abiItem2) => {
      if (isSelector) {
        if (abiItem2.type === "function" || abiItem2.type === "error")
          return getSelector(abiItem2) === slice3(name2, 0, 4);
        if (abiItem2.type === "event")
          return getSignatureHash(abiItem2) === name2;
        return false;
      }
      return "name" in abiItem2 && abiItem2.name === name2;
    });
    if (abiItems.length === 0)
      throw new NotFoundError({ name: name2 });
    if (abiItems.length === 1)
      return {
        ...abiItems[0],
        ...prepare ? { hash: getSignatureHash(abiItems[0]) } : {}
      };
    let matchedAbiItem;
    for (const abiItem2 of abiItems) {
      if (!("inputs" in abiItem2))
        continue;
      if (!args || args.length === 0) {
        if (!abiItem2.inputs || abiItem2.inputs.length === 0)
          return {
            ...abiItem2,
            ...prepare ? { hash: getSignatureHash(abiItem2) } : {}
          };
        continue;
      }
      if (!abiItem2.inputs)
        continue;
      if (abiItem2.inputs.length === 0)
        continue;
      if (abiItem2.inputs.length !== args.length)
        continue;
      const matched = args.every((arg, index2) => {
        const abiParameter = "inputs" in abiItem2 && abiItem2.inputs[index2];
        if (!abiParameter)
          return false;
        return isArgOfType2(arg, abiParameter);
      });
      if (matched) {
        if (matchedAbiItem && "inputs" in matchedAbiItem && matchedAbiItem.inputs) {
          const ambiguousTypes = getAmbiguousTypes2(abiItem2.inputs, matchedAbiItem.inputs, args);
          if (ambiguousTypes)
            throw new AmbiguityError({
              abiItem: abiItem2,
              type: ambiguousTypes[0]
            }, {
              abiItem: matchedAbiItem,
              type: ambiguousTypes[1]
            });
        }
        matchedAbiItem = abiItem2;
      }
    }
    const abiItem = (() => {
      if (matchedAbiItem)
        return matchedAbiItem;
      const [abiItem2, ...overloads] = abiItems;
      return { ...abiItem2, overloads };
    })();
    if (!abiItem)
      throw new NotFoundError({ name: name2 });
    return {
      ...abiItem,
      ...prepare ? { hash: getSignatureHash(abiItem) } : {}
    };
  }
  function getSelector(...parameters) {
    const abiItem = (() => {
      if (Array.isArray(parameters[0])) {
        const [abi2, name2] = parameters;
        return fromAbi(abi2, name2);
      }
      return parameters[0];
    })();
    return slice3(getSignatureHash(abiItem), 0, 4);
  }
  function getSignature(...parameters) {
    const abiItem = (() => {
      if (Array.isArray(parameters[0])) {
        const [abi2, name2] = parameters;
        return fromAbi(abi2, name2);
      }
      return parameters[0];
    })();
    const signature2 = (() => {
      if (typeof abiItem === "string")
        return abiItem;
      return formatAbiItem(abiItem);
    })();
    return normalizeSignature2(signature2);
  }
  function getSignatureHash(...parameters) {
    const abiItem = (() => {
      if (Array.isArray(parameters[0])) {
        const [abi2, name2] = parameters;
        return fromAbi(abi2, name2);
      }
      return parameters[0];
    })();
    if (typeof abiItem !== "string" && "hash" in abiItem && abiItem.hash)
      return abiItem.hash;
    return keccak2562(fromString2(getSignature(abiItem)));
  }
  var AmbiguityError = class extends BaseError3 {
    constructor(x13, y11) {
      super("Found ambiguous types in overloaded ABI Items.", {
        metaMessages: [
          // TODO: abitype to add support for signature-formatted ABI items.
          `\`${x13.type}\` in \`${normalizeSignature2(formatAbiItem(x13.abiItem))}\`, and`,
          `\`${y11.type}\` in \`${normalizeSignature2(formatAbiItem(y11.abiItem))}\``,
          "",
          "These types encode differently and cannot be distinguished at runtime.",
          "Remove one of the ambiguous items in the ABI."
        ]
      });
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "AbiItem.AmbiguityError"
      });
    }
  };
  var NotFoundError = class extends BaseError3 {
    constructor({ name: name2, data, type: type2 = "item" }) {
      const selector = (() => {
        if (name2)
          return ` with name "${name2}"`;
        if (data)
          return ` with data "${data}"`;
        return "";
      })();
      super(`ABI ${type2}${selector} not found.`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "AbiItem.NotFoundError"
      });
    }
  };

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/AbiConstructor.js
  init_Hex();
  function encode3(...parameters) {
    const [abiConstructor, options] = (() => {
      if (Array.isArray(parameters[0])) {
        const [abi2, options2] = parameters;
        return [fromAbi2(abi2), options2];
      }
      return parameters;
    })();
    const { bytecode, args } = options;
    return concat2(bytecode, abiConstructor.inputs?.length && args?.length ? encode2(abiConstructor.inputs, args) : "0x");
  }
  function from11(abiConstructor) {
    return from10(abiConstructor);
  }
  function fromAbi2(abi2) {
    const item = abi2.find((item2) => item2.type === "constructor");
    if (!item)
      throw new NotFoundError({ name: "constructor" });
    return item;
  }

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/core/AbiFunction.js
  init_node_compat_inject();
  init_Hex();
  function encodeData2(...parameters) {
    const [abiFunction, args = []] = (() => {
      if (Array.isArray(parameters[0])) {
        const [abi2, name2, args3] = parameters;
        return [fromAbi3(abi2, name2, { args: args3 }), args3];
      }
      const [abiFunction2, args2] = parameters;
      return [abiFunction2, args2];
    })();
    const { overloads } = abiFunction;
    const item = overloads ? fromAbi3([abiFunction, ...overloads], abiFunction.name, {
      args
    }) : abiFunction;
    const selector = getSelector2(item);
    const data = args.length > 0 ? encode2(item.inputs, args) : void 0;
    return data ? concat2(selector, data) : selector;
  }
  function from12(abiFunction, options = {}) {
    return from10(abiFunction, options);
  }
  function fromAbi3(abi2, name2, options) {
    const item = fromAbi(abi2, name2, options);
    if (item.type !== "function")
      throw new NotFoundError({ name: name2, type: "function" });
    return item;
  }
  function getSelector2(abiItem) {
    return getSelector(abiItem);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/simulateCalls.js
  init_parseAccount();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/constants/address.js
  init_node_compat_inject();
  var ethAddress = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
  var zeroAddress = "0x0000000000000000000000000000000000000000";

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/simulateCalls.js
  init_contracts();
  init_base();
  init_encodeFunctionData();
  var getBalanceCode = "0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";
  async function simulateCalls(client, parameters) {
    const { blockNumber, blockTag, calls, stateOverrides, traceAssetChanges, traceTransfers, validation } = parameters;
    const account = parameters.account ? parseAccount(parameters.account) : void 0;
    if (traceAssetChanges && !account)
      throw new BaseError2("`account` is required when `traceAssetChanges` is true");
    const getBalanceData = account ? encode3(from11("constructor(bytes, bytes)"), {
      bytecode: deploylessCallViaBytecodeBytecode,
      args: [
        getBalanceCode,
        encodeData2(from12("function getBalance(address)"), [account.address])
      ]
    }) : void 0;
    const assetAddresses = traceAssetChanges ? await Promise.all(parameters.calls.map(async (call2) => {
      if (!call2.data && !call2.abi)
        return;
      const { accessList } = await createAccessList(client, {
        account: account.address,
        ...call2,
        data: call2.abi ? encodeFunctionData(call2) : call2.data
      });
      return accessList.map(({ address, storageKeys }) => storageKeys.length > 0 ? address : null);
    })).then((x13) => x13.flat().filter(Boolean)) : [];
    const blocks = await simulateBlocks(client, {
      blockNumber,
      blockTag,
      blocks: [
        ...traceAssetChanges ? [
          // ETH pre balances
          {
            calls: [{ data: getBalanceData }],
            stateOverrides
          },
          // Asset pre balances
          {
            calls: assetAddresses.map((address, i5) => ({
              abi: [
                from12("function balanceOf(address) returns (uint256)")
              ],
              functionName: "balanceOf",
              args: [account.address],
              to: address,
              from: zeroAddress,
              nonce: i5
            })),
            stateOverrides: [
              {
                address: zeroAddress,
                nonce: 0
              }
            ]
          }
        ] : [],
        {
          calls: [...calls, { to: zeroAddress }].map((call2) => ({
            ...call2,
            from: account?.address
          })),
          stateOverrides
        },
        ...traceAssetChanges ? [
          // ETH post balances
          {
            calls: [{ data: getBalanceData }]
          },
          // Asset post balances
          {
            calls: assetAddresses.map((address, i5) => ({
              abi: [
                from12("function balanceOf(address) returns (uint256)")
              ],
              functionName: "balanceOf",
              args: [account.address],
              to: address,
              from: zeroAddress,
              nonce: i5
            })),
            stateOverrides: [
              {
                address: zeroAddress,
                nonce: 0
              }
            ]
          },
          // Decimals
          {
            calls: assetAddresses.map((address, i5) => ({
              to: address,
              abi: [
                from12("function decimals() returns (uint256)")
              ],
              functionName: "decimals",
              from: zeroAddress,
              nonce: i5
            })),
            stateOverrides: [
              {
                address: zeroAddress,
                nonce: 0
              }
            ]
          },
          // Token URI
          {
            calls: assetAddresses.map((address, i5) => ({
              to: address,
              abi: [
                from12("function tokenURI(uint256) returns (string)")
              ],
              functionName: "tokenURI",
              args: [0n],
              from: zeroAddress,
              nonce: i5
            })),
            stateOverrides: [
              {
                address: zeroAddress,
                nonce: 0
              }
            ]
          },
          // Symbols
          {
            calls: assetAddresses.map((address, i5) => ({
              to: address,
              abi: [from12("function symbol() returns (string)")],
              functionName: "symbol",
              from: zeroAddress,
              nonce: i5
            })),
            stateOverrides: [
              {
                address: zeroAddress,
                nonce: 0
              }
            ]
          }
        ] : []
      ],
      traceTransfers,
      validation
    });
    const block_results = traceAssetChanges ? blocks[2] : blocks[0];
    const [block_ethPre, block_assetsPre, , block_ethPost, block_assetsPost, block_decimals, block_tokenURI, block_symbols] = traceAssetChanges ? blocks : [];
    const { calls: block_calls, ...block } = block_results;
    const results = block_calls.slice(0, -1) ?? [];
    const ethPre = block_ethPre?.calls ?? [];
    const assetsPre = block_assetsPre?.calls ?? [];
    const balancesPre = [...ethPre, ...assetsPre].map((call2) => call2.status === "success" ? hexToBigInt(call2.data) : null);
    const ethPost = block_ethPost?.calls ?? [];
    const assetsPost = block_assetsPost?.calls ?? [];
    const balancesPost = [...ethPost, ...assetsPost].map((call2) => call2.status === "success" ? hexToBigInt(call2.data) : null);
    const decimals = (block_decimals?.calls ?? []).map((x13) => x13.status === "success" ? x13.result : null);
    const symbols = (block_symbols?.calls ?? []).map((x13) => x13.status === "success" ? x13.result : null);
    const tokenURI = (block_tokenURI?.calls ?? []).map((x13) => x13.status === "success" ? x13.result : null);
    const changes = [];
    for (const [i5, balancePost] of balancesPost.entries()) {
      const balancePre = balancesPre[i5];
      if (typeof balancePost !== "bigint")
        continue;
      if (typeof balancePre !== "bigint")
        continue;
      const decimals_ = decimals[i5 - 1];
      const symbol_ = symbols[i5 - 1];
      const tokenURI_ = tokenURI[i5 - 1];
      const token = (() => {
        if (i5 === 0)
          return {
            address: ethAddress,
            decimals: 18,
            symbol: "ETH"
          };
        return {
          address: assetAddresses[i5 - 1],
          decimals: tokenURI_ || decimals_ ? Number(decimals_ ?? 1) : void 0,
          symbol: symbol_ ?? void 0
        };
      })();
      if (changes.some((change) => change.token.address === token.address))
        continue;
      changes.push({
        token,
        value: {
          pre: balancePre,
          post: balancePost,
          diff: balancePost - balancePre
        }
      });
    }
    return {
      assetChanges: changes,
      block,
      results
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/verifyHash.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/erc6492/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/ox@0.14.20_typescript@5.9.3_zod@4.4.3/node_modules/ox/_esm/erc6492/SignatureErc6492.js
  var SignatureErc6492_exports = {};
  __export(SignatureErc6492_exports, {
    InvalidWrappedSignatureError: () => InvalidWrappedSignatureError2,
    assert: () => assert7,
    from: () => from13,
    magicBytes: () => magicBytes2,
    universalSignatureValidatorAbi: () => universalSignatureValidatorAbi,
    universalSignatureValidatorBytecode: () => universalSignatureValidatorBytecode,
    unwrap: () => unwrap2,
    validate: () => validate5,
    wrap: () => wrap2
  });
  init_node_compat_inject();
  init_Errors();
  init_Hex();
  var magicBytes2 = "0x6492649264926492649264926492649264926492649264926492649264926492";
  var universalSignatureValidatorBytecode = "0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";
  var universalSignatureValidatorAbi = [
    {
      inputs: [
        {
          name: "_signer",
          type: "address"
        },
        {
          name: "_hash",
          type: "bytes32"
        },
        {
          name: "_signature",
          type: "bytes"
        }
      ],
      stateMutability: "nonpayable",
      type: "constructor"
    },
    {
      inputs: [
        {
          name: "_signer",
          type: "address"
        },
        {
          name: "_hash",
          type: "bytes32"
        },
        {
          name: "_signature",
          type: "bytes"
        }
      ],
      outputs: [
        {
          type: "bool"
        }
      ],
      stateMutability: "nonpayable",
      type: "function",
      name: "isValidSig"
    }
  ];
  function assert7(wrapped) {
    if (slice3(wrapped, -32) !== magicBytes2)
      throw new InvalidWrappedSignatureError2(wrapped);
  }
  function from13(wrapped) {
    if (typeof wrapped === "string")
      return unwrap2(wrapped);
    return wrapped;
  }
  function unwrap2(wrapped) {
    assert7(wrapped);
    const [to3, data, signature2] = decode(from5("address, bytes, bytes"), wrapped);
    return { data, signature: signature2, to: to3 };
  }
  function wrap2(value) {
    const { data, signature: signature2, to: to3 } = value;
    return concat2(encode2(from5("address, bytes, bytes"), [
      to3,
      data,
      signature2
    ]), magicBytes2);
  }
  function validate5(wrapped) {
    try {
      assert7(wrapped);
      return true;
    } catch {
      return false;
    }
  }
  var InvalidWrappedSignatureError2 = class extends BaseError3 {
    constructor(wrapped) {
      super(`Value \`${wrapped}\` is an invalid ERC-6492 wrapped signature.`);
      Object.defineProperty(this, "name", {
        enumerable: true,
        configurable: true,
        writable: true,
        value: "SignatureErc6492.InvalidWrappedSignatureError"
      });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/verifyHash.js
  init_abis();
  init_contracts();
  init_contract();
  init_encodeDeployData();
  init_encodeFunctionData();
  init_getAddress();
  init_isAddressEqual();
  init_concat();
  init_isHex();
  init_fromHex();
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/signature/serializeSignature.js
  init_node_compat_inject();
  init_secp256k1();
  init_fromHex();
  init_toBytes();
  function serializeSignature({ r: r3, s: s3, to: to3 = "hex", v: v13, yParity }) {
    const yParity_ = (() => {
      if (yParity === 0 || yParity === 1)
        return yParity;
      if (v13 && (v13 === 27n || v13 === 28n || v13 >= 35n))
        return v13 % 2n === 0n ? 1 : 0;
      throw new Error("Invalid `v` or `yParity` value");
    })();
    const signature2 = `0x${new secp256k1.Signature(hexToBigInt(r3), hexToBigInt(s3)).toCompactHex()}${yParity_ === 0 ? "1b" : "1c"}`;
    if (to3 === "hex")
      return signature2;
    return hexToBytes(signature2);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/verifyHash.js
  init_call();
  async function verifyHash(client, parameters) {
    const { address, chain: chain2 = client.chain, hash: hash5, erc6492VerifierAddress: verifierAddress = parameters.universalSignatureVerifierAddress ?? chain2?.contracts?.erc6492Verifier?.address, multicallAddress = parameters.multicallAddress ?? chain2?.contracts?.multicall3?.address, mode = "auto" } = parameters;
    if (chain2?.verifyHash)
      return await chain2.verifyHash(client, parameters);
    const signature2 = (() => {
      const signature3 = parameters.signature;
      if (isHex(signature3))
        return signature3;
      if (typeof signature3 === "object" && "r" in signature3 && "s" in signature3)
        return serializeSignature(signature3);
      return bytesToHex(signature3);
    })();
    try {
      if (mode === "eoa") {
        try {
          const verified = isAddressEqual(getAddress(address), await recoverAddress({ hash: hash5, signature: signature2 }));
          if (verified)
            return true;
        } catch {
        }
      }
      if (SignatureErc8010_exports.validate(signature2))
        return await verifyErc8010(client, {
          ...parameters,
          multicallAddress,
          signature: signature2
        });
      return await verifyErc6492(client, {
        ...parameters,
        verifierAddress,
        signature: signature2
      });
    } catch (error51) {
      if (mode !== "eoa") {
        try {
          const verified = isAddressEqual(getAddress(address), await recoverAddress({ hash: hash5, signature: signature2 }));
          if (verified)
            return true;
        } catch {
        }
      }
      if (error51 instanceof VerificationError) {
        return false;
      }
      throw error51;
    }
  }
  async function verifyErc8010(client, parameters) {
    const { address, blockNumber, blockTag, hash: hash5, multicallAddress } = parameters;
    const { authorization: authorization_ox, data: initData, signature: signature2, to: to3 } = SignatureErc8010_exports.unwrap(parameters.signature);
    const code2 = await getCode(client, {
      address,
      blockNumber,
      blockTag
    });
    if (code2 === concatHex(["0xef0100", authorization_ox.address]))
      return await verifyErc1271(client, {
        address,
        blockNumber,
        blockTag,
        hash: hash5,
        signature: signature2
      });
    const authorization = {
      address: authorization_ox.address,
      chainId: Number(authorization_ox.chainId),
      nonce: Number(authorization_ox.nonce),
      r: numberToHex(authorization_ox.r, { size: 32 }),
      s: numberToHex(authorization_ox.s, { size: 32 }),
      yParity: authorization_ox.yParity
    };
    const valid = await verifyAuthorization({
      address,
      authorization
    });
    if (!valid)
      throw new VerificationError();
    const results = await getAction(client, readContract, "readContract")({
      ...multicallAddress ? { address: multicallAddress } : { code: multicall3Bytecode },
      authorizationList: [authorization],
      abi: multicall3Abi,
      blockNumber,
      blockTag: "pending",
      functionName: "aggregate3",
      args: [
        [
          ...initData ? [
            {
              allowFailure: true,
              target: to3 ?? address,
              callData: initData
            }
          ] : [],
          {
            allowFailure: true,
            target: address,
            callData: encodeFunctionData({
              abi: erc1271Abi,
              functionName: "isValidSignature",
              args: [hash5, signature2]
            })
          }
        ]
      ]
    });
    const data = results[results.length - 1]?.returnData;
    if (data?.startsWith("0x1626ba7e"))
      return true;
    throw new VerificationError();
  }
  async function verifyErc6492(client, parameters) {
    const { address, factory, factoryData, hash: hash5, signature: signature2, verifierAddress, ...rest } = parameters;
    const wrappedSignature = await (async () => {
      if (!factory && !factoryData)
        return signature2;
      if (SignatureErc6492_exports.validate(signature2))
        return signature2;
      return SignatureErc6492_exports.wrap({
        data: factoryData,
        signature: signature2,
        to: factory
      });
    })();
    const args = verifierAddress ? {
      to: verifierAddress,
      data: encodeFunctionData({
        abi: erc6492SignatureValidatorAbi,
        functionName: "isValidSig",
        args: [address, hash5, wrappedSignature]
      }),
      ...rest
    } : {
      data: encodeDeployData({
        abi: erc6492SignatureValidatorAbi,
        args: [address, hash5, wrappedSignature],
        bytecode: erc6492SignatureValidatorByteCode
      }),
      ...rest
    };
    const { data } = await getAction(client, call, "call")(args).catch((error51) => {
      if (error51 instanceof CallExecutionError)
        throw new VerificationError();
      throw error51;
    });
    if (hexToBool(data ?? "0x0"))
      return true;
    throw new VerificationError();
  }
  async function verifyErc1271(client, parameters) {
    const { address, blockNumber, blockTag, hash: hash5, signature: signature2 } = parameters;
    const result = await getAction(client, readContract, "readContract")({
      address,
      abi: erc1271Abi,
      args: [hash5, signature2],
      blockNumber,
      blockTag,
      functionName: "isValidSignature"
    }).catch((error51) => {
      if (error51 instanceof ContractFunctionExecutionError)
        throw new VerificationError();
      throw error51;
    });
    if (result.startsWith("0x1626ba7e"))
      return true;
    throw new VerificationError();
  }
  var VerificationError = class extends Error {
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/verifyMessage.js
  init_node_compat_inject();
  async function verifyMessage(client, { address, message, factory, factoryData, signature: signature2, ...callRequest }) {
    const hash5 = hashMessage(message);
    return getAction(client, verifyHash, "verifyHash")({
      address,
      factory,
      factoryData,
      hash: hash5,
      signature: signature2,
      ...callRequest
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/verifyTypedData.js
  init_node_compat_inject();
  async function verifyTypedData(client, parameters) {
    const { address, factory, factoryData, signature: signature2, message, primaryType, types, domain: domain2, ...callRequest } = parameters;
    const hash5 = hashTypedData({ message, primaryType, types, domain: domain2 });
    return getAction(client, verifyHash, "verifyHash")({
      address,
      factory,
      factoryData,
      hash: hash5,
      signature: signature2,
      ...callRequest
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js
  init_node_compat_inject();
  init_transaction();
  init_withResolvers();
  init_stringify();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/watchBlockNumber.js
  init_node_compat_inject();
  init_fromHex();
  init_stringify();
  function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onBlockNumber, onError, poll: poll_, pollingInterval = client.pollingInterval }) {
    const enablePolling = (() => {
      if (typeof poll_ !== "undefined")
        return poll_;
      if (client.transport.type === "webSocket" || client.transport.type === "ipc")
        return false;
      if (client.transport.type === "fallback" && (client.transport.transports[0].config.type === "webSocket" || client.transport.transports[0].config.type === "ipc"))
        return false;
      return true;
    })();
    let prevBlockNumber;
    const pollBlockNumber = () => {
      const observerId = stringify([
        "watchBlockNumber",
        client.uid,
        emitOnBegin,
        emitMissed,
        pollingInterval
      ]);
      return observe(observerId, { onBlockNumber, onError }, (emit) => poll(async () => {
        try {
          const blockNumber = await getAction(client, getBlockNumber, "getBlockNumber")({ cacheTime: 0 });
          if (prevBlockNumber !== void 0) {
            if (blockNumber === prevBlockNumber)
              return;
            if (blockNumber - prevBlockNumber > 1 && emitMissed) {
              for (let i5 = prevBlockNumber + 1n; i5 < blockNumber; i5++) {
                emit.onBlockNumber(i5, prevBlockNumber);
                prevBlockNumber = i5;
              }
            }
          }
          if (prevBlockNumber === void 0 || blockNumber > prevBlockNumber) {
            emit.onBlockNumber(blockNumber, prevBlockNumber);
            prevBlockNumber = blockNumber;
          }
        } catch (err2) {
          emit.onError?.(err2);
        }
      }, {
        emitOnBegin,
        interval: pollingInterval
      }));
    };
    const subscribeBlockNumber = () => {
      const observerId = stringify([
        "watchBlockNumber",
        client.uid,
        emitOnBegin,
        emitMissed
      ]);
      return observe(observerId, { onBlockNumber, onError }, (emit) => {
        let active = true;
        let unsubscribe = () => active = false;
        (async () => {
          try {
            const transport = (() => {
              if (client.transport.type === "fallback") {
                const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket" || transport3.config.type === "ipc");
                if (!transport2)
                  return client.transport;
                return transport2.value;
              }
              return client.transport;
            })();
            const { unsubscribe: unsubscribe_ } = await transport.subscribe({
              params: ["newHeads"],
              onData(data) {
                if (!active)
                  return;
                const blockNumber = hexToBigInt(data.result?.number);
                emit.onBlockNumber(blockNumber, prevBlockNumber);
                prevBlockNumber = blockNumber;
              },
              onError(error51) {
                emit.onError?.(error51);
              }
            });
            unsubscribe = unsubscribe_;
            if (!active)
              unsubscribe();
          } catch (err2) {
            onError?.(err2);
          }
        })();
        return () => unsubscribe();
      });
    };
    return enablePolling ? pollBlockNumber() : subscribeBlockNumber();
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js
  async function waitForTransactionReceipt(client, parameters) {
    const {
      checkReplacement = true,
      confirmations = 1,
      hash: hash5,
      onReplaced,
      retryCount = 6,
      retryDelay = ({ count }) => ~~(1 << count) * 200,
      // exponential backoff
      timeout = 18e4
    } = parameters;
    const observerId = stringify(["waitForTransactionReceipt", client.uid, hash5]);
    const pollingInterval = (() => {
      if (parameters.pollingInterval)
        return parameters.pollingInterval;
      if (client.chain?.experimental_preconfirmationTime)
        return client.chain.experimental_preconfirmationTime;
      return client.pollingInterval;
    })();
    let transaction;
    let replacedTransaction;
    let receipt;
    let retrying = false;
    let _unobserve;
    let _unwatch;
    const { promise: promise2, resolve, reject: reject2 } = withResolvers();
    const timer = timeout ? setTimeout(() => {
      _unwatch?.();
      _unobserve?.();
      reject2(new WaitForTransactionReceiptTimeoutError({ hash: hash5 }));
    }, timeout) : void 0;
    _unobserve = observe(observerId, { onReplaced, resolve, reject: reject2 }, async (emit) => {
      receipt = await getAction(client, getTransactionReceipt, "getTransactionReceipt")({ hash: hash5 }).catch(() => void 0);
      if (receipt && confirmations <= 1) {
        clearTimeout(timer);
        emit.resolve(receipt);
        _unobserve?.();
        return;
      }
      _unwatch = getAction(client, watchBlockNumber, "watchBlockNumber")({
        emitMissed: true,
        emitOnBegin: true,
        poll: true,
        pollingInterval,
        async onBlockNumber(blockNumber_) {
          const done = (fn) => {
            clearTimeout(timer);
            _unwatch?.();
            fn();
            _unobserve?.();
          };
          let blockNumber = blockNumber_;
          if (retrying)
            return;
          try {
            if (receipt) {
              if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))
                return;
              done(() => emit.resolve(receipt));
              return;
            }
            if (checkReplacement && !transaction) {
              retrying = true;
              await withRetry(async () => {
                transaction = await getAction(client, getTransaction, "getTransaction")({ hash: hash5 });
                if (transaction.blockNumber)
                  blockNumber = transaction.blockNumber;
              }, {
                delay: retryDelay,
                retryCount
              });
              retrying = false;
            }
            receipt = await getAction(client, getTransactionReceipt, "getTransactionReceipt")({ hash: hash5 });
            if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))
              return;
            done(() => emit.resolve(receipt));
          } catch (err2) {
            if (err2 instanceof TransactionNotFoundError || err2 instanceof TransactionReceiptNotFoundError) {
              if (!transaction) {
                retrying = false;
                return;
              }
              try {
                replacedTransaction = transaction;
                retrying = true;
                const block = await withRetry(() => getAction(client, getBlock, "getBlock")({
                  blockNumber,
                  includeTransactions: true
                }), {
                  delay: retryDelay,
                  retryCount,
                  shouldRetry: ({ error: error51 }) => error51 instanceof BlockNotFoundError
                });
                retrying = false;
                const replacementTransaction = block.transactions.find(({ from: from16, nonce }) => from16 === replacedTransaction.from && nonce === replacedTransaction.nonce);
                if (!replacementTransaction)
                  return;
                receipt = await getAction(client, getTransactionReceipt, "getTransactionReceipt")({
                  hash: replacementTransaction.hash
                });
                if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))
                  return;
                let reason = "replaced";
                if (replacementTransaction.to === replacedTransaction.to && replacementTransaction.value === replacedTransaction.value && replacementTransaction.input === replacedTransaction.input) {
                  reason = "repriced";
                } else if (replacementTransaction.from === replacementTransaction.to && replacementTransaction.value === 0n) {
                  reason = "cancelled";
                }
                done(() => {
                  emit.onReplaced?.({
                    reason,
                    replacedTransaction,
                    transaction: replacementTransaction,
                    transactionReceipt: receipt
                  });
                  emit.resolve(receipt);
                });
              } catch (err_) {
                done(() => emit.reject(err_));
              }
            } else {
              done(() => emit.reject(err2));
            }
          }
        }
      });
    });
    return promise2;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/watchBlocks.js
  init_node_compat_inject();
  init_stringify();
  function watchBlocks(client, { blockTag = client.experimental_blockTag ?? "latest", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {
    const enablePolling = (() => {
      if (typeof poll_ !== "undefined")
        return poll_;
      if (client.transport.type === "webSocket" || client.transport.type === "ipc")
        return false;
      if (client.transport.type === "fallback" && (client.transport.transports[0].config.type === "webSocket" || client.transport.transports[0].config.type === "ipc"))
        return false;
      return true;
    })();
    const includeTransactions = includeTransactions_ ?? false;
    let prevBlock;
    const pollBlocks = () => {
      const observerId = stringify([
        "watchBlocks",
        client.uid,
        blockTag,
        emitMissed,
        emitOnBegin,
        includeTransactions,
        pollingInterval
      ]);
      return observe(observerId, { onBlock, onError }, (emit) => poll(async () => {
        try {
          const block = await getAction(client, getBlock, "getBlock")({
            blockTag,
            includeTransactions
          });
          if (block.number !== null && prevBlock?.number != null) {
            if (block.number === prevBlock.number)
              return;
            if (block.number - prevBlock.number > 1 && emitMissed) {
              for (let i5 = prevBlock?.number + 1n; i5 < block.number; i5++) {
                const block2 = await getAction(client, getBlock, "getBlock")({
                  blockNumber: i5,
                  includeTransactions
                });
                emit.onBlock(block2, prevBlock);
                prevBlock = block2;
              }
            }
          }
          if (
            // If no previous block exists, emit.
            prevBlock?.number == null || // If the block tag is "pending" with no block number, emit.
            blockTag === "pending" && block?.number == null || // If the next block number is greater than the previous block number, emit.
            // We don't want to emit blocks in the past.
            block.number !== null && block.number > prevBlock.number
          ) {
            emit.onBlock(block, prevBlock);
            prevBlock = block;
          }
        } catch (err2) {
          emit.onError?.(err2);
        }
      }, {
        emitOnBegin,
        interval: pollingInterval
      }));
    };
    const subscribeBlocks = () => {
      let active = true;
      let emitFetched = true;
      let unsubscribe = () => active = false;
      (async () => {
        try {
          if (emitOnBegin) {
            getAction(client, getBlock, "getBlock")({
              blockTag,
              includeTransactions
            }).then((block) => {
              if (!active)
                return;
              if (!emitFetched)
                return;
              onBlock(block, void 0);
              emitFetched = false;
            }).catch(onError);
          }
          const transport = (() => {
            if (client.transport.type === "fallback") {
              const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket" || transport3.config.type === "ipc");
              if (!transport2)
                return client.transport;
              return transport2.value;
            }
            return client.transport;
          })();
          const { unsubscribe: unsubscribe_ } = await transport.subscribe({
            params: ["newHeads"],
            async onData(data) {
              if (!active)
                return;
              const block = await getAction(client, getBlock, "getBlock")({
                blockNumber: data.result?.number,
                includeTransactions
              }).catch(() => {
              });
              if (!active)
                return;
              onBlock(block, prevBlock);
              emitFetched = false;
              prevBlock = block;
            },
            onError(error51) {
              onError?.(error51);
            }
          });
          unsubscribe = unsubscribe_;
          if (!active)
            unsubscribe();
        } catch (err2) {
          onError?.(err2);
        }
      })();
      return () => unsubscribe();
    };
    return enablePolling ? pollBlocks() : subscribeBlocks();
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/watchEvent.js
  init_node_compat_inject();
  init_abi();
  init_rpc();
  init_stringify();
  function watchEvent(client, { address, args, batch = true, event, events, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ }) {
    const enablePolling = (() => {
      if (typeof poll_ !== "undefined")
        return poll_;
      if (typeof fromBlock === "bigint")
        return true;
      if (client.transport.type === "webSocket" || client.transport.type === "ipc")
        return false;
      if (client.transport.type === "fallback" && (client.transport.transports[0].config.type === "webSocket" || client.transport.transports[0].config.type === "ipc"))
        return false;
      return true;
    })();
    const strict = strict_ ?? false;
    const pollEvent = () => {
      const observerId = stringify([
        "watchEvent",
        address,
        args,
        batch,
        client.uid,
        event,
        pollingInterval,
        fromBlock
      ]);
      return observe(observerId, { onLogs, onError }, (emit) => {
        let previousBlockNumber;
        if (fromBlock !== void 0)
          previousBlockNumber = fromBlock - 1n;
        let filter;
        let initialized = false;
        const unwatch = poll(async () => {
          if (!initialized) {
            try {
              filter = await getAction(client, createEventFilter, "createEventFilter")({
                address,
                args,
                event,
                events,
                strict,
                fromBlock
              });
            } catch {
            }
            initialized = true;
            return;
          }
          try {
            let logs;
            if (filter) {
              logs = await getAction(client, getFilterChanges, "getFilterChanges")({ filter });
            } else {
              const blockNumber = await getAction(client, getBlockNumber, "getBlockNumber")({});
              if (previousBlockNumber && previousBlockNumber !== blockNumber) {
                logs = await getAction(client, getLogs, "getLogs")({
                  address,
                  args,
                  event,
                  events,
                  fromBlock: previousBlockNumber + 1n,
                  toBlock: blockNumber
                });
              } else {
                logs = [];
              }
              previousBlockNumber = blockNumber;
            }
            if (logs.length === 0)
              return;
            if (batch)
              emit.onLogs(logs);
            else
              for (const log of logs)
                emit.onLogs([log]);
          } catch (err2) {
            if (filter && err2 instanceof InvalidInputRpcError)
              initialized = false;
            emit.onError?.(err2);
          }
        }, {
          emitOnBegin: true,
          interval: pollingInterval
        });
        return async () => {
          if (filter)
            await getAction(client, uninstallFilter, "uninstallFilter")({ filter });
          unwatch();
        };
      });
    };
    const subscribeEvent = () => {
      let active = true;
      let unsubscribe = () => active = false;
      (async () => {
        try {
          const transport = (() => {
            if (client.transport.type === "fallback") {
              const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket" || transport3.config.type === "ipc");
              if (!transport2)
                return client.transport;
              return transport2.value;
            }
            return client.transport;
          })();
          const events_ = events ?? (event ? [event] : void 0);
          let topics = [];
          if (events_) {
            const encoded = events_.flatMap((event2) => encodeEventTopics({
              abi: [event2],
              eventName: event2.name,
              args
            }));
            topics = [encoded];
            if (event)
              topics = topics[0];
          }
          const { unsubscribe: unsubscribe_ } = await transport.subscribe({
            params: ["logs", { address, topics }],
            onData(data) {
              if (!active)
                return;
              const log = data.result;
              try {
                const { eventName, args: args2 } = decodeEventLog({
                  abi: events_ ?? [],
                  data: log.data,
                  topics: log.topics,
                  strict
                });
                const formatted = formatLog(log, { args: args2, eventName });
                onLogs([formatted]);
              } catch (err2) {
                let eventName;
                let isUnnamed;
                if (err2 instanceof DecodeLogDataMismatch || err2 instanceof DecodeLogTopicsMismatch) {
                  if (strict_)
                    return;
                  eventName = err2.abiItem.name;
                  isUnnamed = err2.abiItem.inputs?.some((x13) => !("name" in x13 && x13.name));
                }
                const formatted = formatLog(log, {
                  args: isUnnamed ? [] : {},
                  eventName
                });
                onLogs([formatted]);
              }
            },
            onError(error51) {
              onError?.(error51);
            }
          });
          unsubscribe = unsubscribe_;
          if (!active)
            unsubscribe();
        } catch (err2) {
          onError?.(err2);
        }
      })();
      return () => unsubscribe();
    };
    return enablePolling ? pollEvent() : subscribeEvent();
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/public/watchPendingTransactions.js
  init_node_compat_inject();
  init_stringify();
  function watchPendingTransactions(client, { batch = true, onError, onTransactions, poll: poll_, pollingInterval = client.pollingInterval }) {
    const enablePolling = typeof poll_ !== "undefined" ? poll_ : client.transport.type !== "webSocket" && client.transport.type !== "ipc";
    const pollPendingTransactions = () => {
      const observerId = stringify([
        "watchPendingTransactions",
        client.uid,
        batch,
        pollingInterval
      ]);
      return observe(observerId, { onTransactions, onError }, (emit) => {
        let filter;
        const unwatch = poll(async () => {
          try {
            if (!filter) {
              try {
                filter = await getAction(client, createPendingTransactionFilter, "createPendingTransactionFilter")({});
                return;
              } catch (err2) {
                unwatch();
                throw err2;
              }
            }
            const hashes3 = await getAction(client, getFilterChanges, "getFilterChanges")({ filter });
            if (hashes3.length === 0)
              return;
            if (batch)
              emit.onTransactions(hashes3);
            else
              for (const hash5 of hashes3)
                emit.onTransactions([hash5]);
          } catch (err2) {
            emit.onError?.(err2);
          }
        }, {
          emitOnBegin: true,
          interval: pollingInterval
        });
        return async () => {
          if (filter)
            await getAction(client, uninstallFilter, "uninstallFilter")({ filter });
          unwatch();
        };
      });
    };
    const subscribePendingTransactions = () => {
      let active = true;
      let unsubscribe = () => active = false;
      (async () => {
        try {
          const { unsubscribe: unsubscribe_ } = await client.transport.subscribe({
            params: ["newPendingTransactions"],
            onData(data) {
              if (!active)
                return;
              const transaction = data.result;
              onTransactions([transaction]);
            },
            onError(error51) {
              onError?.(error51);
            }
          });
          unsubscribe = unsubscribe_;
          if (!active)
            unsubscribe();
        } catch (err2) {
          onError?.(err2);
        }
      })();
      return () => unsubscribe();
    };
    return enablePolling ? pollPendingTransactions() : subscribePendingTransactions();
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js
  init_node_compat_inject();
  function parseSiweMessage(message) {
    const { scheme, statement, ...prefix } = message.match(prefixRegex)?.groups ?? {};
    const { chainId, expirationTime, issuedAt, notBefore, requestId, ...suffix } = message.match(suffixRegex)?.groups ?? {};
    const resources = message.split("Resources:")[1]?.split("\n- ").slice(1);
    return {
      ...prefix,
      ...suffix,
      ...chainId ? { chainId: Number(chainId) } : {},
      ...expirationTime ? { expirationTime: new Date(expirationTime) } : {},
      ...issuedAt ? { issuedAt: new Date(issuedAt) } : {},
      ...notBefore ? { notBefore: new Date(notBefore) } : {},
      ...requestId ? { requestId } : {},
      ...resources ? { resources } : {},
      ...scheme ? { scheme } : {},
      ...statement ? { statement } : {}
    };
  }
  var prefixRegex = /^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/;
  var suffixRegex = /(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js
  init_node_compat_inject();
  init_isAddress();
  init_isAddressEqual();
  function validateSiweMessage(parameters) {
    const { address, domain: domain2, message, nonce, scheme, time: time3 = /* @__PURE__ */ new Date() } = parameters;
    if (domain2 && message.domain !== domain2)
      return false;
    if (nonce && message.nonce !== nonce)
      return false;
    if (scheme && message.scheme !== scheme)
      return false;
    if (message.expirationTime && time3 >= message.expirationTime)
      return false;
    if (message.notBefore && time3 < message.notBefore)
      return false;
    try {
      if (!message.address)
        return false;
      if (!isAddress(message.address, { strict: false }))
        return false;
      if (address && !isAddressEqual(message.address, address))
        return false;
    } catch {
      return false;
    }
    return true;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js
  async function verifySiweMessage(client, parameters) {
    const { address, domain: domain2, message, nonce, scheme, signature: signature2, time: time3 = /* @__PURE__ */ new Date(), ...callRequest } = parameters;
    const parsed = parseSiweMessage(message);
    if (!parsed.address)
      return false;
    const isValid = validateSiweMessage({
      address,
      domain: domain2,
      message: parsed,
      nonce,
      scheme,
      time: time3
    });
    if (!isValid)
      return false;
    const hash5 = hashMessage(message);
    return verifyHash(client, {
      address: parsed.address,
      hash: hash5,
      signature: signature2,
      ...callRequest
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/sendRawTransactionSync.js
  init_node_compat_inject();
  init_transaction();
  async function sendRawTransactionSync(client, { serializedTransaction, throwOnReceiptRevert, timeout }) {
    const receipt = await client.request({
      method: "eth_sendRawTransactionSync",
      params: timeout ? [serializedTransaction, timeout] : [serializedTransaction]
    }, { retryCount: 0 });
    const format = client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt;
    const formatted = format(receipt);
    if (formatted.status === "reverted" && throwOnReceiptRevert)
      throw new TransactionReceiptRevertedError({ receipt: formatted });
    return formatted;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/decorators/public.js
  function publicActions(client) {
    return {
      call: (args) => call(client, args),
      createAccessList: (args) => createAccessList(client, args),
      createBlockFilter: () => createBlockFilter(client),
      createContractEventFilter: (args) => createContractEventFilter(client, args),
      createEventFilter: (args) => createEventFilter(client, args),
      createPendingTransactionFilter: () => createPendingTransactionFilter(client),
      estimateContractGas: (args) => estimateContractGas(client, args),
      estimateGas: (args) => estimateGas(client, args),
      getBalance: (args) => getBalance(client, args),
      getBlobBaseFee: () => getBlobBaseFee(client),
      getBlock: (args) => getBlock(client, args),
      getBlockNumber: (args) => getBlockNumber(client, args),
      getBlockTransactionCount: (args) => getBlockTransactionCount(client, args),
      getBytecode: (args) => getCode(client, args),
      getChainId: () => getChainId(client),
      getCode: (args) => getCode(client, args),
      getContractEvents: (args) => getContractEvents(client, args),
      getDelegation: (args) => getDelegation(client, args),
      getEip712Domain: (args) => getEip712Domain(client, args),
      getEnsAddress: (args) => getEnsAddress(client, args),
      getEnsAvatar: (args) => getEnsAvatar(client, args),
      getEnsName: (args) => getEnsName(client, args),
      getEnsResolver: (args) => getEnsResolver(client, args),
      getEnsText: (args) => getEnsText(client, args),
      getFeeHistory: (args) => getFeeHistory(client, args),
      estimateFeesPerGas: (args) => estimateFeesPerGas(client, args),
      getFilterChanges: (args) => getFilterChanges(client, args),
      getFilterLogs: (args) => getFilterLogs(client, args),
      getGasPrice: () => getGasPrice(client),
      getLogs: (args) => getLogs(client, args),
      getProof: (args) => getProof(client, args),
      estimateMaxPriorityFeePerGas: (args) => estimateMaxPriorityFeePerGas(client, args),
      fillTransaction: (args) => fillTransaction(client, args),
      getStorageAt: (args) => getStorageAt(client, args),
      getTransaction: (args) => getTransaction(client, args),
      getTransactionConfirmations: (args) => getTransactionConfirmations(client, args),
      getTransactionCount: (args) => getTransactionCount(client, args),
      getTransactionReceipt: (args) => getTransactionReceipt(client, args),
      multicall: (args) => multicall(client, args),
      prepareTransactionRequest: (args) => prepareTransactionRequest(client, args),
      readContract: (args) => readContract(client, args),
      sendRawTransaction: (args) => sendRawTransaction(client, args),
      sendRawTransactionSync: (args) => sendRawTransactionSync(client, args),
      simulate: (args) => simulateBlocks(client, args),
      simulateBlocks: (args) => simulateBlocks(client, args),
      simulateCalls: (args) => simulateCalls(client, args),
      simulateContract: (args) => simulateContract(client, args),
      verifyHash: (args) => verifyHash(client, args),
      verifyMessage: (args) => verifyMessage(client, args),
      verifySiweMessage: (args) => verifySiweMessage(client, args),
      verifyTypedData: (args) => verifyTypedData(client, args),
      uninstallFilter: (args) => uninstallFilter(client, args),
      waitForTransactionReceipt: (args) => waitForTransactionReceipt(client, args),
      watchBlocks: (args) => watchBlocks(client, args),
      watchBlockNumber: (args) => watchBlockNumber(client, args),
      watchContractEvent: (args) => watchContractEvent(client, args),
      watchEvent: (args) => watchEvent(client, args),
      watchPendingTransactions: (args) => watchPendingTransactions(client, args)
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/createPublicClient.js
  function createPublicClient(parameters) {
    const { key: key2 = "public", name: name2 = "Public Client" } = parameters;
    const client = createClient({
      ...parameters,
      key: key2,
      name: name2,
      type: "publicClient"
    });
    return client.extend(publicActions);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/createWalletClient.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/decorators/wallet.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/addChain.js
  init_node_compat_inject();
  init_toHex();
  async function addChain(client, { chain: chain2 }) {
    const { id, name: name2, nativeCurrency, rpcUrls, blockExplorers } = chain2;
    await client.request({
      method: "wallet_addEthereumChain",
      params: [
        {
          chainId: numberToHex(id),
          chainName: name2,
          nativeCurrency,
          rpcUrls: rpcUrls.default.http,
          blockExplorerUrls: blockExplorers ? Object.values(blockExplorers).map(({ url: url2 }) => url2) : void 0
        }
      ]
    }, { dedupe: true, retryCount: 0 });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/deployContract.js
  init_node_compat_inject();
  init_encodeDeployData();
  function deployContract(walletClient, parameters) {
    const { abi: abi2, args, bytecode, ...request } = parameters;
    const calldata = encodeDeployData({ abi: abi2, args, bytecode });
    return sendTransaction(walletClient, {
      ...request,
      ...request.authorizationList ? { to: null } : {},
      data: calldata
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/getAddresses.js
  init_node_compat_inject();
  init_getAddress();
  async function getAddresses(client) {
    if (client.account?.type === "local")
      return [client.account.address];
    const addresses = await client.request({ method: "eth_accounts" }, { dedupe: true });
    return addresses.map((address) => checksumAddress(address));
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/getCapabilities.js
  init_node_compat_inject();
  init_parseAccount();
  init_toHex();
  async function getCapabilities(client, parameters = {}) {
    const { account = client.account, chainId } = parameters;
    const account_ = account ? parseAccount(account) : void 0;
    const params = chainId ? [account_?.address, [numberToHex(chainId)]] : [account_?.address];
    const capabilities_raw = await client.request({
      method: "wallet_getCapabilities",
      params
    });
    const capabilities = {};
    for (const [chainId2, capabilities_] of Object.entries(capabilities_raw)) {
      capabilities[Number(chainId2)] = {};
      for (let [key2, value] of Object.entries(capabilities_)) {
        if (key2 === "addSubAccount")
          key2 = "unstable_addSubAccount";
        capabilities[Number(chainId2)][key2] = value;
      }
    }
    return typeof chainId === "number" ? capabilities[chainId] : capabilities;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/getPermissions.js
  init_node_compat_inject();
  async function getPermissions(client) {
    const permissions = await client.request({ method: "wallet_getPermissions" }, { dedupe: true });
    return permissions;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/prepareAuthorization.js
  init_node_compat_inject();
  init_parseAccount();
  init_isAddressEqual();
  async function prepareAuthorization(client, parameters) {
    const { account: account_ = client.account, chainId, nonce } = parameters;
    if (!account_)
      throw new AccountNotFoundError({
        docsPath: "/docs/eip7702/prepareAuthorization"
      });
    const account = parseAccount(account_);
    const executor = (() => {
      if (!parameters.executor)
        return void 0;
      if (parameters.executor === "self")
        return parameters.executor;
      return parseAccount(parameters.executor);
    })();
    const authorization = {
      address: parameters.contractAddress ?? parameters.address,
      chainId,
      nonce
    };
    if (typeof authorization.chainId === "undefined")
      authorization.chainId = client.chain?.id ?? await getAction(client, getChainId, "getChainId")({});
    if (typeof authorization.nonce === "undefined") {
      authorization.nonce = await getAction(client, getTransactionCount, "getTransactionCount")({
        address: account.address,
        blockTag: "pending"
      });
      if (executor === "self" || executor?.address && isAddressEqual(executor.address, account.address))
        authorization.nonce += 1;
    }
    return authorization;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/requestAddresses.js
  init_node_compat_inject();
  init_getAddress();
  async function requestAddresses(client) {
    const addresses = await client.request({ method: "eth_requestAccounts" }, { dedupe: true, retryCount: 0 });
    return addresses.map((address) => getAddress(address));
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/requestPermissions.js
  init_node_compat_inject();
  async function requestPermissions(client, permissions) {
    return client.request({
      method: "wallet_requestPermissions",
      params: [permissions]
    }, { retryCount: 0 });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/sendCallsSync.js
  init_node_compat_inject();
  async function sendCallsSync(client, parameters) {
    const { chain: chain2 = client.chain } = parameters;
    const timeout = parameters.timeout ?? Math.max((chain2?.blockTime ?? 0) * 3, 5e3);
    const result = await getAction(client, sendCalls, "sendCalls")(parameters);
    const status = await getAction(client, waitForCallsStatus, "waitForCallsStatus")({
      ...parameters,
      id: result.id,
      timeout
    });
    return status;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/sendTransactionSync.js
  init_node_compat_inject();
  init_parseAccount();
  init_base();
  init_transaction();
  init_concat();
  init_extract();
  init_transactionRequest();
  init_lru();
  init_assertRequest();
  var supportsWalletNamespace2 = new LruMap(128);
  async function sendTransactionSync(client, parameters) {
    const { account: account_ = client.account, assertChainId = true, chain: chain2 = client.chain, accessList, authorizationList, blobs, data, dataSuffix = typeof client.dataSuffix === "string" ? client.dataSuffix : client.dataSuffix?.value, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, pollingInterval, throwOnReceiptRevert, type: type2, value, ...rest } = parameters;
    const timeout = parameters.timeout ?? Math.max((chain2?.blockTime ?? 0) * 3, 5e3);
    if (typeof account_ === "undefined")
      throw new AccountNotFoundError({
        docsPath: "/docs/actions/wallet/sendTransactionSync"
      });
    const account = account_ ? parseAccount(account_) : null;
    try {
      assertRequest(parameters);
      const to3 = await (async () => {
        if (parameters.to)
          return parameters.to;
        if (parameters.to === null)
          return void 0;
        if (authorizationList && authorizationList.length > 0)
          return await recoverAuthorizationAddress({
            authorization: authorizationList[0]
          }).catch(() => {
            throw new BaseError2("`to` is required. Could not infer from `authorizationList`.");
          });
        return void 0;
      })();
      if (account?.type === "json-rpc" || account === null) {
        let chainId;
        if (chain2 !== null) {
          chainId = await getAction(client, getChainId, "getChainId")({});
          if (assertChainId)
            assertCurrentChain({
              currentChainId: chainId,
              chain: chain2
            });
        }
        const chainFormat = client.chain?.formatters?.transactionRequest?.format;
        const format = chainFormat || formatTransactionRequest;
        const request = format({
          // Pick out extra data that might exist on the chain's transaction request type.
          ...extract(rest, { format: chainFormat }),
          accessList,
          account,
          authorizationList,
          blobs,
          chainId,
          data: dataSuffix ? concat([data ?? "0x", dataSuffix]) : data,
          gas,
          gasPrice,
          maxFeePerBlobGas,
          maxFeePerGas,
          maxPriorityFeePerGas,
          nonce,
          to: to3,
          type: type2,
          value
        }, "sendTransaction");
        const isWalletNamespaceSupported = supportsWalletNamespace2.get(client.uid);
        const method = isWalletNamespaceSupported ? "wallet_sendTransaction" : "eth_sendTransaction";
        const hash5 = await (async () => {
          try {
            return await client.request({
              method,
              params: [request]
            }, { retryCount: 0 });
          } catch (e2) {
            if (isWalletNamespaceSupported === false)
              throw e2;
            const error51 = e2;
            if (error51.name === "InvalidInputRpcError" || error51.name === "InvalidParamsRpcError" || error51.name === "MethodNotFoundRpcError" || error51.name === "MethodNotSupportedRpcError") {
              return await client.request({
                method: "wallet_sendTransaction",
                params: [request]
              }, { retryCount: 0 }).then((hash6) => {
                supportsWalletNamespace2.set(client.uid, true);
                return hash6;
              }).catch((e3) => {
                const walletNamespaceError = e3;
                if (walletNamespaceError.name === "MethodNotFoundRpcError" || walletNamespaceError.name === "MethodNotSupportedRpcError") {
                  supportsWalletNamespace2.set(client.uid, false);
                  throw error51;
                }
                throw walletNamespaceError;
              });
            }
            throw error51;
          }
        })();
        const receipt = await getAction(client, waitForTransactionReceipt, "waitForTransactionReceipt")({
          checkReplacement: false,
          hash: hash5,
          pollingInterval,
          timeout
        });
        if (throwOnReceiptRevert && receipt.status === "reverted")
          throw new TransactionReceiptRevertedError({ receipt });
        return receipt;
      }
      if (account?.type === "local") {
        const request = await getAction(client, prepareTransactionRequest, "prepareTransactionRequest")({
          account,
          accessList,
          authorizationList,
          blobs,
          chain: chain2,
          data: dataSuffix ? concat([data ?? "0x", dataSuffix]) : data,
          gas,
          gasPrice,
          maxFeePerBlobGas,
          maxFeePerGas,
          maxPriorityFeePerGas,
          nonce,
          nonceManager: account.nonceManager,
          parameters: [...defaultParameters, "sidecars"],
          type: type2,
          value,
          ...rest,
          to: to3
        });
        const serializer = chain2?.serializers?.transaction;
        const serializedTransaction = await account.signTransaction(request, {
          serializer
        });
        return await getAction(client, sendRawTransactionSync, "sendRawTransactionSync")({
          serializedTransaction,
          throwOnReceiptRevert,
          timeout: parameters.timeout
        });
      }
      if (account?.type === "smart")
        throw new AccountTypeNotSupportedError({
          metaMessages: [
            "Consider using the `sendUserOperation` Action instead."
          ],
          docsPath: "/docs/actions/bundler/sendUserOperation",
          type: "smart"
        });
      throw new AccountTypeNotSupportedError({
        docsPath: "/docs/actions/wallet/sendTransactionSync",
        type: account?.type
      });
    } catch (err2) {
      if (err2 instanceof AccountTypeNotSupportedError)
        throw err2;
      throw getTransactionError(err2, {
        ...parameters,
        account,
        chain: parameters.chain || void 0
      });
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/showCallsStatus.js
  init_node_compat_inject();
  async function showCallsStatus(client, parameters) {
    const { id } = parameters;
    await client.request({
      method: "wallet_showCallsStatus",
      params: [id]
    });
    return;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/signAuthorization.js
  init_node_compat_inject();
  init_parseAccount();
  async function signAuthorization(client, parameters) {
    const { account: account_ = client.account } = parameters;
    if (!account_)
      throw new AccountNotFoundError({
        docsPath: "/docs/eip7702/signAuthorization"
      });
    const account = parseAccount(account_);
    if (!account.signAuthorization)
      throw new AccountTypeNotSupportedError({
        docsPath: "/docs/eip7702/signAuthorization",
        metaMessages: [
          "The `signAuthorization` Action does not support JSON-RPC Accounts."
        ],
        type: account.type
      });
    const authorization = await prepareAuthorization(client, parameters);
    return account.signAuthorization(authorization);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/signMessage.js
  init_node_compat_inject();
  init_parseAccount();
  init_toHex();
  async function signMessage(client, { account: account_ = client.account, message }) {
    if (!account_)
      throw new AccountNotFoundError({
        docsPath: "/docs/actions/wallet/signMessage"
      });
    const account = parseAccount(account_);
    if (account.signMessage)
      return account.signMessage({ message });
    const message_ = (() => {
      if (typeof message === "string")
        return stringToHex(message);
      if (message.raw instanceof Uint8Array)
        return toHex(message.raw);
      return message.raw;
    })();
    return client.request({
      method: "personal_sign",
      params: [message_, account.address]
    }, { retryCount: 0 });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/signTransaction.js
  init_node_compat_inject();
  init_parseAccount();
  init_toHex();
  init_transactionRequest();
  init_assertRequest();
  async function signTransaction(client, parameters) {
    const { account: account_ = client.account, chain: chain2 = client.chain, ...transaction } = parameters;
    if (!account_)
      throw new AccountNotFoundError({
        docsPath: "/docs/actions/wallet/signTransaction"
      });
    const account = parseAccount(account_);
    assertRequest({
      account,
      ...parameters
    });
    const chainId = await getAction(client, getChainId, "getChainId")({});
    if (chain2 !== null)
      assertCurrentChain({
        currentChainId: chainId,
        chain: chain2
      });
    const formatters3 = chain2?.formatters || client.chain?.formatters;
    const format = formatters3?.transactionRequest?.format || formatTransactionRequest;
    if (account.signTransaction)
      return account.signTransaction({
        ...transaction,
        account,
        chainId
      }, { serializer: client.chain?.serializers?.transaction });
    return await client.request({
      method: "eth_signTransaction",
      params: [
        {
          ...format({
            ...transaction,
            account
          }, "signTransaction"),
          chainId: numberToHex(chainId),
          from: account.address
        }
      ]
    }, { retryCount: 0 });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/signTypedData.js
  init_node_compat_inject();
  init_parseAccount();
  async function signTypedData(client, parameters) {
    const { account: account_ = client.account, domain: domain2, message, primaryType } = parameters;
    if (!account_)
      throw new AccountNotFoundError({
        docsPath: "/docs/actions/wallet/signTypedData"
      });
    const account = parseAccount(account_);
    const types = {
      EIP712Domain: getTypesForEIP712Domain({ domain: domain2 }),
      ...parameters.types
    };
    validateTypedData({ domain: domain2, message, primaryType, types });
    if (account.signTypedData)
      return account.signTypedData({ domain: domain2, message, primaryType, types });
    const typedData = serializeTypedData({ domain: domain2, message, primaryType, types });
    return client.request({
      method: "eth_signTypedData_v4",
      params: [account.address, typedData]
    }, { retryCount: 0 });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/switchChain.js
  init_node_compat_inject();
  init_toHex();
  async function switchChain(client, { id }) {
    await client.request({
      method: "wallet_switchEthereumChain",
      params: [
        {
          chainId: numberToHex(id)
        }
      ]
    }, { retryCount: 0 });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/watchAsset.js
  init_node_compat_inject();
  async function watchAsset(client, params) {
    const added = await client.request({
      method: "wallet_watchAsset",
      params
    }, { retryCount: 0 });
    return added;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/actions/wallet/writeContractSync.js
  init_node_compat_inject();
  async function writeContractSync(client, parameters) {
    return writeContract.internal(client, sendTransactionSync, "sendTransactionSync", parameters);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/decorators/wallet.js
  function walletActions(client) {
    return {
      addChain: (args) => addChain(client, args),
      deployContract: (args) => deployContract(client, args),
      fillTransaction: (args) => fillTransaction(client, args),
      getAddresses: () => getAddresses(client),
      getCallsStatus: (args) => getCallsStatus(client, args),
      getCapabilities: (args) => getCapabilities(client, args),
      getChainId: () => getChainId(client),
      getPermissions: () => getPermissions(client),
      prepareAuthorization: (args) => prepareAuthorization(client, args),
      prepareTransactionRequest: (args) => prepareTransactionRequest(client, args),
      requestAddresses: () => requestAddresses(client),
      requestPermissions: (args) => requestPermissions(client, args),
      sendCalls: (args) => sendCalls(client, args),
      sendCallsSync: (args) => sendCallsSync(client, args),
      sendRawTransaction: (args) => sendRawTransaction(client, args),
      sendRawTransactionSync: (args) => sendRawTransactionSync(client, args),
      sendTransaction: (args) => sendTransaction(client, args),
      sendTransactionSync: (args) => sendTransactionSync(client, args),
      showCallsStatus: (args) => showCallsStatus(client, args),
      signAuthorization: (args) => signAuthorization(client, args),
      signMessage: (args) => signMessage(client, args),
      signTransaction: (args) => signTransaction(client, args),
      signTypedData: (args) => signTypedData(client, args),
      switchChain: (args) => switchChain(client, args),
      waitForCallsStatus: (args) => waitForCallsStatus(client, args),
      watchAsset: (args) => watchAsset(client, args),
      writeContract: (args) => writeContract(client, args),
      writeContractSync: (args) => writeContractSync(client, args)
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/createWalletClient.js
  function createWalletClient(parameters) {
    const { key: key2 = "wallet", name: name2 = "Wallet Client", transport } = parameters;
    const client = createClient({
      ...parameters,
      key: key2,
      name: name2,
      transport,
      type: "walletClient"
    });
    return client.extend(walletActions);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/transports/createTransport.js
  init_node_compat_inject();
  function createTransport({ key: key2, methods, name: name2, request, retryCount = 3, retryDelay = 150, timeout, type: type2 }, value) {
    const uid2 = uid();
    return {
      config: {
        key: key2,
        methods,
        name: name2,
        request,
        retryCount,
        retryDelay,
        timeout,
        type: type2
      },
      request: buildRequest(request, { methods, retryCount, retryDelay, uid: uid2 }),
      value
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/transports/http.js
  init_node_compat_inject();
  init_request();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/errors/transport.js
  init_node_compat_inject();
  init_base();
  var UrlRequiredError = class extends BaseError2 {
    constructor() {
      super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.", {
        docsPath: "/docs/clients/intro",
        name: "UrlRequiredError"
      });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/clients/transports/http.js
  init_createBatchScheduler();
  var signalId = 0;
  var signalIds = /* @__PURE__ */ new WeakMap();
  function getSignalId(signal) {
    if (!signal)
      return "default";
    const id = signalIds.get(signal);
    if (id !== void 0)
      return id;
    const nextId = signalId++;
    signalIds.set(signal, nextId);
    return nextId;
  }
  function http(url2, config2 = {}) {
    const { batch, fetchFn, fetchOptions, key: key2 = "http", methods, name: name2 = "HTTP JSON-RPC", onFetchRequest, onFetchResponse, retryDelay, raw } = config2;
    return ({ chain: chain2, retryCount: retryCount_, timeout: timeout_ }) => {
      const { batchSize = 1e3, wait: wait2 = 0 } = typeof batch === "object" ? batch : {};
      const retryCount = config2.retryCount ?? retryCount_;
      const timeout = timeout_ ?? config2.timeout ?? 1e4;
      const url_ = url2 || chain2?.rpcUrls.default.http[0];
      if (!url_)
        throw new UrlRequiredError();
      const rpcClient = getHttpRpcClient(url_, {
        fetchFn,
        fetchOptions,
        onRequest: onFetchRequest,
        onResponse: onFetchResponse,
        timeout
      });
      return createTransport({
        key: key2,
        methods,
        name: name2,
        async request({ method, params }, options) {
          const body = { method, params };
          const fetchOptions2 = options?.signal ? { signal: options.signal } : void 0;
          const { schedule } = createBatchScheduler({
            id: `${url_}.${getSignalId(options?.signal)}`,
            wait: wait2,
            shouldSplitBatch(requests) {
              return requests.length > batchSize;
            },
            fn: (body2) => rpcClient.request({
              body: body2,
              fetchOptions: fetchOptions2
            }),
            sort: (a5, b9) => a5.id - b9.id
          });
          const fn = async (body2) => batch ? schedule(body2) : [
            await rpcClient.request({
              body: body2,
              fetchOptions: fetchOptions2
            })
          ];
          const [{ error: error51, result }] = await fn(body);
          if (raw)
            return { error: error51, result };
          if (error51)
            throw new RpcRequestError({
              body,
              error: error51,
              url: url_
            });
          return result;
        },
        retryCount,
        retryDelay,
        timeout,
        type: "http"
      }, {
        fetchOptions,
        url: url_
      });
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/index.js
  init_number();
  init_encodeFunctionData();
  init_getAddress();
  init_isAddress();
  init_keccak256();

  // ../../packages/wallet-core/src/mnemonic.ts
  init_node_compat_inject();
  var import_bip392 = __toESM(require_src(), 1);

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@scure+bip32@1.7.0/node_modules/@scure/bip32/lib/esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/utils.js
  init_node_compat_inject();
  init_utils2();
  init_utils2();
  var _0n7 = /* @__PURE__ */ BigInt(0);
  var _1n7 = /* @__PURE__ */ BigInt(1);
  function _abool2(value, title = "") {
    if (typeof value !== "boolean") {
      const prefix = title && `"${title}"`;
      throw new Error(prefix + "expected boolean, got type=" + typeof value);
    }
    return value;
  }
  function _abytes2(value, length2, title = "") {
    const bytes = isBytes(value);
    const len = value?.length;
    const needsLen = length2 !== void 0;
    if (!bytes || needsLen && len !== length2) {
      const prefix = title && `"${title}" `;
      const ofLen = needsLen ? ` of length ${length2}` : "";
      const got = bytes ? `length=${len}` : `type=${typeof value}`;
      throw new Error(prefix + "expected Uint8Array" + ofLen + ", got " + got);
    }
    return value;
  }
  function numberToHexUnpadded2(num2) {
    const hex3 = num2.toString(16);
    return hex3.length & 1 ? "0" + hex3 : hex3;
  }
  function hexToNumber3(hex3) {
    if (typeof hex3 !== "string")
      throw new Error("hex string expected, got " + typeof hex3);
    return hex3 === "" ? _0n7 : BigInt("0x" + hex3);
  }
  function bytesToNumberBE2(bytes) {
    return hexToNumber3(bytesToHex2(bytes));
  }
  function bytesToNumberLE2(bytes) {
    abytes(bytes);
    return hexToNumber3(bytesToHex2(Uint8Array.from(bytes).reverse()));
  }
  function numberToBytesBE2(n6, len) {
    return hexToBytes2(n6.toString(16).padStart(len * 2, "0"));
  }
  function numberToBytesLE2(n6, len) {
    return numberToBytesBE2(n6, len).reverse();
  }
  function ensureBytes2(title, hex3, expectedLength) {
    let res;
    if (typeof hex3 === "string") {
      try {
        res = hexToBytes2(hex3);
      } catch (e2) {
        throw new Error(title + " must be hex string or Uint8Array, cause: " + e2);
      }
    } else if (isBytes(hex3)) {
      res = Uint8Array.from(hex3);
    } else {
      throw new Error(title + " must be hex string or Uint8Array");
    }
    const len = res.length;
    if (typeof expectedLength === "number" && len !== expectedLength)
      throw new Error(title + " of length " + expectedLength + " expected, got " + len);
    return res;
  }
  function equalBytes(a5, b9) {
    if (a5.length !== b9.length)
      return false;
    let diff = 0;
    for (let i5 = 0; i5 < a5.length; i5++)
      diff |= a5[i5] ^ b9[i5];
    return diff === 0;
  }
  function copyBytes(bytes) {
    return Uint8Array.from(bytes);
  }
  var isPosBig2 = (n6) => typeof n6 === "bigint" && _0n7 <= n6;
  function inRange2(n6, min, max) {
    return isPosBig2(n6) && isPosBig2(min) && isPosBig2(max) && min <= n6 && n6 < max;
  }
  function aInRange2(title, n6, min, max) {
    if (!inRange2(n6, min, max))
      throw new Error("expected valid " + title + ": " + min + " <= n < " + max + ", got " + n6);
  }
  function bitLen2(n6) {
    let len;
    for (len = 0; n6 > _0n7; n6 >>= _1n7, len += 1)
      ;
    return len;
  }
  var bitMask2 = (n6) => (_1n7 << BigInt(n6)) - _1n7;
  function createHmacDrbg2(hashLen, qByteLen, hmacFn) {
    if (typeof hashLen !== "number" || hashLen < 2)
      throw new Error("hashLen must be a number");
    if (typeof qByteLen !== "number" || qByteLen < 2)
      throw new Error("qByteLen must be a number");
    if (typeof hmacFn !== "function")
      throw new Error("hmacFn must be a function");
    const u8n3 = (len) => new Uint8Array(len);
    const u8of = (byte) => Uint8Array.of(byte);
    let v13 = u8n3(hashLen);
    let k7 = u8n3(hashLen);
    let i5 = 0;
    const reset = () => {
      v13.fill(1);
      k7.fill(0);
      i5 = 0;
    };
    const h8 = (...b9) => hmacFn(k7, v13, ...b9);
    const reseed2 = (seed = u8n3(0)) => {
      k7 = h8(u8of(0), seed);
      v13 = h8();
      if (seed.length === 0)
        return;
      k7 = h8(u8of(1), seed);
      v13 = h8();
    };
    const gen2 = () => {
      if (i5++ >= 1e3)
        throw new Error("drbg: tried 1000 values");
      let len = 0;
      const out = [];
      while (len < qByteLen) {
        v13 = h8();
        const sl = v13.slice();
        out.push(sl);
        len += v13.length;
      }
      return concatBytes(...out);
    };
    const genUntil = (seed, pred) => {
      reset();
      reseed2(seed);
      let res = void 0;
      while (!(res = pred(gen2())))
        reseed2();
      reset();
      return res;
    };
    return genUntil;
  }
  function _validateObject(object2, fields, optFields = {}) {
    if (!object2 || typeof object2 !== "object")
      throw new Error("expected valid options object");
    function checkField(fieldName, expectedType, isOpt) {
      const val = object2[fieldName];
      if (isOpt && val === void 0)
        return;
      const current = typeof val;
      if (current !== expectedType || val === null)
        throw new Error(`param "${fieldName}" is invalid: expected ${expectedType}, got ${current}`);
    }
    Object.entries(fields).forEach(([k7, v13]) => checkField(k7, v13, false));
    Object.entries(optFields).forEach(([k7, v13]) => checkField(k7, v13, true));
  }
  var notImplemented = () => {
    throw new Error("not implemented");
  };
  function memoized2(fn) {
    const map2 = /* @__PURE__ */ new WeakMap();
    return (arg, ...args) => {
      const val = map2.get(arg);
      if (val !== void 0)
        return val;
      const computed = fn(arg, ...args);
      map2.set(arg, computed);
      return computed;
    };
  }

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js
  var _0n8 = BigInt(0);
  var _1n8 = BigInt(1);
  var _2n5 = /* @__PURE__ */ BigInt(2);
  var _3n3 = /* @__PURE__ */ BigInt(3);
  var _4n3 = /* @__PURE__ */ BigInt(4);
  var _5n2 = /* @__PURE__ */ BigInt(5);
  var _7n2 = /* @__PURE__ */ BigInt(7);
  var _8n2 = /* @__PURE__ */ BigInt(8);
  var _9n = /* @__PURE__ */ BigInt(9);
  var _16n = /* @__PURE__ */ BigInt(16);
  function mod2(a5, b9) {
    const result = a5 % b9;
    return result >= _0n8 ? result : b9 + result;
  }
  function pow22(x13, power, modulo) {
    let res = x13;
    while (power-- > _0n8) {
      res *= res;
      res %= modulo;
    }
    return res;
  }
  function invert2(number5, modulo) {
    if (number5 === _0n8)
      throw new Error("invert: expected non-zero number");
    if (modulo <= _0n8)
      throw new Error("invert: expected positive modulus, got " + modulo);
    let a5 = mod2(number5, modulo);
    let b9 = modulo;
    let x13 = _0n8, y11 = _1n8, u4 = _1n8, v13 = _0n8;
    while (a5 !== _0n8) {
      const q7 = b9 / a5;
      const r3 = b9 % a5;
      const m3 = x13 - u4 * q7;
      const n6 = y11 - v13 * q7;
      b9 = a5, a5 = r3, x13 = u4, y11 = v13, u4 = m3, v13 = n6;
    }
    const gcd = b9;
    if (gcd !== _1n8)
      throw new Error("invert: does not exist");
    return mod2(x13, modulo);
  }
  function assertIsSquare(Fp3, root, n6) {
    if (!Fp3.eql(Fp3.sqr(root), n6))
      throw new Error("Cannot find square root");
  }
  function sqrt3mod42(Fp3, n6) {
    const p1div4 = (Fp3.ORDER + _1n8) / _4n3;
    const root = Fp3.pow(n6, p1div4);
    assertIsSquare(Fp3, root, n6);
    return root;
  }
  function sqrt5mod82(Fp3, n6) {
    const p5div8 = (Fp3.ORDER - _5n2) / _8n2;
    const n22 = Fp3.mul(n6, _2n5);
    const v13 = Fp3.pow(n22, p5div8);
    const nv = Fp3.mul(n6, v13);
    const i5 = Fp3.mul(Fp3.mul(nv, _2n5), v13);
    const root = Fp3.mul(nv, Fp3.sub(i5, Fp3.ONE));
    assertIsSquare(Fp3, root, n6);
    return root;
  }
  function sqrt9mod16(P8) {
    const Fp_ = Field2(P8);
    const tn4 = tonelliShanks2(P8);
    const c1 = tn4(Fp_, Fp_.neg(Fp_.ONE));
    const c22 = tn4(Fp_, c1);
    const c32 = tn4(Fp_, Fp_.neg(c1));
    const c42 = (P8 + _7n2) / _16n;
    return (Fp3, n6) => {
      let tv1 = Fp3.pow(n6, c42);
      let tv2 = Fp3.mul(tv1, c1);
      const tv3 = Fp3.mul(tv1, c22);
      const tv4 = Fp3.mul(tv1, c32);
      const e1 = Fp3.eql(Fp3.sqr(tv2), n6);
      const e2 = Fp3.eql(Fp3.sqr(tv3), n6);
      tv1 = Fp3.cmov(tv1, tv2, e1);
      tv2 = Fp3.cmov(tv4, tv3, e2);
      const e3 = Fp3.eql(Fp3.sqr(tv2), n6);
      const root = Fp3.cmov(tv1, tv2, e3);
      assertIsSquare(Fp3, root, n6);
      return root;
    };
  }
  function tonelliShanks2(P8) {
    if (P8 < _3n3)
      throw new Error("sqrt is not defined for small field");
    let Q7 = P8 - _1n8;
    let S10 = 0;
    while (Q7 % _2n5 === _0n8) {
      Q7 /= _2n5;
      S10++;
    }
    let Z6 = _2n5;
    const _Fp = Field2(P8);
    while (FpLegendre2(_Fp, Z6) === 1) {
      if (Z6++ > 1e3)
        throw new Error("Cannot find square root: probably non-prime P");
    }
    if (S10 === 1)
      return sqrt3mod42;
    let cc = _Fp.pow(Z6, Q7);
    const Q1div2 = (Q7 + _1n8) / _2n5;
    return function tonelliSlow(Fp3, n6) {
      if (Fp3.is0(n6))
        return n6;
      if (FpLegendre2(Fp3, n6) !== 1)
        throw new Error("Cannot find square root");
      let M9 = S10;
      let c7 = Fp3.mul(Fp3.ONE, cc);
      let t = Fp3.pow(n6, Q7);
      let R6 = Fp3.pow(n6, Q1div2);
      while (!Fp3.eql(t, Fp3.ONE)) {
        if (Fp3.is0(t))
          return Fp3.ZERO;
        let i5 = 1;
        let t_tmp = Fp3.sqr(t);
        while (!Fp3.eql(t_tmp, Fp3.ONE)) {
          i5++;
          t_tmp = Fp3.sqr(t_tmp);
          if (i5 === M9)
            throw new Error("Cannot find square root");
        }
        const exponent = _1n8 << BigInt(M9 - i5 - 1);
        const b9 = Fp3.pow(c7, exponent);
        M9 = i5;
        c7 = Fp3.sqr(b9);
        t = Fp3.mul(t, c7);
        R6 = Fp3.mul(R6, b9);
      }
      return R6;
    };
  }
  function FpSqrt2(P8) {
    if (P8 % _4n3 === _3n3)
      return sqrt3mod42;
    if (P8 % _8n2 === _5n2)
      return sqrt5mod82;
    if (P8 % _16n === _9n)
      return sqrt9mod16(P8);
    return tonelliShanks2(P8);
  }
  var isNegativeLE2 = (num2, modulo) => (mod2(num2, modulo) & _1n8) === _1n8;
  var FIELD_FIELDS2 = [
    "create",
    "isValid",
    "is0",
    "neg",
    "inv",
    "sqrt",
    "sqr",
    "eql",
    "add",
    "sub",
    "mul",
    "pow",
    "div",
    "addN",
    "subN",
    "mulN",
    "sqrN"
  ];
  function validateField2(field) {
    const initial = {
      ORDER: "bigint",
      MASK: "bigint",
      BYTES: "number",
      BITS: "number"
    };
    const opts = FIELD_FIELDS2.reduce((map2, val) => {
      map2[val] = "function";
      return map2;
    }, initial);
    _validateObject(field, opts);
    return field;
  }
  function FpPow2(Fp3, num2, power) {
    if (power < _0n8)
      throw new Error("invalid exponent, negatives unsupported");
    if (power === _0n8)
      return Fp3.ONE;
    if (power === _1n8)
      return num2;
    let p7 = Fp3.ONE;
    let d6 = num2;
    while (power > _0n8) {
      if (power & _1n8)
        p7 = Fp3.mul(p7, d6);
      d6 = Fp3.sqr(d6);
      power >>= _1n8;
    }
    return p7;
  }
  function FpInvertBatch2(Fp3, nums, passZero = false) {
    const inverted = new Array(nums.length).fill(passZero ? Fp3.ZERO : void 0);
    const multipliedAcc = nums.reduce((acc, num2, i5) => {
      if (Fp3.is0(num2))
        return acc;
      inverted[i5] = acc;
      return Fp3.mul(acc, num2);
    }, Fp3.ONE);
    const invertedAcc = Fp3.inv(multipliedAcc);
    nums.reduceRight((acc, num2, i5) => {
      if (Fp3.is0(num2))
        return acc;
      inverted[i5] = Fp3.mul(acc, inverted[i5]);
      return Fp3.mul(acc, num2);
    }, invertedAcc);
    return inverted;
  }
  function FpLegendre2(Fp3, n6) {
    const p1mod2 = (Fp3.ORDER - _1n8) / _2n5;
    const powered = Fp3.pow(n6, p1mod2);
    const yes = Fp3.eql(powered, Fp3.ONE);
    const zero = Fp3.eql(powered, Fp3.ZERO);
    const no3 = Fp3.eql(powered, Fp3.neg(Fp3.ONE));
    if (!yes && !zero && !no3)
      throw new Error("invalid Legendre symbol result");
    return yes ? 1 : zero ? 0 : -1;
  }
  function nLength2(n6, nBitLength) {
    if (nBitLength !== void 0)
      anumber(nBitLength);
    const _nBitLength = nBitLength !== void 0 ? nBitLength : n6.toString(2).length;
    const nByteLength = Math.ceil(_nBitLength / 8);
    return { nBitLength: _nBitLength, nByteLength };
  }
  function Field2(ORDER, bitLenOrOpts, isLE3 = false, opts = {}) {
    if (ORDER <= _0n8)
      throw new Error("invalid field: expected ORDER > 0, got " + ORDER);
    let _nbitLength = void 0;
    let _sqrt = void 0;
    let modFromBytes = false;
    let allowedLengths = void 0;
    if (typeof bitLenOrOpts === "object" && bitLenOrOpts != null) {
      if (opts.sqrt || isLE3)
        throw new Error("cannot specify opts in two arguments");
      const _opts = bitLenOrOpts;
      if (_opts.BITS)
        _nbitLength = _opts.BITS;
      if (_opts.sqrt)
        _sqrt = _opts.sqrt;
      if (typeof _opts.isLE === "boolean")
        isLE3 = _opts.isLE;
      if (typeof _opts.modFromBytes === "boolean")
        modFromBytes = _opts.modFromBytes;
      allowedLengths = _opts.allowedLengths;
    } else {
      if (typeof bitLenOrOpts === "number")
        _nbitLength = bitLenOrOpts;
      if (opts.sqrt)
        _sqrt = opts.sqrt;
    }
    const { nBitLength: BITS, nByteLength: BYTES } = nLength2(ORDER, _nbitLength);
    if (BYTES > 2048)
      throw new Error("invalid field: expected ORDER of <= 2048 bytes");
    let sqrtP;
    const f7 = Object.freeze({
      ORDER,
      isLE: isLE3,
      BITS,
      BYTES,
      MASK: bitMask2(BITS),
      ZERO: _0n8,
      ONE: _1n8,
      allowedLengths,
      create: (num2) => mod2(num2, ORDER),
      isValid: (num2) => {
        if (typeof num2 !== "bigint")
          throw new Error("invalid field element: expected bigint, got " + typeof num2);
        return _0n8 <= num2 && num2 < ORDER;
      },
      is0: (num2) => num2 === _0n8,
      // is valid and invertible
      isValidNot0: (num2) => !f7.is0(num2) && f7.isValid(num2),
      isOdd: (num2) => (num2 & _1n8) === _1n8,
      neg: (num2) => mod2(-num2, ORDER),
      eql: (lhs, rhs) => lhs === rhs,
      sqr: (num2) => mod2(num2 * num2, ORDER),
      add: (lhs, rhs) => mod2(lhs + rhs, ORDER),
      sub: (lhs, rhs) => mod2(lhs - rhs, ORDER),
      mul: (lhs, rhs) => mod2(lhs * rhs, ORDER),
      pow: (num2, power) => FpPow2(f7, num2, power),
      div: (lhs, rhs) => mod2(lhs * invert2(rhs, ORDER), ORDER),
      // Same as above, but doesn't normalize
      sqrN: (num2) => num2 * num2,
      addN: (lhs, rhs) => lhs + rhs,
      subN: (lhs, rhs) => lhs - rhs,
      mulN: (lhs, rhs) => lhs * rhs,
      inv: (num2) => invert2(num2, ORDER),
      sqrt: _sqrt || ((n6) => {
        if (!sqrtP)
          sqrtP = FpSqrt2(ORDER);
        return sqrtP(f7, n6);
      }),
      toBytes: (num2) => isLE3 ? numberToBytesLE2(num2, BYTES) : numberToBytesBE2(num2, BYTES),
      fromBytes: (bytes, skipValidation = true) => {
        if (allowedLengths) {
          if (!allowedLengths.includes(bytes.length) || bytes.length > BYTES) {
            throw new Error("Field.fromBytes: expected " + allowedLengths + " bytes, got " + bytes.length);
          }
          const padded = new Uint8Array(BYTES);
          padded.set(bytes, isLE3 ? 0 : padded.length - bytes.length);
          bytes = padded;
        }
        if (bytes.length !== BYTES)
          throw new Error("Field.fromBytes: expected " + BYTES + " bytes, got " + bytes.length);
        let scalar = isLE3 ? bytesToNumberLE2(bytes) : bytesToNumberBE2(bytes);
        if (modFromBytes)
          scalar = mod2(scalar, ORDER);
        if (!skipValidation) {
          if (!f7.isValid(scalar))
            throw new Error("invalid field element: outside of range 0..ORDER");
        }
        return scalar;
      },
      // TODO: we don't need it here, move out to separate fn
      invertBatch: (lst) => FpInvertBatch2(f7, lst),
      // We can't move this out because Fp6, Fp12 implement it
      // and it's unclear what to return in there.
      cmov: (a5, b9, c7) => c7 ? b9 : a5
    });
    return Object.freeze(f7);
  }
  function getFieldBytesLength2(fieldOrder) {
    if (typeof fieldOrder !== "bigint")
      throw new Error("field order must be bigint");
    const bitLength = fieldOrder.toString(2).length;
    return Math.ceil(bitLength / 8);
  }
  function getMinHashLength2(fieldOrder) {
    const length2 = getFieldBytesLength2(fieldOrder);
    return length2 + Math.ceil(length2 / 2);
  }
  function mapHashToField2(key2, fieldOrder, isLE3 = false) {
    const len = key2.length;
    const fieldLen = getFieldBytesLength2(fieldOrder);
    const minLen = getMinHashLength2(fieldOrder);
    if (len < 16 || len < minLen || len > 1024)
      throw new Error("expected " + minLen + "-1024 bytes of input, got " + len);
    const num2 = isLE3 ? bytesToNumberLE2(key2) : bytesToNumberBE2(key2);
    const reduced = mod2(num2, fieldOrder - _1n8) + _1n8;
    return isLE3 ? numberToBytesLE2(reduced, fieldLen) : numberToBytesBE2(reduced, fieldLen);
  }

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js
  init_node_compat_inject();
  init_sha2();

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js
  init_node_compat_inject();
  init_hmac();
  init_utils2();

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js
  init_node_compat_inject();
  var _0n9 = BigInt(0);
  var _1n9 = BigInt(1);
  function negateCt(condition, item) {
    const neg3 = item.negate();
    return condition ? neg3 : item;
  }
  function normalizeZ(c7, points) {
    const invertedZs = FpInvertBatch2(c7.Fp, points.map((p7) => p7.Z));
    return points.map((p7, i5) => c7.fromAffine(p7.toAffine(invertedZs[i5])));
  }
  function validateW2(W8, bits) {
    if (!Number.isSafeInteger(W8) || W8 <= 0 || W8 > bits)
      throw new Error("invalid window size, expected [1.." + bits + "], got W=" + W8);
  }
  function calcWOpts2(W8, scalarBits2) {
    validateW2(W8, scalarBits2);
    const windows = Math.ceil(scalarBits2 / W8) + 1;
    const windowSize = 2 ** (W8 - 1);
    const maxNumber = 2 ** W8;
    const mask2 = bitMask2(W8);
    const shiftBy = BigInt(W8);
    return { windows, windowSize, mask: mask2, maxNumber, shiftBy };
  }
  function calcOffsets2(n6, window2, wOpts) {
    const { windowSize, mask: mask2, maxNumber, shiftBy } = wOpts;
    let wbits = Number(n6 & mask2);
    let nextN = n6 >> shiftBy;
    if (wbits > windowSize) {
      wbits -= maxNumber;
      nextN += _1n9;
    }
    const offsetStart = window2 * windowSize;
    const offset2 = offsetStart + Math.abs(wbits) - 1;
    const isZero = wbits === 0;
    const isNeg = wbits < 0;
    const isNegF = window2 % 2 !== 0;
    const offsetF = offsetStart;
    return { nextN, offset: offset2, isZero, isNeg, isNegF, offsetF };
  }
  function validateMSMPoints2(points, c7) {
    if (!Array.isArray(points))
      throw new Error("array expected");
    points.forEach((p7, i5) => {
      if (!(p7 instanceof c7))
        throw new Error("invalid point at index " + i5);
    });
  }
  function validateMSMScalars2(scalars, field) {
    if (!Array.isArray(scalars))
      throw new Error("array of scalars expected");
    scalars.forEach((s3, i5) => {
      if (!field.isValid(s3))
        throw new Error("invalid scalar at index " + i5);
    });
  }
  var pointPrecomputes2 = /* @__PURE__ */ new WeakMap();
  var pointWindowSizes2 = /* @__PURE__ */ new WeakMap();
  function getW2(P8) {
    return pointWindowSizes2.get(P8) || 1;
  }
  function assert0(n6) {
    if (n6 !== _0n9)
      throw new Error("invalid wNAF");
  }
  var wNAF2 = class {
    // Parametrized with a given Point class (not individual point)
    constructor(Point5, bits) {
      this.BASE = Point5.BASE;
      this.ZERO = Point5.ZERO;
      this.Fn = Point5.Fn;
      this.bits = bits;
    }
    // non-const time multiplication ladder
    _unsafeLadder(elm, n6, p7 = this.ZERO) {
      let d6 = elm;
      while (n6 > _0n9) {
        if (n6 & _1n9)
          p7 = p7.add(d6);
        d6 = d6.double();
        n6 >>= _1n9;
      }
      return p7;
    }
    /**
     * Creates a wNAF precomputation window. Used for caching.
     * Default window size is set by `utils.precompute()` and is equal to 8.
     * Number of precomputed points depends on the curve size:
     * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:
     * - 𝑊 is the window size
     * - 𝑛 is the bitlength of the curve order.
     * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.
     * @param point Point instance
     * @param W window size
     * @returns precomputed point tables flattened to a single array
     */
    precomputeWindow(point3, W8) {
      const { windows, windowSize } = calcWOpts2(W8, this.bits);
      const points = [];
      let p7 = point3;
      let base4 = p7;
      for (let window2 = 0; window2 < windows; window2++) {
        base4 = p7;
        points.push(base4);
        for (let i5 = 1; i5 < windowSize; i5++) {
          base4 = base4.add(p7);
          points.push(base4);
        }
        p7 = base4.double();
      }
      return points;
    }
    /**
     * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.
     * More compact implementation:
     * https://github.com/paulmillr/noble-secp256k1/blob/47cb1669b6e506ad66b35fe7d76132ae97465da2/index.ts#L502-L541
     * @returns real and fake (for const-time) points
     */
    wNAF(W8, precomputes, n6) {
      if (!this.Fn.isValid(n6))
        throw new Error("invalid scalar");
      let p7 = this.ZERO;
      let f7 = this.BASE;
      const wo2 = calcWOpts2(W8, this.bits);
      for (let window2 = 0; window2 < wo2.windows; window2++) {
        const { nextN, offset: offset2, isZero, isNeg, isNegF, offsetF } = calcOffsets2(n6, window2, wo2);
        n6 = nextN;
        if (isZero) {
          f7 = f7.add(negateCt(isNegF, precomputes[offsetF]));
        } else {
          p7 = p7.add(negateCt(isNeg, precomputes[offset2]));
        }
      }
      assert0(n6);
      return { p: p7, f: f7 };
    }
    /**
     * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.
     * @param acc accumulator point to add result of multiplication
     * @returns point
     */
    wNAFUnsafe(W8, precomputes, n6, acc = this.ZERO) {
      const wo2 = calcWOpts2(W8, this.bits);
      for (let window2 = 0; window2 < wo2.windows; window2++) {
        if (n6 === _0n9)
          break;
        const { nextN, offset: offset2, isZero, isNeg } = calcOffsets2(n6, window2, wo2);
        n6 = nextN;
        if (isZero) {
          continue;
        } else {
          const item = precomputes[offset2];
          acc = acc.add(isNeg ? item.negate() : item);
        }
      }
      assert0(n6);
      return acc;
    }
    getPrecomputes(W8, point3, transform2) {
      let comp = pointPrecomputes2.get(point3);
      if (!comp) {
        comp = this.precomputeWindow(point3, W8);
        if (W8 !== 1) {
          if (typeof transform2 === "function")
            comp = transform2(comp);
          pointPrecomputes2.set(point3, comp);
        }
      }
      return comp;
    }
    cached(point3, scalar, transform2) {
      const W8 = getW2(point3);
      return this.wNAF(W8, this.getPrecomputes(W8, point3, transform2), scalar);
    }
    unsafe(point3, scalar, transform2, prev) {
      const W8 = getW2(point3);
      if (W8 === 1)
        return this._unsafeLadder(point3, scalar, prev);
      return this.wNAFUnsafe(W8, this.getPrecomputes(W8, point3, transform2), scalar, prev);
    }
    // We calculate precomputes for elliptic curve point multiplication
    // using windowed method. This specifies window size and
    // stores precomputed values. Usually only base point would be precomputed.
    createCache(P8, W8) {
      validateW2(W8, this.bits);
      pointWindowSizes2.set(P8, W8);
      pointPrecomputes2.delete(P8);
    }
    hasCache(elm) {
      return getW2(elm) !== 1;
    }
  };
  function mulEndoUnsafe(Point5, point3, k1, k22) {
    let acc = point3;
    let p1 = Point5.ZERO;
    let p22 = Point5.ZERO;
    while (k1 > _0n9 || k22 > _0n9) {
      if (k1 & _1n9)
        p1 = p1.add(acc);
      if (k22 & _1n9)
        p22 = p22.add(acc);
      acc = acc.double();
      k1 >>= _1n9;
      k22 >>= _1n9;
    }
    return { p1, p2: p22 };
  }
  function pippenger2(c7, fieldN, points, scalars) {
    validateMSMPoints2(points, c7);
    validateMSMScalars2(scalars, fieldN);
    const plength = points.length;
    const slength = scalars.length;
    if (plength !== slength)
      throw new Error("arrays of points and scalars must have equal length");
    const zero = c7.ZERO;
    const wbits = bitLen2(BigInt(plength));
    let windowSize = 1;
    if (wbits > 12)
      windowSize = wbits - 3;
    else if (wbits > 4)
      windowSize = wbits - 2;
    else if (wbits > 0)
      windowSize = 2;
    const MASK = bitMask2(windowSize);
    const buckets = new Array(Number(MASK) + 1).fill(zero);
    const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;
    let sum = zero;
    for (let i5 = lastBits; i5 >= 0; i5 -= windowSize) {
      buckets.fill(zero);
      for (let j6 = 0; j6 < slength; j6++) {
        const scalar = scalars[j6];
        const wbits2 = Number(scalar >> BigInt(i5) & MASK);
        buckets[wbits2] = buckets[wbits2].add(points[j6]);
      }
      let resI = zero;
      for (let j6 = buckets.length - 1, sumI = zero; j6 > 0; j6--) {
        sumI = sumI.add(buckets[j6]);
        resI = resI.add(sumI);
      }
      sum = sum.add(resI);
      if (i5 !== 0)
        for (let j6 = 0; j6 < windowSize; j6++)
          sum = sum.double();
    }
    return sum;
  }
  function createField(order, field, isLE3) {
    if (field) {
      if (field.ORDER !== order)
        throw new Error("Field.ORDER must match order: Fp == p, Fn == n");
      validateField2(field);
      return field;
    } else {
      return Field2(order, { isLE: isLE3 });
    }
  }
  function _createCurveFields(type2, CURVE, curveOpts = {}, FpFnLE) {
    if (FpFnLE === void 0)
      FpFnLE = type2 === "edwards";
    if (!CURVE || typeof CURVE !== "object")
      throw new Error(`expected valid ${type2} CURVE object`);
    for (const p7 of ["p", "n", "h"]) {
      const val = CURVE[p7];
      if (!(typeof val === "bigint" && val > _0n9))
        throw new Error(`CURVE.${p7} must be positive bigint`);
    }
    const Fp3 = createField(CURVE.p, curveOpts.Fp, FpFnLE);
    const Fn5 = createField(CURVE.n, curveOpts.Fn, FpFnLE);
    const _b = type2 === "weierstrass" ? "b" : "d";
    const params = ["Gx", "Gy", "a", _b];
    for (const p7 of params) {
      if (!Fp3.isValid(CURVE[p7]))
        throw new Error(`CURVE.${p7} must be valid field element of CURVE.Fp`);
    }
    CURVE = Object.freeze(Object.assign({}, CURVE));
    return { CURVE, Fp: Fp3, Fn: Fn5 };
  }

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js
  var divNearest2 = (num2, den) => (num2 + (num2 >= 0 ? den : -den) / _2n6) / den;
  function _splitEndoScalar(k7, basis, n6) {
    const [[a1, b1], [a22, b22]] = basis;
    const c1 = divNearest2(b22 * k7, n6);
    const c22 = divNearest2(-b1 * k7, n6);
    let k1 = k7 - c1 * a1 - c22 * a22;
    let k22 = -c1 * b1 - c22 * b22;
    const k1neg = k1 < _0n10;
    const k2neg = k22 < _0n10;
    if (k1neg)
      k1 = -k1;
    if (k2neg)
      k22 = -k22;
    const MAX_NUM = bitMask2(Math.ceil(bitLen2(n6) / 2)) + _1n10;
    if (k1 < _0n10 || k1 >= MAX_NUM || k22 < _0n10 || k22 >= MAX_NUM) {
      throw new Error("splitScalar (endomorphism): failed, k=" + k7);
    }
    return { k1neg, k1, k2neg, k2: k22 };
  }
  function validateSigFormat(format) {
    if (!["compact", "recovered", "der"].includes(format))
      throw new Error('Signature format must be "compact", "recovered", or "der"');
    return format;
  }
  function validateSigOpts(opts, def) {
    const optsn = {};
    for (let optName of Object.keys(def)) {
      optsn[optName] = opts[optName] === void 0 ? def[optName] : opts[optName];
    }
    _abool2(optsn.lowS, "lowS");
    _abool2(optsn.prehash, "prehash");
    if (optsn.format !== void 0)
      validateSigFormat(optsn.format);
    return optsn;
  }
  var DERErr2 = class extends Error {
    constructor(m3 = "") {
      super(m3);
    }
  };
  var DER2 = {
    // asn.1 DER encoding utils
    Err: DERErr2,
    // Basic building block is TLV (Tag-Length-Value)
    _tlv: {
      encode: (tag, data) => {
        const { Err: E6 } = DER2;
        if (tag < 0 || tag > 256)
          throw new E6("tlv.encode: wrong tag");
        if (data.length & 1)
          throw new E6("tlv.encode: unpadded data");
        const dataLen = data.length / 2;
        const len = numberToHexUnpadded2(dataLen);
        if (len.length / 2 & 128)
          throw new E6("tlv.encode: long form length too big");
        const lenLen = dataLen > 127 ? numberToHexUnpadded2(len.length / 2 | 128) : "";
        const t = numberToHexUnpadded2(tag);
        return t + lenLen + len + data;
      },
      // v - value, l - left bytes (unparsed)
      decode(tag, data) {
        const { Err: E6 } = DER2;
        let pos = 0;
        if (tag < 0 || tag > 256)
          throw new E6("tlv.encode: wrong tag");
        if (data.length < 2 || data[pos++] !== tag)
          throw new E6("tlv.decode: wrong tlv");
        const first = data[pos++];
        const isLong = !!(first & 128);
        let length2 = 0;
        if (!isLong)
          length2 = first;
        else {
          const lenLen = first & 127;
          if (!lenLen)
            throw new E6("tlv.decode(long): indefinite length not supported");
          if (lenLen > 4)
            throw new E6("tlv.decode(long): byte length is too big");
          const lengthBytes = data.subarray(pos, pos + lenLen);
          if (lengthBytes.length !== lenLen)
            throw new E6("tlv.decode: length bytes not complete");
          if (lengthBytes[0] === 0)
            throw new E6("tlv.decode(long): zero leftmost byte");
          for (const b9 of lengthBytes)
            length2 = length2 << 8 | b9;
          pos += lenLen;
          if (length2 < 128)
            throw new E6("tlv.decode(long): not minimal encoding");
        }
        const v13 = data.subarray(pos, pos + length2);
        if (v13.length !== length2)
          throw new E6("tlv.decode: wrong value length");
        return { v: v13, l: data.subarray(pos + length2) };
      }
    },
    // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,
    // since we always use positive integers here. It must always be empty:
    // - add zero byte if exists
    // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)
    _int: {
      encode(num2) {
        const { Err: E6 } = DER2;
        if (num2 < _0n10)
          throw new E6("integer: negative integers are not allowed");
        let hex3 = numberToHexUnpadded2(num2);
        if (Number.parseInt(hex3[0], 16) & 8)
          hex3 = "00" + hex3;
        if (hex3.length & 1)
          throw new E6("unexpected DER parsing assertion: unpadded hex");
        return hex3;
      },
      decode(data) {
        const { Err: E6 } = DER2;
        if (data[0] & 128)
          throw new E6("invalid signature integer: negative");
        if (data[0] === 0 && !(data[1] & 128))
          throw new E6("invalid signature integer: unnecessary leading zero");
        return bytesToNumberBE2(data);
      }
    },
    toSig(hex3) {
      const { Err: E6, _int: int2, _tlv: tlv } = DER2;
      const data = ensureBytes2("signature", hex3);
      const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);
      if (seqLeftBytes.length)
        throw new E6("invalid signature: left bytes after parsing");
      const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);
      const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);
      if (sLeftBytes.length)
        throw new E6("invalid signature: left bytes after parsing");
      return { r: int2.decode(rBytes), s: int2.decode(sBytes) };
    },
    hexFromSig(sig) {
      const { _tlv: tlv, _int: int2 } = DER2;
      const rs = tlv.encode(2, int2.encode(sig.r));
      const ss2 = tlv.encode(2, int2.encode(sig.s));
      const seq2 = rs + ss2;
      return tlv.encode(48, seq2);
    }
  };
  var _0n10 = BigInt(0);
  var _1n10 = BigInt(1);
  var _2n6 = BigInt(2);
  var _3n4 = BigInt(3);
  var _4n4 = BigInt(4);
  function _normFnElement(Fn5, key2) {
    const { BYTES: expected } = Fn5;
    let num2;
    if (typeof key2 === "bigint") {
      num2 = key2;
    } else {
      let bytes = ensureBytes2("private key", key2);
      try {
        num2 = Fn5.fromBytes(bytes);
      } catch (error51) {
        throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key2}`);
      }
    }
    if (!Fn5.isValidNot0(num2))
      throw new Error("invalid private key: out of range [1..N-1]");
    return num2;
  }
  function weierstrassN(params, extraOpts = {}) {
    const validated = _createCurveFields("weierstrass", params, extraOpts);
    const { Fp: Fp3, Fn: Fn5 } = validated;
    let CURVE = validated.CURVE;
    const { h: cofactor, n: CURVE_ORDER } = CURVE;
    _validateObject(extraOpts, {}, {
      allowInfinityPoint: "boolean",
      clearCofactor: "function",
      isTorsionFree: "function",
      fromBytes: "function",
      toBytes: "function",
      endo: "object",
      wrapPrivateKey: "boolean"
    });
    const { endo } = extraOpts;
    if (endo) {
      if (!Fp3.is0(CURVE.a) || typeof endo.beta !== "bigint" || !Array.isArray(endo.basises)) {
        throw new Error('invalid endo: expected "beta": bigint and "basises": array');
      }
    }
    const lengths = getWLengths(Fp3, Fn5);
    function assertCompressionIsSupported() {
      if (!Fp3.isOdd)
        throw new Error("compression is not supported: Field does not have .isOdd()");
    }
    function pointToBytes2(_c, point3, isCompressed) {
      const { x: x13, y: y11 } = point3.toAffine();
      const bx = Fp3.toBytes(x13);
      _abool2(isCompressed, "isCompressed");
      if (isCompressed) {
        assertCompressionIsSupported();
        const hasEvenY = !Fp3.isOdd(y11);
        return concatBytes(pprefix(hasEvenY), bx);
      } else {
        return concatBytes(Uint8Array.of(4), bx, Fp3.toBytes(y11));
      }
    }
    function pointFromBytes(bytes) {
      _abytes2(bytes, void 0, "Point");
      const { publicKey: comp, publicKeyUncompressed: uncomp } = lengths;
      const length2 = bytes.length;
      const head = bytes[0];
      const tail = bytes.subarray(1);
      if (length2 === comp && (head === 2 || head === 3)) {
        const x13 = Fp3.fromBytes(tail);
        if (!Fp3.isValid(x13))
          throw new Error("bad point: is not on curve, wrong x");
        const y22 = weierstrassEquation(x13);
        let y11;
        try {
          y11 = Fp3.sqrt(y22);
        } catch (sqrtError) {
          const err2 = sqrtError instanceof Error ? ": " + sqrtError.message : "";
          throw new Error("bad point: is not on curve, sqrt error" + err2);
        }
        assertCompressionIsSupported();
        const isYOdd = Fp3.isOdd(y11);
        const isHeadOdd = (head & 1) === 1;
        if (isHeadOdd !== isYOdd)
          y11 = Fp3.neg(y11);
        return { x: x13, y: y11 };
      } else if (length2 === uncomp && head === 4) {
        const L6 = Fp3.BYTES;
        const x13 = Fp3.fromBytes(tail.subarray(0, L6));
        const y11 = Fp3.fromBytes(tail.subarray(L6, L6 * 2));
        if (!isValidXY(x13, y11))
          throw new Error("bad point: is not on curve");
        return { x: x13, y: y11 };
      } else {
        throw new Error(`bad point: got length ${length2}, expected compressed=${comp} or uncompressed=${uncomp}`);
      }
    }
    const encodePoint = extraOpts.toBytes || pointToBytes2;
    const decodePoint2 = extraOpts.fromBytes || pointFromBytes;
    function weierstrassEquation(x13) {
      const x22 = Fp3.sqr(x13);
      const x32 = Fp3.mul(x22, x13);
      return Fp3.add(Fp3.add(x32, Fp3.mul(x13, CURVE.a)), CURVE.b);
    }
    function isValidXY(x13, y11) {
      const left = Fp3.sqr(y11);
      const right = weierstrassEquation(x13);
      return Fp3.eql(left, right);
    }
    if (!isValidXY(CURVE.Gx, CURVE.Gy))
      throw new Error("bad curve params: generator point");
    const _4a3 = Fp3.mul(Fp3.pow(CURVE.a, _3n4), _4n4);
    const _27b2 = Fp3.mul(Fp3.sqr(CURVE.b), BigInt(27));
    if (Fp3.is0(Fp3.add(_4a3, _27b2)))
      throw new Error("bad curve params: a or b");
    function acoord(title, n6, banZero = false) {
      if (!Fp3.isValid(n6) || banZero && Fp3.is0(n6))
        throw new Error(`bad point coordinate ${title}`);
      return n6;
    }
    function aprjpoint(other) {
      if (!(other instanceof Point5))
        throw new Error("ProjectivePoint expected");
    }
    function splitEndoScalarN(k7) {
      if (!endo || !endo.basises)
        throw new Error("no endo");
      return _splitEndoScalar(k7, endo.basises, Fn5.ORDER);
    }
    const toAffineMemo = memoized2((p7, iz) => {
      const { X: X4, Y: Y6, Z: Z6 } = p7;
      if (Fp3.eql(Z6, Fp3.ONE))
        return { x: X4, y: Y6 };
      const is0 = p7.is0();
      if (iz == null)
        iz = is0 ? Fp3.ONE : Fp3.inv(Z6);
      const x13 = Fp3.mul(X4, iz);
      const y11 = Fp3.mul(Y6, iz);
      const zz = Fp3.mul(Z6, iz);
      if (is0)
        return { x: Fp3.ZERO, y: Fp3.ZERO };
      if (!Fp3.eql(zz, Fp3.ONE))
        throw new Error("invZ was invalid");
      return { x: x13, y: y11 };
    });
    const assertValidMemo = memoized2((p7) => {
      if (p7.is0()) {
        if (extraOpts.allowInfinityPoint && !Fp3.is0(p7.Y))
          return;
        throw new Error("bad point: ZERO");
      }
      const { x: x13, y: y11 } = p7.toAffine();
      if (!Fp3.isValid(x13) || !Fp3.isValid(y11))
        throw new Error("bad point: x or y not field elements");
      if (!isValidXY(x13, y11))
        throw new Error("bad point: equation left != right");
      if (!p7.isTorsionFree())
        throw new Error("bad point: not in prime-order subgroup");
      return true;
    });
    function finishEndo(endoBeta, k1p, k2p, k1neg, k2neg) {
      k2p = new Point5(Fp3.mul(k2p.X, endoBeta), k2p.Y, k2p.Z);
      k1p = negateCt(k1neg, k1p);
      k2p = negateCt(k2neg, k2p);
      return k1p.add(k2p);
    }
    class Point5 {
      /** Does NOT validate if the point is valid. Use `.assertValidity()`. */
      constructor(X4, Y6, Z6) {
        this.X = acoord("x", X4);
        this.Y = acoord("y", Y6, true);
        this.Z = acoord("z", Z6);
        Object.freeze(this);
      }
      static CURVE() {
        return CURVE;
      }
      /** Does NOT validate if the point is valid. Use `.assertValidity()`. */
      static fromAffine(p7) {
        const { x: x13, y: y11 } = p7 || {};
        if (!p7 || !Fp3.isValid(x13) || !Fp3.isValid(y11))
          throw new Error("invalid affine point");
        if (p7 instanceof Point5)
          throw new Error("projective point not allowed");
        if (Fp3.is0(x13) && Fp3.is0(y11))
          return Point5.ZERO;
        return new Point5(x13, y11, Fp3.ONE);
      }
      static fromBytes(bytes) {
        const P8 = Point5.fromAffine(decodePoint2(_abytes2(bytes, void 0, "point")));
        P8.assertValidity();
        return P8;
      }
      static fromHex(hex3) {
        return Point5.fromBytes(ensureBytes2("pointHex", hex3));
      }
      get x() {
        return this.toAffine().x;
      }
      get y() {
        return this.toAffine().y;
      }
      /**
       *
       * @param windowSize
       * @param isLazy true will defer table computation until the first multiplication
       * @returns
       */
      precompute(windowSize = 8, isLazy = true) {
        wnaf.createCache(this, windowSize);
        if (!isLazy)
          this.multiply(_3n4);
        return this;
      }
      // TODO: return `this`
      /** A point on curve is valid if it conforms to equation. */
      assertValidity() {
        assertValidMemo(this);
      }
      hasEvenY() {
        const { y: y11 } = this.toAffine();
        if (!Fp3.isOdd)
          throw new Error("Field doesn't support isOdd");
        return !Fp3.isOdd(y11);
      }
      /** Compare one point to another. */
      equals(other) {
        aprjpoint(other);
        const { X: X1, Y: Y1, Z: Z1 } = this;
        const { X: X22, Y: Y22, Z: Z22 } = other;
        const U1 = Fp3.eql(Fp3.mul(X1, Z22), Fp3.mul(X22, Z1));
        const U22 = Fp3.eql(Fp3.mul(Y1, Z22), Fp3.mul(Y22, Z1));
        return U1 && U22;
      }
      /** Flips point to one corresponding to (x, -y) in Affine coordinates. */
      negate() {
        return new Point5(this.X, Fp3.neg(this.Y), this.Z);
      }
      // Renes-Costello-Batina exception-free doubling formula.
      // There is 30% faster Jacobian formula, but it is not complete.
      // https://eprint.iacr.org/2015/1060, algorithm 3
      // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
      double() {
        const { a: a5, b: b9 } = CURVE;
        const b32 = Fp3.mul(b9, _3n4);
        const { X: X1, Y: Y1, Z: Z1 } = this;
        let X32 = Fp3.ZERO, Y32 = Fp3.ZERO, Z32 = Fp3.ZERO;
        let t0 = Fp3.mul(X1, X1);
        let t1 = Fp3.mul(Y1, Y1);
        let t2 = Fp3.mul(Z1, Z1);
        let t3 = Fp3.mul(X1, Y1);
        t3 = Fp3.add(t3, t3);
        Z32 = Fp3.mul(X1, Z1);
        Z32 = Fp3.add(Z32, Z32);
        X32 = Fp3.mul(a5, Z32);
        Y32 = Fp3.mul(b32, t2);
        Y32 = Fp3.add(X32, Y32);
        X32 = Fp3.sub(t1, Y32);
        Y32 = Fp3.add(t1, Y32);
        Y32 = Fp3.mul(X32, Y32);
        X32 = Fp3.mul(t3, X32);
        Z32 = Fp3.mul(b32, Z32);
        t2 = Fp3.mul(a5, t2);
        t3 = Fp3.sub(t0, t2);
        t3 = Fp3.mul(a5, t3);
        t3 = Fp3.add(t3, Z32);
        Z32 = Fp3.add(t0, t0);
        t0 = Fp3.add(Z32, t0);
        t0 = Fp3.add(t0, t2);
        t0 = Fp3.mul(t0, t3);
        Y32 = Fp3.add(Y32, t0);
        t2 = Fp3.mul(Y1, Z1);
        t2 = Fp3.add(t2, t2);
        t0 = Fp3.mul(t2, t3);
        X32 = Fp3.sub(X32, t0);
        Z32 = Fp3.mul(t2, t1);
        Z32 = Fp3.add(Z32, Z32);
        Z32 = Fp3.add(Z32, Z32);
        return new Point5(X32, Y32, Z32);
      }
      // Renes-Costello-Batina exception-free addition formula.
      // There is 30% faster Jacobian formula, but it is not complete.
      // https://eprint.iacr.org/2015/1060, algorithm 1
      // Cost: 12M + 0S + 3*a + 3*b3 + 23add.
      add(other) {
        aprjpoint(other);
        const { X: X1, Y: Y1, Z: Z1 } = this;
        const { X: X22, Y: Y22, Z: Z22 } = other;
        let X32 = Fp3.ZERO, Y32 = Fp3.ZERO, Z32 = Fp3.ZERO;
        const a5 = CURVE.a;
        const b32 = Fp3.mul(CURVE.b, _3n4);
        let t0 = Fp3.mul(X1, X22);
        let t1 = Fp3.mul(Y1, Y22);
        let t2 = Fp3.mul(Z1, Z22);
        let t3 = Fp3.add(X1, Y1);
        let t4 = Fp3.add(X22, Y22);
        t3 = Fp3.mul(t3, t4);
        t4 = Fp3.add(t0, t1);
        t3 = Fp3.sub(t3, t4);
        t4 = Fp3.add(X1, Z1);
        let t5 = Fp3.add(X22, Z22);
        t4 = Fp3.mul(t4, t5);
        t5 = Fp3.add(t0, t2);
        t4 = Fp3.sub(t4, t5);
        t5 = Fp3.add(Y1, Z1);
        X32 = Fp3.add(Y22, Z22);
        t5 = Fp3.mul(t5, X32);
        X32 = Fp3.add(t1, t2);
        t5 = Fp3.sub(t5, X32);
        Z32 = Fp3.mul(a5, t4);
        X32 = Fp3.mul(b32, t2);
        Z32 = Fp3.add(X32, Z32);
        X32 = Fp3.sub(t1, Z32);
        Z32 = Fp3.add(t1, Z32);
        Y32 = Fp3.mul(X32, Z32);
        t1 = Fp3.add(t0, t0);
        t1 = Fp3.add(t1, t0);
        t2 = Fp3.mul(a5, t2);
        t4 = Fp3.mul(b32, t4);
        t1 = Fp3.add(t1, t2);
        t2 = Fp3.sub(t0, t2);
        t2 = Fp3.mul(a5, t2);
        t4 = Fp3.add(t4, t2);
        t0 = Fp3.mul(t1, t4);
        Y32 = Fp3.add(Y32, t0);
        t0 = Fp3.mul(t5, t4);
        X32 = Fp3.mul(t3, X32);
        X32 = Fp3.sub(X32, t0);
        t0 = Fp3.mul(t3, t1);
        Z32 = Fp3.mul(t5, Z32);
        Z32 = Fp3.add(Z32, t0);
        return new Point5(X32, Y32, Z32);
      }
      subtract(other) {
        return this.add(other.negate());
      }
      is0() {
        return this.equals(Point5.ZERO);
      }
      /**
       * Constant time multiplication.
       * Uses wNAF method. Windowed method may be 10% faster,
       * but takes 2x longer to generate and consumes 2x memory.
       * Uses precomputes when available.
       * Uses endomorphism for Koblitz curves.
       * @param scalar by which the point would be multiplied
       * @returns New point
       */
      multiply(scalar) {
        const { endo: endo2 } = extraOpts;
        if (!Fn5.isValidNot0(scalar))
          throw new Error("invalid scalar: out of range");
        let point3, fake;
        const mul3 = (n6) => wnaf.cached(this, n6, (p7) => normalizeZ(Point5, p7));
        if (endo2) {
          const { k1neg, k1, k2neg, k2: k22 } = splitEndoScalarN(scalar);
          const { p: k1p, f: k1f } = mul3(k1);
          const { p: k2p, f: k2f } = mul3(k22);
          fake = k1f.add(k2f);
          point3 = finishEndo(endo2.beta, k1p, k2p, k1neg, k2neg);
        } else {
          const { p: p7, f: f7 } = mul3(scalar);
          point3 = p7;
          fake = f7;
        }
        return normalizeZ(Point5, [point3, fake])[0];
      }
      /**
       * Non-constant-time multiplication. Uses double-and-add algorithm.
       * It's faster, but should only be used when you don't care about
       * an exposed secret key e.g. sig verification, which works over *public* keys.
       */
      multiplyUnsafe(sc) {
        const { endo: endo2 } = extraOpts;
        const p7 = this;
        if (!Fn5.isValid(sc))
          throw new Error("invalid scalar: out of range");
        if (sc === _0n10 || p7.is0())
          return Point5.ZERO;
        if (sc === _1n10)
          return p7;
        if (wnaf.hasCache(this))
          return this.multiply(sc);
        if (endo2) {
          const { k1neg, k1, k2neg, k2: k22 } = splitEndoScalarN(sc);
          const { p1, p2: p22 } = mulEndoUnsafe(Point5, p7, k1, k22);
          return finishEndo(endo2.beta, p1, p22, k1neg, k2neg);
        } else {
          return wnaf.unsafe(p7, sc);
        }
      }
      multiplyAndAddUnsafe(Q7, a5, b9) {
        const sum = this.multiplyUnsafe(a5).add(Q7.multiplyUnsafe(b9));
        return sum.is0() ? void 0 : sum;
      }
      /**
       * Converts Projective point to affine (x, y) coordinates.
       * @param invertedZ Z^-1 (inverted zero) - optional, precomputation is useful for invertBatch
       */
      toAffine(invertedZ) {
        return toAffineMemo(this, invertedZ);
      }
      /**
       * Checks whether Point is free of torsion elements (is in prime subgroup).
       * Always torsion-free for cofactor=1 curves.
       */
      isTorsionFree() {
        const { isTorsionFree } = extraOpts;
        if (cofactor === _1n10)
          return true;
        if (isTorsionFree)
          return isTorsionFree(Point5, this);
        return wnaf.unsafe(this, CURVE_ORDER).is0();
      }
      clearCofactor() {
        const { clearCofactor } = extraOpts;
        if (cofactor === _1n10)
          return this;
        if (clearCofactor)
          return clearCofactor(Point5, this);
        return this.multiplyUnsafe(cofactor);
      }
      isSmallOrder() {
        return this.multiplyUnsafe(cofactor).is0();
      }
      toBytes(isCompressed = true) {
        _abool2(isCompressed, "isCompressed");
        this.assertValidity();
        return encodePoint(Point5, this, isCompressed);
      }
      toHex(isCompressed = true) {
        return bytesToHex2(this.toBytes(isCompressed));
      }
      toString() {
        return `<Point ${this.is0() ? "ZERO" : this.toHex()}>`;
      }
      // TODO: remove
      get px() {
        return this.X;
      }
      get py() {
        return this.X;
      }
      get pz() {
        return this.Z;
      }
      toRawBytes(isCompressed = true) {
        return this.toBytes(isCompressed);
      }
      _setWindowSize(windowSize) {
        this.precompute(windowSize);
      }
      static normalizeZ(points) {
        return normalizeZ(Point5, points);
      }
      static msm(points, scalars) {
        return pippenger2(Point5, Fn5, points, scalars);
      }
      static fromPrivateKey(privateKey) {
        return Point5.BASE.multiply(_normFnElement(Fn5, privateKey));
      }
    }
    Point5.BASE = new Point5(CURVE.Gx, CURVE.Gy, Fp3.ONE);
    Point5.ZERO = new Point5(Fp3.ZERO, Fp3.ONE, Fp3.ZERO);
    Point5.Fp = Fp3;
    Point5.Fn = Fn5;
    const bits = Fn5.BITS;
    const wnaf = new wNAF2(Point5, extraOpts.endo ? Math.ceil(bits / 2) : bits);
    Point5.BASE.precompute(8);
    return Point5;
  }
  function pprefix(hasEvenY) {
    return Uint8Array.of(hasEvenY ? 2 : 3);
  }
  function getWLengths(Fp3, Fn5) {
    return {
      secretKey: Fn5.BYTES,
      publicKey: 1 + Fp3.BYTES,
      publicKeyUncompressed: 1 + 2 * Fp3.BYTES,
      publicKeyHasPrefix: true,
      signature: 2 * Fn5.BYTES
    };
  }
  function ecdh(Point5, ecdhOpts = {}) {
    const { Fn: Fn5 } = Point5;
    const randomBytes_ = ecdhOpts.randomBytes || randomBytes;
    const lengths = Object.assign(getWLengths(Point5.Fp, Fn5), { seed: getMinHashLength2(Fn5.ORDER) });
    function isValidSecretKey(secretKey) {
      try {
        return !!_normFnElement(Fn5, secretKey);
      } catch (error51) {
        return false;
      }
    }
    function isValidPublicKey(publicKey3, isCompressed) {
      const { publicKey: comp, publicKeyUncompressed } = lengths;
      try {
        const l6 = publicKey3.length;
        if (isCompressed === true && l6 !== comp)
          return false;
        if (isCompressed === false && l6 !== publicKeyUncompressed)
          return false;
        return !!Point5.fromBytes(publicKey3);
      } catch (error51) {
        return false;
      }
    }
    function randomSecretKey(seed = randomBytes_(lengths.seed)) {
      return mapHashToField2(_abytes2(seed, lengths.seed, "seed"), Fn5.ORDER);
    }
    function getPublicKey2(secretKey, isCompressed = true) {
      return Point5.BASE.multiply(_normFnElement(Fn5, secretKey)).toBytes(isCompressed);
    }
    function keygen2(seed) {
      const secretKey = randomSecretKey(seed);
      return { secretKey, publicKey: getPublicKey2(secretKey) };
    }
    function isProbPub(item) {
      if (typeof item === "bigint")
        return false;
      if (item instanceof Point5)
        return true;
      const { secretKey, publicKey: publicKey3, publicKeyUncompressed } = lengths;
      if (Fn5.allowedLengths || secretKey === publicKey3)
        return void 0;
      const l6 = ensureBytes2("key", item).length;
      return l6 === publicKey3 || l6 === publicKeyUncompressed;
    }
    function getSharedSecret(secretKeyA, publicKeyB, isCompressed = true) {
      if (isProbPub(secretKeyA) === true)
        throw new Error("first arg must be private key");
      if (isProbPub(publicKeyB) === false)
        throw new Error("second arg must be public key");
      const s3 = _normFnElement(Fn5, secretKeyA);
      const b9 = Point5.fromHex(publicKeyB);
      return b9.multiply(s3).toBytes(isCompressed);
    }
    const utils = {
      isValidSecretKey,
      isValidPublicKey,
      randomSecretKey,
      // TODO: remove
      isValidPrivateKey: isValidSecretKey,
      randomPrivateKey: randomSecretKey,
      normPrivateKeyToScalar: (key2) => _normFnElement(Fn5, key2),
      precompute(windowSize = 8, point3 = Point5.BASE) {
        return point3.precompute(windowSize, false);
      }
    };
    return Object.freeze({ getPublicKey: getPublicKey2, getSharedSecret, keygen: keygen2, Point: Point5, utils, lengths });
  }
  function ecdsa(Point5, hash5, ecdsaOpts = {}) {
    ahash(hash5);
    _validateObject(ecdsaOpts, {}, {
      hmac: "function",
      lowS: "boolean",
      randomBytes: "function",
      bits2int: "function",
      bits2int_modN: "function"
    });
    const randomBytes3 = ecdsaOpts.randomBytes || randomBytes;
    const hmac4 = ecdsaOpts.hmac || ((key2, ...msgs) => hmac(hash5, key2, concatBytes(...msgs)));
    const { Fp: Fp3, Fn: Fn5 } = Point5;
    const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn5;
    const { keygen: keygen2, getPublicKey: getPublicKey2, getSharedSecret, utils, lengths } = ecdh(Point5, ecdsaOpts);
    const defaultSigOpts = {
      prehash: false,
      lowS: typeof ecdsaOpts.lowS === "boolean" ? ecdsaOpts.lowS : false,
      format: void 0,
      //'compact' as ECDSASigFormat,
      extraEntropy: false
    };
    const defaultSigOpts_format = "compact";
    function isBiggerThanHalfOrder(number5) {
      const HALF = CURVE_ORDER >> _1n10;
      return number5 > HALF;
    }
    function validateRS(title, num2) {
      if (!Fn5.isValidNot0(num2))
        throw new Error(`invalid signature ${title}: out of range 1..Point.Fn.ORDER`);
      return num2;
    }
    function validateSigLength(bytes, format) {
      validateSigFormat(format);
      const size5 = lengths.signature;
      const sizer = format === "compact" ? size5 : format === "recovered" ? size5 + 1 : void 0;
      return _abytes2(bytes, sizer, `${format} signature`);
    }
    class Signature2 {
      constructor(r3, s3, recovery) {
        this.r = validateRS("r", r3);
        this.s = validateRS("s", s3);
        if (recovery != null)
          this.recovery = recovery;
        Object.freeze(this);
      }
      static fromBytes(bytes, format = defaultSigOpts_format) {
        validateSigLength(bytes, format);
        let recid;
        if (format === "der") {
          const { r: r4, s: s4 } = DER2.toSig(_abytes2(bytes));
          return new Signature2(r4, s4);
        }
        if (format === "recovered") {
          recid = bytes[0];
          format = "compact";
          bytes = bytes.subarray(1);
        }
        const L6 = Fn5.BYTES;
        const r3 = bytes.subarray(0, L6);
        const s3 = bytes.subarray(L6, L6 * 2);
        return new Signature2(Fn5.fromBytes(r3), Fn5.fromBytes(s3), recid);
      }
      static fromHex(hex3, format) {
        return this.fromBytes(hexToBytes2(hex3), format);
      }
      addRecoveryBit(recovery) {
        return new Signature2(this.r, this.s, recovery);
      }
      recoverPublicKey(messageHash) {
        const FIELD_ORDER = Fp3.ORDER;
        const { r: r3, s: s3, recovery: rec } = this;
        if (rec == null || ![0, 1, 2, 3].includes(rec))
          throw new Error("recovery id invalid");
        const hasCofactor = CURVE_ORDER * _2n6 < FIELD_ORDER;
        if (hasCofactor && rec > 1)
          throw new Error("recovery id is ambiguous for h>1 curve");
        const radj = rec === 2 || rec === 3 ? r3 + CURVE_ORDER : r3;
        if (!Fp3.isValid(radj))
          throw new Error("recovery id 2 or 3 invalid");
        const x13 = Fp3.toBytes(radj);
        const R6 = Point5.fromBytes(concatBytes(pprefix((rec & 1) === 0), x13));
        const ir5 = Fn5.inv(radj);
        const h8 = bits2int_modN(ensureBytes2("msgHash", messageHash));
        const u1 = Fn5.create(-h8 * ir5);
        const u22 = Fn5.create(s3 * ir5);
        const Q7 = Point5.BASE.multiplyUnsafe(u1).add(R6.multiplyUnsafe(u22));
        if (Q7.is0())
          throw new Error("point at infinify");
        Q7.assertValidity();
        return Q7;
      }
      // Signatures should be low-s, to prevent malleability.
      hasHighS() {
        return isBiggerThanHalfOrder(this.s);
      }
      toBytes(format = defaultSigOpts_format) {
        validateSigFormat(format);
        if (format === "der")
          return hexToBytes2(DER2.hexFromSig(this));
        const r3 = Fn5.toBytes(this.r);
        const s3 = Fn5.toBytes(this.s);
        if (format === "recovered") {
          if (this.recovery == null)
            throw new Error("recovery bit must be present");
          return concatBytes(Uint8Array.of(this.recovery), r3, s3);
        }
        return concatBytes(r3, s3);
      }
      toHex(format) {
        return bytesToHex2(this.toBytes(format));
      }
      // TODO: remove
      assertValidity() {
      }
      static fromCompact(hex3) {
        return Signature2.fromBytes(ensureBytes2("sig", hex3), "compact");
      }
      static fromDER(hex3) {
        return Signature2.fromBytes(ensureBytes2("sig", hex3), "der");
      }
      normalizeS() {
        return this.hasHighS() ? new Signature2(this.r, Fn5.neg(this.s), this.recovery) : this;
      }
      toDERRawBytes() {
        return this.toBytes("der");
      }
      toDERHex() {
        return bytesToHex2(this.toBytes("der"));
      }
      toCompactRawBytes() {
        return this.toBytes("compact");
      }
      toCompactHex() {
        return bytesToHex2(this.toBytes("compact"));
      }
    }
    const bits2int = ecdsaOpts.bits2int || function bits2int_def(bytes) {
      if (bytes.length > 8192)
        throw new Error("input is too large");
      const num2 = bytesToNumberBE2(bytes);
      const delta = bytes.length * 8 - fnBits;
      return delta > 0 ? num2 >> BigInt(delta) : num2;
    };
    const bits2int_modN = ecdsaOpts.bits2int_modN || function bits2int_modN_def(bytes) {
      return Fn5.create(bits2int(bytes));
    };
    const ORDER_MASK = bitMask2(fnBits);
    function int2octets(num2) {
      aInRange2("num < 2^" + fnBits, num2, _0n10, ORDER_MASK);
      return Fn5.toBytes(num2);
    }
    function validateMsgAndHash(message, prehash) {
      _abytes2(message, void 0, "message");
      return prehash ? _abytes2(hash5(message), void 0, "prehashed message") : message;
    }
    function prepSig(message, privateKey, opts) {
      if (["recovered", "canonical"].some((k7) => k7 in opts))
        throw new Error("sign() legacy options not supported");
      const { lowS, prehash, extraEntropy: extraEntropy2 } = validateSigOpts(opts, defaultSigOpts);
      message = validateMsgAndHash(message, prehash);
      const h1int = bits2int_modN(message);
      const d6 = _normFnElement(Fn5, privateKey);
      const seedArgs = [int2octets(d6), int2octets(h1int)];
      if (extraEntropy2 != null && extraEntropy2 !== false) {
        const e2 = extraEntropy2 === true ? randomBytes3(lengths.secretKey) : extraEntropy2;
        seedArgs.push(ensureBytes2("extraEntropy", e2));
      }
      const seed = concatBytes(...seedArgs);
      const m3 = h1int;
      function k2sig(kBytes) {
        const k7 = bits2int(kBytes);
        if (!Fn5.isValidNot0(k7))
          return;
        const ik = Fn5.inv(k7);
        const q7 = Point5.BASE.multiply(k7).toAffine();
        const r3 = Fn5.create(q7.x);
        if (r3 === _0n10)
          return;
        const s3 = Fn5.create(ik * Fn5.create(m3 + r3 * d6));
        if (s3 === _0n10)
          return;
        let recovery = (q7.x === r3 ? 0 : 2) | Number(q7.y & _1n10);
        let normS = s3;
        if (lowS && isBiggerThanHalfOrder(s3)) {
          normS = Fn5.neg(s3);
          recovery ^= 1;
        }
        return new Signature2(r3, normS, recovery);
      }
      return { seed, k2sig };
    }
    function sign6(message, secretKey, opts = {}) {
      message = ensureBytes2("message", message);
      const { seed, k2sig } = prepSig(message, secretKey, opts);
      const drbg = createHmacDrbg2(hash5.outputLen, Fn5.BYTES, hmac4);
      const sig = drbg(seed, k2sig);
      return sig;
    }
    function tryParsingSig(sg) {
      let sig = void 0;
      const isHex2 = typeof sg === "string" || isBytes(sg);
      const isObj = !isHex2 && sg !== null && typeof sg === "object" && typeof sg.r === "bigint" && typeof sg.s === "bigint";
      if (!isHex2 && !isObj)
        throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");
      if (isObj) {
        sig = new Signature2(sg.r, sg.s);
      } else if (isHex2) {
        try {
          sig = Signature2.fromBytes(ensureBytes2("sig", sg), "der");
        } catch (derError) {
          if (!(derError instanceof DER2.Err))
            throw derError;
        }
        if (!sig) {
          try {
            sig = Signature2.fromBytes(ensureBytes2("sig", sg), "compact");
          } catch (error51) {
            return false;
          }
        }
      }
      if (!sig)
        return false;
      return sig;
    }
    function verify5(signature2, message, publicKey3, opts = {}) {
      const { lowS, prehash, format } = validateSigOpts(opts, defaultSigOpts);
      publicKey3 = ensureBytes2("publicKey", publicKey3);
      message = validateMsgAndHash(ensureBytes2("message", message), prehash);
      if ("strict" in opts)
        throw new Error("options.strict was renamed to lowS");
      const sig = format === void 0 ? tryParsingSig(signature2) : Signature2.fromBytes(ensureBytes2("sig", signature2), format);
      if (sig === false)
        return false;
      try {
        const P8 = Point5.fromBytes(publicKey3);
        if (lowS && sig.hasHighS())
          return false;
        const { r: r3, s: s3 } = sig;
        const h8 = bits2int_modN(message);
        const is3 = Fn5.inv(s3);
        const u1 = Fn5.create(h8 * is3);
        const u22 = Fn5.create(r3 * is3);
        const R6 = Point5.BASE.multiplyUnsafe(u1).add(P8.multiplyUnsafe(u22));
        if (R6.is0())
          return false;
        const v13 = Fn5.create(R6.x);
        return v13 === r3;
      } catch (e2) {
        return false;
      }
    }
    function recoverPublicKey4(signature2, message, opts = {}) {
      const { prehash } = validateSigOpts(opts, defaultSigOpts);
      message = validateMsgAndHash(message, prehash);
      return Signature2.fromBytes(signature2, "recovered").recoverPublicKey(message).toBytes();
    }
    return Object.freeze({
      keygen: keygen2,
      getPublicKey: getPublicKey2,
      getSharedSecret,
      utils,
      lengths,
      Point: Point5,
      sign: sign6,
      verify: verify5,
      recoverPublicKey: recoverPublicKey4,
      Signature: Signature2,
      hash: hash5
    });
  }
  function _weierstrass_legacy_opts_to_new(c7) {
    const CURVE = {
      a: c7.a,
      b: c7.b,
      p: c7.Fp.ORDER,
      n: c7.n,
      h: c7.h,
      Gx: c7.Gx,
      Gy: c7.Gy
    };
    const Fp3 = c7.Fp;
    let allowedLengths = c7.allowedPrivateKeyLengths ? Array.from(new Set(c7.allowedPrivateKeyLengths.map((l6) => Math.ceil(l6 / 2)))) : void 0;
    const Fn5 = Field2(CURVE.n, {
      BITS: c7.nBitLength,
      allowedLengths,
      modFromBytes: c7.wrapPrivateKey
    });
    const curveOpts = {
      Fp: Fp3,
      Fn: Fn5,
      allowInfinityPoint: c7.allowInfinityPoint,
      endo: c7.endo,
      isTorsionFree: c7.isTorsionFree,
      clearCofactor: c7.clearCofactor,
      fromBytes: c7.fromBytes,
      toBytes: c7.toBytes
    };
    return { CURVE, curveOpts };
  }
  function _ecdsa_legacy_opts_to_new(c7) {
    const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new(c7);
    const ecdsaOpts = {
      hmac: c7.hmac,
      randomBytes: c7.randomBytes,
      lowS: c7.lowS,
      bits2int: c7.bits2int,
      bits2int_modN: c7.bits2int_modN
    };
    return { CURVE, curveOpts, hash: c7.hash, ecdsaOpts };
  }
  function _ecdsa_new_output_to_legacy(c7, _ecdsa) {
    const Point5 = _ecdsa.Point;
    return Object.assign({}, _ecdsa, {
      ProjectivePoint: Point5,
      CURVE: Object.assign({}, c7, nLength2(Point5.Fn.ORDER, Point5.Fn.BITS))
    });
  }
  function weierstrass2(c7) {
    const { CURVE, curveOpts, hash: hash5, ecdsaOpts } = _ecdsa_legacy_opts_to_new(c7);
    const Point5 = weierstrassN(CURVE, curveOpts);
    const signs = ecdsa(Point5, hash5, ecdsaOpts);
    return _ecdsa_new_output_to_legacy(c7, signs);
  }

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js
  function createCurve2(curveDef, defHash) {
    const create4 = (hash5) => weierstrass2({ ...curveDef, hash: hash5 });
    return { ...create4(defHash), create: create4 };
  }

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js
  var secp256k1_CURVE = {
    p: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),
    n: BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),
    h: BigInt(1),
    a: BigInt(0),
    b: BigInt(7),
    Gx: BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),
    Gy: BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")
  };
  var secp256k1_ENDO = {
    beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),
    basises: [
      [BigInt("0x3086d221a7d46bcde86c90e49284eb15"), -BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],
      [BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), BigInt("0x3086d221a7d46bcde86c90e49284eb15")]
    ]
  };
  var _2n7 = /* @__PURE__ */ BigInt(2);
  function sqrtMod2(y11) {
    const P8 = secp256k1_CURVE.p;
    const _3n7 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);
    const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);
    const b22 = y11 * y11 * y11 % P8;
    const b32 = b22 * b22 * y11 % P8;
    const b62 = pow22(b32, _3n7, P8) * b32 % P8;
    const b9 = pow22(b62, _3n7, P8) * b32 % P8;
    const b11 = pow22(b9, _2n7, P8) * b22 % P8;
    const b222 = pow22(b11, _11n, P8) * b11 % P8;
    const b44 = pow22(b222, _22n, P8) * b222 % P8;
    const b88 = pow22(b44, _44n, P8) * b44 % P8;
    const b176 = pow22(b88, _88n, P8) * b88 % P8;
    const b220 = pow22(b176, _44n, P8) * b44 % P8;
    const b223 = pow22(b220, _3n7, P8) * b32 % P8;
    const t1 = pow22(b223, _23n, P8) * b222 % P8;
    const t2 = pow22(t1, _6n, P8) * b22 % P8;
    const root = pow22(t2, _2n7, P8);
    if (!Fpk12.eql(Fpk12.sqr(root), y11))
      throw new Error("Cannot find square root");
    return root;
  }
  var Fpk12 = Field2(secp256k1_CURVE.p, { sqrt: sqrtMod2 });
  var secp256k12 = createCurve2({ ...secp256k1_CURVE, Fp: Fpk12, lowS: true, endo: secp256k1_ENDO }, sha256);

  // ../../node_modules/.pnpm/@scure+bip32@1.7.0/node_modules/@scure/bip32/lib/esm/index.js
  init_hmac();
  init_sha2();
  init_utils2();

  // ../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/esm/index.js
  init_node_compat_inject();
  function isBytes3(a5) {
    return a5 instanceof Uint8Array || ArrayBuffer.isView(a5) && a5.constructor.name === "Uint8Array";
  }
  function isArrayOf(isString, arr) {
    if (!Array.isArray(arr))
      return false;
    if (arr.length === 0)
      return true;
    if (isString) {
      return arr.every((item) => typeof item === "string");
    } else {
      return arr.every((item) => Number.isSafeInteger(item));
    }
  }
  function afn(input) {
    if (typeof input !== "function")
      throw new Error("function expected");
    return true;
  }
  function astr(label, input) {
    if (typeof input !== "string")
      throw new Error(`${label}: string expected`);
    return true;
  }
  function anumber2(n6) {
    if (!Number.isSafeInteger(n6))
      throw new Error(`invalid integer: ${n6}`);
  }
  function aArr(input) {
    if (!Array.isArray(input))
      throw new Error("array expected");
  }
  function astrArr(label, input) {
    if (!isArrayOf(true, input))
      throw new Error(`${label}: array of strings expected`);
  }
  function anumArr(label, input) {
    if (!isArrayOf(false, input))
      throw new Error(`${label}: array of numbers expected`);
  }
  // @__NO_SIDE_EFFECTS__
  function chain(...args) {
    const id = (a5) => a5;
    const wrap3 = (a5, b9) => (c7) => a5(b9(c7));
    const encode11 = args.map((x13) => x13.encode).reduceRight(wrap3, id);
    const decode9 = args.map((x13) => x13.decode).reduce(wrap3, id);
    return { encode: encode11, decode: decode9 };
  }
  // @__NO_SIDE_EFFECTS__
  function alphabet(letters) {
    const lettersA = typeof letters === "string" ? letters.split("") : letters;
    const len = lettersA.length;
    astrArr("alphabet", lettersA);
    const indexes = new Map(lettersA.map((l6, i5) => [l6, i5]));
    return {
      encode: (digits) => {
        aArr(digits);
        return digits.map((i5) => {
          if (!Number.isSafeInteger(i5) || i5 < 0 || i5 >= len)
            throw new Error(`alphabet.encode: digit index outside alphabet "${i5}". Allowed: ${letters}`);
          return lettersA[i5];
        });
      },
      decode: (input) => {
        aArr(input);
        return input.map((letter) => {
          astr("alphabet.decode", letter);
          const i5 = indexes.get(letter);
          if (i5 === void 0)
            throw new Error(`Unknown letter: "${letter}". Allowed: ${letters}`);
          return i5;
        });
      }
    };
  }
  // @__NO_SIDE_EFFECTS__
  function join(separator = "") {
    astr("join", separator);
    return {
      encode: (from16) => {
        astrArr("join.decode", from16);
        return from16.join(separator);
      },
      decode: (to3) => {
        astr("join.decode", to3);
        return to3.split(separator);
      }
    };
  }
  function convertRadix(data, from16, to3) {
    if (from16 < 2)
      throw new Error(`convertRadix: invalid from=${from16}, base cannot be less than 2`);
    if (to3 < 2)
      throw new Error(`convertRadix: invalid to=${to3}, base cannot be less than 2`);
    aArr(data);
    if (!data.length)
      return [];
    let pos = 0;
    const res = [];
    const digits = Array.from(data, (d6) => {
      anumber2(d6);
      if (d6 < 0 || d6 >= from16)
        throw new Error(`invalid integer: ${d6}`);
      return d6;
    });
    const dlen = digits.length;
    while (true) {
      let carry = 0;
      let done = true;
      for (let i5 = pos; i5 < dlen; i5++) {
        const digit = digits[i5];
        const fromCarry = from16 * carry;
        const digitBase = fromCarry + digit;
        if (!Number.isSafeInteger(digitBase) || fromCarry / from16 !== carry || digitBase - digit !== fromCarry) {
          throw new Error("convertRadix: carry overflow");
        }
        const div = digitBase / to3;
        carry = digitBase % to3;
        const rounded = Math.floor(div);
        digits[i5] = rounded;
        if (!Number.isSafeInteger(rounded) || rounded * to3 + carry !== digitBase)
          throw new Error("convertRadix: carry overflow");
        if (!done)
          continue;
        else if (!rounded)
          pos = i5;
        else
          done = false;
      }
      res.push(carry);
      if (done)
        break;
    }
    for (let i5 = 0; i5 < data.length - 1 && data[i5] === 0; i5++)
      res.push(0);
    return res.reverse();
  }
  // @__NO_SIDE_EFFECTS__
  function radix(num2) {
    anumber2(num2);
    const _256 = 2 ** 8;
    return {
      encode: (bytes) => {
        if (!isBytes3(bytes))
          throw new Error("radix.encode input should be Uint8Array");
        return convertRadix(Array.from(bytes), _256, num2);
      },
      decode: (digits) => {
        anumArr("radix.decode", digits);
        return Uint8Array.from(convertRadix(digits, num2, _256));
      }
    };
  }
  function checksum3(len, fn) {
    anumber2(len);
    afn(fn);
    return {
      encode(data) {
        if (!isBytes3(data))
          throw new Error("checksum.encode: input should be Uint8Array");
        const sum = fn(data).slice(0, len);
        const res = new Uint8Array(data.length + len);
        res.set(data);
        res.set(sum, data.length);
        return res;
      },
      decode(data) {
        if (!isBytes3(data))
          throw new Error("checksum.decode: input should be Uint8Array");
        const payload = data.slice(0, -len);
        const oldChecksum = data.slice(-len);
        const newChecksum = fn(payload).slice(0, len);
        for (let i5 = 0; i5 < len; i5++)
          if (newChecksum[i5] !== oldChecksum[i5])
            throw new Error("Invalid checksum");
        return payload;
      }
    };
  }
  var genBase58 = /* @__NO_SIDE_EFFECTS__ */ (abc) => /* @__PURE__ */ chain(/* @__PURE__ */ radix(58), /* @__PURE__ */ alphabet(abc), /* @__PURE__ */ join(""));
  var base58 = /* @__PURE__ */ genBase58("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");
  var createBase58check = (sha2565) => /* @__PURE__ */ chain(checksum3(4, (data) => sha2565(sha2565(data))), base58);

  // ../../node_modules/.pnpm/@scure+bip32@1.7.0/node_modules/@scure/bip32/lib/esm/index.js
  var Point2 = secp256k12.ProjectivePoint;
  var base58check = createBase58check(sha256);
  function bytesToNumber2(bytes) {
    abytes(bytes);
    const h8 = bytes.length === 0 ? "0" : bytesToHex2(bytes);
    return BigInt("0x" + h8);
  }
  function numberToBytes2(num2) {
    if (typeof num2 !== "bigint")
      throw new Error("bigint expected");
    return hexToBytes2(num2.toString(16).padStart(64, "0"));
  }
  var MASTER_SECRET = utf8ToBytes("Bitcoin seed");
  var BITCOIN_VERSIONS = { private: 76066276, public: 76067358 };
  var HARDENED_OFFSET = 2147483648;
  var hash160 = (data) => ripemd160(sha256(data));
  var fromU32 = (data) => createView(data).getUint32(0, false);
  var toU32 = (n6) => {
    if (!Number.isSafeInteger(n6) || n6 < 0 || n6 > 2 ** 32 - 1) {
      throw new Error("invalid number, should be from 0 to 2**32-1, got " + n6);
    }
    const buf = new Uint8Array(4);
    createView(buf).setUint32(0, n6, false);
    return buf;
  };
  var HDKey = class _HDKey {
    get fingerprint() {
      if (!this.pubHash) {
        throw new Error("No publicKey set!");
      }
      return fromU32(this.pubHash);
    }
    get identifier() {
      return this.pubHash;
    }
    get pubKeyHash() {
      return this.pubHash;
    }
    get privateKey() {
      return this.privKeyBytes || null;
    }
    get publicKey() {
      return this.pubKey || null;
    }
    get privateExtendedKey() {
      const priv = this.privateKey;
      if (!priv) {
        throw new Error("No private key");
      }
      return base58check.encode(this.serialize(this.versions.private, concatBytes(new Uint8Array([0]), priv)));
    }
    get publicExtendedKey() {
      if (!this.pubKey) {
        throw new Error("No public key");
      }
      return base58check.encode(this.serialize(this.versions.public, this.pubKey));
    }
    static fromMasterSeed(seed, versions = BITCOIN_VERSIONS) {
      abytes(seed);
      if (8 * seed.length < 128 || 8 * seed.length > 512) {
        throw new Error("HDKey: seed length must be between 128 and 512 bits; 256 bits is advised, got " + seed.length);
      }
      const I7 = hmac(sha512, MASTER_SECRET, seed);
      return new _HDKey({
        versions,
        chainCode: I7.slice(32),
        privateKey: I7.slice(0, 32)
      });
    }
    static fromExtendedKey(base58key, versions = BITCOIN_VERSIONS) {
      const keyBuffer = base58check.decode(base58key);
      const keyView = createView(keyBuffer);
      const version16 = keyView.getUint32(0, false);
      const opt = {
        versions,
        depth: keyBuffer[4],
        parentFingerprint: keyView.getUint32(5, false),
        index: keyView.getUint32(9, false),
        chainCode: keyBuffer.slice(13, 45)
      };
      const key2 = keyBuffer.slice(45);
      const isPriv = key2[0] === 0;
      if (version16 !== versions[isPriv ? "private" : "public"]) {
        throw new Error("Version mismatch");
      }
      if (isPriv) {
        return new _HDKey({ ...opt, privateKey: key2.slice(1) });
      } else {
        return new _HDKey({ ...opt, publicKey: key2 });
      }
    }
    static fromJSON(json2) {
      return _HDKey.fromExtendedKey(json2.xpriv);
    }
    constructor(opt) {
      this.depth = 0;
      this.index = 0;
      this.chainCode = null;
      this.parentFingerprint = 0;
      if (!opt || typeof opt !== "object") {
        throw new Error("HDKey.constructor must not be called directly");
      }
      this.versions = opt.versions || BITCOIN_VERSIONS;
      this.depth = opt.depth || 0;
      this.chainCode = opt.chainCode || null;
      this.index = opt.index || 0;
      this.parentFingerprint = opt.parentFingerprint || 0;
      if (!this.depth) {
        if (this.parentFingerprint || this.index) {
          throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");
        }
      }
      if (opt.publicKey && opt.privateKey) {
        throw new Error("HDKey: publicKey and privateKey at same time.");
      }
      if (opt.privateKey) {
        if (!secp256k12.utils.isValidPrivateKey(opt.privateKey)) {
          throw new Error("Invalid private key");
        }
        this.privKey = typeof opt.privateKey === "bigint" ? opt.privateKey : bytesToNumber2(opt.privateKey);
        this.privKeyBytes = numberToBytes2(this.privKey);
        this.pubKey = secp256k12.getPublicKey(opt.privateKey, true);
      } else if (opt.publicKey) {
        this.pubKey = Point2.fromHex(opt.publicKey).toRawBytes(true);
      } else {
        throw new Error("HDKey: no public or private key provided");
      }
      this.pubHash = hash160(this.pubKey);
    }
    derive(path) {
      if (!/^[mM]'?/.test(path)) {
        throw new Error('Path must start with "m" or "M"');
      }
      if (/^[mM]'?$/.test(path)) {
        return this;
      }
      const parts = path.replace(/^[mM]'?\//, "").split("/");
      let child = this;
      for (const c7 of parts) {
        const m3 = /^(\d+)('?)$/.exec(c7);
        const m1 = m3 && m3[1];
        if (!m3 || m3.length !== 3 || typeof m1 !== "string")
          throw new Error("invalid child index: " + c7);
        let idx = +m1;
        if (!Number.isSafeInteger(idx) || idx >= HARDENED_OFFSET) {
          throw new Error("Invalid index");
        }
        if (m3[2] === "'") {
          idx += HARDENED_OFFSET;
        }
        child = child.deriveChild(idx);
      }
      return child;
    }
    deriveChild(index2) {
      if (!this.pubKey || !this.chainCode) {
        throw new Error("No publicKey or chainCode set");
      }
      let data = toU32(index2);
      if (index2 >= HARDENED_OFFSET) {
        const priv = this.privateKey;
        if (!priv) {
          throw new Error("Could not derive hardened child key");
        }
        data = concatBytes(new Uint8Array([0]), priv, data);
      } else {
        data = concatBytes(this.pubKey, data);
      }
      const I7 = hmac(sha512, this.chainCode, data);
      const childTweak = bytesToNumber2(I7.slice(0, 32));
      const chainCode = I7.slice(32);
      if (!secp256k12.utils.isValidPrivateKey(childTweak)) {
        throw new Error("Tweak bigger than curve order");
      }
      const opt = {
        versions: this.versions,
        chainCode,
        depth: this.depth + 1,
        parentFingerprint: this.fingerprint,
        index: index2
      };
      try {
        if (this.privateKey) {
          const added = mod2(this.privKey + childTweak, secp256k12.CURVE.n);
          if (!secp256k12.utils.isValidPrivateKey(added)) {
            throw new Error("The tweak was out of range or the resulted private key is invalid");
          }
          opt.privateKey = added;
        } else {
          const added = Point2.fromHex(this.pubKey).add(Point2.fromPrivateKey(childTweak));
          if (added.equals(Point2.ZERO)) {
            throw new Error("The tweak was equal to negative P, which made the result key invalid");
          }
          opt.publicKey = added.toRawBytes(true);
        }
        return new _HDKey(opt);
      } catch (err2) {
        return this.deriveChild(index2 + 1);
      }
    }
    sign(hash5) {
      if (!this.privateKey) {
        throw new Error("No privateKey set!");
      }
      abytes(hash5, 32);
      return secp256k12.sign(hash5, this.privKey).toCompactRawBytes();
    }
    verify(hash5, signature2) {
      abytes(hash5, 32);
      abytes(signature2, 64);
      if (!this.publicKey) {
        throw new Error("No publicKey set!");
      }
      let sig;
      try {
        sig = secp256k12.Signature.fromCompact(signature2);
      } catch (error51) {
        return false;
      }
      return secp256k12.verify(sig, hash5, this.publicKey);
    }
    wipePrivateData() {
      this.privKey = void 0;
      if (this.privKeyBytes) {
        this.privKeyBytes.fill(0);
        this.privKeyBytes = void 0;
      }
      return this;
    }
    toJSON() {
      return {
        xpriv: this.privateExtendedKey,
        xpub: this.publicExtendedKey
      };
    }
    serialize(version16, key2) {
      if (!this.chainCode) {
        throw new Error("No chainCode set");
      }
      abytes(key2, 33);
      return concatBytes(toU32(version16), new Uint8Array([this.depth]), toU32(this.parentFingerprint), toU32(this.index), this.chainCode, key2);
    }
  };

  // ../../node_modules/.pnpm/@scure+bip39@1.6.0/node_modules/@scure/bip39/esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/pbkdf2.js
  init_node_compat_inject();
  init_hmac();
  init_utils2();
  function pbkdf2Init(hash5, _password, _salt, _opts) {
    ahash(hash5);
    const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);
    const { c: c7, dkLen, asyncTick } = opts;
    anumber(c7);
    anumber(dkLen);
    anumber(asyncTick);
    if (c7 < 1)
      throw new Error("iterations (c) should be >= 1");
    const password = kdfInputToBytes(_password);
    const salt = kdfInputToBytes(_salt);
    const DK = new Uint8Array(dkLen);
    const PRF = hmac.create(hash5, password);
    const PRFSalt = PRF._cloneInto().update(salt);
    return { c: c7, dkLen, asyncTick, DK, PRF, PRFSalt };
  }
  function pbkdf2Output(PRF, PRFSalt, DK, prfW, u4) {
    PRF.destroy();
    PRFSalt.destroy();
    if (prfW)
      prfW.destroy();
    clean(u4);
    return DK;
  }
  function pbkdf2(hash5, password, salt, opts) {
    const { c: c7, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash5, password, salt, opts);
    let prfW;
    const arr = new Uint8Array(4);
    const view = createView(arr);
    const u4 = new Uint8Array(PRF.outputLen);
    for (let ti2 = 1, pos = 0; pos < dkLen; ti2++, pos += PRF.outputLen) {
      const Ti = DK.subarray(pos, pos + PRF.outputLen);
      view.setInt32(0, ti2, false);
      (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u4);
      Ti.set(u4.subarray(0, Ti.length));
      for (let ui2 = 1; ui2 < c7; ui2++) {
        PRF._cloneInto(prfW).update(u4).digestInto(u4);
        for (let i5 = 0; i5 < Ti.length; i5++)
          Ti[i5] ^= u4[i5];
      }
    }
    return pbkdf2Output(PRF, PRFSalt, DK, prfW, u4);
  }

  // ../../node_modules/.pnpm/@scure+bip39@1.6.0/node_modules/@scure/bip39/esm/index.js
  init_sha2();
  function nfkd(str) {
    if (typeof str !== "string")
      throw new TypeError("invalid mnemonic type: " + typeof str);
    return str.normalize("NFKD");
  }
  function normalize(str) {
    const norm = nfkd(str);
    const words = norm.split(" ");
    if (![12, 15, 18, 21, 24].includes(words.length))
      throw new Error("Invalid mnemonic");
    return { nfkd: norm, words };
  }
  var psalt = (passphrase) => nfkd("mnemonic" + passphrase);
  function mnemonicToSeedSync(mnemonic, passphrase = "") {
    return pbkdf2(sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/hdKeyToAccount.js
  init_node_compat_inject();
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/privateKeyToAccount.js
  init_node_compat_inject();
  init_secp256k1();
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/toAccount.js
  init_node_compat_inject();
  init_address();
  init_isAddress();
  function toAccount(source) {
    if (typeof source === "string") {
      if (!isAddress(source, { strict: false }))
        throw new InvalidAddressError({ address: source });
      return {
        address: source,
        type: "json-rpc"
      };
    }
    if (!isAddress(source.address, { strict: false }))
      throw new InvalidAddressError({ address: source.address });
    return {
      address: source.address,
      nonceManager: source.nonceManager,
      sign: source.sign,
      signAuthorization: source.signAuthorization,
      signMessage: source.signMessage,
      signTransaction: source.signTransaction,
      signTypedData: source.signTypedData,
      source: "custom",
      type: "local"
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/utils/sign.js
  init_node_compat_inject();
  init_secp256k1();
  init_isHex();
  init_toBytes();
  init_toHex();
  var extraEntropy = false;
  async function sign({ hash: hash5, privateKey, to: to3 = "object" }) {
    const { r: r3, s: s3, recovery } = secp256k1.sign(hash5.slice(2), privateKey.slice(2), {
      lowS: true,
      extraEntropy: isHex(extraEntropy, { strict: false }) ? hexToBytes(extraEntropy) : extraEntropy
    });
    const signature2 = {
      r: numberToHex(r3, { size: 32 }),
      s: numberToHex(s3, { size: 32 }),
      v: recovery ? 28n : 27n,
      yParity: recovery
    };
    return (() => {
      if (to3 === "bytes" || to3 === "hex")
        return serializeSignature({ ...signature2, to: to3 });
      return signature2;
    })();
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/utils/signAuthorization.js
  init_node_compat_inject();
  async function signAuthorization2(parameters) {
    const { chainId, nonce, privateKey, to: to3 = "object" } = parameters;
    const address = parameters.contractAddress ?? parameters.address;
    const signature2 = await sign({
      hash: hashAuthorization({ address, chainId, nonce }),
      privateKey,
      to: to3
    });
    if (to3 === "object")
      return {
        address,
        chainId,
        nonce,
        ...signature2
      };
    return signature2;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/utils/signMessage.js
  init_node_compat_inject();
  async function signMessage2({ message, privateKey }) {
    return await sign({ hash: hashMessage(message), privateKey, to: "hex" });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/utils/signTransaction.js
  init_node_compat_inject();
  init_keccak256();
  async function signTransaction2(parameters) {
    const { privateKey, transaction, serializer = serializeTransaction } = parameters;
    const signableTransaction = (() => {
      if (transaction.type === "eip4844")
        return {
          ...transaction,
          sidecars: false
        };
      return transaction;
    })();
    const signature2 = await sign({
      hash: keccak256(await serializer(signableTransaction)),
      privateKey
    });
    return await serializer(transaction, signature2);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/utils/signTypedData.js
  init_node_compat_inject();
  async function signTypedData2(parameters) {
    const { privateKey, ...typedData } = parameters;
    return await sign({
      hash: hashTypedData(typedData),
      privateKey,
      to: "hex"
    });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/privateKeyToAccount.js
  function privateKeyToAccount(privateKey, options = {}) {
    const { nonceManager } = options;
    const publicKey3 = toHex(secp256k1.getPublicKey(privateKey.slice(2), false));
    const address = publicKeyToAddress(publicKey3);
    const account = toAccount({
      address,
      nonceManager,
      async sign({ hash: hash5 }) {
        return sign({ hash: hash5, privateKey, to: "hex" });
      },
      async signAuthorization(authorization) {
        return signAuthorization2({ ...authorization, privateKey });
      },
      async signMessage({ message }) {
        return signMessage2({ message, privateKey });
      },
      async signTransaction(transaction, { serializer } = {}) {
        return signTransaction2({ privateKey, transaction, serializer });
      },
      async signTypedData(typedData) {
        return signTypedData2({ ...typedData, privateKey });
      }
    });
    return {
      ...account,
      publicKey: publicKey3,
      source: "privateKey"
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/hdKeyToAccount.js
  function hdKeyToAccount(hdKey_, { accountIndex = 0, addressIndex = 0, changeIndex = 0, path, ...options } = {}) {
    const hdKey = hdKey_.derive(path || `m/44'/60'/${accountIndex}'/${changeIndex}/${addressIndex}`);
    const account = privateKeyToAccount(toHex(hdKey.privateKey), options);
    return {
      ...account,
      getHdKey: () => hdKey,
      source: "hd"
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/accounts/mnemonicToAccount.js
  init_node_compat_inject();
  function mnemonicToAccount(mnemonic, { passphrase, ...hdKeyOpts } = {}) {
    const seed = mnemonicToSeedSync(mnemonic, passphrase);
    return hdKeyToAccount(HDKey.fromMasterSeed(seed), hdKeyOpts);
  }

  // ../../packages/wallet-core/src/mnemonic.ts
  function generateWalletMnemonic() {
    return (0, import_bip392.generateMnemonic)();
  }
  function normalizeWalletMnemonic(value) {
    return value.normalize("NFKD").trim().toLowerCase().replace(/\b\d{1,2}[.)]\s*/gu, " ").replace(/[^a-z\s]+/gu, " ").replace(/\s+/gu, " ").trim();
  }
  function getWalletMnemonicValidation(value) {
    const normalized = normalizeWalletMnemonic(value);
    const words = normalized ? normalized.split(" ") : [];
    const validWordCount = [12, 18, 24].includes(words.length);
    const englishWords = new Set(import_bip392.wordlists.english);
    const allWordsKnown = words.length > 0 && words.every((word) => englishWords.has(word));
    const checksumValid = (0, import_bip392.validateMnemonic)(normalized);
    return {
      normalized,
      words,
      validWordCount,
      allWordsKnown,
      checksumValid,
      importable: validWordCount && allWordsKnown
    };
  }
  function isImportableWalletMnemonic(value) {
    return getWalletMnemonicValidation(value).importable;
  }
  function deriveEvmAccountFromMnemonic(mnemonic) {
    return mnemonicToAccount(normalizeWalletMnemonic(mnemonic));
  }
  function getEvmAddressFromMnemonic(mnemonic) {
    return deriveEvmAccountFromMnemonic(mnemonic).address;
  }
  function getTronAddressFromMnemonic(mnemonic) {
    const account = deriveEvmAccountFromMnemonic(mnemonic);
    const publicKey3 = account.publicKey.startsWith("0x04") ? account.publicKey.slice(4) : account.publicKey.replace(/^0x/u, "");
    const hash5 = keccak256(`0x${publicKey3}`);
    const addressHex = `41${hash5.slice(-40)}`;
    const checksum4 = sha2563(sha2563(`0x${addressHex}`)).slice(2, 10);
    return encodeBase58(`0x${addressHex}${checksum4}`);
  }
  function encodeBase58(hex3) {
    const alphabet3 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
    const bytes = hexToBytes4(hex3);
    let value = BigInt(hex3);
    let output = "";
    while (value > 0n) {
      const remainder = Number(value % 58n);
      output = alphabet3[remainder] + output;
      value /= 58n;
    }
    for (const byte of bytes) {
      if (byte !== 0) {
        break;
      }
      output = alphabet3[0] + output;
    }
    return output || alphabet3[0];
  }
  function hexToBytes4(hex3) {
    const clean4 = hex3.slice(2);
    const bytes = [];
    for (let index2 = 0; index2 < clean4.length; index2 += 2) {
      bytes.push(Number.parseInt(clean4.slice(index2, index2 + 2), 16));
    }
    return bytes;
  }

  // ../../packages/wallet-core/src/evm/balance.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/evm/client.ts
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/chainConfig.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/formatters.js
  init_node_compat_inject();
  init_fromHex();
  init_toBytes();
  init_toHex();
  init_transactionRequest();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/constants/number.js
  init_node_compat_inject();
  init_number();
  var gasPerPubdataDefault = 50000n;
  var maxBytecodeSize = maxUint16 * 32n;

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/formatters.js
  var formatters = {
    block: /* @__PURE__ */ defineBlock({
      format(args) {
        const transactions = args.transactions?.map((transaction) => {
          if (typeof transaction === "string")
            return transaction;
          const formatted = formatters.transaction?.format(transaction);
          if (formatted.typeHex === "0x71")
            formatted.type = "eip712";
          else if (formatted.typeHex === "0xff")
            formatted.type = "priority";
          return formatted;
        });
        return {
          l1BatchNumber: args.l1BatchNumber ? hexToBigInt(args.l1BatchNumber) : null,
          l1BatchTimestamp: args.l1BatchTimestamp ? hexToBigInt(args.l1BatchTimestamp) : null,
          transactions
        };
      }
    }),
    transaction: /* @__PURE__ */ defineTransaction({
      format(args) {
        const transaction = {};
        if (args.type === "0x71")
          transaction.type = "eip712";
        else if (args.type === "0xff")
          transaction.type = "priority";
        return {
          ...transaction,
          l1BatchNumber: args.l1BatchNumber ? hexToBigInt(args.l1BatchNumber) : null,
          l1BatchTxIndex: args.l1BatchTxIndex ? hexToBigInt(args.l1BatchTxIndex) : null
        };
      }
    }),
    transactionReceipt: /* @__PURE__ */ defineTransactionReceipt({
      format(args) {
        return {
          l1BatchNumber: args.l1BatchNumber ? hexToBigInt(args.l1BatchNumber) : null,
          l1BatchTxIndex: args.l1BatchTxIndex ? hexToBigInt(args.l1BatchTxIndex) : null,
          logs: args.logs.map((log) => {
            return {
              ...formatLog(log),
              l1BatchNumber: log.l1BatchNumber ? hexToBigInt(log.l1BatchNumber) : null,
              transactionLogIndex: hexToNumber(log.transactionLogIndex),
              logType: log.logType
            };
          }),
          l2ToL1Logs: args.l2ToL1Logs.map((l2ToL1Log) => {
            return {
              blockNumber: hexToBigInt(l2ToL1Log.blockHash),
              blockHash: l2ToL1Log.blockHash,
              l1BatchNumber: l2ToL1Log.l1BatchNumber ? hexToBigInt(l2ToL1Log.l1BatchNumber) : null,
              transactionIndex: hexToBigInt(l2ToL1Log.transactionIndex),
              shardId: hexToBigInt(l2ToL1Log.shardId),
              isService: l2ToL1Log.isService,
              sender: l2ToL1Log.sender,
              key: l2ToL1Log.key,
              value: l2ToL1Log.value,
              transactionHash: l2ToL1Log.transactionHash,
              logIndex: hexToBigInt(l2ToL1Log.logIndex)
            };
          })
        };
      }
    }),
    transactionRequest: /* @__PURE__ */ defineTransactionRequest({
      exclude: [
        "customSignature",
        "factoryDeps",
        "gasPerPubdata",
        "paymaster",
        "paymasterInput"
      ],
      format(args) {
        if (args.gasPerPubdata || args.paymaster && args.paymasterInput || args.factoryDeps || args.customSignature)
          return {
            eip712Meta: {
              ...args.gasPerPubdata ? { gasPerPubdata: toHex(args.gasPerPubdata) } : { gasPerPubdata: toHex(gasPerPubdataDefault) },
              ...args.paymaster && args.paymasterInput ? {
                paymasterParams: {
                  paymaster: args.paymaster,
                  paymasterInput: Array.from(hexToBytes(args.paymasterInput))
                }
              } : {},
              ...args.factoryDeps ? {
                factoryDeps: args.factoryDeps.map((dep) => Array.from(hexToBytes(dep)))
              } : {},
              ...args.customSignature ? {
                customSignature: Array.from(hexToBytes(args.customSignature))
              } : {}
            },
            type: "0x71"
          };
        return {};
      }
    })
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/serializers.js
  init_node_compat_inject();
  init_concat();
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/utils/assertEip712Transaction.js
  init_node_compat_inject();
  init_address();
  init_base();
  init_chain();
  init_isAddress();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/errors/transaction.js
  init_node_compat_inject();
  init_base();
  var InvalidEip712TransactionError = class extends BaseError2 {
    constructor() {
      super([
        "Transaction is not an EIP712 transaction.",
        "",
        "Transaction must:",
        '  - include `type: "eip712"`',
        "  - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"
      ].join("\n"), { name: "InvalidEip712TransactionError" });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/utils/isEip712Transaction.js
  init_node_compat_inject();
  function isEIP712Transaction(transaction) {
    if (transaction.type === "eip712")
      return true;
    if ("customSignature" in transaction && transaction.customSignature || "paymaster" in transaction && transaction.paymaster || "paymasterInput" in transaction && transaction.paymasterInput || "gasPerPubdata" in transaction && typeof transaction.gasPerPubdata === "bigint" || "factoryDeps" in transaction && transaction.factoryDeps)
      return true;
    return false;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/utils/assertEip712Transaction.js
  function assertEip712Transaction(transaction) {
    const { chainId, to: to3, from: from16, paymaster, paymasterInput } = transaction;
    if (!isEIP712Transaction(transaction))
      throw new InvalidEip712TransactionError();
    if (!chainId || chainId <= 0)
      throw new InvalidChainIdError({ chainId });
    if (to3 && !isAddress(to3))
      throw new InvalidAddressError({ address: to3 });
    if (from16 && !isAddress(from16))
      throw new InvalidAddressError({ address: from16 });
    if (paymaster && !isAddress(paymaster))
      throw new InvalidAddressError({ address: paymaster });
    if (paymaster && !paymasterInput) {
      throw new BaseError2("`paymasterInput` must be provided when `paymaster` is defined");
    }
    if (!paymaster && paymasterInput) {
      throw new BaseError2("`paymaster` must be provided when `paymasterInput` is defined");
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/serializers.js
  function serializeTransaction2(transaction, signature2) {
    if (isEIP712Transaction(transaction))
      return serializeTransactionEIP712(transaction);
    return serializeTransaction(transaction, signature2);
  }
  var serializers = {
    transaction: serializeTransaction2
  };
  function serializeTransactionEIP712(transaction) {
    const { chainId, gas, nonce, to: to3, from: from16, value, maxFeePerGas, maxPriorityFeePerGas, customSignature, factoryDeps, paymaster, paymasterInput, gasPerPubdata, data } = transaction;
    assertEip712Transaction(transaction);
    const serializedTransaction = [
      nonce ? toHex(nonce) : "0x",
      maxPriorityFeePerGas ? toHex(maxPriorityFeePerGas) : "0x",
      maxFeePerGas ? toHex(maxFeePerGas) : "0x",
      gas ? toHex(gas) : "0x",
      to3 ?? "0x",
      value ? toHex(value) : "0x",
      data ?? "0x",
      toHex(chainId),
      toHex(""),
      toHex(""),
      toHex(chainId),
      from16 ?? "0x",
      gasPerPubdata ? toHex(gasPerPubdata) : toHex(gasPerPubdataDefault),
      factoryDeps ?? [],
      customSignature ?? "0x",
      // EIP712 signature
      paymaster && paymasterInput ? [paymaster, paymasterInput] : []
    ];
    return concatHex([
      "0x71",
      toRlp(serializedTransaction)
    ]);
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/utils/getEip712Domain.js
  init_node_compat_inject();
  init_toHex();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/utils/hashBytecode.js
  init_node_compat_inject();
  init_pad();
  init_toBytes();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/errors/bytecode.js
  init_node_compat_inject();
  init_base();
  var BytecodeLengthExceedsMaxSizeError = class extends BaseError2 {
    constructor({ givenLength, maxBytecodeSize: maxBytecodeSize2 }) {
      super(`Bytecode cannot be longer than ${maxBytecodeSize2} bytes. Given length: ${givenLength}`, { name: "BytecodeLengthExceedsMaxSizeError" });
    }
  };
  var BytecodeLengthInWordsMustBeOddError = class extends BaseError2 {
    constructor({ givenLengthInWords }) {
      super(`Bytecode length in 32-byte words must be odd. Given length in words: ${givenLengthInWords}`, { name: "BytecodeLengthInWordsMustBeOddError" });
    }
  };
  var BytecodeLengthMustBeDivisibleBy32Error = class extends BaseError2 {
    constructor({ givenLength }) {
      super(`The bytecode length in bytes must be divisible by 32. Given length: ${givenLength}`, { name: "BytecodeLengthMustBeDivisibleBy32Error" });
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/utils/hashBytecode.js
  function hashBytecode(bytecode) {
    const bytecodeBytes = toBytes(bytecode);
    if (bytecodeBytes.length % 32 !== 0)
      throw new BytecodeLengthMustBeDivisibleBy32Error({
        givenLength: bytecodeBytes.length
      });
    if (bytecodeBytes.length > maxBytecodeSize)
      throw new BytecodeLengthExceedsMaxSizeError({
        givenLength: bytecodeBytes.length,
        maxBytecodeSize
      });
    const hashStr = sha2563(bytecodeBytes);
    const hash5 = toBytes(hashStr);
    const bytecodeLengthInWords = bytecodeBytes.length / 32;
    if (bytecodeLengthInWords % 2 === 0) {
      throw new BytecodeLengthInWordsMustBeOddError({
        givenLengthInWords: bytecodeLengthInWords
      });
    }
    const bytecodeLength = toBytes(bytecodeLengthInWords);
    const bytecodeLengthPadded = pad(bytecodeLength, { size: 2 });
    const codeHashVersion = new Uint8Array([1, 0]);
    hash5.set(codeHashVersion, 0);
    hash5.set(bytecodeLengthPadded, 2);
    return hash5;
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/utils/getEip712Domain.js
  var getEip712Domain2 = (transaction) => {
    assertEip712Transaction(transaction);
    const message = transactionToMessage(transaction);
    return {
      domain: {
        name: "zkSync",
        version: "2",
        chainId: transaction.chainId
      },
      types: {
        Transaction: [
          { name: "txType", type: "uint256" },
          { name: "from", type: "uint256" },
          { name: "to", type: "uint256" },
          { name: "gasLimit", type: "uint256" },
          { name: "gasPerPubdataByteLimit", type: "uint256" },
          { name: "maxFeePerGas", type: "uint256" },
          { name: "maxPriorityFeePerGas", type: "uint256" },
          { name: "paymaster", type: "uint256" },
          { name: "nonce", type: "uint256" },
          { name: "value", type: "uint256" },
          { name: "data", type: "bytes" },
          { name: "factoryDeps", type: "bytes32[]" },
          { name: "paymasterInput", type: "bytes" }
        ]
      },
      primaryType: "Transaction",
      message
    };
  };
  function transactionToMessage(transaction) {
    const { gas, nonce, to: to3, from: from16, value, maxFeePerGas, maxPriorityFeePerGas, factoryDeps, paymaster, paymasterInput, gasPerPubdata, data } = transaction;
    return {
      txType: 113n,
      from: BigInt(from16),
      to: to3 ? BigInt(to3) : 0n,
      gasLimit: gas ?? 0n,
      gasPerPubdataByteLimit: gasPerPubdata ?? gasPerPubdataDefault,
      maxFeePerGas: maxFeePerGas ?? 0n,
      maxPriorityFeePerGas: maxPriorityFeePerGas ?? 0n,
      paymaster: paymaster ? BigInt(paymaster) : 0n,
      nonce: nonce ? BigInt(nonce) : 0n,
      value: value ?? 0n,
      data: data ?? "0x",
      factoryDeps: factoryDeps?.map((dep) => toHex(hashBytecode(dep))) ?? [],
      paymasterInput: paymasterInput ? paymasterInput : "0x"
    };
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/zksync/chainConfig.js
  var chainConfig = {
    blockTime: 1e3,
    formatters,
    serializers,
    custom: {
      getEip712Domain: getEip712Domain2
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/op-stack/chainConfig.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/op-stack/contracts.js
  init_node_compat_inject();
  var contracts = {
    gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
    l1Block: { address: "0x4200000000000000000000000000000000000015" },
    l2CrossDomainMessenger: {
      address: "0x4200000000000000000000000000000000000007"
    },
    l2Erc721Bridge: { address: "0x4200000000000000000000000000000000000014" },
    l2StandardBridge: { address: "0x4200000000000000000000000000000000000010" },
    l2ToL1MessagePasser: {
      address: "0x4200000000000000000000000000000000000016"
    }
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/op-stack/formatters.js
  init_node_compat_inject();
  init_fromHex();
  var formatters2 = {
    block: /* @__PURE__ */ defineBlock({
      format(args) {
        const transactions = args.transactions?.map((transaction) => {
          if (typeof transaction === "string")
            return transaction;
          const formatted = formatTransaction(transaction);
          if (formatted.typeHex === "0x7e") {
            formatted.isSystemTx = transaction.isSystemTx;
            formatted.mint = transaction.mint ? hexToBigInt(transaction.mint) : void 0;
            formatted.sourceHash = transaction.sourceHash;
            formatted.type = "deposit";
          }
          return formatted;
        });
        return {
          transactions,
          stateRoot: args.stateRoot
        };
      }
    }),
    transaction: /* @__PURE__ */ defineTransaction({
      format(args) {
        const transaction = {};
        if (args.type === "0x7e") {
          transaction.isSystemTx = args.isSystemTx;
          transaction.mint = args.mint ? hexToBigInt(args.mint) : void 0;
          transaction.sourceHash = args.sourceHash;
          transaction.type = "deposit";
        }
        return transaction;
      }
    }),
    transactionReceipt: /* @__PURE__ */ defineTransactionReceipt({
      format(args) {
        return {
          l1GasPrice: args.l1GasPrice ? hexToBigInt(args.l1GasPrice) : null,
          l1GasUsed: args.l1GasUsed ? hexToBigInt(args.l1GasUsed) : null,
          l1Fee: args.l1Fee ? hexToBigInt(args.l1Fee) : null,
          l1FeeScalar: args.l1FeeScalar ? Number(args.l1FeeScalar) : null
        };
      }
    })
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/op-stack/serializers.js
  init_node_compat_inject();
  init_address();
  init_isAddress();
  init_concat();
  init_toHex();
  function serializeTransaction3(transaction, signature2) {
    if (isDeposit(transaction))
      return serializeTransactionDeposit(transaction);
    return serializeTransaction(transaction, signature2);
  }
  var serializers2 = {
    transaction: serializeTransaction3
  };
  function serializeTransactionDeposit(transaction) {
    assertTransactionDeposit(transaction);
    const { sourceHash, data, from: from16, gas, isSystemTx, mint, to: to3, value } = transaction;
    const serializedTransaction = [
      sourceHash,
      from16,
      to3 ?? "0x",
      mint ? toHex(mint) : "0x",
      value ? toHex(value) : "0x",
      gas ? toHex(gas) : "0x",
      isSystemTx ? "0x1" : "0x",
      data ?? "0x"
    ];
    return concatHex([
      "0x7e",
      toRlp(serializedTransaction)
    ]);
  }
  function isDeposit(transaction) {
    if (transaction.type === "deposit")
      return true;
    if (typeof transaction.sourceHash !== "undefined")
      return true;
    return false;
  }
  function assertTransactionDeposit(transaction) {
    const { from: from16, to: to3 } = transaction;
    if (from16 && !isAddress(from16))
      throw new InvalidAddressError({ address: from16 });
    if (to3 && !isAddress(to3))
      throw new InvalidAddressError({ address: to3 });
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/op-stack/chainConfig.js
  var chainConfig2 = {
    blockTime: 2e3,
    contracts,
    formatters: formatters2,
    serializers: serializers2
  };

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/arbitrum.js
  init_node_compat_inject();
  var arbitrum = /* @__PURE__ */ defineChain({
    id: 42161,
    name: "Arbitrum One",
    nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
    blockTime: 250,
    rpcUrls: {
      default: {
        http: ["https://arb1.arbitrum.io/rpc"]
      }
    },
    blockExplorers: {
      default: {
        name: "Arbiscan",
        url: "https://arbiscan.io",
        apiUrl: "https://api.arbiscan.io/api"
      }
    },
    contracts: {
      multicall3: {
        address: "0xca11bde05977b3631167028862be2a173976ca11",
        blockCreated: 7654707
      }
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/avalanche.js
  init_node_compat_inject();
  var avalanche = /* @__PURE__ */ defineChain({
    id: 43114,
    name: "Avalanche",
    blockTime: 1700,
    nativeCurrency: {
      decimals: 18,
      name: "Avalanche",
      symbol: "AVAX"
    },
    rpcUrls: {
      default: { http: ["https://api.avax.network/ext/bc/C/rpc"] }
    },
    blockExplorers: {
      default: {
        name: "SnowTrace",
        url: "https://snowtrace.io",
        apiUrl: "https://api.snowtrace.io"
      }
    },
    contracts: {
      multicall3: {
        address: "0xca11bde05977b3631167028862be2a173976ca11",
        blockCreated: 11907934
      }
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/base.js
  init_node_compat_inject();
  var sourceId = 1;
  var base = /* @__PURE__ */ defineChain({
    ...chainConfig2,
    id: 8453,
    name: "Base",
    nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
    rpcUrls: {
      default: {
        http: ["https://mainnet.base.org"]
      }
    },
    blockExplorers: {
      default: {
        name: "Basescan",
        url: "https://basescan.org",
        apiUrl: "https://api.basescan.org/api"
      }
    },
    contracts: {
      ...chainConfig2.contracts,
      disputeGameFactory: {
        [sourceId]: {
          address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"
        }
      },
      l2OutputOracle: {
        [sourceId]: {
          address: "0x56315b90c40730925ec5485cf004d835058518A0"
        }
      },
      multicall3: {
        address: "0xca11bde05977b3631167028862be2a173976ca11",
        blockCreated: 5022
      },
      portal: {
        [sourceId]: {
          address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",
          blockCreated: 17482143
        }
      },
      l1StandardBridge: {
        [sourceId]: {
          address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35",
          blockCreated: 17482143
        }
      }
    },
    sourceId
  });
  var basePreconf = /* @__PURE__ */ defineChain({
    ...base,
    experimental_preconfirmationTime: 200,
    rpcUrls: {
      default: {
        http: ["https://mainnet-preconf.base.org"]
      }
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/bsc.js
  init_node_compat_inject();
  var bsc = /* @__PURE__ */ defineChain({
    id: 56,
    name: "BNB Smart Chain",
    blockTime: 750,
    nativeCurrency: {
      decimals: 18,
      name: "BNB",
      symbol: "BNB"
    },
    rpcUrls: {
      default: { http: ["https://56.rpc.thirdweb.com"] }
    },
    blockExplorers: {
      default: {
        name: "BscScan",
        url: "https://bscscan.com",
        apiUrl: "https://api.bscscan.com/api"
      }
    },
    contracts: {
      multicall3: {
        address: "0xca11bde05977b3631167028862be2a173976ca11",
        blockCreated: 15921452
      }
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/fantom.js
  init_node_compat_inject();
  var fantom = /* @__PURE__ */ defineChain({
    id: 250,
    name: "Fantom",
    nativeCurrency: {
      decimals: 18,
      name: "Fantom",
      symbol: "FTM"
    },
    rpcUrls: {
      default: { http: ["https://250.rpc.thirdweb.com"] }
    },
    blockExplorers: {
      default: {
        name: "FTMScan",
        url: "https://ftmscan.com",
        apiUrl: "https://api.ftmscan.com/api"
      }
    },
    contracts: {
      multicall3: {
        address: "0xca11bde05977b3631167028862be2a173976ca11",
        blockCreated: 33001987
      }
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/linea.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/linea/chainConfig.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/linea/actions/estimateGas.js
  init_node_compat_inject();
  init_parseAccount();
  init_toHex();
  init_getCallError();
  init_extract();
  init_transactionRequest();
  init_assertRequest();
  async function estimateGas2(client, args) {
    const { account: account_ = client.account } = args;
    if (!account_)
      throw new AccountNotFoundError();
    const account = parseAccount(account_);
    try {
      const { accessList, blockNumber, blockTag, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to: to3, value, ...rest } = args;
      const blockNumberHex = typeof blockNumber === "bigint" ? numberToHex(blockNumber) : void 0;
      const block = blockNumberHex || blockTag;
      assertRequest(args);
      const chainFormat = client.chain?.formatters?.transactionRequest?.format;
      const format = chainFormat || formatTransactionRequest;
      const request = format({
        // Pick out extra data that might exist on the chain's transaction request type.
        ...extract(rest, { format: chainFormat }),
        account,
        accessList,
        data,
        gas,
        gasPrice,
        maxFeePerGas,
        maxPriorityFeePerGas,
        nonce,
        to: to3,
        value
      }, "estimateGas");
      const { baseFeePerGas, gasLimit, priorityFeePerGas } = await client.request({
        method: "linea_estimateGas",
        params: block ? [request, block] : [request]
      });
      return {
        baseFeePerGas: BigInt(baseFeePerGas),
        gasLimit: BigInt(gasLimit),
        priorityFeePerGas: BigInt(priorityFeePerGas)
      };
    } catch (err2) {
      throw getCallError(err2, {
        ...args,
        account,
        chain: client.chain
      });
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/linea/chainConfig.js
  var chainConfig3 = {
    fees: {
      estimateFeesPerGas: estimateFeesPerGas2,
      async maxPriorityFeePerGas({ block, client, request }) {
        const response = await estimateFeesPerGas2({
          block,
          client,
          multiply: (x13) => x13,
          request,
          type: "eip1559"
        });
        if (!response?.maxPriorityFeePerGas)
          return null;
        return response.maxPriorityFeePerGas;
      }
    }
  };
  async function estimateFeesPerGas2({ client, multiply, request, type: type2 }) {
    try {
      const response = await estimateGas2(client, {
        ...request,
        account: request?.account
      });
      const { priorityFeePerGas: maxPriorityFeePerGas } = response;
      const baseFeePerGas = multiply(BigInt(response.baseFeePerGas));
      const maxFeePerGas = baseFeePerGas + maxPriorityFeePerGas;
      if (type2 === "legacy")
        return { gasPrice: maxFeePerGas };
      return {
        maxFeePerGas,
        maxPriorityFeePerGas
      };
    } catch {
      return null;
    }
  }

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/linea.js
  var linea = /* @__PURE__ */ defineChain({
    ...chainConfig3,
    id: 59144,
    name: "Linea Mainnet",
    blockTime: 2e3,
    nativeCurrency: { name: "Linea Ether", symbol: "ETH", decimals: 18 },
    rpcUrls: {
      default: {
        http: ["https://rpc.linea.build"],
        webSocket: ["wss://rpc.linea.build"]
      }
    },
    blockExplorers: {
      default: {
        name: "Etherscan",
        url: "https://lineascan.build",
        apiUrl: "https://api.lineascan.build/api"
      }
    },
    contracts: {
      multicall3: {
        address: "0xcA11bde05977b3631167028862bE2a173976CA11",
        blockCreated: 42
      },
      ensRegistry: {
        address: "0x50130b669B28C339991d8676FA73CF122a121267",
        blockCreated: 6682888
      },
      ensUniversalResolver: {
        address: "0x4D41762915F83c76EcaF6776d9b08076aA32b492",
        blockCreated: 22222151
      }
    },
    ensTlds: [".linea.eth"],
    testnet: false
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/mainnet.js
  init_node_compat_inject();
  var mainnet = /* @__PURE__ */ defineChain({
    id: 1,
    name: "Ethereum",
    nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
    blockTime: 12e3,
    rpcUrls: {
      default: {
        http: ["https://eth.merkle.io"]
      }
    },
    blockExplorers: {
      default: {
        name: "Etherscan",
        url: "https://etherscan.io",
        apiUrl: "https://api.etherscan.io/api"
      }
    },
    contracts: {
      ensUniversalResolver: {
        address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
        blockCreated: 23085558
      },
      multicall3: {
        address: "0xca11bde05977b3631167028862be2a173976ca11",
        blockCreated: 14353601
      }
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/opBNB.js
  init_node_compat_inject();
  var sourceId2 = 56;
  var opBNB = /* @__PURE__ */ defineChain({
    id: 204,
    name: "opBNB",
    nativeCurrency: {
      name: "BNB",
      symbol: "BNB",
      decimals: 18
    },
    rpcUrls: {
      default: { http: ["https://opbnb-mainnet-rpc.bnbchain.org"] }
    },
    blockExplorers: {
      default: {
        name: "opBNB (BSCScan)",
        url: "https://opbnb.bscscan.com",
        apiUrl: "https://api-opbnb.bscscan.com/api"
      }
    },
    contracts: {
      ...chainConfig2.contracts,
      multicall3: {
        address: "0xcA11bde05977b3631167028862bE2a173976CA11",
        blockCreated: 512881
      },
      l2OutputOracle: {
        [sourceId2]: {
          address: "0x153CAB79f4767E2ff862C94aa49573294B13D169"
        }
      },
      portal: {
        [sourceId2]: {
          address: "0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519"
        }
      },
      l1StandardBridge: {
        [sourceId2]: {
          address: "0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea"
        }
      }
    },
    sourceId: sourceId2
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/optimism.js
  init_node_compat_inject();
  var sourceId3 = 1;
  var optimism = /* @__PURE__ */ defineChain({
    ...chainConfig2,
    id: 10,
    name: "OP Mainnet",
    nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
    rpcUrls: {
      default: {
        http: ["https://mainnet.optimism.io"]
      }
    },
    blockExplorers: {
      default: {
        name: "Optimism Explorer",
        url: "https://optimistic.etherscan.io",
        apiUrl: "https://api-optimistic.etherscan.io/api"
      }
    },
    contracts: {
      ...chainConfig2.contracts,
      disputeGameFactory: {
        [sourceId3]: {
          address: "0xe5965Ab5962eDc7477C8520243A95517CD252fA9"
        }
      },
      l2OutputOracle: {
        [sourceId3]: {
          address: "0xdfe97868233d1aa22e815a266982f2cf17685a27"
        }
      },
      multicall3: {
        address: "0xca11bde05977b3631167028862be2a173976ca11",
        blockCreated: 4286263
      },
      portal: {
        [sourceId3]: {
          address: "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"
        }
      },
      l1StandardBridge: {
        [sourceId3]: {
          address: "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"
        }
      }
    },
    sourceId: sourceId3
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/polygon.js
  init_node_compat_inject();
  var polygon = /* @__PURE__ */ defineChain({
    id: 137,
    name: "Polygon",
    blockTime: 2e3,
    nativeCurrency: { name: "POL", symbol: "POL", decimals: 18 },
    rpcUrls: {
      default: {
        http: ["https://polygon.drpc.org"]
      }
    },
    blockExplorers: {
      default: {
        name: "PolygonScan",
        url: "https://polygonscan.com",
        apiUrl: "https://api.etherscan.io/v2/api"
      }
    },
    contracts: {
      multicall3: {
        address: "0xca11bde05977b3631167028862be2a173976ca11",
        blockCreated: 25770160
      }
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/sei.js
  init_node_compat_inject();
  var sei = /* @__PURE__ */ defineChain({
    id: 1329,
    name: "Sei Network",
    nativeCurrency: { name: "Sei", symbol: "SEI", decimals: 18 },
    rpcUrls: {
      default: {
        http: ["https://evm-rpc.sei-apis.com/"],
        webSocket: ["wss://evm-ws.sei-apis.com/"]
      }
    },
    blockExplorers: {
      default: {
        name: "Seiscan",
        url: "https://seiscan.io",
        apiUrl: "https://api.etherscan.io/v2/api"
      }
    },
    contracts: {
      multicall3: {
        address: "0xcA11bde05977b3631167028862bE2a173976CA11"
      }
    }
  });

  // ../../node_modules/.pnpm/viem@2.49.0_bufferutil@4.1._d1d6faba8907c16d535f50e2c6ccc3ce/node_modules/viem/_esm/chains/definitions/zksync.js
  init_node_compat_inject();
  var zksync = /* @__PURE__ */ defineChain({
    ...chainConfig,
    blockTime: 200,
    id: 324,
    name: "ZKsync Era",
    network: "zksync-era",
    nativeCurrency: {
      decimals: 18,
      name: "Ether",
      symbol: "ETH"
    },
    rpcUrls: {
      default: {
        http: ["https://mainnet.era.zksync.io"],
        webSocket: ["wss://mainnet.era.zksync.io/ws"]
      }
    },
    blockExplorers: {
      default: {
        name: "ZKsync Explorer",
        url: "https://explorer.zksync.io/",
        apiUrl: "https://block-explorer-api.mainnet.zksync.io/api"
      }
    },
    contracts: {
      multicall3: {
        address: "0xF9cda624FBC7e059355ce98a31693d299FACd963",
        blockCreated: 3908235
      },
      erc6492Verifier: {
        address: "0xfB688330379976DA81eB64Fe4BF50d7401763B9C",
        blockCreated: 45659388
      }
    }
  });

  // ../../packages/wallet-core/src/evm/client.ts
  var VIEM_CHAIN_MAP = {
    1: mainnet,
    10: optimism,
    56: bsc,
    137: polygon,
    204: opBNB,
    250: fantom,
    324: zksync,
    1329: sei,
    8453: base,
    42161: arbitrum,
    43114: avalanche,
    59144: linea
  };
  function getRpcUrl(chainId, env = process.env, options) {
    if (options?.customChain && options.customChain.chainId === chainId) {
      return options.customChain.rpcUrl;
    }
    const config2 = getEvmChainConfig(chainId);
    const value = env[config2.rpcUrlEnv];
    if (!value) {
      throw new Error(`RPC URL is not configured for chain ${config2.name}.`);
    }
    return value;
  }
  function createCustomViemChain(config2) {
    return defineChain({
      id: config2.chainId,
      name: config2.name,
      nativeCurrency: config2.nativeCurrency,
      rpcUrls: {
        default: {
          http: [config2.rpcUrl]
        },
        public: {
          http: [config2.rpcUrl]
        }
      },
      blockExplorers: config2.blockExplorerUrl ? {
        default: {
          name: `${config2.name} Explorer`,
          url: config2.blockExplorerUrl
        }
      } : void 0
    });
  }
  function getViemChain(chainId, options) {
    if (options?.customChain && options.customChain.chainId === chainId) {
      return createCustomViemChain(options.customChain);
    }
    const chain2 = VIEM_CHAIN_MAP[chainId];
    if (!chain2) {
      throw new Error(`Unsupported EVM chain: ${chainId}`);
    }
    return chain2;
  }
  function createEvmPublicClient(chainId, env, options) {
    return createPublicClient({
      chain: getViemChain(chainId, options),
      transport: http(getRpcUrl(chainId, env, options))
    });
  }
  function createEvmWalletClient(mnemonic, chainId, env, options) {
    const account = deriveEvmAccountFromMnemonic(mnemonic);
    return createWalletClient({
      account,
      chain: getViemChain(chainId, options),
      transport: http(getRpcUrl(chainId, env, options))
    });
  }

  // ../../packages/wallet-core/src/evm/erc20Abi.ts
  init_node_compat_inject();
  var ERC20_ABI = [
    {
      type: "function",
      name: "balanceOf",
      stateMutability: "view",
      inputs: [{ name: "account", type: "address" }],
      outputs: [{ name: "", type: "uint256" }]
    },
    {
      type: "function",
      name: "decimals",
      stateMutability: "view",
      inputs: [],
      outputs: [{ name: "", type: "uint8" }]
    },
    {
      type: "function",
      name: "symbol",
      stateMutability: "view",
      inputs: [],
      outputs: [{ name: "", type: "string" }]
    },
    {
      type: "function",
      name: "allowance",
      stateMutability: "view",
      inputs: [
        { name: "owner", type: "address" },
        { name: "spender", type: "address" }
      ],
      outputs: [{ name: "", type: "uint256" }]
    },
    {
      type: "function",
      name: "approve",
      stateMutability: "nonpayable",
      inputs: [
        { name: "spender", type: "address" },
        { name: "amount", type: "uint256" }
      ],
      outputs: [{ name: "", type: "bool" }]
    },
    {
      type: "function",
      name: "transfer",
      stateMutability: "nonpayable",
      inputs: [
        { name: "to", type: "address" },
        { name: "amount", type: "uint256" }
      ],
      outputs: [{ name: "", type: "bool" }]
    }
  ];

  // ../../packages/wallet-core/src/evm/explorer.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/evm/send.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/evm/swap.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/adapters/solana-adapter.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/solana/derive.ts
  init_node_compat_inject();
  var bip39 = __toESM(require_src(), 1);

  // ../../node_modules/.pnpm/ed25519-hd-key@2.0.0/node_modules/ed25519-hd-key/dist/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/sha2.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/_md.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/utils.js
  init_node_compat_inject();
  function isBytes4(a5) {
    return a5 instanceof Uint8Array || ArrayBuffer.isView(a5) && a5.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in a5 && a5.BYTES_PER_ELEMENT === 1;
  }
  function anumber3(n6, title = "") {
    if (typeof n6 !== "number") {
      const prefix = title && `"${title}" `;
      throw new TypeError(`${prefix}expected number, got ${typeof n6}`);
    }
    if (!Number.isSafeInteger(n6) || n6 < 0) {
      const prefix = title && `"${title}" `;
      throw new RangeError(`${prefix}expected integer >= 0, got ${n6}`);
    }
  }
  function abytes3(value, length2, title = "") {
    const bytes = isBytes4(value);
    const len = value?.length;
    const needsLen = length2 !== void 0;
    if (!bytes || needsLen && len !== length2) {
      const prefix = title && `"${title}" `;
      const ofLen = needsLen ? ` of length ${length2}` : "";
      const got = bytes ? `length=${len}` : `type=${typeof value}`;
      const message = prefix + "expected Uint8Array" + ofLen + ", got " + got;
      if (!bytes)
        throw new TypeError(message);
      throw new RangeError(message);
    }
    return value;
  }
  function ahash2(h8) {
    if (typeof h8 !== "function" || typeof h8.create !== "function")
      throw new TypeError("Hash must wrapped by utils.createHasher");
    anumber3(h8.outputLen);
    anumber3(h8.blockLen);
    if (h8.outputLen < 1)
      throw new Error('"outputLen" must be >= 1');
    if (h8.blockLen < 1)
      throw new Error('"blockLen" must be >= 1');
  }
  function aexists2(instance2, checkFinished = true) {
    if (instance2.destroyed)
      throw new Error("Hash instance has been destroyed");
    if (checkFinished && instance2.finished)
      throw new Error("Hash#digest() has already been called");
  }
  function aoutput2(out, instance2) {
    abytes3(out, void 0, "digestInto() output");
    const min = instance2.outputLen;
    if (out.length < min) {
      throw new RangeError('"digestInto() output" expected to be of length >=' + min);
    }
  }
  function clean2(...arrays) {
    for (let i5 = 0; i5 < arrays.length; i5++) {
      arrays[i5].fill(0);
    }
  }
  function createView2(arr) {
    return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
  }
  var hasHexBuiltin3 = /* @__PURE__ */ (() => (
    // @ts-ignore
    typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function"
  ))();
  var asciis3 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
  function asciiToBase163(ch) {
    if (ch >= asciis3._0 && ch <= asciis3._9)
      return ch - asciis3._0;
    if (ch >= asciis3.A && ch <= asciis3.F)
      return ch - (asciis3.A - 10);
    if (ch >= asciis3.a && ch <= asciis3.f)
      return ch - (asciis3.a - 10);
    return;
  }
  function hexToBytes5(hex3) {
    if (typeof hex3 !== "string")
      throw new TypeError("hex string expected, got " + typeof hex3);
    if (hasHexBuiltin3) {
      try {
        return Uint8Array.fromHex(hex3);
      } catch (error51) {
        if (error51 instanceof SyntaxError)
          throw new RangeError(error51.message);
        throw error51;
      }
    }
    const hl = hex3.length;
    const al = hl / 2;
    if (hl % 2)
      throw new RangeError("hex string expected, got unpadded hex of length " + hl);
    const array3 = new Uint8Array(al);
    for (let ai2 = 0, hi2 = 0; ai2 < al; ai2++, hi2 += 2) {
      const n1 = asciiToBase163(hex3.charCodeAt(hi2));
      const n22 = asciiToBase163(hex3.charCodeAt(hi2 + 1));
      if (n1 === void 0 || n22 === void 0) {
        const char = hex3[hi2] + hex3[hi2 + 1];
        throw new RangeError('hex string expected, got non-hex character "' + char + '" at index ' + hi2);
      }
      array3[ai2] = n1 * 16 + n22;
    }
    return array3;
  }
  function concatBytes4(...arrays) {
    let sum = 0;
    for (let i5 = 0; i5 < arrays.length; i5++) {
      const a5 = arrays[i5];
      abytes3(a5);
      sum += a5.length;
    }
    const res = new Uint8Array(sum);
    for (let i5 = 0, pad4 = 0; i5 < arrays.length; i5++) {
      const a5 = arrays[i5];
      res.set(a5, pad4);
      pad4 += a5.length;
    }
    return res;
  }
  function createHasher3(hashCons, info = {}) {
    const hashC = (msg, opts) => hashCons(opts).update(msg).digest();
    const tmp = hashCons(void 0);
    hashC.outputLen = tmp.outputLen;
    hashC.blockLen = tmp.blockLen;
    hashC.canXOF = tmp.canXOF;
    hashC.create = (opts) => hashCons(opts);
    Object.assign(hashC, info);
    return Object.freeze(hashC);
  }
  var oidNist = (suffix) => ({
    // Current NIST hashAlgs suffixes used here fit in one DER subidentifier octet.
    // Larger suffix values would need base-128 OID encoding and a different length byte.
    oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, suffix])
  });

  // ../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/_md.js
  var HashMD2 = class {
    blockLen;
    outputLen;
    canXOF = false;
    padOffset;
    isLE;
    // For partial updates less than block size
    buffer;
    view;
    finished = false;
    length = 0;
    pos = 0;
    destroyed = false;
    constructor(blockLen, outputLen, padOffset, isLE3) {
      this.blockLen = blockLen;
      this.outputLen = outputLen;
      this.padOffset = padOffset;
      this.isLE = isLE3;
      this.buffer = new Uint8Array(blockLen);
      this.view = createView2(this.buffer);
    }
    update(data) {
      aexists2(this);
      abytes3(data);
      const { view, buffer: buffer2, blockLen } = this;
      const len = data.length;
      for (let pos = 0; pos < len; ) {
        const take = Math.min(blockLen - this.pos, len - pos);
        if (take === blockLen) {
          const dataView = createView2(data);
          for (; blockLen <= len - pos; pos += blockLen)
            this.process(dataView, pos);
          continue;
        }
        buffer2.set(data.subarray(pos, pos + take), this.pos);
        this.pos += take;
        pos += take;
        if (this.pos === blockLen) {
          this.process(view, 0);
          this.pos = 0;
        }
      }
      this.length += data.length;
      this.roundClean();
      return this;
    }
    digestInto(out) {
      aexists2(this);
      aoutput2(out, this);
      this.finished = true;
      const { buffer: buffer2, view, blockLen, isLE: isLE3 } = this;
      let { pos } = this;
      buffer2[pos++] = 128;
      clean2(this.buffer.subarray(pos));
      if (this.padOffset > blockLen - pos) {
        this.process(view, 0);
        pos = 0;
      }
      for (let i5 = pos; i5 < blockLen; i5++)
        buffer2[i5] = 0;
      view.setBigUint64(blockLen - 8, BigInt(this.length * 8), isLE3);
      this.process(view, 0);
      const oview = createView2(out);
      const len = this.outputLen;
      if (len % 4)
        throw new Error("_sha2: outputLen must be aligned to 32bit");
      const outLen = len / 4;
      const state = this.get();
      if (outLen > state.length)
        throw new Error("_sha2: outputLen bigger than state");
      for (let i5 = 0; i5 < outLen; i5++)
        oview.setUint32(4 * i5, state[i5], isLE3);
    }
    digest() {
      const { buffer: buffer2, outputLen } = this;
      this.digestInto(buffer2);
      const res = buffer2.slice(0, outputLen);
      this.destroy();
      return res;
    }
    _cloneInto(to3) {
      to3 ||= new this.constructor();
      to3.set(...this.get());
      const { blockLen, buffer: buffer2, length: length2, finished, destroyed, pos } = this;
      to3.destroyed = destroyed;
      to3.finished = finished;
      to3.length = length2;
      to3.pos = pos;
      if (length2 % blockLen)
        to3.buffer.set(buffer2);
      return to3;
    }
    clone() {
      return this._cloneInto();
    }
  };
  var SHA512_IV2 = /* @__PURE__ */ Uint32Array.from([
    1779033703,
    4089235720,
    3144134277,
    2227873595,
    1013904242,
    4271175723,
    2773480762,
    1595750129,
    1359893119,
    2917565137,
    2600822924,
    725511199,
    528734635,
    4215389547,
    1541459225,
    327033209
  ]);

  // ../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/_u64.js
  init_node_compat_inject();
  var U32_MASK642 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
  var _32n2 = /* @__PURE__ */ BigInt(32);
  function fromBig2(n6, le6 = false) {
    if (le6)
      return { h: Number(n6 & U32_MASK642), l: Number(n6 >> _32n2 & U32_MASK642) };
    return { h: Number(n6 >> _32n2 & U32_MASK642) | 0, l: Number(n6 & U32_MASK642) | 0 };
  }
  function split2(lst, le6 = false) {
    const len = lst.length;
    let Ah = new Uint32Array(len);
    let Al = new Uint32Array(len);
    for (let i5 = 0; i5 < len; i5++) {
      const { h: h8, l: l6 } = fromBig2(lst[i5], le6);
      [Ah[i5], Al[i5]] = [h8, l6];
    }
    return [Ah, Al];
  }
  var shrSH2 = (h8, _l, s3) => h8 >>> s3;
  var shrSL2 = (h8, l6, s3) => h8 << 32 - s3 | l6 >>> s3;
  var rotrSH2 = (h8, l6, s3) => h8 >>> s3 | l6 << 32 - s3;
  var rotrSL2 = (h8, l6, s3) => h8 << 32 - s3 | l6 >>> s3;
  var rotrBH2 = (h8, l6, s3) => h8 << 64 - s3 | l6 >>> s3 - 32;
  var rotrBL2 = (h8, l6, s3) => h8 >>> s3 - 32 | l6 << 64 - s3;
  function add2(Ah, Al, Bh, Bl) {
    const l6 = (Al >>> 0) + (Bl >>> 0);
    return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };
  }
  var add3L2 = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
  var add3H2 = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
  var add4L2 = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
  var add4H2 = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
  var add5L2 = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
  var add5H2 = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;

  // ../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/sha2.js
  var K5122 = /* @__PURE__ */ (() => split2([
    "0x428a2f98d728ae22",
    "0x7137449123ef65cd",
    "0xb5c0fbcfec4d3b2f",
    "0xe9b5dba58189dbbc",
    "0x3956c25bf348b538",
    "0x59f111f1b605d019",
    "0x923f82a4af194f9b",
    "0xab1c5ed5da6d8118",
    "0xd807aa98a3030242",
    "0x12835b0145706fbe",
    "0x243185be4ee4b28c",
    "0x550c7dc3d5ffb4e2",
    "0x72be5d74f27b896f",
    "0x80deb1fe3b1696b1",
    "0x9bdc06a725c71235",
    "0xc19bf174cf692694",
    "0xe49b69c19ef14ad2",
    "0xefbe4786384f25e3",
    "0x0fc19dc68b8cd5b5",
    "0x240ca1cc77ac9c65",
    "0x2de92c6f592b0275",
    "0x4a7484aa6ea6e483",
    "0x5cb0a9dcbd41fbd4",
    "0x76f988da831153b5",
    "0x983e5152ee66dfab",
    "0xa831c66d2db43210",
    "0xb00327c898fb213f",
    "0xbf597fc7beef0ee4",
    "0xc6e00bf33da88fc2",
    "0xd5a79147930aa725",
    "0x06ca6351e003826f",
    "0x142929670a0e6e70",
    "0x27b70a8546d22ffc",
    "0x2e1b21385c26c926",
    "0x4d2c6dfc5ac42aed",
    "0x53380d139d95b3df",
    "0x650a73548baf63de",
    "0x766a0abb3c77b2a8",
    "0x81c2c92e47edaee6",
    "0x92722c851482353b",
    "0xa2bfe8a14cf10364",
    "0xa81a664bbc423001",
    "0xc24b8b70d0f89791",
    "0xc76c51a30654be30",
    "0xd192e819d6ef5218",
    "0xd69906245565a910",
    "0xf40e35855771202a",
    "0x106aa07032bbd1b8",
    "0x19a4c116b8d2d0c8",
    "0x1e376c085141ab53",
    "0x2748774cdf8eeb99",
    "0x34b0bcb5e19b48a8",
    "0x391c0cb3c5c95a63",
    "0x4ed8aa4ae3418acb",
    "0x5b9cca4f7763e373",
    "0x682e6ff3d6b2b8a3",
    "0x748f82ee5defb2fc",
    "0x78a5636f43172f60",
    "0x84c87814a1f0ab72",
    "0x8cc702081a6439ec",
    "0x90befffa23631e28",
    "0xa4506cebde82bde9",
    "0xbef9a3f7b2c67915",
    "0xc67178f2e372532b",
    "0xca273eceea26619c",
    "0xd186b8c721c0c207",
    "0xeada7dd6cde0eb1e",
    "0xf57d4f7fee6ed178",
    "0x06f067aa72176fba",
    "0x0a637dc5a2c898a6",
    "0x113f9804bef90dae",
    "0x1b710b35131c471b",
    "0x28db77f523047d84",
    "0x32caab7b40c72493",
    "0x3c9ebe0a15c9bebc",
    "0x431d67c49c100d4c",
    "0x4cc5d4becb3e42b6",
    "0x597f299cfc657e2a",
    "0x5fcb6fab3ad6faec",
    "0x6c44198c4a475817"
  ].map((n6) => BigInt(n6))))();
  var SHA512_Kh2 = /* @__PURE__ */ (() => K5122[0])();
  var SHA512_Kl2 = /* @__PURE__ */ (() => K5122[1])();
  var SHA512_W_H2 = /* @__PURE__ */ new Uint32Array(80);
  var SHA512_W_L2 = /* @__PURE__ */ new Uint32Array(80);
  var SHA2_64B = class extends HashMD2 {
    constructor(outputLen) {
      super(128, outputLen, 16, false);
    }
    // prettier-ignore
    get() {
      const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
      return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];
    }
    // prettier-ignore
    set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {
      this.Ah = Ah | 0;
      this.Al = Al | 0;
      this.Bh = Bh | 0;
      this.Bl = Bl | 0;
      this.Ch = Ch | 0;
      this.Cl = Cl | 0;
      this.Dh = Dh | 0;
      this.Dl = Dl | 0;
      this.Eh = Eh | 0;
      this.El = El | 0;
      this.Fh = Fh | 0;
      this.Fl = Fl | 0;
      this.Gh = Gh | 0;
      this.Gl = Gl | 0;
      this.Hh = Hh | 0;
      this.Hl = Hl | 0;
    }
    process(view, offset2) {
      for (let i5 = 0; i5 < 16; i5++, offset2 += 4) {
        SHA512_W_H2[i5] = view.getUint32(offset2);
        SHA512_W_L2[i5] = view.getUint32(offset2 += 4);
      }
      for (let i5 = 16; i5 < 80; i5++) {
        const W15h = SHA512_W_H2[i5 - 15] | 0;
        const W15l = SHA512_W_L2[i5 - 15] | 0;
        const s0h = rotrSH2(W15h, W15l, 1) ^ rotrSH2(W15h, W15l, 8) ^ shrSH2(W15h, W15l, 7);
        const s0l = rotrSL2(W15h, W15l, 1) ^ rotrSL2(W15h, W15l, 8) ^ shrSL2(W15h, W15l, 7);
        const W2h = SHA512_W_H2[i5 - 2] | 0;
        const W2l = SHA512_W_L2[i5 - 2] | 0;
        const s1h = rotrSH2(W2h, W2l, 19) ^ rotrBH2(W2h, W2l, 61) ^ shrSH2(W2h, W2l, 6);
        const s1l = rotrSL2(W2h, W2l, 19) ^ rotrBL2(W2h, W2l, 61) ^ shrSL2(W2h, W2l, 6);
        const SUMl = add4L2(s0l, s1l, SHA512_W_L2[i5 - 7], SHA512_W_L2[i5 - 16]);
        const SUMh = add4H2(SUMl, s0h, s1h, SHA512_W_H2[i5 - 7], SHA512_W_H2[i5 - 16]);
        SHA512_W_H2[i5] = SUMh | 0;
        SHA512_W_L2[i5] = SUMl | 0;
      }
      let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
      for (let i5 = 0; i5 < 80; i5++) {
        const sigma1h = rotrSH2(Eh, El, 14) ^ rotrSH2(Eh, El, 18) ^ rotrBH2(Eh, El, 41);
        const sigma1l = rotrSL2(Eh, El, 14) ^ rotrSL2(Eh, El, 18) ^ rotrBL2(Eh, El, 41);
        const CHIh = Eh & Fh ^ ~Eh & Gh;
        const CHIl = El & Fl ^ ~El & Gl;
        const T1ll = add5L2(Hl, sigma1l, CHIl, SHA512_Kl2[i5], SHA512_W_L2[i5]);
        const T1h = add5H2(T1ll, Hh, sigma1h, CHIh, SHA512_Kh2[i5], SHA512_W_H2[i5]);
        const T1l = T1ll | 0;
        const sigma0h = rotrSH2(Ah, Al, 28) ^ rotrBH2(Ah, Al, 34) ^ rotrBH2(Ah, Al, 39);
        const sigma0l = rotrSL2(Ah, Al, 28) ^ rotrBL2(Ah, Al, 34) ^ rotrBL2(Ah, Al, 39);
        const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;
        const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;
        Hh = Gh | 0;
        Hl = Gl | 0;
        Gh = Fh | 0;
        Gl = Fl | 0;
        Fh = Eh | 0;
        Fl = El | 0;
        ({ h: Eh, l: El } = add2(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
        Dh = Ch | 0;
        Dl = Cl | 0;
        Ch = Bh | 0;
        Cl = Bl | 0;
        Bh = Ah | 0;
        Bl = Al | 0;
        const All = add3L2(T1l, sigma0l, MAJl);
        Ah = add3H2(All, T1h, sigma0h, MAJh);
        Al = All | 0;
      }
      ({ h: Ah, l: Al } = add2(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
      ({ h: Bh, l: Bl } = add2(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
      ({ h: Ch, l: Cl } = add2(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
      ({ h: Dh, l: Dl } = add2(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
      ({ h: Eh, l: El } = add2(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
      ({ h: Fh, l: Fl } = add2(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
      ({ h: Gh, l: Gl } = add2(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
      ({ h: Hh, l: Hl } = add2(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
      this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
    }
    roundClean() {
      clean2(SHA512_W_H2, SHA512_W_L2);
    }
    destroy() {
      this.destroyed = true;
      clean2(this.buffer);
      this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
    }
  };
  var _SHA512 = class extends SHA2_64B {
    Ah = SHA512_IV2[0] | 0;
    Al = SHA512_IV2[1] | 0;
    Bh = SHA512_IV2[2] | 0;
    Bl = SHA512_IV2[3] | 0;
    Ch = SHA512_IV2[4] | 0;
    Cl = SHA512_IV2[5] | 0;
    Dh = SHA512_IV2[6] | 0;
    Dl = SHA512_IV2[7] | 0;
    Eh = SHA512_IV2[8] | 0;
    El = SHA512_IV2[9] | 0;
    Fh = SHA512_IV2[10] | 0;
    Fl = SHA512_IV2[11] | 0;
    Gh = SHA512_IV2[12] | 0;
    Gl = SHA512_IV2[13] | 0;
    Hh = SHA512_IV2[14] | 0;
    Hl = SHA512_IV2[15] | 0;
    constructor() {
      super(64);
    }
  };
  var sha5122 = /* @__PURE__ */ createHasher3(
    () => new _SHA512(),
    /* @__PURE__ */ oidNist(3)
  );

  // ../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/hmac.js
  init_node_compat_inject();
  var _HMAC = class {
    oHash;
    iHash;
    blockLen;
    outputLen;
    canXOF = false;
    finished = false;
    destroyed = false;
    constructor(hash5, key2) {
      ahash2(hash5);
      abytes3(key2, void 0, "key");
      this.iHash = hash5.create();
      if (typeof this.iHash.update !== "function")
        throw new Error("Expected instance of class which extends utils.Hash");
      this.blockLen = this.iHash.blockLen;
      this.outputLen = this.iHash.outputLen;
      const blockLen = this.blockLen;
      const pad4 = new Uint8Array(blockLen);
      pad4.set(key2.length > blockLen ? hash5.create().update(key2).digest() : key2);
      for (let i5 = 0; i5 < pad4.length; i5++)
        pad4[i5] ^= 54;
      this.iHash.update(pad4);
      this.oHash = hash5.create();
      for (let i5 = 0; i5 < pad4.length; i5++)
        pad4[i5] ^= 54 ^ 92;
      this.oHash.update(pad4);
      clean2(pad4);
    }
    update(buf) {
      aexists2(this);
      this.iHash.update(buf);
      return this;
    }
    digestInto(out) {
      aexists2(this);
      aoutput2(out, this);
      this.finished = true;
      const buf = out.subarray(0, this.outputLen);
      this.iHash.digestInto(buf);
      this.oHash.update(buf);
      this.oHash.digestInto(buf);
      this.destroy();
    }
    digest() {
      const out = new Uint8Array(this.oHash.outputLen);
      this.digestInto(out);
      return out;
    }
    _cloneInto(to3) {
      to3 ||= Object.create(Object.getPrototypeOf(this), {});
      const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;
      to3 = to3;
      to3.finished = finished;
      to3.destroyed = destroyed;
      to3.blockLen = blockLen;
      to3.outputLen = outputLen;
      to3.oHash = oHash._cloneInto(to3.oHash);
      to3.iHash = iHash._cloneInto(to3.iHash);
      return to3;
    }
    clone() {
      return this._cloneInto();
    }
    destroy() {
      this.destroyed = true;
      this.oHash.destroy();
      this.iHash.destroy();
    }
  };
  var hmac2 = /* @__PURE__ */ (() => {
    const hmac_ = ((hash5, key2, message) => new _HMAC(hash5, key2).update(message).digest());
    hmac_.create = (hash5, key2) => new _HMAC(hash5, key2);
    return hmac_;
  })();

  // ../../node_modules/.pnpm/@noble+ed25519@3.1.0/node_modules/@noble/ed25519/index.js
  init_node_compat_inject();
  var ed25519_CURVE = Object.freeze({
    p: 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedn,
    n: 0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3edn,
    h: 8n,
    a: 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffecn,
    d: 0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3n,
    Gx: 0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51an,
    Gy: 0x6666666666666666666666666666666666666666666666666666666666666658n
  });
  var { p: P, n: N, Gx, Gy, a: _a, d: _d, h } = ed25519_CURVE;
  var L = 32;
  var captureTrace = (...args) => {
    if ("captureStackTrace" in Error && typeof Error.captureStackTrace === "function") {
      Error.captureStackTrace(...args);
    }
  };
  var err = (message = "") => {
    const e2 = new Error(message);
    captureTrace(e2, err);
    throw e2;
  };
  var isBig = (n6) => typeof n6 === "bigint";
  var isStr = (s3) => typeof s3 === "string";
  var isBytes5 = (a5) => a5 instanceof Uint8Array || ArrayBuffer.isView(a5) && a5.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in a5 && a5.BYTES_PER_ELEMENT === 1;
  var abytes4 = (value, length2, title = "") => {
    const bytes = isBytes5(value);
    const len = value?.length;
    const needsLen = length2 !== void 0;
    if (!bytes || needsLen && len !== length2) {
      const prefix = title && `"${title}" `;
      const ofLen = needsLen ? ` of length ${length2}` : "";
      const got = bytes ? `length=${len}` : `type=${typeof value}`;
      const msg = prefix + "expected Uint8Array" + ofLen + ", got " + got;
      throw bytes ? new RangeError(msg) : new TypeError(msg);
    }
    return value;
  };
  var u8n2 = (len) => new Uint8Array(len);
  var u8fr2 = (buf) => Uint8Array.from(buf);
  var padh = (n6, pad4) => n6.toString(16).padStart(pad4, "0");
  var bytesToHex4 = (b9) => Array.from(abytes4(b9)).map((e2) => padh(e2, 2)).join("");
  var C = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
  var _ch = (ch) => {
    if (ch >= C._0 && ch <= C._9)
      return ch - C._0;
    if (ch >= C.A && ch <= C.F)
      return ch - (C.A - 10);
    if (ch >= C.a && ch <= C.f)
      return ch - (C.a - 10);
    return;
  };
  var hexToBytes6 = (hex3) => {
    const e2 = "hex invalid";
    if (!isStr(hex3))
      return err(e2);
    const hl = hex3.length;
    const al = hl / 2;
    if (hl % 2)
      return err(e2);
    const array3 = u8n2(al);
    for (let ai2 = 0, hi2 = 0; ai2 < al; ai2++, hi2 += 2) {
      const n1 = _ch(hex3.charCodeAt(hi2));
      const n22 = _ch(hex3.charCodeAt(hi2 + 1));
      if (n1 === void 0 || n22 === void 0)
        return err(e2);
      array3[ai2] = n1 * 16 + n22;
    }
    return array3;
  };
  var cr = () => globalThis?.crypto;
  var subtle = () => cr()?.subtle ?? err("crypto.subtle must be defined, consider polyfill");
  var concatBytes5 = (...arrs) => {
    let len = 0;
    for (const a5 of arrs)
      len += abytes4(a5).length;
    const r3 = u8n2(len);
    let pad4 = 0;
    arrs.forEach((a5) => {
      r3.set(a5, pad4);
      pad4 += a5.length;
    });
    return r3;
  };
  var big = BigInt;
  var assertRange = (n6, min, max, msg = "bad number: out of range") => {
    if (!isBig(n6))
      throw new TypeError(msg);
    if (min <= n6 && n6 < max)
      return n6;
    throw new RangeError(msg);
  };
  var M = (a5, b9 = P) => {
    const r3 = a5 % b9;
    return r3 >= 0n ? r3 : b9 + r3;
  };
  var P_MASK = (1n << 255n) - 1n;
  var modP2 = (num2) => {
    if (num2 < 0n)
      err("negative coordinate");
    let r3 = (num2 >> 255n) * 19n + (num2 & P_MASK);
    r3 = (r3 >> 255n) * 19n + (r3 & P_MASK);
    return r3 % P;
  };
  var invert3 = (num2, md) => {
    if (num2 === 0n || md <= 0n)
      err("no inverse n=" + num2 + " mod=" + md);
    let a5 = M(num2, md), b9 = md, x13 = 0n, y11 = 1n, u4 = 1n, v13 = 0n;
    while (a5 !== 0n) {
      const q7 = b9 / a5, r3 = b9 % a5;
      const m3 = x13 - u4 * q7, n6 = y11 - v13 * q7;
      b9 = a5, a5 = r3, x13 = u4, y11 = v13, u4 = m3, v13 = n6;
    }
    return b9 === 1n ? M(x13, md) : err("no inverse");
  };
  var apoint = (p7) => p7 instanceof Point3 ? p7 : err("Point expected");
  var B256 = 2n ** 256n;
  var Point3 = class _Point {
    static BASE;
    static ZERO;
    X;
    Y;
    Z;
    T;
    // Constructor only bounds-checks and freezes XYZT coordinates; it does not prove the point is
    // on-curve or that T matches X*Y/Z.
    constructor(X4, Y6, Z6, T6) {
      const max = B256;
      this.X = assertRange(X4, 0n, max);
      this.Y = assertRange(Y6, 0n, max);
      this.Z = assertRange(Z6, 1n, max);
      this.T = assertRange(T6, 0n, max);
      Object.freeze(this);
    }
    static CURVE() {
      return ed25519_CURVE;
    }
    static fromAffine(p7) {
      return new _Point(p7.x, p7.y, 1n, modP2(p7.x * p7.y));
    }
    /** RFC8032 5.1.3: Bytes to Point. */
    static fromBytes(hex3, zip215 = false) {
      const d6 = _d;
      const normed = u8fr2(abytes4(hex3, L));
      const lastByte = hex3[31];
      normed[31] = lastByte & ~128;
      const y11 = bytesToNumberLE3(normed);
      const max = zip215 ? B256 : P;
      assertRange(y11, 0n, max);
      const y22 = modP2(y11 * y11);
      const u4 = M(y22 - 1n);
      const v13 = modP2(d6 * y22 + 1n);
      let { isValid, value: x13 } = uvRatio(u4, v13);
      if (!isValid)
        err("bad point: y not sqrt");
      const isXOdd = (x13 & 1n) === 1n;
      const isLastByteOdd = (lastByte & 128) !== 0;
      if (!zip215 && x13 === 0n && isLastByteOdd)
        err("bad point: x==0, isLastByteOdd");
      if (isLastByteOdd !== isXOdd)
        x13 = M(-x13);
      return new _Point(x13, y11, 1n, modP2(x13 * y11));
    }
    static fromHex(hex3, zip215) {
      return _Point.fromBytes(hexToBytes6(hex3), zip215);
    }
    get x() {
      return this.toAffine().x;
    }
    get y() {
      return this.toAffine().y;
    }
    /** Checks if the point is valid and on-curve. */
    assertValidity() {
      const a5 = _a;
      const d6 = _d;
      const p7 = this;
      if (p7.is0())
        return err("bad point: ZERO");
      const { X: X4, Y: Y6, Z: Z6, T: T6 } = p7;
      const X22 = modP2(X4 * X4);
      const Y22 = modP2(Y6 * Y6);
      const Z22 = modP2(Z6 * Z6);
      const Z42 = modP2(Z22 * Z22);
      const aX2 = modP2(X22 * a5);
      const left = modP2(Z22 * (aX2 + Y22));
      const right = M(Z42 + modP2(d6 * modP2(X22 * Y22)));
      if (left !== right)
        return err("bad point: equation left != right (1)");
      const XY = modP2(X4 * Y6);
      const ZT = modP2(Z6 * T6);
      if (XY !== ZT)
        return err("bad point: equation left != right (2)");
      return this;
    }
    /** Equality check: compare points P&Q. */
    equals(other) {
      const { X: X1, Y: Y1, Z: Z1 } = this;
      const { X: X22, Y: Y22, Z: Z22 } = apoint(other);
      const X1Z2 = modP2(X1 * Z22);
      const X2Z1 = modP2(X22 * Z1);
      const Y1Z2 = modP2(Y1 * Z22);
      const Y2Z1 = modP2(Y22 * Z1);
      return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;
    }
    is0() {
      return this.equals(I);
    }
    /** Flip point over y coordinate. */
    negate() {
      return new _Point(M(-this.X), this.Y, this.Z, M(-this.T));
    }
    /** Point doubling. Complete formula. Cost: `4M + 4S + 1*a + 6add + 1*2`. */
    double() {
      const { X: X1, Y: Y1, Z: Z1 } = this;
      const a5 = _a;
      const A7 = modP2(X1 * X1);
      const B7 = modP2(Y1 * Y1);
      const C9 = modP2(2n * Z1 * Z1);
      const D7 = modP2(a5 * A7);
      const x1y1 = M(X1 + Y1);
      const E6 = M(modP2(x1y1 * x1y1) - A7 - B7);
      const G6 = M(D7 + B7);
      const F6 = M(G6 - C9);
      const H6 = M(D7 - B7);
      const X32 = modP2(E6 * F6);
      const Y32 = modP2(G6 * H6);
      const T32 = modP2(E6 * H6);
      const Z32 = modP2(F6 * G6);
      return new _Point(X32, Y32, Z32, T32);
    }
    /** Point addition. Complete formula. Cost: `8M + 1*k + 8add + 1*2`. */
    add(other) {
      const { X: X1, Y: Y1, Z: Z1, T: T1 } = this;
      const { X: X22, Y: Y22, Z: Z22, T: T22 } = apoint(other);
      const a5 = _a;
      const d6 = _d;
      const A7 = modP2(X1 * X22);
      const B7 = modP2(Y1 * Y22);
      const C9 = modP2(modP2(T1 * d6) * T22);
      const D7 = modP2(Z1 * Z22);
      const E6 = M(modP2(M(X1 + Y1) * M(X22 + Y22)) - A7 - B7);
      const F6 = M(D7 - C9);
      const G6 = M(D7 + C9);
      const H6 = M(B7 - modP2(a5 * A7));
      const X32 = modP2(E6 * F6);
      const Y32 = modP2(G6 * H6);
      const T32 = modP2(E6 * H6);
      const Z32 = modP2(F6 * G6);
      return new _Point(X32, Y32, Z32, T32);
    }
    subtract(other) {
      return this.add(apoint(other).negate());
    }
    /**
     * Point-by-scalar multiplication. Safe mode requires `1 <= n < CURVE.n`.
     * Unsafe mode additionally permits `n = 0` and returns the identity point for that case.
     * Uses {@link wNAF} for base point.
     * Uses fake point to mitigate side-channel leakage.
     * @param n - scalar by which point is multiplied
     * @param safe - safe mode guards against timing attacks; unsafe mode is faster
     */
    multiply(n6, safe = true) {
      if (!safe && n6 === 0n)
        return I;
      assertRange(n6, 1n, N);
      if (!safe && this.is0())
        return I;
      if (n6 === 1n)
        return this;
      if (this.equals(G))
        return wNAF3(n6).p;
      let p7 = I;
      let f7 = G;
      for (let d6 = this; n6 > 0n; d6 = d6.double(), n6 >>= 1n) {
        if (n6 & 1n)
          p7 = p7.add(d6);
        else if (safe)
          f7 = f7.add(d6);
      }
      return p7;
    }
    multiplyUnsafe(scalar) {
      return this.multiply(scalar, false);
    }
    /** Convert point to 2d xy affine point. (X, Y, Z) ∋ (x=X/Z, y=Y/Z) */
    toAffine() {
      const { X: X4, Y: Y6, Z: Z6 } = this;
      if (this.equals(I))
        return { x: 0n, y: 1n };
      const iz = invert3(Z6, P);
      if (modP2(Z6 * iz) !== 1n)
        err("invalid inverse");
      const x13 = modP2(X4 * iz);
      const y11 = modP2(Y6 * iz);
      return { x: x13, y: y11 };
    }
    toBytes() {
      const { x: x13, y: y11 } = this.toAffine();
      const b9 = numTo32bLE(y11);
      b9[31] |= x13 & 1n ? 128 : 0;
      return b9;
    }
    toHex() {
      return bytesToHex4(this.toBytes());
    }
    clearCofactor() {
      return this.multiply(big(h), false);
    }
    isSmallOrder() {
      return this.clearCofactor().is0();
    }
    isTorsionFree() {
      let p7 = this.multiply(N / 2n, false).double();
      if (N % 2n)
        p7 = p7.add(this);
      return p7.is0();
    }
  };
  var G = new Point3(Gx, Gy, 1n, M(Gx * Gy));
  var I = new Point3(0n, 1n, 1n, 0n);
  Point3.BASE = G;
  Point3.ZERO = I;
  var numTo32bLE = (num2) => hexToBytes6(padh(assertRange(num2, 0n, B256), 64)).reverse();
  var bytesToNumberLE3 = (b9) => big("0x" + bytesToHex4(u8fr2(abytes4(b9)).reverse()));
  var pow23 = (x13, power) => {
    let r3 = x13;
    while (power-- > 0n) {
      r3 = modP2(r3 * r3);
    }
    return r3;
  };
  var pow_2_252_3 = (x13) => {
    const x22 = modP2(x13 * x13);
    const b22 = modP2(x22 * x13);
    const b42 = modP2(pow23(b22, 2n) * b22);
    const b52 = modP2(pow23(b42, 1n) * x13);
    const b10 = modP2(pow23(b52, 5n) * b52);
    const b20 = modP2(pow23(b10, 10n) * b10);
    const b40 = modP2(pow23(b20, 20n) * b20);
    const b80 = modP2(pow23(b40, 40n) * b40);
    const b160 = modP2(pow23(b80, 80n) * b80);
    const b240 = modP2(pow23(b160, 80n) * b80);
    const b250 = modP2(pow23(b240, 10n) * b10);
    const pow_p_5_8 = modP2(pow23(b250, 2n) * x13);
    return { pow_p_5_8, b2: b22 };
  };
  var RM1 = 0x2b8324804fc1df0b2b4d00993dfbd7a72f431806ad2fe478c4ee1b274a0ea0b0n;
  var uvRatio = (u4, v13) => {
    const v32 = modP2(v13 * modP2(v13 * v13));
    const v72 = modP2(modP2(v32 * v32) * v13);
    const pow = pow_2_252_3(modP2(u4 * v72)).pow_p_5_8;
    let x13 = modP2(u4 * modP2(v32 * pow));
    const vx2 = modP2(v13 * modP2(x13 * x13));
    const root1 = x13;
    const root2 = modP2(x13 * RM1);
    const useRoot1 = vx2 === u4;
    const useRoot2 = vx2 === M(-u4);
    const noRoot = vx2 === M(-u4 * RM1);
    if (useRoot1)
      x13 = root1;
    if (useRoot2 || noRoot)
      x13 = root2;
    if ((M(x13) & 1n) === 1n)
      x13 = M(-x13);
    return { isValid: useRoot1 || useRoot2, value: x13 };
  };
  var hashes = {
    sha512Async: async (message) => {
      const s3 = subtle();
      const m3 = concatBytes5(message);
      return u8n2(await s3.digest("SHA-512", m3.buffer));
    },
    sha512: void 0
  };
  var W = 8;
  var scalarBits = 256;
  var pwindows = Math.ceil(scalarBits / W) + 1;
  var pwindowSize = 2 ** (W - 1);
  var precompute = () => {
    const points = [];
    let p7 = G;
    let b9 = p7;
    for (let w7 = 0; w7 < pwindows; w7++) {
      b9 = p7;
      points.push(b9);
      for (let i5 = 1; i5 < pwindowSize; i5++) {
        b9 = b9.add(p7);
        points.push(b9);
      }
      p7 = b9.double();
    }
    return points;
  };
  var Gpows = void 0;
  var ctneg = (cnd, p7) => {
    const n6 = p7.negate();
    return cnd ? n6 : p7;
  };
  var wNAF3 = (n6) => {
    const comp = Gpows || (Gpows = precompute());
    let p7 = I;
    let f7 = G;
    const pow_2_w = 2 ** W;
    const maxNum = pow_2_w;
    const mask2 = big(pow_2_w - 1);
    const shiftBy = big(W);
    for (let w7 = 0; w7 < pwindows; w7++) {
      let wbits = Number(n6 & mask2);
      n6 >>= shiftBy;
      if (wbits > pwindowSize) {
        wbits -= maxNum;
        n6 += 1n;
      }
      const off = w7 * pwindowSize;
      const offF = off;
      const offP = off + Math.abs(wbits) - 1;
      const isEven = w7 % 2 !== 0;
      const isNeg = wbits < 0;
      if (wbits === 0) {
        f7 = f7.add(ctneg(isEven, comp[offF]));
      } else {
        p7 = p7.add(ctneg(isNeg, comp[offP]));
      }
    }
    if (n6 !== 0n)
      err("invalid wnaf");
    return { p: p7, f: f7 };
  };

  // ../../node_modules/.pnpm/ed25519-hd-key@2.0.0/node_modules/ed25519-hd-key/dist/utils.js
  init_node_compat_inject();
  var pathRegex = new RegExp("^m(\\/[0-9]+')+$");
  var replaceDerive = (val) => val.replace("'", "");

  // ../../node_modules/.pnpm/ed25519-hd-key@2.0.0/node_modules/ed25519-hd-key/dist/index.js
  hashes.sha512 = sha5122;
  var ED25519_CURVE = new TextEncoder().encode("ed25519 seed");
  var HARDENED_OFFSET2 = 2147483648;
  var getMasterKeyFromSeed = (seed) => {
    const I7 = hmac2(sha5122, ED25519_CURVE, hexToBytes5(seed));
    const IL = I7.slice(0, 32);
    const IR = I7.slice(32);
    return {
      key: IL,
      chainCode: IR
    };
  };
  var CKDPriv = ({ key: key2, chainCode }, index2) => {
    const indexBuffer = new Uint8Array(4);
    const view = new DataView(indexBuffer.buffer);
    view.setUint32(0, index2, false);
    const data = concatBytes4(new Uint8Array([0]), key2, indexBuffer);
    const I7 = hmac2(sha5122, chainCode, data);
    const IL = I7.slice(0, 32);
    const IR = I7.slice(32);
    return {
      key: IL,
      chainCode: IR
    };
  };
  var isValidPath = (path) => {
    if (!pathRegex.test(path)) {
      return false;
    }
    return !path.split("/").slice(1).map(replaceDerive).some(isNaN);
  };
  var derivePath = (path, seed, offset2 = HARDENED_OFFSET2) => {
    if (!isValidPath(path)) {
      throw new Error("Invalid derivation path");
    }
    const { key: key2, chainCode } = getMasterKeyFromSeed(seed);
    const segments = path.split("/").slice(1).map(replaceDerive).map((el) => parseInt(el, 10));
    return segments.reduce((parentKeys, segment) => CKDPriv(parentKeys, segment + offset2), {
      key: key2,
      chainCode
    });
  };

  // ../../node_modules/.pnpm/@solana+web3.js@1.98.4_buff_6f17b6c9c898c1292533d283a3755a43/node_modules/@solana/web3.js/lib/index.browser.esm.js
  init_node_compat_inject();
  var import_buffer4 = __toESM(require_buffer());

  // ../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/ed25519.js
  init_node_compat_inject();
  init_sha2();
  init_utils2();

  // ../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/edwards.js
  init_node_compat_inject();
  init_curve();
  init_modular();
  init_utils4();
  var _0n11 = BigInt(0);
  var _1n11 = BigInt(1);
  var _2n8 = BigInt(2);
  var _8n3 = BigInt(8);
  var VERIFY_DEFAULT = { zip215: true };
  function validateOpts2(curve) {
    const opts = validateBasic(curve);
    validateObject(curve, {
      hash: "function",
      a: "bigint",
      d: "bigint",
      randomBytes: "function"
    }, {
      adjustScalarBytes: "function",
      domain: "function",
      uvRatio: "function",
      mapToCurve: "function"
    });
    return Object.freeze({ ...opts });
  }
  function twistedEdwards(curveDef) {
    const CURVE = validateOpts2(curveDef);
    const { Fp: Fp3, n: CURVE_ORDER, prehash, hash: cHash, randomBytes: randomBytes3, nByteLength, h: cofactor } = CURVE;
    const MASK = _2n8 << BigInt(nByteLength * 8) - _1n11;
    const modP3 = Fp3.create;
    const Fn5 = Field(CURVE.n, CURVE.nBitLength);
    function isEdValidXY2(x13, y11) {
      const x22 = Fp3.sqr(x13);
      const y22 = Fp3.sqr(y11);
      const left = Fp3.add(Fp3.mul(CURVE.a, x22), y22);
      const right = Fp3.add(Fp3.ONE, Fp3.mul(CURVE.d, Fp3.mul(x22, y22)));
      return Fp3.eql(left, right);
    }
    if (!isEdValidXY2(CURVE.Gx, CURVE.Gy))
      throw new Error("bad curve params: generator point");
    const uvRatio4 = CURVE.uvRatio || ((u4, v13) => {
      try {
        return { isValid: true, value: Fp3.sqrt(u4 * Fp3.inv(v13)) };
      } catch (e2) {
        return { isValid: false, value: _0n11 };
      }
    });
    const adjustScalarBytes3 = CURVE.adjustScalarBytes || ((bytes) => bytes);
    const domain2 = CURVE.domain || ((data, ctx, phflag) => {
      abool("phflag", phflag);
      if (ctx.length || phflag)
        throw new Error("Contexts/pre-hash are not supported");
      return data;
    });
    function aCoordinate(title, n6, banZero = false) {
      const min = banZero ? _1n11 : _0n11;
      aInRange("coordinate " + title, n6, min, MASK);
    }
    function aextpoint(other) {
      if (!(other instanceof Point5))
        throw new Error("ExtendedPoint expected");
    }
    const toAffineMemo = memoized((p7, iz) => {
      const { ex: x13, ey: y11, ez: z11 } = p7;
      const is0 = p7.is0();
      if (iz == null)
        iz = is0 ? _8n3 : Fp3.inv(z11);
      const ax = modP3(x13 * iz);
      const ay = modP3(y11 * iz);
      const zz = modP3(z11 * iz);
      if (is0)
        return { x: _0n11, y: _1n11 };
      if (zz !== _1n11)
        throw new Error("invZ was invalid");
      return { x: ax, y: ay };
    });
    const assertValidMemo = memoized((p7) => {
      const { a: a5, d: d6 } = CURVE;
      if (p7.is0())
        throw new Error("bad point: ZERO");
      const { ex: X4, ey: Y6, ez: Z6, et: T6 } = p7;
      const X22 = modP3(X4 * X4);
      const Y22 = modP3(Y6 * Y6);
      const Z22 = modP3(Z6 * Z6);
      const Z42 = modP3(Z22 * Z22);
      const aX2 = modP3(X22 * a5);
      const left = modP3(Z22 * modP3(aX2 + Y22));
      const right = modP3(Z42 + modP3(d6 * modP3(X22 * Y22)));
      if (left !== right)
        throw new Error("bad point: equation left != right (1)");
      const XY = modP3(X4 * Y6);
      const ZT = modP3(Z6 * T6);
      if (XY !== ZT)
        throw new Error("bad point: equation left != right (2)");
      return true;
    });
    class Point5 {
      constructor(ex, ey, ez, et6) {
        aCoordinate("x", ex);
        aCoordinate("y", ey);
        aCoordinate("z", ez, true);
        aCoordinate("t", et6);
        this.ex = ex;
        this.ey = ey;
        this.ez = ez;
        this.et = et6;
        Object.freeze(this);
      }
      get x() {
        return this.toAffine().x;
      }
      get y() {
        return this.toAffine().y;
      }
      static fromAffine(p7) {
        if (p7 instanceof Point5)
          throw new Error("extended point not allowed");
        const { x: x13, y: y11 } = p7 || {};
        aCoordinate("x", x13);
        aCoordinate("y", y11);
        return new Point5(x13, y11, _1n11, modP3(x13 * y11));
      }
      static normalizeZ(points) {
        const toInv = FpInvertBatch(Fp3, points.map((p7) => p7.ez));
        return points.map((p7, i5) => p7.toAffine(toInv[i5])).map(Point5.fromAffine);
      }
      // Multiscalar Multiplication
      static msm(points, scalars) {
        return pippenger(Point5, Fn5, points, scalars);
      }
      // "Private method", don't use it directly
      _setWindowSize(windowSize) {
        wnaf.setWindowSize(this, windowSize);
      }
      // Not required for fromHex(), which always creates valid points.
      // Could be useful for fromAffine().
      assertValidity() {
        assertValidMemo(this);
      }
      // Compare one point to another.
      equals(other) {
        aextpoint(other);
        const { ex: X1, ey: Y1, ez: Z1 } = this;
        const { ex: X22, ey: Y22, ez: Z22 } = other;
        const X1Z2 = modP3(X1 * Z22);
        const X2Z1 = modP3(X22 * Z1);
        const Y1Z2 = modP3(Y1 * Z22);
        const Y2Z1 = modP3(Y22 * Z1);
        return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;
      }
      is0() {
        return this.equals(Point5.ZERO);
      }
      negate() {
        return new Point5(modP3(-this.ex), this.ey, this.ez, modP3(-this.et));
      }
      // Fast algo for doubling Extended Point.
      // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd
      // Cost: 4M + 4S + 1*a + 6add + 1*2.
      double() {
        const { a: a5 } = CURVE;
        const { ex: X1, ey: Y1, ez: Z1 } = this;
        const A7 = modP3(X1 * X1);
        const B7 = modP3(Y1 * Y1);
        const C9 = modP3(_2n8 * modP3(Z1 * Z1));
        const D7 = modP3(a5 * A7);
        const x1y1 = X1 + Y1;
        const E6 = modP3(modP3(x1y1 * x1y1) - A7 - B7);
        const G7 = D7 + B7;
        const F6 = G7 - C9;
        const H6 = D7 - B7;
        const X32 = modP3(E6 * F6);
        const Y32 = modP3(G7 * H6);
        const T32 = modP3(E6 * H6);
        const Z32 = modP3(F6 * G7);
        return new Point5(X32, Y32, Z32, T32);
      }
      // Fast algo for adding 2 Extended Points.
      // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd
      // Cost: 9M + 1*a + 1*d + 7add.
      add(other) {
        aextpoint(other);
        const { a: a5, d: d6 } = CURVE;
        const { ex: X1, ey: Y1, ez: Z1, et: T1 } = this;
        const { ex: X22, ey: Y22, ez: Z22, et: T22 } = other;
        const A7 = modP3(X1 * X22);
        const B7 = modP3(Y1 * Y22);
        const C9 = modP3(T1 * d6 * T22);
        const D7 = modP3(Z1 * Z22);
        const E6 = modP3((X1 + Y1) * (X22 + Y22) - A7 - B7);
        const F6 = D7 - C9;
        const G7 = D7 + C9;
        const H6 = modP3(B7 - a5 * A7);
        const X32 = modP3(E6 * F6);
        const Y32 = modP3(G7 * H6);
        const T32 = modP3(E6 * H6);
        const Z32 = modP3(F6 * G7);
        return new Point5(X32, Y32, Z32, T32);
      }
      subtract(other) {
        return this.add(other.negate());
      }
      wNAF(n6) {
        return wnaf.wNAFCached(this, n6, Point5.normalizeZ);
      }
      // Constant-time multiplication.
      multiply(scalar) {
        const n6 = scalar;
        aInRange("scalar", n6, _1n11, CURVE_ORDER);
        const { p: p7, f: f7 } = this.wNAF(n6);
        return Point5.normalizeZ([p7, f7])[0];
      }
      // Non-constant-time multiplication. Uses double-and-add algorithm.
      // It's faster, but should only be used when you don't care about
      // an exposed private key e.g. sig verification.
      // Does NOT allow scalars higher than CURVE.n.
      // Accepts optional accumulator to merge with multiply (important for sparse scalars)
      multiplyUnsafe(scalar, acc = Point5.ZERO) {
        const n6 = scalar;
        aInRange("scalar", n6, _0n11, CURVE_ORDER);
        if (n6 === _0n11)
          return I7;
        if (this.is0() || n6 === _1n11)
          return this;
        return wnaf.wNAFCachedUnsafe(this, n6, Point5.normalizeZ, acc);
      }
      // Checks if point is of small order.
      // If you add something to small order point, you will have "dirty"
      // point with torsion component.
      // Multiplies point by cofactor and checks if the result is 0.
      isSmallOrder() {
        return this.multiplyUnsafe(cofactor).is0();
      }
      // Multiplies point by curve order and checks if the result is 0.
      // Returns `false` is the point is dirty.
      isTorsionFree() {
        return wnaf.unsafeLadder(this, CURVE_ORDER).is0();
      }
      // Converts Extended point to default (x, y) coordinates.
      // Can accept precomputed Z^-1 - for example, from invertBatch.
      toAffine(iz) {
        return toAffineMemo(this, iz);
      }
      clearCofactor() {
        const { h: cofactor2 } = CURVE;
        if (cofactor2 === _1n11)
          return this;
        return this.multiplyUnsafe(cofactor2);
      }
      // Converts hash string or Uint8Array to Point.
      // Uses algo from RFC8032 5.1.3.
      static fromHex(hex3, zip215 = false) {
        const { d: d6, a: a5 } = CURVE;
        const len = Fp3.BYTES;
        hex3 = ensureBytes("pointHex", hex3, len);
        abool("zip215", zip215);
        const normed = hex3.slice();
        const lastByte = hex3[len - 1];
        normed[len - 1] = lastByte & ~128;
        const y11 = bytesToNumberLE(normed);
        const max = zip215 ? MASK : Fp3.ORDER;
        aInRange("pointHex.y", y11, _0n11, max);
        const y22 = modP3(y11 * y11);
        const u4 = modP3(y22 - _1n11);
        const v13 = modP3(d6 * y22 - a5);
        let { isValid, value: x13 } = uvRatio4(u4, v13);
        if (!isValid)
          throw new Error("Point.fromHex: invalid y coordinate");
        const isXOdd = (x13 & _1n11) === _1n11;
        const isLastByteOdd = (lastByte & 128) !== 0;
        if (!zip215 && x13 === _0n11 && isLastByteOdd)
          throw new Error("Point.fromHex: x=0 and x_0=1");
        if (isLastByteOdd !== isXOdd)
          x13 = modP3(-x13);
        return Point5.fromAffine({ x: x13, y: y11 });
      }
      static fromPrivateKey(privKey) {
        const { scalar } = getPrivateScalar(privKey);
        return G6.multiply(scalar);
      }
      toRawBytes() {
        const { x: x13, y: y11 } = this.toAffine();
        const bytes = numberToBytesLE(y11, Fp3.BYTES);
        bytes[bytes.length - 1] |= x13 & _1n11 ? 128 : 0;
        return bytes;
      }
      toHex() {
        return bytesToHex3(this.toRawBytes());
      }
    }
    Point5.BASE = new Point5(CURVE.Gx, CURVE.Gy, _1n11, modP3(CURVE.Gx * CURVE.Gy));
    Point5.ZERO = new Point5(_0n11, _1n11, _1n11, _0n11);
    const { BASE: G6, ZERO: I7 } = Point5;
    const wnaf = wNAF(Point5, nByteLength * 8);
    function modN2(a5) {
      return mod(a5, CURVE_ORDER);
    }
    function modN_LE(hash5) {
      return modN2(bytesToNumberLE(hash5));
    }
    function getPrivateScalar(key2) {
      const len = Fp3.BYTES;
      key2 = ensureBytes("private key", key2, len);
      const hashed = ensureBytes("hashed private key", cHash(key2), 2 * len);
      const head = adjustScalarBytes3(hashed.slice(0, len));
      const prefix = hashed.slice(len, 2 * len);
      const scalar = modN_LE(head);
      return { head, prefix, scalar };
    }
    function getExtendedPublicKey(key2) {
      const { head, prefix, scalar } = getPrivateScalar(key2);
      const point3 = G6.multiply(scalar);
      const pointBytes = point3.toRawBytes();
      return { head, prefix, scalar, point: point3, pointBytes };
    }
    function getPublicKey2(privKey) {
      return getExtendedPublicKey(privKey).pointBytes;
    }
    function hashDomainToScalar(context = Uint8Array.of(), ...msgs) {
      const msg = concatBytes3(...msgs);
      return modN_LE(cHash(domain2(msg, ensureBytes("context", context), !!prehash)));
    }
    function sign6(msg, privKey, options = {}) {
      msg = ensureBytes("message", msg);
      if (prehash)
        msg = prehash(msg);
      const { prefix, scalar, pointBytes } = getExtendedPublicKey(privKey);
      const r3 = hashDomainToScalar(options.context, prefix, msg);
      const R6 = G6.multiply(r3).toRawBytes();
      const k7 = hashDomainToScalar(options.context, R6, pointBytes, msg);
      const s3 = modN2(r3 + k7 * scalar);
      aInRange("signature.s", s3, _0n11, CURVE_ORDER);
      const res = concatBytes3(R6, numberToBytesLE(s3, Fp3.BYTES));
      return ensureBytes("result", res, Fp3.BYTES * 2);
    }
    const verifyOpts = VERIFY_DEFAULT;
    function verify5(sig, msg, publicKey3, options = verifyOpts) {
      const { context, zip215 } = options;
      const len = Fp3.BYTES;
      sig = ensureBytes("signature", sig, 2 * len);
      msg = ensureBytes("message", msg);
      publicKey3 = ensureBytes("publicKey", publicKey3, len);
      if (zip215 !== void 0)
        abool("zip215", zip215);
      if (prehash)
        msg = prehash(msg);
      const s3 = bytesToNumberLE(sig.slice(len, 2 * len));
      let A7, R6, SB;
      try {
        A7 = Point5.fromHex(publicKey3, zip215);
        R6 = Point5.fromHex(sig.slice(0, len), zip215);
        SB = G6.multiplyUnsafe(s3);
      } catch (error51) {
        return false;
      }
      if (!zip215 && A7.isSmallOrder())
        return false;
      const k7 = hashDomainToScalar(context, R6.toRawBytes(), A7.toRawBytes(), msg);
      const RkA = R6.add(A7.multiplyUnsafe(k7));
      return RkA.subtract(SB).clearCofactor().equals(Point5.ZERO);
    }
    G6._setWindowSize(8);
    const utils = {
      getExtendedPublicKey,
      /** ed25519 priv keys are uniform 32b. No need to check for modulo bias, like in secp256k1. */
      randomPrivateKey: () => randomBytes3(Fp3.BYTES),
      /**
       * We're doing scalar multiplication (used in getPublicKey etc) with precomputed BASE_POINT
       * values. This slows down first getPublicKey() by milliseconds (see Speed section),
       * but allows to speed-up subsequent getPublicKey() calls up to 20x.
       * @param windowSize 2, 4, 8, 16
       */
      precompute(windowSize = 8, point3 = Point5.BASE) {
        point3._setWindowSize(windowSize);
        point3.multiply(BigInt(3));
        return point3;
      }
    };
    return {
      CURVE,
      getPublicKey: getPublicKey2,
      sign: sign6,
      verify: verify5,
      ExtendedPoint: Point5,
      utils
    };
  }

  // ../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/ed25519.js
  init_modular();
  var ED25519_P = BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949");
  var ED25519_SQRT_M1 = /* @__PURE__ */ BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");
  var _0n12 = BigInt(0);
  var _1n12 = BigInt(1);
  var _2n9 = BigInt(2);
  var _3n5 = BigInt(3);
  var _5n3 = BigInt(5);
  var _8n4 = BigInt(8);
  function ed25519_pow_2_252_3(x13) {
    const _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);
    const P8 = ED25519_P;
    const x22 = x13 * x13 % P8;
    const b22 = x22 * x13 % P8;
    const b42 = pow2(b22, _2n9, P8) * b22 % P8;
    const b52 = pow2(b42, _1n12, P8) * x13 % P8;
    const b10 = pow2(b52, _5n3, P8) * b52 % P8;
    const b20 = pow2(b10, _10n, P8) * b10 % P8;
    const b40 = pow2(b20, _20n, P8) * b20 % P8;
    const b80 = pow2(b40, _40n, P8) * b40 % P8;
    const b160 = pow2(b80, _80n, P8) * b80 % P8;
    const b240 = pow2(b160, _80n, P8) * b80 % P8;
    const b250 = pow2(b240, _10n, P8) * b10 % P8;
    const pow_p_5_8 = pow2(b250, _2n9, P8) * x13 % P8;
    return { pow_p_5_8, b2: b22 };
  }
  function adjustScalarBytes(bytes) {
    bytes[0] &= 248;
    bytes[31] &= 127;
    bytes[31] |= 64;
    return bytes;
  }
  function uvRatio2(u4, v13) {
    const P8 = ED25519_P;
    const v32 = mod(v13 * v13 * v13, P8);
    const v72 = mod(v32 * v32 * v13, P8);
    const pow = ed25519_pow_2_252_3(u4 * v72).pow_p_5_8;
    let x13 = mod(u4 * v32 * pow, P8);
    const vx2 = mod(v13 * x13 * x13, P8);
    const root1 = x13;
    const root2 = mod(x13 * ED25519_SQRT_M1, P8);
    const useRoot1 = vx2 === u4;
    const useRoot2 = vx2 === mod(-u4, P8);
    const noRoot = vx2 === mod(-u4 * ED25519_SQRT_M1, P8);
    if (useRoot1)
      x13 = root1;
    if (useRoot2 || noRoot)
      x13 = root2;
    if (isNegativeLE(x13, P8))
      x13 = mod(-x13, P8);
    return { isValid: useRoot1 || useRoot2, value: x13 };
  }
  var Fp = /* @__PURE__ */ (() => Field(ED25519_P, void 0, true))();
  var ed25519Defaults = /* @__PURE__ */ (() => ({
    // Removing Fp.create() will still work, and is 10% faster on sign
    a: Fp.create(BigInt(-1)),
    // d is -121665/121666 a.k.a. Fp.neg(121665 * Fp.inv(121666))
    d: BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),
    // Finite field 2n**255n - 19n
    Fp,
    // Subgroup order 2n**252n + 27742317777372353535851937790883648493n;
    n: BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),
    h: _8n4,
    Gx: BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),
    Gy: BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),
    hash: sha512,
    randomBytes,
    adjustScalarBytes,
    // dom2
    // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.
    // Constant-time, u/√v
    uvRatio: uvRatio2
  }))();
  var ed25519 = /* @__PURE__ */ (() => twistedEdwards(ed25519Defaults))();

  // ../../node_modules/.pnpm/@solana+web3.js@1.98.4_buff_6f17b6c9c898c1292533d283a3755a43/node_modules/@solana/web3.js/lib/index.browser.esm.js
  var import_bn = __toESM(require_bn());
  var import_bs58 = __toESM(require_bs58());
  var import_borsh = __toESM(require_lib());
  var BufferLayout = __toESM(require_Layout());
  var import_buffer_layout = __toESM(require_Layout());

  // ../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.9.3/node_modules/@solana/codecs-numbers/dist/index.browser.mjs
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@solana+errors@2.3.0_typescript@5.9.3/node_modules/@solana/errors/dist/index.browser.mjs
  init_node_compat_inject();
  var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 1;
  var SOLANA_ERROR__INVALID_NONCE = 2;
  var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 3;
  var SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE = 4;
  var SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH = 5;
  var SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE = 6;
  var SOLANA_ERROR__MALFORMED_BIGINT_STRING = 7;
  var SOLANA_ERROR__MALFORMED_NUMBER_STRING = 8;
  var SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE = 9;
  var SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR = 10;
  var SOLANA_ERROR__JSON_RPC__PARSE_ERROR = -32700;
  var SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR = -32603;
  var SOLANA_ERROR__JSON_RPC__INVALID_PARAMS = -32602;
  var SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND = -32601;
  var SOLANA_ERROR__JSON_RPC__INVALID_REQUEST = -32600;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED = -32016;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION = -32015;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET = -32014;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH = -32013;
  var SOLANA_ERROR__JSON_RPC__SCAN_ERROR = -32012;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE = -32011;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX = -32010;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED = -32009;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT = -32008;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED = -32007;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE = -32006;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY = -32005;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE = -32004;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE = -32003;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE = -32002;
  var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP = -32001;
  var SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH = 28e5;
  var SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE = 2800001;
  var SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS = 2800002;
  var SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY = 2800003;
  var SOLANA_ERROR__ADDRESSES__MALFORMED_PDA = 2800004;
  var SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE = 2800005;
  var SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED = 2800006;
  var SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED = 2800007;
  var SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE = 2800008;
  var SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED = 2800009;
  var SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER = 2800010;
  var SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS = 2800011;
  var SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND = 323e4;
  var SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND = 32300001;
  var SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT = 3230002;
  var SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT = 3230003;
  var SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED = 3230004;
  var SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT = 361e4;
  var SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED = 3610001;
  var SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED = 3610002;
  var SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED = 3610003;
  var SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED = 3610004;
  var SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED = 3610005;
  var SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED = 3610006;
  var SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY = 3610007;
  var SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED = 3611e3;
  var SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH = 3704e3;
  var SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH = 3704001;
  var SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH = 3704002;
  var SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE = 3704003;
  var SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY = 3704004;
  var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS = 4128e3;
  var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA = 4128001;
  var SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH = 4128002;
  var SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN = 4615e3;
  var SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR = 4615001;
  var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT = 4615002;
  var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA = 4615003;
  var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA = 4615004;
  var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL = 4615005;
  var SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS = 4615006;
  var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID = 4615007;
  var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE = 4615008;
  var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED = 4615009;
  var SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT = 4615010;
  var SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION = 4615011;
  var SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID = 4615012;
  var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;
  var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;
  var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE = 4615015;
  var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED = 4615016;
  var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX = 4615017;
  var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED = 4615018;
  var SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED = 4615019;
  var SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS = 4615020;
  var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED = 4615021;
  var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE = 4615022;
  var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED = 4615023;
  var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 4615024;
  var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;
  var SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM = 4615026;
  var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR = 4615027;
  var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED = 4615028;
  var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE = 4615029;
  var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;
  var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID = 4615031;
  var SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH = 4615032;
  var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT = 4615033;
  var SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED = 4615034;
  var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED = 4615035;
  var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS = 4615036;
  var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC = 4615037;
  var SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;
  var SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION = 4615039;
  var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;
  var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE = 4615041;
  var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE = 4615042;
  var SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE = 4615043;
  var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY = 4615044;
  var SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR = 4615045;
  var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT = 4615046;
  var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER = 4615047;
  var SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW = 4615048;
  var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR = 4615049;
  var SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER = 4615050;
  var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;
  var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED = 4615052;
  var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;
  var SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;
  var SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS = 5508e3;
  var SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER = 5508001;
  var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER = 5508002;
  var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER = 5508003;
  var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER = 5508004;
  var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER = 5508005;
  var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER = 5508006;
  var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER = 5508007;
  var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER = 5508008;
  var SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS = 5508009;
  var SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING = 5508010;
  var SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED = 5508011;
  var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES = 5663e3;
  var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE = 5663001;
  var SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME = 5663002;
  var SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME = 5663003;
  var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = 5663004;
  var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING = 5663005;
  var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE = 5663006;
  var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND = 5663007;
  var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING = 5663008;
  var SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = 5663009;
  var SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING = 5663010;
  var SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING = 5663011;
  var SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING = 5663012;
  var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING = 5663013;
  var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE = 5663014;
  var SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION = 5663015;
  var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES = 5663016;
  var SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH = 5663017;
  var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT = 5663018;
  var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT = 5663019;
  var SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT = 5663020;
  var SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN = 705e4;
  var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE = 7050001;
  var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE = 7050002;
  var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND = 7050003;
  var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND = 7050004;
  var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE = 7050005;
  var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE = 7050006;
  var SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED = 7050007;
  var SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND = 7050008;
  var SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP = 7050009;
  var SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE = 7050010;
  var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX = 7050011;
  var SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE = 7050012;
  var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION = 7050013;
  var SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE = 7050014;
  var SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE = 7050015;
  var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 7050016;
  var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = 7050017;
  var SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION = 7050018;
  var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT = 7050019;
  var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = 7050020;
  var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = 7050021;
  var SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS = 7050022;
  var SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND = 7050023;
  var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER = 7050024;
  var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA = 7050025;
  var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX = 7050026;
  var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT = 7050027;
  var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT = 7050028;
  var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = 7050029;
  var SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION = 7050030;
  var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT = 7050031;
  var SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 7050032;
  var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 7050033;
  var SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED = 7050034;
  var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = 7050035;
  var SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION = 7050036;
  var SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY = 8078e3;
  var SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH = 8078001;
  var SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH = 8078002;
  var SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH = 8078003;
  var SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH = 8078004;
  var SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH = 8078005;
  var SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH = 8078006;
  var SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS = 8078007;
  var SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE = 8078008;
  var SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT = 8078009;
  var SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT = 8078010;
  var SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE = 8078011;
  var SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE = 8078012;
  var SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH = 8078013;
  var SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE = 8078014;
  var SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT = 8078015;
  var SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE = 8078016;
  var SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE = 8078017;
  var SOLANA_ERROR__CODECS__INVALID_CONSTANT = 8078018;
  var SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE = 8078019;
  var SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL = 8078020;
  var SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES = 8078021;
  var SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS = 8078022;
  var SOLANA_ERROR__RPC__INTEGER_OVERFLOW = 81e5;
  var SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN = 8100001;
  var SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR = 8100002;
  var SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD = 8100003;
  var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN = 819e4;
  var SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID = 8190001;
  var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED = 8190002;
  var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED = 8190003;
  var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT = 8190004;
  var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING = 99e5;
  var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE = 9900001;
  var SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING = 9900002;
  var SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE = 9900003;
  var SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED = 9900004;
  var SolanaErrorMessages = {
    [SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND]: "Account not found at address: $address",
    [SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED]: "Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",
    [SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT]: "Expected decoded account at address: $address",
    [SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT]: "Failed to decode account data at address: $address",
    [SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND]: "Accounts not found at addresses: $addresses",
    [SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED]: "Unable to find a viable program address bump seed.",
    [SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS]: "$putativeAddress is not a base58-encoded address.",
    [SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH]: "Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",
    [SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY]: "The `CryptoKey` must be an `Ed25519` public key.",
    [SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS]: "$putativeOffCurveAddress is not a base58-encoded off-curve address.",
    [SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE]: "Invalid seeds; point must fall off the Ed25519 curve.",
    [SOLANA_ERROR__ADDRESSES__MALFORMED_PDA]: "Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",
    [SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED]: "A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",
    [SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED]: "The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",
    [SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE]: "Expected program derived address bump to be in the range [0, 255], got: $bump.",
    [SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER]: "Program address cannot end with PDA marker.",
    [SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE]: "Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",
    [SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE]: "Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",
    [SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: "The network has progressed past the last block for which this transaction could have been committed.",
    [SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY]: "Codec [$codecDescription] cannot decode empty byte arrays.",
    [SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS]: "Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",
    [SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL]: "Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",
    [SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH]: "Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",
    [SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH]: "Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",
    [SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH]: "Encoder and decoder must either both be fixed-size or variable-size.",
    [SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE]: "Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",
    [SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH]: "Expected a fixed-size codec, got a variable-size one.",
    [SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH]: "Codec [$codecDescription] expected a positive byte length, got $bytesLength.",
    [SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH]: "Expected a variable-size codec, got a fixed-size one.",
    [SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE]: "Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",
    [SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH]: "Codec [$codecDescription] expected $expected bytes, got $bytesLength.",
    [SOLANA_ERROR__CODECS__INVALID_CONSTANT]: "Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",
    [SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT]: "Invalid discriminated union variant. Expected one of [$variants], got $value.",
    [SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT]: "Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",
    [SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT]: "Invalid literal union variant. Expected one of [$variants], got $value.",
    [SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS]: "Expected [$codecDescription] to have $expected items, got $actual.",
    [SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE]: "Invalid value $value for base $base with alphabet $alphabet.",
    [SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE]: "Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",
    [SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE]: "Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",
    [SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE]: "Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",
    [SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES]: "Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",
    [SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE]: "Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",
    [SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED]: "No random values implementation could be found.",
    [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED]: "instruction requires an uninitialized account",
    [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED]: "instruction tries to borrow reference for an account which is already borrowed",
    [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: "instruction left account with an outstanding borrowed reference",
    [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED]: "program other than the account's owner changed the size of the account data",
    [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL]: "account data too small for instruction",
    [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE]: "instruction expected an executable account",
    [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT]: "An account does not have enough lamports to be rent-exempt",
    [SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW]: "Program arithmetic overflowed",
    [SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR]: "Failed to serialize or deserialize account data: $encodedData",
    [SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: "Builtin programs must consume compute units",
    [SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH]: "Cross-program invocation call depth too deep",
    [SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED]: "Computational budget exceeded",
    [SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM]: "custom program error: #$code",
    [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX]: "instruction contains duplicate accounts",
    [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC]: "instruction modifications of multiply-passed account differ",
    [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: "executable accounts must be rent exempt",
    [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED]: "instruction changed executable accounts data",
    [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE]: "instruction changed the balance of an executable account",
    [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED]: "instruction changed executable bit of an account",
    [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED]: "instruction modified data of an account it does not own",
    [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND]: "instruction spent from the balance of an account it does not own",
    [SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR]: "generic instruction error",
    [SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER]: "Provided owner is not allowed",
    [SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE]: "Account is immutable",
    [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY]: "Incorrect authority provided",
    [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID]: "incorrect program id for instruction",
    [SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS]: "insufficient funds for instruction",
    [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA]: "invalid account data for instruction",
    [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER]: "Invalid account owner",
    [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT]: "invalid program argument",
    [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR]: "program returned invalid error code",
    [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA]: "invalid instruction data",
    [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC]: "Failed to reallocate account data",
    [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS]: "Provided seeds do not result in a valid address",
    [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: "Accounts data allocations exceeded the maximum allowed per transaction",
    [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED]: "Max accounts exceeded",
    [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: "Max instruction trace length exceeded",
    [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED]: "Length of the seed is too long for address generation",
    [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT]: "An account required by the instruction is missing",
    [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE]: "missing required signature for instruction",
    [SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID]: "instruction illegally modified the program id of an account",
    [SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS]: "insufficient account keys for instruction",
    [SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION]: "Cross-program invocation with unauthorized signer or writable account",
    [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE]: "Failed to create program execution environment",
    [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE]: "Program failed to compile",
    [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE]: "Program failed to complete",
    [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED]: "instruction modified data of a read-only account",
    [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE]: "instruction changed the balance of a read-only account",
    [SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED]: "Cross-program invocation reentrancy not allowed for this instruction",
    [SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED]: "instruction modified rent epoch of an account",
    [SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION]: "sum of account balances before and after instruction do not match",
    [SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT]: "instruction requires an initialized account",
    [SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN]: "",
    [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID]: "Unsupported program id",
    [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR]: "Unsupported sysvar",
    [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS]: "The instruction does not have any accounts.",
    [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA]: "The instruction does not have any data.",
    [SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH]: "Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",
    [SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH]: "Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",
    [SOLANA_ERROR__INVALID_NONCE]: "The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",
    [SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING]: "Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
    [SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED]: "Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",
    [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE]: "Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
    [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING]: "Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
    [SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE]: "Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
    [SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR]: "JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",
    [SOLANA_ERROR__JSON_RPC__INVALID_PARAMS]: "JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",
    [SOLANA_ERROR__JSON_RPC__INVALID_REQUEST]: "JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",
    [SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND]: "JSON-RPC error: The method does not exist / is not available ($__serverMessage)",
    [SOLANA_ERROR__JSON_RPC__PARSE_ERROR]: "JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",
    [SOLANA_ERROR__JSON_RPC__SCAN_ERROR]: "$__serverMessage",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP]: "$__serverMessage",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE]: "$__serverMessage",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET]: "$__serverMessage",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX]: "$__serverMessage",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED]: "$__serverMessage",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED]: "Minimum context slot has not been reached",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY]: "Node is unhealthy; behind by $numSlotsBehind slots",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT]: "No snapshot",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE]: "Transaction simulation failed",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED]: "$__serverMessage",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE]: "Transaction history is not available from this node",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE]: "$__serverMessage",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH]: "Transaction signature length mismatch",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE]: "Transaction signature verification failure",
    [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION]: "$__serverMessage",
    [SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH]: "Key pair bytes must be of length 64, got $byteLength.",
    [SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH]: "Expected private key bytes with length 32. Actual length: $actualLength.",
    [SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH]: "Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",
    [SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY]: "The provided private key does not match the provided public key.",
    [SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE]: "Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",
    [SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE]: "Lamports value must be in the range [0, 2e64-1]",
    [SOLANA_ERROR__MALFORMED_BIGINT_STRING]: "`$value` cannot be parsed as a `BigInt`",
    [SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR]: "$message",
    [SOLANA_ERROR__MALFORMED_NUMBER_STRING]: "`$value` cannot be parsed as a `Number`",
    [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: "No nonce account could be found at address `$nonceAccountAddress`",
    [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN]: "The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",
    [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED]: "WebSocket was closed before payload could be added to the send buffer",
    [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED]: "WebSocket connection closed",
    [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT]: "WebSocket failed to connect",
    [SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID]: "Failed to obtain a subscription id from the server",
    [SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD]: "Could not find an API plan for RPC method: `$method`",
    [SOLANA_ERROR__RPC__INTEGER_OVERFLOW]: "The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",
    [SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR]: "HTTP error ($statusCode): $message",
    [SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN]: "HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",
    [SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS]: "Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",
    [SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER]: "The provided value does not implement the `KeyPairSigner` interface",
    [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER]: "The provided value does not implement the `MessageModifyingSigner` interface",
    [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER]: "The provided value does not implement the `MessagePartialSigner` interface",
    [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER]: "The provided value does not implement any of the `MessageSigner` interfaces",
    [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER]: "The provided value does not implement the `TransactionModifyingSigner` interface",
    [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER]: "The provided value does not implement the `TransactionPartialSigner` interface",
    [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER]: "The provided value does not implement the `TransactionSendingSigner` interface",
    [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER]: "The provided value does not implement any of the `TransactionSigner` interfaces",
    [SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS]: "More than one `TransactionSendingSigner` was identified.",
    [SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING]: "No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",
    [SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED]: "Wallet account signers do not support signing multiple messages/transactions in a single operation",
    [SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY]: "Cannot export a non-extractable key.",
    [SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED]: "No digest implementation could be found.",
    [SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT]: "Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",
    [SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED]: "This runtime does not support the generation of Ed25519 key pairs.\n\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\n\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.",
    [SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED]: "No signature verification implementation could be found.",
    [SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED]: "No key generation implementation could be found.",
    [SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED]: "No signing implementation could be found.",
    [SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED]: "No key export implementation could be found.",
    [SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE]: "Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",
    [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: "Transaction processing left an account with an outstanding borrowed reference",
    [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE]: "Account in use",
    [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE]: "Account loaded twice",
    [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND]: "Attempt to debit an account but found no record of a prior credit.",
    [SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND]: "Transaction loads an address table account that doesn't exist",
    [SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED]: "This transaction has already been processed",
    [SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND]: "Blockhash not found",
    [SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP]: "Loader call chain is too deep",
    [SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE]: "Transactions are currently disabled due to cluster maintenance",
    [SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION]: "Transaction contains a duplicate instruction ($index) that is not allowed",
    [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE]: "Insufficient funds for fee",
    [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT]: "Transaction results in an account ($accountIndex) with insufficient funds for rent",
    [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE]: "This account may not be used to pay transaction fees",
    [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX]: "Transaction contains an invalid account reference",
    [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA]: "Transaction loads an address table account with invalid data",
    [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX]: "Transaction address table lookup uses an invalid index",
    [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER]: "Transaction loads an address table account with an invalid owner",
    [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT]: "LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",
    [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION]: "This program may not be used for executing instructions",
    [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT]: "Transaction leaves an account with a lower balance than rent-exempt minimum",
    [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT]: "Transaction loads a writable account that cannot be written",
    [SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED]: "Transaction exceeded max loaded accounts data size cap",
    [SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE]: "Transaction requires a fee but has no signature present",
    [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND]: "Attempt to load a program that does not exist",
    [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: "Execution of the program referenced by account at index $accountIndex is temporarily restricted.",
    [SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED]: "ResanitizationNeeded",
    [SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE]: "Transaction failed to sanitize accounts offsets correctly",
    [SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE]: "Transaction did not pass signature verification",
    [SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS]: "Transaction locked too many accounts",
    [SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION]: "Sum of account balances before and after transaction do not match",
    [SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN]: "The transaction failed with the error `$errorName`",
    [SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION]: "Transaction version is unsupported",
    [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT]: "Transaction would exceed account data limit within the block",
    [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT]: "Transaction would exceed total account data limit",
    [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: "Transaction would exceed max account limit within the block",
    [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: "Transaction would exceed max Block Cost Limit",
    [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: "Transaction would exceed max Vote Cost Limit",
    [SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION]: "Attempted to sign a transaction with an address that is not a signer for it",
    [SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING]: "Transaction is missing an address at index: $index.",
    [SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES]: "Transaction has no expected signers therefore it cannot be encoded",
    [SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT]: "Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",
    [SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME]: "Transaction does not have a blockhash lifetime",
    [SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME]: "Transaction is not a durable nonce transaction",
    [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING]: "Contents of these address lookup tables unknown: $lookupTableAddresses",
    [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE]: "Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",
    [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING]: "No fee payer set in CompiledTransaction",
    [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND]: "Could not find program address at index $index",
    [SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT]: "Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",
    [SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT]: "Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",
    [SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING]: "Transaction is missing a fee payer.",
    [SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING]: "Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",
    [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE]: "Transaction first instruction is not advance nonce account instruction.",
    [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING]: "Transaction with no instructions cannot be durable nonce transaction.",
    [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES]: "This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",
    [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE]: "This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",
    [SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH]: "The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.",
    [SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING]: "Transaction is missing signatures for addresses: $addresses.",
    [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE]: "Transaction version must be in the range [0, 127]. `$actualVersion` given"
  };
  var START_INDEX = "i";
  var TYPE = "t";
  function getHumanReadableErrorMessage(code2, context = {}) {
    const messageFormatString = SolanaErrorMessages[code2];
    if (messageFormatString.length === 0) {
      return "";
    }
    let state;
    function commitStateUpTo(endIndex) {
      if (state[TYPE] === 2) {
        const variableName = messageFormatString.slice(state[START_INDEX] + 1, endIndex);
        fragments.push(
          variableName in context ? (
            // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
            `${context[variableName]}`
          ) : `$${variableName}`
        );
      } else if (state[TYPE] === 1) {
        fragments.push(messageFormatString.slice(state[START_INDEX], endIndex));
      }
    }
    const fragments = [];
    messageFormatString.split("").forEach((char, ii2) => {
      if (ii2 === 0) {
        state = {
          [START_INDEX]: 0,
          [TYPE]: messageFormatString[0] === "\\" ? 0 : messageFormatString[0] === "$" ? 2 : 1
          /* Text */
        };
        return;
      }
      let nextState;
      switch (state[TYPE]) {
        case 0:
          nextState = {
            [START_INDEX]: ii2,
            [TYPE]: 1
            /* Text */
          };
          break;
        case 1:
          if (char === "\\") {
            nextState = {
              [START_INDEX]: ii2,
              [TYPE]: 0
              /* EscapeSequence */
            };
          } else if (char === "$") {
            nextState = {
              [START_INDEX]: ii2,
              [TYPE]: 2
              /* Variable */
            };
          }
          break;
        case 2:
          if (char === "\\") {
            nextState = {
              [START_INDEX]: ii2,
              [TYPE]: 0
              /* EscapeSequence */
            };
          } else if (char === "$") {
            nextState = {
              [START_INDEX]: ii2,
              [TYPE]: 2
              /* Variable */
            };
          } else if (!char.match(/\w/)) {
            nextState = {
              [START_INDEX]: ii2,
              [TYPE]: 1
              /* Text */
            };
          }
          break;
      }
      if (nextState) {
        if (state !== nextState) {
          commitStateUpTo(ii2);
        }
        state = nextState;
      }
    });
    commitStateUpTo();
    return fragments.join("");
  }
  function getErrorMessage(code2, context = {}) {
    if (true) {
      return getHumanReadableErrorMessage(code2, context);
    } else {
      let decodingAdviceMessage = `Solana error #${code2}; Decode this error by running \`npx @solana/errors decode -- ${code2}`;
      if (Object.keys(context).length) {
        decodingAdviceMessage += ` '${encodeContextObject(context)}'`;
      }
      return `${decodingAdviceMessage}\``;
    }
  }
  var SolanaError = class extends Error {
    /**
     * Indicates the root cause of this {@link SolanaError}, if any.
     *
     * For example, a transaction error might have an instruction error as its root cause. In this
     * case, you will be able to access the instruction error on the transaction error as `cause`.
     */
    cause = this.cause;
    /**
     * Contains context that can assist in understanding or recovering from a {@link SolanaError}.
     */
    context;
    constructor(...[code2, contextAndErrorOptions]) {
      let context;
      let errorOptions;
      if (contextAndErrorOptions) {
        const { cause, ...contextRest } = contextAndErrorOptions;
        if (cause) {
          errorOptions = { cause };
        }
        if (Object.keys(contextRest).length > 0) {
          context = contextRest;
        }
      }
      const message = getErrorMessage(code2, context);
      super(message, errorOptions);
      this.context = {
        __code: code2,
        ...context
      };
      this.name = "SolanaError";
    }
  };

  // ../../node_modules/.pnpm/@solana+codecs-core@2.3.0_typescript@5.9.3/node_modules/@solana/codecs-core/dist/index.browser.mjs
  init_node_compat_inject();
  function getEncodedSize(value, encoder5) {
    return "fixedSize" in encoder5 ? encoder5.fixedSize : encoder5.getSizeFromValue(value);
  }
  function createEncoder(encoder5) {
    return Object.freeze({
      ...encoder5,
      encode: (value) => {
        const bytes = new Uint8Array(getEncodedSize(value, encoder5));
        encoder5.write(value, bytes, 0);
        return bytes;
      }
    });
  }
  function createDecoder(decoder2) {
    return Object.freeze({
      ...decoder2,
      decode: (bytes, offset2 = 0) => decoder2.read(bytes, offset2)[0]
    });
  }
  function isFixedSize(codec2) {
    return "fixedSize" in codec2 && typeof codec2.fixedSize === "number";
  }
  function combineCodec(encoder5, decoder2) {
    if (isFixedSize(encoder5) !== isFixedSize(decoder2)) {
      throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH);
    }
    if (isFixedSize(encoder5) && isFixedSize(decoder2) && encoder5.fixedSize !== decoder2.fixedSize) {
      throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH, {
        decoderFixedSize: decoder2.fixedSize,
        encoderFixedSize: encoder5.fixedSize
      });
    }
    if (!isFixedSize(encoder5) && !isFixedSize(decoder2) && encoder5.maxSize !== decoder2.maxSize) {
      throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH, {
        decoderMaxSize: decoder2.maxSize,
        encoderMaxSize: encoder5.maxSize
      });
    }
    return {
      ...decoder2,
      ...encoder5,
      decode: decoder2.decode,
      encode: encoder5.encode,
      read: decoder2.read,
      write: encoder5.write
    };
  }
  function assertByteArrayIsNotEmptyForCodec(codecDescription, bytes, offset2 = 0) {
    if (bytes.length - offset2 <= 0) {
      throw new SolanaError(SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY, {
        codecDescription
      });
    }
  }
  function assertByteArrayHasEnoughBytesForCodec(codecDescription, expected, bytes, offset2 = 0) {
    const bytesLength = bytes.length - offset2;
    if (bytesLength < expected) {
      throw new SolanaError(SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH, {
        bytesLength,
        codecDescription,
        expected
      });
    }
  }

  // ../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.9.3/node_modules/@solana/codecs-numbers/dist/index.browser.mjs
  function assertNumberIsBetweenForCodec(codecDescription, min, max, value) {
    if (value < min || value > max) {
      throw new SolanaError(SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE, {
        codecDescription,
        max,
        min,
        value
      });
    }
  }
  function isLittleEndian(config2) {
    return config2?.endian === 1 ? false : true;
  }
  function numberEncoderFactory(input) {
    return createEncoder({
      fixedSize: input.size,
      write(value, bytes, offset2) {
        if (input.range) {
          assertNumberIsBetweenForCodec(input.name, input.range[0], input.range[1], value);
        }
        const arrayBuffer = new ArrayBuffer(input.size);
        input.set(new DataView(arrayBuffer), value, isLittleEndian(input.config));
        bytes.set(new Uint8Array(arrayBuffer), offset2);
        return offset2 + input.size;
      }
    });
  }
  function numberDecoderFactory(input) {
    return createDecoder({
      fixedSize: input.size,
      read(bytes, offset2 = 0) {
        assertByteArrayIsNotEmptyForCodec(input.name, bytes, offset2);
        assertByteArrayHasEnoughBytesForCodec(input.name, input.size, bytes, offset2);
        const view = new DataView(toArrayBuffer(bytes, offset2, input.size));
        return [input.get(view, isLittleEndian(input.config)), offset2 + input.size];
      }
    });
  }
  function toArrayBuffer(bytes, offset2, length2) {
    const bytesOffset = bytes.byteOffset + (offset2 ?? 0);
    const bytesLength = length2 ?? bytes.byteLength;
    return bytes.buffer.slice(bytesOffset, bytesOffset + bytesLength);
  }
  var getU64Encoder = (config2 = {}) => numberEncoderFactory({
    config: config2,
    name: "u64",
    range: [0n, BigInt("0xffffffffffffffff")],
    set: (view, value, le6) => view.setBigUint64(0, BigInt(value), le6),
    size: 8
  });
  var getU64Decoder = (config2 = {}) => numberDecoderFactory({
    config: config2,
    get: (view, le6) => view.getBigUint64(0, le6),
    name: "u64",
    size: 8
  });
  var getU64Codec = (config2 = {}) => combineCodec(getU64Encoder(config2), getU64Decoder(config2));

  // ../../node_modules/.pnpm/superstruct@2.0.2/node_modules/superstruct/dist/index.mjs
  init_node_compat_inject();
  var StructError = class extends TypeError {
    constructor(failure, failures) {
      let cached2;
      const { message, explanation, ...rest } = failure;
      const { path } = failure;
      const msg = path.length === 0 ? message : `At path: ${path.join(".")} -- ${message}`;
      super(explanation ?? msg);
      if (explanation != null)
        this.cause = msg;
      Object.assign(this, rest);
      this.name = this.constructor.name;
      this.failures = () => {
        return cached2 ?? (cached2 = [failure, ...failures()]);
      };
    }
  };
  function isIterable(x13) {
    return isObject(x13) && typeof x13[Symbol.iterator] === "function";
  }
  function isObject(x13) {
    return typeof x13 === "object" && x13 != null;
  }
  function isNonArrayObject(x13) {
    return isObject(x13) && !Array.isArray(x13);
  }
  function print(value) {
    if (typeof value === "symbol") {
      return value.toString();
    }
    return typeof value === "string" ? JSON.stringify(value) : `${value}`;
  }
  function shiftIterator(input) {
    const { done, value } = input.next();
    return done ? void 0 : value;
  }
  function toFailure(result, context, struct4, value) {
    if (result === true) {
      return;
    } else if (result === false) {
      result = {};
    } else if (typeof result === "string") {
      result = { message: result };
    }
    const { path, branch } = context;
    const { type: type2 } = struct4;
    const { refinement, message = `Expected a value of type \`${type2}\`${refinement ? ` with refinement \`${refinement}\`` : ""}, but received: \`${print(value)}\`` } = result;
    return {
      value,
      type: type2,
      refinement,
      key: path[path.length - 1],
      path,
      branch,
      ...result,
      message
    };
  }
  function* toFailures(result, context, struct4, value) {
    if (!isIterable(result)) {
      result = [result];
    }
    for (const r3 of result) {
      const failure = toFailure(r3, context, struct4, value);
      if (failure) {
        yield failure;
      }
    }
  }
  function* run(value, struct4, options = {}) {
    const { path = [], branch = [value], coerce: coerce3 = false, mask: mask2 = false } = options;
    const ctx = { path, branch, mask: mask2 };
    if (coerce3) {
      value = struct4.coercer(value, ctx);
    }
    let status = "valid";
    for (const failure of struct4.validator(value, ctx)) {
      failure.explanation = options.message;
      status = "not_valid";
      yield [failure, void 0];
    }
    for (let [k7, v13, s3] of struct4.entries(value, ctx)) {
      const ts2 = run(v13, s3, {
        path: k7 === void 0 ? path : [...path, k7],
        branch: k7 === void 0 ? branch : [...branch, v13],
        coerce: coerce3,
        mask: mask2,
        message: options.message
      });
      for (const t of ts2) {
        if (t[0]) {
          status = t[0].refinement != null ? "not_refined" : "not_valid";
          yield [t[0], void 0];
        } else if (coerce3) {
          v13 = t[1];
          if (k7 === void 0) {
            value = v13;
          } else if (value instanceof Map) {
            value.set(k7, v13);
          } else if (value instanceof Set) {
            value.add(v13);
          } else if (isObject(value)) {
            if (v13 !== void 0 || k7 in value)
              value[k7] = v13;
          }
        }
      }
    }
    if (status !== "not_valid") {
      for (const failure of struct4.refiner(value, ctx)) {
        failure.explanation = options.message;
        status = "not_refined";
        yield [failure, void 0];
      }
    }
    if (status === "valid") {
      yield [void 0, value];
    }
  }
  var Struct = class {
    constructor(props) {
      const { type: type2, schema, validator, refiner, coercer = (value) => value, entries = function* () {
      } } = props;
      this.type = type2;
      this.schema = schema;
      this.entries = entries;
      this.coercer = coercer;
      if (validator) {
        this.validator = (value, context) => {
          const result = validator(value, context);
          return toFailures(result, context, this, value);
        };
      } else {
        this.validator = () => [];
      }
      if (refiner) {
        this.refiner = (value, context) => {
          const result = refiner(value, context);
          return toFailures(result, context, this, value);
        };
      } else {
        this.refiner = () => [];
      }
    }
    /**
     * Assert that a value passes the struct's validation, throwing if it doesn't.
     */
    assert(value, message) {
      return assert8(value, this, message);
    }
    /**
     * Create a value with the struct's coercion logic, then validate it.
     */
    create(value, message) {
      return create2(value, this, message);
    }
    /**
     * Check if a value passes the struct's validation.
     */
    is(value) {
      return is(value, this);
    }
    /**
     * Mask a value, coercing and validating it, but returning only the subset of
     * properties defined by the struct's schema. Masking applies recursively to
     * props of `object` structs only.
     */
    mask(value, message) {
      return mask(value, this, message);
    }
    /**
     * Validate a value with the struct's validation logic, returning a tuple
     * representing the result.
     *
     * You may optionally pass `true` for the `coerce` argument to coerce
     * the value before attempting to validate it. If you do, the result will
     * contain the coerced result when successful. Also, `mask` will turn on
     * masking of the unknown `object` props recursively if passed.
     */
    validate(value, options = {}) {
      return validate6(value, this, options);
    }
  };
  function assert8(value, struct4, message) {
    const result = validate6(value, struct4, { message });
    if (result[0]) {
      throw result[0];
    }
  }
  function create2(value, struct4, message) {
    const result = validate6(value, struct4, { coerce: true, message });
    if (result[0]) {
      throw result[0];
    } else {
      return result[1];
    }
  }
  function mask(value, struct4, message) {
    const result = validate6(value, struct4, { coerce: true, mask: true, message });
    if (result[0]) {
      throw result[0];
    } else {
      return result[1];
    }
  }
  function is(value, struct4) {
    const result = validate6(value, struct4);
    return !result[0];
  }
  function validate6(value, struct4, options = {}) {
    const tuples = run(value, struct4, options);
    const tuple3 = shiftIterator(tuples);
    if (tuple3[0]) {
      const error51 = new StructError(tuple3[0], function* () {
        for (const t of tuples) {
          if (t[0]) {
            yield t[0];
          }
        }
      });
      return [error51, void 0];
    } else {
      const v13 = tuple3[1];
      return [void 0, v13];
    }
  }
  function define2(name2, validator) {
    return new Struct({ type: name2, schema: null, validator });
  }
  function any() {
    return define2("any", () => true);
  }
  function array(Element) {
    return new Struct({
      type: "array",
      schema: Element,
      *entries(value) {
        if (Element && Array.isArray(value)) {
          for (const [i5, v13] of value.entries()) {
            yield [i5, v13, Element];
          }
        }
      },
      coercer(value) {
        return Array.isArray(value) ? value.slice() : value;
      },
      validator(value) {
        return Array.isArray(value) || `Expected an array value, but received: ${print(value)}`;
      }
    });
  }
  function boolean() {
    return define2("boolean", (value) => {
      return typeof value === "boolean";
    });
  }
  function instance(Class2) {
    return define2("instance", (value) => {
      return value instanceof Class2 || `Expected a \`${Class2.name}\` instance, but received: ${print(value)}`;
    });
  }
  function literal(constant) {
    const description = print(constant);
    const t = typeof constant;
    return new Struct({
      type: "literal",
      schema: t === "string" || t === "number" || t === "boolean" ? constant : null,
      validator(value) {
        return value === constant || `Expected the literal \`${description}\`, but received: ${print(value)}`;
      }
    });
  }
  function never() {
    return define2("never", () => false);
  }
  function nullable(struct4) {
    return new Struct({
      ...struct4,
      validator: (value, ctx) => value === null || struct4.validator(value, ctx),
      refiner: (value, ctx) => value === null || struct4.refiner(value, ctx)
    });
  }
  function number() {
    return define2("number", (value) => {
      return typeof value === "number" && !isNaN(value) || `Expected a number, but received: ${print(value)}`;
    });
  }
  function optional(struct4) {
    return new Struct({
      ...struct4,
      validator: (value, ctx) => value === void 0 || struct4.validator(value, ctx),
      refiner: (value, ctx) => value === void 0 || struct4.refiner(value, ctx)
    });
  }
  function record(Key, Value) {
    return new Struct({
      type: "record",
      schema: null,
      *entries(value) {
        if (isObject(value)) {
          for (const k7 in value) {
            const v13 = value[k7];
            yield [k7, k7, Key];
            yield [k7, v13, Value];
          }
        }
      },
      validator(value) {
        return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;
      },
      coercer(value) {
        return isNonArrayObject(value) ? { ...value } : value;
      }
    });
  }
  function string() {
    return define2("string", (value) => {
      return typeof value === "string" || `Expected a string, but received: ${print(value)}`;
    });
  }
  function tuple(Structs) {
    const Never = never();
    return new Struct({
      type: "tuple",
      schema: null,
      *entries(value) {
        if (Array.isArray(value)) {
          const length2 = Math.max(Structs.length, value.length);
          for (let i5 = 0; i5 < length2; i5++) {
            yield [i5, value[i5], Structs[i5] || Never];
          }
        }
      },
      validator(value) {
        return Array.isArray(value) || `Expected an array, but received: ${print(value)}`;
      },
      coercer(value) {
        return Array.isArray(value) ? value.slice() : value;
      }
    });
  }
  function type(schema) {
    const keys2 = Object.keys(schema);
    return new Struct({
      type: "type",
      schema,
      *entries(value) {
        if (isObject(value)) {
          for (const k7 of keys2) {
            yield [k7, value[k7], schema[k7]];
          }
        }
      },
      validator(value) {
        return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;
      },
      coercer(value) {
        return isNonArrayObject(value) ? { ...value } : value;
      }
    });
  }
  function union(Structs) {
    const description = Structs.map((s3) => s3.type).join(" | ");
    return new Struct({
      type: "union",
      schema: null,
      coercer(value, ctx) {
        for (const S10 of Structs) {
          const [error51, coerced] = S10.validate(value, {
            coerce: true,
            mask: ctx.mask
          });
          if (!error51) {
            return coerced;
          }
        }
        return value;
      },
      validator(value, ctx) {
        const failures = [];
        for (const S10 of Structs) {
          const [...tuples] = run(value, S10, ctx);
          const [first] = tuples;
          if (!first[0]) {
            return [];
          } else {
            for (const [failure] of tuples) {
              if (failure) {
                failures.push(failure);
              }
            }
          }
        }
        return [
          `Expected the value to satisfy a union of \`${description}\`, but received: ${print(value)}`,
          ...failures
        ];
      }
    });
  }
  function unknown() {
    return define2("unknown", () => true);
  }
  function coerce(struct4, condition, coercer) {
    return new Struct({
      ...struct4,
      coercer: (value, ctx) => {
        return is(value, condition) ? struct4.coercer(coercer(value, ctx), ctx) : struct4.coercer(value, ctx);
      }
    });
  }

  // ../../node_modules/.pnpm/@solana+web3.js@1.98.4_buff_6f17b6c9c898c1292533d283a3755a43/node_modules/@solana/web3.js/lib/index.browser.esm.js
  var import_browser = __toESM(require_browser());

  // ../../node_modules/.pnpm/rpc-websockets@9.3.9/node_modules/rpc-websockets/dist/index.browser.mjs
  init_node_compat_inject();
  var import_buffer3 = __toESM(require_buffer(), 1);

  // ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
  init_node_compat_inject();
  var import_index = __toESM(require_eventemitter3(), 1);

  // ../../node_modules/.pnpm/rpc-websockets@9.3.9/node_modules/rpc-websockets/dist/index.browser.mjs
  var WebSocketBrowserImpl = class extends import_index.default {
    socket;
    /** Instantiate a WebSocket class
    * @constructor
    * @param {String} address - url to a websocket server
    * @param {WebSocketBrowserOptions} options - websocket options
    * @return {WebSocketBrowserImpl} - returns a WebSocket instance
    */
    constructor(address, options) {
      super();
      this.socket = new window.WebSocket(address, options.protocols);
      this.socket.onopen = () => this.emit("open");
      this.socket.onmessage = (event) => this.emit("message", event.data);
      this.socket.onerror = (error51) => this.emit("error", error51);
      this.socket.onclose = (event) => {
        this.emit("close", event.code, event.reason);
      };
    }
    /**
    * Sends data through a websocket connection
    * @method
    * @param {(String|Object)} data - data to be sent via websocket
    * @param {Object} optionsOrCallback - ws options
    * @param {Function} callback - a callback called once the data is sent
    * @return {Undefined}
    */
    send(data, optionsOrCallback, callback) {
      const cb = callback || optionsOrCallback;
      try {
        this.socket.send(data);
        cb();
      } catch (error51) {
        cb(error51);
      }
    }
    /**
    * Closes an underlying socket
    * @method
    * @param {Number} code - status code explaining why the connection is being closed
    * @param {String} reason - a description why the connection is closing
    * @return {Undefined}
    * @throws {Error}
    */
    close(code2, reason) {
      this.socket.close(code2, reason);
    }
    addEventListener(type2, listener, options) {
      this.socket.addEventListener(type2, listener, options);
    }
  };
  function WebSocket2(address, options) {
    return new WebSocketBrowserImpl(address, options);
  }
  var DefaultDataPack = class {
    encode(value) {
      return JSON.stringify(value);
    }
    decode(value) {
      return JSON.parse(value);
    }
  };
  var CommonClient = class extends import_index.default {
    address;
    rpc_id;
    queue;
    options;
    autoconnect;
    ready;
    reconnect;
    reconnect_timer_id;
    reconnect_interval;
    max_reconnects;
    rest_options;
    current_reconnects;
    generate_request_id;
    socket;
    webSocketFactory;
    dataPack;
    /**
    * Instantiate a Client class.
    * @constructor
    * @param {webSocketFactory} webSocketFactory - factory method for WebSocket
    * @param {String} address - url to a websocket server
    * @param {Object} options - ws options object with reconnect parameters
    * @param {Function} generate_request_id - custom generation request Id
    * @param {DataPack} dataPack - data pack contains encoder and decoder
    * @return {CommonClient}
    */
    constructor(webSocketFactory, address = "ws://localhost:8080", {
      autoconnect = true,
      reconnect = true,
      reconnect_interval = 1e3,
      max_reconnects = 5,
      ...rest_options
    } = {}, generate_request_id, dataPack) {
      super();
      this.webSocketFactory = webSocketFactory;
      this.queue = {};
      this.rpc_id = 0;
      this.address = address;
      this.autoconnect = autoconnect;
      this.ready = false;
      this.reconnect = reconnect;
      this.reconnect_timer_id = void 0;
      this.reconnect_interval = reconnect_interval;
      this.max_reconnects = max_reconnects;
      this.rest_options = rest_options;
      this.current_reconnects = 0;
      this.generate_request_id = generate_request_id || (() => typeof this.rpc_id === "number" ? ++this.rpc_id : Number(this.rpc_id) + 1);
      if (!dataPack) this.dataPack = new DefaultDataPack();
      else this.dataPack = dataPack;
      if (this.autoconnect)
        this._connect(this.address, {
          autoconnect: this.autoconnect,
          reconnect: this.reconnect,
          reconnect_interval: this.reconnect_interval,
          max_reconnects: this.max_reconnects,
          ...this.rest_options
        });
    }
    /**
    * Connects to a defined server if not connected already.
    * @method
    * @return {Undefined}
    */
    connect() {
      if (this.socket) return;
      this._connect(this.address, {
        autoconnect: this.autoconnect,
        reconnect: this.reconnect,
        reconnect_interval: this.reconnect_interval,
        max_reconnects: this.max_reconnects,
        ...this.rest_options
      });
    }
    /**
    * Calls a registered RPC method on server.
    * @method
    * @param {String} method - RPC method name
    * @param {Object|Array} params - optional method parameters
    * @param {Number} timeout - RPC reply timeout value
    * @param {Object} ws_opts - options passed to ws
    * @return {Promise}
    */
    call(method, params, timeout, ws_opts) {
      if (!ws_opts && "object" === typeof timeout) {
        ws_opts = timeout;
        timeout = null;
      }
      return new Promise((resolve, reject2) => {
        if (!this.ready) return reject2(new Error("socket not ready"));
        const rpc_id = this.generate_request_id(method, params);
        const message = {
          jsonrpc: "2.0",
          method,
          params: params || void 0,
          id: rpc_id
        };
        this.socket.send(this.dataPack.encode(message), ws_opts, (error51) => {
          if (error51) return reject2(error51);
          this.queue[rpc_id] = { promise: [resolve, reject2] };
          if (timeout) {
            this.queue[rpc_id].timeout = setTimeout(() => {
              delete this.queue[rpc_id];
              reject2(new Error("reply timeout"));
            }, timeout);
          }
        });
      });
    }
    /**
    * Logins with the other side of the connection.
    * @method
    * @param {Object} params - Login credentials object
    * @return {Promise}
    */
    async login(params) {
      const resp = await this.call("rpc.login", params);
      if (!resp) throw new Error("authentication failed");
      return resp;
    }
    /**
    * Fetches a list of client's methods registered on server.
    * @method
    * @return {Array}
    */
    async listMethods() {
      return await this.call("__listMethods");
    }
    /**
    * Sends a JSON-RPC 2.0 notification to server.
    * @method
    * @param {String} method - RPC method name
    * @param {Object} params - optional method parameters
    * @return {Promise}
    */
    notify(method, params) {
      return new Promise((resolve, reject2) => {
        if (!this.ready) return reject2(new Error("socket not ready"));
        const message = {
          jsonrpc: "2.0",
          method,
          params
        };
        this.socket.send(this.dataPack.encode(message), (error51) => {
          if (error51) return reject2(error51);
          resolve();
        });
      });
    }
    /**
    * Subscribes for a defined event.
    * @method
    * @param {String|Array} event - event name
    * @return {Undefined}
    * @throws {Error}
    */
    async subscribe(event) {
      if (typeof event === "string") event = [event];
      const result = await this.call("rpc.on", event);
      if (typeof event === "string" && result[event] !== "ok")
        throw new Error(
          "Failed subscribing to an event '" + event + "' with: " + result[event]
        );
      return result;
    }
    /**
    * Unsubscribes from a defined event.
    * @method
    * @param {String|Array} event - event name
    * @return {Undefined}
    * @throws {Error}
    */
    async unsubscribe(event) {
      if (typeof event === "string") event = [event];
      const result = await this.call("rpc.off", event);
      if (typeof event === "string" && result[event] !== "ok")
        throw new Error("Failed unsubscribing from an event with: " + result);
      return result;
    }
    /**
    * Closes a WebSocket connection gracefully.
    * @method
    * @param {Number} code - socket close code
    * @param {String} data - optional data to be sent before closing
    * @return {Undefined}
    */
    close(code2, data) {
      if (this.socket) this.socket.close(code2 || 1e3, data);
    }
    /**
    * Enable / disable automatic reconnection.
    * @method
    * @param {Boolean} reconnect - enable / disable reconnection
    * @return {Undefined}
    */
    setAutoReconnect(reconnect) {
      this.reconnect = reconnect;
    }
    /**
    * Set the interval between reconnection attempts.
    * @method
    * @param {Number} interval - reconnection interval in milliseconds
    * @return {Undefined}
    */
    setReconnectInterval(interval) {
      this.reconnect_interval = interval;
    }
    /**
    * Set the maximum number of reconnection attempts.
    * @method
    * @param {Number} max_reconnects - maximum reconnection attempts
    * @return {Undefined}
    */
    setMaxReconnects(max_reconnects) {
      this.max_reconnects = max_reconnects;
    }
    /**
    * Get the current number of reconnection attempts made.
    * @method
    * @return {Number} current reconnection attempts
    */
    getCurrentReconnects() {
      return this.current_reconnects;
    }
    /**
    * Get the maximum number of reconnection attempts.
    * @method
    * @return {Number} maximum reconnection attempts
    */
    getMaxReconnects() {
      return this.max_reconnects;
    }
    /**
    * Check if the client is currently attempting to reconnect.
    * @method
    * @return {Boolean} true if reconnection is in progress
    */
    isReconnecting() {
      return this.reconnect_timer_id !== void 0;
    }
    /**
    * Check if the client will attempt to reconnect on the next close event.
    * @method
    * @return {Boolean} true if reconnection will be attempted
    */
    willReconnect() {
      return this.reconnect && (this.max_reconnects === 0 || this.current_reconnects < this.max_reconnects);
    }
    /**
    * Connection/Message handler.
    * @method
    * @private
    * @param {String} address - WebSocket API address
    * @param {Object} options - ws options object
    * @return {Undefined}
    */
    _connect(address, options) {
      clearTimeout(this.reconnect_timer_id);
      this.socket = this.webSocketFactory(address, options);
      this.socket.addEventListener("open", () => {
        this.ready = true;
        this.emit("open");
        this.current_reconnects = 0;
      });
      this.socket.addEventListener("message", ({ data: message }) => {
        if (message instanceof ArrayBuffer)
          message = import_buffer3.Buffer.from(message).toString();
        try {
          message = this.dataPack.decode(message);
        } catch (_error) {
          return;
        }
        if (message.notification && this.listeners(message.notification).length) {
          if (!Object.keys(message.params).length)
            return this.emit(message.notification);
          const args = [message.notification];
          if (message.params.constructor === Object) args.push(message.params);
          else
            for (let i5 = 0; i5 < message.params.length; i5++)
              args.push(message.params[i5]);
          return Promise.resolve().then(() => {
            this.emit.apply(this, args);
          });
        }
        if (!this.queue[message.id]) {
          if (message.method) {
            return Promise.resolve().then(() => {
              this.emit(message.method, message?.params);
            });
          }
          return;
        }
        if ("error" in message === "result" in message)
          this.queue[message.id].promise[1](
            new Error(
              'Server response malformed. Response must include either "result" or "error", but not both.'
            )
          );
        if (this.queue[message.id].timeout)
          clearTimeout(this.queue[message.id].timeout);
        if (message.error) this.queue[message.id].promise[1](message.error);
        else this.queue[message.id].promise[0](message.result);
        delete this.queue[message.id];
      });
      this.socket.addEventListener("error", (error51) => this.emit("error", error51));
      this.socket.addEventListener("close", ({ code: code2, reason }) => {
        if (this.ready)
          setTimeout(() => this.emit("close", code2, reason), 0);
        this.ready = false;
        this.socket = void 0;
        if (code2 === 1e3) return;
        this.current_reconnects++;
        if (this.reconnect && (this.max_reconnects > this.current_reconnects || this.max_reconnects === 0))
          this.reconnect_timer_id = setTimeout(
            () => this._connect(address, options),
            this.reconnect_interval
          );
        else if (this.reconnect && this.max_reconnects > 0 && this.current_reconnects >= this.max_reconnects) {
          setTimeout(() => this.emit("max_reconnects_reached", code2, reason), 1);
        }
      });
    }
  };

  // ../../node_modules/.pnpm/@solana+web3.js@1.98.4_buff_6f17b6c9c898c1292533d283a3755a43/node_modules/@solana/web3.js/lib/index.browser.esm.js
  init_sha3();
  init_secp256k1();
  var generatePrivateKey = ed25519.utils.randomPrivateKey;
  var generateKeypair = () => {
    const privateScalar = ed25519.utils.randomPrivateKey();
    const publicKey3 = getPublicKey(privateScalar);
    const secretKey = new Uint8Array(64);
    secretKey.set(privateScalar);
    secretKey.set(publicKey3, 32);
    return {
      publicKey: publicKey3,
      secretKey
    };
  };
  var getPublicKey = ed25519.getPublicKey;
  function isOnCurve(publicKey3) {
    try {
      ed25519.ExtendedPoint.fromHex(publicKey3);
      return true;
    } catch {
      return false;
    }
  }
  var sign2 = (message, secretKey) => ed25519.sign(message, secretKey.slice(0, 32));
  var verify = ed25519.verify;
  var toBuffer = (arr) => {
    if (import_buffer4.Buffer.isBuffer(arr)) {
      return arr;
    } else if (arr instanceof Uint8Array) {
      return import_buffer4.Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);
    } else {
      return import_buffer4.Buffer.from(arr);
    }
  };
  var Struct2 = class {
    constructor(properties) {
      Object.assign(this, properties);
    }
    encode() {
      return import_buffer4.Buffer.from((0, import_borsh.serialize)(SOLANA_SCHEMA, this));
    }
    static decode(data) {
      return (0, import_borsh.deserialize)(SOLANA_SCHEMA, this, data);
    }
    static decodeUnchecked(data) {
      return (0, import_borsh.deserializeUnchecked)(SOLANA_SCHEMA, this, data);
    }
  };
  var SOLANA_SCHEMA = /* @__PURE__ */ new Map();
  var _PublicKey;
  var MAX_SEED_LENGTH = 32;
  var PUBLIC_KEY_LENGTH = 32;
  function isPublicKeyData(value) {
    return value._bn !== void 0;
  }
  var uniquePublicKeyCounter = 1;
  var PublicKey = class _PublicKey2 extends Struct2 {
    /**
     * Create a new PublicKey object
     * @param value ed25519 public key as buffer or base-58 encoded string
     */
    constructor(value) {
      super({});
      this._bn = void 0;
      if (isPublicKeyData(value)) {
        this._bn = value._bn;
      } else {
        if (typeof value === "string") {
          const decoded = import_bs58.default.decode(value);
          if (decoded.length != PUBLIC_KEY_LENGTH) {
            throw new Error(`Invalid public key input`);
          }
          this._bn = new import_bn.default(decoded);
        } else {
          this._bn = new import_bn.default(value);
        }
        if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {
          throw new Error(`Invalid public key input`);
        }
      }
    }
    /**
     * Returns a unique PublicKey for tests and benchmarks using a counter
     */
    static unique() {
      const key2 = new _PublicKey2(uniquePublicKeyCounter);
      uniquePublicKeyCounter += 1;
      return new _PublicKey2(key2.toBuffer());
    }
    /**
     * Default public key value. The base58-encoded string representation is all ones (as seen below)
     * The underlying BN number is 32 bytes that are all zeros
     */
    /**
     * Checks if two publicKeys are equal
     */
    equals(publicKey3) {
      return this._bn.eq(publicKey3._bn);
    }
    /**
     * Return the base-58 representation of the public key
     */
    toBase58() {
      return import_bs58.default.encode(this.toBytes());
    }
    toJSON() {
      return this.toBase58();
    }
    /**
     * Return the byte array representation of the public key in big endian
     */
    toBytes() {
      const buf = this.toBuffer();
      return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
    }
    /**
     * Return the Buffer representation of the public key in big endian
     */
    toBuffer() {
      const b9 = this._bn.toArrayLike(import_buffer4.Buffer);
      if (b9.length === PUBLIC_KEY_LENGTH) {
        return b9;
      }
      const zeroPad2 = import_buffer4.Buffer.alloc(32);
      b9.copy(zeroPad2, 32 - b9.length);
      return zeroPad2;
    }
    get [Symbol.toStringTag]() {
      return `PublicKey(${this.toString()})`;
    }
    /**
     * Return the base-58 representation of the public key
     */
    toString() {
      return this.toBase58();
    }
    /**
     * Derive a public key from another key, a seed, and a program ID.
     * The program ID will also serve as the owner of the public key, giving
     * it permission to write data to the account.
     */
    /* eslint-disable require-await */
    static async createWithSeed(fromPublicKey2, seed, programId) {
      const buffer2 = import_buffer4.Buffer.concat([fromPublicKey2.toBuffer(), import_buffer4.Buffer.from(seed), programId.toBuffer()]);
      const publicKeyBytes = sha2562(buffer2);
      return new _PublicKey2(publicKeyBytes);
    }
    /**
     * Derive a program address from seeds and a program ID.
     */
    /* eslint-disable require-await */
    static createProgramAddressSync(seeds, programId) {
      let buffer2 = import_buffer4.Buffer.alloc(0);
      seeds.forEach(function(seed) {
        if (seed.length > MAX_SEED_LENGTH) {
          throw new TypeError(`Max seed length exceeded`);
        }
        buffer2 = import_buffer4.Buffer.concat([buffer2, toBuffer(seed)]);
      });
      buffer2 = import_buffer4.Buffer.concat([buffer2, programId.toBuffer(), import_buffer4.Buffer.from("ProgramDerivedAddress")]);
      const publicKeyBytes = sha2562(buffer2);
      if (isOnCurve(publicKeyBytes)) {
        throw new Error(`Invalid seeds, address must fall off the curve`);
      }
      return new _PublicKey2(publicKeyBytes);
    }
    /**
     * Async version of createProgramAddressSync
     * For backwards compatibility
     *
     * @deprecated Use {@link createProgramAddressSync} instead
     */
    /* eslint-disable require-await */
    static async createProgramAddress(seeds, programId) {
      return this.createProgramAddressSync(seeds, programId);
    }
    /**
     * Find a valid program address
     *
     * Valid program addresses must fall off the ed25519 curve.  This function
     * iterates a nonce until it finds one that when combined with the seeds
     * results in a valid program address.
     */
    static findProgramAddressSync(seeds, programId) {
      let nonce = 255;
      let address;
      while (nonce != 0) {
        try {
          const seedsWithNonce = seeds.concat(import_buffer4.Buffer.from([nonce]));
          address = this.createProgramAddressSync(seedsWithNonce, programId);
        } catch (err2) {
          if (err2 instanceof TypeError) {
            throw err2;
          }
          nonce--;
          continue;
        }
        return [address, nonce];
      }
      throw new Error(`Unable to find a viable program address nonce`);
    }
    /**
     * Async version of findProgramAddressSync
     * For backwards compatibility
     *
     * @deprecated Use {@link findProgramAddressSync} instead
     */
    static async findProgramAddress(seeds, programId) {
      return this.findProgramAddressSync(seeds, programId);
    }
    /**
     * Check that a pubkey is on the ed25519 curve.
     */
    static isOnCurve(pubkeyData) {
      const pubkey = new _PublicKey2(pubkeyData);
      return isOnCurve(pubkey.toBytes());
    }
  };
  _PublicKey = PublicKey;
  PublicKey.default = new _PublicKey("11111111111111111111111111111111");
  SOLANA_SCHEMA.set(PublicKey, {
    kind: "struct",
    fields: [["_bn", "u256"]]
  });
  var BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey("BPFLoader1111111111111111111111111111111111");
  var PACKET_DATA_SIZE = 1280 - 40 - 8;
  var VERSION_PREFIX_MASK = 127;
  var SIGNATURE_LENGTH_IN_BYTES = 64;
  var TransactionExpiredBlockheightExceededError = class extends Error {
    constructor(signature2) {
      super(`Signature ${signature2} has expired: block height exceeded.`);
      this.signature = void 0;
      this.signature = signature2;
    }
  };
  Object.defineProperty(TransactionExpiredBlockheightExceededError.prototype, "name", {
    value: "TransactionExpiredBlockheightExceededError"
  });
  var TransactionExpiredTimeoutError = class extends Error {
    constructor(signature2, timeoutSeconds) {
      super(`Transaction was not confirmed in ${timeoutSeconds.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${signature2} using the Solana Explorer or CLI tools.`);
      this.signature = void 0;
      this.signature = signature2;
    }
  };
  Object.defineProperty(TransactionExpiredTimeoutError.prototype, "name", {
    value: "TransactionExpiredTimeoutError"
  });
  var TransactionExpiredNonceInvalidError = class extends Error {
    constructor(signature2) {
      super(`Signature ${signature2} has expired: the nonce is no longer valid.`);
      this.signature = void 0;
      this.signature = signature2;
    }
  };
  Object.defineProperty(TransactionExpiredNonceInvalidError.prototype, "name", {
    value: "TransactionExpiredNonceInvalidError"
  });
  var MessageAccountKeys = class {
    constructor(staticAccountKeys, accountKeysFromLookups) {
      this.staticAccountKeys = void 0;
      this.accountKeysFromLookups = void 0;
      this.staticAccountKeys = staticAccountKeys;
      this.accountKeysFromLookups = accountKeysFromLookups;
    }
    keySegments() {
      const keySegments = [this.staticAccountKeys];
      if (this.accountKeysFromLookups) {
        keySegments.push(this.accountKeysFromLookups.writable);
        keySegments.push(this.accountKeysFromLookups.readonly);
      }
      return keySegments;
    }
    get(index2) {
      for (const keySegment of this.keySegments()) {
        if (index2 < keySegment.length) {
          return keySegment[index2];
        } else {
          index2 -= keySegment.length;
        }
      }
      return;
    }
    get length() {
      return this.keySegments().flat().length;
    }
    compileInstructions(instructions) {
      const U8_MAX = 255;
      if (this.length > U8_MAX + 1) {
        throw new Error("Account index overflow encountered during compilation");
      }
      const keyIndexMap = /* @__PURE__ */ new Map();
      this.keySegments().flat().forEach((key2, index2) => {
        keyIndexMap.set(key2.toBase58(), index2);
      });
      const findKeyIndex = (key2) => {
        const keyIndex = keyIndexMap.get(key2.toBase58());
        if (keyIndex === void 0) throw new Error("Encountered an unknown instruction account key during compilation");
        return keyIndex;
      };
      return instructions.map((instruction) => {
        return {
          programIdIndex: findKeyIndex(instruction.programId),
          accountKeyIndexes: instruction.keys.map((meta3) => findKeyIndex(meta3.pubkey)),
          data: instruction.data
        };
      });
    }
  };
  var publicKey = (property = "publicKey") => {
    return BufferLayout.blob(32, property);
  };
  var rustString = (property = "string") => {
    const rsl = BufferLayout.struct([BufferLayout.u32("length"), BufferLayout.u32("lengthPadding"), BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), "chars")], property);
    const _decode2 = rsl.decode.bind(rsl);
    const _encode3 = rsl.encode.bind(rsl);
    const rslShim = rsl;
    rslShim.decode = (b9, offset2) => {
      const data = _decode2(b9, offset2);
      return data["chars"].toString();
    };
    rslShim.encode = (str, b9, offset2) => {
      const data = {
        chars: import_buffer4.Buffer.from(str, "utf8")
      };
      return _encode3(data, b9, offset2);
    };
    rslShim.alloc = (str) => {
      return BufferLayout.u32().span + BufferLayout.u32().span + import_buffer4.Buffer.from(str, "utf8").length;
    };
    return rslShim;
  };
  var authorized = (property = "authorized") => {
    return BufferLayout.struct([publicKey("staker"), publicKey("withdrawer")], property);
  };
  var lockup = (property = "lockup") => {
    return BufferLayout.struct([BufferLayout.ns64("unixTimestamp"), BufferLayout.ns64("epoch"), publicKey("custodian")], property);
  };
  var voteInit = (property = "voteInit") => {
    return BufferLayout.struct([publicKey("nodePubkey"), publicKey("authorizedVoter"), publicKey("authorizedWithdrawer"), BufferLayout.u8("commission")], property);
  };
  var voteAuthorizeWithSeedArgs = (property = "voteAuthorizeWithSeedArgs") => {
    return BufferLayout.struct([BufferLayout.u32("voteAuthorizationType"), publicKey("currentAuthorityDerivedKeyOwnerPubkey"), rustString("currentAuthorityDerivedKeySeed"), publicKey("newAuthorized")], property);
  };
  function getAlloc(type2, fields) {
    const getItemAlloc = (item) => {
      if (item.span >= 0) {
        return item.span;
      } else if (typeof item.alloc === "function") {
        return item.alloc(fields[item.property]);
      } else if ("count" in item && "elementLayout" in item) {
        const field = fields[item.property];
        if (Array.isArray(field)) {
          return field.length * getItemAlloc(item.elementLayout);
        }
      } else if ("fields" in item) {
        return getAlloc({
          layout: item
        }, fields[item.property]);
      }
      return 0;
    };
    let alloc = 0;
    type2.layout.fields.forEach((item) => {
      alloc += getItemAlloc(item);
    });
    return alloc;
  }
  function decodeLength(bytes) {
    let len = 0;
    let size5 = 0;
    for (; ; ) {
      let elem = bytes.shift();
      len |= (elem & 127) << size5 * 7;
      size5 += 1;
      if ((elem & 128) === 0) {
        break;
      }
    }
    return len;
  }
  function encodeLength(bytes, len) {
    let rem_len = len;
    for (; ; ) {
      let elem = rem_len & 127;
      rem_len >>= 7;
      if (rem_len == 0) {
        bytes.push(elem);
        break;
      } else {
        elem |= 128;
        bytes.push(elem);
      }
    }
  }
  function assert9(condition, message) {
    if (!condition) {
      throw new Error(message || "Assertion failed");
    }
  }
  var CompiledKeys = class _CompiledKeys {
    constructor(payer, keyMetaMap) {
      this.payer = void 0;
      this.keyMetaMap = void 0;
      this.payer = payer;
      this.keyMetaMap = keyMetaMap;
    }
    static compile(instructions, payer) {
      const keyMetaMap = /* @__PURE__ */ new Map();
      const getOrInsertDefault = (pubkey) => {
        const address = pubkey.toBase58();
        let keyMeta = keyMetaMap.get(address);
        if (keyMeta === void 0) {
          keyMeta = {
            isSigner: false,
            isWritable: false,
            isInvoked: false
          };
          keyMetaMap.set(address, keyMeta);
        }
        return keyMeta;
      };
      const payerKeyMeta = getOrInsertDefault(payer);
      payerKeyMeta.isSigner = true;
      payerKeyMeta.isWritable = true;
      for (const ix of instructions) {
        getOrInsertDefault(ix.programId).isInvoked = true;
        for (const accountMeta of ix.keys) {
          const keyMeta = getOrInsertDefault(accountMeta.pubkey);
          keyMeta.isSigner ||= accountMeta.isSigner;
          keyMeta.isWritable ||= accountMeta.isWritable;
        }
      }
      return new _CompiledKeys(payer, keyMetaMap);
    }
    getMessageComponents() {
      const mapEntries = [...this.keyMetaMap.entries()];
      assert9(mapEntries.length <= 256, "Max static account keys length exceeded");
      const writableSigners = mapEntries.filter(([, meta3]) => meta3.isSigner && meta3.isWritable);
      const readonlySigners = mapEntries.filter(([, meta3]) => meta3.isSigner && !meta3.isWritable);
      const writableNonSigners = mapEntries.filter(([, meta3]) => !meta3.isSigner && meta3.isWritable);
      const readonlyNonSigners = mapEntries.filter(([, meta3]) => !meta3.isSigner && !meta3.isWritable);
      const header = {
        numRequiredSignatures: writableSigners.length + readonlySigners.length,
        numReadonlySignedAccounts: readonlySigners.length,
        numReadonlyUnsignedAccounts: readonlyNonSigners.length
      };
      {
        assert9(writableSigners.length > 0, "Expected at least one writable signer key");
        const [payerAddress] = writableSigners[0];
        assert9(payerAddress === this.payer.toBase58(), "Expected first writable signer key to be the fee payer");
      }
      const staticAccountKeys = [...writableSigners.map(([address]) => new PublicKey(address)), ...readonlySigners.map(([address]) => new PublicKey(address)), ...writableNonSigners.map(([address]) => new PublicKey(address)), ...readonlyNonSigners.map(([address]) => new PublicKey(address))];
      return [header, staticAccountKeys];
    }
    extractTableLookup(lookupTable) {
      const [writableIndexes, drainedWritableKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable);
      const [readonlyIndexes, drainedReadonlyKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable);
      if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {
        return;
      }
      return [{
        accountKey: lookupTable.key,
        writableIndexes,
        readonlyIndexes
      }, {
        writable: drainedWritableKeys,
        readonly: drainedReadonlyKeys
      }];
    }
    /** @internal */
    drainKeysFoundInLookupTable(lookupTableEntries, keyMetaFilter) {
      const lookupTableIndexes = new Array();
      const drainedKeys = new Array();
      for (const [address, keyMeta] of this.keyMetaMap.entries()) {
        if (keyMetaFilter(keyMeta)) {
          const key2 = new PublicKey(address);
          const lookupTableIndex = lookupTableEntries.findIndex((entry) => entry.equals(key2));
          if (lookupTableIndex >= 0) {
            assert9(lookupTableIndex < 256, "Max lookup table index exceeded");
            lookupTableIndexes.push(lookupTableIndex);
            drainedKeys.push(key2);
            this.keyMetaMap.delete(address);
          }
        }
      }
      return [lookupTableIndexes, drainedKeys];
    }
  };
  var END_OF_BUFFER_ERROR_MESSAGE = "Reached end of buffer unexpectedly";
  function guardedShift(byteArray) {
    if (byteArray.length === 0) {
      throw new Error(END_OF_BUFFER_ERROR_MESSAGE);
    }
    return byteArray.shift();
  }
  function guardedSplice(byteArray, ...args) {
    const [start] = args;
    if (args.length === 2 ? start + (args[1] ?? 0) > byteArray.length : start >= byteArray.length) {
      throw new Error(END_OF_BUFFER_ERROR_MESSAGE);
    }
    return byteArray.splice(...args);
  }
  var Message = class _Message {
    constructor(args) {
      this.header = void 0;
      this.accountKeys = void 0;
      this.recentBlockhash = void 0;
      this.instructions = void 0;
      this.indexToProgramIds = /* @__PURE__ */ new Map();
      this.header = args.header;
      this.accountKeys = args.accountKeys.map((account) => new PublicKey(account));
      this.recentBlockhash = args.recentBlockhash;
      this.instructions = args.instructions;
      this.instructions.forEach((ix) => this.indexToProgramIds.set(ix.programIdIndex, this.accountKeys[ix.programIdIndex]));
    }
    get version() {
      return "legacy";
    }
    get staticAccountKeys() {
      return this.accountKeys;
    }
    get compiledInstructions() {
      return this.instructions.map((ix) => ({
        programIdIndex: ix.programIdIndex,
        accountKeyIndexes: ix.accounts,
        data: import_bs58.default.decode(ix.data)
      }));
    }
    get addressTableLookups() {
      return [];
    }
    getAccountKeys() {
      return new MessageAccountKeys(this.staticAccountKeys);
    }
    static compile(args) {
      const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);
      const [header, staticAccountKeys] = compiledKeys.getMessageComponents();
      const accountKeys = new MessageAccountKeys(staticAccountKeys);
      const instructions = accountKeys.compileInstructions(args.instructions).map((ix) => ({
        programIdIndex: ix.programIdIndex,
        accounts: ix.accountKeyIndexes,
        data: import_bs58.default.encode(ix.data)
      }));
      return new _Message({
        header,
        accountKeys: staticAccountKeys,
        recentBlockhash: args.recentBlockhash,
        instructions
      });
    }
    isAccountSigner(index2) {
      return index2 < this.header.numRequiredSignatures;
    }
    isAccountWritable(index2) {
      const numSignedAccounts = this.header.numRequiredSignatures;
      if (index2 >= this.header.numRequiredSignatures) {
        const unsignedAccountIndex = index2 - numSignedAccounts;
        const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;
        const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;
        return unsignedAccountIndex < numWritableUnsignedAccounts;
      } else {
        const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;
        return index2 < numWritableSignedAccounts;
      }
    }
    isProgramId(index2) {
      return this.indexToProgramIds.has(index2);
    }
    programIds() {
      return [...this.indexToProgramIds.values()];
    }
    nonProgramIds() {
      return this.accountKeys.filter((_6, index2) => !this.isProgramId(index2));
    }
    serialize() {
      const numKeys2 = this.accountKeys.length;
      let keyCount = [];
      encodeLength(keyCount, numKeys2);
      const instructions = this.instructions.map((instruction) => {
        const {
          accounts,
          programIdIndex
        } = instruction;
        const data = Array.from(import_bs58.default.decode(instruction.data));
        let keyIndicesCount = [];
        encodeLength(keyIndicesCount, accounts.length);
        let dataCount = [];
        encodeLength(dataCount, data.length);
        return {
          programIdIndex,
          keyIndicesCount: import_buffer4.Buffer.from(keyIndicesCount),
          keyIndices: accounts,
          dataLength: import_buffer4.Buffer.from(dataCount),
          data
        };
      });
      let instructionCount = [];
      encodeLength(instructionCount, instructions.length);
      let instructionBuffer = import_buffer4.Buffer.alloc(PACKET_DATA_SIZE);
      import_buffer4.Buffer.from(instructionCount).copy(instructionBuffer);
      let instructionBufferLength = instructionCount.length;
      instructions.forEach((instruction) => {
        const instructionLayout = BufferLayout.struct([BufferLayout.u8("programIdIndex"), BufferLayout.blob(instruction.keyIndicesCount.length, "keyIndicesCount"), BufferLayout.seq(BufferLayout.u8("keyIndex"), instruction.keyIndices.length, "keyIndices"), BufferLayout.blob(instruction.dataLength.length, "dataLength"), BufferLayout.seq(BufferLayout.u8("userdatum"), instruction.data.length, "data")]);
        const length3 = instructionLayout.encode(instruction, instructionBuffer, instructionBufferLength);
        instructionBufferLength += length3;
      });
      instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);
      const signDataLayout = BufferLayout.struct([BufferLayout.blob(1, "numRequiredSignatures"), BufferLayout.blob(1, "numReadonlySignedAccounts"), BufferLayout.blob(1, "numReadonlyUnsignedAccounts"), BufferLayout.blob(keyCount.length, "keyCount"), BufferLayout.seq(publicKey("key"), numKeys2, "keys"), publicKey("recentBlockhash")]);
      const transaction = {
        numRequiredSignatures: import_buffer4.Buffer.from([this.header.numRequiredSignatures]),
        numReadonlySignedAccounts: import_buffer4.Buffer.from([this.header.numReadonlySignedAccounts]),
        numReadonlyUnsignedAccounts: import_buffer4.Buffer.from([this.header.numReadonlyUnsignedAccounts]),
        keyCount: import_buffer4.Buffer.from(keyCount),
        keys: this.accountKeys.map((key2) => toBuffer(key2.toBytes())),
        recentBlockhash: import_bs58.default.decode(this.recentBlockhash)
      };
      let signData = import_buffer4.Buffer.alloc(2048);
      const length2 = signDataLayout.encode(transaction, signData);
      instructionBuffer.copy(signData, length2);
      return signData.slice(0, length2 + instructionBuffer.length);
    }
    /**
     * Decode a compiled message into a Message object.
     */
    static from(buffer2) {
      let byteArray = [...buffer2];
      const numRequiredSignatures = guardedShift(byteArray);
      if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) {
        throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");
      }
      const numReadonlySignedAccounts = guardedShift(byteArray);
      const numReadonlyUnsignedAccounts = guardedShift(byteArray);
      const accountCount = decodeLength(byteArray);
      let accountKeys = [];
      for (let i5 = 0; i5 < accountCount; i5++) {
        const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);
        accountKeys.push(new PublicKey(import_buffer4.Buffer.from(account)));
      }
      const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);
      const instructionCount = decodeLength(byteArray);
      let instructions = [];
      for (let i5 = 0; i5 < instructionCount; i5++) {
        const programIdIndex = guardedShift(byteArray);
        const accountCount2 = decodeLength(byteArray);
        const accounts = guardedSplice(byteArray, 0, accountCount2);
        const dataLength = decodeLength(byteArray);
        const dataSlice = guardedSplice(byteArray, 0, dataLength);
        const data = import_bs58.default.encode(import_buffer4.Buffer.from(dataSlice));
        instructions.push({
          programIdIndex,
          accounts,
          data
        });
      }
      const messageArgs = {
        header: {
          numRequiredSignatures,
          numReadonlySignedAccounts,
          numReadonlyUnsignedAccounts
        },
        recentBlockhash: import_bs58.default.encode(import_buffer4.Buffer.from(recentBlockhash)),
        accountKeys,
        instructions
      };
      return new _Message(messageArgs);
    }
  };
  var MessageV0 = class _MessageV0 {
    constructor(args) {
      this.header = void 0;
      this.staticAccountKeys = void 0;
      this.recentBlockhash = void 0;
      this.compiledInstructions = void 0;
      this.addressTableLookups = void 0;
      this.header = args.header;
      this.staticAccountKeys = args.staticAccountKeys;
      this.recentBlockhash = args.recentBlockhash;
      this.compiledInstructions = args.compiledInstructions;
      this.addressTableLookups = args.addressTableLookups;
    }
    get version() {
      return 0;
    }
    get numAccountKeysFromLookups() {
      let count = 0;
      for (const lookup of this.addressTableLookups) {
        count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;
      }
      return count;
    }
    getAccountKeys(args) {
      let accountKeysFromLookups;
      if (args && "accountKeysFromLookups" in args && args.accountKeysFromLookups) {
        if (this.numAccountKeysFromLookups != args.accountKeysFromLookups.writable.length + args.accountKeysFromLookups.readonly.length) {
          throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");
        }
        accountKeysFromLookups = args.accountKeysFromLookups;
      } else if (args && "addressLookupTableAccounts" in args && args.addressLookupTableAccounts) {
        accountKeysFromLookups = this.resolveAddressTableLookups(args.addressLookupTableAccounts);
      } else if (this.addressTableLookups.length > 0) {
        throw new Error("Failed to get account keys because address table lookups were not resolved");
      }
      return new MessageAccountKeys(this.staticAccountKeys, accountKeysFromLookups);
    }
    isAccountSigner(index2) {
      return index2 < this.header.numRequiredSignatures;
    }
    isAccountWritable(index2) {
      const numSignedAccounts = this.header.numRequiredSignatures;
      const numStaticAccountKeys = this.staticAccountKeys.length;
      if (index2 >= numStaticAccountKeys) {
        const lookupAccountKeysIndex = index2 - numStaticAccountKeys;
        const numWritableLookupAccountKeys = this.addressTableLookups.reduce((count, lookup) => count + lookup.writableIndexes.length, 0);
        return lookupAccountKeysIndex < numWritableLookupAccountKeys;
      } else if (index2 >= this.header.numRequiredSignatures) {
        const unsignedAccountIndex = index2 - numSignedAccounts;
        const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;
        const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;
        return unsignedAccountIndex < numWritableUnsignedAccounts;
      } else {
        const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;
        return index2 < numWritableSignedAccounts;
      }
    }
    resolveAddressTableLookups(addressLookupTableAccounts) {
      const accountKeysFromLookups = {
        writable: [],
        readonly: []
      };
      for (const tableLookup of this.addressTableLookups) {
        const tableAccount = addressLookupTableAccounts.find((account) => account.key.equals(tableLookup.accountKey));
        if (!tableAccount) {
          throw new Error(`Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`);
        }
        for (const index2 of tableLookup.writableIndexes) {
          if (index2 < tableAccount.state.addresses.length) {
            accountKeysFromLookups.writable.push(tableAccount.state.addresses[index2]);
          } else {
            throw new Error(`Failed to find address for index ${index2} in address lookup table ${tableLookup.accountKey.toBase58()}`);
          }
        }
        for (const index2 of tableLookup.readonlyIndexes) {
          if (index2 < tableAccount.state.addresses.length) {
            accountKeysFromLookups.readonly.push(tableAccount.state.addresses[index2]);
          } else {
            throw new Error(`Failed to find address for index ${index2} in address lookup table ${tableLookup.accountKey.toBase58()}`);
          }
        }
      }
      return accountKeysFromLookups;
    }
    static compile(args) {
      const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);
      const addressTableLookups = new Array();
      const accountKeysFromLookups = {
        writable: new Array(),
        readonly: new Array()
      };
      const lookupTableAccounts = args.addressLookupTableAccounts || [];
      for (const lookupTable of lookupTableAccounts) {
        const extractResult = compiledKeys.extractTableLookup(lookupTable);
        if (extractResult !== void 0) {
          const [addressTableLookup, {
            writable,
            readonly: readonly3
          }] = extractResult;
          addressTableLookups.push(addressTableLookup);
          accountKeysFromLookups.writable.push(...writable);
          accountKeysFromLookups.readonly.push(...readonly3);
        }
      }
      const [header, staticAccountKeys] = compiledKeys.getMessageComponents();
      const accountKeys = new MessageAccountKeys(staticAccountKeys, accountKeysFromLookups);
      const compiledInstructions = accountKeys.compileInstructions(args.instructions);
      return new _MessageV0({
        header,
        staticAccountKeys,
        recentBlockhash: args.recentBlockhash,
        compiledInstructions,
        addressTableLookups
      });
    }
    serialize() {
      const encodedStaticAccountKeysLength = Array();
      encodeLength(encodedStaticAccountKeysLength, this.staticAccountKeys.length);
      const serializedInstructions = this.serializeInstructions();
      const encodedInstructionsLength = Array();
      encodeLength(encodedInstructionsLength, this.compiledInstructions.length);
      const serializedAddressTableLookups = this.serializeAddressTableLookups();
      const encodedAddressTableLookupsLength = Array();
      encodeLength(encodedAddressTableLookupsLength, this.addressTableLookups.length);
      const messageLayout = BufferLayout.struct([BufferLayout.u8("prefix"), BufferLayout.struct([BufferLayout.u8("numRequiredSignatures"), BufferLayout.u8("numReadonlySignedAccounts"), BufferLayout.u8("numReadonlyUnsignedAccounts")], "header"), BufferLayout.blob(encodedStaticAccountKeysLength.length, "staticAccountKeysLength"), BufferLayout.seq(publicKey(), this.staticAccountKeys.length, "staticAccountKeys"), publicKey("recentBlockhash"), BufferLayout.blob(encodedInstructionsLength.length, "instructionsLength"), BufferLayout.blob(serializedInstructions.length, "serializedInstructions"), BufferLayout.blob(encodedAddressTableLookupsLength.length, "addressTableLookupsLength"), BufferLayout.blob(serializedAddressTableLookups.length, "serializedAddressTableLookups")]);
      const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);
      const MESSAGE_VERSION_0_PREFIX = 1 << 7;
      const serializedMessageLength = messageLayout.encode({
        prefix: MESSAGE_VERSION_0_PREFIX,
        header: this.header,
        staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),
        staticAccountKeys: this.staticAccountKeys.map((key2) => key2.toBytes()),
        recentBlockhash: import_bs58.default.decode(this.recentBlockhash),
        instructionsLength: new Uint8Array(encodedInstructionsLength),
        serializedInstructions,
        addressTableLookupsLength: new Uint8Array(encodedAddressTableLookupsLength),
        serializedAddressTableLookups
      }, serializedMessage);
      return serializedMessage.slice(0, serializedMessageLength);
    }
    serializeInstructions() {
      let serializedLength = 0;
      const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);
      for (const instruction of this.compiledInstructions) {
        const encodedAccountKeyIndexesLength = Array();
        encodeLength(encodedAccountKeyIndexesLength, instruction.accountKeyIndexes.length);
        const encodedDataLength = Array();
        encodeLength(encodedDataLength, instruction.data.length);
        const instructionLayout = BufferLayout.struct([BufferLayout.u8("programIdIndex"), BufferLayout.blob(encodedAccountKeyIndexesLength.length, "encodedAccountKeyIndexesLength"), BufferLayout.seq(BufferLayout.u8(), instruction.accountKeyIndexes.length, "accountKeyIndexes"), BufferLayout.blob(encodedDataLength.length, "encodedDataLength"), BufferLayout.blob(instruction.data.length, "data")]);
        serializedLength += instructionLayout.encode({
          programIdIndex: instruction.programIdIndex,
          encodedAccountKeyIndexesLength: new Uint8Array(encodedAccountKeyIndexesLength),
          accountKeyIndexes: instruction.accountKeyIndexes,
          encodedDataLength: new Uint8Array(encodedDataLength),
          data: instruction.data
        }, serializedInstructions, serializedLength);
      }
      return serializedInstructions.slice(0, serializedLength);
    }
    serializeAddressTableLookups() {
      let serializedLength = 0;
      const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);
      for (const lookup of this.addressTableLookups) {
        const encodedWritableIndexesLength = Array();
        encodeLength(encodedWritableIndexesLength, lookup.writableIndexes.length);
        const encodedReadonlyIndexesLength = Array();
        encodeLength(encodedReadonlyIndexesLength, lookup.readonlyIndexes.length);
        const addressTableLookupLayout = BufferLayout.struct([publicKey("accountKey"), BufferLayout.blob(encodedWritableIndexesLength.length, "encodedWritableIndexesLength"), BufferLayout.seq(BufferLayout.u8(), lookup.writableIndexes.length, "writableIndexes"), BufferLayout.blob(encodedReadonlyIndexesLength.length, "encodedReadonlyIndexesLength"), BufferLayout.seq(BufferLayout.u8(), lookup.readonlyIndexes.length, "readonlyIndexes")]);
        serializedLength += addressTableLookupLayout.encode({
          accountKey: lookup.accountKey.toBytes(),
          encodedWritableIndexesLength: new Uint8Array(encodedWritableIndexesLength),
          writableIndexes: lookup.writableIndexes,
          encodedReadonlyIndexesLength: new Uint8Array(encodedReadonlyIndexesLength),
          readonlyIndexes: lookup.readonlyIndexes
        }, serializedAddressTableLookups, serializedLength);
      }
      return serializedAddressTableLookups.slice(0, serializedLength);
    }
    static deserialize(serializedMessage) {
      let byteArray = [...serializedMessage];
      const prefix = guardedShift(byteArray);
      const maskedPrefix = prefix & VERSION_PREFIX_MASK;
      assert9(prefix !== maskedPrefix, `Expected versioned message but received legacy message`);
      const version16 = maskedPrefix;
      assert9(version16 === 0, `Expected versioned message with version 0 but found version ${version16}`);
      const header = {
        numRequiredSignatures: guardedShift(byteArray),
        numReadonlySignedAccounts: guardedShift(byteArray),
        numReadonlyUnsignedAccounts: guardedShift(byteArray)
      };
      const staticAccountKeys = [];
      const staticAccountKeysLength = decodeLength(byteArray);
      for (let i5 = 0; i5 < staticAccountKeysLength; i5++) {
        staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)));
      }
      const recentBlockhash = import_bs58.default.encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));
      const instructionCount = decodeLength(byteArray);
      const compiledInstructions = [];
      for (let i5 = 0; i5 < instructionCount; i5++) {
        const programIdIndex = guardedShift(byteArray);
        const accountKeyIndexesLength = decodeLength(byteArray);
        const accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength);
        const dataLength = decodeLength(byteArray);
        const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));
        compiledInstructions.push({
          programIdIndex,
          accountKeyIndexes,
          data
        });
      }
      const addressTableLookupsCount = decodeLength(byteArray);
      const addressTableLookups = [];
      for (let i5 = 0; i5 < addressTableLookupsCount; i5++) {
        const accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));
        const writableIndexesLength = decodeLength(byteArray);
        const writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength);
        const readonlyIndexesLength = decodeLength(byteArray);
        const readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength);
        addressTableLookups.push({
          accountKey,
          writableIndexes,
          readonlyIndexes
        });
      }
      return new _MessageV0({
        header,
        staticAccountKeys,
        recentBlockhash,
        compiledInstructions,
        addressTableLookups
      });
    }
  };
  var TransactionStatus = /* @__PURE__ */ (function(TransactionStatus2) {
    TransactionStatus2[TransactionStatus2["BLOCKHEIGHT_EXCEEDED"] = 0] = "BLOCKHEIGHT_EXCEEDED";
    TransactionStatus2[TransactionStatus2["PROCESSED"] = 1] = "PROCESSED";
    TransactionStatus2[TransactionStatus2["TIMED_OUT"] = 2] = "TIMED_OUT";
    TransactionStatus2[TransactionStatus2["NONCE_INVALID"] = 3] = "NONCE_INVALID";
    return TransactionStatus2;
  })({});
  var DEFAULT_SIGNATURE = import_buffer4.Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);
  var TransactionInstruction = class {
    constructor(opts) {
      this.keys = void 0;
      this.programId = void 0;
      this.data = import_buffer4.Buffer.alloc(0);
      this.programId = opts.programId;
      this.keys = opts.keys;
      if (opts.data) {
        this.data = opts.data;
      }
    }
    /**
     * @internal
     */
    toJSON() {
      return {
        keys: this.keys.map(({
          pubkey,
          isSigner,
          isWritable
        }) => ({
          pubkey: pubkey.toJSON(),
          isSigner,
          isWritable
        })),
        programId: this.programId.toJSON(),
        data: [...this.data]
      };
    }
  };
  var Transaction = class _Transaction {
    /**
     * The first (payer) Transaction signature
     *
     * @returns {Buffer | null} Buffer of payer's signature
     */
    get signature() {
      if (this.signatures.length > 0) {
        return this.signatures[0].signature;
      }
      return null;
    }
    /**
     * The transaction fee payer
     */
    // Construct a transaction with a blockhash and lastValidBlockHeight
    // Construct a transaction using a durable nonce
    /**
     * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.
     * Please supply a `TransactionBlockhashCtor` instead.
     */
    /**
     * Construct an empty Transaction
     */
    constructor(opts) {
      this.signatures = [];
      this.feePayer = void 0;
      this.instructions = [];
      this.recentBlockhash = void 0;
      this.lastValidBlockHeight = void 0;
      this.nonceInfo = void 0;
      this.minNonceContextSlot = void 0;
      this._message = void 0;
      this._json = void 0;
      if (!opts) {
        return;
      }
      if (opts.feePayer) {
        this.feePayer = opts.feePayer;
      }
      if (opts.signatures) {
        this.signatures = opts.signatures;
      }
      if (Object.prototype.hasOwnProperty.call(opts, "nonceInfo")) {
        const {
          minContextSlot,
          nonceInfo
        } = opts;
        this.minNonceContextSlot = minContextSlot;
        this.nonceInfo = nonceInfo;
      } else if (Object.prototype.hasOwnProperty.call(opts, "lastValidBlockHeight")) {
        const {
          blockhash,
          lastValidBlockHeight
        } = opts;
        this.recentBlockhash = blockhash;
        this.lastValidBlockHeight = lastValidBlockHeight;
      } else {
        const {
          recentBlockhash,
          nonceInfo
        } = opts;
        if (nonceInfo) {
          this.nonceInfo = nonceInfo;
        }
        this.recentBlockhash = recentBlockhash;
      }
    }
    /**
     * @internal
     */
    toJSON() {
      return {
        recentBlockhash: this.recentBlockhash || null,
        feePayer: this.feePayer ? this.feePayer.toJSON() : null,
        nonceInfo: this.nonceInfo ? {
          nonce: this.nonceInfo.nonce,
          nonceInstruction: this.nonceInfo.nonceInstruction.toJSON()
        } : null,
        instructions: this.instructions.map((instruction) => instruction.toJSON()),
        signers: this.signatures.map(({
          publicKey: publicKey3
        }) => {
          return publicKey3.toJSON();
        })
      };
    }
    /**
     * Add one or more instructions to this Transaction
     *
     * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction
     */
    add(...items) {
      if (items.length === 0) {
        throw new Error("No instructions");
      }
      items.forEach((item) => {
        if ("instructions" in item) {
          this.instructions = this.instructions.concat(item.instructions);
        } else if ("data" in item && "programId" in item && "keys" in item) {
          this.instructions.push(item);
        } else {
          this.instructions.push(new TransactionInstruction(item));
        }
      });
      return this;
    }
    /**
     * Compile transaction data
     */
    compileMessage() {
      if (this._message && JSON.stringify(this.toJSON()) === JSON.stringify(this._json)) {
        return this._message;
      }
      let recentBlockhash;
      let instructions;
      if (this.nonceInfo) {
        recentBlockhash = this.nonceInfo.nonce;
        if (this.instructions[0] != this.nonceInfo.nonceInstruction) {
          instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];
        } else {
          instructions = this.instructions;
        }
      } else {
        recentBlockhash = this.recentBlockhash;
        instructions = this.instructions;
      }
      if (!recentBlockhash) {
        throw new Error("Transaction recentBlockhash required");
      }
      if (instructions.length < 1) {
        console.warn("No instructions provided");
      }
      let feePayer;
      if (this.feePayer) {
        feePayer = this.feePayer;
      } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {
        feePayer = this.signatures[0].publicKey;
      } else {
        throw new Error("Transaction fee payer required");
      }
      for (let i5 = 0; i5 < instructions.length; i5++) {
        if (instructions[i5].programId === void 0) {
          throw new Error(`Transaction instruction index ${i5} has undefined program id`);
        }
      }
      const programIds = [];
      const accountMetas = [];
      instructions.forEach((instruction) => {
        instruction.keys.forEach((accountMeta) => {
          accountMetas.push({
            ...accountMeta
          });
        });
        const programId = instruction.programId.toString();
        if (!programIds.includes(programId)) {
          programIds.push(programId);
        }
      });
      programIds.forEach((programId) => {
        accountMetas.push({
          pubkey: new PublicKey(programId),
          isSigner: false,
          isWritable: false
        });
      });
      const uniqueMetas = [];
      accountMetas.forEach((accountMeta) => {
        const pubkeyString = accountMeta.pubkey.toString();
        const uniqueIndex = uniqueMetas.findIndex((x13) => {
          return x13.pubkey.toString() === pubkeyString;
        });
        if (uniqueIndex > -1) {
          uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;
          uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;
        } else {
          uniqueMetas.push(accountMeta);
        }
      });
      uniqueMetas.sort(function(x13, y11) {
        if (x13.isSigner !== y11.isSigner) {
          return x13.isSigner ? -1 : 1;
        }
        if (x13.isWritable !== y11.isWritable) {
          return x13.isWritable ? -1 : 1;
        }
        const options = {
          localeMatcher: "best fit",
          usage: "sort",
          sensitivity: "variant",
          ignorePunctuation: false,
          numeric: false,
          caseFirst: "lower"
        };
        return x13.pubkey.toBase58().localeCompare(y11.pubkey.toBase58(), "en", options);
      });
      const feePayerIndex = uniqueMetas.findIndex((x13) => {
        return x13.pubkey.equals(feePayer);
      });
      if (feePayerIndex > -1) {
        const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);
        payerMeta.isSigner = true;
        payerMeta.isWritable = true;
        uniqueMetas.unshift(payerMeta);
      } else {
        uniqueMetas.unshift({
          pubkey: feePayer,
          isSigner: true,
          isWritable: true
        });
      }
      for (const signature2 of this.signatures) {
        const uniqueIndex = uniqueMetas.findIndex((x13) => {
          return x13.pubkey.equals(signature2.publicKey);
        });
        if (uniqueIndex > -1) {
          if (!uniqueMetas[uniqueIndex].isSigner) {
            uniqueMetas[uniqueIndex].isSigner = true;
            console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release.");
          }
        } else {
          throw new Error(`unknown signer: ${signature2.publicKey.toString()}`);
        }
      }
      let numRequiredSignatures = 0;
      let numReadonlySignedAccounts = 0;
      let numReadonlyUnsignedAccounts = 0;
      const signedKeys = [];
      const unsignedKeys = [];
      uniqueMetas.forEach(({
        pubkey,
        isSigner,
        isWritable
      }) => {
        if (isSigner) {
          signedKeys.push(pubkey.toString());
          numRequiredSignatures += 1;
          if (!isWritable) {
            numReadonlySignedAccounts += 1;
          }
        } else {
          unsignedKeys.push(pubkey.toString());
          if (!isWritable) {
            numReadonlyUnsignedAccounts += 1;
          }
        }
      });
      const accountKeys = signedKeys.concat(unsignedKeys);
      const compiledInstructions = instructions.map((instruction) => {
        const {
          data,
          programId
        } = instruction;
        return {
          programIdIndex: accountKeys.indexOf(programId.toString()),
          accounts: instruction.keys.map((meta3) => accountKeys.indexOf(meta3.pubkey.toString())),
          data: import_bs58.default.encode(data)
        };
      });
      compiledInstructions.forEach((instruction) => {
        assert9(instruction.programIdIndex >= 0);
        instruction.accounts.forEach((keyIndex) => assert9(keyIndex >= 0));
      });
      return new Message({
        header: {
          numRequiredSignatures,
          numReadonlySignedAccounts,
          numReadonlyUnsignedAccounts
        },
        accountKeys,
        recentBlockhash,
        instructions: compiledInstructions
      });
    }
    /**
     * @internal
     */
    _compile() {
      const message = this.compileMessage();
      const signedKeys = message.accountKeys.slice(0, message.header.numRequiredSignatures);
      if (this.signatures.length === signedKeys.length) {
        const valid = this.signatures.every((pair, index2) => {
          return signedKeys[index2].equals(pair.publicKey);
        });
        if (valid) return message;
      }
      this.signatures = signedKeys.map((publicKey3) => ({
        signature: null,
        publicKey: publicKey3
      }));
      return message;
    }
    /**
     * Get a buffer of the Transaction data that need to be covered by signatures
     */
    serializeMessage() {
      return this._compile().serialize();
    }
    /**
     * Get the estimated fee associated with a transaction
     *
     * @param {Connection} connection Connection to RPC Endpoint.
     *
     * @returns {Promise<number | null>} The estimated fee for the transaction
     */
    async getEstimatedFee(connection) {
      return (await connection.getFeeForMessage(this.compileMessage())).value;
    }
    /**
     * Specify the public keys which will be used to sign the Transaction.
     * The first signer will be used as the transaction fee payer account.
     *
     * Signatures can be added with either `partialSign` or `addSignature`
     *
     * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be
     * specified and it can be set in the Transaction constructor or with the
     * `feePayer` property.
     */
    setSigners(...signers) {
      if (signers.length === 0) {
        throw new Error("No signers");
      }
      const seen = /* @__PURE__ */ new Set();
      this.signatures = signers.filter((publicKey3) => {
        const key2 = publicKey3.toString();
        if (seen.has(key2)) {
          return false;
        } else {
          seen.add(key2);
          return true;
        }
      }).map((publicKey3) => ({
        signature: null,
        publicKey: publicKey3
      }));
    }
    /**
     * Sign the Transaction with the specified signers. Multiple signatures may
     * be applied to a Transaction. The first signature is considered "primary"
     * and is used identify and confirm transactions.
     *
     * If the Transaction `feePayer` is not set, the first signer will be used
     * as the transaction fee payer account.
     *
     * Transaction fields should not be modified after the first call to `sign`,
     * as doing so may invalidate the signature and cause the Transaction to be
     * rejected.
     *
     * The Transaction must be assigned a valid `recentBlockhash` before invoking this method
     *
     * @param {Array<Signer>} signers Array of signers that will sign the transaction
     */
    sign(...signers) {
      if (signers.length === 0) {
        throw new Error("No signers");
      }
      const seen = /* @__PURE__ */ new Set();
      const uniqueSigners = [];
      for (const signer of signers) {
        const key2 = signer.publicKey.toString();
        if (seen.has(key2)) {
          continue;
        } else {
          seen.add(key2);
          uniqueSigners.push(signer);
        }
      }
      this.signatures = uniqueSigners.map((signer) => ({
        signature: null,
        publicKey: signer.publicKey
      }));
      const message = this._compile();
      this._partialSign(message, ...uniqueSigners);
    }
    /**
     * Partially sign a transaction with the specified accounts. All accounts must
     * correspond to either the fee payer or a signer account in the transaction
     * instructions.
     *
     * All the caveats from the `sign` method apply to `partialSign`
     *
     * @param {Array<Signer>} signers Array of signers that will sign the transaction
     */
    partialSign(...signers) {
      if (signers.length === 0) {
        throw new Error("No signers");
      }
      const seen = /* @__PURE__ */ new Set();
      const uniqueSigners = [];
      for (const signer of signers) {
        const key2 = signer.publicKey.toString();
        if (seen.has(key2)) {
          continue;
        } else {
          seen.add(key2);
          uniqueSigners.push(signer);
        }
      }
      const message = this._compile();
      this._partialSign(message, ...uniqueSigners);
    }
    /**
     * @internal
     */
    _partialSign(message, ...signers) {
      const signData = message.serialize();
      signers.forEach((signer) => {
        const signature2 = sign2(signData, signer.secretKey);
        this._addSignature(signer.publicKey, toBuffer(signature2));
      });
    }
    /**
     * Add an externally created signature to a transaction. The public key
     * must correspond to either the fee payer or a signer account in the transaction
     * instructions.
     *
     * @param {PublicKey} pubkey Public key that will be added to the transaction.
     * @param {Buffer} signature An externally created signature to add to the transaction.
     */
    addSignature(pubkey, signature2) {
      this._compile();
      this._addSignature(pubkey, signature2);
    }
    /**
     * @internal
     */
    _addSignature(pubkey, signature2) {
      assert9(signature2.length === 64);
      const index2 = this.signatures.findIndex((sigpair) => pubkey.equals(sigpair.publicKey));
      if (index2 < 0) {
        throw new Error(`unknown signer: ${pubkey.toString()}`);
      }
      this.signatures[index2].signature = import_buffer4.Buffer.from(signature2);
    }
    /**
     * Verify signatures of a Transaction
     * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.
     * If no boolean is provided, we expect a fully signed Transaction by default.
     *
     * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction
     */
    verifySignatures(requireAllSignatures = true) {
      const signatureErrors = this._getMessageSignednessErrors(this.serializeMessage(), requireAllSignatures);
      return !signatureErrors;
    }
    /**
     * @internal
     */
    _getMessageSignednessErrors(message, requireAllSignatures) {
      const errors = {};
      for (const {
        signature: signature2,
        publicKey: publicKey3
      } of this.signatures) {
        if (signature2 === null) {
          if (requireAllSignatures) {
            (errors.missing ||= []).push(publicKey3);
          }
        } else {
          if (!verify(signature2, message, publicKey3.toBytes())) {
            (errors.invalid ||= []).push(publicKey3);
          }
        }
      }
      return errors.invalid || errors.missing ? errors : void 0;
    }
    /**
     * Serialize the Transaction in the wire format.
     *
     * @param {Buffer} [config] Config of transaction.
     *
     * @returns {Buffer} Signature of transaction in wire format.
     */
    serialize(config2) {
      const {
        requireAllSignatures,
        verifySignatures
      } = Object.assign({
        requireAllSignatures: true,
        verifySignatures: true
      }, config2);
      const signData = this.serializeMessage();
      if (verifySignatures) {
        const sigErrors = this._getMessageSignednessErrors(signData, requireAllSignatures);
        if (sigErrors) {
          let errorMessage = "Signature verification failed.";
          if (sigErrors.invalid) {
            errorMessage += `
Invalid signature for public key${sigErrors.invalid.length === 1 ? "" : "(s)"} [\`${sigErrors.invalid.map((p7) => p7.toBase58()).join("`, `")}\`].`;
          }
          if (sigErrors.missing) {
            errorMessage += `
Missing signature for public key${sigErrors.missing.length === 1 ? "" : "(s)"} [\`${sigErrors.missing.map((p7) => p7.toBase58()).join("`, `")}\`].`;
          }
          throw new Error(errorMessage);
        }
      }
      return this._serialize(signData);
    }
    /**
     * @internal
     */
    _serialize(signData) {
      const {
        signatures
      } = this;
      const signatureCount = [];
      encodeLength(signatureCount, signatures.length);
      const transactionLength = signatureCount.length + signatures.length * 64 + signData.length;
      const wireTransaction = import_buffer4.Buffer.alloc(transactionLength);
      assert9(signatures.length < 256);
      import_buffer4.Buffer.from(signatureCount).copy(wireTransaction, 0);
      signatures.forEach(({
        signature: signature2
      }, index2) => {
        if (signature2 !== null) {
          assert9(signature2.length === 64, `signature has invalid length`);
          import_buffer4.Buffer.from(signature2).copy(wireTransaction, signatureCount.length + index2 * 64);
        }
      });
      signData.copy(wireTransaction, signatureCount.length + signatures.length * 64);
      assert9(wireTransaction.length <= PACKET_DATA_SIZE, `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`);
      return wireTransaction;
    }
    /**
     * Deprecated method
     * @internal
     */
    get keys() {
      assert9(this.instructions.length === 1);
      return this.instructions[0].keys.map((keyObj) => keyObj.pubkey);
    }
    /**
     * Deprecated method
     * @internal
     */
    get programId() {
      assert9(this.instructions.length === 1);
      return this.instructions[0].programId;
    }
    /**
     * Deprecated method
     * @internal
     */
    get data() {
      assert9(this.instructions.length === 1);
      return this.instructions[0].data;
    }
    /**
     * Parse a wire transaction into a Transaction object.
     *
     * @param {Buffer | Uint8Array | Array<number>} buffer Signature of wire Transaction
     *
     * @returns {Transaction} Transaction associated with the signature
     */
    static from(buffer2) {
      let byteArray = [...buffer2];
      const signatureCount = decodeLength(byteArray);
      let signatures = [];
      for (let i5 = 0; i5 < signatureCount; i5++) {
        const signature2 = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);
        signatures.push(import_bs58.default.encode(import_buffer4.Buffer.from(signature2)));
      }
      return _Transaction.populate(Message.from(byteArray), signatures);
    }
    /**
     * Populate Transaction object from message and signatures
     *
     * @param {Message} message Message of transaction
     * @param {Array<string>} signatures List of signatures to assign to the transaction
     *
     * @returns {Transaction} The populated Transaction
     */
    static populate(message, signatures = []) {
      const transaction = new _Transaction();
      transaction.recentBlockhash = message.recentBlockhash;
      if (message.header.numRequiredSignatures > 0) {
        transaction.feePayer = message.accountKeys[0];
      }
      signatures.forEach((signature2, index2) => {
        const sigPubkeyPair = {
          signature: signature2 == import_bs58.default.encode(DEFAULT_SIGNATURE) ? null : import_bs58.default.decode(signature2),
          publicKey: message.accountKeys[index2]
        };
        transaction.signatures.push(sigPubkeyPair);
      });
      message.instructions.forEach((instruction) => {
        const keys2 = instruction.accounts.map((account) => {
          const pubkey = message.accountKeys[account];
          return {
            pubkey,
            isSigner: transaction.signatures.some((keyObj) => keyObj.publicKey.toString() === pubkey.toString()) || message.isAccountSigner(account),
            isWritable: message.isAccountWritable(account)
          };
        });
        transaction.instructions.push(new TransactionInstruction({
          keys: keys2,
          programId: message.accountKeys[instruction.programIdIndex],
          data: import_bs58.default.decode(instruction.data)
        }));
      });
      transaction._message = message;
      transaction._json = transaction.toJSON();
      return transaction;
    }
  };
  var NUM_TICKS_PER_SECOND = 160;
  var DEFAULT_TICKS_PER_SLOT = 64;
  var NUM_SLOTS_PER_SECOND = NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;
  var MS_PER_SLOT = 1e3 / NUM_SLOTS_PER_SECOND;
  var SYSVAR_CLOCK_PUBKEY = new PublicKey("SysvarC1ock11111111111111111111111111111111");
  var SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey("SysvarEpochSchedu1e111111111111111111111111");
  var SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey("Sysvar1nstructions1111111111111111111111111");
  var SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey("SysvarRecentB1ockHashes11111111111111111111");
  var SYSVAR_RENT_PUBKEY = new PublicKey("SysvarRent111111111111111111111111111111111");
  var SYSVAR_REWARDS_PUBKEY = new PublicKey("SysvarRewards111111111111111111111111111111");
  var SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey("SysvarS1otHashes111111111111111111111111111");
  var SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey("SysvarS1otHistory11111111111111111111111111");
  var SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey("SysvarStakeHistory1111111111111111111111111");
  var SendTransactionError = class extends Error {
    constructor({
      action,
      signature: signature2,
      transactionMessage,
      logs
    }) {
      const maybeLogsOutput = logs ? `Logs: 
${JSON.stringify(logs.slice(-10), null, 2)}. ` : "";
      const guideText = "\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.";
      let message;
      switch (action) {
        case "send":
          message = `Transaction ${signature2} resulted in an error. 
${transactionMessage}. ` + maybeLogsOutput + guideText;
          break;
        case "simulate":
          message = `Simulation failed. 
Message: ${transactionMessage}. 
` + maybeLogsOutput + guideText;
          break;
        default: {
          message = `Unknown action '${/* @__PURE__ */ ((a5) => a5)(action)}'`;
        }
      }
      super(message);
      this.signature = void 0;
      this.transactionMessage = void 0;
      this.transactionLogs = void 0;
      this.signature = signature2;
      this.transactionMessage = transactionMessage;
      this.transactionLogs = logs ? logs : void 0;
    }
    get transactionError() {
      return {
        message: this.transactionMessage,
        logs: Array.isArray(this.transactionLogs) ? this.transactionLogs : void 0
      };
    }
    /* @deprecated Use `await getLogs()` instead */
    get logs() {
      const cachedLogs = this.transactionLogs;
      if (cachedLogs != null && typeof cachedLogs === "object" && "then" in cachedLogs) {
        return void 0;
      }
      return cachedLogs;
    }
    async getLogs(connection) {
      if (!Array.isArray(this.transactionLogs)) {
        this.transactionLogs = new Promise((resolve, reject2) => {
          connection.getTransaction(this.signature).then((tx) => {
            if (tx && tx.meta && tx.meta.logMessages) {
              const logs = tx.meta.logMessages;
              this.transactionLogs = logs;
              resolve(logs);
            } else {
              reject2(new Error("Log messages not found"));
            }
          }).catch(reject2);
        });
      }
      return await this.transactionLogs;
    }
  };
  var SolanaJSONRPCError = class extends Error {
    constructor({
      code: code2,
      message,
      data
    }, customMessage) {
      super(customMessage != null ? `${customMessage}: ${message}` : message);
      this.code = void 0;
      this.data = void 0;
      this.code = code2;
      this.data = data;
      this.name = "SolanaJSONRPCError";
    }
  };
  async function sendAndConfirmTransaction(connection, transaction, signers, options) {
    const sendOptions = options && {
      skipPreflight: options.skipPreflight,
      preflightCommitment: options.preflightCommitment || options.commitment,
      maxRetries: options.maxRetries,
      minContextSlot: options.minContextSlot
    };
    const signature2 = await connection.sendTransaction(transaction, signers, sendOptions);
    let status;
    if (transaction.recentBlockhash != null && transaction.lastValidBlockHeight != null) {
      status = (await connection.confirmTransaction({
        abortSignal: options?.abortSignal,
        signature: signature2,
        blockhash: transaction.recentBlockhash,
        lastValidBlockHeight: transaction.lastValidBlockHeight
      }, options && options.commitment)).value;
    } else if (transaction.minNonceContextSlot != null && transaction.nonceInfo != null) {
      const {
        nonceInstruction
      } = transaction.nonceInfo;
      const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;
      status = (await connection.confirmTransaction({
        abortSignal: options?.abortSignal,
        minContextSlot: transaction.minNonceContextSlot,
        nonceAccountPubkey,
        nonceValue: transaction.nonceInfo.nonce,
        signature: signature2
      }, options && options.commitment)).value;
    } else {
      if (options?.abortSignal != null) {
        console.warn("sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.");
      }
      status = (await connection.confirmTransaction(signature2, options && options.commitment)).value;
    }
    if (status.err) {
      if (signature2 != null) {
        throw new SendTransactionError({
          action: "send",
          signature: signature2,
          transactionMessage: `Status: (${JSON.stringify(status)})`
        });
      }
      throw new Error(`Transaction ${signature2} failed (${JSON.stringify(status)})`);
    }
    return signature2;
  }
  function sleep(ms2) {
    return new Promise((resolve) => setTimeout(resolve, ms2));
  }
  function encodeData3(type2, fields) {
    const allocLength = type2.layout.span >= 0 ? type2.layout.span : getAlloc(type2, fields);
    const data = import_buffer4.Buffer.alloc(allocLength);
    const layoutFields = Object.assign({
      instruction: type2.index
    }, fields);
    type2.layout.encode(layoutFields, data);
    return data;
  }
  var FeeCalculatorLayout = BufferLayout.nu64("lamportsPerSignature");
  var NonceAccountLayout = BufferLayout.struct([BufferLayout.u32("version"), BufferLayout.u32("state"), publicKey("authorizedPubkey"), publicKey("nonce"), BufferLayout.struct([FeeCalculatorLayout], "feeCalculator")]);
  var NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;
  var NonceAccount = class _NonceAccount {
    /**
     * @internal
     */
    constructor(args) {
      this.authorizedPubkey = void 0;
      this.nonce = void 0;
      this.feeCalculator = void 0;
      this.authorizedPubkey = args.authorizedPubkey;
      this.nonce = args.nonce;
      this.feeCalculator = args.feeCalculator;
    }
    /**
     * Deserialize NonceAccount from the account data.
     *
     * @param buffer account data
     * @return NonceAccount
     */
    static fromAccountData(buffer2) {
      const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer2), 0);
      return new _NonceAccount({
        authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),
        nonce: new PublicKey(nonceAccount.nonce).toString(),
        feeCalculator: nonceAccount.feeCalculator
      });
    }
  };
  function u64(property) {
    const layout = (0, import_buffer_layout.blob)(8, property);
    const decode9 = layout.decode.bind(layout);
    const encode11 = layout.encode.bind(layout);
    const bigIntLayout = layout;
    const codec2 = getU64Codec();
    bigIntLayout.decode = (buffer2, offset2) => {
      const src2 = decode9(buffer2, offset2);
      return codec2.decode(src2);
    };
    bigIntLayout.encode = (bigInt2, buffer2, offset2) => {
      const src2 = codec2.encode(bigInt2);
      return encode11(src2, buffer2, offset2);
    };
    return bigIntLayout;
  }
  var SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze({
    Create: {
      index: 0,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), BufferLayout.ns64("lamports"), BufferLayout.ns64("space"), publicKey("programId")])
    },
    Assign: {
      index: 1,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), publicKey("programId")])
    },
    Transfer: {
      index: 2,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), u64("lamports")])
    },
    CreateWithSeed: {
      index: 3,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), publicKey("base"), rustString("seed"), BufferLayout.ns64("lamports"), BufferLayout.ns64("space"), publicKey("programId")])
    },
    AdvanceNonceAccount: {
      index: 4,
      layout: BufferLayout.struct([BufferLayout.u32("instruction")])
    },
    WithdrawNonceAccount: {
      index: 5,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), BufferLayout.ns64("lamports")])
    },
    InitializeNonceAccount: {
      index: 6,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), publicKey("authorized")])
    },
    AuthorizeNonceAccount: {
      index: 7,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), publicKey("authorized")])
    },
    Allocate: {
      index: 8,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), BufferLayout.ns64("space")])
    },
    AllocateWithSeed: {
      index: 9,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), publicKey("base"), rustString("seed"), BufferLayout.ns64("space"), publicKey("programId")])
    },
    AssignWithSeed: {
      index: 10,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), publicKey("base"), rustString("seed"), publicKey("programId")])
    },
    TransferWithSeed: {
      index: 11,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), u64("lamports"), rustString("seed"), publicKey("programId")])
    },
    UpgradeNonceAccount: {
      index: 12,
      layout: BufferLayout.struct([BufferLayout.u32("instruction")])
    }
  });
  var SystemProgram = class _SystemProgram {
    /**
     * @internal
     */
    constructor() {
    }
    /**
     * Public key that identifies the System program
     */
    /**
     * Generate a transaction instruction that creates a new account
     */
    static createAccount(params) {
      const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Create;
      const data = encodeData3(type2, {
        lamports: params.lamports,
        space: params.space,
        programId: toBuffer(params.programId.toBuffer())
      });
      return new TransactionInstruction({
        keys: [{
          pubkey: params.fromPubkey,
          isSigner: true,
          isWritable: true
        }, {
          pubkey: params.newAccountPubkey,
          isSigner: true,
          isWritable: true
        }],
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a transaction instruction that transfers lamports from one account to another
     */
    static transfer(params) {
      let data;
      let keys2;
      if ("basePubkey" in params) {
        const type2 = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;
        data = encodeData3(type2, {
          lamports: BigInt(params.lamports),
          seed: params.seed,
          programId: toBuffer(params.programId.toBuffer())
        });
        keys2 = [{
          pubkey: params.fromPubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: params.basePubkey,
          isSigner: true,
          isWritable: false
        }, {
          pubkey: params.toPubkey,
          isSigner: false,
          isWritable: true
        }];
      } else {
        const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;
        data = encodeData3(type2, {
          lamports: BigInt(params.lamports)
        });
        keys2 = [{
          pubkey: params.fromPubkey,
          isSigner: true,
          isWritable: true
        }, {
          pubkey: params.toPubkey,
          isSigner: false,
          isWritable: true
        }];
      }
      return new TransactionInstruction({
        keys: keys2,
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a transaction instruction that assigns an account to a program
     */
    static assign(params) {
      let data;
      let keys2;
      if ("basePubkey" in params) {
        const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;
        data = encodeData3(type2, {
          base: toBuffer(params.basePubkey.toBuffer()),
          seed: params.seed,
          programId: toBuffer(params.programId.toBuffer())
        });
        keys2 = [{
          pubkey: params.accountPubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: params.basePubkey,
          isSigner: true,
          isWritable: false
        }];
      } else {
        const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Assign;
        data = encodeData3(type2, {
          programId: toBuffer(params.programId.toBuffer())
        });
        keys2 = [{
          pubkey: params.accountPubkey,
          isSigner: true,
          isWritable: true
        }];
      }
      return new TransactionInstruction({
        keys: keys2,
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a transaction instruction that creates a new account at
     *   an address generated with `from`, a seed, and programId
     */
    static createAccountWithSeed(params) {
      const type2 = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;
      const data = encodeData3(type2, {
        base: toBuffer(params.basePubkey.toBuffer()),
        seed: params.seed,
        lamports: params.lamports,
        space: params.space,
        programId: toBuffer(params.programId.toBuffer())
      });
      let keys2 = [{
        pubkey: params.fromPubkey,
        isSigner: true,
        isWritable: true
      }, {
        pubkey: params.newAccountPubkey,
        isSigner: false,
        isWritable: true
      }];
      if (!params.basePubkey.equals(params.fromPubkey)) {
        keys2.push({
          pubkey: params.basePubkey,
          isSigner: true,
          isWritable: false
        });
      }
      return new TransactionInstruction({
        keys: keys2,
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a transaction that creates a new Nonce account
     */
    static createNonceAccount(params) {
      const transaction = new Transaction();
      if ("basePubkey" in params && "seed" in params) {
        transaction.add(_SystemProgram.createAccountWithSeed({
          fromPubkey: params.fromPubkey,
          newAccountPubkey: params.noncePubkey,
          basePubkey: params.basePubkey,
          seed: params.seed,
          lamports: params.lamports,
          space: NONCE_ACCOUNT_LENGTH,
          programId: this.programId
        }));
      } else {
        transaction.add(_SystemProgram.createAccount({
          fromPubkey: params.fromPubkey,
          newAccountPubkey: params.noncePubkey,
          lamports: params.lamports,
          space: NONCE_ACCOUNT_LENGTH,
          programId: this.programId
        }));
      }
      const initParams = {
        noncePubkey: params.noncePubkey,
        authorizedPubkey: params.authorizedPubkey
      };
      transaction.add(this.nonceInitialize(initParams));
      return transaction;
    }
    /**
     * Generate an instruction to initialize a Nonce account
     */
    static nonceInitialize(params) {
      const type2 = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;
      const data = encodeData3(type2, {
        authorized: toBuffer(params.authorizedPubkey.toBuffer())
      });
      const instructionData = {
        keys: [{
          pubkey: params.noncePubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: SYSVAR_RENT_PUBKEY,
          isSigner: false,
          isWritable: false
        }],
        programId: this.programId,
        data
      };
      return new TransactionInstruction(instructionData);
    }
    /**
     * Generate an instruction to advance the nonce in a Nonce account
     */
    static nonceAdvance(params) {
      const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;
      const data = encodeData3(type2);
      const instructionData = {
        keys: [{
          pubkey: params.noncePubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: params.authorizedPubkey,
          isSigner: true,
          isWritable: false
        }],
        programId: this.programId,
        data
      };
      return new TransactionInstruction(instructionData);
    }
    /**
     * Generate a transaction instruction that withdraws lamports from a Nonce account
     */
    static nonceWithdraw(params) {
      const type2 = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;
      const data = encodeData3(type2, {
        lamports: params.lamports
      });
      return new TransactionInstruction({
        keys: [{
          pubkey: params.noncePubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: params.toPubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: SYSVAR_RENT_PUBKEY,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: params.authorizedPubkey,
          isSigner: true,
          isWritable: false
        }],
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a transaction instruction that authorizes a new PublicKey as the authority
     * on a Nonce account.
     */
    static nonceAuthorize(params) {
      const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;
      const data = encodeData3(type2, {
        authorized: toBuffer(params.newAuthorizedPubkey.toBuffer())
      });
      return new TransactionInstruction({
        keys: [{
          pubkey: params.noncePubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: params.authorizedPubkey,
          isSigner: true,
          isWritable: false
        }],
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a transaction instruction that allocates space in an account without funding
     */
    static allocate(params) {
      let data;
      let keys2;
      if ("basePubkey" in params) {
        const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;
        data = encodeData3(type2, {
          base: toBuffer(params.basePubkey.toBuffer()),
          seed: params.seed,
          space: params.space,
          programId: toBuffer(params.programId.toBuffer())
        });
        keys2 = [{
          pubkey: params.accountPubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: params.basePubkey,
          isSigner: true,
          isWritable: false
        }];
      } else {
        const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;
        data = encodeData3(type2, {
          space: params.space
        });
        keys2 = [{
          pubkey: params.accountPubkey,
          isSigner: true,
          isWritable: true
        }];
      }
      return new TransactionInstruction({
        keys: keys2,
        programId: this.programId,
        data
      });
    }
  };
  SystemProgram.programId = new PublicKey("11111111111111111111111111111111");
  var CHUNK_SIZE = PACKET_DATA_SIZE - 300;
  var Loader = class _Loader {
    /**
     * @internal
     */
    constructor() {
    }
    /**
     * Amount of program data placed in each load Transaction
     */
    /**
     * Minimum number of signatures required to load a program not including
     * retries
     *
     * Can be used to calculate transaction fees
     */
    static getMinNumSignatures(dataLength) {
      return 2 * // Every transaction requires two signatures (payer + program)
      (Math.ceil(dataLength / _Loader.chunkSize) + 1 + // Add one for Create transaction
      1);
    }
    /**
     * Loads a generic program
     *
     * @param connection The connection to use
     * @param payer System account that pays to load the program
     * @param program Account to load the program into
     * @param programId Public key that identifies the loader
     * @param data Program octets
     * @return true if program was loaded successfully, false if program was already loaded
     */
    static async load(connection, payer, program, programId, data) {
      {
        const balanceNeeded = await connection.getMinimumBalanceForRentExemption(data.length);
        const programInfo = await connection.getAccountInfo(program.publicKey, "confirmed");
        let transaction = null;
        if (programInfo !== null) {
          if (programInfo.executable) {
            console.error("Program load failed, account is already executable");
            return false;
          }
          if (programInfo.data.length !== data.length) {
            transaction = transaction || new Transaction();
            transaction.add(SystemProgram.allocate({
              accountPubkey: program.publicKey,
              space: data.length
            }));
          }
          if (!programInfo.owner.equals(programId)) {
            transaction = transaction || new Transaction();
            transaction.add(SystemProgram.assign({
              accountPubkey: program.publicKey,
              programId
            }));
          }
          if (programInfo.lamports < balanceNeeded) {
            transaction = transaction || new Transaction();
            transaction.add(SystemProgram.transfer({
              fromPubkey: payer.publicKey,
              toPubkey: program.publicKey,
              lamports: balanceNeeded - programInfo.lamports
            }));
          }
        } else {
          transaction = new Transaction().add(SystemProgram.createAccount({
            fromPubkey: payer.publicKey,
            newAccountPubkey: program.publicKey,
            lamports: balanceNeeded > 0 ? balanceNeeded : 1,
            space: data.length,
            programId
          }));
        }
        if (transaction !== null) {
          await sendAndConfirmTransaction(connection, transaction, [payer, program], {
            commitment: "confirmed"
          });
        }
      }
      const dataLayout = BufferLayout.struct([BufferLayout.u32("instruction"), BufferLayout.u32("offset"), BufferLayout.u32("bytesLength"), BufferLayout.u32("bytesLengthPadding"), BufferLayout.seq(BufferLayout.u8("byte"), BufferLayout.offset(BufferLayout.u32(), -8), "bytes")]);
      const chunkSize = _Loader.chunkSize;
      let offset2 = 0;
      let array3 = data;
      let transactions = [];
      while (array3.length > 0) {
        const bytes = array3.slice(0, chunkSize);
        const data2 = import_buffer4.Buffer.alloc(chunkSize + 16);
        dataLayout.encode({
          instruction: 0,
          // Load instruction
          offset: offset2,
          bytes,
          bytesLength: 0,
          bytesLengthPadding: 0
        }, data2);
        const transaction = new Transaction().add({
          keys: [{
            pubkey: program.publicKey,
            isSigner: true,
            isWritable: true
          }],
          programId,
          data: data2
        });
        transactions.push(sendAndConfirmTransaction(connection, transaction, [payer, program], {
          commitment: "confirmed"
        }));
        if (connection._rpcEndpoint.includes("solana.com")) {
          const REQUESTS_PER_SECOND = 4;
          await sleep(1e3 / REQUESTS_PER_SECOND);
        }
        offset2 += chunkSize;
        array3 = array3.slice(chunkSize);
      }
      await Promise.all(transactions);
      {
        const dataLayout2 = BufferLayout.struct([BufferLayout.u32("instruction")]);
        const data2 = import_buffer4.Buffer.alloc(dataLayout2.span);
        dataLayout2.encode({
          instruction: 1
          // Finalize instruction
        }, data2);
        const transaction = new Transaction().add({
          keys: [{
            pubkey: program.publicKey,
            isSigner: true,
            isWritable: true
          }, {
            pubkey: SYSVAR_RENT_PUBKEY,
            isSigner: false,
            isWritable: false
          }],
          programId,
          data: data2
        });
        const deployCommitment = "processed";
        const finalizeSignature = await connection.sendTransaction(transaction, [payer, program], {
          preflightCommitment: deployCommitment
        });
        const {
          context,
          value
        } = await connection.confirmTransaction({
          signature: finalizeSignature,
          lastValidBlockHeight: transaction.lastValidBlockHeight,
          blockhash: transaction.recentBlockhash
        }, deployCommitment);
        if (value.err) {
          throw new Error(`Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`);
        }
        while (true) {
          try {
            const currentSlot = await connection.getSlot({
              commitment: deployCommitment
            });
            if (currentSlot > context.slot) {
              break;
            }
          } catch {
          }
          await new Promise((resolve) => setTimeout(resolve, Math.round(MS_PER_SLOT / 2)));
        }
      }
      return true;
    }
  };
  Loader.chunkSize = CHUNK_SIZE;
  var BPF_LOADER_PROGRAM_ID = new PublicKey("BPFLoader2111111111111111111111111111111111");
  function getDefaultExportFromCjs(x13) {
    return x13 && x13.__esModule && Object.prototype.hasOwnProperty.call(x13, "default") ? x13["default"] : x13;
  }
  var fastStableStringify$1;
  var hasRequiredFastStableStringify;
  function requireFastStableStringify() {
    if (hasRequiredFastStableStringify) return fastStableStringify$1;
    hasRequiredFastStableStringify = 1;
    var objToString = Object.prototype.toString;
    var objKeys = Object.keys || function(obj) {
      var keys2 = [];
      for (var name2 in obj) {
        keys2.push(name2);
      }
      return keys2;
    };
    function stringify6(val, isArrayProp) {
      var i5, max, str, keys2, key2, propVal, toStr;
      if (val === true) {
        return "true";
      }
      if (val === false) {
        return "false";
      }
      switch (typeof val) {
        case "object":
          if (val === null) {
            return null;
          } else if (val.toJSON && typeof val.toJSON === "function") {
            return stringify6(val.toJSON(), isArrayProp);
          } else {
            toStr = objToString.call(val);
            if (toStr === "[object Array]") {
              str = "[";
              max = val.length - 1;
              for (i5 = 0; i5 < max; i5++) {
                str += stringify6(val[i5], true) + ",";
              }
              if (max > -1) {
                str += stringify6(val[i5], true);
              }
              return str + "]";
            } else if (toStr === "[object Object]") {
              keys2 = objKeys(val).sort();
              max = keys2.length;
              str = "";
              i5 = 0;
              while (i5 < max) {
                key2 = keys2[i5];
                propVal = stringify6(val[key2], false);
                if (propVal !== void 0) {
                  if (str) {
                    str += ",";
                  }
                  str += JSON.stringify(key2) + ":" + propVal;
                }
                i5++;
              }
              return "{" + str + "}";
            } else {
              return JSON.stringify(val);
            }
          }
        case "function":
        case "undefined":
          return isArrayProp ? null : void 0;
        case "string":
          return JSON.stringify(val);
        default:
          return isFinite(val) ? val : null;
      }
    }
    fastStableStringify$1 = function(val) {
      var returnVal = stringify6(val, false);
      if (returnVal !== void 0) {
        return "" + returnVal;
      }
    };
    return fastStableStringify$1;
  }
  var fastStableStringifyExports = /* @__PURE__ */ requireFastStableStringify();
  var fastStableStringify = /* @__PURE__ */ getDefaultExportFromCjs(fastStableStringifyExports);
  var MINIMUM_SLOT_PER_EPOCH = 32;
  function trailingZeros(n6) {
    let trailingZeros2 = 0;
    while (n6 > 1) {
      n6 /= 2;
      trailingZeros2++;
    }
    return trailingZeros2;
  }
  function nextPowerOfTwo(n6) {
    if (n6 === 0) return 1;
    n6--;
    n6 |= n6 >> 1;
    n6 |= n6 >> 2;
    n6 |= n6 >> 4;
    n6 |= n6 >> 8;
    n6 |= n6 >> 16;
    n6 |= n6 >> 32;
    return n6 + 1;
  }
  var EpochSchedule = class {
    constructor(slotsPerEpoch, leaderScheduleSlotOffset, warmup, firstNormalEpoch, firstNormalSlot) {
      this.slotsPerEpoch = void 0;
      this.leaderScheduleSlotOffset = void 0;
      this.warmup = void 0;
      this.firstNormalEpoch = void 0;
      this.firstNormalSlot = void 0;
      this.slotsPerEpoch = slotsPerEpoch;
      this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;
      this.warmup = warmup;
      this.firstNormalEpoch = firstNormalEpoch;
      this.firstNormalSlot = firstNormalSlot;
    }
    getEpoch(slot) {
      return this.getEpochAndSlotIndex(slot)[0];
    }
    getEpochAndSlotIndex(slot) {
      if (slot < this.firstNormalSlot) {
        const epoch = trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) - trailingZeros(MINIMUM_SLOT_PER_EPOCH) - 1;
        const epochLen = this.getSlotsInEpoch(epoch);
        const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);
        return [epoch, slotIndex];
      } else {
        const normalSlotIndex = slot - this.firstNormalSlot;
        const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);
        const epoch = this.firstNormalEpoch + normalEpochIndex;
        const slotIndex = normalSlotIndex % this.slotsPerEpoch;
        return [epoch, slotIndex];
      }
    }
    getFirstSlotInEpoch(epoch) {
      if (epoch <= this.firstNormalEpoch) {
        return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;
      } else {
        return (epoch - this.firstNormalEpoch) * this.slotsPerEpoch + this.firstNormalSlot;
      }
    }
    getLastSlotInEpoch(epoch) {
      return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;
    }
    getSlotsInEpoch(epoch) {
      if (epoch < this.firstNormalEpoch) {
        return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));
      } else {
        return this.slotsPerEpoch;
      }
    }
  };
  var fetchImpl = globalThis.fetch;
  var RpcWebSocketClient = class extends CommonClient {
    constructor(address, options, generate_request_id) {
      const webSocketFactory = (url2) => {
        const rpc = WebSocket2(url2, {
          autoconnect: true,
          max_reconnects: 5,
          reconnect: true,
          reconnect_interval: 1e3,
          ...options
        });
        if ("socket" in rpc) {
          this.underlyingSocket = rpc.socket;
        } else {
          this.underlyingSocket = rpc;
        }
        return rpc;
      };
      super(webSocketFactory, address, options, generate_request_id);
      this.underlyingSocket = void 0;
    }
    call(...args) {
      const readyState = this.underlyingSocket?.readyState;
      if (readyState === 1) {
        return super.call(...args);
      }
      return Promise.reject(new Error("Tried to call a JSON-RPC method `" + args[0] + "` but the socket was not `CONNECTING` or `OPEN` (`readyState` was " + readyState + ")"));
    }
    notify(...args) {
      const readyState = this.underlyingSocket?.readyState;
      if (readyState === 1) {
        return super.notify(...args);
      }
      return Promise.reject(new Error("Tried to send a JSON-RPC notification `" + args[0] + "` but the socket was not `CONNECTING` or `OPEN` (`readyState` was " + readyState + ")"));
    }
  };
  function decodeData(type2, data) {
    let decoded;
    try {
      decoded = type2.layout.decode(data);
    } catch (err2) {
      throw new Error("invalid instruction; " + err2);
    }
    if (decoded.typeIndex !== type2.index) {
      throw new Error(`invalid account data; account type mismatch ${decoded.typeIndex} != ${type2.index}`);
    }
    return decoded;
  }
  var LOOKUP_TABLE_META_SIZE = 56;
  var AddressLookupTableAccount = class {
    constructor(args) {
      this.key = void 0;
      this.state = void 0;
      this.key = args.key;
      this.state = args.state;
    }
    isActive() {
      const U64_MAX = BigInt("0xffffffffffffffff");
      return this.state.deactivationSlot === U64_MAX;
    }
    static deserialize(accountData) {
      const meta3 = decodeData(LookupTableMetaLayout, accountData);
      const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;
      assert9(serializedAddressesLen >= 0, "lookup table is invalid");
      assert9(serializedAddressesLen % 32 === 0, "lookup table is invalid");
      const numSerializedAddresses = serializedAddressesLen / 32;
      const {
        addresses
      } = BufferLayout.struct([BufferLayout.seq(publicKey(), numSerializedAddresses, "addresses")]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));
      return {
        deactivationSlot: meta3.deactivationSlot,
        lastExtendedSlot: meta3.lastExtendedSlot,
        lastExtendedSlotStartIndex: meta3.lastExtendedStartIndex,
        authority: meta3.authority.length !== 0 ? new PublicKey(meta3.authority[0]) : void 0,
        addresses: addresses.map((address) => new PublicKey(address))
      };
    }
  };
  var LookupTableMetaLayout = {
    index: 1,
    layout: BufferLayout.struct([
      BufferLayout.u32("typeIndex"),
      u64("deactivationSlot"),
      BufferLayout.nu64("lastExtendedSlot"),
      BufferLayout.u8("lastExtendedStartIndex"),
      BufferLayout.u8(),
      // option
      BufferLayout.seq(publicKey(), BufferLayout.offset(BufferLayout.u8(), -1), "authority")
    ])
  };
  var URL_RE = /^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;
  function makeWebsocketUrl(endpoint2) {
    const matches = endpoint2.match(URL_RE);
    if (matches == null) {
      throw TypeError(`Failed to validate endpoint URL \`${endpoint2}\``);
    }
    const [
      _6,
      // eslint-disable-line @typescript-eslint/no-unused-vars
      hostish,
      portWithColon,
      rest
    ] = matches;
    const protocol = endpoint2.startsWith("https:") ? "wss:" : "ws:";
    const startPort = portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);
    const websocketPort = (
      // Only shift the port by +1 as a convention for ws(s) only if given endpoint
      // is explicitly specifying the endpoint port (HTTP-based RPC), assuming
      // we're directly trying to connect to agave-validator's ws listening port.
      // When the endpoint omits the port, we're connecting to the protocol
      // default ports: http(80) or https(443) and it's assumed we're behind a reverse
      // proxy which manages WebSocket upgrade and backend port redirection.
      startPort == null ? "" : `:${startPort + 1}`
    );
    return `${protocol}//${hostish}${websocketPort}${rest}`;
  }
  var PublicKeyFromString = coerce(instance(PublicKey), string(), (value) => new PublicKey(value));
  var RawAccountDataResult = tuple([string(), literal("base64")]);
  var BufferFromRawAccountData = coerce(instance(import_buffer4.Buffer), RawAccountDataResult, (value) => import_buffer4.Buffer.from(value[0], "base64"));
  var BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1e3;
  function assertEndpointUrl(putativeUrl) {
    if (/^https?:/.test(putativeUrl) === false) {
      throw new TypeError("Endpoint URL must start with `http:` or `https:`.");
    }
    return putativeUrl;
  }
  function extractCommitmentFromConfig(commitmentOrConfig) {
    let commitment;
    let config2;
    if (typeof commitmentOrConfig === "string") {
      commitment = commitmentOrConfig;
    } else if (commitmentOrConfig) {
      const {
        commitment: specifiedCommitment,
        ...specifiedConfig
      } = commitmentOrConfig;
      commitment = specifiedCommitment;
      config2 = specifiedConfig;
    }
    return {
      commitment,
      config: config2
    };
  }
  function applyDefaultMemcmpEncodingToFilters(filters) {
    return filters.map((filter) => "memcmp" in filter ? {
      ...filter,
      memcmp: {
        ...filter.memcmp,
        encoding: filter.memcmp.encoding ?? "base58"
      }
    } : filter);
  }
  function createRpcResult(result) {
    return union([type({
      jsonrpc: literal("2.0"),
      id: string(),
      result
    }), type({
      jsonrpc: literal("2.0"),
      id: string(),
      error: type({
        code: unknown(),
        message: string(),
        data: optional(any())
      })
    })]);
  }
  var UnknownRpcResult = createRpcResult(unknown());
  function jsonRpcResult(schema) {
    return coerce(createRpcResult(schema), UnknownRpcResult, (value) => {
      if ("error" in value) {
        return value;
      } else {
        return {
          ...value,
          result: create2(value.result, schema)
        };
      }
    });
  }
  function jsonRpcResultAndContext(value) {
    return jsonRpcResult(type({
      context: type({
        slot: number()
      }),
      value
    }));
  }
  function notificationResultAndContext(value) {
    return type({
      context: type({
        slot: number()
      }),
      value
    });
  }
  function versionedMessageFromResponse(version16, response) {
    if (version16 === 0) {
      return new MessageV0({
        header: response.header,
        staticAccountKeys: response.accountKeys.map((accountKey) => new PublicKey(accountKey)),
        recentBlockhash: response.recentBlockhash,
        compiledInstructions: response.instructions.map((ix) => ({
          programIdIndex: ix.programIdIndex,
          accountKeyIndexes: ix.accounts,
          data: import_bs58.default.decode(ix.data)
        })),
        addressTableLookups: response.addressTableLookups
      });
    } else {
      return new Message(response);
    }
  }
  var GetInflationGovernorResult = type({
    foundation: number(),
    foundationTerm: number(),
    initial: number(),
    taper: number(),
    terminal: number()
  });
  var GetInflationRewardResult = jsonRpcResult(array(nullable(type({
    epoch: number(),
    effectiveSlot: number(),
    amount: number(),
    postBalance: number(),
    commission: optional(nullable(number()))
  }))));
  var GetRecentPrioritizationFeesResult = array(type({
    slot: number(),
    prioritizationFee: number()
  }));
  var GetInflationRateResult = type({
    total: number(),
    validator: number(),
    foundation: number(),
    epoch: number()
  });
  var GetEpochInfoResult = type({
    epoch: number(),
    slotIndex: number(),
    slotsInEpoch: number(),
    absoluteSlot: number(),
    blockHeight: optional(number()),
    transactionCount: optional(number())
  });
  var GetEpochScheduleResult = type({
    slotsPerEpoch: number(),
    leaderScheduleSlotOffset: number(),
    warmup: boolean(),
    firstNormalEpoch: number(),
    firstNormalSlot: number()
  });
  var GetLeaderScheduleResult = record(string(), array(number()));
  var TransactionErrorResult = nullable(union([type({}), string()]));
  var SignatureStatusResult = type({
    err: TransactionErrorResult
  });
  var SignatureReceivedResult = literal("receivedSignature");
  var VersionResult = type({
    "solana-core": string(),
    "feature-set": optional(number())
  });
  var ParsedInstructionStruct = type({
    program: string(),
    programId: PublicKeyFromString,
    parsed: unknown()
  });
  var PartiallyDecodedInstructionStruct = type({
    programId: PublicKeyFromString,
    accounts: array(PublicKeyFromString),
    data: string()
  });
  var SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({
    err: nullable(union([type({}), string()])),
    logs: nullable(array(string())),
    accounts: optional(nullable(array(nullable(type({
      executable: boolean(),
      owner: string(),
      lamports: number(),
      data: array(string()),
      rentEpoch: optional(number())
    }))))),
    unitsConsumed: optional(number()),
    returnData: optional(nullable(type({
      programId: string(),
      data: tuple([string(), literal("base64")])
    }))),
    innerInstructions: optional(nullable(array(type({
      index: number(),
      instructions: array(union([ParsedInstructionStruct, PartiallyDecodedInstructionStruct]))
    }))))
  }));
  var BlockProductionResponseStruct = jsonRpcResultAndContext(type({
    byIdentity: record(string(), array(number())),
    range: type({
      firstSlot: number(),
      lastSlot: number()
    })
  }));
  function createRpcClient(url2, httpHeaders, customFetch, fetchMiddleware, disableRetryOnRateLimit, httpAgent) {
    const fetch2 = customFetch ? customFetch : fetchImpl;
    let agent;
    {
      if (httpAgent != null) {
        console.warn("You have supplied an `httpAgent` when creating a `Connection` in a browser environment.It has been ignored; `httpAgent` is only used in Node environments.");
      }
    }
    let fetchWithMiddleware;
    if (fetchMiddleware) {
      fetchWithMiddleware = async (info, init2) => {
        const modifiedFetchArgs = await new Promise((resolve, reject2) => {
          try {
            fetchMiddleware(info, init2, (modifiedInfo, modifiedInit) => resolve([modifiedInfo, modifiedInit]));
          } catch (error51) {
            reject2(error51);
          }
        });
        return await fetch2(...modifiedFetchArgs);
      };
    }
    const clientBrowser = new import_browser.default(async (request, callback) => {
      const options = {
        method: "POST",
        body: request,
        agent,
        headers: Object.assign({
          "Content-Type": "application/json"
        }, httpHeaders || {}, COMMON_HTTP_HEADERS)
      };
      try {
        let too_many_requests_retries = 5;
        let res;
        let waitTime = 500;
        for (; ; ) {
          if (fetchWithMiddleware) {
            res = await fetchWithMiddleware(url2, options);
          } else {
            res = await fetch2(url2, options);
          }
          if (res.status !== 429) {
            break;
          }
          if (disableRetryOnRateLimit === true) {
            break;
          }
          too_many_requests_retries -= 1;
          if (too_many_requests_retries === 0) {
            break;
          }
          console.error(`Server responded with ${res.status} ${res.statusText}.  Retrying after ${waitTime}ms delay...`);
          await sleep(waitTime);
          waitTime *= 2;
        }
        const text = await res.text();
        if (res.ok) {
          callback(null, text);
        } else {
          callback(new Error(`${res.status} ${res.statusText}: ${text}`));
        }
      } catch (err2) {
        if (err2 instanceof Error) callback(err2);
      }
    }, {});
    return clientBrowser;
  }
  function createRpcRequest(client) {
    return (method, args) => {
      return new Promise((resolve, reject2) => {
        client.request(method, args, (err2, response) => {
          if (err2) {
            reject2(err2);
            return;
          }
          resolve(response);
        });
      });
    };
  }
  function createRpcBatchRequest(client) {
    return (requests) => {
      return new Promise((resolve, reject2) => {
        if (requests.length === 0) resolve([]);
        const batch = requests.map((params) => {
          return client.request(params.methodName, params.args);
        });
        client.request(batch, (err2, response) => {
          if (err2) {
            reject2(err2);
            return;
          }
          resolve(response);
        });
      });
    };
  }
  var GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);
  var GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);
  var GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);
  var GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);
  var GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);
  var GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);
  var SlotRpcResult = jsonRpcResult(number());
  var GetSupplyRpcResult = jsonRpcResultAndContext(type({
    total: number(),
    circulating: number(),
    nonCirculating: number(),
    nonCirculatingAccounts: array(PublicKeyFromString)
  }));
  var TokenAmountResult = type({
    amount: string(),
    uiAmount: nullable(number()),
    decimals: number(),
    uiAmountString: optional(string())
  });
  var GetTokenLargestAccountsResult = jsonRpcResultAndContext(array(type({
    address: PublicKeyFromString,
    amount: string(),
    uiAmount: nullable(number()),
    decimals: number(),
    uiAmountString: optional(string())
  })));
  var GetTokenAccountsByOwner = jsonRpcResultAndContext(array(type({
    pubkey: PublicKeyFromString,
    account: type({
      executable: boolean(),
      owner: PublicKeyFromString,
      lamports: number(),
      data: BufferFromRawAccountData,
      rentEpoch: number()
    })
  })));
  var ParsedAccountDataResult = type({
    program: string(),
    parsed: unknown(),
    space: number()
  });
  var GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(array(type({
    pubkey: PublicKeyFromString,
    account: type({
      executable: boolean(),
      owner: PublicKeyFromString,
      lamports: number(),
      data: ParsedAccountDataResult,
      rentEpoch: number()
    })
  })));
  var GetLargestAccountsRpcResult = jsonRpcResultAndContext(array(type({
    lamports: number(),
    address: PublicKeyFromString
  })));
  var AccountInfoResult = type({
    executable: boolean(),
    owner: PublicKeyFromString,
    lamports: number(),
    data: BufferFromRawAccountData,
    rentEpoch: number()
  });
  var KeyedAccountInfoResult = type({
    pubkey: PublicKeyFromString,
    account: AccountInfoResult
  });
  var ParsedOrRawAccountData = coerce(union([instance(import_buffer4.Buffer), ParsedAccountDataResult]), union([RawAccountDataResult, ParsedAccountDataResult]), (value) => {
    if (Array.isArray(value)) {
      return create2(value, BufferFromRawAccountData);
    } else {
      return value;
    }
  });
  var ParsedAccountInfoResult = type({
    executable: boolean(),
    owner: PublicKeyFromString,
    lamports: number(),
    data: ParsedOrRawAccountData,
    rentEpoch: number()
  });
  var KeyedParsedAccountInfoResult = type({
    pubkey: PublicKeyFromString,
    account: ParsedAccountInfoResult
  });
  var StakeActivationResult = type({
    state: union([literal("active"), literal("inactive"), literal("activating"), literal("deactivating")]),
    active: number(),
    inactive: number()
  });
  var GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(array(type({
    signature: string(),
    slot: number(),
    err: TransactionErrorResult,
    memo: nullable(string()),
    blockTime: optional(nullable(number()))
  })));
  var GetSignaturesForAddressRpcResult = jsonRpcResult(array(type({
    signature: string(),
    slot: number(),
    err: TransactionErrorResult,
    memo: nullable(string()),
    blockTime: optional(nullable(number()))
  })));
  var AccountNotificationResult = type({
    subscription: number(),
    result: notificationResultAndContext(AccountInfoResult)
  });
  var ProgramAccountInfoResult = type({
    pubkey: PublicKeyFromString,
    account: AccountInfoResult
  });
  var ProgramAccountNotificationResult = type({
    subscription: number(),
    result: notificationResultAndContext(ProgramAccountInfoResult)
  });
  var SlotInfoResult = type({
    parent: number(),
    slot: number(),
    root: number()
  });
  var SlotNotificationResult = type({
    subscription: number(),
    result: SlotInfoResult
  });
  var SlotUpdateResult = union([type({
    type: union([literal("firstShredReceived"), literal("completed"), literal("optimisticConfirmation"), literal("root")]),
    slot: number(),
    timestamp: number()
  }), type({
    type: literal("createdBank"),
    parent: number(),
    slot: number(),
    timestamp: number()
  }), type({
    type: literal("frozen"),
    slot: number(),
    timestamp: number(),
    stats: type({
      numTransactionEntries: number(),
      numSuccessfulTransactions: number(),
      numFailedTransactions: number(),
      maxTransactionsPerEntry: number()
    })
  }), type({
    type: literal("dead"),
    slot: number(),
    timestamp: number(),
    err: string()
  })]);
  var SlotUpdateNotificationResult = type({
    subscription: number(),
    result: SlotUpdateResult
  });
  var SignatureNotificationResult = type({
    subscription: number(),
    result: notificationResultAndContext(union([SignatureStatusResult, SignatureReceivedResult]))
  });
  var RootNotificationResult = type({
    subscription: number(),
    result: number()
  });
  var ContactInfoResult = type({
    pubkey: string(),
    gossip: nullable(string()),
    tpu: nullable(string()),
    rpc: nullable(string()),
    version: nullable(string())
  });
  var VoteAccountInfoResult = type({
    votePubkey: string(),
    nodePubkey: string(),
    activatedStake: number(),
    epochVoteAccount: boolean(),
    epochCredits: array(tuple([number(), number(), number()])),
    commission: number(),
    lastVote: number(),
    rootSlot: nullable(number())
  });
  var GetVoteAccounts = jsonRpcResult(type({
    current: array(VoteAccountInfoResult),
    delinquent: array(VoteAccountInfoResult)
  }));
  var ConfirmationStatus = union([literal("processed"), literal("confirmed"), literal("finalized")]);
  var SignatureStatusResponse = type({
    slot: number(),
    confirmations: nullable(number()),
    err: TransactionErrorResult,
    confirmationStatus: optional(ConfirmationStatus)
  });
  var GetSignatureStatusesRpcResult = jsonRpcResultAndContext(array(nullable(SignatureStatusResponse)));
  var GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());
  var AddressTableLookupStruct = type({
    accountKey: PublicKeyFromString,
    writableIndexes: array(number()),
    readonlyIndexes: array(number())
  });
  var ConfirmedTransactionResult = type({
    signatures: array(string()),
    message: type({
      accountKeys: array(string()),
      header: type({
        numRequiredSignatures: number(),
        numReadonlySignedAccounts: number(),
        numReadonlyUnsignedAccounts: number()
      }),
      instructions: array(type({
        accounts: array(number()),
        data: string(),
        programIdIndex: number()
      })),
      recentBlockhash: string(),
      addressTableLookups: optional(array(AddressTableLookupStruct))
    })
  });
  var AnnotatedAccountKey = type({
    pubkey: PublicKeyFromString,
    signer: boolean(),
    writable: boolean(),
    source: optional(union([literal("transaction"), literal("lookupTable")]))
  });
  var ConfirmedTransactionAccountsModeResult = type({
    accountKeys: array(AnnotatedAccountKey),
    signatures: array(string())
  });
  var ParsedInstructionResult = type({
    parsed: unknown(),
    program: string(),
    programId: PublicKeyFromString
  });
  var RawInstructionResult = type({
    accounts: array(PublicKeyFromString),
    data: string(),
    programId: PublicKeyFromString
  });
  var InstructionResult = union([RawInstructionResult, ParsedInstructionResult]);
  var UnknownInstructionResult = union([type({
    parsed: unknown(),
    program: string(),
    programId: string()
  }), type({
    accounts: array(string()),
    data: string(),
    programId: string()
  })]);
  var ParsedOrRawInstruction = coerce(InstructionResult, UnknownInstructionResult, (value) => {
    if ("accounts" in value) {
      return create2(value, RawInstructionResult);
    } else {
      return create2(value, ParsedInstructionResult);
    }
  });
  var ParsedConfirmedTransactionResult = type({
    signatures: array(string()),
    message: type({
      accountKeys: array(AnnotatedAccountKey),
      instructions: array(ParsedOrRawInstruction),
      recentBlockhash: string(),
      addressTableLookups: optional(nullable(array(AddressTableLookupStruct)))
    })
  });
  var TokenBalanceResult = type({
    accountIndex: number(),
    mint: string(),
    owner: optional(string()),
    programId: optional(string()),
    uiTokenAmount: TokenAmountResult
  });
  var LoadedAddressesResult = type({
    writable: array(PublicKeyFromString),
    readonly: array(PublicKeyFromString)
  });
  var ConfirmedTransactionMetaResult = type({
    err: TransactionErrorResult,
    fee: number(),
    innerInstructions: optional(nullable(array(type({
      index: number(),
      instructions: array(type({
        accounts: array(number()),
        data: string(),
        programIdIndex: number()
      }))
    })))),
    preBalances: array(number()),
    postBalances: array(number()),
    logMessages: optional(nullable(array(string()))),
    preTokenBalances: optional(nullable(array(TokenBalanceResult))),
    postTokenBalances: optional(nullable(array(TokenBalanceResult))),
    loadedAddresses: optional(LoadedAddressesResult),
    computeUnitsConsumed: optional(number()),
    costUnits: optional(number())
  });
  var ParsedConfirmedTransactionMetaResult = type({
    err: TransactionErrorResult,
    fee: number(),
    innerInstructions: optional(nullable(array(type({
      index: number(),
      instructions: array(ParsedOrRawInstruction)
    })))),
    preBalances: array(number()),
    postBalances: array(number()),
    logMessages: optional(nullable(array(string()))),
    preTokenBalances: optional(nullable(array(TokenBalanceResult))),
    postTokenBalances: optional(nullable(array(TokenBalanceResult))),
    loadedAddresses: optional(LoadedAddressesResult),
    computeUnitsConsumed: optional(number()),
    costUnits: optional(number())
  });
  var TransactionVersionStruct = union([literal(0), literal("legacy")]);
  var RewardsResult = type({
    pubkey: string(),
    lamports: number(),
    postBalance: nullable(number()),
    rewardType: nullable(string()),
    commission: optional(nullable(number()))
  });
  var GetBlockRpcResult = jsonRpcResult(nullable(type({
    blockhash: string(),
    previousBlockhash: string(),
    parentSlot: number(),
    transactions: array(type({
      transaction: ConfirmedTransactionResult,
      meta: nullable(ConfirmedTransactionMetaResult),
      version: optional(TransactionVersionStruct)
    })),
    rewards: optional(array(RewardsResult)),
    blockTime: nullable(number()),
    blockHeight: nullable(number())
  })));
  var GetNoneModeBlockRpcResult = jsonRpcResult(nullable(type({
    blockhash: string(),
    previousBlockhash: string(),
    parentSlot: number(),
    rewards: optional(array(RewardsResult)),
    blockTime: nullable(number()),
    blockHeight: nullable(number())
  })));
  var GetAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({
    blockhash: string(),
    previousBlockhash: string(),
    parentSlot: number(),
    transactions: array(type({
      transaction: ConfirmedTransactionAccountsModeResult,
      meta: nullable(ConfirmedTransactionMetaResult),
      version: optional(TransactionVersionStruct)
    })),
    rewards: optional(array(RewardsResult)),
    blockTime: nullable(number()),
    blockHeight: nullable(number())
  })));
  var GetParsedBlockRpcResult = jsonRpcResult(nullable(type({
    blockhash: string(),
    previousBlockhash: string(),
    parentSlot: number(),
    transactions: array(type({
      transaction: ParsedConfirmedTransactionResult,
      meta: nullable(ParsedConfirmedTransactionMetaResult),
      version: optional(TransactionVersionStruct)
    })),
    rewards: optional(array(RewardsResult)),
    blockTime: nullable(number()),
    blockHeight: nullable(number())
  })));
  var GetParsedAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({
    blockhash: string(),
    previousBlockhash: string(),
    parentSlot: number(),
    transactions: array(type({
      transaction: ConfirmedTransactionAccountsModeResult,
      meta: nullable(ParsedConfirmedTransactionMetaResult),
      version: optional(TransactionVersionStruct)
    })),
    rewards: optional(array(RewardsResult)),
    blockTime: nullable(number()),
    blockHeight: nullable(number())
  })));
  var GetParsedNoneModeBlockRpcResult = jsonRpcResult(nullable(type({
    blockhash: string(),
    previousBlockhash: string(),
    parentSlot: number(),
    rewards: optional(array(RewardsResult)),
    blockTime: nullable(number()),
    blockHeight: nullable(number())
  })));
  var GetConfirmedBlockRpcResult = jsonRpcResult(nullable(type({
    blockhash: string(),
    previousBlockhash: string(),
    parentSlot: number(),
    transactions: array(type({
      transaction: ConfirmedTransactionResult,
      meta: nullable(ConfirmedTransactionMetaResult)
    })),
    rewards: optional(array(RewardsResult)),
    blockTime: nullable(number())
  })));
  var GetBlockSignaturesRpcResult = jsonRpcResult(nullable(type({
    blockhash: string(),
    previousBlockhash: string(),
    parentSlot: number(),
    signatures: array(string()),
    blockTime: nullable(number())
  })));
  var GetTransactionRpcResult = jsonRpcResult(nullable(type({
    slot: number(),
    meta: nullable(ConfirmedTransactionMetaResult),
    blockTime: optional(nullable(number())),
    transaction: ConfirmedTransactionResult,
    version: optional(TransactionVersionStruct)
  })));
  var GetParsedTransactionRpcResult = jsonRpcResult(nullable(type({
    slot: number(),
    transaction: ParsedConfirmedTransactionResult,
    meta: nullable(ParsedConfirmedTransactionMetaResult),
    blockTime: optional(nullable(number())),
    version: optional(TransactionVersionStruct)
  })));
  var GetLatestBlockhashRpcResult = jsonRpcResultAndContext(type({
    blockhash: string(),
    lastValidBlockHeight: number()
  }));
  var IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());
  var PerfSampleResult = type({
    slot: number(),
    numTransactions: number(),
    numSlots: number(),
    samplePeriodSecs: number()
  });
  var GetRecentPerformanceSamplesRpcResult = jsonRpcResult(array(PerfSampleResult));
  var GetFeeCalculatorRpcResult = jsonRpcResultAndContext(nullable(type({
    feeCalculator: type({
      lamportsPerSignature: number()
    })
  })));
  var RequestAirdropRpcResult = jsonRpcResult(string());
  var SendTransactionRpcResult = jsonRpcResult(string());
  var LogsResult = type({
    err: TransactionErrorResult,
    logs: array(string()),
    signature: string()
  });
  var LogsNotificationResult = type({
    result: notificationResultAndContext(LogsResult),
    subscription: number()
  });
  var COMMON_HTTP_HEADERS = {
    "solana-client": `js/${"1.0.0-maintenance"}`
  };
  var Connection = class {
    /**
     * Establish a JSON RPC connection
     *
     * @param endpoint URL to the fullnode JSON RPC endpoint
     * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object
     */
    constructor(endpoint2, _commitmentOrConfig) {
      this._commitment = void 0;
      this._confirmTransactionInitialTimeout = void 0;
      this._rpcEndpoint = void 0;
      this._rpcWsEndpoint = void 0;
      this._rpcClient = void 0;
      this._rpcRequest = void 0;
      this._rpcBatchRequest = void 0;
      this._rpcWebSocket = void 0;
      this._rpcWebSocketConnected = false;
      this._rpcWebSocketHeartbeat = null;
      this._rpcWebSocketIdleTimeout = null;
      this._rpcWebSocketGeneration = 0;
      this._disableBlockhashCaching = false;
      this._pollingBlockhash = false;
      this._blockhashInfo = {
        latestBlockhash: null,
        lastFetch: 0,
        transactionSignatures: [],
        simulatedSignatures: []
      };
      this._nextClientSubscriptionId = 0;
      this._subscriptionDisposeFunctionsByClientSubscriptionId = {};
      this._subscriptionHashByClientSubscriptionId = {};
      this._subscriptionStateChangeCallbacksByHash = {};
      this._subscriptionCallbacksByServerSubscriptionId = {};
      this._subscriptionsByHash = {};
      this._subscriptionsAutoDisposedByRpc = /* @__PURE__ */ new Set();
      this.getBlockHeight = /* @__PURE__ */ (() => {
        const requestPromises = {};
        return async (commitmentOrConfig) => {
          const {
            commitment,
            config: config2
          } = extractCommitmentFromConfig(commitmentOrConfig);
          const args = this._buildArgs([], commitment, void 0, config2);
          const requestHash = fastStableStringify(args);
          requestPromises[requestHash] = requestPromises[requestHash] ?? (async () => {
            try {
              const unsafeRes = await this._rpcRequest("getBlockHeight", args);
              const res = create2(unsafeRes, jsonRpcResult(number()));
              if ("error" in res) {
                throw new SolanaJSONRPCError(res.error, "failed to get block height information");
              }
              return res.result;
            } finally {
              delete requestPromises[requestHash];
            }
          })();
          return await requestPromises[requestHash];
        };
      })();
      let wsEndpoint;
      let httpHeaders;
      let fetch2;
      let fetchMiddleware;
      let disableRetryOnRateLimit;
      let httpAgent;
      if (_commitmentOrConfig && typeof _commitmentOrConfig === "string") {
        this._commitment = _commitmentOrConfig;
      } else if (_commitmentOrConfig) {
        this._commitment = _commitmentOrConfig.commitment;
        this._confirmTransactionInitialTimeout = _commitmentOrConfig.confirmTransactionInitialTimeout;
        wsEndpoint = _commitmentOrConfig.wsEndpoint;
        httpHeaders = _commitmentOrConfig.httpHeaders;
        fetch2 = _commitmentOrConfig.fetch;
        fetchMiddleware = _commitmentOrConfig.fetchMiddleware;
        disableRetryOnRateLimit = _commitmentOrConfig.disableRetryOnRateLimit;
        httpAgent = _commitmentOrConfig.httpAgent;
      }
      this._rpcEndpoint = assertEndpointUrl(endpoint2);
      this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint2);
      this._rpcClient = createRpcClient(endpoint2, httpHeaders, fetch2, fetchMiddleware, disableRetryOnRateLimit, httpAgent);
      this._rpcRequest = createRpcRequest(this._rpcClient);
      this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);
      this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {
        autoconnect: false,
        max_reconnects: Infinity
      });
      this._rpcWebSocket.on("open", this._wsOnOpen.bind(this));
      this._rpcWebSocket.on("error", this._wsOnError.bind(this));
      this._rpcWebSocket.on("close", this._wsOnClose.bind(this));
      this._rpcWebSocket.on("accountNotification", this._wsOnAccountNotification.bind(this));
      this._rpcWebSocket.on("programNotification", this._wsOnProgramAccountNotification.bind(this));
      this._rpcWebSocket.on("slotNotification", this._wsOnSlotNotification.bind(this));
      this._rpcWebSocket.on("slotsUpdatesNotification", this._wsOnSlotUpdatesNotification.bind(this));
      this._rpcWebSocket.on("signatureNotification", this._wsOnSignatureNotification.bind(this));
      this._rpcWebSocket.on("rootNotification", this._wsOnRootNotification.bind(this));
      this._rpcWebSocket.on("logsNotification", this._wsOnLogsNotification.bind(this));
    }
    /**
     * The default commitment used for requests
     */
    get commitment() {
      return this._commitment;
    }
    /**
     * The RPC endpoint
     */
    get rpcEndpoint() {
      return this._rpcEndpoint;
    }
    /**
     * Fetch the balance for the specified public key, return with context
     */
    async getBalanceAndContext(publicKey3, commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgs([publicKey3.toBase58()], commitment, void 0, config2);
      const unsafeRes = await this._rpcRequest("getBalance", args);
      const res = create2(unsafeRes, jsonRpcResultAndContext(number()));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `failed to get balance for ${publicKey3.toBase58()}`);
      }
      return res.result;
    }
    /**
     * Fetch the balance for the specified public key
     */
    async getBalance(publicKey3, commitmentOrConfig) {
      return await this.getBalanceAndContext(publicKey3, commitmentOrConfig).then((x13) => x13.value).catch((e2) => {
        throw new Error("failed to get balance of account " + publicKey3.toBase58() + ": " + e2);
      });
    }
    /**
     * Fetch the estimated production time of a block
     */
    async getBlockTime(slot) {
      const unsafeRes = await this._rpcRequest("getBlockTime", [slot]);
      const res = create2(unsafeRes, jsonRpcResult(nullable(number())));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `failed to get block time for slot ${slot}`);
      }
      return res.result;
    }
    /**
     * Fetch the lowest slot that the node has information about in its ledger.
     * This value may increase over time if the node is configured to purge older ledger data
     */
    async getMinimumLedgerSlot() {
      const unsafeRes = await this._rpcRequest("minimumLedgerSlot", []);
      const res = create2(unsafeRes, jsonRpcResult(number()));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get minimum ledger slot");
      }
      return res.result;
    }
    /**
     * Fetch the slot of the lowest confirmed block that has not been purged from the ledger
     */
    async getFirstAvailableBlock() {
      const unsafeRes = await this._rpcRequest("getFirstAvailableBlock", []);
      const res = create2(unsafeRes, SlotRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get first available block");
      }
      return res.result;
    }
    /**
     * Fetch information about the current supply
     */
    async getSupply(config2) {
      let configArg = {};
      if (typeof config2 === "string") {
        configArg = {
          commitment: config2
        };
      } else if (config2) {
        configArg = {
          ...config2,
          commitment: config2 && config2.commitment || this.commitment
        };
      } else {
        configArg = {
          commitment: this.commitment
        };
      }
      const unsafeRes = await this._rpcRequest("getSupply", [configArg]);
      const res = create2(unsafeRes, GetSupplyRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get supply");
      }
      return res.result;
    }
    /**
     * Fetch the current supply of a token mint
     */
    async getTokenSupply(tokenMintAddress, commitment) {
      const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);
      const unsafeRes = await this._rpcRequest("getTokenSupply", args);
      const res = create2(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get token supply");
      }
      return res.result;
    }
    /**
     * Fetch the current balance of a token account
     */
    async getTokenAccountBalance(tokenAddress, commitment) {
      const args = this._buildArgs([tokenAddress.toBase58()], commitment);
      const unsafeRes = await this._rpcRequest("getTokenAccountBalance", args);
      const res = create2(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get token account balance");
      }
      return res.result;
    }
    /**
     * Fetch all the token accounts owned by the specified account
     *
     * @return {Promise<RpcResponseAndContext<GetProgramAccountsResponse>}
     */
    async getTokenAccountsByOwner(ownerAddress, filter, commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      let _args = [ownerAddress.toBase58()];
      if ("mint" in filter) {
        _args.push({
          mint: filter.mint.toBase58()
        });
      } else {
        _args.push({
          programId: filter.programId.toBase58()
        });
      }
      const args = this._buildArgs(_args, commitment, "base64", config2);
      const unsafeRes = await this._rpcRequest("getTokenAccountsByOwner", args);
      const res = create2(unsafeRes, GetTokenAccountsByOwner);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `failed to get token accounts owned by account ${ownerAddress.toBase58()}`);
      }
      return res.result;
    }
    /**
     * Fetch parsed token accounts owned by the specified account
     *
     * @return {Promise<RpcResponseAndContext<Array<{pubkey: PublicKey, account: AccountInfo<ParsedAccountData>}>>>}
     */
    async getParsedTokenAccountsByOwner(ownerAddress, filter, commitment) {
      let _args = [ownerAddress.toBase58()];
      if ("mint" in filter) {
        _args.push({
          mint: filter.mint.toBase58()
        });
      } else {
        _args.push({
          programId: filter.programId.toBase58()
        });
      }
      const args = this._buildArgs(_args, commitment, "jsonParsed");
      const unsafeRes = await this._rpcRequest("getTokenAccountsByOwner", args);
      const res = create2(unsafeRes, GetParsedTokenAccountsByOwner);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `failed to get token accounts owned by account ${ownerAddress.toBase58()}`);
      }
      return res.result;
    }
    /**
     * Fetch the 20 largest accounts with their current balances
     */
    async getLargestAccounts(config2) {
      const arg = {
        ...config2,
        commitment: config2 && config2.commitment || this.commitment
      };
      const args = arg.filter || arg.commitment ? [arg] : [];
      const unsafeRes = await this._rpcRequest("getLargestAccounts", args);
      const res = create2(unsafeRes, GetLargestAccountsRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get largest accounts");
      }
      return res.result;
    }
    /**
     * Fetch the 20 largest token accounts with their current balances
     * for a given mint.
     */
    async getTokenLargestAccounts(mintAddress, commitment) {
      const args = this._buildArgs([mintAddress.toBase58()], commitment);
      const unsafeRes = await this._rpcRequest("getTokenLargestAccounts", args);
      const res = create2(unsafeRes, GetTokenLargestAccountsResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get token largest accounts");
      }
      return res.result;
    }
    /**
     * Fetch all the account info for the specified public key, return with context
     */
    async getAccountInfoAndContext(publicKey3, commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgs([publicKey3.toBase58()], commitment, "base64", config2);
      const unsafeRes = await this._rpcRequest("getAccountInfo", args);
      const res = create2(unsafeRes, jsonRpcResultAndContext(nullable(AccountInfoResult)));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `failed to get info about account ${publicKey3.toBase58()}`);
      }
      return res.result;
    }
    /**
     * Fetch parsed account info for the specified public key
     */
    async getParsedAccountInfo(publicKey3, commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgs([publicKey3.toBase58()], commitment, "jsonParsed", config2);
      const unsafeRes = await this._rpcRequest("getAccountInfo", args);
      const res = create2(unsafeRes, jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `failed to get info about account ${publicKey3.toBase58()}`);
      }
      return res.result;
    }
    /**
     * Fetch all the account info for the specified public key
     */
    async getAccountInfo(publicKey3, commitmentOrConfig) {
      try {
        const res = await this.getAccountInfoAndContext(publicKey3, commitmentOrConfig);
        return res.value;
      } catch (e2) {
        throw new Error("failed to get info about account " + publicKey3.toBase58() + ": " + e2);
      }
    }
    /**
     * Fetch all the account info for multiple accounts specified by an array of public keys, return with context
     */
    async getMultipleParsedAccounts(publicKeys, rawConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(rawConfig);
      const keys2 = publicKeys.map((key2) => key2.toBase58());
      const args = this._buildArgs([keys2], commitment, "jsonParsed", config2);
      const unsafeRes = await this._rpcRequest("getMultipleAccounts", args);
      const res = create2(unsafeRes, jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys2}`);
      }
      return res.result;
    }
    /**
     * Fetch all the account info for multiple accounts specified by an array of public keys, return with context
     */
    async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const keys2 = publicKeys.map((key2) => key2.toBase58());
      const args = this._buildArgs([keys2], commitment, "base64", config2);
      const unsafeRes = await this._rpcRequest("getMultipleAccounts", args);
      const res = create2(unsafeRes, jsonRpcResultAndContext(array(nullable(AccountInfoResult))));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys2}`);
      }
      return res.result;
    }
    /**
     * Fetch all the account info for multiple accounts specified by an array of public keys
     */
    async getMultipleAccountsInfo(publicKeys, commitmentOrConfig) {
      const res = await this.getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig);
      return res.value;
    }
    /**
     * Returns epoch activation information for a stake account that has been delegated
     *
     * @deprecated Deprecated since RPC v1.18; will be removed in a future version.
     */
    async getStakeActivation(publicKey3, commitmentOrConfig, epoch) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgs([publicKey3.toBase58()], commitment, void 0, {
        ...config2,
        epoch: epoch != null ? epoch : config2?.epoch
      });
      const unsafeRes = await this._rpcRequest("getStakeActivation", args);
      const res = create2(unsafeRes, jsonRpcResult(StakeActivationResult));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `failed to get Stake Activation ${publicKey3.toBase58()}`);
      }
      return res.result;
    }
    /**
     * Fetch all the accounts owned by the specified program id
     *
     * @return {Promise<Array<{pubkey: PublicKey, account: AccountInfo<Buffer>}>>}
     */
    // eslint-disable-next-line no-dupe-class-members
    // eslint-disable-next-line no-dupe-class-members
    async getProgramAccounts(programId, configOrCommitment) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(configOrCommitment);
      const {
        encoding,
        ...configWithoutEncoding
      } = config2 || {};
      const args = this._buildArgs([programId.toBase58()], commitment, encoding || "base64", {
        ...configWithoutEncoding,
        ...configWithoutEncoding.filters ? {
          filters: applyDefaultMemcmpEncodingToFilters(configWithoutEncoding.filters)
        } : null
      });
      const unsafeRes = await this._rpcRequest("getProgramAccounts", args);
      const baseSchema = array(KeyedAccountInfoResult);
      const res = configWithoutEncoding.withContext === true ? create2(unsafeRes, jsonRpcResultAndContext(baseSchema)) : create2(unsafeRes, jsonRpcResult(baseSchema));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `failed to get accounts owned by program ${programId.toBase58()}`);
      }
      return res.result;
    }
    /**
     * Fetch and parse all the accounts owned by the specified program id
     *
     * @return {Promise<Array<{pubkey: PublicKey, account: AccountInfo<Buffer | ParsedAccountData>}>>}
     */
    async getParsedProgramAccounts(programId, configOrCommitment) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(configOrCommitment);
      const args = this._buildArgs([programId.toBase58()], commitment, "jsonParsed", config2);
      const unsafeRes = await this._rpcRequest("getProgramAccounts", args);
      const res = create2(unsafeRes, jsonRpcResult(array(KeyedParsedAccountInfoResult)));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `failed to get accounts owned by program ${programId.toBase58()}`);
      }
      return res.result;
    }
    /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */
    // eslint-disable-next-line no-dupe-class-members
    // eslint-disable-next-line no-dupe-class-members
    async confirmTransaction(strategy, commitment) {
      let rawSignature;
      if (typeof strategy == "string") {
        rawSignature = strategy;
      } else {
        const config2 = strategy;
        if (config2.abortSignal?.aborted) {
          return Promise.reject(config2.abortSignal.reason);
        }
        rawSignature = config2.signature;
      }
      let decodedSignature;
      try {
        decodedSignature = import_bs58.default.decode(rawSignature);
      } catch (err2) {
        throw new Error("signature must be base58 encoded: " + rawSignature);
      }
      assert9(decodedSignature.length === 64, "signature has invalid length");
      if (typeof strategy === "string") {
        return await this.confirmTransactionUsingLegacyTimeoutStrategy({
          commitment: commitment || this.commitment,
          signature: rawSignature
        });
      } else if ("lastValidBlockHeight" in strategy) {
        return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({
          commitment: commitment || this.commitment,
          strategy
        });
      } else {
        return await this.confirmTransactionUsingDurableNonceStrategy({
          commitment: commitment || this.commitment,
          strategy
        });
      }
    }
    getCancellationPromise(signal) {
      return new Promise((_6, reject2) => {
        if (signal == null) {
          return;
        }
        if (signal.aborted) {
          reject2(signal.reason);
        } else {
          signal.addEventListener("abort", () => {
            reject2(signal.reason);
          });
        }
      });
    }
    getTransactionConfirmationPromise({
      commitment,
      signature: signature2
    }) {
      let signatureSubscriptionId;
      let disposeSignatureSubscriptionStateChangeObserver;
      let done = false;
      const confirmationPromise = new Promise((resolve, reject2) => {
        try {
          signatureSubscriptionId = this.onSignature(signature2, (result, context) => {
            signatureSubscriptionId = void 0;
            const response = {
              context,
              value: result
            };
            resolve({
              __type: TransactionStatus.PROCESSED,
              response
            });
          }, commitment);
          const subscriptionSetupPromise = new Promise((resolveSubscriptionSetup) => {
            if (signatureSubscriptionId == null) {
              resolveSubscriptionSetup();
            } else {
              disposeSignatureSubscriptionStateChangeObserver = this._onSubscriptionStateChange(signatureSubscriptionId, (nextState) => {
                if (nextState === "subscribed") {
                  resolveSubscriptionSetup();
                }
              });
            }
          });
          (async () => {
            await subscriptionSetupPromise;
            if (done) return;
            const response = await this.getSignatureStatus(signature2);
            if (done) return;
            if (response == null) {
              return;
            }
            const {
              context,
              value
            } = response;
            if (value == null) {
              return;
            }
            if (value?.err) {
              reject2(value.err);
            } else {
              switch (commitment) {
                case "confirmed":
                case "single":
                case "singleGossip": {
                  if (value.confirmationStatus === "processed") {
                    return;
                  }
                  break;
                }
                case "finalized":
                case "max":
                case "root": {
                  if (value.confirmationStatus === "processed" || value.confirmationStatus === "confirmed") {
                    return;
                  }
                  break;
                }
                // exhaust enums to ensure full coverage
                case "processed":
                case "recent":
              }
              done = true;
              resolve({
                __type: TransactionStatus.PROCESSED,
                response: {
                  context,
                  value
                }
              });
            }
          })();
        } catch (err2) {
          reject2(err2);
        }
      });
      const abortConfirmation = () => {
        if (disposeSignatureSubscriptionStateChangeObserver) {
          disposeSignatureSubscriptionStateChangeObserver();
          disposeSignatureSubscriptionStateChangeObserver = void 0;
        }
        if (signatureSubscriptionId != null) {
          this.removeSignatureListener(signatureSubscriptionId);
          signatureSubscriptionId = void 0;
        }
      };
      return {
        abortConfirmation,
        confirmationPromise
      };
    }
    async confirmTransactionUsingBlockHeightExceedanceStrategy({
      commitment,
      strategy: {
        abortSignal,
        lastValidBlockHeight,
        signature: signature2
      }
    }) {
      let done = false;
      const expiryPromise = new Promise((resolve) => {
        const checkBlockHeight = async () => {
          try {
            const blockHeight = await this.getBlockHeight(commitment);
            return blockHeight;
          } catch (_e7) {
            return -1;
          }
        };
        (async () => {
          let currentBlockHeight = await checkBlockHeight();
          if (done) return;
          while (currentBlockHeight <= lastValidBlockHeight) {
            await sleep(1e3);
            if (done) return;
            currentBlockHeight = await checkBlockHeight();
            if (done) return;
          }
          resolve({
            __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED
          });
        })();
      });
      const {
        abortConfirmation,
        confirmationPromise
      } = this.getTransactionConfirmationPromise({
        commitment,
        signature: signature2
      });
      const cancellationPromise = this.getCancellationPromise(abortSignal);
      let result;
      try {
        const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);
        if (outcome.__type === TransactionStatus.PROCESSED) {
          result = outcome.response;
        } else {
          throw new TransactionExpiredBlockheightExceededError(signature2);
        }
      } finally {
        done = true;
        abortConfirmation();
      }
      return result;
    }
    async confirmTransactionUsingDurableNonceStrategy({
      commitment,
      strategy: {
        abortSignal,
        minContextSlot,
        nonceAccountPubkey,
        nonceValue,
        signature: signature2
      }
    }) {
      let done = false;
      const expiryPromise = new Promise((resolve) => {
        let currentNonceValue = nonceValue;
        let lastCheckedSlot = null;
        const getCurrentNonceValue = async () => {
          try {
            const {
              context,
              value: nonceAccount
            } = await this.getNonceAndContext(nonceAccountPubkey, {
              commitment,
              minContextSlot
            });
            lastCheckedSlot = context.slot;
            return nonceAccount?.nonce;
          } catch (e2) {
            return currentNonceValue;
          }
        };
        (async () => {
          currentNonceValue = await getCurrentNonceValue();
          if (done) return;
          while (true) {
            if (nonceValue !== currentNonceValue) {
              resolve({
                __type: TransactionStatus.NONCE_INVALID,
                slotInWhichNonceDidAdvance: lastCheckedSlot
              });
              return;
            }
            await sleep(2e3);
            if (done) return;
            currentNonceValue = await getCurrentNonceValue();
            if (done) return;
          }
        })();
      });
      const {
        abortConfirmation,
        confirmationPromise
      } = this.getTransactionConfirmationPromise({
        commitment,
        signature: signature2
      });
      const cancellationPromise = this.getCancellationPromise(abortSignal);
      let result;
      try {
        const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);
        if (outcome.__type === TransactionStatus.PROCESSED) {
          result = outcome.response;
        } else {
          let signatureStatus;
          while (true) {
            const status = await this.getSignatureStatus(signature2);
            if (status == null) {
              break;
            }
            if (status.context.slot < (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)) {
              await sleep(400);
              continue;
            }
            signatureStatus = status;
            break;
          }
          if (signatureStatus?.value) {
            const commitmentForStatus = commitment || "finalized";
            const {
              confirmationStatus
            } = signatureStatus.value;
            switch (commitmentForStatus) {
              case "processed":
              case "recent":
                if (confirmationStatus !== "processed" && confirmationStatus !== "confirmed" && confirmationStatus !== "finalized") {
                  throw new TransactionExpiredNonceInvalidError(signature2);
                }
                break;
              case "confirmed":
              case "single":
              case "singleGossip":
                if (confirmationStatus !== "confirmed" && confirmationStatus !== "finalized") {
                  throw new TransactionExpiredNonceInvalidError(signature2);
                }
                break;
              case "finalized":
              case "max":
              case "root":
                if (confirmationStatus !== "finalized") {
                  throw new TransactionExpiredNonceInvalidError(signature2);
                }
                break;
              default:
                /* @__PURE__ */ ((_6) => {
                })(commitmentForStatus);
            }
            result = {
              context: signatureStatus.context,
              value: {
                err: signatureStatus.value.err
              }
            };
          } else {
            throw new TransactionExpiredNonceInvalidError(signature2);
          }
        }
      } finally {
        done = true;
        abortConfirmation();
      }
      return result;
    }
    async confirmTransactionUsingLegacyTimeoutStrategy({
      commitment,
      signature: signature2
    }) {
      let timeoutId;
      const expiryPromise = new Promise((resolve) => {
        let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1e3;
        switch (commitment) {
          case "processed":
          case "recent":
          case "single":
          case "confirmed":
          case "singleGossip": {
            timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1e3;
            break;
          }
        }
        timeoutId = setTimeout(() => resolve({
          __type: TransactionStatus.TIMED_OUT,
          timeoutMs
        }), timeoutMs);
      });
      const {
        abortConfirmation,
        confirmationPromise
      } = this.getTransactionConfirmationPromise({
        commitment,
        signature: signature2
      });
      let result;
      try {
        const outcome = await Promise.race([confirmationPromise, expiryPromise]);
        if (outcome.__type === TransactionStatus.PROCESSED) {
          result = outcome.response;
        } else {
          throw new TransactionExpiredTimeoutError(signature2, outcome.timeoutMs / 1e3);
        }
      } finally {
        clearTimeout(timeoutId);
        abortConfirmation();
      }
      return result;
    }
    /**
     * Return the list of nodes that are currently participating in the cluster
     */
    async getClusterNodes() {
      const unsafeRes = await this._rpcRequest("getClusterNodes", []);
      const res = create2(unsafeRes, jsonRpcResult(array(ContactInfoResult)));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get cluster nodes");
      }
      return res.result;
    }
    /**
     * Return the list of nodes that are currently participating in the cluster
     */
    async getVoteAccounts(commitment) {
      const args = this._buildArgs([], commitment);
      const unsafeRes = await this._rpcRequest("getVoteAccounts", args);
      const res = create2(unsafeRes, GetVoteAccounts);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get vote accounts");
      }
      return res.result;
    }
    /**
     * Fetch the current slot that the node is processing
     */
    async getSlot(commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgs([], commitment, void 0, config2);
      const unsafeRes = await this._rpcRequest("getSlot", args);
      const res = create2(unsafeRes, jsonRpcResult(number()));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get slot");
      }
      return res.result;
    }
    /**
     * Fetch the current slot leader of the cluster
     */
    async getSlotLeader(commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgs([], commitment, void 0, config2);
      const unsafeRes = await this._rpcRequest("getSlotLeader", args);
      const res = create2(unsafeRes, jsonRpcResult(string()));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get slot leader");
      }
      return res.result;
    }
    /**
     * Fetch `limit` number of slot leaders starting from `startSlot`
     *
     * @param startSlot fetch slot leaders starting from this slot
     * @param limit number of slot leaders to return
     */
    async getSlotLeaders(startSlot, limit) {
      const args = [startSlot, limit];
      const unsafeRes = await this._rpcRequest("getSlotLeaders", args);
      const res = create2(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get slot leaders");
      }
      return res.result;
    }
    /**
     * Fetch the current status of a signature
     */
    async getSignatureStatus(signature2, config2) {
      const {
        context,
        value: values
      } = await this.getSignatureStatuses([signature2], config2);
      assert9(values.length === 1);
      const value = values[0];
      return {
        context,
        value
      };
    }
    /**
     * Fetch the current statuses of a batch of signatures
     */
    async getSignatureStatuses(signatures, config2) {
      const params = [signatures];
      if (config2) {
        params.push(config2);
      }
      const unsafeRes = await this._rpcRequest("getSignatureStatuses", params);
      const res = create2(unsafeRes, GetSignatureStatusesRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get signature status");
      }
      return res.result;
    }
    /**
     * Fetch the current transaction count of the cluster
     */
    async getTransactionCount(commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgs([], commitment, void 0, config2);
      const unsafeRes = await this._rpcRequest("getTransactionCount", args);
      const res = create2(unsafeRes, jsonRpcResult(number()));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get transaction count");
      }
      return res.result;
    }
    /**
     * Fetch the current total currency supply of the cluster in lamports
     *
     * @deprecated Deprecated since RPC v1.2.8. Please use {@link getSupply} instead.
     */
    async getTotalSupply(commitment) {
      const result = await this.getSupply({
        commitment,
        excludeNonCirculatingAccountsList: true
      });
      return result.value.total;
    }
    /**
     * Fetch the cluster InflationGovernor parameters
     */
    async getInflationGovernor(commitment) {
      const args = this._buildArgs([], commitment);
      const unsafeRes = await this._rpcRequest("getInflationGovernor", args);
      const res = create2(unsafeRes, GetInflationGovernorRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get inflation");
      }
      return res.result;
    }
    /**
     * Fetch the inflation reward for a list of addresses for an epoch
     */
    async getInflationReward(addresses, epoch, commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgs([addresses.map((pubkey) => pubkey.toBase58())], commitment, void 0, {
        ...config2,
        epoch: epoch != null ? epoch : config2?.epoch
      });
      const unsafeRes = await this._rpcRequest("getInflationReward", args);
      const res = create2(unsafeRes, GetInflationRewardResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get inflation reward");
      }
      return res.result;
    }
    /**
     * Fetch the specific inflation values for the current epoch
     */
    async getInflationRate() {
      const unsafeRes = await this._rpcRequest("getInflationRate", []);
      const res = create2(unsafeRes, GetInflationRateRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get inflation rate");
      }
      return res.result;
    }
    /**
     * Fetch the Epoch Info parameters
     */
    async getEpochInfo(commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgs([], commitment, void 0, config2);
      const unsafeRes = await this._rpcRequest("getEpochInfo", args);
      const res = create2(unsafeRes, GetEpochInfoRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get epoch info");
      }
      return res.result;
    }
    /**
     * Fetch the Epoch Schedule parameters
     */
    async getEpochSchedule() {
      const unsafeRes = await this._rpcRequest("getEpochSchedule", []);
      const res = create2(unsafeRes, GetEpochScheduleRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get epoch schedule");
      }
      const epochSchedule = res.result;
      return new EpochSchedule(epochSchedule.slotsPerEpoch, epochSchedule.leaderScheduleSlotOffset, epochSchedule.warmup, epochSchedule.firstNormalEpoch, epochSchedule.firstNormalSlot);
    }
    /**
     * Fetch the leader schedule for the current epoch
     * @return {Promise<RpcResponseAndContext<LeaderSchedule>>}
     */
    async getLeaderSchedule() {
      const unsafeRes = await this._rpcRequest("getLeaderSchedule", []);
      const res = create2(unsafeRes, GetLeaderScheduleRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get leader schedule");
      }
      return res.result;
    }
    /**
     * Fetch the minimum balance needed to exempt an account of `dataLength`
     * size from rent
     */
    async getMinimumBalanceForRentExemption(dataLength, commitment) {
      const args = this._buildArgs([dataLength], commitment);
      const unsafeRes = await this._rpcRequest("getMinimumBalanceForRentExemption", args);
      const res = create2(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);
      if ("error" in res) {
        console.warn("Unable to fetch minimum balance for rent exemption");
        return 0;
      }
      return res.result;
    }
    /**
     * Fetch a recent blockhash from the cluster, return with context
     * @return {Promise<RpcResponseAndContext<{blockhash: Blockhash, feeCalculator: FeeCalculator}>>}
     *
     * @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.
     */
    async getRecentBlockhashAndContext(commitment) {
      const {
        context,
        value: {
          blockhash
        }
      } = await this.getLatestBlockhashAndContext(commitment);
      const feeCalculator = {
        get lamportsPerSignature() {
          throw new Error("The capability to fetch `lamportsPerSignature` using the `getRecentBlockhash` API is no longer offered by the network. Use the `getFeeForMessage` API to obtain the fee for a given message.");
        },
        toJSON() {
          return {};
        }
      };
      return {
        context,
        value: {
          blockhash,
          feeCalculator
        }
      };
    }
    /**
     * Fetch recent performance samples
     * @return {Promise<Array<PerfSample>>}
     */
    async getRecentPerformanceSamples(limit) {
      const unsafeRes = await this._rpcRequest("getRecentPerformanceSamples", limit ? [limit] : []);
      const res = create2(unsafeRes, GetRecentPerformanceSamplesRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get recent performance samples");
      }
      return res.result;
    }
    /**
     * Fetch the fee calculator for a recent blockhash from the cluster, return with context
     *
     * @deprecated Deprecated since RPC v1.9.0. Please use {@link getFeeForMessage} instead.
     */
    async getFeeCalculatorForBlockhash(blockhash, commitment) {
      const args = this._buildArgs([blockhash], commitment);
      const unsafeRes = await this._rpcRequest("getFeeCalculatorForBlockhash", args);
      const res = create2(unsafeRes, GetFeeCalculatorRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get fee calculator");
      }
      const {
        context,
        value
      } = res.result;
      return {
        context,
        value: value !== null ? value.feeCalculator : null
      };
    }
    /**
     * Fetch the fee for a message from the cluster, return with context
     */
    async getFeeForMessage(message, commitment) {
      const wireMessage = toBuffer(message.serialize()).toString("base64");
      const args = this._buildArgs([wireMessage], commitment);
      const unsafeRes = await this._rpcRequest("getFeeForMessage", args);
      const res = create2(unsafeRes, jsonRpcResultAndContext(nullable(number())));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get fee for message");
      }
      if (res.result === null) {
        throw new Error("invalid blockhash");
      }
      return res.result;
    }
    /**
     * Fetch a list of prioritization fees from recent blocks.
     */
    async getRecentPrioritizationFees(config2) {
      const accounts = config2?.lockedWritableAccounts?.map((key2) => key2.toBase58());
      const args = accounts?.length ? [accounts] : [];
      const unsafeRes = await this._rpcRequest("getRecentPrioritizationFees", args);
      const res = create2(unsafeRes, GetRecentPrioritizationFeesRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get recent prioritization fees");
      }
      return res.result;
    }
    /**
     * Fetch a recent blockhash from the cluster
     * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}
     *
     * @deprecated Deprecated since RPC v1.8.0. Please use {@link getLatestBlockhash} instead.
     */
    async getRecentBlockhash(commitment) {
      try {
        const res = await this.getRecentBlockhashAndContext(commitment);
        return res.value;
      } catch (e2) {
        throw new Error("failed to get recent blockhash: " + e2);
      }
    }
    /**
     * Fetch the latest blockhash from the cluster
     * @return {Promise<BlockhashWithExpiryBlockHeight>}
     */
    async getLatestBlockhash(commitmentOrConfig) {
      try {
        const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);
        return res.value;
      } catch (e2) {
        throw new Error("failed to get recent blockhash: " + e2);
      }
    }
    /**
     * Fetch the latest blockhash from the cluster
     * @return {Promise<BlockhashWithExpiryBlockHeight>}
     */
    async getLatestBlockhashAndContext(commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgs([], commitment, void 0, config2);
      const unsafeRes = await this._rpcRequest("getLatestBlockhash", args);
      const res = create2(unsafeRes, GetLatestBlockhashRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get latest blockhash");
      }
      return res.result;
    }
    /**
     * Returns whether a blockhash is still valid or not
     */
    async isBlockhashValid(blockhash, rawConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(rawConfig);
      const args = this._buildArgs([blockhash], commitment, void 0, config2);
      const unsafeRes = await this._rpcRequest("isBlockhashValid", args);
      const res = create2(unsafeRes, IsBlockhashValidRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to determine if the blockhash `" + blockhash + "`is valid");
      }
      return res.result;
    }
    /**
     * Fetch the node version
     */
    async getVersion() {
      const unsafeRes = await this._rpcRequest("getVersion", []);
      const res = create2(unsafeRes, jsonRpcResult(VersionResult));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get version");
      }
      return res.result;
    }
    /**
     * Fetch the genesis hash
     */
    async getGenesisHash() {
      const unsafeRes = await this._rpcRequest("getGenesisHash", []);
      const res = create2(unsafeRes, jsonRpcResult(string()));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get genesis hash");
      }
      return res.result;
    }
    /**
     * Fetch a processed block from the cluster.
     *
     * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by
     * setting the `maxSupportedTransactionVersion` property.
     */
    /**
     * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by
     * setting the `maxSupportedTransactionVersion` property.
     */
    // eslint-disable-next-line no-dupe-class-members
    /**
     * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by
     * setting the `maxSupportedTransactionVersion` property.
     */
    // eslint-disable-next-line no-dupe-class-members
    /**
     * Fetch a processed block from the cluster.
     */
    // eslint-disable-next-line no-dupe-class-members
    // eslint-disable-next-line no-dupe-class-members
    // eslint-disable-next-line no-dupe-class-members
    /**
     * Fetch a processed block from the cluster.
     */
    // eslint-disable-next-line no-dupe-class-members
    async getBlock(slot, rawConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(rawConfig);
      const args = this._buildArgsAtLeastConfirmed([slot], commitment, void 0, config2);
      const unsafeRes = await this._rpcRequest("getBlock", args);
      try {
        switch (config2?.transactionDetails) {
          case "accounts": {
            const res = create2(unsafeRes, GetAccountsModeBlockRpcResult);
            if ("error" in res) {
              throw res.error;
            }
            return res.result;
          }
          case "none": {
            const res = create2(unsafeRes, GetNoneModeBlockRpcResult);
            if ("error" in res) {
              throw res.error;
            }
            return res.result;
          }
          default: {
            const res = create2(unsafeRes, GetBlockRpcResult);
            if ("error" in res) {
              throw res.error;
            }
            const {
              result
            } = res;
            return result ? {
              ...result,
              transactions: result.transactions.map(({
                transaction,
                meta: meta3,
                version: version16
              }) => ({
                meta: meta3,
                transaction: {
                  ...transaction,
                  message: versionedMessageFromResponse(version16, transaction.message)
                },
                version: version16
              }))
            } : null;
          }
        }
      } catch (e2) {
        throw new SolanaJSONRPCError(e2, "failed to get confirmed block");
      }
    }
    /**
     * Fetch parsed transaction details for a confirmed or finalized block
     */
    // eslint-disable-next-line no-dupe-class-members
    // eslint-disable-next-line no-dupe-class-members
    // eslint-disable-next-line no-dupe-class-members
    async getParsedBlock(slot, rawConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(rawConfig);
      const args = this._buildArgsAtLeastConfirmed([slot], commitment, "jsonParsed", config2);
      const unsafeRes = await this._rpcRequest("getBlock", args);
      try {
        switch (config2?.transactionDetails) {
          case "accounts": {
            const res = create2(unsafeRes, GetParsedAccountsModeBlockRpcResult);
            if ("error" in res) {
              throw res.error;
            }
            return res.result;
          }
          case "none": {
            const res = create2(unsafeRes, GetParsedNoneModeBlockRpcResult);
            if ("error" in res) {
              throw res.error;
            }
            return res.result;
          }
          default: {
            const res = create2(unsafeRes, GetParsedBlockRpcResult);
            if ("error" in res) {
              throw res.error;
            }
            return res.result;
          }
        }
      } catch (e2) {
        throw new SolanaJSONRPCError(e2, "failed to get block");
      }
    }
    /*
     * Returns recent block production information from the current or previous epoch
     */
    async getBlockProduction(configOrCommitment) {
      let extra;
      let commitment;
      if (typeof configOrCommitment === "string") {
        commitment = configOrCommitment;
      } else if (configOrCommitment) {
        const {
          commitment: c7,
          ...rest
        } = configOrCommitment;
        commitment = c7;
        extra = rest;
      }
      const args = this._buildArgs([], commitment, "base64", extra);
      const unsafeRes = await this._rpcRequest("getBlockProduction", args);
      const res = create2(unsafeRes, BlockProductionResponseStruct);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get block production information");
      }
      return res.result;
    }
    /**
     * Fetch a confirmed or finalized transaction from the cluster.
     *
     * @deprecated Instead, call `getTransaction` using a
     * `GetVersionedTransactionConfig` by setting the
     * `maxSupportedTransactionVersion` property.
     */
    /**
     * Fetch a confirmed or finalized transaction from the cluster.
     */
    // eslint-disable-next-line no-dupe-class-members
    /**
     * Fetch a confirmed or finalized transaction from the cluster.
     */
    // eslint-disable-next-line no-dupe-class-members
    async getTransaction(signature2, rawConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(rawConfig);
      const args = this._buildArgsAtLeastConfirmed([signature2], commitment, void 0, config2);
      const unsafeRes = await this._rpcRequest("getTransaction", args);
      const res = create2(unsafeRes, GetTransactionRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get transaction");
      }
      const result = res.result;
      if (!result) return result;
      return {
        ...result,
        transaction: {
          ...result.transaction,
          message: versionedMessageFromResponse(result.version, result.transaction.message)
        }
      };
    }
    /**
     * Fetch parsed transaction details for a confirmed or finalized transaction
     */
    async getParsedTransaction(signature2, commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgsAtLeastConfirmed([signature2], commitment, "jsonParsed", config2);
      const unsafeRes = await this._rpcRequest("getTransaction", args);
      const res = create2(unsafeRes, GetParsedTransactionRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get transaction");
      }
      return res.result;
    }
    /**
     * Fetch parsed transaction details for a batch of confirmed transactions
     */
    async getParsedTransactions(signatures, commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const batch = signatures.map((signature2) => {
        const args = this._buildArgsAtLeastConfirmed([signature2], commitment, "jsonParsed", config2);
        return {
          methodName: "getTransaction",
          args
        };
      });
      const unsafeRes = await this._rpcBatchRequest(batch);
      const res = unsafeRes.map((unsafeRes2) => {
        const res2 = create2(unsafeRes2, GetParsedTransactionRpcResult);
        if ("error" in res2) {
          throw new SolanaJSONRPCError(res2.error, "failed to get transactions");
        }
        return res2.result;
      });
      return res;
    }
    /**
     * Fetch transaction details for a batch of confirmed transactions.
     * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.
     *
     * @deprecated Instead, call `getTransactions` using a
     * `GetVersionedTransactionConfig` by setting the
     * `maxSupportedTransactionVersion` property.
     */
    /**
     * Fetch transaction details for a batch of confirmed transactions.
     * Similar to {@link getParsedTransactions} but returns a {@link
     * VersionedTransactionResponse}.
     */
    // eslint-disable-next-line no-dupe-class-members
    /**
     * Fetch transaction details for a batch of confirmed transactions.
     * Similar to {@link getParsedTransactions} but returns a {@link
     * VersionedTransactionResponse}.
     */
    // eslint-disable-next-line no-dupe-class-members
    async getTransactions(signatures, commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const batch = signatures.map((signature2) => {
        const args = this._buildArgsAtLeastConfirmed([signature2], commitment, void 0, config2);
        return {
          methodName: "getTransaction",
          args
        };
      });
      const unsafeRes = await this._rpcBatchRequest(batch);
      const res = unsafeRes.map((unsafeRes2) => {
        const res2 = create2(unsafeRes2, GetTransactionRpcResult);
        if ("error" in res2) {
          throw new SolanaJSONRPCError(res2.error, "failed to get transactions");
        }
        const result = res2.result;
        if (!result) return result;
        return {
          ...result,
          transaction: {
            ...result.transaction,
            message: versionedMessageFromResponse(result.version, result.transaction.message)
          }
        };
      });
      return res;
    }
    /**
     * Fetch a list of Transactions and transaction statuses from the cluster
     * for a confirmed block.
     *
     * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlock} instead.
     */
    async getConfirmedBlock(slot, commitment) {
      const args = this._buildArgsAtLeastConfirmed([slot], commitment);
      const unsafeRes = await this._rpcRequest("getBlock", args);
      const res = create2(unsafeRes, GetConfirmedBlockRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get confirmed block");
      }
      const result = res.result;
      if (!result) {
        throw new Error("Confirmed block " + slot + " not found");
      }
      const block = {
        ...result,
        transactions: result.transactions.map(({
          transaction,
          meta: meta3
        }) => {
          const message = new Message(transaction.message);
          return {
            meta: meta3,
            transaction: {
              ...transaction,
              message
            }
          };
        })
      };
      return {
        ...block,
        transactions: block.transactions.map(({
          transaction,
          meta: meta3
        }) => {
          return {
            meta: meta3,
            transaction: Transaction.populate(transaction.message, transaction.signatures)
          };
        })
      };
    }
    /**
     * Fetch confirmed blocks between two slots
     */
    async getBlocks(startSlot, endSlot, commitment) {
      const args = this._buildArgsAtLeastConfirmed(endSlot !== void 0 ? [startSlot, endSlot] : [startSlot], commitment);
      const unsafeRes = await this._rpcRequest("getBlocks", args);
      const res = create2(unsafeRes, jsonRpcResult(array(number())));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get blocks");
      }
      return res.result;
    }
    /**
     * Fetch a list of Signatures from the cluster for a block, excluding rewards
     */
    async getBlockSignatures(slot, commitment) {
      const args = this._buildArgsAtLeastConfirmed([slot], commitment, void 0, {
        transactionDetails: "signatures",
        rewards: false
      });
      const unsafeRes = await this._rpcRequest("getBlock", args);
      const res = create2(unsafeRes, GetBlockSignaturesRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get block");
      }
      const result = res.result;
      if (!result) {
        throw new Error("Block " + slot + " not found");
      }
      return result;
    }
    /**
     * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards
     *
     * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlockSignatures} instead.
     */
    async getConfirmedBlockSignatures(slot, commitment) {
      const args = this._buildArgsAtLeastConfirmed([slot], commitment, void 0, {
        transactionDetails: "signatures",
        rewards: false
      });
      const unsafeRes = await this._rpcRequest("getBlock", args);
      const res = create2(unsafeRes, GetBlockSignaturesRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get confirmed block");
      }
      const result = res.result;
      if (!result) {
        throw new Error("Confirmed block " + slot + " not found");
      }
      return result;
    }
    /**
     * Fetch a transaction details for a confirmed transaction
     *
     * @deprecated Deprecated since RPC v1.7.0. Please use {@link getTransaction} instead.
     */
    async getConfirmedTransaction(signature2, commitment) {
      const args = this._buildArgsAtLeastConfirmed([signature2], commitment);
      const unsafeRes = await this._rpcRequest("getTransaction", args);
      const res = create2(unsafeRes, GetTransactionRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get transaction");
      }
      const result = res.result;
      if (!result) return result;
      const message = new Message(result.transaction.message);
      const signatures = result.transaction.signatures;
      return {
        ...result,
        transaction: Transaction.populate(message, signatures)
      };
    }
    /**
     * Fetch parsed transaction details for a confirmed transaction
     *
     * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransaction} instead.
     */
    async getParsedConfirmedTransaction(signature2, commitment) {
      const args = this._buildArgsAtLeastConfirmed([signature2], commitment, "jsonParsed");
      const unsafeRes = await this._rpcRequest("getTransaction", args);
      const res = create2(unsafeRes, GetParsedTransactionRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get confirmed transaction");
      }
      return res.result;
    }
    /**
     * Fetch parsed transaction details for a batch of confirmed transactions
     *
     * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransactions} instead.
     */
    async getParsedConfirmedTransactions(signatures, commitment) {
      const batch = signatures.map((signature2) => {
        const args = this._buildArgsAtLeastConfirmed([signature2], commitment, "jsonParsed");
        return {
          methodName: "getTransaction",
          args
        };
      });
      const unsafeRes = await this._rpcBatchRequest(batch);
      const res = unsafeRes.map((unsafeRes2) => {
        const res2 = create2(unsafeRes2, GetParsedTransactionRpcResult);
        if ("error" in res2) {
          throw new SolanaJSONRPCError(res2.error, "failed to get confirmed transactions");
        }
        return res2.result;
      });
      return res;
    }
    /**
     * Fetch a list of all the confirmed signatures for transactions involving an address
     * within a specified slot range. Max range allowed is 10,000 slots.
     *
     * @deprecated Deprecated since RPC v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.
     *
     * @param address queried address
     * @param startSlot start slot, inclusive
     * @param endSlot end slot, inclusive
     */
    async getConfirmedSignaturesForAddress(address, startSlot, endSlot) {
      let options = {};
      let firstAvailableBlock = await this.getFirstAvailableBlock();
      while (!("until" in options)) {
        startSlot--;
        if (startSlot <= 0 || startSlot < firstAvailableBlock) {
          break;
        }
        try {
          const block = await this.getConfirmedBlockSignatures(startSlot, "finalized");
          if (block.signatures.length > 0) {
            options.until = block.signatures[block.signatures.length - 1].toString();
          }
        } catch (err2) {
          if (err2 instanceof Error && err2.message.includes("skipped")) {
            continue;
          } else {
            throw err2;
          }
        }
      }
      let highestConfirmedRoot = await this.getSlot("finalized");
      while (!("before" in options)) {
        endSlot++;
        if (endSlot > highestConfirmedRoot) {
          break;
        }
        try {
          const block = await this.getConfirmedBlockSignatures(endSlot);
          if (block.signatures.length > 0) {
            options.before = block.signatures[block.signatures.length - 1].toString();
          }
        } catch (err2) {
          if (err2 instanceof Error && err2.message.includes("skipped")) {
            continue;
          } else {
            throw err2;
          }
        }
      }
      const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(address, options);
      return confirmedSignatureInfo.map((info) => info.signature);
    }
    /**
     * Returns confirmed signatures for transactions involving an
     * address backwards in time from the provided signature or most recent confirmed block
     *
     * @deprecated Deprecated since RPC v1.7.0. Please use {@link getSignaturesForAddress} instead.
     */
    async getConfirmedSignaturesForAddress2(address, options, commitment) {
      const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, void 0, options);
      const unsafeRes = await this._rpcRequest("getConfirmedSignaturesForAddress2", args);
      const res = create2(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get confirmed signatures for address");
      }
      return res.result;
    }
    /**
     * Returns confirmed signatures for transactions involving an
     * address backwards in time from the provided signature or most recent confirmed block
     *
     *
     * @param address queried address
     * @param options
     */
    async getSignaturesForAddress(address, options, commitment) {
      const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, void 0, options);
      const unsafeRes = await this._rpcRequest("getSignaturesForAddress", args);
      const res = create2(unsafeRes, GetSignaturesForAddressRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, "failed to get signatures for address");
      }
      return res.result;
    }
    async getAddressLookupTable(accountKey, config2) {
      const {
        context,
        value: accountInfo
      } = await this.getAccountInfoAndContext(accountKey, config2);
      let value = null;
      if (accountInfo !== null) {
        value = new AddressLookupTableAccount({
          key: accountKey,
          state: AddressLookupTableAccount.deserialize(accountInfo.data)
        });
      }
      return {
        context,
        value
      };
    }
    /**
     * Fetch the contents of a Nonce account from the cluster, return with context
     */
    async getNonceAndContext(nonceAccount, commitmentOrConfig) {
      const {
        context,
        value: accountInfo
      } = await this.getAccountInfoAndContext(nonceAccount, commitmentOrConfig);
      let value = null;
      if (accountInfo !== null) {
        value = NonceAccount.fromAccountData(accountInfo.data);
      }
      return {
        context,
        value
      };
    }
    /**
     * Fetch the contents of a Nonce account from the cluster
     */
    async getNonce(nonceAccount, commitmentOrConfig) {
      return await this.getNonceAndContext(nonceAccount, commitmentOrConfig).then((x13) => x13.value).catch((e2) => {
        throw new Error("failed to get nonce for account " + nonceAccount.toBase58() + ": " + e2);
      });
    }
    /**
     * Request an allocation of lamports to the specified address
     *
     * ```typescript
     * import { Connection, PublicKey, LAMPORTS_PER_SOL } from "@solana/web3.js";
     *
     * (async () => {
     *   const connection = new Connection("https://api.testnet.solana.com", "confirmed");
     *   const myAddress = new PublicKey("2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM");
     *   const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);
     *   await connection.confirmTransaction(signature);
     * })();
     * ```
     */
    async requestAirdrop(to3, lamports) {
      const unsafeRes = await this._rpcRequest("requestAirdrop", [to3.toBase58(), lamports]);
      const res = create2(unsafeRes, RequestAirdropRpcResult);
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `airdrop to ${to3.toBase58()} failed`);
      }
      return res.result;
    }
    /**
     * @internal
     */
    async _blockhashWithExpiryBlockHeight(disableCache) {
      if (!disableCache) {
        while (this._pollingBlockhash) {
          await sleep(100);
        }
        const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;
        const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;
        if (this._blockhashInfo.latestBlockhash !== null && !expired) {
          return this._blockhashInfo.latestBlockhash;
        }
      }
      return await this._pollNewBlockhash();
    }
    /**
     * @internal
     */
    async _pollNewBlockhash() {
      this._pollingBlockhash = true;
      try {
        const startTime = Date.now();
        const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;
        const cachedBlockhash = cachedLatestBlockhash ? cachedLatestBlockhash.blockhash : null;
        for (let i5 = 0; i5 < 50; i5++) {
          const latestBlockhash = await this.getLatestBlockhash("finalized");
          if (cachedBlockhash !== latestBlockhash.blockhash) {
            this._blockhashInfo = {
              latestBlockhash,
              lastFetch: Date.now(),
              transactionSignatures: [],
              simulatedSignatures: []
            };
            return latestBlockhash;
          }
          await sleep(MS_PER_SLOT / 2);
        }
        throw new Error(`Unable to obtain a new blockhash after ${Date.now() - startTime}ms`);
      } finally {
        this._pollingBlockhash = false;
      }
    }
    /**
     * get the stake minimum delegation
     */
    async getStakeMinimumDelegation(config2) {
      const {
        commitment,
        config: configArg
      } = extractCommitmentFromConfig(config2);
      const args = this._buildArgs([], commitment, "base64", configArg);
      const unsafeRes = await this._rpcRequest("getStakeMinimumDelegation", args);
      const res = create2(unsafeRes, jsonRpcResultAndContext(number()));
      if ("error" in res) {
        throw new SolanaJSONRPCError(res.error, `failed to get stake minimum delegation`);
      }
      return res.result;
    }
    /**
     * Simulate a transaction
     *
     * @deprecated Instead, call {@link simulateTransaction} with {@link
     * VersionedTransaction} and {@link SimulateTransactionConfig} parameters
     */
    /**
     * Simulate a transaction
     */
    // eslint-disable-next-line no-dupe-class-members
    /**
     * Simulate a transaction
     */
    // eslint-disable-next-line no-dupe-class-members
    async simulateTransaction(transactionOrMessage, configOrSigners, includeAccounts) {
      if ("message" in transactionOrMessage) {
        const versionedTx = transactionOrMessage;
        const wireTransaction2 = versionedTx.serialize();
        const encodedTransaction2 = import_buffer4.Buffer.from(wireTransaction2).toString("base64");
        if (Array.isArray(configOrSigners) || includeAccounts !== void 0) {
          throw new Error("Invalid arguments");
        }
        const config3 = configOrSigners || {};
        config3.encoding = "base64";
        if (!("commitment" in config3)) {
          config3.commitment = this.commitment;
        }
        if (configOrSigners && typeof configOrSigners === "object" && "innerInstructions" in configOrSigners) {
          config3.innerInstructions = configOrSigners.innerInstructions;
        }
        const args2 = [encodedTransaction2, config3];
        const unsafeRes2 = await this._rpcRequest("simulateTransaction", args2);
        const res2 = create2(unsafeRes2, SimulatedTransactionResponseStruct);
        if ("error" in res2) {
          throw new Error("failed to simulate transaction: " + res2.error.message);
        }
        return res2.result;
      }
      let transaction;
      if (transactionOrMessage instanceof Transaction) {
        let originalTx = transactionOrMessage;
        transaction = new Transaction();
        transaction.feePayer = originalTx.feePayer;
        transaction.instructions = transactionOrMessage.instructions;
        transaction.nonceInfo = originalTx.nonceInfo;
        transaction.signatures = originalTx.signatures;
      } else {
        transaction = Transaction.populate(transactionOrMessage);
        transaction._message = transaction._json = void 0;
      }
      if (configOrSigners !== void 0 && !Array.isArray(configOrSigners)) {
        throw new Error("Invalid arguments");
      }
      const signers = configOrSigners;
      if (transaction.nonceInfo && signers) {
        transaction.sign(...signers);
      } else {
        let disableCache = this._disableBlockhashCaching;
        for (; ; ) {
          const latestBlockhash = await this._blockhashWithExpiryBlockHeight(disableCache);
          transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;
          transaction.recentBlockhash = latestBlockhash.blockhash;
          if (!signers) break;
          transaction.sign(...signers);
          if (!transaction.signature) {
            throw new Error("!signature");
          }
          const signature2 = transaction.signature.toString("base64");
          if (!this._blockhashInfo.simulatedSignatures.includes(signature2) && !this._blockhashInfo.transactionSignatures.includes(signature2)) {
            this._blockhashInfo.simulatedSignatures.push(signature2);
            break;
          } else {
            disableCache = true;
          }
        }
      }
      const message = transaction._compile();
      const signData = message.serialize();
      const wireTransaction = transaction._serialize(signData);
      const encodedTransaction = wireTransaction.toString("base64");
      const config2 = {
        encoding: "base64",
        commitment: this.commitment
      };
      if (includeAccounts) {
        const addresses = (Array.isArray(includeAccounts) ? includeAccounts : message.nonProgramIds()).map((key2) => key2.toBase58());
        config2["accounts"] = {
          encoding: "base64",
          addresses
        };
      }
      if (signers) {
        config2.sigVerify = true;
      }
      if (configOrSigners && typeof configOrSigners === "object" && "innerInstructions" in configOrSigners) {
        config2.innerInstructions = configOrSigners.innerInstructions;
      }
      const args = [encodedTransaction, config2];
      const unsafeRes = await this._rpcRequest("simulateTransaction", args);
      const res = create2(unsafeRes, SimulatedTransactionResponseStruct);
      if ("error" in res) {
        let logs;
        if ("data" in res.error) {
          logs = res.error.data.logs;
          if (logs && Array.isArray(logs)) {
            const traceIndent = "\n    ";
            const logTrace = traceIndent + logs.join(traceIndent);
            console.error(res.error.message, logTrace);
          }
        }
        throw new SendTransactionError({
          action: "simulate",
          signature: "",
          transactionMessage: res.error.message,
          logs
        });
      }
      return res.result;
    }
    /**
     * Sign and send a transaction
     *
     * @deprecated Instead, call {@link sendTransaction} with a {@link
     * VersionedTransaction}
     */
    /**
     * Send a signed transaction
     */
    // eslint-disable-next-line no-dupe-class-members
    /**
     * Sign and send a transaction
     */
    // eslint-disable-next-line no-dupe-class-members
    async sendTransaction(transaction, signersOrOptions, options) {
      if ("version" in transaction) {
        if (signersOrOptions && Array.isArray(signersOrOptions)) {
          throw new Error("Invalid arguments");
        }
        const wireTransaction2 = transaction.serialize();
        return await this.sendRawTransaction(wireTransaction2, signersOrOptions);
      }
      if (signersOrOptions === void 0 || !Array.isArray(signersOrOptions)) {
        throw new Error("Invalid arguments");
      }
      const signers = signersOrOptions;
      if (transaction.nonceInfo) {
        transaction.sign(...signers);
      } else {
        let disableCache = this._disableBlockhashCaching;
        for (; ; ) {
          const latestBlockhash = await this._blockhashWithExpiryBlockHeight(disableCache);
          transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;
          transaction.recentBlockhash = latestBlockhash.blockhash;
          transaction.sign(...signers);
          if (!transaction.signature) {
            throw new Error("!signature");
          }
          const signature2 = transaction.signature.toString("base64");
          if (!this._blockhashInfo.transactionSignatures.includes(signature2)) {
            this._blockhashInfo.transactionSignatures.push(signature2);
            break;
          } else {
            disableCache = true;
          }
        }
      }
      const wireTransaction = transaction.serialize();
      return await this.sendRawTransaction(wireTransaction, options);
    }
    /**
     * Send a transaction that has already been signed and serialized into the
     * wire format
     */
    async sendRawTransaction(rawTransaction, options) {
      const encodedTransaction = toBuffer(rawTransaction).toString("base64");
      const result = await this.sendEncodedTransaction(encodedTransaction, options);
      return result;
    }
    /**
     * Send a transaction that has already been signed, serialized into the
     * wire format, and encoded as a base64 string
     */
    async sendEncodedTransaction(encodedTransaction, options) {
      const config2 = {
        encoding: "base64"
      };
      const skipPreflight = options && options.skipPreflight;
      const preflightCommitment = skipPreflight === true ? "processed" : options && options.preflightCommitment || this.commitment;
      if (options && options.maxRetries != null) {
        config2.maxRetries = options.maxRetries;
      }
      if (options && options.minContextSlot != null) {
        config2.minContextSlot = options.minContextSlot;
      }
      if (skipPreflight) {
        config2.skipPreflight = skipPreflight;
      }
      if (preflightCommitment) {
        config2.preflightCommitment = preflightCommitment;
      }
      const args = [encodedTransaction, config2];
      const unsafeRes = await this._rpcRequest("sendTransaction", args);
      const res = create2(unsafeRes, SendTransactionRpcResult);
      if ("error" in res) {
        let logs = void 0;
        if ("data" in res.error) {
          logs = res.error.data.logs;
        }
        throw new SendTransactionError({
          action: skipPreflight ? "send" : "simulate",
          signature: "",
          transactionMessage: res.error.message,
          logs
        });
      }
      return res.result;
    }
    /**
     * @internal
     */
    _wsOnOpen() {
      this._rpcWebSocketConnected = true;
      this._rpcWebSocketHeartbeat = setInterval(() => {
        (async () => {
          try {
            await this._rpcWebSocket.notify("ping");
          } catch {
          }
        })();
      }, 5e3);
      this._updateSubscriptions();
    }
    /**
     * @internal
     */
    _wsOnError(err2) {
      this._rpcWebSocketConnected = false;
      console.error("ws error:", err2.message);
    }
    /**
     * @internal
     */
    _wsOnClose(code2) {
      this._rpcWebSocketConnected = false;
      this._rpcWebSocketGeneration = (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;
      if (this._rpcWebSocketIdleTimeout) {
        clearTimeout(this._rpcWebSocketIdleTimeout);
        this._rpcWebSocketIdleTimeout = null;
      }
      if (this._rpcWebSocketHeartbeat) {
        clearInterval(this._rpcWebSocketHeartbeat);
        this._rpcWebSocketHeartbeat = null;
      }
      if (code2 === 1e3) {
        this._updateSubscriptions();
        return;
      }
      this._subscriptionCallbacksByServerSubscriptionId = {};
      Object.entries(this._subscriptionsByHash).forEach(([hash5, subscription]) => {
        this._setSubscription(hash5, {
          ...subscription,
          state: "pending"
        });
      });
    }
    /**
     * @internal
     */
    _setSubscription(hash5, nextSubscription) {
      const prevState = this._subscriptionsByHash[hash5]?.state;
      this._subscriptionsByHash[hash5] = nextSubscription;
      if (prevState !== nextSubscription.state) {
        const stateChangeCallbacks = this._subscriptionStateChangeCallbacksByHash[hash5];
        if (stateChangeCallbacks) {
          stateChangeCallbacks.forEach((cb) => {
            try {
              cb(nextSubscription.state);
            } catch {
            }
          });
        }
      }
    }
    /**
     * @internal
     */
    _onSubscriptionStateChange(clientSubscriptionId, callback) {
      const hash5 = this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];
      if (hash5 == null) {
        return () => {
        };
      }
      const stateChangeCallbacks = this._subscriptionStateChangeCallbacksByHash[hash5] ||= /* @__PURE__ */ new Set();
      stateChangeCallbacks.add(callback);
      return () => {
        stateChangeCallbacks.delete(callback);
        if (stateChangeCallbacks.size === 0) {
          delete this._subscriptionStateChangeCallbacksByHash[hash5];
        }
      };
    }
    /**
     * @internal
     */
    async _updateSubscriptions() {
      if (Object.keys(this._subscriptionsByHash).length === 0) {
        if (this._rpcWebSocketConnected) {
          this._rpcWebSocketConnected = false;
          this._rpcWebSocketIdleTimeout = setTimeout(() => {
            this._rpcWebSocketIdleTimeout = null;
            try {
              this._rpcWebSocket.close();
            } catch (err2) {
              if (err2 instanceof Error) {
                console.log(`Error when closing socket connection: ${err2.message}`);
              }
            }
          }, 500);
        }
        return;
      }
      if (this._rpcWebSocketIdleTimeout !== null) {
        clearTimeout(this._rpcWebSocketIdleTimeout);
        this._rpcWebSocketIdleTimeout = null;
        this._rpcWebSocketConnected = true;
      }
      if (!this._rpcWebSocketConnected) {
        this._rpcWebSocket.connect();
        return;
      }
      const activeWebSocketGeneration = this._rpcWebSocketGeneration;
      const isCurrentConnectionStillActive = () => {
        return activeWebSocketGeneration === this._rpcWebSocketGeneration;
      };
      await Promise.all(
        // Don't be tempted to change this to `Object.entries`. We call
        // `_updateSubscriptions` recursively when processing the state,
        // so it's important that we look up the *current* version of
        // each subscription, every time we process a hash.
        Object.keys(this._subscriptionsByHash).map(async (hash5) => {
          const subscription = this._subscriptionsByHash[hash5];
          if (subscription === void 0) {
            return;
          }
          switch (subscription.state) {
            case "pending":
            case "unsubscribed":
              if (subscription.callbacks.size === 0) {
                delete this._subscriptionsByHash[hash5];
                if (subscription.state === "unsubscribed") {
                  delete this._subscriptionCallbacksByServerSubscriptionId[subscription.serverSubscriptionId];
                }
                await this._updateSubscriptions();
                return;
              }
              await (async () => {
                const {
                  args,
                  method
                } = subscription;
                try {
                  this._setSubscription(hash5, {
                    ...subscription,
                    state: "subscribing"
                  });
                  const serverSubscriptionId = await this._rpcWebSocket.call(method, args);
                  this._setSubscription(hash5, {
                    ...subscription,
                    serverSubscriptionId,
                    state: "subscribed"
                  });
                  this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId] = subscription.callbacks;
                  await this._updateSubscriptions();
                } catch (e2) {
                  console.error(`Received ${e2 instanceof Error ? "" : "JSON-RPC "}error calling \`${method}\``, {
                    args,
                    error: e2
                  });
                  if (!isCurrentConnectionStillActive()) {
                    return;
                  }
                  this._setSubscription(hash5, {
                    ...subscription,
                    state: "pending"
                  });
                  await this._updateSubscriptions();
                }
              })();
              break;
            case "subscribed":
              if (subscription.callbacks.size === 0) {
                await (async () => {
                  const {
                    serverSubscriptionId,
                    unsubscribeMethod
                  } = subscription;
                  if (this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)) {
                    this._subscriptionsAutoDisposedByRpc.delete(serverSubscriptionId);
                  } else {
                    this._setSubscription(hash5, {
                      ...subscription,
                      state: "unsubscribing"
                    });
                    this._setSubscription(hash5, {
                      ...subscription,
                      state: "unsubscribing"
                    });
                    try {
                      await this._rpcWebSocket.call(unsubscribeMethod, [serverSubscriptionId]);
                    } catch (e2) {
                      if (e2 instanceof Error) {
                        console.error(`${unsubscribeMethod} error:`, e2.message);
                      }
                      if (!isCurrentConnectionStillActive()) {
                        return;
                      }
                      this._setSubscription(hash5, {
                        ...subscription,
                        state: "subscribed"
                      });
                      await this._updateSubscriptions();
                      return;
                    }
                  }
                  this._setSubscription(hash5, {
                    ...subscription,
                    state: "unsubscribed"
                  });
                  await this._updateSubscriptions();
                })();
              }
              break;
          }
        })
      );
    }
    /**
     * @internal
     */
    _handleServerNotification(serverSubscriptionId, callbackArgs) {
      const callbacks = this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];
      if (callbacks === void 0) {
        return;
      }
      callbacks.forEach((cb) => {
        try {
          cb(
            ...callbackArgs
          );
        } catch (e2) {
          console.error(e2);
        }
      });
    }
    /**
     * @internal
     */
    _wsOnAccountNotification(notification) {
      const {
        result,
        subscription
      } = create2(notification, AccountNotificationResult);
      this._handleServerNotification(subscription, [result.value, result.context]);
    }
    /**
     * @internal
     */
    _makeSubscription(subscriptionConfig, args) {
      const clientSubscriptionId = this._nextClientSubscriptionId++;
      const hash5 = fastStableStringify([subscriptionConfig.method, args]);
      const existingSubscription = this._subscriptionsByHash[hash5];
      if (existingSubscription === void 0) {
        this._subscriptionsByHash[hash5] = {
          ...subscriptionConfig,
          args,
          callbacks: /* @__PURE__ */ new Set([subscriptionConfig.callback]),
          state: "pending"
        };
      } else {
        existingSubscription.callbacks.add(subscriptionConfig.callback);
      }
      this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash5;
      this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId] = async () => {
        delete this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];
        delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];
        const subscription = this._subscriptionsByHash[hash5];
        assert9(subscription !== void 0, `Could not find a \`Subscription\` when tearing down client subscription #${clientSubscriptionId}`);
        subscription.callbacks.delete(subscriptionConfig.callback);
        await this._updateSubscriptions();
      };
      this._updateSubscriptions();
      return clientSubscriptionId;
    }
    /**
     * Register a callback to be invoked whenever the specified account changes
     *
     * @param publicKey Public key of the account to monitor
     * @param callback Function to invoke whenever the account is changed
     * @param config
     * @return subscription id
     */
    /** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */
    // eslint-disable-next-line no-dupe-class-members
    // eslint-disable-next-line no-dupe-class-members
    onAccountChange(publicKey3, callback, commitmentOrConfig) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgs(
        [publicKey3.toBase58()],
        commitment || this._commitment || "finalized",
        // Apply connection/server default.
        "base64",
        config2
      );
      return this._makeSubscription({
        callback,
        method: "accountSubscribe",
        unsubscribeMethod: "accountUnsubscribe"
      }, args);
    }
    /**
     * Deregister an account notification callback
     *
     * @param clientSubscriptionId client subscription id to deregister
     */
    async removeAccountChangeListener(clientSubscriptionId) {
      await this._unsubscribeClientSubscription(clientSubscriptionId, "account change");
    }
    /**
     * @internal
     */
    _wsOnProgramAccountNotification(notification) {
      const {
        result,
        subscription
      } = create2(notification, ProgramAccountNotificationResult);
      this._handleServerNotification(subscription, [{
        accountId: result.value.pubkey,
        accountInfo: result.value.account
      }, result.context]);
    }
    /**
     * Register a callback to be invoked whenever accounts owned by the
     * specified program change
     *
     * @param programId Public key of the program to monitor
     * @param callback Function to invoke whenever the account is changed
     * @param config
     * @return subscription id
     */
    /** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */
    // eslint-disable-next-line no-dupe-class-members
    // eslint-disable-next-line no-dupe-class-members
    onProgramAccountChange(programId, callback, commitmentOrConfig, maybeFilters) {
      const {
        commitment,
        config: config2
      } = extractCommitmentFromConfig(commitmentOrConfig);
      const args = this._buildArgs(
        [programId.toBase58()],
        commitment || this._commitment || "finalized",
        // Apply connection/server default.
        "base64",
        config2 ? config2 : maybeFilters ? {
          filters: applyDefaultMemcmpEncodingToFilters(maybeFilters)
        } : void 0
        /* extra */
      );
      return this._makeSubscription({
        callback,
        method: "programSubscribe",
        unsubscribeMethod: "programUnsubscribe"
      }, args);
    }
    /**
     * Deregister an account notification callback
     *
     * @param clientSubscriptionId client subscription id to deregister
     */
    async removeProgramAccountChangeListener(clientSubscriptionId) {
      await this._unsubscribeClientSubscription(clientSubscriptionId, "program account change");
    }
    /**
     * Registers a callback to be invoked whenever logs are emitted.
     */
    onLogs(filter, callback, commitment) {
      const args = this._buildArgs(
        [typeof filter === "object" ? {
          mentions: [filter.toString()]
        } : filter],
        commitment || this._commitment || "finalized"
        // Apply connection/server default.
      );
      return this._makeSubscription({
        callback,
        method: "logsSubscribe",
        unsubscribeMethod: "logsUnsubscribe"
      }, args);
    }
    /**
     * Deregister a logs callback.
     *
     * @param clientSubscriptionId client subscription id to deregister.
     */
    async removeOnLogsListener(clientSubscriptionId) {
      await this._unsubscribeClientSubscription(clientSubscriptionId, "logs");
    }
    /**
     * @internal
     */
    _wsOnLogsNotification(notification) {
      const {
        result,
        subscription
      } = create2(notification, LogsNotificationResult);
      this._handleServerNotification(subscription, [result.value, result.context]);
    }
    /**
     * @internal
     */
    _wsOnSlotNotification(notification) {
      const {
        result,
        subscription
      } = create2(notification, SlotNotificationResult);
      this._handleServerNotification(subscription, [result]);
    }
    /**
     * Register a callback to be invoked upon slot changes
     *
     * @param callback Function to invoke whenever the slot changes
     * @return subscription id
     */
    onSlotChange(callback) {
      return this._makeSubscription(
        {
          callback,
          method: "slotSubscribe",
          unsubscribeMethod: "slotUnsubscribe"
        },
        []
        /* args */
      );
    }
    /**
     * Deregister a slot notification callback
     *
     * @param clientSubscriptionId client subscription id to deregister
     */
    async removeSlotChangeListener(clientSubscriptionId) {
      await this._unsubscribeClientSubscription(clientSubscriptionId, "slot change");
    }
    /**
     * @internal
     */
    _wsOnSlotUpdatesNotification(notification) {
      const {
        result,
        subscription
      } = create2(notification, SlotUpdateNotificationResult);
      this._handleServerNotification(subscription, [result]);
    }
    /**
     * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s
     * may be useful to track live progress of a cluster.
     *
     * @param callback Function to invoke whenever the slot updates
     * @return subscription id
     */
    onSlotUpdate(callback) {
      return this._makeSubscription(
        {
          callback,
          method: "slotsUpdatesSubscribe",
          unsubscribeMethod: "slotsUpdatesUnsubscribe"
        },
        []
        /* args */
      );
    }
    /**
     * Deregister a slot update notification callback
     *
     * @param clientSubscriptionId client subscription id to deregister
     */
    async removeSlotUpdateListener(clientSubscriptionId) {
      await this._unsubscribeClientSubscription(clientSubscriptionId, "slot update");
    }
    /**
     * @internal
     */
    async _unsubscribeClientSubscription(clientSubscriptionId, subscriptionName) {
      const dispose2 = this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];
      if (dispose2) {
        await dispose2();
      } else {
        console.warn(`Ignored unsubscribe request because an active subscription with id \`${clientSubscriptionId}\` for '${subscriptionName}' events could not be found.`);
      }
    }
    _buildArgs(args, override, encoding, extra) {
      const commitment = override || this._commitment;
      if (commitment || encoding || extra) {
        let options = {};
        if (encoding) {
          options.encoding = encoding;
        }
        if (commitment) {
          options.commitment = commitment;
        }
        if (extra) {
          options = Object.assign(options, extra);
        }
        args.push(options);
      }
      return args;
    }
    /**
     * @internal
     */
    _buildArgsAtLeastConfirmed(args, override, encoding, extra) {
      const commitment = override || this._commitment;
      if (commitment && !["confirmed", "finalized"].includes(commitment)) {
        throw new Error("Using Connection with default commitment: `" + this._commitment + "`, but method requires at least `confirmed`");
      }
      return this._buildArgs(args, override, encoding, extra);
    }
    /**
     * @internal
     */
    _wsOnSignatureNotification(notification) {
      const {
        result,
        subscription
      } = create2(notification, SignatureNotificationResult);
      if (result.value !== "receivedSignature") {
        this._subscriptionsAutoDisposedByRpc.add(subscription);
      }
      this._handleServerNotification(subscription, result.value === "receivedSignature" ? [{
        type: "received"
      }, result.context] : [{
        type: "status",
        result: result.value
      }, result.context]);
    }
    /**
     * Register a callback to be invoked upon signature updates
     *
     * @param signature Transaction signature string in base 58
     * @param callback Function to invoke on signature notifications
     * @param commitment Specify the commitment level signature must reach before notification
     * @return subscription id
     */
    onSignature(signature2, callback, commitment) {
      const args = this._buildArgs(
        [signature2],
        commitment || this._commitment || "finalized"
        // Apply connection/server default.
      );
      const clientSubscriptionId = this._makeSubscription({
        callback: (notification, context) => {
          if (notification.type === "status") {
            callback(notification.result, context);
            try {
              this.removeSignatureListener(clientSubscriptionId);
            } catch (_err) {
            }
          }
        },
        method: "signatureSubscribe",
        unsubscribeMethod: "signatureUnsubscribe"
      }, args);
      return clientSubscriptionId;
    }
    /**
     * Register a callback to be invoked when a transaction is
     * received and/or processed.
     *
     * @param signature Transaction signature string in base 58
     * @param callback Function to invoke on signature notifications
     * @param options Enable received notifications and set the commitment
     *   level that signature must reach before notification
     * @return subscription id
     */
    onSignatureWithOptions(signature2, callback, options) {
      const {
        commitment,
        ...extra
      } = {
        ...options,
        commitment: options && options.commitment || this._commitment || "finalized"
        // Apply connection/server default.
      };
      const args = this._buildArgs([signature2], commitment, void 0, extra);
      const clientSubscriptionId = this._makeSubscription({
        callback: (notification, context) => {
          callback(notification, context);
          try {
            this.removeSignatureListener(clientSubscriptionId);
          } catch (_err) {
          }
        },
        method: "signatureSubscribe",
        unsubscribeMethod: "signatureUnsubscribe"
      }, args);
      return clientSubscriptionId;
    }
    /**
     * Deregister a signature notification callback
     *
     * @param clientSubscriptionId client subscription id to deregister
     */
    async removeSignatureListener(clientSubscriptionId) {
      await this._unsubscribeClientSubscription(clientSubscriptionId, "signature result");
    }
    /**
     * @internal
     */
    _wsOnRootNotification(notification) {
      const {
        result,
        subscription
      } = create2(notification, RootNotificationResult);
      this._handleServerNotification(subscription, [result]);
    }
    /**
     * Register a callback to be invoked upon root changes
     *
     * @param callback Function to invoke whenever the root changes
     * @return subscription id
     */
    onRootChange(callback) {
      return this._makeSubscription(
        {
          callback,
          method: "rootSubscribe",
          unsubscribeMethod: "rootUnsubscribe"
        },
        []
        /* args */
      );
    }
    /**
     * Deregister a root notification callback
     *
     * @param clientSubscriptionId client subscription id to deregister
     */
    async removeRootChangeListener(clientSubscriptionId) {
      await this._unsubscribeClientSubscription(clientSubscriptionId, "root change");
    }
  };
  var Keypair = class _Keypair {
    /**
     * Create a new keypair instance.
     * Generate random keypair if no {@link Ed25519Keypair} is provided.
     *
     * @param {Ed25519Keypair} keypair ed25519 keypair
     */
    constructor(keypair) {
      this._keypair = void 0;
      this._keypair = keypair ?? generateKeypair();
    }
    /**
     * Generate a new random keypair
     *
     * @returns {Keypair} Keypair
     */
    static generate() {
      return new _Keypair(generateKeypair());
    }
    /**
     * Create a keypair from a raw secret key byte array.
     *
     * This method should only be used to recreate a keypair from a previously
     * generated secret key. Generating keypairs from a random seed should be done
     * with the {@link Keypair.fromSeed} method.
     *
     * @throws error if the provided secret key is invalid and validation is not skipped.
     *
     * @param secretKey secret key byte array
     * @param options skip secret key validation
     *
     * @returns {Keypair} Keypair
     */
    static fromSecretKey(secretKey, options) {
      if (secretKey.byteLength !== 64) {
        throw new Error("bad secret key size");
      }
      const publicKey3 = secretKey.slice(32, 64);
      if (!options || !options.skipValidation) {
        const privateScalar = secretKey.slice(0, 32);
        const computedPublicKey = getPublicKey(privateScalar);
        for (let ii2 = 0; ii2 < 32; ii2++) {
          if (publicKey3[ii2] !== computedPublicKey[ii2]) {
            throw new Error("provided secretKey is invalid");
          }
        }
      }
      return new _Keypair({
        publicKey: publicKey3,
        secretKey
      });
    }
    /**
     * Generate a keypair from a 32 byte seed.
     *
     * @param seed seed byte array
     *
     * @returns {Keypair} Keypair
     */
    static fromSeed(seed) {
      const publicKey3 = getPublicKey(seed);
      const secretKey = new Uint8Array(64);
      secretKey.set(seed);
      secretKey.set(publicKey3, 32);
      return new _Keypair({
        publicKey: publicKey3,
        secretKey
      });
    }
    /**
     * The public key for this keypair
     *
     * @returns {PublicKey} PublicKey
     */
    get publicKey() {
      return new PublicKey(this._keypair.publicKey);
    }
    /**
     * The raw secret key for this keypair
     * @returns {Uint8Array} Secret key in an array of Uint8 bytes
     */
    get secretKey() {
      return new Uint8Array(this._keypair.secretKey);
    }
  };
  var LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({
    CreateLookupTable: {
      index: 0,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), u64("recentSlot"), BufferLayout.u8("bumpSeed")])
    },
    FreezeLookupTable: {
      index: 1,
      layout: BufferLayout.struct([BufferLayout.u32("instruction")])
    },
    ExtendLookupTable: {
      index: 2,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), u64(), BufferLayout.seq(publicKey(), BufferLayout.offset(BufferLayout.u32(), -8), "addresses")])
    },
    DeactivateLookupTable: {
      index: 3,
      layout: BufferLayout.struct([BufferLayout.u32("instruction")])
    },
    CloseLookupTable: {
      index: 4,
      layout: BufferLayout.struct([BufferLayout.u32("instruction")])
    }
  });
  var AddressLookupTableProgram = class {
    /**
     * @internal
     */
    constructor() {
    }
    static createLookupTable(params) {
      const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(), getU64Encoder().encode(params.recentSlot)], this.programId);
      const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;
      const data = encodeData3(type2, {
        recentSlot: BigInt(params.recentSlot),
        bumpSeed
      });
      const keys2 = [{
        pubkey: lookupTableAddress,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: params.authority,
        isSigner: true,
        isWritable: false
      }, {
        pubkey: params.payer,
        isSigner: true,
        isWritable: true
      }, {
        pubkey: SystemProgram.programId,
        isSigner: false,
        isWritable: false
      }];
      return [new TransactionInstruction({
        programId: this.programId,
        keys: keys2,
        data
      }), lookupTableAddress];
    }
    static freezeLookupTable(params) {
      const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;
      const data = encodeData3(type2);
      const keys2 = [{
        pubkey: params.lookupTable,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: params.authority,
        isSigner: true,
        isWritable: false
      }];
      return new TransactionInstruction({
        programId: this.programId,
        keys: keys2,
        data
      });
    }
    static extendLookupTable(params) {
      const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;
      const data = encodeData3(type2, {
        addresses: params.addresses.map((addr) => addr.toBytes())
      });
      const keys2 = [{
        pubkey: params.lookupTable,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: params.authority,
        isSigner: true,
        isWritable: false
      }];
      if (params.payer) {
        keys2.push({
          pubkey: params.payer,
          isSigner: true,
          isWritable: true
        }, {
          pubkey: SystemProgram.programId,
          isSigner: false,
          isWritable: false
        });
      }
      return new TransactionInstruction({
        programId: this.programId,
        keys: keys2,
        data
      });
    }
    static deactivateLookupTable(params) {
      const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;
      const data = encodeData3(type2);
      const keys2 = [{
        pubkey: params.lookupTable,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: params.authority,
        isSigner: true,
        isWritable: false
      }];
      return new TransactionInstruction({
        programId: this.programId,
        keys: keys2,
        data
      });
    }
    static closeLookupTable(params) {
      const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;
      const data = encodeData3(type2);
      const keys2 = [{
        pubkey: params.lookupTable,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: params.authority,
        isSigner: true,
        isWritable: false
      }, {
        pubkey: params.recipient,
        isSigner: false,
        isWritable: true
      }];
      return new TransactionInstruction({
        programId: this.programId,
        keys: keys2,
        data
      });
    }
  };
  AddressLookupTableProgram.programId = new PublicKey("AddressLookupTab1e1111111111111111111111111");
  var COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze({
    RequestUnits: {
      index: 0,
      layout: BufferLayout.struct([BufferLayout.u8("instruction"), BufferLayout.u32("units"), BufferLayout.u32("additionalFee")])
    },
    RequestHeapFrame: {
      index: 1,
      layout: BufferLayout.struct([BufferLayout.u8("instruction"), BufferLayout.u32("bytes")])
    },
    SetComputeUnitLimit: {
      index: 2,
      layout: BufferLayout.struct([BufferLayout.u8("instruction"), BufferLayout.u32("units")])
    },
    SetComputeUnitPrice: {
      index: 3,
      layout: BufferLayout.struct([BufferLayout.u8("instruction"), u64("microLamports")])
    }
  });
  var ComputeBudgetProgram = class {
    /**
     * @internal
     */
    constructor() {
    }
    /**
     * Public key that identifies the Compute Budget program
     */
    /**
     * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}
     */
    static requestUnits(params) {
      const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;
      const data = encodeData3(type2, params);
      return new TransactionInstruction({
        keys: [],
        programId: this.programId,
        data
      });
    }
    static requestHeapFrame(params) {
      const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;
      const data = encodeData3(type2, params);
      return new TransactionInstruction({
        keys: [],
        programId: this.programId,
        data
      });
    }
    static setComputeUnitLimit(params) {
      const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;
      const data = encodeData3(type2, params);
      return new TransactionInstruction({
        keys: [],
        programId: this.programId,
        data
      });
    }
    static setComputeUnitPrice(params) {
      const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;
      const data = encodeData3(type2, {
        microLamports: BigInt(params.microLamports)
      });
      return new TransactionInstruction({
        keys: [],
        programId: this.programId,
        data
      });
    }
  };
  ComputeBudgetProgram.programId = new PublicKey("ComputeBudget111111111111111111111111111111");
  var PRIVATE_KEY_BYTES$1 = 64;
  var PUBLIC_KEY_BYTES$1 = 32;
  var SIGNATURE_BYTES = 64;
  var ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct([BufferLayout.u8("numSignatures"), BufferLayout.u8("padding"), BufferLayout.u16("signatureOffset"), BufferLayout.u16("signatureInstructionIndex"), BufferLayout.u16("publicKeyOffset"), BufferLayout.u16("publicKeyInstructionIndex"), BufferLayout.u16("messageDataOffset"), BufferLayout.u16("messageDataSize"), BufferLayout.u16("messageInstructionIndex")]);
  var Ed25519Program = class _Ed25519Program {
    /**
     * @internal
     */
    constructor() {
    }
    /**
     * Public key that identifies the ed25519 program
     */
    /**
     * Create an ed25519 instruction with a public key and signature. The
     * public key must be a buffer that is 32 bytes long, and the signature
     * must be a buffer of 64 bytes.
     */
    static createInstructionWithPublicKey(params) {
      const {
        publicKey: publicKey3,
        message,
        signature: signature2,
        instructionIndex
      } = params;
      assert9(publicKey3.length === PUBLIC_KEY_BYTES$1, `Public Key must be ${PUBLIC_KEY_BYTES$1} bytes but received ${publicKey3.length} bytes`);
      assert9(signature2.length === SIGNATURE_BYTES, `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature2.length} bytes`);
      const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;
      const signatureOffset = publicKeyOffset + publicKey3.length;
      const messageDataOffset = signatureOffset + signature2.length;
      const numSignatures = 1;
      const instructionData = import_buffer4.Buffer.alloc(messageDataOffset + message.length);
      const index2 = instructionIndex == null ? 65535 : instructionIndex;
      ED25519_INSTRUCTION_LAYOUT.encode({
        numSignatures,
        padding: 0,
        signatureOffset,
        signatureInstructionIndex: index2,
        publicKeyOffset,
        publicKeyInstructionIndex: index2,
        messageDataOffset,
        messageDataSize: message.length,
        messageInstructionIndex: index2
      }, instructionData);
      instructionData.fill(publicKey3, publicKeyOffset);
      instructionData.fill(signature2, signatureOffset);
      instructionData.fill(message, messageDataOffset);
      return new TransactionInstruction({
        keys: [],
        programId: _Ed25519Program.programId,
        data: instructionData
      });
    }
    /**
     * Create an ed25519 instruction with a private key. The private key
     * must be a buffer that is 64 bytes long.
     */
    static createInstructionWithPrivateKey(params) {
      const {
        privateKey,
        message,
        instructionIndex
      } = params;
      assert9(privateKey.length === PRIVATE_KEY_BYTES$1, `Private key must be ${PRIVATE_KEY_BYTES$1} bytes but received ${privateKey.length} bytes`);
      try {
        const keypair = Keypair.fromSecretKey(privateKey);
        const publicKey3 = keypair.publicKey.toBytes();
        const signature2 = sign2(message, keypair.secretKey);
        return this.createInstructionWithPublicKey({
          publicKey: publicKey3,
          message,
          signature: signature2,
          instructionIndex
        });
      } catch (error51) {
        throw new Error(`Error creating instruction; ${error51}`);
      }
    }
  };
  Ed25519Program.programId = new PublicKey("Ed25519SigVerify111111111111111111111111111");
  var ecdsaSign = (msgHash, privKey) => {
    const signature2 = secp256k1.sign(msgHash, privKey);
    return [signature2.toCompactRawBytes(), signature2.recovery];
  };
  secp256k1.utils.isValidPrivateKey;
  var publicKeyCreate = secp256k1.getPublicKey;
  var PRIVATE_KEY_BYTES = 32;
  var ETHEREUM_ADDRESS_BYTES = 20;
  var PUBLIC_KEY_BYTES = 64;
  var SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;
  var SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct([BufferLayout.u8("numSignatures"), BufferLayout.u16("signatureOffset"), BufferLayout.u8("signatureInstructionIndex"), BufferLayout.u16("ethAddressOffset"), BufferLayout.u8("ethAddressInstructionIndex"), BufferLayout.u16("messageDataOffset"), BufferLayout.u16("messageDataSize"), BufferLayout.u8("messageInstructionIndex"), BufferLayout.blob(20, "ethAddress"), BufferLayout.blob(64, "signature"), BufferLayout.u8("recoveryId")]);
  var Secp256k1Program = class _Secp256k1Program {
    /**
     * @internal
     */
    constructor() {
    }
    /**
     * Public key that identifies the secp256k1 program
     */
    /**
     * Construct an Ethereum address from a secp256k1 public key buffer.
     * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer
     */
    static publicKeyToEthAddress(publicKey3) {
      assert9(publicKey3.length === PUBLIC_KEY_BYTES, `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey3.length} bytes`);
      try {
        return import_buffer4.Buffer.from(keccak_256(toBuffer(publicKey3))).slice(-ETHEREUM_ADDRESS_BYTES);
      } catch (error51) {
        throw new Error(`Error constructing Ethereum address: ${error51}`);
      }
    }
    /**
     * Create an secp256k1 instruction with a public key. The public key
     * must be a buffer that is 64 bytes long.
     */
    static createInstructionWithPublicKey(params) {
      const {
        publicKey: publicKey3,
        message,
        signature: signature2,
        recoveryId,
        instructionIndex
      } = params;
      return _Secp256k1Program.createInstructionWithEthAddress({
        ethAddress: _Secp256k1Program.publicKeyToEthAddress(publicKey3),
        message,
        signature: signature2,
        recoveryId,
        instructionIndex
      });
    }
    /**
     * Create an secp256k1 instruction with an Ethereum address. The address
     * must be a hex string or a buffer that is 20 bytes long.
     */
    static createInstructionWithEthAddress(params) {
      const {
        ethAddress: rawAddress,
        message,
        signature: signature2,
        recoveryId,
        instructionIndex = 0
      } = params;
      let ethAddress2;
      if (typeof rawAddress === "string") {
        if (rawAddress.startsWith("0x")) {
          ethAddress2 = import_buffer4.Buffer.from(rawAddress.substr(2), "hex");
        } else {
          ethAddress2 = import_buffer4.Buffer.from(rawAddress, "hex");
        }
      } else {
        ethAddress2 = rawAddress;
      }
      assert9(ethAddress2.length === ETHEREUM_ADDRESS_BYTES, `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress2.length} bytes`);
      const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;
      const ethAddressOffset = dataStart;
      const signatureOffset = dataStart + ethAddress2.length;
      const messageDataOffset = signatureOffset + signature2.length + 1;
      const numSignatures = 1;
      const instructionData = import_buffer4.Buffer.alloc(SECP256K1_INSTRUCTION_LAYOUT.span + message.length);
      SECP256K1_INSTRUCTION_LAYOUT.encode({
        numSignatures,
        signatureOffset,
        signatureInstructionIndex: instructionIndex,
        ethAddressOffset,
        ethAddressInstructionIndex: instructionIndex,
        messageDataOffset,
        messageDataSize: message.length,
        messageInstructionIndex: instructionIndex,
        signature: toBuffer(signature2),
        ethAddress: toBuffer(ethAddress2),
        recoveryId
      }, instructionData);
      instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);
      return new TransactionInstruction({
        keys: [],
        programId: _Secp256k1Program.programId,
        data: instructionData
      });
    }
    /**
     * Create an secp256k1 instruction with a private key. The private key
     * must be a buffer that is 32 bytes long.
     */
    static createInstructionWithPrivateKey(params) {
      const {
        privateKey: pkey,
        message,
        instructionIndex
      } = params;
      assert9(pkey.length === PRIVATE_KEY_BYTES, `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`);
      try {
        const privateKey = toBuffer(pkey);
        const publicKey3 = publicKeyCreate(
          privateKey,
          false
          /* isCompressed */
        ).slice(1);
        const messageHash = import_buffer4.Buffer.from(keccak_256(toBuffer(message)));
        const [signature2, recoveryId] = ecdsaSign(messageHash, privateKey);
        return this.createInstructionWithPublicKey({
          publicKey: publicKey3,
          message,
          signature: signature2,
          recoveryId,
          instructionIndex
        });
      } catch (error51) {
        throw new Error(`Error creating instruction; ${error51}`);
      }
    }
  };
  Secp256k1Program.programId = new PublicKey("KeccakSecp256k11111111111111111111111111111");
  var _Lockup;
  var STAKE_CONFIG_ID = new PublicKey("StakeConfig11111111111111111111111111111111");
  var Lockup = class {
    /**
     * Create a new Lockup object
     */
    constructor(unixTimestamp, epoch, custodian) {
      this.unixTimestamp = void 0;
      this.epoch = void 0;
      this.custodian = void 0;
      this.unixTimestamp = unixTimestamp;
      this.epoch = epoch;
      this.custodian = custodian;
    }
    /**
     * Default, inactive Lockup value
     */
  };
  _Lockup = Lockup;
  Lockup.default = new _Lockup(0, 0, PublicKey.default);
  var STAKE_INSTRUCTION_LAYOUTS = Object.freeze({
    Initialize: {
      index: 0,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), authorized(), lockup()])
    },
    Authorize: {
      index: 1,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), publicKey("newAuthorized"), BufferLayout.u32("stakeAuthorizationType")])
    },
    Delegate: {
      index: 2,
      layout: BufferLayout.struct([BufferLayout.u32("instruction")])
    },
    Split: {
      index: 3,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), BufferLayout.ns64("lamports")])
    },
    Withdraw: {
      index: 4,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), BufferLayout.ns64("lamports")])
    },
    Deactivate: {
      index: 5,
      layout: BufferLayout.struct([BufferLayout.u32("instruction")])
    },
    Merge: {
      index: 7,
      layout: BufferLayout.struct([BufferLayout.u32("instruction")])
    },
    AuthorizeWithSeed: {
      index: 8,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), publicKey("newAuthorized"), BufferLayout.u32("stakeAuthorizationType"), rustString("authoritySeed"), publicKey("authorityOwner")])
    }
  });
  var StakeAuthorizationLayout = Object.freeze({
    Staker: {
      index: 0
    },
    Withdrawer: {
      index: 1
    }
  });
  var StakeProgram = class {
    /**
     * @internal
     */
    constructor() {
    }
    /**
     * Public key that identifies the Stake program
     */
    /**
     * Generate an Initialize instruction to add to a Stake Create transaction
     */
    static initialize(params) {
      const {
        stakePubkey,
        authorized: authorized2,
        lockup: maybeLockup
      } = params;
      const lockup2 = maybeLockup || Lockup.default;
      const type2 = STAKE_INSTRUCTION_LAYOUTS.Initialize;
      const data = encodeData3(type2, {
        authorized: {
          staker: toBuffer(authorized2.staker.toBuffer()),
          withdrawer: toBuffer(authorized2.withdrawer.toBuffer())
        },
        lockup: {
          unixTimestamp: lockup2.unixTimestamp,
          epoch: lockup2.epoch,
          custodian: toBuffer(lockup2.custodian.toBuffer())
        }
      });
      const instructionData = {
        keys: [{
          pubkey: stakePubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: SYSVAR_RENT_PUBKEY,
          isSigner: false,
          isWritable: false
        }],
        programId: this.programId,
        data
      };
      return new TransactionInstruction(instructionData);
    }
    /**
     * Generate a Transaction that creates a new Stake account at
     *   an address generated with `from`, a seed, and the Stake programId
     */
    static createAccountWithSeed(params) {
      const transaction = new Transaction();
      transaction.add(SystemProgram.createAccountWithSeed({
        fromPubkey: params.fromPubkey,
        newAccountPubkey: params.stakePubkey,
        basePubkey: params.basePubkey,
        seed: params.seed,
        lamports: params.lamports,
        space: this.space,
        programId: this.programId
      }));
      const {
        stakePubkey,
        authorized: authorized2,
        lockup: lockup2
      } = params;
      return transaction.add(this.initialize({
        stakePubkey,
        authorized: authorized2,
        lockup: lockup2
      }));
    }
    /**
     * Generate a Transaction that creates a new Stake account
     */
    static createAccount(params) {
      const transaction = new Transaction();
      transaction.add(SystemProgram.createAccount({
        fromPubkey: params.fromPubkey,
        newAccountPubkey: params.stakePubkey,
        lamports: params.lamports,
        space: this.space,
        programId: this.programId
      }));
      const {
        stakePubkey,
        authorized: authorized2,
        lockup: lockup2
      } = params;
      return transaction.add(this.initialize({
        stakePubkey,
        authorized: authorized2,
        lockup: lockup2
      }));
    }
    /**
     * Generate a Transaction that delegates Stake tokens to a validator
     * Vote PublicKey. This transaction can also be used to redelegate Stake
     * to a new validator Vote PublicKey.
     */
    static delegate(params) {
      const {
        stakePubkey,
        authorizedPubkey,
        votePubkey
      } = params;
      const type2 = STAKE_INSTRUCTION_LAYOUTS.Delegate;
      const data = encodeData3(type2);
      return new Transaction().add({
        keys: [{
          pubkey: stakePubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: votePubkey,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: SYSVAR_CLOCK_PUBKEY,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: STAKE_CONFIG_ID,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: authorizedPubkey,
          isSigner: true,
          isWritable: false
        }],
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a Transaction that authorizes a new PublicKey as Staker
     * or Withdrawer on the Stake account.
     */
    static authorize(params) {
      const {
        stakePubkey,
        authorizedPubkey,
        newAuthorizedPubkey,
        stakeAuthorizationType,
        custodianPubkey
      } = params;
      const type2 = STAKE_INSTRUCTION_LAYOUTS.Authorize;
      const data = encodeData3(type2, {
        newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),
        stakeAuthorizationType: stakeAuthorizationType.index
      });
      const keys2 = [{
        pubkey: stakePubkey,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: SYSVAR_CLOCK_PUBKEY,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: authorizedPubkey,
        isSigner: true,
        isWritable: false
      }];
      if (custodianPubkey) {
        keys2.push({
          pubkey: custodianPubkey,
          isSigner: true,
          isWritable: false
        });
      }
      return new Transaction().add({
        keys: keys2,
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a Transaction that authorizes a new PublicKey as Staker
     * or Withdrawer on the Stake account.
     */
    static authorizeWithSeed(params) {
      const {
        stakePubkey,
        authorityBase,
        authoritySeed,
        authorityOwner,
        newAuthorizedPubkey,
        stakeAuthorizationType,
        custodianPubkey
      } = params;
      const type2 = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;
      const data = encodeData3(type2, {
        newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),
        stakeAuthorizationType: stakeAuthorizationType.index,
        authoritySeed,
        authorityOwner: toBuffer(authorityOwner.toBuffer())
      });
      const keys2 = [{
        pubkey: stakePubkey,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: authorityBase,
        isSigner: true,
        isWritable: false
      }, {
        pubkey: SYSVAR_CLOCK_PUBKEY,
        isSigner: false,
        isWritable: false
      }];
      if (custodianPubkey) {
        keys2.push({
          pubkey: custodianPubkey,
          isSigner: true,
          isWritable: false
        });
      }
      return new Transaction().add({
        keys: keys2,
        programId: this.programId,
        data
      });
    }
    /**
     * @internal
     */
    static splitInstruction(params) {
      const {
        stakePubkey,
        authorizedPubkey,
        splitStakePubkey,
        lamports
      } = params;
      const type2 = STAKE_INSTRUCTION_LAYOUTS.Split;
      const data = encodeData3(type2, {
        lamports
      });
      return new TransactionInstruction({
        keys: [{
          pubkey: stakePubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: splitStakePubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: authorizedPubkey,
          isSigner: true,
          isWritable: false
        }],
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a Transaction that splits Stake tokens into another stake account
     */
    static split(params, rentExemptReserve) {
      const transaction = new Transaction();
      transaction.add(SystemProgram.createAccount({
        fromPubkey: params.authorizedPubkey,
        newAccountPubkey: params.splitStakePubkey,
        lamports: rentExemptReserve,
        space: this.space,
        programId: this.programId
      }));
      return transaction.add(this.splitInstruction(params));
    }
    /**
     * Generate a Transaction that splits Stake tokens into another account
     * derived from a base public key and seed
     */
    static splitWithSeed(params, rentExemptReserve) {
      const {
        stakePubkey,
        authorizedPubkey,
        splitStakePubkey,
        basePubkey,
        seed,
        lamports
      } = params;
      const transaction = new Transaction();
      transaction.add(SystemProgram.allocate({
        accountPubkey: splitStakePubkey,
        basePubkey,
        seed,
        space: this.space,
        programId: this.programId
      }));
      if (rentExemptReserve && rentExemptReserve > 0) {
        transaction.add(SystemProgram.transfer({
          fromPubkey: params.authorizedPubkey,
          toPubkey: splitStakePubkey,
          lamports: rentExemptReserve
        }));
      }
      return transaction.add(this.splitInstruction({
        stakePubkey,
        authorizedPubkey,
        splitStakePubkey,
        lamports
      }));
    }
    /**
     * Generate a Transaction that merges Stake accounts.
     */
    static merge(params) {
      const {
        stakePubkey,
        sourceStakePubKey,
        authorizedPubkey
      } = params;
      const type2 = STAKE_INSTRUCTION_LAYOUTS.Merge;
      const data = encodeData3(type2);
      return new Transaction().add({
        keys: [{
          pubkey: stakePubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: sourceStakePubKey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: SYSVAR_CLOCK_PUBKEY,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: authorizedPubkey,
          isSigner: true,
          isWritable: false
        }],
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a Transaction that withdraws deactivated Stake tokens.
     */
    static withdraw(params) {
      const {
        stakePubkey,
        authorizedPubkey,
        toPubkey,
        lamports,
        custodianPubkey
      } = params;
      const type2 = STAKE_INSTRUCTION_LAYOUTS.Withdraw;
      const data = encodeData3(type2, {
        lamports
      });
      const keys2 = [{
        pubkey: stakePubkey,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: toPubkey,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: SYSVAR_CLOCK_PUBKEY,
        isSigner: false,
        isWritable: false
      }, {
        pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,
        isSigner: false,
        isWritable: false
      }, {
        pubkey: authorizedPubkey,
        isSigner: true,
        isWritable: false
      }];
      if (custodianPubkey) {
        keys2.push({
          pubkey: custodianPubkey,
          isSigner: true,
          isWritable: false
        });
      }
      return new Transaction().add({
        keys: keys2,
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a Transaction that deactivates Stake tokens.
     */
    static deactivate(params) {
      const {
        stakePubkey,
        authorizedPubkey
      } = params;
      const type2 = STAKE_INSTRUCTION_LAYOUTS.Deactivate;
      const data = encodeData3(type2);
      return new Transaction().add({
        keys: [{
          pubkey: stakePubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: SYSVAR_CLOCK_PUBKEY,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: authorizedPubkey,
          isSigner: true,
          isWritable: false
        }],
        programId: this.programId,
        data
      });
    }
  };
  StakeProgram.programId = new PublicKey("Stake11111111111111111111111111111111111111");
  StakeProgram.space = 200;
  var VOTE_INSTRUCTION_LAYOUTS = Object.freeze({
    InitializeAccount: {
      index: 0,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), voteInit()])
    },
    Authorize: {
      index: 1,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), publicKey("newAuthorized"), BufferLayout.u32("voteAuthorizationType")])
    },
    Withdraw: {
      index: 3,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), BufferLayout.ns64("lamports")])
    },
    UpdateValidatorIdentity: {
      index: 4,
      layout: BufferLayout.struct([BufferLayout.u32("instruction")])
    },
    AuthorizeWithSeed: {
      index: 10,
      layout: BufferLayout.struct([BufferLayout.u32("instruction"), voteAuthorizeWithSeedArgs()])
    }
  });
  var VoteAuthorizationLayout = Object.freeze({
    Voter: {
      index: 0
    },
    Withdrawer: {
      index: 1
    }
  });
  var VoteProgram = class _VoteProgram {
    /**
     * @internal
     */
    constructor() {
    }
    /**
     * Public key that identifies the Vote program
     */
    /**
     * Generate an Initialize instruction.
     */
    static initializeAccount(params) {
      const {
        votePubkey,
        nodePubkey,
        voteInit: voteInit2
      } = params;
      const type2 = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;
      const data = encodeData3(type2, {
        voteInit: {
          nodePubkey: toBuffer(voteInit2.nodePubkey.toBuffer()),
          authorizedVoter: toBuffer(voteInit2.authorizedVoter.toBuffer()),
          authorizedWithdrawer: toBuffer(voteInit2.authorizedWithdrawer.toBuffer()),
          commission: voteInit2.commission
        }
      });
      const instructionData = {
        keys: [{
          pubkey: votePubkey,
          isSigner: false,
          isWritable: true
        }, {
          pubkey: SYSVAR_RENT_PUBKEY,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: SYSVAR_CLOCK_PUBKEY,
          isSigner: false,
          isWritable: false
        }, {
          pubkey: nodePubkey,
          isSigner: true,
          isWritable: false
        }],
        programId: this.programId,
        data
      };
      return new TransactionInstruction(instructionData);
    }
    /**
     * Generate a transaction that creates a new Vote account.
     */
    static createAccount(params) {
      const transaction = new Transaction();
      transaction.add(SystemProgram.createAccount({
        fromPubkey: params.fromPubkey,
        newAccountPubkey: params.votePubkey,
        lamports: params.lamports,
        space: this.space,
        programId: this.programId
      }));
      return transaction.add(this.initializeAccount({
        votePubkey: params.votePubkey,
        nodePubkey: params.voteInit.nodePubkey,
        voteInit: params.voteInit
      }));
    }
    /**
     * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.
     */
    static authorize(params) {
      const {
        votePubkey,
        authorizedPubkey,
        newAuthorizedPubkey,
        voteAuthorizationType
      } = params;
      const type2 = VOTE_INSTRUCTION_LAYOUTS.Authorize;
      const data = encodeData3(type2, {
        newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),
        voteAuthorizationType: voteAuthorizationType.index
      });
      const keys2 = [{
        pubkey: votePubkey,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: SYSVAR_CLOCK_PUBKEY,
        isSigner: false,
        isWritable: false
      }, {
        pubkey: authorizedPubkey,
        isSigner: true,
        isWritable: false
      }];
      return new Transaction().add({
        keys: keys2,
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account
     * where the current Voter or Withdrawer authority is a derived key.
     */
    static authorizeWithSeed(params) {
      const {
        currentAuthorityDerivedKeyBasePubkey,
        currentAuthorityDerivedKeyOwnerPubkey,
        currentAuthorityDerivedKeySeed,
        newAuthorizedPubkey,
        voteAuthorizationType,
        votePubkey
      } = params;
      const type2 = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;
      const data = encodeData3(type2, {
        voteAuthorizeWithSeedArgs: {
          currentAuthorityDerivedKeyOwnerPubkey: toBuffer(currentAuthorityDerivedKeyOwnerPubkey.toBuffer()),
          currentAuthorityDerivedKeySeed,
          newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),
          voteAuthorizationType: voteAuthorizationType.index
        }
      });
      const keys2 = [{
        pubkey: votePubkey,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: SYSVAR_CLOCK_PUBKEY,
        isSigner: false,
        isWritable: false
      }, {
        pubkey: currentAuthorityDerivedKeyBasePubkey,
        isSigner: true,
        isWritable: false
      }];
      return new Transaction().add({
        keys: keys2,
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a transaction to withdraw from a Vote account.
     */
    static withdraw(params) {
      const {
        votePubkey,
        authorizedWithdrawerPubkey,
        lamports,
        toPubkey
      } = params;
      const type2 = VOTE_INSTRUCTION_LAYOUTS.Withdraw;
      const data = encodeData3(type2, {
        lamports
      });
      const keys2 = [{
        pubkey: votePubkey,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: toPubkey,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: authorizedWithdrawerPubkey,
        isSigner: true,
        isWritable: false
      }];
      return new Transaction().add({
        keys: keys2,
        programId: this.programId,
        data
      });
    }
    /**
     * Generate a transaction to withdraw safely from a Vote account.
     *
     * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`
     * checks that the withdraw amount will not exceed the specified balance while leaving enough left
     * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the
     * `withdraw` method directly.
     */
    static safeWithdraw(params, currentVoteAccountBalance, rentExemptMinimum) {
      if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {
        throw new Error("Withdraw will leave vote account with insufficient funds.");
      }
      return _VoteProgram.withdraw(params);
    }
    /**
     * Generate a transaction to update the validator identity (node pubkey) of a Vote account.
     */
    static updateValidatorIdentity(params) {
      const {
        votePubkey,
        authorizedWithdrawerPubkey,
        nodePubkey
      } = params;
      const type2 = VOTE_INSTRUCTION_LAYOUTS.UpdateValidatorIdentity;
      const data = encodeData3(type2);
      const keys2 = [{
        pubkey: votePubkey,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: nodePubkey,
        isSigner: true,
        isWritable: false
      }, {
        pubkey: authorizedWithdrawerPubkey,
        isSigner: true,
        isWritable: false
      }];
      return new Transaction().add({
        keys: keys2,
        programId: this.programId,
        data
      });
    }
  };
  VoteProgram.programId = new PublicKey("Vote111111111111111111111111111111111111111");
  VoteProgram.space = 3762;
  var VALIDATOR_INFO_KEY = new PublicKey("Va1idator1nfo111111111111111111111111111111");
  var InfoString = type({
    name: string(),
    website: optional(string()),
    details: optional(string()),
    iconUrl: optional(string()),
    keybaseUsername: optional(string())
  });
  var VOTE_PROGRAM_ID = new PublicKey("Vote111111111111111111111111111111111111111");
  var VoteAccountLayout = BufferLayout.struct([
    publicKey("nodePubkey"),
    publicKey("authorizedWithdrawer"),
    BufferLayout.u8("commission"),
    BufferLayout.nu64(),
    // votes.length
    BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64("slot"), BufferLayout.u32("confirmationCount")]), BufferLayout.offset(BufferLayout.u32(), -8), "votes"),
    BufferLayout.u8("rootSlotValid"),
    BufferLayout.nu64("rootSlot"),
    BufferLayout.nu64(),
    // authorizedVoters.length
    BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64("epoch"), publicKey("authorizedVoter")]), BufferLayout.offset(BufferLayout.u32(), -8), "authorizedVoters"),
    BufferLayout.struct([BufferLayout.seq(BufferLayout.struct([publicKey("authorizedPubkey"), BufferLayout.nu64("epochOfLastAuthorizedSwitch"), BufferLayout.nu64("targetEpoch")]), 32, "buf"), BufferLayout.nu64("idx"), BufferLayout.u8("isEmpty")], "priorVoters"),
    BufferLayout.nu64(),
    // epochCredits.length
    BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64("epoch"), BufferLayout.nu64("credits"), BufferLayout.nu64("prevCredits")]), BufferLayout.offset(BufferLayout.u32(), -8), "epochCredits"),
    BufferLayout.struct([BufferLayout.nu64("slot"), BufferLayout.nu64("timestamp")], "lastTimestamp")
  ]);
  var endpoint = {
    http: {
      devnet: "http://api.devnet.solana.com",
      testnet: "http://api.testnet.solana.com",
      "mainnet-beta": "http://api.mainnet-beta.solana.com/"
    },
    https: {
      devnet: "https://api.devnet.solana.com",
      testnet: "https://api.testnet.solana.com",
      "mainnet-beta": "https://api.mainnet-beta.solana.com/"
    }
  };
  function clusterApiUrl(cluster, tls) {
    const key2 = tls === false ? "http" : "https";
    if (!cluster) {
      return endpoint[key2]["devnet"];
    }
    const url2 = endpoint[key2][cluster];
    if (!url2) {
      throw new Error(`Unknown ${key2} cluster: ${cluster}`);
    }
    return url2;
  }
  var LAMPORTS_PER_SOL = 1e9;

  // ../../packages/wallet-core/src/solana/derive.ts
  var import_tweetnacl = __toESM(require_nacl_fast(), 1);
  var SOLANA_DERIVATION_PATH = "m/44'/501'/0'/0'";
  function deriveSolanaKeypairFromMnemonic(input) {
    const mnemonic = normalizeWalletMnemonic(input.mnemonic);
    if (!isImportableWalletMnemonic(mnemonic)) {
      throw new Error("invalid_mnemonic");
    }
    const seed = bip39.mnemonicToSeedSync(mnemonic);
    const derivationPath = input.derivationPath ?? SOLANA_DERIVATION_PATH;
    const derivedSeed = derivePath(derivationPath, bytesToHex5(seed)).key;
    const secretKey = import_tweetnacl.default.sign.keyPair.fromSeed(derivedSeed).secretKey;
    return Keypair.fromSecretKey(secretKey);
  }
  function deriveSolanaAccountFromMnemonic(input) {
    const derivationPath = input.derivationPath ?? SOLANA_DERIVATION_PATH;
    const keypair = deriveSolanaKeypairFromMnemonic({
      mnemonic: input.mnemonic,
      derivationPath
    });
    return {
      publicAddress: keypair.publicKey.toBase58(),
      derivationPath
    };
  }
  function getSolanaAddressFromMnemonic(mnemonic) {
    return deriveSolanaAccountFromMnemonic({ mnemonic }).publicAddress;
  }
  function bytesToHex5(bytes) {
    return Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
  }

  // ../../packages/wallet-core/src/solana/balance.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/solana/client.ts
  init_node_compat_inject();
  var DEFAULT_SOLANA_RPC_TIMEOUT_MS = 8e3;
  var DEFAULT_SOLANA_RPC_URLS = [
    "https://api.mainnet-beta.solana.com",
    "https://solana-rpc.publicnode.com"
  ];
  function createSolanaConnection(rpcUrl, input) {
    const timeoutMs = input?.timeoutMs ?? DEFAULT_SOLANA_RPC_TIMEOUT_MS;
    return new Connection(rpcUrl || clusterApiUrl("mainnet-beta"), {
      commitment: "confirmed",
      fetch: createTimeoutFetch(timeoutMs)
    });
  }
  function createSolanaConnections(rpcUrl, input) {
    const urls = Array.from(
      new Set([
        rpcUrl,
        ...DEFAULT_SOLANA_RPC_URLS,
        clusterApiUrl("mainnet-beta")
      ].filter((value) => Boolean(value)))
    );
    return urls.map((url2) => createSolanaConnection(url2, input));
  }
  function toSolanaPublicKey(address) {
    return new PublicKey(address);
  }
  function validateSolanaAddress(address) {
    try {
      new PublicKey(address.trim());
      return true;
    } catch {
      return false;
    }
  }
  function formatSolanaRpcError(error51) {
    const message = error51 instanceof Error ? error51.message : String(error51);
    if (/403|access forbidden|forbidden/iu.test(message)) {
      return "Solana RPC access is temporarily blocked by the selected provider. Acorus tried public fallback RPCs; try again later or set another Solana RPC.";
    }
    if (/abort|timeout|timed out/iu.test(message)) {
      return "Solana RPC timed out. Try again or switch to another Solana RPC.";
    }
    return message || "Solana RPC is unavailable.";
  }
  function createTimeoutFetch(timeoutMs) {
    return async (input, init2) => {
      const controller = new AbortController();
      const timeout = setTimeout(() => controller.abort(), timeoutMs);
      try {
        return await fetch(input, {
          ...init2,
          signal: init2?.signal ?? controller.signal
        });
      } finally {
        clearTimeout(timeout);
      }
    };
  }

  // ../../packages/wallet-core/src/solana/balance.ts
  async function getSolanaNativeBalance(input) {
    const publicKey3 = toSolanaPublicKey(input.address);
    let lastError = null;
    for (const connection of createSolanaConnections(input.rpcUrl)) {
      try {
        const lamports = await connection.getBalance(publicKey3, "confirmed");
        return {
          lamports: lamports.toString(),
          sol: (lamports / LAMPORTS_PER_SOL).toString()
        };
      } catch (error51) {
        lastError = error51;
      }
    }
    throw new Error(formatSolanaRpcError(lastError));
  }

  // ../../packages/wallet-core/src/solana/tokens.ts
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@solana+spl-token@0.4.14_@s_3ed350ec948d2f6646f78e07a6ecb7d2/node_modules/@solana/spl-token/lib/esm/constants.js
  init_node_compat_inject();
  var TOKEN_PROGRAM_ID = new PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
  var TOKEN_2022_PROGRAM_ID = new PublicKey("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
  var ASSOCIATED_TOKEN_PROGRAM_ID = new PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
  var NATIVE_MINT = new PublicKey("So11111111111111111111111111111111111111112");
  var NATIVE_MINT_2022 = new PublicKey("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");

  // ../../node_modules/.pnpm/@solana+buffer-layout-utils_098ecfce72ab97955b9cd2dcb1f6233d/node_modules/@solana/buffer-layout-utils/lib/esm/index.mjs
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@solana+buffer-layout-utils_098ecfce72ab97955b9cd2dcb1f6233d/node_modules/@solana/buffer-layout-utils/lib/esm/base.mjs
  init_node_compat_inject();
  var encodeDecode = (layout) => {
    const decode9 = layout.decode.bind(layout);
    const encode11 = layout.encode.bind(layout);
    return { decode: decode9, encode: encode11 };
  };

  // ../../node_modules/.pnpm/@solana+buffer-layout-utils_098ecfce72ab97955b9cd2dcb1f6233d/node_modules/@solana/buffer-layout-utils/lib/esm/bigint.mjs
  init_node_compat_inject();
  var import_buffer_layout2 = __toESM(require_Layout(), 1);
  var import_bigint_buffer = __toESM(require_browser2(), 1);
  var bigInt = (length2) => (property) => {
    const layout = (0, import_buffer_layout2.blob)(length2, property);
    const { encode: encode11, decode: decode9 } = encodeDecode(layout);
    const bigIntLayout = layout;
    bigIntLayout.decode = (buffer2, offset2) => {
      const src2 = decode9(buffer2, offset2);
      return (0, import_bigint_buffer.toBigIntLE)(Buffer2.from(src2));
    };
    bigIntLayout.encode = (bigInt2, buffer2, offset2) => {
      const src2 = (0, import_bigint_buffer.toBufferLE)(bigInt2, length2);
      return encode11(src2, buffer2, offset2);
    };
    return bigIntLayout;
  };
  var bigIntBE = (length2) => (property) => {
    const layout = (0, import_buffer_layout2.blob)(length2, property);
    const { encode: encode11, decode: decode9 } = encodeDecode(layout);
    const bigIntLayout = layout;
    bigIntLayout.decode = (buffer2, offset2) => {
      const src2 = decode9(buffer2, offset2);
      return (0, import_bigint_buffer.toBigIntBE)(Buffer2.from(src2));
    };
    bigIntLayout.encode = (bigInt2, buffer2, offset2) => {
      const src2 = (0, import_bigint_buffer.toBufferBE)(bigInt2, length2);
      return encode11(src2, buffer2, offset2);
    };
    return bigIntLayout;
  };
  var u642 = bigInt(8);
  var u64be = bigIntBE(8);
  var u128 = bigInt(16);
  var u128be = bigIntBE(16);
  var u192 = bigInt(24);
  var u192be = bigIntBE(24);
  var u256 = bigInt(32);
  var u256be = bigIntBE(32);

  // ../../node_modules/.pnpm/@solana+buffer-layout-utils_098ecfce72ab97955b9cd2dcb1f6233d/node_modules/@solana/buffer-layout-utils/lib/esm/decimal.mjs
  init_node_compat_inject();

  // ../../node_modules/.pnpm/bignumber.js@9.3.1/node_modules/bignumber.js/bignumber.mjs
  init_node_compat_inject();
  var isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i;
  var mathceil = Math.ceil;
  var mathfloor = Math.floor;
  var bignumberError = "[BigNumber Error] ";
  var tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ";
  var BASE = 1e14;
  var LOG_BASE = 14;
  var MAX_SAFE_INTEGER = 9007199254740991;
  var POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13];
  var SQRT_BASE = 1e7;
  var MAX = 1e9;
  function clone(configObject) {
    var div, convertBase, parseNumeric, P8 = BigNumber3.prototype = { constructor: BigNumber3, toString: null, valueOf: null }, ONE = new BigNumber3(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -1e7, MAX_EXP = 1e7, CRYPTO = false, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT = {
      prefix: "",
      groupSize: 3,
      secondaryGroupSize: 0,
      groupSeparator: ",",
      decimalSeparator: ".",
      fractionGroupSize: 0,
      fractionGroupSeparator: "\xA0",
      // non-breaking space
      suffix: ""
    }, ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz", alphabetHasNormalDecimalDigits = true;
    function BigNumber3(v13, b9) {
      var alphabet3, c7, caseChanged, e2, i5, isNum, len, str, x13 = this;
      if (!(x13 instanceof BigNumber3)) return new BigNumber3(v13, b9);
      if (b9 == null) {
        if (v13 && v13._isBigNumber === true) {
          x13.s = v13.s;
          if (!v13.c || v13.e > MAX_EXP) {
            x13.c = x13.e = null;
          } else if (v13.e < MIN_EXP) {
            x13.c = [x13.e = 0];
          } else {
            x13.e = v13.e;
            x13.c = v13.c.slice();
          }
          return;
        }
        if ((isNum = typeof v13 == "number") && v13 * 0 == 0) {
          x13.s = 1 / v13 < 0 ? (v13 = -v13, -1) : 1;
          if (v13 === ~~v13) {
            for (e2 = 0, i5 = v13; i5 >= 10; i5 /= 10, e2++) ;
            if (e2 > MAX_EXP) {
              x13.c = x13.e = null;
            } else {
              x13.e = e2;
              x13.c = [v13];
            }
            return;
          }
          str = String(v13);
        } else {
          if (!isNumeric.test(str = String(v13))) return parseNumeric(x13, str, isNum);
          x13.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;
        }
        if ((e2 = str.indexOf(".")) > -1) str = str.replace(".", "");
        if ((i5 = str.search(/e/i)) > 0) {
          if (e2 < 0) e2 = i5;
          e2 += +str.slice(i5 + 1);
          str = str.substring(0, i5);
        } else if (e2 < 0) {
          e2 = str.length;
        }
      } else {
        intCheck(b9, 2, ALPHABET.length, "Base");
        if (b9 == 10 && alphabetHasNormalDecimalDigits) {
          x13 = new BigNumber3(v13);
          return round(x13, DECIMAL_PLACES + x13.e + 1, ROUNDING_MODE);
        }
        str = String(v13);
        if (isNum = typeof v13 == "number") {
          if (v13 * 0 != 0) return parseNumeric(x13, str, isNum, b9);
          x13.s = 1 / v13 < 0 ? (str = str.slice(1), -1) : 1;
          if (BigNumber3.DEBUG && str.replace(/^0\.0*|\./, "").length > 15) {
            throw Error(tooManyDigits + v13);
          }
        } else {
          x13.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
        }
        alphabet3 = ALPHABET.slice(0, b9);
        e2 = i5 = 0;
        for (len = str.length; i5 < len; i5++) {
          if (alphabet3.indexOf(c7 = str.charAt(i5)) < 0) {
            if (c7 == ".") {
              if (i5 > e2) {
                e2 = len;
                continue;
              }
            } else if (!caseChanged) {
              if (str == str.toUpperCase() && (str = str.toLowerCase()) || str == str.toLowerCase() && (str = str.toUpperCase())) {
                caseChanged = true;
                i5 = -1;
                e2 = 0;
                continue;
              }
            }
            return parseNumeric(x13, String(v13), isNum, b9);
          }
        }
        isNum = false;
        str = convertBase(str, b9, 10, x13.s);
        if ((e2 = str.indexOf(".")) > -1) str = str.replace(".", "");
        else e2 = str.length;
      }
      for (i5 = 0; str.charCodeAt(i5) === 48; i5++) ;
      for (len = str.length; str.charCodeAt(--len) === 48; ) ;
      if (str = str.slice(i5, ++len)) {
        len -= i5;
        if (isNum && BigNumber3.DEBUG && len > 15 && (v13 > MAX_SAFE_INTEGER || v13 !== mathfloor(v13))) {
          throw Error(tooManyDigits + x13.s * v13);
        }
        if ((e2 = e2 - i5 - 1) > MAX_EXP) {
          x13.c = x13.e = null;
        } else if (e2 < MIN_EXP) {
          x13.c = [x13.e = 0];
        } else {
          x13.e = e2;
          x13.c = [];
          i5 = (e2 + 1) % LOG_BASE;
          if (e2 < 0) i5 += LOG_BASE;
          if (i5 < len) {
            if (i5) x13.c.push(+str.slice(0, i5));
            for (len -= LOG_BASE; i5 < len; ) {
              x13.c.push(+str.slice(i5, i5 += LOG_BASE));
            }
            i5 = LOG_BASE - (str = str.slice(i5)).length;
          } else {
            i5 -= len;
          }
          for (; i5--; str += "0") ;
          x13.c.push(+str);
        }
      } else {
        x13.c = [x13.e = 0];
      }
    }
    BigNumber3.clone = clone;
    BigNumber3.ROUND_UP = 0;
    BigNumber3.ROUND_DOWN = 1;
    BigNumber3.ROUND_CEIL = 2;
    BigNumber3.ROUND_FLOOR = 3;
    BigNumber3.ROUND_HALF_UP = 4;
    BigNumber3.ROUND_HALF_DOWN = 5;
    BigNumber3.ROUND_HALF_EVEN = 6;
    BigNumber3.ROUND_HALF_CEIL = 7;
    BigNumber3.ROUND_HALF_FLOOR = 8;
    BigNumber3.EUCLID = 9;
    BigNumber3.config = BigNumber3.set = function(obj) {
      var p7, v13;
      if (obj != null) {
        if (typeof obj == "object") {
          if (obj.hasOwnProperty(p7 = "DECIMAL_PLACES")) {
            v13 = obj[p7];
            intCheck(v13, 0, MAX, p7);
            DECIMAL_PLACES = v13;
          }
          if (obj.hasOwnProperty(p7 = "ROUNDING_MODE")) {
            v13 = obj[p7];
            intCheck(v13, 0, 8, p7);
            ROUNDING_MODE = v13;
          }
          if (obj.hasOwnProperty(p7 = "EXPONENTIAL_AT")) {
            v13 = obj[p7];
            if (v13 && v13.pop) {
              intCheck(v13[0], -MAX, 0, p7);
              intCheck(v13[1], 0, MAX, p7);
              TO_EXP_NEG = v13[0];
              TO_EXP_POS = v13[1];
            } else {
              intCheck(v13, -MAX, MAX, p7);
              TO_EXP_NEG = -(TO_EXP_POS = v13 < 0 ? -v13 : v13);
            }
          }
          if (obj.hasOwnProperty(p7 = "RANGE")) {
            v13 = obj[p7];
            if (v13 && v13.pop) {
              intCheck(v13[0], -MAX, -1, p7);
              intCheck(v13[1], 1, MAX, p7);
              MIN_EXP = v13[0];
              MAX_EXP = v13[1];
            } else {
              intCheck(v13, -MAX, MAX, p7);
              if (v13) {
                MIN_EXP = -(MAX_EXP = v13 < 0 ? -v13 : v13);
              } else {
                throw Error(bignumberError + p7 + " cannot be zero: " + v13);
              }
            }
          }
          if (obj.hasOwnProperty(p7 = "CRYPTO")) {
            v13 = obj[p7];
            if (v13 === !!v13) {
              if (v13) {
                if (typeof crypto != "undefined" && crypto && (crypto.getRandomValues || crypto.randomBytes)) {
                  CRYPTO = v13;
                } else {
                  CRYPTO = !v13;
                  throw Error(bignumberError + "crypto unavailable");
                }
              } else {
                CRYPTO = v13;
              }
            } else {
              throw Error(bignumberError + p7 + " not true or false: " + v13);
            }
          }
          if (obj.hasOwnProperty(p7 = "MODULO_MODE")) {
            v13 = obj[p7];
            intCheck(v13, 0, 9, p7);
            MODULO_MODE = v13;
          }
          if (obj.hasOwnProperty(p7 = "POW_PRECISION")) {
            v13 = obj[p7];
            intCheck(v13, 0, MAX, p7);
            POW_PRECISION = v13;
          }
          if (obj.hasOwnProperty(p7 = "FORMAT")) {
            v13 = obj[p7];
            if (typeof v13 == "object") FORMAT = v13;
            else throw Error(bignumberError + p7 + " not an object: " + v13);
          }
          if (obj.hasOwnProperty(p7 = "ALPHABET")) {
            v13 = obj[p7];
            if (typeof v13 == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(v13)) {
              alphabetHasNormalDecimalDigits = v13.slice(0, 10) == "0123456789";
              ALPHABET = v13;
            } else {
              throw Error(bignumberError + p7 + " invalid: " + v13);
            }
          }
        } else {
          throw Error(bignumberError + "Object expected: " + obj);
        }
      }
      return {
        DECIMAL_PLACES,
        ROUNDING_MODE,
        EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],
        RANGE: [MIN_EXP, MAX_EXP],
        CRYPTO,
        MODULO_MODE,
        POW_PRECISION,
        FORMAT,
        ALPHABET
      };
    };
    BigNumber3.isBigNumber = function(v13) {
      if (!v13 || v13._isBigNumber !== true) return false;
      if (!BigNumber3.DEBUG) return true;
      var i5, n6, c7 = v13.c, e2 = v13.e, s3 = v13.s;
      out: if ({}.toString.call(c7) == "[object Array]") {
        if ((s3 === 1 || s3 === -1) && e2 >= -MAX && e2 <= MAX && e2 === mathfloor(e2)) {
          if (c7[0] === 0) {
            if (e2 === 0 && c7.length === 1) return true;
            break out;
          }
          i5 = (e2 + 1) % LOG_BASE;
          if (i5 < 1) i5 += LOG_BASE;
          if (String(c7[0]).length == i5) {
            for (i5 = 0; i5 < c7.length; i5++) {
              n6 = c7[i5];
              if (n6 < 0 || n6 >= BASE || n6 !== mathfloor(n6)) break out;
            }
            if (n6 !== 0) return true;
          }
        }
      } else if (c7 === null && e2 === null && (s3 === null || s3 === 1 || s3 === -1)) {
        return true;
      }
      throw Error(bignumberError + "Invalid BigNumber: " + v13);
    };
    BigNumber3.maximum = BigNumber3.max = function() {
      return maxOrMin(arguments, -1);
    };
    BigNumber3.minimum = BigNumber3.min = function() {
      return maxOrMin(arguments, 1);
    };
    BigNumber3.random = (function() {
      var pow2_53 = 9007199254740992;
      var random53bitInt = Math.random() * pow2_53 & 2097151 ? function() {
        return mathfloor(Math.random() * pow2_53);
      } : function() {
        return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
      };
      return function(dp) {
        var a5, b9, e2, k7, v13, i5 = 0, c7 = [], rand2 = new BigNumber3(ONE);
        if (dp == null) dp = DECIMAL_PLACES;
        else intCheck(dp, 0, MAX);
        k7 = mathceil(dp / LOG_BASE);
        if (CRYPTO) {
          if (crypto.getRandomValues) {
            a5 = crypto.getRandomValues(new Uint32Array(k7 *= 2));
            for (; i5 < k7; ) {
              v13 = a5[i5] * 131072 + (a5[i5 + 1] >>> 11);
              if (v13 >= 9e15) {
                b9 = crypto.getRandomValues(new Uint32Array(2));
                a5[i5] = b9[0];
                a5[i5 + 1] = b9[1];
              } else {
                c7.push(v13 % 1e14);
                i5 += 2;
              }
            }
            i5 = k7 / 2;
          } else if (crypto.randomBytes) {
            a5 = crypto.randomBytes(k7 *= 7);
            for (; i5 < k7; ) {
              v13 = (a5[i5] & 31) * 281474976710656 + a5[i5 + 1] * 1099511627776 + a5[i5 + 2] * 4294967296 + a5[i5 + 3] * 16777216 + (a5[i5 + 4] << 16) + (a5[i5 + 5] << 8) + a5[i5 + 6];
              if (v13 >= 9e15) {
                crypto.randomBytes(7).copy(a5, i5);
              } else {
                c7.push(v13 % 1e14);
                i5 += 7;
              }
            }
            i5 = k7 / 7;
          } else {
            CRYPTO = false;
            throw Error(bignumberError + "crypto unavailable");
          }
        }
        if (!CRYPTO) {
          for (; i5 < k7; ) {
            v13 = random53bitInt();
            if (v13 < 9e15) c7[i5++] = v13 % 1e14;
          }
        }
        k7 = c7[--i5];
        dp %= LOG_BASE;
        if (k7 && dp) {
          v13 = POWS_TEN[LOG_BASE - dp];
          c7[i5] = mathfloor(k7 / v13) * v13;
        }
        for (; c7[i5] === 0; c7.pop(), i5--) ;
        if (i5 < 0) {
          c7 = [e2 = 0];
        } else {
          for (e2 = -1; c7[0] === 0; c7.splice(0, 1), e2 -= LOG_BASE) ;
          for (i5 = 1, v13 = c7[0]; v13 >= 10; v13 /= 10, i5++) ;
          if (i5 < LOG_BASE) e2 -= LOG_BASE - i5;
        }
        rand2.e = e2;
        rand2.c = c7;
        return rand2;
      };
    })();
    BigNumber3.sum = function() {
      var i5 = 1, args = arguments, sum = new BigNumber3(args[0]);
      for (; i5 < args.length; ) sum = sum.plus(args[i5++]);
      return sum;
    };
    convertBase = /* @__PURE__ */ (function() {
      var decimal = "0123456789";
      function toBaseOut(str, baseIn, baseOut, alphabet3) {
        var j6, arr = [0], arrL, i5 = 0, len = str.length;
        for (; i5 < len; ) {
          for (arrL = arr.length; arrL--; arr[arrL] *= baseIn) ;
          arr[0] += alphabet3.indexOf(str.charAt(i5++));
          for (j6 = 0; j6 < arr.length; j6++) {
            if (arr[j6] > baseOut - 1) {
              if (arr[j6 + 1] == null) arr[j6 + 1] = 0;
              arr[j6 + 1] += arr[j6] / baseOut | 0;
              arr[j6] %= baseOut;
            }
          }
        }
        return arr.reverse();
      }
      return function(str, baseIn, baseOut, sign6, callerIsToString) {
        var alphabet3, d6, e2, k7, r3, x13, xc, y11, i5 = str.indexOf("."), dp = DECIMAL_PLACES, rm = ROUNDING_MODE;
        if (i5 >= 0) {
          k7 = POW_PRECISION;
          POW_PRECISION = 0;
          str = str.replace(".", "");
          y11 = new BigNumber3(baseIn);
          x13 = y11.pow(str.length - i5);
          POW_PRECISION = k7;
          y11.c = toBaseOut(
            toFixedPoint(coeffToString(x13.c), x13.e, "0"),
            10,
            baseOut,
            decimal
          );
          y11.e = y11.c.length;
        }
        xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (alphabet3 = ALPHABET, decimal) : (alphabet3 = decimal, ALPHABET));
        e2 = k7 = xc.length;
        for (; xc[--k7] == 0; xc.pop()) ;
        if (!xc[0]) return alphabet3.charAt(0);
        if (i5 < 0) {
          --e2;
        } else {
          x13.c = xc;
          x13.e = e2;
          x13.s = sign6;
          x13 = div(x13, y11, dp, rm, baseOut);
          xc = x13.c;
          r3 = x13.r;
          e2 = x13.e;
        }
        d6 = e2 + dp + 1;
        i5 = xc[d6];
        k7 = baseOut / 2;
        r3 = r3 || d6 < 0 || xc[d6 + 1] != null;
        r3 = rm < 4 ? (i5 != null || r3) && (rm == 0 || rm == (x13.s < 0 ? 3 : 2)) : i5 > k7 || i5 == k7 && (rm == 4 || r3 || rm == 6 && xc[d6 - 1] & 1 || rm == (x13.s < 0 ? 8 : 7));
        if (d6 < 1 || !xc[0]) {
          str = r3 ? toFixedPoint(alphabet3.charAt(1), -dp, alphabet3.charAt(0)) : alphabet3.charAt(0);
        } else {
          xc.length = d6;
          if (r3) {
            for (--baseOut; ++xc[--d6] > baseOut; ) {
              xc[d6] = 0;
              if (!d6) {
                ++e2;
                xc = [1].concat(xc);
              }
            }
          }
          for (k7 = xc.length; !xc[--k7]; ) ;
          for (i5 = 0, str = ""; i5 <= k7; str += alphabet3.charAt(xc[i5++])) ;
          str = toFixedPoint(str, e2, alphabet3.charAt(0));
        }
        return str;
      };
    })();
    div = /* @__PURE__ */ (function() {
      function multiply(x13, k7, base4) {
        var m3, temp, xlo, xhi, carry = 0, i5 = x13.length, klo = k7 % SQRT_BASE, khi = k7 / SQRT_BASE | 0;
        for (x13 = x13.slice(); i5--; ) {
          xlo = x13[i5] % SQRT_BASE;
          xhi = x13[i5] / SQRT_BASE | 0;
          m3 = khi * xlo + xhi * klo;
          temp = klo * xlo + m3 % SQRT_BASE * SQRT_BASE + carry;
          carry = (temp / base4 | 0) + (m3 / SQRT_BASE | 0) + khi * xhi;
          x13[i5] = temp % base4;
        }
        if (carry) x13 = [carry].concat(x13);
        return x13;
      }
      function compare4(a5, b9, aL, bL) {
        var i5, cmp;
        if (aL != bL) {
          cmp = aL > bL ? 1 : -1;
        } else {
          for (i5 = cmp = 0; i5 < aL; i5++) {
            if (a5[i5] != b9[i5]) {
              cmp = a5[i5] > b9[i5] ? 1 : -1;
              break;
            }
          }
        }
        return cmp;
      }
      function subtract(a5, b9, aL, base4) {
        var i5 = 0;
        for (; aL--; ) {
          a5[aL] -= i5;
          i5 = a5[aL] < b9[aL] ? 1 : 0;
          a5[aL] = i5 * base4 + a5[aL] - b9[aL];
        }
        for (; !a5[0] && a5.length > 1; a5.splice(0, 1)) ;
      }
      return function(x13, y11, dp, rm, base4) {
        var cmp, e2, i5, more, n6, prod, prodL, q7, qc, rem, remL, rem0, xi, xL, yc0, yL, yz, s3 = x13.s == y11.s ? 1 : -1, xc = x13.c, yc = y11.c;
        if (!xc || !xc[0] || !yc || !yc[0]) {
          return new BigNumber3(
            // Return NaN if either NaN, or both Infinity or 0.
            !x13.s || !y11.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : (
              // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
              xc && xc[0] == 0 || !yc ? s3 * 0 : s3 / 0
            )
          );
        }
        q7 = new BigNumber3(s3);
        qc = q7.c = [];
        e2 = x13.e - y11.e;
        s3 = dp + e2 + 1;
        if (!base4) {
          base4 = BASE;
          e2 = bitFloor(x13.e / LOG_BASE) - bitFloor(y11.e / LOG_BASE);
          s3 = s3 / LOG_BASE | 0;
        }
        for (i5 = 0; yc[i5] == (xc[i5] || 0); i5++) ;
        if (yc[i5] > (xc[i5] || 0)) e2--;
        if (s3 < 0) {
          qc.push(1);
          more = true;
        } else {
          xL = xc.length;
          yL = yc.length;
          i5 = 0;
          s3 += 2;
          n6 = mathfloor(base4 / (yc[0] + 1));
          if (n6 > 1) {
            yc = multiply(yc, n6, base4);
            xc = multiply(xc, n6, base4);
            yL = yc.length;
            xL = xc.length;
          }
          xi = yL;
          rem = xc.slice(0, yL);
          remL = rem.length;
          for (; remL < yL; rem[remL++] = 0) ;
          yz = yc.slice();
          yz = [0].concat(yz);
          yc0 = yc[0];
          if (yc[1] >= base4 / 2) yc0++;
          do {
            n6 = 0;
            cmp = compare4(yc, rem, yL, remL);
            if (cmp < 0) {
              rem0 = rem[0];
              if (yL != remL) rem0 = rem0 * base4 + (rem[1] || 0);
              n6 = mathfloor(rem0 / yc0);
              if (n6 > 1) {
                if (n6 >= base4) n6 = base4 - 1;
                prod = multiply(yc, n6, base4);
                prodL = prod.length;
                remL = rem.length;
                while (compare4(prod, rem, prodL, remL) == 1) {
                  n6--;
                  subtract(prod, yL < prodL ? yz : yc, prodL, base4);
                  prodL = prod.length;
                  cmp = 1;
                }
              } else {
                if (n6 == 0) {
                  cmp = n6 = 1;
                }
                prod = yc.slice();
                prodL = prod.length;
              }
              if (prodL < remL) prod = [0].concat(prod);
              subtract(rem, prod, remL, base4);
              remL = rem.length;
              if (cmp == -1) {
                while (compare4(yc, rem, yL, remL) < 1) {
                  n6++;
                  subtract(rem, yL < remL ? yz : yc, remL, base4);
                  remL = rem.length;
                }
              }
            } else if (cmp === 0) {
              n6++;
              rem = [0];
            }
            qc[i5++] = n6;
            if (rem[0]) {
              rem[remL++] = xc[xi] || 0;
            } else {
              rem = [xc[xi]];
              remL = 1;
            }
          } while ((xi++ < xL || rem[0] != null) && s3--);
          more = rem[0] != null;
          if (!qc[0]) qc.splice(0, 1);
        }
        if (base4 == BASE) {
          for (i5 = 1, s3 = qc[0]; s3 >= 10; s3 /= 10, i5++) ;
          round(q7, dp + (q7.e = i5 + e2 * LOG_BASE - 1) + 1, rm, more);
        } else {
          q7.e = e2;
          q7.r = +more;
        }
        return q7;
      };
    })();
    function format(n6, i5, rm, id) {
      var c0, e2, ne8, len, str;
      if (rm == null) rm = ROUNDING_MODE;
      else intCheck(rm, 0, 8);
      if (!n6.c) return n6.toString();
      c0 = n6.c[0];
      ne8 = n6.e;
      if (i5 == null) {
        str = coeffToString(n6.c);
        str = id == 1 || id == 2 && (ne8 <= TO_EXP_NEG || ne8 >= TO_EXP_POS) ? toExponential(str, ne8) : toFixedPoint(str, ne8, "0");
      } else {
        n6 = round(new BigNumber3(n6), i5, rm);
        e2 = n6.e;
        str = coeffToString(n6.c);
        len = str.length;
        if (id == 1 || id == 2 && (i5 <= e2 || e2 <= TO_EXP_NEG)) {
          for (; len < i5; str += "0", len++) ;
          str = toExponential(str, e2);
        } else {
          i5 -= ne8 + (id === 2 && e2 > ne8);
          str = toFixedPoint(str, e2, "0");
          if (e2 + 1 > len) {
            if (--i5 > 0) for (str += "."; i5--; str += "0") ;
          } else {
            i5 += e2 - len;
            if (i5 > 0) {
              if (e2 + 1 == len) str += ".";
              for (; i5--; str += "0") ;
            }
          }
        }
      }
      return n6.s < 0 && c0 ? "-" + str : str;
    }
    function maxOrMin(args, n6) {
      var k7, y11, i5 = 1, x13 = new BigNumber3(args[0]);
      for (; i5 < args.length; i5++) {
        y11 = new BigNumber3(args[i5]);
        if (!y11.s || (k7 = compare(x13, y11)) === n6 || k7 === 0 && x13.s === n6) {
          x13 = y11;
        }
      }
      return x13;
    }
    function normalise(n6, c7, e2) {
      var i5 = 1, j6 = c7.length;
      for (; !c7[--j6]; c7.pop()) ;
      for (j6 = c7[0]; j6 >= 10; j6 /= 10, i5++) ;
      if ((e2 = i5 + e2 * LOG_BASE - 1) > MAX_EXP) {
        n6.c = n6.e = null;
      } else if (e2 < MIN_EXP) {
        n6.c = [n6.e = 0];
      } else {
        n6.e = e2;
        n6.c = c7;
      }
      return n6;
    }
    parseNumeric = /* @__PURE__ */ (function() {
      var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, dotAfter = /^([^.]+)\.$/, dotBefore = /^\.([^.]+)$/, isInfinityOrNaN = /^-?(Infinity|NaN)$/, whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
      return function(x13, str, isNum, b9) {
        var base4, s3 = isNum ? str : str.replace(whitespaceOrPlus, "");
        if (isInfinityOrNaN.test(s3)) {
          x13.s = isNaN(s3) ? null : s3 < 0 ? -1 : 1;
        } else {
          if (!isNum) {
            s3 = s3.replace(basePrefix, function(m3, p1, p22) {
              base4 = (p22 = p22.toLowerCase()) == "x" ? 16 : p22 == "b" ? 2 : 8;
              return !b9 || b9 == base4 ? p1 : m3;
            });
            if (b9) {
              base4 = b9;
              s3 = s3.replace(dotAfter, "$1").replace(dotBefore, "0.$1");
            }
            if (str != s3) return new BigNumber3(s3, base4);
          }
          if (BigNumber3.DEBUG) {
            throw Error(bignumberError + "Not a" + (b9 ? " base " + b9 : "") + " number: " + str);
          }
          x13.s = null;
        }
        x13.c = x13.e = null;
      };
    })();
    function round(x13, sd, rm, r3) {
      var d6, i5, j6, k7, n6, ni2, rd, xc = x13.c, pows10 = POWS_TEN;
      if (xc) {
        out: {
          for (d6 = 1, k7 = xc[0]; k7 >= 10; k7 /= 10, d6++) ;
          i5 = sd - d6;
          if (i5 < 0) {
            i5 += LOG_BASE;
            j6 = sd;
            n6 = xc[ni2 = 0];
            rd = mathfloor(n6 / pows10[d6 - j6 - 1] % 10);
          } else {
            ni2 = mathceil((i5 + 1) / LOG_BASE);
            if (ni2 >= xc.length) {
              if (r3) {
                for (; xc.length <= ni2; xc.push(0)) ;
                n6 = rd = 0;
                d6 = 1;
                i5 %= LOG_BASE;
                j6 = i5 - LOG_BASE + 1;
              } else {
                break out;
              }
            } else {
              n6 = k7 = xc[ni2];
              for (d6 = 1; k7 >= 10; k7 /= 10, d6++) ;
              i5 %= LOG_BASE;
              j6 = i5 - LOG_BASE + d6;
              rd = j6 < 0 ? 0 : mathfloor(n6 / pows10[d6 - j6 - 1] % 10);
            }
          }
          r3 = r3 || sd < 0 || // Are there any non-zero digits after the rounding digit?
          // The expression  n % pows10[d - j - 1]  returns all digits of n to the right
          // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
          xc[ni2 + 1] != null || (j6 < 0 ? n6 : n6 % pows10[d6 - j6 - 1]);
          r3 = rm < 4 ? (rd || r3) && (rm == 0 || rm == (x13.s < 0 ? 3 : 2)) : rd > 5 || rd == 5 && (rm == 4 || r3 || rm == 6 && // Check whether the digit to the left of the rounding digit is odd.
          (i5 > 0 ? j6 > 0 ? n6 / pows10[d6 - j6] : 0 : xc[ni2 - 1]) % 10 & 1 || rm == (x13.s < 0 ? 8 : 7));
          if (sd < 1 || !xc[0]) {
            xc.length = 0;
            if (r3) {
              sd -= x13.e + 1;
              xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];
              x13.e = -sd || 0;
            } else {
              xc[0] = x13.e = 0;
            }
            return x13;
          }
          if (i5 == 0) {
            xc.length = ni2;
            k7 = 1;
            ni2--;
          } else {
            xc.length = ni2 + 1;
            k7 = pows10[LOG_BASE - i5];
            xc[ni2] = j6 > 0 ? mathfloor(n6 / pows10[d6 - j6] % pows10[j6]) * k7 : 0;
          }
          if (r3) {
            for (; ; ) {
              if (ni2 == 0) {
                for (i5 = 1, j6 = xc[0]; j6 >= 10; j6 /= 10, i5++) ;
                j6 = xc[0] += k7;
                for (k7 = 1; j6 >= 10; j6 /= 10, k7++) ;
                if (i5 != k7) {
                  x13.e++;
                  if (xc[0] == BASE) xc[0] = 1;
                }
                break;
              } else {
                xc[ni2] += k7;
                if (xc[ni2] != BASE) break;
                xc[ni2--] = 0;
                k7 = 1;
              }
            }
          }
          for (i5 = xc.length; xc[--i5] === 0; xc.pop()) ;
        }
        if (x13.e > MAX_EXP) {
          x13.c = x13.e = null;
        } else if (x13.e < MIN_EXP) {
          x13.c = [x13.e = 0];
        }
      }
      return x13;
    }
    function valueOf(n6) {
      var str, e2 = n6.e;
      if (e2 === null) return n6.toString();
      str = coeffToString(n6.c);
      str = e2 <= TO_EXP_NEG || e2 >= TO_EXP_POS ? toExponential(str, e2) : toFixedPoint(str, e2, "0");
      return n6.s < 0 ? "-" + str : str;
    }
    P8.absoluteValue = P8.abs = function() {
      var x13 = new BigNumber3(this);
      if (x13.s < 0) x13.s = 1;
      return x13;
    };
    P8.comparedTo = function(y11, b9) {
      return compare(this, new BigNumber3(y11, b9));
    };
    P8.decimalPlaces = P8.dp = function(dp, rm) {
      var c7, n6, v13, x13 = this;
      if (dp != null) {
        intCheck(dp, 0, MAX);
        if (rm == null) rm = ROUNDING_MODE;
        else intCheck(rm, 0, 8);
        return round(new BigNumber3(x13), dp + x13.e + 1, rm);
      }
      if (!(c7 = x13.c)) return null;
      n6 = ((v13 = c7.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;
      if (v13 = c7[v13]) for (; v13 % 10 == 0; v13 /= 10, n6--) ;
      if (n6 < 0) n6 = 0;
      return n6;
    };
    P8.dividedBy = P8.div = function(y11, b9) {
      return div(this, new BigNumber3(y11, b9), DECIMAL_PLACES, ROUNDING_MODE);
    };
    P8.dividedToIntegerBy = P8.idiv = function(y11, b9) {
      return div(this, new BigNumber3(y11, b9), 0, 1);
    };
    P8.exponentiatedBy = P8.pow = function(n6, m3) {
      var half, isModExp, i5, k7, more, nIsBig, nIsNeg, nIsOdd, y11, x13 = this;
      n6 = new BigNumber3(n6);
      if (n6.c && !n6.isInteger()) {
        throw Error(bignumberError + "Exponent not an integer: " + valueOf(n6));
      }
      if (m3 != null) m3 = new BigNumber3(m3);
      nIsBig = n6.e > 14;
      if (!x13.c || !x13.c[0] || x13.c[0] == 1 && !x13.e && x13.c.length == 1 || !n6.c || !n6.c[0]) {
        y11 = new BigNumber3(Math.pow(+valueOf(x13), nIsBig ? n6.s * (2 - isOdd(n6)) : +valueOf(n6)));
        return m3 ? y11.mod(m3) : y11;
      }
      nIsNeg = n6.s < 0;
      if (m3) {
        if (m3.c ? !m3.c[0] : !m3.s) return new BigNumber3(NaN);
        isModExp = !nIsNeg && x13.isInteger() && m3.isInteger();
        if (isModExp) x13 = x13.mod(m3);
      } else if (n6.e > 9 && (x13.e > 0 || x13.e < -1 || (x13.e == 0 ? x13.c[0] > 1 || nIsBig && x13.c[1] >= 24e7 : x13.c[0] < 8e13 || nIsBig && x13.c[0] <= 9999975e7))) {
        k7 = x13.s < 0 && isOdd(n6) ? -0 : 0;
        if (x13.e > -1) k7 = 1 / k7;
        return new BigNumber3(nIsNeg ? 1 / k7 : k7);
      } else if (POW_PRECISION) {
        k7 = mathceil(POW_PRECISION / LOG_BASE + 2);
      }
      if (nIsBig) {
        half = new BigNumber3(0.5);
        if (nIsNeg) n6.s = 1;
        nIsOdd = isOdd(n6);
      } else {
        i5 = Math.abs(+valueOf(n6));
        nIsOdd = i5 % 2;
      }
      y11 = new BigNumber3(ONE);
      for (; ; ) {
        if (nIsOdd) {
          y11 = y11.times(x13);
          if (!y11.c) break;
          if (k7) {
            if (y11.c.length > k7) y11.c.length = k7;
          } else if (isModExp) {
            y11 = y11.mod(m3);
          }
        }
        if (i5) {
          i5 = mathfloor(i5 / 2);
          if (i5 === 0) break;
          nIsOdd = i5 % 2;
        } else {
          n6 = n6.times(half);
          round(n6, n6.e + 1, 1);
          if (n6.e > 14) {
            nIsOdd = isOdd(n6);
          } else {
            i5 = +valueOf(n6);
            if (i5 === 0) break;
            nIsOdd = i5 % 2;
          }
        }
        x13 = x13.times(x13);
        if (k7) {
          if (x13.c && x13.c.length > k7) x13.c.length = k7;
        } else if (isModExp) {
          x13 = x13.mod(m3);
        }
      }
      if (isModExp) return y11;
      if (nIsNeg) y11 = ONE.div(y11);
      return m3 ? y11.mod(m3) : k7 ? round(y11, POW_PRECISION, ROUNDING_MODE, more) : y11;
    };
    P8.integerValue = function(rm) {
      var n6 = new BigNumber3(this);
      if (rm == null) rm = ROUNDING_MODE;
      else intCheck(rm, 0, 8);
      return round(n6, n6.e + 1, rm);
    };
    P8.isEqualTo = P8.eq = function(y11, b9) {
      return compare(this, new BigNumber3(y11, b9)) === 0;
    };
    P8.isFinite = function() {
      return !!this.c;
    };
    P8.isGreaterThan = P8.gt = function(y11, b9) {
      return compare(this, new BigNumber3(y11, b9)) > 0;
    };
    P8.isGreaterThanOrEqualTo = P8.gte = function(y11, b9) {
      return (b9 = compare(this, new BigNumber3(y11, b9))) === 1 || b9 === 0;
    };
    P8.isInteger = function() {
      return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;
    };
    P8.isLessThan = P8.lt = function(y11, b9) {
      return compare(this, new BigNumber3(y11, b9)) < 0;
    };
    P8.isLessThanOrEqualTo = P8.lte = function(y11, b9) {
      return (b9 = compare(this, new BigNumber3(y11, b9))) === -1 || b9 === 0;
    };
    P8.isNaN = function() {
      return !this.s;
    };
    P8.isNegative = function() {
      return this.s < 0;
    };
    P8.isPositive = function() {
      return this.s > 0;
    };
    P8.isZero = function() {
      return !!this.c && this.c[0] == 0;
    };
    P8.minus = function(y11, b9) {
      var i5, j6, t, xLTy, x13 = this, a5 = x13.s;
      y11 = new BigNumber3(y11, b9);
      b9 = y11.s;
      if (!a5 || !b9) return new BigNumber3(NaN);
      if (a5 != b9) {
        y11.s = -b9;
        return x13.plus(y11);
      }
      var xe5 = x13.e / LOG_BASE, ye8 = y11.e / LOG_BASE, xc = x13.c, yc = y11.c;
      if (!xe5 || !ye8) {
        if (!xc || !yc) return xc ? (y11.s = -b9, y11) : new BigNumber3(yc ? x13 : NaN);
        if (!xc[0] || !yc[0]) {
          return yc[0] ? (y11.s = -b9, y11) : new BigNumber3(xc[0] ? x13 : (
            // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
            ROUNDING_MODE == 3 ? -0 : 0
          ));
        }
      }
      xe5 = bitFloor(xe5);
      ye8 = bitFloor(ye8);
      xc = xc.slice();
      if (a5 = xe5 - ye8) {
        if (xLTy = a5 < 0) {
          a5 = -a5;
          t = xc;
        } else {
          ye8 = xe5;
          t = yc;
        }
        t.reverse();
        for (b9 = a5; b9--; t.push(0)) ;
        t.reverse();
      } else {
        j6 = (xLTy = (a5 = xc.length) < (b9 = yc.length)) ? a5 : b9;
        for (a5 = b9 = 0; b9 < j6; b9++) {
          if (xc[b9] != yc[b9]) {
            xLTy = xc[b9] < yc[b9];
            break;
          }
        }
      }
      if (xLTy) {
        t = xc;
        xc = yc;
        yc = t;
        y11.s = -y11.s;
      }
      b9 = (j6 = yc.length) - (i5 = xc.length);
      if (b9 > 0) for (; b9--; xc[i5++] = 0) ;
      b9 = BASE - 1;
      for (; j6 > a5; ) {
        if (xc[--j6] < yc[j6]) {
          for (i5 = j6; i5 && !xc[--i5]; xc[i5] = b9) ;
          --xc[i5];
          xc[j6] += BASE;
        }
        xc[j6] -= yc[j6];
      }
      for (; xc[0] == 0; xc.splice(0, 1), --ye8) ;
      if (!xc[0]) {
        y11.s = ROUNDING_MODE == 3 ? -1 : 1;
        y11.c = [y11.e = 0];
        return y11;
      }
      return normalise(y11, xc, ye8);
    };
    P8.modulo = P8.mod = function(y11, b9) {
      var q7, s3, x13 = this;
      y11 = new BigNumber3(y11, b9);
      if (!x13.c || !y11.s || y11.c && !y11.c[0]) {
        return new BigNumber3(NaN);
      } else if (!y11.c || x13.c && !x13.c[0]) {
        return new BigNumber3(x13);
      }
      if (MODULO_MODE == 9) {
        s3 = y11.s;
        y11.s = 1;
        q7 = div(x13, y11, 0, 3);
        y11.s = s3;
        q7.s *= s3;
      } else {
        q7 = div(x13, y11, 0, MODULO_MODE);
      }
      y11 = x13.minus(q7.times(y11));
      if (!y11.c[0] && MODULO_MODE == 1) y11.s = x13.s;
      return y11;
    };
    P8.multipliedBy = P8.times = function(y11, b9) {
      var c7, e2, i5, j6, k7, m3, xcL, xlo, xhi, ycL, ylo, yhi, zc, base4, sqrtBase, x13 = this, xc = x13.c, yc = (y11 = new BigNumber3(y11, b9)).c;
      if (!xc || !yc || !xc[0] || !yc[0]) {
        if (!x13.s || !y11.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {
          y11.c = y11.e = y11.s = null;
        } else {
          y11.s *= x13.s;
          if (!xc || !yc) {
            y11.c = y11.e = null;
          } else {
            y11.c = [0];
            y11.e = 0;
          }
        }
        return y11;
      }
      e2 = bitFloor(x13.e / LOG_BASE) + bitFloor(y11.e / LOG_BASE);
      y11.s *= x13.s;
      xcL = xc.length;
      ycL = yc.length;
      if (xcL < ycL) {
        zc = xc;
        xc = yc;
        yc = zc;
        i5 = xcL;
        xcL = ycL;
        ycL = i5;
      }
      for (i5 = xcL + ycL, zc = []; i5--; zc.push(0)) ;
      base4 = BASE;
      sqrtBase = SQRT_BASE;
      for (i5 = ycL; --i5 >= 0; ) {
        c7 = 0;
        ylo = yc[i5] % sqrtBase;
        yhi = yc[i5] / sqrtBase | 0;
        for (k7 = xcL, j6 = i5 + k7; j6 > i5; ) {
          xlo = xc[--k7] % sqrtBase;
          xhi = xc[k7] / sqrtBase | 0;
          m3 = yhi * xlo + xhi * ylo;
          xlo = ylo * xlo + m3 % sqrtBase * sqrtBase + zc[j6] + c7;
          c7 = (xlo / base4 | 0) + (m3 / sqrtBase | 0) + yhi * xhi;
          zc[j6--] = xlo % base4;
        }
        zc[j6] = c7;
      }
      if (c7) {
        ++e2;
      } else {
        zc.splice(0, 1);
      }
      return normalise(y11, zc, e2);
    };
    P8.negated = function() {
      var x13 = new BigNumber3(this);
      x13.s = -x13.s || null;
      return x13;
    };
    P8.plus = function(y11, b9) {
      var t, x13 = this, a5 = x13.s;
      y11 = new BigNumber3(y11, b9);
      b9 = y11.s;
      if (!a5 || !b9) return new BigNumber3(NaN);
      if (a5 != b9) {
        y11.s = -b9;
        return x13.minus(y11);
      }
      var xe5 = x13.e / LOG_BASE, ye8 = y11.e / LOG_BASE, xc = x13.c, yc = y11.c;
      if (!xe5 || !ye8) {
        if (!xc || !yc) return new BigNumber3(a5 / 0);
        if (!xc[0] || !yc[0]) return yc[0] ? y11 : new BigNumber3(xc[0] ? x13 : a5 * 0);
      }
      xe5 = bitFloor(xe5);
      ye8 = bitFloor(ye8);
      xc = xc.slice();
      if (a5 = xe5 - ye8) {
        if (a5 > 0) {
          ye8 = xe5;
          t = yc;
        } else {
          a5 = -a5;
          t = xc;
        }
        t.reverse();
        for (; a5--; t.push(0)) ;
        t.reverse();
      }
      a5 = xc.length;
      b9 = yc.length;
      if (a5 - b9 < 0) {
        t = yc;
        yc = xc;
        xc = t;
        b9 = a5;
      }
      for (a5 = 0; b9; ) {
        a5 = (xc[--b9] = xc[b9] + yc[b9] + a5) / BASE | 0;
        xc[b9] = BASE === xc[b9] ? 0 : xc[b9] % BASE;
      }
      if (a5) {
        xc = [a5].concat(xc);
        ++ye8;
      }
      return normalise(y11, xc, ye8);
    };
    P8.precision = P8.sd = function(sd, rm) {
      var c7, n6, v13, x13 = this;
      if (sd != null && sd !== !!sd) {
        intCheck(sd, 1, MAX);
        if (rm == null) rm = ROUNDING_MODE;
        else intCheck(rm, 0, 8);
        return round(new BigNumber3(x13), sd, rm);
      }
      if (!(c7 = x13.c)) return null;
      v13 = c7.length - 1;
      n6 = v13 * LOG_BASE + 1;
      if (v13 = c7[v13]) {
        for (; v13 % 10 == 0; v13 /= 10, n6--) ;
        for (v13 = c7[0]; v13 >= 10; v13 /= 10, n6++) ;
      }
      if (sd && x13.e + 1 > n6) n6 = x13.e + 1;
      return n6;
    };
    P8.shiftedBy = function(k7) {
      intCheck(k7, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
      return this.times("1e" + k7);
    };
    P8.squareRoot = P8.sqrt = function() {
      var m3, n6, r3, rep, t, x13 = this, c7 = x13.c, s3 = x13.s, e2 = x13.e, dp = DECIMAL_PLACES + 4, half = new BigNumber3("0.5");
      if (s3 !== 1 || !c7 || !c7[0]) {
        return new BigNumber3(!s3 || s3 < 0 && (!c7 || c7[0]) ? NaN : c7 ? x13 : 1 / 0);
      }
      s3 = Math.sqrt(+valueOf(x13));
      if (s3 == 0 || s3 == 1 / 0) {
        n6 = coeffToString(c7);
        if ((n6.length + e2) % 2 == 0) n6 += "0";
        s3 = Math.sqrt(+n6);
        e2 = bitFloor((e2 + 1) / 2) - (e2 < 0 || e2 % 2);
        if (s3 == 1 / 0) {
          n6 = "5e" + e2;
        } else {
          n6 = s3.toExponential();
          n6 = n6.slice(0, n6.indexOf("e") + 1) + e2;
        }
        r3 = new BigNumber3(n6);
      } else {
        r3 = new BigNumber3(s3 + "");
      }
      if (r3.c[0]) {
        e2 = r3.e;
        s3 = e2 + dp;
        if (s3 < 3) s3 = 0;
        for (; ; ) {
          t = r3;
          r3 = half.times(t.plus(div(x13, t, dp, 1)));
          if (coeffToString(t.c).slice(0, s3) === (n6 = coeffToString(r3.c)).slice(0, s3)) {
            if (r3.e < e2) --s3;
            n6 = n6.slice(s3 - 3, s3 + 1);
            if (n6 == "9999" || !rep && n6 == "4999") {
              if (!rep) {
                round(t, t.e + DECIMAL_PLACES + 2, 0);
                if (t.times(t).eq(x13)) {
                  r3 = t;
                  break;
                }
              }
              dp += 4;
              s3 += 4;
              rep = 1;
            } else {
              if (!+n6 || !+n6.slice(1) && n6.charAt(0) == "5") {
                round(r3, r3.e + DECIMAL_PLACES + 2, 1);
                m3 = !r3.times(r3).eq(x13);
              }
              break;
            }
          }
        }
      }
      return round(r3, r3.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m3);
    };
    P8.toExponential = function(dp, rm) {
      if (dp != null) {
        intCheck(dp, 0, MAX);
        dp++;
      }
      return format(this, dp, rm, 1);
    };
    P8.toFixed = function(dp, rm) {
      if (dp != null) {
        intCheck(dp, 0, MAX);
        dp = dp + this.e + 1;
      }
      return format(this, dp, rm);
    };
    P8.toFormat = function(dp, rm, format2) {
      var str, x13 = this;
      if (format2 == null) {
        if (dp != null && rm && typeof rm == "object") {
          format2 = rm;
          rm = null;
        } else if (dp && typeof dp == "object") {
          format2 = dp;
          dp = rm = null;
        } else {
          format2 = FORMAT;
        }
      } else if (typeof format2 != "object") {
        throw Error(bignumberError + "Argument not an object: " + format2);
      }
      str = x13.toFixed(dp, rm);
      if (x13.c) {
        var i5, arr = str.split("."), g1 = +format2.groupSize, g22 = +format2.secondaryGroupSize, groupSeparator = format2.groupSeparator || "", intPart = arr[0], fractionPart = arr[1], isNeg = x13.s < 0, intDigits = isNeg ? intPart.slice(1) : intPart, len = intDigits.length;
        if (g22) {
          i5 = g1;
          g1 = g22;
          g22 = i5;
          len -= i5;
        }
        if (g1 > 0 && len > 0) {
          i5 = len % g1 || g1;
          intPart = intDigits.substr(0, i5);
          for (; i5 < len; i5 += g1) intPart += groupSeparator + intDigits.substr(i5, g1);
          if (g22 > 0) intPart += groupSeparator + intDigits.slice(i5);
          if (isNeg) intPart = "-" + intPart;
        }
        str = fractionPart ? intPart + (format2.decimalSeparator || "") + ((g22 = +format2.fractionGroupSize) ? fractionPart.replace(
          new RegExp("\\d{" + g22 + "}\\B", "g"),
          "$&" + (format2.fractionGroupSeparator || "")
        ) : fractionPart) : intPart;
      }
      return (format2.prefix || "") + str + (format2.suffix || "");
    };
    P8.toFraction = function(md) {
      var d6, d0, d1, d22, e2, exp, n6, n0, n1, q7, r3, s3, x13 = this, xc = x13.c;
      if (md != null) {
        n6 = new BigNumber3(md);
        if (!n6.isInteger() && (n6.c || n6.s !== 1) || n6.lt(ONE)) {
          throw Error(bignumberError + "Argument " + (n6.isInteger() ? "out of range: " : "not an integer: ") + valueOf(n6));
        }
      }
      if (!xc) return new BigNumber3(x13);
      d6 = new BigNumber3(ONE);
      n1 = d0 = new BigNumber3(ONE);
      d1 = n0 = new BigNumber3(ONE);
      s3 = coeffToString(xc);
      e2 = d6.e = s3.length - x13.e - 1;
      d6.c[0] = POWS_TEN[(exp = e2 % LOG_BASE) < 0 ? LOG_BASE + exp : exp];
      md = !md || n6.comparedTo(d6) > 0 ? e2 > 0 ? d6 : n1 : n6;
      exp = MAX_EXP;
      MAX_EXP = 1 / 0;
      n6 = new BigNumber3(s3);
      n0.c[0] = 0;
      for (; ; ) {
        q7 = div(n6, d6, 0, 1);
        d22 = d0.plus(q7.times(d1));
        if (d22.comparedTo(md) == 1) break;
        d0 = d1;
        d1 = d22;
        n1 = n0.plus(q7.times(d22 = n1));
        n0 = d22;
        d6 = n6.minus(q7.times(d22 = d6));
        n6 = d22;
      }
      d22 = div(md.minus(d0), d1, 0, 1);
      n0 = n0.plus(d22.times(n1));
      d0 = d0.plus(d22.times(d1));
      n0.s = n1.s = x13.s;
      e2 = e2 * 2;
      r3 = div(n1, d1, e2, ROUNDING_MODE).minus(x13).abs().comparedTo(
        div(n0, d0, e2, ROUNDING_MODE).minus(x13).abs()
      ) < 1 ? [n1, d1] : [n0, d0];
      MAX_EXP = exp;
      return r3;
    };
    P8.toNumber = function() {
      return +valueOf(this);
    };
    P8.toPrecision = function(sd, rm) {
      if (sd != null) intCheck(sd, 1, MAX);
      return format(this, sd, rm, 2);
    };
    P8.toString = function(b9) {
      var str, n6 = this, s3 = n6.s, e2 = n6.e;
      if (e2 === null) {
        if (s3) {
          str = "Infinity";
          if (s3 < 0) str = "-" + str;
        } else {
          str = "NaN";
        }
      } else {
        if (b9 == null) {
          str = e2 <= TO_EXP_NEG || e2 >= TO_EXP_POS ? toExponential(coeffToString(n6.c), e2) : toFixedPoint(coeffToString(n6.c), e2, "0");
        } else if (b9 === 10 && alphabetHasNormalDecimalDigits) {
          n6 = round(new BigNumber3(n6), DECIMAL_PLACES + e2 + 1, ROUNDING_MODE);
          str = toFixedPoint(coeffToString(n6.c), n6.e, "0");
        } else {
          intCheck(b9, 2, ALPHABET.length, "Base");
          str = convertBase(toFixedPoint(coeffToString(n6.c), e2, "0"), 10, b9, s3, true);
        }
        if (s3 < 0 && n6.c[0]) str = "-" + str;
      }
      return str;
    };
    P8.valueOf = P8.toJSON = function() {
      return valueOf(this);
    };
    P8._isBigNumber = true;
    P8[Symbol.toStringTag] = "BigNumber";
    P8[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = P8.valueOf;
    if (configObject != null) BigNumber3.set(configObject);
    return BigNumber3;
  }
  function bitFloor(n6) {
    var i5 = n6 | 0;
    return n6 > 0 || n6 === i5 ? i5 : i5 - 1;
  }
  function coeffToString(a5) {
    var s3, z11, i5 = 1, j6 = a5.length, r3 = a5[0] + "";
    for (; i5 < j6; ) {
      s3 = a5[i5++] + "";
      z11 = LOG_BASE - s3.length;
      for (; z11--; s3 = "0" + s3) ;
      r3 += s3;
    }
    for (j6 = r3.length; r3.charCodeAt(--j6) === 48; ) ;
    return r3.slice(0, j6 + 1 || 1);
  }
  function compare(x13, y11) {
    var a5, b9, xc = x13.c, yc = y11.c, i5 = x13.s, j6 = y11.s, k7 = x13.e, l6 = y11.e;
    if (!i5 || !j6) return null;
    a5 = xc && !xc[0];
    b9 = yc && !yc[0];
    if (a5 || b9) return a5 ? b9 ? 0 : -j6 : i5;
    if (i5 != j6) return i5;
    a5 = i5 < 0;
    b9 = k7 == l6;
    if (!xc || !yc) return b9 ? 0 : !xc ^ a5 ? 1 : -1;
    if (!b9) return k7 > l6 ^ a5 ? 1 : -1;
    j6 = (k7 = xc.length) < (l6 = yc.length) ? k7 : l6;
    for (i5 = 0; i5 < j6; i5++) if (xc[i5] != yc[i5]) return xc[i5] > yc[i5] ^ a5 ? 1 : -1;
    return k7 == l6 ? 0 : k7 > l6 ^ a5 ? 1 : -1;
  }
  function intCheck(n6, min, max, name2) {
    if (n6 < min || n6 > max || n6 !== mathfloor(n6)) {
      throw Error(bignumberError + (name2 || "Argument") + (typeof n6 == "number" ? n6 < min || n6 > max ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(n6));
    }
  }
  function isOdd(n6) {
    var k7 = n6.c.length - 1;
    return bitFloor(n6.e / LOG_BASE) == k7 && n6.c[k7] % 2 != 0;
  }
  function toExponential(str, e2) {
    return (str.length > 1 ? str.charAt(0) + "." + str.slice(1) : str) + (e2 < 0 ? "e" : "e+") + e2;
  }
  function toFixedPoint(str, e2, z11) {
    var len, zs2;
    if (e2 < 0) {
      for (zs2 = z11 + "."; ++e2; zs2 += z11) ;
      str = zs2 + str;
    } else {
      len = str.length;
      if (++e2 > len) {
        for (zs2 = z11, e2 -= len; --e2; zs2 += z11) ;
        str += zs2;
      } else if (e2 < len) {
        str = str.slice(0, e2) + "." + str.slice(e2);
      }
    }
    return str;
  }
  var BigNumber = clone();
  var bignumber_default = BigNumber;

  // ../../node_modules/.pnpm/@solana+buffer-layout-utils_098ecfce72ab97955b9cd2dcb1f6233d/node_modules/@solana/buffer-layout-utils/lib/esm/decimal.mjs
  var WAD = new bignumber_default("1e+18");

  // ../../node_modules/.pnpm/@solana+buffer-layout-utils_098ecfce72ab97955b9cd2dcb1f6233d/node_modules/@solana/buffer-layout-utils/lib/esm/native.mjs
  init_node_compat_inject();
  var import_buffer_layout3 = __toESM(require_Layout(), 1);
  var bool = (property) => {
    const layout = (0, import_buffer_layout3.u8)(property);
    const { encode: encode11, decode: decode9 } = encodeDecode(layout);
    const boolLayout = layout;
    boolLayout.decode = (buffer2, offset2) => {
      const src2 = decode9(buffer2, offset2);
      return !!src2;
    };
    boolLayout.encode = (bool2, buffer2, offset2) => {
      const src2 = Number(bool2);
      return encode11(src2, buffer2, offset2);
    };
    return boolLayout;
  };

  // ../../node_modules/.pnpm/@solana+buffer-layout-utils_098ecfce72ab97955b9cd2dcb1f6233d/node_modules/@solana/buffer-layout-utils/lib/esm/web3.mjs
  init_node_compat_inject();
  var import_buffer_layout4 = __toESM(require_Layout(), 1);
  var publicKey2 = (property) => {
    const layout = (0, import_buffer_layout4.blob)(32, property);
    const { encode: encode11, decode: decode9 } = encodeDecode(layout);
    const publicKeyLayout = layout;
    publicKeyLayout.decode = (buffer2, offset2) => {
      const src2 = decode9(buffer2, offset2);
      return new PublicKey(src2);
    };
    publicKeyLayout.encode = (publicKey3, buffer2, offset2) => {
      const src2 = publicKey3.toBuffer();
      return encode11(src2, buffer2, offset2);
    };
    return publicKeyLayout;
  };

  // ../../node_modules/.pnpm/@solana+spl-token@0.4.14_@s_3ed350ec948d2f6646f78e07a6ecb7d2/node_modules/@solana/spl-token/lib/esm/errors.js
  init_node_compat_inject();
  var TokenError = class extends Error {
    constructor(message) {
      super(message);
    }
  };
  var TokenOwnerOffCurveError = class extends TokenError {
    constructor() {
      super(...arguments);
      this.name = "TokenOwnerOffCurveError";
    }
  };

  // ../../node_modules/.pnpm/@solana+spl-token@0.4.14_@s_3ed350ec948d2f6646f78e07a6ecb7d2/node_modules/@solana/spl-token/lib/esm/instructions/types.js
  init_node_compat_inject();
  var TokenInstruction;
  (function(TokenInstruction2) {
    TokenInstruction2[TokenInstruction2["InitializeMint"] = 0] = "InitializeMint";
    TokenInstruction2[TokenInstruction2["InitializeAccount"] = 1] = "InitializeAccount";
    TokenInstruction2[TokenInstruction2["InitializeMultisig"] = 2] = "InitializeMultisig";
    TokenInstruction2[TokenInstruction2["Transfer"] = 3] = "Transfer";
    TokenInstruction2[TokenInstruction2["Approve"] = 4] = "Approve";
    TokenInstruction2[TokenInstruction2["Revoke"] = 5] = "Revoke";
    TokenInstruction2[TokenInstruction2["SetAuthority"] = 6] = "SetAuthority";
    TokenInstruction2[TokenInstruction2["MintTo"] = 7] = "MintTo";
    TokenInstruction2[TokenInstruction2["Burn"] = 8] = "Burn";
    TokenInstruction2[TokenInstruction2["CloseAccount"] = 9] = "CloseAccount";
    TokenInstruction2[TokenInstruction2["FreezeAccount"] = 10] = "FreezeAccount";
    TokenInstruction2[TokenInstruction2["ThawAccount"] = 11] = "ThawAccount";
    TokenInstruction2[TokenInstruction2["TransferChecked"] = 12] = "TransferChecked";
    TokenInstruction2[TokenInstruction2["ApproveChecked"] = 13] = "ApproveChecked";
    TokenInstruction2[TokenInstruction2["MintToChecked"] = 14] = "MintToChecked";
    TokenInstruction2[TokenInstruction2["BurnChecked"] = 15] = "BurnChecked";
    TokenInstruction2[TokenInstruction2["InitializeAccount2"] = 16] = "InitializeAccount2";
    TokenInstruction2[TokenInstruction2["SyncNative"] = 17] = "SyncNative";
    TokenInstruction2[TokenInstruction2["InitializeAccount3"] = 18] = "InitializeAccount3";
    TokenInstruction2[TokenInstruction2["InitializeMultisig2"] = 19] = "InitializeMultisig2";
    TokenInstruction2[TokenInstruction2["InitializeMint2"] = 20] = "InitializeMint2";
    TokenInstruction2[TokenInstruction2["GetAccountDataSize"] = 21] = "GetAccountDataSize";
    TokenInstruction2[TokenInstruction2["InitializeImmutableOwner"] = 22] = "InitializeImmutableOwner";
    TokenInstruction2[TokenInstruction2["AmountToUiAmount"] = 23] = "AmountToUiAmount";
    TokenInstruction2[TokenInstruction2["UiAmountToAmount"] = 24] = "UiAmountToAmount";
    TokenInstruction2[TokenInstruction2["InitializeMintCloseAuthority"] = 25] = "InitializeMintCloseAuthority";
    TokenInstruction2[TokenInstruction2["TransferFeeExtension"] = 26] = "TransferFeeExtension";
    TokenInstruction2[TokenInstruction2["ConfidentialTransferExtension"] = 27] = "ConfidentialTransferExtension";
    TokenInstruction2[TokenInstruction2["DefaultAccountStateExtension"] = 28] = "DefaultAccountStateExtension";
    TokenInstruction2[TokenInstruction2["Reallocate"] = 29] = "Reallocate";
    TokenInstruction2[TokenInstruction2["MemoTransferExtension"] = 30] = "MemoTransferExtension";
    TokenInstruction2[TokenInstruction2["CreateNativeMint"] = 31] = "CreateNativeMint";
    TokenInstruction2[TokenInstruction2["InitializeNonTransferableMint"] = 32] = "InitializeNonTransferableMint";
    TokenInstruction2[TokenInstruction2["InterestBearingMintExtension"] = 33] = "InterestBearingMintExtension";
    TokenInstruction2[TokenInstruction2["CpiGuardExtension"] = 34] = "CpiGuardExtension";
    TokenInstruction2[TokenInstruction2["InitializePermanentDelegate"] = 35] = "InitializePermanentDelegate";
    TokenInstruction2[TokenInstruction2["TransferHookExtension"] = 36] = "TransferHookExtension";
    TokenInstruction2[TokenInstruction2["MetadataPointerExtension"] = 39] = "MetadataPointerExtension";
    TokenInstruction2[TokenInstruction2["GroupPointerExtension"] = 40] = "GroupPointerExtension";
    TokenInstruction2[TokenInstruction2["GroupMemberPointerExtension"] = 41] = "GroupMemberPointerExtension";
    TokenInstruction2[TokenInstruction2["ScaledUiAmountExtension"] = 43] = "ScaledUiAmountExtension";
    TokenInstruction2[TokenInstruction2["PausableExtension"] = 44] = "PausableExtension";
  })(TokenInstruction || (TokenInstruction = {}));

  // ../../node_modules/.pnpm/@solana+spl-token@0.4.14_@s_3ed350ec948d2f6646f78e07a6ecb7d2/node_modules/@solana/spl-token/lib/esm/state/mint.js
  init_node_compat_inject();
  var import_buffer_layout6 = __toESM(require_Layout(), 1);

  // ../../node_modules/.pnpm/@solana+spl-token@0.4.14_@s_3ed350ec948d2f6646f78e07a6ecb7d2/node_modules/@solana/spl-token/lib/esm/instructions/internal.js
  init_node_compat_inject();
  function addSigners(keys2, ownerOrAuthority, multiSigners) {
    if (multiSigners.length) {
      keys2.push({ pubkey: ownerOrAuthority, isSigner: false, isWritable: false });
      for (const signer of multiSigners) {
        keys2.push({
          pubkey: signer instanceof PublicKey ? signer : signer.publicKey,
          isSigner: true,
          isWritable: false
        });
      }
    } else {
      keys2.push({ pubkey: ownerOrAuthority, isSigner: true, isWritable: false });
    }
    return keys2;
  }

  // ../../node_modules/.pnpm/@solana+spl-token@0.4.14_@s_3ed350ec948d2f6646f78e07a6ecb7d2/node_modules/@solana/spl-token/lib/esm/instructions/transferChecked.js
  init_node_compat_inject();
  var import_buffer_layout5 = __toESM(require_Layout(), 1);
  var transferCheckedInstructionData = (0, import_buffer_layout5.struct)([
    (0, import_buffer_layout5.u8)("instruction"),
    u642("amount"),
    (0, import_buffer_layout5.u8)("decimals")
  ]);
  function createTransferCheckedInstruction(source, mint, destination, owner, amount, decimals, multiSigners = [], programId = TOKEN_PROGRAM_ID) {
    const keys2 = addSigners([
      { pubkey: source, isSigner: false, isWritable: true },
      { pubkey: mint, isSigner: false, isWritable: false },
      { pubkey: destination, isSigner: false, isWritable: true }
    ], owner, multiSigners);
    const data = Buffer2.alloc(transferCheckedInstructionData.span);
    transferCheckedInstructionData.encode({
      instruction: TokenInstruction.TransferChecked,
      amount: BigInt(amount),
      decimals
    }, data);
    return new TransactionInstruction({ keys: keys2, programId, data });
  }

  // ../../node_modules/.pnpm/@solana+spl-token@0.4.14_@s_3ed350ec948d2f6646f78e07a6ecb7d2/node_modules/@solana/spl-token/lib/esm/state/mint.js
  var MintLayout = (0, import_buffer_layout6.struct)([
    (0, import_buffer_layout6.u32)("mintAuthorityOption"),
    publicKey2("mintAuthority"),
    u642("supply"),
    (0, import_buffer_layout6.u8)("decimals"),
    bool("isInitialized"),
    (0, import_buffer_layout6.u32)("freezeAuthorityOption"),
    publicKey2("freezeAuthority")
  ]);
  var MINT_SIZE = MintLayout.span;
  function getAssociatedTokenAddressSync(mint, owner, allowOwnerOffCurve = false, programId = TOKEN_PROGRAM_ID, associatedTokenProgramId = ASSOCIATED_TOKEN_PROGRAM_ID) {
    if (!allowOwnerOffCurve && !PublicKey.isOnCurve(owner.toBuffer()))
      throw new TokenOwnerOffCurveError();
    const [address] = PublicKey.findProgramAddressSync([owner.toBuffer(), programId.toBuffer(), mint.toBuffer()], associatedTokenProgramId);
    return address;
  }

  // ../../node_modules/.pnpm/@solana+spl-token@0.4.14_@s_3ed350ec948d2f6646f78e07a6ecb7d2/node_modules/@solana/spl-token/lib/esm/instructions/associatedTokenAccount.js
  init_node_compat_inject();
  function createAssociatedTokenAccountInstruction(payer, associatedToken, owner, mint, programId = TOKEN_PROGRAM_ID, associatedTokenProgramId = ASSOCIATED_TOKEN_PROGRAM_ID) {
    return buildAssociatedTokenAccountInstruction(payer, associatedToken, owner, mint, Buffer2.alloc(0), programId, associatedTokenProgramId);
  }
  function buildAssociatedTokenAccountInstruction(payer, associatedToken, owner, mint, instructionData, programId = TOKEN_PROGRAM_ID, associatedTokenProgramId = ASSOCIATED_TOKEN_PROGRAM_ID) {
    const keys2 = [
      { pubkey: payer, isSigner: true, isWritable: true },
      { pubkey: associatedToken, isSigner: false, isWritable: true },
      { pubkey: owner, isSigner: false, isWritable: false },
      { pubkey: mint, isSigner: false, isWritable: false },
      { pubkey: SystemProgram.programId, isSigner: false, isWritable: false },
      { pubkey: programId, isSigner: false, isWritable: false }
    ];
    return new TransactionInstruction({
      keys: keys2,
      programId: associatedTokenProgramId,
      data: instructionData
    });
  }

  // ../../packages/wallet-core/src/solana/tokens.ts
  async function getSolanaSplTokenBalances(input) {
    const owner = toSolanaPublicKey(input.ownerAddress);
    let lastError = null;
    for (const connection of createSolanaConnections(input.rpcUrl)) {
      try {
        const accounts = await connection.getParsedTokenAccountsByOwner(owner, {
          programId: TOKEN_PROGRAM_ID
        });
        return accounts.value.map((item) => {
          const parsed = item.account.data.parsed;
          const info = parsed.info;
          const tokenAmount = info.tokenAmount;
          return {
            mintAddress: String(info.mint),
            tokenAccount: item.pubkey.toBase58(),
            amountRaw: String(tokenAmount.amount),
            amountFormatted: String(tokenAmount.uiAmountString ?? "0"),
            decimals: Number(tokenAmount.decimals ?? 0)
          };
        });
      } catch (error51) {
        lastError = error51;
      }
    }
    throw new Error(formatSolanaRpcError(lastError));
  }

  // ../../packages/wallet-core/src/solana/send.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/solana/explorer.ts
  init_node_compat_inject();
  function buildSolanaExplorerTxUrl(signature2) {
    return `https://solscan.io/tx/${encodeURIComponent(signature2)}`;
  }

  // ../../packages/wallet-core/src/solana/send.ts
  var SOLANA_FALLBACK_FEE_LAMPORTS = 5000n;
  function solanaNativeAsset() {
    return {
      family: "solana",
      chainId: 101,
      type: "native",
      symbol: "SOL",
      name: "Solana",
      decimals: 9,
      tokenAddress: null,
      isVerified: true
    };
  }
  async function createSolanaSendDraft(input) {
    const issues = [];
    const errors = [];
    const warnings = [];
    const amountRaw = resolveLamports(input);
    const feeRaw = input.estimatedFeeLamports !== void 0 && input.estimatedFeeLamports !== null ? toBigInt3(input.estimatedFeeLamports) : await resolveEstimatedFee(input.rpcUrl);
    if (!validateSolanaAddress(input.fromAddress)) {
      errors.push("Invalid Solana sender address.");
      issues.push({
        code: "invalid_from_address",
        severity: "error",
        message: "Sender must be a valid Solana address."
      });
    }
    if (!validateSolanaAddress(input.toAddress)) {
      errors.push("Invalid Solana recipient address.");
      issues.push({
        code: "invalid_to_address",
        severity: "error",
        message: "Recipient must be a valid Solana address."
      });
    }
    if (amountRaw <= 0n) {
      errors.push("Amount must be greater than zero.");
      issues.push({
        code: "invalid_amount",
        severity: "error",
        message: "Amount must be greater than zero."
      });
    }
    if (input.balanceLamports !== void 0 && input.balanceLamports !== null) {
      const balance = toBigInt3(input.balanceLamports);
      if (balance < amountRaw + feeRaw) {
        errors.push("Insufficient SOL balance for amount and fee.");
        issues.push({
          code: "insufficient_balance",
          severity: "error",
          message: "SOL balance is not enough to cover the transfer and network fee."
        });
      }
    } else {
      warnings.push("Balance was not available during draft validation.");
    }
    return {
      family: "solana",
      chainId: 101,
      fromAddress: input.fromAddress,
      toAddress: input.toAddress,
      normalizedToAddress: validateSolanaAddress(input.toAddress) ? toSolanaPublicKey(input.toAddress).toBase58() : input.toAddress,
      asset: solanaNativeAsset(),
      amountRaw: amountRaw.toString(),
      amountFormatted: formatLamports(amountRaw),
      supportStatus: "supported",
      feeEstimate: {
        feeAsset: solanaNativeAsset(),
        feeRaw: feeRaw.toString(),
        feeFormatted: formatLamports(feeRaw),
        source: "estimated"
      },
      issues,
      warnings,
      errors,
      canProceed: errors.length === 0,
      canBroadcast: errors.length === 0,
      createdAt: (/* @__PURE__ */ new Date()).toISOString()
    };
  }
  async function executeSolanaSend(input) {
    const keypair = deriveSolanaKeypairFromMnemonic({ mnemonic: input.mnemonic });
    const fromAddress = keypair.publicKey.toBase58();
    if (input.expectedFromAddress && input.expectedFromAddress.trim() !== fromAddress) {
      throw new Error("The requested Solana account does not match the unlocked wallet.");
    }
    if (input.fromAddress && input.fromAddress.trim() !== fromAddress) {
      throw new Error("The Solana send draft sender does not match the unlocked wallet.");
    }
    const draft = await createSolanaSendDraft({
      ...input,
      fromAddress
    });
    if (!draft.canBroadcast) {
      throw new Error(draft.errors[0] ?? "Solana send draft is not broadcastable.");
    }
    const connection = createSolanaConnection(input.rpcUrl);
    const latestBlockhash = await connection.getLatestBlockhash("confirmed");
    const transaction = new Transaction({
      feePayer: keypair.publicKey,
      recentBlockhash: latestBlockhash.blockhash
    }).add(
      SystemProgram.transfer({
        fromPubkey: keypair.publicKey,
        toPubkey: toSolanaPublicKey(draft.normalizedToAddress ?? input.toAddress),
        lamports: BigInt(draft.amountRaw)
      })
    );
    transaction.sign(keypair);
    const signature2 = await connection.sendRawTransaction(transaction.serialize(), {
      skipPreflight: false,
      preflightCommitment: "confirmed"
    });
    return {
      family: "solana",
      chainId: 101,
      status: "submitted",
      txHash: signature2,
      explorerUrl: buildSolanaExplorerTxUrl(signature2),
      errorCode: null,
      errorMessage: null,
      broadcastProvider: "solana_rpc",
      submittedAt: (/* @__PURE__ */ new Date()).toISOString()
    };
  }
  function formatLamports(value) {
    const whole = value / BigInt(LAMPORTS_PER_SOL);
    const fraction = value % BigInt(LAMPORTS_PER_SOL);
    const fractionText = fraction.toString().padStart(9, "0").replace(/0+$/u, "");
    return `${whole.toString()}${fractionText ? `.${fractionText}` : ""}`;
  }
  async function resolveEstimatedFee(rpcUrl) {
    try {
      const connection = createSolanaConnection(rpcUrl);
      const { blockhash } = await connection.getLatestBlockhash("confirmed");
      const message = new Transaction({
        feePayer: toSolanaPublicKey("11111111111111111111111111111111"),
        recentBlockhash: blockhash
      }).compileMessage();
      const fee = await connection.getFeeForMessage(message, "confirmed");
      return BigInt(fee.value ?? Number(SOLANA_FALLBACK_FEE_LAMPORTS));
    } catch {
      return SOLANA_FALLBACK_FEE_LAMPORTS;
    }
  }
  function resolveLamports(input) {
    if (input.amountRaw) {
      return toBigInt3(input.amountRaw);
    }
    const formatted = input.amountFormatted?.trim() ?? "";
    if (!formatted) {
      return 0n;
    }
    if (!/^\d+(\.\d{0,9})?$/u.test(formatted)) {
      return 0n;
    }
    const [whole = "0", fraction = ""] = formatted.split(".");
    return BigInt(whole) * BigInt(LAMPORTS_PER_SOL) + BigInt(fraction.padEnd(9, "0"));
  }
  function toBigInt3(value) {
    if (typeof value === "bigint") {
      return value;
    }
    if (/^\d+$/u.test(value)) {
      return BigInt(value);
    }
    return 0n;
  }

  // ../../packages/wallet-core/src/solana/spl-transfer.ts
  init_node_compat_inject();
  var SPL_TRANSFER_FEE_LAMPORTS = 10000n;
  var SPL_TRANSFER_WITH_ATA_FEE_LAMPORTS = 15000n;
  function validateSplTokenMint(address) {
    return validateSolanaAddress(address);
  }
  function validateSolanaOwnerAddress(address) {
    return validateSolanaAddress(address);
  }
  function getAssociatedTokenAddress(input) {
    return getAssociatedTokenAddressSync(
      toSolanaPublicKey(input.mintAddress),
      toSolanaPublicKey(input.ownerAddress)
    ).toBase58();
  }
  async function checkAssociatedTokenAccountExists(input) {
    const ata = getAssociatedTokenAddress(input);
    const connection = createSolanaConnection(input.rpcUrl);
    const account = await connection.getAccountInfo(toSolanaPublicKey(ata), "confirmed");
    return Boolean(account);
  }
  async function estimateSplTransferFee(input = {}) {
    if (input.estimatedFeeLamports !== void 0 && input.estimatedFeeLamports !== null) {
      return toBigInt4(input.estimatedFeeLamports);
    }
    return input.recipientAtaExists === false ? SPL_TRANSFER_WITH_ATA_FEE_LAMPORTS : SPL_TRANSFER_FEE_LAMPORTS;
  }
  async function buildSplTransferDraft(input) {
    const issues = [];
    const errors = [];
    const warnings = [];
    const mintValid = validateSplTokenMint(input.mintAddress);
    const fromValid = validateSolanaOwnerAddress(input.fromOwnerAddress);
    const toValid = validateSolanaOwnerAddress(input.toOwnerAddress);
    const decimalsValid = Number.isInteger(input.decimals) && input.decimals >= 0 && input.decimals <= 18;
    const amountRaw = decimalsValid ? resolveTokenAmount(input) : 0n;
    let sourceAta = null;
    let destinationAta = null;
    let recipientAtaExists = input.recipientAtaExists ?? null;
    if (!mintValid) {
      errors.push("Invalid SPL token mint address.");
      issues.push({
        code: "invalid_mint",
        severity: "error",
        message: "SPL token mint must be a valid Solana address."
      });
    }
    if (!fromValid) {
      errors.push("Invalid Solana sender address.");
      issues.push({
        code: "invalid_from_address",
        severity: "error",
        message: "Sender must be a valid Solana owner address."
      });
    }
    if (!toValid) {
      errors.push("Invalid Solana recipient address.");
      issues.push({
        code: "invalid_to_address",
        severity: "error",
        message: "Recipient must be a valid Solana owner address."
      });
    }
    if (!decimalsValid) {
      errors.push("Invalid SPL token decimals.");
      issues.push({
        code: "invalid_decimals",
        severity: "error",
        message: "SPL token decimals must be an integer from 0 to 18."
      });
    }
    if (amountRaw <= 0n) {
      errors.push("Amount must be greater than zero.");
      issues.push({
        code: "invalid_amount",
        severity: "error",
        message: "Amount must be greater than zero."
      });
    }
    if (mintValid && fromValid) {
      sourceAta = getAssociatedTokenAddress({
        mintAddress: input.mintAddress,
        ownerAddress: input.fromOwnerAddress
      });
    }
    if (mintValid && toValid) {
      destinationAta = getAssociatedTokenAddress({
        mintAddress: input.mintAddress,
        ownerAddress: input.toOwnerAddress
      });
      if (recipientAtaExists === null) {
        try {
          recipientAtaExists = await checkAssociatedTokenAccountExists({
            mintAddress: input.mintAddress,
            ownerAddress: input.toOwnerAddress,
            rpcUrl: input.rpcUrl
          });
        } catch {
          warnings.push("Recipient token account could not be checked before review.");
        }
      }
    }
    if (recipientAtaExists === false) {
      warnings.push("Recipient associated token account is missing; approval will create it before transfer.");
      issues.push({
        code: "recipient_ata_missing",
        severity: "warning",
        message: "Recipient associated token account will be created during execution."
      });
    }
    if (input.balanceRaw !== void 0 && input.balanceRaw !== null) {
      const balance = toBigInt4(input.balanceRaw);
      if (balance < amountRaw) {
        errors.push("Insufficient SPL token balance.");
        issues.push({
          code: "insufficient_balance",
          severity: "error",
          message: "Token balance is not enough to cover the transfer amount."
        });
      }
    } else {
      warnings.push("Token balance was not available during draft validation.");
    }
    const feeRaw = await estimateSplTransferFee({
      recipientAtaExists,
      estimatedFeeLamports: input.estimatedFeeLamports
    });
    const asset = splAsset({
      mintAddress: input.mintAddress,
      symbol: input.symbol ?? "SPL",
      decimals: input.decimals
    });
    return {
      family: "solana",
      chainId: 101,
      fromAddress: input.fromOwnerAddress,
      toAddress: input.toOwnerAddress,
      normalizedToAddress: toValid ? toSolanaPublicKey(input.toOwnerAddress).toBase58() : input.toOwnerAddress,
      asset,
      amountRaw: amountRaw.toString(),
      amountFormatted: formatTokenUnits(amountRaw, input.decimals),
      supportStatus: "supported",
      feeEstimate: {
        feeAsset: {
          family: "solana",
          chainId: 101,
          type: "native",
          symbol: "SOL",
          name: "Solana",
          decimals: 9,
          tokenAddress: null,
          isVerified: true
        },
        feeRaw: feeRaw.toString(),
        feeFormatted: formatTokenUnits(feeRaw, 9),
        source: input.estimatedFeeLamports ? "estimated" : "fallback"
      },
      issues,
      warnings,
      errors,
      canProceed: errors.length === 0,
      canBroadcast: errors.length === 0,
      createdAt: (/* @__PURE__ */ new Date()).toISOString(),
      mintAddress: input.mintAddress,
      sourceAta,
      destinationAta,
      recipientAtaExists
    };
  }
  async function executeSplTransfer(input) {
    const keypair = deriveSolanaKeypairFromMnemonic({ mnemonic: input.mnemonic });
    const fromAddress = keypair.publicKey.toBase58();
    if (input.expectedFromAddress && input.expectedFromAddress.trim() !== fromAddress) {
      throw new Error("The requested Solana account does not match the unlocked wallet.");
    }
    if (input.fromOwnerAddress && input.fromOwnerAddress.trim() !== fromAddress) {
      throw new Error("The SPL send draft sender does not match the unlocked wallet.");
    }
    const draft = await buildSplTransferDraft({
      ...input,
      fromOwnerAddress: fromAddress
    });
    if (!draft.canBroadcast || !draft.sourceAta || !draft.destinationAta) {
      throw new Error(draft.errors[0] ?? "SPL transfer draft is not broadcastable.");
    }
    const connection = createSolanaConnection(input.rpcUrl);
    const mint = toSolanaPublicKey(input.mintAddress);
    const destinationOwner = toSolanaPublicKey(input.toOwnerAddress);
    const sourceAta = toSolanaPublicKey(draft.sourceAta);
    const destinationAta = toSolanaPublicKey(draft.destinationAta);
    const sourceAccount = await connection.getAccountInfo(sourceAta, "confirmed");
    if (!sourceAccount) {
      throw new Error("Sender associated token account does not exist.");
    }
    const destinationAccount = await connection.getAccountInfo(destinationAta, "confirmed");
    const latestBlockhash = await connection.getLatestBlockhash("confirmed");
    const transaction = new Transaction({
      feePayer: keypair.publicKey,
      recentBlockhash: latestBlockhash.blockhash
    });
    if (!destinationAccount) {
      transaction.add(
        createAssociatedTokenAccountInstruction(
          keypair.publicKey,
          destinationAta,
          destinationOwner,
          mint
        )
      );
    }
    transaction.add(
      createTransferCheckedInstruction(
        sourceAta,
        mint,
        destinationAta,
        keypair.publicKey,
        BigInt(draft.amountRaw),
        input.decimals
      )
    );
    transaction.sign(keypair);
    const signature2 = await connection.sendRawTransaction(transaction.serialize(), {
      skipPreflight: false,
      preflightCommitment: "confirmed"
    });
    return {
      family: "solana",
      chainId: 101,
      status: "submitted",
      txHash: signature2,
      explorerUrl: buildSolanaExplorerTxUrl(signature2),
      errorCode: null,
      errorMessage: null,
      broadcastProvider: "solana_spl_rpc",
      submittedAt: (/* @__PURE__ */ new Date()).toISOString()
    };
  }
  function splAsset(input) {
    return {
      family: "solana",
      chainId: 101,
      type: "spl",
      symbol: input.symbol || "SPL",
      name: input.symbol || "SPL Token",
      decimals: input.decimals,
      tokenAddress: input.mintAddress,
      isVerified: false
    };
  }
  function resolveTokenAmount(input) {
    if (input.amountRaw) {
      return toBigInt4(input.amountRaw);
    }
    const formatted = input.amountFormatted?.trim() ?? "";
    if (!formatted || !/^\d+(\.\d+)?$/u.test(formatted)) {
      return 0n;
    }
    const [whole = "0", fraction = ""] = formatted.split(".");
    if (fraction.length > input.decimals) {
      return 0n;
    }
    return BigInt(whole) * 10n ** BigInt(input.decimals) + BigInt(fraction.padEnd(input.decimals, "0"));
  }
  function formatTokenUnits(value, decimals) {
    const whole = value / 10n ** BigInt(decimals);
    const fraction = value % 10n ** BigInt(decimals);
    const fractionText = fraction.toString().padStart(decimals, "0").replace(/0+$/u, "");
    return `${whole.toString()}${fractionText ? `.${fractionText}` : ""}`;
  }
  function toBigInt4(value) {
    if (typeof value === "bigint") {
      return value;
    }
    if (/^\d+$/u.test(value)) {
      return BigInt(value);
    }
    return 0n;
  }

  // ../../packages/wallet-core/src/solana/swap.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/solana/message.ts
  init_node_compat_inject();
  var import_tweetnacl2 = __toESM(require_nacl_fast(), 1);
  function signSolanaMessage(input) {
    const keypair = deriveSolanaKeypairFromMnemonic({
      mnemonic: input.mnemonic
    });
    const messageBytes = normalizeMessage(input.message);
    const signature2 = import_tweetnacl2.default.sign.detached(messageBytes, keypair.secretKey);
    return bytesToBase64(signature2);
  }
  function normalizeMessage(message) {
    if (typeof message === "string") {
      return new TextEncoder().encode(message);
    }
    if (message instanceof Uint8Array) {
      return message;
    }
    return Uint8Array.from(message);
  }
  function bytesToBase64(bytes) {
    let binary = "";
    for (const byte of bytes) {
      binary += String.fromCharCode(byte);
    }
    return btoa(binary);
  }

  // ../../packages/wallet-core/src/adapters/tron-adapter.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/adapters/tron.ts
  init_node_compat_inject();
  var import_bip393 = __toESM(require_src(), 1);

  // ../../packages/wallet-core/src/crypto/vault.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/encoding.ts
  init_node_compat_inject();
  function bytesToBase642(bytes) {
    let binary = "";
    for (const byte of bytes) {
      binary += String.fromCharCode(byte);
    }
    return globalThis.btoa(binary);
  }
  function base64ToBytes(value) {
    const binary = globalThis.atob(value);
    const bytes = new Uint8Array(binary.length);
    for (let index2 = 0; index2 < binary.length; index2 += 1) {
      bytes[index2] = binary.charCodeAt(index2);
    }
    return bytes;
  }
  function encodeUtf8(value) {
    return new TextEncoder().encode(value);
  }
  function decodeUtf8(value) {
    return new TextDecoder().decode(value);
  }
  function asArrayBuffer(value) {
    return value.buffer.slice(
      value.byteOffset,
      value.byteOffset + value.byteLength
    );
  }

  // ../../packages/wallet-core/src/crypto/vault.ts
  var VAULT_PBKDF2_ITERATIONS = 6e5;
  var VAULT_SALT_BYTES = 16;
  var VAULT_AES_GCM_IV_BYTES = 12;
  function getVaultCrypto() {
    const vaultCrypto = globalThis.crypto;
    if (!vaultCrypto?.subtle || !vaultCrypto.getRandomValues) {
      throw new Error(
        "Secure browser crypto is unavailable. Open Acorus Wallet over HTTPS before creating, importing, or unlocking a wallet."
      );
    }
    return vaultCrypto;
  }
  function secureRandomBytes(byteLength) {
    if (!Number.isSafeInteger(byteLength) || byteLength <= 0) {
      throw new Error("Invalid secure random byte length.");
    }
    return getVaultCrypto().getRandomValues(new Uint8Array(byteLength));
  }
  function wipeBytes(bytes) {
    if (bytes) {
      bytes.fill(0);
    }
  }
  async function importPasscodeKey(passcode) {
    const passcodeBytes = encodeUtf8(passcode);
    try {
      return await getVaultCrypto().subtle.importKey(
        "raw",
        asArrayBuffer(passcodeBytes),
        "PBKDF2",
        false,
        ["deriveKey"]
      );
    } finally {
      wipeBytes(passcodeBytes);
    }
  }
  async function deriveVaultAesKey(passcode, salt, iterations = VAULT_PBKDF2_ITERATIONS) {
    if (salt.byteLength !== VAULT_SALT_BYTES) {
      throw new Error("Invalid vault salt length.");
    }
    if (iterations !== VAULT_PBKDF2_ITERATIONS) {
      throw new Error("Vault PBKDF2 iteration count must be exactly 600000.");
    }
    const baseKey = await importPasscodeKey(passcode);
    return getVaultCrypto().subtle.deriveKey(
      {
        name: "PBKDF2",
        hash: "SHA-256",
        iterations,
        salt: asArrayBuffer(salt)
      },
      baseKey,
      {
        name: "AES-GCM",
        length: 256
      },
      false,
      ["encrypt", "decrypt"]
    );
  }
  async function encryptVaultPayload(plaintextBytes, passcode) {
    if (plaintextBytes.byteLength === 0) {
      throw new Error("Cannot encrypt an empty wallet vault payload.");
    }
    const salt = secureRandomBytes(VAULT_SALT_BYTES);
    const iv = secureRandomBytes(VAULT_AES_GCM_IV_BYTES);
    try {
      const key2 = await deriveVaultAesKey(
        passcode,
        salt,
        VAULT_PBKDF2_ITERATIONS
      );
      const encrypted = await getVaultCrypto().subtle.encrypt(
        {
          name: "AES-GCM",
          iv: asArrayBuffer(iv)
        },
        key2,
        asArrayBuffer(plaintextBytes)
      );
      const ciphertext = new Uint8Array(encrypted);
      try {
        return {
          version: 1,
          kdf: "pbkdf2-sha256",
          iterations: VAULT_PBKDF2_ITERATIONS,
          saltBase64: bytesToBase642(salt),
          ivBase64: bytesToBase642(iv),
          ciphertextBase64: bytesToBase642(ciphertext),
          createdAt: (/* @__PURE__ */ new Date()).toISOString()
        };
      } finally {
        wipeBytes(ciphertext);
      }
    } finally {
      wipeBytes(salt);
      wipeBytes(iv);
    }
  }
  async function decryptVaultPayload(vault, passcode) {
    const salt = base64ToBytes(vault.saltBase64);
    const iv = base64ToBytes(vault.ivBase64);
    const ciphertext = base64ToBytes(vault.ciphertextBase64);
    try {
      if (iv.byteLength !== VAULT_AES_GCM_IV_BYTES) {
        throw new Error("Invalid vault IV length.");
      }
      const key2 = await deriveVaultAesKey(passcode, salt, vault.iterations);
      const plaintext = await getVaultCrypto().subtle.decrypt(
        {
          name: "AES-GCM",
          iv: asArrayBuffer(iv)
        },
        key2,
        asArrayBuffer(ciphertext)
      );
      return new Uint8Array(plaintext);
    } finally {
      wipeBytes(salt);
      wipeBytes(iv);
      wipeBytes(ciphertext);
    }
  }

  // ../../packages/wallet-core/src/tron/swap.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/adapters/tron.ts
  var TRON_MAX_SAFE_RPC_AMOUNT = BigInt(Number.MAX_SAFE_INTEGER);

  // ../../packages/wallet-core/src/adapters/utxo-adapter.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/adapters/bitcoin.ts
  init_node_compat_inject();
  var import_bip394 = __toESM(require_src(), 1);

  // ../../packages/wallet-core/src/adapters/ton-adapter.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/adapters/ton.ts
  init_node_compat_inject();
  var import_crypto2 = __toESM(require_dist(), 1);
  var import_ton = __toESM(require_dist3(), 1);
  var import_core = __toESM(require_dist2(), 1);

  // ../../packages/wallet-core/src/evm/allowance.ts
  init_node_compat_inject();
  function encodeErc20Approve(spender, amountRaw) {
    const spenderAddress = assertEvmAddress(spender, "spender");
    const amount = parseUint256(amountRaw, "approval amount");
    return encodeFunctionData({
      abi: ERC20_ABI,
      functionName: "approve",
      args: [spenderAddress, amount]
    });
  }
  function buildErc20ApproveTransaction(input) {
    const tokenAddress = assertEvmAddress(input.tokenAddress, "token");
    const owner = assertEvmAddress(input.owner, "owner");
    const spender = assertEvmAddress(input.spender, "spender");
    const requestedAmount = parseUint256(input.amountRaw, "approval amount");
    const amount = input.approvalMode === "infinite" ? maxUint256 : requestedAmount;
    const riskLabels = ["Token approval required"];
    if (input.approvalMode === "infinite") {
      riskLabels.push("Infinite approval");
    }
    riskLabels.push("Custom spender");
    return {
      chainId: input.chainId,
      from: owner,
      to: tokenAddress,
      data: encodeErc20Approve(spender, amount),
      value: "0x0",
      amountRaw: amount.toString(),
      approvalMode: input.approvalMode,
      riskLabels
    };
  }
  function assertEvmAddress(value, label) {
    if (!isAddress(value)) {
      throw new Error(`Invalid EVM ${label} address.`);
    }
    return getAddress(value);
  }
  function parseUint256(value, label) {
    if (typeof value === "bigint") {
      if (value < 0n) {
        throw new Error(`Invalid ${label}.`);
      }
      return value;
    }
    if (!/^\d+$/u.test(value)) {
      throw new Error(`Invalid ${label}.`);
    }
    return BigInt(value);
  }

  // ../../packages/wallet-core/src/evm/portfolio.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/evm/status.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/evm/token-metadata.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/practice.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/send/index.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/send/amount.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/send/validation.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/send/draft-engine.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/send/execution-engine.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/solana/portfolio.ts
  init_node_compat_inject();
  async function getSolanaPortfolioBalances(input) {
    const [nativeBalance, splBalances] = await Promise.all([
      getSolanaNativeBalance({
        address: input.address,
        rpcUrl: input.rpcUrl
      }),
      getSolanaSplTokenBalances({
        ownerAddress: input.address,
        rpcUrl: input.rpcUrl
      })
    ]);
    const knownTokensByMint = new Map(
      input.tokens.map((token) => [
        normalizeAddressForChain(token.chainId, token.tokenAddress),
        token
      ])
    );
    const assets = [
      {
        chainId: 101,
        type: "native",
        tokenAddress: null,
        symbol: "SOL",
        name: "Solana",
        decimals: 9,
        balanceRaw: nativeBalance.lamports,
        balanceFormatted: nativeBalance.sol,
        logoUrl: null,
        isVerified: true
      }
    ];
    for (const balance of splBalances) {
      const known = knownTokensByMint.get(
        normalizeAddressForChain(101, balance.mintAddress)
      );
      assets.push({
        chainId: 101,
        type: "spl",
        tokenAddress: balance.mintAddress,
        symbol: known?.symbol ?? "SPL",
        name: known?.name ?? "Unknown SPL Token",
        decimals: known?.decimals ?? balance.decimals,
        balanceRaw: balance.amountRaw,
        balanceFormatted: balance.amountFormatted,
        logoUrl: known?.logoUrl ?? null,
        isVerified: known?.isVerified ?? false
      });
    }
    return assets;
  }

  // ../../packages/wallet-core/src/swap/index.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/swap/types.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/swap/allowance.ts
  init_node_compat_inject();
  var DEFAULT_ALLOWANCE_BUFFER_BPS = 0;
  var MAX_ALLOWANCE_BUFFER_BPS = 100;
  function calculateSwapAllowanceAmount(input) {
    const requiredAmount = parsePositiveUint256(
      input.requiredAmountRaw,
      "required allowance amount"
    );
    const bufferBps = normalizeAllowanceBufferBps(input.bufferBps);
    if (bufferBps === 0) {
      return requiredAmount;
    }
    const buffered = requiredAmount + requiredAmount * BigInt(bufferBps) / 10000n;
    if (buffered > maxUint256) {
      throw new Error("Buffered approval amount exceeds uint256.");
    }
    return buffered;
  }
  function analyzeSwapAllowance(input) {
    const requiredAmount = parsePositiveUint256(
      input.requiredAmountRaw,
      "required allowance amount"
    );
    const currentAllowance = parseUint256OrZero(input.currentAllowanceRaw);
    const exactApprovalAmount = requiredAmount;
    const bufferedApprovalAmount = calculateSwapAllowanceAmount({
      requiredAmountRaw: requiredAmount,
      bufferBps: input.bufferBps
    });
    const approvalRequired = currentAllowance < requiredAmount;
    const resetRecommended = currentAllowance > requiredAmount;
    const warnings = [];
    const riskLabels = ["Token approval required", "Exact approval"];
    if (approvalRequired) {
      warnings.push("A token approval is required before this swap can execute.");
    }
    if (resetRecommended) {
      warnings.push(
        "Existing allowance is higher than this swap needs. Consider resetting it after the swap."
      );
    }
    if (currentAllowance === maxUint256) {
      warnings.push(
        "Existing allowance is unlimited. Resetting old approvals reduces future router risk."
      );
      riskLabels.push("Previous unlimited approval");
    }
    if (bufferedApprovalAmount > exactApprovalAmount) {
      riskLabels.push("Buffered approval");
    }
    return {
      approvalRequired,
      resetRecommended,
      exactApprovalAmountRaw: exactApprovalAmount.toString(),
      bufferedApprovalAmountRaw: bufferedApprovalAmount.toString(),
      currentAllowanceRaw: currentAllowance.toString(),
      requiredAllowanceRaw: requiredAmount.toString(),
      warnings,
      riskLabels
    };
  }
  function buildSwapApprovalTransaction(input) {
    const tokenAddress = assertEvmAddress2(input.tokenAddress, "token");
    const owner = assertEvmAddress2(input.owner, "owner");
    const spender = assertEvmAddress2(input.spender, "spender");
    const analysis = analyzeSwapAllowance({
      currentAllowanceRaw: input.currentAllowanceRaw,
      requiredAmountRaw: input.requiredAmountRaw,
      bufferBps: input.bufferBps
    });
    const tx = buildErc20ApproveTransaction({
      chainId: input.chainId,
      tokenAddress,
      owner,
      spender,
      amountRaw: analysis.bufferedApprovalAmountRaw,
      approvalMode: "exact"
    });
    return {
      ...tx,
      riskLabels: Array.from(/* @__PURE__ */ new Set([...tx.riskLabels, ...analysis.riskLabels])),
      resetRecommended: analysis.resetRecommended,
      currentAllowanceRaw: analysis.currentAllowanceRaw,
      requiredAllowanceRaw: analysis.requiredAllowanceRaw,
      warnings: analysis.warnings
    };
  }
  function assertEvmAddress2(value, label) {
    if (!isAddress(value)) {
      throw new Error(`Invalid EVM ${label} address.`);
    }
    return getAddress(value);
  }
  function normalizeAllowanceBufferBps(value) {
    if (value === null || value === void 0) {
      return DEFAULT_ALLOWANCE_BUFFER_BPS;
    }
    if (!Number.isInteger(value) || value < 0 || value > MAX_ALLOWANCE_BUFFER_BPS) {
      throw new Error("Invalid allowance buffer.");
    }
    return value;
  }
  function parseUint256OrZero(value) {
    if (value === null || value === void 0 || value === "") {
      return 0n;
    }
    return parseUint2562(value, "current allowance");
  }
  function parsePositiveUint256(value, label) {
    const parsed = parseUint2562(value, label);
    if (parsed <= 0n) {
      throw new Error(`Invalid ${label}.`);
    }
    return parsed;
  }
  function parseUint2562(value, label) {
    if (typeof value === "bigint") {
      if (value < 0n || value > maxUint256) {
        throw new Error(`Invalid ${label}.`);
      }
      return value;
    }
    const normalized = value.trim();
    if (!/^\d+$/u.test(normalized)) {
      throw new Error(`Invalid ${label}.`);
    }
    const parsed = BigInt(normalized);
    if (parsed > maxUint256) {
      throw new Error(`${label} exceeds uint256.`);
    }
    return parsed;
  }

  // ../../packages/wallet-core/src/swap/provider.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/swap/mock-provider.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/swap/quote-engine.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/types.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/vault.ts
  init_node_compat_inject();

  // ../../packages/wallet-core/src/schemas.ts
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
  var external_exports = {};
  __export(external_exports, {
    $brand: () => $brand,
    $input: () => $input,
    $output: () => $output,
    NEVER: () => NEVER,
    TimePrecision: () => TimePrecision,
    ZodAny: () => ZodAny,
    ZodArray: () => ZodArray,
    ZodBase64: () => ZodBase64,
    ZodBase64URL: () => ZodBase64URL,
    ZodBigInt: () => ZodBigInt,
    ZodBigIntFormat: () => ZodBigIntFormat,
    ZodBoolean: () => ZodBoolean,
    ZodCIDRv4: () => ZodCIDRv4,
    ZodCIDRv6: () => ZodCIDRv6,
    ZodCUID: () => ZodCUID,
    ZodCUID2: () => ZodCUID2,
    ZodCatch: () => ZodCatch,
    ZodCodec: () => ZodCodec,
    ZodCustom: () => ZodCustom,
    ZodCustomStringFormat: () => ZodCustomStringFormat,
    ZodDate: () => ZodDate,
    ZodDefault: () => ZodDefault,
    ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
    ZodE164: () => ZodE164,
    ZodEmail: () => ZodEmail,
    ZodEmoji: () => ZodEmoji,
    ZodEnum: () => ZodEnum,
    ZodError: () => ZodError,
    ZodExactOptional: () => ZodExactOptional,
    ZodFile: () => ZodFile,
    ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
    ZodFunction: () => ZodFunction,
    ZodGUID: () => ZodGUID,
    ZodIPv4: () => ZodIPv4,
    ZodIPv6: () => ZodIPv6,
    ZodISODate: () => ZodISODate,
    ZodISODateTime: () => ZodISODateTime,
    ZodISODuration: () => ZodISODuration,
    ZodISOTime: () => ZodISOTime,
    ZodIntersection: () => ZodIntersection,
    ZodIssueCode: () => ZodIssueCode,
    ZodJWT: () => ZodJWT,
    ZodKSUID: () => ZodKSUID,
    ZodLazy: () => ZodLazy,
    ZodLiteral: () => ZodLiteral,
    ZodMAC: () => ZodMAC,
    ZodMap: () => ZodMap,
    ZodNaN: () => ZodNaN,
    ZodNanoID: () => ZodNanoID,
    ZodNever: () => ZodNever,
    ZodNonOptional: () => ZodNonOptional,
    ZodNull: () => ZodNull,
    ZodNullable: () => ZodNullable,
    ZodNumber: () => ZodNumber,
    ZodNumberFormat: () => ZodNumberFormat,
    ZodObject: () => ZodObject,
    ZodOptional: () => ZodOptional,
    ZodPipe: () => ZodPipe,
    ZodPrefault: () => ZodPrefault,
    ZodPreprocess: () => ZodPreprocess,
    ZodPromise: () => ZodPromise,
    ZodReadonly: () => ZodReadonly,
    ZodRealError: () => ZodRealError,
    ZodRecord: () => ZodRecord,
    ZodSet: () => ZodSet,
    ZodString: () => ZodString,
    ZodStringFormat: () => ZodStringFormat,
    ZodSuccess: () => ZodSuccess,
    ZodSymbol: () => ZodSymbol,
    ZodTemplateLiteral: () => ZodTemplateLiteral,
    ZodTransform: () => ZodTransform,
    ZodTuple: () => ZodTuple,
    ZodType: () => ZodType,
    ZodULID: () => ZodULID,
    ZodURL: () => ZodURL,
    ZodUUID: () => ZodUUID,
    ZodUndefined: () => ZodUndefined,
    ZodUnion: () => ZodUnion,
    ZodUnknown: () => ZodUnknown,
    ZodVoid: () => ZodVoid,
    ZodXID: () => ZodXID,
    ZodXor: () => ZodXor,
    _ZodString: () => _ZodString,
    _default: () => _default2,
    _function: () => _function,
    any: () => any2,
    array: () => array2,
    base64: () => base642,
    base64url: () => base64url2,
    bigint: () => bigint2,
    boolean: () => boolean3,
    catch: () => _catch2,
    check: () => check,
    cidrv4: () => cidrv42,
    cidrv6: () => cidrv62,
    clone: () => clone2,
    codec: () => codec,
    coerce: () => coerce_exports,
    config: () => config,
    core: () => core_exports2,
    cuid: () => cuid3,
    cuid2: () => cuid22,
    custom: () => custom,
    date: () => date3,
    decode: () => decode3,
    decodeAsync: () => decodeAsync2,
    describe: () => describe2,
    discriminatedUnion: () => discriminatedUnion,
    e164: () => e1642,
    email: () => email2,
    emoji: () => emoji2,
    encode: () => encode5,
    encodeAsync: () => encodeAsync2,
    endsWith: () => _endsWith,
    enum: () => _enum2,
    exactOptional: () => exactOptional,
    file: () => file,
    flattenError: () => flattenError,
    float32: () => float32,
    float64: () => float64,
    formatError: () => formatError,
    fromJSONSchema: () => fromJSONSchema,
    function: () => _function,
    getErrorMap: () => getErrorMap,
    globalRegistry: () => globalRegistry,
    gt: () => _gt,
    gte: () => _gte,
    guid: () => guid2,
    hash: () => hash3,
    hex: () => hex2,
    hostname: () => hostname2,
    httpUrl: () => httpUrl,
    includes: () => _includes,
    instanceof: () => _instanceof,
    int: () => int,
    int32: () => int32,
    int64: () => int64,
    intersection: () => intersection,
    invertCodec: () => invertCodec,
    ipv4: () => ipv42,
    ipv6: () => ipv62,
    iso: () => iso_exports,
    json: () => json,
    jwt: () => jwt,
    keyof: () => keyof,
    ksuid: () => ksuid2,
    lazy: () => lazy,
    length: () => _length,
    literal: () => literal2,
    locales: () => locales_exports,
    looseObject: () => looseObject,
    looseRecord: () => looseRecord,
    lowercase: () => _lowercase,
    lt: () => _lt,
    lte: () => _lte,
    mac: () => mac2,
    map: () => map,
    maxLength: () => _maxLength,
    maxSize: () => _maxSize,
    meta: () => meta2,
    mime: () => _mime,
    minLength: () => _minLength,
    minSize: () => _minSize,
    multipleOf: () => _multipleOf,
    nan: () => nan,
    nanoid: () => nanoid2,
    nativeEnum: () => nativeEnum,
    negative: () => _negative,
    never: () => never2,
    nonnegative: () => _nonnegative,
    nonoptional: () => nonoptional,
    nonpositive: () => _nonpositive,
    normalize: () => _normalize,
    null: () => _null3,
    nullable: () => nullable2,
    nullish: () => nullish2,
    number: () => number3,
    object: () => object,
    optional: () => optional2,
    overwrite: () => _overwrite,
    parse: () => parse3,
    parseAsync: () => parseAsync2,
    partialRecord: () => partialRecord,
    pipe: () => pipe,
    positive: () => _positive,
    prefault: () => prefault,
    preprocess: () => preprocess,
    prettifyError: () => prettifyError,
    promise: () => promise,
    property: () => _property,
    readonly: () => readonly,
    record: () => record2,
    refine: () => refine,
    regex: () => _regex,
    regexes: () => regexes_exports,
    registry: () => registry,
    safeDecode: () => safeDecode2,
    safeDecodeAsync: () => safeDecodeAsync2,
    safeEncode: () => safeEncode2,
    safeEncodeAsync: () => safeEncodeAsync2,
    safeParse: () => safeParse2,
    safeParseAsync: () => safeParseAsync2,
    set: () => set,
    setErrorMap: () => setErrorMap,
    size: () => _size,
    slugify: () => _slugify,
    startsWith: () => _startsWith,
    strictObject: () => strictObject,
    string: () => string3,
    stringFormat: () => stringFormat,
    stringbool: () => stringbool,
    success: () => success,
    superRefine: () => superRefine,
    symbol: () => symbol,
    templateLiteral: () => templateLiteral,
    toJSONSchema: () => toJSONSchema,
    toLowerCase: () => _toLowerCase,
    toUpperCase: () => _toUpperCase,
    transform: () => transform,
    treeifyError: () => treeifyError,
    trim: () => _trim,
    tuple: () => tuple2,
    uint32: () => uint32,
    uint64: () => uint64,
    ulid: () => ulid2,
    undefined: () => _undefined3,
    union: () => union2,
    unknown: () => unknown2,
    uppercase: () => _uppercase,
    url: () => url,
    util: () => util_exports,
    uuid: () => uuid2,
    uuidv4: () => uuidv4,
    uuidv6: () => uuidv6,
    uuidv7: () => uuidv7,
    void: () => _void2,
    xid: () => xid2,
    xor: () => xor
  });
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/index.js
  var core_exports2 = {};
  __export(core_exports2, {
    $ZodAny: () => $ZodAny,
    $ZodArray: () => $ZodArray,
    $ZodAsyncError: () => $ZodAsyncError,
    $ZodBase64: () => $ZodBase64,
    $ZodBase64URL: () => $ZodBase64URL,
    $ZodBigInt: () => $ZodBigInt,
    $ZodBigIntFormat: () => $ZodBigIntFormat,
    $ZodBoolean: () => $ZodBoolean,
    $ZodCIDRv4: () => $ZodCIDRv4,
    $ZodCIDRv6: () => $ZodCIDRv6,
    $ZodCUID: () => $ZodCUID,
    $ZodCUID2: () => $ZodCUID2,
    $ZodCatch: () => $ZodCatch,
    $ZodCheck: () => $ZodCheck,
    $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat,
    $ZodCheckEndsWith: () => $ZodCheckEndsWith,
    $ZodCheckGreaterThan: () => $ZodCheckGreaterThan,
    $ZodCheckIncludes: () => $ZodCheckIncludes,
    $ZodCheckLengthEquals: () => $ZodCheckLengthEquals,
    $ZodCheckLessThan: () => $ZodCheckLessThan,
    $ZodCheckLowerCase: () => $ZodCheckLowerCase,
    $ZodCheckMaxLength: () => $ZodCheckMaxLength,
    $ZodCheckMaxSize: () => $ZodCheckMaxSize,
    $ZodCheckMimeType: () => $ZodCheckMimeType,
    $ZodCheckMinLength: () => $ZodCheckMinLength,
    $ZodCheckMinSize: () => $ZodCheckMinSize,
    $ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
    $ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
    $ZodCheckOverwrite: () => $ZodCheckOverwrite,
    $ZodCheckProperty: () => $ZodCheckProperty,
    $ZodCheckRegex: () => $ZodCheckRegex,
    $ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
    $ZodCheckStartsWith: () => $ZodCheckStartsWith,
    $ZodCheckStringFormat: () => $ZodCheckStringFormat,
    $ZodCheckUpperCase: () => $ZodCheckUpperCase,
    $ZodCodec: () => $ZodCodec,
    $ZodCustom: () => $ZodCustom,
    $ZodCustomStringFormat: () => $ZodCustomStringFormat,
    $ZodDate: () => $ZodDate,
    $ZodDefault: () => $ZodDefault,
    $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
    $ZodE164: () => $ZodE164,
    $ZodEmail: () => $ZodEmail,
    $ZodEmoji: () => $ZodEmoji,
    $ZodEncodeError: () => $ZodEncodeError,
    $ZodEnum: () => $ZodEnum,
    $ZodError: () => $ZodError,
    $ZodExactOptional: () => $ZodExactOptional,
    $ZodFile: () => $ZodFile,
    $ZodFunction: () => $ZodFunction,
    $ZodGUID: () => $ZodGUID,
    $ZodIPv4: () => $ZodIPv4,
    $ZodIPv6: () => $ZodIPv6,
    $ZodISODate: () => $ZodISODate,
    $ZodISODateTime: () => $ZodISODateTime,
    $ZodISODuration: () => $ZodISODuration,
    $ZodISOTime: () => $ZodISOTime,
    $ZodIntersection: () => $ZodIntersection,
    $ZodJWT: () => $ZodJWT,
    $ZodKSUID: () => $ZodKSUID,
    $ZodLazy: () => $ZodLazy,
    $ZodLiteral: () => $ZodLiteral,
    $ZodMAC: () => $ZodMAC,
    $ZodMap: () => $ZodMap,
    $ZodNaN: () => $ZodNaN,
    $ZodNanoID: () => $ZodNanoID,
    $ZodNever: () => $ZodNever,
    $ZodNonOptional: () => $ZodNonOptional,
    $ZodNull: () => $ZodNull,
    $ZodNullable: () => $ZodNullable,
    $ZodNumber: () => $ZodNumber,
    $ZodNumberFormat: () => $ZodNumberFormat,
    $ZodObject: () => $ZodObject,
    $ZodObjectJIT: () => $ZodObjectJIT,
    $ZodOptional: () => $ZodOptional,
    $ZodPipe: () => $ZodPipe,
    $ZodPrefault: () => $ZodPrefault,
    $ZodPreprocess: () => $ZodPreprocess,
    $ZodPromise: () => $ZodPromise,
    $ZodReadonly: () => $ZodReadonly,
    $ZodRealError: () => $ZodRealError,
    $ZodRecord: () => $ZodRecord,
    $ZodRegistry: () => $ZodRegistry,
    $ZodSet: () => $ZodSet,
    $ZodString: () => $ZodString,
    $ZodStringFormat: () => $ZodStringFormat,
    $ZodSuccess: () => $ZodSuccess,
    $ZodSymbol: () => $ZodSymbol,
    $ZodTemplateLiteral: () => $ZodTemplateLiteral,
    $ZodTransform: () => $ZodTransform,
    $ZodTuple: () => $ZodTuple,
    $ZodType: () => $ZodType,
    $ZodULID: () => $ZodULID,
    $ZodURL: () => $ZodURL,
    $ZodUUID: () => $ZodUUID,
    $ZodUndefined: () => $ZodUndefined,
    $ZodUnion: () => $ZodUnion,
    $ZodUnknown: () => $ZodUnknown,
    $ZodVoid: () => $ZodVoid,
    $ZodXID: () => $ZodXID,
    $ZodXor: () => $ZodXor,
    $brand: () => $brand,
    $constructor: () => $constructor,
    $input: () => $input,
    $output: () => $output,
    Doc: () => Doc,
    JSONSchema: () => json_schema_exports,
    JSONSchemaGenerator: () => JSONSchemaGenerator,
    NEVER: () => NEVER,
    TimePrecision: () => TimePrecision,
    _any: () => _any,
    _array: () => _array,
    _base64: () => _base64,
    _base64url: () => _base64url,
    _bigint: () => _bigint,
    _boolean: () => _boolean,
    _catch: () => _catch,
    _check: () => _check,
    _cidrv4: () => _cidrv4,
    _cidrv6: () => _cidrv6,
    _coercedBigint: () => _coercedBigint,
    _coercedBoolean: () => _coercedBoolean,
    _coercedDate: () => _coercedDate,
    _coercedNumber: () => _coercedNumber,
    _coercedString: () => _coercedString,
    _cuid: () => _cuid,
    _cuid2: () => _cuid2,
    _custom: () => _custom,
    _date: () => _date,
    _decode: () => _decode,
    _decodeAsync: () => _decodeAsync,
    _default: () => _default,
    _discriminatedUnion: () => _discriminatedUnion,
    _e164: () => _e164,
    _email: () => _email,
    _emoji: () => _emoji2,
    _encode: () => _encode,
    _encodeAsync: () => _encodeAsync,
    _endsWith: () => _endsWith,
    _enum: () => _enum,
    _file: () => _file,
    _float32: () => _float32,
    _float64: () => _float64,
    _gt: () => _gt,
    _gte: () => _gte,
    _guid: () => _guid,
    _includes: () => _includes,
    _int: () => _int,
    _int32: () => _int32,
    _int64: () => _int64,
    _intersection: () => _intersection,
    _ipv4: () => _ipv4,
    _ipv6: () => _ipv6,
    _isoDate: () => _isoDate,
    _isoDateTime: () => _isoDateTime,
    _isoDuration: () => _isoDuration,
    _isoTime: () => _isoTime,
    _jwt: () => _jwt,
    _ksuid: () => _ksuid,
    _lazy: () => _lazy,
    _length: () => _length,
    _literal: () => _literal,
    _lowercase: () => _lowercase,
    _lt: () => _lt,
    _lte: () => _lte,
    _mac: () => _mac,
    _map: () => _map,
    _max: () => _lte,
    _maxLength: () => _maxLength,
    _maxSize: () => _maxSize,
    _mime: () => _mime,
    _min: () => _gte,
    _minLength: () => _minLength,
    _minSize: () => _minSize,
    _multipleOf: () => _multipleOf,
    _nan: () => _nan,
    _nanoid: () => _nanoid,
    _nativeEnum: () => _nativeEnum,
    _negative: () => _negative,
    _never: () => _never,
    _nonnegative: () => _nonnegative,
    _nonoptional: () => _nonoptional,
    _nonpositive: () => _nonpositive,
    _normalize: () => _normalize,
    _null: () => _null2,
    _nullable: () => _nullable,
    _number: () => _number,
    _optional: () => _optional,
    _overwrite: () => _overwrite,
    _parse: () => _parse,
    _parseAsync: () => _parseAsync,
    _pipe: () => _pipe,
    _positive: () => _positive,
    _promise: () => _promise,
    _property: () => _property,
    _readonly: () => _readonly,
    _record: () => _record,
    _refine: () => _refine,
    _regex: () => _regex,
    _safeDecode: () => _safeDecode,
    _safeDecodeAsync: () => _safeDecodeAsync,
    _safeEncode: () => _safeEncode,
    _safeEncodeAsync: () => _safeEncodeAsync,
    _safeParse: () => _safeParse,
    _safeParseAsync: () => _safeParseAsync,
    _set: () => _set,
    _size: () => _size,
    _slugify: () => _slugify,
    _startsWith: () => _startsWith,
    _string: () => _string,
    _stringFormat: () => _stringFormat,
    _stringbool: () => _stringbool,
    _success: () => _success,
    _superRefine: () => _superRefine,
    _symbol: () => _symbol,
    _templateLiteral: () => _templateLiteral,
    _toLowerCase: () => _toLowerCase,
    _toUpperCase: () => _toUpperCase,
    _transform: () => _transform,
    _trim: () => _trim,
    _tuple: () => _tuple,
    _uint32: () => _uint32,
    _uint64: () => _uint64,
    _ulid: () => _ulid,
    _undefined: () => _undefined2,
    _union: () => _union,
    _unknown: () => _unknown,
    _uppercase: () => _uppercase,
    _url: () => _url,
    _uuid: () => _uuid,
    _uuidv4: () => _uuidv4,
    _uuidv6: () => _uuidv6,
    _uuidv7: () => _uuidv7,
    _void: () => _void,
    _xid: () => _xid,
    _xor: () => _xor,
    clone: () => clone2,
    config: () => config,
    createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod,
    createToJSONSchemaMethod: () => createToJSONSchemaMethod,
    decode: () => decode2,
    decodeAsync: () => decodeAsync,
    describe: () => describe,
    encode: () => encode4,
    encodeAsync: () => encodeAsync,
    extractDefs: () => extractDefs,
    finalize: () => finalize,
    flattenError: () => flattenError,
    formatError: () => formatError,
    globalConfig: () => globalConfig,
    globalRegistry: () => globalRegistry,
    initializeContext: () => initializeContext,
    isValidBase64: () => isValidBase64,
    isValidBase64URL: () => isValidBase64URL,
    isValidJWT: () => isValidJWT,
    locales: () => locales_exports,
    meta: () => meta,
    parse: () => parse2,
    parseAsync: () => parseAsync,
    prettifyError: () => prettifyError,
    process: () => process2,
    regexes: () => regexes_exports,
    registry: () => registry,
    safeDecode: () => safeDecode,
    safeDecodeAsync: () => safeDecodeAsync,
    safeEncode: () => safeEncode,
    safeEncodeAsync: () => safeEncodeAsync,
    safeParse: () => safeParse,
    safeParseAsync: () => safeParseAsync,
    toDotPath: () => toDotPath,
    toJSONSchema: () => toJSONSchema,
    treeifyError: () => treeifyError,
    util: () => util_exports,
    version: () => version5
  });
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
  init_node_compat_inject();
  var _a2;
  var NEVER = /* @__PURE__ */ Object.freeze({
    status: "aborted"
  });
  // @__NO_SIDE_EFFECTS__
  function $constructor(name2, initializer3, params) {
    function init2(inst, def) {
      if (!inst._zod) {
        Object.defineProperty(inst, "_zod", {
          value: {
            def,
            constr: _6,
            traits: /* @__PURE__ */ new Set()
          },
          enumerable: false
        });
      }
      if (inst._zod.traits.has(name2)) {
        return;
      }
      inst._zod.traits.add(name2);
      initializer3(inst, def);
      const proto = _6.prototype;
      const keys2 = Object.keys(proto);
      for (let i5 = 0; i5 < keys2.length; i5++) {
        const k7 = keys2[i5];
        if (!(k7 in inst)) {
          inst[k7] = proto[k7].bind(inst);
        }
      }
    }
    const Parent = params?.Parent ?? Object;
    class Definition extends Parent {
    }
    Object.defineProperty(Definition, "name", { value: name2 });
    function _6(def) {
      var _a4;
      const inst = params?.Parent ? new Definition() : this;
      init2(inst, def);
      (_a4 = inst._zod).deferred ?? (_a4.deferred = []);
      for (const fn of inst._zod.deferred) {
        fn();
      }
      return inst;
    }
    Object.defineProperty(_6, "init", { value: init2 });
    Object.defineProperty(_6, Symbol.hasInstance, {
      value: (inst) => {
        if (params?.Parent && inst instanceof params.Parent)
          return true;
        return inst?._zod?.traits?.has(name2);
      }
    });
    Object.defineProperty(_6, "name", { value: name2 });
    return _6;
  }
  var $brand = /* @__PURE__ */ Symbol("zod_brand");
  var $ZodAsyncError = class extends Error {
    constructor() {
      super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
    }
  };
  var $ZodEncodeError = class extends Error {
    constructor(name2) {
      super(`Encountered unidirectional transform during encode: ${name2}`);
      this.name = "ZodEncodeError";
    }
  };
  (_a2 = globalThis).__zod_globalConfig ?? (_a2.__zod_globalConfig = {});
  var globalConfig = globalThis.__zod_globalConfig;
  function config(newConfig) {
    if (newConfig)
      Object.assign(globalConfig, newConfig);
    return globalConfig;
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
  var util_exports = {};
  __export(util_exports, {
    BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
    Class: () => Class,
    NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
    aborted: () => aborted,
    allowsEval: () => allowsEval,
    assert: () => assert10,
    assertEqual: () => assertEqual,
    assertIs: () => assertIs,
    assertNever: () => assertNever,
    assertNotEqual: () => assertNotEqual,
    assignProp: () => assignProp,
    base64ToUint8Array: () => base64ToUint8Array,
    base64urlToUint8Array: () => base64urlToUint8Array,
    cached: () => cached,
    captureStackTrace: () => captureStackTrace,
    cleanEnum: () => cleanEnum,
    cleanRegex: () => cleanRegex,
    clone: () => clone2,
    cloneDef: () => cloneDef,
    createTransparentProxy: () => createTransparentProxy,
    defineLazy: () => defineLazy,
    esc: () => esc,
    escapeRegex: () => escapeRegex,
    explicitlyAborted: () => explicitlyAborted,
    extend: () => extend,
    finalizeIssue: () => finalizeIssue,
    floatSafeRemainder: () => floatSafeRemainder,
    getElementAtPath: () => getElementAtPath,
    getEnumValues: () => getEnumValues,
    getLengthableOrigin: () => getLengthableOrigin,
    getParsedType: () => getParsedType,
    getSizableOrigin: () => getSizableOrigin,
    hexToUint8Array: () => hexToUint8Array,
    isObject: () => isObject2,
    isPlainObject: () => isPlainObject,
    issue: () => issue,
    joinValues: () => joinValues,
    jsonStringifyReplacer: () => jsonStringifyReplacer,
    merge: () => merge,
    mergeDefs: () => mergeDefs,
    normalizeParams: () => normalizeParams,
    nullish: () => nullish,
    numKeys: () => numKeys,
    objectClone: () => objectClone,
    omit: () => omit,
    optionalKeys: () => optionalKeys,
    parsedType: () => parsedType,
    partial: () => partial,
    pick: () => pick,
    prefixIssues: () => prefixIssues,
    primitiveTypes: () => primitiveTypes,
    promiseAllObject: () => promiseAllObject,
    propertyKeyTypes: () => propertyKeyTypes,
    randomString: () => randomString,
    required: () => required,
    safeExtend: () => safeExtend,
    shallowClone: () => shallowClone,
    slugify: () => slugify,
    stringifyPrimitive: () => stringifyPrimitive,
    uint8ArrayToBase64: () => uint8ArrayToBase64,
    uint8ArrayToBase64url: () => uint8ArrayToBase64url,
    uint8ArrayToHex: () => uint8ArrayToHex,
    unwrapMessage: () => unwrapMessage
  });
  init_node_compat_inject();
  function assertEqual(val) {
    return val;
  }
  function assertNotEqual(val) {
    return val;
  }
  function assertIs(_arg) {
  }
  function assertNever(_x) {
    throw new Error("Unexpected value in exhaustive check");
  }
  function assert10(_6) {
  }
  function getEnumValues(entries) {
    const numericValues = Object.values(entries).filter((v13) => typeof v13 === "number");
    const values = Object.entries(entries).filter(([k7, _6]) => numericValues.indexOf(+k7) === -1).map(([_6, v13]) => v13);
    return values;
  }
  function joinValues(array3, separator = "|") {
    return array3.map((val) => stringifyPrimitive(val)).join(separator);
  }
  function jsonStringifyReplacer(_6, value) {
    if (typeof value === "bigint")
      return value.toString();
    return value;
  }
  function cached(getter) {
    const set3 = false;
    return {
      get value() {
        if (!set3) {
          const value = getter();
          Object.defineProperty(this, "value", { value });
          return value;
        }
        throw new Error("cached value already set");
      }
    };
  }
  function nullish(input) {
    return input === null || input === void 0;
  }
  function cleanRegex(source) {
    const start = source.startsWith("^") ? 1 : 0;
    const end = source.endsWith("$") ? source.length - 1 : source.length;
    return source.slice(start, end);
  }
  function floatSafeRemainder(val, step) {
    const ratio = val / step;
    const roundedRatio = Math.round(ratio);
    const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
    if (Math.abs(ratio - roundedRatio) < tolerance)
      return 0;
    return ratio - roundedRatio;
  }
  var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
  function defineLazy(object2, key2, getter) {
    let value = void 0;
    Object.defineProperty(object2, key2, {
      get() {
        if (value === EVALUATING) {
          return void 0;
        }
        if (value === void 0) {
          value = EVALUATING;
          value = getter();
        }
        return value;
      },
      set(v13) {
        Object.defineProperty(object2, key2, {
          value: v13
          // configurable: true,
        });
      },
      configurable: true
    });
  }
  function objectClone(obj) {
    return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
  }
  function assignProp(target, prop, value) {
    Object.defineProperty(target, prop, {
      value,
      writable: true,
      enumerable: true,
      configurable: true
    });
  }
  function mergeDefs(...defs) {
    const mergedDescriptors = {};
    for (const def of defs) {
      const descriptors = Object.getOwnPropertyDescriptors(def);
      Object.assign(mergedDescriptors, descriptors);
    }
    return Object.defineProperties({}, mergedDescriptors);
  }
  function cloneDef(schema) {
    return mergeDefs(schema._zod.def);
  }
  function getElementAtPath(obj, path) {
    if (!path)
      return obj;
    return path.reduce((acc, key2) => acc?.[key2], obj);
  }
  function promiseAllObject(promisesObj) {
    const keys2 = Object.keys(promisesObj);
    const promises = keys2.map((key2) => promisesObj[key2]);
    return Promise.all(promises).then((results) => {
      const resolvedObj = {};
      for (let i5 = 0; i5 < keys2.length; i5++) {
        resolvedObj[keys2[i5]] = results[i5];
      }
      return resolvedObj;
    });
  }
  function randomString(length2 = 10) {
    const chars = "abcdefghijklmnopqrstuvwxyz";
    let str = "";
    for (let i5 = 0; i5 < length2; i5++) {
      str += chars[Math.floor(Math.random() * chars.length)];
    }
    return str;
  }
  function esc(str) {
    return JSON.stringify(str);
  }
  function slugify(input) {
    return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
  }
  var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
  };
  function isObject2(data) {
    return typeof data === "object" && data !== null && !Array.isArray(data);
  }
  var allowsEval = /* @__PURE__ */ cached(() => {
    if (globalConfig.jitless) {
      return false;
    }
    if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
      return false;
    }
    try {
      const F6 = Function;
      new F6("");
      return true;
    } catch (_6) {
      return false;
    }
  });
  function isPlainObject(o5) {
    if (isObject2(o5) === false)
      return false;
    const ctor = o5.constructor;
    if (ctor === void 0)
      return true;
    if (typeof ctor !== "function")
      return true;
    const prot = ctor.prototype;
    if (isObject2(prot) === false)
      return false;
    if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
      return false;
    }
    return true;
  }
  function shallowClone(o5) {
    if (isPlainObject(o5))
      return { ...o5 };
    if (Array.isArray(o5))
      return [...o5];
    if (o5 instanceof Map)
      return new Map(o5);
    if (o5 instanceof Set)
      return new Set(o5);
    return o5;
  }
  function numKeys(data) {
    let keyCount = 0;
    for (const key2 in data) {
      if (Object.prototype.hasOwnProperty.call(data, key2)) {
        keyCount++;
      }
    }
    return keyCount;
  }
  var getParsedType = (data) => {
    const t = typeof data;
    switch (t) {
      case "undefined":
        return "undefined";
      case "string":
        return "string";
      case "number":
        return Number.isNaN(data) ? "nan" : "number";
      case "boolean":
        return "boolean";
      case "function":
        return "function";
      case "bigint":
        return "bigint";
      case "symbol":
        return "symbol";
      case "object":
        if (Array.isArray(data)) {
          return "array";
        }
        if (data === null) {
          return "null";
        }
        if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
          return "promise";
        }
        if (typeof Map !== "undefined" && data instanceof Map) {
          return "map";
        }
        if (typeof Set !== "undefined" && data instanceof Set) {
          return "set";
        }
        if (typeof Date !== "undefined" && data instanceof Date) {
          return "date";
        }
        if (typeof File !== "undefined" && data instanceof File) {
          return "file";
        }
        return "object";
      default:
        throw new Error(`Unknown data type: ${t}`);
    }
  };
  var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
  var primitiveTypes = /* @__PURE__ */ new Set([
    "string",
    "number",
    "bigint",
    "boolean",
    "symbol",
    "undefined"
  ]);
  function escapeRegex(str) {
    return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
  }
  function clone2(inst, def, params) {
    const cl = new inst._zod.constr(def ?? inst._zod.def);
    if (!def || params?.parent)
      cl._zod.parent = inst;
    return cl;
  }
  function normalizeParams(_params) {
    const params = _params;
    if (!params)
      return {};
    if (typeof params === "string")
      return { error: () => params };
    if (params?.message !== void 0) {
      if (params?.error !== void 0)
        throw new Error("Cannot specify both `message` and `error` params");
      params.error = params.message;
    }
    delete params.message;
    if (typeof params.error === "string")
      return { ...params, error: () => params.error };
    return params;
  }
  function createTransparentProxy(getter) {
    let target;
    return new Proxy({}, {
      get(_6, prop, receiver) {
        target ?? (target = getter());
        return Reflect.get(target, prop, receiver);
      },
      set(_6, prop, value, receiver) {
        target ?? (target = getter());
        return Reflect.set(target, prop, value, receiver);
      },
      has(_6, prop) {
        target ?? (target = getter());
        return Reflect.has(target, prop);
      },
      deleteProperty(_6, prop) {
        target ?? (target = getter());
        return Reflect.deleteProperty(target, prop);
      },
      ownKeys(_6) {
        target ?? (target = getter());
        return Reflect.ownKeys(target);
      },
      getOwnPropertyDescriptor(_6, prop) {
        target ?? (target = getter());
        return Reflect.getOwnPropertyDescriptor(target, prop);
      },
      defineProperty(_6, prop, descriptor) {
        target ?? (target = getter());
        return Reflect.defineProperty(target, prop, descriptor);
      }
    });
  }
  function stringifyPrimitive(value) {
    if (typeof value === "bigint")
      return value.toString() + "n";
    if (typeof value === "string")
      return `"${value}"`;
    return `${value}`;
  }
  function optionalKeys(shape) {
    return Object.keys(shape).filter((k7) => {
      return shape[k7]._zod.optin === "optional" && shape[k7]._zod.optout === "optional";
    });
  }
  var NUMBER_FORMAT_RANGES = {
    safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
    int32: [-2147483648, 2147483647],
    uint32: [0, 4294967295],
    float32: [-34028234663852886e22, 34028234663852886e22],
    float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
  };
  var BIGINT_FORMAT_RANGES = {
    int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
    uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
  };
  function pick(schema, mask2) {
    const currDef = schema._zod.def;
    const checks = currDef.checks;
    const hasChecks = checks && checks.length > 0;
    if (hasChecks) {
      throw new Error(".pick() cannot be used on object schemas containing refinements");
    }
    const def = mergeDefs(schema._zod.def, {
      get shape() {
        const newShape = {};
        for (const key2 in mask2) {
          if (!(key2 in currDef.shape)) {
            throw new Error(`Unrecognized key: "${key2}"`);
          }
          if (!mask2[key2])
            continue;
          newShape[key2] = currDef.shape[key2];
        }
        assignProp(this, "shape", newShape);
        return newShape;
      },
      checks: []
    });
    return clone2(schema, def);
  }
  function omit(schema, mask2) {
    const currDef = schema._zod.def;
    const checks = currDef.checks;
    const hasChecks = checks && checks.length > 0;
    if (hasChecks) {
      throw new Error(".omit() cannot be used on object schemas containing refinements");
    }
    const def = mergeDefs(schema._zod.def, {
      get shape() {
        const newShape = { ...schema._zod.def.shape };
        for (const key2 in mask2) {
          if (!(key2 in currDef.shape)) {
            throw new Error(`Unrecognized key: "${key2}"`);
          }
          if (!mask2[key2])
            continue;
          delete newShape[key2];
        }
        assignProp(this, "shape", newShape);
        return newShape;
      },
      checks: []
    });
    return clone2(schema, def);
  }
  function extend(schema, shape) {
    if (!isPlainObject(shape)) {
      throw new Error("Invalid input to extend: expected a plain object");
    }
    const checks = schema._zod.def.checks;
    const hasChecks = checks && checks.length > 0;
    if (hasChecks) {
      const existingShape = schema._zod.def.shape;
      for (const key2 in shape) {
        if (Object.getOwnPropertyDescriptor(existingShape, key2) !== void 0) {
          throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
        }
      }
    }
    const def = mergeDefs(schema._zod.def, {
      get shape() {
        const _shape = { ...schema._zod.def.shape, ...shape };
        assignProp(this, "shape", _shape);
        return _shape;
      }
    });
    return clone2(schema, def);
  }
  function safeExtend(schema, shape) {
    if (!isPlainObject(shape)) {
      throw new Error("Invalid input to safeExtend: expected a plain object");
    }
    const def = mergeDefs(schema._zod.def, {
      get shape() {
        const _shape = { ...schema._zod.def.shape, ...shape };
        assignProp(this, "shape", _shape);
        return _shape;
      }
    });
    return clone2(schema, def);
  }
  function merge(a5, b9) {
    if (a5._zod.def.checks?.length) {
      throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
    }
    const def = mergeDefs(a5._zod.def, {
      get shape() {
        const _shape = { ...a5._zod.def.shape, ...b9._zod.def.shape };
        assignProp(this, "shape", _shape);
        return _shape;
      },
      get catchall() {
        return b9._zod.def.catchall;
      },
      checks: b9._zod.def.checks ?? []
    });
    return clone2(a5, def);
  }
  function partial(Class2, schema, mask2) {
    const currDef = schema._zod.def;
    const checks = currDef.checks;
    const hasChecks = checks && checks.length > 0;
    if (hasChecks) {
      throw new Error(".partial() cannot be used on object schemas containing refinements");
    }
    const def = mergeDefs(schema._zod.def, {
      get shape() {
        const oldShape = schema._zod.def.shape;
        const shape = { ...oldShape };
        if (mask2) {
          for (const key2 in mask2) {
            if (!(key2 in oldShape)) {
              throw new Error(`Unrecognized key: "${key2}"`);
            }
            if (!mask2[key2])
              continue;
            shape[key2] = Class2 ? new Class2({
              type: "optional",
              innerType: oldShape[key2]
            }) : oldShape[key2];
          }
        } else {
          for (const key2 in oldShape) {
            shape[key2] = Class2 ? new Class2({
              type: "optional",
              innerType: oldShape[key2]
            }) : oldShape[key2];
          }
        }
        assignProp(this, "shape", shape);
        return shape;
      },
      checks: []
    });
    return clone2(schema, def);
  }
  function required(Class2, schema, mask2) {
    const def = mergeDefs(schema._zod.def, {
      get shape() {
        const oldShape = schema._zod.def.shape;
        const shape = { ...oldShape };
        if (mask2) {
          for (const key2 in mask2) {
            if (!(key2 in shape)) {
              throw new Error(`Unrecognized key: "${key2}"`);
            }
            if (!mask2[key2])
              continue;
            shape[key2] = new Class2({
              type: "nonoptional",
              innerType: oldShape[key2]
            });
          }
        } else {
          for (const key2 in oldShape) {
            shape[key2] = new Class2({
              type: "nonoptional",
              innerType: oldShape[key2]
            });
          }
        }
        assignProp(this, "shape", shape);
        return shape;
      }
    });
    return clone2(schema, def);
  }
  function aborted(x13, startIndex = 0) {
    if (x13.aborted === true)
      return true;
    for (let i5 = startIndex; i5 < x13.issues.length; i5++) {
      if (x13.issues[i5]?.continue !== true) {
        return true;
      }
    }
    return false;
  }
  function explicitlyAborted(x13, startIndex = 0) {
    if (x13.aborted === true)
      return true;
    for (let i5 = startIndex; i5 < x13.issues.length; i5++) {
      if (x13.issues[i5]?.continue === false) {
        return true;
      }
    }
    return false;
  }
  function prefixIssues(path, issues) {
    return issues.map((iss) => {
      var _a4;
      (_a4 = iss).path ?? (_a4.path = []);
      iss.path.unshift(path);
      return iss;
    });
  }
  function unwrapMessage(message) {
    return typeof message === "string" ? message : message?.message;
  }
  function finalizeIssue(iss, ctx, config2) {
    const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
    const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
    rest.path ?? (rest.path = []);
    rest.message = message;
    if (ctx?.reportInput) {
      rest.input = _input;
    }
    return rest;
  }
  function getSizableOrigin(input) {
    if (input instanceof Set)
      return "set";
    if (input instanceof Map)
      return "map";
    if (input instanceof File)
      return "file";
    return "unknown";
  }
  function getLengthableOrigin(input) {
    if (Array.isArray(input))
      return "array";
    if (typeof input === "string")
      return "string";
    return "unknown";
  }
  function parsedType(data) {
    const t = typeof data;
    switch (t) {
      case "number": {
        return Number.isNaN(data) ? "nan" : "number";
      }
      case "object": {
        if (data === null) {
          return "null";
        }
        if (Array.isArray(data)) {
          return "array";
        }
        const obj = data;
        if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) {
          return obj.constructor.name;
        }
      }
    }
    return t;
  }
  function issue(...args) {
    const [iss, input, inst] = args;
    if (typeof iss === "string") {
      return {
        message: iss,
        code: "custom",
        input,
        inst
      };
    }
    return { ...iss };
  }
  function cleanEnum(obj) {
    return Object.entries(obj).filter(([k7, _6]) => {
      return Number.isNaN(Number.parseInt(k7, 10));
    }).map((el) => el[1]);
  }
  function base64ToUint8Array(base644) {
    const binaryString = atob(base644);
    const bytes = new Uint8Array(binaryString.length);
    for (let i5 = 0; i5 < binaryString.length; i5++) {
      bytes[i5] = binaryString.charCodeAt(i5);
    }
    return bytes;
  }
  function uint8ArrayToBase64(bytes) {
    let binaryString = "";
    for (let i5 = 0; i5 < bytes.length; i5++) {
      binaryString += String.fromCharCode(bytes[i5]);
    }
    return btoa(binaryString);
  }
  function base64urlToUint8Array(base64url4) {
    const base644 = base64url4.replace(/-/g, "+").replace(/_/g, "/");
    const padding = "=".repeat((4 - base644.length % 4) % 4);
    return base64ToUint8Array(base644 + padding);
  }
  function uint8ArrayToBase64url(bytes) {
    return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
  }
  function hexToUint8Array(hex3) {
    const cleanHex = hex3.replace(/^0x/, "");
    if (cleanHex.length % 2 !== 0) {
      throw new Error("Invalid hex string length");
    }
    const bytes = new Uint8Array(cleanHex.length / 2);
    for (let i5 = 0; i5 < cleanHex.length; i5 += 2) {
      bytes[i5 / 2] = Number.parseInt(cleanHex.slice(i5, i5 + 2), 16);
    }
    return bytes;
  }
  function uint8ArrayToHex(bytes) {
    return Array.from(bytes).map((b9) => b9.toString(16).padStart(2, "0")).join("");
  }
  var Class = class {
    constructor(..._args) {
    }
  };

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
  var initializer = (inst, def) => {
    inst.name = "$ZodError";
    Object.defineProperty(inst, "_zod", {
      value: inst._zod,
      enumerable: false
    });
    Object.defineProperty(inst, "issues", {
      value: def,
      enumerable: false
    });
    inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
    Object.defineProperty(inst, "toString", {
      value: () => inst.message,
      enumerable: false
    });
  };
  var $ZodError = $constructor("$ZodError", initializer);
  var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
  function flattenError(error51, mapper = (issue2) => issue2.message) {
    const fieldErrors = {};
    const formErrors = [];
    for (const sub of error51.issues) {
      if (sub.path.length > 0) {
        fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
        fieldErrors[sub.path[0]].push(mapper(sub));
      } else {
        formErrors.push(mapper(sub));
      }
    }
    return { formErrors, fieldErrors };
  }
  function formatError(error51, mapper = (issue2) => issue2.message) {
    const fieldErrors = { _errors: [] };
    const processError = (error52, path = []) => {
      for (const issue2 of error52.issues) {
        if (issue2.code === "invalid_union" && issue2.errors.length) {
          issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
        } else if (issue2.code === "invalid_key") {
          processError({ issues: issue2.issues }, [...path, ...issue2.path]);
        } else if (issue2.code === "invalid_element") {
          processError({ issues: issue2.issues }, [...path, ...issue2.path]);
        } else {
          const fullpath = [...path, ...issue2.path];
          if (fullpath.length === 0) {
            fieldErrors._errors.push(mapper(issue2));
          } else {
            let curr = fieldErrors;
            let i5 = 0;
            while (i5 < fullpath.length) {
              const el = fullpath[i5];
              const terminal = i5 === fullpath.length - 1;
              if (!terminal) {
                curr[el] = curr[el] || { _errors: [] };
              } else {
                curr[el] = curr[el] || { _errors: [] };
                curr[el]._errors.push(mapper(issue2));
              }
              curr = curr[el];
              i5++;
            }
          }
        }
      }
    };
    processError(error51);
    return fieldErrors;
  }
  function treeifyError(error51, mapper = (issue2) => issue2.message) {
    const result = { errors: [] };
    const processError = (error52, path = []) => {
      var _a4, _b;
      for (const issue2 of error52.issues) {
        if (issue2.code === "invalid_union" && issue2.errors.length) {
          issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
        } else if (issue2.code === "invalid_key") {
          processError({ issues: issue2.issues }, [...path, ...issue2.path]);
        } else if (issue2.code === "invalid_element") {
          processError({ issues: issue2.issues }, [...path, ...issue2.path]);
        } else {
          const fullpath = [...path, ...issue2.path];
          if (fullpath.length === 0) {
            result.errors.push(mapper(issue2));
            continue;
          }
          let curr = result;
          let i5 = 0;
          while (i5 < fullpath.length) {
            const el = fullpath[i5];
            const terminal = i5 === fullpath.length - 1;
            if (typeof el === "string") {
              curr.properties ?? (curr.properties = {});
              (_a4 = curr.properties)[el] ?? (_a4[el] = { errors: [] });
              curr = curr.properties[el];
            } else {
              curr.items ?? (curr.items = []);
              (_b = curr.items)[el] ?? (_b[el] = { errors: [] });
              curr = curr.items[el];
            }
            if (terminal) {
              curr.errors.push(mapper(issue2));
            }
            i5++;
          }
        }
      }
    };
    processError(error51);
    return result;
  }
  function toDotPath(_path) {
    const segs = [];
    const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
    for (const seg of path) {
      if (typeof seg === "number")
        segs.push(`[${seg}]`);
      else if (typeof seg === "symbol")
        segs.push(`[${JSON.stringify(String(seg))}]`);
      else if (/[^\w$]/.test(seg))
        segs.push(`[${JSON.stringify(seg)}]`);
      else {
        if (segs.length)
          segs.push(".");
        segs.push(seg);
      }
    }
    return segs.join("");
  }
  function prettifyError(error51) {
    const lines = [];
    const issues = [...error51.issues].sort((a5, b9) => (a5.path ?? []).length - (b9.path ?? []).length);
    for (const issue2 of issues) {
      lines.push(`\u2716 ${issue2.message}`);
      if (issue2.path?.length)
        lines.push(`  \u2192 at ${toDotPath(issue2.path)}`);
    }
    return lines.join("\n");
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
    const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
    const result = schema._zod.run({ value, issues: [] }, ctx);
    if (result instanceof Promise) {
      throw new $ZodAsyncError();
    }
    if (result.issues.length) {
      const e2 = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
      captureStackTrace(e2, _params?.callee);
      throw e2;
    }
    return result.value;
  };
  var parse2 = /* @__PURE__ */ _parse($ZodRealError);
  var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
    const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
    let result = schema._zod.run({ value, issues: [] }, ctx);
    if (result instanceof Promise)
      result = await result;
    if (result.issues.length) {
      const e2 = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
      captureStackTrace(e2, params?.callee);
      throw e2;
    }
    return result.value;
  };
  var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError);
  var _safeParse = (_Err) => (schema, value, _ctx) => {
    const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
    const result = schema._zod.run({ value, issues: [] }, ctx);
    if (result instanceof Promise) {
      throw new $ZodAsyncError();
    }
    return result.issues.length ? {
      success: false,
      error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
    } : { success: true, data: result.value };
  };
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
    const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
    let result = schema._zod.run({ value, issues: [] }, ctx);
    if (result instanceof Promise)
      result = await result;
    return result.issues.length ? {
      success: false,
      error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
    } : { success: true, data: result.value };
  };
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
  var _encode = (_Err) => (schema, value, _ctx) => {
    const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
    return _parse(_Err)(schema, value, ctx);
  };
  var encode4 = /* @__PURE__ */ _encode($ZodRealError);
  var _decode = (_Err) => (schema, value, _ctx) => {
    return _parse(_Err)(schema, value, _ctx);
  };
  var decode2 = /* @__PURE__ */ _decode($ZodRealError);
  var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
    const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
    return _parseAsync(_Err)(schema, value, ctx);
  };
  var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
  var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
    return _parseAsync(_Err)(schema, value, _ctx);
  };
  var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
  var _safeEncode = (_Err) => (schema, value, _ctx) => {
    const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
    return _safeParse(_Err)(schema, value, ctx);
  };
  var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
  var _safeDecode = (_Err) => (schema, value, _ctx) => {
    return _safeParse(_Err)(schema, value, _ctx);
  };
  var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
  var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
    const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
    return _safeParseAsync(_Err)(schema, value, ctx);
  };
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
  var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
    return _safeParseAsync(_Err)(schema, value, _ctx);
  };
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.js
  var regexes_exports = {};
  __export(regexes_exports, {
    base64: () => base64,
    base64url: () => base64url,
    bigint: () => bigint,
    boolean: () => boolean2,
    browserEmail: () => browserEmail,
    cidrv4: () => cidrv4,
    cidrv6: () => cidrv6,
    cuid: () => cuid,
    cuid2: () => cuid2,
    date: () => date,
    datetime: () => datetime,
    domain: () => domain,
    duration: () => duration,
    e164: () => e164,
    email: () => email,
    emoji: () => emoji,
    extendedDuration: () => extendedDuration,
    guid: () => guid,
    hex: () => hex,
    hostname: () => hostname,
    html5Email: () => html5Email,
    httpProtocol: () => httpProtocol,
    idnEmail: () => idnEmail,
    integer: () => integer,
    ipv4: () => ipv4,
    ipv6: () => ipv6,
    ksuid: () => ksuid,
    lowercase: () => lowercase,
    mac: () => mac,
    md5_base64: () => md5_base64,
    md5_base64url: () => md5_base64url,
    md5_hex: () => md5_hex,
    nanoid: () => nanoid,
    null: () => _null,
    number: () => number2,
    rfc5322Email: () => rfc5322Email,
    sha1_base64: () => sha1_base64,
    sha1_base64url: () => sha1_base64url,
    sha1_hex: () => sha1_hex,
    sha256_base64: () => sha256_base64,
    sha256_base64url: () => sha256_base64url,
    sha256_hex: () => sha256_hex,
    sha384_base64: () => sha384_base64,
    sha384_base64url: () => sha384_base64url,
    sha384_hex: () => sha384_hex,
    sha512_base64: () => sha512_base64,
    sha512_base64url: () => sha512_base64url,
    sha512_hex: () => sha512_hex,
    string: () => string2,
    time: () => time,
    ulid: () => ulid,
    undefined: () => _undefined,
    unicodeEmail: () => unicodeEmail,
    uppercase: () => uppercase,
    uuid: () => uuid,
    uuid4: () => uuid4,
    uuid6: () => uuid6,
    uuid7: () => uuid7,
    xid: () => xid
  });
  init_node_compat_inject();
  var cuid = /^[cC][0-9a-z]{6,}$/;
  var cuid2 = /^[0-9a-z]+$/;
  var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
  var xid = /^[0-9a-vA-V]{20}$/;
  var ksuid = /^[A-Za-z0-9]{27}$/;
  var nanoid = /^[a-zA-Z0-9_-]{21}$/;
  var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
  var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
  var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
  var uuid = (version16) => {
    if (!version16)
      return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
    return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version16}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
  };
  var uuid4 = /* @__PURE__ */ uuid(4);
  var uuid6 = /* @__PURE__ */ uuid(6);
  var uuid7 = /* @__PURE__ */ uuid(7);
  var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
  var html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
  var rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
  var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u;
  var idnEmail = unicodeEmail;
  var browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
  var _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
  function emoji() {
    return new RegExp(_emoji, "u");
  }
  var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
  var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
  var mac = (delimiter) => {
    const escapedDelim = escapeRegex(delimiter ?? ":");
    return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
  };
  var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
  var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
  var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
  var base64url = /^[A-Za-z0-9_-]*$/;
  var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
  var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
  var httpProtocol = /^https?$/;
  var e164 = /^\+[1-9]\d{6,14}$/;
  var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
  var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
  function timeSource(args) {
    const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
    const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
    return regex;
  }
  function time(args) {
    return new RegExp(`^${timeSource(args)}$`);
  }
  function datetime(args) {
    const time3 = timeSource({ precision: args.precision });
    const opts = ["Z"];
    if (args.local)
      opts.push("");
    if (args.offset)
      opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);
    const timeRegex = `${time3}(?:${opts.join("|")})`;
    return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
  }
  var string2 = (params) => {
    const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
    return new RegExp(`^${regex}$`);
  };
  var bigint = /^-?\d+n?$/;
  var integer = /^-?\d+$/;
  var number2 = /^-?\d+(?:\.\d+)?$/;
  var boolean2 = /^(?:true|false)$/i;
  var _null = /^null$/i;
  var _undefined = /^undefined$/i;
  var lowercase = /^[^A-Z]*$/;
  var uppercase = /^[^a-z]*$/;
  var hex = /^[0-9a-fA-F]*$/;
  function fixedBase64(bodyLength, padding) {
    return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);
  }
  function fixedBase64url(length2) {
    return new RegExp(`^[A-Za-z0-9_-]{${length2}}$`);
  }
  var md5_hex = /^[0-9a-fA-F]{32}$/;
  var md5_base64 = /* @__PURE__ */ fixedBase64(22, "==");
  var md5_base64url = /* @__PURE__ */ fixedBase64url(22);
  var sha1_hex = /^[0-9a-fA-F]{40}$/;
  var sha1_base64 = /* @__PURE__ */ fixedBase64(27, "=");
  var sha1_base64url = /* @__PURE__ */ fixedBase64url(27);
  var sha256_hex = /^[0-9a-fA-F]{64}$/;
  var sha256_base64 = /* @__PURE__ */ fixedBase64(43, "=");
  var sha256_base64url = /* @__PURE__ */ fixedBase64url(43);
  var sha384_hex = /^[0-9a-fA-F]{96}$/;
  var sha384_base64 = /* @__PURE__ */ fixedBase64(64, "");
  var sha384_base64url = /* @__PURE__ */ fixedBase64url(64);
  var sha512_hex = /^[0-9a-fA-F]{128}$/;
  var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
  var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.js
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
    var _a4;
    inst._zod ?? (inst._zod = {});
    inst._zod.def = def;
    (_a4 = inst._zod).onattach ?? (_a4.onattach = []);
  });
  var numericOriginMap = {
    number: "number",
    bigint: "bigint",
    object: "date"
  };
  var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
    $ZodCheck.init(inst, def);
    const origin2 = numericOriginMap[typeof def.value];
    inst._zod.onattach.push((inst2) => {
      const bag = inst2._zod.bag;
      const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
      if (def.value < curr) {
        if (def.inclusive)
          bag.maximum = def.value;
        else
          bag.exclusiveMaximum = def.value;
      }
    });
    inst._zod.check = (payload) => {
      if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {
        return;
      }
      payload.issues.push({
        origin: origin2,
        code: "too_big",
        maximum: typeof def.value === "object" ? def.value.getTime() : def.value,
        input: payload.value,
        inclusive: def.inclusive,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
    $ZodCheck.init(inst, def);
    const origin2 = numericOriginMap[typeof def.value];
    inst._zod.onattach.push((inst2) => {
      const bag = inst2._zod.bag;
      const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
      if (def.value > curr) {
        if (def.inclusive)
          bag.minimum = def.value;
        else
          bag.exclusiveMinimum = def.value;
      }
    });
    inst._zod.check = (payload) => {
      if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
        return;
      }
      payload.issues.push({
        origin: origin2,
        code: "too_small",
        minimum: typeof def.value === "object" ? def.value.getTime() : def.value,
        input: payload.value,
        inclusive: def.inclusive,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
    $ZodCheck.init(inst, def);
    inst._zod.onattach.push((inst2) => {
      var _a4;
      (_a4 = inst2._zod.bag).multipleOf ?? (_a4.multipleOf = def.value);
    });
    inst._zod.check = (payload) => {
      if (typeof payload.value !== typeof def.value)
        throw new Error("Cannot mix number and bigint in multiple_of check.");
      const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0;
      if (isMultiple)
        return;
      payload.issues.push({
        origin: typeof payload.value,
        code: "not_multiple_of",
        divisor: def.value,
        input: payload.value,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => {
    $ZodCheck.init(inst, def);
    def.format = def.format || "float64";
    const isInt = def.format?.includes("int");
    const origin2 = isInt ? "int" : "number";
    const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
    inst._zod.onattach.push((inst2) => {
      const bag = inst2._zod.bag;
      bag.format = def.format;
      bag.minimum = minimum;
      bag.maximum = maximum;
      if (isInt)
        bag.pattern = integer;
    });
    inst._zod.check = (payload) => {
      const input = payload.value;
      if (isInt) {
        if (!Number.isInteger(input)) {
          payload.issues.push({
            expected: origin2,
            format: def.format,
            code: "invalid_type",
            continue: false,
            input,
            inst
          });
          return;
        }
        if (!Number.isSafeInteger(input)) {
          if (input > 0) {
            payload.issues.push({
              input,
              code: "too_big",
              maximum: Number.MAX_SAFE_INTEGER,
              note: "Integers must be within the safe integer range.",
              inst,
              origin: origin2,
              inclusive: true,
              continue: !def.abort
            });
          } else {
            payload.issues.push({
              input,
              code: "too_small",
              minimum: Number.MIN_SAFE_INTEGER,
              note: "Integers must be within the safe integer range.",
              inst,
              origin: origin2,
              inclusive: true,
              continue: !def.abort
            });
          }
          return;
        }
      }
      if (input < minimum) {
        payload.issues.push({
          origin: "number",
          input,
          code: "too_small",
          minimum,
          inclusive: true,
          inst,
          continue: !def.abort
        });
      }
      if (input > maximum) {
        payload.issues.push({
          origin: "number",
          input,
          code: "too_big",
          maximum,
          inclusive: true,
          inst,
          continue: !def.abort
        });
      }
    };
  });
  var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => {
    $ZodCheck.init(inst, def);
    const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format];
    inst._zod.onattach.push((inst2) => {
      const bag = inst2._zod.bag;
      bag.format = def.format;
      bag.minimum = minimum;
      bag.maximum = maximum;
    });
    inst._zod.check = (payload) => {
      const input = payload.value;
      if (input < minimum) {
        payload.issues.push({
          origin: "bigint",
          input,
          code: "too_small",
          minimum,
          inclusive: true,
          inst,
          continue: !def.abort
        });
      }
      if (input > maximum) {
        payload.issues.push({
          origin: "bigint",
          input,
          code: "too_big",
          maximum,
          inclusive: true,
          inst,
          continue: !def.abort
        });
      }
    };
  });
  var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
    var _a4;
    $ZodCheck.init(inst, def);
    (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
      const val = payload.value;
      return !nullish(val) && val.size !== void 0;
    });
    inst._zod.onattach.push((inst2) => {
      const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
      if (def.maximum < curr)
        inst2._zod.bag.maximum = def.maximum;
    });
    inst._zod.check = (payload) => {
      const input = payload.value;
      const size5 = input.size;
      if (size5 <= def.maximum)
        return;
      payload.issues.push({
        origin: getSizableOrigin(input),
        code: "too_big",
        maximum: def.maximum,
        inclusive: true,
        input,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
    var _a4;
    $ZodCheck.init(inst, def);
    (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
      const val = payload.value;
      return !nullish(val) && val.size !== void 0;
    });
    inst._zod.onattach.push((inst2) => {
      const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
      if (def.minimum > curr)
        inst2._zod.bag.minimum = def.minimum;
    });
    inst._zod.check = (payload) => {
      const input = payload.value;
      const size5 = input.size;
      if (size5 >= def.minimum)
        return;
      payload.issues.push({
        origin: getSizableOrigin(input),
        code: "too_small",
        minimum: def.minimum,
        inclusive: true,
        input,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
    var _a4;
    $ZodCheck.init(inst, def);
    (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
      const val = payload.value;
      return !nullish(val) && val.size !== void 0;
    });
    inst._zod.onattach.push((inst2) => {
      const bag = inst2._zod.bag;
      bag.minimum = def.size;
      bag.maximum = def.size;
      bag.size = def.size;
    });
    inst._zod.check = (payload) => {
      const input = payload.value;
      const size5 = input.size;
      if (size5 === def.size)
        return;
      const tooBig = size5 > def.size;
      payload.issues.push({
        origin: getSizableOrigin(input),
        ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
        inclusive: true,
        exact: true,
        input: payload.value,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
    var _a4;
    $ZodCheck.init(inst, def);
    (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
      const val = payload.value;
      return !nullish(val) && val.length !== void 0;
    });
    inst._zod.onattach.push((inst2) => {
      const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
      if (def.maximum < curr)
        inst2._zod.bag.maximum = def.maximum;
    });
    inst._zod.check = (payload) => {
      const input = payload.value;
      const length2 = input.length;
      if (length2 <= def.maximum)
        return;
      const origin2 = getLengthableOrigin(input);
      payload.issues.push({
        origin: origin2,
        code: "too_big",
        maximum: def.maximum,
        inclusive: true,
        input,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
    var _a4;
    $ZodCheck.init(inst, def);
    (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
      const val = payload.value;
      return !nullish(val) && val.length !== void 0;
    });
    inst._zod.onattach.push((inst2) => {
      const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
      if (def.minimum > curr)
        inst2._zod.bag.minimum = def.minimum;
    });
    inst._zod.check = (payload) => {
      const input = payload.value;
      const length2 = input.length;
      if (length2 >= def.minimum)
        return;
      const origin2 = getLengthableOrigin(input);
      payload.issues.push({
        origin: origin2,
        code: "too_small",
        minimum: def.minimum,
        inclusive: true,
        input,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
    var _a4;
    $ZodCheck.init(inst, def);
    (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
      const val = payload.value;
      return !nullish(val) && val.length !== void 0;
    });
    inst._zod.onattach.push((inst2) => {
      const bag = inst2._zod.bag;
      bag.minimum = def.length;
      bag.maximum = def.length;
      bag.length = def.length;
    });
    inst._zod.check = (payload) => {
      const input = payload.value;
      const length2 = input.length;
      if (length2 === def.length)
        return;
      const origin2 = getLengthableOrigin(input);
      const tooBig = length2 > def.length;
      payload.issues.push({
        origin: origin2,
        ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
        inclusive: true,
        exact: true,
        input: payload.value,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
    var _a4, _b;
    $ZodCheck.init(inst, def);
    inst._zod.onattach.push((inst2) => {
      const bag = inst2._zod.bag;
      bag.format = def.format;
      if (def.pattern) {
        bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
        bag.patterns.add(def.pattern);
      }
    });
    if (def.pattern)
      (_a4 = inst._zod).check ?? (_a4.check = (payload) => {
        def.pattern.lastIndex = 0;
        if (def.pattern.test(payload.value))
          return;
        payload.issues.push({
          origin: "string",
          code: "invalid_format",
          format: def.format,
          input: payload.value,
          ...def.pattern ? { pattern: def.pattern.toString() } : {},
          inst,
          continue: !def.abort
        });
      });
    else
      (_b = inst._zod).check ?? (_b.check = () => {
      });
  });
  var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
    $ZodCheckStringFormat.init(inst, def);
    inst._zod.check = (payload) => {
      def.pattern.lastIndex = 0;
      if (def.pattern.test(payload.value))
        return;
      payload.issues.push({
        origin: "string",
        code: "invalid_format",
        format: "regex",
        input: payload.value,
        pattern: def.pattern.toString(),
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => {
    def.pattern ?? (def.pattern = lowercase);
    $ZodCheckStringFormat.init(inst, def);
  });
  var $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => {
    def.pattern ?? (def.pattern = uppercase);
    $ZodCheckStringFormat.init(inst, def);
  });
  var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => {
    $ZodCheck.init(inst, def);
    const escapedRegex = escapeRegex(def.includes);
    const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);
    def.pattern = pattern;
    inst._zod.onattach.push((inst2) => {
      const bag = inst2._zod.bag;
      bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
      bag.patterns.add(pattern);
    });
    inst._zod.check = (payload) => {
      if (payload.value.includes(def.includes, def.position))
        return;
      payload.issues.push({
        origin: "string",
        code: "invalid_format",
        format: "includes",
        includes: def.includes,
        input: payload.value,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => {
    $ZodCheck.init(inst, def);
    const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
    def.pattern ?? (def.pattern = pattern);
    inst._zod.onattach.push((inst2) => {
      const bag = inst2._zod.bag;
      bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
      bag.patterns.add(pattern);
    });
    inst._zod.check = (payload) => {
      if (payload.value.startsWith(def.prefix))
        return;
      payload.issues.push({
        origin: "string",
        code: "invalid_format",
        format: "starts_with",
        prefix: def.prefix,
        input: payload.value,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => {
    $ZodCheck.init(inst, def);
    const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
    def.pattern ?? (def.pattern = pattern);
    inst._zod.onattach.push((inst2) => {
      const bag = inst2._zod.bag;
      bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
      bag.patterns.add(pattern);
    });
    inst._zod.check = (payload) => {
      if (payload.value.endsWith(def.suffix))
        return;
      payload.issues.push({
        origin: "string",
        code: "invalid_format",
        format: "ends_with",
        suffix: def.suffix,
        input: payload.value,
        inst,
        continue: !def.abort
      });
    };
  });
  function handleCheckPropertyResult(result, payload, property) {
    if (result.issues.length) {
      payload.issues.push(...prefixIssues(property, result.issues));
    }
  }
  var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst, def) => {
    $ZodCheck.init(inst, def);
    inst._zod.check = (payload) => {
      const result = def.schema._zod.run({
        value: payload.value[def.property],
        issues: []
      }, {});
      if (result instanceof Promise) {
        return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property));
      }
      handleCheckPropertyResult(result, payload, def.property);
      return;
    };
  });
  var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => {
    $ZodCheck.init(inst, def);
    const mimeSet = new Set(def.mime);
    inst._zod.onattach.push((inst2) => {
      inst2._zod.bag.mime = def.mime;
    });
    inst._zod.check = (payload) => {
      if (mimeSet.has(payload.value.type))
        return;
      payload.issues.push({
        code: "invalid_value",
        values: def.mime,
        input: payload.value.type,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => {
    $ZodCheck.init(inst, def);
    inst._zod.check = (payload) => {
      payload.value = def.tx(payload.value);
    };
  });

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/doc.js
  init_node_compat_inject();
  var Doc = class {
    constructor(args = []) {
      this.content = [];
      this.indent = 0;
      if (this)
        this.args = args;
    }
    indented(fn) {
      this.indent += 1;
      fn(this);
      this.indent -= 1;
    }
    write(arg) {
      if (typeof arg === "function") {
        arg(this, { execution: "sync" });
        arg(this, { execution: "async" });
        return;
      }
      const content = arg;
      const lines = content.split("\n").filter((x13) => x13);
      const minIndent = Math.min(...lines.map((x13) => x13.length - x13.trimStart().length));
      const dedented = lines.map((x13) => x13.slice(minIndent)).map((x13) => " ".repeat(this.indent * 2) + x13);
      for (const line of dedented) {
        this.content.push(line);
      }
    }
    compile() {
      const F6 = Function;
      const args = this?.args;
      const content = this?.content ?? [``];
      const lines = [...content.map((x13) => `  ${x13}`)];
      return new F6(...args, lines.join("\n"));
    }
  };

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.js
  init_node_compat_inject();
  var version5 = {
    major: 4,
    minor: 4,
    patch: 3
  };

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.js
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
    var _a4;
    inst ?? (inst = {});
    inst._zod.def = def;
    inst._zod.bag = inst._zod.bag || {};
    inst._zod.version = version5;
    const checks = [...inst._zod.def.checks ?? []];
    if (inst._zod.traits.has("$ZodCheck")) {
      checks.unshift(inst);
    }
    for (const ch of checks) {
      for (const fn of ch._zod.onattach) {
        fn(inst);
      }
    }
    if (checks.length === 0) {
      (_a4 = inst._zod).deferred ?? (_a4.deferred = []);
      inst._zod.deferred?.push(() => {
        inst._zod.run = inst._zod.parse;
      });
    } else {
      const runChecks = (payload, checks2, ctx) => {
        let isAborted = aborted(payload);
        let asyncResult;
        for (const ch of checks2) {
          if (ch._zod.def.when) {
            if (explicitlyAborted(payload))
              continue;
            const shouldRun = ch._zod.def.when(payload);
            if (!shouldRun)
              continue;
          } else if (isAborted) {
            continue;
          }
          const currLen = payload.issues.length;
          const _6 = ch._zod.check(payload);
          if (_6 instanceof Promise && ctx?.async === false) {
            throw new $ZodAsyncError();
          }
          if (asyncResult || _6 instanceof Promise) {
            asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
              await _6;
              const nextLen = payload.issues.length;
              if (nextLen === currLen)
                return;
              if (!isAborted)
                isAborted = aborted(payload, currLen);
            });
          } else {
            const nextLen = payload.issues.length;
            if (nextLen === currLen)
              continue;
            if (!isAborted)
              isAborted = aborted(payload, currLen);
          }
        }
        if (asyncResult) {
          return asyncResult.then(() => {
            return payload;
          });
        }
        return payload;
      };
      const handleCanaryResult = (canary, payload, ctx) => {
        if (aborted(canary)) {
          canary.aborted = true;
          return canary;
        }
        const checkResult = runChecks(payload, checks, ctx);
        if (checkResult instanceof Promise) {
          if (ctx.async === false)
            throw new $ZodAsyncError();
          return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx));
        }
        return inst._zod.parse(checkResult, ctx);
      };
      inst._zod.run = (payload, ctx) => {
        if (ctx.skipChecks) {
          return inst._zod.parse(payload, ctx);
        }
        if (ctx.direction === "backward") {
          const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
          if (canary instanceof Promise) {
            return canary.then((canary2) => {
              return handleCanaryResult(canary2, payload, ctx);
            });
          }
          return handleCanaryResult(canary, payload, ctx);
        }
        const result = inst._zod.parse(payload, ctx);
        if (result instanceof Promise) {
          if (ctx.async === false)
            throw new $ZodAsyncError();
          return result.then((result2) => runChecks(result2, checks, ctx));
        }
        return runChecks(result, checks, ctx);
      };
    }
    defineLazy(inst, "~standard", () => ({
      validate: (value) => {
        try {
          const r3 = safeParse(inst, value);
          return r3.success ? { value: r3.data } : { issues: r3.error?.issues };
        } catch (_6) {
          return safeParseAsync(inst, value).then((r3) => r3.success ? { value: r3.data } : { issues: r3.error?.issues });
        }
      },
      vendor: "zod",
      version: 1
    }));
  });
  var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string2(inst._zod.bag);
    inst._zod.parse = (payload, _6) => {
      if (def.coerce)
        try {
          payload.value = String(payload.value);
        } catch (_7) {
        }
      if (typeof payload.value === "string")
        return payload;
      payload.issues.push({
        expected: "string",
        code: "invalid_type",
        input: payload.value,
        inst
      });
      return payload;
    };
  });
  var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => {
    $ZodCheckStringFormat.init(inst, def);
    $ZodString.init(inst, def);
  });
  var $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => {
    def.pattern ?? (def.pattern = guid);
    $ZodStringFormat.init(inst, def);
  });
  var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
    if (def.version) {
      const versionMap = {
        v1: 1,
        v2: 2,
        v3: 3,
        v4: 4,
        v5: 5,
        v6: 6,
        v7: 7,
        v8: 8
      };
      const v13 = versionMap[def.version];
      if (v13 === void 0)
        throw new Error(`Invalid UUID version: "${def.version}"`);
      def.pattern ?? (def.pattern = uuid(v13));
    } else
      def.pattern ?? (def.pattern = uuid());
    $ZodStringFormat.init(inst, def);
  });
  var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
    def.pattern ?? (def.pattern = email);
    $ZodStringFormat.init(inst, def);
  });
  var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
    $ZodStringFormat.init(inst, def);
    inst._zod.check = (payload) => {
      try {
        const trimmed = payload.value.trim();
        if (!def.normalize && def.protocol?.source === httpProtocol.source) {
          if (!/^https?:\/\//i.test(trimmed)) {
            payload.issues.push({
              code: "invalid_format",
              format: "url",
              note: "Invalid URL format",
              input: payload.value,
              inst,
              continue: !def.abort
            });
            return;
          }
        }
        const url2 = new URL(trimmed);
        if (def.hostname) {
          def.hostname.lastIndex = 0;
          if (!def.hostname.test(url2.hostname)) {
            payload.issues.push({
              code: "invalid_format",
              format: "url",
              note: "Invalid hostname",
              pattern: def.hostname.source,
              input: payload.value,
              inst,
              continue: !def.abort
            });
          }
        }
        if (def.protocol) {
          def.protocol.lastIndex = 0;
          if (!def.protocol.test(url2.protocol.endsWith(":") ? url2.protocol.slice(0, -1) : url2.protocol)) {
            payload.issues.push({
              code: "invalid_format",
              format: "url",
              note: "Invalid protocol",
              pattern: def.protocol.source,
              input: payload.value,
              inst,
              continue: !def.abort
            });
          }
        }
        if (def.normalize) {
          payload.value = url2.href;
        } else {
          payload.value = trimmed;
        }
        return;
      } catch (_6) {
        payload.issues.push({
          code: "invalid_format",
          format: "url",
          input: payload.value,
          inst,
          continue: !def.abort
        });
      }
    };
  });
  var $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => {
    def.pattern ?? (def.pattern = emoji());
    $ZodStringFormat.init(inst, def);
  });
  var $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
    def.pattern ?? (def.pattern = nanoid);
    $ZodStringFormat.init(inst, def);
  });
  var $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => {
    def.pattern ?? (def.pattern = cuid);
    $ZodStringFormat.init(inst, def);
  });
  var $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => {
    def.pattern ?? (def.pattern = cuid2);
    $ZodStringFormat.init(inst, def);
  });
  var $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => {
    def.pattern ?? (def.pattern = ulid);
    $ZodStringFormat.init(inst, def);
  });
  var $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => {
    def.pattern ?? (def.pattern = xid);
    $ZodStringFormat.init(inst, def);
  });
  var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
    def.pattern ?? (def.pattern = ksuid);
    $ZodStringFormat.init(inst, def);
  });
  var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
    def.pattern ?? (def.pattern = datetime(def));
    $ZodStringFormat.init(inst, def);
  });
  var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
    def.pattern ?? (def.pattern = date);
    $ZodStringFormat.init(inst, def);
  });
  var $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
    def.pattern ?? (def.pattern = time(def));
    $ZodStringFormat.init(inst, def);
  });
  var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
    def.pattern ?? (def.pattern = duration);
    $ZodStringFormat.init(inst, def);
  });
  var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
    def.pattern ?? (def.pattern = ipv4);
    $ZodStringFormat.init(inst, def);
    inst._zod.bag.format = `ipv4`;
  });
  var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
    def.pattern ?? (def.pattern = ipv6);
    $ZodStringFormat.init(inst, def);
    inst._zod.bag.format = `ipv6`;
    inst._zod.check = (payload) => {
      try {
        new URL(`http://[${payload.value}]`);
      } catch {
        payload.issues.push({
          code: "invalid_format",
          format: "ipv6",
          input: payload.value,
          inst,
          continue: !def.abort
        });
      }
    };
  });
  var $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => {
    def.pattern ?? (def.pattern = mac(def.delimiter));
    $ZodStringFormat.init(inst, def);
    inst._zod.bag.format = `mac`;
  });
  var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
    def.pattern ?? (def.pattern = cidrv4);
    $ZodStringFormat.init(inst, def);
  });
  var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
    def.pattern ?? (def.pattern = cidrv6);
    $ZodStringFormat.init(inst, def);
    inst._zod.check = (payload) => {
      const parts = payload.value.split("/");
      try {
        if (parts.length !== 2)
          throw new Error();
        const [address, prefix] = parts;
        if (!prefix)
          throw new Error();
        const prefixNum = Number(prefix);
        if (`${prefixNum}` !== prefix)
          throw new Error();
        if (prefixNum < 0 || prefixNum > 128)
          throw new Error();
        new URL(`http://[${address}]`);
      } catch {
        payload.issues.push({
          code: "invalid_format",
          format: "cidrv6",
          input: payload.value,
          inst,
          continue: !def.abort
        });
      }
    };
  });
  function isValidBase64(data) {
    if (data === "")
      return true;
    if (/\s/.test(data))
      return false;
    if (data.length % 4 !== 0)
      return false;
    try {
      atob(data);
      return true;
    } catch {
      return false;
    }
  }
  var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
    def.pattern ?? (def.pattern = base64);
    $ZodStringFormat.init(inst, def);
    inst._zod.bag.contentEncoding = "base64";
    inst._zod.check = (payload) => {
      if (isValidBase64(payload.value))
        return;
      payload.issues.push({
        code: "invalid_format",
        format: "base64",
        input: payload.value,
        inst,
        continue: !def.abort
      });
    };
  });
  function isValidBase64URL(data) {
    if (!base64url.test(data))
      return false;
    const base644 = data.replace(/[-_]/g, (c7) => c7 === "-" ? "+" : "/");
    const padded = base644.padEnd(Math.ceil(base644.length / 4) * 4, "=");
    return isValidBase64(padded);
  }
  var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
    def.pattern ?? (def.pattern = base64url);
    $ZodStringFormat.init(inst, def);
    inst._zod.bag.contentEncoding = "base64url";
    inst._zod.check = (payload) => {
      if (isValidBase64URL(payload.value))
        return;
      payload.issues.push({
        code: "invalid_format",
        format: "base64url",
        input: payload.value,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => {
    def.pattern ?? (def.pattern = e164);
    $ZodStringFormat.init(inst, def);
  });
  function isValidJWT(token, algorithm = null) {
    try {
      const tokensParts = token.split(".");
      if (tokensParts.length !== 3)
        return false;
      const [header] = tokensParts;
      if (!header)
        return false;
      const parsedHeader = JSON.parse(atob(header));
      if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
        return false;
      if (!parsedHeader.alg)
        return false;
      if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
        return false;
      return true;
    } catch {
      return false;
    }
  }
  var $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
    $ZodStringFormat.init(inst, def);
    inst._zod.check = (payload) => {
      if (isValidJWT(payload.value, def.alg))
        return;
      payload.issues.push({
        code: "invalid_format",
        format: "jwt",
        input: payload.value,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
    $ZodStringFormat.init(inst, def);
    inst._zod.check = (payload) => {
      if (def.fn(payload.value))
        return;
      payload.issues.push({
        code: "invalid_format",
        format: def.format,
        input: payload.value,
        inst,
        continue: !def.abort
      });
    };
  });
  var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.pattern = inst._zod.bag.pattern ?? number2;
    inst._zod.parse = (payload, _ctx) => {
      if (def.coerce)
        try {
          payload.value = Number(payload.value);
        } catch (_6) {
        }
      const input = payload.value;
      if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
        return payload;
      }
      const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
      payload.issues.push({
        expected: "number",
        code: "invalid_type",
        input,
        inst,
        ...received ? { received } : {}
      });
      return payload;
    };
  });
  var $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => {
    $ZodCheckNumberFormat.init(inst, def);
    $ZodNumber.init(inst, def);
  });
  var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.pattern = boolean2;
    inst._zod.parse = (payload, _ctx) => {
      if (def.coerce)
        try {
          payload.value = Boolean(payload.value);
        } catch (_6) {
        }
      const input = payload.value;
      if (typeof input === "boolean")
        return payload;
      payload.issues.push({
        expected: "boolean",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    };
  });
  var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.pattern = bigint;
    inst._zod.parse = (payload, _ctx) => {
      if (def.coerce)
        try {
          payload.value = BigInt(payload.value);
        } catch (_6) {
        }
      if (typeof payload.value === "bigint")
        return payload;
      payload.issues.push({
        expected: "bigint",
        code: "invalid_type",
        input: payload.value,
        inst
      });
      return payload;
    };
  });
  var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, def) => {
    $ZodCheckBigIntFormat.init(inst, def);
    $ZodBigInt.init(inst, def);
  });
  var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, _ctx) => {
      const input = payload.value;
      if (typeof input === "symbol")
        return payload;
      payload.issues.push({
        expected: "symbol",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    };
  });
  var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.pattern = _undefined;
    inst._zod.values = /* @__PURE__ */ new Set([void 0]);
    inst._zod.parse = (payload, _ctx) => {
      const input = payload.value;
      if (typeof input === "undefined")
        return payload;
      payload.issues.push({
        expected: "undefined",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    };
  });
  var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.pattern = _null;
    inst._zod.values = /* @__PURE__ */ new Set([null]);
    inst._zod.parse = (payload, _ctx) => {
      const input = payload.value;
      if (input === null)
        return payload;
      payload.issues.push({
        expected: "null",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    };
  });
  var $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload) => payload;
  });
  var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload) => payload;
  });
  var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, _ctx) => {
      payload.issues.push({
        expected: "never",
        code: "invalid_type",
        input: payload.value,
        inst
      });
      return payload;
    };
  });
  var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, _ctx) => {
      const input = payload.value;
      if (typeof input === "undefined")
        return payload;
      payload.issues.push({
        expected: "void",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    };
  });
  var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, _ctx) => {
      if (def.coerce) {
        try {
          payload.value = new Date(payload.value);
        } catch (_err) {
        }
      }
      const input = payload.value;
      const isDate = input instanceof Date;
      const isValidDate = isDate && !Number.isNaN(input.getTime());
      if (isValidDate)
        return payload;
      payload.issues.push({
        expected: "date",
        code: "invalid_type",
        input,
        ...isDate ? { received: "Invalid Date" } : {},
        inst
      });
      return payload;
    };
  });
  function handleArrayResult(result, final, index2) {
    if (result.issues.length) {
      final.issues.push(...prefixIssues(index2, result.issues));
    }
    final.value[index2] = result.value;
  }
  var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, ctx) => {
      const input = payload.value;
      if (!Array.isArray(input)) {
        payload.issues.push({
          expected: "array",
          code: "invalid_type",
          input,
          inst
        });
        return payload;
      }
      payload.value = Array(input.length);
      const proms = [];
      for (let i5 = 0; i5 < input.length; i5++) {
        const item = input[i5];
        const result = def.element._zod.run({
          value: item,
          issues: []
        }, ctx);
        if (result instanceof Promise) {
          proms.push(result.then((result2) => handleArrayResult(result2, payload, i5)));
        } else {
          handleArrayResult(result, payload, i5);
        }
      }
      if (proms.length) {
        return Promise.all(proms).then(() => payload);
      }
      return payload;
    };
  });
  function handlePropertyResult(result, final, key2, input, isOptionalIn, isOptionalOut) {
    const isPresent = key2 in input;
    if (result.issues.length) {
      if (isOptionalIn && isOptionalOut && !isPresent) {
        return;
      }
      final.issues.push(...prefixIssues(key2, result.issues));
    }
    if (!isPresent && !isOptionalIn) {
      if (!result.issues.length) {
        final.issues.push({
          code: "invalid_type",
          expected: "nonoptional",
          input: void 0,
          path: [key2]
        });
      }
      return;
    }
    if (result.value === void 0) {
      if (isPresent) {
        final.value[key2] = void 0;
      }
    } else {
      final.value[key2] = result.value;
    }
  }
  function normalizeDef(def) {
    const keys2 = Object.keys(def.shape);
    for (const k7 of keys2) {
      if (!def.shape?.[k7]?._zod?.traits?.has("$ZodType")) {
        throw new Error(`Invalid element at key "${k7}": expected a Zod schema`);
      }
    }
    const okeys = optionalKeys(def.shape);
    return {
      ...def,
      keys: keys2,
      keySet: new Set(keys2),
      numKeys: keys2.length,
      optionalKeys: new Set(okeys)
    };
  }
  function handleCatchall(proms, input, payload, ctx, def, inst) {
    const unrecognized = [];
    const keySet = def.keySet;
    const _catchall = def.catchall._zod;
    const t = _catchall.def.type;
    const isOptionalIn = _catchall.optin === "optional";
    const isOptionalOut = _catchall.optout === "optional";
    for (const key2 in input) {
      if (key2 === "__proto__")
        continue;
      if (keySet.has(key2))
        continue;
      if (t === "never") {
        unrecognized.push(key2);
        continue;
      }
      const r3 = _catchall.run({ value: input[key2], issues: [] }, ctx);
      if (r3 instanceof Promise) {
        proms.push(r3.then((r4) => handlePropertyResult(r4, payload, key2, input, isOptionalIn, isOptionalOut)));
      } else {
        handlePropertyResult(r3, payload, key2, input, isOptionalIn, isOptionalOut);
      }
    }
    if (unrecognized.length) {
      payload.issues.push({
        code: "unrecognized_keys",
        keys: unrecognized,
        input,
        inst
      });
    }
    if (!proms.length)
      return payload;
    return Promise.all(proms).then(() => {
      return payload;
    });
  }
  var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
    $ZodType.init(inst, def);
    const desc = Object.getOwnPropertyDescriptor(def, "shape");
    if (!desc?.get) {
      const sh = def.shape;
      Object.defineProperty(def, "shape", {
        get: () => {
          const newSh = { ...sh };
          Object.defineProperty(def, "shape", {
            value: newSh
          });
          return newSh;
        }
      });
    }
    const _normalized = cached(() => normalizeDef(def));
    defineLazy(inst._zod, "propValues", () => {
      const shape = def.shape;
      const propValues = {};
      for (const key2 in shape) {
        const field = shape[key2]._zod;
        if (field.values) {
          propValues[key2] ?? (propValues[key2] = /* @__PURE__ */ new Set());
          for (const v13 of field.values)
            propValues[key2].add(v13);
        }
      }
      return propValues;
    });
    const isObject3 = isObject2;
    const catchall = def.catchall;
    let value;
    inst._zod.parse = (payload, ctx) => {
      value ?? (value = _normalized.value);
      const input = payload.value;
      if (!isObject3(input)) {
        payload.issues.push({
          expected: "object",
          code: "invalid_type",
          input,
          inst
        });
        return payload;
      }
      payload.value = {};
      const proms = [];
      const shape = value.shape;
      for (const key2 of value.keys) {
        const el = shape[key2];
        const isOptionalIn = el._zod.optin === "optional";
        const isOptionalOut = el._zod.optout === "optional";
        const r3 = el._zod.run({ value: input[key2], issues: [] }, ctx);
        if (r3 instanceof Promise) {
          proms.push(r3.then((r4) => handlePropertyResult(r4, payload, key2, input, isOptionalIn, isOptionalOut)));
        } else {
          handlePropertyResult(r3, payload, key2, input, isOptionalIn, isOptionalOut);
        }
      }
      if (!catchall) {
        return proms.length ? Promise.all(proms).then(() => payload) : payload;
      }
      return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
    };
  });
  var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
    $ZodObject.init(inst, def);
    const superParse = inst._zod.parse;
    const _normalized = cached(() => normalizeDef(def));
    const generateFastpass = (shape) => {
      const doc = new Doc(["shape", "payload", "ctx"]);
      const normalized = _normalized.value;
      const parseStr = (key2) => {
        const k7 = esc(key2);
        return `shape[${k7}]._zod.run({ value: input[${k7}], issues: [] }, ctx)`;
      };
      doc.write(`const input = payload.value;`);
      const ids = /* @__PURE__ */ Object.create(null);
      let counter = 0;
      for (const key2 of normalized.keys) {
        ids[key2] = `key_${counter++}`;
      }
      doc.write(`const newResult = {};`);
      for (const key2 of normalized.keys) {
        const id = ids[key2];
        const k7 = esc(key2);
        const schema = shape[key2];
        const isOptionalIn = schema?._zod?.optin === "optional";
        const isOptionalOut = schema?._zod?.optout === "optional";
        doc.write(`const ${id} = ${parseStr(key2)};`);
        if (isOptionalIn && isOptionalOut) {
          doc.write(`
        if (${id}.issues.length) {
          if (${k7} in input) {
            payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
              ...iss,
              path: iss.path ? [${k7}, ...iss.path] : [${k7}]
            })));
          }
        }
        
        if (${id}.value === undefined) {
          if (${k7} in input) {
            newResult[${k7}] = undefined;
          }
        } else {
          newResult[${k7}] = ${id}.value;
        }
        
      `);
        } else if (!isOptionalIn) {
          doc.write(`
        const ${id}_present = ${k7} in input;
        if (${id}.issues.length) {
          payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${k7}, ...iss.path] : [${k7}]
          })));
        }
        if (!${id}_present && !${id}.issues.length) {
          payload.issues.push({
            code: "invalid_type",
            expected: "nonoptional",
            input: undefined,
            path: [${k7}]
          });
        }

        if (${id}_present) {
          if (${id}.value === undefined) {
            newResult[${k7}] = undefined;
          } else {
            newResult[${k7}] = ${id}.value;
          }
        }

      `);
        } else {
          doc.write(`
        if (${id}.issues.length) {
          payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${k7}, ...iss.path] : [${k7}]
          })));
        }
        
        if (${id}.value === undefined) {
          if (${k7} in input) {
            newResult[${k7}] = undefined;
          }
        } else {
          newResult[${k7}] = ${id}.value;
        }
        
      `);
        }
      }
      doc.write(`payload.value = newResult;`);
      doc.write(`return payload;`);
      const fn = doc.compile();
      return (payload, ctx) => fn(shape, payload, ctx);
    };
    let fastpass;
    const isObject3 = isObject2;
    const jit = !globalConfig.jitless;
    const allowsEval2 = allowsEval;
    const fastEnabled = jit && allowsEval2.value;
    const catchall = def.catchall;
    let value;
    inst._zod.parse = (payload, ctx) => {
      value ?? (value = _normalized.value);
      const input = payload.value;
      if (!isObject3(input)) {
        payload.issues.push({
          expected: "object",
          code: "invalid_type",
          input,
          inst
        });
        return payload;
      }
      if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
        if (!fastpass)
          fastpass = generateFastpass(def.shape);
        payload = fastpass(payload, ctx);
        if (!catchall)
          return payload;
        return handleCatchall([], input, payload, ctx, value, inst);
      }
      return superParse(payload, ctx);
    };
  });
  function handleUnionResults(results, final, inst, ctx) {
    for (const result of results) {
      if (result.issues.length === 0) {
        final.value = result.value;
        return final;
      }
    }
    const nonaborted = results.filter((r3) => !aborted(r3));
    if (nonaborted.length === 1) {
      final.value = nonaborted[0].value;
      return nonaborted[0];
    }
    final.issues.push({
      code: "invalid_union",
      input: final.value,
      inst,
      errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
    });
    return final;
  }
  var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
    $ZodType.init(inst, def);
    defineLazy(inst._zod, "optin", () => def.options.some((o5) => o5._zod.optin === "optional") ? "optional" : void 0);
    defineLazy(inst._zod, "optout", () => def.options.some((o5) => o5._zod.optout === "optional") ? "optional" : void 0);
    defineLazy(inst._zod, "values", () => {
      if (def.options.every((o5) => o5._zod.values)) {
        return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
      }
      return void 0;
    });
    defineLazy(inst._zod, "pattern", () => {
      if (def.options.every((o5) => o5._zod.pattern)) {
        const patterns = def.options.map((o5) => o5._zod.pattern);
        return new RegExp(`^(${patterns.map((p7) => cleanRegex(p7.source)).join("|")})$`);
      }
      return void 0;
    });
    const first = def.options.length === 1 ? def.options[0]._zod.run : null;
    inst._zod.parse = (payload, ctx) => {
      if (first) {
        return first(payload, ctx);
      }
      let async = false;
      const results = [];
      for (const option of def.options) {
        const result = option._zod.run({
          value: payload.value,
          issues: []
        }, ctx);
        if (result instanceof Promise) {
          results.push(result);
          async = true;
        } else {
          if (result.issues.length === 0)
            return result;
          results.push(result);
        }
      }
      if (!async)
        return handleUnionResults(results, payload, inst, ctx);
      return Promise.all(results).then((results2) => {
        return handleUnionResults(results2, payload, inst, ctx);
      });
    };
  });
  function handleExclusiveUnionResults(results, final, inst, ctx) {
    const successes = results.filter((r3) => r3.issues.length === 0);
    if (successes.length === 1) {
      final.value = successes[0].value;
      return final;
    }
    if (successes.length === 0) {
      final.issues.push({
        code: "invalid_union",
        input: final.value,
        inst,
        errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
      });
    } else {
      final.issues.push({
        code: "invalid_union",
        input: final.value,
        inst,
        errors: [],
        inclusive: false
      });
    }
    return final;
  }
  var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
    $ZodUnion.init(inst, def);
    def.inclusive = false;
    const first = def.options.length === 1 ? def.options[0]._zod.run : null;
    inst._zod.parse = (payload, ctx) => {
      if (first) {
        return first(payload, ctx);
      }
      let async = false;
      const results = [];
      for (const option of def.options) {
        const result = option._zod.run({
          value: payload.value,
          issues: []
        }, ctx);
        if (result instanceof Promise) {
          results.push(result);
          async = true;
        } else {
          results.push(result);
        }
      }
      if (!async)
        return handleExclusiveUnionResults(results, payload, inst, ctx);
      return Promise.all(results).then((results2) => {
        return handleExclusiveUnionResults(results2, payload, inst, ctx);
      });
    };
  });
  var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
    def.inclusive = false;
    $ZodUnion.init(inst, def);
    const _super = inst._zod.parse;
    defineLazy(inst._zod, "propValues", () => {
      const propValues = {};
      for (const option of def.options) {
        const pv = option._zod.propValues;
        if (!pv || Object.keys(pv).length === 0)
          throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
        for (const [k7, v13] of Object.entries(pv)) {
          if (!propValues[k7])
            propValues[k7] = /* @__PURE__ */ new Set();
          for (const val of v13) {
            propValues[k7].add(val);
          }
        }
      }
      return propValues;
    });
    const disc = cached(() => {
      const opts = def.options;
      const map2 = /* @__PURE__ */ new Map();
      for (const o5 of opts) {
        const values = o5._zod.propValues?.[def.discriminator];
        if (!values || values.size === 0)
          throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o5)}"`);
        for (const v13 of values) {
          if (map2.has(v13)) {
            throw new Error(`Duplicate discriminator value "${String(v13)}"`);
          }
          map2.set(v13, o5);
        }
      }
      return map2;
    });
    inst._zod.parse = (payload, ctx) => {
      const input = payload.value;
      if (!isObject2(input)) {
        payload.issues.push({
          code: "invalid_type",
          expected: "object",
          input,
          inst
        });
        return payload;
      }
      const opt = disc.value.get(input?.[def.discriminator]);
      if (opt) {
        return opt._zod.run(payload, ctx);
      }
      if (def.unionFallback || ctx.direction === "backward") {
        return _super(payload, ctx);
      }
      payload.issues.push({
        code: "invalid_union",
        errors: [],
        note: "No matching discriminator",
        discriminator: def.discriminator,
        options: Array.from(disc.value.keys()),
        input,
        path: [def.discriminator],
        inst
      });
      return payload;
    };
  });
  var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, ctx) => {
      const input = payload.value;
      const left = def.left._zod.run({ value: input, issues: [] }, ctx);
      const right = def.right._zod.run({ value: input, issues: [] }, ctx);
      const async = left instanceof Promise || right instanceof Promise;
      if (async) {
        return Promise.all([left, right]).then(([left2, right2]) => {
          return handleIntersectionResults(payload, left2, right2);
        });
      }
      return handleIntersectionResults(payload, left, right);
    };
  });
  function mergeValues(a5, b9) {
    if (a5 === b9) {
      return { valid: true, data: a5 };
    }
    if (a5 instanceof Date && b9 instanceof Date && +a5 === +b9) {
      return { valid: true, data: a5 };
    }
    if (isPlainObject(a5) && isPlainObject(b9)) {
      const bKeys = Object.keys(b9);
      const sharedKeys = Object.keys(a5).filter((key2) => bKeys.indexOf(key2) !== -1);
      const newObj = { ...a5, ...b9 };
      for (const key2 of sharedKeys) {
        const sharedValue = mergeValues(a5[key2], b9[key2]);
        if (!sharedValue.valid) {
          return {
            valid: false,
            mergeErrorPath: [key2, ...sharedValue.mergeErrorPath]
          };
        }
        newObj[key2] = sharedValue.data;
      }
      return { valid: true, data: newObj };
    }
    if (Array.isArray(a5) && Array.isArray(b9)) {
      if (a5.length !== b9.length) {
        return { valid: false, mergeErrorPath: [] };
      }
      const newArray = [];
      for (let index2 = 0; index2 < a5.length; index2++) {
        const itemA = a5[index2];
        const itemB = b9[index2];
        const sharedValue = mergeValues(itemA, itemB);
        if (!sharedValue.valid) {
          return {
            valid: false,
            mergeErrorPath: [index2, ...sharedValue.mergeErrorPath]
          };
        }
        newArray.push(sharedValue.data);
      }
      return { valid: true, data: newArray };
    }
    return { valid: false, mergeErrorPath: [] };
  }
  function handleIntersectionResults(result, left, right) {
    const unrecKeys = /* @__PURE__ */ new Map();
    let unrecIssue;
    for (const iss of left.issues) {
      if (iss.code === "unrecognized_keys") {
        unrecIssue ?? (unrecIssue = iss);
        for (const k7 of iss.keys) {
          if (!unrecKeys.has(k7))
            unrecKeys.set(k7, {});
          unrecKeys.get(k7).l = true;
        }
      } else {
        result.issues.push(iss);
      }
    }
    for (const iss of right.issues) {
      if (iss.code === "unrecognized_keys") {
        for (const k7 of iss.keys) {
          if (!unrecKeys.has(k7))
            unrecKeys.set(k7, {});
          unrecKeys.get(k7).r = true;
        }
      } else {
        result.issues.push(iss);
      }
    }
    const bothKeys = [...unrecKeys].filter(([, f7]) => f7.l && f7.r).map(([k7]) => k7);
    if (bothKeys.length && unrecIssue) {
      result.issues.push({ ...unrecIssue, keys: bothKeys });
    }
    if (aborted(result))
      return result;
    const merged = mergeValues(left.value, right.value);
    if (!merged.valid) {
      throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
    }
    result.value = merged.data;
    return result;
  }
  var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
    $ZodType.init(inst, def);
    const items = def.items;
    inst._zod.parse = (payload, ctx) => {
      const input = payload.value;
      if (!Array.isArray(input)) {
        payload.issues.push({
          input,
          inst,
          expected: "tuple",
          code: "invalid_type"
        });
        return payload;
      }
      payload.value = [];
      const proms = [];
      const optinStart = getTupleOptStart(items, "optin");
      const optoutStart = getTupleOptStart(items, "optout");
      if (!def.rest) {
        if (input.length < optinStart) {
          payload.issues.push({
            code: "too_small",
            minimum: optinStart,
            inclusive: true,
            input,
            inst,
            origin: "array"
          });
          return payload;
        }
        if (input.length > items.length) {
          payload.issues.push({
            code: "too_big",
            maximum: items.length,
            inclusive: true,
            input,
            inst,
            origin: "array"
          });
        }
      }
      const itemResults = new Array(items.length);
      for (let i5 = 0; i5 < items.length; i5++) {
        const r3 = items[i5]._zod.run({ value: input[i5], issues: [] }, ctx);
        if (r3 instanceof Promise) {
          proms.push(r3.then((rr4) => {
            itemResults[i5] = rr4;
          }));
        } else {
          itemResults[i5] = r3;
        }
      }
      if (def.rest) {
        let i5 = items.length - 1;
        const rest = input.slice(items.length);
        for (const el of rest) {
          i5++;
          const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
          if (result instanceof Promise) {
            proms.push(result.then((r3) => handleTupleResult(r3, payload, i5)));
          } else {
            handleTupleResult(result, payload, i5);
          }
        }
      }
      if (proms.length) {
        return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
      }
      return handleTupleResults(itemResults, payload, items, input, optoutStart);
    };
  });
  function getTupleOptStart(items, key2) {
    for (let i5 = items.length - 1; i5 >= 0; i5--) {
      if (items[i5]._zod[key2] !== "optional")
        return i5 + 1;
    }
    return 0;
  }
  function handleTupleResult(result, final, index2) {
    if (result.issues.length) {
      final.issues.push(...prefixIssues(index2, result.issues));
    }
    final.value[index2] = result.value;
  }
  function handleTupleResults(itemResults, final, items, input, optoutStart) {
    for (let i5 = 0; i5 < items.length; i5++) {
      const r3 = itemResults[i5];
      const isPresent = i5 < input.length;
      if (r3.issues.length) {
        if (!isPresent && i5 >= optoutStart) {
          final.value.length = i5;
          break;
        }
        final.issues.push(...prefixIssues(i5, r3.issues));
      }
      final.value[i5] = r3.value;
    }
    for (let i5 = final.value.length - 1; i5 >= input.length; i5--) {
      if (items[i5]._zod.optout === "optional" && final.value[i5] === void 0) {
        final.value.length = i5;
      } else {
        break;
      }
    }
    return final;
  }
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, ctx) => {
      const input = payload.value;
      if (!isPlainObject(input)) {
        payload.issues.push({
          expected: "record",
          code: "invalid_type",
          input,
          inst
        });
        return payload;
      }
      const proms = [];
      const values = def.keyType._zod.values;
      if (values) {
        payload.value = {};
        const recordKeys = /* @__PURE__ */ new Set();
        for (const key2 of values) {
          if (typeof key2 === "string" || typeof key2 === "number" || typeof key2 === "symbol") {
            recordKeys.add(typeof key2 === "number" ? key2.toString() : key2);
            const keyResult = def.keyType._zod.run({ value: key2, issues: [] }, ctx);
            if (keyResult instanceof Promise) {
              throw new Error("Async schemas not supported in object keys currently");
            }
            if (keyResult.issues.length) {
              payload.issues.push({
                code: "invalid_key",
                origin: "record",
                issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
                input: key2,
                path: [key2],
                inst
              });
              continue;
            }
            const outKey = keyResult.value;
            const result = def.valueType._zod.run({ value: input[key2], issues: [] }, ctx);
            if (result instanceof Promise) {
              proms.push(result.then((result2) => {
                if (result2.issues.length) {
                  payload.issues.push(...prefixIssues(key2, result2.issues));
                }
                payload.value[outKey] = result2.value;
              }));
            } else {
              if (result.issues.length) {
                payload.issues.push(...prefixIssues(key2, result.issues));
              }
              payload.value[outKey] = result.value;
            }
          }
        }
        let unrecognized;
        for (const key2 in input) {
          if (!recordKeys.has(key2)) {
            unrecognized = unrecognized ?? [];
            unrecognized.push(key2);
          }
        }
        if (unrecognized && unrecognized.length > 0) {
          payload.issues.push({
            code: "unrecognized_keys",
            input,
            inst,
            keys: unrecognized
          });
        }
      } else {
        payload.value = {};
        for (const key2 of Reflect.ownKeys(input)) {
          if (key2 === "__proto__")
            continue;
          if (!Object.prototype.propertyIsEnumerable.call(input, key2))
            continue;
          let keyResult = def.keyType._zod.run({ value: key2, issues: [] }, ctx);
          if (keyResult instanceof Promise) {
            throw new Error("Async schemas not supported in object keys currently");
          }
          const checkNumericKey = typeof key2 === "string" && number2.test(key2) && keyResult.issues.length;
          if (checkNumericKey) {
            const retryResult = def.keyType._zod.run({ value: Number(key2), issues: [] }, ctx);
            if (retryResult instanceof Promise) {
              throw new Error("Async schemas not supported in object keys currently");
            }
            if (retryResult.issues.length === 0) {
              keyResult = retryResult;
            }
          }
          if (keyResult.issues.length) {
            if (def.mode === "loose") {
              payload.value[key2] = input[key2];
            } else {
              payload.issues.push({
                code: "invalid_key",
                origin: "record",
                issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
                input: key2,
                path: [key2],
                inst
              });
            }
            continue;
          }
          const result = def.valueType._zod.run({ value: input[key2], issues: [] }, ctx);
          if (result instanceof Promise) {
            proms.push(result.then((result2) => {
              if (result2.issues.length) {
                payload.issues.push(...prefixIssues(key2, result2.issues));
              }
              payload.value[keyResult.value] = result2.value;
            }));
          } else {
            if (result.issues.length) {
              payload.issues.push(...prefixIssues(key2, result.issues));
            }
            payload.value[keyResult.value] = result.value;
          }
        }
      }
      if (proms.length) {
        return Promise.all(proms).then(() => payload);
      }
      return payload;
    };
  });
  var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, ctx) => {
      const input = payload.value;
      if (!(input instanceof Map)) {
        payload.issues.push({
          expected: "map",
          code: "invalid_type",
          input,
          inst
        });
        return payload;
      }
      const proms = [];
      payload.value = /* @__PURE__ */ new Map();
      for (const [key2, value] of input) {
        const keyResult = def.keyType._zod.run({ value: key2, issues: [] }, ctx);
        const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
        if (keyResult instanceof Promise || valueResult instanceof Promise) {
          proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
            handleMapResult(keyResult2, valueResult2, payload, key2, input, inst, ctx);
          }));
        } else {
          handleMapResult(keyResult, valueResult, payload, key2, input, inst, ctx);
        }
      }
      if (proms.length)
        return Promise.all(proms).then(() => payload);
      return payload;
    };
  });
  function handleMapResult(keyResult, valueResult, final, key2, input, inst, ctx) {
    if (keyResult.issues.length) {
      if (propertyKeyTypes.has(typeof key2)) {
        final.issues.push(...prefixIssues(key2, keyResult.issues));
      } else {
        final.issues.push({
          code: "invalid_key",
          origin: "map",
          input,
          inst,
          issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
        });
      }
    }
    if (valueResult.issues.length) {
      if (propertyKeyTypes.has(typeof key2)) {
        final.issues.push(...prefixIssues(key2, valueResult.issues));
      } else {
        final.issues.push({
          origin: "map",
          code: "invalid_element",
          input,
          inst,
          key: key2,
          issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
        });
      }
    }
    final.value.set(keyResult.value, valueResult.value);
  }
  var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, ctx) => {
      const input = payload.value;
      if (!(input instanceof Set)) {
        payload.issues.push({
          input,
          inst,
          expected: "set",
          code: "invalid_type"
        });
        return payload;
      }
      const proms = [];
      payload.value = /* @__PURE__ */ new Set();
      for (const item of input) {
        const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
        if (result instanceof Promise) {
          proms.push(result.then((result2) => handleSetResult(result2, payload)));
        } else
          handleSetResult(result, payload);
      }
      if (proms.length)
        return Promise.all(proms).then(() => payload);
      return payload;
    };
  });
  function handleSetResult(result, final) {
    if (result.issues.length) {
      final.issues.push(...result.issues);
    }
    final.value.add(result.value);
  }
  var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
    $ZodType.init(inst, def);
    const values = getEnumValues(def.entries);
    const valuesSet = new Set(values);
    inst._zod.values = valuesSet;
    inst._zod.pattern = new RegExp(`^(${values.filter((k7) => propertyKeyTypes.has(typeof k7)).map((o5) => typeof o5 === "string" ? escapeRegex(o5) : o5.toString()).join("|")})$`);
    inst._zod.parse = (payload, _ctx) => {
      const input = payload.value;
      if (valuesSet.has(input)) {
        return payload;
      }
      payload.issues.push({
        code: "invalid_value",
        values,
        input,
        inst
      });
      return payload;
    };
  });
  var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
    $ZodType.init(inst, def);
    if (def.values.length === 0) {
      throw new Error("Cannot create literal schema with no valid values");
    }
    const values = new Set(def.values);
    inst._zod.values = values;
    inst._zod.pattern = new RegExp(`^(${def.values.map((o5) => typeof o5 === "string" ? escapeRegex(o5) : o5 ? escapeRegex(o5.toString()) : String(o5)).join("|")})$`);
    inst._zod.parse = (payload, _ctx) => {
      const input = payload.value;
      if (values.has(input)) {
        return payload;
      }
      payload.issues.push({
        code: "invalid_value",
        values: def.values,
        input,
        inst
      });
      return payload;
    };
  });
  var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, _ctx) => {
      const input = payload.value;
      if (input instanceof File)
        return payload;
      payload.issues.push({
        expected: "file",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    };
  });
  var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.optin = "optional";
    inst._zod.parse = (payload, ctx) => {
      if (ctx.direction === "backward") {
        throw new $ZodEncodeError(inst.constructor.name);
      }
      const _out = def.transform(payload.value, payload);
      if (ctx.async) {
        const output = _out instanceof Promise ? _out : Promise.resolve(_out);
        return output.then((output2) => {
          payload.value = output2;
          payload.fallback = true;
          return payload;
        });
      }
      if (_out instanceof Promise) {
        throw new $ZodAsyncError();
      }
      payload.value = _out;
      payload.fallback = true;
      return payload;
    };
  });
  function handleOptionalResult(result, input) {
    if (input === void 0 && (result.issues.length || result.fallback)) {
      return { issues: [], value: void 0 };
    }
    return result;
  }
  var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.optin = "optional";
    inst._zod.optout = "optional";
    defineLazy(inst._zod, "values", () => {
      return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0;
    });
    defineLazy(inst._zod, "pattern", () => {
      const pattern = def.innerType._zod.pattern;
      return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
    });
    inst._zod.parse = (payload, ctx) => {
      if (def.innerType._zod.optin === "optional") {
        const input = payload.value;
        const result = def.innerType._zod.run(payload, ctx);
        if (result instanceof Promise)
          return result.then((r3) => handleOptionalResult(r3, input));
        return handleOptionalResult(result, input);
      }
      if (payload.value === void 0) {
        return payload;
      }
      return def.innerType._zod.run(payload, ctx);
    };
  });
  var $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => {
    $ZodOptional.init(inst, def);
    defineLazy(inst._zod, "values", () => def.innerType._zod.values);
    defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern);
    inst._zod.parse = (payload, ctx) => {
      return def.innerType._zod.run(payload, ctx);
    };
  });
  var $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
    $ZodType.init(inst, def);
    defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
    defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
    defineLazy(inst._zod, "pattern", () => {
      const pattern = def.innerType._zod.pattern;
      return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
    });
    defineLazy(inst._zod, "values", () => {
      return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0;
    });
    inst._zod.parse = (payload, ctx) => {
      if (payload.value === null)
        return payload;
      return def.innerType._zod.run(payload, ctx);
    };
  });
  var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.optin = "optional";
    defineLazy(inst._zod, "values", () => def.innerType._zod.values);
    inst._zod.parse = (payload, ctx) => {
      if (ctx.direction === "backward") {
        return def.innerType._zod.run(payload, ctx);
      }
      if (payload.value === void 0) {
        payload.value = def.defaultValue;
        return payload;
      }
      const result = def.innerType._zod.run(payload, ctx);
      if (result instanceof Promise) {
        return result.then((result2) => handleDefaultResult(result2, def));
      }
      return handleDefaultResult(result, def);
    };
  });
  function handleDefaultResult(payload, def) {
    if (payload.value === void 0) {
      payload.value = def.defaultValue;
    }
    return payload;
  }
  var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.optin = "optional";
    defineLazy(inst._zod, "values", () => def.innerType._zod.values);
    inst._zod.parse = (payload, ctx) => {
      if (ctx.direction === "backward") {
        return def.innerType._zod.run(payload, ctx);
      }
      if (payload.value === void 0) {
        payload.value = def.defaultValue;
      }
      return def.innerType._zod.run(payload, ctx);
    };
  });
  var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
    $ZodType.init(inst, def);
    defineLazy(inst._zod, "values", () => {
      const v13 = def.innerType._zod.values;
      return v13 ? new Set([...v13].filter((x13) => x13 !== void 0)) : void 0;
    });
    inst._zod.parse = (payload, ctx) => {
      const result = def.innerType._zod.run(payload, ctx);
      if (result instanceof Promise) {
        return result.then((result2) => handleNonOptionalResult(result2, inst));
      }
      return handleNonOptionalResult(result, inst);
    };
  });
  function handleNonOptionalResult(payload, inst) {
    if (!payload.issues.length && payload.value === void 0) {
      payload.issues.push({
        code: "invalid_type",
        expected: "nonoptional",
        input: payload.value,
        inst
      });
    }
    return payload;
  }
  var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, ctx) => {
      if (ctx.direction === "backward") {
        throw new $ZodEncodeError("ZodSuccess");
      }
      const result = def.innerType._zod.run(payload, ctx);
      if (result instanceof Promise) {
        return result.then((result2) => {
          payload.value = result2.issues.length === 0;
          return payload;
        });
      }
      payload.value = result.issues.length === 0;
      return payload;
    };
  });
  var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.optin = "optional";
    defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
    defineLazy(inst._zod, "values", () => def.innerType._zod.values);
    inst._zod.parse = (payload, ctx) => {
      if (ctx.direction === "backward") {
        return def.innerType._zod.run(payload, ctx);
      }
      const result = def.innerType._zod.run(payload, ctx);
      if (result instanceof Promise) {
        return result.then((result2) => {
          payload.value = result2.value;
          if (result2.issues.length) {
            payload.value = def.catchValue({
              ...payload,
              error: {
                issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config()))
              },
              input: payload.value
            });
            payload.issues = [];
            payload.fallback = true;
          }
          return payload;
        });
      }
      payload.value = result.value;
      if (result.issues.length) {
        payload.value = def.catchValue({
          ...payload,
          error: {
            issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config()))
          },
          input: payload.value
        });
        payload.issues = [];
        payload.fallback = true;
      }
      return payload;
    };
  });
  var $ZodNaN = /* @__PURE__ */ $constructor("$ZodNaN", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, _ctx) => {
      if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
        payload.issues.push({
          input: payload.value,
          inst,
          expected: "nan",
          code: "invalid_type"
        });
        return payload;
      }
      return payload;
    };
  });
  var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
    $ZodType.init(inst, def);
    defineLazy(inst._zod, "values", () => def.in._zod.values);
    defineLazy(inst._zod, "optin", () => def.in._zod.optin);
    defineLazy(inst._zod, "optout", () => def.out._zod.optout);
    defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
    inst._zod.parse = (payload, ctx) => {
      if (ctx.direction === "backward") {
        const right = def.out._zod.run(payload, ctx);
        if (right instanceof Promise) {
          return right.then((right2) => handlePipeResult(right2, def.in, ctx));
        }
        return handlePipeResult(right, def.in, ctx);
      }
      const left = def.in._zod.run(payload, ctx);
      if (left instanceof Promise) {
        return left.then((left2) => handlePipeResult(left2, def.out, ctx));
      }
      return handlePipeResult(left, def.out, ctx);
    };
  });
  function handlePipeResult(left, next, ctx) {
    if (left.issues.length) {
      left.aborted = true;
      return left;
    }
    return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
  }
  var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
    $ZodType.init(inst, def);
    defineLazy(inst._zod, "values", () => def.in._zod.values);
    defineLazy(inst._zod, "optin", () => def.in._zod.optin);
    defineLazy(inst._zod, "optout", () => def.out._zod.optout);
    defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
    inst._zod.parse = (payload, ctx) => {
      const direction = ctx.direction || "forward";
      if (direction === "forward") {
        const left = def.in._zod.run(payload, ctx);
        if (left instanceof Promise) {
          return left.then((left2) => handleCodecAResult(left2, def, ctx));
        }
        return handleCodecAResult(left, def, ctx);
      } else {
        const right = def.out._zod.run(payload, ctx);
        if (right instanceof Promise) {
          return right.then((right2) => handleCodecAResult(right2, def, ctx));
        }
        return handleCodecAResult(right, def, ctx);
      }
    };
  });
  function handleCodecAResult(result, def, ctx) {
    if (result.issues.length) {
      result.aborted = true;
      return result;
    }
    const direction = ctx.direction || "forward";
    if (direction === "forward") {
      const transformed = def.transform(result.value, result);
      if (transformed instanceof Promise) {
        return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));
      }
      return handleCodecTxResult(result, transformed, def.out, ctx);
    } else {
      const transformed = def.reverseTransform(result.value, result);
      if (transformed instanceof Promise) {
        return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));
      }
      return handleCodecTxResult(result, transformed, def.in, ctx);
    }
  }
  function handleCodecTxResult(left, value, nextSchema, ctx) {
    if (left.issues.length) {
      left.aborted = true;
      return left;
    }
    return nextSchema._zod.run({ value, issues: left.issues }, ctx);
  }
  var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
    $ZodPipe.init(inst, def);
  });
  var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
    $ZodType.init(inst, def);
    defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
    defineLazy(inst._zod, "values", () => def.innerType._zod.values);
    defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
    defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
    inst._zod.parse = (payload, ctx) => {
      if (ctx.direction === "backward") {
        return def.innerType._zod.run(payload, ctx);
      }
      const result = def.innerType._zod.run(payload, ctx);
      if (result instanceof Promise) {
        return result.then(handleReadonlyResult);
      }
      return handleReadonlyResult(result);
    };
  });
  function handleReadonlyResult(payload) {
    payload.value = Object.freeze(payload.value);
    return payload;
  }
  var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => {
    $ZodType.init(inst, def);
    const regexParts = [];
    for (const part of def.parts) {
      if (typeof part === "object" && part !== null) {
        if (!part._zod.pattern) {
          throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
        }
        const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;
        if (!source)
          throw new Error(`Invalid template literal part: ${part._zod.traits}`);
        const start = source.startsWith("^") ? 1 : 0;
        const end = source.endsWith("$") ? source.length - 1 : source.length;
        regexParts.push(source.slice(start, end));
      } else if (part === null || primitiveTypes.has(typeof part)) {
        regexParts.push(escapeRegex(`${part}`));
      } else {
        throw new Error(`Invalid template literal part: ${part}`);
      }
    }
    inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
    inst._zod.parse = (payload, _ctx) => {
      if (typeof payload.value !== "string") {
        payload.issues.push({
          input: payload.value,
          inst,
          expected: "string",
          code: "invalid_type"
        });
        return payload;
      }
      inst._zod.pattern.lastIndex = 0;
      if (!inst._zod.pattern.test(payload.value)) {
        payload.issues.push({
          input: payload.value,
          inst,
          code: "invalid_format",
          format: def.format ?? "template_literal",
          pattern: inst._zod.pattern.source
        });
        return payload;
      }
      return payload;
    };
  });
  var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
    $ZodType.init(inst, def);
    inst._def = def;
    inst._zod.def = def;
    inst.implement = (func) => {
      if (typeof func !== "function") {
        throw new Error("implement() must be called with a function");
      }
      return function(...args) {
        const parsedArgs = inst._def.input ? parse2(inst._def.input, args) : args;
        const result = Reflect.apply(func, this, parsedArgs);
        if (inst._def.output) {
          return parse2(inst._def.output, result);
        }
        return result;
      };
    };
    inst.implementAsync = (func) => {
      if (typeof func !== "function") {
        throw new Error("implementAsync() must be called with a function");
      }
      return async function(...args) {
        const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;
        const result = await Reflect.apply(func, this, parsedArgs);
        if (inst._def.output) {
          return await parseAsync(inst._def.output, result);
        }
        return result;
      };
    };
    inst._zod.parse = (payload, _ctx) => {
      if (typeof payload.value !== "function") {
        payload.issues.push({
          code: "invalid_type",
          expected: "function",
          input: payload.value,
          inst
        });
        return payload;
      }
      const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise";
      if (hasPromiseOutput) {
        payload.value = inst.implementAsync(payload.value);
      } else {
        payload.value = inst.implement(payload.value);
      }
      return payload;
    };
    inst.input = (...args) => {
      const F6 = inst.constructor;
      if (Array.isArray(args[0])) {
        return new F6({
          type: "function",
          input: new $ZodTuple({
            type: "tuple",
            items: args[0],
            rest: args[1]
          }),
          output: inst._def.output
        });
      }
      return new F6({
        type: "function",
        input: args[0],
        output: inst._def.output
      });
    };
    inst.output = (output) => {
      const F6 = inst.constructor;
      return new F6({
        type: "function",
        input: inst._def.input,
        output
      });
    };
    return inst;
  });
  var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, ctx) => {
      return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));
    };
  });
  var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
    $ZodType.init(inst, def);
    defineLazy(inst._zod, "innerType", () => {
      const d6 = def;
      if (!d6._cachedInner)
        d6._cachedInner = def.getter();
      return d6._cachedInner;
    });
    defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
    defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
    defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
    defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0);
    inst._zod.parse = (payload, ctx) => {
      const inner = inst._zod.innerType;
      return inner._zod.run(payload, ctx);
    };
  });
  var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
    $ZodCheck.init(inst, def);
    $ZodType.init(inst, def);
    inst._zod.parse = (payload, _6) => {
      return payload;
    };
    inst._zod.check = (payload) => {
      const input = payload.value;
      const r3 = def.fn(input);
      if (r3 instanceof Promise) {
        return r3.then((r4) => handleRefineResult(r4, payload, input, inst));
      }
      handleRefineResult(r3, payload, input, inst);
      return;
    };
  });
  function handleRefineResult(result, payload, input, inst) {
    if (!result) {
      const _iss = {
        code: "custom",
        input,
        inst,
        // incorporates params.error into issue reporting
        path: [...inst._zod.def.path ?? []],
        // incorporates params.error into issue reporting
        continue: !inst._zod.def.abort
        // params: inst._zod.def.params,
      };
      if (inst._zod.def.params)
        _iss.params = inst._zod.def.params;
      payload.issues.push(issue(_iss));
    }
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/index.js
  var locales_exports = {};
  __export(locales_exports, {
    ar: () => ar_default,
    az: () => az_default,
    be: () => be_default,
    bg: () => bg_default,
    ca: () => ca_default,
    cs: () => cs_default,
    da: () => da_default,
    de: () => de_default,
    el: () => el_default,
    en: () => en_default,
    eo: () => eo_default,
    es: () => es_default,
    fa: () => fa_default,
    fi: () => fi_default,
    fr: () => fr_default,
    frCA: () => fr_CA_default,
    he: () => he_default,
    hr: () => hr_default,
    hu: () => hu_default,
    hy: () => hy_default,
    id: () => id_default,
    is: () => is_default,
    it: () => it_default,
    ja: () => ja_default,
    ka: () => ka_default,
    kh: () => kh_default,
    km: () => km_default,
    ko: () => ko_default,
    lt: () => lt_default,
    mk: () => mk_default,
    ms: () => ms_default,
    nl: () => nl_default,
    no: () => no_default,
    ota: () => ota_default,
    pl: () => pl_default,
    ps: () => ps_default,
    pt: () => pt_default,
    ro: () => ro_default,
    ru: () => ru_default,
    sl: () => sl_default,
    sv: () => sv_default,
    ta: () => ta_default,
    th: () => th_default,
    tr: () => tr_default,
    ua: () => ua_default,
    uk: () => uk_default,
    ur: () => ur_default,
    uz: () => uz_default,
    vi: () => vi_default,
    yo: () => yo_default,
    zhCN: () => zh_CN_default,
    zhTW: () => zh_TW_default
  });
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ar.js
  init_node_compat_inject();
  var error = () => {
    const Sizable = {
      string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
      file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
      array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
      set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0645\u062F\u062E\u0644",
      email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",
      url: "\u0631\u0627\u0628\u0637",
      emoji: "\u0625\u064A\u0645\u0648\u062C\u064A",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",
      date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",
      time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",
      duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",
      ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4",
      ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6",
      cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",
      cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",
      base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",
      base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",
      json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",
      e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",
      jwt: "JWT",
      template_literal: "\u0645\u062F\u062E\u0644"
    };
    const TypeDictionary = {
      nan: "NaN"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue2.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`;
          }
          return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue2.values[0])}`;
          return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`;
          return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue2.prefix}"`;
          if (_issue.format === "ends_with")
            return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`;
          return `${FormatDictionary[_issue.format] ?? issue2.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`;
        }
        case "not_multiple_of":
          return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue2.divisor}`;
        case "unrecognized_keys":
          return `\u0645\u0639\u0631\u0641${issue2.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue2.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue2.keys, "\u060C ")}`;
        case "invalid_key":
          return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`;
        case "invalid_union":
          return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";
        case "invalid_element":
          return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`;
        default:
          return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";
      }
    };
  };
  function ar_default() {
    return {
      localeError: error()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/az.js
  init_node_compat_inject();
  var error2 = () => {
    const Sizable = {
      string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
      file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
      array: { unit: "element", verb: "olmal\u0131d\u0131r" },
      set: { unit: "element", verb: "olmal\u0131d\u0131r" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "input",
      email: "email address",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO datetime",
      date: "ISO date",
      time: "ISO time",
      duration: "ISO duration",
      ipv4: "IPv4 address",
      ipv6: "IPv6 address",
      cidrv4: "IPv4 range",
      cidrv6: "IPv6 range",
      base64: "base64-encoded string",
      base64url: "base64url-encoded string",
      json_string: "JSON string",
      e164: "E.164 number",
      jwt: "JWT",
      template_literal: "input"
    };
    const TypeDictionary = {
      nan: "NaN"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${issue2.expected}, daxil olan ${received}`;
          }
          return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue2.values[0])}`;
          return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`;
          return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`;
          if (_issue.format === "ends_with")
            return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`;
          if (_issue.format === "includes")
            return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`;
          if (_issue.format === "regex")
            return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`;
          return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Yanl\u0131\u015F \u0259d\u0259d: ${issue2.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;
        case "unrecognized_keys":
          return `Tan\u0131nmayan a\xE7ar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;
        case "invalid_union":
          return "Yanl\u0131\u015F d\u0259y\u0259r";
        case "invalid_element":
          return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;
        default:
          return `Yanl\u0131\u015F d\u0259y\u0259r`;
      }
    };
  };
  function az_default() {
    return {
      localeError: error2()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/be.js
  init_node_compat_inject();
  function getBelarusianPlural(count, one, few, many) {
    const absCount = Math.abs(count);
    const lastDigit = absCount % 10;
    const lastTwoDigits = absCount % 100;
    if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
      return many;
    }
    if (lastDigit === 1) {
      return one;
    }
    if (lastDigit >= 2 && lastDigit <= 4) {
      return few;
    }
    return many;
  }
  var error3 = () => {
    const Sizable = {
      string: {
        unit: {
          one: "\u0441\u0456\u043C\u0432\u0430\u043B",
          few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B",
          many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"
        },
        verb: "\u043C\u0435\u0446\u044C"
      },
      array: {
        unit: {
          one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442",
          few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",
          many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"
        },
        verb: "\u043C\u0435\u0446\u044C"
      },
      set: {
        unit: {
          one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442",
          few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",
          many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"
        },
        verb: "\u043C\u0435\u0446\u044C"
      },
      file: {
        unit: {
          one: "\u0431\u0430\u0439\u0442",
          few: "\u0431\u0430\u0439\u0442\u044B",
          many: "\u0431\u0430\u0439\u0442\u0430\u045E"
        },
        verb: "\u043C\u0435\u0446\u044C"
      }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0443\u0432\u043E\u0434",
      email: "email \u0430\u0434\u0440\u0430\u0441",
      url: "URL",
      emoji: "\u044D\u043C\u043E\u0434\u0437\u0456",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",
      date: "ISO \u0434\u0430\u0442\u0430",
      time: "ISO \u0447\u0430\u0441",
      duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",
      ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441",
      ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441",
      cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",
      cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",
      base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",
      base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",
      json_string: "JSON \u0440\u0430\u0434\u043E\u043A",
      e164: "\u043D\u0443\u043C\u0430\u0440 E.164",
      jwt: "JWT",
      template_literal: "\u0443\u0432\u043E\u0434"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u043B\u0456\u043A",
      array: "\u043C\u0430\u0441\u0456\u045E"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue2.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`;
          }
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`;
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            const maxValue = Number(issue2.maximum);
            const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
            return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.maximum.toString()} ${unit}`;
          }
          return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            const minValue = Number(issue2.minimum);
            const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
            return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.minimum.toString()} ${unit}`;
          }
          return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`;
        case "unrecognized_keys":
          return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue2.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`;
        case "invalid_union":
          return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";
        case "invalid_element":
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue2.origin}`;
        default:
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`;
      }
    };
  };
  function be_default() {
    return {
      localeError: error3()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/bg.js
  init_node_compat_inject();
  var error4 = () => {
    const Sizable = {
      string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
      file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
      array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
      set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0432\u0445\u043E\u0434",
      email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",
      url: "URL",
      emoji: "\u0435\u043C\u043E\u0434\u0436\u0438",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO \u0432\u0440\u0435\u043C\u0435",
      date: "ISO \u0434\u0430\u0442\u0430",
      time: "ISO \u0432\u0440\u0435\u043C\u0435",
      duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",
      ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441",
      ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441",
      cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",
      cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",
      base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",
      base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",
      json_string: "JSON \u043D\u0438\u0437",
      e164: "E.164 \u043D\u043E\u043C\u0435\u0440",
      jwt: "JWT",
      template_literal: "\u0432\u0445\u043E\u0434"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u0447\u0438\u0441\u043B\u043E",
      array: "\u043C\u0430\u0441\u0438\u0432"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`;
          }
          return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive(issue2.values[0])}`;
          return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`;
          return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`;
          let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";
          if (_issue.format === "emoji")
            invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";
          if (_issue.format === "datetime")
            invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";
          if (_issue.format === "date")
            invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430";
          if (_issue.format === "time")
            invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";
          if (_issue.format === "duration")
            invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430";
          return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue2.divisor}`;
        case "unrecognized_keys":
          return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue2.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`;
        case "invalid_union":
          return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";
        case "invalid_element":
          return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue2.origin}`;
        default:
          return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`;
      }
    };
  };
  function bg_default() {
    return {
      localeError: error4()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ca.js
  init_node_compat_inject();
  var error5 = () => {
    const Sizable = {
      string: { unit: "car\xE0cters", verb: "contenir" },
      file: { unit: "bytes", verb: "contenir" },
      array: { unit: "elements", verb: "contenir" },
      set: { unit: "elements", verb: "contenir" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "entrada",
      email: "adre\xE7a electr\xF2nica",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "data i hora ISO",
      date: "data ISO",
      time: "hora ISO",
      duration: "durada ISO",
      ipv4: "adre\xE7a IPv4",
      ipv6: "adre\xE7a IPv6",
      cidrv4: "rang IPv4",
      cidrv6: "rang IPv6",
      base64: "cadena codificada en base64",
      base64url: "cadena codificada en base64url",
      json_string: "cadena JSON",
      e164: "n\xFAmero E.164",
      jwt: "JWT",
      template_literal: "entrada"
    };
    const TypeDictionary = {
      nan: "NaN"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Tipus inv\xE0lid: s'esperava instanceof ${issue2.expected}, s'ha rebut ${received}`;
          }
          return `Tipus inv\xE0lid: s'esperava ${expected}, s'ha rebut ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue2.values[0])}`;
          return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue2.values, " o ")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "com a m\xE0xim" : "menys de";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} contingu\xE9s ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`;
          return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} fos ${adj} ${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? "com a m\xEDnim" : "m\xE9s de";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Massa petit: s'esperava que ${issue2.origin} contingu\xE9s ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Massa petit: s'esperava que ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`;
          return `Format inv\xE0lid per a ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Clau inv\xE0lida a ${issue2.origin}`;
        case "invalid_union":
          return "Entrada inv\xE0lida";
        // Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general
        case "invalid_element":
          return `Element inv\xE0lid a ${issue2.origin}`;
        default:
          return `Entrada inv\xE0lida`;
      }
    };
  };
  function ca_default() {
    return {
      localeError: error5()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/cs.js
  init_node_compat_inject();
  var error6 = () => {
    const Sizable = {
      string: { unit: "znak\u016F", verb: "m\xEDt" },
      file: { unit: "bajt\u016F", verb: "m\xEDt" },
      array: { unit: "prvk\u016F", verb: "m\xEDt" },
      set: { unit: "prvk\u016F", verb: "m\xEDt" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "regul\xE1rn\xED v\xFDraz",
      email: "e-mailov\xE1 adresa",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "datum a \u010Das ve form\xE1tu ISO",
      date: "datum ve form\xE1tu ISO",
      time: "\u010Das ve form\xE1tu ISO",
      duration: "doba trv\xE1n\xED ISO",
      ipv4: "IPv4 adresa",
      ipv6: "IPv6 adresa",
      cidrv4: "rozsah IPv4",
      cidrv6: "rozsah IPv6",
      base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",
      base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",
      json_string: "\u0159et\u011Bzec ve form\xE1tu JSON",
      e164: "\u010D\xEDslo E.164",
      jwt: "JWT",
      template_literal: "vstup"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u010D\xEDslo",
      string: "\u0159et\u011Bzec",
      function: "funkce",
      array: "pole"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${issue2.expected}, obdr\u017Eeno ${received}`;
          }
          return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${expected}, obdr\u017Eeno ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue2.values[0])}`;
          return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`;
          }
          return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`;
          }
          return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`;
          return `Neplatn\xFD form\xE1t ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Neplatn\xFD kl\xED\u010D v ${issue2.origin}`;
        case "invalid_union":
          return "Neplatn\xFD vstup";
        case "invalid_element":
          return `Neplatn\xE1 hodnota v ${issue2.origin}`;
        default:
          return `Neplatn\xFD vstup`;
      }
    };
  };
  function cs_default() {
    return {
      localeError: error6()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/da.js
  init_node_compat_inject();
  var error7 = () => {
    const Sizable = {
      string: { unit: "tegn", verb: "havde" },
      file: { unit: "bytes", verb: "havde" },
      array: { unit: "elementer", verb: "indeholdt" },
      set: { unit: "elementer", verb: "indeholdt" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "input",
      email: "e-mailadresse",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO dato- og klokkesl\xE6t",
      date: "ISO-dato",
      time: "ISO-klokkesl\xE6t",
      duration: "ISO-varighed",
      ipv4: "IPv4-omr\xE5de",
      ipv6: "IPv6-omr\xE5de",
      cidrv4: "IPv4-spektrum",
      cidrv6: "IPv6-spektrum",
      base64: "base64-kodet streng",
      base64url: "base64url-kodet streng",
      json_string: "JSON-streng",
      e164: "E.164-nummer",
      jwt: "JWT",
      template_literal: "input"
    };
    const TypeDictionary = {
      nan: "NaN",
      string: "streng",
      number: "tal",
      boolean: "boolean",
      array: "liste",
      object: "objekt",
      set: "s\xE6t",
      file: "fil"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Ugyldigt input: forventede instanceof ${issue2.expected}, fik ${received}`;
          }
          return `Ugyldigt input: forventede ${expected}, fik ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive(issue2.values[0])}`;
          return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
          if (sizing)
            return `For stor: forventede ${origin2 ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`;
          return `For stor: forventede ${origin2 ?? "value"} havde ${adj} ${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
          if (sizing) {
            return `For lille: forventede ${origin2} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `For lille: forventede ${origin2} havde ${adj} ${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Ugyldig streng: skal starte med "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `Ugyldig streng: skal ende med "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Ugyldig streng: skal indeholde "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`;
          return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Ugyldigt tal: skal v\xE6re deleligt med ${issue2.divisor}`;
        case "unrecognized_keys":
          return `${issue2.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Ugyldig n\xF8gle i ${issue2.origin}`;
        case "invalid_union":
          return "Ugyldigt input: matcher ingen af de tilladte typer";
        case "invalid_element":
          return `Ugyldig v\xE6rdi i ${issue2.origin}`;
        default:
          return `Ugyldigt input`;
      }
    };
  };
  function da_default() {
    return {
      localeError: error7()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/de.js
  init_node_compat_inject();
  var error8 = () => {
    const Sizable = {
      string: { unit: "Zeichen", verb: "zu haben" },
      file: { unit: "Bytes", verb: "zu haben" },
      array: { unit: "Elemente", verb: "zu haben" },
      set: { unit: "Elemente", verb: "zu haben" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "Eingabe",
      email: "E-Mail-Adresse",
      url: "URL",
      emoji: "Emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO-Datum und -Uhrzeit",
      date: "ISO-Datum",
      time: "ISO-Uhrzeit",
      duration: "ISO-Dauer",
      ipv4: "IPv4-Adresse",
      ipv6: "IPv6-Adresse",
      cidrv4: "IPv4-Bereich",
      cidrv6: "IPv6-Bereich",
      base64: "Base64-codierter String",
      base64url: "Base64-URL-codierter String",
      json_string: "JSON-String",
      e164: "E.164-Nummer",
      jwt: "JWT",
      template_literal: "Eingabe"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "Zahl",
      array: "Array"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Ung\xFCltige Eingabe: erwartet instanceof ${issue2.expected}, erhalten ${received}`;
          }
          return `Ung\xFCltige Eingabe: erwartet ${expected}, erhalten ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue2.values[0])}`;
          return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`;
          return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ist`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`;
          }
          return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`;
          if (_issue.format === "ends_with")
            return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`;
          if (_issue.format === "includes")
            return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`;
          if (_issue.format === "regex")
            return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`;
          return `Ung\xFCltig: ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`;
        case "unrecognized_keys":
          return `${issue2.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Ung\xFCltiger Schl\xFCssel in ${issue2.origin}`;
        case "invalid_union":
          return "Ung\xFCltige Eingabe";
        case "invalid_element":
          return `Ung\xFCltiger Wert in ${issue2.origin}`;
        default:
          return `Ung\xFCltige Eingabe`;
      }
    };
  };
  function de_default() {
    return {
      localeError: error8()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/el.js
  init_node_compat_inject();
  var error9 = () => {
    const Sizable = {
      string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
      file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
      array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
      set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
      map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
      email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
      date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
      time: "ISO \u03CE\u03C1\u03B1",
      duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
      ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
      ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
      mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
      cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
      cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
      base64: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",
      base64url: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",
      json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
      e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
      jwt: "JWT",
      template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
    };
    const TypeDictionary = {
      nan: "NaN"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
            return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${issue2.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
          }
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${stringifyPrimitive(issue2.values[0])}`;
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;
          return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${_issue.pattern}`;
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${issue2.divisor}`;
        case "unrecognized_keys":
          return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${issue2.keys.length > 1 ? "\u03B1" : "\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${issue2.keys.length > 1 ? "\u03B9\u03AC" : "\u03AF"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
        case "invalid_union":
          return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
        case "invalid_element":
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
        default:
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
      }
    };
  };
  function el_default() {
    return {
      localeError: error9()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/en.js
  init_node_compat_inject();
  var error10 = () => {
    const Sizable = {
      string: { unit: "characters", verb: "to have" },
      file: { unit: "bytes", verb: "to have" },
      array: { unit: "items", verb: "to have" },
      set: { unit: "items", verb: "to have" },
      map: { unit: "entries", verb: "to have" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "input",
      email: "email address",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO datetime",
      date: "ISO date",
      time: "ISO time",
      duration: "ISO duration",
      ipv4: "IPv4 address",
      ipv6: "IPv6 address",
      mac: "MAC address",
      cidrv4: "IPv4 range",
      cidrv6: "IPv6 range",
      base64: "base64-encoded string",
      base64url: "base64url-encoded string",
      json_string: "JSON string",
      e164: "E.164 number",
      jwt: "JWT",
      template_literal: "input"
    };
    const TypeDictionary = {
      // Compatibility: "nan" -> "NaN" for display
      nan: "NaN"
      // All other type names omitted - they fall back to raw values via ?? operator
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          return `Invalid input: expected ${expected}, received ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`;
          return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`;
          return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `Invalid string: must start with "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `Invalid string: must end with "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Invalid string: must include "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Invalid string: must match pattern ${_issue.pattern}`;
          return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Invalid number: must be a multiple of ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Invalid key in ${issue2.origin}`;
        case "invalid_union":
          if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
            const opts = issue2.options.map((o5) => `'${o5}'`).join(" | ");
            return `Invalid discriminator value. Expected ${opts}`;
          }
          return "Invalid input";
        case "invalid_element":
          return `Invalid value in ${issue2.origin}`;
        default:
          return `Invalid input`;
      }
    };
  };
  function en_default() {
    return {
      localeError: error10()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/eo.js
  init_node_compat_inject();
  var error11 = () => {
    const Sizable = {
      string: { unit: "karaktrojn", verb: "havi" },
      file: { unit: "bajtojn", verb: "havi" },
      array: { unit: "elementojn", verb: "havi" },
      set: { unit: "elementojn", verb: "havi" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "enigo",
      email: "retadreso",
      url: "URL",
      emoji: "emo\u011Dio",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO-datotempo",
      date: "ISO-dato",
      time: "ISO-tempo",
      duration: "ISO-da\u016Dro",
      ipv4: "IPv4-adreso",
      ipv6: "IPv6-adreso",
      cidrv4: "IPv4-rango",
      cidrv6: "IPv6-rango",
      base64: "64-ume kodita karaktraro",
      base64url: "URL-64-ume kodita karaktraro",
      json_string: "JSON-karaktraro",
      e164: "E.164-nombro",
      jwt: "JWT",
      template_literal: "enigo"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "nombro",
      array: "tabelo",
      null: "senvalora"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Nevalida enigo: atendi\u011Dis instanceof ${issue2.expected}, ricevi\u011Dis ${received}`;
          }
          return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue2.values[0])}`;
          return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
          return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
          return `Nevalida ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Nekonata${issue2.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Nevalida \u015Dlosilo en ${issue2.origin}`;
        case "invalid_union":
          return "Nevalida enigo";
        case "invalid_element":
          return `Nevalida valoro en ${issue2.origin}`;
        default:
          return `Nevalida enigo`;
      }
    };
  };
  function eo_default() {
    return {
      localeError: error11()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/es.js
  init_node_compat_inject();
  var error12 = () => {
    const Sizable = {
      string: { unit: "caracteres", verb: "tener" },
      file: { unit: "bytes", verb: "tener" },
      array: { unit: "elementos", verb: "tener" },
      set: { unit: "elementos", verb: "tener" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "entrada",
      email: "direcci\xF3n de correo electr\xF3nico",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "fecha y hora ISO",
      date: "fecha ISO",
      time: "hora ISO",
      duration: "duraci\xF3n ISO",
      ipv4: "direcci\xF3n IPv4",
      ipv6: "direcci\xF3n IPv6",
      cidrv4: "rango IPv4",
      cidrv6: "rango IPv6",
      base64: "cadena codificada en base64",
      base64url: "URL codificada en base64",
      json_string: "cadena JSON",
      e164: "n\xFAmero E.164",
      jwt: "JWT",
      template_literal: "entrada"
    };
    const TypeDictionary = {
      nan: "NaN",
      string: "texto",
      number: "n\xFAmero",
      boolean: "booleano",
      array: "arreglo",
      object: "objeto",
      set: "conjunto",
      file: "archivo",
      date: "fecha",
      bigint: "n\xFAmero grande",
      symbol: "s\xEDmbolo",
      undefined: "indefinido",
      null: "nulo",
      function: "funci\xF3n",
      map: "mapa",
      record: "registro",
      tuple: "tupla",
      enum: "enumeraci\xF3n",
      union: "uni\xF3n",
      literal: "literal",
      promise: "promesa",
      void: "vac\xEDo",
      never: "nunca",
      unknown: "desconocido",
      any: "cualquiera"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Entrada inv\xE1lida: se esperaba instanceof ${issue2.expected}, recibido ${received}`;
          }
          return `Entrada inv\xE1lida: se esperaba ${expected}, recibido ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue2.values[0])}`;
          return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
          if (sizing)
            return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
          return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
          if (sizing) {
            return `Demasiado peque\xF1o: se esperaba que ${origin2} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Demasiado peque\xF1o: se esperaba que ${origin2} fuera ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`;
          return `Inv\xE1lido ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Llave inv\xE1lida en ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
        case "invalid_union":
          return "Entrada inv\xE1lida";
        case "invalid_element":
          return `Valor inv\xE1lido en ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
        default:
          return `Entrada inv\xE1lida`;
      }
    };
  };
  function es_default() {
    return {
      localeError: error12()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fa.js
  init_node_compat_inject();
  var error13 = () => {
    const Sizable = {
      string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
      file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
      array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
      set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0648\u0631\u0648\u062F\u06CC",
      email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",
      url: "URL",
      emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",
      date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",
      time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",
      duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",
      ipv4: "IPv4 \u0622\u062F\u0631\u0633",
      ipv6: "IPv6 \u0622\u062F\u0631\u0633",
      cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647",
      cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647",
      base64: "base64-encoded \u0631\u0634\u062A\u0647",
      base64url: "base64url-encoded \u0631\u0634\u062A\u0647",
      json_string: "JSON \u0631\u0634\u062A\u0647",
      e164: "E.164 \u0639\u062F\u062F",
      jwt: "JWT",
      template_literal: "\u0648\u0631\u0648\u062F\u06CC"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u0639\u062F\u062F",
      array: "\u0622\u0631\u0627\u06CC\u0647"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue2.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;
          }
          return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;
        }
        case "invalid_value":
          if (issue2.values.length === 1) {
            return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue2.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`;
          }
          return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue2.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`;
          }
          return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0628\u0627\u0634\u062F`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`;
          }
          return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0628\u0627\u0634\u062F`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`;
          }
          if (_issue.format === "ends_with") {
            return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`;
          }
          if (_issue.format === "includes") {
            return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`;
          }
          if (_issue.format === "regex") {
            return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`;
          }
          return `${FormatDictionary[_issue.format] ?? issue2.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;
        }
        case "not_multiple_of":
          return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue2.divisor} \u0628\u0627\u0634\u062F`;
        case "unrecognized_keys":
          return `\u06A9\u0644\u06CC\u062F${issue2.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue2.origin}`;
        case "invalid_union":
          return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;
        case "invalid_element":
          return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue2.origin}`;
        default:
          return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;
      }
    };
  };
  function fa_default() {
    return {
      localeError: error13()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fi.js
  init_node_compat_inject();
  var error14 = () => {
    const Sizable = {
      string: { unit: "merkki\xE4", subject: "merkkijonon" },
      file: { unit: "tavua", subject: "tiedoston" },
      array: { unit: "alkiota", subject: "listan" },
      set: { unit: "alkiota", subject: "joukon" },
      number: { unit: "", subject: "luvun" },
      bigint: { unit: "", subject: "suuren kokonaisluvun" },
      int: { unit: "", subject: "kokonaisluvun" },
      date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "s\xE4\xE4nn\xF6llinen lauseke",
      email: "s\xE4hk\xF6postiosoite",
      url: "URL-osoite",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO-aikaleima",
      date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",
      time: "ISO-aika",
      duration: "ISO-kesto",
      ipv4: "IPv4-osoite",
      ipv6: "IPv6-osoite",
      cidrv4: "IPv4-alue",
      cidrv6: "IPv6-alue",
      base64: "base64-koodattu merkkijono",
      base64url: "base64url-koodattu merkkijono",
      json_string: "JSON-merkkijono",
      e164: "E.164-luku",
      jwt: "JWT",
      template_literal: "templaattimerkkijono"
    };
    const TypeDictionary = {
      nan: "NaN"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Virheellinen tyyppi: odotettiin instanceof ${issue2.expected}, oli ${received}`;
          }
          return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue2.values[0])}`;
          return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim();
          }
          return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim();
          }
          return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`;
          if (_issue.format === "regex") {
            return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`;
          }
          return `Virheellinen ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Virheellinen luku: t\xE4ytyy olla luvun ${issue2.divisor} monikerta`;
        case "unrecognized_keys":
          return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return "Virheellinen avain tietueessa";
        case "invalid_union":
          return "Virheellinen unioni";
        case "invalid_element":
          return "Virheellinen arvo joukossa";
        default:
          return `Virheellinen sy\xF6te`;
      }
    };
  };
  function fi_default() {
    return {
      localeError: error14()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr.js
  init_node_compat_inject();
  var error15 = () => {
    const Sizable = {
      string: { unit: "caract\xE8res", verb: "avoir" },
      file: { unit: "octets", verb: "avoir" },
      array: { unit: "\xE9l\xE9ments", verb: "avoir" },
      set: { unit: "\xE9l\xE9ments", verb: "avoir" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "entr\xE9e",
      email: "adresse e-mail",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "date et heure ISO",
      date: "date ISO",
      time: "heure ISO",
      duration: "dur\xE9e ISO",
      ipv4: "adresse IPv4",
      ipv6: "adresse IPv6",
      cidrv4: "plage IPv4",
      cidrv6: "plage IPv6",
      base64: "cha\xEEne encod\xE9e en base64",
      base64url: "cha\xEEne encod\xE9e en base64url",
      json_string: "cha\xEEne JSON",
      e164: "num\xE9ro E.164",
      jwt: "JWT",
      template_literal: "entr\xE9e"
    };
    const TypeDictionary = {
      string: "cha\xEEne",
      number: "nombre",
      int: "entier",
      boolean: "bool\xE9en",
      bigint: "grand entier",
      symbol: "symbole",
      undefined: "ind\xE9fini",
      null: "null",
      never: "jamais",
      void: "vide",
      date: "date",
      array: "tableau",
      object: "objet",
      tuple: "tuple",
      record: "enregistrement",
      map: "carte",
      set: "ensemble",
      file: "fichier",
      nonoptional: "non-optionnel",
      nan: "NaN",
      function: "fonction"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Entr\xE9e invalide : instanceof ${issue2.expected} attendu, ${received} re\xE7u`;
          }
          return `Entr\xE9e invalide : ${expected} attendu, ${received} re\xE7u`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Entr\xE9e invalide : ${stringifyPrimitive(issue2.values[0])} attendu`;
          return `Option invalide : une valeur parmi ${joinValues(issue2.values, "|")} attendue`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
          return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`;
          return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`;
        }
        case "not_multiple_of":
          return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Cl\xE9 invalide dans ${issue2.origin}`;
        case "invalid_union":
          return "Entr\xE9e invalide";
        case "invalid_element":
          return `Valeur invalide dans ${issue2.origin}`;
        default:
          return `Entr\xE9e invalide`;
      }
    };
  };
  function fr_default() {
    return {
      localeError: error15()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr-CA.js
  init_node_compat_inject();
  var error16 = () => {
    const Sizable = {
      string: { unit: "caract\xE8res", verb: "avoir" },
      file: { unit: "octets", verb: "avoir" },
      array: { unit: "\xE9l\xE9ments", verb: "avoir" },
      set: { unit: "\xE9l\xE9ments", verb: "avoir" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "entr\xE9e",
      email: "adresse courriel",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "date-heure ISO",
      date: "date ISO",
      time: "heure ISO",
      duration: "dur\xE9e ISO",
      ipv4: "adresse IPv4",
      ipv6: "adresse IPv6",
      cidrv4: "plage IPv4",
      cidrv6: "plage IPv6",
      base64: "cha\xEEne encod\xE9e en base64",
      base64url: "cha\xEEne encod\xE9e en base64url",
      json_string: "cha\xEEne JSON",
      e164: "num\xE9ro E.164",
      jwt: "JWT",
      template_literal: "entr\xE9e"
    };
    const TypeDictionary = {
      nan: "NaN"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Entr\xE9e invalide : attendu instanceof ${issue2.expected}, re\xE7u ${received}`;
          }
          return `Entr\xE9e invalide : attendu ${expected}, re\xE7u ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue2.values[0])}`;
          return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "\u2264" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} ait ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
          return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} soit ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? "\u2265" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`;
          return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`;
        }
        case "not_multiple_of":
          return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Cl\xE9 invalide dans ${issue2.origin}`;
        case "invalid_union":
          return "Entr\xE9e invalide";
        case "invalid_element":
          return `Valeur invalide dans ${issue2.origin}`;
        default:
          return `Entr\xE9e invalide`;
      }
    };
  };
  function fr_CA_default() {
    return {
      localeError: error16()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/he.js
  init_node_compat_inject();
  var error17 = () => {
    const TypeNames = {
      string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
      number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
      boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" },
      bigint: { label: "BigInt", gender: "m" },
      date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" },
      array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" },
      object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" },
      null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" },
      undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" },
      symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" },
      function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" },
      map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" },
      set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" },
      file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" },
      promise: { label: "Promise", gender: "m" },
      NaN: { label: "NaN", gender: "m" },
      unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" },
      value: { label: "\u05E2\u05E8\u05DA", gender: "m" }
    };
    const Sizable = {
      string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" },
      file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
      array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
      set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
      number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }
      // no unit
    };
    const typeEntry = (t) => t ? TypeNames[t] : void 0;
    const typeLabel = (t) => {
      const e2 = typeEntry(t);
      if (e2)
        return e2.label;
      return t ?? TypeNames.unknown.label;
    };
    const withDefinite = (t) => `\u05D4${typeLabel(t)}`;
    const verbFor = (t) => {
      const e2 = typeEntry(t);
      const gender = e2?.gender ?? "m";
      return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA";
    };
    const getSizing = (origin2) => {
      if (!origin2)
        return null;
      return Sizable[origin2] ?? null;
    };
    const FormatDictionary = {
      regex: { label: "\u05E7\u05DC\u05D8", gender: "m" },
      email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" },
      url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" },
      emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" },
      uuid: { label: "UUID", gender: "m" },
      nanoid: { label: "nanoid", gender: "m" },
      guid: { label: "GUID", gender: "m" },
      cuid: { label: "cuid", gender: "m" },
      cuid2: { label: "cuid2", gender: "m" },
      ulid: { label: "ULID", gender: "m" },
      xid: { label: "XID", gender: "m" },
      ksuid: { label: "KSUID", gender: "m" },
      datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" },
      date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" },
      time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" },
      duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" },
      ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" },
      ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" },
      cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" },
      cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" },
      base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" },
      base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" },
      json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" },
      e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" },
      jwt: { label: "JWT", gender: "m" },
      ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" },
      includes: { label: "\u05E7\u05DC\u05D8", gender: "m" },
      lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" },
      starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" },
      uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }
    };
    const TypeDictionary = {
      nan: "NaN"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expectedKey = issue2.expected;
          const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey);
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue2.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;
          }
          return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;
        }
        case "invalid_value": {
          if (issue2.values.length === 1) {
            return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive(issue2.values[0])}`;
          }
          const stringified = issue2.values.map((v13) => stringifyPrimitive(v13));
          if (issue2.values.length === 2) {
            return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`;
          }
          const lastValue = stringified[stringified.length - 1];
          const restValues = stringified.slice(0, -1).join(", ");
          return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`;
        }
        case "too_big": {
          const sizing = getSizing(issue2.origin);
          const subject = withDefinite(issue2.origin ?? "value");
          if (issue2.origin === "string") {
            return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.maximum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();
          }
          if (issue2.origin === "number") {
            const comparison = issue2.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue2.maximum}`;
            return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;
          }
          if (issue2.origin === "array" || issue2.origin === "set") {
            const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA";
            const comparison = issue2.inclusive ? `${issue2.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue2.maximum} ${sizing?.unit ?? ""}`;
            return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();
          }
          const adj = issue2.inclusive ? "<=" : "<";
          const be8 = verbFor(issue2.origin ?? "value");
          if (sizing?.unit) {
            return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be8} ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
          }
          return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be8} ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const sizing = getSizing(issue2.origin);
          const subject = withDefinite(issue2.origin ?? "value");
          if (issue2.origin === "string") {
            return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.minimum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();
          }
          if (issue2.origin === "number") {
            const comparison = issue2.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue2.minimum}`;
            return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;
          }
          if (issue2.origin === "array" || issue2.origin === "set") {
            const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA";
            if (issue2.minimum === 1 && issue2.inclusive) {
              const singularPhrase = issue2.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3";
              return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`;
            }
            const comparison = issue2.inclusive ? `${issue2.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue2.minimum} ${sizing?.unit ?? ""}`;
            return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();
          }
          const adj = issue2.inclusive ? ">=" : ">";
          const be8 = verbFor(issue2.origin ?? "value");
          if (sizing?.unit) {
            return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be8} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be8} ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`;
          const nounEntry = FormatDictionary[_issue.format];
          const noun = nounEntry?.label ?? _issue.format;
          const gender = nounEntry?.gender ?? "m";
          const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF";
          return `${noun} \u05DC\u05D0 ${adjective}`;
        }
        case "not_multiple_of":
          return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue2.divisor}`;
        case "unrecognized_keys":
          return `\u05DE\u05E4\u05EA\u05D7${issue2.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue2.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key": {
          return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`;
        }
        case "invalid_union":
          return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";
        case "invalid_element": {
          const place = withDefinite(issue2.origin ?? "array");
          return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`;
        }
        default:
          return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`;
      }
    };
  };
  function he_default() {
    return {
      localeError: error17()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hr.js
  init_node_compat_inject();
  var error18 = () => {
    const Sizable = {
      string: { unit: "znakova", verb: "imati" },
      file: { unit: "bajtova", verb: "imati" },
      array: { unit: "stavki", verb: "imati" },
      set: { unit: "stavki", verb: "imati" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "unos",
      email: "email adresa",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO datum i vrijeme",
      date: "ISO datum",
      time: "ISO vrijeme",
      duration: "ISO trajanje",
      ipv4: "IPv4 adresa",
      ipv6: "IPv6 adresa",
      cidrv4: "IPv4 raspon",
      cidrv6: "IPv6 raspon",
      base64: "base64 kodirani tekst",
      base64url: "base64url kodirani tekst",
      json_string: "JSON tekst",
      e164: "E.164 broj",
      jwt: "JWT",
      template_literal: "unos"
    };
    const TypeDictionary = {
      nan: "NaN",
      string: "tekst",
      number: "broj",
      boolean: "boolean",
      array: "niz",
      object: "objekt",
      set: "skup",
      file: "datoteka",
      date: "datum",
      bigint: "bigint",
      symbol: "simbol",
      undefined: "undefined",
      null: "null",
      function: "funkcija",
      map: "mapa"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
          }
          return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
          return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
          if (sizing)
            return `Preveliko: o\u010Dekivano da ${origin2 ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
          return `Preveliko: o\u010Dekivano da ${origin2 ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
          if (sizing) {
            return `Premalo: o\u010Dekivano da ${origin2} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Premalo: o\u010Dekivano da ${origin2} bude ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
          return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
        case "invalid_union":
          return "Neispravan unos";
        case "invalid_element":
          return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
        default:
          return `Neispravan unos`;
      }
    };
  };
  function hr_default() {
    return {
      localeError: error18()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hu.js
  init_node_compat_inject();
  var error19 = () => {
    const Sizable = {
      string: { unit: "karakter", verb: "legyen" },
      file: { unit: "byte", verb: "legyen" },
      array: { unit: "elem", verb: "legyen" },
      set: { unit: "elem", verb: "legyen" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "bemenet",
      email: "email c\xEDm",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO id\u0151b\xE9lyeg",
      date: "ISO d\xE1tum",
      time: "ISO id\u0151",
      duration: "ISO id\u0151intervallum",
      ipv4: "IPv4 c\xEDm",
      ipv6: "IPv6 c\xEDm",
      cidrv4: "IPv4 tartom\xE1ny",
      cidrv6: "IPv6 tartom\xE1ny",
      base64: "base64-k\xF3dolt string",
      base64url: "base64url-k\xF3dolt string",
      json_string: "JSON string",
      e164: "E.164 sz\xE1m",
      jwt: "JWT",
      template_literal: "bemenet"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "sz\xE1m",
      array: "t\xF6mb"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
          }
          return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
          return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
          return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`;
          if (_issue.format === "ends_with")
            return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`;
          if (_issue.format === "includes")
            return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`;
          if (_issue.format === "regex")
            return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`;
          return `\xC9rv\xE9nytelen ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\xC9rv\xE9nytelen sz\xE1m: ${issue2.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;
        case "unrecognized_keys":
          return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\xC9rv\xE9nytelen kulcs ${issue2.origin}`;
        case "invalid_union":
          return "\xC9rv\xE9nytelen bemenet";
        case "invalid_element":
          return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue2.origin}`;
        default:
          return `\xC9rv\xE9nytelen bemenet`;
      }
    };
  };
  function hu_default() {
    return {
      localeError: error19()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hy.js
  init_node_compat_inject();
  function getArmenianPlural(count, one, many) {
    return Math.abs(count) === 1 ? one : many;
  }
  function withDefiniteArticle(word) {
    if (!word)
      return "";
    const vowels = ["\u0561", "\u0565", "\u0568", "\u056B", "\u0578", "\u0578\u0582", "\u0585"];
    const lastChar = word[word.length - 1];
    return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
  }
  var error20 = () => {
    const Sizable = {
      string: {
        unit: {
          one: "\u0576\u0577\u0561\u0576",
          many: "\u0576\u0577\u0561\u0576\u0576\u0565\u0580"
        },
        verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C"
      },
      file: {
        unit: {
          one: "\u0562\u0561\u0575\u0569",
          many: "\u0562\u0561\u0575\u0569\u0565\u0580"
        },
        verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C"
      },
      array: {
        unit: {
          one: "\u057F\u0561\u0580\u0580",
          many: "\u057F\u0561\u0580\u0580\u0565\u0580"
        },
        verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C"
      },
      set: {
        unit: {
          one: "\u057F\u0561\u0580\u0580",
          many: "\u057F\u0561\u0580\u0580\u0565\u0580"
        },
        verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C"
      }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0574\u0578\u0582\u057F\u0584",
      email: "\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",
      url: "URL",
      emoji: "\u0567\u0574\u0578\u057B\u056B",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",
      date: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",
      time: "ISO \u056A\u0561\u0574",
      duration: "ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",
      ipv4: "IPv4 \u0570\u0561\u057D\u0581\u0565",
      ipv6: "IPv6 \u0570\u0561\u057D\u0581\u0565",
      cidrv4: "IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",
      cidrv6: "IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",
      base64: "base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",
      base64url: "base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",
      json_string: "JSON \u057F\u0578\u0572",
      e164: "E.164 \u0570\u0561\u0574\u0561\u0580",
      jwt: "JWT",
      template_literal: "\u0574\u0578\u0582\u057F\u0584"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u0569\u056B\u057E",
      array: "\u0566\u0561\u0576\u0563\u057E\u0561\u056E"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue2.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`;
          }
          return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${stringifyPrimitive(issue2.values[1])}`;
          return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            const maxValue = Number(issue2.maximum);
            const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many);
            return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue2.maximum.toString()} ${unit}`;
          }
          return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            const minValue = Number(issue2.minimum);
            const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many);
            return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue2.minimum.toString()} ${unit}`;
          }
          return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin)} \u056C\u056B\u0576\u056B ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${_issue.prefix}"-\u0578\u057E`;
          if (_issue.format === "ends_with")
            return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${_issue.suffix}"-\u0578\u057E`;
          if (_issue.format === "includes")
            return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`;
          return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue2.divisor}-\u056B`;
        case "unrecognized_keys":
          return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue2.keys.length > 1 ? "\u0576\u0565\u0580" : ""}. ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue2.origin)}-\u0578\u0582\u0574`;
        case "invalid_union":
          return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";
        case "invalid_element":
          return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue2.origin)}-\u0578\u0582\u0574`;
        default:
          return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`;
      }
    };
  };
  function hy_default() {
    return {
      localeError: error20()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/id.js
  init_node_compat_inject();
  var error21 = () => {
    const Sizable = {
      string: { unit: "karakter", verb: "memiliki" },
      file: { unit: "byte", verb: "memiliki" },
      array: { unit: "item", verb: "memiliki" },
      set: { unit: "item", verb: "memiliki" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "input",
      email: "alamat email",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "tanggal dan waktu format ISO",
      date: "tanggal format ISO",
      time: "jam format ISO",
      duration: "durasi format ISO",
      ipv4: "alamat IPv4",
      ipv6: "alamat IPv6",
      cidrv4: "rentang alamat IPv4",
      cidrv6: "rentang alamat IPv6",
      base64: "string dengan enkode base64",
      base64url: "string dengan enkode base64url",
      json_string: "string JSON",
      e164: "angka E.164",
      jwt: "JWT",
      template_literal: "input"
    };
    const TypeDictionary = {
      nan: "NaN"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Input tidak valid: diharapkan instanceof ${issue2.expected}, diterima ${received}`;
          }
          return `Input tidak valid: diharapkan ${expected}, diterima ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Input tidak valid: diharapkan ${stringifyPrimitive(issue2.values[0])}`;
          return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} memiliki ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`;
          return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} menjadi ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `String tidak valid: harus menyertakan "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `String tidak valid: harus sesuai pola ${_issue.pattern}`;
          return `${FormatDictionary[_issue.format] ?? issue2.format} tidak valid`;
        }
        case "not_multiple_of":
          return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Kunci tidak valid di ${issue2.origin}`;
        case "invalid_union":
          return "Input tidak valid";
        case "invalid_element":
          return `Nilai tidak valid di ${issue2.origin}`;
        default:
          return `Input tidak valid`;
      }
    };
  };
  function id_default() {
    return {
      localeError: error21()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/is.js
  init_node_compat_inject();
  var error22 = () => {
    const Sizable = {
      string: { unit: "stafi", verb: "a\xF0 hafa" },
      file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
      array: { unit: "hluti", verb: "a\xF0 hafa" },
      set: { unit: "hluti", verb: "a\xF0 hafa" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "gildi",
      email: "netfang",
      url: "vefsl\xF3\xF0",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO dagsetning og t\xEDmi",
      date: "ISO dagsetning",
      time: "ISO t\xEDmi",
      duration: "ISO t\xEDmalengd",
      ipv4: "IPv4 address",
      ipv6: "IPv6 address",
      cidrv4: "IPv4 range",
      cidrv6: "IPv6 range",
      base64: "base64-encoded strengur",
      base64url: "base64url-encoded strengur",
      json_string: "JSON strengur",
      e164: "E.164 t\xF6lugildi",
      jwt: "JWT",
      template_literal: "gildi"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "n\xFAmer",
      array: "fylki"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera instanceof ${issue2.expected}`;
          }
          return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera ${expected}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive(issue2.values[0])}`;
          return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} hafi ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "hluti"}`;
          return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} s\xE9 ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} hafi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} s\xE9 ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`;
          return `Rangt ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue2.divisor}`;
        case "unrecognized_keys":
          return `\xD3\xFEekkt ${issue2.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Rangur lykill \xED ${issue2.origin}`;
        case "invalid_union":
          return "Rangt gildi";
        case "invalid_element":
          return `Rangt gildi \xED ${issue2.origin}`;
        default:
          return `Rangt gildi`;
      }
    };
  };
  function is_default() {
    return {
      localeError: error22()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/it.js
  init_node_compat_inject();
  var error23 = () => {
    const Sizable = {
      string: { unit: "caratteri", verb: "avere" },
      file: { unit: "byte", verb: "avere" },
      array: { unit: "elementi", verb: "avere" },
      set: { unit: "elementi", verb: "avere" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "input",
      email: "indirizzo email",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "data e ora ISO",
      date: "data ISO",
      time: "ora ISO",
      duration: "durata ISO",
      ipv4: "indirizzo IPv4",
      ipv6: "indirizzo IPv6",
      cidrv4: "intervallo IPv4",
      cidrv6: "intervallo IPv6",
      base64: "stringa codificata in base64",
      base64url: "URL codificata in base64",
      json_string: "stringa JSON",
      e164: "numero E.164",
      jwt: "JWT",
      template_literal: "input"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "numero",
      array: "vettore"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Input non valido: atteso instanceof ${issue2.expected}, ricevuto ${received}`;
          }
          return `Input non valido: atteso ${expected}, ricevuto ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`;
          return `Opzione non valida: atteso uno tra ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Troppo grande: ${issue2.origin ?? "valore"} deve avere ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementi"}`;
          return `Troppo grande: ${issue2.origin ?? "valore"} deve essere ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Stringa non valida: deve iniziare con "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `Stringa non valida: deve terminare con "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Stringa non valida: deve includere "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
          return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Chiave non valida in ${issue2.origin}`;
        case "invalid_union":
          return "Input non valido";
        case "invalid_element":
          return `Valore non valido in ${issue2.origin}`;
        default:
          return `Input non valido`;
      }
    };
  };
  function it_default() {
    return {
      localeError: error23()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ja.js
  init_node_compat_inject();
  var error24 = () => {
    const Sizable = {
      string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
      file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
      array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" },
      set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u5165\u529B\u5024",
      email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",
      url: "URL",
      emoji: "\u7D75\u6587\u5B57",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO\u65E5\u6642",
      date: "ISO\u65E5\u4ED8",
      time: "ISO\u6642\u523B",
      duration: "ISO\u671F\u9593",
      ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9",
      ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9",
      cidrv4: "IPv4\u7BC4\u56F2",
      cidrv6: "IPv6\u7BC4\u56F2",
      base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",
      base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",
      json_string: "JSON\u6587\u5B57\u5217",
      e164: "E.164\u756A\u53F7",
      jwt: "JWT",
      template_literal: "\u5165\u529B\u5024"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u6570\u5024",
      array: "\u914D\u5217"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue2.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;
          }
          return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue2.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`;
          return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue2.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
        case "too_big": {
          const adj = issue2.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
          return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
          return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
          if (_issue.format === "ends_with")
            return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
          if (_issue.format === "includes")
            return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
          if (_issue.format === "regex")
            return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
          return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u7121\u52B9\u306A\u6570\u5024: ${issue2.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
        case "unrecognized_keys":
          return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue2.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue2.keys, "\u3001")}`;
        case "invalid_key":
          return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;
        case "invalid_union":
          return "\u7121\u52B9\u306A\u5165\u529B";
        case "invalid_element":
          return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;
        default:
          return `\u7121\u52B9\u306A\u5165\u529B`;
      }
    };
  };
  function ja_default() {
    return {
      localeError: error24()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ka.js
  init_node_compat_inject();
  var error25 = () => {
    const Sizable = {
      string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
      file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
      array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
      set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",
      email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
      url: "URL",
      emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",
      date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",
      time: "\u10D3\u10E0\u10DD",
      duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",
      ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
      ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
      cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
      cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
      base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
      base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
      json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
      e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
      jwt: "JWT",
      template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
      string: "\u10D5\u10D4\u10DA\u10D8",
      boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
      function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
      array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue2.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`;
          }
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive(issue2.values[0])}`;
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues(issue2.values, "|")}-\u10D3\u10D0\u10DC`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
          return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
          }
          if (_issue.format === "ends_with")
            return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
          if (_issue.format === "includes")
            return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
          if (_issue.format === "regex")
            return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue2.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;
        case "unrecognized_keys":
          return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue2.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue2.origin}-\u10E8\u10D8`;
        case "invalid_union":
          return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";
        case "invalid_element":
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue2.origin}-\u10E8\u10D8`;
        default:
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`;
      }
    };
  };
  function ka_default() {
    return {
      localeError: error25()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/kh.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/km.js
  init_node_compat_inject();
  var error26 = () => {
    const Sizable = {
      string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
      file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
      array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
      set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",
      email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",
      url: "URL",
      emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",
      date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",
      time: "\u1798\u17C9\u17C4\u1784 ISO",
      duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",
      ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",
      ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",
      cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",
      cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",
      base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",
      base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",
      json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",
      e164: "\u179B\u17C1\u1781 E.164",
      jwt: "JWT",
      template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u179B\u17C1\u1781",
      array: "\u17A2\u17B6\u179A\u17C1 (Array)",
      null: "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue2.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`;
          }
          return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue2.values[0])}`;
          return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`;
          return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`;
          return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue2.divisor}`;
        case "unrecognized_keys":
          return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`;
        case "invalid_union":
          return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`;
        case "invalid_element":
          return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`;
        default:
          return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`;
      }
    };
  };
  function km_default() {
    return {
      localeError: error26()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/kh.js
  function kh_default() {
    return km_default();
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ko.js
  init_node_compat_inject();
  var error27 = () => {
    const Sizable = {
      string: { unit: "\uBB38\uC790", verb: "to have" },
      file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
      array: { unit: "\uAC1C", verb: "to have" },
      set: { unit: "\uAC1C", verb: "to have" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\uC785\uB825",
      email: "\uC774\uBA54\uC77C \uC8FC\uC18C",
      url: "URL",
      emoji: "\uC774\uBAA8\uC9C0",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04",
      date: "ISO \uB0A0\uC9DC",
      time: "ISO \uC2DC\uAC04",
      duration: "ISO \uAE30\uAC04",
      ipv4: "IPv4 \uC8FC\uC18C",
      ipv6: "IPv6 \uC8FC\uC18C",
      cidrv4: "IPv4 \uBC94\uC704",
      cidrv6: "IPv6 \uBC94\uC704",
      base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",
      base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",
      json_string: "JSON \uBB38\uC790\uC5F4",
      e164: "E.164 \uBC88\uD638",
      jwt: "JWT",
      template_literal: "\uC785\uB825"
    };
    const TypeDictionary = {
      nan: "NaN"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue2.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`;
          }
          return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue2.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`;
          return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue2.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;
        case "too_big": {
          const adj = issue2.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC";
          const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4";
          const sizing = getSizing(issue2.origin);
          const unit = sizing?.unit ?? "\uC694\uC18C";
          if (sizing)
            return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()}${unit} ${adj}${suffix}`;
          return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()} ${adj}${suffix}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC";
          const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4";
          const sizing = getSizing(issue2.origin);
          const unit = sizing?.unit ?? "\uC694\uC18C";
          if (sizing) {
            return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()}${unit} ${adj}${suffix}`;
          }
          return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()} ${adj}${suffix}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`;
          }
          if (_issue.format === "ends_with")
            return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`;
          if (_issue.format === "includes")
            return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`;
          if (_issue.format === "regex")
            return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`;
          return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue2.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;
        case "unrecognized_keys":
          return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\uC798\uBABB\uB41C \uD0A4: ${issue2.origin}`;
        case "invalid_union":
          return `\uC798\uBABB\uB41C \uC785\uB825`;
        case "invalid_element":
          return `\uC798\uBABB\uB41C \uAC12: ${issue2.origin}`;
        default:
          return `\uC798\uBABB\uB41C \uC785\uB825`;
      }
    };
  };
  function ko_default() {
    return {
      localeError: error27()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/lt.js
  init_node_compat_inject();
  var capitalizeFirstCharacter = (text) => {
    return text.charAt(0).toUpperCase() + text.slice(1);
  };
  function getUnitTypeFromNumber(number5) {
    const abs = Math.abs(number5);
    const last = abs % 10;
    const last2 = abs % 100;
    if (last2 >= 11 && last2 <= 19 || last === 0)
      return "many";
    if (last === 1)
      return "one";
    return "few";
  }
  var error28 = () => {
    const Sizable = {
      string: {
        unit: {
          one: "simbolis",
          few: "simboliai",
          many: "simboli\u0173"
        },
        verb: {
          smaller: {
            inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip",
            notInclusive: "turi b\u016Bti trumpesn\u0117 kaip"
          },
          bigger: {
            inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip",
            notInclusive: "turi b\u016Bti ilgesn\u0117 kaip"
          }
        }
      },
      file: {
        unit: {
          one: "baitas",
          few: "baitai",
          many: "bait\u0173"
        },
        verb: {
          smaller: {
            inclusive: "turi b\u016Bti ne didesnis kaip",
            notInclusive: "turi b\u016Bti ma\u017Eesnis kaip"
          },
          bigger: {
            inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip",
            notInclusive: "turi b\u016Bti didesnis kaip"
          }
        }
      },
      array: {
        unit: {
          one: "element\u0105",
          few: "elementus",
          many: "element\u0173"
        },
        verb: {
          smaller: {
            inclusive: "turi tur\u0117ti ne daugiau kaip",
            notInclusive: "turi tur\u0117ti ma\u017Eiau kaip"
          },
          bigger: {
            inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip",
            notInclusive: "turi tur\u0117ti daugiau kaip"
          }
        }
      },
      set: {
        unit: {
          one: "element\u0105",
          few: "elementus",
          many: "element\u0173"
        },
        verb: {
          smaller: {
            inclusive: "turi tur\u0117ti ne daugiau kaip",
            notInclusive: "turi tur\u0117ti ma\u017Eiau kaip"
          },
          bigger: {
            inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip",
            notInclusive: "turi tur\u0117ti daugiau kaip"
          }
        }
      }
    };
    function getSizing(origin2, unitType, inclusive, targetShouldBe) {
      const result = Sizable[origin2] ?? null;
      if (result === null)
        return result;
      return {
        unit: result.unit[unitType],
        verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"]
      };
    }
    const FormatDictionary = {
      regex: "\u012Fvestis",
      email: "el. pa\u0161to adresas",
      url: "URL",
      emoji: "jaustukas",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO data ir laikas",
      date: "ISO data",
      time: "ISO laikas",
      duration: "ISO trukm\u0117",
      ipv4: "IPv4 adresas",
      ipv6: "IPv6 adresas",
      cidrv4: "IPv4 tinklo prefiksas (CIDR)",
      cidrv6: "IPv6 tinklo prefiksas (CIDR)",
      base64: "base64 u\u017Ekoduota eilut\u0117",
      base64url: "base64url u\u017Ekoduota eilut\u0117",
      json_string: "JSON eilut\u0117",
      e164: "E.164 numeris",
      jwt: "JWT",
      template_literal: "\u012Fvestis"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "skai\u010Dius",
      bigint: "sveikasis skai\u010Dius",
      string: "eilut\u0117",
      boolean: "login\u0117 reik\u0161m\u0117",
      undefined: "neapibr\u0117\u017Eta reik\u0161m\u0117",
      function: "funkcija",
      symbol: "simbolis",
      array: "masyvas",
      object: "objektas",
      null: "nulin\u0117 reik\u0161m\u0117"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue2.expected}`;
          }
          return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Privalo b\u016Bti ${stringifyPrimitive(issue2.values[0])}`;
          return `Privalo b\u016Bti vienas i\u0161 ${joinValues(issue2.values, "|")} pasirinkim\u0173`;
        case "too_big": {
          const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
          const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), issue2.inclusive ?? false, "smaller");
          if (sizing?.verb)
            return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "element\u0173"}`;
          const adj = issue2.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip";
          return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`;
        }
        case "too_small": {
          const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
          const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), issue2.inclusive ?? false, "bigger");
          if (sizing?.verb)
            return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "element\u0173"}`;
          const adj = issue2.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip";
          return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Eilut\u0117 privalo atitikti ${_issue.pattern}`;
          return `Neteisingas ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Skai\u010Dius privalo b\u016Bti ${issue2.divisor} kartotinis.`;
        case "unrecognized_keys":
          return `Neatpa\u017Eint${issue2.keys.length > 1 ? "i" : "as"} rakt${issue2.keys.length > 1 ? "ai" : "as"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return "Rastas klaidingas raktas";
        case "invalid_union":
          return "Klaidinga \u012Fvestis";
        case "invalid_element": {
          const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
          return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`;
        }
        default:
          return "Klaidinga \u012Fvestis";
      }
    };
  };
  function lt_default() {
    return {
      localeError: error28()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/mk.js
  init_node_compat_inject();
  var error29 = () => {
    const Sizable = {
      string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
      file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
      array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
      set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0432\u043D\u0435\u0441",
      email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",
      url: "URL",
      emoji: "\u0435\u043C\u043E\u045F\u0438",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",
      date: "ISO \u0434\u0430\u0442\u0443\u043C",
      time: "ISO \u0432\u0440\u0435\u043C\u0435",
      duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",
      ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",
      ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",
      cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433",
      cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433",
      base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",
      base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",
      json_string: "JSON \u043D\u0438\u0437\u0430",
      e164: "E.164 \u0431\u0440\u043E\u0458",
      jwt: "JWT",
      template_literal: "\u0432\u043D\u0435\u0441"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u0431\u0440\u043E\u0458",
      array: "\u043D\u0438\u0437\u0430"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue2.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`;
          }
          return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`;
          return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`;
          return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`;
          return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue2.divisor}`;
        case "unrecognized_keys":
          return `${issue2.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue2.origin}`;
        case "invalid_union":
          return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";
        case "invalid_element":
          return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue2.origin}`;
        default:
          return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`;
      }
    };
  };
  function mk_default() {
    return {
      localeError: error29()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ms.js
  init_node_compat_inject();
  var error30 = () => {
    const Sizable = {
      string: { unit: "aksara", verb: "mempunyai" },
      file: { unit: "bait", verb: "mempunyai" },
      array: { unit: "elemen", verb: "mempunyai" },
      set: { unit: "elemen", verb: "mempunyai" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "input",
      email: "alamat e-mel",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "tarikh masa ISO",
      date: "tarikh ISO",
      time: "masa ISO",
      duration: "tempoh ISO",
      ipv4: "alamat IPv4",
      ipv6: "alamat IPv6",
      cidrv4: "julat IPv4",
      cidrv6: "julat IPv6",
      base64: "string dikodkan base64",
      base64url: "string dikodkan base64url",
      json_string: "string JSON",
      e164: "nombor E.164",
      jwt: "JWT",
      template_literal: "input"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "nombor"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Input tidak sah: dijangka instanceof ${issue2.expected}, diterima ${received}`;
          }
          return `Input tidak sah: dijangka ${expected}, diterima ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`;
          return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`;
          return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} adalah ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `String tidak sah: mesti mengandungi "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`;
          return `${FormatDictionary[_issue.format] ?? issue2.format} tidak sah`;
        }
        case "not_multiple_of":
          return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Kunci tidak sah dalam ${issue2.origin}`;
        case "invalid_union":
          return "Input tidak sah";
        case "invalid_element":
          return `Nilai tidak sah dalam ${issue2.origin}`;
        default:
          return `Input tidak sah`;
      }
    };
  };
  function ms_default() {
    return {
      localeError: error30()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/nl.js
  init_node_compat_inject();
  var error31 = () => {
    const Sizable = {
      string: { unit: "tekens", verb: "heeft" },
      file: { unit: "bytes", verb: "heeft" },
      array: { unit: "elementen", verb: "heeft" },
      set: { unit: "elementen", verb: "heeft" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "invoer",
      email: "emailadres",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO datum en tijd",
      date: "ISO datum",
      time: "ISO tijd",
      duration: "ISO duur",
      ipv4: "IPv4-adres",
      ipv6: "IPv6-adres",
      cidrv4: "IPv4-bereik",
      cidrv6: "IPv6-bereik",
      base64: "base64-gecodeerde tekst",
      base64url: "base64 URL-gecodeerde tekst",
      json_string: "JSON string",
      e164: "E.164-nummer",
      jwt: "JWT",
      template_literal: "invoer"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "getal"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Ongeldige invoer: verwacht instanceof ${issue2.expected}, ontving ${received}`;
          }
          return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`;
          return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          const longName = issue2.origin === "date" ? "laat" : issue2.origin === "string" ? "lang" : "groot";
          if (sizing)
            return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`;
          return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          const shortName = issue2.origin === "date" ? "vroeg" : issue2.origin === "string" ? "kort" : "klein";
          if (sizing) {
            return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`;
          }
          return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`;
          }
          if (_issue.format === "ends_with")
            return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`;
          if (_issue.format === "includes")
            return `Ongeldige tekst: moet "${_issue.includes}" bevatten`;
          if (_issue.format === "regex")
            return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`;
          return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`;
        case "unrecognized_keys":
          return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Ongeldige key in ${issue2.origin}`;
        case "invalid_union":
          return "Ongeldige invoer";
        case "invalid_element":
          return `Ongeldige waarde in ${issue2.origin}`;
        default:
          return `Ongeldige invoer`;
      }
    };
  };
  function nl_default() {
    return {
      localeError: error31()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/no.js
  init_node_compat_inject();
  var error32 = () => {
    const Sizable = {
      string: { unit: "tegn", verb: "\xE5 ha" },
      file: { unit: "bytes", verb: "\xE5 ha" },
      array: { unit: "elementer", verb: "\xE5 inneholde" },
      set: { unit: "elementer", verb: "\xE5 inneholde" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "input",
      email: "e-postadresse",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO dato- og klokkeslett",
      date: "ISO-dato",
      time: "ISO-klokkeslett",
      duration: "ISO-varighet",
      ipv4: "IPv4-omr\xE5de",
      ipv6: "IPv6-omr\xE5de",
      cidrv4: "IPv4-spekter",
      cidrv6: "IPv6-spekter",
      base64: "base64-enkodet streng",
      base64url: "base64url-enkodet streng",
      json_string: "JSON-streng",
      e164: "E.164-nummer",
      jwt: "JWT",
      template_literal: "input"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "tall",
      array: "liste"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Ugyldig input: forventet instanceof ${issue2.expected}, fikk ${received}`;
          }
          return `Ugyldig input: forventet ${expected}, fikk ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`;
          return `Ugyldig valg: forventet en av ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`;
          return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`;
          return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue2.divisor}`;
        case "unrecognized_keys":
          return `${issue2.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Ugyldig n\xF8kkel i ${issue2.origin}`;
        case "invalid_union":
          return "Ugyldig input";
        case "invalid_element":
          return `Ugyldig verdi i ${issue2.origin}`;
        default:
          return `Ugyldig input`;
      }
    };
  };
  function no_default() {
    return {
      localeError: error32()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ota.js
  init_node_compat_inject();
  var error33 = () => {
    const Sizable = {
      string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
      file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
      array: { unit: "unsur", verb: "olmal\u0131d\u0131r" },
      set: { unit: "unsur", verb: "olmal\u0131d\u0131r" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "giren",
      email: "epostag\xE2h",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO heng\xE2m\u0131",
      date: "ISO tarihi",
      time: "ISO zaman\u0131",
      duration: "ISO m\xFCddeti",
      ipv4: "IPv4 ni\u015F\xE2n\u0131",
      ipv6: "IPv6 ni\u015F\xE2n\u0131",
      cidrv4: "IPv4 menzili",
      cidrv6: "IPv6 menzili",
      base64: "base64-\u015Fifreli metin",
      base64url: "base64url-\u015Fifreli metin",
      json_string: "JSON metin",
      e164: "E.164 say\u0131s\u0131",
      jwt: "JWT",
      template_literal: "giren"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "numara",
      array: "saf",
      null: "gayb"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `F\xE2sit giren: umulan instanceof ${issue2.expected}, al\u0131nan ${received}`;
          }
          return `F\xE2sit giren: umulan ${expected}, al\u0131nan ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `F\xE2sit giren: umulan ${stringifyPrimitive(issue2.values[0])}`;
          return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`;
          return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} olmal\u0131yd\u0131.`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`;
          }
          return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmal\u0131yd\u0131.`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`;
          if (_issue.format === "ends_with")
            return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`;
          if (_issue.format === "includes")
            return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`;
          if (_issue.format === "regex")
            return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`;
          return `F\xE2sit ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `F\xE2sit say\u0131: ${issue2.divisor} kat\u0131 olmal\u0131yd\u0131.`;
        case "unrecognized_keys":
          return `Tan\u0131nmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `${issue2.origin} i\xE7in tan\u0131nmayan anahtar var.`;
        case "invalid_union":
          return "Giren tan\u0131namad\u0131.";
        case "invalid_element":
          return `${issue2.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;
        default:
          return `K\u0131ymet tan\u0131namad\u0131.`;
      }
    };
  };
  function ota_default() {
    return {
      localeError: error33()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ps.js
  init_node_compat_inject();
  var error34 = () => {
    const Sizable = {
      string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
      file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
      array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
      set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0648\u0631\u0648\u062F\u064A",
      email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",
      url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644",
      emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",
      date: "\u0646\u06D0\u067C\u0647",
      time: "\u0648\u062E\u062A",
      duration: "\u0645\u0648\u062F\u0647",
      ipv4: "\u062F IPv4 \u067E\u062A\u0647",
      ipv6: "\u062F IPv6 \u067E\u062A\u0647",
      cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647",
      cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647",
      base64: "base64-encoded \u0645\u062A\u0646",
      base64url: "base64url-encoded \u0645\u062A\u0646",
      json_string: "JSON \u0645\u062A\u0646",
      e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",
      jwt: "JWT",
      template_literal: "\u0648\u0631\u0648\u062F\u064A"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u0639\u062F\u062F",
      array: "\u0627\u0631\u06D0"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue2.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;
          }
          return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;
        }
        case "invalid_value":
          if (issue2.values.length === 1) {
            return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue2.values[0])} \u0648\u0627\u06CC`;
          }
          return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue2.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`;
          }
          return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0648\u064A`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`;
          }
          return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0648\u064A`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`;
          }
          if (_issue.format === "ends_with") {
            return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`;
          }
          if (_issue.format === "includes") {
            return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`;
          }
          if (_issue.format === "regex") {
            return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`;
          }
          return `${FormatDictionary[_issue.format] ?? issue2.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`;
        }
        case "not_multiple_of":
          return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue2.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;
        case "unrecognized_keys":
          return `\u0646\u0627\u0633\u0645 ${issue2.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`;
        case "invalid_union":
          return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`;
        case "invalid_element":
          return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`;
        default:
          return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`;
      }
    };
  };
  function ps_default() {
    return {
      localeError: error34()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pl.js
  init_node_compat_inject();
  var error35 = () => {
    const Sizable = {
      string: { unit: "znak\xF3w", verb: "mie\u0107" },
      file: { unit: "bajt\xF3w", verb: "mie\u0107" },
      array: { unit: "element\xF3w", verb: "mie\u0107" },
      set: { unit: "element\xF3w", verb: "mie\u0107" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "wyra\u017Cenie",
      email: "adres email",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "data i godzina w formacie ISO",
      date: "data w formacie ISO",
      time: "godzina w formacie ISO",
      duration: "czas trwania ISO",
      ipv4: "adres IPv4",
      ipv6: "adres IPv6",
      cidrv4: "zakres IPv4",
      cidrv6: "zakres IPv6",
      base64: "ci\u0105g znak\xF3w zakodowany w formacie base64",
      base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url",
      json_string: "ci\u0105g znak\xF3w w formacie JSON",
      e164: "liczba E.164",
      jwt: "JWT",
      template_literal: "wej\u015Bcie"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "liczba",
      array: "tablica"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue2.expected}, otrzymano ${received}`;
          }
          return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`;
          return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`;
          }
          return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`;
          }
          return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`;
          return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Nieprawid\u0142owy klucz w ${issue2.origin}`;
        case "invalid_union":
          return "Nieprawid\u0142owe dane wej\u015Bciowe";
        case "invalid_element":
          return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue2.origin}`;
        default:
          return `Nieprawid\u0142owe dane wej\u015Bciowe`;
      }
    };
  };
  function pl_default() {
    return {
      localeError: error35()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pt.js
  init_node_compat_inject();
  var error36 = () => {
    const Sizable = {
      string: { unit: "caracteres", verb: "ter" },
      file: { unit: "bytes", verb: "ter" },
      array: { unit: "itens", verb: "ter" },
      set: { unit: "itens", verb: "ter" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "padr\xE3o",
      email: "endere\xE7o de e-mail",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "data e hora ISO",
      date: "data ISO",
      time: "hora ISO",
      duration: "dura\xE7\xE3o ISO",
      ipv4: "endere\xE7o IPv4",
      ipv6: "endere\xE7o IPv6",
      cidrv4: "faixa de IPv4",
      cidrv6: "faixa de IPv6",
      base64: "texto codificado em base64",
      base64url: "URL codificada em base64",
      json_string: "texto JSON",
      e164: "n\xFAmero E.164",
      jwt: "JWT",
      template_literal: "entrada"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "n\xFAmero",
      null: "nulo"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Tipo inv\xE1lido: esperado instanceof ${issue2.expected}, recebido ${received}`;
          }
          return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`;
          return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
          return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`;
          return `${FormatDictionary[_issue.format] ?? issue2.format} inv\xE1lido`;
        }
        case "not_multiple_of":
          return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Chave inv\xE1lida em ${issue2.origin}`;
        case "invalid_union":
          return "Entrada inv\xE1lida";
        case "invalid_element":
          return `Valor inv\xE1lido em ${issue2.origin}`;
        default:
          return `Campo inv\xE1lido`;
      }
    };
  };
  function pt_default() {
    return {
      localeError: error36()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ro.js
  init_node_compat_inject();
  var error37 = () => {
    const Sizable = {
      string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
      file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
      array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
      set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
      map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "intrare",
      email: "adres\u0103 de email",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "dat\u0103 \u0219i or\u0103 ISO",
      date: "dat\u0103 ISO",
      time: "or\u0103 ISO",
      duration: "durat\u0103 ISO",
      ipv4: "adres\u0103 IPv4",
      ipv6: "adres\u0103 IPv6",
      mac: "adres\u0103 MAC",
      cidrv4: "interval IPv4",
      cidrv6: "interval IPv6",
      base64: "\u0219ir codat base64",
      base64url: "\u0219ir codat base64url",
      json_string: "\u0219ir JSON",
      e164: "num\u0103r E.164",
      jwt: "JWT",
      template_literal: "intrare"
    };
    const TypeDictionary = {
      nan: "NaN",
      string: "\u0219ir",
      number: "num\u0103r",
      boolean: "boolean",
      function: "func\u021Bie",
      array: "matrice",
      object: "obiect",
      undefined: "nedefinit",
      symbol: "simbol",
      bigint: "num\u0103r mare",
      void: "void",
      never: "never",
      map: "hart\u0103",
      set: "set"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
          return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
          return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
          return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
        case "invalid_union":
          return "Intrare invalid\u0103";
        case "invalid_element":
          return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
        default:
          return `Intrare invalid\u0103`;
      }
    };
  };
  function ro_default() {
    return {
      localeError: error37()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ru.js
  init_node_compat_inject();
  function getRussianPlural(count, one, few, many) {
    const absCount = Math.abs(count);
    const lastDigit = absCount % 10;
    const lastTwoDigits = absCount % 100;
    if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
      return many;
    }
    if (lastDigit === 1) {
      return one;
    }
    if (lastDigit >= 2 && lastDigit <= 4) {
      return few;
    }
    return many;
  }
  var error38 = () => {
    const Sizable = {
      string: {
        unit: {
          one: "\u0441\u0438\u043C\u0432\u043E\u043B",
          few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430",
          many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"
        },
        verb: "\u0438\u043C\u0435\u0442\u044C"
      },
      file: {
        unit: {
          one: "\u0431\u0430\u0439\u0442",
          few: "\u0431\u0430\u0439\u0442\u0430",
          many: "\u0431\u0430\u0439\u0442"
        },
        verb: "\u0438\u043C\u0435\u0442\u044C"
      },
      array: {
        unit: {
          one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442",
          few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",
          many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"
        },
        verb: "\u0438\u043C\u0435\u0442\u044C"
      },
      set: {
        unit: {
          one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442",
          few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",
          many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"
        },
        verb: "\u0438\u043C\u0435\u0442\u044C"
      }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0432\u0432\u043E\u0434",
      email: "email \u0430\u0434\u0440\u0435\u0441",
      url: "URL",
      emoji: "\u044D\u043C\u043E\u0434\u0437\u0438",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",
      date: "ISO \u0434\u0430\u0442\u0430",
      time: "ISO \u0432\u0440\u0435\u043C\u044F",
      duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",
      ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441",
      ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441",
      cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",
      cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",
      base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",
      base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",
      json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430",
      e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
      jwt: "JWT",
      template_literal: "\u0432\u0432\u043E\u0434"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u0447\u0438\u0441\u043B\u043E",
      array: "\u043C\u0430\u0441\u0441\u0438\u0432"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`;
          }
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue2.values[0])}`;
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            const maxValue = Number(issue2.maximum);
            const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
            return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.maximum.toString()} ${unit}`;
          }
          return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            const minValue = Number(issue2.minimum);
            const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
            return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.minimum.toString()} ${unit}`;
          }
          return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`;
        case "unrecognized_keys":
          return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue2.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`;
        case "invalid_union":
          return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";
        case "invalid_element":
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue2.origin}`;
        default:
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`;
      }
    };
  };
  function ru_default() {
    return {
      localeError: error38()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sl.js
  init_node_compat_inject();
  var error39 = () => {
    const Sizable = {
      string: { unit: "znakov", verb: "imeti" },
      file: { unit: "bajtov", verb: "imeti" },
      array: { unit: "elementov", verb: "imeti" },
      set: { unit: "elementov", verb: "imeti" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "vnos",
      email: "e-po\u0161tni naslov",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO datum in \u010Das",
      date: "ISO datum",
      time: "ISO \u010Das",
      duration: "ISO trajanje",
      ipv4: "IPv4 naslov",
      ipv6: "IPv6 naslov",
      cidrv4: "obseg IPv4",
      cidrv6: "obseg IPv6",
      base64: "base64 kodiran niz",
      base64url: "base64url kodiran niz",
      json_string: "JSON niz",
      e164: "E.164 \u0161tevilka",
      jwt: "JWT",
      template_literal: "vnos"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u0161tevilo",
      array: "tabela"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue2.expected}, prejeto ${received}`;
          }
          return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue2.values[0])}`;
          return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} imelo ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementov"}`;
          return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Neveljaven niz: mora vsebovati "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`;
          return `Neveljaven ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Neprepoznan${issue2.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Neveljaven klju\u010D v ${issue2.origin}`;
        case "invalid_union":
          return "Neveljaven vnos";
        case "invalid_element":
          return `Neveljavna vrednost v ${issue2.origin}`;
        default:
          return "Neveljaven vnos";
      }
    };
  };
  function sl_default() {
    return {
      localeError: error39()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sv.js
  init_node_compat_inject();
  var error40 = () => {
    const Sizable = {
      string: { unit: "tecken", verb: "att ha" },
      file: { unit: "bytes", verb: "att ha" },
      array: { unit: "objekt", verb: "att inneh\xE5lla" },
      set: { unit: "objekt", verb: "att inneh\xE5lla" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "regulj\xE4rt uttryck",
      email: "e-postadress",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO-datum och tid",
      date: "ISO-datum",
      time: "ISO-tid",
      duration: "ISO-varaktighet",
      ipv4: "IPv4-intervall",
      ipv6: "IPv6-intervall",
      cidrv4: "IPv4-spektrum",
      cidrv6: "IPv6-spektrum",
      base64: "base64-kodad str\xE4ng",
      base64url: "base64url-kodad str\xE4ng",
      json_string: "JSON-str\xE4ng",
      e164: "E.164-nummer",
      jwt: "JWT",
      template_literal: "mall-literal"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "antal",
      array: "lista"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${issue2.expected}, fick ${received}`;
          }
          return `Ogiltig inmatning: f\xF6rv\xE4ntat ${expected}, fick ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue2.values[0])}`;
          return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`;
          }
          return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`;
          return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue2.divisor}`;
        case "unrecognized_keys":
          return `${issue2.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Ogiltig nyckel i ${issue2.origin ?? "v\xE4rdet"}`;
        case "invalid_union":
          return "Ogiltig input";
        case "invalid_element":
          return `Ogiltigt v\xE4rde i ${issue2.origin ?? "v\xE4rdet"}`;
        default:
          return `Ogiltig input`;
      }
    };
  };
  function sv_default() {
    return {
      localeError: error40()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ta.js
  init_node_compat_inject();
  var error41 = () => {
    const Sizable = {
      string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
      file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
      array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
      set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",
      email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",
      date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF",
      time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",
      duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",
      ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",
      ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",
      cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",
      cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",
      base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",
      base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",
      json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD",
      e164: "E.164 \u0B8E\u0BA3\u0BCD",
      jwt: "JWT",
      template_literal: "input"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u0B8E\u0BA3\u0BCD",
      array: "\u0B85\u0BA3\u0BBF",
      null: "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue2.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`;
          }
          return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue2.values[0])}`;
          return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue2.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
          }
          return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
          }
          return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
          if (_issue.format === "ends_with")
            return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
          if (_issue.format === "includes")
            return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
          if (_issue.format === "regex")
            return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
          return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue2.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
        case "unrecognized_keys":
          return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue2.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;
        case "invalid_union":
          return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";
        case "invalid_element":
          return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;
        default:
          return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`;
      }
    };
  };
  function ta_default() {
    return {
      localeError: error41()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/th.js
  init_node_compat_inject();
  var error42 = () => {
    const Sizable = {
      string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
      file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
      array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
      set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",
      email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",
      url: "URL",
      emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
      date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",
      time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
      duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
      ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",
      ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",
      cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",
      cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",
      base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",
      base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",
      json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",
      e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",
      jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",
      template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",
      array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",
      null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;
          }
          return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue2.values[0])}`;
          return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`;
          return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`;
          }
          if (_issue.format === "ends_with")
            return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`;
          if (_issue.format === "regex")
            return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`;
          return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue2.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;
        case "unrecognized_keys":
          return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`;
        case "invalid_union":
          return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";
        case "invalid_element":
          return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`;
        default:
          return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`;
      }
    };
  };
  function th_default() {
    return {
      localeError: error42()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/tr.js
  init_node_compat_inject();
  var error43 = () => {
    const Sizable = {
      string: { unit: "karakter", verb: "olmal\u0131" },
      file: { unit: "bayt", verb: "olmal\u0131" },
      array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" },
      set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "girdi",
      email: "e-posta adresi",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO tarih ve saat",
      date: "ISO tarih",
      time: "ISO saat",
      duration: "ISO s\xFCre",
      ipv4: "IPv4 adresi",
      ipv6: "IPv6 adresi",
      cidrv4: "IPv4 aral\u0131\u011F\u0131",
      cidrv6: "IPv6 aral\u0131\u011F\u0131",
      base64: "base64 ile \u015Fifrelenmi\u015F metin",
      base64url: "base64url ile \u015Fifrelenmi\u015F metin",
      json_string: "JSON dizesi",
      e164: "E.164 say\u0131s\u0131",
      jwt: "JWT",
      template_literal: "\u015Eablon dizesi"
    };
    const TypeDictionary = {
      nan: "NaN"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Ge\xE7ersiz de\u011Fer: beklenen instanceof ${issue2.expected}, al\u0131nan ${received}`;
          }
          return `Ge\xE7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue2.values[0])}`;
          return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`;
          return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`;
          if (_issue.format === "ends_with")
            return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`;
          if (_issue.format === "includes")
            return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`;
          if (_issue.format === "regex")
            return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`;
          return `Ge\xE7ersiz ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Ge\xE7ersiz say\u0131: ${issue2.divisor} ile tam b\xF6l\xFCnebilmeli`;
        case "unrecognized_keys":
          return `Tan\u0131nmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `${issue2.origin} i\xE7inde ge\xE7ersiz anahtar`;
        case "invalid_union":
          return "Ge\xE7ersiz de\u011Fer";
        case "invalid_element":
          return `${issue2.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;
        default:
          return `Ge\xE7ersiz de\u011Fer`;
      }
    };
  };
  function tr_default() {
    return {
      localeError: error43()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ua.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uk.js
  init_node_compat_inject();
  var error44 = () => {
    const Sizable = {
      string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
      file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
      array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
      set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",
      email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",
      url: "URL",
      emoji: "\u0435\u043C\u043E\u0434\u0437\u0456",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",
      date: "\u0434\u0430\u0442\u0430 ISO",
      time: "\u0447\u0430\u0441 ISO",
      duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",
      ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",
      ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",
      cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",
      cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",
      base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",
      base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",
      json_string: "\u0440\u044F\u0434\u043E\u043A JSON",
      e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
      jwt: "JWT",
      template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u0447\u0438\u0441\u043B\u043E",
      array: "\u043C\u0430\u0441\u0438\u0432"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue2.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`;
          }
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`;
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`;
          return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} \u0431\u0443\u0434\u0435 ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue2.divisor}`;
        case "unrecognized_keys":
          return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`;
        case "invalid_union":
          return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";
        case "invalid_element":
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue2.origin}`;
        default:
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`;
      }
    };
  };
  function uk_default() {
    return {
      localeError: error44()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ua.js
  function ua_default() {
    return uk_default();
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ur.js
  init_node_compat_inject();
  var error45 = () => {
    const Sizable = {
      string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
      file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
      array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" },
      set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0627\u0646 \u067E\u0679",
      email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",
      url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",
      emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC",
      uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",
      uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",
      uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",
      nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",
      guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",
      cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",
      cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",
      ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",
      xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",
      ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",
      datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",
      date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",
      time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",
      duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",
      ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",
      ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",
      cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",
      cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",
      base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",
      base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",
      json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",
      e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631",
      jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",
      template_literal: "\u0627\u0646 \u067E\u0679"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u0646\u0645\u0628\u0631",
      array: "\u0622\u0631\u06D2",
      null: "\u0646\u0644"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue2.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;
          }
          return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue2.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;
          return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue2.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;
          return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue2.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u06D2 ${adj}${issue2.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;
          }
          return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u0627 ${adj}${issue2.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;
          }
          if (_issue.format === "ends_with")
            return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;
          if (_issue.format === "includes")
            return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;
          if (_issue.format === "regex")
            return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;
          return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue2.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;
        case "unrecognized_keys":
          return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue2.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue2.keys, "\u060C ")}`;
        case "invalid_key":
          return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;
        case "invalid_union":
          return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";
        case "invalid_element":
          return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;
        default:
          return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`;
      }
    };
  };
  function ur_default() {
    return {
      localeError: error45()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uz.js
  init_node_compat_inject();
  var error46 = () => {
    const Sizable = {
      string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
      file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
      array: { unit: "element", verb: "bo\u2018lishi kerak" },
      set: { unit: "element", verb: "bo\u2018lishi kerak" },
      map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "kirish",
      email: "elektron pochta manzili",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO sana va vaqti",
      date: "ISO sana",
      time: "ISO vaqt",
      duration: "ISO davomiylik",
      ipv4: "IPv4 manzil",
      ipv6: "IPv6 manzil",
      mac: "MAC manzil",
      cidrv4: "IPv4 diapazon",
      cidrv6: "IPv6 diapazon",
      base64: "base64 kodlangan satr",
      base64url: "base64url kodlangan satr",
      json_string: "JSON satr",
      e164: "E.164 raqam",
      jwt: "JWT",
      template_literal: "kirish"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "raqam",
      array: "massiv"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue2.expected}, qabul qilingan ${received}`;
          }
          return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `Noto\u2018g\u2018ri kirish: kutilgan ${stringifyPrimitive(issue2.values[0])}`;
          return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()} ${sizing.unit} ${sizing.verb}`;
          return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`;
          }
          return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Noto\u2018g\u2018ri satr: "${_issue.prefix}" bilan boshlanishi kerak`;
          if (_issue.format === "ends_with")
            return `Noto\u2018g\u2018ri satr: "${_issue.suffix}" bilan tugashi kerak`;
          if (_issue.format === "includes")
            return `Noto\u2018g\u2018ri satr: "${_issue.includes}" ni o\u2018z ichiga olishi kerak`;
          if (_issue.format === "regex")
            return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`;
          return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `Noto\u2018g\u2018ri raqam: ${issue2.divisor} ning karralisi bo\u2018lishi kerak`;
        case "unrecognized_keys":
          return `Noma\u2019lum kalit${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `${issue2.origin} dagi kalit noto\u2018g\u2018ri`;
        case "invalid_union":
          return "Noto\u2018g\u2018ri kirish";
        case "invalid_element":
          return `${issue2.origin} da noto\u2018g\u2018ri qiymat`;
        default:
          return `Noto\u2018g\u2018ri kirish`;
      }
    };
  };
  function uz_default() {
    return {
      localeError: error46()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/vi.js
  init_node_compat_inject();
  var error47 = () => {
    const Sizable = {
      string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
      file: { unit: "byte", verb: "c\xF3" },
      array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" },
      set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u0111\u1EA7u v\xE0o",
      email: "\u0111\u1ECBa ch\u1EC9 email",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ng\xE0y gi\u1EDD ISO",
      date: "ng\xE0y ISO",
      time: "gi\u1EDD ISO",
      duration: "kho\u1EA3ng th\u1EDDi gian ISO",
      ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4",
      ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6",
      cidrv4: "d\u1EA3i IPv4",
      cidrv6: "d\u1EA3i IPv6",
      base64: "chu\u1ED7i m\xE3 h\xF3a base64",
      base64url: "chu\u1ED7i m\xE3 h\xF3a base64url",
      json_string: "chu\u1ED7i JSON",
      e164: "s\u1ED1 E.164",
      jwt: "JWT",
      template_literal: "\u0111\u1EA7u v\xE0o"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "s\u1ED1",
      array: "m\u1EA3ng"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue2.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`;
          }
          return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue2.values[0])}`;
          return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`;
          return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`;
          return `${FormatDictionary[_issue.format] ?? issue2.format} kh\xF4ng h\u1EE3p l\u1EC7`;
        }
        case "not_multiple_of":
          return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue2.divisor}`;
        case "unrecognized_keys":
          return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`;
        case "invalid_union":
          return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";
        case "invalid_element":
          return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`;
        default:
          return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`;
      }
    };
  };
  function vi_default() {
    return {
      localeError: error47()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-CN.js
  init_node_compat_inject();
  var error48 = () => {
    const Sizable = {
      string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
      file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
      array: { unit: "\u9879", verb: "\u5305\u542B" },
      set: { unit: "\u9879", verb: "\u5305\u542B" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u8F93\u5165",
      email: "\u7535\u5B50\u90AE\u4EF6",
      url: "URL",
      emoji: "\u8868\u60C5\u7B26\u53F7",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO\u65E5\u671F\u65F6\u95F4",
      date: "ISO\u65E5\u671F",
      time: "ISO\u65F6\u95F4",
      duration: "ISO\u65F6\u957F",
      ipv4: "IPv4\u5730\u5740",
      ipv6: "IPv6\u5730\u5740",
      cidrv4: "IPv4\u7F51\u6BB5",
      cidrv6: "IPv6\u7F51\u6BB5",
      base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32",
      base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32",
      json_string: "JSON\u5B57\u7B26\u4E32",
      e164: "E.164\u53F7\u7801",
      jwt: "JWT",
      template_literal: "\u8F93\u5165"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "\u6570\u5B57",
      array: "\u6570\u7EC4",
      null: "\u7A7A\u503C(null)"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue2.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`;
          }
          return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue2.values[0])}`;
          return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`;
          return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`;
          if (_issue.format === "ends_with")
            return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`;
          if (_issue.format === "includes")
            return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`;
          return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue2.divisor} \u7684\u500D\u6570`;
        case "unrecognized_keys":
          return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `${issue2.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;
        case "invalid_union":
          return "\u65E0\u6548\u8F93\u5165";
        case "invalid_element":
          return `${issue2.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;
        default:
          return `\u65E0\u6548\u8F93\u5165`;
      }
    };
  };
  function zh_CN_default() {
    return {
      localeError: error48()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-TW.js
  init_node_compat_inject();
  var error49 = () => {
    const Sizable = {
      string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
      file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
      array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" },
      set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u8F38\u5165",
      email: "\u90F5\u4EF6\u5730\u5740",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "ISO \u65E5\u671F\u6642\u9593",
      date: "ISO \u65E5\u671F",
      time: "ISO \u6642\u9593",
      duration: "ISO \u671F\u9593",
      ipv4: "IPv4 \u4F4D\u5740",
      ipv6: "IPv6 \u4F4D\u5740",
      cidrv4: "IPv4 \u7BC4\u570D",
      cidrv6: "IPv6 \u7BC4\u570D",
      base64: "base64 \u7DE8\u78BC\u5B57\u4E32",
      base64url: "base64url \u7DE8\u78BC\u5B57\u4E32",
      json_string: "JSON \u5B57\u4E32",
      e164: "E.164 \u6578\u503C",
      jwt: "JWT",
      template_literal: "\u8F38\u5165"
    };
    const TypeDictionary = {
      nan: "NaN"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue2.expected}\uFF0C\u4F46\u6536\u5230 ${received}`;
          }
          return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue2.values[0])}`;
          return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`;
          return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing) {
            return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
          }
          return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with") {
            return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`;
          }
          if (_issue.format === "ends_with")
            return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`;
          if (_issue.format === "includes")
            return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`;
          return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue2.divisor} \u7684\u500D\u6578`;
        case "unrecognized_keys":
          return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue2.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue2.keys, "\u3001")}`;
        case "invalid_key":
          return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;
        case "invalid_union":
          return "\u7121\u6548\u7684\u8F38\u5165\u503C";
        case "invalid_element":
          return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;
        default:
          return `\u7121\u6548\u7684\u8F38\u5165\u503C`;
      }
    };
  };
  function zh_TW_default() {
    return {
      localeError: error49()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/yo.js
  init_node_compat_inject();
  var error50 = () => {
    const Sizable = {
      string: { unit: "\xE0mi", verb: "n\xED" },
      file: { unit: "bytes", verb: "n\xED" },
      array: { unit: "nkan", verb: "n\xED" },
      set: { unit: "nkan", verb: "n\xED" }
    };
    function getSizing(origin2) {
      return Sizable[origin2] ?? null;
    }
    const FormatDictionary = {
      regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",
      email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",
      url: "URL",
      emoji: "emoji",
      uuid: "UUID",
      uuidv4: "UUIDv4",
      uuidv6: "UUIDv6",
      nanoid: "nanoid",
      guid: "GUID",
      cuid: "cuid",
      cuid2: "cuid2",
      ulid: "ULID",
      xid: "XID",
      ksuid: "KSUID",
      datetime: "\xE0k\xF3k\xF2 ISO",
      date: "\u1ECDj\u1ECD\u0301 ISO",
      time: "\xE0k\xF3k\xF2 ISO",
      duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",
      ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",
      ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",
      cidrv4: "\xE0gb\xE8gb\xE8 IPv4",
      cidrv6: "\xE0gb\xE8gb\xE8 IPv6",
      base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",
      base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url",
      json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON",
      e164: "n\u1ECD\u0301mb\xE0 E.164",
      jwt: "JWT",
      template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"
    };
    const TypeDictionary = {
      nan: "NaN",
      number: "n\u1ECD\u0301mb\xE0",
      array: "akop\u1ECD"
    };
    return (issue2) => {
      switch (issue2.code) {
        case "invalid_type": {
          const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
          const receivedType = parsedType(issue2.input);
          const received = TypeDictionary[receivedType] ?? receivedType;
          if (/^[A-Z]/.test(issue2.expected)) {
            return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${issue2.expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`;
          }
          return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`;
        }
        case "invalid_value":
          if (issue2.values.length === 1)
            return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive(issue2.values[0])}`;
          return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues(issue2.values, "|")}`;
        case "too_big": {
          const adj = issue2.inclusive ? "<=" : "<";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin ?? "iye"} ${sizing.verb} ${adj}${issue2.maximum} ${sizing.unit}`;
          return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.maximum}`;
        }
        case "too_small": {
          const adj = issue2.inclusive ? ">=" : ">";
          const sizing = getSizing(issue2.origin);
          if (sizing)
            return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum} ${sizing.unit}`;
          return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.minimum}`;
        }
        case "invalid_format": {
          const _issue = issue2;
          if (_issue.format === "starts_with")
            return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`;
          if (_issue.format === "ends_with")
            return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`;
          if (_issue.format === "includes")
            return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`;
          if (_issue.format === "regex")
            return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`;
          return `A\u1E63\xEC\u1E63e: ${FormatDictionary[_issue.format] ?? issue2.format}`;
        }
        case "not_multiple_of":
          return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue2.divisor}`;
        case "unrecognized_keys":
          return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues(issue2.keys, ", ")}`;
        case "invalid_key":
          return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`;
        case "invalid_union":
          return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";
        case "invalid_element":
          return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`;
        default:
          return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";
      }
    };
  };
  function yo_default() {
    return {
      localeError: error50()
    };
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
  init_node_compat_inject();
  var _a3;
  var $output = /* @__PURE__ */ Symbol("ZodOutput");
  var $input = /* @__PURE__ */ Symbol("ZodInput");
  var $ZodRegistry = class {
    constructor() {
      this._map = /* @__PURE__ */ new WeakMap();
      this._idmap = /* @__PURE__ */ new Map();
    }
    add(schema, ..._meta) {
      const meta3 = _meta[0];
      this._map.set(schema, meta3);
      if (meta3 && typeof meta3 === "object" && "id" in meta3) {
        this._idmap.set(meta3.id, schema);
      }
      return this;
    }
    clear() {
      this._map = /* @__PURE__ */ new WeakMap();
      this._idmap = /* @__PURE__ */ new Map();
      return this;
    }
    remove(schema) {
      const meta3 = this._map.get(schema);
      if (meta3 && typeof meta3 === "object" && "id" in meta3) {
        this._idmap.delete(meta3.id);
      }
      this._map.delete(schema);
      return this;
    }
    get(schema) {
      const p7 = schema._zod.parent;
      if (p7) {
        const pm = { ...this.get(p7) ?? {} };
        delete pm.id;
        const f7 = { ...pm, ...this._map.get(schema) };
        return Object.keys(f7).length ? f7 : void 0;
      }
      return this._map.get(schema);
    }
    has(schema) {
      return this._map.has(schema);
    }
  };
  function registry() {
    return new $ZodRegistry();
  }
  (_a3 = globalThis).__zod_globalRegistry ?? (_a3.__zod_globalRegistry = registry());
  var globalRegistry = globalThis.__zod_globalRegistry;

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
  init_node_compat_inject();
  // @__NO_SIDE_EFFECTS__
  function _string(Class2, params) {
    return new Class2({
      type: "string",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _coercedString(Class2, params) {
    return new Class2({
      type: "string",
      coerce: true,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _email(Class2, params) {
    return new Class2({
      type: "string",
      format: "email",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _guid(Class2, params) {
    return new Class2({
      type: "string",
      format: "guid",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _uuid(Class2, params) {
    return new Class2({
      type: "string",
      format: "uuid",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _uuidv4(Class2, params) {
    return new Class2({
      type: "string",
      format: "uuid",
      check: "string_format",
      abort: false,
      version: "v4",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _uuidv6(Class2, params) {
    return new Class2({
      type: "string",
      format: "uuid",
      check: "string_format",
      abort: false,
      version: "v6",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _uuidv7(Class2, params) {
    return new Class2({
      type: "string",
      format: "uuid",
      check: "string_format",
      abort: false,
      version: "v7",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _url(Class2, params) {
    return new Class2({
      type: "string",
      format: "url",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _emoji2(Class2, params) {
    return new Class2({
      type: "string",
      format: "emoji",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _nanoid(Class2, params) {
    return new Class2({
      type: "string",
      format: "nanoid",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _cuid(Class2, params) {
    return new Class2({
      type: "string",
      format: "cuid",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _cuid2(Class2, params) {
    return new Class2({
      type: "string",
      format: "cuid2",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _ulid(Class2, params) {
    return new Class2({
      type: "string",
      format: "ulid",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _xid(Class2, params) {
    return new Class2({
      type: "string",
      format: "xid",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _ksuid(Class2, params) {
    return new Class2({
      type: "string",
      format: "ksuid",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _ipv4(Class2, params) {
    return new Class2({
      type: "string",
      format: "ipv4",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _ipv6(Class2, params) {
    return new Class2({
      type: "string",
      format: "ipv6",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _mac(Class2, params) {
    return new Class2({
      type: "string",
      format: "mac",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _cidrv4(Class2, params) {
    return new Class2({
      type: "string",
      format: "cidrv4",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _cidrv6(Class2, params) {
    return new Class2({
      type: "string",
      format: "cidrv6",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _base64(Class2, params) {
    return new Class2({
      type: "string",
      format: "base64",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _base64url(Class2, params) {
    return new Class2({
      type: "string",
      format: "base64url",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _e164(Class2, params) {
    return new Class2({
      type: "string",
      format: "e164",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _jwt(Class2, params) {
    return new Class2({
      type: "string",
      format: "jwt",
      check: "string_format",
      abort: false,
      ...normalizeParams(params)
    });
  }
  var TimePrecision = {
    Any: null,
    Minute: -1,
    Second: 0,
    Millisecond: 3,
    Microsecond: 6
  };
  // @__NO_SIDE_EFFECTS__
  function _isoDateTime(Class2, params) {
    return new Class2({
      type: "string",
      format: "datetime",
      check: "string_format",
      offset: false,
      local: false,
      precision: null,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _isoDate(Class2, params) {
    return new Class2({
      type: "string",
      format: "date",
      check: "string_format",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _isoTime(Class2, params) {
    return new Class2({
      type: "string",
      format: "time",
      check: "string_format",
      precision: null,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _isoDuration(Class2, params) {
    return new Class2({
      type: "string",
      format: "duration",
      check: "string_format",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _number(Class2, params) {
    return new Class2({
      type: "number",
      checks: [],
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _coercedNumber(Class2, params) {
    return new Class2({
      type: "number",
      coerce: true,
      checks: [],
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _int(Class2, params) {
    return new Class2({
      type: "number",
      check: "number_format",
      abort: false,
      format: "safeint",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _float32(Class2, params) {
    return new Class2({
      type: "number",
      check: "number_format",
      abort: false,
      format: "float32",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _float64(Class2, params) {
    return new Class2({
      type: "number",
      check: "number_format",
      abort: false,
      format: "float64",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _int32(Class2, params) {
    return new Class2({
      type: "number",
      check: "number_format",
      abort: false,
      format: "int32",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _uint32(Class2, params) {
    return new Class2({
      type: "number",
      check: "number_format",
      abort: false,
      format: "uint32",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _boolean(Class2, params) {
    return new Class2({
      type: "boolean",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _coercedBoolean(Class2, params) {
    return new Class2({
      type: "boolean",
      coerce: true,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _bigint(Class2, params) {
    return new Class2({
      type: "bigint",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _coercedBigint(Class2, params) {
    return new Class2({
      type: "bigint",
      coerce: true,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _int64(Class2, params) {
    return new Class2({
      type: "bigint",
      check: "bigint_format",
      abort: false,
      format: "int64",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _uint64(Class2, params) {
    return new Class2({
      type: "bigint",
      check: "bigint_format",
      abort: false,
      format: "uint64",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _symbol(Class2, params) {
    return new Class2({
      type: "symbol",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _undefined2(Class2, params) {
    return new Class2({
      type: "undefined",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _null2(Class2, params) {
    return new Class2({
      type: "null",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _any(Class2) {
    return new Class2({
      type: "any"
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _unknown(Class2) {
    return new Class2({
      type: "unknown"
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _never(Class2, params) {
    return new Class2({
      type: "never",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _void(Class2, params) {
    return new Class2({
      type: "void",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _date(Class2, params) {
    return new Class2({
      type: "date",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _coercedDate(Class2, params) {
    return new Class2({
      type: "date",
      coerce: true,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _nan(Class2, params) {
    return new Class2({
      type: "nan",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _lt(value, params) {
    return new $ZodCheckLessThan({
      check: "less_than",
      ...normalizeParams(params),
      value,
      inclusive: false
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _lte(value, params) {
    return new $ZodCheckLessThan({
      check: "less_than",
      ...normalizeParams(params),
      value,
      inclusive: true
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _gt(value, params) {
    return new $ZodCheckGreaterThan({
      check: "greater_than",
      ...normalizeParams(params),
      value,
      inclusive: false
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _gte(value, params) {
    return new $ZodCheckGreaterThan({
      check: "greater_than",
      ...normalizeParams(params),
      value,
      inclusive: true
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _positive(params) {
    return /* @__PURE__ */ _gt(0, params);
  }
  // @__NO_SIDE_EFFECTS__
  function _negative(params) {
    return /* @__PURE__ */ _lt(0, params);
  }
  // @__NO_SIDE_EFFECTS__
  function _nonpositive(params) {
    return /* @__PURE__ */ _lte(0, params);
  }
  // @__NO_SIDE_EFFECTS__
  function _nonnegative(params) {
    return /* @__PURE__ */ _gte(0, params);
  }
  // @__NO_SIDE_EFFECTS__
  function _multipleOf(value, params) {
    return new $ZodCheckMultipleOf({
      check: "multiple_of",
      ...normalizeParams(params),
      value
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _maxSize(maximum, params) {
    return new $ZodCheckMaxSize({
      check: "max_size",
      ...normalizeParams(params),
      maximum
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _minSize(minimum, params) {
    return new $ZodCheckMinSize({
      check: "min_size",
      ...normalizeParams(params),
      minimum
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _size(size5, params) {
    return new $ZodCheckSizeEquals({
      check: "size_equals",
      ...normalizeParams(params),
      size: size5
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _maxLength(maximum, params) {
    const ch = new $ZodCheckMaxLength({
      check: "max_length",
      ...normalizeParams(params),
      maximum
    });
    return ch;
  }
  // @__NO_SIDE_EFFECTS__
  function _minLength(minimum, params) {
    return new $ZodCheckMinLength({
      check: "min_length",
      ...normalizeParams(params),
      minimum
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _length(length2, params) {
    return new $ZodCheckLengthEquals({
      check: "length_equals",
      ...normalizeParams(params),
      length: length2
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _regex(pattern, params) {
    return new $ZodCheckRegex({
      check: "string_format",
      format: "regex",
      ...normalizeParams(params),
      pattern
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _lowercase(params) {
    return new $ZodCheckLowerCase({
      check: "string_format",
      format: "lowercase",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _uppercase(params) {
    return new $ZodCheckUpperCase({
      check: "string_format",
      format: "uppercase",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _includes(includes, params) {
    return new $ZodCheckIncludes({
      check: "string_format",
      format: "includes",
      ...normalizeParams(params),
      includes
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _startsWith(prefix, params) {
    return new $ZodCheckStartsWith({
      check: "string_format",
      format: "starts_with",
      ...normalizeParams(params),
      prefix
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _endsWith(suffix, params) {
    return new $ZodCheckEndsWith({
      check: "string_format",
      format: "ends_with",
      ...normalizeParams(params),
      suffix
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _property(property, schema, params) {
    return new $ZodCheckProperty({
      check: "property",
      property,
      schema,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _mime(types, params) {
    return new $ZodCheckMimeType({
      check: "mime_type",
      mime: types,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _overwrite(tx) {
    return new $ZodCheckOverwrite({
      check: "overwrite",
      tx
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _normalize(form) {
    return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
  }
  // @__NO_SIDE_EFFECTS__
  function _trim() {
    return /* @__PURE__ */ _overwrite((input) => input.trim());
  }
  // @__NO_SIDE_EFFECTS__
  function _toLowerCase() {
    return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
  }
  // @__NO_SIDE_EFFECTS__
  function _toUpperCase() {
    return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
  }
  // @__NO_SIDE_EFFECTS__
  function _slugify() {
    return /* @__PURE__ */ _overwrite((input) => slugify(input));
  }
  // @__NO_SIDE_EFFECTS__
  function _array(Class2, element, params) {
    return new Class2({
      type: "array",
      element,
      // get element() {
      //   return element;
      // },
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _union(Class2, options, params) {
    return new Class2({
      type: "union",
      options,
      ...normalizeParams(params)
    });
  }
  function _xor(Class2, options, params) {
    return new Class2({
      type: "union",
      options,
      inclusive: false,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _discriminatedUnion(Class2, discriminator, options, params) {
    return new Class2({
      type: "union",
      options,
      discriminator,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _intersection(Class2, left, right) {
    return new Class2({
      type: "intersection",
      left,
      right
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _tuple(Class2, items, _paramsOrRest, _params) {
    const hasRest = _paramsOrRest instanceof $ZodType;
    const params = hasRest ? _params : _paramsOrRest;
    const rest = hasRest ? _paramsOrRest : null;
    return new Class2({
      type: "tuple",
      items,
      rest,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _record(Class2, keyType, valueType, params) {
    return new Class2({
      type: "record",
      keyType,
      valueType,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _map(Class2, keyType, valueType, params) {
    return new Class2({
      type: "map",
      keyType,
      valueType,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _set(Class2, valueType, params) {
    return new Class2({
      type: "set",
      valueType,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _enum(Class2, values, params) {
    const entries = Array.isArray(values) ? Object.fromEntries(values.map((v13) => [v13, v13])) : values;
    return new Class2({
      type: "enum",
      entries,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _nativeEnum(Class2, entries, params) {
    return new Class2({
      type: "enum",
      entries,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _literal(Class2, value, params) {
    return new Class2({
      type: "literal",
      values: Array.isArray(value) ? value : [value],
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _file(Class2, params) {
    return new Class2({
      type: "file",
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _transform(Class2, fn) {
    return new Class2({
      type: "transform",
      transform: fn
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _optional(Class2, innerType) {
    return new Class2({
      type: "optional",
      innerType
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _nullable(Class2, innerType) {
    return new Class2({
      type: "nullable",
      innerType
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _default(Class2, innerType, defaultValue) {
    return new Class2({
      type: "default",
      innerType,
      get defaultValue() {
        return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
      }
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _nonoptional(Class2, innerType, params) {
    return new Class2({
      type: "nonoptional",
      innerType,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _success(Class2, innerType) {
    return new Class2({
      type: "success",
      innerType
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _catch(Class2, innerType, catchValue) {
    return new Class2({
      type: "catch",
      innerType,
      catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _pipe(Class2, in_, out) {
    return new Class2({
      type: "pipe",
      in: in_,
      out
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _readonly(Class2, innerType) {
    return new Class2({
      type: "readonly",
      innerType
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _templateLiteral(Class2, parts, params) {
    return new Class2({
      type: "template_literal",
      parts,
      ...normalizeParams(params)
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _lazy(Class2, getter) {
    return new Class2({
      type: "lazy",
      getter
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _promise(Class2, innerType) {
    return new Class2({
      type: "promise",
      innerType
    });
  }
  // @__NO_SIDE_EFFECTS__
  function _custom(Class2, fn, _params) {
    const norm = normalizeParams(_params);
    norm.abort ?? (norm.abort = true);
    const schema = new Class2({
      type: "custom",
      check: "custom",
      fn,
      ...norm
    });
    return schema;
  }
  // @__NO_SIDE_EFFECTS__
  function _refine(Class2, fn, _params) {
    const schema = new Class2({
      type: "custom",
      check: "custom",
      fn,
      ...normalizeParams(_params)
    });
    return schema;
  }
  // @__NO_SIDE_EFFECTS__
  function _superRefine(fn, params) {
    const ch = /* @__PURE__ */ _check((payload) => {
      payload.addIssue = (issue2) => {
        if (typeof issue2 === "string") {
          payload.issues.push(issue(issue2, payload.value, ch._zod.def));
        } else {
          const _issue = issue2;
          if (_issue.fatal)
            _issue.continue = false;
          _issue.code ?? (_issue.code = "custom");
          _issue.input ?? (_issue.input = payload.value);
          _issue.inst ?? (_issue.inst = ch);
          _issue.continue ?? (_issue.continue = !ch._zod.def.abort);
          payload.issues.push(issue(_issue));
        }
      };
      return fn(payload.value, payload);
    }, params);
    return ch;
  }
  // @__NO_SIDE_EFFECTS__
  function _check(fn, params) {
    const ch = new $ZodCheck({
      check: "custom",
      ...normalizeParams(params)
    });
    ch._zod.check = fn;
    return ch;
  }
  // @__NO_SIDE_EFFECTS__
  function describe(description) {
    const ch = new $ZodCheck({ check: "describe" });
    ch._zod.onattach = [
      (inst) => {
        const existing = globalRegistry.get(inst) ?? {};
        globalRegistry.add(inst, { ...existing, description });
      }
    ];
    ch._zod.check = () => {
    };
    return ch;
  }
  // @__NO_SIDE_EFFECTS__
  function meta(metadata) {
    const ch = new $ZodCheck({ check: "meta" });
    ch._zod.onattach = [
      (inst) => {
        const existing = globalRegistry.get(inst) ?? {};
        globalRegistry.add(inst, { ...existing, ...metadata });
      }
    ];
    ch._zod.check = () => {
    };
    return ch;
  }
  // @__NO_SIDE_EFFECTS__
  function _stringbool(Classes, _params) {
    const params = normalizeParams(_params);
    let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
    let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
    if (params.case !== "sensitive") {
      truthyArray = truthyArray.map((v13) => typeof v13 === "string" ? v13.toLowerCase() : v13);
      falsyArray = falsyArray.map((v13) => typeof v13 === "string" ? v13.toLowerCase() : v13);
    }
    const truthySet = new Set(truthyArray);
    const falsySet = new Set(falsyArray);
    const _Codec = Classes.Codec ?? $ZodCodec;
    const _Boolean = Classes.Boolean ?? $ZodBoolean;
    const _String = Classes.String ?? $ZodString;
    const stringSchema = new _String({ type: "string", error: params.error });
    const booleanSchema = new _Boolean({ type: "boolean", error: params.error });
    const codec2 = new _Codec({
      type: "pipe",
      in: stringSchema,
      out: booleanSchema,
      transform: ((input, payload) => {
        let data = input;
        if (params.case !== "sensitive")
          data = data.toLowerCase();
        if (truthySet.has(data)) {
          return true;
        } else if (falsySet.has(data)) {
          return false;
        } else {
          payload.issues.push({
            code: "invalid_value",
            expected: "stringbool",
            values: [...truthySet, ...falsySet],
            input: payload.value,
            inst: codec2,
            continue: false
          });
          return {};
        }
      }),
      reverseTransform: ((input, _payload) => {
        if (input === true) {
          return truthyArray[0] || "true";
        } else {
          return falsyArray[0] || "false";
        }
      }),
      error: params.error
    });
    return codec2;
  }
  // @__NO_SIDE_EFFECTS__
  function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
    const params = normalizeParams(_params);
    const def = {
      ...normalizeParams(_params),
      check: "string_format",
      type: "string",
      format,
      fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
      ...params
    };
    if (fnOrRegex instanceof RegExp) {
      def.pattern = fnOrRegex;
    }
    const inst = new Class2(def);
    return inst;
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
  init_node_compat_inject();
  function initializeContext(params) {
    let target = params?.target ?? "draft-2020-12";
    if (target === "draft-4")
      target = "draft-04";
    if (target === "draft-7")
      target = "draft-07";
    return {
      processors: params.processors ?? {},
      metadataRegistry: params?.metadata ?? globalRegistry,
      target,
      unrepresentable: params?.unrepresentable ?? "throw",
      override: params?.override ?? (() => {
      }),
      io: params?.io ?? "output",
      counter: 0,
      seen: /* @__PURE__ */ new Map(),
      cycles: params?.cycles ?? "ref",
      reused: params?.reused ?? "inline",
      external: params?.external ?? void 0
    };
  }
  function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
    var _a4;
    const def = schema._zod.def;
    const seen = ctx.seen.get(schema);
    if (seen) {
      seen.count++;
      const isCycle = _params.schemaPath.includes(schema);
      if (isCycle) {
        seen.cycle = _params.path;
      }
      return seen.schema;
    }
    const result = { schema: {}, count: 1, cycle: void 0, path: _params.path };
    ctx.seen.set(schema, result);
    const overrideSchema = schema._zod.toJSONSchema?.();
    if (overrideSchema) {
      result.schema = overrideSchema;
    } else {
      const params = {
        ..._params,
        schemaPath: [..._params.schemaPath, schema],
        path: _params.path
      };
      if (schema._zod.processJSONSchema) {
        schema._zod.processJSONSchema(ctx, result.schema, params);
      } else {
        const _json = result.schema;
        const processor = ctx.processors[def.type];
        if (!processor) {
          throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);
        }
        processor(schema, ctx, _json, params);
      }
      const parent = schema._zod.parent;
      if (parent) {
        if (!result.ref)
          result.ref = parent;
        process2(parent, ctx, params);
        ctx.seen.get(parent).isParent = true;
      }
    }
    const meta3 = ctx.metadataRegistry.get(schema);
    if (meta3)
      Object.assign(result.schema, meta3);
    if (ctx.io === "input" && isTransforming(schema)) {
      delete result.schema.examples;
      delete result.schema.default;
    }
    if (ctx.io === "input" && "_prefault" in result.schema)
      (_a4 = result.schema).default ?? (_a4.default = result.schema._prefault);
    delete result.schema._prefault;
    const _result = ctx.seen.get(schema);
    return _result.schema;
  }
  function extractDefs(ctx, schema) {
    const root = ctx.seen.get(schema);
    if (!root)
      throw new Error("Unprocessed schema. This is a bug in Zod.");
    const idToSchema = /* @__PURE__ */ new Map();
    for (const entry of ctx.seen.entries()) {
      const id = ctx.metadataRegistry.get(entry[0])?.id;
      if (id) {
        const existing = idToSchema.get(id);
        if (existing && existing !== entry[0]) {
          throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
        }
        idToSchema.set(id, entry[0]);
      }
    }
    const makeURI = (entry) => {
      const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
      if (ctx.external) {
        const externalId = ctx.external.registry.get(entry[0])?.id;
        const uriGenerator = ctx.external.uri ?? ((id2) => id2);
        if (externalId) {
          return { ref: uriGenerator(externalId) };
        }
        const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
        entry[1].defId = id;
        return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` };
      }
      if (entry[1] === root) {
        return { ref: "#" };
      }
      const uriPrefix = `#`;
      const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
      const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;
      return { defId, ref: defUriPrefix + defId };
    };
    const extractToDef = (entry) => {
      if (entry[1].schema.$ref) {
        return;
      }
      const seen = entry[1];
      const { ref, defId } = makeURI(entry);
      seen.def = { ...seen.schema };
      if (defId)
        seen.defId = defId;
      const schema2 = seen.schema;
      for (const key2 in schema2) {
        delete schema2[key2];
      }
      schema2.$ref = ref;
    };
    if (ctx.cycles === "throw") {
      for (const entry of ctx.seen.entries()) {
        const seen = entry[1];
        if (seen.cycle) {
          throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/<root>

Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
        }
      }
    }
    for (const entry of ctx.seen.entries()) {
      const seen = entry[1];
      if (schema === entry[0]) {
        extractToDef(entry);
        continue;
      }
      if (ctx.external) {
        const ext = ctx.external.registry.get(entry[0])?.id;
        if (schema !== entry[0] && ext) {
          extractToDef(entry);
          continue;
        }
      }
      const id = ctx.metadataRegistry.get(entry[0])?.id;
      if (id) {
        extractToDef(entry);
        continue;
      }
      if (seen.cycle) {
        extractToDef(entry);
        continue;
      }
      if (seen.count > 1) {
        if (ctx.reused === "ref") {
          extractToDef(entry);
          continue;
        }
      }
    }
  }
  function finalize(ctx, schema) {
    const root = ctx.seen.get(schema);
    if (!root)
      throw new Error("Unprocessed schema. This is a bug in Zod.");
    const flattenRef = (zodSchema) => {
      const seen = ctx.seen.get(zodSchema);
      if (seen.ref === null)
        return;
      const schema2 = seen.def ?? seen.schema;
      const _cached = { ...schema2 };
      const ref = seen.ref;
      seen.ref = null;
      if (ref) {
        flattenRef(ref);
        const refSeen = ctx.seen.get(ref);
        const refSchema = refSeen.schema;
        if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) {
          schema2.allOf = schema2.allOf ?? [];
          schema2.allOf.push(refSchema);
        } else {
          Object.assign(schema2, refSchema);
        }
        Object.assign(schema2, _cached);
        const isParentRef = zodSchema._zod.parent === ref;
        if (isParentRef) {
          for (const key2 in schema2) {
            if (key2 === "$ref" || key2 === "allOf")
              continue;
            if (!(key2 in _cached)) {
              delete schema2[key2];
            }
          }
        }
        if (refSchema.$ref && refSeen.def) {
          for (const key2 in schema2) {
            if (key2 === "$ref" || key2 === "allOf")
              continue;
            if (key2 in refSeen.def && JSON.stringify(schema2[key2]) === JSON.stringify(refSeen.def[key2])) {
              delete schema2[key2];
            }
          }
        }
      }
      const parent = zodSchema._zod.parent;
      if (parent && parent !== ref) {
        flattenRef(parent);
        const parentSeen = ctx.seen.get(parent);
        if (parentSeen?.schema.$ref) {
          schema2.$ref = parentSeen.schema.$ref;
          if (parentSeen.def) {
            for (const key2 in schema2) {
              if (key2 === "$ref" || key2 === "allOf")
                continue;
              if (key2 in parentSeen.def && JSON.stringify(schema2[key2]) === JSON.stringify(parentSeen.def[key2])) {
                delete schema2[key2];
              }
            }
          }
        }
      }
      ctx.override({
        zodSchema,
        jsonSchema: schema2,
        path: seen.path ?? []
      });
    };
    for (const entry of [...ctx.seen.entries()].reverse()) {
      flattenRef(entry[0]);
    }
    const result = {};
    if (ctx.target === "draft-2020-12") {
      result.$schema = "https://json-schema.org/draft/2020-12/schema";
    } else if (ctx.target === "draft-07") {
      result.$schema = "http://json-schema.org/draft-07/schema#";
    } else if (ctx.target === "draft-04") {
      result.$schema = "http://json-schema.org/draft-04/schema#";
    } else if (ctx.target === "openapi-3.0") {
    } else {
    }
    if (ctx.external?.uri) {
      const id = ctx.external.registry.get(schema)?.id;
      if (!id)
        throw new Error("Schema is missing an `id` property");
      result.$id = ctx.external.uri(id);
    }
    Object.assign(result, root.def ?? root.schema);
    const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
    if (rootMetaId !== void 0 && result.id === rootMetaId)
      delete result.id;
    const defs = ctx.external?.defs ?? {};
    for (const entry of ctx.seen.entries()) {
      const seen = entry[1];
      if (seen.def && seen.defId) {
        if (seen.def.id === seen.defId)
          delete seen.def.id;
        defs[seen.defId] = seen.def;
      }
    }
    if (ctx.external) {
    } else {
      if (Object.keys(defs).length > 0) {
        if (ctx.target === "draft-2020-12") {
          result.$defs = defs;
        } else {
          result.definitions = defs;
        }
      }
    }
    try {
      const finalized = JSON.parse(JSON.stringify(result));
      Object.defineProperty(finalized, "~standard", {
        value: {
          ...schema["~standard"],
          jsonSchema: {
            input: createStandardJSONSchemaMethod(schema, "input", ctx.processors),
            output: createStandardJSONSchemaMethod(schema, "output", ctx.processors)
          }
        },
        enumerable: false,
        writable: false
      });
      return finalized;
    } catch (_err) {
      throw new Error("Error converting schema to JSON.");
    }
  }
  function isTransforming(_schema, _ctx) {
    const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() };
    if (ctx.seen.has(_schema))
      return false;
    ctx.seen.add(_schema);
    const def = _schema._zod.def;
    if (def.type === "transform")
      return true;
    if (def.type === "array")
      return isTransforming(def.element, ctx);
    if (def.type === "set")
      return isTransforming(def.valueType, ctx);
    if (def.type === "lazy")
      return isTransforming(def.getter(), ctx);
    if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") {
      return isTransforming(def.innerType, ctx);
    }
    if (def.type === "intersection") {
      return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
    }
    if (def.type === "record" || def.type === "map") {
      return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
    }
    if (def.type === "pipe") {
      if (_schema._zod.traits.has("$ZodCodec"))
        return true;
      return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
    }
    if (def.type === "object") {
      for (const key2 in def.shape) {
        if (isTransforming(def.shape[key2], ctx))
          return true;
      }
      return false;
    }
    if (def.type === "union") {
      for (const option of def.options) {
        if (isTransforming(option, ctx))
          return true;
      }
      return false;
    }
    if (def.type === "tuple") {
      for (const item of def.items) {
        if (isTransforming(item, ctx))
          return true;
      }
      if (def.rest && isTransforming(def.rest, ctx))
        return true;
      return false;
    }
    return false;
  }
  var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
    const ctx = initializeContext({ ...params, processors });
    process2(schema, ctx);
    extractDefs(ctx, schema);
    return finalize(ctx, schema);
  };
  var createStandardJSONSchemaMethod = (schema, io3, processors = {}) => (params) => {
    const { libraryOptions, target } = params ?? {};
    const ctx = initializeContext({ ...libraryOptions ?? {}, target, io: io3, processors });
    process2(schema, ctx);
    extractDefs(ctx, schema);
    return finalize(ctx, schema);
  };

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.js
  init_node_compat_inject();
  var formatMap = {
    guid: "uuid",
    url: "uri",
    datetime: "date-time",
    json_string: "json-string",
    regex: ""
    // do not set
  };
  var stringProcessor = (schema, ctx, _json, _params) => {
    const json2 = _json;
    json2.type = "string";
    const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
    if (typeof minimum === "number")
      json2.minLength = minimum;
    if (typeof maximum === "number")
      json2.maxLength = maximum;
    if (format) {
      json2.format = formatMap[format] ?? format;
      if (json2.format === "")
        delete json2.format;
      if (format === "time") {
        delete json2.format;
      }
    }
    if (contentEncoding)
      json2.contentEncoding = contentEncoding;
    if (patterns && patterns.size > 0) {
      const regexes = [...patterns];
      if (regexes.length === 1)
        json2.pattern = regexes[0].source;
      else if (regexes.length > 1) {
        json2.allOf = [
          ...regexes.map((regex) => ({
            ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
            pattern: regex.source
          }))
        ];
      }
    }
  };
  var numberProcessor = (schema, ctx, _json, _params) => {
    const json2 = _json;
    const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
    if (typeof format === "string" && format.includes("int"))
      json2.type = "integer";
    else
      json2.type = "number";
    const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
    const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
    const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
    if (exMin) {
      if (legacy) {
        json2.minimum = exclusiveMinimum;
        json2.exclusiveMinimum = true;
      } else {
        json2.exclusiveMinimum = exclusiveMinimum;
      }
    } else if (typeof minimum === "number") {
      json2.minimum = minimum;
    }
    if (exMax) {
      if (legacy) {
        json2.maximum = exclusiveMaximum;
        json2.exclusiveMaximum = true;
      } else {
        json2.exclusiveMaximum = exclusiveMaximum;
      }
    } else if (typeof maximum === "number") {
      json2.maximum = maximum;
    }
    if (typeof multipleOf === "number")
      json2.multipleOf = multipleOf;
  };
  var booleanProcessor = (_schema, _ctx, json2, _params) => {
    json2.type = "boolean";
  };
  var bigintProcessor = (_schema, ctx, _json, _params) => {
    if (ctx.unrepresentable === "throw") {
      throw new Error("BigInt cannot be represented in JSON Schema");
    }
  };
  var symbolProcessor = (_schema, ctx, _json, _params) => {
    if (ctx.unrepresentable === "throw") {
      throw new Error("Symbols cannot be represented in JSON Schema");
    }
  };
  var nullProcessor = (_schema, ctx, json2, _params) => {
    if (ctx.target === "openapi-3.0") {
      json2.type = "string";
      json2.nullable = true;
      json2.enum = [null];
    } else {
      json2.type = "null";
    }
  };
  var undefinedProcessor = (_schema, ctx, _json, _params) => {
    if (ctx.unrepresentable === "throw") {
      throw new Error("Undefined cannot be represented in JSON Schema");
    }
  };
  var voidProcessor = (_schema, ctx, _json, _params) => {
    if (ctx.unrepresentable === "throw") {
      throw new Error("Void cannot be represented in JSON Schema");
    }
  };
  var neverProcessor = (_schema, _ctx, json2, _params) => {
    json2.not = {};
  };
  var anyProcessor = (_schema, _ctx, _json, _params) => {
  };
  var unknownProcessor = (_schema, _ctx, _json, _params) => {
  };
  var dateProcessor = (_schema, ctx, _json, _params) => {
    if (ctx.unrepresentable === "throw") {
      throw new Error("Date cannot be represented in JSON Schema");
    }
  };
  var enumProcessor = (schema, _ctx, json2, _params) => {
    const def = schema._zod.def;
    const values = getEnumValues(def.entries);
    if (values.every((v13) => typeof v13 === "number"))
      json2.type = "number";
    if (values.every((v13) => typeof v13 === "string"))
      json2.type = "string";
    json2.enum = values;
  };
  var literalProcessor = (schema, ctx, json2, _params) => {
    const def = schema._zod.def;
    const vals = [];
    for (const val of def.values) {
      if (val === void 0) {
        if (ctx.unrepresentable === "throw") {
          throw new Error("Literal `undefined` cannot be represented in JSON Schema");
        } else {
        }
      } else if (typeof val === "bigint") {
        if (ctx.unrepresentable === "throw") {
          throw new Error("BigInt literals cannot be represented in JSON Schema");
        } else {
          vals.push(Number(val));
        }
      } else {
        vals.push(val);
      }
    }
    if (vals.length === 0) {
    } else if (vals.length === 1) {
      const val = vals[0];
      json2.type = val === null ? "null" : typeof val;
      if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
        json2.enum = [val];
      } else {
        json2.const = val;
      }
    } else {
      if (vals.every((v13) => typeof v13 === "number"))
        json2.type = "number";
      if (vals.every((v13) => typeof v13 === "string"))
        json2.type = "string";
      if (vals.every((v13) => typeof v13 === "boolean"))
        json2.type = "boolean";
      if (vals.every((v13) => v13 === null))
        json2.type = "null";
      json2.enum = vals;
    }
  };
  var nanProcessor = (_schema, ctx, _json, _params) => {
    if (ctx.unrepresentable === "throw") {
      throw new Error("NaN cannot be represented in JSON Schema");
    }
  };
  var templateLiteralProcessor = (schema, _ctx, json2, _params) => {
    const _json = json2;
    const pattern = schema._zod.pattern;
    if (!pattern)
      throw new Error("Pattern not found in template literal");
    _json.type = "string";
    _json.pattern = pattern.source;
  };
  var fileProcessor = (schema, _ctx, json2, _params) => {
    const _json = json2;
    const file2 = {
      type: "string",
      format: "binary",
      contentEncoding: "binary"
    };
    const { minimum, maximum, mime } = schema._zod.bag;
    if (minimum !== void 0)
      file2.minLength = minimum;
    if (maximum !== void 0)
      file2.maxLength = maximum;
    if (mime) {
      if (mime.length === 1) {
        file2.contentMediaType = mime[0];
        Object.assign(_json, file2);
      } else {
        Object.assign(_json, file2);
        _json.anyOf = mime.map((m3) => ({ contentMediaType: m3 }));
      }
    } else {
      Object.assign(_json, file2);
    }
  };
  var successProcessor = (_schema, _ctx, json2, _params) => {
    json2.type = "boolean";
  };
  var customProcessor = (_schema, ctx, _json, _params) => {
    if (ctx.unrepresentable === "throw") {
      throw new Error("Custom types cannot be represented in JSON Schema");
    }
  };
  var functionProcessor = (_schema, ctx, _json, _params) => {
    if (ctx.unrepresentable === "throw") {
      throw new Error("Function types cannot be represented in JSON Schema");
    }
  };
  var transformProcessor = (_schema, ctx, _json, _params) => {
    if (ctx.unrepresentable === "throw") {
      throw new Error("Transforms cannot be represented in JSON Schema");
    }
  };
  var mapProcessor = (_schema, ctx, _json, _params) => {
    if (ctx.unrepresentable === "throw") {
      throw new Error("Map cannot be represented in JSON Schema");
    }
  };
  var setProcessor = (_schema, ctx, _json, _params) => {
    if (ctx.unrepresentable === "throw") {
      throw new Error("Set cannot be represented in JSON Schema");
    }
  };
  var arrayProcessor = (schema, ctx, _json, params) => {
    const json2 = _json;
    const def = schema._zod.def;
    const { minimum, maximum } = schema._zod.bag;
    if (typeof minimum === "number")
      json2.minItems = minimum;
    if (typeof maximum === "number")
      json2.maxItems = maximum;
    json2.type = "array";
    json2.items = process2(def.element, ctx, {
      ...params,
      path: [...params.path, "items"]
    });
  };
  var objectProcessor = (schema, ctx, _json, params) => {
    const json2 = _json;
    const def = schema._zod.def;
    json2.type = "object";
    json2.properties = {};
    const shape = def.shape;
    for (const key2 in shape) {
      json2.properties[key2] = process2(shape[key2], ctx, {
        ...params,
        path: [...params.path, "properties", key2]
      });
    }
    const allKeys = new Set(Object.keys(shape));
    const requiredKeys = new Set([...allKeys].filter((key2) => {
      const v13 = def.shape[key2]._zod;
      if (ctx.io === "input") {
        return v13.optin === void 0;
      } else {
        return v13.optout === void 0;
      }
    }));
    if (requiredKeys.size > 0) {
      json2.required = Array.from(requiredKeys);
    }
    if (def.catchall?._zod.def.type === "never") {
      json2.additionalProperties = false;
    } else if (!def.catchall) {
      if (ctx.io === "output")
        json2.additionalProperties = false;
    } else if (def.catchall) {
      json2.additionalProperties = process2(def.catchall, ctx, {
        ...params,
        path: [...params.path, "additionalProperties"]
      });
    }
  };
  var unionProcessor = (schema, ctx, json2, params) => {
    const def = schema._zod.def;
    const isExclusive = def.inclusive === false;
    const options = def.options.map((x13, i5) => process2(x13, ctx, {
      ...params,
      path: [...params.path, isExclusive ? "oneOf" : "anyOf", i5]
    }));
    if (isExclusive) {
      json2.oneOf = options;
    } else {
      json2.anyOf = options;
    }
  };
  var intersectionProcessor = (schema, ctx, json2, params) => {
    const def = schema._zod.def;
    const a5 = process2(def.left, ctx, {
      ...params,
      path: [...params.path, "allOf", 0]
    });
    const b9 = process2(def.right, ctx, {
      ...params,
      path: [...params.path, "allOf", 1]
    });
    const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
    const allOf = [
      ...isSimpleIntersection(a5) ? a5.allOf : [a5],
      ...isSimpleIntersection(b9) ? b9.allOf : [b9]
    ];
    json2.allOf = allOf;
  };
  var tupleProcessor = (schema, ctx, _json, params) => {
    const json2 = _json;
    const def = schema._zod.def;
    json2.type = "array";
    const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
    const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
    const prefixItems = def.items.map((x13, i5) => process2(x13, ctx, {
      ...params,
      path: [...params.path, prefixPath, i5]
    }));
    const rest = def.rest ? process2(def.rest, ctx, {
      ...params,
      path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
    }) : null;
    if (ctx.target === "draft-2020-12") {
      json2.prefixItems = prefixItems;
      if (rest) {
        json2.items = rest;
      }
    } else if (ctx.target === "openapi-3.0") {
      json2.items = {
        anyOf: prefixItems
      };
      if (rest) {
        json2.items.anyOf.push(rest);
      }
      json2.minItems = prefixItems.length;
      if (!rest) {
        json2.maxItems = prefixItems.length;
      }
    } else {
      json2.items = prefixItems;
      if (rest) {
        json2.additionalItems = rest;
      }
    }
    const { minimum, maximum } = schema._zod.bag;
    if (typeof minimum === "number")
      json2.minItems = minimum;
    if (typeof maximum === "number")
      json2.maxItems = maximum;
  };
  var recordProcessor = (schema, ctx, _json, params) => {
    const json2 = _json;
    const def = schema._zod.def;
    json2.type = "object";
    const keyType = def.keyType;
    const keyBag = keyType._zod.bag;
    const patterns = keyBag?.patterns;
    if (def.mode === "loose" && patterns && patterns.size > 0) {
      const valueSchema = process2(def.valueType, ctx, {
        ...params,
        path: [...params.path, "patternProperties", "*"]
      });
      json2.patternProperties = {};
      for (const pattern of patterns) {
        json2.patternProperties[pattern.source] = valueSchema;
      }
    } else {
      if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
        json2.propertyNames = process2(def.keyType, ctx, {
          ...params,
          path: [...params.path, "propertyNames"]
        });
      }
      json2.additionalProperties = process2(def.valueType, ctx, {
        ...params,
        path: [...params.path, "additionalProperties"]
      });
    }
    const keyValues = keyType._zod.values;
    if (keyValues) {
      const validKeyValues = [...keyValues].filter((v13) => typeof v13 === "string" || typeof v13 === "number");
      if (validKeyValues.length > 0) {
        json2.required = validKeyValues;
      }
    }
  };
  var nullableProcessor = (schema, ctx, json2, params) => {
    const def = schema._zod.def;
    const inner = process2(def.innerType, ctx, params);
    const seen = ctx.seen.get(schema);
    if (ctx.target === "openapi-3.0") {
      seen.ref = def.innerType;
      json2.nullable = true;
    } else {
      json2.anyOf = [inner, { type: "null" }];
    }
  };
  var nonoptionalProcessor = (schema, ctx, _json, params) => {
    const def = schema._zod.def;
    process2(def.innerType, ctx, params);
    const seen = ctx.seen.get(schema);
    seen.ref = def.innerType;
  };
  var defaultProcessor = (schema, ctx, json2, params) => {
    const def = schema._zod.def;
    process2(def.innerType, ctx, params);
    const seen = ctx.seen.get(schema);
    seen.ref = def.innerType;
    json2.default = JSON.parse(JSON.stringify(def.defaultValue));
  };
  var prefaultProcessor = (schema, ctx, json2, params) => {
    const def = schema._zod.def;
    process2(def.innerType, ctx, params);
    const seen = ctx.seen.get(schema);
    seen.ref = def.innerType;
    if (ctx.io === "input")
      json2._prefault = JSON.parse(JSON.stringify(def.defaultValue));
  };
  var catchProcessor = (schema, ctx, json2, params) => {
    const def = schema._zod.def;
    process2(def.innerType, ctx, params);
    const seen = ctx.seen.get(schema);
    seen.ref = def.innerType;
    let catchValue;
    try {
      catchValue = def.catchValue(void 0);
    } catch {
      throw new Error("Dynamic catch values are not supported in JSON Schema");
    }
    json2.default = catchValue;
  };
  var pipeProcessor = (schema, ctx, _json, params) => {
    const def = schema._zod.def;
    const inIsTransform = def.in._zod.traits.has("$ZodTransform");
    const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
    process2(innerType, ctx, params);
    const seen = ctx.seen.get(schema);
    seen.ref = innerType;
  };
  var readonlyProcessor = (schema, ctx, json2, params) => {
    const def = schema._zod.def;
    process2(def.innerType, ctx, params);
    const seen = ctx.seen.get(schema);
    seen.ref = def.innerType;
    json2.readOnly = true;
  };
  var promiseProcessor = (schema, ctx, _json, params) => {
    const def = schema._zod.def;
    process2(def.innerType, ctx, params);
    const seen = ctx.seen.get(schema);
    seen.ref = def.innerType;
  };
  var optionalProcessor = (schema, ctx, _json, params) => {
    const def = schema._zod.def;
    process2(def.innerType, ctx, params);
    const seen = ctx.seen.get(schema);
    seen.ref = def.innerType;
  };
  var lazyProcessor = (schema, ctx, _json, params) => {
    const innerType = schema._zod.innerType;
    process2(innerType, ctx, params);
    const seen = ctx.seen.get(schema);
    seen.ref = innerType;
  };
  var allProcessors = {
    string: stringProcessor,
    number: numberProcessor,
    boolean: booleanProcessor,
    bigint: bigintProcessor,
    symbol: symbolProcessor,
    null: nullProcessor,
    undefined: undefinedProcessor,
    void: voidProcessor,
    never: neverProcessor,
    any: anyProcessor,
    unknown: unknownProcessor,
    date: dateProcessor,
    enum: enumProcessor,
    literal: literalProcessor,
    nan: nanProcessor,
    template_literal: templateLiteralProcessor,
    file: fileProcessor,
    success: successProcessor,
    custom: customProcessor,
    function: functionProcessor,
    transform: transformProcessor,
    map: mapProcessor,
    set: setProcessor,
    array: arrayProcessor,
    object: objectProcessor,
    union: unionProcessor,
    intersection: intersectionProcessor,
    tuple: tupleProcessor,
    record: recordProcessor,
    nullable: nullableProcessor,
    nonoptional: nonoptionalProcessor,
    default: defaultProcessor,
    prefault: prefaultProcessor,
    catch: catchProcessor,
    pipe: pipeProcessor,
    readonly: readonlyProcessor,
    promise: promiseProcessor,
    optional: optionalProcessor,
    lazy: lazyProcessor
  };
  function toJSONSchema(input, params) {
    if ("_idmap" in input) {
      const registry2 = input;
      const ctx2 = initializeContext({ ...params, processors: allProcessors });
      const defs = {};
      for (const entry of registry2._idmap.entries()) {
        const [_6, schema] = entry;
        process2(schema, ctx2);
      }
      const schemas = {};
      const external = {
        registry: registry2,
        uri: params?.uri,
        defs
      };
      ctx2.external = external;
      for (const entry of registry2._idmap.entries()) {
        const [key2, schema] = entry;
        extractDefs(ctx2, schema);
        schemas[key2] = finalize(ctx2, schema);
      }
      if (Object.keys(defs).length > 0) {
        const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions";
        schemas.__shared = {
          [defsSegment]: defs
        };
      }
      return { schemas };
    }
    const ctx = initializeContext({ ...params, processors: allProcessors });
    process2(input, ctx);
    extractDefs(ctx, input);
    return finalize(ctx, input);
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-generator.js
  init_node_compat_inject();
  var JSONSchemaGenerator = class {
    /** @deprecated Access via ctx instead */
    get metadataRegistry() {
      return this.ctx.metadataRegistry;
    }
    /** @deprecated Access via ctx instead */
    get target() {
      return this.ctx.target;
    }
    /** @deprecated Access via ctx instead */
    get unrepresentable() {
      return this.ctx.unrepresentable;
    }
    /** @deprecated Access via ctx instead */
    get override() {
      return this.ctx.override;
    }
    /** @deprecated Access via ctx instead */
    get io() {
      return this.ctx.io;
    }
    /** @deprecated Access via ctx instead */
    get counter() {
      return this.ctx.counter;
    }
    set counter(value) {
      this.ctx.counter = value;
    }
    /** @deprecated Access via ctx instead */
    get seen() {
      return this.ctx.seen;
    }
    constructor(params) {
      let normalizedTarget = params?.target ?? "draft-2020-12";
      if (normalizedTarget === "draft-4")
        normalizedTarget = "draft-04";
      if (normalizedTarget === "draft-7")
        normalizedTarget = "draft-07";
      this.ctx = initializeContext({
        processors: allProcessors,
        target: normalizedTarget,
        ...params?.metadata && { metadata: params.metadata },
        ...params?.unrepresentable && { unrepresentable: params.unrepresentable },
        ...params?.override && { override: params.override },
        ...params?.io && { io: params.io }
      });
    }
    /**
     * Process a schema to prepare it for JSON Schema generation.
     * This must be called before emit().
     */
    process(schema, _params = { path: [], schemaPath: [] }) {
      return process2(schema, this.ctx, _params);
    }
    /**
     * Emit the final JSON Schema after processing.
     * Must call process() first.
     */
    emit(schema, _params) {
      if (_params) {
        if (_params.cycles)
          this.ctx.cycles = _params.cycles;
        if (_params.reused)
          this.ctx.reused = _params.reused;
        if (_params.external)
          this.ctx.external = _params.external;
      }
      extractDefs(this.ctx, schema);
      const result = finalize(this.ctx, schema);
      const { "~standard": _6, ...plainResult } = result;
      return plainResult;
    }
  };

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
  var json_schema_exports = {};
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
  var schemas_exports2 = {};
  __export(schemas_exports2, {
    ZodAny: () => ZodAny,
    ZodArray: () => ZodArray,
    ZodBase64: () => ZodBase64,
    ZodBase64URL: () => ZodBase64URL,
    ZodBigInt: () => ZodBigInt,
    ZodBigIntFormat: () => ZodBigIntFormat,
    ZodBoolean: () => ZodBoolean,
    ZodCIDRv4: () => ZodCIDRv4,
    ZodCIDRv6: () => ZodCIDRv6,
    ZodCUID: () => ZodCUID,
    ZodCUID2: () => ZodCUID2,
    ZodCatch: () => ZodCatch,
    ZodCodec: () => ZodCodec,
    ZodCustom: () => ZodCustom,
    ZodCustomStringFormat: () => ZodCustomStringFormat,
    ZodDate: () => ZodDate,
    ZodDefault: () => ZodDefault,
    ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
    ZodE164: () => ZodE164,
    ZodEmail: () => ZodEmail,
    ZodEmoji: () => ZodEmoji,
    ZodEnum: () => ZodEnum,
    ZodExactOptional: () => ZodExactOptional,
    ZodFile: () => ZodFile,
    ZodFunction: () => ZodFunction,
    ZodGUID: () => ZodGUID,
    ZodIPv4: () => ZodIPv4,
    ZodIPv6: () => ZodIPv6,
    ZodIntersection: () => ZodIntersection,
    ZodJWT: () => ZodJWT,
    ZodKSUID: () => ZodKSUID,
    ZodLazy: () => ZodLazy,
    ZodLiteral: () => ZodLiteral,
    ZodMAC: () => ZodMAC,
    ZodMap: () => ZodMap,
    ZodNaN: () => ZodNaN,
    ZodNanoID: () => ZodNanoID,
    ZodNever: () => ZodNever,
    ZodNonOptional: () => ZodNonOptional,
    ZodNull: () => ZodNull,
    ZodNullable: () => ZodNullable,
    ZodNumber: () => ZodNumber,
    ZodNumberFormat: () => ZodNumberFormat,
    ZodObject: () => ZodObject,
    ZodOptional: () => ZodOptional,
    ZodPipe: () => ZodPipe,
    ZodPrefault: () => ZodPrefault,
    ZodPreprocess: () => ZodPreprocess,
    ZodPromise: () => ZodPromise,
    ZodReadonly: () => ZodReadonly,
    ZodRecord: () => ZodRecord,
    ZodSet: () => ZodSet,
    ZodString: () => ZodString,
    ZodStringFormat: () => ZodStringFormat,
    ZodSuccess: () => ZodSuccess,
    ZodSymbol: () => ZodSymbol,
    ZodTemplateLiteral: () => ZodTemplateLiteral,
    ZodTransform: () => ZodTransform,
    ZodTuple: () => ZodTuple,
    ZodType: () => ZodType,
    ZodULID: () => ZodULID,
    ZodURL: () => ZodURL,
    ZodUUID: () => ZodUUID,
    ZodUndefined: () => ZodUndefined,
    ZodUnion: () => ZodUnion,
    ZodUnknown: () => ZodUnknown,
    ZodVoid: () => ZodVoid,
    ZodXID: () => ZodXID,
    ZodXor: () => ZodXor,
    _ZodString: () => _ZodString,
    _default: () => _default2,
    _function: () => _function,
    any: () => any2,
    array: () => array2,
    base64: () => base642,
    base64url: () => base64url2,
    bigint: () => bigint2,
    boolean: () => boolean3,
    catch: () => _catch2,
    check: () => check,
    cidrv4: () => cidrv42,
    cidrv6: () => cidrv62,
    codec: () => codec,
    cuid: () => cuid3,
    cuid2: () => cuid22,
    custom: () => custom,
    date: () => date3,
    describe: () => describe2,
    discriminatedUnion: () => discriminatedUnion,
    e164: () => e1642,
    email: () => email2,
    emoji: () => emoji2,
    enum: () => _enum2,
    exactOptional: () => exactOptional,
    file: () => file,
    float32: () => float32,
    float64: () => float64,
    function: () => _function,
    guid: () => guid2,
    hash: () => hash3,
    hex: () => hex2,
    hostname: () => hostname2,
    httpUrl: () => httpUrl,
    instanceof: () => _instanceof,
    int: () => int,
    int32: () => int32,
    int64: () => int64,
    intersection: () => intersection,
    invertCodec: () => invertCodec,
    ipv4: () => ipv42,
    ipv6: () => ipv62,
    json: () => json,
    jwt: () => jwt,
    keyof: () => keyof,
    ksuid: () => ksuid2,
    lazy: () => lazy,
    literal: () => literal2,
    looseObject: () => looseObject,
    looseRecord: () => looseRecord,
    mac: () => mac2,
    map: () => map,
    meta: () => meta2,
    nan: () => nan,
    nanoid: () => nanoid2,
    nativeEnum: () => nativeEnum,
    never: () => never2,
    nonoptional: () => nonoptional,
    null: () => _null3,
    nullable: () => nullable2,
    nullish: () => nullish2,
    number: () => number3,
    object: () => object,
    optional: () => optional2,
    partialRecord: () => partialRecord,
    pipe: () => pipe,
    prefault: () => prefault,
    preprocess: () => preprocess,
    promise: () => promise,
    readonly: () => readonly,
    record: () => record2,
    refine: () => refine,
    set: () => set,
    strictObject: () => strictObject,
    string: () => string3,
    stringFormat: () => stringFormat,
    stringbool: () => stringbool,
    success: () => success,
    superRefine: () => superRefine,
    symbol: () => symbol,
    templateLiteral: () => templateLiteral,
    transform: () => transform,
    tuple: () => tuple2,
    uint32: () => uint32,
    uint64: () => uint64,
    ulid: () => ulid2,
    undefined: () => _undefined3,
    union: () => union2,
    unknown: () => unknown2,
    url: () => url,
    uuid: () => uuid2,
    uuidv4: () => uuidv4,
    uuidv6: () => uuidv6,
    uuidv7: () => uuidv7,
    void: () => _void2,
    xid: () => xid2,
    xor: () => xor
  });
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/checks.js
  var checks_exports2 = {};
  __export(checks_exports2, {
    endsWith: () => _endsWith,
    gt: () => _gt,
    gte: () => _gte,
    includes: () => _includes,
    length: () => _length,
    lowercase: () => _lowercase,
    lt: () => _lt,
    lte: () => _lte,
    maxLength: () => _maxLength,
    maxSize: () => _maxSize,
    mime: () => _mime,
    minLength: () => _minLength,
    minSize: () => _minSize,
    multipleOf: () => _multipleOf,
    negative: () => _negative,
    nonnegative: () => _nonnegative,
    nonpositive: () => _nonpositive,
    normalize: () => _normalize,
    overwrite: () => _overwrite,
    positive: () => _positive,
    property: () => _property,
    regex: () => _regex,
    size: () => _size,
    slugify: () => _slugify,
    startsWith: () => _startsWith,
    toLowerCase: () => _toLowerCase,
    toUpperCase: () => _toUpperCase,
    trim: () => _trim,
    uppercase: () => _uppercase
  });
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.js
  var iso_exports = {};
  __export(iso_exports, {
    ZodISODate: () => ZodISODate,
    ZodISODateTime: () => ZodISODateTime,
    ZodISODuration: () => ZodISODuration,
    ZodISOTime: () => ZodISOTime,
    date: () => date2,
    datetime: () => datetime2,
    duration: () => duration2,
    time: () => time2
  });
  init_node_compat_inject();
  var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
    $ZodISODateTime.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function datetime2(params) {
    return _isoDateTime(ZodISODateTime, params);
  }
  var ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => {
    $ZodISODate.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function date2(params) {
    return _isoDate(ZodISODate, params);
  }
  var ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => {
    $ZodISOTime.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function time2(params) {
    return _isoTime(ZodISOTime, params);
  }
  var ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => {
    $ZodISODuration.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function duration2(params) {
    return _isoDuration(ZodISODuration, params);
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.js
  init_node_compat_inject();
  var initializer2 = (inst, issues) => {
    $ZodError.init(inst, issues);
    inst.name = "ZodError";
    Object.defineProperties(inst, {
      format: {
        value: (mapper) => formatError(inst, mapper)
        // enumerable: false,
      },
      flatten: {
        value: (mapper) => flattenError(inst, mapper)
        // enumerable: false,
      },
      addIssue: {
        value: (issue2) => {
          inst.issues.push(issue2);
          inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
        }
        // enumerable: false,
      },
      addIssues: {
        value: (issues2) => {
          inst.issues.push(...issues2);
          inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
        }
        // enumerable: false,
      },
      isEmpty: {
        get() {
          return inst.issues.length === 0;
        }
        // enumerable: false,
      }
    });
  };
  var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
  var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
    Parent: Error
  });

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
  var parse3 = /* @__PURE__ */ _parse(ZodRealError);
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
  var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
  var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError);
  var encode5 = /* @__PURE__ */ _encode(ZodRealError);
  var decode3 = /* @__PURE__ */ _decode(ZodRealError);
  var encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError);
  var decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError);
  var safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError);
  var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
  var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
  var _installedGroups = /* @__PURE__ */ new WeakMap();
  function _installLazyMethods(inst, group, methods) {
    const proto = Object.getPrototypeOf(inst);
    let installed = _installedGroups.get(proto);
    if (!installed) {
      installed = /* @__PURE__ */ new Set();
      _installedGroups.set(proto, installed);
    }
    if (installed.has(group))
      return;
    installed.add(group);
    for (const key2 in methods) {
      const fn = methods[key2];
      Object.defineProperty(proto, key2, {
        configurable: true,
        enumerable: false,
        get() {
          const bound = fn.bind(this);
          Object.defineProperty(this, key2, {
            configurable: true,
            writable: true,
            enumerable: true,
            value: bound
          });
          return bound;
        },
        set(v13) {
          Object.defineProperty(this, key2, {
            configurable: true,
            writable: true,
            enumerable: true,
            value: v13
          });
        }
      });
    }
  }
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
    $ZodType.init(inst, def);
    Object.assign(inst["~standard"], {
      jsonSchema: {
        input: createStandardJSONSchemaMethod(inst, "input"),
        output: createStandardJSONSchemaMethod(inst, "output")
      }
    });
    inst.toJSONSchema = createToJSONSchemaMethod(inst, {});
    inst.def = def;
    inst.type = def.type;
    Object.defineProperty(inst, "_def", { value: def });
    inst.parse = (data, params) => parse3(inst, data, params, { callee: inst.parse });
    inst.safeParse = (data, params) => safeParse2(inst, data, params);
    inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
    inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params);
    inst.spa = inst.safeParseAsync;
    inst.encode = (data, params) => encode5(inst, data, params);
    inst.decode = (data, params) => decode3(inst, data, params);
    inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params);
    inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params);
    inst.safeEncode = (data, params) => safeEncode2(inst, data, params);
    inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
    inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
    inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
    _installLazyMethods(inst, "ZodType", {
      check(...chks) {
        const def2 = this.def;
        return this.clone(util_exports.mergeDefs(def2, {
          checks: [
            ...def2.checks ?? [],
            ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
          ]
        }), { parent: true });
      },
      with(...chks) {
        return this.check(...chks);
      },
      clone(def2, params) {
        return clone2(this, def2, params);
      },
      brand() {
        return this;
      },
      register(reg, meta3) {
        reg.add(this, meta3);
        return this;
      },
      refine(check2, params) {
        return this.check(refine(check2, params));
      },
      superRefine(refinement, params) {
        return this.check(superRefine(refinement, params));
      },
      overwrite(fn) {
        return this.check(_overwrite(fn));
      },
      optional() {
        return optional2(this);
      },
      exactOptional() {
        return exactOptional(this);
      },
      nullable() {
        return nullable2(this);
      },
      nullish() {
        return optional2(nullable2(this));
      },
      nonoptional(params) {
        return nonoptional(this, params);
      },
      array() {
        return array2(this);
      },
      or(arg) {
        return union2([this, arg]);
      },
      and(arg) {
        return intersection(this, arg);
      },
      transform(tx) {
        return pipe(this, transform(tx));
      },
      default(d6) {
        return _default2(this, d6);
      },
      prefault(d6) {
        return prefault(this, d6);
      },
      catch(params) {
        return _catch2(this, params);
      },
      pipe(target) {
        return pipe(this, target);
      },
      readonly() {
        return readonly(this);
      },
      describe(description) {
        const cl = this.clone();
        globalRegistry.add(cl, { description });
        return cl;
      },
      meta(...args) {
        if (args.length === 0)
          return globalRegistry.get(this);
        const cl = this.clone();
        globalRegistry.add(cl, args[0]);
        return cl;
      },
      isOptional() {
        return this.safeParse(void 0).success;
      },
      isNullable() {
        return this.safeParse(null).success;
      },
      apply(fn) {
        return fn(this);
      }
    });
    Object.defineProperty(inst, "description", {
      get() {
        return globalRegistry.get(inst)?.description;
      },
      configurable: true
    });
    return inst;
  });
  var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
    $ZodString.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params);
    const bag = inst._zod.bag;
    inst.format = bag.format ?? null;
    inst.minLength = bag.minimum ?? null;
    inst.maxLength = bag.maximum ?? null;
    _installLazyMethods(inst, "_ZodString", {
      regex(...args) {
        return this.check(_regex(...args));
      },
      includes(...args) {
        return this.check(_includes(...args));
      },
      startsWith(...args) {
        return this.check(_startsWith(...args));
      },
      endsWith(...args) {
        return this.check(_endsWith(...args));
      },
      min(...args) {
        return this.check(_minLength(...args));
      },
      max(...args) {
        return this.check(_maxLength(...args));
      },
      length(...args) {
        return this.check(_length(...args));
      },
      nonempty(...args) {
        return this.check(_minLength(1, ...args));
      },
      lowercase(params) {
        return this.check(_lowercase(params));
      },
      uppercase(params) {
        return this.check(_uppercase(params));
      },
      trim() {
        return this.check(_trim());
      },
      normalize(...args) {
        return this.check(_normalize(...args));
      },
      toLowerCase() {
        return this.check(_toLowerCase());
      },
      toUpperCase() {
        return this.check(_toUpperCase());
      },
      slugify() {
        return this.check(_slugify());
      }
    });
  });
  var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
    $ZodString.init(inst, def);
    _ZodString.init(inst, def);
    inst.email = (params) => inst.check(_email(ZodEmail, params));
    inst.url = (params) => inst.check(_url(ZodURL, params));
    inst.jwt = (params) => inst.check(_jwt(ZodJWT, params));
    inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params));
    inst.guid = (params) => inst.check(_guid(ZodGUID, params));
    inst.uuid = (params) => inst.check(_uuid(ZodUUID, params));
    inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params));
    inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params));
    inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params));
    inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params));
    inst.guid = (params) => inst.check(_guid(ZodGUID, params));
    inst.cuid = (params) => inst.check(_cuid(ZodCUID, params));
    inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params));
    inst.ulid = (params) => inst.check(_ulid(ZodULID, params));
    inst.base64 = (params) => inst.check(_base64(ZodBase64, params));
    inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params));
    inst.xid = (params) => inst.check(_xid(ZodXID, params));
    inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params));
    inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params));
    inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params));
    inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params));
    inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params));
    inst.e164 = (params) => inst.check(_e164(ZodE164, params));
    inst.datetime = (params) => inst.check(datetime2(params));
    inst.date = (params) => inst.check(date2(params));
    inst.time = (params) => inst.check(time2(params));
    inst.duration = (params) => inst.check(duration2(params));
  });
  function string3(params) {
    return _string(ZodString, params);
  }
  var ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
    $ZodStringFormat.init(inst, def);
    _ZodString.init(inst, def);
  });
  var ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
    $ZodEmail.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function email2(params) {
    return _email(ZodEmail, params);
  }
  var ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
    $ZodGUID.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function guid2(params) {
    return _guid(ZodGUID, params);
  }
  var ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => {
    $ZodUUID.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function uuid2(params) {
    return _uuid(ZodUUID, params);
  }
  function uuidv4(params) {
    return _uuidv4(ZodUUID, params);
  }
  function uuidv6(params) {
    return _uuidv6(ZodUUID, params);
  }
  function uuidv7(params) {
    return _uuidv7(ZodUUID, params);
  }
  var ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
    $ZodURL.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function url(params) {
    return _url(ZodURL, params);
  }
  function httpUrl(params) {
    return _url(ZodURL, {
      protocol: regexes_exports.httpProtocol,
      hostname: regexes_exports.domain,
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
    $ZodEmoji.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function emoji2(params) {
    return _emoji2(ZodEmoji, params);
  }
  var ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
    $ZodNanoID.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function nanoid2(params) {
    return _nanoid(ZodNanoID, params);
  }
  var ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
    $ZodCUID.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function cuid3(params) {
    return _cuid(ZodCUID, params);
  }
  var ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => {
    $ZodCUID2.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function cuid22(params) {
    return _cuid2(ZodCUID2, params);
  }
  var ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
    $ZodULID.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function ulid2(params) {
    return _ulid(ZodULID, params);
  }
  var ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
    $ZodXID.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function xid2(params) {
    return _xid(ZodXID, params);
  }
  var ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => {
    $ZodKSUID.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function ksuid2(params) {
    return _ksuid(ZodKSUID, params);
  }
  var ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
    $ZodIPv4.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function ipv42(params) {
    return _ipv4(ZodIPv4, params);
  }
  var ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => {
    $ZodMAC.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function mac2(params) {
    return _mac(ZodMAC, params);
  }
  var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
    $ZodIPv6.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function ipv62(params) {
    return _ipv6(ZodIPv6, params);
  }
  var ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
    $ZodCIDRv4.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function cidrv42(params) {
    return _cidrv4(ZodCIDRv4, params);
  }
  var ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => {
    $ZodCIDRv6.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function cidrv62(params) {
    return _cidrv6(ZodCIDRv6, params);
  }
  var ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
    $ZodBase64.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function base642(params) {
    return _base64(ZodBase64, params);
  }
  var ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
    $ZodBase64URL.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function base64url2(params) {
    return _base64url(ZodBase64URL, params);
  }
  var ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
    $ZodE164.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function e1642(params) {
    return _e164(ZodE164, params);
  }
  var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
    $ZodJWT.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function jwt(params) {
    return _jwt(ZodJWT, params);
  }
  var ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
    $ZodCustomStringFormat.init(inst, def);
    ZodStringFormat.init(inst, def);
  });
  function stringFormat(format, fnOrRegex, _params = {}) {
    return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
  }
  function hostname2(_params) {
    return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params);
  }
  function hex2(_params) {
    return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params);
  }
  function hash3(alg, params) {
    const enc = params?.enc ?? "hex";
    const format = `${alg}_${enc}`;
    const regex = regexes_exports[format];
    if (!regex)
      throw new Error(`Unrecognized hash format: ${format}`);
    return _stringFormat(ZodCustomStringFormat, format, regex, params);
  }
  var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
    $ZodNumber.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
    _installLazyMethods(inst, "ZodNumber", {
      gt(value, params) {
        return this.check(_gt(value, params));
      },
      gte(value, params) {
        return this.check(_gte(value, params));
      },
      min(value, params) {
        return this.check(_gte(value, params));
      },
      lt(value, params) {
        return this.check(_lt(value, params));
      },
      lte(value, params) {
        return this.check(_lte(value, params));
      },
      max(value, params) {
        return this.check(_lte(value, params));
      },
      int(params) {
        return this.check(int(params));
      },
      safe(params) {
        return this.check(int(params));
      },
      positive(params) {
        return this.check(_gt(0, params));
      },
      nonnegative(params) {
        return this.check(_gte(0, params));
      },
      negative(params) {
        return this.check(_lt(0, params));
      },
      nonpositive(params) {
        return this.check(_lte(0, params));
      },
      multipleOf(value, params) {
        return this.check(_multipleOf(value, params));
      },
      step(value, params) {
        return this.check(_multipleOf(value, params));
      },
      finite() {
        return this;
      }
    });
    const bag = inst._zod.bag;
    inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
    inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
    inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
    inst.isFinite = true;
    inst.format = bag.format ?? null;
  });
  function number3(params) {
    return _number(ZodNumber, params);
  }
  var ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => {
    $ZodNumberFormat.init(inst, def);
    ZodNumber.init(inst, def);
  });
  function int(params) {
    return _int(ZodNumberFormat, params);
  }
  function float32(params) {
    return _float32(ZodNumberFormat, params);
  }
  function float64(params) {
    return _float64(ZodNumberFormat, params);
  }
  function int32(params) {
    return _int32(ZodNumberFormat, params);
  }
  function uint32(params) {
    return _uint32(ZodNumberFormat, params);
  }
  var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
    $ZodBoolean.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => booleanProcessor(inst, ctx, json2, params);
  });
  function boolean3(params) {
    return _boolean(ZodBoolean, params);
  }
  var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
    $ZodBigInt.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => bigintProcessor(inst, ctx, json2, params);
    inst.gte = (value, params) => inst.check(_gte(value, params));
    inst.min = (value, params) => inst.check(_gte(value, params));
    inst.gt = (value, params) => inst.check(_gt(value, params));
    inst.gte = (value, params) => inst.check(_gte(value, params));
    inst.min = (value, params) => inst.check(_gte(value, params));
    inst.lt = (value, params) => inst.check(_lt(value, params));
    inst.lte = (value, params) => inst.check(_lte(value, params));
    inst.max = (value, params) => inst.check(_lte(value, params));
    inst.positive = (params) => inst.check(_gt(BigInt(0), params));
    inst.negative = (params) => inst.check(_lt(BigInt(0), params));
    inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params));
    inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params));
    inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
    const bag = inst._zod.bag;
    inst.minValue = bag.minimum ?? null;
    inst.maxValue = bag.maximum ?? null;
    inst.format = bag.format ?? null;
  });
  function bigint2(params) {
    return _bigint(ZodBigInt, params);
  }
  var ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => {
    $ZodBigIntFormat.init(inst, def);
    ZodBigInt.init(inst, def);
  });
  function int64(params) {
    return _int64(ZodBigIntFormat, params);
  }
  function uint64(params) {
    return _uint64(ZodBigIntFormat, params);
  }
  var ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => {
    $ZodSymbol.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => symbolProcessor(inst, ctx, json2, params);
  });
  function symbol(params) {
    return _symbol(ZodSymbol, params);
  }
  var ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => {
    $ZodUndefined.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => undefinedProcessor(inst, ctx, json2, params);
  });
  function _undefined3(params) {
    return _undefined2(ZodUndefined, params);
  }
  var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
    $ZodNull.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => nullProcessor(inst, ctx, json2, params);
  });
  function _null3(params) {
    return _null2(ZodNull, params);
  }
  var ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
    $ZodAny.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => anyProcessor(inst, ctx, json2, params);
  });
  function any2() {
    return _any(ZodAny);
  }
  var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
    $ZodUnknown.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => unknownProcessor(inst, ctx, json2, params);
  });
  function unknown2() {
    return _unknown(ZodUnknown);
  }
  var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
    $ZodNever.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => neverProcessor(inst, ctx, json2, params);
  });
  function never2(params) {
    return _never(ZodNever, params);
  }
  var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
    $ZodVoid.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => voidProcessor(inst, ctx, json2, params);
  });
  function _void2(params) {
    return _void(ZodVoid, params);
  }
  var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
    $ZodDate.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params);
    inst.min = (value, params) => inst.check(_gte(value, params));
    inst.max = (value, params) => inst.check(_lte(value, params));
    const c7 = inst._zod.bag;
    inst.minDate = c7.minimum ? new Date(c7.minimum) : null;
    inst.maxDate = c7.maximum ? new Date(c7.maximum) : null;
  });
  function date3(params) {
    return _date(ZodDate, params);
  }
  var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
    $ZodArray.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
    inst.element = def.element;
    _installLazyMethods(inst, "ZodArray", {
      min(n6, params) {
        return this.check(_minLength(n6, params));
      },
      nonempty(params) {
        return this.check(_minLength(1, params));
      },
      max(n6, params) {
        return this.check(_maxLength(n6, params));
      },
      length(n6, params) {
        return this.check(_length(n6, params));
      },
      unwrap() {
        return this.element;
      }
    });
  });
  function array2(element, params) {
    return _array(ZodArray, element, params);
  }
  function keyof(schema) {
    const shape = schema._zod.def.shape;
    return _enum2(Object.keys(shape));
  }
  var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
    $ZodObjectJIT.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => objectProcessor(inst, ctx, json2, params);
    util_exports.defineLazy(inst, "shape", () => {
      return def.shape;
    });
    _installLazyMethods(inst, "ZodObject", {
      keyof() {
        return _enum2(Object.keys(this._zod.def.shape));
      },
      catchall(catchall) {
        return this.clone({ ...this._zod.def, catchall });
      },
      passthrough() {
        return this.clone({ ...this._zod.def, catchall: unknown2() });
      },
      loose() {
        return this.clone({ ...this._zod.def, catchall: unknown2() });
      },
      strict() {
        return this.clone({ ...this._zod.def, catchall: never2() });
      },
      strip() {
        return this.clone({ ...this._zod.def, catchall: void 0 });
      },
      extend(incoming) {
        return util_exports.extend(this, incoming);
      },
      safeExtend(incoming) {
        return util_exports.safeExtend(this, incoming);
      },
      merge(other) {
        return util_exports.merge(this, other);
      },
      pick(mask2) {
        return util_exports.pick(this, mask2);
      },
      omit(mask2) {
        return util_exports.omit(this, mask2);
      },
      partial(...args) {
        return util_exports.partial(ZodOptional, this, args[0]);
      },
      required(...args) {
        return util_exports.required(ZodNonOptional, this, args[0]);
      }
    });
  });
  function object(shape, params) {
    const def = {
      type: "object",
      shape: shape ?? {},
      ...util_exports.normalizeParams(params)
    };
    return new ZodObject(def);
  }
  function strictObject(shape, params) {
    return new ZodObject({
      type: "object",
      shape,
      catchall: never2(),
      ...util_exports.normalizeParams(params)
    });
  }
  function looseObject(shape, params) {
    return new ZodObject({
      type: "object",
      shape,
      catchall: unknown2(),
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
    $ZodUnion.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params);
    inst.options = def.options;
  });
  function union2(options, params) {
    return new ZodUnion({
      type: "union",
      options,
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => {
    ZodUnion.init(inst, def);
    $ZodXor.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params);
    inst.options = def.options;
  });
  function xor(options, params) {
    return new ZodXor({
      type: "union",
      options,
      inclusive: false,
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
    ZodUnion.init(inst, def);
    $ZodDiscriminatedUnion.init(inst, def);
  });
  function discriminatedUnion(discriminator, options, params) {
    return new ZodDiscriminatedUnion({
      type: "union",
      options,
      discriminator,
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
    $ZodIntersection.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => intersectionProcessor(inst, ctx, json2, params);
  });
  function intersection(left, right) {
    return new ZodIntersection({
      type: "intersection",
      left,
      right
    });
  }
  var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
    $ZodTuple.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => tupleProcessor(inst, ctx, json2, params);
    inst.rest = (rest) => inst.clone({
      ...inst._zod.def,
      rest
    });
  });
  function tuple2(items, _paramsOrRest, _params) {
    const hasRest = _paramsOrRest instanceof $ZodType;
    const params = hasRest ? _params : _paramsOrRest;
    const rest = hasRest ? _paramsOrRest : null;
    return new ZodTuple({
      type: "tuple",
      items,
      rest,
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
    $ZodRecord.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => recordProcessor(inst, ctx, json2, params);
    inst.keyType = def.keyType;
    inst.valueType = def.valueType;
  });
  function record2(keyType, valueType, params) {
    if (!valueType || !valueType._zod) {
      return new ZodRecord({
        type: "record",
        keyType: string3(),
        valueType: keyType,
        ...util_exports.normalizeParams(valueType)
      });
    }
    return new ZodRecord({
      type: "record",
      keyType,
      valueType,
      ...util_exports.normalizeParams(params)
    });
  }
  function partialRecord(keyType, valueType, params) {
    const k7 = clone2(keyType);
    k7._zod.values = void 0;
    return new ZodRecord({
      type: "record",
      keyType: k7,
      valueType,
      ...util_exports.normalizeParams(params)
    });
  }
  function looseRecord(keyType, valueType, params) {
    return new ZodRecord({
      type: "record",
      keyType,
      valueType,
      mode: "loose",
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => {
    $ZodMap.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => mapProcessor(inst, ctx, json2, params);
    inst.keyType = def.keyType;
    inst.valueType = def.valueType;
    inst.min = (...args) => inst.check(_minSize(...args));
    inst.nonempty = (params) => inst.check(_minSize(1, params));
    inst.max = (...args) => inst.check(_maxSize(...args));
    inst.size = (...args) => inst.check(_size(...args));
  });
  function map(keyType, valueType, params) {
    return new ZodMap({
      type: "map",
      keyType,
      valueType,
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => {
    $ZodSet.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => setProcessor(inst, ctx, json2, params);
    inst.min = (...args) => inst.check(_minSize(...args));
    inst.nonempty = (params) => inst.check(_minSize(1, params));
    inst.max = (...args) => inst.check(_maxSize(...args));
    inst.size = (...args) => inst.check(_size(...args));
  });
  function set(valueType, params) {
    return new ZodSet({
      type: "set",
      valueType,
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
    $ZodEnum.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => enumProcessor(inst, ctx, json2, params);
    inst.enum = def.entries;
    inst.options = Object.values(def.entries);
    const keys2 = new Set(Object.keys(def.entries));
    inst.extract = (values, params) => {
      const newEntries = {};
      for (const value of values) {
        if (keys2.has(value)) {
          newEntries[value] = def.entries[value];
        } else
          throw new Error(`Key ${value} not found in enum`);
      }
      return new ZodEnum({
        ...def,
        checks: [],
        ...util_exports.normalizeParams(params),
        entries: newEntries
      });
    };
    inst.exclude = (values, params) => {
      const newEntries = { ...def.entries };
      for (const value of values) {
        if (keys2.has(value)) {
          delete newEntries[value];
        } else
          throw new Error(`Key ${value} not found in enum`);
      }
      return new ZodEnum({
        ...def,
        checks: [],
        ...util_exports.normalizeParams(params),
        entries: newEntries
      });
    };
  });
  function _enum2(values, params) {
    const entries = Array.isArray(values) ? Object.fromEntries(values.map((v13) => [v13, v13])) : values;
    return new ZodEnum({
      type: "enum",
      entries,
      ...util_exports.normalizeParams(params)
    });
  }
  function nativeEnum(entries, params) {
    return new ZodEnum({
      type: "enum",
      entries,
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
    $ZodLiteral.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => literalProcessor(inst, ctx, json2, params);
    inst.values = new Set(def.values);
    Object.defineProperty(inst, "value", {
      get() {
        if (def.values.length > 1) {
          throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
        }
        return def.values[0];
      }
    });
  });
  function literal2(value, params) {
    return new ZodLiteral({
      type: "literal",
      values: Array.isArray(value) ? value : [value],
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
    $ZodFile.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => fileProcessor(inst, ctx, json2, params);
    inst.min = (size5, params) => inst.check(_minSize(size5, params));
    inst.max = (size5, params) => inst.check(_maxSize(size5, params));
    inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params));
  });
  function file(params) {
    return _file(ZodFile, params);
  }
  var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
    $ZodTransform.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => transformProcessor(inst, ctx, json2, params);
    inst._zod.parse = (payload, _ctx) => {
      if (_ctx.direction === "backward") {
        throw new $ZodEncodeError(inst.constructor.name);
      }
      payload.addIssue = (issue2) => {
        if (typeof issue2 === "string") {
          payload.issues.push(util_exports.issue(issue2, payload.value, def));
        } else {
          const _issue = issue2;
          if (_issue.fatal)
            _issue.continue = false;
          _issue.code ?? (_issue.code = "custom");
          _issue.input ?? (_issue.input = payload.value);
          _issue.inst ?? (_issue.inst = inst);
          payload.issues.push(util_exports.issue(_issue));
        }
      };
      const output = def.transform(payload.value, payload);
      if (output instanceof Promise) {
        return output.then((output2) => {
          payload.value = output2;
          payload.fallback = true;
          return payload;
        });
      }
      payload.value = output;
      payload.fallback = true;
      return payload;
    };
  });
  function transform(fn) {
    return new ZodTransform({
      type: "transform",
      transform: fn
    });
  }
  var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
    $ZodOptional.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params);
    inst.unwrap = () => inst._zod.def.innerType;
  });
  function optional2(innerType) {
    return new ZodOptional({
      type: "optional",
      innerType
    });
  }
  var ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => {
    $ZodExactOptional.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params);
    inst.unwrap = () => inst._zod.def.innerType;
  });
  function exactOptional(innerType) {
    return new ZodExactOptional({
      type: "optional",
      innerType
    });
  }
  var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
    $ZodNullable.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => nullableProcessor(inst, ctx, json2, params);
    inst.unwrap = () => inst._zod.def.innerType;
  });
  function nullable2(innerType) {
    return new ZodNullable({
      type: "nullable",
      innerType
    });
  }
  function nullish2(innerType) {
    return optional2(nullable2(innerType));
  }
  var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
    $ZodDefault.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => defaultProcessor(inst, ctx, json2, params);
    inst.unwrap = () => inst._zod.def.innerType;
    inst.removeDefault = inst.unwrap;
  });
  function _default2(innerType, defaultValue) {
    return new ZodDefault({
      type: "default",
      innerType,
      get defaultValue() {
        return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue);
      }
    });
  }
  var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
    $ZodPrefault.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => prefaultProcessor(inst, ctx, json2, params);
    inst.unwrap = () => inst._zod.def.innerType;
  });
  function prefault(innerType, defaultValue) {
    return new ZodPrefault({
      type: "prefault",
      innerType,
      get defaultValue() {
        return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue);
      }
    });
  }
  var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
    $ZodNonOptional.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => nonoptionalProcessor(inst, ctx, json2, params);
    inst.unwrap = () => inst._zod.def.innerType;
  });
  function nonoptional(innerType, params) {
    return new ZodNonOptional({
      type: "nonoptional",
      innerType,
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => {
    $ZodSuccess.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => successProcessor(inst, ctx, json2, params);
    inst.unwrap = () => inst._zod.def.innerType;
  });
  function success(innerType) {
    return new ZodSuccess({
      type: "success",
      innerType
    });
  }
  var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
    $ZodCatch.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => catchProcessor(inst, ctx, json2, params);
    inst.unwrap = () => inst._zod.def.innerType;
    inst.removeCatch = inst.unwrap;
  });
  function _catch2(innerType, catchValue) {
    return new ZodCatch({
      type: "catch",
      innerType,
      catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
    });
  }
  var ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => {
    $ZodNaN.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => nanProcessor(inst, ctx, json2, params);
  });
  function nan(params) {
    return _nan(ZodNaN, params);
  }
  var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
    $ZodPipe.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => pipeProcessor(inst, ctx, json2, params);
    inst.in = def.in;
    inst.out = def.out;
  });
  function pipe(in_, out) {
    return new ZodPipe({
      type: "pipe",
      in: in_,
      out
      // ...util.normalizeParams(params),
    });
  }
  var ZodCodec = /* @__PURE__ */ $constructor("ZodCodec", (inst, def) => {
    ZodPipe.init(inst, def);
    $ZodCodec.init(inst, def);
  });
  function codec(in_, out, params) {
    return new ZodCodec({
      type: "pipe",
      in: in_,
      out,
      transform: params.decode,
      reverseTransform: params.encode
    });
  }
  function invertCodec(codec2) {
    const def = codec2._zod.def;
    return new ZodCodec({
      type: "pipe",
      in: def.out,
      out: def.in,
      transform: def.reverseTransform,
      reverseTransform: def.transform
    });
  }
  var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
    ZodPipe.init(inst, def);
    $ZodPreprocess.init(inst, def);
  });
  var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
    $ZodReadonly.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => readonlyProcessor(inst, ctx, json2, params);
    inst.unwrap = () => inst._zod.def.innerType;
  });
  function readonly(innerType) {
    return new ZodReadonly({
      type: "readonly",
      innerType
    });
  }
  var ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => {
    $ZodTemplateLiteral.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => templateLiteralProcessor(inst, ctx, json2, params);
  });
  function templateLiteral(parts, params) {
    return new ZodTemplateLiteral({
      type: "template_literal",
      parts,
      ...util_exports.normalizeParams(params)
    });
  }
  var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
    $ZodLazy.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => lazyProcessor(inst, ctx, json2, params);
    inst.unwrap = () => inst._zod.def.getter();
  });
  function lazy(getter) {
    return new ZodLazy({
      type: "lazy",
      getter
    });
  }
  var ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => {
    $ZodPromise.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => promiseProcessor(inst, ctx, json2, params);
    inst.unwrap = () => inst._zod.def.innerType;
  });
  function promise(innerType) {
    return new ZodPromise({
      type: "promise",
      innerType
    });
  }
  var ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => {
    $ZodFunction.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => functionProcessor(inst, ctx, json2, params);
  });
  function _function(params) {
    return new ZodFunction({
      type: "function",
      input: Array.isArray(params?.input) ? tuple2(params?.input) : params?.input ?? array2(unknown2()),
      output: params?.output ?? unknown2()
    });
  }
  var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
    $ZodCustom.init(inst, def);
    ZodType.init(inst, def);
    inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params);
  });
  function check(fn) {
    const ch = new $ZodCheck({
      check: "custom"
      // ...util.normalizeParams(params),
    });
    ch._zod.check = fn;
    return ch;
  }
  function custom(fn, _params) {
    return _custom(ZodCustom, fn ?? (() => true), _params);
  }
  function refine(fn, _params = {}) {
    return _refine(ZodCustom, fn, _params);
  }
  function superRefine(fn, params) {
    return _superRefine(fn, params);
  }
  var describe2 = describe;
  var meta2 = meta;
  function _instanceof(cls, params = {}) {
    const inst = new ZodCustom({
      type: "custom",
      check: "custom",
      fn: (data) => data instanceof cls,
      abort: true,
      ...util_exports.normalizeParams(params)
    });
    inst._zod.bag.Class = cls;
    inst._zod.check = (payload) => {
      if (!(payload.value instanceof cls)) {
        payload.issues.push({
          code: "invalid_type",
          expected: cls.name,
          input: payload.value,
          inst,
          path: [...inst._zod.def.path ?? []]
        });
      }
    };
    return inst;
  }
  var stringbool = (...args) => _stringbool({
    Codec: ZodCodec,
    Boolean: ZodBoolean,
    String: ZodString
  }, ...args);
  function json(params) {
    const jsonSchema = lazy(() => {
      return union2([string3(params), number3(), boolean3(), _null3(), array2(jsonSchema), record2(string3(), jsonSchema)]);
    });
    return jsonSchema;
  }
  function preprocess(fn, schema) {
    return new ZodPreprocess({
      type: "pipe",
      in: transform(fn),
      out: schema
    });
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/compat.js
  init_node_compat_inject();
  var ZodIssueCode = {
    invalid_type: "invalid_type",
    too_big: "too_big",
    too_small: "too_small",
    invalid_format: "invalid_format",
    not_multiple_of: "not_multiple_of",
    unrecognized_keys: "unrecognized_keys",
    invalid_union: "invalid_union",
    invalid_key: "invalid_key",
    invalid_element: "invalid_element",
    invalid_value: "invalid_value",
    custom: "custom"
  };
  function setErrorMap(map2) {
    config({
      customError: map2
    });
  }
  function getErrorMap() {
    return config().customError;
  }
  var ZodFirstPartyTypeKind;
  /* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
  })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/from-json-schema.js
  init_node_compat_inject();
  var z = {
    ...schemas_exports2,
    ...checks_exports2,
    iso: iso_exports
  };
  var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
    // Schema identification
    "$schema",
    "$ref",
    "$defs",
    "definitions",
    // Core schema keywords
    "$id",
    "id",
    "$comment",
    "$anchor",
    "$vocabulary",
    "$dynamicRef",
    "$dynamicAnchor",
    // Type
    "type",
    "enum",
    "const",
    // Composition
    "anyOf",
    "oneOf",
    "allOf",
    "not",
    // Object
    "properties",
    "required",
    "additionalProperties",
    "patternProperties",
    "propertyNames",
    "minProperties",
    "maxProperties",
    // Array
    "items",
    "prefixItems",
    "additionalItems",
    "minItems",
    "maxItems",
    "uniqueItems",
    "contains",
    "minContains",
    "maxContains",
    // String
    "minLength",
    "maxLength",
    "pattern",
    "format",
    // Number
    "minimum",
    "maximum",
    "exclusiveMinimum",
    "exclusiveMaximum",
    "multipleOf",
    // Already handled metadata
    "description",
    "default",
    // Content
    "contentEncoding",
    "contentMediaType",
    "contentSchema",
    // Unsupported (error-throwing)
    "unevaluatedItems",
    "unevaluatedProperties",
    "if",
    "then",
    "else",
    "dependentSchemas",
    "dependentRequired",
    // OpenAPI
    "nullable",
    "readOnly"
  ]);
  function detectVersion(schema, defaultTarget) {
    const $schema = schema.$schema;
    if ($schema === "https://json-schema.org/draft/2020-12/schema") {
      return "draft-2020-12";
    }
    if ($schema === "http://json-schema.org/draft-07/schema#") {
      return "draft-7";
    }
    if ($schema === "http://json-schema.org/draft-04/schema#") {
      return "draft-4";
    }
    return defaultTarget ?? "draft-2020-12";
  }
  function resolveRef(ref, ctx) {
    if (!ref.startsWith("#")) {
      throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
    }
    const path = ref.slice(1).split("/").filter(Boolean);
    if (path.length === 0) {
      return ctx.rootSchema;
    }
    const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
    if (path[0] === defsKey) {
      const key2 = path[1];
      if (!key2 || !ctx.defs[key2]) {
        throw new Error(`Reference not found: ${ref}`);
      }
      return ctx.defs[key2];
    }
    throw new Error(`Reference not found: ${ref}`);
  }
  function convertBaseSchema(schema, ctx) {
    if (schema.not !== void 0) {
      if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
        return z.never();
      }
      throw new Error("not is not supported in Zod (except { not: {} } for never)");
    }
    if (schema.unevaluatedItems !== void 0) {
      throw new Error("unevaluatedItems is not supported");
    }
    if (schema.unevaluatedProperties !== void 0) {
      throw new Error("unevaluatedProperties is not supported");
    }
    if (schema.if !== void 0 || schema.then !== void 0 || schema.else !== void 0) {
      throw new Error("Conditional schemas (if/then/else) are not supported");
    }
    if (schema.dependentSchemas !== void 0 || schema.dependentRequired !== void 0) {
      throw new Error("dependentSchemas and dependentRequired are not supported");
    }
    if (schema.$ref) {
      const refPath = schema.$ref;
      if (ctx.refs.has(refPath)) {
        return ctx.refs.get(refPath);
      }
      if (ctx.processing.has(refPath)) {
        return z.lazy(() => {
          if (!ctx.refs.has(refPath)) {
            throw new Error(`Circular reference not resolved: ${refPath}`);
          }
          return ctx.refs.get(refPath);
        });
      }
      ctx.processing.add(refPath);
      const resolved = resolveRef(refPath, ctx);
      const zodSchema2 = convertSchema(resolved, ctx);
      ctx.refs.set(refPath, zodSchema2);
      ctx.processing.delete(refPath);
      return zodSchema2;
    }
    if (schema.enum !== void 0) {
      const enumValues = schema.enum;
      if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
        return z.null();
      }
      if (enumValues.length === 0) {
        return z.never();
      }
      if (enumValues.length === 1) {
        return z.literal(enumValues[0]);
      }
      if (enumValues.every((v13) => typeof v13 === "string")) {
        return z.enum(enumValues);
      }
      const literalSchemas = enumValues.map((v13) => z.literal(v13));
      if (literalSchemas.length < 2) {
        return literalSchemas[0];
      }
      return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
    }
    if (schema.const !== void 0) {
      return z.literal(schema.const);
    }
    const type2 = schema.type;
    if (Array.isArray(type2)) {
      const typeSchemas = type2.map((t) => {
        const typeSchema = { ...schema, type: t };
        return convertBaseSchema(typeSchema, ctx);
      });
      if (typeSchemas.length === 0) {
        return z.never();
      }
      if (typeSchemas.length === 1) {
        return typeSchemas[0];
      }
      return z.union(typeSchemas);
    }
    if (!type2) {
      return z.any();
    }
    let zodSchema;
    switch (type2) {
      case "string": {
        let stringSchema = z.string();
        if (schema.format) {
          const format = schema.format;
          if (format === "email") {
            stringSchema = stringSchema.check(z.email());
          } else if (format === "uri" || format === "uri-reference") {
            stringSchema = stringSchema.check(z.url());
          } else if (format === "uuid" || format === "guid") {
            stringSchema = stringSchema.check(z.uuid());
          } else if (format === "date-time") {
            stringSchema = stringSchema.check(z.iso.datetime());
          } else if (format === "date") {
            stringSchema = stringSchema.check(z.iso.date());
          } else if (format === "time") {
            stringSchema = stringSchema.check(z.iso.time());
          } else if (format === "duration") {
            stringSchema = stringSchema.check(z.iso.duration());
          } else if (format === "ipv4") {
            stringSchema = stringSchema.check(z.ipv4());
          } else if (format === "ipv6") {
            stringSchema = stringSchema.check(z.ipv6());
          } else if (format === "mac") {
            stringSchema = stringSchema.check(z.mac());
          } else if (format === "cidr") {
            stringSchema = stringSchema.check(z.cidrv4());
          } else if (format === "cidr-v6") {
            stringSchema = stringSchema.check(z.cidrv6());
          } else if (format === "base64") {
            stringSchema = stringSchema.check(z.base64());
          } else if (format === "base64url") {
            stringSchema = stringSchema.check(z.base64url());
          } else if (format === "e164") {
            stringSchema = stringSchema.check(z.e164());
          } else if (format === "jwt") {
            stringSchema = stringSchema.check(z.jwt());
          } else if (format === "emoji") {
            stringSchema = stringSchema.check(z.emoji());
          } else if (format === "nanoid") {
            stringSchema = stringSchema.check(z.nanoid());
          } else if (format === "cuid") {
            stringSchema = stringSchema.check(z.cuid());
          } else if (format === "cuid2") {
            stringSchema = stringSchema.check(z.cuid2());
          } else if (format === "ulid") {
            stringSchema = stringSchema.check(z.ulid());
          } else if (format === "xid") {
            stringSchema = stringSchema.check(z.xid());
          } else if (format === "ksuid") {
            stringSchema = stringSchema.check(z.ksuid());
          }
        }
        if (typeof schema.minLength === "number") {
          stringSchema = stringSchema.min(schema.minLength);
        }
        if (typeof schema.maxLength === "number") {
          stringSchema = stringSchema.max(schema.maxLength);
        }
        if (schema.pattern) {
          stringSchema = stringSchema.regex(new RegExp(schema.pattern));
        }
        zodSchema = stringSchema;
        break;
      }
      case "number":
      case "integer": {
        let numberSchema = type2 === "integer" ? z.number().int() : z.number();
        if (typeof schema.minimum === "number") {
          numberSchema = numberSchema.min(schema.minimum);
        }
        if (typeof schema.maximum === "number") {
          numberSchema = numberSchema.max(schema.maximum);
        }
        if (typeof schema.exclusiveMinimum === "number") {
          numberSchema = numberSchema.gt(schema.exclusiveMinimum);
        } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") {
          numberSchema = numberSchema.gt(schema.minimum);
        }
        if (typeof schema.exclusiveMaximum === "number") {
          numberSchema = numberSchema.lt(schema.exclusiveMaximum);
        } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") {
          numberSchema = numberSchema.lt(schema.maximum);
        }
        if (typeof schema.multipleOf === "number") {
          numberSchema = numberSchema.multipleOf(schema.multipleOf);
        }
        zodSchema = numberSchema;
        break;
      }
      case "boolean": {
        zodSchema = z.boolean();
        break;
      }
      case "null": {
        zodSchema = z.null();
        break;
      }
      case "object": {
        const shape = {};
        const properties = schema.properties || {};
        const requiredSet = new Set(schema.required || []);
        for (const [key2, propSchema] of Object.entries(properties)) {
          const propZodSchema = convertSchema(propSchema, ctx);
          shape[key2] = requiredSet.has(key2) ? propZodSchema : propZodSchema.optional();
        }
        if (schema.propertyNames) {
          const keySchema = convertSchema(schema.propertyNames, ctx);
          const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z.any();
          if (Object.keys(shape).length === 0) {
            zodSchema = z.record(keySchema, valueSchema);
            break;
          }
          const objectSchema2 = z.object(shape).passthrough();
          const recordSchema = z.looseRecord(keySchema, valueSchema);
          zodSchema = z.intersection(objectSchema2, recordSchema);
          break;
        }
        if (schema.patternProperties) {
          const patternProps = schema.patternProperties;
          const patternKeys = Object.keys(patternProps);
          const looseRecords = [];
          for (const pattern of patternKeys) {
            const patternValue = convertSchema(patternProps[pattern], ctx);
            const keySchema = z.string().regex(new RegExp(pattern));
            looseRecords.push(z.looseRecord(keySchema, patternValue));
          }
          const schemasToIntersect = [];
          if (Object.keys(shape).length > 0) {
            schemasToIntersect.push(z.object(shape).passthrough());
          }
          schemasToIntersect.push(...looseRecords);
          if (schemasToIntersect.length === 0) {
            zodSchema = z.object({}).passthrough();
          } else if (schemasToIntersect.length === 1) {
            zodSchema = schemasToIntersect[0];
          } else {
            let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);
            for (let i5 = 2; i5 < schemasToIntersect.length; i5++) {
              result = z.intersection(result, schemasToIntersect[i5]);
            }
            zodSchema = result;
          }
          break;
        }
        const objectSchema = z.object(shape);
        if (schema.additionalProperties === false) {
          zodSchema = objectSchema.strict();
        } else if (typeof schema.additionalProperties === "object") {
          zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
        } else {
          zodSchema = objectSchema.passthrough();
        }
        break;
      }
      case "array": {
        const prefixItems = schema.prefixItems;
        const items = schema.items;
        if (prefixItems && Array.isArray(prefixItems)) {
          const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
          const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
          if (rest) {
            zodSchema = z.tuple(tupleItems).rest(rest);
          } else {
            zodSchema = z.tuple(tupleItems);
          }
          if (typeof schema.minItems === "number") {
            zodSchema = zodSchema.check(z.minLength(schema.minItems));
          }
          if (typeof schema.maxItems === "number") {
            zodSchema = zodSchema.check(z.maxLength(schema.maxItems));
          }
        } else if (Array.isArray(items)) {
          const tupleItems = items.map((item) => convertSchema(item, ctx));
          const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
          if (rest) {
            zodSchema = z.tuple(tupleItems).rest(rest);
          } else {
            zodSchema = z.tuple(tupleItems);
          }
          if (typeof schema.minItems === "number") {
            zodSchema = zodSchema.check(z.minLength(schema.minItems));
          }
          if (typeof schema.maxItems === "number") {
            zodSchema = zodSchema.check(z.maxLength(schema.maxItems));
          }
        } else if (items !== void 0) {
          const element = convertSchema(items, ctx);
          let arraySchema = z.array(element);
          if (typeof schema.minItems === "number") {
            arraySchema = arraySchema.min(schema.minItems);
          }
          if (typeof schema.maxItems === "number") {
            arraySchema = arraySchema.max(schema.maxItems);
          }
          zodSchema = arraySchema;
        } else {
          zodSchema = z.array(z.any());
        }
        break;
      }
      default:
        throw new Error(`Unsupported type: ${type2}`);
    }
    return zodSchema;
  }
  function convertSchema(schema, ctx) {
    if (typeof schema === "boolean") {
      return schema ? z.any() : z.never();
    }
    let baseSchema = convertBaseSchema(schema, ctx);
    const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
    if (schema.anyOf && Array.isArray(schema.anyOf)) {
      const options = schema.anyOf.map((s3) => convertSchema(s3, ctx));
      const anyOfUnion = z.union(options);
      baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;
    }
    if (schema.oneOf && Array.isArray(schema.oneOf)) {
      const options = schema.oneOf.map((s3) => convertSchema(s3, ctx));
      const oneOfUnion = z.xor(options);
      baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;
    }
    if (schema.allOf && Array.isArray(schema.allOf)) {
      if (schema.allOf.length === 0) {
        baseSchema = hasExplicitType ? baseSchema : z.any();
      } else {
        let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
        const startIdx = hasExplicitType ? 0 : 1;
        for (let i5 = startIdx; i5 < schema.allOf.length; i5++) {
          result = z.intersection(result, convertSchema(schema.allOf[i5], ctx));
        }
        baseSchema = result;
      }
    }
    if (schema.nullable === true && ctx.version === "openapi-3.0") {
      baseSchema = z.nullable(baseSchema);
    }
    if (schema.readOnly === true) {
      baseSchema = z.readonly(baseSchema);
    }
    if (schema.default !== void 0) {
      baseSchema = baseSchema.default(schema.default);
    }
    const extraMeta = {};
    const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
    for (const key2 of coreMetadataKeys) {
      if (key2 in schema) {
        extraMeta[key2] = schema[key2];
      }
    }
    const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"];
    for (const key2 of contentMetadataKeys) {
      if (key2 in schema) {
        extraMeta[key2] = schema[key2];
      }
    }
    for (const key2 of Object.keys(schema)) {
      if (!RECOGNIZED_KEYS.has(key2)) {
        extraMeta[key2] = schema[key2];
      }
    }
    if (Object.keys(extraMeta).length > 0) {
      ctx.registry.add(baseSchema, extraMeta);
    }
    if (schema.description) {
      baseSchema = baseSchema.describe(schema.description);
    }
    return baseSchema;
  }
  function fromJSONSchema(schema, params) {
    if (typeof schema === "boolean") {
      return schema ? z.any() : z.never();
    }
    let normalized;
    try {
      normalized = JSON.parse(JSON.stringify(schema));
    } catch {
      throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
    }
    const version16 = detectVersion(normalized, params?.defaultTarget);
    const defs = normalized.$defs || normalized.definitions || {};
    const ctx = {
      version: version16,
      defs,
      refs: /* @__PURE__ */ new Map(),
      processing: /* @__PURE__ */ new Set(),
      rootSchema: normalized,
      registry: params?.registry ?? globalRegistry
    };
    return convertSchema(normalized, ctx);
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/coerce.js
  var coerce_exports = {};
  __export(coerce_exports, {
    bigint: () => bigint3,
    boolean: () => boolean4,
    date: () => date4,
    number: () => number4,
    string: () => string4
  });
  init_node_compat_inject();
  function string4(params) {
    return _coercedString(ZodString, params);
  }
  function number4(params) {
    return _coercedNumber(ZodNumber, params);
  }
  function boolean4(params) {
    return _coercedBoolean(ZodBoolean, params);
  }
  function bigint3(params) {
    return _coercedBigint(ZodBigInt, params);
  }
  function date4(params) {
    return _coercedDate(ZodDate, params);
  }

  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
  config(en_default());

  // ../../packages/wallet-core/src/schemas.ts
  var encryptedVaultSchema = external_exports.object({
    version: external_exports.literal(1),
    kdf: external_exports.literal("pbkdf2-sha256"),
    iterations: external_exports.number().int().positive(),
    saltBase64: external_exports.string().min(1),
    ivBase64: external_exports.string().min(1),
    ciphertextBase64: external_exports.string().min(1),
    createdAt: external_exports.string().datetime()
  });
  var walletVaultPlaintextSchema = external_exports.object({
    mnemonic: external_exports.string().min(1),
    evmAddress: external_exports.string().regex(/^0x[a-fA-F0-9]{40}$/),
    createdAt: external_exports.string().datetime()
  });

  // ../../packages/wallet-core/src/vault.ts
  async function encryptVault(plaintext, passcode) {
    const parsed = walletVaultPlaintextSchema.parse(plaintext);
    const plaintextBytes = encodeUtf8(JSON.stringify(parsed));
    try {
      return await encryptVaultPayload(plaintextBytes, passcode);
    } finally {
      wipeBytes(plaintextBytes);
    }
  }
  function parseEncryptedVault(vault) {
    if (typeof vault === "object" && vault !== null && "version" in vault && vault.version !== 1) {
      throw new Error("Unsupported vault version.");
    }
    return encryptedVaultSchema.parse(vault);
  }
  async function decryptVault(vault, passcode) {
    const parsed = parseEncryptedVault(vault);
    let plaintext = null;
    try {
      plaintext = await decryptVaultPayload(parsed, passcode);
      return walletVaultPlaintextSchema.parse(JSON.parse(decodeUtf8(asArrayBuffer(plaintext))));
    } catch {
      throw new Error("Unable to unlock wallet with the provided passcode.");
    } finally {
      wipeBytes(plaintext);
    }
  }
  function clearSensitiveMemoryBestEffort(vault) {
    if (vault) {
      vault.mnemonic = "";
      vault.evmAddress = "";
      vault.createdAt = "";
    }
    return null;
  }

  // ../../packages/wallet-core/src/wallet-adapter.ts
  init_node_compat_inject();

  // src/shared/protocol.ts
  init_node_compat_inject();
  var ACORUS_PROVIDER_METHODS = [
    "acorus_ping",
    "acorus_getVaultStatus",
    "acorus_createWallet",
    "acorus_importWallet",
    "acorus_unlockWallet",
    "acorus_lockWallet",
    "acorus_receiveAddress",
    "acorus_requestAccounts",
    "acorus_accounts",
    "acorus_chainId",
    "acorus_switchChain",
    "acorus_getPermissions",
    "acorus_requestPermissions",
    "acorus_revokePermissions",
    "acorus_addChain",
    "acorus_watchAsset",
    "acorus_multichainSend",
    "acorus_swap",
    "acorus_signMessage",
    "acorus_signTypedData",
    "acorus_signTransaction",
    "acorus_sendTransaction"
  ];
  function createRequestId(prefix = "acorus") {
    if (globalThis.crypto?.randomUUID) {
      return `${prefix}_${globalThis.crypto.randomUUID()}`;
    }
    return `${prefix}_${Date.now()}_${Math.random().toString(16).slice(2)}`;
  }
  function isAcorusProviderMethod(value) {
    return ACORUS_PROVIDER_METHODS.includes(value);
  }
  function createSkeletonState(input) {
    return {
      phase: "permission_shell",
      providerInjection: input?.providerInjection ?? "stub_only",
      executionEnabled: input?.executionEnabled ?? true,
      proposals: input?.proposals ?? [],
      sessions: input?.sessions ?? [],
      pendingRequests: input?.pendingRequests ?? [],
      approvalResults: input?.approvalResults ?? [],
      activityLog: input?.activityLog ?? [],
      signerUnlockQueue: input?.signerUnlockQueue ?? [],
      activeOriginBridge: input?.activeOriginBridge ?? null,
      walletExposureMode: input?.walletExposureMode ?? "preview_accounts",
      walletExposedAccounts: input?.walletExposedAccounts ?? [],
      walletLastSyncedAt: input?.walletLastSyncedAt ?? null,
      extensionVaultStatus: input?.extensionVaultStatus ?? {
        hasVault: false,
        isUnlocked: false,
        activeProfileId: null,
        profiles: [],
        unlockedAt: null,
        createdAt: null,
        updatedAt: null
      },
      supportedMethods: ACORUS_PROVIDER_METHODS,
      lastUpdatedAt: input?.lastUpdatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
      activeOrigin: input?.activeOrigin ?? null
    };
  }

  // src/background/extension-wallet.ts
  init_node_compat_inject();

  // src/background/extension-chain-registry.ts
  init_node_compat_inject();

  // src/background/extension-storage.ts
  init_node_compat_inject();
  async function readStorageValue(key2, fallback) {
    const result = await chrome.storage.local.get(key2);
    const value = result[key2];
    if (value === void 0 || value === null) {
      return fallback;
    }
    return value;
  }
  async function writeStorageValue(key2, value) {
    await chrome.storage.local.set({ [key2]: value });
    return value;
  }

  // src/background/extension-chain-registry.ts
  var CUSTOM_EVM_NETWORKS_KEY = "acorus_custom_evm_networks";
  var ACTIVE_EXTENSION_CHAIN_KEY = "acorus_active_extension_chain";
  var CUSTOM_RPC_TIMEOUT_MS = 8e3;
  var DEFAULT_ACCENTS = {
    "1": "#627EEA",
    "10": "#FF0420",
    "56": "#F3BA2F",
    "137": "#8247E5",
    "204": "#F0B90B",
    "250": "#1969FF",
    "324": "#8C8DFC",
    "101": "#14F195",
    "1329": "#7C3AED",
    "8453": "#0052FF",
    "42161": "#28A0F0",
    "43114": "#E84142",
    "59144": "#61DFFF",
    "tron-mainnet": "#EF0027",
    "bitcoin-mainnet": "#F7931A",
    "ton-mainnet": "#0098EA"
  };
  async function listExtensionNetworks() {
    const custom2 = await readStorageValue(
      CUSTOM_EVM_NETWORKS_KEY,
      []
    );
    const builtin = [
      ...EVM_CHAINS.map((chain2) => createKnownEvmNetwork(chain2)),
      {
        id: "101",
        family: "solana",
        chainId: 101,
        name: "Solana",
        nativeSymbol: "SOL",
        rpcUrlEnv: "NEXT_PUBLIC_SOLANA_RPC_URL",
        blockExplorerUrl: "https://solscan.io",
        isEnabled: true,
        network: "mainnet-beta",
        iconSymbol: "SOL",
        accent: DEFAULT_ACCENTS["101"] ?? "#14F195",
        capabilities: {
          receive: true,
          balance: true,
          send: true,
          swap: false,
          dapp: true
        }
      },
      {
        id: "tron-mainnet",
        family: "tron",
        chainId: "tron-mainnet",
        name: "Tron",
        nativeSymbol: "TRX",
        rpcUrlEnv: "NEXT_PUBLIC_TRON_RPC_URL",
        blockExplorerUrl: "https://tronscan.org/#",
        isEnabled: false,
        isSkeleton: true,
        iconSymbol: "TRX",
        accent: DEFAULT_ACCENTS["tron-mainnet"] ?? "#EF0027",
        capabilities: {
          receive: true,
          balance: false,
          send: false,
          swap: false,
          dapp: true
        }
      },
      {
        id: "bitcoin-mainnet",
        family: "utxo",
        chainId: "bitcoin-mainnet",
        name: "Bitcoin",
        nativeSymbol: "BTC",
        rpcUrlEnv: "NEXT_PUBLIC_BITCOIN_RPC_URL",
        blockExplorerUrl: "https://mempool.space",
        isEnabled: false,
        isSkeleton: true,
        iconSymbol: "BTC",
        accent: DEFAULT_ACCENTS["bitcoin-mainnet"] ?? "#F7931A",
        capabilities: {
          receive: false,
          balance: false,
          send: false,
          swap: false,
          dapp: false
        }
      },
      {
        id: "ton-mainnet",
        family: "ton",
        chainId: "ton-mainnet",
        name: "TON",
        nativeSymbol: "TON",
        rpcUrlEnv: "NEXT_PUBLIC_TON_RPC_URL",
        blockExplorerUrl: "https://tonscan.org",
        isEnabled: false,
        isSkeleton: true,
        iconSymbol: "TON",
        accent: DEFAULT_ACCENTS["ton-mainnet"] ?? "#0098EA",
        capabilities: {
          receive: false,
          balance: false,
          send: false,
          swap: false,
          dapp: false
        }
      }
    ];
    const existing = new Set(builtin.map((item) => item.id));
    return [
      ...builtin,
      ...custom2.filter((item) => !existing.has(item.id))
    ];
  }
  async function getActiveExtensionChainId() {
    return readStorageValue(ACTIVE_EXTENSION_CHAIN_KEY, "all");
  }
  async function setActiveExtensionChainId(chainId) {
    if (chainId === "all") {
      await writeStorageValue(ACTIVE_EXTENSION_CHAIN_KEY, chainId);
      return chainId;
    }
    const networks = await listExtensionNetworks();
    if (!networks.some((network) => String(network.chainId) === String(chainId))) {
      throw new Error(`Unsupported extension chain: ${String(chainId)}`);
    }
    await writeStorageValue(ACTIVE_EXTENSION_CHAIN_KEY, chainId);
    return chainId;
  }
  async function addCustomEvmNetwork(input) {
    validateCustomEvmNetworkInput(input);
    const builtin = (await listExtensionNetworks()).find(
      (network) => network.family === "evm" && !network.isCustom && Number(network.chainId) === input.chainId
    );
    if (builtin) {
      return builtin;
    }
    await assertRpcMatchesChainId(input.chainId, input.rpcUrls[0] ?? "");
    const custom2 = {
      id: String(input.chainId),
      family: "evm",
      chainId: input.chainId,
      name: input.chainName,
      nativeSymbol: input.nativeCurrency.symbol,
      blockExplorerUrl: input.blockExplorerUrls?.[0] ?? "",
      isEnabled: true,
      isCustom: true,
      rpcUrl: input.rpcUrls[0],
      iconSymbol: input.nativeCurrency.symbol,
      accent: "#8b5cf6",
      capabilities: {
        receive: true,
        balance: true,
        send: true,
        swap: true,
        dapp: true
      }
    };
    const current = await readStorageValue(
      CUSTOM_EVM_NETWORKS_KEY,
      []
    );
    const next = [
      ...current.filter((item) => String(item.chainId) !== String(custom2.chainId)),
      custom2
    ];
    await writeStorageValue(CUSTOM_EVM_NETWORKS_KEY, next);
    return custom2;
  }
  async function resolveExtensionNetwork(chainId) {
    const networks = await listExtensionNetworks();
    return networks.find((network) => String(network.chainId) === String(chainId)) ?? null;
  }
  function createKnownEvmNetwork(input) {
    return {
      id: String(input.chainId),
      family: "evm",
      chainId: input.chainId,
      name: input.name,
      nativeSymbol: input.nativeSymbol,
      rpcUrlEnv: input.rpcUrlEnv,
      blockExplorerUrl: input.blockExplorerUrl,
      isEnabled: true,
      iconSymbol: input.nativeSymbol,
      accent: DEFAULT_ACCENTS[String(input.chainId)] ?? "#8b5cf6",
      capabilities: {
        receive: true,
        balance: true,
        send: true,
        swap: true,
        dapp: true
      }
    };
  }
  function validateCustomEvmNetworkInput(input) {
    if (!Number.isInteger(input.chainId) || input.chainId <= 0) {
      throw new Error("Custom EVM chainId must be a positive integer.");
    }
    if (!input.chainName.trim()) {
      throw new Error("Custom EVM chainName is required.");
    }
    if (input.nativeCurrency.decimals !== 18) {
      throw new Error("Only 18-decimal native EVM currencies are supported.");
    }
    if (!input.nativeCurrency.symbol || input.nativeCurrency.symbol.length > 8) {
      throw new Error("Native currency symbol must be 1-8 characters.");
    }
    const rpcUrl = input.rpcUrls[0];
    if (!rpcUrl?.startsWith("https://")) {
      throw new Error("Custom EVM network requires an HTTPS RPC URL.");
    }
    if (isPrivateRpcUrl(rpcUrl) && !isDevModeEnabled()) {
      throw new Error("Private or localhost RPC URLs are blocked outside development mode.");
    }
  }
  async function assertRpcMatchesChainId(chainId, rpcUrl) {
    const controller = new AbortController();
    const timeout = setTimeout(() => controller.abort(), CUSTOM_RPC_TIMEOUT_MS);
    const response = await fetch(rpcUrl, {
      method: "POST",
      headers: { "content-type": "application/json" },
      signal: controller.signal,
      body: JSON.stringify({
        jsonrpc: "2.0",
        id: 1,
        method: "eth_chainId",
        params: []
      })
    }).finally(() => clearTimeout(timeout));
    if (!response.ok) {
      throw new Error("RPC endpoint did not respond.");
    }
    const payload = await response.json();
    const remote = payload.result ? Number.parseInt(payload.result, 16) : NaN;
    if (remote !== chainId) {
      throw new Error(`RPC chainId mismatch. Expected ${chainId}, got ${remote}.`);
    }
  }
  function isPrivateRpcUrl(rpcUrl) {
    try {
      const hostname3 = new URL(rpcUrl).hostname.toLowerCase();
      if (hostname3 === "localhost" || hostname3 === "127.0.0.1" || hostname3 === "::1" || hostname3.endsWith(".local")) {
        return true;
      }
      const parts = hostname3.split(".").map((part) => Number(part));
      if (parts.length !== 4 || parts.some((part) => !Number.isInteger(part))) {
        return false;
      }
      const [first = 0, second = 0] = parts;
      return first === 10 || first === 127 || first === 172 && second >= 16 && second <= 31 || first === 192 && second === 168 || first === 169 && second === 254 || first === 0;
    } catch {
      return true;
    }
  }
  function isDevModeEnabled() {
    return false;
  }

  // src/background/extension-wallet.ts
  var EXTENSION_VAULT_KEY = "acorus_extension_encrypted_vault";
  var EXTENSION_VAULT_META_KEY = "acorus_extension_vault_meta";
  var EXTENSION_EVM_RPC_FALLBACKS = {
    1: "https://ethereum-rpc.publicnode.com",
    10: "https://optimism-rpc.publicnode.com",
    56: "https://bsc-rpc.publicnode.com",
    137: "https://polygon-bor-rpc.publicnode.com",
    204: "https://opbnb-rpc.publicnode.com",
    250: "https://fantom-rpc.publicnode.com",
    324: "https://zksync-era-rpc.publicnode.com",
    1329: "https://sei-evm-rpc.publicnode.com",
    8453: "https://base-rpc.publicnode.com",
    42161: "https://arbitrum-one-rpc.publicnode.com",
    43114: "https://avalanche-c-chain-rpc.publicnode.com",
    59144: "https://linea-rpc.publicnode.com"
  };
  var EXTENSION_SOLANA_RPC_FALLBACK = "https://api.mainnet-beta.solana.com";
  var unlockedSession = null;
  async function createExtensionWallet(input) {
    const mnemonic = generateWalletMnemonic();
    const installed = await installExtensionWallet({
      name: input.name,
      mnemonic,
      passcode: input.passcode
    });
    return {
      ...installed,
      mnemonic
    };
  }
  async function importExtensionWallet(input) {
    const validation = getWalletMnemonicValidation(input.mnemonic);
    if (!validation.importable) {
      throw new Error(
        "Invalid seed phrase. Paste 12/18/24 BIP-39 words only, separated by spaces."
      );
    }
    return installExtensionWallet({
      name: input.name,
      mnemonic: validation.normalized,
      passcode: input.passcode
    });
  }
  async function getExtensionVaultStatus() {
    const result = await chrome.storage.local.get([
      EXTENSION_VAULT_KEY,
      EXTENSION_VAULT_META_KEY
    ]);
    const vault = result[EXTENSION_VAULT_KEY];
    const meta3 = normalizeVaultMeta(result[EXTENSION_VAULT_META_KEY]);
    return {
      hasVault: Boolean(vault && meta3),
      isUnlocked: Boolean(unlockedSession),
      activeProfileId: meta3?.activeProfileId ?? null,
      profiles: meta3?.profiles ?? [],
      unlockedAt: unlockedSession?.unlockedAt ?? null,
      createdAt: meta3?.createdAt ?? null,
      updatedAt: meta3?.updatedAt ?? null
    };
  }
  async function unlockExtensionWallet(input) {
    const result = await chrome.storage.local.get([
      EXTENSION_VAULT_KEY,
      EXTENSION_VAULT_META_KEY
    ]);
    const vault = result[EXTENSION_VAULT_KEY];
    const meta3 = normalizeVaultMeta(result[EXTENSION_VAULT_META_KEY]);
    if (!vault || !meta3) {
      throw new Error("No extension wallet vault exists yet.");
    }
    const plaintext = await decryptVault(vault, input.passcode);
    unlockedSession = {
      mnemonic: plaintext.mnemonic,
      evmAddress: plaintext.evmAddress,
      unlockedAt: (/* @__PURE__ */ new Date()).toISOString()
    };
    clearSensitiveMemoryBestEffort(plaintext);
    return getExtensionVaultStatus();
  }
  async function lockExtensionWallet() {
    unlockedSession = clearSensitiveMemoryBestEffort(unlockedSession);
    return getExtensionVaultStatus();
  }
  async function resetExtensionWallet() {
    unlockedSession = clearSensitiveMemoryBestEffort(unlockedSession);
    await chrome.storage.local.set({
      [EXTENSION_VAULT_KEY]: null,
      [EXTENSION_VAULT_META_KEY]: null
    });
    return getExtensionVaultStatus();
  }
  async function executeExtensionSignMessage(input) {
    const session = requireUnlockedSession();
    if (isSolanaSignMessageParams(input.params)) {
      return signSolanaMessage({
        mnemonic: session.mnemonic,
        message: input.params[0].message
      });
    }
    const account = requireUnlockedEvmAccount(session, input.account);
    const payload = extractMessagePayload(input.params);
    return account.signMessage(
      isHexString(payload) ? { message: { raw: payload } } : { message: payload }
    );
  }
  async function executeExtensionSolanaSend(input) {
    const session = requireUnlockedSession();
    const payload = parseSolanaSendPayload(input.params);
    const result = payload.assetType === "spl" ? await executeSplTransfer({
      mintAddress: payload.tokenAddress,
      fromOwnerAddress: payload.fromAddress,
      toOwnerAddress: payload.toAddress,
      amountRaw: payload.amountRaw,
      amountFormatted: payload.amountFormatted,
      decimals: payload.decimals,
      symbol: payload.symbol,
      balanceRaw: payload.balanceRaw,
      mnemonic: session.mnemonic,
      expectedFromAddress: input.account ?? payload.fromAddress,
      rpcUrl: payload.rpcUrl ?? EXTENSION_SOLANA_RPC_FALLBACK
    }) : await executeSolanaSend({
      fromAddress: payload.fromAddress,
      toAddress: payload.toAddress,
      amountRaw: payload.amountRaw,
      amountFormatted: payload.amountFormatted,
      mnemonic: session.mnemonic,
      expectedFromAddress: input.account ?? payload.fromAddress,
      rpcUrl: payload.rpcUrl ?? EXTENSION_SOLANA_RPC_FALLBACK
    });
    if (result.status !== "submitted" || !result.txHash) {
      throw new Error(result.errorMessage ?? "Solana send was not submitted.");
    }
    return result.txHash;
  }
  async function executeExtensionSignTypedData(input) {
    const session = requireUnlockedSession();
    const account = requireUnlockedEvmAccount(session, input.account);
    const payload = parseTypedDataPayload(input.params);
    const signTypedData3 = account.signTypedData.bind(account);
    return signTypedData3(payload);
  }
  async function executeExtensionSignTransaction(input) {
    const prepared = await prepareExtensionTransaction(input);
    const signTransaction3 = prepared.walletClient.signTransaction.bind(
      prepared.walletClient
    );
    return signTransaction3({
      ...prepared.request,
      account: prepared.walletClient.account,
      chain: prepared.walletClient.chain
    });
  }
  async function executeExtensionSendTransaction(input) {
    const prepared = await prepareExtensionTransaction(input);
    return prepared.walletClient.sendTransaction({
      ...prepared.request,
      account: prepared.walletClient.account,
      chain: prepared.walletClient.chain
    });
  }
  async function installExtensionWallet(input) {
    const name2 = input.name.trim() || "Acorus Wallet";
    const passcodeMode = requireExtensionPasscodeMode(input.passcode);
    const evmAddress = getEvmAddressFromMnemonic(input.mnemonic);
    const solanaAddress = getSolanaAddressFromMnemonic(input.mnemonic);
    const tronAddress = getTronAddressFromMnemonic(input.mnemonic);
    const encryptedVault = await encryptVault(
      {
        mnemonic: input.mnemonic,
        evmAddress,
        createdAt: (/* @__PURE__ */ new Date()).toISOString()
      },
      input.passcode
    );
    const createdAt = encryptedVault.createdAt;
    const profileId = `extension_evm_${evmAddress.toLowerCase()}`;
    const profiles = [
      {
        profileId,
        name: name2,
        account: evmAddress,
        chainFamily: "evm",
        chainIds: getChainsByFamily("evm").map((chain2) => chain2.chainId),
        selected: true
      },
      {
        profileId: `extension_solana_${solanaAddress}`,
        name: `${name2} \xB7 Solana`,
        account: solanaAddress,
        chainFamily: "solana",
        chainIds: getChainsByFamily("solana").map((chain2) => chain2.chainId),
        selected: false
      },
      {
        profileId: `extension_tron_${tronAddress}`,
        name: `${name2} \xB7 Tron`,
        account: tronAddress,
        chainFamily: "tron",
        chainIds: [DEFAULT_TRON_CHAIN_ID],
        selected: false
      }
    ];
    const meta3 = {
      activeProfileId: profileId,
      profiles,
      createdAt,
      updatedAt: createdAt,
      passcodeInitialized: true,
      passcodeMode,
      passcodeSetupConfirmedAt: (/* @__PURE__ */ new Date()).toISOString()
    };
    await chrome.storage.local.set({
      [EXTENSION_VAULT_KEY]: encryptedVault,
      [EXTENSION_VAULT_META_KEY]: meta3
    });
    unlockedSession = {
      mnemonic: input.mnemonic,
      evmAddress,
      unlockedAt: (/* @__PURE__ */ new Date()).toISOString()
    };
    return {
      profileId,
      name: name2,
      account: evmAddress,
      encryptedVault,
      warning: "Seed phrase was generated inside the extension and only the encrypted vault was persisted. Store the words offline now; they will not be shown again."
    };
  }
  function requireUnlockedSession() {
    if (!unlockedSession) {
      throw new Error("Unlock Acorus Wallet extension before signing.");
    }
    return unlockedSession;
  }
  function requireUnlockedEvmAccount(session, expectedAccount) {
    const account = deriveEvmAccountFromMnemonic(session.mnemonic);
    if (expectedAccount && normalizeLowerHex(expectedAccount) !== normalizeLowerHex(account.address)) {
      throw new Error("The requested account does not match the unlocked extension wallet.");
    }
    return account;
  }
  function extractMessagePayload(params) {
    const first = params[0];
    const second = params[1];
    if (typeof first === "string" && looksLikeEvmAddress(second)) {
      return first;
    }
    if (typeof first === "string") {
      return first;
    }
    if (typeof second === "string") {
      return second;
    }
    throw new Error("Message signing requires a string payload.");
  }
  function parseTypedDataPayload(params) {
    const candidate = looksLikeEvmAddress(params[0]) && params.length > 1 ? params[1] : params[0];
    const normalized = typeof candidate === "string" ? JSON.parse(candidate) : candidate;
    if (typeof normalized !== "object" || normalized === null) {
      throw new Error("Typed data payload must be an object.");
    }
    const payload = normalized;
    if (typeof payload.primaryType !== "string" || typeof payload.types !== "object" || payload.types === null || typeof payload.message !== "object" || payload.message === null) {
      throw new Error("Typed data payload is missing required fields.");
    }
    return {
      domain: typeof payload.domain === "object" && payload.domain !== null ? payload.domain : {},
      types: payload.types,
      primaryType: payload.primaryType,
      message: payload.message
    };
  }
  async function prepareExtensionTransaction(input) {
    const session = requireUnlockedSession();
    const account = requireUnlockedEvmAccount(session, input.account);
    const transaction = extractTransactionPayload(input.params);
    const chainId = resolveEvmChainId(transaction.chainId, input.chainId);
    const env = buildExtensionEvmEnv(chainId);
    const clientOptions = await buildExtensionEvmClientOptions(chainId);
    const publicClient = createEvmPublicClient(chainId, env, clientOptions);
    const walletClient = createEvmWalletClient(
      session.mnemonic,
      chainId,
      env,
      clientOptions
    );
    if (transaction.from && normalizeLowerHex(transaction.from) !== normalizeLowerHex(account.address)) {
      throw new Error("The transaction 'from' account does not match the unlocked extension wallet.");
    }
    const requestInput = { account };
    for (const [key2, value] of Object.entries({
      to: transaction.to,
      data: transaction.data,
      value: transaction.value,
      nonce: transaction.nonce,
      gas: transaction.gas,
      gasPrice: transaction.gasPrice,
      maxFeePerGas: transaction.maxFeePerGas,
      maxPriorityFeePerGas: transaction.maxPriorityFeePerGas
    })) {
      if (value !== void 0) {
        requestInput[key2] = value;
      }
    }
    const request = await publicClient.prepareTransactionRequest(
      requestInput
    );
    return {
      walletClient,
      request
    };
  }
  function extractTransactionPayload(params) {
    const candidate = params[0];
    if (typeof candidate !== "object" || candidate === null) {
      throw new Error("Transaction signing requires a transaction object.");
    }
    const payload = candidate;
    return {
      from: normalizeOptionalHex(payload.from),
      to: normalizeOptionalHex(payload.to),
      data: normalizeOptionalHex(payload.data),
      value: normalizeBigInt(payload.value),
      nonce: normalizeNumber(payload.nonce),
      gas: normalizeBigInt(payload.gas),
      gasPrice: normalizeBigInt(payload.gasPrice),
      maxFeePerGas: normalizeBigInt(payload.maxFeePerGas),
      maxPriorityFeePerGas: normalizeBigInt(payload.maxPriorityFeePerGas),
      chainId: normalizeNumber(payload.chainId)
    };
  }
  function resolveEvmChainId(transactionChainId, requestChainId) {
    if (typeof transactionChainId === "number") {
      return transactionChainId;
    }
    if (typeof requestChainId === "number") {
      return requestChainId;
    }
    return 1;
  }
  function buildExtensionEvmEnv(chainId) {
    const runtimeEnv = typeof process === "undefined" ? {} : process.env;
    let chain2;
    try {
      chain2 = getEvmChainConfig(chainId);
    } catch {
      return {
        ...runtimeEnv
      };
    }
    return {
      ...runtimeEnv,
      [chain2.rpcUrlEnv]: runtimeEnv[chain2.rpcUrlEnv] ?? EXTENSION_EVM_RPC_FALLBACKS[chainId]
    };
  }
  function isSolanaSignMessageParams(params) {
    const first = params[0];
    if (typeof first !== "object" || first === null) {
      return false;
    }
    const payload = first;
    return payload.family === "solana" && (typeof payload.message === "string" || Array.isArray(payload.message) || payload.message instanceof Uint8Array);
  }
  function parseSolanaSendPayload(params) {
    const payload = normalizeRecord(params[0]);
    const assetType = payload.assetType === "spl" ? "spl" : "native";
    const fromAddress = String(payload.fromAddress ?? payload.from ?? "");
    const toAddress = String(payload.toAddress ?? payload.to ?? "");
    const amountRaw = typeof payload.amountRaw === "string" ? payload.amountRaw : void 0;
    const amountFormatted = typeof payload.amountFormatted === "string" ? payload.amountFormatted : typeof payload.amount === "string" ? payload.amount : void 0;
    const rpcUrl = typeof payload.rpcUrl === "string" ? payload.rpcUrl : void 0;
    const expectedFromAddress = typeof payload.expectedFromAddress === "string" ? payload.expectedFromAddress : null;
    if (assetType === "spl") {
      return {
        assetType,
        fromAddress,
        toAddress,
        amountRaw,
        amountFormatted,
        rpcUrl,
        expectedFromAddress,
        tokenAddress: String(payload.tokenAddress ?? payload.mintAddress ?? ""),
        symbol: typeof payload.symbol === "string" ? payload.symbol : "SPL",
        decimals: normalizeNumber(payload.decimals) ?? 0,
        balanceRaw: typeof payload.balanceRaw === "string" ? payload.balanceRaw : null
      };
    }
    return {
      assetType,
      symbol: "SOL",
      tokenAddress: null,
      decimals: 9,
      fromAddress,
      toAddress,
      amountRaw,
      amountFormatted,
      rpcUrl,
      expectedFromAddress,
      balanceRaw: typeof payload.balanceRaw === "string" ? payload.balanceRaw : null
    };
  }
  function normalizeRecord(value) {
    return typeof value === "object" && value !== null ? value : {};
  }
  async function buildExtensionEvmClientOptions(chainId) {
    try {
      getEvmChainConfig(chainId);
      return void 0;
    } catch {
      const network = await resolveExtensionNetwork(chainId);
      if (!network || network.family !== "evm" || !network.rpcUrl) {
        return void 0;
      }
      return {
        customChain: {
          chainId,
          name: network.name,
          nativeCurrency: {
            name: network.nativeSymbol,
            symbol: network.nativeSymbol,
            decimals: 18
          },
          rpcUrl: network.rpcUrl,
          blockExplorerUrl: network.blockExplorerUrl || null
        }
      };
    }
  }
  function normalizeOptionalHex(value) {
    return typeof value === "string" && isHexString(value) ? value : void 0;
  }
  function normalizeBigInt(value) {
    if (typeof value === "bigint") {
      return value;
    }
    if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
      return BigInt(Math.trunc(value));
    }
    if (typeof value !== "string") {
      return void 0;
    }
    const trimmed = value.trim().toLowerCase();
    if (!trimmed) {
      return void 0;
    }
    if (/^0x[0-9a-f]+$/u.test(trimmed) || /^\d+$/u.test(trimmed)) {
      return BigInt(trimmed);
    }
    return void 0;
  }
  function normalizeNumber(value) {
    if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
      return Math.trunc(value);
    }
    if (typeof value !== "string") {
      return void 0;
    }
    const trimmed = value.trim().toLowerCase();
    if (!trimmed) {
      return void 0;
    }
    if (/^0x[0-9a-f]+$/u.test(trimmed)) {
      return Number.parseInt(trimmed.slice(2), 16);
    }
    if (/^\d+$/u.test(trimmed)) {
      return Number.parseInt(trimmed, 10);
    }
    return void 0;
  }
  function isHexString(value) {
    return typeof value === "string" && /^0x[0-9a-f]+$/iu.test(value);
  }
  function looksLikeEvmAddress(value) {
    return typeof value === "string" && /^0x[0-9a-f]{40}$/iu.test(value);
  }
  function normalizeLowerHex(value) {
    return value.trim().toLowerCase();
  }
  function normalizeVaultMeta(value) {
    if (typeof value !== "object" || value === null) {
      return null;
    }
    const candidate = value;
    if (typeof candidate.activeProfileId !== "string" || !Array.isArray(candidate.profiles) || typeof candidate.createdAt !== "string" || typeof candidate.updatedAt !== "string" || candidate.passcodeInitialized !== true || candidate.passcodeMode !== "user" && candidate.passcodeMode !== "pin" && candidate.passcodeMode !== "random" || typeof candidate.passcodeSetupConfirmedAt !== "string") {
      return null;
    }
    return {
      activeProfileId: candidate.activeProfileId,
      profiles: candidate.profiles.filter(isDappWalletExposure),
      createdAt: candidate.createdAt,
      updatedAt: candidate.updatedAt,
      passcodeInitialized: true,
      passcodeMode: candidate.passcodeMode,
      passcodeSetupConfirmedAt: candidate.passcodeSetupConfirmedAt
    };
  }
  function requireExtensionPasscodeMode(passcode) {
    const normalized = passcode.trim();
    if (normalized.length >= 8) {
      return "user";
    }
    throw new Error("Choose a wallet password with at least 8 characters.");
  }
  function isDappWalletExposure(value) {
    if (typeof value !== "object" || value === null) {
      return false;
    }
    const candidate = value;
    return typeof candidate.profileId === "string" && typeof candidate.name === "string" && typeof candidate.account === "string" && (candidate.chainFamily === "evm" || candidate.chainFamily === "solana" || candidate.chainFamily === "tron" || candidate.chainFamily === "utxo" || candidate.chainFamily === "ton") && Array.isArray(candidate.chainIds) && typeof candidate.selected === "boolean";
  }

  // src/background/walletconnect.ts
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@walletconnect+core@2.23.9__043c379b645642770f5431a114aef6a5/node_modules/@walletconnect/core/dist/index.js
  init_node_compat_inject();
  var import_events7 = __toESM(require_events(), 1);

  // ../../node_modules/.pnpm/@walletconnect+heartbeat@1.2.2/node_modules/@walletconnect/heartbeat/dist/index.es.js
  init_node_compat_inject();
  var import_events = __toESM(require_events());
  var import_time = __toESM(require_cjs());

  // ../../node_modules/.pnpm/@walletconnect+events@1.0.1/node_modules/@walletconnect/events/dist/esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@walletconnect+events@1.0.1/node_modules/@walletconnect/events/dist/esm/events.js
  init_node_compat_inject();
  var IEvents = class {
  };

  // ../../node_modules/.pnpm/@walletconnect+heartbeat@1.2.2/node_modules/@walletconnect/heartbeat/dist/index.es.js
  var n = class extends IEvents {
    constructor(e2) {
      super();
    }
  };
  var s = import_time.FIVE_SECONDS;
  var r = { pulse: "heartbeat_pulse" };
  var i = class _i extends n {
    constructor(e2) {
      super(e2), this.events = new import_events.EventEmitter(), this.interval = s, this.interval = e2?.interval || s;
    }
    static async init(e2) {
      const t = new _i(e2);
      return await t.init(), t;
    }
    async init() {
      await this.initialize();
    }
    stop() {
      clearInterval(this.intervalRef);
    }
    on(e2, t) {
      this.events.on(e2, t);
    }
    once(e2, t) {
      this.events.once(e2, t);
    }
    off(e2, t) {
      this.events.off(e2, t);
    }
    removeListener(e2, t) {
      this.events.removeListener(e2, t);
    }
    async initialize() {
      this.intervalRef = setInterval(() => this.pulse(), (0, import_time.toMiliseconds)(this.interval));
    }
    pulse() {
      this.events.emit(r.pulse);
    }
  };

  // ../../node_modules/.pnpm/@walletconnect+keyvaluestorage@1.1.1/node_modules/@walletconnect/keyvaluestorage/dist/index.es.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/unstorage@1.17.5_idb-keyval@6.2.5/node_modules/unstorage/dist/index.mjs
  init_node_compat_inject();

  // ../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs
  init_node_compat_inject();
  var suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
  var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
  var JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
  function jsonParseTransform(key2, value) {
    if (key2 === "__proto__" || key2 === "constructor" && value && typeof value === "object" && "prototype" in value) {
      warnKeyDropped(key2);
      return;
    }
    return value;
  }
  function warnKeyDropped(key2) {
    console.warn(`[destr] Dropping "${key2}" key to prevent prototype pollution.`);
  }
  function destr(value, options = {}) {
    if (typeof value !== "string") {
      return value;
    }
    if (value[0] === '"' && value[value.length - 1] === '"' && value.indexOf("\\") === -1) {
      return value.slice(1, -1);
    }
    const _value = value.trim();
    if (_value.length <= 9) {
      switch (_value.toLowerCase()) {
        case "true": {
          return true;
        }
        case "false": {
          return false;
        }
        case "undefined": {
          return void 0;
        }
        case "null": {
          return null;
        }
        case "nan": {
          return Number.NaN;
        }
        case "infinity": {
          return Number.POSITIVE_INFINITY;
        }
        case "-infinity": {
          return Number.NEGATIVE_INFINITY;
        }
      }
    }
    if (!JsonSigRx.test(value)) {
      if (options.strict) {
        throw new SyntaxError("[destr] Invalid JSON");
      }
      return value;
    }
    try {
      if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {
        if (options.strict) {
          throw new Error("[destr] Possible prototype pollution");
        }
        return JSON.parse(value, jsonParseTransform);
      }
      return JSON.parse(value);
    } catch (error51) {
      if (options.strict) {
        throw error51;
      }
      return value;
    }
  }

  // ../../node_modules/.pnpm/unstorage@1.17.5_idb-keyval@6.2.5/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs
  init_node_compat_inject();
  function wrapToPromise(value) {
    if (!value || typeof value.then !== "function") {
      return Promise.resolve(value);
    }
    return value;
  }
  function asyncCall(function_, ...arguments_) {
    try {
      return wrapToPromise(function_(...arguments_));
    } catch (error51) {
      return Promise.reject(error51);
    }
  }
  function isPrimitive(value) {
    const type2 = typeof value;
    return value === null || type2 !== "object" && type2 !== "function";
  }
  function isPureObject(value) {
    const proto = Object.getPrototypeOf(value);
    return !proto || proto.isPrototypeOf(Object);
  }
  function stringify4(value) {
    if (isPrimitive(value)) {
      return String(value);
    }
    if (isPureObject(value) || Array.isArray(value)) {
      return JSON.stringify(value);
    }
    if (typeof value.toJSON === "function") {
      return stringify4(value.toJSON());
    }
    throw new Error("[unstorage] Cannot stringify value!");
  }
  var BASE64_PREFIX = "base64:";
  function serializeRaw(value) {
    if (typeof value === "string") {
      return value;
    }
    return BASE64_PREFIX + base64Encode(value);
  }
  function deserializeRaw(value) {
    if (typeof value !== "string") {
      return value;
    }
    if (!value.startsWith(BASE64_PREFIX)) {
      return value;
    }
    return base64Decode(value.slice(BASE64_PREFIX.length));
  }
  function base64Decode(input) {
    if (globalThis.Buffer) {
      return Buffer2.from(input, "base64");
    }
    return Uint8Array.from(
      globalThis.atob(input),
      (c7) => c7.codePointAt(0)
    );
  }
  function base64Encode(input) {
    if (globalThis.Buffer) {
      return Buffer2.from(input).toString("base64");
    }
    return globalThis.btoa(String.fromCodePoint(...input));
  }
  function normalizeKey(key2) {
    if (!key2) {
      return "";
    }
    return key2.split("?")[0]?.replace(/[/\\]/g, ":").replace(/:+/g, ":").replace(/^:|:$/g, "") || "";
  }
  function joinKeys(...keys2) {
    return normalizeKey(keys2.join(":"));
  }
  function normalizeBaseKey(base4) {
    base4 = normalizeKey(base4);
    return base4 ? base4 + ":" : "";
  }
  function filterKeyByDepth(key2, depth) {
    if (depth === void 0) {
      return true;
    }
    let substrCount = 0;
    let index2 = key2.indexOf(":");
    while (index2 > -1) {
      substrCount++;
      index2 = key2.indexOf(":", index2 + 1);
    }
    return substrCount <= depth;
  }
  function filterKeyByBase(key2, base4) {
    if (base4) {
      return key2.startsWith(base4) && key2[key2.length - 1] !== "$";
    }
    return key2[key2.length - 1] !== "$";
  }

  // ../../node_modules/.pnpm/unstorage@1.17.5_idb-keyval@6.2.5/node_modules/unstorage/dist/index.mjs
  function defineDriver(factory) {
    return factory;
  }
  var DRIVER_NAME = "memory";
  var memory = defineDriver(() => {
    const data = /* @__PURE__ */ new Map();
    return {
      name: DRIVER_NAME,
      getInstance: () => data,
      hasItem(key2) {
        return data.has(key2);
      },
      getItem(key2) {
        return data.get(key2) ?? null;
      },
      getItemRaw(key2) {
        return data.get(key2) ?? null;
      },
      setItem(key2, value) {
        data.set(key2, value);
      },
      setItemRaw(key2, value) {
        data.set(key2, value);
      },
      removeItem(key2) {
        data.delete(key2);
      },
      getKeys() {
        return [...data.keys()];
      },
      clear() {
        data.clear();
      },
      dispose() {
        data.clear();
      }
    };
  });
  function createStorage(options = {}) {
    const context = {
      mounts: { "": options.driver || memory() },
      mountpoints: [""],
      watching: false,
      watchListeners: [],
      unwatch: {}
    };
    const getMount = (key2) => {
      for (const base4 of context.mountpoints) {
        if (key2.startsWith(base4)) {
          return {
            base: base4,
            relativeKey: key2.slice(base4.length),
            driver: context.mounts[base4]
          };
        }
      }
      return {
        base: "",
        relativeKey: key2,
        driver: context.mounts[""]
      };
    };
    const getMounts = (base4, includeParent) => {
      return context.mountpoints.filter(
        (mountpoint) => mountpoint.startsWith(base4) || includeParent && base4.startsWith(mountpoint)
      ).map((mountpoint) => ({
        relativeBase: base4.length > mountpoint.length ? base4.slice(mountpoint.length) : void 0,
        mountpoint,
        driver: context.mounts[mountpoint]
      }));
    };
    const onChange = (event, key2) => {
      if (!context.watching) {
        return;
      }
      key2 = normalizeKey(key2);
      for (const listener of context.watchListeners) {
        listener(event, key2);
      }
    };
    const startWatch = async () => {
      if (context.watching) {
        return;
      }
      context.watching = true;
      for (const mountpoint in context.mounts) {
        context.unwatch[mountpoint] = await watch(
          context.mounts[mountpoint],
          onChange,
          mountpoint
        );
      }
    };
    const stopWatch = async () => {
      if (!context.watching) {
        return;
      }
      for (const mountpoint in context.unwatch) {
        await context.unwatch[mountpoint]();
      }
      context.unwatch = {};
      context.watching = false;
    };
    const runBatch = (items, commonOptions, cb) => {
      const batches = /* @__PURE__ */ new Map();
      const getBatch = (mount) => {
        let batch = batches.get(mount.base);
        if (!batch) {
          batch = {
            driver: mount.driver,
            base: mount.base,
            items: []
          };
          batches.set(mount.base, batch);
        }
        return batch;
      };
      for (const item of items) {
        const isStringItem = typeof item === "string";
        const key2 = normalizeKey(isStringItem ? item : item.key);
        const value = isStringItem ? void 0 : item.value;
        const options2 = isStringItem || !item.options ? commonOptions : { ...commonOptions, ...item.options };
        const mount = getMount(key2);
        getBatch(mount).items.push({
          key: key2,
          value,
          relativeKey: mount.relativeKey,
          options: options2
        });
      }
      return Promise.all([...batches.values()].map((batch) => cb(batch))).then(
        (r3) => r3.flat()
      );
    };
    const storage = {
      // Item
      hasItem(key2, opts = {}) {
        key2 = normalizeKey(key2);
        const { relativeKey, driver } = getMount(key2);
        return asyncCall(driver.hasItem, relativeKey, opts);
      },
      getItem(key2, opts = {}) {
        key2 = normalizeKey(key2);
        const { relativeKey, driver } = getMount(key2);
        return asyncCall(driver.getItem, relativeKey, opts).then(
          (value) => destr(value)
        );
      },
      getItems(items, commonOptions = {}) {
        return runBatch(items, commonOptions, (batch) => {
          if (batch.driver.getItems) {
            return asyncCall(
              batch.driver.getItems,
              batch.items.map((item) => ({
                key: item.relativeKey,
                options: item.options
              })),
              commonOptions
            ).then(
              (r3) => r3.map((item) => ({
                key: joinKeys(batch.base, item.key),
                value: destr(item.value)
              }))
            );
          }
          return Promise.all(
            batch.items.map((item) => {
              return asyncCall(
                batch.driver.getItem,
                item.relativeKey,
                item.options
              ).then((value) => ({
                key: item.key,
                value: destr(value)
              }));
            })
          );
        });
      },
      getItemRaw(key2, opts = {}) {
        key2 = normalizeKey(key2);
        const { relativeKey, driver } = getMount(key2);
        if (driver.getItemRaw) {
          return asyncCall(driver.getItemRaw, relativeKey, opts);
        }
        return asyncCall(driver.getItem, relativeKey, opts).then(
          (value) => deserializeRaw(value)
        );
      },
      async setItem(key2, value, opts = {}) {
        if (value === void 0) {
          return storage.removeItem(key2);
        }
        key2 = normalizeKey(key2);
        const { relativeKey, driver } = getMount(key2);
        if (!driver.setItem) {
          return;
        }
        await asyncCall(driver.setItem, relativeKey, stringify4(value), opts);
        if (!driver.watch) {
          onChange("update", key2);
        }
      },
      async setItems(items, commonOptions) {
        await runBatch(items, commonOptions, async (batch) => {
          if (batch.driver.setItems) {
            return asyncCall(
              batch.driver.setItems,
              batch.items.map((item) => ({
                key: item.relativeKey,
                value: stringify4(item.value),
                options: item.options
              })),
              commonOptions
            );
          }
          if (!batch.driver.setItem) {
            return;
          }
          await Promise.all(
            batch.items.map((item) => {
              return asyncCall(
                batch.driver.setItem,
                item.relativeKey,
                stringify4(item.value),
                item.options
              );
            })
          );
        });
      },
      async setItemRaw(key2, value, opts = {}) {
        if (value === void 0) {
          return storage.removeItem(key2, opts);
        }
        key2 = normalizeKey(key2);
        const { relativeKey, driver } = getMount(key2);
        if (driver.setItemRaw) {
          await asyncCall(driver.setItemRaw, relativeKey, value, opts);
        } else if (driver.setItem) {
          await asyncCall(driver.setItem, relativeKey, serializeRaw(value), opts);
        } else {
          return;
        }
        if (!driver.watch) {
          onChange("update", key2);
        }
      },
      async removeItem(key2, opts = {}) {
        if (typeof opts === "boolean") {
          opts = { removeMeta: opts };
        }
        key2 = normalizeKey(key2);
        const { relativeKey, driver } = getMount(key2);
        if (!driver.removeItem) {
          return;
        }
        await asyncCall(driver.removeItem, relativeKey, opts);
        if (opts.removeMeta || opts.removeMata) {
          await asyncCall(driver.removeItem, relativeKey + "$", opts);
        }
        if (!driver.watch) {
          onChange("remove", key2);
        }
      },
      // Meta
      async getMeta(key2, opts = {}) {
        if (typeof opts === "boolean") {
          opts = { nativeOnly: opts };
        }
        key2 = normalizeKey(key2);
        const { relativeKey, driver } = getMount(key2);
        const meta3 = /* @__PURE__ */ Object.create(null);
        if (driver.getMeta) {
          Object.assign(meta3, await asyncCall(driver.getMeta, relativeKey, opts));
        }
        if (!opts.nativeOnly) {
          const value = await asyncCall(
            driver.getItem,
            relativeKey + "$",
            opts
          ).then((value_) => destr(value_));
          if (value && typeof value === "object") {
            if (typeof value.atime === "string") {
              value.atime = new Date(value.atime);
            }
            if (typeof value.mtime === "string") {
              value.mtime = new Date(value.mtime);
            }
            Object.assign(meta3, value);
          }
        }
        return meta3;
      },
      setMeta(key2, value, opts = {}) {
        return this.setItem(key2 + "$", value, opts);
      },
      removeMeta(key2, opts = {}) {
        return this.removeItem(key2 + "$", opts);
      },
      // Keys
      async getKeys(base4, opts = {}) {
        base4 = normalizeBaseKey(base4);
        const mounts = getMounts(base4, true);
        let maskedMounts = [];
        const allKeys = [];
        let allMountsSupportMaxDepth = true;
        for (const mount of mounts) {
          if (!mount.driver.flags?.maxDepth) {
            allMountsSupportMaxDepth = false;
          }
          const rawKeys = await asyncCall(
            mount.driver.getKeys,
            mount.relativeBase,
            opts
          );
          for (const key2 of rawKeys) {
            const fullKey = mount.mountpoint + normalizeKey(key2);
            if (!maskedMounts.some((p7) => fullKey.startsWith(p7))) {
              allKeys.push(fullKey);
            }
          }
          maskedMounts = [
            mount.mountpoint,
            ...maskedMounts.filter((p7) => !p7.startsWith(mount.mountpoint))
          ];
        }
        const shouldFilterByDepth = opts.maxDepth !== void 0 && !allMountsSupportMaxDepth;
        return allKeys.filter(
          (key2) => (!shouldFilterByDepth || filterKeyByDepth(key2, opts.maxDepth)) && filterKeyByBase(key2, base4)
        );
      },
      // Utils
      async clear(base4, opts = {}) {
        base4 = normalizeBaseKey(base4);
        await Promise.all(
          getMounts(base4, false).map(async (m3) => {
            if (m3.driver.clear) {
              return asyncCall(m3.driver.clear, m3.relativeBase, opts);
            }
            if (m3.driver.removeItem) {
              const keys2 = await m3.driver.getKeys(m3.relativeBase || "", opts);
              return Promise.all(
                keys2.map((key2) => m3.driver.removeItem(key2, opts))
              );
            }
          })
        );
      },
      async dispose() {
        await Promise.all(
          Object.values(context.mounts).map((driver) => dispose(driver))
        );
      },
      async watch(callback) {
        await startWatch();
        context.watchListeners.push(callback);
        return async () => {
          context.watchListeners = context.watchListeners.filter(
            (listener) => listener !== callback
          );
          if (context.watchListeners.length === 0) {
            await stopWatch();
          }
        };
      },
      async unwatch() {
        context.watchListeners = [];
        await stopWatch();
      },
      // Mount
      mount(base4, driver) {
        base4 = normalizeBaseKey(base4);
        if (base4 && context.mounts[base4]) {
          throw new Error(`already mounted at ${base4}`);
        }
        if (base4) {
          context.mountpoints.push(base4);
          context.mountpoints.sort((a5, b9) => b9.length - a5.length);
        }
        context.mounts[base4] = driver;
        if (context.watching) {
          Promise.resolve(watch(driver, onChange, base4)).then((unwatcher) => {
            context.unwatch[base4] = unwatcher;
          }).catch(console.error);
        }
        return storage;
      },
      async unmount(base4, _dispose = true) {
        base4 = normalizeBaseKey(base4);
        if (!base4 || !context.mounts[base4]) {
          return;
        }
        if (context.watching && base4 in context.unwatch) {
          context.unwatch[base4]?.();
          delete context.unwatch[base4];
        }
        if (_dispose) {
          await dispose(context.mounts[base4]);
        }
        context.mountpoints = context.mountpoints.filter((key2) => key2 !== base4);
        delete context.mounts[base4];
      },
      getMount(key2 = "") {
        key2 = normalizeKey(key2) + ":";
        const m3 = getMount(key2);
        return {
          driver: m3.driver,
          base: m3.base
        };
      },
      getMounts(base4 = "", opts = {}) {
        base4 = normalizeKey(base4);
        const mounts = getMounts(base4, opts.parents);
        return mounts.map((m3) => ({
          driver: m3.driver,
          base: m3.mountpoint
        }));
      },
      // Aliases
      keys: (base4, opts = {}) => storage.getKeys(base4, opts),
      get: (key2, opts = {}) => storage.getItem(key2, opts),
      set: (key2, value, opts = {}) => storage.setItem(key2, value, opts),
      has: (key2, opts = {}) => storage.hasItem(key2, opts),
      del: (key2, opts = {}) => storage.removeItem(key2, opts),
      remove: (key2, opts = {}) => storage.removeItem(key2, opts)
    };
    return storage;
  }
  function watch(driver, onChange, base4) {
    return driver.watch ? driver.watch((event, key2) => onChange(event, base4 + key2)) : () => {
    };
  }
  async function dispose(driver) {
    if (typeof driver.dispose === "function") {
      await asyncCall(driver.dispose);
    }
  }

  // ../../node_modules/.pnpm/idb-keyval@6.2.5/node_modules/idb-keyval/dist/index.js
  init_node_compat_inject();
  function promisifyRequest(request) {
    return new Promise((resolve, reject2) => {
      request.oncomplete = request.onsuccess = () => resolve(request.result);
      request.onabort = request.onerror = () => reject2(request.error);
    });
  }
  function createStore(dbName, storeName) {
    let dbp;
    const getDB = () => {
      if (dbp)
        return dbp;
      const request = indexedDB.open(dbName);
      request.onupgradeneeded = () => request.result.createObjectStore(storeName);
      dbp = promisifyRequest(request);
      dbp.then((db) => {
        db.onclose = () => dbp = void 0;
      }, () => {
      });
      return dbp;
    };
    return (txMode, callback) => getDB().then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));
  }
  var defaultGetStoreFunc;
  function defaultGetStore() {
    if (!defaultGetStoreFunc) {
      defaultGetStoreFunc = createStore("keyval-store", "keyval");
    }
    return defaultGetStoreFunc;
  }
  function get(key2, customStore = defaultGetStore()) {
    return customStore("readonly", (store) => promisifyRequest(store.get(key2)));
  }
  function set2(key2, value, customStore = defaultGetStore()) {
    return customStore("readwrite", (store) => {
      store.put(value, key2);
      return promisifyRequest(store.transaction);
    });
  }
  function del(key2, customStore = defaultGetStore()) {
    return customStore("readwrite", (store) => {
      store.delete(key2);
      return promisifyRequest(store.transaction);
    });
  }
  function clear(customStore = defaultGetStore()) {
    return customStore("readwrite", (store) => {
      store.clear();
      return promisifyRequest(store.transaction);
    });
  }
  function eachCursor(store, callback) {
    store.openCursor().onsuccess = function() {
      if (!this.result)
        return;
      callback(this.result);
      this.result.continue();
    };
    return promisifyRequest(store.transaction);
  }
  function keys(customStore = defaultGetStore()) {
    return customStore("readonly", (store) => {
      if (store.getAllKeys) {
        return promisifyRequest(store.getAllKeys());
      }
      const items = [];
      return eachCursor(store, (cursor) => items.push(cursor.key)).then(() => items);
    });
  }

  // ../../node_modules/.pnpm/@walletconnect+safe-json@1.0.2/node_modules/@walletconnect/safe-json/dist/esm/index.js
  init_node_compat_inject();
  var JSONStringify = (data) => JSON.stringify(data, (_6, value) => typeof value === "bigint" ? value.toString() + "n" : value);
  var JSONParse = (json2) => {
    const numbersBiggerThanMaxInt = /([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g;
    const serializedData = json2.replace(numbersBiggerThanMaxInt, '$1"$2n"$3');
    return JSON.parse(serializedData, (_6, value) => {
      const isCustomFormatBigInt = typeof value === "string" && value.match(/^\d+n$/);
      if (isCustomFormatBigInt)
        return BigInt(value.substring(0, value.length - 1));
      return value;
    });
  };
  function safeJsonParse(value) {
    if (typeof value !== "string") {
      throw new Error(`Cannot safe json parse value of type ${typeof value}`);
    }
    try {
      return JSONParse(value);
    } catch (_a4) {
      return value;
    }
  }
  function safeJsonStringify(value) {
    return typeof value === "string" ? value : JSONStringify(value) || "";
  }

  // ../../node_modules/.pnpm/@walletconnect+keyvaluestorage@1.1.1/node_modules/@walletconnect/keyvaluestorage/dist/index.es.js
  var x = "idb-keyval";
  var z2 = (i5 = {}) => {
    const t = i5.base && i5.base.length > 0 ? `${i5.base}:` : "", e2 = (s3) => t + s3;
    let n6;
    return i5.dbName && i5.storeName && (n6 = createStore(i5.dbName, i5.storeName)), { name: x, options: i5, async hasItem(s3) {
      return !(typeof await get(e2(s3), n6) > "u");
    }, async getItem(s3) {
      return await get(e2(s3), n6) ?? null;
    }, setItem(s3, a5) {
      return set2(e2(s3), a5, n6);
    }, removeItem(s3) {
      return del(e2(s3), n6);
    }, getKeys() {
      return keys(n6);
    }, clear() {
      return clear(n6);
    } };
  };
  var D = "WALLET_CONNECT_V2_INDEXED_DB";
  var E = "keyvaluestorage";
  var _ = class {
    constructor() {
      this.indexedDb = createStorage({ driver: z2({ dbName: D, storeName: E }) });
    }
    async getKeys() {
      return this.indexedDb.getKeys();
    }
    async getEntries() {
      return (await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((t) => [t.key, t.value]);
    }
    async getItem(t) {
      const e2 = await this.indexedDb.getItem(t);
      if (e2 !== null) return e2;
    }
    async setItem(t, e2) {
      await this.indexedDb.setItem(t, safeJsonStringify(e2));
    }
    async removeItem(t) {
      await this.indexedDb.removeItem(t);
    }
  };
  var l2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
  var c = { exports: {} };
  (function() {
    let i5;
    function t() {
    }
    i5 = t, i5.prototype.getItem = function(e2) {
      return this.hasOwnProperty(e2) ? String(this[e2]) : null;
    }, i5.prototype.setItem = function(e2, n6) {
      this[e2] = String(n6);
    }, i5.prototype.removeItem = function(e2) {
      delete this[e2];
    }, i5.prototype.clear = function() {
      const e2 = this;
      Object.keys(e2).forEach(function(n6) {
        e2[n6] = void 0, delete e2[n6];
      });
    }, i5.prototype.key = function(e2) {
      return e2 = e2 || 0, Object.keys(this)[e2];
    }, i5.prototype.__defineGetter__("length", function() {
      return Object.keys(this).length;
    }), typeof l2 < "u" && l2.localStorage ? c.exports = l2.localStorage : typeof window < "u" && window.localStorage ? c.exports = window.localStorage : c.exports = new t();
  })();
  function k(i5) {
    var t;
    return [i5[0], safeJsonParse((t = i5[1]) != null ? t : "")];
  }
  var K = class {
    constructor() {
      this.localStorage = c.exports;
    }
    async getKeys() {
      return Object.keys(this.localStorage);
    }
    async getEntries() {
      return Object.entries(this.localStorage).map(k);
    }
    async getItem(t) {
      const e2 = this.localStorage.getItem(t);
      if (e2 !== null) return safeJsonParse(e2);
    }
    async setItem(t, e2) {
      this.localStorage.setItem(t, safeJsonStringify(e2));
    }
    async removeItem(t) {
      this.localStorage.removeItem(t);
    }
  };
  var N2 = "wc_storage_version";
  var y = 1;
  var O = async (i5, t, e2) => {
    const n6 = N2, s3 = await t.getItem(n6);
    if (s3 && s3 >= y) {
      e2(t);
      return;
    }
    const a5 = await i5.getKeys();
    if (!a5.length) {
      e2(t);
      return;
    }
    const m3 = [];
    for (; a5.length; ) {
      const r3 = a5.shift();
      if (!r3) continue;
      const o5 = r3.toLowerCase();
      if (o5.includes("wc@") || o5.includes("walletconnect") || o5.includes("wc_") || o5.includes("wallet_connect")) {
        const f7 = await i5.getItem(r3);
        await t.setItem(r3, f7), m3.push(r3);
      }
    }
    await t.setItem(n6, y), e2(t), j(i5, m3);
  };
  var j = async (i5, t) => {
    t.length && t.forEach(async (e2) => {
      await i5.removeItem(e2);
    });
  };
  var h2 = class {
    constructor() {
      this.initialized = false, this.setInitialized = (e2) => {
        this.storage = e2, this.initialized = true;
      };
      const t = new K();
      this.storage = t;
      try {
        const e2 = new _();
        O(t, e2, this.setInitialized);
      } catch {
        this.initialized = true;
      }
    }
    async getKeys() {
      return await this.initialize(), this.storage.getKeys();
    }
    async getEntries() {
      return await this.initialize(), this.storage.getEntries();
    }
    async getItem(t) {
      return await this.initialize(), this.storage.getItem(t);
    }
    async setItem(t, e2) {
      return await this.initialize(), this.storage.setItem(t, e2);
    }
    async removeItem(t) {
      return await this.initialize(), this.storage.removeItem(t);
    }
    async initialize() {
      this.initialized || await new Promise((t) => {
        const e2 = setInterval(() => {
          this.initialized && (clearInterval(e2), t());
        }, 20);
      });
    }
  };

  // ../../node_modules/.pnpm/@walletconnect+logger@3.0.2/node_modules/@walletconnect/logger/dist/index.es.js
  init_node_compat_inject();
  var b = { exports: {} };
  function se(e2) {
    try {
      return JSON.stringify(e2);
    } catch {
      return '"[Circular]"';
    }
  }
  var ie = oe;
  function oe(e2, t, r3) {
    var s3 = r3 && r3.stringify || se, i5 = 1;
    if (typeof e2 == "object" && e2 !== null) {
      var f7 = t.length + i5;
      if (f7 === 1) return e2;
      var h8 = new Array(f7);
      h8[0] = s3(e2);
      for (var u4 = 1; u4 < f7; u4++) h8[u4] = s3(t[u4]);
      return h8.join(" ");
    }
    if (typeof e2 != "string") return e2;
    var c7 = t.length;
    if (c7 === 0) return e2;
    for (var n6 = "", o5 = 1 - i5, l6 = -1, L6 = e2 && e2.length || 0, a5 = 0; a5 < L6; ) {
      if (e2.charCodeAt(a5) === 37 && a5 + 1 < L6) {
        switch (l6 = l6 > -1 ? l6 : 0, e2.charCodeAt(a5 + 1)) {
          case 100:
          case 102:
            if (o5 >= c7 || t[o5] == null) break;
            l6 < a5 && (n6 += e2.slice(l6, a5)), n6 += Number(t[o5]), l6 = a5 + 2, a5++;
            break;
          case 105:
            if (o5 >= c7 || t[o5] == null) break;
            l6 < a5 && (n6 += e2.slice(l6, a5)), n6 += Math.floor(Number(t[o5])), l6 = a5 + 2, a5++;
            break;
          case 79:
          case 111:
          case 106:
            if (o5 >= c7 || t[o5] === void 0) break;
            l6 < a5 && (n6 += e2.slice(l6, a5));
            var _6 = typeof t[o5];
            if (_6 === "string") {
              n6 += "'" + t[o5] + "'", l6 = a5 + 2, a5++;
              break;
            }
            if (_6 === "function") {
              n6 += t[o5].name || "<anonymous>", l6 = a5 + 2, a5++;
              break;
            }
            n6 += s3(t[o5]), l6 = a5 + 2, a5++;
            break;
          case 115:
            if (o5 >= c7) break;
            l6 < a5 && (n6 += e2.slice(l6, a5)), n6 += String(t[o5]), l6 = a5 + 2, a5++;
            break;
          case 37:
            l6 < a5 && (n6 += e2.slice(l6, a5)), n6 += "%", l6 = a5 + 2, a5++, o5--;
            break;
        }
        ++o5;
      }
      ++a5;
    }
    return l6 === -1 ? e2 : (l6 < L6 && (n6 += e2.slice(l6)), n6);
  }
  var G2 = ie;
  b.exports = v;
  var E2 = Le().console || {};
  var le = { mapHttpRequest: T, mapHttpResponse: T, wrapRequestSerializer: $, wrapResponseSerializer: $, wrapErrorSerializer: $, req: T, res: T, err: U, errWithCause: U };
  function m(e2, t) {
    return e2 === "silent" ? 1 / 0 : t.levels.values[e2];
  }
  var A = /* @__PURE__ */ Symbol("pino.logFuncs");
  var P2 = /* @__PURE__ */ Symbol("pino.hierarchy");
  var ae = { error: "log", fatal: "error", warn: "error", info: "log", debug: "log", trace: "log" };
  function R(e2, t) {
    const r3 = { logger: t, parent: e2[P2] };
    t[P2] = r3;
  }
  function ue(e2, t, r3) {
    const s3 = {};
    t.forEach((i5) => {
      s3[i5] = r3[i5] ? r3[i5] : E2[i5] || E2[ae[i5] || "log"] || z3;
    }), e2[A] = s3;
  }
  function ce(e2, t) {
    return Array.isArray(e2) ? e2.filter(function(s3) {
      return s3 !== "!stdSerializers.err";
    }) : e2 === true ? Object.keys(t) : false;
  }
  function v(e2) {
    e2 = e2 || {}, e2.browser = e2.browser || {};
    const t = e2.browser.transmit;
    if (t && typeof t.send != "function") throw Error("pino: transmit option must have a send function");
    const r3 = e2.browser.write || E2;
    e2.browser.write && (e2.browser.asObject = true);
    const s3 = e2.serializers || {}, i5 = ce(e2.browser.serialize, s3);
    let f7 = e2.browser.serialize;
    Array.isArray(e2.browser.serialize) && e2.browser.serialize.indexOf("!stdSerializers.err") > -1 && (f7 = false);
    const h8 = Object.keys(e2.customLevels || {}), u4 = ["error", "fatal", "warn", "info", "debug", "trace"].concat(h8);
    typeof r3 == "function" && u4.forEach(function(g8) {
      r3[g8] = r3;
    }), (e2.enabled === false || e2.browser.disabled) && (e2.level = "silent");
    const c7 = e2.level || "info", n6 = Object.create(r3);
    n6.log || (n6.log = z3), ue(n6, u4, r3), R({}, n6), Object.defineProperty(n6, "levelVal", { get: l6 }), Object.defineProperty(n6, "level", { get: L6, set: a5 });
    const o5 = { transmit: t, serialize: i5, asObject: e2.browser.asObject, asObjectBindingsOnly: e2.browser.asObjectBindingsOnly, formatters: e2.browser.formatters, levels: u4, timestamp: ye(e2), messageKey: e2.messageKey || "msg", onChild: e2.onChild || z3 };
    n6.levels = fe(e2), n6.level = c7, n6.isLevelEnabled = function(g8) {
      return this.levels.values[g8] ? this.levels.values[g8] >= this.levels.values[this.level] : false;
    }, n6.setMaxListeners = n6.getMaxListeners = n6.emit = n6.addListener = n6.on = n6.prependListener = n6.once = n6.prependOnceListener = n6.removeListener = n6.removeAllListeners = n6.listeners = n6.listenerCount = n6.eventNames = n6.write = n6.flush = z3, n6.serializers = s3, n6._serialize = i5, n6._stdErrSerialize = f7, n6.child = function(...g8) {
      return _6.call(this, o5, ...g8);
    }, t && (n6._logEvent = N3());
    function l6() {
      return m(this.level, this);
    }
    function L6() {
      return this._level;
    }
    function a5(g8) {
      if (g8 !== "silent" && !this.levels.values[g8]) throw Error("unknown level " + g8);
      this._level = g8, O2(this, o5, n6, "error"), O2(this, o5, n6, "fatal"), O2(this, o5, n6, "warn"), O2(this, o5, n6, "info"), O2(this, o5, n6, "debug"), O2(this, o5, n6, "trace"), h8.forEach((d6) => {
        O2(this, o5, n6, d6);
      });
    }
    function _6(g8, d6, j6) {
      if (!d6) throw new Error("missing bindings for child Pino");
      j6 = j6 || {}, i5 && d6.serializers && (j6.serializers = d6.serializers);
      const F6 = j6.serializers;
      if (i5 && F6) {
        var C9 = Object.assign({}, s3, F6), M9 = e2.browser.serialize === true ? Object.keys(C9) : i5;
        delete d6.serializers, V([d6], M9, C9, this._stdErrSerialize);
      }
      function D7(I7) {
        this._childLevel = (I7._childLevel | 0) + 1, this.bindings = d6, C9 && (this.serializers = C9, this._serialize = M9), t && (this._logEvent = N3([].concat(I7._logEvent.bindings, d6)));
      }
      D7.prototype = this;
      const S10 = new D7(this);
      return R(this, S10), S10.child = function(...I7) {
        return _6.call(this, g8, ...I7);
      }, S10.level = j6.level || this.level, g8.onChild(S10), S10;
    }
    return n6;
  }
  function fe(e2) {
    const t = e2.customLevels || {}, r3 = Object.assign({}, v.levels.values, t), s3 = Object.assign({}, v.levels.labels, he(t));
    return { values: r3, labels: s3 };
  }
  function he(e2) {
    const t = {};
    return Object.keys(e2).forEach(function(r3) {
      t[e2[r3]] = r3;
    }), t;
  }
  v.levels = { values: { fatal: 60, error: 50, warn: 40, info: 30, debug: 20, trace: 10 }, labels: { 10: "trace", 20: "debug", 30: "info", 40: "warn", 50: "error", 60: "fatal" } }, v.stdSerializers = le, v.stdTimeFunctions = Object.assign({}, { nullTime: X, epochTime: Y, unixTime: pe, isoTime: we });
  function ge(e2) {
    const t = [];
    e2.bindings && t.push(e2.bindings);
    let r3 = e2[P2];
    for (; r3.parent; ) r3 = r3.parent, r3.logger.bindings && t.push(r3.logger.bindings);
    return t.reverse();
  }
  function O2(e2, t, r3, s3) {
    if (Object.defineProperty(e2, s3, { value: m(e2.level, r3) > m(s3, r3) ? z3 : r3[A][s3], writable: true, enumerable: true, configurable: true }), e2[s3] === z3) {
      if (!t.transmit) return;
      const f7 = t.transmit.level || e2.level, h8 = m(f7, r3);
      if (m(s3, r3) < h8) return;
    }
    e2[s3] = de(e2, t, r3, s3);
    const i5 = ge(e2);
    i5.length !== 0 && (e2[s3] = be(i5, e2[s3]));
  }
  function be(e2, t) {
    return function() {
      return t.apply(this, [...e2, ...arguments]);
    };
  }
  function de(e2, t, r3, s3) {
    return /* @__PURE__ */ (function(i5) {
      return function() {
        const h8 = t.timestamp(), u4 = new Array(arguments.length), c7 = Object.getPrototypeOf && Object.getPrototypeOf(this) === E2 ? E2 : this;
        for (var n6 = 0; n6 < u4.length; n6++) u4[n6] = arguments[n6];
        var o5 = false;
        if (t.serialize && (V(u4, this._serialize, this.serializers, this._stdErrSerialize), o5 = true), t.asObject || t.formatters ? i5.call(c7, ...ve(this, s3, u4, h8, t)) : i5.apply(c7, u4), t.transmit) {
          const l6 = t.transmit.level || e2._level, L6 = m(l6, r3), a5 = m(s3, r3);
          if (a5 < L6) return;
          me(this, { ts: h8, methodLevel: s3, methodValue: a5, transmitLevel: l6, transmitValue: r3.levels.values[t.transmit.level || e2._level], send: t.transmit.send, val: m(e2._level, r3) }, u4, o5);
        }
      };
    })(e2[A][s3]);
  }
  function ve(e2, t, r3, s3, i5) {
    const { level: f7, log: h8 = (l6) => l6 } = i5.formatters || {}, u4 = r3.slice();
    let c7 = u4[0];
    const n6 = {};
    let o5 = (e2._childLevel | 0) + 1;
    if (o5 < 1 && (o5 = 1), s3 && (n6.time = s3), f7) {
      const l6 = f7(t, e2.levels.values[t]);
      Object.assign(n6, l6);
    } else n6.level = e2.levels.values[t];
    if (i5.asObjectBindingsOnly) {
      if (c7 !== null && typeof c7 == "object") for (; o5-- && typeof u4[0] == "object"; ) Object.assign(n6, u4.shift());
      return [h8(n6), ...u4];
    } else {
      if (c7 !== null && typeof c7 == "object") {
        for (; o5-- && typeof u4[0] == "object"; ) Object.assign(n6, u4.shift());
        c7 = u4.length ? G2(u4.shift(), u4) : void 0;
      } else typeof c7 == "string" && (c7 = G2(u4.shift(), u4));
      return c7 !== void 0 && (n6[i5.messageKey] = c7), [h8(n6)];
    }
  }
  function V(e2, t, r3, s3) {
    for (const i5 in e2) if (s3 && e2[i5] instanceof Error) e2[i5] = v.stdSerializers.err(e2[i5]);
    else if (typeof e2[i5] == "object" && !Array.isArray(e2[i5]) && t) for (const f7 in e2[i5]) t.indexOf(f7) > -1 && f7 in r3 && (e2[i5][f7] = r3[f7](e2[i5][f7]));
  }
  function me(e2, t, r3, s3 = false) {
    const i5 = t.send, f7 = t.ts, h8 = t.methodLevel, u4 = t.methodValue, c7 = t.val, n6 = e2._logEvent.bindings;
    s3 || V(r3, e2._serialize || Object.keys(e2.serializers), e2.serializers, e2._stdErrSerialize === void 0 ? true : e2._stdErrSerialize), e2._logEvent.ts = f7, e2._logEvent.messages = r3.filter(function(o5) {
      return n6.indexOf(o5) === -1;
    }), e2._logEvent.level.label = h8, e2._logEvent.level.value = u4, i5(h8, e2._logEvent, c7), e2._logEvent = N3(n6);
  }
  function N3(e2) {
    return { ts: 0, messages: [], bindings: e2 || [], level: { label: "", value: 0 } };
  }
  function U(e2) {
    const t = { type: e2.constructor.name, msg: e2.message, stack: e2.stack };
    for (const r3 in e2) t[r3] === void 0 && (t[r3] = e2[r3]);
    return t;
  }
  function ye(e2) {
    return typeof e2.timestamp == "function" ? e2.timestamp : e2.timestamp === false ? X : Y;
  }
  function T() {
    return {};
  }
  function $(e2) {
    return e2;
  }
  function z3() {
  }
  function X() {
    return false;
  }
  function Y() {
    return Date.now();
  }
  function pe() {
    return Math.round(Date.now() / 1e3);
  }
  function we() {
    return new Date(Date.now()).toISOString();
  }
  function Le() {
    function e2(t) {
      return typeof t < "u" && t;
    }
    try {
      return typeof globalThis < "u" || Object.defineProperty(Object.prototype, "globalThis", { get: function() {
        return delete Object.prototype.globalThis, this.globalThis = this;
      }, configurable: true }), globalThis;
    } catch {
      return e2(self) || e2(window) || e2(this) || {};
    }
  }
  b.exports.default = v;
  var Oe = b.exports.pino = v;
  var Z = { level: "info" };
  var k2 = "custom_context";
  var x2 = 1e3 * 1024;
  var ze = Object.defineProperty;
  var _e = (e2, t, r3) => t in e2 ? ze(e2, t, { enumerable: true, configurable: true, writable: true, value: r3 }) : e2[t] = r3;
  var y2 = (e2, t, r3) => _e(e2, typeof t != "symbol" ? t + "" : t, r3);
  var je = class {
    constructor(t) {
      y2(this, "nodeValue"), y2(this, "sizeInBytes"), y2(this, "next"), this.nodeValue = t, this.sizeInBytes = new TextEncoder().encode(this.nodeValue).length, this.next = null;
    }
    get value() {
      return this.nodeValue;
    }
    get size() {
      return this.sizeInBytes;
    }
  };
  var q = class {
    constructor(t) {
      y2(this, "lengthInNodes"), y2(this, "sizeInBytes"), y2(this, "head"), y2(this, "tail"), y2(this, "maxSizeInBytes"), this.head = null, this.tail = null, this.lengthInNodes = 0, this.maxSizeInBytes = t, this.sizeInBytes = 0;
    }
    append(t) {
      const r3 = new je(t);
      if (r3.size > this.maxSizeInBytes) throw new Error(`[LinkedList] Value too big to insert into list: ${t} with size ${r3.size}`);
      for (; this.size + r3.size > this.maxSizeInBytes; ) this.shift();
      this.head ? (this.tail && (this.tail.next = r3), this.tail = r3) : (this.head = r3, this.tail = r3), this.lengthInNodes++, this.sizeInBytes += r3.size;
    }
    shift() {
      if (!this.head) return;
      const t = this.head;
      this.head = this.head.next, this.head || (this.tail = null), this.lengthInNodes--, this.sizeInBytes -= t.size;
    }
    toArray() {
      const t = [];
      let r3 = this.head;
      for (; r3 !== null; ) t.push(r3.value), r3 = r3.next;
      return t;
    }
    get length() {
      return this.lengthInNodes;
    }
    get size() {
      return this.sizeInBytes;
    }
    toOrderedArray() {
      return Array.from(this);
    }
    [Symbol.iterator]() {
      let t = this.head;
      return { next: () => {
        if (!t) return { done: true, value: null };
        const r3 = t.value;
        return t = t.next, { done: false, value: r3 };
      } };
    }
  };
  var Se = (e2) => JSON.stringify(e2, (t, r3) => typeof r3 == "bigint" ? r3.toString() + "n" : r3);
  function K2(e2) {
    return typeof e2 == "string" ? e2 : Se(e2) || "";
  }
  var Ee = Object.defineProperty;
  var ke = (e2, t, r3) => t in e2 ? Ee(e2, t, { enumerable: true, configurable: true, writable: true, value: r3 }) : e2[t] = r3;
  var B = (e2, t, r3) => ke(e2, typeof t != "symbol" ? t + "" : t, r3);
  var J = class {
    constructor(t, r3 = x2) {
      B(this, "logs"), B(this, "level"), B(this, "levelValue"), B(this, "MAX_LOG_SIZE_IN_BYTES"), this.level = t ?? "error", this.levelValue = b.exports.levels.values[this.level], this.MAX_LOG_SIZE_IN_BYTES = r3, this.logs = new q(this.MAX_LOG_SIZE_IN_BYTES);
    }
    forwardToConsole(t, r3) {
      r3 === b.exports.levels.values.error ? console.error(t) : r3 === b.exports.levels.values.warn ? console.warn(t) : r3 === b.exports.levels.values.debug ? console.debug(t) : r3 === b.exports.levels.values.trace ? console.trace(t) : console.log(t);
    }
    appendToLogs(t) {
      this.logs.append(K2({ timestamp: (/* @__PURE__ */ new Date()).toISOString(), log: t }));
      const r3 = typeof t == "string" ? JSON.parse(t).level : t.level;
      r3 >= this.levelValue && this.forwardToConsole(t, r3);
    }
    getLogs() {
      return this.logs;
    }
    clearLogs() {
      this.logs = new q(this.MAX_LOG_SIZE_IN_BYTES);
    }
    getLogArray() {
      return Array.from(this.logs);
    }
    logsToBlob(t) {
      const r3 = this.getLogArray();
      return r3.push(K2({ extraMetadata: t })), new Blob(r3, { type: "application/json" });
    }
  };
  var Ce = Object.defineProperty;
  var Ie = (e2, t, r3) => t in e2 ? Ce(e2, t, { enumerable: true, configurable: true, writable: true, value: r3 }) : e2[t] = r3;
  var Te = (e2, t, r3) => Ie(e2, typeof t != "symbol" ? t + "" : t, r3);
  var xe = class {
    constructor(t, r3 = x2) {
      Te(this, "baseChunkLogger"), this.baseChunkLogger = new J(t, r3);
    }
    write(t) {
      this.baseChunkLogger.appendToLogs(t);
    }
    getLogs() {
      return this.baseChunkLogger.getLogs();
    }
    clearLogs() {
      this.baseChunkLogger.clearLogs();
    }
    getLogArray() {
      return this.baseChunkLogger.getLogArray();
    }
    logsToBlob(t) {
      return this.baseChunkLogger.logsToBlob(t);
    }
    downloadLogsBlobInBrowser(t) {
      const r3 = URL.createObjectURL(this.logsToBlob(t)), s3 = document.createElement("a");
      s3.href = r3, s3.download = `walletconnect-logs-${(/* @__PURE__ */ new Date()).toISOString()}.txt`, document.body.appendChild(s3), s3.click(), document.body.removeChild(s3), URL.revokeObjectURL(r3);
    }
  };
  var Be = Object.defineProperty;
  var Ae = (e2, t, r3) => t in e2 ? Be(e2, t, { enumerable: true, configurable: true, writable: true, value: r3 }) : e2[t] = r3;
  var Pe = (e2, t, r3) => Ae(e2, typeof t != "symbol" ? t + "" : t, r3);
  var Ve = class {
    constructor(t, r3 = x2) {
      Pe(this, "baseChunkLogger"), this.baseChunkLogger = new J(t, r3);
    }
    write(t) {
      this.baseChunkLogger.appendToLogs(t);
    }
    getLogs() {
      return this.baseChunkLogger.getLogs();
    }
    clearLogs() {
      this.baseChunkLogger.clearLogs();
    }
    getLogArray() {
      return this.baseChunkLogger.getLogArray();
    }
    logsToBlob(t) {
      return this.baseChunkLogger.logsToBlob(t);
    }
  };
  var Ne = Object.defineProperty;
  var $e = Object.defineProperties;
  var Fe = Object.getOwnPropertyDescriptors;
  var H = Object.getOwnPropertySymbols;
  var Me = Object.prototype.hasOwnProperty;
  var De = Object.prototype.propertyIsEnumerable;
  var W2 = (e2, t, r3) => t in e2 ? Ne(e2, t, { enumerable: true, configurable: true, writable: true, value: r3 }) : e2[t] = r3;
  var p = (e2, t) => {
    for (var r3 in t || (t = {})) Me.call(t, r3) && W2(e2, r3, t[r3]);
    if (H) for (var r3 of H(t)) De.call(t, r3) && W2(e2, r3, t[r3]);
    return e2;
  };
  var w = (e2, t) => $e(e2, Fe(t));
  function Ge(e2) {
    return w(p({}, e2), { level: e2?.level || Z.level });
  }
  function Q(e2, t, r3 = k2) {
    return e2[r3] = t, e2;
  }
  function ee(e2, t = k2) {
    return e2[t] || "";
  }
  function te(e2, t, r3 = k2) {
    const s3 = ee(e2, r3);
    return s3.trim() ? `${s3}/${t}` : t;
  }
  function Re(e2, t, r3 = k2) {
    const s3 = te(e2, t, r3), i5 = e2.child({ context: s3 });
    return Q(i5, s3, r3);
  }
  function re(e2) {
    var t, r3;
    const s3 = new xe((t = e2.opts) == null ? void 0 : t.level, e2.maxSizeInBytes);
    return { logger: b.exports(w(p({}, e2.opts), { level: "trace", browser: w(p({}, (r3 = e2.opts) == null ? void 0 : r3.browser), { write: (i5) => s3.write(i5) }) })), chunkLoggerController: s3 };
  }
  function ne(e2) {
    var t, r3;
    const s3 = new Ve((t = e2.opts) == null ? void 0 : t.level, e2.maxSizeInBytes);
    return { logger: b.exports(w(p({}, e2.opts), { level: "trace", browser: w(p({}, (r3 = e2.opts) == null ? void 0 : r3.browser), { write: (i5) => s3.write(i5) }) }), s3), chunkLoggerController: s3 };
  }
  function Ue(e2) {
    var t;
    if (typeof e2.loggerOverride < "u" && typeof e2.loggerOverride != "string") return { logger: e2.loggerOverride, chunkLoggerController: null };
    const r3 = w(p({}, e2.opts), { level: typeof e2.loggerOverride == "string" ? e2.loggerOverride : (t = e2.opts) == null ? void 0 : t.level });
    return typeof window < "u" ? re(w(p({}, e2), { opts: r3 })) : ne(w(p({}, e2), { opts: r3 }));
  }

  // ../../node_modules/.pnpm/@walletconnect+types@2.23.9/node_modules/@walletconnect/types/dist/index.js
  init_node_compat_inject();
  var import_events4 = __toESM(require_events());
  var n2 = class extends IEvents {
    constructor(s3) {
      super(), this.opts = s3, this.protocol = "wc", this.version = 2;
    }
  };
  var h3 = class extends IEvents {
    constructor(s3, t) {
      super(), this.core = s3, this.logger = t, this.records = /* @__PURE__ */ new Map();
    }
  };
  var a2 = class {
    constructor(s3, t) {
      this.logger = s3, this.core = t;
    }
  };
  var g = class extends IEvents {
    constructor(s3, t) {
      super(), this.relayer = s3, this.logger = t;
    }
  };
  var u = class extends IEvents {
    constructor(s3) {
      super();
    }
  };
  var p2 = class {
    constructor(s3, t, e2, f7) {
      this.core = s3, this.logger = t, this.name = e2;
    }
  };
  var d = class extends IEvents {
    constructor(s3, t) {
      super(), this.relayer = s3, this.logger = t;
    }
  };
  var x3 = class extends IEvents {
    constructor(s3, t) {
      super(), this.core = s3, this.logger = t;
    }
  };
  var y3 = class {
    constructor(s3, t, e2) {
      this.core = s3, this.logger = t, this.store = e2;
    }
  };
  var v2 = class {
    constructor(s3, t) {
      this.projectId = s3, this.logger = t;
    }
  };
  var C2 = class {
    constructor(s3, t, e2) {
      this.core = s3, this.logger = t, this.telemetryEnabled = e2;
    }
  };

  // ../../node_modules/.pnpm/@walletconnect+core@2.23.9__043c379b645642770f5431a114aef6a5/node_modules/@walletconnect/core/dist/index.js
  var import_time4 = __toESM(require_cjs(), 1);

  // ../../node_modules/.pnpm/@walletconnect+relay-auth@1.1.0/node_modules/@walletconnect/relay-auth/dist/index.es.js
  init_node_compat_inject();
  var import_time2 = __toESM(require_cjs());
  function En(t) {
    return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
  }
  function fe2(t, ...e2) {
    if (!En(t)) throw new Error("Uint8Array expected");
    if (e2.length > 0 && !e2.includes(t.length)) throw new Error("Uint8Array expected of length " + e2 + ", got length=" + t.length);
  }
  function De2(t, e2 = true) {
    if (t.destroyed) throw new Error("Hash instance has been destroyed");
    if (e2 && t.finished) throw new Error("Hash#digest() has already been called");
  }
  function gn(t, e2) {
    fe2(t);
    const n6 = e2.outputLen;
    if (t.length < n6) throw new Error("digestInto() expects output buffer of length at least " + n6);
  }
  var it = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
  var _t = (t) => new DataView(t.buffer, t.byteOffset, t.byteLength);
  function yn(t) {
    if (typeof t != "string") throw new Error("utf8ToBytes expected string, got " + typeof t);
    return new Uint8Array(new TextEncoder().encode(t));
  }
  function de2(t) {
    return typeof t == "string" && (t = yn(t)), fe2(t), t;
  }
  var xn = class {
    clone() {
      return this._cloneInto();
    }
  };
  function Bn(t) {
    const e2 = (r3) => t().update(de2(r3)).digest(), n6 = t();
    return e2.outputLen = n6.outputLen, e2.blockLen = n6.blockLen, e2.create = () => t(), e2;
  }
  function he2(t = 32) {
    if (it && typeof it.getRandomValues == "function") return it.getRandomValues(new Uint8Array(t));
    if (it && typeof it.randomBytes == "function") return it.randomBytes(t);
    throw new Error("crypto.getRandomValues must be defined");
  }
  function Cn(t, e2, n6, r3) {
    if (typeof t.setBigUint64 == "function") return t.setBigUint64(e2, n6, r3);
    const o5 = BigInt(32), s3 = BigInt(4294967295), a5 = Number(n6 >> o5 & s3), u4 = Number(n6 & s3), i5 = r3 ? 4 : 0, D7 = r3 ? 0 : 4;
    t.setUint32(e2 + i5, a5, r3), t.setUint32(e2 + D7, u4, r3);
  }
  var An = class extends xn {
    constructor(e2, n6, r3, o5) {
      super(), this.blockLen = e2, this.outputLen = n6, this.padOffset = r3, this.isLE = o5, this.finished = false, this.length = 0, this.pos = 0, this.destroyed = false, this.buffer = new Uint8Array(e2), this.view = _t(this.buffer);
    }
    update(e2) {
      De2(this);
      const { view: n6, buffer: r3, blockLen: o5 } = this;
      e2 = de2(e2);
      const s3 = e2.length;
      for (let a5 = 0; a5 < s3; ) {
        const u4 = Math.min(o5 - this.pos, s3 - a5);
        if (u4 === o5) {
          const i5 = _t(e2);
          for (; o5 <= s3 - a5; a5 += o5) this.process(i5, a5);
          continue;
        }
        r3.set(e2.subarray(a5, a5 + u4), this.pos), this.pos += u4, a5 += u4, this.pos === o5 && (this.process(n6, 0), this.pos = 0);
      }
      return this.length += e2.length, this.roundClean(), this;
    }
    digestInto(e2) {
      De2(this), gn(e2, this), this.finished = true;
      const { buffer: n6, view: r3, blockLen: o5, isLE: s3 } = this;
      let { pos: a5 } = this;
      n6[a5++] = 128, this.buffer.subarray(a5).fill(0), this.padOffset > o5 - a5 && (this.process(r3, 0), a5 = 0);
      for (let l6 = a5; l6 < o5; l6++) n6[l6] = 0;
      Cn(r3, o5 - 8, BigInt(this.length * 8), s3), this.process(r3, 0);
      const u4 = _t(e2), i5 = this.outputLen;
      if (i5 % 4) throw new Error("_sha2: outputLen should be aligned to 32bit");
      const D7 = i5 / 4, c7 = this.get();
      if (D7 > c7.length) throw new Error("_sha2: outputLen bigger than state");
      for (let l6 = 0; l6 < D7; l6++) u4.setUint32(4 * l6, c7[l6], s3);
    }
    digest() {
      const { buffer: e2, outputLen: n6 } = this;
      this.digestInto(e2);
      const r3 = e2.slice(0, n6);
      return this.destroy(), r3;
    }
    _cloneInto(e2) {
      e2 || (e2 = new this.constructor()), e2.set(...this.get());
      const { blockLen: n6, buffer: r3, length: o5, finished: s3, destroyed: a5, pos: u4 } = this;
      return e2.length = o5, e2.pos = u4, e2.finished = s3, e2.destroyed = a5, o5 % n6 && e2.buffer.set(r3), e2;
    }
  };
  var wt = BigInt(2 ** 32 - 1);
  var St = BigInt(32);
  function le2(t, e2 = false) {
    return e2 ? { h: Number(t & wt), l: Number(t >> St & wt) } : { h: Number(t >> St & wt) | 0, l: Number(t & wt) | 0 };
  }
  function mn(t, e2 = false) {
    let n6 = new Uint32Array(t.length), r3 = new Uint32Array(t.length);
    for (let o5 = 0; o5 < t.length; o5++) {
      const { h: s3, l: a5 } = le2(t[o5], e2);
      [n6[o5], r3[o5]] = [s3, a5];
    }
    return [n6, r3];
  }
  var _n = (t, e2) => BigInt(t >>> 0) << St | BigInt(e2 >>> 0);
  var Sn = (t, e2, n6) => t >>> n6;
  var vn = (t, e2, n6) => t << 32 - n6 | e2 >>> n6;
  var In = (t, e2, n6) => t >>> n6 | e2 << 32 - n6;
  var Un = (t, e2, n6) => t << 32 - n6 | e2 >>> n6;
  var Tn = (t, e2, n6) => t << 64 - n6 | e2 >>> n6 - 32;
  var Fn = (t, e2, n6) => t >>> n6 - 32 | e2 << 64 - n6;
  var Nn = (t, e2) => e2;
  var Ln = (t, e2) => t;
  var On = (t, e2, n6) => t << n6 | e2 >>> 32 - n6;
  var Hn = (t, e2, n6) => e2 << n6 | t >>> 32 - n6;
  var zn = (t, e2, n6) => e2 << n6 - 32 | t >>> 64 - n6;
  var Mn = (t, e2, n6) => t << n6 - 32 | e2 >>> 64 - n6;
  function qn(t, e2, n6, r3) {
    const o5 = (e2 >>> 0) + (r3 >>> 0);
    return { h: t + n6 + (o5 / 2 ** 32 | 0) | 0, l: o5 | 0 };
  }
  var $n = (t, e2, n6) => (t >>> 0) + (e2 >>> 0) + (n6 >>> 0);
  var kn = (t, e2, n6, r3) => e2 + n6 + r3 + (t / 2 ** 32 | 0) | 0;
  var Rn = (t, e2, n6, r3) => (t >>> 0) + (e2 >>> 0) + (n6 >>> 0) + (r3 >>> 0);
  var jn = (t, e2, n6, r3, o5) => e2 + n6 + r3 + o5 + (t / 2 ** 32 | 0) | 0;
  var Zn = (t, e2, n6, r3, o5) => (t >>> 0) + (e2 >>> 0) + (n6 >>> 0) + (r3 >>> 0) + (o5 >>> 0);
  var Gn = (t, e2, n6, r3, o5, s3) => e2 + n6 + r3 + o5 + s3 + (t / 2 ** 32 | 0) | 0;
  var x4 = { fromBig: le2, split: mn, toBig: _n, shrSH: Sn, shrSL: vn, rotrSH: In, rotrSL: Un, rotrBH: Tn, rotrBL: Fn, rotr32H: Nn, rotr32L: Ln, rotlSH: On, rotlSL: Hn, rotlBH: zn, rotlBL: Mn, add: qn, add3L: $n, add3H: kn, add4L: Rn, add4H: jn, add5H: Gn, add5L: Zn };
  var [Vn, Yn] = (() => x4.split(["0x428a2f98d728ae22", "0x7137449123ef65cd", "0xb5c0fbcfec4d3b2f", "0xe9b5dba58189dbbc", "0x3956c25bf348b538", "0x59f111f1b605d019", "0x923f82a4af194f9b", "0xab1c5ed5da6d8118", "0xd807aa98a3030242", "0x12835b0145706fbe", "0x243185be4ee4b28c", "0x550c7dc3d5ffb4e2", "0x72be5d74f27b896f", "0x80deb1fe3b1696b1", "0x9bdc06a725c71235", "0xc19bf174cf692694", "0xe49b69c19ef14ad2", "0xefbe4786384f25e3", "0x0fc19dc68b8cd5b5", "0x240ca1cc77ac9c65", "0x2de92c6f592b0275", "0x4a7484aa6ea6e483", "0x5cb0a9dcbd41fbd4", "0x76f988da831153b5", "0x983e5152ee66dfab", "0xa831c66d2db43210", "0xb00327c898fb213f", "0xbf597fc7beef0ee4", "0xc6e00bf33da88fc2", "0xd5a79147930aa725", "0x06ca6351e003826f", "0x142929670a0e6e70", "0x27b70a8546d22ffc", "0x2e1b21385c26c926", "0x4d2c6dfc5ac42aed", "0x53380d139d95b3df", "0x650a73548baf63de", "0x766a0abb3c77b2a8", "0x81c2c92e47edaee6", "0x92722c851482353b", "0xa2bfe8a14cf10364", "0xa81a664bbc423001", "0xc24b8b70d0f89791", "0xc76c51a30654be30", "0xd192e819d6ef5218", "0xd69906245565a910", "0xf40e35855771202a", "0x106aa07032bbd1b8", "0x19a4c116b8d2d0c8", "0x1e376c085141ab53", "0x2748774cdf8eeb99", "0x34b0bcb5e19b48a8", "0x391c0cb3c5c95a63", "0x4ed8aa4ae3418acb", "0x5b9cca4f7763e373", "0x682e6ff3d6b2b8a3", "0x748f82ee5defb2fc", "0x78a5636f43172f60", "0x84c87814a1f0ab72", "0x8cc702081a6439ec", "0x90befffa23631e28", "0xa4506cebde82bde9", "0xbef9a3f7b2c67915", "0xc67178f2e372532b", "0xca273eceea26619c", "0xd186b8c721c0c207", "0xeada7dd6cde0eb1e", "0xf57d4f7fee6ed178", "0x06f067aa72176fba", "0x0a637dc5a2c898a6", "0x113f9804bef90dae", "0x1b710b35131c471b", "0x28db77f523047d84", "0x32caab7b40c72493", "0x3c9ebe0a15c9bebc", "0x431d67c49c100d4c", "0x4cc5d4becb3e42b6", "0x597f299cfc657e2a", "0x5fcb6fab3ad6faec", "0x6c44198c4a475817"].map((t) => BigInt(t))))();
  var P3 = new Uint32Array(80);
  var Q2 = new Uint32Array(80);
  var Jn = class extends An {
    constructor() {
      super(128, 64, 16, false), this.Ah = 1779033703, this.Al = -205731576, this.Bh = -1150833019, this.Bl = -2067093701, this.Ch = 1013904242, this.Cl = -23791573, this.Dh = -1521486534, this.Dl = 1595750129, this.Eh = 1359893119, this.El = -1377402159, this.Fh = -1694144372, this.Fl = 725511199, this.Gh = 528734635, this.Gl = -79577749, this.Hh = 1541459225, this.Hl = 327033209;
    }
    get() {
      const { Ah: e2, Al: n6, Bh: r3, Bl: o5, Ch: s3, Cl: a5, Dh: u4, Dl: i5, Eh: D7, El: c7, Fh: l6, Fl: p7, Gh: w7, Gl: h8, Hh: g8, Hl: S10 } = this;
      return [e2, n6, r3, o5, s3, a5, u4, i5, D7, c7, l6, p7, w7, h8, g8, S10];
    }
    set(e2, n6, r3, o5, s3, a5, u4, i5, D7, c7, l6, p7, w7, h8, g8, S10) {
      this.Ah = e2 | 0, this.Al = n6 | 0, this.Bh = r3 | 0, this.Bl = o5 | 0, this.Ch = s3 | 0, this.Cl = a5 | 0, this.Dh = u4 | 0, this.Dl = i5 | 0, this.Eh = D7 | 0, this.El = c7 | 0, this.Fh = l6 | 0, this.Fl = p7 | 0, this.Gh = w7 | 0, this.Gl = h8 | 0, this.Hh = g8 | 0, this.Hl = S10 | 0;
    }
    process(e2, n6) {
      for (let d6 = 0; d6 < 16; d6++, n6 += 4) P3[d6] = e2.getUint32(n6), Q2[d6] = e2.getUint32(n6 += 4);
      for (let d6 = 16; d6 < 80; d6++) {
        const m3 = P3[d6 - 15] | 0, F6 = Q2[d6 - 15] | 0, q7 = x4.rotrSH(m3, F6, 1) ^ x4.rotrSH(m3, F6, 8) ^ x4.shrSH(m3, F6, 7), z11 = x4.rotrSL(m3, F6, 1) ^ x4.rotrSL(m3, F6, 8) ^ x4.shrSL(m3, F6, 7), I7 = P3[d6 - 2] | 0, O9 = Q2[d6 - 2] | 0, ot4 = x4.rotrSH(I7, O9, 19) ^ x4.rotrBH(I7, O9, 61) ^ x4.shrSH(I7, O9, 6), tt4 = x4.rotrSL(I7, O9, 19) ^ x4.rotrBL(I7, O9, 61) ^ x4.shrSL(I7, O9, 6), st5 = x4.add4L(z11, tt4, Q2[d6 - 7], Q2[d6 - 16]), at5 = x4.add4H(st5, q7, ot4, P3[d6 - 7], P3[d6 - 16]);
        P3[d6] = at5 | 0, Q2[d6] = st5 | 0;
      }
      let { Ah: r3, Al: o5, Bh: s3, Bl: a5, Ch: u4, Cl: i5, Dh: D7, Dl: c7, Eh: l6, El: p7, Fh: w7, Fl: h8, Gh: g8, Gl: S10, Hh: v13, Hl: L6 } = this;
      for (let d6 = 0; d6 < 80; d6++) {
        const m3 = x4.rotrSH(l6, p7, 14) ^ x4.rotrSH(l6, p7, 18) ^ x4.rotrBH(l6, p7, 41), F6 = x4.rotrSL(l6, p7, 14) ^ x4.rotrSL(l6, p7, 18) ^ x4.rotrBL(l6, p7, 41), q7 = l6 & w7 ^ ~l6 & g8, z11 = p7 & h8 ^ ~p7 & S10, I7 = x4.add5L(L6, F6, z11, Yn[d6], Q2[d6]), O9 = x4.add5H(I7, v13, m3, q7, Vn[d6], P3[d6]), ot4 = I7 | 0, tt4 = x4.rotrSH(r3, o5, 28) ^ x4.rotrBH(r3, o5, 34) ^ x4.rotrBH(r3, o5, 39), st5 = x4.rotrSL(r3, o5, 28) ^ x4.rotrBL(r3, o5, 34) ^ x4.rotrBL(r3, o5, 39), at5 = r3 & s3 ^ r3 & u4 ^ s3 & u4, Ct3 = o5 & a5 ^ o5 & i5 ^ a5 & i5;
        v13 = g8 | 0, L6 = S10 | 0, g8 = w7 | 0, S10 = h8 | 0, w7 = l6 | 0, h8 = p7 | 0, { h: l6, l: p7 } = x4.add(D7 | 0, c7 | 0, O9 | 0, ot4 | 0), D7 = u4 | 0, c7 = i5 | 0, u4 = s3 | 0, i5 = a5 | 0, s3 = r3 | 0, a5 = o5 | 0;
        const At4 = x4.add3L(ot4, st5, Ct3);
        r3 = x4.add3H(At4, O9, tt4, at5), o5 = At4 | 0;
      }
      ({ h: r3, l: o5 } = x4.add(this.Ah | 0, this.Al | 0, r3 | 0, o5 | 0)), { h: s3, l: a5 } = x4.add(this.Bh | 0, this.Bl | 0, s3 | 0, a5 | 0), { h: u4, l: i5 } = x4.add(this.Ch | 0, this.Cl | 0, u4 | 0, i5 | 0), { h: D7, l: c7 } = x4.add(this.Dh | 0, this.Dl | 0, D7 | 0, c7 | 0), { h: l6, l: p7 } = x4.add(this.Eh | 0, this.El | 0, l6 | 0, p7 | 0), { h: w7, l: h8 } = x4.add(this.Fh | 0, this.Fl | 0, w7 | 0, h8 | 0), { h: g8, l: S10 } = x4.add(this.Gh | 0, this.Gl | 0, g8 | 0, S10 | 0), { h: v13, l: L6 } = x4.add(this.Hh | 0, this.Hl | 0, v13 | 0, L6 | 0), this.set(r3, o5, s3, a5, u4, i5, D7, c7, l6, p7, w7, h8, g8, S10, v13, L6);
    }
    roundClean() {
      P3.fill(0), Q2.fill(0);
    }
    destroy() {
      this.buffer.fill(0), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
    }
  };
  var Kn = Bn(() => new Jn());
  var vt = BigInt(0);
  var be2 = BigInt(1);
  var Wn = BigInt(2);
  function It(t) {
    return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
  }
  function Ut(t) {
    if (!It(t)) throw new Error("Uint8Array expected");
  }
  function Tt(t, e2) {
    if (typeof e2 != "boolean") throw new Error(t + " boolean expected, got " + e2);
  }
  var Xn = Array.from({ length: 256 }, (t, e2) => e2.toString(16).padStart(2, "0"));
  function Ft(t) {
    Ut(t);
    let e2 = "";
    for (let n6 = 0; n6 < t.length; n6++) e2 += Xn[t[n6]];
    return e2;
  }
  function pe2(t) {
    if (typeof t != "string") throw new Error("hex string expected, got " + typeof t);
    return t === "" ? vt : BigInt("0x" + t);
  }
  var K3 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
  function we2(t) {
    if (t >= K3._0 && t <= K3._9) return t - K3._0;
    if (t >= K3.A && t <= K3.F) return t - (K3.A - 10);
    if (t >= K3.a && t <= K3.f) return t - (K3.a - 10);
  }
  function Ee2(t) {
    if (typeof t != "string") throw new Error("hex string expected, got " + typeof t);
    const e2 = t.length, n6 = e2 / 2;
    if (e2 % 2) throw new Error("hex string expected, got unpadded hex of length " + e2);
    const r3 = new Uint8Array(n6);
    for (let o5 = 0, s3 = 0; o5 < n6; o5++, s3 += 2) {
      const a5 = we2(t.charCodeAt(s3)), u4 = we2(t.charCodeAt(s3 + 1));
      if (a5 === void 0 || u4 === void 0) {
        const i5 = t[s3] + t[s3 + 1];
        throw new Error('hex string expected, got non-hex character "' + i5 + '" at index ' + s3);
      }
      r3[o5] = a5 * 16 + u4;
    }
    return r3;
  }
  function Pn(t) {
    return pe2(Ft(t));
  }
  function Et(t) {
    return Ut(t), pe2(Ft(Uint8Array.from(t).reverse()));
  }
  function ge2(t, e2) {
    return Ee2(t.toString(16).padStart(e2 * 2, "0"));
  }
  function Nt(t, e2) {
    return ge2(t, e2).reverse();
  }
  function W3(t, e2, n6) {
    let r3;
    if (typeof e2 == "string") try {
      r3 = Ee2(e2);
    } catch (s3) {
      throw new Error(t + " must be hex string or Uint8Array, cause: " + s3);
    }
    else if (It(e2)) r3 = Uint8Array.from(e2);
    else throw new Error(t + " must be hex string or Uint8Array");
    const o5 = r3.length;
    if (typeof n6 == "number" && o5 !== n6) throw new Error(t + " of length " + n6 + " expected, got " + o5);
    return r3;
  }
  function ye2(...t) {
    let e2 = 0;
    for (let r3 = 0; r3 < t.length; r3++) {
      const o5 = t[r3];
      Ut(o5), e2 += o5.length;
    }
    const n6 = new Uint8Array(e2);
    for (let r3 = 0, o5 = 0; r3 < t.length; r3++) {
      const s3 = t[r3];
      n6.set(s3, o5), o5 += s3.length;
    }
    return n6;
  }
  var Lt = (t) => typeof t == "bigint" && vt <= t;
  function Qn(t, e2, n6) {
    return Lt(t) && Lt(e2) && Lt(n6) && e2 <= t && t < n6;
  }
  function ft(t, e2, n6, r3) {
    if (!Qn(e2, n6, r3)) throw new Error("expected valid " + t + ": " + n6 + " <= n < " + r3 + ", got " + e2);
  }
  function tr(t) {
    let e2;
    for (e2 = 0; t > vt; t >>= be2, e2 += 1) ;
    return e2;
  }
  var er = (t) => (Wn << BigInt(t - 1)) - be2;
  var nr = { bigint: (t) => typeof t == "bigint", function: (t) => typeof t == "function", boolean: (t) => typeof t == "boolean", string: (t) => typeof t == "string", stringOrUint8Array: (t) => typeof t == "string" || It(t), isSafeInteger: (t) => Number.isSafeInteger(t), array: (t) => Array.isArray(t), field: (t, e2) => e2.Fp.isValid(t), hash: (t) => typeof t == "function" && Number.isSafeInteger(t.outputLen) };
  function Ot(t, e2, n6 = {}) {
    const r3 = (o5, s3, a5) => {
      const u4 = nr[s3];
      if (typeof u4 != "function") throw new Error("invalid validator function");
      const i5 = t[o5];
      if (!(a5 && i5 === void 0) && !u4(i5, t)) throw new Error("param " + String(o5) + " is invalid. Expected " + s3 + ", got " + i5);
    };
    for (const [o5, s3] of Object.entries(e2)) r3(o5, s3, false);
    for (const [o5, s3] of Object.entries(n6)) r3(o5, s3, true);
    return t;
  }
  function xe2(t) {
    const e2 = /* @__PURE__ */ new WeakMap();
    return (n6, ...r3) => {
      const o5 = e2.get(n6);
      if (o5 !== void 0) return o5;
      const s3 = t(n6, ...r3);
      return e2.set(n6, s3), s3;
    };
  }
  var M2 = BigInt(0);
  var N4 = BigInt(1);
  var nt = BigInt(2);
  var rr = BigInt(3);
  var Ht = BigInt(4);
  var Be2 = BigInt(5);
  var Ce2 = BigInt(8);
  function H2(t, e2) {
    const n6 = t % e2;
    return n6 >= M2 ? n6 : e2 + n6;
  }
  function or(t, e2, n6) {
    if (e2 < M2) throw new Error("invalid exponent, negatives unsupported");
    if (n6 <= M2) throw new Error("invalid modulus");
    if (n6 === N4) return M2;
    let r3 = N4;
    for (; e2 > M2; ) e2 & N4 && (r3 = r3 * t % n6), t = t * t % n6, e2 >>= N4;
    return r3;
  }
  function J2(t, e2, n6) {
    let r3 = t;
    for (; e2-- > M2; ) r3 *= r3, r3 %= n6;
    return r3;
  }
  function Ae2(t, e2) {
    if (t === M2) throw new Error("invert: expected non-zero number");
    if (e2 <= M2) throw new Error("invert: expected positive modulus, got " + e2);
    let n6 = H2(t, e2), r3 = e2, o5 = M2, s3 = N4;
    for (; n6 !== M2; ) {
      const u4 = r3 / n6, i5 = r3 % n6, D7 = o5 - s3 * u4;
      r3 = n6, n6 = i5, o5 = s3, s3 = D7;
    }
    if (r3 !== N4) throw new Error("invert: does not exist");
    return H2(o5, e2);
  }
  function sr(t) {
    const e2 = (t - N4) / nt;
    let n6, r3, o5;
    for (n6 = t - N4, r3 = 0; n6 % nt === M2; n6 /= nt, r3++) ;
    for (o5 = nt; o5 < t && or(o5, e2, t) !== t - N4; o5++) if (o5 > 1e3) throw new Error("Cannot find square root: likely non-prime P");
    if (r3 === 1) {
      const a5 = (t + N4) / Ht;
      return function(i5, D7) {
        const c7 = i5.pow(D7, a5);
        if (!i5.eql(i5.sqr(c7), D7)) throw new Error("Cannot find square root");
        return c7;
      };
    }
    const s3 = (n6 + N4) / nt;
    return function(u4, i5) {
      if (u4.pow(i5, e2) === u4.neg(u4.ONE)) throw new Error("Cannot find square root");
      let D7 = r3, c7 = u4.pow(u4.mul(u4.ONE, o5), n6), l6 = u4.pow(i5, s3), p7 = u4.pow(i5, n6);
      for (; !u4.eql(p7, u4.ONE); ) {
        if (u4.eql(p7, u4.ZERO)) return u4.ZERO;
        let w7 = 1;
        for (let g8 = u4.sqr(p7); w7 < D7 && !u4.eql(g8, u4.ONE); w7++) g8 = u4.sqr(g8);
        const h8 = u4.pow(c7, N4 << BigInt(D7 - w7 - 1));
        c7 = u4.sqr(h8), l6 = u4.mul(l6, h8), p7 = u4.mul(p7, c7), D7 = w7;
      }
      return l6;
    };
  }
  function ir(t) {
    if (t % Ht === rr) {
      const e2 = (t + N4) / Ht;
      return function(r3, o5) {
        const s3 = r3.pow(o5, e2);
        if (!r3.eql(r3.sqr(s3), o5)) throw new Error("Cannot find square root");
        return s3;
      };
    }
    if (t % Ce2 === Be2) {
      const e2 = (t - Be2) / Ce2;
      return function(r3, o5) {
        const s3 = r3.mul(o5, nt), a5 = r3.pow(s3, e2), u4 = r3.mul(o5, a5), i5 = r3.mul(r3.mul(u4, nt), a5), D7 = r3.mul(u4, r3.sub(i5, r3.ONE));
        if (!r3.eql(r3.sqr(D7), o5)) throw new Error("Cannot find square root");
        return D7;
      };
    }
    return sr(t);
  }
  var ur = (t, e2) => (H2(t, e2) & N4) === N4;
  var cr2 = ["create", "isValid", "is0", "neg", "inv", "sqrt", "sqr", "eql", "add", "sub", "mul", "pow", "div", "addN", "subN", "mulN", "sqrN"];
  function ar(t) {
    const e2 = { ORDER: "bigint", MASK: "bigint", BYTES: "isSafeInteger", BITS: "isSafeInteger" }, n6 = cr2.reduce((r3, o5) => (r3[o5] = "function", r3), e2);
    return Ot(t, n6);
  }
  function fr(t, e2, n6) {
    if (n6 < M2) throw new Error("invalid exponent, negatives unsupported");
    if (n6 === M2) return t.ONE;
    if (n6 === N4) return e2;
    let r3 = t.ONE, o5 = e2;
    for (; n6 > M2; ) n6 & N4 && (r3 = t.mul(r3, o5)), o5 = t.sqr(o5), n6 >>= N4;
    return r3;
  }
  function Dr(t, e2) {
    const n6 = new Array(e2.length), r3 = e2.reduce((s3, a5, u4) => t.is0(a5) ? s3 : (n6[u4] = s3, t.mul(s3, a5)), t.ONE), o5 = t.inv(r3);
    return e2.reduceRight((s3, a5, u4) => t.is0(a5) ? s3 : (n6[u4] = t.mul(s3, n6[u4]), t.mul(s3, a5)), o5), n6;
  }
  function me2(t, e2) {
    const n6 = e2 !== void 0 ? e2 : t.toString(2).length, r3 = Math.ceil(n6 / 8);
    return { nBitLength: n6, nByteLength: r3 };
  }
  function _e2(t, e2, n6 = false, r3 = {}) {
    if (t <= M2) throw new Error("invalid field: expected ORDER > 0, got " + t);
    const { nBitLength: o5, nByteLength: s3 } = me2(t, e2);
    if (s3 > 2048) throw new Error("invalid field: expected ORDER of <= 2048 bytes");
    let a5;
    const u4 = Object.freeze({ ORDER: t, isLE: n6, BITS: o5, BYTES: s3, MASK: er(o5), ZERO: M2, ONE: N4, create: (i5) => H2(i5, t), isValid: (i5) => {
      if (typeof i5 != "bigint") throw new Error("invalid field element: expected bigint, got " + typeof i5);
      return M2 <= i5 && i5 < t;
    }, is0: (i5) => i5 === M2, isOdd: (i5) => (i5 & N4) === N4, neg: (i5) => H2(-i5, t), eql: (i5, D7) => i5 === D7, sqr: (i5) => H2(i5 * i5, t), add: (i5, D7) => H2(i5 + D7, t), sub: (i5, D7) => H2(i5 - D7, t), mul: (i5, D7) => H2(i5 * D7, t), pow: (i5, D7) => fr(u4, i5, D7), div: (i5, D7) => H2(i5 * Ae2(D7, t), t), sqrN: (i5) => i5 * i5, addN: (i5, D7) => i5 + D7, subN: (i5, D7) => i5 - D7, mulN: (i5, D7) => i5 * D7, inv: (i5) => Ae2(i5, t), sqrt: r3.sqrt || ((i5) => (a5 || (a5 = ir(t)), a5(u4, i5))), invertBatch: (i5) => Dr(u4, i5), cmov: (i5, D7, c7) => c7 ? D7 : i5, toBytes: (i5) => n6 ? Nt(i5, s3) : ge2(i5, s3), fromBytes: (i5) => {
      if (i5.length !== s3) throw new Error("Field.fromBytes: expected " + s3 + " bytes, got " + i5.length);
      return n6 ? Et(i5) : Pn(i5);
    } });
    return Object.freeze(u4);
  }
  var Se2 = BigInt(0);
  var gt = BigInt(1);
  function zt(t, e2) {
    const n6 = e2.negate();
    return t ? n6 : e2;
  }
  function ve2(t, e2) {
    if (!Number.isSafeInteger(t) || t <= 0 || t > e2) throw new Error("invalid window size, expected [1.." + e2 + "], got W=" + t);
  }
  function Mt(t, e2) {
    ve2(t, e2);
    const n6 = Math.ceil(e2 / t) + 1, r3 = 2 ** (t - 1);
    return { windows: n6, windowSize: r3 };
  }
  function dr(t, e2) {
    if (!Array.isArray(t)) throw new Error("array expected");
    t.forEach((n6, r3) => {
      if (!(n6 instanceof e2)) throw new Error("invalid point at index " + r3);
    });
  }
  function hr(t, e2) {
    if (!Array.isArray(t)) throw new Error("array of scalars expected");
    t.forEach((n6, r3) => {
      if (!e2.isValid(n6)) throw new Error("invalid scalar at index " + r3);
    });
  }
  var qt = /* @__PURE__ */ new WeakMap();
  var Ie2 = /* @__PURE__ */ new WeakMap();
  function $t(t) {
    return Ie2.get(t) || 1;
  }
  function lr(t, e2) {
    return { constTimeNegate: zt, hasPrecomputes(n6) {
      return $t(n6) !== 1;
    }, unsafeLadder(n6, r3, o5 = t.ZERO) {
      let s3 = n6;
      for (; r3 > Se2; ) r3 & gt && (o5 = o5.add(s3)), s3 = s3.double(), r3 >>= gt;
      return o5;
    }, precomputeWindow(n6, r3) {
      const { windows: o5, windowSize: s3 } = Mt(r3, e2), a5 = [];
      let u4 = n6, i5 = u4;
      for (let D7 = 0; D7 < o5; D7++) {
        i5 = u4, a5.push(i5);
        for (let c7 = 1; c7 < s3; c7++) i5 = i5.add(u4), a5.push(i5);
        u4 = i5.double();
      }
      return a5;
    }, wNAF(n6, r3, o5) {
      const { windows: s3, windowSize: a5 } = Mt(n6, e2);
      let u4 = t.ZERO, i5 = t.BASE;
      const D7 = BigInt(2 ** n6 - 1), c7 = 2 ** n6, l6 = BigInt(n6);
      for (let p7 = 0; p7 < s3; p7++) {
        const w7 = p7 * a5;
        let h8 = Number(o5 & D7);
        o5 >>= l6, h8 > a5 && (h8 -= c7, o5 += gt);
        const g8 = w7, S10 = w7 + Math.abs(h8) - 1, v13 = p7 % 2 !== 0, L6 = h8 < 0;
        h8 === 0 ? i5 = i5.add(zt(v13, r3[g8])) : u4 = u4.add(zt(L6, r3[S10]));
      }
      return { p: u4, f: i5 };
    }, wNAFUnsafe(n6, r3, o5, s3 = t.ZERO) {
      const { windows: a5, windowSize: u4 } = Mt(n6, e2), i5 = BigInt(2 ** n6 - 1), D7 = 2 ** n6, c7 = BigInt(n6);
      for (let l6 = 0; l6 < a5; l6++) {
        const p7 = l6 * u4;
        if (o5 === Se2) break;
        let w7 = Number(o5 & i5);
        if (o5 >>= c7, w7 > u4 && (w7 -= D7, o5 += gt), w7 === 0) continue;
        let h8 = r3[p7 + Math.abs(w7) - 1];
        w7 < 0 && (h8 = h8.negate()), s3 = s3.add(h8);
      }
      return s3;
    }, getPrecomputes(n6, r3, o5) {
      let s3 = qt.get(r3);
      return s3 || (s3 = this.precomputeWindow(r3, n6), n6 !== 1 && qt.set(r3, o5(s3))), s3;
    }, wNAFCached(n6, r3, o5) {
      const s3 = $t(n6);
      return this.wNAF(s3, this.getPrecomputes(s3, n6, o5), r3);
    }, wNAFCachedUnsafe(n6, r3, o5, s3) {
      const a5 = $t(n6);
      return a5 === 1 ? this.unsafeLadder(n6, r3, s3) : this.wNAFUnsafe(a5, this.getPrecomputes(a5, n6, o5), r3, s3);
    }, setWindowSize(n6, r3) {
      ve2(r3, e2), Ie2.set(n6, r3), qt.delete(n6);
    } };
  }
  function br(t, e2, n6, r3) {
    if (dr(n6, t), hr(r3, e2), n6.length !== r3.length) throw new Error("arrays of points and scalars must have equal length");
    const o5 = t.ZERO, s3 = tr(BigInt(n6.length)), a5 = s3 > 12 ? s3 - 3 : s3 > 4 ? s3 - 2 : s3 ? 2 : 1, u4 = (1 << a5) - 1, i5 = new Array(u4 + 1).fill(o5), D7 = Math.floor((e2.BITS - 1) / a5) * a5;
    let c7 = o5;
    for (let l6 = D7; l6 >= 0; l6 -= a5) {
      i5.fill(o5);
      for (let w7 = 0; w7 < r3.length; w7++) {
        const h8 = r3[w7], g8 = Number(h8 >> BigInt(l6) & BigInt(u4));
        i5[g8] = i5[g8].add(n6[w7]);
      }
      let p7 = o5;
      for (let w7 = i5.length - 1, h8 = o5; w7 > 0; w7--) h8 = h8.add(i5[w7]), p7 = p7.add(h8);
      if (c7 = c7.add(p7), l6 !== 0) for (let w7 = 0; w7 < a5; w7++) c7 = c7.double();
    }
    return c7;
  }
  function pr(t) {
    return ar(t.Fp), Ot(t, { n: "bigint", h: "bigint", Gx: "field", Gy: "field" }, { nBitLength: "isSafeInteger", nByteLength: "isSafeInteger" }), Object.freeze({ ...me2(t.n, t.nBitLength), ...t, p: t.Fp.ORDER });
  }
  var G3 = BigInt(0);
  var j2 = BigInt(1);
  var yt = BigInt(2);
  var wr = BigInt(8);
  var Er = { zip215: true };
  function gr(t) {
    const e2 = pr(t);
    return Ot(t, { hash: "function", a: "bigint", d: "bigint", randomBytes: "function" }, { adjustScalarBytes: "function", domain: "function", uvRatio: "function", mapToCurve: "function" }), Object.freeze({ ...e2 });
  }
  function yr(t) {
    const e2 = gr(t), { Fp: n6, n: r3, prehash: o5, hash: s3, randomBytes: a5, nByteLength: u4, h: i5 } = e2, D7 = yt << BigInt(u4 * 8) - j2, c7 = n6.create, l6 = _e2(e2.n, e2.nBitLength), p7 = e2.uvRatio || ((y11, f7) => {
      try {
        return { isValid: true, value: n6.sqrt(y11 * n6.inv(f7)) };
      } catch {
        return { isValid: false, value: G3 };
      }
    }), w7 = e2.adjustScalarBytes || ((y11) => y11), h8 = e2.domain || ((y11, f7, b9) => {
      if (Tt("phflag", b9), f7.length || b9) throw new Error("Contexts/pre-hash are not supported");
      return y11;
    });
    function g8(y11, f7) {
      ft("coordinate " + y11, f7, G3, D7);
    }
    function S10(y11) {
      if (!(y11 instanceof d6)) throw new Error("ExtendedPoint expected");
    }
    const v13 = xe2((y11, f7) => {
      const { ex: b9, ey: E6, ez: B7 } = y11, C9 = y11.is0();
      f7 == null && (f7 = C9 ? wr : n6.inv(B7));
      const A7 = c7(b9 * f7), U8 = c7(E6 * f7), _6 = c7(B7 * f7);
      if (C9) return { x: G3, y: j2 };
      if (_6 !== j2) throw new Error("invZ was invalid");
      return { x: A7, y: U8 };
    }), L6 = xe2((y11) => {
      const { a: f7, d: b9 } = e2;
      if (y11.is0()) throw new Error("bad point: ZERO");
      const { ex: E6, ey: B7, ez: C9, et: A7 } = y11, U8 = c7(E6 * E6), _6 = c7(B7 * B7), T6 = c7(C9 * C9), $8 = c7(T6 * T6), R6 = c7(U8 * f7), V7 = c7(T6 * c7(R6 + _6)), Y6 = c7($8 + c7(b9 * c7(U8 * _6)));
      if (V7 !== Y6) throw new Error("bad point: equation left != right (1)");
      const Z6 = c7(E6 * B7), X4 = c7(C9 * A7);
      if (Z6 !== X4) throw new Error("bad point: equation left != right (2)");
      return true;
    });
    class d6 {
      constructor(f7, b9, E6, B7) {
        this.ex = f7, this.ey = b9, this.ez = E6, this.et = B7, g8("x", f7), g8("y", b9), g8("z", E6), g8("t", B7), Object.freeze(this);
      }
      get x() {
        return this.toAffine().x;
      }
      get y() {
        return this.toAffine().y;
      }
      static fromAffine(f7) {
        if (f7 instanceof d6) throw new Error("extended point not allowed");
        const { x: b9, y: E6 } = f7 || {};
        return g8("x", b9), g8("y", E6), new d6(b9, E6, j2, c7(b9 * E6));
      }
      static normalizeZ(f7) {
        const b9 = n6.invertBatch(f7.map((E6) => E6.ez));
        return f7.map((E6, B7) => E6.toAffine(b9[B7])).map(d6.fromAffine);
      }
      static msm(f7, b9) {
        return br(d6, l6, f7, b9);
      }
      _setWindowSize(f7) {
        q7.setWindowSize(this, f7);
      }
      assertValidity() {
        L6(this);
      }
      equals(f7) {
        S10(f7);
        const { ex: b9, ey: E6, ez: B7 } = this, { ex: C9, ey: A7, ez: U8 } = f7, _6 = c7(b9 * U8), T6 = c7(C9 * B7), $8 = c7(E6 * U8), R6 = c7(A7 * B7);
        return _6 === T6 && $8 === R6;
      }
      is0() {
        return this.equals(d6.ZERO);
      }
      negate() {
        return new d6(c7(-this.ex), this.ey, this.ez, c7(-this.et));
      }
      double() {
        const { a: f7 } = e2, { ex: b9, ey: E6, ez: B7 } = this, C9 = c7(b9 * b9), A7 = c7(E6 * E6), U8 = c7(yt * c7(B7 * B7)), _6 = c7(f7 * C9), T6 = b9 + E6, $8 = c7(c7(T6 * T6) - C9 - A7), R6 = _6 + A7, V7 = R6 - U8, Y6 = _6 - A7, Z6 = c7($8 * V7), X4 = c7(R6 * Y6), et6 = c7($8 * Y6), pt5 = c7(V7 * R6);
        return new d6(Z6, X4, pt5, et6);
      }
      add(f7) {
        S10(f7);
        const { a: b9, d: E6 } = e2, { ex: B7, ey: C9, ez: A7, et: U8 } = this, { ex: _6, ey: T6, ez: $8, et: R6 } = f7;
        if (b9 === BigInt(-1)) {
          const re6 = c7((C9 - B7) * (T6 + _6)), oe6 = c7((C9 + B7) * (T6 - _6)), mt3 = c7(oe6 - re6);
          if (mt3 === G3) return this.double();
          const se6 = c7(A7 * yt * R6), ie7 = c7(U8 * yt * $8), ue4 = ie7 + se6, ce5 = oe6 + re6, ae7 = ie7 - se6, Dn2 = c7(ue4 * mt3), dn3 = c7(ce5 * ae7), hn3 = c7(ue4 * ae7), ln3 = c7(mt3 * ce5);
          return new d6(Dn2, dn3, ln3, hn3);
        }
        const V7 = c7(B7 * _6), Y6 = c7(C9 * T6), Z6 = c7(U8 * E6 * R6), X4 = c7(A7 * $8), et6 = c7((B7 + C9) * (_6 + T6) - V7 - Y6), pt5 = X4 - Z6, ee8 = X4 + Z6, ne8 = c7(Y6 - b9 * V7), un3 = c7(et6 * pt5), cn3 = c7(ee8 * ne8), an3 = c7(et6 * ne8), fn = c7(pt5 * ee8);
        return new d6(un3, cn3, fn, an3);
      }
      subtract(f7) {
        return this.add(f7.negate());
      }
      wNAF(f7) {
        return q7.wNAFCached(this, f7, d6.normalizeZ);
      }
      multiply(f7) {
        const b9 = f7;
        ft("scalar", b9, j2, r3);
        const { p: E6, f: B7 } = this.wNAF(b9);
        return d6.normalizeZ([E6, B7])[0];
      }
      multiplyUnsafe(f7, b9 = d6.ZERO) {
        const E6 = f7;
        return ft("scalar", E6, G3, r3), E6 === G3 ? F6 : this.is0() || E6 === j2 ? this : q7.wNAFCachedUnsafe(this, E6, d6.normalizeZ, b9);
      }
      isSmallOrder() {
        return this.multiplyUnsafe(i5).is0();
      }
      isTorsionFree() {
        return q7.unsafeLadder(this, r3).is0();
      }
      toAffine(f7) {
        return v13(this, f7);
      }
      clearCofactor() {
        const { h: f7 } = e2;
        return f7 === j2 ? this : this.multiplyUnsafe(f7);
      }
      static fromHex(f7, b9 = false) {
        const { d: E6, a: B7 } = e2, C9 = n6.BYTES;
        f7 = W3("pointHex", f7, C9), Tt("zip215", b9);
        const A7 = f7.slice(), U8 = f7[C9 - 1];
        A7[C9 - 1] = U8 & -129;
        const _6 = Et(A7), T6 = b9 ? D7 : n6.ORDER;
        ft("pointHex.y", _6, G3, T6);
        const $8 = c7(_6 * _6), R6 = c7($8 - j2), V7 = c7(E6 * $8 - B7);
        let { isValid: Y6, value: Z6 } = p7(R6, V7);
        if (!Y6) throw new Error("Point.fromHex: invalid y coordinate");
        const X4 = (Z6 & j2) === j2, et6 = (U8 & 128) !== 0;
        if (!b9 && Z6 === G3 && et6) throw new Error("Point.fromHex: x=0 and x_0=1");
        return et6 !== X4 && (Z6 = c7(-Z6)), d6.fromAffine({ x: Z6, y: _6 });
      }
      static fromPrivateKey(f7) {
        return O9(f7).point;
      }
      toRawBytes() {
        const { x: f7, y: b9 } = this.toAffine(), E6 = Nt(b9, n6.BYTES);
        return E6[E6.length - 1] |= f7 & j2 ? 128 : 0, E6;
      }
      toHex() {
        return Ft(this.toRawBytes());
      }
    }
    d6.BASE = new d6(e2.Gx, e2.Gy, j2, c7(e2.Gx * e2.Gy)), d6.ZERO = new d6(G3, j2, j2, G3);
    const { BASE: m3, ZERO: F6 } = d6, q7 = lr(d6, u4 * 8);
    function z11(y11) {
      return H2(y11, r3);
    }
    function I7(y11) {
      return z11(Et(y11));
    }
    function O9(y11) {
      const f7 = n6.BYTES;
      y11 = W3("private key", y11, f7);
      const b9 = W3("hashed private key", s3(y11), 2 * f7), E6 = w7(b9.slice(0, f7)), B7 = b9.slice(f7, 2 * f7), C9 = I7(E6), A7 = m3.multiply(C9), U8 = A7.toRawBytes();
      return { head: E6, prefix: B7, scalar: C9, point: A7, pointBytes: U8 };
    }
    function ot4(y11) {
      return O9(y11).pointBytes;
    }
    function tt4(y11 = new Uint8Array(), ...f7) {
      const b9 = ye2(...f7);
      return I7(s3(h8(b9, W3("context", y11), !!o5)));
    }
    function st5(y11, f7, b9 = {}) {
      y11 = W3("message", y11), o5 && (y11 = o5(y11));
      const { prefix: E6, scalar: B7, pointBytes: C9 } = O9(f7), A7 = tt4(b9.context, E6, y11), U8 = m3.multiply(A7).toRawBytes(), _6 = tt4(b9.context, U8, C9, y11), T6 = z11(A7 + _6 * B7);
      ft("signature.s", T6, G3, r3);
      const $8 = ye2(U8, Nt(T6, n6.BYTES));
      return W3("result", $8, n6.BYTES * 2);
    }
    const at5 = Er;
    function Ct3(y11, f7, b9, E6 = at5) {
      const { context: B7, zip215: C9 } = E6, A7 = n6.BYTES;
      y11 = W3("signature", y11, 2 * A7), f7 = W3("message", f7), b9 = W3("publicKey", b9, A7), C9 !== void 0 && Tt("zip215", C9), o5 && (f7 = o5(f7));
      const U8 = Et(y11.slice(A7, 2 * A7));
      let _6, T6, $8;
      try {
        _6 = d6.fromHex(b9, C9), T6 = d6.fromHex(y11.slice(0, A7), C9), $8 = m3.multiplyUnsafe(U8);
      } catch {
        return false;
      }
      if (!C9 && _6.isSmallOrder()) return false;
      const R6 = tt4(B7, T6.toRawBytes(), _6.toRawBytes(), f7);
      return T6.add(_6.multiplyUnsafe(R6)).subtract($8).clearCofactor().equals(d6.ZERO);
    }
    return m3._setWindowSize(8), { CURVE: e2, getPublicKey: ot4, sign: st5, verify: Ct3, ExtendedPoint: d6, utils: { getExtendedPublicKey: O9, randomPrivateKey: () => a5(n6.BYTES), precompute(y11 = 8, f7 = d6.BASE) {
      return f7._setWindowSize(y11), f7.multiply(BigInt(3)), f7;
    } } };
  }
  BigInt(0), BigInt(1);
  var kt = BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949");
  var Ue2 = BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");
  BigInt(0);
  var xr = BigInt(1);
  var Te2 = BigInt(2);
  BigInt(3);
  var Br = BigInt(5);
  var Cr = BigInt(8);
  function Ar(t) {
    const e2 = BigInt(10), n6 = BigInt(20), r3 = BigInt(40), o5 = BigInt(80), s3 = kt, u4 = t * t % s3 * t % s3, i5 = J2(u4, Te2, s3) * u4 % s3, D7 = J2(i5, xr, s3) * t % s3, c7 = J2(D7, Br, s3) * D7 % s3, l6 = J2(c7, e2, s3) * c7 % s3, p7 = J2(l6, n6, s3) * l6 % s3, w7 = J2(p7, r3, s3) * p7 % s3, h8 = J2(w7, o5, s3) * w7 % s3, g8 = J2(h8, o5, s3) * w7 % s3, S10 = J2(g8, e2, s3) * c7 % s3;
    return { pow_p_5_8: J2(S10, Te2, s3) * t % s3, b2: u4 };
  }
  function mr(t) {
    return t[0] &= 248, t[31] &= 127, t[31] |= 64, t;
  }
  function _r(t, e2) {
    const n6 = kt, r3 = H2(e2 * e2 * e2, n6), o5 = H2(r3 * r3 * e2, n6), s3 = Ar(t * o5).pow_p_5_8;
    let a5 = H2(t * r3 * s3, n6);
    const u4 = H2(e2 * a5 * a5, n6), i5 = a5, D7 = H2(a5 * Ue2, n6), c7 = u4 === t, l6 = u4 === H2(-t, n6), p7 = u4 === H2(-t * Ue2, n6);
    return c7 && (a5 = i5), (l6 || p7) && (a5 = D7), ur(a5, n6) && (a5 = H2(-a5, n6)), { isValid: c7 || l6, value: a5 };
  }
  var Sr = (() => _e2(kt, void 0, true))();
  var vr = (() => ({ a: BigInt(-1), d: BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"), Fp: Sr, n: BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"), h: Cr, Gx: BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"), Gy: BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"), hash: Kn, randomBytes: he2, adjustScalarBytes: mr, uvRatio: _r }))();
  var Rt = (() => yr(vr))();
  var jt = "EdDSA";
  var Zt = "JWT";
  var ut = ".";
  var Dt = "base64url";
  var Gt = "utf8";
  var xt = "utf8";
  var Vt = ":";
  var Yt = "did";
  var Jt = "key";
  var dt = "base58btc";
  var Kt = "z";
  var Wt = "K36";
  var Ne2 = 32;
  function Xt(t) {
    return globalThis.Buffer != null ? new Uint8Array(t.buffer, t.byteOffset, t.byteLength) : t;
  }
  function Le2(t = 0) {
    return globalThis.Buffer != null && globalThis.Buffer.allocUnsafe != null ? Xt(globalThis.Buffer.allocUnsafe(t)) : new Uint8Array(t);
  }
  function Oe2(t, e2) {
    e2 || (e2 = t.reduce((o5, s3) => o5 + s3.length, 0));
    const n6 = Le2(e2);
    let r3 = 0;
    for (const o5 of t) n6.set(o5, r3), r3 += o5.length;
    return Xt(n6);
  }
  function Ir(t, e2) {
    if (t.length >= 255) throw new TypeError("Alphabet too long");
    for (var n6 = new Uint8Array(256), r3 = 0; r3 < n6.length; r3++) n6[r3] = 255;
    for (var o5 = 0; o5 < t.length; o5++) {
      var s3 = t.charAt(o5), a5 = s3.charCodeAt(0);
      if (n6[a5] !== 255) throw new TypeError(s3 + " is ambiguous");
      n6[a5] = o5;
    }
    var u4 = t.length, i5 = t.charAt(0), D7 = Math.log(u4) / Math.log(256), c7 = Math.log(256) / Math.log(u4);
    function l6(h8) {
      if (h8 instanceof Uint8Array || (ArrayBuffer.isView(h8) ? h8 = new Uint8Array(h8.buffer, h8.byteOffset, h8.byteLength) : Array.isArray(h8) && (h8 = Uint8Array.from(h8))), !(h8 instanceof Uint8Array)) throw new TypeError("Expected Uint8Array");
      if (h8.length === 0) return "";
      for (var g8 = 0, S10 = 0, v13 = 0, L6 = h8.length; v13 !== L6 && h8[v13] === 0; ) v13++, g8++;
      for (var d6 = (L6 - v13) * c7 + 1 >>> 0, m3 = new Uint8Array(d6); v13 !== L6; ) {
        for (var F6 = h8[v13], q7 = 0, z11 = d6 - 1; (F6 !== 0 || q7 < S10) && z11 !== -1; z11--, q7++) F6 += 256 * m3[z11] >>> 0, m3[z11] = F6 % u4 >>> 0, F6 = F6 / u4 >>> 0;
        if (F6 !== 0) throw new Error("Non-zero carry");
        S10 = q7, v13++;
      }
      for (var I7 = d6 - S10; I7 !== d6 && m3[I7] === 0; ) I7++;
      for (var O9 = i5.repeat(g8); I7 < d6; ++I7) O9 += t.charAt(m3[I7]);
      return O9;
    }
    function p7(h8) {
      if (typeof h8 != "string") throw new TypeError("Expected String");
      if (h8.length === 0) return new Uint8Array();
      var g8 = 0;
      if (h8[g8] !== " ") {
        for (var S10 = 0, v13 = 0; h8[g8] === i5; ) S10++, g8++;
        for (var L6 = (h8.length - g8) * D7 + 1 >>> 0, d6 = new Uint8Array(L6); h8[g8]; ) {
          var m3 = n6[h8.charCodeAt(g8)];
          if (m3 === 255) return;
          for (var F6 = 0, q7 = L6 - 1; (m3 !== 0 || F6 < v13) && q7 !== -1; q7--, F6++) m3 += u4 * d6[q7] >>> 0, d6[q7] = m3 % 256 >>> 0, m3 = m3 / 256 >>> 0;
          if (m3 !== 0) throw new Error("Non-zero carry");
          v13 = F6, g8++;
        }
        if (h8[g8] !== " ") {
          for (var z11 = L6 - v13; z11 !== L6 && d6[z11] === 0; ) z11++;
          for (var I7 = new Uint8Array(S10 + (L6 - z11)), O9 = S10; z11 !== L6; ) I7[O9++] = d6[z11++];
          return I7;
        }
      }
    }
    function w7(h8) {
      var g8 = p7(h8);
      if (g8) return g8;
      throw new Error(`Non-${e2} character`);
    }
    return { encode: l6, decodeUnsafe: p7, decode: w7 };
  }
  var Ur = Ir;
  var Tr = Ur;
  var He = (t) => {
    if (t instanceof Uint8Array && t.constructor.name === "Uint8Array") return t;
    if (t instanceof ArrayBuffer) return new Uint8Array(t);
    if (ArrayBuffer.isView(t)) return new Uint8Array(t.buffer, t.byteOffset, t.byteLength);
    throw new Error("Unknown type, must be binary type");
  };
  var Fr = (t) => new TextEncoder().encode(t);
  var Nr = (t) => new TextDecoder().decode(t);
  var Lr = class {
    constructor(e2, n6, r3) {
      this.name = e2, this.prefix = n6, this.baseEncode = r3;
    }
    encode(e2) {
      if (e2 instanceof Uint8Array) return `${this.prefix}${this.baseEncode(e2)}`;
      throw Error("Unknown type, must be binary type");
    }
  };
  var Or = class {
    constructor(e2, n6, r3) {
      if (this.name = e2, this.prefix = n6, n6.codePointAt(0) === void 0) throw new Error("Invalid prefix character");
      this.prefixCodePoint = n6.codePointAt(0), this.baseDecode = r3;
    }
    decode(e2) {
      if (typeof e2 == "string") {
        if (e2.codePointAt(0) !== this.prefixCodePoint) throw Error(`Unable to decode multibase string ${JSON.stringify(e2)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);
        return this.baseDecode(e2.slice(this.prefix.length));
      } else throw Error("Can only multibase decode strings");
    }
    or(e2) {
      return ze2(this, e2);
    }
  };
  var Hr = class {
    constructor(e2) {
      this.decoders = e2;
    }
    or(e2) {
      return ze2(this, e2);
    }
    decode(e2) {
      const n6 = e2[0], r3 = this.decoders[n6];
      if (r3) return r3.decode(e2);
      throw RangeError(`Unable to decode multibase string ${JSON.stringify(e2)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`);
    }
  };
  var ze2 = (t, e2) => new Hr({ ...t.decoders || { [t.prefix]: t }, ...e2.decoders || { [e2.prefix]: e2 } });
  var zr = class {
    constructor(e2, n6, r3, o5) {
      this.name = e2, this.prefix = n6, this.baseEncode = r3, this.baseDecode = o5, this.encoder = new Lr(e2, n6, r3), this.decoder = new Or(e2, n6, o5);
    }
    encode(e2) {
      return this.encoder.encode(e2);
    }
    decode(e2) {
      return this.decoder.decode(e2);
    }
  };
  var Bt = ({ name: t, prefix: e2, encode: n6, decode: r3 }) => new zr(t, e2, n6, r3);
  var ht = ({ prefix: t, name: e2, alphabet: n6 }) => {
    const { encode: r3, decode: o5 } = Tr(n6, e2);
    return Bt({ prefix: t, name: e2, encode: r3, decode: (s3) => He(o5(s3)) });
  };
  var Mr = (t, e2, n6, r3) => {
    const o5 = {};
    for (let c7 = 0; c7 < e2.length; ++c7) o5[e2[c7]] = c7;
    let s3 = t.length;
    for (; t[s3 - 1] === "="; ) --s3;
    const a5 = new Uint8Array(s3 * n6 / 8 | 0);
    let u4 = 0, i5 = 0, D7 = 0;
    for (let c7 = 0; c7 < s3; ++c7) {
      const l6 = o5[t[c7]];
      if (l6 === void 0) throw new SyntaxError(`Non-${r3} character`);
      i5 = i5 << n6 | l6, u4 += n6, u4 >= 8 && (u4 -= 8, a5[D7++] = 255 & i5 >> u4);
    }
    if (u4 >= n6 || 255 & i5 << 8 - u4) throw new SyntaxError("Unexpected end of data");
    return a5;
  };
  var qr = (t, e2, n6) => {
    const r3 = e2[e2.length - 1] === "=", o5 = (1 << n6) - 1;
    let s3 = "", a5 = 0, u4 = 0;
    for (let i5 = 0; i5 < t.length; ++i5) for (u4 = u4 << 8 | t[i5], a5 += 8; a5 > n6; ) a5 -= n6, s3 += e2[o5 & u4 >> a5];
    if (a5 && (s3 += e2[o5 & u4 << n6 - a5]), r3) for (; s3.length * n6 & 7; ) s3 += "=";
    return s3;
  };
  var k3 = ({ name: t, prefix: e2, bitsPerChar: n6, alphabet: r3 }) => Bt({ prefix: e2, name: t, encode(o5) {
    return qr(o5, r3, n6);
  }, decode(o5) {
    return Mr(o5, r3, n6, t);
  } });
  var $r = Bt({ prefix: "\0", name: "identity", encode: (t) => Nr(t), decode: (t) => Fr(t) });
  var kr = Object.freeze({ __proto__: null, identity: $r });
  var Rr = k3({ prefix: "0", name: "base2", alphabet: "01", bitsPerChar: 1 });
  var jr = Object.freeze({ __proto__: null, base2: Rr });
  var Zr = k3({ prefix: "7", name: "base8", alphabet: "01234567", bitsPerChar: 3 });
  var Gr = Object.freeze({ __proto__: null, base8: Zr });
  var Vr = ht({ prefix: "9", name: "base10", alphabet: "0123456789" });
  var Yr = Object.freeze({ __proto__: null, base10: Vr });
  var Jr = k3({ prefix: "f", name: "base16", alphabet: "0123456789abcdef", bitsPerChar: 4 });
  var Kr = k3({ prefix: "F", name: "base16upper", alphabet: "0123456789ABCDEF", bitsPerChar: 4 });
  var Wr = Object.freeze({ __proto__: null, base16: Jr, base16upper: Kr });
  var Xr = k3({ prefix: "b", name: "base32", alphabet: "abcdefghijklmnopqrstuvwxyz234567", bitsPerChar: 5 });
  var Pr = k3({ prefix: "B", name: "base32upper", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", bitsPerChar: 5 });
  var Qr = k3({ prefix: "c", name: "base32pad", alphabet: "abcdefghijklmnopqrstuvwxyz234567=", bitsPerChar: 5 });
  var to = k3({ prefix: "C", name: "base32padupper", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=", bitsPerChar: 5 });
  var eo = k3({ prefix: "v", name: "base32hex", alphabet: "0123456789abcdefghijklmnopqrstuv", bitsPerChar: 5 });
  var no = k3({ prefix: "V", name: "base32hexupper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV", bitsPerChar: 5 });
  var ro = k3({ prefix: "t", name: "base32hexpad", alphabet: "0123456789abcdefghijklmnopqrstuv=", bitsPerChar: 5 });
  var oo = k3({ prefix: "T", name: "base32hexpadupper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV=", bitsPerChar: 5 });
  var so = k3({ prefix: "h", name: "base32z", alphabet: "ybndrfg8ejkmcpqxot1uwisza345h769", bitsPerChar: 5 });
  var io = Object.freeze({ __proto__: null, base32: Xr, base32upper: Pr, base32pad: Qr, base32padupper: to, base32hex: eo, base32hexupper: no, base32hexpad: ro, base32hexpadupper: oo, base32z: so });
  var uo = ht({ prefix: "k", name: "base36", alphabet: "0123456789abcdefghijklmnopqrstuvwxyz" });
  var co = ht({ prefix: "K", name: "base36upper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" });
  var ao = Object.freeze({ __proto__: null, base36: uo, base36upper: co });
  var fo = ht({ name: "base58btc", prefix: "z", alphabet: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" });
  var Do = ht({ name: "base58flickr", prefix: "Z", alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ" });
  var ho = Object.freeze({ __proto__: null, base58btc: fo, base58flickr: Do });
  var lo = k3({ prefix: "m", name: "base64", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", bitsPerChar: 6 });
  var bo = k3({ prefix: "M", name: "base64pad", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", bitsPerChar: 6 });
  var po = k3({ prefix: "u", name: "base64url", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_", bitsPerChar: 6 });
  var wo = k3({ prefix: "U", name: "base64urlpad", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=", bitsPerChar: 6 });
  var Eo = Object.freeze({ __proto__: null, base64: lo, base64pad: bo, base64url: po, base64urlpad: wo });
  var Me2 = Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}");
  var go = Me2.reduce((t, e2, n6) => (t[n6] = e2, t), []);
  var yo = Me2.reduce((t, e2, n6) => (t[e2.codePointAt(0)] = n6, t), []);
  function xo(t) {
    return t.reduce((e2, n6) => (e2 += go[n6], e2), "");
  }
  function Bo(t) {
    const e2 = [];
    for (const n6 of t) {
      const r3 = yo[n6.codePointAt(0)];
      if (r3 === void 0) throw new Error(`Non-base256emoji character: ${n6}`);
      e2.push(r3);
    }
    return new Uint8Array(e2);
  }
  var Co = Bt({ prefix: "\u{1F680}", name: "base256emoji", encode: xo, decode: Bo });
  var Ao = Object.freeze({ __proto__: null, base256emoji: Co });
  var mo = $e2;
  var qe = 128;
  var _o = 127;
  var So = ~_o;
  var vo = Math.pow(2, 31);
  function $e2(t, e2, n6) {
    e2 = e2 || [], n6 = n6 || 0;
    for (var r3 = n6; t >= vo; ) e2[n6++] = t & 255 | qe, t /= 128;
    for (; t & So; ) e2[n6++] = t & 255 | qe, t >>>= 7;
    return e2[n6] = t | 0, $e2.bytes = n6 - r3 + 1, e2;
  }
  var Io = Pt;
  var Uo = 128;
  var ke2 = 127;
  function Pt(t, r3) {
    var n6 = 0, r3 = r3 || 0, o5 = 0, s3 = r3, a5, u4 = t.length;
    do {
      if (s3 >= u4) throw Pt.bytes = 0, new RangeError("Could not decode varint");
      a5 = t[s3++], n6 += o5 < 28 ? (a5 & ke2) << o5 : (a5 & ke2) * Math.pow(2, o5), o5 += 7;
    } while (a5 >= Uo);
    return Pt.bytes = s3 - r3, n6;
  }
  var To = Math.pow(2, 7);
  var Fo = Math.pow(2, 14);
  var No = Math.pow(2, 21);
  var Lo = Math.pow(2, 28);
  var Oo = Math.pow(2, 35);
  var Ho = Math.pow(2, 42);
  var zo = Math.pow(2, 49);
  var Mo = Math.pow(2, 56);
  var qo = Math.pow(2, 63);
  var $o = function(t) {
    return t < To ? 1 : t < Fo ? 2 : t < No ? 3 : t < Lo ? 4 : t < Oo ? 5 : t < Ho ? 6 : t < zo ? 7 : t < Mo ? 8 : t < qo ? 9 : 10;
  };
  var ko = { encode: mo, decode: Io, encodingLength: $o };
  var Re2 = ko;
  var je2 = (t, e2, n6 = 0) => (Re2.encode(t, e2, n6), e2);
  var Ze = (t) => Re2.encodingLength(t);
  var Qt = (t, e2) => {
    const n6 = e2.byteLength, r3 = Ze(t), o5 = r3 + Ze(n6), s3 = new Uint8Array(o5 + n6);
    return je2(t, s3, 0), je2(n6, s3, r3), s3.set(e2, o5), new Ro(t, n6, e2, s3);
  };
  var Ro = class {
    constructor(e2, n6, r3, o5) {
      this.code = e2, this.size = n6, this.digest = r3, this.bytes = o5;
    }
  };
  var Ge2 = ({ name: t, code: e2, encode: n6 }) => new jo(t, e2, n6);
  var jo = class {
    constructor(e2, n6, r3) {
      this.name = e2, this.code = n6, this.encode = r3;
    }
    digest(e2) {
      if (e2 instanceof Uint8Array) {
        const n6 = this.encode(e2);
        return n6 instanceof Uint8Array ? Qt(this.code, n6) : n6.then((r3) => Qt(this.code, r3));
      } else throw Error("Unknown type, must be binary type");
    }
  };
  var Ve2 = (t) => async (e2) => new Uint8Array(await crypto.subtle.digest(t, e2));
  var Zo = Ge2({ name: "sha2-256", code: 18, encode: Ve2("SHA-256") });
  var Go = Ge2({ name: "sha2-512", code: 19, encode: Ve2("SHA-512") });
  var Vo = Object.freeze({ __proto__: null, sha256: Zo, sha512: Go });
  var Ye = 0;
  var Yo = "identity";
  var Je = He;
  var Jo = (t) => Qt(Ye, Je(t));
  var Ko = { code: Ye, name: Yo, encode: Je, digest: Jo };
  var Wo = Object.freeze({ __proto__: null, identity: Ko });
  new TextEncoder(), new TextDecoder();
  var Ke = { ...kr, ...jr, ...Gr, ...Yr, ...Wr, ...io, ...ao, ...ho, ...Eo, ...Ao };
  ({ ...Vo, ...Wo });
  function We(t, e2, n6, r3) {
    return { name: t, prefix: e2, encoder: { name: t, prefix: e2, encode: n6 }, decoder: { decode: r3 } };
  }
  var Xe = We("utf8", "u", (t) => "u" + new TextDecoder("utf8").decode(t), (t) => new TextEncoder().encode(t.substring(1)));
  var te2 = We("ascii", "a", (t) => {
    let e2 = "a";
    for (let n6 = 0; n6 < t.length; n6++) e2 += String.fromCharCode(t[n6]);
    return e2;
  }, (t) => {
    t = t.substring(1);
    const e2 = Le2(t.length);
    for (let n6 = 0; n6 < t.length; n6++) e2[n6] = t.charCodeAt(n6);
    return e2;
  });
  var Pe2 = { utf8: Xe, "utf-8": Xe, hex: Ke.base16, latin1: te2, ascii: te2, binary: te2, ...Ke };
  function ct(t, e2 = "utf8") {
    const n6 = Pe2[e2];
    if (!n6) throw new Error(`Unsupported encoding "${e2}"`);
    return (e2 === "utf8" || e2 === "utf-8") && globalThis.Buffer != null && globalThis.Buffer.from != null ? globalThis.Buffer.from(t.buffer, t.byteOffset, t.byteLength).toString("utf8") : n6.encoder.encode(t).substring(1);
  }
  function rt(t, e2 = "utf8") {
    const n6 = Pe2[e2];
    if (!n6) throw new Error(`Unsupported encoding "${e2}"`);
    return (e2 === "utf8" || e2 === "utf-8") && globalThis.Buffer != null && globalThis.Buffer.from != null ? Xt(globalThis.Buffer.from(t, "utf-8")) : n6.decoder.decode(`${n6.prefix}${t}`);
  }
  function lt(t) {
    return safeJsonParse(ct(rt(t, Dt), Gt));
  }
  function bt(t) {
    return ct(rt(safeJsonStringify(t), Gt), Dt);
  }
  function Qe(t) {
    const e2 = rt(Wt, dt), n6 = Kt + ct(Oe2([e2, t]), dt);
    return [Yt, Jt, n6].join(Vt);
  }
  function en(t) {
    return ct(t, Dt);
  }
  function nn(t) {
    return rt(t, Dt);
  }
  function rn(t) {
    return rt([bt(t.header), bt(t.payload)].join(ut), xt);
  }
  function on(t) {
    return [bt(t.header), bt(t.payload), en(t.signature)].join(ut);
  }
  function sn(t) {
    const e2 = t.split(ut), n6 = lt(e2[0]), r3 = lt(e2[1]), o5 = nn(e2[2]), s3 = rt(e2.slice(0, 2).join(ut), xt);
    return { header: n6, payload: r3, signature: o5, data: s3 };
  }
  function Po(t = he2(Ne2)) {
    const e2 = Rt.getPublicKey(t);
    return { secretKey: Oe2([t, e2]), publicKey: e2 };
  }
  async function Qo(t, e2, n6, r3, o5 = (0, import_time2.fromMiliseconds)(Date.now())) {
    const s3 = { alg: jt, typ: Zt }, a5 = Qe(r3.publicKey), u4 = o5 + n6, i5 = { iss: a5, sub: t, aud: e2, iat: o5, exp: u4 }, D7 = rn({ header: s3, payload: i5 }), c7 = Rt.sign(D7, r3.secretKey.slice(0, 32));
    return on({ header: s3, payload: i5, signature: c7 });
  }

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/from-string.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/util/bases.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/basics.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/identity.js
  var identity_exports = {};
  __export(identity_exports, {
    identity: () => identity
  });
  init_node_compat_inject();

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/vendor/base-x.js
  init_node_compat_inject();
  function base2(ALPHABET, name2) {
    if (ALPHABET.length >= 255) {
      throw new TypeError("Alphabet too long");
    }
    var BASE_MAP = new Uint8Array(256);
    for (var j6 = 0; j6 < BASE_MAP.length; j6++) {
      BASE_MAP[j6] = 255;
    }
    for (var i5 = 0; i5 < ALPHABET.length; i5++) {
      var x13 = ALPHABET.charAt(i5);
      var xc = x13.charCodeAt(0);
      if (BASE_MAP[xc] !== 255) {
        throw new TypeError(x13 + " is ambiguous");
      }
      BASE_MAP[xc] = i5;
    }
    var BASE2 = ALPHABET.length;
    var LEADER = ALPHABET.charAt(0);
    var FACTOR = Math.log(BASE2) / Math.log(256);
    var iFACTOR = Math.log(256) / Math.log(BASE2);
    function encode11(source) {
      if (source instanceof Uint8Array) ;
      else if (ArrayBuffer.isView(source)) {
        source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
      } else if (Array.isArray(source)) {
        source = Uint8Array.from(source);
      }
      if (!(source instanceof Uint8Array)) {
        throw new TypeError("Expected Uint8Array");
      }
      if (source.length === 0) {
        return "";
      }
      var zeroes = 0;
      var length2 = 0;
      var pbegin = 0;
      var pend = source.length;
      while (pbegin !== pend && source[pbegin] === 0) {
        pbegin++;
        zeroes++;
      }
      var size5 = (pend - pbegin) * iFACTOR + 1 >>> 0;
      var b58 = new Uint8Array(size5);
      while (pbegin !== pend) {
        var carry = source[pbegin];
        var i6 = 0;
        for (var it1 = size5 - 1; (carry !== 0 || i6 < length2) && it1 !== -1; it1--, i6++) {
          carry += 256 * b58[it1] >>> 0;
          b58[it1] = carry % BASE2 >>> 0;
          carry = carry / BASE2 >>> 0;
        }
        if (carry !== 0) {
          throw new Error("Non-zero carry");
        }
        length2 = i6;
        pbegin++;
      }
      var it22 = size5 - length2;
      while (it22 !== size5 && b58[it22] === 0) {
        it22++;
      }
      var str = LEADER.repeat(zeroes);
      for (; it22 < size5; ++it22) {
        str += ALPHABET.charAt(b58[it22]);
      }
      return str;
    }
    function decodeUnsafe(source) {
      if (typeof source !== "string") {
        throw new TypeError("Expected String");
      }
      if (source.length === 0) {
        return new Uint8Array();
      }
      var psz = 0;
      if (source[psz] === " ") {
        return;
      }
      var zeroes = 0;
      var length2 = 0;
      while (source[psz] === LEADER) {
        zeroes++;
        psz++;
      }
      var size5 = (source.length - psz) * FACTOR + 1 >>> 0;
      var b256 = new Uint8Array(size5);
      while (source[psz]) {
        var carry = BASE_MAP[source.charCodeAt(psz)];
        if (carry === 255) {
          return;
        }
        var i6 = 0;
        for (var it32 = size5 - 1; (carry !== 0 || i6 < length2) && it32 !== -1; it32--, i6++) {
          carry += BASE2 * b256[it32] >>> 0;
          b256[it32] = carry % 256 >>> 0;
          carry = carry / 256 >>> 0;
        }
        if (carry !== 0) {
          throw new Error("Non-zero carry");
        }
        length2 = i6;
        psz++;
      }
      if (source[psz] === " ") {
        return;
      }
      var it42 = size5 - length2;
      while (it42 !== size5 && b256[it42] === 0) {
        it42++;
      }
      var vch = new Uint8Array(zeroes + (size5 - it42));
      var j7 = zeroes;
      while (it42 !== size5) {
        vch[j7++] = b256[it42++];
      }
      return vch;
    }
    function decode9(string7) {
      var buffer2 = decodeUnsafe(string7);
      if (buffer2) {
        return buffer2;
      }
      throw new Error(`Non-${name2} character`);
    }
    return {
      encode: encode11,
      decodeUnsafe,
      decode: decode9
    };
  }
  var src = base2;
  var _brrp__multiformats_scope_baseX = src;
  var base_x_default = _brrp__multiformats_scope_baseX;

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bytes.js
  init_node_compat_inject();
  var empty = new Uint8Array(0);
  var equals = (aa, bb) => {
    if (aa === bb)
      return true;
    if (aa.byteLength !== bb.byteLength) {
      return false;
    }
    for (let ii2 = 0; ii2 < aa.byteLength; ii2++) {
      if (aa[ii2] !== bb[ii2]) {
        return false;
      }
    }
    return true;
  };
  var coerce2 = (o5) => {
    if (o5 instanceof Uint8Array && o5.constructor.name === "Uint8Array")
      return o5;
    if (o5 instanceof ArrayBuffer)
      return new Uint8Array(o5);
    if (ArrayBuffer.isView(o5)) {
      return new Uint8Array(o5.buffer, o5.byteOffset, o5.byteLength);
    }
    throw new Error("Unknown type, must be binary type");
  };
  var fromString3 = (str) => new TextEncoder().encode(str);
  var toString2 = (b9) => new TextDecoder().decode(b9);

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base.js
  var Encoder = class {
    constructor(name2, prefix, baseEncode) {
      this.name = name2;
      this.prefix = prefix;
      this.baseEncode = baseEncode;
    }
    encode(bytes) {
      if (bytes instanceof Uint8Array) {
        return `${this.prefix}${this.baseEncode(bytes)}`;
      } else {
        throw Error("Unknown type, must be binary type");
      }
    }
  };
  var Decoder = class {
    constructor(name2, prefix, baseDecode) {
      this.name = name2;
      this.prefix = prefix;
      if (prefix.codePointAt(0) === void 0) {
        throw new Error("Invalid prefix character");
      }
      this.prefixCodePoint = prefix.codePointAt(0);
      this.baseDecode = baseDecode;
    }
    decode(text) {
      if (typeof text === "string") {
        if (text.codePointAt(0) !== this.prefixCodePoint) {
          throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);
        }
        return this.baseDecode(text.slice(this.prefix.length));
      } else {
        throw Error("Can only multibase decode strings");
      }
    }
    or(decoder2) {
      return or2(this, decoder2);
    }
  };
  var ComposedDecoder = class {
    constructor(decoders) {
      this.decoders = decoders;
    }
    or(decoder2) {
      return or2(this, decoder2);
    }
    decode(input) {
      const prefix = input[0];
      const decoder2 = this.decoders[prefix];
      if (decoder2) {
        return decoder2.decode(input);
      } else {
        throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`);
      }
    }
  };
  var or2 = (left, right) => new ComposedDecoder({
    ...left.decoders || { [left.prefix]: left },
    ...right.decoders || { [right.prefix]: right }
  });
  var Codec = class {
    constructor(name2, prefix, baseEncode, baseDecode) {
      this.name = name2;
      this.prefix = prefix;
      this.baseEncode = baseEncode;
      this.baseDecode = baseDecode;
      this.encoder = new Encoder(name2, prefix, baseEncode);
      this.decoder = new Decoder(name2, prefix, baseDecode);
    }
    encode(input) {
      return this.encoder.encode(input);
    }
    decode(input) {
      return this.decoder.decode(input);
    }
  };
  var from14 = ({ name: name2, prefix, encode: encode11, decode: decode9 }) => new Codec(name2, prefix, encode11, decode9);
  var baseX = ({ prefix, name: name2, alphabet: alphabet3 }) => {
    const { encode: encode11, decode: decode9 } = base_x_default(alphabet3, name2);
    return from14({
      prefix,
      name: name2,
      encode: encode11,
      decode: (text) => coerce2(decode9(text))
    });
  };
  var decode4 = (string7, alphabet3, bitsPerChar, name2) => {
    const codes = {};
    for (let i5 = 0; i5 < alphabet3.length; ++i5) {
      codes[alphabet3[i5]] = i5;
    }
    let end = string7.length;
    while (string7[end - 1] === "=") {
      --end;
    }
    const out = new Uint8Array(end * bitsPerChar / 8 | 0);
    let bits = 0;
    let buffer2 = 0;
    let written = 0;
    for (let i5 = 0; i5 < end; ++i5) {
      const value = codes[string7[i5]];
      if (value === void 0) {
        throw new SyntaxError(`Non-${name2} character`);
      }
      buffer2 = buffer2 << bitsPerChar | value;
      bits += bitsPerChar;
      if (bits >= 8) {
        bits -= 8;
        out[written++] = 255 & buffer2 >> bits;
      }
    }
    if (bits >= bitsPerChar || 255 & buffer2 << 8 - bits) {
      throw new SyntaxError("Unexpected end of data");
    }
    return out;
  };
  var encode6 = (data, alphabet3, bitsPerChar) => {
    const pad4 = alphabet3[alphabet3.length - 1] === "=";
    const mask2 = (1 << bitsPerChar) - 1;
    let out = "";
    let bits = 0;
    let buffer2 = 0;
    for (let i5 = 0; i5 < data.length; ++i5) {
      buffer2 = buffer2 << 8 | data[i5];
      bits += 8;
      while (bits > bitsPerChar) {
        bits -= bitsPerChar;
        out += alphabet3[mask2 & buffer2 >> bits];
      }
    }
    if (bits) {
      out += alphabet3[mask2 & buffer2 << bitsPerChar - bits];
    }
    if (pad4) {
      while (out.length * bitsPerChar & 7) {
        out += "=";
      }
    }
    return out;
  };
  var rfc4648 = ({ name: name2, prefix, bitsPerChar, alphabet: alphabet3 }) => {
    return from14({
      prefix,
      name: name2,
      encode(input) {
        return encode6(input, alphabet3, bitsPerChar);
      },
      decode(input) {
        return decode4(input, alphabet3, bitsPerChar, name2);
      }
    });
  };

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/identity.js
  var identity = from14({
    prefix: "\0",
    name: "identity",
    encode: (buf) => toString2(buf),
    decode: (str) => fromString3(str)
  });

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base2.js
  var base2_exports = {};
  __export(base2_exports, {
    base2: () => base22
  });
  init_node_compat_inject();
  var base22 = rfc4648({
    prefix: "0",
    name: "base2",
    alphabet: "01",
    bitsPerChar: 1
  });

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base8.js
  var base8_exports = {};
  __export(base8_exports, {
    base8: () => base8
  });
  init_node_compat_inject();
  var base8 = rfc4648({
    prefix: "7",
    name: "base8",
    alphabet: "01234567",
    bitsPerChar: 3
  });

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base10.js
  var base10_exports = {};
  __export(base10_exports, {
    base10: () => base10
  });
  init_node_compat_inject();
  var base10 = baseX({
    prefix: "9",
    name: "base10",
    alphabet: "0123456789"
  });

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base16.js
  var base16_exports = {};
  __export(base16_exports, {
    base16: () => base16,
    base16upper: () => base16upper
  });
  init_node_compat_inject();
  var base16 = rfc4648({
    prefix: "f",
    name: "base16",
    alphabet: "0123456789abcdef",
    bitsPerChar: 4
  });
  var base16upper = rfc4648({
    prefix: "F",
    name: "base16upper",
    alphabet: "0123456789ABCDEF",
    bitsPerChar: 4
  });

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base32.js
  var base32_exports = {};
  __export(base32_exports, {
    base32: () => base32,
    base32hex: () => base32hex,
    base32hexpad: () => base32hexpad,
    base32hexpadupper: () => base32hexpadupper,
    base32hexupper: () => base32hexupper,
    base32pad: () => base32pad,
    base32padupper: () => base32padupper,
    base32upper: () => base32upper,
    base32z: () => base32z
  });
  init_node_compat_inject();
  var base32 = rfc4648({
    prefix: "b",
    name: "base32",
    alphabet: "abcdefghijklmnopqrstuvwxyz234567",
    bitsPerChar: 5
  });
  var base32upper = rfc4648({
    prefix: "B",
    name: "base32upper",
    alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",
    bitsPerChar: 5
  });
  var base32pad = rfc4648({
    prefix: "c",
    name: "base32pad",
    alphabet: "abcdefghijklmnopqrstuvwxyz234567=",
    bitsPerChar: 5
  });
  var base32padupper = rfc4648({
    prefix: "C",
    name: "base32padupper",
    alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",
    bitsPerChar: 5
  });
  var base32hex = rfc4648({
    prefix: "v",
    name: "base32hex",
    alphabet: "0123456789abcdefghijklmnopqrstuv",
    bitsPerChar: 5
  });
  var base32hexupper = rfc4648({
    prefix: "V",
    name: "base32hexupper",
    alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV",
    bitsPerChar: 5
  });
  var base32hexpad = rfc4648({
    prefix: "t",
    name: "base32hexpad",
    alphabet: "0123456789abcdefghijklmnopqrstuv=",
    bitsPerChar: 5
  });
  var base32hexpadupper = rfc4648({
    prefix: "T",
    name: "base32hexpadupper",
    alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV=",
    bitsPerChar: 5
  });
  var base32z = rfc4648({
    prefix: "h",
    name: "base32z",
    alphabet: "ybndrfg8ejkmcpqxot1uwisza345h769",
    bitsPerChar: 5
  });

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base36.js
  var base36_exports = {};
  __export(base36_exports, {
    base36: () => base36,
    base36upper: () => base36upper
  });
  init_node_compat_inject();
  var base36 = baseX({
    prefix: "k",
    name: "base36",
    alphabet: "0123456789abcdefghijklmnopqrstuvwxyz"
  });
  var base36upper = baseX({
    prefix: "K",
    name: "base36upper",
    alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  });

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base58.js
  var base58_exports = {};
  __export(base58_exports, {
    base58btc: () => base58btc,
    base58flickr: () => base58flickr
  });
  init_node_compat_inject();
  var base58btc = baseX({
    name: "base58btc",
    prefix: "z",
    alphabet: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
  });
  var base58flickr = baseX({
    name: "base58flickr",
    prefix: "Z",
    alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"
  });

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base64.js
  var base64_exports = {};
  __export(base64_exports, {
    base64: () => base643,
    base64pad: () => base64pad,
    base64url: () => base64url3,
    base64urlpad: () => base64urlpad
  });
  init_node_compat_inject();
  var base643 = rfc4648({
    prefix: "m",
    name: "base64",
    alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
    bitsPerChar: 6
  });
  var base64pad = rfc4648({
    prefix: "M",
    name: "base64pad",
    alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
    bitsPerChar: 6
  });
  var base64url3 = rfc4648({
    prefix: "u",
    name: "base64url",
    alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",
    bitsPerChar: 6
  });
  var base64urlpad = rfc4648({
    prefix: "U",
    name: "base64urlpad",
    alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",
    bitsPerChar: 6
  });

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base256emoji.js
  var base256emoji_exports = {};
  __export(base256emoji_exports, {
    base256emoji: () => base256emoji
  });
  init_node_compat_inject();
  var alphabet2 = Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}");
  var alphabetBytesToChars = alphabet2.reduce((p7, c7, i5) => {
    p7[i5] = c7;
    return p7;
  }, []);
  var alphabetCharsToBytes = alphabet2.reduce((p7, c7, i5) => {
    p7[c7.codePointAt(0)] = i5;
    return p7;
  }, []);
  function encode7(data) {
    return data.reduce((p7, c7) => {
      p7 += alphabetBytesToChars[c7];
      return p7;
    }, "");
  }
  function decode5(str) {
    const byts = [];
    for (const char of str) {
      const byt = alphabetCharsToBytes[char.codePointAt(0)];
      if (byt === void 0) {
        throw new Error(`Non-base256emoji character: ${char}`);
      }
      byts.push(byt);
    }
    return new Uint8Array(byts);
  }
  var base256emoji = from14({
    prefix: "\u{1F680}",
    name: "base256emoji",
    encode: encode7,
    decode: decode5
  });

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/hashes/sha2-browser.js
  var sha2_browser_exports = {};
  __export(sha2_browser_exports, {
    sha256: () => sha2564,
    sha512: () => sha5123
  });
  init_node_compat_inject();

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/hashes/hasher.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/hashes/digest.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/varint.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/vendor/varint.js
  init_node_compat_inject();
  var encode_1 = encode8;
  var MSB = 128;
  var REST = 127;
  var MSBALL = ~REST;
  var INT = Math.pow(2, 31);
  function encode8(num2, out, offset2) {
    out = out || [];
    offset2 = offset2 || 0;
    var oldOffset = offset2;
    while (num2 >= INT) {
      out[offset2++] = num2 & 255 | MSB;
      num2 /= 128;
    }
    while (num2 & MSBALL) {
      out[offset2++] = num2 & 255 | MSB;
      num2 >>>= 7;
    }
    out[offset2] = num2 | 0;
    encode8.bytes = offset2 - oldOffset + 1;
    return out;
  }
  var decode6 = read;
  var MSB$1 = 128;
  var REST$1 = 127;
  function read(buf, offset2) {
    var res = 0, offset2 = offset2 || 0, shift = 0, counter = offset2, b9, l6 = buf.length;
    do {
      if (counter >= l6) {
        read.bytes = 0;
        throw new RangeError("Could not decode varint");
      }
      b9 = buf[counter++];
      res += shift < 28 ? (b9 & REST$1) << shift : (b9 & REST$1) * Math.pow(2, shift);
      shift += 7;
    } while (b9 >= MSB$1);
    read.bytes = counter - offset2;
    return res;
  }
  var N1 = Math.pow(2, 7);
  var N22 = Math.pow(2, 14);
  var N32 = Math.pow(2, 21);
  var N42 = Math.pow(2, 28);
  var N5 = Math.pow(2, 35);
  var N6 = Math.pow(2, 42);
  var N7 = Math.pow(2, 49);
  var N8 = Math.pow(2, 56);
  var N9 = Math.pow(2, 63);
  var length = function(value) {
    return value < N1 ? 1 : value < N22 ? 2 : value < N32 ? 3 : value < N42 ? 4 : value < N5 ? 5 : value < N6 ? 6 : value < N7 ? 7 : value < N8 ? 8 : value < N9 ? 9 : 10;
  };
  var varint = {
    encode: encode_1,
    decode: decode6,
    encodingLength: length
  };
  var _brrp_varint = varint;
  var varint_default = _brrp_varint;

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/varint.js
  var decode7 = (data, offset2 = 0) => {
    const code2 = varint_default.decode(data, offset2);
    return [
      code2,
      varint_default.decode.bytes
    ];
  };
  var encodeTo = (int2, target, offset2 = 0) => {
    varint_default.encode(int2, target, offset2);
    return target;
  };
  var encodingLength = (int2) => {
    return varint_default.encodingLength(int2);
  };

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/hashes/digest.js
  var create3 = (code2, digest2) => {
    const size5 = digest2.byteLength;
    const sizeOffset = encodingLength(code2);
    const digestOffset = sizeOffset + encodingLength(size5);
    const bytes = new Uint8Array(digestOffset + size5);
    encodeTo(code2, bytes, 0);
    encodeTo(size5, bytes, sizeOffset);
    bytes.set(digest2, digestOffset);
    return new Digest(code2, size5, digest2, bytes);
  };
  var decode8 = (multihash) => {
    const bytes = coerce2(multihash);
    const [code2, sizeOffset] = decode7(bytes);
    const [size5, digestOffset] = decode7(bytes.subarray(sizeOffset));
    const digest2 = bytes.subarray(sizeOffset + digestOffset);
    if (digest2.byteLength !== size5) {
      throw new Error("Incorrect length");
    }
    return new Digest(code2, size5, digest2, bytes);
  };
  var equals2 = (a5, b9) => {
    if (a5 === b9) {
      return true;
    } else {
      return a5.code === b9.code && a5.size === b9.size && equals(a5.bytes, b9.bytes);
    }
  };
  var Digest = class {
    constructor(code2, size5, digest2, bytes) {
      this.code = code2;
      this.size = size5;
      this.digest = digest2;
      this.bytes = bytes;
    }
  };

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/hashes/hasher.js
  var from15 = ({ name: name2, code: code2, encode: encode11 }) => new Hasher(name2, code2, encode11);
  var Hasher = class {
    constructor(name2, code2, encode11) {
      this.name = name2;
      this.code = code2;
      this.encode = encode11;
    }
    digest(input) {
      if (input instanceof Uint8Array) {
        const result = this.encode(input);
        return result instanceof Uint8Array ? create3(this.code, result) : result.then((digest2) => create3(this.code, digest2));
      } else {
        throw Error("Unknown type, must be binary type");
      }
    }
  };

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/hashes/sha2-browser.js
  var sha = (name2) => async (data) => new Uint8Array(await crypto.subtle.digest(name2, data));
  var sha2564 = from15({
    name: "sha2-256",
    code: 18,
    encode: sha("SHA-256")
  });
  var sha5123 = from15({
    name: "sha2-512",
    code: 19,
    encode: sha("SHA-512")
  });

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/hashes/identity.js
  var identity_exports2 = {};
  __export(identity_exports2, {
    identity: () => identity2
  });
  init_node_compat_inject();
  var code = 0;
  var name = "identity";
  var encode9 = coerce2;
  var digest = (input) => create3(code, encode9(input));
  var identity2 = {
    code,
    name,
    encode: encode9,
    digest
  };

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/codecs/raw.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/codecs/json.js
  init_node_compat_inject();
  var textEncoder = new TextEncoder();
  var textDecoder = new TextDecoder();

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/cid.js
  init_node_compat_inject();
  var CID = class _CID {
    constructor(version16, code2, multihash, bytes) {
      this.code = code2;
      this.version = version16;
      this.multihash = multihash;
      this.bytes = bytes;
      this.byteOffset = bytes.byteOffset;
      this.byteLength = bytes.byteLength;
      this.asCID = this;
      this._baseCache = /* @__PURE__ */ new Map();
      Object.defineProperties(this, {
        byteOffset: hidden,
        byteLength: hidden,
        code: readonly2,
        version: readonly2,
        multihash: readonly2,
        bytes: readonly2,
        _baseCache: hidden,
        asCID: hidden
      });
    }
    toV0() {
      switch (this.version) {
        case 0: {
          return this;
        }
        default: {
          const { code: code2, multihash } = this;
          if (code2 !== DAG_PB_CODE) {
            throw new Error("Cannot convert a non dag-pb CID to CIDv0");
          }
          if (multihash.code !== SHA_256_CODE) {
            throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");
          }
          return _CID.createV0(multihash);
        }
      }
    }
    toV1() {
      switch (this.version) {
        case 0: {
          const { code: code2, digest: digest2 } = this.multihash;
          const multihash = create3(code2, digest2);
          return _CID.createV1(this.code, multihash);
        }
        case 1: {
          return this;
        }
        default: {
          throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`);
        }
      }
    }
    equals(other) {
      return other && this.code === other.code && this.version === other.version && equals2(this.multihash, other.multihash);
    }
    toString(base4) {
      const { bytes, version: version16, _baseCache } = this;
      switch (version16) {
        case 0:
          return toStringV0(bytes, _baseCache, base4 || base58btc.encoder);
        default:
          return toStringV1(bytes, _baseCache, base4 || base32.encoder);
      }
    }
    toJSON() {
      return {
        code: this.code,
        version: this.version,
        hash: this.multihash.bytes
      };
    }
    get [Symbol.toStringTag]() {
      return "CID";
    }
    [/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() {
      return "CID(" + this.toString() + ")";
    }
    static isCID(value) {
      deprecate(/^0\.0/, IS_CID_DEPRECATION);
      return !!(value && (value[cidSymbol] || value.asCID === value));
    }
    get toBaseEncodedString() {
      throw new Error("Deprecated, use .toString()");
    }
    get codec() {
      throw new Error('"codec" property is deprecated, use integer "code" property instead');
    }
    get buffer() {
      throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead");
    }
    get multibaseName() {
      throw new Error('"multibaseName" property is deprecated');
    }
    get prefix() {
      throw new Error('"prefix" property is deprecated');
    }
    static asCID(value) {
      if (value instanceof _CID) {
        return value;
      } else if (value != null && value.asCID === value) {
        const { version: version16, code: code2, multihash, bytes } = value;
        return new _CID(version16, code2, multihash, bytes || encodeCID(version16, code2, multihash.bytes));
      } else if (value != null && value[cidSymbol] === true) {
        const { version: version16, multihash, code: code2 } = value;
        const digest2 = decode8(multihash);
        return _CID.create(version16, code2, digest2);
      } else {
        return null;
      }
    }
    static create(version16, code2, digest2) {
      if (typeof code2 !== "number") {
        throw new Error("String codecs are no longer supported");
      }
      switch (version16) {
        case 0: {
          if (code2 !== DAG_PB_CODE) {
            throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE}) block encoding`);
          } else {
            return new _CID(version16, code2, digest2, digest2.bytes);
          }
        }
        case 1: {
          const bytes = encodeCID(version16, code2, digest2.bytes);
          return new _CID(version16, code2, digest2, bytes);
        }
        default: {
          throw new Error("Invalid version");
        }
      }
    }
    static createV0(digest2) {
      return _CID.create(0, DAG_PB_CODE, digest2);
    }
    static createV1(code2, digest2) {
      return _CID.create(1, code2, digest2);
    }
    static decode(bytes) {
      const [cid, remainder] = _CID.decodeFirst(bytes);
      if (remainder.length) {
        throw new Error("Incorrect length");
      }
      return cid;
    }
    static decodeFirst(bytes) {
      const specs = _CID.inspectBytes(bytes);
      const prefixSize = specs.size - specs.multihashSize;
      const multihashBytes = coerce2(bytes.subarray(prefixSize, prefixSize + specs.multihashSize));
      if (multihashBytes.byteLength !== specs.multihashSize) {
        throw new Error("Incorrect length");
      }
      const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize);
      const digest2 = new Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes);
      const cid = specs.version === 0 ? _CID.createV0(digest2) : _CID.createV1(specs.codec, digest2);
      return [
        cid,
        bytes.subarray(specs.size)
      ];
    }
    static inspectBytes(initialBytes) {
      let offset2 = 0;
      const next = () => {
        const [i5, length2] = decode7(initialBytes.subarray(offset2));
        offset2 += length2;
        return i5;
      };
      let version16 = next();
      let codec2 = DAG_PB_CODE;
      if (version16 === 18) {
        version16 = 0;
        offset2 = 0;
      } else if (version16 === 1) {
        codec2 = next();
      }
      if (version16 !== 0 && version16 !== 1) {
        throw new RangeError(`Invalid CID version ${version16}`);
      }
      const prefixSize = offset2;
      const multihashCode = next();
      const digestSize = next();
      const size5 = offset2 + digestSize;
      const multihashSize = size5 - prefixSize;
      return {
        version: version16,
        codec: codec2,
        multihashCode,
        digestSize,
        multihashSize,
        size: size5
      };
    }
    static parse(source, base4) {
      const [prefix, bytes] = parseCIDtoBytes(source, base4);
      const cid = _CID.decode(bytes);
      cid._baseCache.set(prefix, source);
      return cid;
    }
  };
  var parseCIDtoBytes = (source, base4) => {
    switch (source[0]) {
      case "Q": {
        const decoder2 = base4 || base58btc;
        return [
          base58btc.prefix,
          decoder2.decode(`${base58btc.prefix}${source}`)
        ];
      }
      case base58btc.prefix: {
        const decoder2 = base4 || base58btc;
        return [
          base58btc.prefix,
          decoder2.decode(source)
        ];
      }
      case base32.prefix: {
        const decoder2 = base4 || base32;
        return [
          base32.prefix,
          decoder2.decode(source)
        ];
      }
      default: {
        if (base4 == null) {
          throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");
        }
        return [
          source[0],
          base4.decode(source)
        ];
      }
    }
  };
  var toStringV0 = (bytes, cache, base4) => {
    const { prefix } = base4;
    if (prefix !== base58btc.prefix) {
      throw Error(`Cannot string encode V0 in ${base4.name} encoding`);
    }
    const cid = cache.get(prefix);
    if (cid == null) {
      const cid2 = base4.encode(bytes).slice(1);
      cache.set(prefix, cid2);
      return cid2;
    } else {
      return cid;
    }
  };
  var toStringV1 = (bytes, cache, base4) => {
    const { prefix } = base4;
    const cid = cache.get(prefix);
    if (cid == null) {
      const cid2 = base4.encode(bytes);
      cache.set(prefix, cid2);
      return cid2;
    } else {
      return cid;
    }
  };
  var DAG_PB_CODE = 112;
  var SHA_256_CODE = 18;
  var encodeCID = (version16, code2, multihash) => {
    const codeOffset = encodingLength(version16);
    const hashOffset = codeOffset + encodingLength(code2);
    const bytes = new Uint8Array(hashOffset + multihash.byteLength);
    encodeTo(version16, bytes, 0);
    encodeTo(code2, bytes, codeOffset);
    bytes.set(multihash, hashOffset);
    return bytes;
  };
  var cidSymbol = /* @__PURE__ */ Symbol.for("@ipld/js-cid/CID");
  var readonly2 = {
    writable: false,
    configurable: false,
    enumerable: true
  };
  var hidden = {
    writable: false,
    enumerable: false,
    configurable: false
  };
  var version6 = "0.0.0-dev";
  var deprecate = (range, message) => {
    if (range.test(version6)) {
      console.warn(message);
    } else {
      throw new Error(message);
    }
  };
  var IS_CID_DEPRECATION = `CID.isCID(v) is deprecated and will be removed in the next major release.
Following code pattern:

if (CID.isCID(value)) {
  doSomethingWithCID(value)
}

Is replaced with:

const cid = CID.asCID(value)
if (cid) {
  // Make sure to use cid instead of value
  doSomethingWithCID(cid)
}
`;

  // ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/basics.js
  var bases = {
    ...identity_exports,
    ...base2_exports,
    ...base8_exports,
    ...base10_exports,
    ...base16_exports,
    ...base32_exports,
    ...base36_exports,
    ...base58_exports,
    ...base64_exports,
    ...base256emoji_exports
  };
  var hashes2 = {
    ...sha2_browser_exports,
    ...identity_exports2
  };

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/alloc.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/util/as-uint8array.js
  init_node_compat_inject();
  function asUint8Array(buf) {
    if (globalThis.Buffer != null) {
      return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
    }
    return buf;
  }

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/alloc.js
  function allocUnsafe(size5 = 0) {
    if (globalThis.Buffer != null && globalThis.Buffer.allocUnsafe != null) {
      return asUint8Array(globalThis.Buffer.allocUnsafe(size5));
    }
    return new Uint8Array(size5);
  }

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/util/bases.js
  function createCodec(name2, prefix, encode11, decode9) {
    return {
      name: name2,
      prefix,
      encoder: {
        name: name2,
        prefix,
        encode: encode11
      },
      decoder: { decode: decode9 }
    };
  }
  var string5 = createCodec("utf8", "u", (buf) => {
    const decoder2 = new TextDecoder("utf8");
    return "u" + decoder2.decode(buf);
  }, (str) => {
    const encoder5 = new TextEncoder();
    return encoder5.encode(str.substring(1));
  });
  var ascii = createCodec("ascii", "a", (buf) => {
    let string7 = "a";
    for (let i5 = 0; i5 < buf.length; i5++) {
      string7 += String.fromCharCode(buf[i5]);
    }
    return string7;
  }, (str) => {
    str = str.substring(1);
    const buf = allocUnsafe(str.length);
    for (let i5 = 0; i5 < str.length; i5++) {
      buf[i5] = str.charCodeAt(i5);
    }
    return buf;
  });
  var BASES = {
    utf8: string5,
    "utf-8": string5,
    hex: bases.base16,
    latin1: ascii,
    ascii,
    binary: ascii,
    ...bases
  };
  var bases_default = BASES;

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/from-string.js
  function fromString4(string7, encoding = "utf8") {
    const base4 = bases_default[encoding];
    if (!base4) {
      throw new Error(`Unsupported encoding "${encoding}"`);
    }
    if ((encoding === "utf8" || encoding === "utf-8") && globalThis.Buffer != null && globalThis.Buffer.from != null) {
      return asUint8Array(globalThis.Buffer.from(string7, "utf-8"));
    }
    return base4.decoder.decode(`${base4.prefix}${string7}`);
  }

  // ../../node_modules/.pnpm/@walletconnect+utils@2.23.9_typescript@5.9.3_zod@4.4.3/node_modules/@walletconnect/utils/dist/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js
  init_node_compat_inject();
  var __spreadArray = function(to3, from16, pack) {
    if (pack || arguments.length === 2) for (var i5 = 0, l6 = from16.length, ar5; i5 < l6; i5++) {
      if (ar5 || !(i5 in from16)) {
        if (!ar5) ar5 = Array.prototype.slice.call(from16, 0, i5);
        ar5[i5] = from16[i5];
      }
    }
    return to3.concat(ar5 || Array.prototype.slice.call(from16));
  };
  var BrowserInfo = (
    /** @class */
    /* @__PURE__ */ (function() {
      function BrowserInfo2(name2, version16, os) {
        this.name = name2;
        this.version = version16;
        this.os = os;
        this.type = "browser";
      }
      return BrowserInfo2;
    })()
  );
  var NodeInfo = (
    /** @class */
    /* @__PURE__ */ (function() {
      function NodeInfo2(version16) {
        this.version = version16;
        this.type = "node";
        this.name = "node";
        this.os = process.platform;
      }
      return NodeInfo2;
    })()
  );
  var SearchBotDeviceInfo = (
    /** @class */
    /* @__PURE__ */ (function() {
      function SearchBotDeviceInfo2(name2, version16, os, bot) {
        this.name = name2;
        this.version = version16;
        this.os = os;
        this.bot = bot;
        this.type = "bot-device";
      }
      return SearchBotDeviceInfo2;
    })()
  );
  var BotInfo = (
    /** @class */
    /* @__PURE__ */ (function() {
      function BotInfo2() {
        this.type = "bot";
        this.bot = true;
        this.name = "bot";
        this.version = null;
        this.os = null;
      }
      return BotInfo2;
    })()
  );
  var ReactNativeInfo = (
    /** @class */
    /* @__PURE__ */ (function() {
      function ReactNativeInfo2() {
        this.type = "react-native";
        this.name = "react-native";
        this.version = null;
        this.os = null;
      }
      return ReactNativeInfo2;
    })()
  );
  var SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;
  var SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/;
  var REQUIRED_VERSION_PARTS = 3;
  var userAgentRules = [
    ["aol", /AOLShield\/([0-9\._]+)/],
    ["edge", /Edge\/([0-9\._]+)/],
    ["edge-ios", /EdgiOS\/([0-9\._]+)/],
    ["yandexbrowser", /YaBrowser\/([0-9\._]+)/],
    ["kakaotalk", /KAKAOTALK\s([0-9\.]+)/],
    ["samsung", /SamsungBrowser\/([0-9\.]+)/],
    ["silk", /\bSilk\/([0-9._-]+)\b/],
    ["miui", /MiuiBrowser\/([0-9\.]+)$/],
    ["beaker", /BeakerBrowser\/([0-9\.]+)/],
    ["edge-chromium", /EdgA?\/([0-9\.]+)/],
    [
      "chromium-webview",
      /(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/
    ],
    ["chrome", /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],
    ["phantomjs", /PhantomJS\/([0-9\.]+)(:?\s|$)/],
    ["crios", /CriOS\/([0-9\.]+)(:?\s|$)/],
    ["firefox", /Firefox\/([0-9\.]+)(?:\s|$)/],
    ["fxios", /FxiOS\/([0-9\.]+)/],
    ["opera-mini", /Opera Mini.*Version\/([0-9\.]+)/],
    ["opera", /Opera\/([0-9\.]+)(?:\s|$)/],
    ["opera", /OPR\/([0-9\.]+)(:?\s|$)/],
    ["pie", /^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],
    ["pie", /^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],
    ["netfront", /^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],
    ["ie", /Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],
    ["ie", /MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],
    ["ie", /MSIE\s(7\.0)/],
    ["bb10", /BB10;\sTouch.*Version\/([0-9\.]+)/],
    ["android", /Android\s([0-9\.]+)/],
    ["ios", /Version\/([0-9\._]+).*Mobile.*Safari.*/],
    ["safari", /Version\/([0-9\._]+).*Safari/],
    ["facebook", /FB[AS]V\/([0-9\.]+)/],
    ["instagram", /Instagram\s([0-9\.]+)/],
    ["ios-webview", /AppleWebKit\/([0-9\.]+).*Mobile/],
    ["ios-webview", /AppleWebKit\/([0-9\.]+).*Gecko\)$/],
    ["curl", /^curl\/([0-9\.]+)$/],
    ["searchbot", SEARCHBOX_UA_REGEX]
  ];
  var operatingSystemRules = [
    ["iOS", /iP(hone|od|ad)/],
    ["Android OS", /Android/],
    ["BlackBerry OS", /BlackBerry|BB10/],
    ["Windows Mobile", /IEMobile/],
    ["Amazon OS", /Kindle/],
    ["Windows 3.11", /Win16/],
    ["Windows 95", /(Windows 95)|(Win95)|(Windows_95)/],
    ["Windows 98", /(Windows 98)|(Win98)/],
    ["Windows 2000", /(Windows NT 5.0)|(Windows 2000)/],
    ["Windows XP", /(Windows NT 5.1)|(Windows XP)/],
    ["Windows Server 2003", /(Windows NT 5.2)/],
    ["Windows Vista", /(Windows NT 6.0)/],
    ["Windows 7", /(Windows NT 6.1)/],
    ["Windows 8", /(Windows NT 6.2)/],
    ["Windows 8.1", /(Windows NT 6.3)/],
    ["Windows 10", /(Windows NT 10.0)/],
    ["Windows ME", /Windows ME/],
    ["Windows CE", /Windows CE|WinCE|Microsoft Pocket Internet Explorer/],
    ["Open BSD", /OpenBSD/],
    ["Sun OS", /SunOS/],
    ["Chrome OS", /CrOS/],
    ["Linux", /(Linux)|(X11)/],
    ["Mac OS", /(Mac_PowerPC)|(Macintosh)/],
    ["QNX", /QNX/],
    ["BeOS", /BeOS/],
    ["OS/2", /OS\/2/]
  ];
  function detect(userAgent) {
    if (!!userAgent) {
      return parseUserAgent(userAgent);
    }
    if (typeof document === "undefined" && typeof navigator !== "undefined" && navigator.product === "ReactNative") {
      return new ReactNativeInfo();
    }
    if (typeof navigator !== "undefined") {
      return parseUserAgent(navigator.userAgent);
    }
    return getNodeVersion();
  }
  function matchUserAgent(ua) {
    return ua !== "" && userAgentRules.reduce(function(matched, _a4) {
      var browser = _a4[0], regex = _a4[1];
      if (matched) {
        return matched;
      }
      var uaMatch = regex.exec(ua);
      return !!uaMatch && [browser, uaMatch];
    }, false);
  }
  function parseUserAgent(ua) {
    var matchedRule = matchUserAgent(ua);
    if (!matchedRule) {
      return null;
    }
    var name2 = matchedRule[0], match = matchedRule[1];
    if (name2 === "searchbot") {
      return new BotInfo();
    }
    var versionParts = match[1] && match[1].split(".").join("_").split("_").slice(0, 3);
    if (versionParts) {
      if (versionParts.length < REQUIRED_VERSION_PARTS) {
        versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true);
      }
    } else {
      versionParts = [];
    }
    var version16 = versionParts.join(".");
    var os = detectOS(ua);
    var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);
    if (searchBotMatch && searchBotMatch[1]) {
      return new SearchBotDeviceInfo(name2, version16, os, searchBotMatch[1]);
    }
    return new BrowserInfo(name2, version16, os);
  }
  function detectOS(ua) {
    for (var ii2 = 0, count = operatingSystemRules.length; ii2 < count; ii2++) {
      var _a4 = operatingSystemRules[ii2], os = _a4[0], regex = _a4[1];
      var match = regex.exec(ua);
      if (match) {
        return os;
      }
    }
    return null;
  }
  function getNodeVersion() {
    var isNode2 = typeof process !== "undefined" && process.version;
    return isNode2 ? new NodeInfo(process.version.slice(1)) : null;
  }
  function createVersionParts(count) {
    var output = [];
    for (var ii2 = 0; ii2 < count; ii2++) {
      output.push("0");
    }
    return output;
  }

  // ../../node_modules/.pnpm/@walletconnect+utils@2.23.9_typescript@5.9.3_zod@4.4.3/node_modules/@walletconnect/utils/dist/index.js
  var import_time3 = __toESM(require_cjs(), 1);
  var import_window_getters = __toESM(require_cjs2(), 1);
  var import_window_metadata = __toESM(require_cjs3(), 1);

  // ../../node_modules/.pnpm/@noble+ciphers@1.3.0/node_modules/@noble/ciphers/esm/utils.js
  init_node_compat_inject();
  function isBytes6(a5) {
    return a5 instanceof Uint8Array || ArrayBuffer.isView(a5) && a5.constructor.name === "Uint8Array";
  }
  function abool2(b9) {
    if (typeof b9 !== "boolean")
      throw new Error(`boolean expected, not ${b9}`);
  }
  function anumber4(n6) {
    if (!Number.isSafeInteger(n6) || n6 < 0)
      throw new Error("positive integer expected, got " + n6);
  }
  function abytes5(b9, ...lengths) {
    if (!isBytes6(b9))
      throw new Error("Uint8Array expected");
    if (lengths.length > 0 && !lengths.includes(b9.length))
      throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b9.length);
  }
  function aexists3(instance2, checkFinished = true) {
    if (instance2.destroyed)
      throw new Error("Hash instance has been destroyed");
    if (checkFinished && instance2.finished)
      throw new Error("Hash#digest() has already been called");
  }
  function aoutput3(out, instance2) {
    abytes5(out);
    const min = instance2.outputLen;
    if (out.length < min) {
      throw new Error("digestInto() expects output buffer of length at least " + min);
    }
  }
  function u324(arr) {
    return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
  }
  function clean3(...arrays) {
    for (let i5 = 0; i5 < arrays.length; i5++) {
      arrays[i5].fill(0);
    }
  }
  function createView3(arr) {
    return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
  }
  var isLE2 = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
  function utf8ToBytes3(str) {
    if (typeof str !== "string")
      throw new Error("string expected");
    return new Uint8Array(new TextEncoder().encode(str));
  }
  function toBytes4(data) {
    if (typeof data === "string")
      data = utf8ToBytes3(data);
    else if (isBytes6(data))
      data = copyBytes2(data);
    else
      throw new Error("Uint8Array expected, got " + typeof data);
    return data;
  }
  function checkOpts2(defaults, opts) {
    if (opts == null || typeof opts !== "object")
      throw new Error("options must be defined");
    const merged = Object.assign(defaults, opts);
    return merged;
  }
  function equalBytes2(a5, b9) {
    if (a5.length !== b9.length)
      return false;
    let diff = 0;
    for (let i5 = 0; i5 < a5.length; i5++)
      diff |= a5[i5] ^ b9[i5];
    return diff === 0;
  }
  var wrapCipher = /* @__NO_SIDE_EFFECTS__ */ (params, constructor) => {
    function wrappedCipher(key2, ...args) {
      abytes5(key2);
      if (!isLE2)
        throw new Error("Non little-endian hardware is not yet supported");
      if (params.nonceLength !== void 0) {
        const nonce = args[0];
        if (!nonce)
          throw new Error("nonce / iv required");
        if (params.varSizeNonce)
          abytes5(nonce);
        else
          abytes5(nonce, params.nonceLength);
      }
      const tagl = params.tagLength;
      if (tagl && args[1] !== void 0) {
        abytes5(args[1]);
      }
      const cipher = constructor(key2, ...args);
      const checkOutput = (fnLength, output) => {
        if (output !== void 0) {
          if (fnLength !== 2)
            throw new Error("cipher output not supported");
          abytes5(output);
        }
      };
      let called = false;
      const wrCipher = {
        encrypt(data, output) {
          if (called)
            throw new Error("cannot encrypt() twice with same key + nonce");
          called = true;
          abytes5(data);
          checkOutput(cipher.encrypt.length, output);
          return cipher.encrypt(data, output);
        },
        decrypt(data, output) {
          abytes5(data);
          if (tagl && data.length < tagl)
            throw new Error("invalid ciphertext length: smaller than tagLength=" + tagl);
          checkOutput(cipher.decrypt.length, output);
          return cipher.decrypt(data, output);
        }
      };
      return wrCipher;
    }
    Object.assign(wrappedCipher, params);
    return wrappedCipher;
  };
  function getOutput(expectedLength, out, onlyAligned = true) {
    if (out === void 0)
      return new Uint8Array(expectedLength);
    if (out.length !== expectedLength)
      throw new Error("invalid output length, expected " + expectedLength + ", got: " + out.length);
    if (onlyAligned && !isAligned32(out))
      throw new Error("invalid output, must be aligned");
    return out;
  }
  function setBigUint642(view, byteOffset, value, isLE3) {
    if (typeof view.setBigUint64 === "function")
      return view.setBigUint64(byteOffset, value, isLE3);
    const _32n3 = BigInt(32);
    const _u32_max = BigInt(4294967295);
    const wh = Number(value >> _32n3 & _u32_max);
    const wl = Number(value & _u32_max);
    const h8 = isLE3 ? 4 : 0;
    const l6 = isLE3 ? 0 : 4;
    view.setUint32(byteOffset + h8, wh, isLE3);
    view.setUint32(byteOffset + l6, wl, isLE3);
  }
  function u64Lengths(dataLength, aadLength, isLE3) {
    abool2(isLE3);
    const num2 = new Uint8Array(16);
    const view = createView3(num2);
    setBigUint642(view, 0, BigInt(aadLength), isLE3);
    setBigUint642(view, 8, BigInt(dataLength), isLE3);
    return num2;
  }
  function isAligned32(bytes) {
    return bytes.byteOffset % 4 === 0;
  }
  function copyBytes2(bytes) {
    return Uint8Array.from(bytes);
  }

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/compare.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/concat.js
  init_node_compat_inject();
  function concat3(arrays, length2) {
    if (!length2) {
      length2 = arrays.reduce((acc, curr) => acc + curr.length, 0);
    }
    const output = allocUnsafe(length2);
    let offset2 = 0;
    for (const arr of arrays) {
      output.set(arr, offset2);
      offset2 += arr.length;
    }
    return asUint8Array(output);
  }

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/equals.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/to-string.js
  init_node_compat_inject();
  function toString3(array3, encoding = "utf8") {
    const base4 = bases_default[encoding];
    if (!base4) {
      throw new Error(`Unsupported encoding "${encoding}"`);
    }
    if ((encoding === "utf8" || encoding === "utf-8") && globalThis.Buffer != null && globalThis.Buffer.from != null) {
      return globalThis.Buffer.from(array3.buffer, array3.byteOffset, array3.byteLength).toString("utf8");
    }
    return base4.encoder.encode(array3).substring(1);
  }

  // ../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/xor.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@noble+ciphers@1.3.0/node_modules/@noble/ciphers/esm/chacha.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@noble+ciphers@1.3.0/node_modules/@noble/ciphers/esm/_arx.js
  init_node_compat_inject();
  var _utf8ToBytes = (str) => Uint8Array.from(str.split("").map((c7) => c7.charCodeAt(0)));
  var sigma16 = _utf8ToBytes("expand 16-byte k");
  var sigma32 = _utf8ToBytes("expand 32-byte k");
  var sigma16_32 = u324(sigma16);
  var sigma32_32 = u324(sigma32);
  function rotl2(a5, b9) {
    return a5 << b9 | a5 >>> 32 - b9;
  }
  function isAligned322(b9) {
    return b9.byteOffset % 4 === 0;
  }
  var BLOCK_LEN = 64;
  var BLOCK_LEN32 = 16;
  var MAX_COUNTER = 2 ** 32 - 1;
  var U32_EMPTY = new Uint32Array();
  function runCipher(core, sigma, key2, nonce, data, output, counter, rounds) {
    const len = data.length;
    const block = new Uint8Array(BLOCK_LEN);
    const b32 = u324(block);
    const isAligned = isAligned322(data) && isAligned322(output);
    const d32 = isAligned ? u324(data) : U32_EMPTY;
    const o32 = isAligned ? u324(output) : U32_EMPTY;
    for (let pos = 0; pos < len; counter++) {
      core(sigma, key2, nonce, b32, counter, rounds);
      if (counter >= MAX_COUNTER)
        throw new Error("arx: counter overflow");
      const take = Math.min(BLOCK_LEN, len - pos);
      if (isAligned && take === BLOCK_LEN) {
        const pos32 = pos / 4;
        if (pos % 4 !== 0)
          throw new Error("arx: invalid block position");
        for (let j6 = 0, posj; j6 < BLOCK_LEN32; j6++) {
          posj = pos32 + j6;
          o32[posj] = d32[posj] ^ b32[j6];
        }
        pos += BLOCK_LEN;
        continue;
      }
      for (let j6 = 0, posj; j6 < take; j6++) {
        posj = pos + j6;
        output[posj] = data[posj] ^ block[j6];
      }
      pos += take;
    }
  }
  function createCipher(core, opts) {
    const { allowShortKeys, extendNonceFn, counterLength, counterRight, rounds } = checkOpts2({ allowShortKeys: false, counterLength: 8, counterRight: false, rounds: 20 }, opts);
    if (typeof core !== "function")
      throw new Error("core must be a function");
    anumber4(counterLength);
    anumber4(rounds);
    abool2(counterRight);
    abool2(allowShortKeys);
    return (key2, nonce, data, output, counter = 0) => {
      abytes5(key2);
      abytes5(nonce);
      abytes5(data);
      const len = data.length;
      if (output === void 0)
        output = new Uint8Array(len);
      abytes5(output);
      anumber4(counter);
      if (counter < 0 || counter >= MAX_COUNTER)
        throw new Error("arx: counter overflow");
      if (output.length < len)
        throw new Error(`arx: output (${output.length}) is shorter than data (${len})`);
      const toClean = [];
      let l6 = key2.length;
      let k7;
      let sigma;
      if (l6 === 32) {
        toClean.push(k7 = copyBytes2(key2));
        sigma = sigma32_32;
      } else if (l6 === 16 && allowShortKeys) {
        k7 = new Uint8Array(32);
        k7.set(key2);
        k7.set(key2, 16);
        sigma = sigma16_32;
        toClean.push(k7);
      } else {
        throw new Error(`arx: invalid 32-byte key, got length=${l6}`);
      }
      if (!isAligned322(nonce))
        toClean.push(nonce = copyBytes2(nonce));
      const k32 = u324(k7);
      if (extendNonceFn) {
        if (nonce.length !== 24)
          throw new Error(`arx: extended nonce must be 24 bytes`);
        extendNonceFn(sigma, k32, u324(nonce.subarray(0, 16)), k32);
        nonce = nonce.subarray(16);
      }
      const nonceNcLen = 16 - counterLength;
      if (nonceNcLen !== nonce.length)
        throw new Error(`arx: nonce must be ${nonceNcLen} or 16 bytes`);
      if (nonceNcLen !== 12) {
        const nc = new Uint8Array(12);
        nc.set(nonce, counterRight ? 0 : 12 - nonce.length);
        nonce = nc;
        toClean.push(nonce);
      }
      const n32 = u324(nonce);
      runCipher(core, sigma, k32, n32, data, output, counter, rounds);
      clean3(...toClean);
      return output;
    };
  }

  // ../../node_modules/.pnpm/@noble+ciphers@1.3.0/node_modules/@noble/ciphers/esm/_poly1305.js
  init_node_compat_inject();
  var u8to16 = (a5, i5) => a5[i5++] & 255 | (a5[i5++] & 255) << 8;
  var Poly1305 = class {
    constructor(key2) {
      this.blockLen = 16;
      this.outputLen = 16;
      this.buffer = new Uint8Array(16);
      this.r = new Uint16Array(10);
      this.h = new Uint16Array(10);
      this.pad = new Uint16Array(8);
      this.pos = 0;
      this.finished = false;
      key2 = toBytes4(key2);
      abytes5(key2, 32);
      const t0 = u8to16(key2, 0);
      const t1 = u8to16(key2, 2);
      const t2 = u8to16(key2, 4);
      const t3 = u8to16(key2, 6);
      const t4 = u8to16(key2, 8);
      const t5 = u8to16(key2, 10);
      const t6 = u8to16(key2, 12);
      const t7 = u8to16(key2, 14);
      this.r[0] = t0 & 8191;
      this.r[1] = (t0 >>> 13 | t1 << 3) & 8191;
      this.r[2] = (t1 >>> 10 | t2 << 6) & 7939;
      this.r[3] = (t2 >>> 7 | t3 << 9) & 8191;
      this.r[4] = (t3 >>> 4 | t4 << 12) & 255;
      this.r[5] = t4 >>> 1 & 8190;
      this.r[6] = (t4 >>> 14 | t5 << 2) & 8191;
      this.r[7] = (t5 >>> 11 | t6 << 5) & 8065;
      this.r[8] = (t6 >>> 8 | t7 << 8) & 8191;
      this.r[9] = t7 >>> 5 & 127;
      for (let i5 = 0; i5 < 8; i5++)
        this.pad[i5] = u8to16(key2, 16 + 2 * i5);
    }
    process(data, offset2, isLast = false) {
      const hibit = isLast ? 0 : 1 << 11;
      const { h: h8, r: r3 } = this;
      const r0 = r3[0];
      const r1 = r3[1];
      const r22 = r3[2];
      const r32 = r3[3];
      const r4 = r3[4];
      const r5 = r3[5];
      const r6 = r3[6];
      const r7 = r3[7];
      const r8 = r3[8];
      const r9 = r3[9];
      const t0 = u8to16(data, offset2 + 0);
      const t1 = u8to16(data, offset2 + 2);
      const t2 = u8to16(data, offset2 + 4);
      const t3 = u8to16(data, offset2 + 6);
      const t4 = u8to16(data, offset2 + 8);
      const t5 = u8to16(data, offset2 + 10);
      const t6 = u8to16(data, offset2 + 12);
      const t7 = u8to16(data, offset2 + 14);
      let h0 = h8[0] + (t0 & 8191);
      let h1 = h8[1] + ((t0 >>> 13 | t1 << 3) & 8191);
      let h22 = h8[2] + ((t1 >>> 10 | t2 << 6) & 8191);
      let h32 = h8[3] + ((t2 >>> 7 | t3 << 9) & 8191);
      let h42 = h8[4] + ((t3 >>> 4 | t4 << 12) & 8191);
      let h52 = h8[5] + (t4 >>> 1 & 8191);
      let h62 = h8[6] + ((t4 >>> 14 | t5 << 2) & 8191);
      let h72 = h8[7] + ((t5 >>> 11 | t6 << 5) & 8191);
      let h82 = h8[8] + ((t6 >>> 8 | t7 << 8) & 8191);
      let h9 = h8[9] + (t7 >>> 5 | hibit);
      let c7 = 0;
      let d0 = c7 + h0 * r0 + h1 * (5 * r9) + h22 * (5 * r8) + h32 * (5 * r7) + h42 * (5 * r6);
      c7 = d0 >>> 13;
      d0 &= 8191;
      d0 += h52 * (5 * r5) + h62 * (5 * r4) + h72 * (5 * r32) + h82 * (5 * r22) + h9 * (5 * r1);
      c7 += d0 >>> 13;
      d0 &= 8191;
      let d1 = c7 + h0 * r1 + h1 * r0 + h22 * (5 * r9) + h32 * (5 * r8) + h42 * (5 * r7);
      c7 = d1 >>> 13;
      d1 &= 8191;
      d1 += h52 * (5 * r6) + h62 * (5 * r5) + h72 * (5 * r4) + h82 * (5 * r32) + h9 * (5 * r22);
      c7 += d1 >>> 13;
      d1 &= 8191;
      let d22 = c7 + h0 * r22 + h1 * r1 + h22 * r0 + h32 * (5 * r9) + h42 * (5 * r8);
      c7 = d22 >>> 13;
      d22 &= 8191;
      d22 += h52 * (5 * r7) + h62 * (5 * r6) + h72 * (5 * r5) + h82 * (5 * r4) + h9 * (5 * r32);
      c7 += d22 >>> 13;
      d22 &= 8191;
      let d32 = c7 + h0 * r32 + h1 * r22 + h22 * r1 + h32 * r0 + h42 * (5 * r9);
      c7 = d32 >>> 13;
      d32 &= 8191;
      d32 += h52 * (5 * r8) + h62 * (5 * r7) + h72 * (5 * r6) + h82 * (5 * r5) + h9 * (5 * r4);
      c7 += d32 >>> 13;
      d32 &= 8191;
      let d42 = c7 + h0 * r4 + h1 * r32 + h22 * r22 + h32 * r1 + h42 * r0;
      c7 = d42 >>> 13;
      d42 &= 8191;
      d42 += h52 * (5 * r9) + h62 * (5 * r8) + h72 * (5 * r7) + h82 * (5 * r6) + h9 * (5 * r5);
      c7 += d42 >>> 13;
      d42 &= 8191;
      let d52 = c7 + h0 * r5 + h1 * r4 + h22 * r32 + h32 * r22 + h42 * r1;
      c7 = d52 >>> 13;
      d52 &= 8191;
      d52 += h52 * r0 + h62 * (5 * r9) + h72 * (5 * r8) + h82 * (5 * r7) + h9 * (5 * r6);
      c7 += d52 >>> 13;
      d52 &= 8191;
      let d6 = c7 + h0 * r6 + h1 * r5 + h22 * r4 + h32 * r32 + h42 * r22;
      c7 = d6 >>> 13;
      d6 &= 8191;
      d6 += h52 * r1 + h62 * r0 + h72 * (5 * r9) + h82 * (5 * r8) + h9 * (5 * r7);
      c7 += d6 >>> 13;
      d6 &= 8191;
      let d7 = c7 + h0 * r7 + h1 * r6 + h22 * r5 + h32 * r4 + h42 * r32;
      c7 = d7 >>> 13;
      d7 &= 8191;
      d7 += h52 * r22 + h62 * r1 + h72 * r0 + h82 * (5 * r9) + h9 * (5 * r8);
      c7 += d7 >>> 13;
      d7 &= 8191;
      let d8 = c7 + h0 * r8 + h1 * r7 + h22 * r6 + h32 * r5 + h42 * r4;
      c7 = d8 >>> 13;
      d8 &= 8191;
      d8 += h52 * r32 + h62 * r22 + h72 * r1 + h82 * r0 + h9 * (5 * r9);
      c7 += d8 >>> 13;
      d8 &= 8191;
      let d9 = c7 + h0 * r9 + h1 * r8 + h22 * r7 + h32 * r6 + h42 * r5;
      c7 = d9 >>> 13;
      d9 &= 8191;
      d9 += h52 * r4 + h62 * r32 + h72 * r22 + h82 * r1 + h9 * r0;
      c7 += d9 >>> 13;
      d9 &= 8191;
      c7 = (c7 << 2) + c7 | 0;
      c7 = c7 + d0 | 0;
      d0 = c7 & 8191;
      c7 = c7 >>> 13;
      d1 += c7;
      h8[0] = d0;
      h8[1] = d1;
      h8[2] = d22;
      h8[3] = d32;
      h8[4] = d42;
      h8[5] = d52;
      h8[6] = d6;
      h8[7] = d7;
      h8[8] = d8;
      h8[9] = d9;
    }
    finalize() {
      const { h: h8, pad: pad4 } = this;
      const g8 = new Uint16Array(10);
      let c7 = h8[1] >>> 13;
      h8[1] &= 8191;
      for (let i5 = 2; i5 < 10; i5++) {
        h8[i5] += c7;
        c7 = h8[i5] >>> 13;
        h8[i5] &= 8191;
      }
      h8[0] += c7 * 5;
      c7 = h8[0] >>> 13;
      h8[0] &= 8191;
      h8[1] += c7;
      c7 = h8[1] >>> 13;
      h8[1] &= 8191;
      h8[2] += c7;
      g8[0] = h8[0] + 5;
      c7 = g8[0] >>> 13;
      g8[0] &= 8191;
      for (let i5 = 1; i5 < 10; i5++) {
        g8[i5] = h8[i5] + c7;
        c7 = g8[i5] >>> 13;
        g8[i5] &= 8191;
      }
      g8[9] -= 1 << 13;
      let mask2 = (c7 ^ 1) - 1;
      for (let i5 = 0; i5 < 10; i5++)
        g8[i5] &= mask2;
      mask2 = ~mask2;
      for (let i5 = 0; i5 < 10; i5++)
        h8[i5] = h8[i5] & mask2 | g8[i5];
      h8[0] = (h8[0] | h8[1] << 13) & 65535;
      h8[1] = (h8[1] >>> 3 | h8[2] << 10) & 65535;
      h8[2] = (h8[2] >>> 6 | h8[3] << 7) & 65535;
      h8[3] = (h8[3] >>> 9 | h8[4] << 4) & 65535;
      h8[4] = (h8[4] >>> 12 | h8[5] << 1 | h8[6] << 14) & 65535;
      h8[5] = (h8[6] >>> 2 | h8[7] << 11) & 65535;
      h8[6] = (h8[7] >>> 5 | h8[8] << 8) & 65535;
      h8[7] = (h8[8] >>> 8 | h8[9] << 5) & 65535;
      let f7 = h8[0] + pad4[0];
      h8[0] = f7 & 65535;
      for (let i5 = 1; i5 < 8; i5++) {
        f7 = (h8[i5] + pad4[i5] | 0) + (f7 >>> 16) | 0;
        h8[i5] = f7 & 65535;
      }
      clean3(g8);
    }
    update(data) {
      aexists3(this);
      data = toBytes4(data);
      abytes5(data);
      const { buffer: buffer2, blockLen } = this;
      const len = data.length;
      for (let pos = 0; pos < len; ) {
        const take = Math.min(blockLen - this.pos, len - pos);
        if (take === blockLen) {
          for (; blockLen <= len - pos; pos += blockLen)
            this.process(data, pos);
          continue;
        }
        buffer2.set(data.subarray(pos, pos + take), this.pos);
        this.pos += take;
        pos += take;
        if (this.pos === blockLen) {
          this.process(buffer2, 0, false);
          this.pos = 0;
        }
      }
      return this;
    }
    destroy() {
      clean3(this.h, this.r, this.buffer, this.pad);
    }
    digestInto(out) {
      aexists3(this);
      aoutput3(out, this);
      this.finished = true;
      const { buffer: buffer2, h: h8 } = this;
      let { pos } = this;
      if (pos) {
        buffer2[pos++] = 1;
        for (; pos < 16; pos++)
          buffer2[pos] = 0;
        this.process(buffer2, 0, true);
      }
      this.finalize();
      let opos = 0;
      for (let i5 = 0; i5 < 8; i5++) {
        out[opos++] = h8[i5] >>> 0;
        out[opos++] = h8[i5] >>> 8;
      }
      return out;
    }
    digest() {
      const { buffer: buffer2, outputLen } = this;
      this.digestInto(buffer2);
      const res = buffer2.slice(0, outputLen);
      this.destroy();
      return res;
    }
  };
  function wrapConstructorWithKey(hashCons) {
    const hashC = (msg, key2) => hashCons(key2).update(toBytes4(msg)).digest();
    const tmp = hashCons(new Uint8Array(32));
    hashC.outputLen = tmp.outputLen;
    hashC.blockLen = tmp.blockLen;
    hashC.create = (key2) => hashCons(key2);
    return hashC;
  }
  var poly1305 = wrapConstructorWithKey((key2) => new Poly1305(key2));

  // ../../node_modules/.pnpm/@noble+ciphers@1.3.0/node_modules/@noble/ciphers/esm/chacha.js
  function chachaCore(s3, k7, n6, out, cnt, rounds = 20) {
    let y00 = s3[0], y01 = s3[1], y02 = s3[2], y03 = s3[3], y04 = k7[0], y05 = k7[1], y06 = k7[2], y07 = k7[3], y08 = k7[4], y09 = k7[5], y102 = k7[6], y11 = k7[7], y12 = cnt, y13 = n6[0], y14 = n6[1], y15 = n6[2];
    let x00 = y00, x01 = y01, x02 = y02, x03 = y03, x04 = y04, x05 = y05, x06 = y06, x07 = y07, x08 = y08, x09 = y09, x102 = y102, x112 = y11, x122 = y12, x13 = y13, x14 = y14, x15 = y15;
    for (let r3 = 0; r3 < rounds; r3 += 2) {
      x00 = x00 + x04 | 0;
      x122 = rotl2(x122 ^ x00, 16);
      x08 = x08 + x122 | 0;
      x04 = rotl2(x04 ^ x08, 12);
      x00 = x00 + x04 | 0;
      x122 = rotl2(x122 ^ x00, 8);
      x08 = x08 + x122 | 0;
      x04 = rotl2(x04 ^ x08, 7);
      x01 = x01 + x05 | 0;
      x13 = rotl2(x13 ^ x01, 16);
      x09 = x09 + x13 | 0;
      x05 = rotl2(x05 ^ x09, 12);
      x01 = x01 + x05 | 0;
      x13 = rotl2(x13 ^ x01, 8);
      x09 = x09 + x13 | 0;
      x05 = rotl2(x05 ^ x09, 7);
      x02 = x02 + x06 | 0;
      x14 = rotl2(x14 ^ x02, 16);
      x102 = x102 + x14 | 0;
      x06 = rotl2(x06 ^ x102, 12);
      x02 = x02 + x06 | 0;
      x14 = rotl2(x14 ^ x02, 8);
      x102 = x102 + x14 | 0;
      x06 = rotl2(x06 ^ x102, 7);
      x03 = x03 + x07 | 0;
      x15 = rotl2(x15 ^ x03, 16);
      x112 = x112 + x15 | 0;
      x07 = rotl2(x07 ^ x112, 12);
      x03 = x03 + x07 | 0;
      x15 = rotl2(x15 ^ x03, 8);
      x112 = x112 + x15 | 0;
      x07 = rotl2(x07 ^ x112, 7);
      x00 = x00 + x05 | 0;
      x15 = rotl2(x15 ^ x00, 16);
      x102 = x102 + x15 | 0;
      x05 = rotl2(x05 ^ x102, 12);
      x00 = x00 + x05 | 0;
      x15 = rotl2(x15 ^ x00, 8);
      x102 = x102 + x15 | 0;
      x05 = rotl2(x05 ^ x102, 7);
      x01 = x01 + x06 | 0;
      x122 = rotl2(x122 ^ x01, 16);
      x112 = x112 + x122 | 0;
      x06 = rotl2(x06 ^ x112, 12);
      x01 = x01 + x06 | 0;
      x122 = rotl2(x122 ^ x01, 8);
      x112 = x112 + x122 | 0;
      x06 = rotl2(x06 ^ x112, 7);
      x02 = x02 + x07 | 0;
      x13 = rotl2(x13 ^ x02, 16);
      x08 = x08 + x13 | 0;
      x07 = rotl2(x07 ^ x08, 12);
      x02 = x02 + x07 | 0;
      x13 = rotl2(x13 ^ x02, 8);
      x08 = x08 + x13 | 0;
      x07 = rotl2(x07 ^ x08, 7);
      x03 = x03 + x04 | 0;
      x14 = rotl2(x14 ^ x03, 16);
      x09 = x09 + x14 | 0;
      x04 = rotl2(x04 ^ x09, 12);
      x03 = x03 + x04 | 0;
      x14 = rotl2(x14 ^ x03, 8);
      x09 = x09 + x14 | 0;
      x04 = rotl2(x04 ^ x09, 7);
    }
    let oi2 = 0;
    out[oi2++] = y00 + x00 | 0;
    out[oi2++] = y01 + x01 | 0;
    out[oi2++] = y02 + x02 | 0;
    out[oi2++] = y03 + x03 | 0;
    out[oi2++] = y04 + x04 | 0;
    out[oi2++] = y05 + x05 | 0;
    out[oi2++] = y06 + x06 | 0;
    out[oi2++] = y07 + x07 | 0;
    out[oi2++] = y08 + x08 | 0;
    out[oi2++] = y09 + x09 | 0;
    out[oi2++] = y102 + x102 | 0;
    out[oi2++] = y11 + x112 | 0;
    out[oi2++] = y12 + x122 | 0;
    out[oi2++] = y13 + x13 | 0;
    out[oi2++] = y14 + x14 | 0;
    out[oi2++] = y15 + x15 | 0;
  }
  function hchacha(s3, k7, i5, o32) {
    let x00 = s3[0], x01 = s3[1], x02 = s3[2], x03 = s3[3], x04 = k7[0], x05 = k7[1], x06 = k7[2], x07 = k7[3], x08 = k7[4], x09 = k7[5], x102 = k7[6], x112 = k7[7], x122 = i5[0], x13 = i5[1], x14 = i5[2], x15 = i5[3];
    for (let r3 = 0; r3 < 20; r3 += 2) {
      x00 = x00 + x04 | 0;
      x122 = rotl2(x122 ^ x00, 16);
      x08 = x08 + x122 | 0;
      x04 = rotl2(x04 ^ x08, 12);
      x00 = x00 + x04 | 0;
      x122 = rotl2(x122 ^ x00, 8);
      x08 = x08 + x122 | 0;
      x04 = rotl2(x04 ^ x08, 7);
      x01 = x01 + x05 | 0;
      x13 = rotl2(x13 ^ x01, 16);
      x09 = x09 + x13 | 0;
      x05 = rotl2(x05 ^ x09, 12);
      x01 = x01 + x05 | 0;
      x13 = rotl2(x13 ^ x01, 8);
      x09 = x09 + x13 | 0;
      x05 = rotl2(x05 ^ x09, 7);
      x02 = x02 + x06 | 0;
      x14 = rotl2(x14 ^ x02, 16);
      x102 = x102 + x14 | 0;
      x06 = rotl2(x06 ^ x102, 12);
      x02 = x02 + x06 | 0;
      x14 = rotl2(x14 ^ x02, 8);
      x102 = x102 + x14 | 0;
      x06 = rotl2(x06 ^ x102, 7);
      x03 = x03 + x07 | 0;
      x15 = rotl2(x15 ^ x03, 16);
      x112 = x112 + x15 | 0;
      x07 = rotl2(x07 ^ x112, 12);
      x03 = x03 + x07 | 0;
      x15 = rotl2(x15 ^ x03, 8);
      x112 = x112 + x15 | 0;
      x07 = rotl2(x07 ^ x112, 7);
      x00 = x00 + x05 | 0;
      x15 = rotl2(x15 ^ x00, 16);
      x102 = x102 + x15 | 0;
      x05 = rotl2(x05 ^ x102, 12);
      x00 = x00 + x05 | 0;
      x15 = rotl2(x15 ^ x00, 8);
      x102 = x102 + x15 | 0;
      x05 = rotl2(x05 ^ x102, 7);
      x01 = x01 + x06 | 0;
      x122 = rotl2(x122 ^ x01, 16);
      x112 = x112 + x122 | 0;
      x06 = rotl2(x06 ^ x112, 12);
      x01 = x01 + x06 | 0;
      x122 = rotl2(x122 ^ x01, 8);
      x112 = x112 + x122 | 0;
      x06 = rotl2(x06 ^ x112, 7);
      x02 = x02 + x07 | 0;
      x13 = rotl2(x13 ^ x02, 16);
      x08 = x08 + x13 | 0;
      x07 = rotl2(x07 ^ x08, 12);
      x02 = x02 + x07 | 0;
      x13 = rotl2(x13 ^ x02, 8);
      x08 = x08 + x13 | 0;
      x07 = rotl2(x07 ^ x08, 7);
      x03 = x03 + x04 | 0;
      x14 = rotl2(x14 ^ x03, 16);
      x09 = x09 + x14 | 0;
      x04 = rotl2(x04 ^ x09, 12);
      x03 = x03 + x04 | 0;
      x14 = rotl2(x14 ^ x03, 8);
      x09 = x09 + x14 | 0;
      x04 = rotl2(x04 ^ x09, 7);
    }
    let oi2 = 0;
    o32[oi2++] = x00;
    o32[oi2++] = x01;
    o32[oi2++] = x02;
    o32[oi2++] = x03;
    o32[oi2++] = x122;
    o32[oi2++] = x13;
    o32[oi2++] = x14;
    o32[oi2++] = x15;
  }
  var chacha20 = /* @__PURE__ */ createCipher(chachaCore, {
    counterRight: false,
    counterLength: 4,
    allowShortKeys: false
  });
  var xchacha20 = /* @__PURE__ */ createCipher(chachaCore, {
    counterRight: false,
    counterLength: 8,
    extendNonceFn: hchacha,
    allowShortKeys: false
  });
  var ZEROS16 = /* @__PURE__ */ new Uint8Array(16);
  var updatePadded = (h8, msg) => {
    h8.update(msg);
    const left = msg.length % 16;
    if (left)
      h8.update(ZEROS16.subarray(left));
  };
  var ZEROS32 = /* @__PURE__ */ new Uint8Array(32);
  function computeTag(fn, key2, nonce, data, AAD) {
    const authKey = fn(key2, nonce, ZEROS32);
    const h8 = poly1305.create(authKey);
    if (AAD)
      updatePadded(h8, AAD);
    updatePadded(h8, data);
    const num2 = u64Lengths(data.length, AAD ? AAD.length : 0, true);
    h8.update(num2);
    const res = h8.digest();
    clean3(authKey, num2);
    return res;
  }
  var _poly1305_aead = (xorStream) => (key2, nonce, AAD) => {
    const tagLength = 16;
    return {
      encrypt(plaintext, output) {
        const plength = plaintext.length;
        output = getOutput(plength + tagLength, output, false);
        output.set(plaintext);
        const oPlain = output.subarray(0, -tagLength);
        xorStream(key2, nonce, oPlain, oPlain, 1);
        const tag = computeTag(xorStream, key2, nonce, oPlain, AAD);
        output.set(tag, plength);
        clean3(tag);
        return output;
      },
      decrypt(ciphertext, output) {
        output = getOutput(ciphertext.length - tagLength, output, false);
        const data = ciphertext.subarray(0, -tagLength);
        const passedTag = ciphertext.subarray(-tagLength);
        const tag = computeTag(xorStream, key2, nonce, data, AAD);
        if (!equalBytes2(passedTag, tag))
          throw new Error("invalid tag");
        output.set(ciphertext.subarray(0, -tagLength));
        xorStream(key2, nonce, output, output, 1);
        clean3(tag);
        return output;
      }
    };
  };
  var chacha20poly1305 = /* @__PURE__ */ wrapCipher({ blockSize: 64, nonceLength: 12, tagLength: 16 }, _poly1305_aead(chacha20));
  var xchacha20poly1305 = /* @__PURE__ */ wrapCipher({ blockSize: 64, nonceLength: 24, tagLength: 16 }, _poly1305_aead(xchacha20));

  // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hkdf.js
  init_node_compat_inject();
  init_hmac();
  init_utils2();
  function extract3(hash5, ikm, salt) {
    ahash(hash5);
    if (salt === void 0)
      salt = new Uint8Array(hash5.outputLen);
    return hmac(hash5, toBytes2(salt), toBytes2(ikm));
  }
  var HKDF_COUNTER = /* @__PURE__ */ Uint8Array.from([0]);
  var EMPTY_BUFFER = /* @__PURE__ */ Uint8Array.of();
  function expand(hash5, prk, info, length2 = 32) {
    ahash(hash5);
    anumber(length2);
    const olen = hash5.outputLen;
    if (length2 > 255 * olen)
      throw new Error("Length should be <= 255*HashLen");
    const blocks = Math.ceil(length2 / olen);
    if (info === void 0)
      info = EMPTY_BUFFER;
    const okm = new Uint8Array(blocks * olen);
    const HMAC2 = hmac.create(hash5, prk);
    const HMACTmp = HMAC2._cloneInto();
    const T6 = new Uint8Array(HMAC2.outputLen);
    for (let counter = 0; counter < blocks; counter++) {
      HKDF_COUNTER[0] = counter + 1;
      HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T6).update(info).update(HKDF_COUNTER).digestInto(T6);
      okm.set(T6, olen * counter);
      HMAC2._cloneInto(HMACTmp);
    }
    HMAC2.destroy();
    HMACTmp.destroy();
    clean(T6, HKDF_COUNTER);
    return okm.slice(0, length2);
  }
  var hkdf = (hash5, ikm, salt, info, length2) => expand(hash5, extract3(hash5, ikm, salt), info, length2);

  // ../../node_modules/.pnpm/@walletconnect+utils@2.23.9_typescript@5.9.3_zod@4.4.3/node_modules/@walletconnect/utils/dist/index.js
  init_utils2();

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/ed25519.js
  init_node_compat_inject();
  init_sha2();
  init_utils2();

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/edwards.js
  init_node_compat_inject();
  var _0n13 = BigInt(0);
  var _1n13 = BigInt(1);
  var _2n10 = BigInt(2);
  var _8n5 = BigInt(8);
  function isEdValidXY(Fp3, CURVE, x13, y11) {
    const x22 = Fp3.sqr(x13);
    const y22 = Fp3.sqr(y11);
    const left = Fp3.add(Fp3.mul(CURVE.a, x22), y22);
    const right = Fp3.add(Fp3.ONE, Fp3.mul(CURVE.d, Fp3.mul(x22, y22)));
    return Fp3.eql(left, right);
  }
  function edwards(params, extraOpts = {}) {
    const validated = _createCurveFields("edwards", params, extraOpts, extraOpts.FpFnLE);
    const { Fp: Fp3, Fn: Fn5 } = validated;
    let CURVE = validated.CURVE;
    const { h: cofactor } = CURVE;
    _validateObject(extraOpts, {}, { uvRatio: "function" });
    const MASK = _2n10 << BigInt(Fn5.BYTES * 8) - _1n13;
    const modP3 = (n6) => Fp3.create(n6);
    const uvRatio4 = extraOpts.uvRatio || ((u4, v13) => {
      try {
        return { isValid: true, value: Fp3.sqrt(Fp3.div(u4, v13)) };
      } catch (e2) {
        return { isValid: false, value: _0n13 };
      }
    });
    if (!isEdValidXY(Fp3, CURVE, CURVE.Gx, CURVE.Gy))
      throw new Error("bad curve params: generator point");
    function acoord(title, n6, banZero = false) {
      const min = banZero ? _1n13 : _0n13;
      aInRange2("coordinate " + title, n6, min, MASK);
      return n6;
    }
    function aextpoint(other) {
      if (!(other instanceof Point5))
        throw new Error("ExtendedPoint expected");
    }
    const toAffineMemo = memoized2((p7, iz) => {
      const { X: X4, Y: Y6, Z: Z6 } = p7;
      const is0 = p7.is0();
      if (iz == null)
        iz = is0 ? _8n5 : Fp3.inv(Z6);
      const x13 = modP3(X4 * iz);
      const y11 = modP3(Y6 * iz);
      const zz = Fp3.mul(Z6, iz);
      if (is0)
        return { x: _0n13, y: _1n13 };
      if (zz !== _1n13)
        throw new Error("invZ was invalid");
      return { x: x13, y: y11 };
    });
    const assertValidMemo = memoized2((p7) => {
      const { a: a5, d: d6 } = CURVE;
      if (p7.is0())
        throw new Error("bad point: ZERO");
      const { X: X4, Y: Y6, Z: Z6, T: T6 } = p7;
      const X22 = modP3(X4 * X4);
      const Y22 = modP3(Y6 * Y6);
      const Z22 = modP3(Z6 * Z6);
      const Z42 = modP3(Z22 * Z22);
      const aX2 = modP3(X22 * a5);
      const left = modP3(Z22 * modP3(aX2 + Y22));
      const right = modP3(Z42 + modP3(d6 * modP3(X22 * Y22)));
      if (left !== right)
        throw new Error("bad point: equation left != right (1)");
      const XY = modP3(X4 * Y6);
      const ZT = modP3(Z6 * T6);
      if (XY !== ZT)
        throw new Error("bad point: equation left != right (2)");
      return true;
    });
    class Point5 {
      constructor(X4, Y6, Z6, T6) {
        this.X = acoord("x", X4);
        this.Y = acoord("y", Y6);
        this.Z = acoord("z", Z6, true);
        this.T = acoord("t", T6);
        Object.freeze(this);
      }
      static CURVE() {
        return CURVE;
      }
      static fromAffine(p7) {
        if (p7 instanceof Point5)
          throw new Error("extended point not allowed");
        const { x: x13, y: y11 } = p7 || {};
        acoord("x", x13);
        acoord("y", y11);
        return new Point5(x13, y11, _1n13, modP3(x13 * y11));
      }
      // Uses algo from RFC8032 5.1.3.
      static fromBytes(bytes, zip215 = false) {
        const len = Fp3.BYTES;
        const { a: a5, d: d6 } = CURVE;
        bytes = copyBytes(_abytes2(bytes, len, "point"));
        _abool2(zip215, "zip215");
        const normed = copyBytes(bytes);
        const lastByte = bytes[len - 1];
        normed[len - 1] = lastByte & ~128;
        const y11 = bytesToNumberLE2(normed);
        const max = zip215 ? MASK : Fp3.ORDER;
        aInRange2("point.y", y11, _0n13, max);
        const y22 = modP3(y11 * y11);
        const u4 = modP3(y22 - _1n13);
        const v13 = modP3(d6 * y22 - a5);
        let { isValid, value: x13 } = uvRatio4(u4, v13);
        if (!isValid)
          throw new Error("bad point: invalid y coordinate");
        const isXOdd = (x13 & _1n13) === _1n13;
        const isLastByteOdd = (lastByte & 128) !== 0;
        if (!zip215 && x13 === _0n13 && isLastByteOdd)
          throw new Error("bad point: x=0 and x_0=1");
        if (isLastByteOdd !== isXOdd)
          x13 = modP3(-x13);
        return Point5.fromAffine({ x: x13, y: y11 });
      }
      static fromHex(bytes, zip215 = false) {
        return Point5.fromBytes(ensureBytes2("point", bytes), zip215);
      }
      get x() {
        return this.toAffine().x;
      }
      get y() {
        return this.toAffine().y;
      }
      precompute(windowSize = 8, isLazy = true) {
        wnaf.createCache(this, windowSize);
        if (!isLazy)
          this.multiply(_2n10);
        return this;
      }
      // Useful in fromAffine() - not for fromBytes(), which always created valid points.
      assertValidity() {
        assertValidMemo(this);
      }
      // Compare one point to another.
      equals(other) {
        aextpoint(other);
        const { X: X1, Y: Y1, Z: Z1 } = this;
        const { X: X22, Y: Y22, Z: Z22 } = other;
        const X1Z2 = modP3(X1 * Z22);
        const X2Z1 = modP3(X22 * Z1);
        const Y1Z2 = modP3(Y1 * Z22);
        const Y2Z1 = modP3(Y22 * Z1);
        return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;
      }
      is0() {
        return this.equals(Point5.ZERO);
      }
      negate() {
        return new Point5(modP3(-this.X), this.Y, this.Z, modP3(-this.T));
      }
      // Fast algo for doubling Extended Point.
      // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd
      // Cost: 4M + 4S + 1*a + 6add + 1*2.
      double() {
        const { a: a5 } = CURVE;
        const { X: X1, Y: Y1, Z: Z1 } = this;
        const A7 = modP3(X1 * X1);
        const B7 = modP3(Y1 * Y1);
        const C9 = modP3(_2n10 * modP3(Z1 * Z1));
        const D7 = modP3(a5 * A7);
        const x1y1 = X1 + Y1;
        const E6 = modP3(modP3(x1y1 * x1y1) - A7 - B7);
        const G6 = D7 + B7;
        const F6 = G6 - C9;
        const H6 = D7 - B7;
        const X32 = modP3(E6 * F6);
        const Y32 = modP3(G6 * H6);
        const T32 = modP3(E6 * H6);
        const Z32 = modP3(F6 * G6);
        return new Point5(X32, Y32, Z32, T32);
      }
      // Fast algo for adding 2 Extended Points.
      // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd
      // Cost: 9M + 1*a + 1*d + 7add.
      add(other) {
        aextpoint(other);
        const { a: a5, d: d6 } = CURVE;
        const { X: X1, Y: Y1, Z: Z1, T: T1 } = this;
        const { X: X22, Y: Y22, Z: Z22, T: T22 } = other;
        const A7 = modP3(X1 * X22);
        const B7 = modP3(Y1 * Y22);
        const C9 = modP3(T1 * d6 * T22);
        const D7 = modP3(Z1 * Z22);
        const E6 = modP3((X1 + Y1) * (X22 + Y22) - A7 - B7);
        const F6 = D7 - C9;
        const G6 = D7 + C9;
        const H6 = modP3(B7 - a5 * A7);
        const X32 = modP3(E6 * F6);
        const Y32 = modP3(G6 * H6);
        const T32 = modP3(E6 * H6);
        const Z32 = modP3(F6 * G6);
        return new Point5(X32, Y32, Z32, T32);
      }
      subtract(other) {
        return this.add(other.negate());
      }
      // Constant-time multiplication.
      multiply(scalar) {
        if (!Fn5.isValidNot0(scalar))
          throw new Error("invalid scalar: expected 1 <= sc < curve.n");
        const { p: p7, f: f7 } = wnaf.cached(this, scalar, (p8) => normalizeZ(Point5, p8));
        return normalizeZ(Point5, [p7, f7])[0];
      }
      // Non-constant-time multiplication. Uses double-and-add algorithm.
      // It's faster, but should only be used when you don't care about
      // an exposed private key e.g. sig verification.
      // Does NOT allow scalars higher than CURVE.n.
      // Accepts optional accumulator to merge with multiply (important for sparse scalars)
      multiplyUnsafe(scalar, acc = Point5.ZERO) {
        if (!Fn5.isValid(scalar))
          throw new Error("invalid scalar: expected 0 <= sc < curve.n");
        if (scalar === _0n13)
          return Point5.ZERO;
        if (this.is0() || scalar === _1n13)
          return this;
        return wnaf.unsafe(this, scalar, (p7) => normalizeZ(Point5, p7), acc);
      }
      // Checks if point is of small order.
      // If you add something to small order point, you will have "dirty"
      // point with torsion component.
      // Multiplies point by cofactor and checks if the result is 0.
      isSmallOrder() {
        return this.multiplyUnsafe(cofactor).is0();
      }
      // Multiplies point by curve order and checks if the result is 0.
      // Returns `false` is the point is dirty.
      isTorsionFree() {
        return wnaf.unsafe(this, CURVE.n).is0();
      }
      // Converts Extended point to default (x, y) coordinates.
      // Can accept precomputed Z^-1 - for example, from invertBatch.
      toAffine(invertedZ) {
        return toAffineMemo(this, invertedZ);
      }
      clearCofactor() {
        if (cofactor === _1n13)
          return this;
        return this.multiplyUnsafe(cofactor);
      }
      toBytes() {
        const { x: x13, y: y11 } = this.toAffine();
        const bytes = Fp3.toBytes(y11);
        bytes[bytes.length - 1] |= x13 & _1n13 ? 128 : 0;
        return bytes;
      }
      toHex() {
        return bytesToHex2(this.toBytes());
      }
      toString() {
        return `<Point ${this.is0() ? "ZERO" : this.toHex()}>`;
      }
      // TODO: remove
      get ex() {
        return this.X;
      }
      get ey() {
        return this.Y;
      }
      get ez() {
        return this.Z;
      }
      get et() {
        return this.T;
      }
      static normalizeZ(points) {
        return normalizeZ(Point5, points);
      }
      static msm(points, scalars) {
        return pippenger2(Point5, Fn5, points, scalars);
      }
      _setWindowSize(windowSize) {
        this.precompute(windowSize);
      }
      toRawBytes() {
        return this.toBytes();
      }
    }
    Point5.BASE = new Point5(CURVE.Gx, CURVE.Gy, _1n13, modP3(CURVE.Gx * CURVE.Gy));
    Point5.ZERO = new Point5(_0n13, _1n13, _1n13, _0n13);
    Point5.Fp = Fp3;
    Point5.Fn = Fn5;
    const wnaf = new wNAF2(Point5, Fn5.BITS);
    Point5.BASE.precompute(8);
    return Point5;
  }
  var PrimeEdwardsPoint = class {
    constructor(ep) {
      this.ep = ep;
    }
    // Static methods that must be implemented by subclasses
    static fromBytes(_bytes) {
      notImplemented();
    }
    static fromHex(_hex) {
      notImplemented();
    }
    get x() {
      return this.toAffine().x;
    }
    get y() {
      return this.toAffine().y;
    }
    // Common implementations
    clearCofactor() {
      return this;
    }
    assertValidity() {
      this.ep.assertValidity();
    }
    toAffine(invertedZ) {
      return this.ep.toAffine(invertedZ);
    }
    toHex() {
      return bytesToHex2(this.toBytes());
    }
    toString() {
      return this.toHex();
    }
    isTorsionFree() {
      return true;
    }
    isSmallOrder() {
      return false;
    }
    add(other) {
      this.assertSame(other);
      return this.init(this.ep.add(other.ep));
    }
    subtract(other) {
      this.assertSame(other);
      return this.init(this.ep.subtract(other.ep));
    }
    multiply(scalar) {
      return this.init(this.ep.multiply(scalar));
    }
    multiplyUnsafe(scalar) {
      return this.init(this.ep.multiplyUnsafe(scalar));
    }
    double() {
      return this.init(this.ep.double());
    }
    negate() {
      return this.init(this.ep.negate());
    }
    precompute(windowSize, isLazy) {
      return this.init(this.ep.precompute(windowSize, isLazy));
    }
    /** @deprecated use `toBytes` */
    toRawBytes() {
      return this.toBytes();
    }
  };
  function eddsa(Point5, cHash, eddsaOpts = {}) {
    if (typeof cHash !== "function")
      throw new Error('"hash" function param is required');
    _validateObject(eddsaOpts, {}, {
      adjustScalarBytes: "function",
      randomBytes: "function",
      domain: "function",
      prehash: "function",
      mapToCurve: "function"
    });
    const { prehash } = eddsaOpts;
    const { BASE: BASE2, Fp: Fp3, Fn: Fn5 } = Point5;
    const randomBytes3 = eddsaOpts.randomBytes || randomBytes;
    const adjustScalarBytes3 = eddsaOpts.adjustScalarBytes || ((bytes) => bytes);
    const domain2 = eddsaOpts.domain || ((data, ctx, phflag) => {
      _abool2(phflag, "phflag");
      if (ctx.length || phflag)
        throw new Error("Contexts/pre-hash are not supported");
      return data;
    });
    function modN_LE(hash5) {
      return Fn5.create(bytesToNumberLE2(hash5));
    }
    function getPrivateScalar(key2) {
      const len = lengths.secretKey;
      key2 = ensureBytes2("private key", key2, len);
      const hashed = ensureBytes2("hashed private key", cHash(key2), 2 * len);
      const head = adjustScalarBytes3(hashed.slice(0, len));
      const prefix = hashed.slice(len, 2 * len);
      const scalar = modN_LE(head);
      return { head, prefix, scalar };
    }
    function getExtendedPublicKey(secretKey) {
      const { head, prefix, scalar } = getPrivateScalar(secretKey);
      const point3 = BASE2.multiply(scalar);
      const pointBytes = point3.toBytes();
      return { head, prefix, scalar, point: point3, pointBytes };
    }
    function getPublicKey2(secretKey) {
      return getExtendedPublicKey(secretKey).pointBytes;
    }
    function hashDomainToScalar(context = Uint8Array.of(), ...msgs) {
      const msg = concatBytes(...msgs);
      return modN_LE(cHash(domain2(msg, ensureBytes2("context", context), !!prehash)));
    }
    function sign6(msg, secretKey, options = {}) {
      msg = ensureBytes2("message", msg);
      if (prehash)
        msg = prehash(msg);
      const { prefix, scalar, pointBytes } = getExtendedPublicKey(secretKey);
      const r3 = hashDomainToScalar(options.context, prefix, msg);
      const R6 = BASE2.multiply(r3).toBytes();
      const k7 = hashDomainToScalar(options.context, R6, pointBytes, msg);
      const s3 = Fn5.create(r3 + k7 * scalar);
      if (!Fn5.isValid(s3))
        throw new Error("sign failed: invalid s");
      const rs = concatBytes(R6, Fn5.toBytes(s3));
      return _abytes2(rs, lengths.signature, "result");
    }
    const verifyOpts = { zip215: true };
    function verify5(sig, msg, publicKey3, options = verifyOpts) {
      const { context, zip215 } = options;
      const len = lengths.signature;
      sig = ensureBytes2("signature", sig, len);
      msg = ensureBytes2("message", msg);
      publicKey3 = ensureBytes2("publicKey", publicKey3, lengths.publicKey);
      if (zip215 !== void 0)
        _abool2(zip215, "zip215");
      if (prehash)
        msg = prehash(msg);
      const mid = len / 2;
      const r3 = sig.subarray(0, mid);
      const s3 = bytesToNumberLE2(sig.subarray(mid, len));
      let A7, R6, SB;
      try {
        A7 = Point5.fromBytes(publicKey3, zip215);
        R6 = Point5.fromBytes(r3, zip215);
        SB = BASE2.multiplyUnsafe(s3);
      } catch (error51) {
        return false;
      }
      if (!zip215 && A7.isSmallOrder())
        return false;
      const k7 = hashDomainToScalar(context, R6.toBytes(), A7.toBytes(), msg);
      const RkA = R6.add(A7.multiplyUnsafe(k7));
      return RkA.subtract(SB).clearCofactor().is0();
    }
    const _size2 = Fp3.BYTES;
    const lengths = {
      secretKey: _size2,
      publicKey: _size2,
      signature: 2 * _size2,
      seed: _size2
    };
    function randomSecretKey(seed = randomBytes3(lengths.seed)) {
      return _abytes2(seed, lengths.seed, "seed");
    }
    function keygen2(seed) {
      const secretKey = utils.randomSecretKey(seed);
      return { secretKey, publicKey: getPublicKey2(secretKey) };
    }
    function isValidSecretKey(key2) {
      return isBytes(key2) && key2.length === Fn5.BYTES;
    }
    function isValidPublicKey(key2, zip215) {
      try {
        return !!Point5.fromBytes(key2, zip215);
      } catch (error51) {
        return false;
      }
    }
    const utils = {
      getExtendedPublicKey,
      randomSecretKey,
      isValidSecretKey,
      isValidPublicKey,
      /**
       * Converts ed public key to x public key. Uses formula:
       * - ed25519:
       *   - `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`
       *   - `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`
       * - ed448:
       *   - `(u, v) = ((y-1)/(y+1), sqrt(156324)*u/x)`
       *   - `(x, y) = (sqrt(156324)*u/v, (1+u)/(1-u))`
       */
      toMontgomery(publicKey3) {
        const { y: y11 } = Point5.fromBytes(publicKey3);
        const size5 = lengths.publicKey;
        const is25519 = size5 === 32;
        if (!is25519 && size5 !== 57)
          throw new Error("only defined for 25519 and 448");
        const u4 = is25519 ? Fp3.div(_1n13 + y11, _1n13 - y11) : Fp3.div(y11 - _1n13, y11 + _1n13);
        return Fp3.toBytes(u4);
      },
      toMontgomerySecret(secretKey) {
        const size5 = lengths.secretKey;
        _abytes2(secretKey, size5);
        const hashed = cHash(secretKey.subarray(0, size5));
        return adjustScalarBytes3(hashed).subarray(0, size5);
      },
      /** @deprecated */
      randomPrivateKey: randomSecretKey,
      /** @deprecated */
      precompute(windowSize = 8, point3 = Point5.BASE) {
        return point3.precompute(windowSize, false);
      }
    };
    return Object.freeze({
      keygen: keygen2,
      getPublicKey: getPublicKey2,
      sign: sign6,
      verify: verify5,
      utils,
      Point: Point5,
      lengths
    });
  }
  function _eddsa_legacy_opts_to_new(c7) {
    const CURVE = {
      a: c7.a,
      d: c7.d,
      p: c7.Fp.ORDER,
      n: c7.n,
      h: c7.h,
      Gx: c7.Gx,
      Gy: c7.Gy
    };
    const Fp3 = c7.Fp;
    const Fn5 = Field2(CURVE.n, c7.nBitLength, true);
    const curveOpts = { Fp: Fp3, Fn: Fn5, uvRatio: c7.uvRatio };
    const eddsaOpts = {
      randomBytes: c7.randomBytes,
      adjustScalarBytes: c7.adjustScalarBytes,
      domain: c7.domain,
      prehash: c7.prehash,
      mapToCurve: c7.mapToCurve
    };
    return { CURVE, curveOpts, hash: c7.hash, eddsaOpts };
  }
  function _eddsa_new_output_to_legacy(c7, eddsa2) {
    const Point5 = eddsa2.Point;
    const legacy = Object.assign({}, eddsa2, {
      ExtendedPoint: Point5,
      CURVE: c7,
      nBitLength: Point5.Fn.BITS,
      nByteLength: Point5.Fn.BYTES
    });
    return legacy;
  }
  function twistedEdwards2(c7) {
    const { CURVE, curveOpts, hash: hash5, eddsaOpts } = _eddsa_legacy_opts_to_new(c7);
    const Point5 = edwards(CURVE, curveOpts);
    const EDDSA = eddsa(Point5, hash5, eddsaOpts);
    return _eddsa_new_output_to_legacy(c7, EDDSA);
  }

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/montgomery.js
  init_node_compat_inject();
  var _0n14 = BigInt(0);
  var _1n14 = BigInt(1);
  var _2n11 = BigInt(2);
  function validateOpts3(curve) {
    _validateObject(curve, {
      adjustScalarBytes: "function",
      powPminus2: "function"
    });
    return Object.freeze({ ...curve });
  }
  function montgomery(curveDef) {
    const CURVE = validateOpts3(curveDef);
    const { P: P8, type: type2, adjustScalarBytes: adjustScalarBytes3, powPminus2, randomBytes: rand2 } = CURVE;
    const is25519 = type2 === "x25519";
    if (!is25519 && type2 !== "x448")
      throw new Error("invalid type");
    const randomBytes_ = rand2 || randomBytes;
    const montgomeryBits = is25519 ? 255 : 448;
    const fieldLen = is25519 ? 32 : 56;
    const Gu = is25519 ? BigInt(9) : BigInt(5);
    const a24 = is25519 ? BigInt(121665) : BigInt(39081);
    const minScalar = is25519 ? _2n11 ** BigInt(254) : _2n11 ** BigInt(447);
    const maxAdded = is25519 ? BigInt(8) * _2n11 ** BigInt(251) - _1n14 : BigInt(4) * _2n11 ** BigInt(445) - _1n14;
    const maxScalar = minScalar + maxAdded + _1n14;
    const modP3 = (n6) => mod2(n6, P8);
    const GuBytes = encodeU(Gu);
    function encodeU(u4) {
      return numberToBytesLE2(modP3(u4), fieldLen);
    }
    function decodeU(u4) {
      const _u = ensureBytes2("u coordinate", u4, fieldLen);
      if (is25519)
        _u[31] &= 127;
      return modP3(bytesToNumberLE2(_u));
    }
    function decodeScalar(scalar) {
      return bytesToNumberLE2(adjustScalarBytes3(ensureBytes2("scalar", scalar, fieldLen)));
    }
    function scalarMult(scalar, u4) {
      const pu = montgomeryLadder(decodeU(u4), decodeScalar(scalar));
      if (pu === _0n14)
        throw new Error("invalid private or public key received");
      return encodeU(pu);
    }
    function scalarMultBase(scalar) {
      return scalarMult(scalar, GuBytes);
    }
    function cswap(swap, x_2, x_3) {
      const dummy = modP3(swap * (x_2 - x_3));
      x_2 = modP3(x_2 - dummy);
      x_3 = modP3(x_3 + dummy);
      return { x_2, x_3 };
    }
    function montgomeryLadder(u4, scalar) {
      aInRange2("u", u4, _0n14, P8);
      aInRange2("scalar", scalar, minScalar, maxScalar);
      const k7 = scalar;
      const x_1 = u4;
      let x_2 = _1n14;
      let z_2 = _0n14;
      let x_3 = u4;
      let z_3 = _1n14;
      let swap = _0n14;
      for (let t = BigInt(montgomeryBits - 1); t >= _0n14; t--) {
        const k_t = k7 >> t & _1n14;
        swap ^= k_t;
        ({ x_2, x_3 } = cswap(swap, x_2, x_3));
        ({ x_2: z_2, x_3: z_3 } = cswap(swap, z_2, z_3));
        swap = k_t;
        const A7 = x_2 + z_2;
        const AA = modP3(A7 * A7);
        const B7 = x_2 - z_2;
        const BB = modP3(B7 * B7);
        const E6 = AA - BB;
        const C9 = x_3 + z_3;
        const D7 = x_3 - z_3;
        const DA = modP3(D7 * A7);
        const CB = modP3(C9 * B7);
        const dacb = DA + CB;
        const da_cb = DA - CB;
        x_3 = modP3(dacb * dacb);
        z_3 = modP3(x_1 * modP3(da_cb * da_cb));
        x_2 = modP3(AA * BB);
        z_2 = modP3(E6 * (AA + modP3(a24 * E6)));
      }
      ({ x_2, x_3 } = cswap(swap, x_2, x_3));
      ({ x_2: z_2, x_3: z_3 } = cswap(swap, z_2, z_3));
      const z22 = powPminus2(z_2);
      return modP3(x_2 * z22);
    }
    const lengths = {
      secretKey: fieldLen,
      publicKey: fieldLen,
      seed: fieldLen
    };
    const randomSecretKey = (seed = randomBytes_(fieldLen)) => {
      abytes(seed, lengths.seed);
      return seed;
    };
    function keygen2(seed) {
      const secretKey = randomSecretKey(seed);
      return { secretKey, publicKey: scalarMultBase(secretKey) };
    }
    const utils = {
      randomSecretKey,
      randomPrivateKey: randomSecretKey
    };
    return {
      keygen: keygen2,
      getSharedSecret: (secretKey, publicKey3) => scalarMult(secretKey, publicKey3),
      getPublicKey: (secretKey) => scalarMultBase(secretKey),
      scalarMult,
      scalarMultBase,
      utils,
      GuBytes: GuBytes.slice(),
      lengths
    };
  }

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/ed25519.js
  var _0n15 = /* @__PURE__ */ BigInt(0);
  var _1n15 = BigInt(1);
  var _2n12 = BigInt(2);
  var _3n6 = BigInt(3);
  var _5n4 = BigInt(5);
  var _8n6 = BigInt(8);
  var ed25519_CURVE_p = BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed");
  var ed25519_CURVE2 = /* @__PURE__ */ (() => ({
    p: ed25519_CURVE_p,
    n: BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),
    h: _8n6,
    a: BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),
    d: BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),
    Gx: BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),
    Gy: BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")
  }))();
  function ed25519_pow_2_252_32(x13) {
    const _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);
    const P8 = ed25519_CURVE_p;
    const x22 = x13 * x13 % P8;
    const b22 = x22 * x13 % P8;
    const b42 = pow22(b22, _2n12, P8) * b22 % P8;
    const b52 = pow22(b42, _1n15, P8) * x13 % P8;
    const b10 = pow22(b52, _5n4, P8) * b52 % P8;
    const b20 = pow22(b10, _10n, P8) * b10 % P8;
    const b40 = pow22(b20, _20n, P8) * b20 % P8;
    const b80 = pow22(b40, _40n, P8) * b40 % P8;
    const b160 = pow22(b80, _80n, P8) * b80 % P8;
    const b240 = pow22(b160, _80n, P8) * b80 % P8;
    const b250 = pow22(b240, _10n, P8) * b10 % P8;
    const pow_p_5_8 = pow22(b250, _2n12, P8) * x13 % P8;
    return { pow_p_5_8, b2: b22 };
  }
  function adjustScalarBytes2(bytes) {
    bytes[0] &= 248;
    bytes[31] &= 127;
    bytes[31] |= 64;
    return bytes;
  }
  var ED25519_SQRT_M12 = /* @__PURE__ */ BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");
  function uvRatio3(u4, v13) {
    const P8 = ed25519_CURVE_p;
    const v32 = mod2(v13 * v13 * v13, P8);
    const v72 = mod2(v32 * v32 * v13, P8);
    const pow = ed25519_pow_2_252_32(u4 * v72).pow_p_5_8;
    let x13 = mod2(u4 * v32 * pow, P8);
    const vx2 = mod2(v13 * x13 * x13, P8);
    const root1 = x13;
    const root2 = mod2(x13 * ED25519_SQRT_M12, P8);
    const useRoot1 = vx2 === u4;
    const useRoot2 = vx2 === mod2(-u4, P8);
    const noRoot = vx2 === mod2(-u4 * ED25519_SQRT_M12, P8);
    if (useRoot1)
      x13 = root1;
    if (useRoot2 || noRoot)
      x13 = root2;
    if (isNegativeLE2(x13, P8))
      x13 = mod2(-x13, P8);
    return { isValid: useRoot1 || useRoot2, value: x13 };
  }
  var Fp2 = /* @__PURE__ */ (() => Field2(ed25519_CURVE2.p, { isLE: true }))();
  var Fn2 = /* @__PURE__ */ (() => Field2(ed25519_CURVE2.n, { isLE: true }))();
  var ed25519Defaults2 = /* @__PURE__ */ (() => ({
    ...ed25519_CURVE2,
    Fp: Fp2,
    hash: sha512,
    adjustScalarBytes: adjustScalarBytes2,
    // dom2
    // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.
    // Constant-time, u/√v
    uvRatio: uvRatio3
  }))();
  var ed255192 = /* @__PURE__ */ (() => twistedEdwards2(ed25519Defaults2))();
  var x25519 = /* @__PURE__ */ (() => {
    const P8 = Fp2.ORDER;
    return montgomery({
      P: P8,
      type: "x25519",
      powPminus2: (x13) => {
        const { pow_p_5_8, b2: b22 } = ed25519_pow_2_252_32(x13);
        return mod2(pow22(pow_p_5_8, _3n6, P8) * b22, P8);
      },
      adjustScalarBytes: adjustScalarBytes2
    });
  })();
  var SQRT_M1 = ED25519_SQRT_M12;
  var SQRT_AD_MINUS_ONE = /* @__PURE__ */ BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235");
  var INVSQRT_A_MINUS_D = /* @__PURE__ */ BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578");
  var ONE_MINUS_D_SQ = /* @__PURE__ */ BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838");
  var D_MINUS_ONE_SQ = /* @__PURE__ */ BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952");
  var invertSqrt = (number5) => uvRatio3(_1n15, number5);
  var MAX_255B = /* @__PURE__ */ BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
  var bytes255ToNumberLE = (bytes) => ed255192.Point.Fp.create(bytesToNumberLE2(bytes) & MAX_255B);
  function calcElligatorRistrettoMap(r0) {
    const { d: d6 } = ed25519_CURVE2;
    const P8 = ed25519_CURVE_p;
    const mod3 = (n6) => Fp2.create(n6);
    const r3 = mod3(SQRT_M1 * r0 * r0);
    const Ns3 = mod3((r3 + _1n15) * ONE_MINUS_D_SQ);
    let c7 = BigInt(-1);
    const D7 = mod3((c7 - d6 * r3) * mod3(r3 + d6));
    let { isValid: Ns_D_is_sq, value: s3 } = uvRatio3(Ns3, D7);
    let s_ = mod3(s3 * r0);
    if (!isNegativeLE2(s_, P8))
      s_ = mod3(-s_);
    if (!Ns_D_is_sq)
      s3 = s_;
    if (!Ns_D_is_sq)
      c7 = r3;
    const Nt5 = mod3(c7 * (r3 - _1n15) * D_MINUS_ONE_SQ - D7);
    const s22 = s3 * s3;
    const W0 = mod3((s3 + s3) * D7);
    const W1 = mod3(Nt5 * SQRT_AD_MINUS_ONE);
    const W22 = mod3(_1n15 - s22);
    const W32 = mod3(_1n15 + s22);
    return new ed255192.Point(mod3(W0 * W32), mod3(W22 * W1), mod3(W1 * W32), mod3(W0 * W22));
  }
  function ristretto255_map(bytes) {
    abytes(bytes, 64);
    const r1 = bytes255ToNumberLE(bytes.subarray(0, 32));
    const R1 = calcElligatorRistrettoMap(r1);
    const r22 = bytes255ToNumberLE(bytes.subarray(32, 64));
    const R22 = calcElligatorRistrettoMap(r22);
    return new _RistrettoPoint(R1.add(R22));
  }
  var _RistrettoPoint = class __RistrettoPoint extends PrimeEdwardsPoint {
    constructor(ep) {
      super(ep);
    }
    static fromAffine(ap) {
      return new __RistrettoPoint(ed255192.Point.fromAffine(ap));
    }
    assertSame(other) {
      if (!(other instanceof __RistrettoPoint))
        throw new Error("RistrettoPoint expected");
    }
    init(ep) {
      return new __RistrettoPoint(ep);
    }
    /** @deprecated use `import { ristretto255_hasher } from '@noble/curves/ed25519.js';` */
    static hashToCurve(hex3) {
      return ristretto255_map(ensureBytes2("ristrettoHash", hex3, 64));
    }
    static fromBytes(bytes) {
      abytes(bytes, 32);
      const { a: a5, d: d6 } = ed25519_CURVE2;
      const P8 = ed25519_CURVE_p;
      const mod3 = (n6) => Fp2.create(n6);
      const s3 = bytes255ToNumberLE(bytes);
      if (!equalBytes(Fp2.toBytes(s3), bytes) || isNegativeLE2(s3, P8))
        throw new Error("invalid ristretto255 encoding 1");
      const s22 = mod3(s3 * s3);
      const u1 = mod3(_1n15 + a5 * s22);
      const u22 = mod3(_1n15 - a5 * s22);
      const u1_2 = mod3(u1 * u1);
      const u2_2 = mod3(u22 * u22);
      const v13 = mod3(a5 * d6 * u1_2 - u2_2);
      const { isValid, value: I7 } = invertSqrt(mod3(v13 * u2_2));
      const Dx = mod3(I7 * u22);
      const Dy = mod3(I7 * Dx * v13);
      let x13 = mod3((s3 + s3) * Dx);
      if (isNegativeLE2(x13, P8))
        x13 = mod3(-x13);
      const y11 = mod3(u1 * Dy);
      const t = mod3(x13 * y11);
      if (!isValid || isNegativeLE2(t, P8) || y11 === _0n15)
        throw new Error("invalid ristretto255 encoding 2");
      return new __RistrettoPoint(new ed255192.Point(x13, y11, _1n15, t));
    }
    /**
     * Converts ristretto-encoded string to ristretto point.
     * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-decode).
     * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding
     */
    static fromHex(hex3) {
      return __RistrettoPoint.fromBytes(ensureBytes2("ristrettoHex", hex3, 32));
    }
    static msm(points, scalars) {
      return pippenger2(__RistrettoPoint, ed255192.Point.Fn, points, scalars);
    }
    /**
     * Encodes ristretto point to Uint8Array.
     * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-encode).
     */
    toBytes() {
      let { X: X4, Y: Y6, Z: Z6, T: T6 } = this.ep;
      const P8 = ed25519_CURVE_p;
      const mod3 = (n6) => Fp2.create(n6);
      const u1 = mod3(mod3(Z6 + Y6) * mod3(Z6 - Y6));
      const u22 = mod3(X4 * Y6);
      const u2sq = mod3(u22 * u22);
      const { value: invsqrt } = invertSqrt(mod3(u1 * u2sq));
      const D1 = mod3(invsqrt * u1);
      const D22 = mod3(invsqrt * u22);
      const zInv = mod3(D1 * D22 * T6);
      let D7;
      if (isNegativeLE2(T6 * zInv, P8)) {
        let _x = mod3(Y6 * SQRT_M1);
        let _y = mod3(X4 * SQRT_M1);
        X4 = _x;
        Y6 = _y;
        D7 = mod3(D1 * INVSQRT_A_MINUS_D);
      } else {
        D7 = D22;
      }
      if (isNegativeLE2(X4 * zInv, P8))
        Y6 = mod3(-Y6);
      let s3 = mod3((Z6 - Y6) * D7);
      if (isNegativeLE2(s3, P8))
        s3 = mod3(-s3);
      return Fp2.toBytes(s3);
    }
    /**
     * Compares two Ristretto points.
     * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-equals).
     */
    equals(other) {
      this.assertSame(other);
      const { X: X1, Y: Y1 } = this.ep;
      const { X: X22, Y: Y22 } = other.ep;
      const mod3 = (n6) => Fp2.create(n6);
      const one = mod3(X1 * Y22) === mod3(Y1 * X22);
      const two = mod3(Y1 * Y22) === mod3(X1 * X22);
      return one || two;
    }
    is0() {
      return this.equals(__RistrettoPoint.ZERO);
    }
  };
  _RistrettoPoint.BASE = /* @__PURE__ */ (() => new _RistrettoPoint(ed255192.Point.BASE))();
  _RistrettoPoint.ZERO = /* @__PURE__ */ (() => new _RistrettoPoint(ed255192.Point.ZERO))();
  _RistrettoPoint.Fp = /* @__PURE__ */ (() => Fp2)();
  _RistrettoPoint.Fn = /* @__PURE__ */ (() => Fn2)();

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/p256.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/nist.js
  init_node_compat_inject();
  init_sha2();
  var p256_CURVE = {
    p: BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),
    n: BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),
    h: BigInt(1),
    a: BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),
    b: BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),
    Gx: BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),
    Gy: BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")
  };
  var p384_CURVE = {
    p: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),
    n: BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),
    h: BigInt(1),
    a: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),
    b: BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),
    Gx: BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),
    Gy: BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")
  };
  var p521_CURVE = {
    p: BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),
    n: BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),
    h: BigInt(1),
    a: BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),
    b: BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),
    Gx: BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),
    Gy: BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")
  };
  var Fp256 = Field2(p256_CURVE.p);
  var Fp384 = Field2(p384_CURVE.p);
  var Fp521 = Field2(p521_CURVE.p);
  var p256 = createCurve2({ ...p256_CURVE, Fp: Fp256, lowS: false }, sha256);
  var p384 = createCurve2({ ...p384_CURVE, Fp: Fp384, lowS: false }, sha384);
  var p521 = createCurve2({ ...p521_CURVE, Fp: Fp521, lowS: false, allowedPrivateKeyLengths: [130, 131, 132] }, sha512);

  // ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/p256.js
  var p2562 = p256;

  // ../../node_modules/.pnpm/@walletconnect+relay-api@1.0.11/node_modules/@walletconnect/relay-api/dist/index.es.js
  init_node_compat_inject();
  var C3 = { waku: { publish: "waku_publish", batchPublish: "waku_batchPublish", subscribe: "waku_subscribe", batchSubscribe: "waku_batchSubscribe", subscription: "waku_subscription", unsubscribe: "waku_unsubscribe", batchUnsubscribe: "waku_batchUnsubscribe", batchFetchMessages: "waku_batchFetchMessages" }, irn: { publish: "irn_publish", batchPublish: "irn_batchPublish", subscribe: "irn_subscribe", batchSubscribe: "irn_batchSubscribe", subscription: "irn_subscription", unsubscribe: "irn_unsubscribe", batchUnsubscribe: "irn_batchUnsubscribe", batchFetchMessages: "irn_batchFetchMessages" }, iridium: { publish: "iridium_publish", batchPublish: "iridium_batchPublish", subscribe: "iridium_subscribe", batchSubscribe: "iridium_batchSubscribe", subscription: "iridium_subscription", unsubscribe: "iridium_unsubscribe", batchUnsubscribe: "iridium_batchUnsubscribe", batchFetchMessages: "iridium_batchFetchMessages" } };

  // ../../node_modules/.pnpm/@walletconnect+utils@2.23.9_typescript@5.9.3_zod@4.4.3/node_modules/@walletconnect/utils/dist/index.js
  var import_blakejs = __toESM(require_blakejs(), 1);
  var Ke2 = { INVALID_METHOD: { message: "Invalid method.", code: 1001 }, INVALID_EVENT: { message: "Invalid event.", code: 1002 }, INVALID_UPDATE_REQUEST: { message: "Invalid update request.", code: 1003 }, INVALID_EXTEND_REQUEST: { message: "Invalid extend request.", code: 1004 }, INVALID_SESSION_SETTLE_REQUEST: { message: "Invalid session settle request.", code: 1005 }, UNAUTHORIZED_METHOD: { message: "Unauthorized method.", code: 3001 }, UNAUTHORIZED_EVENT: { message: "Unauthorized event.", code: 3002 }, UNAUTHORIZED_UPDATE_REQUEST: { message: "Unauthorized update request.", code: 3003 }, UNAUTHORIZED_EXTEND_REQUEST: { message: "Unauthorized extend request.", code: 3004 }, USER_REJECTED: { message: "User rejected.", code: 5e3 }, USER_REJECTED_CHAINS: { message: "User rejected chains.", code: 5001 }, USER_REJECTED_METHODS: { message: "User rejected methods.", code: 5002 }, USER_REJECTED_EVENTS: { message: "User rejected events.", code: 5003 }, UNSUPPORTED_CHAINS: { message: "Unsupported chains.", code: 5100 }, UNSUPPORTED_METHODS: { message: "Unsupported methods.", code: 5101 }, UNSUPPORTED_EVENTS: { message: "Unsupported events.", code: 5102 }, UNSUPPORTED_ACCOUNTS: { message: "Unsupported accounts.", code: 5103 }, UNSUPPORTED_NAMESPACE_KEY: { message: "Unsupported namespace key.", code: 5104 }, USER_DISCONNECTED: { message: "User disconnected.", code: 6e3 }, SESSION_SETTLEMENT_FAILED: { message: "Session settlement failed.", code: 7e3 }, WC_METHOD_UNSUPPORTED: { message: "Unsupported wc_ method.", code: 10001 } };
  var Fe2 = { NOT_INITIALIZED: { message: "Not initialized.", code: 1 }, NO_MATCHING_KEY: { message: "No matching key.", code: 2 }, RESTORE_WILL_OVERRIDE: { message: "Restore will override.", code: 3 }, RESUBSCRIBED: { message: "Resubscribed.", code: 4 }, MISSING_OR_INVALID: { message: "Missing or invalid.", code: 5 }, EXPIRED: { message: "Expired.", code: 6 }, UNKNOWN_TYPE: { message: "Unknown type.", code: 7 }, MISMATCHED_TOPIC: { message: "Mismatched topic.", code: 8 }, NON_CONFORMING_NAMESPACES: { message: "Non conforming namespaces.", code: 9 } };
  function N10(e2, t) {
    const { message: n6, code: r3 } = Fe2[e2];
    return { message: t ? `${n6} ${t}` : n6, code: r3 };
  }
  function $2(e2, t) {
    const { message: n6, code: r3 } = Ke2[e2];
    return { message: t ? `${n6} ${t}` : n6, code: r3 };
  }
  var qe2 = "ReactNative";
  var g2 = { reactNative: "react-native", node: "node", browser: "browser", unknown: "unknown" };
  var Be3 = "js";
  function fe3() {
    return typeof process < "u" && typeof process.versions < "u" && typeof process.versions.node < "u";
  }
  function A2() {
    return !(0, import_window_getters.getDocument)() && !!(0, import_window_getters.getNavigator)() && navigator.product === qe2;
  }
  function An2() {
    return A2() && typeof global < "u" && typeof global?.Platform < "u" && global?.Platform.OS === "android";
  }
  function In2() {
    return A2() && typeof global < "u" && typeof global?.Platform < "u" && global?.Platform.OS === "ios";
  }
  function x5() {
    return !fe3() && !!(0, import_window_getters.getNavigator)() && !!(0, import_window_getters.getDocument)();
  }
  function j3() {
    return A2() ? g2.reactNative : fe3() ? g2.node : x5() ? g2.browser : g2.unknown;
  }
  function Tn2() {
    try {
      return A2() && typeof global < "u" && typeof global?.Application < "u" ? global.Application?.applicationId : void 0;
    } catch {
      return;
    }
  }
  function We2(e2, t) {
    const n6 = new URLSearchParams(e2);
    return Object.entries(t).sort(([r3], [o5]) => r3.localeCompare(o5)).forEach(([r3, o5]) => {
      o5 != null && n6.set(r3, String(o5));
    }), n6.toString();
  }
  function Je2() {
    return (0, import_window_metadata.getWindowMetadata)() || { name: "", description: "", url: "", icons: [""] };
  }
  function ze3() {
    if (j3() === g2.reactNative && typeof global < "u" && typeof global?.Platform < "u") {
      const { OS: n6, Version: r3 } = global.Platform;
      return [n6, r3].join("-");
    }
    const e2 = detect();
    if (e2 === null) return "unknown";
    const t = e2.os ? e2.os.replace(" ", "").toLowerCase() : "unknown";
    return e2.type === "browser" ? [t, e2.name, e2.version].join("-") : [t, e2.version].join("-");
  }
  function Ge3() {
    const e2 = j3();
    return e2 === g2.browser ? [e2, (0, import_window_getters.getLocation)()?.host || "unknown"].join(":") : e2;
  }
  function Ye2(e2, t, n6) {
    const r3 = ze3(), o5 = Ge3();
    return [[e2, t].join("-"), [Be3, n6].join("-"), r3, o5].join("/");
  }
  function $n2({ protocol: e2, version: t, relayUrl: n6, sdkVersion: r3, auth: o5, projectId: s3, useOnCloseEvent: i5, bundleId: a5, packageName: l6 }) {
    const c7 = n6.split("?"), d6 = Ye2(e2, t, r3), u4 = { auth: o5, ua: d6, projectId: s3, useOnCloseEvent: i5 || void 0, packageName: l6 || void 0, bundleId: a5 || void 0 }, p7 = We2(c7[1] || "", u4);
    return c7[0] + "?" + p7;
  }
  function xn2(e2) {
    return Object.fromEntries(e2.entries());
  }
  function kn2(e2) {
    return new Map(Object.entries(e2));
  }
  function Mn2(e2 = import_time3.FIVE_MINUTES, t) {
    const n6 = (0, import_time3.toMiliseconds)(e2 || import_time3.FIVE_MINUTES);
    let r3, o5, s3, i5;
    return { resolve: (a5) => {
      s3 && r3 && (clearTimeout(s3), r3(a5), i5 = Promise.resolve(a5));
    }, reject: (a5) => {
      s3 && o5 && (clearTimeout(s3), o5(a5));
    }, done: () => new Promise((a5, l6) => {
      if (i5) return a5(i5);
      s3 = setTimeout(() => {
        const c7 = N10("EXPIRED"), d6 = new Error(t || c7.message);
        d6.code = c7.code, l6(d6);
      }, n6), r3 = a5, o5 = l6;
    }) };
  }
  function Ln2(e2, t, n6) {
    return new Promise(async (r3, o5) => {
      const s3 = setTimeout(() => o5(new Error(n6)), t);
      try {
        const i5 = await e2;
        r3(i5);
      } catch (i5) {
        o5(i5);
      }
      clearTimeout(s3);
    });
  }
  function pe3(e2, t) {
    if (typeof t == "string" && t.startsWith(`${e2}:`)) return t;
    if (e2.toLowerCase() === "topic") {
      if (typeof t != "string") throw new Error('Value must be "string" for expirer target type: topic');
      return `topic:${t}`;
    } else if (e2.toLowerCase() === "id") {
      if (typeof t != "number") throw new Error('Value must be "number" for expirer target type: id');
      return `id:${t}`;
    }
    throw new Error(`Unknown expirer target type: ${e2}`);
  }
  function Kn2(e2) {
    return pe3("topic", e2);
  }
  function Fn3(e2) {
    return pe3("id", e2);
  }
  function qn2(e2) {
    const [t, n6] = e2.split(":"), r3 = { id: void 0, topic: void 0 };
    if (t === "topic" && typeof n6 == "string") r3.topic = n6;
    else if (t === "id" && Number.isInteger(Number(n6))) r3.id = Number(n6);
    else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${n6}`);
    return r3;
  }
  function Hn2(e2, t) {
    return (0, import_time3.fromMiliseconds)((t || Date.now()) + (0, import_time3.toMiliseconds)(e2));
  }
  function Bn2(e2) {
    return Date.now() >= (0, import_time3.toMiliseconds)(e2);
  }
  function Wn2(e2, t) {
    return `${e2}${t ? `:${t}` : ""}`;
  }
  function Yn2() {
    return typeof crypto < "u" && crypto?.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu, (e2) => {
      const t = Math.random() * 16 | 0;
      return (e2 === "x" ? t : t & 3 | 8).toString(16);
    });
  }
  function Qn2() {
    return typeof process < "u" && process.env.IS_VITEST === "true";
  }
  function he3(e2) {
    const t = e2 + "=".repeat((4 - e2.length % 4) % 4), n6 = atob(t), r3 = new Uint8Array(n6.length);
    for (let o5 = 0; o5 < n6.length; o5++) r3[o5] = n6.charCodeAt(o5);
    return new TextDecoder().decode(r3);
  }
  function Xn2(e2) {
    return new Promise((t) => setTimeout(t, e2));
  }
  var ve3 = "base10";
  var y4 = "base16";
  var S = "base64pad";
  var ee2 = "base64url";
  var _2 = "utf8";
  var Se3 = 0;
  var D2 = 1;
  var F = 2;
  var br2 = 0;
  var St2 = 1;
  var q2 = 12;
  var Oe3 = 32;
  function wr2() {
    const e2 = x25519.utils.randomPrivateKey(), t = x25519.getPublicKey(e2);
    return { privateKey: toString3(e2, y4), publicKey: toString3(t, y4) };
  }
  function Nr2() {
    const e2 = randomBytes(Oe3);
    return toString3(e2, y4);
  }
  function vr2(e2, t) {
    const n6 = x25519.getSharedSecret(fromString4(e2, y4), fromString4(t, y4)), r3 = hkdf(sha2562, n6, void 0, void 0, Oe3);
    return toString3(r3, y4);
  }
  function Sr2(e2) {
    const t = sha2562(fromString4(e2, y4));
    return toString3(t, y4);
  }
  function Or2(e2) {
    const t = sha2562(fromString4(e2, _2));
    return toString3(t, y4);
  }
  function Ae3(e2) {
    return fromString4(`${e2}`, ve3);
  }
  function C4(e2) {
    return Number(toString3(e2, ve3));
  }
  function Ot2(e2) {
    return e2.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
  }
  function te3(e2) {
    const t = e2.replace(/-/g, "+").replace(/_/g, "/"), n6 = (4 - t.length % 4) % 4;
    return t + "=".repeat(n6);
  }
  function Ar2(e2) {
    const t = Ae3(typeof e2.type < "u" ? e2.type : Se3);
    if (C4(t) === D2 && typeof e2.senderPublicKey > "u") throw new Error("Missing sender public key for type 1 envelope");
    const n6 = typeof e2.senderPublicKey < "u" ? fromString4(e2.senderPublicKey, y4) : void 0, r3 = typeof e2.iv < "u" ? fromString4(e2.iv, y4) : randomBytes(q2), o5 = fromString4(e2.symKey, y4), s3 = chacha20poly1305(o5, r3).encrypt(fromString4(e2.message, _2)), i5 = Ie3({ type: t, sealed: s3, iv: r3, senderPublicKey: n6 });
    return e2.encoding === ee2 ? Ot2(i5) : i5;
  }
  function Ir2(e2) {
    const t = fromString4(e2.symKey, y4), { sealed: n6, iv: r3 } = ne2({ encoded: e2.encoded, encoding: e2.encoding }), o5 = chacha20poly1305(t, r3).decrypt(n6);
    if (o5 === null) throw new Error("Failed to decrypt");
    return toString3(o5, _2);
  }
  function Tr2(e2, t) {
    const n6 = Ae3(F), r3 = randomBytes(q2), o5 = fromString4(e2, _2), s3 = Ie3({ type: n6, sealed: o5, iv: r3 });
    return t === ee2 ? Ot2(s3) : s3;
  }
  function Rr2(e2, t) {
    const { sealed: n6 } = ne2({ encoded: e2, encoding: t });
    return toString3(n6, _2);
  }
  function Ie3(e2) {
    if (C4(e2.type) === F) return toString3(concat3([e2.type, e2.sealed]), S);
    if (C4(e2.type) === D2) {
      if (typeof e2.senderPublicKey > "u") throw new Error("Missing sender public key for type 1 envelope");
      return toString3(concat3([e2.type, e2.senderPublicKey, e2.iv, e2.sealed]), S);
    }
    return toString3(concat3([e2.type, e2.iv, e2.sealed]), S);
  }
  function ne2(e2) {
    const t = (e2.encoding || S) === ee2 ? te3(e2.encoded) : e2.encoded, n6 = fromString4(t, S), r3 = n6.slice(br2, St2), o5 = St2;
    if (C4(r3) === D2) {
      const l6 = o5 + Oe3, c7 = l6 + q2, d6 = n6.slice(o5, l6), u4 = n6.slice(l6, c7), p7 = n6.slice(c7);
      return { type: r3, sealed: p7, iv: u4, senderPublicKey: d6 };
    }
    if (C4(r3) === F) {
      const l6 = n6.slice(o5), c7 = randomBytes(q2);
      return { type: r3, sealed: l6, iv: c7 };
    }
    const s3 = o5 + q2, i5 = n6.slice(o5, s3), a5 = n6.slice(s3);
    return { type: r3, sealed: a5, iv: i5 };
  }
  function Ur2(e2, t) {
    const n6 = ne2({ encoded: e2, encoding: t?.encoding });
    return At({ type: C4(n6.type), senderPublicKey: typeof n6.senderPublicKey < "u" ? toString3(n6.senderPublicKey, y4) : void 0, receiverPublicKey: t?.receiverPublicKey });
  }
  function At(e2) {
    const t = e2?.type || Se3;
    if (t === D2) {
      if (typeof e2?.senderPublicKey > "u") throw new Error("missing sender public key");
      if (typeof e2?.receiverPublicKey > "u") throw new Error("missing receiver public key");
    }
    return { type: t, senderPublicKey: e2?.senderPublicKey, receiverPublicKey: e2?.receiverPublicKey };
  }
  function $r2(e2) {
    return e2.type === D2 && typeof e2.senderPublicKey == "string" && typeof e2.receiverPublicKey == "string";
  }
  function jr2(e2) {
    return e2.type === F;
  }
  function It2(e2) {
    const t = fromString4(te3(e2.x), S), n6 = fromString4(te3(e2.y), S);
    return concat3([new Uint8Array([4]), t, n6]);
  }
  function Cr2(e2, t) {
    const [n6, r3, o5] = e2.split("."), s3 = fromString4(te3(o5), S);
    if (s3.length !== 64) throw new Error("Invalid signature length");
    const i5 = s3.slice(0, 32), a5 = s3.slice(32, 64), l6 = `${n6}.${r3}`, c7 = sha2562(l6), d6 = It2(t);
    if (!p2562.verify(concat3([i5, a5]), c7, d6)) throw new Error("Invalid signature");
    return sn(e2).payload;
  }
  var Tt2 = "irn";
  function Pr2(e2) {
    return e2?.relay || { protocol: Tt2 };
  }
  function xr2(e2) {
    const t = C3[e2];
    if (typeof t > "u") throw new Error(`Relay Protocol not supported: ${e2}`);
    return t;
  }
  function Rt2(e2, t = "-") {
    const n6 = {}, r3 = "relay" + t;
    return Object.keys(e2).forEach((o5) => {
      if (o5.startsWith(r3)) {
        const s3 = o5.replace(r3, ""), i5 = e2[o5];
        n6[s3] = i5;
      }
    }), n6;
  }
  function kr2(e2) {
    if (!e2.includes("wc:")) {
      const c7 = he3(e2);
      c7?.includes("wc:") && (e2 = c7);
    }
    e2 = e2.includes("wc://") ? e2.replace("wc://", "") : e2, e2 = e2.includes("wc:") ? e2.replace("wc:", "") : e2;
    const t = e2.indexOf(":"), n6 = e2.indexOf("?") !== -1 ? e2.indexOf("?") : void 0, r3 = e2.substring(0, t), o5 = e2.substring(t + 1, n6).split("@"), s3 = typeof n6 < "u" ? e2.substring(n6) : "", i5 = new URLSearchParams(s3), a5 = Object.fromEntries(i5.entries()), l6 = typeof a5.methods == "string" ? a5.methods.split(",") : void 0;
    return { protocol: r3, topic: Ut2(o5[0]), version: parseInt(o5[1], 10), symKey: a5.symKey, relay: Rt2(a5), methods: l6, expiryTimestamp: a5.expiryTimestamp ? parseInt(a5.expiryTimestamp, 10) : void 0 };
  }
  function Ut2(e2) {
    return e2.startsWith("//") ? e2.substring(2) : e2;
  }
  function $t2(e2, t = "-") {
    const n6 = "relay", r3 = {};
    return Object.keys(e2).forEach((o5) => {
      const s3 = o5, i5 = n6 + t + s3;
      e2[s3] && (r3[i5] = e2[s3]);
    }), r3;
  }
  function _r2(e2) {
    const t = new URLSearchParams(), n6 = { ...$t2(e2.relay), symKey: e2.symKey, ...e2.expiryTimestamp && { expiryTimestamp: e2.expiryTimestamp.toString() }, ...e2.methods && { methods: e2.methods.join(",") } };
    return Object.entries(n6).sort(([r3], [o5]) => r3.localeCompare(o5)).forEach(([r3, o5]) => {
      o5 !== void 0 && t.append(r3, String(o5));
    }), `${e2.protocol}:${e2.topic}@${e2.version}?${t}`;
  }
  function R2(e2) {
    return typeof e2 > "u";
  }
  function E3(e2, t) {
    return t && R2(e2) ? true : typeof e2 == "string" && !!e2.trim().length;
  }
  function Br2(e2) {
    function t(n6) {
      try {
        return typeof new URL(n6) < "u";
      } catch {
        return false;
      }
    }
    try {
      if (E3(e2, false)) {
        if (t(e2)) return true;
        const n6 = he3(e2);
        return t(n6);
      }
    } catch {
    }
    return false;
  }
  function Wr2(e2) {
    return e2?.proposer?.publicKey;
  }
  function Jr2(e2) {
    return e2?.topic;
  }
  function Xr2(e2) {
    return typeof e2 < "u" && typeof e2 !== null;
  }
  function uo2() {
    const e2 = j3();
    return new Promise((t) => {
      switch (e2) {
        case g2.browser:
          t(Wt2());
          break;
        case g2.reactNative:
          t(Jt2());
          break;
        case g2.node:
          t(zt2());
          break;
        default:
          t(true);
      }
    });
  }
  function Wt2() {
    return x5() && navigator?.onLine;
  }
  async function Jt2() {
    return A2() && typeof global < "u" && global?.NetInfo ? (await global?.NetInfo.fetch())?.isConnected : true;
  }
  function zt2() {
    return true;
  }
  function lo2(e2) {
    switch (j3()) {
      case g2.browser:
        Gt2(e2);
        break;
      case g2.reactNative:
        Yt2(e2);
        break;
      case g2.node:
        break;
    }
  }
  function Gt2(e2) {
    !A2() && x5() && (window.addEventListener("online", () => e2(true)), window.addEventListener("offline", () => e2(false)));
  }
  function Yt2(e2) {
    A2() && typeof global < "u" && global?.NetInfo && global?.NetInfo.addEventListener((t) => e2(t?.isConnected));
  }
  function fo2() {
    return x5() && (0, import_window_getters.getDocument)() ? (0, import_window_getters.getDocument)()?.visibilityState === "visible" : true;
  }
  function bo2({ logger: e2, name: t }) {
    const n6 = typeof e2 == "string" ? Ue({ opts: { level: e2, name: t } }).logger : e2;
    return n6.level = typeof e2 == "string" ? e2 : e2.level, n6;
  }

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-provider@1.0.14/node_modules/@walletconnect/jsonrpc-provider/dist/index.es.js
  init_node_compat_inject();
  var import_events5 = __toESM(require_events());

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/index.js
  var esm_exports = {};
  __export(esm_exports, {
    DEFAULT_ERROR: () => DEFAULT_ERROR,
    IBaseJsonRpcProvider: () => n3,
    IEvents: () => e,
    IJsonRpcConnection: () => o2,
    IJsonRpcProvider: () => r2,
    INTERNAL_ERROR: () => INTERNAL_ERROR,
    INVALID_PARAMS: () => INVALID_PARAMS,
    INVALID_REQUEST: () => INVALID_REQUEST,
    METHOD_NOT_FOUND: () => METHOD_NOT_FOUND,
    PARSE_ERROR: () => PARSE_ERROR,
    RESERVED_ERROR_CODES: () => RESERVED_ERROR_CODES,
    SERVER_ERROR: () => SERVER_ERROR,
    SERVER_ERROR_CODE_RANGE: () => SERVER_ERROR_CODE_RANGE,
    STANDARD_ERROR_MAP: () => STANDARD_ERROR_MAP,
    formatErrorMessage: () => formatErrorMessage,
    formatJsonRpcError: () => formatJsonRpcError,
    formatJsonRpcRequest: () => formatJsonRpcRequest,
    formatJsonRpcResult: () => formatJsonRpcResult,
    getBigIntRpcId: () => getBigIntRpcId,
    getError: () => getError,
    getErrorByCode: () => getErrorByCode,
    isHttpUrl: () => isHttpUrl,
    isJsonRpcError: () => isJsonRpcError,
    isJsonRpcPayload: () => isJsonRpcPayload,
    isJsonRpcRequest: () => isJsonRpcRequest,
    isJsonRpcResponse: () => isJsonRpcResponse,
    isJsonRpcResult: () => isJsonRpcResult,
    isJsonRpcValidationInvalid: () => isJsonRpcValidationInvalid,
    isLocalhostUrl: () => isLocalhostUrl,
    isNodeJs: () => isNodeJs,
    isReservedErrorCode: () => isReservedErrorCode,
    isServerErrorCode: () => isServerErrorCode,
    isValidDefaultRoute: () => isValidDefaultRoute,
    isValidErrorCode: () => isValidErrorCode,
    isValidLeadingWildcardRoute: () => isValidLeadingWildcardRoute,
    isValidRoute: () => isValidRoute,
    isValidTrailingWildcardRoute: () => isValidTrailingWildcardRoute,
    isValidWildcardRoute: () => isValidWildcardRoute,
    isWsUrl: () => isWsUrl,
    parseConnectionError: () => parseConnectionError,
    payloadId: () => payloadId,
    validateJsonRpcError: () => validateJsonRpcError
  });
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/constants.js
  init_node_compat_inject();
  var PARSE_ERROR = "PARSE_ERROR";
  var INVALID_REQUEST = "INVALID_REQUEST";
  var METHOD_NOT_FOUND = "METHOD_NOT_FOUND";
  var INVALID_PARAMS = "INVALID_PARAMS";
  var INTERNAL_ERROR = "INTERNAL_ERROR";
  var SERVER_ERROR = "SERVER_ERROR";
  var RESERVED_ERROR_CODES = [-32700, -32600, -32601, -32602, -32603];
  var SERVER_ERROR_CODE_RANGE = [-32e3, -32099];
  var STANDARD_ERROR_MAP = {
    [PARSE_ERROR]: { code: -32700, message: "Parse error" },
    [INVALID_REQUEST]: { code: -32600, message: "Invalid Request" },
    [METHOD_NOT_FOUND]: { code: -32601, message: "Method not found" },
    [INVALID_PARAMS]: { code: -32602, message: "Invalid params" },
    [INTERNAL_ERROR]: { code: -32603, message: "Internal error" },
    [SERVER_ERROR]: { code: -32e3, message: "Server error" }
  };
  var DEFAULT_ERROR = SERVER_ERROR;

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/error.js
  init_node_compat_inject();
  function isServerErrorCode(code2) {
    return code2 <= SERVER_ERROR_CODE_RANGE[0] && code2 >= SERVER_ERROR_CODE_RANGE[1];
  }
  function isReservedErrorCode(code2) {
    return RESERVED_ERROR_CODES.includes(code2);
  }
  function isValidErrorCode(code2) {
    return typeof code2 === "number";
  }
  function getError(type2) {
    if (!Object.keys(STANDARD_ERROR_MAP).includes(type2)) {
      return STANDARD_ERROR_MAP[DEFAULT_ERROR];
    }
    return STANDARD_ERROR_MAP[type2];
  }
  function getErrorByCode(code2) {
    const match = Object.values(STANDARD_ERROR_MAP).find((e2) => e2.code === code2);
    if (!match) {
      return STANDARD_ERROR_MAP[DEFAULT_ERROR];
    }
    return match;
  }
  function validateJsonRpcError(response) {
    if (typeof response.error.code === "undefined") {
      return { valid: false, error: "Missing code for JSON-RPC error" };
    }
    if (typeof response.error.message === "undefined") {
      return { valid: false, error: "Missing message for JSON-RPC error" };
    }
    if (!isValidErrorCode(response.error.code)) {
      return {
        valid: false,
        error: `Invalid error code type for JSON-RPC: ${response.error.code}`
      };
    }
    if (isReservedErrorCode(response.error.code)) {
      const error51 = getErrorByCode(response.error.code);
      if (error51.message !== STANDARD_ERROR_MAP[DEFAULT_ERROR].message && response.error.message === error51.message) {
        return {
          valid: false,
          error: `Invalid error code message for JSON-RPC: ${response.error.code}`
        };
      }
    }
    return { valid: true };
  }
  function parseConnectionError(e2, url2, type2) {
    return e2.message.includes("getaddrinfo ENOTFOUND") || e2.message.includes("connect ECONNREFUSED") ? new Error(`Unavailable ${type2} RPC url at ${url2}`) : e2;
  }

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/env.js
  var env_exports = {};
  __export(env_exports, {
    isNodeJs: () => isNodeJs
  });
  init_node_compat_inject();
  var import_environment = __toESM(require_cjs4());
  __reExport(env_exports, __toESM(require_cjs4()));
  var isNodeJs = import_environment.isNode;

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/index.js
  __reExport(esm_exports, env_exports);

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/format.js
  init_node_compat_inject();
  function payloadId(entropy = 3) {
    const date5 = Date.now() * Math.pow(10, entropy);
    const extra = Math.floor(Math.random() * Math.pow(10, entropy));
    return date5 + extra;
  }
  function getBigIntRpcId(entropy = 6) {
    return BigInt(payloadId(entropy));
  }
  function formatJsonRpcRequest(method, params, id) {
    return {
      id: id || payloadId(),
      jsonrpc: "2.0",
      method,
      params
    };
  }
  function formatJsonRpcResult(id, result) {
    return {
      id,
      jsonrpc: "2.0",
      result
    };
  }
  function formatJsonRpcError(id, error51, data) {
    return {
      id,
      jsonrpc: "2.0",
      error: formatErrorMessage(error51, data)
    };
  }
  function formatErrorMessage(error51, data) {
    if (typeof error51 === "undefined") {
      return getError(INTERNAL_ERROR);
    }
    if (typeof error51 === "string") {
      error51 = Object.assign(Object.assign({}, getError(SERVER_ERROR)), { message: error51 });
    }
    if (typeof data !== "undefined") {
      error51.data = data;
    }
    if (isReservedErrorCode(error51.code)) {
      error51 = getErrorByCode(error51.code);
    }
    return error51;
  }

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/routing.js
  init_node_compat_inject();
  function isValidRoute(route) {
    if (route.includes("*")) {
      return isValidWildcardRoute(route);
    }
    if (/\W/g.test(route)) {
      return false;
    }
    return true;
  }
  function isValidDefaultRoute(route) {
    return route === "*";
  }
  function isValidWildcardRoute(route) {
    if (isValidDefaultRoute(route)) {
      return true;
    }
    if (!route.includes("*")) {
      return false;
    }
    if (route.split("*").length !== 2) {
      return false;
    }
    if (route.split("*").filter((x13) => x13.trim() === "").length !== 1) {
      return false;
    }
    return true;
  }
  function isValidLeadingWildcardRoute(route) {
    return !isValidDefaultRoute(route) && isValidWildcardRoute(route) && !route.split("*")[0].trim();
  }
  function isValidTrailingWildcardRoute(route) {
    return !isValidDefaultRoute(route) && isValidWildcardRoute(route) && !route.split("*")[1].trim();
  }

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/types.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-types@1.0.4/node_modules/@walletconnect/jsonrpc-types/dist/index.es.js
  init_node_compat_inject();
  var e = class {
  };
  var o2 = class extends e {
    constructor(c7) {
      super();
    }
  };
  var n3 = class extends e {
    constructor() {
      super();
    }
  };
  var r2 = class extends n3 {
    constructor(c7) {
      super();
    }
  };

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/url.js
  init_node_compat_inject();
  var HTTP_REGEX = "^https?:";
  var WS_REGEX = "^wss?:";
  function getUrlProtocol(url2) {
    const matches = url2.match(new RegExp(/^\w+:/, "gi"));
    if (!matches || !matches.length)
      return;
    return matches[0];
  }
  function matchRegexProtocol(url2, regex) {
    const protocol = getUrlProtocol(url2);
    if (typeof protocol === "undefined")
      return false;
    return new RegExp(regex).test(protocol);
  }
  function isHttpUrl(url2) {
    return matchRegexProtocol(url2, HTTP_REGEX);
  }
  function isWsUrl(url2) {
    return matchRegexProtocol(url2, WS_REGEX);
  }
  function isLocalhostUrl(url2) {
    return new RegExp("wss?://localhost(:d{2,5})?").test(url2);
  }

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/validators.js
  init_node_compat_inject();
  function isJsonRpcPayload(payload) {
    return typeof payload === "object" && "id" in payload && "jsonrpc" in payload && payload.jsonrpc === "2.0";
  }
  function isJsonRpcRequest(payload) {
    return isJsonRpcPayload(payload) && "method" in payload;
  }
  function isJsonRpcResponse(payload) {
    return isJsonRpcPayload(payload) && (isJsonRpcResult(payload) || isJsonRpcError(payload));
  }
  function isJsonRpcResult(payload) {
    return "result" in payload;
  }
  function isJsonRpcError(payload) {
    return "error" in payload;
  }
  function isJsonRpcValidationInvalid(validation) {
    return "error" in validation && validation.valid === false;
  }

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-provider@1.0.14/node_modules/@walletconnect/jsonrpc-provider/dist/index.es.js
  var o3 = class extends r2 {
    constructor(t) {
      super(t), this.events = new import_events5.EventEmitter(), this.hasRegisteredEventListeners = false, this.connection = this.setConnection(t), this.connection.connected && this.registerEventListeners();
    }
    async connect(t = this.connection) {
      await this.open(t);
    }
    async disconnect() {
      await this.close();
    }
    on(t, e2) {
      this.events.on(t, e2);
    }
    once(t, e2) {
      this.events.once(t, e2);
    }
    off(t, e2) {
      this.events.off(t, e2);
    }
    removeListener(t, e2) {
      this.events.removeListener(t, e2);
    }
    async request(t, e2) {
      return this.requestStrict(formatJsonRpcRequest(t.method, t.params || [], t.id || getBigIntRpcId().toString()), e2);
    }
    async requestStrict(t, e2) {
      return new Promise(async (i5, s3) => {
        if (!this.connection.connected) try {
          await this.open();
        } catch (n6) {
          s3(n6);
        }
        this.events.on(`${t.id}`, (n6) => {
          isJsonRpcError(n6) ? s3(n6.error) : i5(n6.result);
        });
        try {
          await this.connection.send(t, e2);
        } catch (n6) {
          s3(n6);
        }
      });
    }
    setConnection(t = this.connection) {
      return t;
    }
    onPayload(t) {
      this.events.emit("payload", t), isJsonRpcResponse(t) ? this.events.emit(`${t.id}`, t) : this.events.emit("message", { type: t.method, data: t.params });
    }
    onClose(t) {
      t && t.code === 3e3 && this.events.emit("error", new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason ? `(${t.reason})` : ""}`)), this.events.emit("disconnect");
    }
    async open(t = this.connection) {
      this.connection === t && this.connection.connected || (this.connection.connected && this.close(), typeof t == "string" && (await this.connection.open(t), t = this.connection), this.connection = this.setConnection(t), await this.connection.open(), this.registerEventListeners(), this.events.emit("connect"));
    }
    async close() {
      await this.connection.close();
    }
    registerEventListeners() {
      this.hasRegisteredEventListeners || (this.connection.on("payload", (t) => this.onPayload(t)), this.connection.on("close", (t) => this.onClose(t)), this.connection.on("error", (t) => this.events.emit("error", t)), this.connection.on("register_error", (t) => this.onClose()), this.hasRegisteredEventListeners = true);
    }
  };

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-ws-connection@1.0.16_bufferutil@4.1.0/node_modules/@walletconnect/jsonrpc-ws-connection/dist/index.es.js
  init_node_compat_inject();
  var import_events6 = __toESM(require_events());
  var v6 = () => typeof WebSocket < "u" ? WebSocket : typeof global < "u" && typeof global.WebSocket < "u" ? global.WebSocket : typeof window < "u" && typeof window.WebSocket < "u" ? window.WebSocket : typeof self < "u" && typeof self.WebSocket < "u" ? self.WebSocket : require_browser4();
  var w2 = () => typeof WebSocket < "u" || typeof global < "u" && typeof global.WebSocket < "u" || typeof window < "u" && typeof window.WebSocket < "u" || typeof self < "u" && typeof self.WebSocket < "u";
  var d2 = (r3) => r3.split("?")[0];
  var h4 = 10;
  var b2 = v6();
  var f2 = class {
    constructor(e2) {
      if (this.url = e2, this.events = new import_events6.EventEmitter(), this.registering = false, !isWsUrl(e2)) throw new Error(`Provided URL is not compatible with WebSocket connection: ${e2}`);
      this.url = e2;
    }
    get connected() {
      return typeof this.socket < "u";
    }
    get connecting() {
      return this.registering;
    }
    on(e2, t) {
      this.events.on(e2, t);
    }
    once(e2, t) {
      this.events.once(e2, t);
    }
    off(e2, t) {
      this.events.off(e2, t);
    }
    removeListener(e2, t) {
      this.events.removeListener(e2, t);
    }
    async open(e2 = this.url) {
      await this.register(e2);
    }
    async close() {
      return new Promise((e2, t) => {
        if (typeof this.socket > "u") {
          t(new Error("Connection already closed"));
          return;
        }
        this.socket.onclose = (n6) => {
          this.onClose(n6), e2();
        }, this.socket.close();
      });
    }
    async send(e2) {
      typeof this.socket > "u" && (this.socket = await this.register());
      try {
        this.socket.send(safeJsonStringify(e2));
      } catch (t) {
        this.onError(e2.id, t);
      }
    }
    register(e2 = this.url) {
      if (!isWsUrl(e2)) throw new Error(`Provided URL is not compatible with WebSocket connection: ${e2}`);
      if (this.registering) {
        const t = this.events.getMaxListeners();
        return (this.events.listenerCount("register_error") >= t || this.events.listenerCount("open") >= t) && this.events.setMaxListeners(t + 1), new Promise((n6, s3) => {
          this.events.once("register_error", (o5) => {
            this.resetMaxListeners(), s3(o5);
          }), this.events.once("open", () => {
            if (this.resetMaxListeners(), typeof this.socket > "u") return s3(new Error("WebSocket connection is missing or invalid"));
            n6(this.socket);
          });
        });
      }
      return this.url = e2, this.registering = true, new Promise((t, n6) => {
        const s3 = (0, esm_exports.isReactNative)() ? void 0 : { rejectUnauthorized: !isLocalhostUrl(e2) }, o5 = new b2(e2, [], s3);
        w2() ? o5.onerror = (i5) => {
          const a5 = i5;
          n6(this.emitError(a5.error));
        } : o5.on("error", (i5) => {
          n6(this.emitError(i5));
        }), o5.onopen = () => {
          this.onOpen(o5), t(o5);
        };
      });
    }
    onOpen(e2) {
      e2.onmessage = (t) => this.onPayload(t), e2.onclose = (t) => this.onClose(t), this.socket = e2, this.registering = false, this.events.emit("open");
    }
    onClose(e2) {
      this.socket = void 0, this.registering = false, this.events.emit("close", e2);
    }
    onPayload(e2) {
      if (typeof e2.data > "u") return;
      const t = typeof e2.data == "string" ? safeJsonParse(e2.data) : e2.data;
      this.events.emit("payload", t);
    }
    onError(e2, t) {
      const n6 = this.parseError(t), s3 = n6.message || n6.toString(), o5 = formatJsonRpcError(e2, s3);
      this.events.emit("payload", o5);
    }
    parseError(e2, t = this.url) {
      return parseConnectionError(e2, d2(t), "WS");
    }
    resetMaxListeners() {
      this.events.getMaxListeners() > h4 && this.events.setMaxListeners(h4);
    }
    emitError(e2) {
      const t = this.parseError(new Error(e2?.message || `WebSocket connection failed for host: ${d2(this.url)}`));
      return this.events.emit("register_error", t), t;
    }
  };

  // ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/index.mjs
  init_node_compat_inject();

  // ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.mjs
  init_node_compat_inject();
  function isEqualsSameValueZero(value, other) {
    return value === other || Number.isNaN(value) && Number.isNaN(other);
  }

  // ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
  init_node_compat_inject();
  function getSymbols(object2) {
    return Object.getOwnPropertySymbols(object2).filter((symbol2) => Object.prototype.propertyIsEnumerable.call(object2, symbol2));
  }

  // ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
  init_node_compat_inject();
  function getTag(value) {
    if (value == null) {
      return value === void 0 ? "[object Undefined]" : "[object Null]";
    }
    return Object.prototype.toString.call(value);
  }

  // ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
  init_node_compat_inject();
  var regexpTag = "[object RegExp]";
  var stringTag = "[object String]";
  var numberTag = "[object Number]";
  var booleanTag = "[object Boolean]";
  var argumentsTag = "[object Arguments]";
  var symbolTag = "[object Symbol]";
  var dateTag = "[object Date]";
  var mapTag = "[object Map]";
  var setTag = "[object Set]";
  var arrayTag = "[object Array]";
  var functionTag = "[object Function]";
  var arrayBufferTag = "[object ArrayBuffer]";
  var objectTag = "[object Object]";
  var errorTag = "[object Error]";
  var dataViewTag = "[object DataView]";
  var uint8ArrayTag = "[object Uint8Array]";
  var uint8ClampedArrayTag = "[object Uint8ClampedArray]";
  var uint16ArrayTag = "[object Uint16Array]";
  var uint32ArrayTag = "[object Uint32Array]";
  var bigUint64ArrayTag = "[object BigUint64Array]";
  var int8ArrayTag = "[object Int8Array]";
  var int16ArrayTag = "[object Int16Array]";
  var int32ArrayTag = "[object Int32Array]";
  var bigInt64ArrayTag = "[object BigInt64Array]";
  var float32ArrayTag = "[object Float32Array]";
  var float64ArrayTag = "[object Float64Array]";

  // ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isEqual.mjs
  init_node_compat_inject();

  // ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
  init_node_compat_inject();

  // ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
  init_node_compat_inject();
  function isPlainObject2(value) {
    if (!value || typeof value !== "object") {
      return false;
    }
    const proto = Object.getPrototypeOf(value);
    const hasObjectPrototype = proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null;
    if (!hasObjectPrototype) {
      return false;
    }
    return Object.prototype.toString.call(value) === "[object Object]";
  }

  // ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
  function isEqualWith(a5, b9, areValuesEqual) {
    return isEqualWithImpl(a5, b9, void 0, void 0, void 0, void 0, areValuesEqual);
  }
  function isEqualWithImpl(a5, b9, property, aParent, bParent, stack, areValuesEqual) {
    const result = areValuesEqual(a5, b9, property, aParent, bParent, stack);
    if (result !== void 0) {
      return result;
    }
    if (typeof a5 === typeof b9) {
      switch (typeof a5) {
        case "bigint":
        case "string":
        case "boolean":
        case "symbol":
        case "undefined": {
          return a5 === b9;
        }
        case "number": {
          return a5 === b9 || Object.is(a5, b9);
        }
        case "function": {
          return a5 === b9;
        }
        case "object": {
          return areObjectsEqual(a5, b9, stack, areValuesEqual);
        }
      }
    }
    return areObjectsEqual(a5, b9, stack, areValuesEqual);
  }
  function areObjectsEqual(a5, b9, stack, areValuesEqual) {
    if (Object.is(a5, b9)) {
      return true;
    }
    let aTag = getTag(a5);
    let bTag = getTag(b9);
    if (aTag === argumentsTag) {
      aTag = objectTag;
    }
    if (bTag === argumentsTag) {
      bTag = objectTag;
    }
    if (aTag !== bTag) {
      return false;
    }
    switch (aTag) {
      case stringTag:
        return a5.toString() === b9.toString();
      case numberTag: {
        const x13 = a5.valueOf();
        const y11 = b9.valueOf();
        return isEqualsSameValueZero(x13, y11);
      }
      case booleanTag:
      case dateTag:
      case symbolTag:
        return Object.is(a5.valueOf(), b9.valueOf());
      case regexpTag: {
        return a5.source === b9.source && a5.flags === b9.flags;
      }
      case functionTag: {
        return a5 === b9;
      }
    }
    stack = stack ?? /* @__PURE__ */ new Map();
    const aStack = stack.get(a5);
    const bStack = stack.get(b9);
    if (aStack != null && bStack != null) {
      return aStack === b9;
    }
    stack.set(a5, b9);
    stack.set(b9, a5);
    try {
      switch (aTag) {
        case mapTag: {
          if (a5.size !== b9.size) {
            return false;
          }
          for (const [key2, value] of a5.entries()) {
            if (!b9.has(key2) || !isEqualWithImpl(value, b9.get(key2), key2, a5, b9, stack, areValuesEqual)) {
              return false;
            }
          }
          return true;
        }
        case setTag: {
          if (a5.size !== b9.size) {
            return false;
          }
          const aValues = Array.from(a5.values());
          const bValues = Array.from(b9.values());
          for (let i5 = 0; i5 < aValues.length; i5++) {
            const aValue = aValues[i5];
            const index2 = bValues.findIndex((bValue) => {
              return isEqualWithImpl(aValue, bValue, void 0, a5, b9, stack, areValuesEqual);
            });
            if (index2 === -1) {
              return false;
            }
            bValues.splice(index2, 1);
          }
          return true;
        }
        case arrayTag:
        case uint8ArrayTag:
        case uint8ClampedArrayTag:
        case uint16ArrayTag:
        case uint32ArrayTag:
        case bigUint64ArrayTag:
        case int8ArrayTag:
        case int16ArrayTag:
        case int32ArrayTag:
        case bigInt64ArrayTag:
        case float32ArrayTag:
        case float64ArrayTag: {
          if (typeof Buffer2 !== "undefined" && Buffer2.isBuffer(a5) !== Buffer2.isBuffer(b9)) {
            return false;
          }
          if (a5.length !== b9.length) {
            return false;
          }
          for (let i5 = 0; i5 < a5.length; i5++) {
            if (!isEqualWithImpl(a5[i5], b9[i5], i5, a5, b9, stack, areValuesEqual)) {
              return false;
            }
          }
          return true;
        }
        case arrayBufferTag: {
          if (a5.byteLength !== b9.byteLength) {
            return false;
          }
          return areObjectsEqual(new Uint8Array(a5), new Uint8Array(b9), stack, areValuesEqual);
        }
        case dataViewTag: {
          if (a5.byteLength !== b9.byteLength || a5.byteOffset !== b9.byteOffset) {
            return false;
          }
          return areObjectsEqual(new Uint8Array(a5), new Uint8Array(b9), stack, areValuesEqual);
        }
        case errorTag: {
          return a5.name === b9.name && a5.message === b9.message;
        }
        case objectTag: {
          const areEqualInstances = areObjectsEqual(a5.constructor, b9.constructor, stack, areValuesEqual) || isPlainObject2(a5) && isPlainObject2(b9);
          if (!areEqualInstances) {
            return false;
          }
          const aKeys = [...Object.keys(a5), ...getSymbols(a5)];
          const bKeys = [...Object.keys(b9), ...getSymbols(b9)];
          if (aKeys.length !== bKeys.length) {
            return false;
          }
          for (let i5 = 0; i5 < aKeys.length; i5++) {
            const propKey = aKeys[i5];
            const aProp = a5[propKey];
            if (!Object.hasOwn(b9, propKey)) {
              return false;
            }
            const bProp = b9[propKey];
            if (!isEqualWithImpl(aProp, bProp, propKey, a5, b9, stack, areValuesEqual)) {
              return false;
            }
          }
          return true;
        }
        default: {
          return false;
        }
      }
    } finally {
      stack.delete(a5);
      stack.delete(b9);
    }
  }

  // ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/noop.mjs
  init_node_compat_inject();
  function noop() {
  }

  // ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isEqual.mjs
  function isEqual2(a5, b9) {
    return isEqualWith(a5, b9, noop);
  }

  // ../../node_modules/.pnpm/@walletconnect+core@2.23.9__043c379b645642770f5431a114aef6a5/node_modules/@walletconnect/core/dist/index.js
  var import_window_getters2 = __toESM(require_cjs2(), 1);
  var ct2 = "wc";
  var lt2 = 2;
  var W4 = "core";
  var S2 = `${ct2}@2:${W4}:`;
  var Dt2 = { name: W4, logger: "error" };
  var zt3 = { database: ":memory:" };
  var Kt2 = "crypto";
  var gt2 = "client_ed25519_seed";
  var Mt2 = import_time4.ONE_DAY;
  var $t3 = "keychain";
  var Ut3 = "0.3";
  var qt2 = "messages";
  var Vt2 = "0.3";
  var Bt2 = import_time4.SIX_HOURS;
  var Ft2 = "publisher";
  var Gt3 = "irn";
  var Wt3 = "error";
  var pt = "wss://relay.walletconnect.org";
  var Ht2 = "relayer";
  var p3 = { message: "relayer_message", message_ack: "relayer_message_ack", connect: "relayer_connect", disconnect: "relayer_disconnect", error: "relayer_error", connection_stalled: "relayer_connection_stalled", transport_closed: "relayer_transport_closed", publish: "relayer_publish" };
  var Yt3 = "_subscription";
  var v7 = { payload: "payload", connect: "connect", disconnect: "disconnect", error: "error" };
  var Jt3 = 0.1;
  var Q3 = "2.23.9";
  var D3 = { link_mode: "link_mode", relay: "relay" };
  var H3 = { inbound: "inbound", outbound: "outbound" };
  var jt2 = "0.3";
  var Xt2 = "WALLETCONNECT_CLIENT_ID";
  var dt2 = "WALLETCONNECT_LINK_MODE_APPS";
  var b3 = { created: "subscription_created", deleted: "subscription_deleted", expired: "subscription_expired", disabled: "subscription_disabled", sync: "subscription_sync", resubscribed: "subscription_resubscribed" };
  var Zt2 = "subscription";
  var Qt2 = "0.3";
  var Mi = import_time4.FIVE_SECONDS * 1e3;
  var te4 = "pairing";
  var ee3 = "0.3";
  var U2 = { wc_pairingDelete: { req: { ttl: import_time4.ONE_DAY, prompt: false, tag: 1e3 }, res: { ttl: import_time4.ONE_DAY, prompt: false, tag: 1001 } }, wc_pairingPing: { req: { ttl: import_time4.THIRTY_SECONDS, prompt: false, tag: 1002 }, res: { ttl: import_time4.THIRTY_SECONDS, prompt: false, tag: 1003 } }, unregistered_method: { req: { ttl: import_time4.ONE_DAY, prompt: false, tag: 0 }, res: { ttl: import_time4.ONE_DAY, prompt: false, tag: 0 } } };
  var q3 = { create: "pairing_create", expire: "pairing_expire", delete: "pairing_delete", ping: "pairing_ping" };
  var T2 = { created: "history_created", updated: "history_updated", deleted: "history_deleted", sync: "history_sync" };
  var ie3 = "history";
  var se2 = "0.3";
  var re2 = "expirer";
  var P4 = { created: "expirer_created", deleted: "expirer_deleted", expired: "expirer_expired", sync: "expirer_sync" };
  var oe2 = "0.3";
  var ne3 = "verify-api";
  var qi = "https://verify.walletconnect.com";
  var ae2 = "https://verify.walletconnect.org";
  var Y2 = ae2;
  var he4 = `${Y2}/v3`;
  var ce2 = [qi, ae2];
  var le3 = "echo";
  var ge3 = "https://echo.walletconnect.com";
  var x6 = { pairing_started: "pairing_started", pairing_uri_validation_success: "pairing_uri_validation_success", pairing_uri_not_expired: "pairing_uri_not_expired", store_new_pairing: "store_new_pairing", subscribing_pairing_topic: "subscribing_pairing_topic", subscribe_pairing_topic_success: "subscribe_pairing_topic_success", existing_pairing: "existing_pairing", pairing_not_expired: "pairing_not_expired", emit_inactive_pairing: "emit_inactive_pairing", emit_session_proposal: "emit_session_proposal", subscribing_to_pairing_topic: "subscribing_to_pairing_topic" };
  var O3 = { no_wss_connection: "no_wss_connection", no_internet_connection: "no_internet_connection", malformed_pairing_uri: "malformed_pairing_uri", active_pairing_already_exists: "active_pairing_already_exists", subscribe_pairing_topic_failure: "subscribe_pairing_topic_failure", pairing_expired: "pairing_expired", proposal_expired: "proposal_expired", proposal_listener_not_found: "proposal_listener_not_found" };
  var pe4 = 0.1;
  var de3 = "event-client";
  var ue2 = 86400;
  var ye3 = "https://pulse.walletconnect.org/batch";
  var me3 = class {
    constructor(t, s3) {
      this.core = t, this.logger = s3, this.keychain = /* @__PURE__ */ new Map(), this.name = $t3, this.version = Ut3, this.initialized = false, this.storagePrefix = S2, this.init = async () => {
        if (!this.initialized) {
          const i5 = await this.getKeyChain();
          typeof i5 < "u" && (this.keychain = i5), this.initialized = true;
        }
      }, this.has = (i5) => (this.isInitialized(), this.keychain.has(i5)), this.set = async (i5, e2) => {
        this.isInitialized(), this.keychain.set(i5, e2), await this.persist();
      }, this.get = (i5) => {
        this.isInitialized();
        const e2 = this.keychain.get(i5);
        if (typeof e2 > "u") {
          const { message: r3 } = N10("NO_MATCHING_KEY", `${this.name}: ${i5}`);
          throw new Error(r3);
        }
        return e2;
      }, this.del = async (i5) => {
        this.isInitialized(), this.keychain.delete(i5), await this.persist();
      }, this.core = t, this.logger = Re(s3, this.name);
    }
    get context() {
      return ee(this.logger);
    }
    get storageKey() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//" + this.name;
    }
    async setKeyChain(t) {
      await this.core.storage.setItem(this.storageKey, xn2(t));
    }
    async getKeyChain() {
      const t = await this.core.storage.getItem(this.storageKey);
      return typeof t < "u" ? kn2(t) : void 0;
    }
    async persist() {
      await this.setKeyChain(this.keychain);
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: t } = N10("NOT_INITIALIZED", this.name);
        throw new Error(t);
      }
    }
  };
  var _e3 = class {
    constructor(t, s3, i5) {
      this.core = t, this.logger = s3, this.name = Kt2, this.randomSessionIdentifier = Nr2(), this.initialized = false, this.init = async () => {
        this.initialized || (await this.keychain.init(), this.initialized = true);
      }, this.hasKeys = (e2) => (this.isInitialized(), this.keychain.has(e2)), this.getClientId = async () => {
        if (this.isInitialized(), this.clientId) return this.clientId;
        const e2 = await this.getClientSeed(), r3 = Po(e2), o5 = Qe(r3.publicKey);
        return this.clientId = o5, o5;
      }, this.generateKeyPair = () => {
        this.isInitialized();
        const e2 = wr2();
        return this.setPrivateKey(e2.publicKey, e2.privateKey);
      }, this.signJWT = async (e2) => {
        this.isInitialized();
        const r3 = await this.getClientSeed(), o5 = Po(r3), n6 = this.randomSessionIdentifier, a5 = Mt2;
        return await Qo(n6, e2, a5, o5);
      }, this.generateSharedKey = (e2, r3, o5) => {
        this.isInitialized();
        const n6 = this.getPrivateKey(e2), a5 = vr2(n6, r3);
        return this.setSymKey(a5, o5);
      }, this.setSymKey = async (e2, r3) => {
        this.isInitialized();
        const o5 = r3 || Sr2(e2);
        return await this.keychain.set(o5, e2), o5;
      }, this.deleteKeyPair = async (e2) => {
        this.isInitialized(), await this.keychain.del(e2);
      }, this.deleteSymKey = async (e2) => {
        this.isInitialized(), await this.keychain.del(e2);
      }, this.encode = async (e2, r3, o5) => {
        this.isInitialized();
        const n6 = At(o5), a5 = safeJsonStringify(r3);
        if (jr2(n6)) return Tr2(a5, o5?.encoding);
        if ($r2(n6)) {
          const g8 = n6.senderPublicKey, _6 = n6.receiverPublicKey;
          e2 = await this.generateSharedKey(g8, _6);
        }
        const h8 = this.getSymKey(e2), { type: d6, senderPublicKey: l6 } = n6;
        return Ar2({ type: d6, symKey: h8, message: a5, senderPublicKey: l6, encoding: o5?.encoding });
      }, this.decode = async (e2, r3, o5) => {
        this.isInitialized();
        const n6 = Ur2(r3, o5);
        if (jr2(n6)) {
          const a5 = Rr2(r3, o5?.encoding);
          return safeJsonParse(a5);
        }
        if ($r2(n6)) {
          const a5 = n6.receiverPublicKey, h8 = n6.senderPublicKey;
          e2 = await this.generateSharedKey(a5, h8);
        }
        try {
          const a5 = this.getSymKey(e2), h8 = Ir2({ symKey: a5, encoded: r3, encoding: o5?.encoding });
          return safeJsonParse(h8);
        } catch (a5) {
          this.logger.error(`Failed to decode message from topic: '${e2}', clientId: '${await this.getClientId()}'`), this.logger.error(a5);
        }
      }, this.getPayloadType = (e2, r3 = S) => {
        const o5 = ne2({ encoded: e2, encoding: r3 });
        return C4(o5.type);
      }, this.getPayloadSenderPublicKey = (e2, r3 = S) => {
        const o5 = ne2({ encoded: e2, encoding: r3 });
        return o5.senderPublicKey ? toString3(o5.senderPublicKey, y4) : void 0;
      }, this.core = t, this.logger = Re(s3, this.name), this.keychain = i5 || new me3(this.core, this.logger);
    }
    get context() {
      return ee(this.logger);
    }
    async setPrivateKey(t, s3) {
      return await this.keychain.set(t, s3), t;
    }
    getPrivateKey(t) {
      return this.keychain.get(t);
    }
    async getClientSeed() {
      let t = "";
      try {
        t = this.keychain.get(gt2);
      } catch {
        t = Nr2(), await this.keychain.set(gt2, t);
      }
      return fromString4(t, "base16");
    }
    getSymKey(t) {
      return this.keychain.get(t);
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: t } = N10("NOT_INITIALIZED", this.name);
        throw new Error(t);
      }
    }
  };
  var be3 = class extends a2 {
    constructor(t, s3) {
      super(t, s3), this.logger = t, this.core = s3, this.messages = /* @__PURE__ */ new Map(), this.messagesWithoutClientAck = /* @__PURE__ */ new Map(), this.name = qt2, this.version = Vt2, this.initialized = false, this.storagePrefix = S2, this.init = async () => {
        if (!this.initialized) {
          this.logger.trace("Initialized");
          try {
            const i5 = await this.getRelayerMessages();
            typeof i5 < "u" && (this.messages = i5);
            const e2 = await this.getRelayerMessagesWithoutClientAck();
            typeof e2 < "u" && (this.messagesWithoutClientAck = e2), this.logger.debug(`Successfully Restored records for ${this.name}`), this.logger.trace({ type: "method", method: "restore", size: this.messages.size });
          } catch (i5) {
            this.logger.debug(`Failed to Restore records for ${this.name}`), this.logger.error(i5);
          } finally {
            this.initialized = true;
          }
        }
      }, this.set = async (i5, e2, r3) => {
        this.isInitialized();
        const o5 = Or2(e2);
        let n6 = this.messages.get(i5);
        if (typeof n6 > "u" && (n6 = {}), typeof n6[o5] < "u") return o5;
        if (n6[o5] = e2, this.messages.set(i5, n6), r3 === H3.inbound) {
          const a5 = this.messagesWithoutClientAck.get(i5) || {};
          this.messagesWithoutClientAck.set(i5, { ...a5, [o5]: e2 });
        }
        return await this.persist(), o5;
      }, this.get = (i5) => {
        this.isInitialized();
        let e2 = this.messages.get(i5);
        return typeof e2 > "u" && (e2 = {}), e2;
      }, this.getWithoutAck = (i5) => {
        this.isInitialized();
        const e2 = {};
        for (const r3 of i5) {
          const o5 = this.messagesWithoutClientAck.get(r3) || {};
          e2[r3] = Object.values(o5);
        }
        return e2;
      }, this.has = (i5, e2) => {
        this.isInitialized();
        const r3 = this.get(i5), o5 = Or2(e2);
        return typeof r3[o5] < "u";
      }, this.ack = async (i5, e2) => {
        this.isInitialized();
        const r3 = this.messagesWithoutClientAck.get(i5);
        if (typeof r3 > "u") return;
        const o5 = Or2(e2);
        delete r3[o5], Object.keys(r3).length === 0 ? this.messagesWithoutClientAck.delete(i5) : this.messagesWithoutClientAck.set(i5, r3), await this.persist();
      }, this.del = async (i5) => {
        this.isInitialized(), this.messages.delete(i5), this.messagesWithoutClientAck.delete(i5), await this.persist();
      }, this.logger = Re(t, this.name), this.core = s3;
    }
    get context() {
      return ee(this.logger);
    }
    get storageKey() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//" + this.name;
    }
    get storageKeyWithoutClientAck() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//" + this.name + "_withoutClientAck";
    }
    async setRelayerMessages(t) {
      await this.core.storage.setItem(this.storageKey, xn2(t));
    }
    async setRelayerMessagesWithoutClientAck(t) {
      await this.core.storage.setItem(this.storageKeyWithoutClientAck, xn2(t));
    }
    async getRelayerMessages() {
      const t = await this.core.storage.getItem(this.storageKey);
      return typeof t < "u" ? kn2(t) : void 0;
    }
    async getRelayerMessagesWithoutClientAck() {
      const t = await this.core.storage.getItem(this.storageKeyWithoutClientAck);
      return typeof t < "u" ? kn2(t) : void 0;
    }
    async persist() {
      await this.setRelayerMessages(this.messages), await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck);
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: t } = N10("NOT_INITIALIZED", this.name);
        throw new Error(t);
      }
    }
  };
  var Hi = class extends g {
    constructor(t, s3) {
      super(t, s3), this.relayer = t, this.logger = s3, this.events = new import_events7.EventEmitter(), this.name = Ft2, this.queue = /* @__PURE__ */ new Map(), this.publishTimeout = (0, import_time4.toMiliseconds)(import_time4.ONE_MINUTE), this.initialPublishTimeout = (0, import_time4.toMiliseconds)(import_time4.ONE_SECOND * 15), this.needsTransportRestart = false, this.publish = async (i5, e2, r3) => {
        this.logger.debug("Publishing Payload"), this.logger.trace({ type: "method", method: "publish", params: { topic: i5, message: e2, opts: r3 } });
        const o5 = r3?.ttl || Bt2, n6 = r3?.prompt || false, a5 = r3?.tag || 0, h8 = r3?.id || getBigIntRpcId().toString(), d6 = xr2(Pr2().protocol), l6 = { id: h8, method: r3?.publishMethod || d6.publish, params: { topic: i5, message: e2, ttl: o5, prompt: n6, tag: a5, attestation: r3?.attestation, ...r3?.tvf } }, g8 = `Failed to publish payload, please try again. id:${h8} tag:${a5}`;
        try {
          R2(l6.params?.prompt) && delete l6.params?.prompt, R2(l6.params?.tag) && delete l6.params?.tag;
          const _6 = new Promise(async (E6) => {
            const u4 = ({ id: m3 }) => {
              l6.id?.toString() === m3.toString() && (this.removeRequestFromQueue(m3), this.relayer.events.removeListener(p3.publish, u4), E6());
            };
            this.relayer.events.on(p3.publish, u4);
            const N13 = Ln2(new Promise((m3, C9) => {
              this.rpcPublish(l6, r3).then(m3).catch((k7) => {
                this.logger.warn(k7, k7?.message), C9(k7);
              });
            }), this.initialPublishTimeout, `Failed initial publish, retrying.... id:${h8} tag:${a5}`);
            try {
              await N13, this.events.removeListener(p3.publish, u4);
            } catch (m3) {
              this.queue.set(h8, { request: l6, opts: r3, attempt: 1 }), this.logger.warn(m3, m3?.message);
            }
          });
          this.logger.trace({ type: "method", method: "publish", params: { id: h8, topic: i5, message: e2, opts: r3 } }), await Ln2(_6, this.publishTimeout, g8);
        } catch (_6) {
          if (this.logger.debug("Failed to Publish Payload"), this.logger.error(_6), r3?.internal?.throwOnFailedPublish) throw _6;
        } finally {
          this.queue.delete(h8);
        }
      }, this.publishCustom = async (i5) => {
        this.logger.debug("Publishing custom payload"), this.logger.trace({ type: "method", method: "publishCustom", params: i5 });
        const { payload: e2, opts: r3 = {} } = i5, { attestation: o5, tvf: n6, publishMethod: a5, prompt: h8, tag: d6, ttl: l6 = import_time4.FIVE_MINUTES } = r3, g8 = r3.id || getBigIntRpcId().toString(), _6 = xr2(Pr2().protocol), E6 = a5 || _6.publish, u4 = { id: g8, method: E6, params: { ...e2, ttl: l6, prompt: h8, tag: d6, attestation: o5, ...n6 } }, N13 = `Failed to publish custom payload, please try again. id:${g8} tag:${d6}`;
        try {
          R2(u4.params?.prompt) && delete u4.params?.prompt, R2(u4.params?.tag) && delete u4.params?.tag;
          const m3 = new Promise(async (C9) => {
            const k7 = ({ id: L6 }) => {
              u4.id?.toString() === L6.toString() && (this.removeRequestFromQueue(L6), this.relayer.events.removeListener(p3.publish, k7), C9());
            };
            this.relayer.events.on(p3.publish, k7);
            const Oe4 = Ln2(new Promise((L6, Ae5) => {
              this.rpcPublish(u4, r3).then(L6).catch((tt4) => {
                this.logger.warn(tt4, tt4?.message), Ae5(tt4);
              });
            }), this.initialPublishTimeout, `Failed initial custom payload publish, retrying.... method:${E6} id:${g8} tag:${d6}`);
            try {
              await Oe4, this.events.removeListener(p3.publish, k7);
            } catch (L6) {
              this.queue.set(g8, { request: u4, opts: r3, attempt: 1 }), this.logger.warn(L6, L6?.message);
            }
          });
          this.logger.trace({ type: "method", method: "publish", params: { id: g8, payload: e2, opts: r3 } }), await Ln2(m3, this.publishTimeout, N13);
        } catch (m3) {
          if (this.logger.debug("Failed to Publish Payload"), this.logger.error(m3), r3?.internal?.throwOnFailedPublish) throw m3;
        } finally {
          this.queue.delete(g8);
        }
      }, this.on = (i5, e2) => {
        this.events.on(i5, e2);
      }, this.once = (i5, e2) => {
        this.events.once(i5, e2);
      }, this.off = (i5, e2) => {
        this.events.off(i5, e2);
      }, this.removeListener = (i5, e2) => {
        this.events.removeListener(i5, e2);
      }, this.relayer = t, this.logger = Re(s3, this.name), this.registerEventListeners();
    }
    get context() {
      return ee(this.logger);
    }
    async rpcPublish(t, s3) {
      this.logger.debug("Outgoing Relay Payload"), this.logger.trace({ type: "message", direction: "outgoing", request: t });
      const i5 = await this.relayer.request(t);
      return this.relayer.events.emit(p3.publish, { ...t, ...s3 }), this.logger.debug("Successfully Published Payload"), i5;
    }
    removeRequestFromQueue(t) {
      this.queue.delete(t);
    }
    checkQueue() {
      this.queue.forEach(async (t, s3) => {
        const i5 = t.attempt + 1;
        this.queue.set(s3, { ...t, attempt: i5 }), this.logger.warn({}, `Publisher: queue->publishing: ${t.request.id}, tag: ${t.request.params?.tag}, attempt: ${i5}`), await this.rpcPublish(t.request, t.opts), this.logger.warn({}, `Publisher: queue->published: ${t.request.id}`);
      });
    }
    registerEventListeners() {
      this.relayer.core.heartbeat.on(r.pulse, () => {
        if (this.needsTransportRestart) {
          this.needsTransportRestart = false, this.relayer.events.emit(p3.connection_stalled);
          return;
        }
        this.checkQueue();
      }), this.relayer.on(p3.message_ack, (t) => {
        this.removeRequestFromQueue(t.id.toString());
      });
    }
  };
  var Yi = class {
    constructor() {
      this.map = /* @__PURE__ */ new Map(), this.set = (t, s3) => {
        const i5 = this.get(t);
        this.exists(t, s3) || this.map.set(t, [...i5, s3]);
      }, this.get = (t) => this.map.get(t) || [], this.exists = (t, s3) => this.get(t).includes(s3), this.delete = (t, s3) => {
        if (typeof s3 > "u") {
          this.map.delete(t);
          return;
        }
        if (!this.map.has(t)) return;
        const i5 = this.get(t);
        if (!this.exists(t, s3)) return;
        const e2 = i5.filter((r3) => r3 !== s3);
        if (!e2.length) {
          this.map.delete(t);
          return;
        }
        this.map.set(t, e2);
      }, this.clear = () => {
        this.map.clear();
      };
    }
    get topics() {
      return Array.from(this.map.keys());
    }
  };
  var we3 = class extends d {
    constructor(t, s3) {
      super(t, s3), this.relayer = t, this.logger = s3, this.subscriptions = /* @__PURE__ */ new Map(), this.topicMap = new Yi(), this.events = new import_events7.EventEmitter(), this.name = Zt2, this.version = Qt2, this.pending = /* @__PURE__ */ new Map(), this.cached = [], this.initialized = false, this.storagePrefix = S2, this.subscribeTimeout = (0, import_time4.toMiliseconds)(import_time4.ONE_MINUTE), this.initialSubscribeTimeout = (0, import_time4.toMiliseconds)(import_time4.ONE_SECOND * 15), this.batchSubscribeTopicsLimit = 500, this.init = async () => {
        this.initialized || (this.logger.trace("Initialized"), this.registerEventListeners(), await this.restore()), this.initialized = true;
      }, this.subscribe = async (i5, e2) => {
        this.isInitialized(), this.logger.debug("Subscribing Topic"), this.logger.trace({ type: "method", method: "subscribe", params: { topic: i5, opts: e2 } });
        try {
          const r3 = Pr2(e2), o5 = { topic: i5, relay: r3, transportType: e2?.transportType };
          e2?.internal?.skipSubscribe || this.pending.set(i5, o5);
          const n6 = await this.rpcSubscribe(i5, r3, e2);
          return typeof n6 == "string" && (this.onSubscribe(n6, o5), this.logger.debug("Successfully Subscribed Topic"), this.logger.trace({ type: "method", method: "subscribe", params: { topic: i5, opts: e2 } })), n6;
        } catch (r3) {
          throw this.logger.debug("Failed to Subscribe Topic"), this.logger.error(r3), r3;
        }
      }, this.unsubscribe = async (i5, e2) => {
        this.isInitialized(), typeof e2?.id < "u" ? await this.unsubscribeById(i5, e2.id, e2) : await this.unsubscribeByTopic(i5, e2);
      }, this.isSubscribed = (i5) => new Promise((e2) => {
        e2(this.topicMap.topics.includes(i5));
      }), this.isKnownTopic = (i5) => new Promise((e2) => {
        e2(this.topicMap.topics.includes(i5) || this.pending.has(i5) || this.cached.some((r3) => r3.topic === i5));
      }), this.on = (i5, e2) => {
        this.events.on(i5, e2);
      }, this.once = (i5, e2) => {
        this.events.once(i5, e2);
      }, this.off = (i5, e2) => {
        this.events.off(i5, e2);
      }, this.removeListener = (i5, e2) => {
        this.events.removeListener(i5, e2);
      }, this.start = async () => {
        await this.onConnect();
      }, this.stop = async () => {
        await this.onDisconnect();
      }, this.restart = async () => {
        await this.restore(), await this.onRestart();
      }, this.checkPending = async () => {
        if (this.pending.size === 0 && (!this.initialized || !this.relayer.connected)) return;
        const i5 = [];
        this.pending.forEach((e2) => {
          i5.push(e2);
        }), await this.batchSubscribe(i5);
      }, this.registerEventListeners = () => {
        this.relayer.core.heartbeat.on(r.pulse, async () => {
          await this.checkPending();
        }), this.events.on(b3.created, async (i5) => {
          const e2 = b3.created;
          this.logger.info(`Emitting ${e2}`), this.logger.debug({ type: "event", event: e2, data: i5 }), await this.persist();
        }), this.events.on(b3.deleted, async (i5) => {
          const e2 = b3.deleted;
          this.logger.info(`Emitting ${e2}`), this.logger.debug({ type: "event", event: e2, data: i5 }), await this.persist();
        });
      }, this.relayer = t, this.logger = Re(s3, this.name), this.clientId = "";
    }
    get context() {
      return ee(this.logger);
    }
    get storageKey() {
      return this.storagePrefix + this.version + this.relayer.core.customStoragePrefix + "//" + this.name;
    }
    get length() {
      return this.subscriptions.size;
    }
    get ids() {
      return Array.from(this.subscriptions.keys());
    }
    get values() {
      return Array.from(this.subscriptions.values());
    }
    get topics() {
      return this.topicMap.topics;
    }
    get hasAnyTopics() {
      return this.topicMap.topics.length > 0 || this.pending.size > 0 || this.cached.length > 0 || this.subscriptions.size > 0;
    }
    hasSubscription(t, s3) {
      let i5 = false;
      try {
        i5 = this.getSubscription(t).topic === s3;
      } catch {
      }
      return i5;
    }
    reset() {
      this.cached = [], this.initialized = true;
    }
    onDisable() {
      this.values.length > 0 && (this.cached = this.values), this.subscriptions.clear(), this.topicMap.clear();
    }
    async unsubscribeByTopic(t, s3) {
      const i5 = this.topicMap.get(t);
      await Promise.all(i5.map(async (e2) => await this.unsubscribeById(t, e2, s3)));
    }
    async unsubscribeById(t, s3, i5) {
      this.logger.debug("Unsubscribing Topic"), this.logger.trace({ type: "method", method: "unsubscribe", params: { topic: t, id: s3, opts: i5 } });
      try {
        const e2 = $2("USER_DISCONNECTED", `${this.name}, ${t}`);
        await this.onUnsubscribe(t, s3, e2);
        const r3 = Pr2(i5);
        await this.restartToComplete({ topic: t, id: s3, relay: r3 }), await this.rpcUnsubscribe(t, s3, r3), this.logger.debug("Successfully Unsubscribed Topic"), this.logger.trace({ type: "method", method: "unsubscribe", params: { topic: t, id: s3, opts: i5 } });
      } catch (e2) {
        throw this.logger.debug("Failed to Unsubscribe Topic"), this.logger.error(e2), e2;
      }
    }
    async rpcSubscribe(t, s3, i5) {
      const e2 = await this.getSubscriptionId(t);
      if (i5?.internal?.skipSubscribe) return e2;
      (!i5 || i5?.transportType === D3.relay) && await this.restartToComplete({ topic: t, id: t, relay: s3 });
      const r3 = { method: xr2(s3.protocol).subscribe, params: { topic: t } };
      this.logger.debug("Outgoing Relay Payload"), this.logger.trace({ type: "payload", direction: "outgoing", request: r3 });
      const o5 = i5?.internal?.throwOnFailedPublish;
      try {
        if (i5?.transportType === D3.link_mode) return setTimeout(() => {
          (this.relayer.connected || this.relayer.connecting) && this.relayer.request(r3).catch((h8) => this.logger.warn(h8));
        }, (0, import_time4.toMiliseconds)(import_time4.ONE_SECOND)), e2;
        const n6 = new Promise(async (h8) => {
          const d6 = (l6) => {
            l6.topic === t && (this.events.removeListener(b3.created, d6), h8(l6.id));
          };
          this.events.on(b3.created, d6);
          try {
            const l6 = await Ln2(new Promise((g8, _6) => {
              this.relayer.request(r3).catch((E6) => {
                this.logger.warn(E6, E6?.message), _6(E6);
              }).then(g8);
            }), this.initialSubscribeTimeout, `Subscribing to ${t} failed, please try again`);
            this.events.removeListener(b3.created, d6), h8(l6);
          } catch {
          }
        }), a5 = await Ln2(n6, this.subscribeTimeout, `Subscribing to ${t} failed, please try again`);
        if (!a5 && o5) throw new Error(`Subscribing to ${t} failed, please try again`);
        return a5 ? e2 : null;
      } catch (n6) {
        if (this.logger.debug("Outgoing Relay Subscribe Payload stalled"), this.relayer.events.emit(p3.connection_stalled), o5) throw n6;
      }
      return null;
    }
    async rpcBatchSubscribe(t) {
      if (!t.length) return true;
      const s3 = t[0].relay, i5 = { method: xr2(s3.protocol).batchSubscribe, params: { topics: t.map((e2) => e2.topic) } };
      this.logger.debug("Outgoing Relay Payload"), this.logger.trace({ type: "payload", direction: "outgoing", request: i5 });
      try {
        return await Ln2(new Promise((e2, r3) => {
          this.relayer.request(i5).then(e2).catch((o5) => {
            this.logger.warn(o5), r3(o5);
          });
        }), this.subscribeTimeout, "rpcBatchSubscribe failed, please try again"), true;
      } catch {
        return this.relayer.events.emit(p3.connection_stalled), false;
      }
    }
    async rpcBatchFetchMessages(t) {
      if (!t.length) return;
      const s3 = t[0].relay, i5 = { method: xr2(s3.protocol).batchFetchMessages, params: { topics: t.map((r3) => r3.topic) } };
      this.logger.debug("Outgoing Relay Payload"), this.logger.trace({ type: "payload", direction: "outgoing", request: i5 });
      let e2;
      try {
        e2 = await await Ln2(new Promise((r3, o5) => {
          this.relayer.request(i5).catch((n6) => {
            this.logger.warn(n6), o5(n6);
          }).then(r3);
        }), this.subscribeTimeout, "rpcBatchFetchMessages failed, please try again");
      } catch {
        this.relayer.events.emit(p3.connection_stalled);
      }
      return e2;
    }
    rpcUnsubscribe(t, s3, i5) {
      const e2 = { method: xr2(i5.protocol).unsubscribe, params: { topic: t, id: s3 } };
      return this.logger.debug("Outgoing Relay Payload"), this.logger.trace({ type: "payload", direction: "outgoing", request: e2 }), this.relayer.request(e2);
    }
    onSubscribe(t, s3) {
      this.setSubscription(t, { ...s3, id: t }), this.pending.delete(s3.topic);
    }
    onBatchSubscribe(t) {
      t.length && t.forEach((s3) => {
        this.setSubscription(s3.id, { ...s3 }), this.pending.delete(s3.topic);
      });
    }
    async onUnsubscribe(t, s3, i5) {
      this.events.removeAllListeners(s3), this.hasSubscription(s3, t) && this.deleteSubscription(s3, i5), await this.relayer.messages.del(t);
    }
    async setRelayerSubscriptions(t) {
      await this.relayer.core.storage.setItem(this.storageKey, t);
    }
    async getRelayerSubscriptions() {
      return await this.relayer.core.storage.getItem(this.storageKey);
    }
    setSubscription(t, s3) {
      this.logger.debug("Setting subscription"), this.logger.trace({ type: "method", method: "setSubscription", id: t, subscription: s3 }), this.addSubscription(t, s3);
    }
    addSubscription(t, s3) {
      this.subscriptions.set(t, { ...s3 }), this.topicMap.set(s3.topic, t), this.events.emit(b3.created, s3);
    }
    getSubscription(t) {
      this.logger.debug("Getting subscription"), this.logger.trace({ type: "method", method: "getSubscription", id: t });
      const s3 = this.subscriptions.get(t);
      if (!s3) {
        const { message: i5 } = N10("NO_MATCHING_KEY", `${this.name}: ${t}`);
        throw new Error(i5);
      }
      return s3;
    }
    deleteSubscription(t, s3) {
      this.logger.debug("Deleting subscription"), this.logger.trace({ type: "method", method: "deleteSubscription", id: t, reason: s3 });
      const i5 = this.getSubscription(t);
      this.subscriptions.delete(t), this.topicMap.delete(i5.topic, t), this.events.emit(b3.deleted, { ...i5, reason: s3 });
    }
    async persist() {
      await this.setRelayerSubscriptions(this.values), this.events.emit(b3.sync);
    }
    async onRestart() {
      if (this.cached.length) {
        const t = [...this.cached], s3 = Math.ceil(this.cached.length / this.batchSubscribeTopicsLimit);
        for (let i5 = 0; i5 < s3; i5++) {
          const e2 = t.splice(0, this.batchSubscribeTopicsLimit);
          await this.batchSubscribe(e2);
        }
      }
      this.events.emit(b3.resubscribed);
    }
    async restore() {
      try {
        const t = await this.getRelayerSubscriptions();
        if (typeof t > "u" || !t.length) return;
        if (this.subscriptions.size && !t.every((s3) => s3.topic === this.subscriptions.get(s3.id)?.topic)) {
          const { message: s3 } = N10("RESTORE_WILL_OVERRIDE", this.name);
          throw this.logger.error(s3), this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`), new Error(s3);
        }
        this.cached = t, this.logger.debug(`Successfully Restored subscriptions for ${this.name}`), this.logger.trace({ type: "method", method: "restore", subscriptions: this.values });
      } catch (t) {
        this.logger.debug(`Failed to Restore subscriptions for ${this.name}`), this.logger.error(t);
      }
    }
    async batchSubscribe(t) {
      if (t.length) {
        if (!await this.rpcBatchSubscribe(t)) {
          this.logger.warn(`Batch subscribe failed for ${t.length} topics, adding to pending for retry`), t.forEach((s3) => {
            this.pending.set(s3.topic, s3);
          });
          return;
        }
        this.onBatchSubscribe(await Promise.all(t.map(async (s3) => ({ ...s3, id: await this.getSubscriptionId(s3.topic) }))));
      }
    }
    async batchFetchMessages(t) {
      if (!t.length) return;
      this.logger.trace(`Fetching batch messages for ${t.length} subscriptions`);
      const s3 = await this.rpcBatchFetchMessages(t);
      s3 && s3.messages && (await Xn2((0, import_time4.toMiliseconds)(import_time4.ONE_SECOND)), await this.relayer.handleBatchMessageEvents(s3.messages));
    }
    async onConnect() {
      await this.restart(), this.reset();
    }
    onDisconnect() {
      this.onDisable();
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: t } = N10("NOT_INITIALIZED", this.name);
        throw new Error(t);
      }
    }
    async restartToComplete(t) {
      !this.relayer.connected && !this.relayer.connecting && (this.cached.push(t), await this.relayer.transportOpen());
    }
    async getClientId() {
      return this.clientId || (this.clientId = await this.relayer.core.crypto.getClientId()), this.clientId;
    }
    async getSubscriptionId(t) {
      return Or2(t + await this.getClientId());
    }
  };
  var fe4 = class extends u {
    constructor(t) {
      super(t), this.protocol = "wc", this.version = 2, this.events = new import_events7.EventEmitter(), this.name = Ht2, this.transportExplicitlyClosed = false, this.initialized = false, this.connectionAttemptInProgress = false, this.hasExperiencedNetworkDisruption = false, this.heartBeatTimeout = (0, import_time4.toMiliseconds)(import_time4.THIRTY_SECONDS + import_time4.FIVE_SECONDS), this.reconnectInProgress = false, this.requestsInFlight = [], this.connectTimeout = (0, import_time4.toMiliseconds)(import_time4.ONE_SECOND * 15), this.stalledRestartInProgress = false, this.stalledRestartBackoff = 0, this.stalledRestartBaseInterval = (0, import_time4.toMiliseconds)(import_time4.ONE_SECOND * 2), this.stalledRestartMaxInterval = (0, import_time4.toMiliseconds)(import_time4.THIRTY_SECONDS), this.request = async (s3) => {
        this.logger.debug("Publishing Request Payload");
        const i5 = s3.id || getBigIntRpcId().toString();
        await this.toEstablishConnection();
        try {
          this.logger.trace({ id: i5, method: s3.method, topic: s3.params?.topic }, "relayer.request - publishing...");
          const e2 = `${i5}:${s3.params?.tag || ""}`;
          this.requestsInFlight.push(e2);
          const r3 = await this.provider.request(s3);
          return this.requestsInFlight = this.requestsInFlight.filter((o5) => o5 !== e2), r3;
        } catch (e2) {
          throw this.logger.debug(`Failed to Publish Request: ${i5}`), e2;
        }
      }, this.resetPingTimeout = () => {
        fe3() && (clearTimeout(this.pingTimeout), this.pingTimeout = setTimeout(() => {
          try {
            this.logger.debug({}, "pingTimeout: Connection stalled, terminating..."), this.provider?.connection?.socket?.terminate?.();
          } catch (s3) {
            this.logger.warn(s3, s3?.message);
          }
        }, this.heartBeatTimeout));
      }, this.onPayloadHandler = (s3) => {
        this.onProviderPayload(s3), this.resetPingTimeout();
      }, this.onConnectHandler = () => {
        this.logger.warn({}, "Relayer connected \u{1F6DC}"), this.startPingTimeout(), this.stalledRestartBackoff = 0, this.events.emit(p3.connect);
      }, this.onDisconnectHandler = () => {
        this.logger.warn({}, "Relayer disconnected \u{1F6D1}"), this.requestsInFlight = [], this.onProviderDisconnect();
      }, this.onProviderErrorHandler = (s3) => {
        this.logger.fatal(`Fatal socket error: ${s3.message}`), this.events.emit(p3.error, s3), this.logger.fatal("Fatal socket error received, closing transport"), this.transportExplicitlyClosed = true, clearTimeout(this.reconnectTimeout), this.reconnectTimeout = void 0, this.reconnectInProgress = false, this.transportClose().catch((i5) => this.logger.warn(i5));
      }, this.registerProviderListeners = () => {
        this.provider.on(v7.payload, this.onPayloadHandler), this.provider.on(v7.connect, this.onConnectHandler), this.provider.on(v7.disconnect, this.onDisconnectHandler), this.provider.on(v7.error, this.onProviderErrorHandler);
      }, this.core = t.core, this.logger = bo2({ logger: t.logger ?? Wt3, name: this.name }), this.messages = new be3(this.logger, t.core), this.subscriber = new we3(this, this.logger), this.publisher = new Hi(this, this.logger), this.projectId = t.projectId, this.relayUrl = t.relayUrl || pt, An2() ? this.packageName = Tn2() : In2() && (this.bundleId = Tn2()), this.provider = {};
    }
    async init() {
      this.logger.trace("Initialized"), this.registerEventListeners(), await Promise.all([this.messages.init(), this.subscriber.init()]), this.initialized = true, this.transportOpen().catch((t) => this.logger.warn(t, t?.message));
    }
    get context() {
      return ee(this.logger);
    }
    get connected() {
      return this.provider?.connection?.socket?.readyState === 1;
    }
    get connecting() {
      return this.provider?.connection?.socket?.readyState === 0 || this.connectPromise !== void 0;
    }
    async publish(t, s3, i5) {
      this.isInitialized(), await this.publisher.publish(t, s3, i5), await this.recordMessageEvent({ topic: t, message: s3, publishedAt: Date.now(), transportType: D3.relay }, H3.outbound);
    }
    async publishCustom(t) {
      this.isInitialized(), await this.publisher.publishCustom(t);
    }
    async subscribe(t, s3) {
      this.isInitialized(), (!s3?.transportType || s3?.transportType === "relay") && await this.toEstablishConnection();
      const i5 = s3?.internal?.throwOnFailedPublish ?? true;
      let e2 = this.subscriber.topicMap.get(t)?.[0] || "", r3;
      const o5 = (n6) => {
        n6.topic === t && (this.subscriber.off(b3.created, o5), r3());
      };
      return await Promise.all([new Promise((n6) => {
        r3 = n6, this.subscriber.on(b3.created, o5);
      }), new Promise((n6, a5) => {
        this.subscriber.subscribe(t, { internal: { throwOnFailedPublish: i5 }, ...s3 }).then((h8) => {
          e2 = h8 || e2, n6();
        }).catch((h8) => {
          i5 ? a5(h8) : n6();
        });
      })]), e2;
    }
    async unsubscribe(t, s3) {
      this.isInitialized(), await this.subscriber.unsubscribe(t, s3);
    }
    on(t, s3) {
      this.events.on(t, s3);
    }
    once(t, s3) {
      this.events.once(t, s3);
    }
    off(t, s3) {
      this.events.off(t, s3);
    }
    removeListener(t, s3) {
      this.events.removeListener(t, s3);
    }
    async transportDisconnect() {
      this.provider.disconnect && (this.hasExperiencedNetworkDisruption || this.connected) ? await Ln2(this.provider.disconnect(), 2e3, "provider.disconnect()").catch(() => this.onProviderDisconnect()) : this.onProviderDisconnect();
    }
    async transportClose() {
      this.transportExplicitlyClosed = true, clearTimeout(this.stalledRestartTimeout), this.stalledRestartInProgress = false, this.stalledRestartBackoff = 0, await this.resetTransport();
    }
    async transportOpen(t) {
      if (!this.subscriber.hasAnyTopics) {
        this.logger.info("Starting WS connection skipped because the client has no topics to work with.");
        return;
      }
      if (this.connectPromise ? (this.logger.debug({}, "Waiting for existing connection attempt to resolve..."), await this.connectPromise, this.logger.debug({}, "Existing connection attempt resolved")) : (this.connectPromise = this.connect(t).finally(() => {
        this.connectPromise = void 0;
      }), await this.connectPromise), !this.connected) throw new Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`);
    }
    async restartTransport(t) {
      this.logger.debug({}, "Restarting transport..."), !this.connectionAttemptInProgress && (this.relayUrl = t || this.relayUrl, await this.confirmOnlineStateOrThrow(), await this.resetTransport(), await this.transportOpen());
    }
    async resetTransport() {
      this.reconnectInProgress = true, clearTimeout(this.reconnectTimeout), this.reconnectTimeout = void 0, await this.transportDisconnect(), await this.subscriber.stop(), this.reconnectInProgress = false;
    }
    async confirmOnlineStateOrThrow() {
      if (!await uo2()) throw new Error("No internet connection detected. Please restart your network and try again.");
    }
    async handleBatchMessageEvents(t) {
      if (t?.length === 0) {
        this.logger.trace("Batch message events is empty. Ignoring...");
        return;
      }
      const s3 = t.sort((i5, e2) => i5.publishedAt - e2.publishedAt);
      this.logger.debug(`Batch of ${s3.length} message events sorted`);
      for (const i5 of s3) try {
        await this.onMessageEvent(i5);
      } catch (e2) {
        this.logger.warn(e2, "Error while processing batch message event: " + e2?.message);
      }
      this.logger.trace(`Batch of ${s3.length} message events processed`);
    }
    async onLinkMessageEvent(t, s3) {
      const { topic: i5 } = t;
      if (!s3.sessionExists) {
        const e2 = Hn2(import_time4.FIVE_MINUTES), r3 = { topic: i5, expiry: e2, relay: { protocol: "irn" }, active: false };
        await this.core.pairing.pairings.set(i5, r3);
      }
      this.events.emit(p3.message, t), await this.recordMessageEvent(t, H3.inbound);
    }
    async connect(t) {
      await this.confirmOnlineStateOrThrow(), t && t !== this.relayUrl && (this.relayUrl = t, await this.transportDisconnect()), this.transportExplicitlyClosed = false;
      let s3 = 1;
      try {
        for (; s3 < 6; ) {
          this.connectionAttemptInProgress = true;
          try {
            if (this.transportExplicitlyClosed) break;
            this.logger.debug({}, `Connecting to ${this.relayUrl}, attempt: ${s3}...`), await this.createProvider(), await new Promise((i5, e2) => {
              const r3 = () => {
                e2(new Error("Connection interrupted while trying to connect"));
              };
              this.provider.once(v7.disconnect, r3), Ln2(this.provider.connect(), this.connectTimeout, `Socket stalled when trying to connect to ${this.relayUrl}`).then(() => i5()).catch(e2).finally(() => {
                this.provider.off(v7.disconnect, r3), clearTimeout(this.reconnectTimeout);
              });
            }), await new Promise((i5, e2) => {
              const r3 = () => {
                e2(new Error("Connection interrupted while trying to subscribe"));
              };
              this.provider.once(v7.disconnect, r3), this.subscriber.start().then(i5).catch(e2).finally(() => {
                this.provider.off(v7.disconnect, r3);
              });
            }), this.hasExperiencedNetworkDisruption = false;
          } catch (i5) {
            await this.subscriber.stop();
            const e2 = i5;
            this.logger.warn({}, e2.message), this.hasExperiencedNetworkDisruption = true;
          }
          if (this.connected) {
            this.logger.debug({}, `Connected to ${this.relayUrl} successfully on attempt: ${s3}`);
            break;
          }
          await new Promise((i5) => setTimeout(i5, (0, import_time4.toMiliseconds)(s3 * 1))), s3++;
        }
      } finally {
        this.connectionAttemptInProgress = false, clearTimeout(this.reconnectTimeout), this.reconnectTimeout = void 0, this.reconnectInProgress = false;
      }
    }
    startPingTimeout() {
      if (fe3()) try {
        this.provider?.connection?.socket?.on("ping", () => {
          this.resetPingTimeout();
        }), this.resetPingTimeout();
      } catch (t) {
        this.logger.warn(t, t?.message);
      }
    }
    async createProvider() {
      if (this.provider.connection && (this.unregisterProviderListeners(), this.connected)) try {
        await Ln2(this.provider.disconnect(), 1e3, "Closing previous provider");
      } catch {
      }
      const t = await this.core.crypto.signJWT(this.relayUrl);
      this.provider = new o3(new f2($n2({ sdkVersion: Q3, protocol: this.protocol, version: this.version, relayUrl: this.relayUrl, projectId: this.projectId, auth: t, useOnCloseEvent: true, bundleId: this.bundleId, packageName: this.packageName }))), this.registerProviderListeners();
    }
    async recordMessageEvent(t, s3) {
      const { topic: i5, message: e2 } = t;
      await this.messages.set(i5, e2, s3);
    }
    async shouldIgnoreMessageEvent(t) {
      const { topic: s3, message: i5 } = t;
      if (!i5 || i5.length === 0) return this.logger.warn(`Ignoring invalid/empty message: ${i5}`), true;
      if (!await this.subscriber.isKnownTopic(s3)) return this.logger.warn(`Ignoring message for unknown topic ${s3}`), true;
      const e2 = this.messages.has(s3, i5);
      return e2 && this.logger.warn(`Ignoring duplicate message: ${i5}`), e2;
    }
    async onProviderPayload(t) {
      if (this.logger.debug("Incoming Relay Payload"), this.logger.trace({ type: "payload", direction: "incoming", payload: t }), isJsonRpcRequest(t)) {
        if (!t.method.endsWith(Yt3)) return;
        const s3 = t.params, { topic: i5, message: e2, publishedAt: r3, attestation: o5 } = s3.data, n6 = { topic: i5, message: e2, publishedAt: r3, transportType: D3.relay, attestation: o5 };
        this.logger.debug("Emitting Relayer Payload"), this.logger.trace({ type: "event", event: s3.id, ...n6 }), this.events.emit(s3.id, n6), await this.acknowledgePayload(t), await this.onMessageEvent(n6);
      } else isJsonRpcResponse(t) && this.events.emit(p3.message_ack, t);
    }
    async onMessageEvent(t) {
      await this.shouldIgnoreMessageEvent(t) || (await this.recordMessageEvent(t, H3.inbound), this.events.emit(p3.message, t));
    }
    async acknowledgePayload(t) {
      const s3 = formatJsonRpcResult(t.id, true);
      await this.provider.connection.send(s3);
    }
    unregisterProviderListeners() {
      this.provider.off(v7.payload, this.onPayloadHandler), this.provider.off(v7.connect, this.onConnectHandler), this.provider.off(v7.disconnect, this.onDisconnectHandler), this.provider.off(v7.error, this.onProviderErrorHandler), clearTimeout(this.pingTimeout);
    }
    async registerEventListeners() {
      let t = await uo2();
      lo2(async (s3) => {
        t !== s3 && (t = s3, s3 ? await this.transportOpen().catch((i5) => this.logger.error(i5, i5?.message)) : (this.hasExperiencedNetworkDisruption = true, await this.transportDisconnect(), this.transportExplicitlyClosed = false));
      }), this.core.heartbeat.on(r.pulse, async () => {
        if (!this.transportExplicitlyClosed && !this.connected && fo2()) try {
          await this.confirmOnlineStateOrThrow(), await this.transportOpen();
        } catch (s3) {
          this.logger.warn(s3, s3?.message);
        }
      }), this.events.on(p3.connection_stalled, () => {
        if (this.transportExplicitlyClosed || this.stalledRestartInProgress) return;
        this.stalledRestartInProgress = true;
        const s3 = this.stalledRestartBackoff === 0 ? 0 : Math.min(Math.pow(2, this.stalledRestartBackoff - 1) * this.stalledRestartBaseInterval, this.stalledRestartMaxInterval);
        this.stalledRestartBackoff++, this.logger.warn(`Connection stalled, restarting transport${s3 ? ` in ${s3}ms` : ""}...`), this.stalledRestartTimeout = setTimeout(async () => {
          try {
            if (this.transportExplicitlyClosed) return;
            await this.restartTransport();
          } catch (i5) {
            this.logger.error(i5, i5?.message);
          } finally {
            this.stalledRestartInProgress = false;
          }
        }, s3);
      });
    }
    async onProviderDisconnect() {
      if (clearTimeout(this.pingTimeout), this.events.emit(p3.disconnect), !this.reconnectInProgress) {
        this.reconnectInProgress = true;
        try {
          await this.subscriber.stop();
        } catch (t) {
          this.logger.warn(t, "subscriber.stop() failed during disconnect");
        }
        if (!this.subscriber.hasAnyTopics || this.transportExplicitlyClosed) {
          this.reconnectInProgress = false;
          return;
        }
        this.reconnectTimeout = setTimeout(async () => {
          await this.transportOpen().catch((t) => this.logger.error(t, t?.message)), this.reconnectTimeout = void 0, this.reconnectInProgress = false;
        }, (0, import_time4.toMiliseconds)(Jt3));
      }
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: t } = N10("NOT_INITIALIZED", this.name);
        throw new Error(t);
      }
    }
    async toEstablishConnection() {
      if (await this.confirmOnlineStateOrThrow(), !this.connected) {
        if (this.connectPromise) {
          await this.connectPromise;
          return;
        }
        this.connectPromise = this.connect().finally(() => {
          this.connectPromise = void 0;
        }), await this.connectPromise;
      }
    }
  };
  var ve4 = class extends p2 {
    constructor(t, s3, i5, e2 = S2, r3 = void 0) {
      super(t, s3, i5, e2), this.core = t, this.logger = s3, this.name = i5, this.map = /* @__PURE__ */ new Map(), this.version = jt2, this.cached = [], this.initialized = false, this.storagePrefix = S2, this.recentlyDeleted = [], this.recentlyDeletedLimit = 200, this.init = async () => {
        this.initialized || (this.logger.trace("Initialized"), await this.restore(), this.cached.forEach((o5) => {
          this.getKey && o5 !== null && !R2(o5) ? this.map.set(this.getKey(o5), o5) : Wr2(o5) ? this.map.set(o5.id, o5) : Jr2(o5) && this.map.set(o5.topic, o5);
        }), this.cached = [], this.initialized = true);
      }, this.set = async (o5, n6) => {
        this.isInitialized(), this.map.has(o5) ? await this.update(o5, n6) : (this.logger.debug("Setting value"), this.logger.trace({ type: "method", method: "set", key: o5, value: n6 }), this.map.set(o5, n6), await this.persist());
      }, this.get = (o5) => (this.isInitialized(), this.logger.debug("Getting value"), this.logger.trace({ type: "method", method: "get", key: o5 }), this.getData(o5)), this.getAll = (o5) => (this.isInitialized(), o5 ? this.values.filter((n6) => Object.keys(o5).every((a5) => isEqual2(n6[a5], o5[a5]))) : this.values), this.update = async (o5, n6) => {
        this.isInitialized(), this.logger.debug("Updating value"), this.logger.trace({ type: "method", method: "update", key: o5, update: n6 });
        const a5 = { ...this.getData(o5), ...n6 };
        this.map.set(o5, a5), await this.persist();
      }, this.delete = async (o5, n6) => {
        this.isInitialized(), this.map.has(o5) && (this.logger.debug("Deleting value"), this.logger.trace({ type: "method", method: "delete", key: o5, reason: n6 }), this.map.delete(o5), this.addToRecentlyDeleted(o5), await this.persist());
      }, this.logger = Re(s3, this.name), this.storagePrefix = e2, this.getKey = r3;
    }
    get context() {
      return ee(this.logger);
    }
    get storageKey() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//" + this.name;
    }
    get length() {
      return this.map.size;
    }
    get keys() {
      return Array.from(this.map.keys());
    }
    get values() {
      return Array.from(this.map.values());
    }
    addToRecentlyDeleted(t) {
      this.recentlyDeleted.push(t), this.recentlyDeleted.length >= this.recentlyDeletedLimit && this.recentlyDeleted.splice(0, this.recentlyDeletedLimit / 2);
    }
    async setDataStore(t) {
      await this.core.storage.setItem(this.storageKey, t);
    }
    async getDataStore() {
      return await this.core.storage.getItem(this.storageKey);
    }
    getData(t) {
      const s3 = this.map.get(t);
      if (!s3) {
        if (this.recentlyDeleted.includes(t)) {
          const { message: e2 } = N10("MISSING_OR_INVALID", `Record was recently deleted - ${this.name}: ${t}`);
          throw this.logger.error(e2), new Error(e2);
        }
        const { message: i5 } = N10("NO_MATCHING_KEY", `${this.name}: ${t}`);
        throw this.logger.error(i5), new Error(i5);
      }
      return s3;
    }
    async persist() {
      await this.setDataStore(this.values);
    }
    async restore() {
      try {
        const t = await this.getDataStore();
        if (typeof t > "u" || !t.length) return;
        if (this.map.size) {
          const { message: s3 } = N10("RESTORE_WILL_OVERRIDE", this.name);
          throw this.logger.error(s3), new Error(s3);
        }
        this.cached = t, this.logger.debug(`Successfully Restored value for ${this.name}`), this.logger.trace({ type: "method", method: "restore", value: this.values });
      } catch (t) {
        this.logger.debug(`Failed to Restore value for ${this.name}`), this.logger.error(t);
      }
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: t } = N10("NOT_INITIALIZED", this.name);
        throw new Error(t);
      }
    }
  };
  var Ee3 = class {
    constructor(t, s3) {
      this.core = t, this.logger = s3, this.name = te4, this.version = ee3, this.events = new import_events7.default(), this.initialized = false, this.storagePrefix = S2, this.ignoredPayloadTypes = [D2], this.registeredMethods = [], this.init = async () => {
        this.initialized || (await this.pairings.init(), await this.cleanup(), this.registerRelayerEvents(), this.registerExpirerEvents(), this.initialized = true, this.logger.trace("Initialized"));
      }, this.register = ({ methods: i5 }) => {
        this.isInitialized(), this.registeredMethods = [.../* @__PURE__ */ new Set([...this.registeredMethods, ...i5])];
      }, this.create = async (i5) => {
        this.isInitialized();
        const e2 = Nr2(), r3 = await this.core.crypto.setSymKey(e2), o5 = Hn2(import_time4.FIVE_MINUTES), n6 = { protocol: Gt3 }, a5 = { topic: r3, expiry: o5, relay: n6, active: false, methods: i5?.methods }, h8 = _r2({ protocol: this.core.protocol, version: this.core.version, topic: r3, symKey: e2, relay: n6, expiryTimestamp: o5, methods: i5?.methods });
        return this.events.emit(q3.create, a5), this.core.expirer.set(r3, o5), await this.pairings.set(r3, a5), await this.core.relayer.subscribe(r3, { transportType: i5?.transportType, internal: i5?.internal }), { topic: r3, uri: h8 };
      }, this.pair = async (i5) => {
        this.isInitialized();
        const e2 = this.core.eventClient.createEvent({ properties: { topic: i5?.uri, trace: [x6.pairing_started] } });
        this.isValidPair(i5, e2);
        const { topic: r3, symKey: o5, relay: n6, expiryTimestamp: a5, methods: h8 } = kr2(i5.uri);
        e2.props.properties.topic = r3, e2.addTrace(x6.pairing_uri_validation_success), e2.addTrace(x6.pairing_uri_not_expired);
        let d6;
        if (this.pairings.keys.includes(r3)) {
          if (d6 = this.pairings.get(r3), e2.addTrace(x6.existing_pairing), d6.active) throw e2.setError(O3.active_pairing_already_exists), new Error(`Pairing already exists: ${r3}. Please try again with a new connection URI.`);
          e2.addTrace(x6.pairing_not_expired);
        }
        const l6 = a5 || Hn2(import_time4.FIVE_MINUTES), g8 = { topic: r3, relay: n6, expiry: l6, active: false, methods: h8 };
        this.core.expirer.set(r3, l6), await this.pairings.set(r3, g8), e2.addTrace(x6.store_new_pairing), i5.activatePairing && await this.activate({ topic: r3 }), this.events.emit(q3.create, g8), e2.addTrace(x6.emit_inactive_pairing), this.core.crypto.keychain.has(r3) || await this.core.crypto.setSymKey(o5, r3), e2.addTrace(x6.subscribing_pairing_topic);
        try {
          await this.core.relayer.confirmOnlineStateOrThrow();
        } catch {
          e2.setError(O3.no_internet_connection);
        }
        try {
          await this.core.relayer.subscribe(r3, { relay: n6 });
        } catch (_6) {
          throw e2.setError(O3.subscribe_pairing_topic_failure), _6;
        }
        return e2.addTrace(x6.subscribe_pairing_topic_success), g8;
      }, this.activate = async ({ topic: i5 }) => {
        this.isInitialized();
        const e2 = Hn2(import_time4.FIVE_MINUTES);
        this.core.expirer.set(i5, e2), await this.pairings.update(i5, { active: true, expiry: e2 });
      }, this.ping = async (i5) => {
        this.isInitialized(), await this.isValidPing(i5), this.logger.warn("ping() is deprecated and will be removed in the next major release.");
        const { topic: e2 } = i5;
        if (this.pairings.keys.includes(e2)) {
          const r3 = await this.sendRequest(e2, "wc_pairingPing", {}), { done: o5, resolve: n6, reject: a5 } = Mn2();
          this.events.once(Wn2("pairing_ping", r3), ({ error: h8 }) => {
            h8 ? a5(h8) : n6();
          }), await o5();
        }
      }, this.updateExpiry = async ({ topic: i5, expiry: e2 }) => {
        this.isInitialized(), await this.pairings.update(i5, { expiry: e2 });
      }, this.updateMetadata = async ({ topic: i5, metadata: e2 }) => {
        this.isInitialized(), await this.pairings.update(i5, { peerMetadata: e2 });
      }, this.getPairings = () => (this.isInitialized(), this.pairings.values), this.disconnect = async (i5) => {
        this.isInitialized(), await this.isValidDisconnect(i5);
        const { topic: e2 } = i5;
        this.pairings.keys.includes(e2) && (await this.sendRequest(e2, "wc_pairingDelete", $2("USER_DISCONNECTED")), await this.deletePairing(e2));
      }, this.formatUriFromPairing = (i5) => {
        this.isInitialized();
        const { topic: e2, relay: r3, expiry: o5, methods: n6 } = i5, a5 = this.core.crypto.keychain.get(e2);
        return _r2({ protocol: this.core.protocol, version: this.core.version, topic: e2, symKey: a5, relay: r3, expiryTimestamp: o5, methods: n6 });
      }, this.sendRequest = async (i5, e2, r3) => {
        const o5 = formatJsonRpcRequest(e2, r3), n6 = await this.core.crypto.encode(i5, o5), a5 = U2[e2].req;
        return this.core.history.set(i5, o5), this.core.relayer.publish(i5, n6, a5), o5.id;
      }, this.sendResult = async (i5, e2, r3) => {
        const o5 = formatJsonRpcResult(i5, r3), n6 = await this.core.crypto.encode(e2, o5), a5 = (await this.core.history.get(e2, i5)).request.method, h8 = U2[a5].res;
        await this.core.relayer.publish(e2, n6, h8), await this.core.history.resolve(o5);
      }, this.sendError = async (i5, e2, r3) => {
        const o5 = formatJsonRpcError(i5, r3), n6 = await this.core.crypto.encode(e2, o5), a5 = (await this.core.history.get(e2, i5)).request.method, h8 = U2[a5] ? U2[a5].res : U2.unregistered_method.res;
        await this.core.relayer.publish(e2, n6, h8), await this.core.history.resolve(o5);
      }, this.deletePairing = async (i5, e2) => {
        await this.core.relayer.unsubscribe(i5), await Promise.all([this.pairings.delete(i5, $2("USER_DISCONNECTED")), this.core.crypto.deleteSymKey(i5), e2 ? Promise.resolve() : this.core.expirer.del(i5)]);
      }, this.cleanup = async () => {
        const i5 = this.pairings.getAll().filter((e2) => Bn2(e2.expiry));
        await Promise.all(i5.map((e2) => this.deletePairing(e2.topic)));
      }, this.onRelayEventRequest = async (i5) => {
        const { topic: e2, payload: r3 } = i5;
        switch (r3.method) {
          case "wc_pairingPing":
            return await this.onPairingPingRequest(e2, r3);
          case "wc_pairingDelete":
            return await this.onPairingDeleteRequest(e2, r3);
          default:
            return await this.onUnknownRpcMethodRequest(e2, r3);
        }
      }, this.onRelayEventResponse = async (i5) => {
        const { topic: e2, payload: r3 } = i5, o5 = (await this.core.history.get(e2, r3.id)).request.method;
        switch (o5) {
          case "wc_pairingPing":
            return this.onPairingPingResponse(e2, r3);
          default:
            return this.onUnknownRpcMethodResponse(o5);
        }
      }, this.onPairingPingRequest = async (i5, e2) => {
        const { id: r3 } = e2;
        try {
          this.isValidPing({ topic: i5 }), await this.sendResult(r3, i5, true), this.events.emit(q3.ping, { id: r3, topic: i5 });
        } catch (o5) {
          await this.sendError(r3, i5, o5), this.logger.error(o5);
        }
      }, this.onPairingPingResponse = (i5, e2) => {
        const { id: r3 } = e2;
        setTimeout(() => {
          isJsonRpcResult(e2) ? this.events.emit(Wn2("pairing_ping", r3), {}) : isJsonRpcError(e2) && this.events.emit(Wn2("pairing_ping", r3), { error: e2.error });
        }, 500);
      }, this.onPairingDeleteRequest = async (i5, e2) => {
        const { id: r3 } = e2;
        try {
          this.isValidDisconnect({ topic: i5 }), await this.deletePairing(i5), this.events.emit(q3.delete, { id: r3, topic: i5 });
        } catch (o5) {
          await this.sendError(r3, i5, o5), this.logger.error(o5);
        }
      }, this.onUnknownRpcMethodRequest = async (i5, e2) => {
        const { id: r3, method: o5 } = e2;
        try {
          if (this.registeredMethods.includes(o5)) return;
          const n6 = $2("WC_METHOD_UNSUPPORTED", o5);
          await this.sendError(r3, i5, n6), this.logger.error(n6);
        } catch (n6) {
          await this.sendError(r3, i5, n6), this.logger.error(n6);
        }
      }, this.onUnknownRpcMethodResponse = (i5) => {
        this.registeredMethods.includes(i5) || this.logger.error($2("WC_METHOD_UNSUPPORTED", i5));
      }, this.isValidPair = (i5, e2) => {
        if (!Xr2(i5)) {
          const { message: o5 } = N10("MISSING_OR_INVALID", `pair() params: ${i5}`);
          throw e2.setError(O3.malformed_pairing_uri), new Error(o5);
        }
        if (!Br2(i5.uri)) {
          const { message: o5 } = N10("MISSING_OR_INVALID", `pair() uri: ${i5.uri}`);
          throw e2.setError(O3.malformed_pairing_uri), new Error(o5);
        }
        const r3 = kr2(i5?.uri);
        if (!r3?.relay?.protocol) {
          const { message: o5 } = N10("MISSING_OR_INVALID", "pair() uri#relay-protocol");
          throw e2.setError(O3.malformed_pairing_uri), new Error(o5);
        }
        if (!r3?.symKey) {
          const { message: o5 } = N10("MISSING_OR_INVALID", "pair() uri#symKey");
          throw e2.setError(O3.malformed_pairing_uri), new Error(o5);
        }
        if (r3?.expiryTimestamp && (0, import_time4.toMiliseconds)(r3?.expiryTimestamp) < Date.now()) {
          e2.setError(O3.pairing_expired);
          const { message: o5 } = N10("EXPIRED", "pair() URI has expired. Please try again with a new connection URI.");
          throw new Error(o5);
        }
      }, this.isValidPing = async (i5) => {
        if (!Xr2(i5)) {
          const { message: r3 } = N10("MISSING_OR_INVALID", `ping() params: ${i5}`);
          throw new Error(r3);
        }
        const { topic: e2 } = i5;
        await this.isValidPairingTopic(e2);
      }, this.isValidDisconnect = async (i5) => {
        if (!Xr2(i5)) {
          const { message: r3 } = N10("MISSING_OR_INVALID", `disconnect() params: ${i5}`);
          throw new Error(r3);
        }
        const { topic: e2 } = i5;
        await this.isValidPairingTopic(e2);
      }, this.isValidPairingTopic = async (i5) => {
        if (!E3(i5, false)) {
          const { message: e2 } = N10("MISSING_OR_INVALID", `pairing topic should be a string: ${i5}`);
          throw new Error(e2);
        }
        if (!this.pairings.keys.includes(i5)) {
          const { message: e2 } = N10("NO_MATCHING_KEY", `pairing topic doesn't exist: ${i5}`);
          throw new Error(e2);
        }
        if (Bn2(this.pairings.get(i5).expiry)) {
          await this.deletePairing(i5);
          const { message: e2 } = N10("EXPIRED", `pairing topic: ${i5}`);
          throw new Error(e2);
        }
      }, this.core = t, this.logger = Re(s3, this.name), this.pairings = new ve4(this.core, this.logger, this.name, this.storagePrefix);
    }
    get context() {
      return ee(this.logger);
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: t } = N10("NOT_INITIALIZED", this.name);
        throw new Error(t);
      }
    }
    registerRelayerEvents() {
      this.core.relayer.on(p3.message, async (t) => {
        const { topic: s3, message: i5, transportType: e2 } = t;
        if (this.pairings.keys.includes(s3) && e2 !== D3.link_mode && !this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(i5))) try {
          const r3 = await this.core.crypto.decode(s3, i5);
          isJsonRpcRequest(r3) ? (this.core.history.set(s3, r3), await this.onRelayEventRequest({ topic: s3, payload: r3 })) : isJsonRpcResponse(r3) && (await this.core.history.resolve(r3), await this.onRelayEventResponse({ topic: s3, payload: r3 }), this.core.history.delete(s3, r3.id)), await this.core.relayer.messages.ack(s3, i5);
        } catch (r3) {
          this.logger.error(r3);
        }
      });
    }
    registerExpirerEvents() {
      this.core.expirer.on(P4.expired, async (t) => {
        const { topic: s3 } = qn2(t.target);
        s3 && this.pairings.keys.includes(s3) && (await this.deletePairing(s3, true), this.events.emit(q3.expire, { topic: s3 }));
      });
    }
  };
  var Ie4 = class extends h3 {
    constructor(t, s3) {
      super(t, s3), this.core = t, this.logger = s3, this.records = /* @__PURE__ */ new Map(), this.events = new import_events7.EventEmitter(), this.name = ie3, this.version = se2, this.cached = [], this.initialized = false, this.storagePrefix = S2, this.init = async () => {
        this.initialized || (this.logger.trace("Initialized"), await this.restore(), this.cached.forEach((i5) => this.records.set(i5.id, i5)), this.cached = [], this.registerEventListeners(), this.initialized = true);
      }, this.set = (i5, e2, r3) => {
        if (this.isInitialized(), this.logger.debug("Setting JSON-RPC request history record"), this.logger.trace({ type: "method", method: "set", topic: i5, request: e2, chainId: r3 }), this.records.has(e2.id)) return;
        const o5 = { id: e2.id, topic: i5, request: { method: e2.method, params: e2.params || null }, chainId: r3, expiry: Hn2(import_time4.THIRTY_DAYS) };
        this.records.set(o5.id, o5), this.persist(), this.events.emit(T2.created, o5);
      }, this.resolve = async (i5) => {
        if (this.isInitialized(), this.logger.debug("Updating JSON-RPC response history record"), this.logger.trace({ type: "method", method: "update", response: i5 }), !this.records.has(i5.id)) return;
        const e2 = await this.getRecord(i5.id);
        typeof e2.response < "u" || (e2.response = isJsonRpcError(i5) ? { error: i5.error } : { result: i5.result }, this.records.set(e2.id, e2), this.persist(), this.events.emit(T2.updated, e2));
      }, this.get = async (i5, e2) => (this.isInitialized(), this.logger.debug("Getting record"), this.logger.trace({ type: "method", method: "get", topic: i5, id: e2 }), await this.getRecord(e2)), this.delete = (i5, e2) => {
        this.isInitialized(), this.logger.debug("Deleting record"), this.logger.trace({ type: "method", method: "delete", id: e2 }), this.values.forEach((r3) => {
          if (r3.topic === i5) {
            if (typeof e2 < "u" && r3.id !== e2) return;
            this.records.delete(r3.id), this.events.emit(T2.deleted, r3);
          }
        }), this.persist();
      }, this.exists = async (i5, e2) => (this.isInitialized(), this.records.has(e2) ? (await this.getRecord(e2)).topic === i5 : false), this.on = (i5, e2) => {
        this.events.on(i5, e2);
      }, this.once = (i5, e2) => {
        this.events.once(i5, e2);
      }, this.off = (i5, e2) => {
        this.events.off(i5, e2);
      }, this.removeListener = (i5, e2) => {
        this.events.removeListener(i5, e2);
      }, this.logger = Re(s3, this.name);
    }
    get context() {
      return ee(this.logger);
    }
    get storageKey() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//" + this.name;
    }
    get size() {
      return this.records.size;
    }
    get keys() {
      return Array.from(this.records.keys());
    }
    get values() {
      return Array.from(this.records.values());
    }
    get pending() {
      const t = [];
      return this.values.forEach((s3) => {
        if (typeof s3.response < "u") return;
        const i5 = { topic: s3.topic, request: formatJsonRpcRequest(s3.request.method, s3.request.params, s3.id), chainId: s3.chainId };
        return t.push(i5);
      }), t;
    }
    async setJsonRpcRecords(t) {
      await this.core.storage.setItem(this.storageKey, t);
    }
    async getJsonRpcRecords() {
      return await this.core.storage.getItem(this.storageKey);
    }
    getRecord(t) {
      this.isInitialized();
      const s3 = this.records.get(t);
      if (!s3) {
        const { message: i5 } = N10("NO_MATCHING_KEY", `${this.name}: ${t}`);
        throw new Error(i5);
      }
      return s3;
    }
    async persist() {
      await this.setJsonRpcRecords(this.values), this.events.emit(T2.sync);
    }
    async restore() {
      try {
        const t = await this.getJsonRpcRecords();
        if (typeof t > "u" || !t.length) return;
        if (this.records.size) {
          const { message: s3 } = N10("RESTORE_WILL_OVERRIDE", this.name);
          throw this.logger.error(s3), new Error(s3);
        }
        this.cached = t, this.logger.debug(`Successfully Restored records for ${this.name}`), this.logger.trace({ type: "method", method: "restore", records: this.values });
      } catch (t) {
        this.logger.debug(`Failed to Restore records for ${this.name}`), this.logger.error(t);
      }
    }
    registerEventListeners() {
      this.events.on(T2.created, (t) => {
        const s3 = T2.created;
        this.logger.info(`Emitting ${s3}`), this.logger.debug({ type: "event", event: s3, record: t });
      }), this.events.on(T2.updated, (t) => {
        const s3 = T2.updated;
        this.logger.info(`Emitting ${s3}`), this.logger.debug({ type: "event", event: s3, record: t });
      }), this.events.on(T2.deleted, (t) => {
        const s3 = T2.deleted;
        this.logger.info(`Emitting ${s3}`), this.logger.debug({ type: "event", event: s3, record: t });
      }), this.core.heartbeat.on(r.pulse, () => {
        this.cleanup();
      });
    }
    cleanup() {
      try {
        this.isInitialized();
        let t = false;
        this.records.forEach((s3) => {
          (0, import_time4.toMiliseconds)(s3.expiry || 0) - Date.now() <= 0 && (this.logger.info(`Deleting expired history log: ${s3.id}`), this.records.delete(s3.id), this.events.emit(T2.deleted, s3, false), t = true);
        }), t && this.persist();
      } catch (t) {
        this.logger.warn(t);
      }
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: t } = N10("NOT_INITIALIZED", this.name);
        throw new Error(t);
      }
    }
  };
  var Te3 = class extends x3 {
    constructor(t, s3) {
      super(t, s3), this.core = t, this.logger = s3, this.expirations = /* @__PURE__ */ new Map(), this.events = new import_events7.EventEmitter(), this.name = re2, this.version = oe2, this.cached = [], this.initialized = false, this.storagePrefix = S2, this.init = async () => {
        this.initialized || (this.logger.trace("Initialized"), await this.restore(), this.cached.forEach((i5) => this.expirations.set(i5.target, i5)), this.cached = [], this.registerEventListeners(), this.initialized = true);
      }, this.has = (i5) => {
        try {
          const e2 = this.formatTarget(i5);
          return typeof this.getExpiration(e2) < "u";
        } catch {
          return false;
        }
      }, this.set = (i5, e2) => {
        this.isInitialized();
        const r3 = this.formatTarget(i5), o5 = { target: r3, expiry: e2 };
        this.expirations.set(r3, o5), this.checkExpiry(r3, o5), this.events.emit(P4.created, { target: r3, expiration: o5 });
      }, this.get = (i5) => {
        this.isInitialized();
        const e2 = this.formatTarget(i5);
        return this.getExpiration(e2);
      }, this.del = (i5) => {
        if (this.isInitialized(), this.has(i5)) {
          const e2 = this.formatTarget(i5), r3 = this.getExpiration(e2);
          this.expirations.delete(e2), this.events.emit(P4.deleted, { target: e2, expiration: r3 });
        }
      }, this.on = (i5, e2) => {
        this.events.on(i5, e2);
      }, this.once = (i5, e2) => {
        this.events.once(i5, e2);
      }, this.off = (i5, e2) => {
        this.events.off(i5, e2);
      }, this.removeListener = (i5, e2) => {
        this.events.removeListener(i5, e2);
      }, this.logger = Re(s3, this.name);
    }
    get context() {
      return ee(this.logger);
    }
    get storageKey() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//" + this.name;
    }
    get length() {
      return this.expirations.size;
    }
    get keys() {
      return Array.from(this.expirations.keys());
    }
    get values() {
      return Array.from(this.expirations.values());
    }
    formatTarget(t) {
      if (typeof t == "string") return Kn2(t);
      if (typeof t == "number") return Fn3(t);
      const { message: s3 } = N10("UNKNOWN_TYPE", `Target type: ${typeof t}`);
      throw new Error(s3);
    }
    async setExpirations(t) {
      await this.core.storage.setItem(this.storageKey, t);
    }
    async getExpirations() {
      return await this.core.storage.getItem(this.storageKey);
    }
    async persist() {
      await this.setExpirations(this.values), this.events.emit(P4.sync);
    }
    async restore() {
      try {
        const t = await this.getExpirations();
        if (typeof t > "u" || !t.length) return;
        if (this.expirations.size) {
          const { message: s3 } = N10("RESTORE_WILL_OVERRIDE", this.name);
          throw this.logger.error(s3), new Error(s3);
        }
        this.cached = t, this.logger.debug(`Successfully Restored expirations for ${this.name}`), this.logger.trace({ type: "method", method: "restore", expirations: this.values });
      } catch (t) {
        this.logger.debug(`Failed to Restore expirations for ${this.name}`), this.logger.error(t);
      }
    }
    getExpiration(t) {
      const s3 = this.expirations.get(t);
      if (!s3) {
        const { message: i5 } = N10("NO_MATCHING_KEY", `${this.name}: ${t}`);
        throw this.logger.warn(i5), new Error(i5);
      }
      return s3;
    }
    checkExpiry(t, s3) {
      const { expiry: i5 } = s3;
      (0, import_time4.toMiliseconds)(i5) - Date.now() <= 0 && this.expire(t, s3);
    }
    expire(t, s3) {
      this.expirations.delete(t), this.events.emit(P4.expired, { target: t, expiration: s3 });
    }
    checkExpirations() {
      this.core.relayer.connected && this.expirations.forEach((t, s3) => this.checkExpiry(s3, t));
    }
    registerEventListeners() {
      this.core.heartbeat.on(r.pulse, () => this.checkExpirations()), this.events.on(P4.created, (t) => {
        const s3 = P4.created;
        this.logger.info(`Emitting ${s3}`), this.logger.debug({ type: "event", event: s3, data: t }), this.persist();
      }), this.events.on(P4.expired, (t) => {
        const s3 = P4.expired;
        this.logger.info(`Emitting ${s3}`), this.logger.debug({ type: "event", event: s3, data: t }), this.persist();
      }), this.events.on(P4.deleted, (t) => {
        const s3 = P4.deleted;
        this.logger.info(`Emitting ${s3}`), this.logger.debug({ type: "event", event: s3, data: t }), this.persist();
      });
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: t } = N10("NOT_INITIALIZED", this.name);
        throw new Error(t);
      }
    }
  };
  var Pe4 = class extends y3 {
    constructor(t, s3, i5) {
      super(t, s3, i5), this.core = t, this.logger = s3, this.store = i5, this.name = ne3, this.verifyUrlV3 = he4, this.storagePrefix = S2, this.version = lt2, this.init = async () => {
        this.isDevEnv || (this.publicKey = await this.store.getItem(this.storeKey), this.publicKey && (0, import_time4.toMiliseconds)(this.publicKey?.expiresAt) < Date.now() && (this.logger.debug("verify v2 public key expired"), await this.removePublicKey()));
      }, this.register = async (e2) => {
        if (!x5() || this.isDevEnv) return;
        const r3 = window.location.origin, { id: o5, decryptedId: n6 } = e2, a5 = `${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${r3}&id=${o5}&decryptedId=${n6}`;
        try {
          const h8 = (0, import_window_getters2.getDocument)(), d6 = this.startAbortTimer(import_time4.ONE_SECOND * 5), l6 = await new Promise((g8, _6) => {
            const E6 = () => {
              window.removeEventListener("message", N13), h8.body.removeChild(u4), _6("attestation aborted");
            };
            this.abortController.signal.addEventListener("abort", E6);
            const u4 = h8.createElement("iframe");
            u4.src = a5, u4.style.display = "none", u4.addEventListener("error", E6, { signal: this.abortController.signal });
            const N13 = (m3) => {
              if (m3.data && typeof m3.data == "string") try {
                const C9 = JSON.parse(m3.data);
                if (C9.type === "verify_attestation") {
                  if (sn(C9.attestation).payload.id !== o5) return;
                  clearInterval(d6), h8.body.removeChild(u4), this.abortController.signal.removeEventListener("abort", E6), window.removeEventListener("message", N13), g8(C9.attestation === null ? "" : C9.attestation);
                }
              } catch (C9) {
                this.logger.warn(C9);
              }
            };
            h8.body.appendChild(u4), window.addEventListener("message", N13, { signal: this.abortController.signal });
          });
          return this.logger.debug(l6, "jwt attestation"), l6;
        } catch (h8) {
          this.logger.warn(h8);
        }
        return "";
      }, this.resolve = async (e2) => {
        if (this.isDevEnv) return "";
        const { attestationId: r3, hash: o5, encryptedId: n6 } = e2;
        if (r3 === "") {
          this.logger.debug("resolve: attestationId is empty, skipping");
          return;
        }
        if (r3) {
          if (sn(r3).payload.id !== n6) return;
          const h8 = await this.isValidJwtAttestation(r3);
          if (h8) {
            if (!h8.isVerified) {
              this.logger.warn("resolve: jwt attestation: origin url not verified");
              return;
            }
            return h8;
          }
        }
        if (!o5) return;
        const a5 = this.getVerifyUrl(e2?.verifyUrl);
        return this.fetchAttestation(o5, a5);
      }, this.fetchAttestation = async (e2, r3) => {
        this.logger.debug(`resolving attestation: ${e2} from url: ${r3}`);
        const o5 = this.startAbortTimer(import_time4.ONE_SECOND * 5), n6 = await fetch(`${r3}/attestation/${e2}?v2Supported=true`, { signal: this.abortController.signal });
        return clearTimeout(o5), n6.status === 200 ? await n6.json() : void 0;
      }, this.getVerifyUrl = (e2) => {
        let r3 = e2 || Y2;
        return ce2.includes(r3) || (this.logger.info(`verify url: ${r3}, not included in trusted list, assigning default: ${Y2}`), r3 = Y2), r3;
      }, this.fetchPublicKey = async () => {
        try {
          this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);
          const e2 = this.startAbortTimer(import_time4.FIVE_SECONDS), r3 = await fetch(`${this.verifyUrlV3}/public-key`, { signal: this.abortController.signal });
          return clearTimeout(e2), await r3.json();
        } catch (e2) {
          this.logger.warn(e2);
        }
      }, this.persistPublicKey = async (e2) => {
        this.logger.debug(e2, "persisting public key to local storage"), await this.store.setItem(this.storeKey, e2), this.publicKey = e2;
      }, this.removePublicKey = async () => {
        this.logger.debug("removing verify v2 public key from storage"), await this.store.removeItem(this.storeKey), this.publicKey = void 0;
      }, this.isValidJwtAttestation = async (e2) => {
        const r3 = await this.getPublicKey();
        try {
          if (r3) return this.validateAttestation(e2, r3);
        } catch (n6) {
          this.logger.error(n6), this.logger.warn("error validating attestation");
        }
        const o5 = await this.fetchAndPersistPublicKey();
        try {
          if (o5) return this.validateAttestation(e2, o5);
        } catch (n6) {
          this.logger.error(n6), this.logger.warn("error validating attestation");
        }
      }, this.getPublicKey = async () => this.publicKey ? this.publicKey : await this.fetchAndPersistPublicKey(), this.fetchAndPersistPublicKey = async () => {
        if (this.fetchPromise) return await this.fetchPromise, this.publicKey;
        this.fetchPromise = new Promise(async (r3) => {
          const o5 = await this.fetchPublicKey();
          o5 && (await this.persistPublicKey(o5), r3(o5));
        });
        const e2 = await this.fetchPromise;
        return this.fetchPromise = void 0, e2;
      }, this.validateAttestation = (e2, r3) => {
        const o5 = Cr2(e2, r3.publicKey), n6 = { hasExpired: (0, import_time4.toMiliseconds)(o5.exp) < Date.now(), payload: o5 };
        if (n6.hasExpired) throw this.logger.warn("resolve: jwt attestation expired"), new Error("JWT attestation expired");
        return { origin: n6.payload.origin, isScam: n6.payload.isScam, isVerified: n6.payload.isVerified };
      }, this.logger = Re(s3, this.name), this.abortController = new AbortController(), this.isDevEnv = Qn2(), this.init();
    }
    get storeKey() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//verify:public:key";
    }
    get context() {
      return ee(this.logger);
    }
    startAbortTimer(t) {
      return this.abortController = new AbortController(), setTimeout(() => this.abortController.abort(), (0, import_time4.toMiliseconds)(t));
    }
  };
  var Re3 = class extends v2 {
    constructor(t, s3) {
      super(t, s3), this.projectId = t, this.logger = s3, this.context = le3, this.registerDeviceToken = async (i5) => {
        const { clientId: e2, token: r3, notificationType: o5, enableEncrypted: n6 = false } = i5, a5 = `${ge3}/${this.projectId}/clients`;
        await fetch(a5, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ client_id: e2, type: o5, token: r3, always_raw: n6 }) });
      }, this.logger = Re(s3, this.context);
    }
  };
  var Se4 = class extends C2 {
    constructor(t, s3, i5 = true) {
      super(t, s3, i5), this.core = t, this.logger = s3, this.context = de3, this.storagePrefix = S2, this.storageVersion = pe4, this.events = /* @__PURE__ */ new Map(), this.shouldPersist = false, this.init = async () => {
        if (!Qn2()) try {
          const e2 = { eventId: Yn2(), timestamp: Date.now(), domain: this.getAppDomain(), props: { event: "INIT", type: "", properties: { client_id: await this.core.crypto.getClientId(), user_agent: Ye2(this.core.relayer.protocol, this.core.relayer.version, Q3) } } };
          await this.sendEvent([e2]);
        } catch (e2) {
          this.logger.warn(e2);
        }
      }, this.createEvent = (e2) => {
        const { event: r3 = "ERROR", type: o5 = "", properties: { topic: n6, trace: a5 } } = e2, h8 = Yn2(), d6 = this.core.projectId || "", l6 = Date.now(), g8 = { eventId: h8, timestamp: l6, props: { event: r3, type: o5, properties: { topic: n6, trace: a5 } }, bundleId: d6, domain: this.getAppDomain(), ...this.setMethods(h8) };
        return this.telemetryEnabled && (this.events.set(h8, g8), this.shouldPersist = true), g8;
      }, this.getEvent = (e2) => {
        const { eventId: r3, topic: o5 } = e2;
        if (r3) return this.events.get(r3);
        const n6 = Array.from(this.events.values()).find((a5) => a5.props.properties.topic === o5);
        if (n6) return { ...n6, ...this.setMethods(n6.eventId) };
      }, this.deleteEvent = (e2) => {
        const { eventId: r3 } = e2;
        this.events.delete(r3), this.shouldPersist = true;
      }, this.setEventListeners = () => {
        this.core.heartbeat.on(r.pulse, async () => {
          this.shouldPersist && await this.persist(), this.events.forEach((e2) => {
            (0, import_time4.fromMiliseconds)(Date.now()) - (0, import_time4.fromMiliseconds)(e2.timestamp) > ue2 && (this.events.delete(e2.eventId), this.shouldPersist = true);
          });
        });
      }, this.setMethods = (e2) => ({ addTrace: (r3) => this.addTrace(e2, r3), setError: (r3) => this.setError(e2, r3) }), this.addTrace = (e2, r3) => {
        const o5 = this.events.get(e2);
        o5 && (o5.props.properties.trace.push(r3), this.events.set(e2, o5), this.shouldPersist = true);
      }, this.setError = (e2, r3) => {
        const o5 = this.events.get(e2);
        o5 && (o5.props.type = r3, o5.timestamp = Date.now(), this.events.set(e2, o5), this.shouldPersist = true);
      }, this.persist = async () => {
        await this.core.storage.setItem(this.storageKey, Array.from(this.events.values())), this.shouldPersist = false;
      }, this.restore = async () => {
        try {
          const e2 = await this.core.storage.getItem(this.storageKey) || [];
          if (!e2.length) return;
          e2.forEach((r3) => {
            this.events.set(r3.eventId, { ...r3, ...this.setMethods(r3.eventId) });
          });
        } catch (e2) {
          this.logger.warn(e2);
        }
      }, this.submit = async () => {
        if (!this.telemetryEnabled || this.events.size === 0) return;
        const e2 = [];
        for (const [r3, o5] of this.events) o5.props.type && e2.push(o5);
        if (e2.length !== 0) try {
          if ((await this.sendEvent(e2)).ok) for (const r3 of e2) this.events.delete(r3.eventId), this.shouldPersist = true;
        } catch (r3) {
          this.logger.warn(r3);
        }
      }, this.sendEvent = async (e2) => {
        const r3 = this.getAppDomain() ? "" : "&sp=desktop";
        return await fetch(`${ye3}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${Q3}${r3}`, { method: "POST", body: JSON.stringify(e2) });
      }, this.getAppDomain = () => Je2().url, this.logger = Re(s3, this.context), this.telemetryEnabled = i5, i5 ? this.restore().then(async () => {
        await this.submit(), this.setEventListeners();
      }) : this.persist();
    }
    get storageKey() {
      return this.storagePrefix + this.storageVersion + this.core.customStoragePrefix + "//" + this.context;
    }
  };
  var Ce4 = class xe3 extends n2 {
    constructor(t) {
      super(t), this.protocol = ct2, this.version = lt2, this.name = W4, this.events = new import_events7.EventEmitter(), this.initialized = false, this.on = (o5, n6) => this.events.on(o5, n6), this.once = (o5, n6) => this.events.once(o5, n6), this.off = (o5, n6) => this.events.off(o5, n6), this.removeListener = (o5, n6) => this.events.removeListener(o5, n6), this.dispatchEnvelope = ({ topic: o5, message: n6, sessionExists: a5 }) => {
        if (!o5 || !n6) return;
        const h8 = { topic: o5, message: n6, publishedAt: Date.now(), transportType: D3.link_mode };
        this.relayer.onLinkMessageEvent(h8, { sessionExists: a5 });
      };
      const s3 = this.getGlobalCore(t?.customStoragePrefix);
      if (s3) try {
        return this.customStoragePrefix = s3.customStoragePrefix, this.logger = s3.logger, this.heartbeat = s3.heartbeat, this.crypto = s3.crypto, this.history = s3.history, this.expirer = s3.expirer, this.storage = s3.storage, this.relayer = s3.relayer, this.pairing = s3.pairing, this.verify = s3.verify, this.echoClient = s3.echoClient, this.linkModeSupportedApps = s3.linkModeSupportedApps, this.eventClient = s3.eventClient, this.initialized = s3.initialized, this.logChunkController = s3.logChunkController, s3;
      } catch (o5) {
        console.warn("Failed to copy global core", o5);
      }
      this.projectId = t?.projectId, this.relayUrl = t?.relayUrl || pt, this.customStoragePrefix = t?.customStoragePrefix ? `:${t.customStoragePrefix}` : "";
      const i5 = Ge({ level: typeof t?.logger == "string" && t.logger ? t.logger : Dt2.logger, name: W4 }), { logger: e2, chunkLoggerController: r3 } = Ue({ opts: i5, maxSizeInBytes: t?.maxLogBlobSizeInBytes, loggerOverride: t?.logger });
      this.logChunkController = r3, this.logChunkController?.downloadLogsBlobInBrowser && (window.downloadLogsBlobInBrowser = async () => {
        this.logChunkController?.downloadLogsBlobInBrowser && this.logChunkController?.downloadLogsBlobInBrowser({ clientId: await this.crypto.getClientId() });
      }), this.logger = Re(e2, this.name), this.heartbeat = new i(), this.crypto = new _e3(this, this.logger, t?.keychain), this.history = new Ie4(this, this.logger), this.expirer = new Te3(this, this.logger), this.storage = t?.storage ? t.storage : new h2({ ...zt3, ...t?.storageOptions }), this.relayer = new fe4({ core: this, logger: this.logger, relayUrl: this.relayUrl, projectId: this.projectId }), this.pairing = new Ee3(this, this.logger), this.verify = new Pe4(this, this.logger, this.storage), this.echoClient = new Re3(this.projectId || "", this.logger), this.linkModeSupportedApps = [], this.eventClient = new Se4(this, this.logger, t?.telemetryEnabled), this.setGlobalCore(this);
    }
    static async init(t) {
      const s3 = new xe3(t);
      await s3.initialize();
      const i5 = await s3.crypto.getClientId();
      return await s3.storage.setItem(Xt2, i5), s3;
    }
    get context() {
      return ee(this.logger);
    }
    async start() {
      this.initialized || await this.initialize();
    }
    async getLogsBlob() {
      return this.logChunkController?.logsToBlob({ clientId: await this.crypto.getClientId() });
    }
    async addLinkModeSupportedApp(t) {
      this.linkModeSupportedApps.includes(t) || (this.linkModeSupportedApps.push(t), await this.storage.setItem(dt2, this.linkModeSupportedApps));
    }
    async initialize() {
      this.logger.trace("Initialized");
      try {
        await this.crypto.init(), await this.history.init(), await this.expirer.init(), await this.relayer.init(), await this.heartbeat.init(), await this.pairing.init(), this.linkModeSupportedApps = await this.storage.getItem(dt2) || [], this.initialized = true, this.logger.info("Core Initialization Success");
      } catch (t) {
        throw this.logger.warn(t, `Core Initialization Failure at epoch ${Date.now()}`), this.logger.error(t.message), t;
      }
    }
    getGlobalCore(t = "") {
      try {
        if (this.isGlobalCoreDisabled()) return;
        const s3 = `_walletConnectCore_${t}`, i5 = `${s3}_count`;
        return globalThis[i5] = (globalThis[i5] || 0) + 1, globalThis[i5] > 1 && console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[i5]} times.`), globalThis[s3];
      } catch (s3) {
        console.warn("Failed to get global WalletConnect core", s3);
        return;
      }
    }
    setGlobalCore(t) {
      try {
        if (this.isGlobalCoreDisabled()) return;
        const s3 = `_walletConnectCore_${t.opts?.customStoragePrefix || ""}`;
        globalThis[s3] = t;
      } catch (s3) {
        console.warn("Failed to set global WalletConnect core", s3);
      }
    }
    isGlobalCoreDisabled() {
      try {
        return typeof process < "u" && process.env.DISABLE_GLOBAL_CORE === "true";
      } catch {
        return true;
      }
    }
  };
  var Ji = Ce4;

  // ../../node_modules/.pnpm/@walletconnect+web3wallet@1_6206cf9ce79dc0f43cbaba3ba20093f1/node_modules/@walletconnect/web3wallet/dist/index.es.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@walletconnect+auth-client@_379bd4beda0451b726a8e6585ec292f1/node_modules/@walletconnect/auth-client/dist/index.es.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@walletconnect+logger@2.1.2/node_modules/@walletconnect/logger/dist/index.es.js
  init_node_compat_inject();
  var import_pino = __toESM(require_browser5());
  var import_pino2 = __toESM(require_browser5());
  var c4 = { level: "info" };
  var n4 = "custom_context";
  var l4 = 1e3 * 1024;
  var O4 = class {
    constructor(e2) {
      this.nodeValue = e2, this.sizeInBytes = new TextEncoder().encode(this.nodeValue).length, this.next = null;
    }
    get value() {
      return this.nodeValue;
    }
    get size() {
      return this.sizeInBytes;
    }
  };
  var d3 = class {
    constructor(e2) {
      this.head = null, this.tail = null, this.lengthInNodes = 0, this.maxSizeInBytes = e2, this.sizeInBytes = 0;
    }
    append(e2) {
      const t = new O4(e2);
      if (t.size > this.maxSizeInBytes) throw new Error(`[LinkedList] Value too big to insert into list: ${e2} with size ${t.size}`);
      for (; this.size + t.size > this.maxSizeInBytes; ) this.shift();
      this.head ? (this.tail && (this.tail.next = t), this.tail = t) : (this.head = t, this.tail = t), this.lengthInNodes++, this.sizeInBytes += t.size;
    }
    shift() {
      if (!this.head) return;
      const e2 = this.head;
      this.head = this.head.next, this.head || (this.tail = null), this.lengthInNodes--, this.sizeInBytes -= e2.size;
    }
    toArray() {
      const e2 = [];
      let t = this.head;
      for (; t !== null; ) e2.push(t.value), t = t.next;
      return e2;
    }
    get length() {
      return this.lengthInNodes;
    }
    get size() {
      return this.sizeInBytes;
    }
    toOrderedArray() {
      return Array.from(this);
    }
    [Symbol.iterator]() {
      let e2 = this.head;
      return { next: () => {
        if (!e2) return { done: true, value: null };
        const t = e2.value;
        return e2 = e2.next, { done: false, value: t };
      } };
    }
  };
  var L2 = class {
    constructor(e2, t = l4) {
      this.level = e2 ?? "error", this.levelValue = import_pino.levels.values[this.level], this.MAX_LOG_SIZE_IN_BYTES = t, this.logs = new d3(this.MAX_LOG_SIZE_IN_BYTES);
    }
    forwardToConsole(e2, t) {
      t === import_pino.levels.values.error ? console.error(e2) : t === import_pino.levels.values.warn ? console.warn(e2) : t === import_pino.levels.values.debug ? console.debug(e2) : t === import_pino.levels.values.trace ? console.trace(e2) : console.log(e2);
    }
    appendToLogs(e2) {
      this.logs.append(safeJsonStringify({ timestamp: (/* @__PURE__ */ new Date()).toISOString(), log: e2 }));
      const t = typeof e2 == "string" ? JSON.parse(e2).level : e2.level;
      t >= this.levelValue && this.forwardToConsole(e2, t);
    }
    getLogs() {
      return this.logs;
    }
    clearLogs() {
      this.logs = new d3(this.MAX_LOG_SIZE_IN_BYTES);
    }
    getLogArray() {
      return Array.from(this.logs);
    }
    logsToBlob(e2) {
      const t = this.getLogArray();
      return t.push(safeJsonStringify({ extraMetadata: e2 })), new Blob(t, { type: "application/json" });
    }
  };
  var m2 = class {
    constructor(e2, t = l4) {
      this.baseChunkLogger = new L2(e2, t);
    }
    write(e2) {
      this.baseChunkLogger.appendToLogs(e2);
    }
    getLogs() {
      return this.baseChunkLogger.getLogs();
    }
    clearLogs() {
      this.baseChunkLogger.clearLogs();
    }
    getLogArray() {
      return this.baseChunkLogger.getLogArray();
    }
    logsToBlob(e2) {
      return this.baseChunkLogger.logsToBlob(e2);
    }
    downloadLogsBlobInBrowser(e2) {
      const t = URL.createObjectURL(this.logsToBlob(e2)), o5 = document.createElement("a");
      o5.href = t, o5.download = `walletconnect-logs-${(/* @__PURE__ */ new Date()).toISOString()}.txt`, document.body.appendChild(o5), o5.click(), document.body.removeChild(o5), URL.revokeObjectURL(t);
    }
  };
  var B2 = class {
    constructor(e2, t = l4) {
      this.baseChunkLogger = new L2(e2, t);
    }
    write(e2) {
      this.baseChunkLogger.appendToLogs(e2);
    }
    getLogs() {
      return this.baseChunkLogger.getLogs();
    }
    clearLogs() {
      this.baseChunkLogger.clearLogs();
    }
    getLogArray() {
      return this.baseChunkLogger.getLogArray();
    }
    logsToBlob(e2) {
      return this.baseChunkLogger.logsToBlob(e2);
    }
  };
  var x7 = Object.defineProperty;
  var S3 = Object.defineProperties;
  var _3 = Object.getOwnPropertyDescriptors;
  var p4 = Object.getOwnPropertySymbols;
  var T3 = Object.prototype.hasOwnProperty;
  var z5 = Object.prototype.propertyIsEnumerable;
  var f3 = (r3, e2, t) => e2 in r3 ? x7(r3, e2, { enumerable: true, configurable: true, writable: true, value: t }) : r3[e2] = t;
  var i3 = (r3, e2) => {
    for (var t in e2 || (e2 = {})) T3.call(e2, t) && f3(r3, t, e2[t]);
    if (p4) for (var t of p4(e2)) z5.call(e2, t) && f3(r3, t, e2[t]);
    return r3;
  };
  var g4 = (r3, e2) => S3(r3, _3(e2));
  function k4(r3) {
    return g4(i3({}, r3), { level: r3?.level || c4.level });
  }
  function v8(r3, e2 = n4) {
    return r3[e2] || "";
  }
  function b4(r3, e2, t = n4) {
    return r3[t] = e2, r3;
  }
  function y6(r3, e2 = n4) {
    let t = "";
    return typeof r3.bindings > "u" ? t = v8(r3, e2) : t = r3.bindings().context || "", t;
  }
  function w3(r3, e2, t = n4) {
    const o5 = y6(r3, t);
    return o5.trim() ? `${o5}/${e2}` : e2;
  }
  function E4(r3, e2, t = n4) {
    const o5 = w3(r3, e2, t), a5 = r3.child({ context: o5 });
    return b4(a5, o5, t);
  }
  function C5(r3) {
    var e2, t;
    const o5 = new m2((e2 = r3.opts) == null ? void 0 : e2.level, r3.maxSizeInBytes);
    return { logger: (0, import_pino.default)(g4(i3({}, r3.opts), { level: "trace", browser: g4(i3({}, (t = r3.opts) == null ? void 0 : t.browser), { write: (a5) => o5.write(a5) }) })), chunkLoggerController: o5 };
  }
  function I2(r3) {
    var e2;
    const t = new B2((e2 = r3.opts) == null ? void 0 : e2.level, r3.maxSizeInBytes);
    return { logger: (0, import_pino.default)(g4(i3({}, r3.opts), { level: "trace" }), t), chunkLoggerController: t };
  }
  function A4(r3) {
    return typeof r3.loggerOverride < "u" && typeof r3.loggerOverride != "string" ? { logger: r3.loggerOverride, chunkLoggerController: null } : typeof window < "u" ? C5(r3) : I2(r3);
  }

  // ../../node_modules/.pnpm/@walletconnect+auth-client@_379bd4beda0451b726a8e6585ec292f1/node_modules/@walletconnect/auth-client/dist/index.es.js
  var import_events8 = __toESM(require_events());

  // ../../node_modules/.pnpm/@walletconnect+utils@2.17.1/node_modules/@walletconnect/utils/dist/index.es.js
  init_node_compat_inject();
  var import_time6 = __toESM(require_cjs());
  var import_window_getters3 = __toESM(require_cjs2());
  var import_window_metadata2 = __toESM(require_cjs3());
  var q4 = __toESM(require_query_string());

  // ../../node_modules/.pnpm/@ethersproject+hash@5.7.0/node_modules/@ethersproject/hash/lib.esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@ethersproject+keccak256@5.8.0/node_modules/@ethersproject/keccak256/lib.esm/index.js
  init_node_compat_inject();
  var import_js_sha3 = __toESM(require_sha3());

  // ../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib.esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib.esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib.esm/_version.js
  init_node_compat_inject();
  var version7 = "logger/5.8.0";

  // ../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib.esm/index.js
  var _permanentCensorErrors = false;
  var _censorErrors = false;
  var LogLevels = { debug: 1, "default": 2, info: 2, warning: 3, error: 4, off: 5 };
  var _logLevel = LogLevels["default"];
  var _globalLogger = null;
  function _checkNormalize() {
    try {
      const missing = [];
      ["NFD", "NFC", "NFKD", "NFKC"].forEach((form) => {
        try {
          if ("test".normalize(form) !== "test") {
            throw new Error("bad normalize");
          }
          ;
        } catch (error51) {
          missing.push(form);
        }
      });
      if (missing.length) {
        throw new Error("missing " + missing.join(", "));
      }
      if (String.fromCharCode(233).normalize("NFD") !== String.fromCharCode(101, 769)) {
        throw new Error("broken implementation");
      }
    } catch (error51) {
      return error51.message;
    }
    return null;
  }
  var _normalizeError = _checkNormalize();
  var LogLevel;
  (function(LogLevel2) {
    LogLevel2["DEBUG"] = "DEBUG";
    LogLevel2["INFO"] = "INFO";
    LogLevel2["WARNING"] = "WARNING";
    LogLevel2["ERROR"] = "ERROR";
    LogLevel2["OFF"] = "OFF";
  })(LogLevel || (LogLevel = {}));
  var ErrorCode;
  (function(ErrorCode2) {
    ErrorCode2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
    ErrorCode2["NOT_IMPLEMENTED"] = "NOT_IMPLEMENTED";
    ErrorCode2["UNSUPPORTED_OPERATION"] = "UNSUPPORTED_OPERATION";
    ErrorCode2["NETWORK_ERROR"] = "NETWORK_ERROR";
    ErrorCode2["SERVER_ERROR"] = "SERVER_ERROR";
    ErrorCode2["TIMEOUT"] = "TIMEOUT";
    ErrorCode2["BUFFER_OVERRUN"] = "BUFFER_OVERRUN";
    ErrorCode2["NUMERIC_FAULT"] = "NUMERIC_FAULT";
    ErrorCode2["MISSING_NEW"] = "MISSING_NEW";
    ErrorCode2["INVALID_ARGUMENT"] = "INVALID_ARGUMENT";
    ErrorCode2["MISSING_ARGUMENT"] = "MISSING_ARGUMENT";
    ErrorCode2["UNEXPECTED_ARGUMENT"] = "UNEXPECTED_ARGUMENT";
    ErrorCode2["CALL_EXCEPTION"] = "CALL_EXCEPTION";
    ErrorCode2["INSUFFICIENT_FUNDS"] = "INSUFFICIENT_FUNDS";
    ErrorCode2["NONCE_EXPIRED"] = "NONCE_EXPIRED";
    ErrorCode2["REPLACEMENT_UNDERPRICED"] = "REPLACEMENT_UNDERPRICED";
    ErrorCode2["UNPREDICTABLE_GAS_LIMIT"] = "UNPREDICTABLE_GAS_LIMIT";
    ErrorCode2["TRANSACTION_REPLACED"] = "TRANSACTION_REPLACED";
    ErrorCode2["ACTION_REJECTED"] = "ACTION_REJECTED";
  })(ErrorCode || (ErrorCode = {}));
  var HEX = "0123456789abcdef";
  var Logger = class _Logger {
    constructor(version16) {
      Object.defineProperty(this, "version", {
        enumerable: true,
        value: version16,
        writable: false
      });
    }
    _log(logLevel, args) {
      const level = logLevel.toLowerCase();
      if (LogLevels[level] == null) {
        this.throwArgumentError("invalid log level name", "logLevel", logLevel);
      }
      if (_logLevel > LogLevels[level]) {
        return;
      }
      console.log.apply(console, args);
    }
    debug(...args) {
      this._log(_Logger.levels.DEBUG, args);
    }
    info(...args) {
      this._log(_Logger.levels.INFO, args);
    }
    warn(...args) {
      this._log(_Logger.levels.WARNING, args);
    }
    makeError(message, code2, params) {
      if (_censorErrors) {
        return this.makeError("censored error", code2, {});
      }
      if (!code2) {
        code2 = _Logger.errors.UNKNOWN_ERROR;
      }
      if (!params) {
        params = {};
      }
      const messageDetails = [];
      Object.keys(params).forEach((key2) => {
        const value = params[key2];
        try {
          if (value instanceof Uint8Array) {
            let hex3 = "";
            for (let i5 = 0; i5 < value.length; i5++) {
              hex3 += HEX[value[i5] >> 4];
              hex3 += HEX[value[i5] & 15];
            }
            messageDetails.push(key2 + "=Uint8Array(0x" + hex3 + ")");
          } else {
            messageDetails.push(key2 + "=" + JSON.stringify(value));
          }
        } catch (error52) {
          messageDetails.push(key2 + "=" + JSON.stringify(params[key2].toString()));
        }
      });
      messageDetails.push(`code=${code2}`);
      messageDetails.push(`version=${this.version}`);
      const reason = message;
      let url2 = "";
      switch (code2) {
        case ErrorCode.NUMERIC_FAULT: {
          url2 = "NUMERIC_FAULT";
          const fault = message;
          switch (fault) {
            case "overflow":
            case "underflow":
            case "division-by-zero":
              url2 += "-" + fault;
              break;
            case "negative-power":
            case "negative-width":
              url2 += "-unsupported";
              break;
            case "unbound-bitwise-result":
              url2 += "-unbound-result";
              break;
          }
          break;
        }
        case ErrorCode.CALL_EXCEPTION:
        case ErrorCode.INSUFFICIENT_FUNDS:
        case ErrorCode.MISSING_NEW:
        case ErrorCode.NONCE_EXPIRED:
        case ErrorCode.REPLACEMENT_UNDERPRICED:
        case ErrorCode.TRANSACTION_REPLACED:
        case ErrorCode.UNPREDICTABLE_GAS_LIMIT:
          url2 = code2;
          break;
      }
      if (url2) {
        message += " [ See: https://links.ethers.org/v5-errors-" + url2 + " ]";
      }
      if (messageDetails.length) {
        message += " (" + messageDetails.join(", ") + ")";
      }
      const error51 = new Error(message);
      error51.reason = reason;
      error51.code = code2;
      Object.keys(params).forEach(function(key2) {
        error51[key2] = params[key2];
      });
      return error51;
    }
    throwError(message, code2, params) {
      throw this.makeError(message, code2, params);
    }
    throwArgumentError(message, name2, value) {
      return this.throwError(message, _Logger.errors.INVALID_ARGUMENT, {
        argument: name2,
        value
      });
    }
    assert(condition, message, code2, params) {
      if (!!condition) {
        return;
      }
      this.throwError(message, code2, params);
    }
    assertArgument(condition, message, name2, value) {
      if (!!condition) {
        return;
      }
      this.throwArgumentError(message, name2, value);
    }
    checkNormalize(message) {
      if (message == null) {
        message = "platform missing String.prototype.normalize";
      }
      if (_normalizeError) {
        this.throwError("platform missing String.prototype.normalize", _Logger.errors.UNSUPPORTED_OPERATION, {
          operation: "String.prototype.normalize",
          form: _normalizeError
        });
      }
    }
    checkSafeUint53(value, message) {
      if (typeof value !== "number") {
        return;
      }
      if (message == null) {
        message = "value not safe";
      }
      if (value < 0 || value >= 9007199254740991) {
        this.throwError(message, _Logger.errors.NUMERIC_FAULT, {
          operation: "checkSafeInteger",
          fault: "out-of-safe-range",
          value
        });
      }
      if (value % 1) {
        this.throwError(message, _Logger.errors.NUMERIC_FAULT, {
          operation: "checkSafeInteger",
          fault: "non-integer",
          value
        });
      }
    }
    checkArgumentCount(count, expectedCount, message) {
      if (message) {
        message = ": " + message;
      } else {
        message = "";
      }
      if (count < expectedCount) {
        this.throwError("missing argument" + message, _Logger.errors.MISSING_ARGUMENT, {
          count,
          expectedCount
        });
      }
      if (count > expectedCount) {
        this.throwError("too many arguments" + message, _Logger.errors.UNEXPECTED_ARGUMENT, {
          count,
          expectedCount
        });
      }
    }
    checkNew(target, kind) {
      if (target === Object || target == null) {
        this.throwError("missing new", _Logger.errors.MISSING_NEW, { name: kind.name });
      }
    }
    checkAbstract(target, kind) {
      if (target === kind) {
        this.throwError("cannot instantiate abstract class " + JSON.stringify(kind.name) + " directly; use a sub-class", _Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: "new" });
      } else if (target === Object || target == null) {
        this.throwError("missing new", _Logger.errors.MISSING_NEW, { name: kind.name });
      }
    }
    static globalLogger() {
      if (!_globalLogger) {
        _globalLogger = new _Logger(version7);
      }
      return _globalLogger;
    }
    static setCensorship(censorship, permanent) {
      if (!censorship && permanent) {
        this.globalLogger().throwError("cannot permanently disable censorship", _Logger.errors.UNSUPPORTED_OPERATION, {
          operation: "setCensorship"
        });
      }
      if (_permanentCensorErrors) {
        if (!censorship) {
          return;
        }
        this.globalLogger().throwError("error censorship permanent", _Logger.errors.UNSUPPORTED_OPERATION, {
          operation: "setCensorship"
        });
      }
      _censorErrors = !!censorship;
      _permanentCensorErrors = !!permanent;
    }
    static setLogLevel(logLevel) {
      const level = LogLevels[logLevel.toLowerCase()];
      if (level == null) {
        _Logger.globalLogger().warn("invalid log level - " + logLevel);
        return;
      }
      _logLevel = level;
    }
    static from(version16) {
      return new _Logger(version16);
    }
  };
  Logger.errors = ErrorCode;
  Logger.levels = LogLevel;

  // ../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib.esm/_version.js
  init_node_compat_inject();
  var version8 = "bytes/5.8.0";

  // ../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib.esm/index.js
  var logger = new Logger(version8);
  function isHexable(value) {
    return !!value.toHexString;
  }
  function addSlice(array3) {
    if (array3.slice) {
      return array3;
    }
    array3.slice = function() {
      const args = Array.prototype.slice.call(arguments);
      return addSlice(new Uint8Array(Array.prototype.slice.apply(array3, args)));
    };
    return array3;
  }
  function isBytesLike(value) {
    return isHexString2(value) && !(value.length % 2) || isBytes7(value);
  }
  function isInteger(value) {
    return typeof value === "number" && value == value && value % 1 === 0;
  }
  function isBytes7(value) {
    if (value == null) {
      return false;
    }
    if (value.constructor === Uint8Array) {
      return true;
    }
    if (typeof value === "string") {
      return false;
    }
    if (!isInteger(value.length) || value.length < 0) {
      return false;
    }
    for (let i5 = 0; i5 < value.length; i5++) {
      const v13 = value[i5];
      if (!isInteger(v13) || v13 < 0 || v13 >= 256) {
        return false;
      }
    }
    return true;
  }
  function arrayify(value, options) {
    if (!options) {
      options = {};
    }
    if (typeof value === "number") {
      logger.checkSafeUint53(value, "invalid arrayify value");
      const result = [];
      while (value) {
        result.unshift(value & 255);
        value = parseInt(String(value / 256));
      }
      if (result.length === 0) {
        result.push(0);
      }
      return addSlice(new Uint8Array(result));
    }
    if (options.allowMissingPrefix && typeof value === "string" && value.substring(0, 2) !== "0x") {
      value = "0x" + value;
    }
    if (isHexable(value)) {
      value = value.toHexString();
    }
    if (isHexString2(value)) {
      let hex3 = value.substring(2);
      if (hex3.length % 2) {
        if (options.hexPad === "left") {
          hex3 = "0" + hex3;
        } else if (options.hexPad === "right") {
          hex3 += "0";
        } else {
          logger.throwArgumentError("hex data is odd-length", "value", value);
        }
      }
      const result = [];
      for (let i5 = 0; i5 < hex3.length; i5 += 2) {
        result.push(parseInt(hex3.substring(i5, i5 + 2), 16));
      }
      return addSlice(new Uint8Array(result));
    }
    if (isBytes7(value)) {
      return addSlice(new Uint8Array(value));
    }
    return logger.throwArgumentError("invalid arrayify value", "value", value);
  }
  function concat4(items) {
    const objects = items.map((item) => arrayify(item));
    const length2 = objects.reduce((accum, item) => accum + item.length, 0);
    const result = new Uint8Array(length2);
    objects.reduce((offset2, object2) => {
      result.set(object2, offset2);
      return offset2 + object2.length;
    }, 0);
    return addSlice(result);
  }
  function zeroPad(value, length2) {
    value = arrayify(value);
    if (value.length > length2) {
      logger.throwArgumentError("value out of range", "value", arguments[0]);
    }
    const result = new Uint8Array(length2);
    result.set(value, length2 - value.length);
    return addSlice(result);
  }
  function isHexString2(value, length2) {
    if (typeof value !== "string" || !value.match(/^0x[0-9A-Fa-f]*$/)) {
      return false;
    }
    if (length2 && value.length !== 2 + 2 * length2) {
      return false;
    }
    return true;
  }
  var HexCharacters = "0123456789abcdef";
  function hexlify(value, options) {
    if (!options) {
      options = {};
    }
    if (typeof value === "number") {
      logger.checkSafeUint53(value, "invalid hexlify value");
      let hex3 = "";
      while (value) {
        hex3 = HexCharacters[value & 15] + hex3;
        value = Math.floor(value / 16);
      }
      if (hex3.length) {
        if (hex3.length % 2) {
          hex3 = "0" + hex3;
        }
        return "0x" + hex3;
      }
      return "0x00";
    }
    if (typeof value === "bigint") {
      value = value.toString(16);
      if (value.length % 2) {
        return "0x0" + value;
      }
      return "0x" + value;
    }
    if (options.allowMissingPrefix && typeof value === "string" && value.substring(0, 2) !== "0x") {
      value = "0x" + value;
    }
    if (isHexable(value)) {
      return value.toHexString();
    }
    if (isHexString2(value)) {
      if (value.length % 2) {
        if (options.hexPad === "left") {
          value = "0x0" + value.substring(2);
        } else if (options.hexPad === "right") {
          value += "0";
        } else {
          logger.throwArgumentError("hex data is odd-length", "value", value);
        }
      }
      return value.toLowerCase();
    }
    if (isBytes7(value)) {
      let result = "0x";
      for (let i5 = 0; i5 < value.length; i5++) {
        let v13 = value[i5];
        result += HexCharacters[(v13 & 240) >> 4] + HexCharacters[v13 & 15];
      }
      return result;
    }
    return logger.throwArgumentError("invalid hexlify value", "value", value);
  }
  function hexDataLength(data) {
    if (typeof data !== "string") {
      data = hexlify(data);
    } else if (!isHexString2(data) || data.length % 2) {
      return null;
    }
    return (data.length - 2) / 2;
  }
  function hexDataSlice(data, offset2, endOffset) {
    if (typeof data !== "string") {
      data = hexlify(data);
    } else if (!isHexString2(data) || data.length % 2) {
      logger.throwArgumentError("invalid hexData", "value", data);
    }
    offset2 = 2 + 2 * offset2;
    if (endOffset != null) {
      return "0x" + data.substring(offset2, 2 + 2 * endOffset);
    }
    return "0x" + data.substring(offset2);
  }
  function hexZeroPad(value, length2) {
    if (typeof value !== "string") {
      value = hexlify(value);
    } else if (!isHexString2(value)) {
      logger.throwArgumentError("invalid hex string", "value", value);
    }
    if (value.length > 2 * length2 + 2) {
      logger.throwArgumentError("value out of range", "value", arguments[1]);
    }
    while (value.length < 2 * length2 + 2) {
      value = "0x0" + value.substring(2);
    }
    return value;
  }
  function splitSignature(signature2) {
    const result = {
      r: "0x",
      s: "0x",
      _vs: "0x",
      recoveryParam: 0,
      v: 0,
      yParityAndS: "0x",
      compact: "0x"
    };
    if (isBytesLike(signature2)) {
      let bytes = arrayify(signature2);
      if (bytes.length === 64) {
        result.v = 27 + (bytes[32] >> 7);
        bytes[32] &= 127;
        result.r = hexlify(bytes.slice(0, 32));
        result.s = hexlify(bytes.slice(32, 64));
      } else if (bytes.length === 65) {
        result.r = hexlify(bytes.slice(0, 32));
        result.s = hexlify(bytes.slice(32, 64));
        result.v = bytes[64];
      } else {
        logger.throwArgumentError("invalid signature string", "signature", signature2);
      }
      if (result.v < 27) {
        if (result.v === 0 || result.v === 1) {
          result.v += 27;
        } else {
          logger.throwArgumentError("signature invalid v byte", "signature", signature2);
        }
      }
      result.recoveryParam = 1 - result.v % 2;
      if (result.recoveryParam) {
        bytes[32] |= 128;
      }
      result._vs = hexlify(bytes.slice(32, 64));
    } else {
      result.r = signature2.r;
      result.s = signature2.s;
      result.v = signature2.v;
      result.recoveryParam = signature2.recoveryParam;
      result._vs = signature2._vs;
      if (result._vs != null) {
        const vs4 = zeroPad(arrayify(result._vs), 32);
        result._vs = hexlify(vs4);
        const recoveryParam = vs4[0] >= 128 ? 1 : 0;
        if (result.recoveryParam == null) {
          result.recoveryParam = recoveryParam;
        } else if (result.recoveryParam !== recoveryParam) {
          logger.throwArgumentError("signature recoveryParam mismatch _vs", "signature", signature2);
        }
        vs4[0] &= 127;
        const s3 = hexlify(vs4);
        if (result.s == null) {
          result.s = s3;
        } else if (result.s !== s3) {
          logger.throwArgumentError("signature v mismatch _vs", "signature", signature2);
        }
      }
      if (result.recoveryParam == null) {
        if (result.v == null) {
          logger.throwArgumentError("signature missing v and recoveryParam", "signature", signature2);
        } else if (result.v === 0 || result.v === 1) {
          result.recoveryParam = result.v;
        } else {
          result.recoveryParam = 1 - result.v % 2;
        }
      } else {
        if (result.v == null) {
          result.v = 27 + result.recoveryParam;
        } else {
          const recId = result.v === 0 || result.v === 1 ? result.v : 1 - result.v % 2;
          if (result.recoveryParam !== recId) {
            logger.throwArgumentError("signature recoveryParam mismatch v", "signature", signature2);
          }
        }
      }
      if (result.r == null || !isHexString2(result.r)) {
        logger.throwArgumentError("signature missing or invalid r", "signature", signature2);
      } else {
        result.r = hexZeroPad(result.r, 32);
      }
      if (result.s == null || !isHexString2(result.s)) {
        logger.throwArgumentError("signature missing or invalid s", "signature", signature2);
      } else {
        result.s = hexZeroPad(result.s, 32);
      }
      const vs3 = arrayify(result.s);
      if (vs3[0] >= 128) {
        logger.throwArgumentError("signature s out of range", "signature", signature2);
      }
      if (result.recoveryParam) {
        vs3[0] |= 128;
      }
      const _vs = hexlify(vs3);
      if (result._vs) {
        if (!isHexString2(result._vs)) {
          logger.throwArgumentError("signature invalid _vs", "signature", signature2);
        }
        result._vs = hexZeroPad(result._vs, 32);
      }
      if (result._vs == null) {
        result._vs = _vs;
      } else if (result._vs !== _vs) {
        logger.throwArgumentError("signature _vs mismatch v and s", "signature", signature2);
      }
    }
    result.yParityAndS = result._vs;
    result.compact = result.r + result.yParityAndS.substring(2);
    return result;
  }

  // ../../node_modules/.pnpm/@ethersproject+keccak256@5.8.0/node_modules/@ethersproject/keccak256/lib.esm/index.js
  function keccak2563(data) {
    return "0x" + import_js_sha3.default.keccak_256(arrayify(data));
  }

  // ../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib.esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib.esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js
  init_node_compat_inject();
  var import_bn2 = __toESM(require_bn());

  // ../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib.esm/_version.js
  init_node_compat_inject();
  var version9 = "bignumber/5.8.0";

  // ../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js
  var BN2 = import_bn2.default.BN;
  var logger2 = new Logger(version9);
  function _base36To16(value) {
    return new BN2(value, 36).toString(16);
  }

  // ../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib.esm/utf8.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib.esm/_version.js
  init_node_compat_inject();
  var version10 = "strings/5.8.0";

  // ../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib.esm/utf8.js
  var logger3 = new Logger(version10);
  var UnicodeNormalizationForm;
  (function(UnicodeNormalizationForm2) {
    UnicodeNormalizationForm2["current"] = "";
    UnicodeNormalizationForm2["NFC"] = "NFC";
    UnicodeNormalizationForm2["NFD"] = "NFD";
    UnicodeNormalizationForm2["NFKC"] = "NFKC";
    UnicodeNormalizationForm2["NFKD"] = "NFKD";
  })(UnicodeNormalizationForm || (UnicodeNormalizationForm = {}));
  var Utf8ErrorReason;
  (function(Utf8ErrorReason2) {
    Utf8ErrorReason2["UNEXPECTED_CONTINUE"] = "unexpected continuation byte";
    Utf8ErrorReason2["BAD_PREFIX"] = "bad codepoint prefix";
    Utf8ErrorReason2["OVERRUN"] = "string overrun";
    Utf8ErrorReason2["MISSING_CONTINUE"] = "missing continuation byte";
    Utf8ErrorReason2["OUT_OF_RANGE"] = "out of UTF-8 range";
    Utf8ErrorReason2["UTF16_SURROGATE"] = "UTF-16 surrogate";
    Utf8ErrorReason2["OVERLONG"] = "overlong representation";
  })(Utf8ErrorReason || (Utf8ErrorReason = {}));
  function errorFunc(reason, offset2, bytes, output, badCodepoint) {
    return logger3.throwArgumentError(`invalid codepoint at offset ${offset2}; ${reason}`, "bytes", bytes);
  }
  function ignoreFunc(reason, offset2, bytes, output, badCodepoint) {
    if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {
      let i5 = 0;
      for (let o5 = offset2 + 1; o5 < bytes.length; o5++) {
        if (bytes[o5] >> 6 !== 2) {
          break;
        }
        i5++;
      }
      return i5;
    }
    if (reason === Utf8ErrorReason.OVERRUN) {
      return bytes.length - offset2 - 1;
    }
    return 0;
  }
  function replaceFunc(reason, offset2, bytes, output, badCodepoint) {
    if (reason === Utf8ErrorReason.OVERLONG) {
      output.push(badCodepoint);
      return 0;
    }
    output.push(65533);
    return ignoreFunc(reason, offset2, bytes, output, badCodepoint);
  }
  var Utf8ErrorFuncs = Object.freeze({
    error: errorFunc,
    ignore: ignoreFunc,
    replace: replaceFunc
  });
  function toUtf8Bytes(str, form = UnicodeNormalizationForm.current) {
    if (form != UnicodeNormalizationForm.current) {
      logger3.checkNormalize();
      str = str.normalize(form);
    }
    let result = [];
    for (let i5 = 0; i5 < str.length; i5++) {
      const c7 = str.charCodeAt(i5);
      if (c7 < 128) {
        result.push(c7);
      } else if (c7 < 2048) {
        result.push(c7 >> 6 | 192);
        result.push(c7 & 63 | 128);
      } else if ((c7 & 64512) == 55296) {
        i5++;
        const c22 = str.charCodeAt(i5);
        if (i5 >= str.length || (c22 & 64512) !== 56320) {
          throw new Error("invalid utf-8 string");
        }
        const pair = 65536 + ((c7 & 1023) << 10) + (c22 & 1023);
        result.push(pair >> 18 | 240);
        result.push(pair >> 12 & 63 | 128);
        result.push(pair >> 6 & 63 | 128);
        result.push(pair & 63 | 128);
      } else {
        result.push(c7 >> 12 | 224);
        result.push(c7 >> 6 & 63 | 128);
        result.push(c7 & 63 | 128);
      }
    }
    return arrayify(result);
  }

  // ../../node_modules/.pnpm/@ethersproject+hash@5.7.0/node_modules/@ethersproject/hash/lib.esm/message.js
  init_node_compat_inject();
  var messagePrefix = "Ethereum Signed Message:\n";
  function hashMessage2(message) {
    if (typeof message === "string") {
      message = toUtf8Bytes(message);
    }
    return keccak2563(concat4([
      toUtf8Bytes(messagePrefix),
      toUtf8Bytes(String(message.length)),
      message
    ]));
  }

  // ../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib.esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib.esm/_version.js
  init_node_compat_inject();
  var version11 = "address/5.8.0";

  // ../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib.esm/index.js
  var logger4 = new Logger(version11);
  function getChecksumAddress(address) {
    if (!isHexString2(address, 20)) {
      logger4.throwArgumentError("invalid address", "address", address);
    }
    address = address.toLowerCase();
    const chars = address.substring(2).split("");
    const expanded = new Uint8Array(40);
    for (let i5 = 0; i5 < 40; i5++) {
      expanded[i5] = chars[i5].charCodeAt(0);
    }
    const hashed = arrayify(keccak2563(expanded));
    for (let i5 = 0; i5 < 40; i5 += 2) {
      if (hashed[i5 >> 1] >> 4 >= 8) {
        chars[i5] = chars[i5].toUpperCase();
      }
      if ((hashed[i5 >> 1] & 15) >= 8) {
        chars[i5 + 1] = chars[i5 + 1].toUpperCase();
      }
    }
    return "0x" + chars.join("");
  }
  var MAX_SAFE_INTEGER2 = 9007199254740991;
  function log10(x13) {
    if (Math.log10) {
      return Math.log10(x13);
    }
    return Math.log(x13) / Math.LN10;
  }
  var ibanLookup = {};
  for (let i5 = 0; i5 < 10; i5++) {
    ibanLookup[String(i5)] = String(i5);
  }
  for (let i5 = 0; i5 < 26; i5++) {
    ibanLookup[String.fromCharCode(65 + i5)] = String(10 + i5);
  }
  var safeDigits = Math.floor(log10(MAX_SAFE_INTEGER2));
  function ibanChecksum(address) {
    address = address.toUpperCase();
    address = address.substring(4) + address.substring(0, 2) + "00";
    let expanded = address.split("").map((c7) => {
      return ibanLookup[c7];
    }).join("");
    while (expanded.length >= safeDigits) {
      let block = expanded.substring(0, safeDigits);
      expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);
    }
    let checksum4 = String(98 - parseInt(expanded, 10) % 97);
    while (checksum4.length < 2) {
      checksum4 = "0" + checksum4;
    }
    return checksum4;
  }
  function getAddress2(address) {
    let result = null;
    if (typeof address !== "string") {
      logger4.throwArgumentError("invalid address", "address", address);
    }
    if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {
      if (address.substring(0, 2) !== "0x") {
        address = "0x" + address;
      }
      result = getChecksumAddress(address);
      if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {
        logger4.throwArgumentError("bad address checksum", "address", address);
      }
    } else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
      if (address.substring(2, 4) !== ibanChecksum(address)) {
        logger4.throwArgumentError("bad icap checksum", "address", address);
      }
      result = _base36To16(address.substring(4));
      while (result.length < 40) {
        result = "0" + result;
      }
      result = getChecksumAddress("0x" + result);
    } else {
      logger4.throwArgumentError("invalid address", "address", address);
    }
    return result;
  }

  // ../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib.esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib.esm/_version.js
  init_node_compat_inject();
  var version12 = "properties/5.8.0";

  // ../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib.esm/index.js
  var logger5 = new Logger(version12);
  function defineReadOnly(object2, name2, value) {
    Object.defineProperty(object2, name2, {
      enumerable: true,
      value,
      writable: false
    });
  }

  // ../../node_modules/.pnpm/@ethersproject+transactions@5.7.0/node_modules/@ethersproject/transactions/lib.esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib.esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js
  init_node_compat_inject();
  var import_bn3 = __toESM(require_bn());
  var import_hash = __toESM(require_hash());
  function createCommonjsModule(fn, basedir, module) {
    return module = {
      path: basedir,
      exports: {},
      require: function(path, base4) {
        return commonjsRequire(path, base4 === void 0 || base4 === null ? module.path : base4);
      }
    }, fn(module, module.exports), module.exports;
  }
  function commonjsRequire() {
    throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  }
  var minimalisticAssert = assert11;
  function assert11(val, msg) {
    if (!val)
      throw new Error(msg || "Assertion failed");
  }
  assert11.equal = function assertEqual2(l6, r3, msg) {
    if (l6 != r3)
      throw new Error(msg || "Assertion failed: " + l6 + " != " + r3);
  };
  var utils_1 = createCommonjsModule(function(module, exports) {
    "use strict";
    var utils = exports;
    function toArray(msg, enc) {
      if (Array.isArray(msg))
        return msg.slice();
      if (!msg)
        return [];
      var res = [];
      if (typeof msg !== "string") {
        for (var i5 = 0; i5 < msg.length; i5++)
          res[i5] = msg[i5] | 0;
        return res;
      }
      if (enc === "hex") {
        msg = msg.replace(/[^a-z0-9]+/ig, "");
        if (msg.length % 2 !== 0)
          msg = "0" + msg;
        for (var i5 = 0; i5 < msg.length; i5 += 2)
          res.push(parseInt(msg[i5] + msg[i5 + 1], 16));
      } else {
        for (var i5 = 0; i5 < msg.length; i5++) {
          var c7 = msg.charCodeAt(i5);
          var hi2 = c7 >> 8;
          var lo4 = c7 & 255;
          if (hi2)
            res.push(hi2, lo4);
          else
            res.push(lo4);
        }
      }
      return res;
    }
    utils.toArray = toArray;
    function zero2(word) {
      if (word.length === 1)
        return "0" + word;
      else
        return word;
    }
    utils.zero2 = zero2;
    function toHex3(msg) {
      var res = "";
      for (var i5 = 0; i5 < msg.length; i5++)
        res += zero2(msg[i5].toString(16));
      return res;
    }
    utils.toHex = toHex3;
    utils.encode = function encode11(arr, enc) {
      if (enc === "hex")
        return toHex3(arr);
      else
        return arr;
    };
  });
  var utils_1$1 = createCommonjsModule(function(module, exports) {
    "use strict";
    var utils = exports;
    utils.assert = minimalisticAssert;
    utils.toArray = utils_1.toArray;
    utils.zero2 = utils_1.zero2;
    utils.toHex = utils_1.toHex;
    utils.encode = utils_1.encode;
    function getNAF2(num2, w7, bits) {
      var naf = new Array(Math.max(num2.bitLength(), bits) + 1);
      var i5;
      for (i5 = 0; i5 < naf.length; i5 += 1) {
        naf[i5] = 0;
      }
      var ws2 = 1 << w7 + 1;
      var k7 = num2.clone();
      for (i5 = 0; i5 < naf.length; i5++) {
        var z11;
        var mod3 = k7.andln(ws2 - 1);
        if (k7.isOdd()) {
          if (mod3 > (ws2 >> 1) - 1)
            z11 = (ws2 >> 1) - mod3;
          else
            z11 = mod3;
          k7.isubn(z11);
        } else {
          z11 = 0;
        }
        naf[i5] = z11;
        k7.iushrn(1);
      }
      return naf;
    }
    utils.getNAF = getNAF2;
    function getJSF2(k1, k22) {
      var jsf = [
        [],
        []
      ];
      k1 = k1.clone();
      k22 = k22.clone();
      var d1 = 0;
      var d22 = 0;
      var m8;
      while (k1.cmpn(-d1) > 0 || k22.cmpn(-d22) > 0) {
        var m14 = k1.andln(3) + d1 & 3;
        var m24 = k22.andln(3) + d22 & 3;
        if (m14 === 3)
          m14 = -1;
        if (m24 === 3)
          m24 = -1;
        var u1;
        if ((m14 & 1) === 0) {
          u1 = 0;
        } else {
          m8 = k1.andln(7) + d1 & 7;
          if ((m8 === 3 || m8 === 5) && m24 === 2)
            u1 = -m14;
          else
            u1 = m14;
        }
        jsf[0].push(u1);
        var u22;
        if ((m24 & 1) === 0) {
          u22 = 0;
        } else {
          m8 = k22.andln(7) + d22 & 7;
          if ((m8 === 3 || m8 === 5) && m14 === 2)
            u22 = -m24;
          else
            u22 = m24;
        }
        jsf[1].push(u22);
        if (2 * d1 === u1 + 1)
          d1 = 1 - d1;
        if (2 * d22 === u22 + 1)
          d22 = 1 - d22;
        k1.iushrn(1);
        k22.iushrn(1);
      }
      return jsf;
    }
    utils.getJSF = getJSF2;
    function cachedProperty(obj, name2, computer) {
      var key2 = "_" + name2;
      obj.prototype[name2] = function cachedProperty2() {
        return this[key2] !== void 0 ? this[key2] : this[key2] = computer.call(this);
      };
    }
    utils.cachedProperty = cachedProperty;
    function parseBytes(bytes) {
      return typeof bytes === "string" ? utils.toArray(bytes, "hex") : bytes;
    }
    utils.parseBytes = parseBytes;
    function intFromLE(bytes) {
      return new import_bn3.default(bytes, "hex", "le");
    }
    utils.intFromLE = intFromLE;
  });
  var getNAF = utils_1$1.getNAF;
  var getJSF = utils_1$1.getJSF;
  var assert$1 = utils_1$1.assert;
  function BaseCurve(type2, conf) {
    this.type = type2;
    this.p = new import_bn3.default(conf.p, 16);
    this.red = conf.prime ? import_bn3.default.red(conf.prime) : import_bn3.default.mont(this.p);
    this.zero = new import_bn3.default(0).toRed(this.red);
    this.one = new import_bn3.default(1).toRed(this.red);
    this.two = new import_bn3.default(2).toRed(this.red);
    this.n = conf.n && new import_bn3.default(conf.n, 16);
    this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);
    this._wnafT1 = new Array(4);
    this._wnafT2 = new Array(4);
    this._wnafT3 = new Array(4);
    this._wnafT4 = new Array(4);
    this._bitLength = this.n ? this.n.bitLength() : 0;
    var adjustCount = this.n && this.p.div(this.n);
    if (!adjustCount || adjustCount.cmpn(100) > 0) {
      this.redN = null;
    } else {
      this._maxwellTrick = true;
      this.redN = this.n.toRed(this.red);
    }
  }
  var base3 = BaseCurve;
  BaseCurve.prototype.point = function point() {
    throw new Error("Not implemented");
  };
  BaseCurve.prototype.validate = function validate8() {
    throw new Error("Not implemented");
  };
  BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p7, k7) {
    assert$1(p7.precomputed);
    var doubles = p7._getDoubles();
    var naf = getNAF(k7, 1, this._bitLength);
    var I7 = (1 << doubles.step + 1) - (doubles.step % 2 === 0 ? 2 : 1);
    I7 /= 3;
    var repr = [];
    var j6;
    var nafW;
    for (j6 = 0; j6 < naf.length; j6 += doubles.step) {
      nafW = 0;
      for (var l6 = j6 + doubles.step - 1; l6 >= j6; l6--)
        nafW = (nafW << 1) + naf[l6];
      repr.push(nafW);
    }
    var a5 = this.jpoint(null, null, null);
    var b9 = this.jpoint(null, null, null);
    for (var i5 = I7; i5 > 0; i5--) {
      for (j6 = 0; j6 < repr.length; j6++) {
        nafW = repr[j6];
        if (nafW === i5)
          b9 = b9.mixedAdd(doubles.points[j6]);
        else if (nafW === -i5)
          b9 = b9.mixedAdd(doubles.points[j6].neg());
      }
      a5 = a5.add(b9);
    }
    return a5.toP();
  };
  BaseCurve.prototype._wnafMul = function _wnafMul(p7, k7) {
    var w7 = 4;
    var nafPoints = p7._getNAFPoints(w7);
    w7 = nafPoints.wnd;
    var wnd = nafPoints.points;
    var naf = getNAF(k7, w7, this._bitLength);
    var acc = this.jpoint(null, null, null);
    for (var i5 = naf.length - 1; i5 >= 0; i5--) {
      for (var l6 = 0; i5 >= 0 && naf[i5] === 0; i5--)
        l6++;
      if (i5 >= 0)
        l6++;
      acc = acc.dblp(l6);
      if (i5 < 0)
        break;
      var z11 = naf[i5];
      assert$1(z11 !== 0);
      if (p7.type === "affine") {
        if (z11 > 0)
          acc = acc.mixedAdd(wnd[z11 - 1 >> 1]);
        else
          acc = acc.mixedAdd(wnd[-z11 - 1 >> 1].neg());
      } else {
        if (z11 > 0)
          acc = acc.add(wnd[z11 - 1 >> 1]);
        else
          acc = acc.add(wnd[-z11 - 1 >> 1].neg());
      }
    }
    return p7.type === "affine" ? acc.toP() : acc;
  };
  BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, points, coeffs, len, jacobianResult) {
    var wndWidth = this._wnafT1;
    var wnd = this._wnafT2;
    var naf = this._wnafT3;
    var max = 0;
    var i5;
    var j6;
    var p7;
    for (i5 = 0; i5 < len; i5++) {
      p7 = points[i5];
      var nafPoints = p7._getNAFPoints(defW);
      wndWidth[i5] = nafPoints.wnd;
      wnd[i5] = nafPoints.points;
    }
    for (i5 = len - 1; i5 >= 1; i5 -= 2) {
      var a5 = i5 - 1;
      var b9 = i5;
      if (wndWidth[a5] !== 1 || wndWidth[b9] !== 1) {
        naf[a5] = getNAF(coeffs[a5], wndWidth[a5], this._bitLength);
        naf[b9] = getNAF(coeffs[b9], wndWidth[b9], this._bitLength);
        max = Math.max(naf[a5].length, max);
        max = Math.max(naf[b9].length, max);
        continue;
      }
      var comb = [
        points[a5],
        /* 1 */
        null,
        /* 3 */
        null,
        /* 5 */
        points[b9]
        /* 7 */
      ];
      if (points[a5].y.cmp(points[b9].y) === 0) {
        comb[1] = points[a5].add(points[b9]);
        comb[2] = points[a5].toJ().mixedAdd(points[b9].neg());
      } else if (points[a5].y.cmp(points[b9].y.redNeg()) === 0) {
        comb[1] = points[a5].toJ().mixedAdd(points[b9]);
        comb[2] = points[a5].add(points[b9].neg());
      } else {
        comb[1] = points[a5].toJ().mixedAdd(points[b9]);
        comb[2] = points[a5].toJ().mixedAdd(points[b9].neg());
      }
      var index2 = [
        -3,
        /* -1 -1 */
        -1,
        /* -1 0 */
        -5,
        /* -1 1 */
        -7,
        /* 0 -1 */
        0,
        /* 0 0 */
        7,
        /* 0 1 */
        5,
        /* 1 -1 */
        1,
        /* 1 0 */
        3
        /* 1 1 */
      ];
      var jsf = getJSF(coeffs[a5], coeffs[b9]);
      max = Math.max(jsf[0].length, max);
      naf[a5] = new Array(max);
      naf[b9] = new Array(max);
      for (j6 = 0; j6 < max; j6++) {
        var ja = jsf[0][j6] | 0;
        var jb = jsf[1][j6] | 0;
        naf[a5][j6] = index2[(ja + 1) * 3 + (jb + 1)];
        naf[b9][j6] = 0;
        wnd[a5] = comb;
      }
    }
    var acc = this.jpoint(null, null, null);
    var tmp = this._wnafT4;
    for (i5 = max; i5 >= 0; i5--) {
      var k7 = 0;
      while (i5 >= 0) {
        var zero = true;
        for (j6 = 0; j6 < len; j6++) {
          tmp[j6] = naf[j6][i5] | 0;
          if (tmp[j6] !== 0)
            zero = false;
        }
        if (!zero)
          break;
        k7++;
        i5--;
      }
      if (i5 >= 0)
        k7++;
      acc = acc.dblp(k7);
      if (i5 < 0)
        break;
      for (j6 = 0; j6 < len; j6++) {
        var z11 = tmp[j6];
        p7;
        if (z11 === 0)
          continue;
        else if (z11 > 0)
          p7 = wnd[j6][z11 - 1 >> 1];
        else if (z11 < 0)
          p7 = wnd[j6][-z11 - 1 >> 1].neg();
        if (p7.type === "affine")
          acc = acc.mixedAdd(p7);
        else
          acc = acc.add(p7);
      }
    }
    for (i5 = 0; i5 < len; i5++)
      wnd[i5] = null;
    if (jacobianResult)
      return acc;
    else
      return acc.toP();
  };
  function BasePoint(curve, type2) {
    this.curve = curve;
    this.type = type2;
    this.precomputed = null;
  }
  BaseCurve.BasePoint = BasePoint;
  BasePoint.prototype.eq = function eq() {
    throw new Error("Not implemented");
  };
  BasePoint.prototype.validate = function validate9() {
    return this.curve.validate(this);
  };
  BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
    bytes = utils_1$1.toArray(bytes, enc);
    var len = this.p.byteLength();
    if ((bytes[0] === 4 || bytes[0] === 6 || bytes[0] === 7) && bytes.length - 1 === 2 * len) {
      if (bytes[0] === 6)
        assert$1(bytes[bytes.length - 1] % 2 === 0);
      else if (bytes[0] === 7)
        assert$1(bytes[bytes.length - 1] % 2 === 1);
      var res = this.point(
        bytes.slice(1, 1 + len),
        bytes.slice(1 + len, 1 + 2 * len)
      );
      return res;
    } else if ((bytes[0] === 2 || bytes[0] === 3) && bytes.length - 1 === len) {
      return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 3);
    }
    throw new Error("Unknown point format");
  };
  BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {
    return this.encode(enc, true);
  };
  BasePoint.prototype._encode = function _encode2(compact) {
    var len = this.curve.p.byteLength();
    var x13 = this.getX().toArray("be", len);
    if (compact)
      return [this.getY().isEven() ? 2 : 3].concat(x13);
    return [4].concat(x13, this.getY().toArray("be", len));
  };
  BasePoint.prototype.encode = function encode10(enc, compact) {
    return utils_1$1.encode(this._encode(compact), enc);
  };
  BasePoint.prototype.precompute = function precompute2(power) {
    if (this.precomputed)
      return this;
    var precomputed = {
      doubles: null,
      naf: null,
      beta: null
    };
    precomputed.naf = this._getNAFPoints(8);
    precomputed.doubles = this._getDoubles(4, power);
    precomputed.beta = this._getBeta();
    this.precomputed = precomputed;
    return this;
  };
  BasePoint.prototype._hasDoubles = function _hasDoubles(k7) {
    if (!this.precomputed)
      return false;
    var doubles = this.precomputed.doubles;
    if (!doubles)
      return false;
    return doubles.points.length >= Math.ceil((k7.bitLength() + 1) / doubles.step);
  };
  BasePoint.prototype._getDoubles = function _getDoubles(step, power) {
    if (this.precomputed && this.precomputed.doubles)
      return this.precomputed.doubles;
    var doubles = [this];
    var acc = this;
    for (var i5 = 0; i5 < power; i5 += step) {
      for (var j6 = 0; j6 < step; j6++)
        acc = acc.dbl();
      doubles.push(acc);
    }
    return {
      step,
      points: doubles
    };
  };
  BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {
    if (this.precomputed && this.precomputed.naf)
      return this.precomputed.naf;
    var res = [this];
    var max = (1 << wnd) - 1;
    var dbl3 = max === 1 ? null : this.dbl();
    for (var i5 = 1; i5 < max; i5++)
      res[i5] = res[i5 - 1].add(dbl3);
    return {
      wnd,
      points: res
    };
  };
  BasePoint.prototype._getBeta = function _getBeta() {
    return null;
  };
  BasePoint.prototype.dblp = function dblp(k7) {
    var r3 = this;
    for (var i5 = 0; i5 < k7; i5++)
      r3 = r3.dbl();
    return r3;
  };
  var inherits_browser = createCommonjsModule(function(module) {
    if (typeof Object.create === "function") {
      module.exports = function inherits(ctor, superCtor) {
        if (superCtor) {
          ctor.super_ = superCtor;
          ctor.prototype = Object.create(superCtor.prototype, {
            constructor: {
              value: ctor,
              enumerable: false,
              writable: true,
              configurable: true
            }
          });
        }
      };
    } else {
      module.exports = function inherits(ctor, superCtor) {
        if (superCtor) {
          ctor.super_ = superCtor;
          var TempCtor = function() {
          };
          TempCtor.prototype = superCtor.prototype;
          ctor.prototype = new TempCtor();
          ctor.prototype.constructor = ctor;
        }
      };
    }
  });
  var assert$2 = utils_1$1.assert;
  function ShortCurve(conf) {
    base3.call(this, "short", conf);
    this.a = new import_bn3.default(conf.a, 16).toRed(this.red);
    this.b = new import_bn3.default(conf.b, 16).toRed(this.red);
    this.tinv = this.two.redInvm();
    this.zeroA = this.a.fromRed().cmpn(0) === 0;
    this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;
    this.endo = this._getEndomorphism(conf);
    this._endoWnafT1 = new Array(4);
    this._endoWnafT2 = new Array(4);
  }
  inherits_browser(ShortCurve, base3);
  var short_1 = ShortCurve;
  ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {
    if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)
      return;
    var beta;
    var lambda;
    if (conf.beta) {
      beta = new import_bn3.default(conf.beta, 16).toRed(this.red);
    } else {
      var betas = this._getEndoRoots(this.p);
      beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];
      beta = beta.toRed(this.red);
    }
    if (conf.lambda) {
      lambda = new import_bn3.default(conf.lambda, 16);
    } else {
      var lambdas = this._getEndoRoots(this.n);
      if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {
        lambda = lambdas[0];
      } else {
        lambda = lambdas[1];
        assert$2(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);
      }
    }
    var basis;
    if (conf.basis) {
      basis = conf.basis.map(function(vec) {
        return {
          a: new import_bn3.default(vec.a, 16),
          b: new import_bn3.default(vec.b, 16)
        };
      });
    } else {
      basis = this._getEndoBasis(lambda);
    }
    return {
      beta,
      lambda,
      basis
    };
  };
  ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num2) {
    var red = num2 === this.p ? this.red : import_bn3.default.mont(num2);
    var tinv = new import_bn3.default(2).toRed(red).redInvm();
    var ntinv = tinv.redNeg();
    var s3 = new import_bn3.default(3).toRed(red).redNeg().redSqrt().redMul(tinv);
    var l1 = ntinv.redAdd(s3).fromRed();
    var l22 = ntinv.redSub(s3).fromRed();
    return [l1, l22];
  };
  ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {
    var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));
    var u4 = lambda;
    var v13 = this.n.clone();
    var x1 = new import_bn3.default(1);
    var y1 = new import_bn3.default(0);
    var x22 = new import_bn3.default(0);
    var y22 = new import_bn3.default(1);
    var a0;
    var b0;
    var a1;
    var b1;
    var a22;
    var b22;
    var prevR;
    var i5 = 0;
    var r3;
    var x13;
    while (u4.cmpn(0) !== 0) {
      var q7 = v13.div(u4);
      r3 = v13.sub(q7.mul(u4));
      x13 = x22.sub(q7.mul(x1));
      var y11 = y22.sub(q7.mul(y1));
      if (!a1 && r3.cmp(aprxSqrt) < 0) {
        a0 = prevR.neg();
        b0 = x1;
        a1 = r3.neg();
        b1 = x13;
      } else if (a1 && ++i5 === 2) {
        break;
      }
      prevR = r3;
      v13 = u4;
      u4 = r3;
      x22 = x1;
      x1 = x13;
      y22 = y1;
      y1 = y11;
    }
    a22 = r3.neg();
    b22 = x13;
    var len1 = a1.sqr().add(b1.sqr());
    var len2 = a22.sqr().add(b22.sqr());
    if (len2.cmp(len1) >= 0) {
      a22 = a0;
      b22 = b0;
    }
    if (a1.negative) {
      a1 = a1.neg();
      b1 = b1.neg();
    }
    if (a22.negative) {
      a22 = a22.neg();
      b22 = b22.neg();
    }
    return [
      { a: a1, b: b1 },
      { a: a22, b: b22 }
    ];
  };
  ShortCurve.prototype._endoSplit = function _endoSplit(k7) {
    var basis = this.endo.basis;
    var v13 = basis[0];
    var v22 = basis[1];
    var c1 = v22.b.mul(k7).divRound(this.n);
    var c22 = v13.b.neg().mul(k7).divRound(this.n);
    var p1 = c1.mul(v13.a);
    var p22 = c22.mul(v22.a);
    var q1 = c1.mul(v13.b);
    var q22 = c22.mul(v22.b);
    var k1 = k7.sub(p1).sub(p22);
    var k22 = q1.add(q22).neg();
    return { k1, k2: k22 };
  };
  ShortCurve.prototype.pointFromX = function pointFromX(x13, odd) {
    x13 = new import_bn3.default(x13, 16);
    if (!x13.red)
      x13 = x13.toRed(this.red);
    var y22 = x13.redSqr().redMul(x13).redIAdd(x13.redMul(this.a)).redIAdd(this.b);
    var y11 = y22.redSqrt();
    if (y11.redSqr().redSub(y22).cmp(this.zero) !== 0)
      throw new Error("invalid point");
    var isOdd2 = y11.fromRed().isOdd();
    if (odd && !isOdd2 || !odd && isOdd2)
      y11 = y11.redNeg();
    return this.point(x13, y11);
  };
  ShortCurve.prototype.validate = function validate10(point3) {
    if (point3.inf)
      return true;
    var x13 = point3.x;
    var y11 = point3.y;
    var ax = this.a.redMul(x13);
    var rhs = x13.redSqr().redMul(x13).redIAdd(ax).redIAdd(this.b);
    return y11.redSqr().redISub(rhs).cmpn(0) === 0;
  };
  ShortCurve.prototype._endoWnafMulAdd = function _endoWnafMulAdd(points, coeffs, jacobianResult) {
    var npoints = this._endoWnafT1;
    var ncoeffs = this._endoWnafT2;
    for (var i5 = 0; i5 < points.length; i5++) {
      var split3 = this._endoSplit(coeffs[i5]);
      var p7 = points[i5];
      var beta = p7._getBeta();
      if (split3.k1.negative) {
        split3.k1.ineg();
        p7 = p7.neg(true);
      }
      if (split3.k2.negative) {
        split3.k2.ineg();
        beta = beta.neg(true);
      }
      npoints[i5 * 2] = p7;
      npoints[i5 * 2 + 1] = beta;
      ncoeffs[i5 * 2] = split3.k1;
      ncoeffs[i5 * 2 + 1] = split3.k2;
    }
    var res = this._wnafMulAdd(1, npoints, ncoeffs, i5 * 2, jacobianResult);
    for (var j6 = 0; j6 < i5 * 2; j6++) {
      npoints[j6] = null;
      ncoeffs[j6] = null;
    }
    return res;
  };
  function Point4(curve, x13, y11, isRed) {
    base3.BasePoint.call(this, curve, "affine");
    if (x13 === null && y11 === null) {
      this.x = null;
      this.y = null;
      this.inf = true;
    } else {
      this.x = new import_bn3.default(x13, 16);
      this.y = new import_bn3.default(y11, 16);
      if (isRed) {
        this.x.forceRed(this.curve.red);
        this.y.forceRed(this.curve.red);
      }
      if (!this.x.red)
        this.x = this.x.toRed(this.curve.red);
      if (!this.y.red)
        this.y = this.y.toRed(this.curve.red);
      this.inf = false;
    }
  }
  inherits_browser(Point4, base3.BasePoint);
  ShortCurve.prototype.point = function point2(x13, y11, isRed) {
    return new Point4(this, x13, y11, isRed);
  };
  ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {
    return Point4.fromJSON(this, obj, red);
  };
  Point4.prototype._getBeta = function _getBeta2() {
    if (!this.curve.endo)
      return;
    var pre = this.precomputed;
    if (pre && pre.beta)
      return pre.beta;
    var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);
    if (pre) {
      var curve = this.curve;
      var endoMul = function(p7) {
        return curve.point(p7.x.redMul(curve.endo.beta), p7.y);
      };
      pre.beta = beta;
      beta.precomputed = {
        beta: null,
        naf: pre.naf && {
          wnd: pre.naf.wnd,
          points: pre.naf.points.map(endoMul)
        },
        doubles: pre.doubles && {
          step: pre.doubles.step,
          points: pre.doubles.points.map(endoMul)
        }
      };
    }
    return beta;
  };
  Point4.prototype.toJSON = function toJSON() {
    if (!this.precomputed)
      return [this.x, this.y];
    return [this.x, this.y, this.precomputed && {
      doubles: this.precomputed.doubles && {
        step: this.precomputed.doubles.step,
        points: this.precomputed.doubles.points.slice(1)
      },
      naf: this.precomputed.naf && {
        wnd: this.precomputed.naf.wnd,
        points: this.precomputed.naf.points.slice(1)
      }
    }];
  };
  Point4.fromJSON = function fromJSON(curve, obj, red) {
    if (typeof obj === "string")
      obj = JSON.parse(obj);
    var res = curve.point(obj[0], obj[1], red);
    if (!obj[2])
      return res;
    function obj2point(obj2) {
      return curve.point(obj2[0], obj2[1], red);
    }
    var pre = obj[2];
    res.precomputed = {
      beta: null,
      doubles: pre.doubles && {
        step: pre.doubles.step,
        points: [res].concat(pre.doubles.points.map(obj2point))
      },
      naf: pre.naf && {
        wnd: pre.naf.wnd,
        points: [res].concat(pre.naf.points.map(obj2point))
      }
    };
    return res;
  };
  Point4.prototype.inspect = function inspect() {
    if (this.isInfinity())
      return "<EC Point Infinity>";
    return "<EC Point x: " + this.x.fromRed().toString(16, 2) + " y: " + this.y.fromRed().toString(16, 2) + ">";
  };
  Point4.prototype.isInfinity = function isInfinity() {
    return this.inf;
  };
  Point4.prototype.add = function add3(p7) {
    if (this.inf)
      return p7;
    if (p7.inf)
      return this;
    if (this.eq(p7))
      return this.dbl();
    if (this.neg().eq(p7))
      return this.curve.point(null, null);
    if (this.x.cmp(p7.x) === 0)
      return this.curve.point(null, null);
    var c7 = this.y.redSub(p7.y);
    if (c7.cmpn(0) !== 0)
      c7 = c7.redMul(this.x.redSub(p7.x).redInvm());
    var nx = c7.redSqr().redISub(this.x).redISub(p7.x);
    var ny = c7.redMul(this.x.redSub(nx)).redISub(this.y);
    return this.curve.point(nx, ny);
  };
  Point4.prototype.dbl = function dbl() {
    if (this.inf)
      return this;
    var ys1 = this.y.redAdd(this.y);
    if (ys1.cmpn(0) === 0)
      return this.curve.point(null, null);
    var a5 = this.curve.a;
    var x22 = this.x.redSqr();
    var dyinv = ys1.redInvm();
    var c7 = x22.redAdd(x22).redIAdd(x22).redIAdd(a5).redMul(dyinv);
    var nx = c7.redSqr().redISub(this.x.redAdd(this.x));
    var ny = c7.redMul(this.x.redSub(nx)).redISub(this.y);
    return this.curve.point(nx, ny);
  };
  Point4.prototype.getX = function getX() {
    return this.x.fromRed();
  };
  Point4.prototype.getY = function getY() {
    return this.y.fromRed();
  };
  Point4.prototype.mul = function mul(k7) {
    k7 = new import_bn3.default(k7, 16);
    if (this.isInfinity())
      return this;
    else if (this._hasDoubles(k7))
      return this.curve._fixedNafMul(this, k7);
    else if (this.curve.endo)
      return this.curve._endoWnafMulAdd([this], [k7]);
    else
      return this.curve._wnafMul(this, k7);
  };
  Point4.prototype.mulAdd = function mulAdd(k1, p22, k22) {
    var points = [this, p22];
    var coeffs = [k1, k22];
    if (this.curve.endo)
      return this.curve._endoWnafMulAdd(points, coeffs);
    else
      return this.curve._wnafMulAdd(1, points, coeffs, 2);
  };
  Point4.prototype.jmulAdd = function jmulAdd(k1, p22, k22) {
    var points = [this, p22];
    var coeffs = [k1, k22];
    if (this.curve.endo)
      return this.curve._endoWnafMulAdd(points, coeffs, true);
    else
      return this.curve._wnafMulAdd(1, points, coeffs, 2, true);
  };
  Point4.prototype.eq = function eq2(p7) {
    return this === p7 || this.inf === p7.inf && (this.inf || this.x.cmp(p7.x) === 0 && this.y.cmp(p7.y) === 0);
  };
  Point4.prototype.neg = function neg(_precompute) {
    if (this.inf)
      return this;
    var res = this.curve.point(this.x, this.y.redNeg());
    if (_precompute && this.precomputed) {
      var pre = this.precomputed;
      var negate = function(p7) {
        return p7.neg();
      };
      res.precomputed = {
        naf: pre.naf && {
          wnd: pre.naf.wnd,
          points: pre.naf.points.map(negate)
        },
        doubles: pre.doubles && {
          step: pre.doubles.step,
          points: pre.doubles.points.map(negate)
        }
      };
    }
    return res;
  };
  Point4.prototype.toJ = function toJ() {
    if (this.inf)
      return this.curve.jpoint(null, null, null);
    var res = this.curve.jpoint(this.x, this.y, this.curve.one);
    return res;
  };
  function JPoint(curve, x13, y11, z11) {
    base3.BasePoint.call(this, curve, "jacobian");
    if (x13 === null && y11 === null && z11 === null) {
      this.x = this.curve.one;
      this.y = this.curve.one;
      this.z = new import_bn3.default(0);
    } else {
      this.x = new import_bn3.default(x13, 16);
      this.y = new import_bn3.default(y11, 16);
      this.z = new import_bn3.default(z11, 16);
    }
    if (!this.x.red)
      this.x = this.x.toRed(this.curve.red);
    if (!this.y.red)
      this.y = this.y.toRed(this.curve.red);
    if (!this.z.red)
      this.z = this.z.toRed(this.curve.red);
    this.zOne = this.z === this.curve.one;
  }
  inherits_browser(JPoint, base3.BasePoint);
  ShortCurve.prototype.jpoint = function jpoint(x13, y11, z11) {
    return new JPoint(this, x13, y11, z11);
  };
  JPoint.prototype.toP = function toP() {
    if (this.isInfinity())
      return this.curve.point(null, null);
    var zinv = this.z.redInvm();
    var zinv2 = zinv.redSqr();
    var ax = this.x.redMul(zinv2);
    var ay = this.y.redMul(zinv2).redMul(zinv);
    return this.curve.point(ax, ay);
  };
  JPoint.prototype.neg = function neg2() {
    return this.curve.jpoint(this.x, this.y.redNeg(), this.z);
  };
  JPoint.prototype.add = function add4(p7) {
    if (this.isInfinity())
      return p7;
    if (p7.isInfinity())
      return this;
    var pz2 = p7.z.redSqr();
    var z22 = this.z.redSqr();
    var u1 = this.x.redMul(pz2);
    var u22 = p7.x.redMul(z22);
    var s1 = this.y.redMul(pz2.redMul(p7.z));
    var s22 = p7.y.redMul(z22.redMul(this.z));
    var h8 = u1.redSub(u22);
    var r3 = s1.redSub(s22);
    if (h8.cmpn(0) === 0) {
      if (r3.cmpn(0) !== 0)
        return this.curve.jpoint(null, null, null);
      else
        return this.dbl();
    }
    var h22 = h8.redSqr();
    var h32 = h22.redMul(h8);
    var v13 = u1.redMul(h22);
    var nx = r3.redSqr().redIAdd(h32).redISub(v13).redISub(v13);
    var ny = r3.redMul(v13.redISub(nx)).redISub(s1.redMul(h32));
    var nz = this.z.redMul(p7.z).redMul(h8);
    return this.curve.jpoint(nx, ny, nz);
  };
  JPoint.prototype.mixedAdd = function mixedAdd(p7) {
    if (this.isInfinity())
      return p7.toJ();
    if (p7.isInfinity())
      return this;
    var z22 = this.z.redSqr();
    var u1 = this.x;
    var u22 = p7.x.redMul(z22);
    var s1 = this.y;
    var s22 = p7.y.redMul(z22).redMul(this.z);
    var h8 = u1.redSub(u22);
    var r3 = s1.redSub(s22);
    if (h8.cmpn(0) === 0) {
      if (r3.cmpn(0) !== 0)
        return this.curve.jpoint(null, null, null);
      else
        return this.dbl();
    }
    var h22 = h8.redSqr();
    var h32 = h22.redMul(h8);
    var v13 = u1.redMul(h22);
    var nx = r3.redSqr().redIAdd(h32).redISub(v13).redISub(v13);
    var ny = r3.redMul(v13.redISub(nx)).redISub(s1.redMul(h32));
    var nz = this.z.redMul(h8);
    return this.curve.jpoint(nx, ny, nz);
  };
  JPoint.prototype.dblp = function dblp2(pow) {
    if (pow === 0)
      return this;
    if (this.isInfinity())
      return this;
    if (!pow)
      return this.dbl();
    var i5;
    if (this.curve.zeroA || this.curve.threeA) {
      var r3 = this;
      for (i5 = 0; i5 < pow; i5++)
        r3 = r3.dbl();
      return r3;
    }
    var a5 = this.curve.a;
    var tinv = this.curve.tinv;
    var jx = this.x;
    var jy = this.y;
    var jz = this.z;
    var jz4 = jz.redSqr().redSqr();
    var jyd = jy.redAdd(jy);
    for (i5 = 0; i5 < pow; i5++) {
      var jx2 = jx.redSqr();
      var jyd2 = jyd.redSqr();
      var jyd4 = jyd2.redSqr();
      var c7 = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a5.redMul(jz4));
      var t1 = jx.redMul(jyd2);
      var nx = c7.redSqr().redISub(t1.redAdd(t1));
      var t2 = t1.redISub(nx);
      var dny = c7.redMul(t2);
      dny = dny.redIAdd(dny).redISub(jyd4);
      var nz = jyd.redMul(jz);
      if (i5 + 1 < pow)
        jz4 = jz4.redMul(jyd4);
      jx = nx;
      jz = nz;
      jyd = dny;
    }
    return this.curve.jpoint(jx, jyd.redMul(tinv), jz);
  };
  JPoint.prototype.dbl = function dbl2() {
    if (this.isInfinity())
      return this;
    if (this.curve.zeroA)
      return this._zeroDbl();
    else if (this.curve.threeA)
      return this._threeDbl();
    else
      return this._dbl();
  };
  JPoint.prototype._zeroDbl = function _zeroDbl() {
    var nx;
    var ny;
    var nz;
    if (this.zOne) {
      var xx = this.x.redSqr();
      var yy = this.y.redSqr();
      var yyyy = yy.redSqr();
      var s3 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
      s3 = s3.redIAdd(s3);
      var m3 = xx.redAdd(xx).redIAdd(xx);
      var t = m3.redSqr().redISub(s3).redISub(s3);
      var yyyy8 = yyyy.redIAdd(yyyy);
      yyyy8 = yyyy8.redIAdd(yyyy8);
      yyyy8 = yyyy8.redIAdd(yyyy8);
      nx = t;
      ny = m3.redMul(s3.redISub(t)).redISub(yyyy8);
      nz = this.y.redAdd(this.y);
    } else {
      var a5 = this.x.redSqr();
      var b9 = this.y.redSqr();
      var c7 = b9.redSqr();
      var d6 = this.x.redAdd(b9).redSqr().redISub(a5).redISub(c7);
      d6 = d6.redIAdd(d6);
      var e2 = a5.redAdd(a5).redIAdd(a5);
      var f7 = e2.redSqr();
      var c8 = c7.redIAdd(c7);
      c8 = c8.redIAdd(c8);
      c8 = c8.redIAdd(c8);
      nx = f7.redISub(d6).redISub(d6);
      ny = e2.redMul(d6.redISub(nx)).redISub(c8);
      nz = this.y.redMul(this.z);
      nz = nz.redIAdd(nz);
    }
    return this.curve.jpoint(nx, ny, nz);
  };
  JPoint.prototype._threeDbl = function _threeDbl() {
    var nx;
    var ny;
    var nz;
    if (this.zOne) {
      var xx = this.x.redSqr();
      var yy = this.y.redSqr();
      var yyyy = yy.redSqr();
      var s3 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
      s3 = s3.redIAdd(s3);
      var m3 = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);
      var t = m3.redSqr().redISub(s3).redISub(s3);
      nx = t;
      var yyyy8 = yyyy.redIAdd(yyyy);
      yyyy8 = yyyy8.redIAdd(yyyy8);
      yyyy8 = yyyy8.redIAdd(yyyy8);
      ny = m3.redMul(s3.redISub(t)).redISub(yyyy8);
      nz = this.y.redAdd(this.y);
    } else {
      var delta = this.z.redSqr();
      var gamma = this.y.redSqr();
      var beta = this.x.redMul(gamma);
      var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));
      alpha = alpha.redAdd(alpha).redIAdd(alpha);
      var beta4 = beta.redIAdd(beta);
      beta4 = beta4.redIAdd(beta4);
      var beta8 = beta4.redAdd(beta4);
      nx = alpha.redSqr().redISub(beta8);
      nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);
      var ggamma8 = gamma.redSqr();
      ggamma8 = ggamma8.redIAdd(ggamma8);
      ggamma8 = ggamma8.redIAdd(ggamma8);
      ggamma8 = ggamma8.redIAdd(ggamma8);
      ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);
    }
    return this.curve.jpoint(nx, ny, nz);
  };
  JPoint.prototype._dbl = function _dbl() {
    var a5 = this.curve.a;
    var jx = this.x;
    var jy = this.y;
    var jz = this.z;
    var jz4 = jz.redSqr().redSqr();
    var jx2 = jx.redSqr();
    var jy2 = jy.redSqr();
    var c7 = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a5.redMul(jz4));
    var jxd4 = jx.redAdd(jx);
    jxd4 = jxd4.redIAdd(jxd4);
    var t1 = jxd4.redMul(jy2);
    var nx = c7.redSqr().redISub(t1.redAdd(t1));
    var t2 = t1.redISub(nx);
    var jyd8 = jy2.redSqr();
    jyd8 = jyd8.redIAdd(jyd8);
    jyd8 = jyd8.redIAdd(jyd8);
    jyd8 = jyd8.redIAdd(jyd8);
    var ny = c7.redMul(t2).redISub(jyd8);
    var nz = jy.redAdd(jy).redMul(jz);
    return this.curve.jpoint(nx, ny, nz);
  };
  JPoint.prototype.trpl = function trpl() {
    if (!this.curve.zeroA)
      return this.dbl().add(this);
    var xx = this.x.redSqr();
    var yy = this.y.redSqr();
    var zz = this.z.redSqr();
    var yyyy = yy.redSqr();
    var m3 = xx.redAdd(xx).redIAdd(xx);
    var mm = m3.redSqr();
    var e2 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
    e2 = e2.redIAdd(e2);
    e2 = e2.redAdd(e2).redIAdd(e2);
    e2 = e2.redISub(mm);
    var ee8 = e2.redSqr();
    var t = yyyy.redIAdd(yyyy);
    t = t.redIAdd(t);
    t = t.redIAdd(t);
    t = t.redIAdd(t);
    var u4 = m3.redIAdd(e2).redSqr().redISub(mm).redISub(ee8).redISub(t);
    var yyu4 = yy.redMul(u4);
    yyu4 = yyu4.redIAdd(yyu4);
    yyu4 = yyu4.redIAdd(yyu4);
    var nx = this.x.redMul(ee8).redISub(yyu4);
    nx = nx.redIAdd(nx);
    nx = nx.redIAdd(nx);
    var ny = this.y.redMul(u4.redMul(t.redISub(u4)).redISub(e2.redMul(ee8)));
    ny = ny.redIAdd(ny);
    ny = ny.redIAdd(ny);
    ny = ny.redIAdd(ny);
    var nz = this.z.redAdd(e2).redSqr().redISub(zz).redISub(ee8);
    return this.curve.jpoint(nx, ny, nz);
  };
  JPoint.prototype.mul = function mul2(k7, kbase) {
    k7 = new import_bn3.default(k7, kbase);
    return this.curve._wnafMul(this, k7);
  };
  JPoint.prototype.eq = function eq3(p7) {
    if (p7.type === "affine")
      return this.eq(p7.toJ());
    if (this === p7)
      return true;
    var z22 = this.z.redSqr();
    var pz2 = p7.z.redSqr();
    if (this.x.redMul(pz2).redISub(p7.x.redMul(z22)).cmpn(0) !== 0)
      return false;
    var z32 = z22.redMul(this.z);
    var pz3 = pz2.redMul(p7.z);
    return this.y.redMul(pz3).redISub(p7.y.redMul(z32)).cmpn(0) === 0;
  };
  JPoint.prototype.eqXToP = function eqXToP(x13) {
    var zs2 = this.z.redSqr();
    var rx = x13.toRed(this.curve.red).redMul(zs2);
    if (this.x.cmp(rx) === 0)
      return true;
    var xc = x13.clone();
    var t = this.curve.redN.redMul(zs2);
    for (; ; ) {
      xc.iadd(this.curve.n);
      if (xc.cmp(this.curve.p) >= 0)
        return false;
      rx.redIAdd(t);
      if (this.x.cmp(rx) === 0)
        return true;
    }
  };
  JPoint.prototype.inspect = function inspect2() {
    if (this.isInfinity())
      return "<EC JPoint Infinity>";
    return "<EC JPoint x: " + this.x.toString(16, 2) + " y: " + this.y.toString(16, 2) + " z: " + this.z.toString(16, 2) + ">";
  };
  JPoint.prototype.isInfinity = function isInfinity2() {
    return this.z.cmpn(0) === 0;
  };
  var curve_1 = createCommonjsModule(function(module, exports) {
    "use strict";
    var curve = exports;
    curve.base = base3;
    curve.short = short_1;
    curve.mont = /*RicMoo:ethers:require(./mont)*/
    null;
    curve.edwards = /*RicMoo:ethers:require(./edwards)*/
    null;
  });
  var curves_1 = createCommonjsModule(function(module, exports) {
    "use strict";
    var curves = exports;
    var assert12 = utils_1$1.assert;
    function PresetCurve(options) {
      if (options.type === "short")
        this.curve = new curve_1.short(options);
      else if (options.type === "edwards")
        this.curve = new curve_1.edwards(options);
      else
        this.curve = new curve_1.mont(options);
      this.g = this.curve.g;
      this.n = this.curve.n;
      this.hash = options.hash;
      assert12(this.g.validate(), "Invalid curve");
      assert12(this.g.mul(this.n).isInfinity(), "Invalid curve, G*N != O");
    }
    curves.PresetCurve = PresetCurve;
    function defineCurve(name2, options) {
      Object.defineProperty(curves, name2, {
        configurable: true,
        enumerable: true,
        get: function() {
          var curve = new PresetCurve(options);
          Object.defineProperty(curves, name2, {
            configurable: true,
            enumerable: true,
            value: curve
          });
          return curve;
        }
      });
    }
    defineCurve("p192", {
      type: "short",
      prime: "p192",
      p: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",
      a: "ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",
      b: "64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",
      n: "ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",
      hash: import_hash.default.sha256,
      gRed: false,
      g: [
        "188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012",
        "07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"
      ]
    });
    defineCurve("p224", {
      type: "short",
      prime: "p224",
      p: "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",
      a: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",
      b: "b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",
      n: "ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",
      hash: import_hash.default.sha256,
      gRed: false,
      g: [
        "b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21",
        "bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"
      ]
    });
    defineCurve("p256", {
      type: "short",
      prime: null,
      p: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",
      a: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",
      b: "5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",
      n: "ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",
      hash: import_hash.default.sha256,
      gRed: false,
      g: [
        "6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296",
        "4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"
      ]
    });
    defineCurve("p384", {
      type: "short",
      prime: null,
      p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",
      a: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",
      b: "b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",
      n: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",
      hash: import_hash.default.sha384,
      gRed: false,
      g: [
        "aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7",
        "3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"
      ]
    });
    defineCurve("p521", {
      type: "short",
      prime: null,
      p: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",
      a: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",
      b: "00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",
      n: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",
      hash: import_hash.default.sha512,
      gRed: false,
      g: [
        "000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66",
        "00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"
      ]
    });
    defineCurve("curve25519", {
      type: "mont",
      prime: "p25519",
      p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",
      a: "76d06",
      b: "1",
      n: "1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",
      hash: import_hash.default.sha256,
      gRed: false,
      g: [
        "9"
      ]
    });
    defineCurve("ed25519", {
      type: "edwards",
      prime: "p25519",
      p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",
      a: "-1",
      c: "1",
      // -121665 * (121666^(-1)) (mod P)
      d: "52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",
      n: "1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",
      hash: import_hash.default.sha256,
      gRed: false,
      g: [
        "216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a",
        // 4/5
        "6666666666666666666666666666666666666666666666666666666666666658"
      ]
    });
    var pre;
    try {
      pre = /*RicMoo:ethers:require(./precomputed/secp256k1)*/
      null.crash();
    } catch (e2) {
      pre = void 0;
    }
    defineCurve("secp256k1", {
      type: "short",
      prime: "k256",
      p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",
      a: "0",
      b: "7",
      n: "ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",
      h: "1",
      hash: import_hash.default.sha256,
      // Precomputed endomorphism
      beta: "7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",
      lambda: "5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",
      basis: [
        {
          a: "3086d221a7d46bcde86c90e49284eb15",
          b: "-e4437ed6010e88286f547fa90abfe4c3"
        },
        {
          a: "114ca50f7a8e2f3f657c1108d9d44cfd8",
          b: "3086d221a7d46bcde86c90e49284eb15"
        }
      ],
      gRed: false,
      g: [
        "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
        "483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
        pre
      ]
    });
  });
  function HmacDRBG(options) {
    if (!(this instanceof HmacDRBG))
      return new HmacDRBG(options);
    this.hash = options.hash;
    this.predResist = !!options.predResist;
    this.outLen = this.hash.outSize;
    this.minEntropy = options.minEntropy || this.hash.hmacStrength;
    this._reseed = null;
    this.reseedInterval = null;
    this.K = null;
    this.V = null;
    var entropy = utils_1.toArray(options.entropy, options.entropyEnc || "hex");
    var nonce = utils_1.toArray(options.nonce, options.nonceEnc || "hex");
    var pers = utils_1.toArray(options.pers, options.persEnc || "hex");
    minimalisticAssert(
      entropy.length >= this.minEntropy / 8,
      "Not enough entropy. Minimum is: " + this.minEntropy + " bits"
    );
    this._init(entropy, nonce, pers);
  }
  var hmacDrbg = HmacDRBG;
  HmacDRBG.prototype._init = function init(entropy, nonce, pers) {
    var seed = entropy.concat(nonce).concat(pers);
    this.K = new Array(this.outLen / 8);
    this.V = new Array(this.outLen / 8);
    for (var i5 = 0; i5 < this.V.length; i5++) {
      this.K[i5] = 0;
      this.V[i5] = 1;
    }
    this._update(seed);
    this._reseed = 1;
    this.reseedInterval = 281474976710656;
  };
  HmacDRBG.prototype._hmac = function hmac3() {
    return new import_hash.default.hmac(this.hash, this.K);
  };
  HmacDRBG.prototype._update = function update(seed) {
    var kmac = this._hmac().update(this.V).update([0]);
    if (seed)
      kmac = kmac.update(seed);
    this.K = kmac.digest();
    this.V = this._hmac().update(this.V).digest();
    if (!seed)
      return;
    this.K = this._hmac().update(this.V).update([1]).update(seed).digest();
    this.V = this._hmac().update(this.V).digest();
  };
  HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add5, addEnc) {
    if (typeof entropyEnc !== "string") {
      addEnc = add5;
      add5 = entropyEnc;
      entropyEnc = null;
    }
    entropy = utils_1.toArray(entropy, entropyEnc);
    add5 = utils_1.toArray(add5, addEnc);
    minimalisticAssert(
      entropy.length >= this.minEntropy / 8,
      "Not enough entropy. Minimum is: " + this.minEntropy + " bits"
    );
    this._update(entropy.concat(add5 || []));
    this._reseed = 1;
  };
  HmacDRBG.prototype.generate = function generate(len, enc, add5, addEnc) {
    if (this._reseed > this.reseedInterval)
      throw new Error("Reseed is required");
    if (typeof enc !== "string") {
      addEnc = add5;
      add5 = enc;
      enc = null;
    }
    if (add5) {
      add5 = utils_1.toArray(add5, addEnc || "hex");
      this._update(add5);
    }
    var temp = [];
    while (temp.length < len) {
      this.V = this._hmac().update(this.V).digest();
      temp = temp.concat(this.V);
    }
    var res = temp.slice(0, len);
    this._update(add5);
    this._reseed++;
    return utils_1.encode(res, enc);
  };
  var assert$3 = utils_1$1.assert;
  function KeyPair(ec2, options) {
    this.ec = ec2;
    this.priv = null;
    this.pub = null;
    if (options.priv)
      this._importPrivate(options.priv, options.privEnc);
    if (options.pub)
      this._importPublic(options.pub, options.pubEnc);
  }
  var key = KeyPair;
  KeyPair.fromPublic = function fromPublic(ec2, pub, enc) {
    if (pub instanceof KeyPair)
      return pub;
    return new KeyPair(ec2, {
      pub,
      pubEnc: enc
    });
  };
  KeyPair.fromPrivate = function fromPrivate(ec2, priv, enc) {
    if (priv instanceof KeyPair)
      return priv;
    return new KeyPair(ec2, {
      priv,
      privEnc: enc
    });
  };
  KeyPair.prototype.validate = function validate11() {
    var pub = this.getPublic();
    if (pub.isInfinity())
      return { result: false, reason: "Invalid public key" };
    if (!pub.validate())
      return { result: false, reason: "Public key is not a point" };
    if (!pub.mul(this.ec.curve.n).isInfinity())
      return { result: false, reason: "Public key * N != O" };
    return { result: true, reason: null };
  };
  KeyPair.prototype.getPublic = function getPublic(compact, enc) {
    if (typeof compact === "string") {
      enc = compact;
      compact = null;
    }
    if (!this.pub)
      this.pub = this.ec.g.mul(this.priv);
    if (!enc)
      return this.pub;
    return this.pub.encode(enc, compact);
  };
  KeyPair.prototype.getPrivate = function getPrivate(enc) {
    if (enc === "hex")
      return this.priv.toString(16, 2);
    else
      return this.priv;
  };
  KeyPair.prototype._importPrivate = function _importPrivate(key2, enc) {
    this.priv = new import_bn3.default(key2, enc || 16);
    this.priv = this.priv.umod(this.ec.curve.n);
  };
  KeyPair.prototype._importPublic = function _importPublic(key2, enc) {
    if (key2.x || key2.y) {
      if (this.ec.curve.type === "mont") {
        assert$3(key2.x, "Need x coordinate");
      } else if (this.ec.curve.type === "short" || this.ec.curve.type === "edwards") {
        assert$3(key2.x && key2.y, "Need both x and y coordinate");
      }
      this.pub = this.ec.curve.point(key2.x, key2.y);
      return;
    }
    this.pub = this.ec.curve.decodePoint(key2, enc);
  };
  KeyPair.prototype.derive = function derive(pub) {
    if (!pub.validate()) {
      assert$3(pub.validate(), "public point not validated");
    }
    return pub.mul(this.priv).getX();
  };
  KeyPair.prototype.sign = function sign3(msg, enc, options) {
    return this.ec.sign(msg, this, enc, options);
  };
  KeyPair.prototype.verify = function verify2(msg, signature2, options) {
    return this.ec.verify(msg, signature2, this, void 0, options);
  };
  KeyPair.prototype.inspect = function inspect3() {
    return "<Key priv: " + (this.priv && this.priv.toString(16, 2)) + " pub: " + (this.pub && this.pub.inspect()) + " >";
  };
  var assert$4 = utils_1$1.assert;
  function Signature(options, enc) {
    if (options instanceof Signature)
      return options;
    if (this._importDER(options, enc))
      return;
    assert$4(options.r && options.s, "Signature without r or s");
    this.r = new import_bn3.default(options.r, 16);
    this.s = new import_bn3.default(options.s, 16);
    if (options.recoveryParam === void 0)
      this.recoveryParam = null;
    else
      this.recoveryParam = options.recoveryParam;
  }
  var signature = Signature;
  function Position() {
    this.place = 0;
  }
  function getLength(buf, p7) {
    var initial = buf[p7.place++];
    if (!(initial & 128)) {
      return initial;
    }
    var octetLen = initial & 15;
    if (octetLen === 0 || octetLen > 4) {
      return false;
    }
    if (buf[p7.place] === 0) {
      return false;
    }
    var val = 0;
    for (var i5 = 0, off = p7.place; i5 < octetLen; i5++, off++) {
      val <<= 8;
      val |= buf[off];
      val >>>= 0;
    }
    if (val <= 127) {
      return false;
    }
    p7.place = off;
    return val;
  }
  function rmPadding(buf) {
    var i5 = 0;
    var len = buf.length - 1;
    while (!buf[i5] && !(buf[i5 + 1] & 128) && i5 < len) {
      i5++;
    }
    if (i5 === 0) {
      return buf;
    }
    return buf.slice(i5);
  }
  Signature.prototype._importDER = function _importDER(data, enc) {
    data = utils_1$1.toArray(data, enc);
    var p7 = new Position();
    if (data[p7.place++] !== 48) {
      return false;
    }
    var len = getLength(data, p7);
    if (len === false) {
      return false;
    }
    if (len + p7.place !== data.length) {
      return false;
    }
    if (data[p7.place++] !== 2) {
      return false;
    }
    var rlen = getLength(data, p7);
    if (rlen === false) {
      return false;
    }
    if ((data[p7.place] & 128) !== 0) {
      return false;
    }
    var r3 = data.slice(p7.place, rlen + p7.place);
    p7.place += rlen;
    if (data[p7.place++] !== 2) {
      return false;
    }
    var slen = getLength(data, p7);
    if (slen === false) {
      return false;
    }
    if (data.length !== slen + p7.place) {
      return false;
    }
    if ((data[p7.place] & 128) !== 0) {
      return false;
    }
    var s3 = data.slice(p7.place, slen + p7.place);
    if (r3[0] === 0) {
      if (r3[1] & 128) {
        r3 = r3.slice(1);
      } else {
        return false;
      }
    }
    if (s3[0] === 0) {
      if (s3[1] & 128) {
        s3 = s3.slice(1);
      } else {
        return false;
      }
    }
    this.r = new import_bn3.default(r3);
    this.s = new import_bn3.default(s3);
    this.recoveryParam = null;
    return true;
  };
  function constructLength(arr, len) {
    if (len < 128) {
      arr.push(len);
      return;
    }
    var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);
    arr.push(octets | 128);
    while (--octets) {
      arr.push(len >>> (octets << 3) & 255);
    }
    arr.push(len);
  }
  Signature.prototype.toDER = function toDER(enc) {
    var r3 = this.r.toArray();
    var s3 = this.s.toArray();
    if (r3[0] & 128)
      r3 = [0].concat(r3);
    if (s3[0] & 128)
      s3 = [0].concat(s3);
    r3 = rmPadding(r3);
    s3 = rmPadding(s3);
    while (!s3[0] && !(s3[1] & 128)) {
      s3 = s3.slice(1);
    }
    var arr = [2];
    constructLength(arr, r3.length);
    arr = arr.concat(r3);
    arr.push(2);
    constructLength(arr, s3.length);
    var backHalf = arr.concat(s3);
    var res = [48];
    constructLength(res, backHalf.length);
    res = res.concat(backHalf);
    return utils_1$1.encode(res, enc);
  };
  var rand = (
    /*RicMoo:ethers:require(brorand)*/
    (function() {
      throw new Error("unsupported");
    })
  );
  var assert$5 = utils_1$1.assert;
  function EC(options) {
    if (!(this instanceof EC))
      return new EC(options);
    if (typeof options === "string") {
      assert$5(
        Object.prototype.hasOwnProperty.call(curves_1, options),
        "Unknown curve " + options
      );
      options = curves_1[options];
    }
    if (options instanceof curves_1.PresetCurve)
      options = { curve: options };
    this.curve = options.curve.curve;
    this.n = this.curve.n;
    this.nh = this.n.ushrn(1);
    this.g = this.curve.g;
    this.g = options.curve.g;
    this.g.precompute(options.curve.n.bitLength() + 1);
    this.hash = options.hash || options.curve.hash;
  }
  var ec = EC;
  EC.prototype.keyPair = function keyPair(options) {
    return new key(this, options);
  };
  EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {
    return key.fromPrivate(this, priv, enc);
  };
  EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {
    return key.fromPublic(this, pub, enc);
  };
  EC.prototype.genKeyPair = function genKeyPair(options) {
    if (!options)
      options = {};
    var drbg = new hmacDrbg({
      hash: this.hash,
      pers: options.pers,
      persEnc: options.persEnc || "utf8",
      entropy: options.entropy || rand(this.hash.hmacStrength),
      entropyEnc: options.entropy && options.entropyEnc || "utf8",
      nonce: this.n.toArray()
    });
    var bytes = this.n.byteLength();
    var ns2 = this.n.sub(new import_bn3.default(2));
    for (; ; ) {
      var priv = new import_bn3.default(drbg.generate(bytes));
      if (priv.cmp(ns2) > 0)
        continue;
      priv.iaddn(1);
      return this.keyFromPrivate(priv);
    }
  };
  EC.prototype._truncateToN = function _truncateToN(msg, truncOnly, bitLength) {
    var byteLength;
    if (import_bn3.default.isBN(msg) || typeof msg === "number") {
      msg = new import_bn3.default(msg, 16);
      byteLength = msg.byteLength();
    } else if (typeof msg === "object") {
      byteLength = msg.length;
      msg = new import_bn3.default(msg, 16);
    } else {
      var str = msg.toString();
      byteLength = str.length + 1 >>> 1;
      msg = new import_bn3.default(str, 16);
    }
    if (typeof bitLength !== "number") {
      bitLength = byteLength * 8;
    }
    var delta = bitLength - this.n.bitLength();
    if (delta > 0)
      msg = msg.ushrn(delta);
    if (!truncOnly && msg.cmp(this.n) >= 0)
      return msg.sub(this.n);
    else
      return msg;
  };
  EC.prototype.sign = function sign4(msg, key2, enc, options) {
    if (typeof enc === "object") {
      options = enc;
      enc = null;
    }
    if (!options)
      options = {};
    if (typeof msg !== "string" && typeof msg !== "number" && !import_bn3.default.isBN(msg)) {
      assert$5(
        typeof msg === "object" && msg && typeof msg.length === "number",
        "Expected message to be an array-like, a hex string, or a BN instance"
      );
      assert$5(msg.length >>> 0 === msg.length);
      for (var i5 = 0; i5 < msg.length; i5++) assert$5((msg[i5] & 255) === msg[i5]);
    }
    key2 = this.keyFromPrivate(key2, enc);
    msg = this._truncateToN(msg, false, options.msgBitLength);
    assert$5(!msg.isNeg(), "Can not sign a negative message");
    var bytes = this.n.byteLength();
    var bkey = key2.getPrivate().toArray("be", bytes);
    var nonce = msg.toArray("be", bytes);
    assert$5(new import_bn3.default(nonce).eq(msg), "Can not sign message");
    var drbg = new hmacDrbg({
      hash: this.hash,
      entropy: bkey,
      nonce,
      pers: options.pers,
      persEnc: options.persEnc || "utf8"
    });
    var ns1 = this.n.sub(new import_bn3.default(1));
    for (var iter = 0; ; iter++) {
      var k7 = options.k ? options.k(iter) : new import_bn3.default(drbg.generate(this.n.byteLength()));
      k7 = this._truncateToN(k7, true);
      if (k7.cmpn(1) <= 0 || k7.cmp(ns1) >= 0)
        continue;
      var kp = this.g.mul(k7);
      if (kp.isInfinity())
        continue;
      var kpX = kp.getX();
      var r3 = kpX.umod(this.n);
      if (r3.cmpn(0) === 0)
        continue;
      var s3 = k7.invm(this.n).mul(r3.mul(key2.getPrivate()).iadd(msg));
      s3 = s3.umod(this.n);
      if (s3.cmpn(0) === 0)
        continue;
      var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | (kpX.cmp(r3) !== 0 ? 2 : 0);
      if (options.canonical && s3.cmp(this.nh) > 0) {
        s3 = this.n.sub(s3);
        recoveryParam ^= 1;
      }
      return new signature({ r: r3, s: s3, recoveryParam });
    }
  };
  EC.prototype.verify = function verify3(msg, signature$1, key2, enc, options) {
    if (!options)
      options = {};
    msg = this._truncateToN(msg, false, options.msgBitLength);
    key2 = this.keyFromPublic(key2, enc);
    signature$1 = new signature(signature$1, "hex");
    var r3 = signature$1.r;
    var s3 = signature$1.s;
    if (r3.cmpn(1) < 0 || r3.cmp(this.n) >= 0)
      return false;
    if (s3.cmpn(1) < 0 || s3.cmp(this.n) >= 0)
      return false;
    var sinv = s3.invm(this.n);
    var u1 = sinv.mul(msg).umod(this.n);
    var u22 = sinv.mul(r3).umod(this.n);
    var p7;
    if (!this.curve._maxwellTrick) {
      p7 = this.g.mulAdd(u1, key2.getPublic(), u22);
      if (p7.isInfinity())
        return false;
      return p7.getX().umod(this.n).cmp(r3) === 0;
    }
    p7 = this.g.jmulAdd(u1, key2.getPublic(), u22);
    if (p7.isInfinity())
      return false;
    return p7.eqXToP(r3);
  };
  EC.prototype.recoverPubKey = function(msg, signature$1, j6, enc) {
    assert$5((3 & j6) === j6, "The recovery param is more than two bits");
    signature$1 = new signature(signature$1, enc);
    var n6 = this.n;
    var e2 = new import_bn3.default(msg);
    var r3 = signature$1.r;
    var s3 = signature$1.s;
    var isYOdd = j6 & 1;
    var isSecondKey = j6 >> 1;
    if (r3.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)
      throw new Error("Unable to find sencond key candinate");
    if (isSecondKey)
      r3 = this.curve.pointFromX(r3.add(this.curve.n), isYOdd);
    else
      r3 = this.curve.pointFromX(r3, isYOdd);
    var rInv = signature$1.r.invm(n6);
    var s1 = n6.sub(e2).mul(rInv).umod(n6);
    var s22 = s3.mul(rInv).umod(n6);
    return this.g.mulAdd(s1, r3, s22);
  };
  EC.prototype.getKeyRecoveryParam = function(e2, signature$1, Q7, enc) {
    signature$1 = new signature(signature$1, enc);
    if (signature$1.recoveryParam !== null)
      return signature$1.recoveryParam;
    for (var i5 = 0; i5 < 4; i5++) {
      var Qprime;
      try {
        Qprime = this.recoverPubKey(e2, signature$1, i5);
      } catch (e3) {
        continue;
      }
      if (Qprime.eq(Q7))
        return i5;
    }
    throw new Error("Unable to find valid recovery factor");
  };
  var elliptic_1 = createCommonjsModule(function(module, exports) {
    "use strict";
    var elliptic = exports;
    elliptic.version = /*RicMoo:ethers*/
    { version: "6.6.1" }.version;
    elliptic.utils = utils_1$1;
    elliptic.rand = /*RicMoo:ethers:require(brorand)*/
    (function() {
      throw new Error("unsupported");
    });
    elliptic.curve = curve_1;
    elliptic.curves = curves_1;
    elliptic.ec = ec;
    elliptic.eddsa = /*RicMoo:ethers:require(./elliptic/eddsa)*/
    null;
  });
  var EC$1 = elliptic_1.ec;

  // ../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib.esm/_version.js
  init_node_compat_inject();
  var version13 = "signing-key/5.8.0";

  // ../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib.esm/index.js
  var logger6 = new Logger(version13);
  var _curve = null;
  function getCurve() {
    if (!_curve) {
      _curve = new EC$1("secp256k1");
    }
    return _curve;
  }
  var SigningKey = class {
    constructor(privateKey) {
      defineReadOnly(this, "curve", "secp256k1");
      defineReadOnly(this, "privateKey", hexlify(privateKey));
      if (hexDataLength(this.privateKey) !== 32) {
        logger6.throwArgumentError("invalid private key", "privateKey", "[[ REDACTED ]]");
      }
      const keyPair2 = getCurve().keyFromPrivate(arrayify(this.privateKey));
      defineReadOnly(this, "publicKey", "0x" + keyPair2.getPublic(false, "hex"));
      defineReadOnly(this, "compressedPublicKey", "0x" + keyPair2.getPublic(true, "hex"));
      defineReadOnly(this, "_isSigningKey", true);
    }
    _addPoint(other) {
      const p0 = getCurve().keyFromPublic(arrayify(this.publicKey));
      const p1 = getCurve().keyFromPublic(arrayify(other));
      return "0x" + p0.pub.add(p1.pub).encodeCompressed("hex");
    }
    signDigest(digest2) {
      const keyPair2 = getCurve().keyFromPrivate(arrayify(this.privateKey));
      const digestBytes = arrayify(digest2);
      if (digestBytes.length !== 32) {
        logger6.throwArgumentError("bad digest length", "digest", digest2);
      }
      const signature2 = keyPair2.sign(digestBytes, { canonical: true });
      return splitSignature({
        recoveryParam: signature2.recoveryParam,
        r: hexZeroPad("0x" + signature2.r.toString(16), 32),
        s: hexZeroPad("0x" + signature2.s.toString(16), 32)
      });
    }
    computeSharedSecret(otherKey) {
      const keyPair2 = getCurve().keyFromPrivate(arrayify(this.privateKey));
      const otherKeyPair = getCurve().keyFromPublic(arrayify(computePublicKey(otherKey)));
      return hexZeroPad("0x" + keyPair2.derive(otherKeyPair.getPublic()).toString(16), 32);
    }
    static isSigningKey(value) {
      return !!(value && value._isSigningKey);
    }
  };
  function recoverPublicKey3(digest2, signature2) {
    const sig = splitSignature(signature2);
    const rs = { r: arrayify(sig.r), s: arrayify(sig.s) };
    return "0x" + getCurve().recoverPubKey(arrayify(digest2), rs, sig.recoveryParam).encode("hex", false);
  }
  function computePublicKey(key2, compressed) {
    const bytes = arrayify(key2);
    if (bytes.length === 32) {
      const signingKey = new SigningKey(bytes);
      if (compressed) {
        return "0x" + getCurve().keyFromPrivate(bytes).getPublic(true, "hex");
      }
      return signingKey.publicKey;
    } else if (bytes.length === 33) {
      if (compressed) {
        return hexlify(bytes);
      }
      return "0x" + getCurve().keyFromPublic(bytes).getPublic(false, "hex");
    } else if (bytes.length === 65) {
      if (!compressed) {
        return hexlify(bytes);
      }
      return "0x" + getCurve().keyFromPublic(bytes).getPublic(true, "hex");
    }
    return logger6.throwArgumentError("invalid public or private key", "key", "[REDACTED]");
  }

  // ../../node_modules/.pnpm/@ethersproject+transactions@5.7.0/node_modules/@ethersproject/transactions/lib.esm/_version.js
  init_node_compat_inject();
  var version14 = "transactions/5.7.0";

  // ../../node_modules/.pnpm/@ethersproject+transactions@5.7.0/node_modules/@ethersproject/transactions/lib.esm/index.js
  var logger7 = new Logger(version14);
  var TransactionTypes;
  (function(TransactionTypes3) {
    TransactionTypes3[TransactionTypes3["legacy"] = 0] = "legacy";
    TransactionTypes3[TransactionTypes3["eip2930"] = 1] = "eip2930";
    TransactionTypes3[TransactionTypes3["eip1559"] = 2] = "eip1559";
  })(TransactionTypes || (TransactionTypes = {}));
  function computeAddress(key2) {
    const publicKey3 = computePublicKey(key2);
    return getAddress2(hexDataSlice(keccak2563(hexDataSlice(publicKey3, 1)), 12));
  }
  function recoverAddress3(digest2, signature2) {
    return computeAddress(recoverPublicKey3(arrayify(digest2), signature2));
  }

  // ../../node_modules/.pnpm/@walletconnect+utils@2.17.1/node_modules/@walletconnect/utils/dist/index.es.js
  var import_chacha20poly1305 = __toESM(require_chacha20poly1305());
  var import_hkdf2 = __toESM(require_hkdf());
  var import_random2 = __toESM(require_random());
  var import_sha2567 = __toESM(require_sha2564());
  var _e4 = __toESM(require_x25519());

  // ../../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/compare.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/concat.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/alloc.js
  init_node_compat_inject();
  function allocUnsafe2(size5 = 0) {
    if (globalThis.Buffer != null && globalThis.Buffer.allocUnsafe != null) {
      return globalThis.Buffer.allocUnsafe(size5);
    }
    return new Uint8Array(size5);
  }

  // ../../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/concat.js
  function concat5(arrays, length2) {
    if (!length2) {
      length2 = arrays.reduce((acc, curr) => acc + curr.length, 0);
    }
    const output = allocUnsafe2(length2);
    let offset2 = 0;
    for (const arr of arrays) {
      output.set(arr, offset2);
      offset2 += arr.length;
    }
    return output;
  }

  // ../../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/equals.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/from-string.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/util/bases.js
  init_node_compat_inject();
  function createCodec2(name2, prefix, encode11, decode9) {
    return {
      name: name2,
      prefix,
      encoder: {
        name: name2,
        prefix,
        encode: encode11
      },
      decoder: { decode: decode9 }
    };
  }
  var string6 = createCodec2("utf8", "u", (buf) => {
    const decoder2 = new TextDecoder("utf8");
    return "u" + decoder2.decode(buf);
  }, (str) => {
    const encoder5 = new TextEncoder();
    return encoder5.encode(str.substring(1));
  });
  var ascii2 = createCodec2("ascii", "a", (buf) => {
    let string7 = "a";
    for (let i5 = 0; i5 < buf.length; i5++) {
      string7 += String.fromCharCode(buf[i5]);
    }
    return string7;
  }, (str) => {
    str = str.substring(1);
    const buf = allocUnsafe2(str.length);
    for (let i5 = 0; i5 < str.length; i5++) {
      buf[i5] = str.charCodeAt(i5);
    }
    return buf;
  });
  var BASES2 = {
    utf8: string6,
    "utf-8": string6,
    hex: bases.base16,
    latin1: ascii2,
    ascii: ascii2,
    binary: ascii2,
    ...bases
  };
  var bases_default2 = BASES2;

  // ../../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/from-string.js
  function fromString5(string7, encoding = "utf8") {
    const base4 = bases_default2[encoding];
    if (!base4) {
      throw new Error(`Unsupported encoding "${encoding}"`);
    }
    if ((encoding === "utf8" || encoding === "utf-8") && globalThis.Buffer != null && globalThis.Buffer.from != null) {
      return globalThis.Buffer.from(string7, "utf8");
    }
    return base4.decoder.decode(`${base4.prefix}${string7}`);
  }

  // ../../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/to-string.js
  init_node_compat_inject();
  function toString4(array3, encoding = "utf8") {
    const base4 = bases_default2[encoding];
    if (!base4) {
      throw new Error(`Unsupported encoding "${encoding}"`);
    }
    if ((encoding === "utf8" || encoding === "utf-8") && globalThis.Buffer != null && globalThis.Buffer.from != null) {
      return globalThis.Buffer.from(array3.buffer, array3.byteOffset, array3.byteLength).toString("utf8");
    }
    return base4.encoder.encode(array3).substring(1);
  }

  // ../../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/xor.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@walletconnect+utils@2.17.1/node_modules/@walletconnect/utils/dist/index.es.js
  var import_elliptic2 = __toESM(require_elliptic());

  // ../../node_modules/.pnpm/@walletconnect+relay-auth@1.0.4/node_modules/@walletconnect/relay-auth/dist/esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@walletconnect+relay-auth@1.0.4/node_modules/@walletconnect/relay-auth/dist/esm/api.js
  init_node_compat_inject();
  var ed255193 = __toESM(require_ed255192());
  var import_random = __toESM(require_random());
  var import_time5 = __toESM(require_cjs());

  // ../../node_modules/.pnpm/@walletconnect+relay-auth@1.0.4/node_modules/@walletconnect/relay-auth/dist/esm/constants.js
  init_node_compat_inject();
  var JWT_IRIDIUM_ALG = "EdDSA";
  var JWT_IRIDIUM_TYP = "JWT";
  var JWT_DELIMITER = ".";
  var JWT_ENCODING = "base64url";
  var JSON_ENCODING = "utf8";
  var DATA_ENCODING = "utf8";
  var DID_DELIMITER = ":";
  var DID_PREFIX = "did";
  var DID_METHOD = "key";
  var MULTICODEC_ED25519_ENCODING = "base58btc";
  var MULTICODEC_ED25519_BASE = "z";
  var MULTICODEC_ED25519_HEADER = "K36";
  var KEY_PAIR_SEED_LENGTH = 32;

  // ../../node_modules/.pnpm/@walletconnect+relay-auth@1.0.4/node_modules/@walletconnect/relay-auth/dist/esm/utils.js
  init_node_compat_inject();
  function decodeJSON(str) {
    return safeJsonParse(toString4(fromString5(str, JWT_ENCODING), JSON_ENCODING));
  }
  function encodeJSON(val) {
    return toString4(fromString5(safeJsonStringify(val), JSON_ENCODING), JWT_ENCODING);
  }
  function encodeIss(publicKey3) {
    const header = fromString5(MULTICODEC_ED25519_HEADER, MULTICODEC_ED25519_ENCODING);
    const multicodec = MULTICODEC_ED25519_BASE + toString4(concat5([header, publicKey3]), MULTICODEC_ED25519_ENCODING);
    return [DID_PREFIX, DID_METHOD, multicodec].join(DID_DELIMITER);
  }
  function encodeSig(bytes) {
    return toString4(bytes, JWT_ENCODING);
  }
  function decodeSig(encoded) {
    return fromString5(encoded, JWT_ENCODING);
  }
  function encodeData4(params) {
    return fromString5([encodeJSON(params.header), encodeJSON(params.payload)].join(JWT_DELIMITER), DATA_ENCODING);
  }
  function encodeJWT(params) {
    return [
      encodeJSON(params.header),
      encodeJSON(params.payload),
      encodeSig(params.signature)
    ].join(JWT_DELIMITER);
  }
  function decodeJWT(jwt2) {
    const params = jwt2.split(JWT_DELIMITER);
    const header = decodeJSON(params[0]);
    const payload = decodeJSON(params[1]);
    const signature2 = decodeSig(params[2]);
    const data = fromString5(params.slice(0, 2).join(JWT_DELIMITER), DATA_ENCODING);
    return { header, payload, signature: signature2, data };
  }

  // ../../node_modules/.pnpm/@walletconnect+relay-auth@1.0.4/node_modules/@walletconnect/relay-auth/dist/esm/api.js
  function generateKeyPair(seed = (0, import_random.randomBytes)(KEY_PAIR_SEED_LENGTH)) {
    return ed255193.generateKeyPairFromSeed(seed);
  }
  async function signJWT(sub, aud, ttl, keyPair2, iat = (0, import_time5.fromMiliseconds)(Date.now())) {
    const header = { alg: JWT_IRIDIUM_ALG, typ: JWT_IRIDIUM_TYP };
    const iss = encodeIss(keyPair2.publicKey);
    const exp = iat + ttl;
    const payload = { iss, sub, aud, iat, exp };
    const data = encodeData4({ header, payload });
    const signature2 = ed255193.sign(keyPair2.secretKey, data);
    return encodeJWT({ header, payload, signature: signature2 });
  }

  // ../../node_modules/.pnpm/@walletconnect+relay-auth@1.0.4/node_modules/@walletconnect/relay-auth/dist/esm/types.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@walletconnect+utils@2.17.1/node_modules/@walletconnect/utils/dist/index.es.js
  var H4 = ":";
  function re3(e2) {
    const [n6, t] = e2.split(H4);
    return { namespace: n6, reference: t };
  }
  function W5(e2, n6) {
    return e2.includes(":") ? [e2] : n6.chains || [];
  }
  var gt3 = Object.defineProperty;
  var Ke3 = Object.getOwnPropertySymbols;
  var vt2 = Object.prototype.hasOwnProperty;
  var bt2 = Object.prototype.propertyIsEnumerable;
  var Le3 = (e2, n6, t) => n6 in e2 ? gt3(e2, n6, { enumerable: true, configurable: true, writable: true, value: t }) : e2[n6] = t;
  var Fe3 = (e2, n6) => {
    for (var t in n6 || (n6 = {})) vt2.call(n6, t) && Le3(e2, t, n6[t]);
    if (Ke3) for (var t of Ke3(n6)) bt2.call(n6, t) && Le3(e2, t, n6[t]);
    return e2;
  };
  var qe3 = "ReactNative";
  var y7 = { reactNative: "react-native", node: "node", browser: "browser", unknown: "unknown" };
  var He2 = "js";
  function ce3() {
    return typeof process < "u" && typeof process.versions < "u" && typeof process.versions.node < "u";
  }
  function _4() {
    return !(0, import_window_getters3.getDocument)() && !!(0, import_window_getters3.getNavigator)() && navigator.product === qe3;
  }
  function V3() {
    return !ce3() && !!(0, import_window_getters3.getNavigator)() && !!(0, import_window_getters3.getDocument)();
  }
  function P5() {
    return _4() ? y7.reactNative : ce3() ? y7.node : V3() ? y7.browser : y7.unknown;
  }
  function Ot3() {
    var e2;
    try {
      return _4() && typeof global < "u" && typeof (global == null ? void 0 : global.Application) < "u" ? (e2 = global.Application) == null ? void 0 : e2.applicationId : void 0;
    } catch {
      return;
    }
  }
  function We3(e2, n6) {
    let t = q4.parse(e2);
    return t = Fe3(Fe3({}, t), n6), e2 = q4.stringify(t), e2;
  }
  function Nt2() {
    return (0, import_window_metadata2.getWindowMetadata)() || { name: "", description: "", url: "", icons: [""] };
  }
  function Je3() {
    if (P5() === y7.reactNative && typeof global < "u" && typeof (global == null ? void 0 : global.Platform) < "u") {
      const { OS: t, Version: r3 } = global.Platform;
      return [t, r3].join("-");
    }
    const e2 = detect();
    if (e2 === null) return "unknown";
    const n6 = e2.os ? e2.os.replace(" ", "").toLowerCase() : "unknown";
    return e2.type === "browser" ? [n6, e2.name, e2.version].join("-") : [n6, e2.version].join("-");
  }
  function ze4() {
    var e2;
    const n6 = P5();
    return n6 === y7.browser ? [n6, ((e2 = (0, import_window_getters3.getLocation)()) == null ? void 0 : e2.host) || "unknown"].join(":") : n6;
  }
  function Ge4(e2, n6, t) {
    const r3 = Je3(), o5 = ze4();
    return [[e2, n6].join("-"), [He2, t].join("-"), r3, o5].join("/");
  }
  function $t4({ protocol: e2, version: n6, relayUrl: t, sdkVersion: r3, auth: o5, projectId: s3, useOnCloseEvent: i5, bundleId: u4 }) {
    const l6 = t.split("?"), c7 = Ge4(e2, n6, r3), d6 = { auth: o5, ua: c7, projectId: s3, useOnCloseEvent: i5 || void 0, origin: u4 || void 0 }, a5 = We3(l6[1] || "", d6);
    return l6[0] + "?" + a5;
  }
  function $3(e2, n6) {
    return e2.filter((t) => n6.includes(t)).length === e2.length;
  }
  function Tt3(e2) {
    return Object.fromEntries(e2.entries());
  }
  function Pt2(e2) {
    return new Map(Object.entries(e2));
  }
  function _t2(e2 = import_time6.FIVE_MINUTES, n6) {
    const t = (0, import_time6.toMiliseconds)(e2 || import_time6.FIVE_MINUTES);
    let r3, o5, s3;
    return { resolve: (i5) => {
      s3 && r3 && (clearTimeout(s3), r3(i5));
    }, reject: (i5) => {
      s3 && o5 && (clearTimeout(s3), o5(i5));
    }, done: () => new Promise((i5, u4) => {
      s3 = setTimeout(() => {
        u4(new Error(n6));
      }, t), r3 = i5, o5 = u4;
    }) };
  }
  function kt2(e2, n6, t) {
    return new Promise(async (r3, o5) => {
      const s3 = setTimeout(() => o5(new Error(t)), n6);
      try {
        const i5 = await e2;
        r3(i5);
      } catch (i5) {
        o5(i5);
      }
      clearTimeout(s3);
    });
  }
  function ae3(e2, n6) {
    if (typeof n6 == "string" && n6.startsWith(`${e2}:`)) return n6;
    if (e2.toLowerCase() === "topic") {
      if (typeof n6 != "string") throw new Error('Value must be "string" for expirer target type: topic');
      return `topic:${n6}`;
    } else if (e2.toLowerCase() === "id") {
      if (typeof n6 != "number") throw new Error('Value must be "number" for expirer target type: id');
      return `id:${n6}`;
    }
    throw new Error(`Unknown expirer target type: ${e2}`);
  }
  function Dt3(e2) {
    return ae3("topic", e2);
  }
  function xt2(e2) {
    return ae3("id", e2);
  }
  function Vt3(e2) {
    const [n6, t] = e2.split(":"), r3 = { id: void 0, topic: void 0 };
    if (n6 === "topic" && typeof t == "string") r3.topic = t;
    else if (n6 === "id" && Number.isInteger(Number(t))) r3.id = Number(t);
    else throw new Error(`Invalid target, expected id:number or topic:string, got ${n6}:${t}`);
    return r3;
  }
  function Mt3(e2, n6) {
    return (0, import_time6.fromMiliseconds)((n6 || Date.now()) + (0, import_time6.toMiliseconds)(e2));
  }
  function Kt3(e2) {
    return Date.now() >= (0, import_time6.toMiliseconds)(e2);
  }
  function Lt2(e2, n6) {
    return `${e2}${n6 ? `:${n6}` : ""}`;
  }
  function N11(e2 = [], n6 = []) {
    return [.../* @__PURE__ */ new Set([...e2, ...n6])];
  }
  async function Ft3({ id: e2, topic: n6, wcDeepLink: t }) {
    var r3;
    try {
      if (!t) return;
      const o5 = typeof t == "string" ? JSON.parse(t) : t, s3 = o5?.href;
      if (typeof s3 != "string") return;
      const i5 = Xe2(s3, e2, n6), u4 = P5();
      if (u4 === y7.browser) {
        if (!((r3 = (0, import_window_getters3.getDocument)()) != null && r3.hasFocus())) {
          console.warn("Document does not have focus, skipping deeplink.");
          return;
        }
        i5.startsWith("https://") || i5.startsWith("http://") ? window.open(i5, "_blank", "noreferrer noopener") : window.open(i5, en2() ? "_blank" : "_self", "noreferrer noopener");
      } else u4 === y7.reactNative && typeof (global == null ? void 0 : global.Linking) < "u" && await global.Linking.openURL(i5);
    } catch (o5) {
      console.error(o5);
    }
  }
  function Xe2(e2, n6, t) {
    const r3 = `requestId=${n6}&sessionTopic=${t}`;
    e2.endsWith("/") && (e2 = e2.slice(0, -1));
    let o5 = `${e2}`;
    if (e2.startsWith("https://t.me")) {
      const s3 = e2.includes("?") ? "&startapp=" : "?startapp=";
      o5 = `${o5}${s3}${nn3(r3, true)}`;
    } else o5 = `${o5}/wc?${r3}`;
    return o5;
  }
  async function qt3(e2, n6) {
    let t = "";
    try {
      if (V3() && (t = localStorage.getItem(n6), t)) return t;
      t = await e2.getItem(n6);
    } catch (r3) {
      console.error(r3);
    }
    return t;
  }
  function Bt3(e2, n6) {
    if (!e2.includes(n6)) return null;
    const t = e2.split(/([&,?,=])/), r3 = t.indexOf(n6);
    return t[r3 + 2];
  }
  function Ht3() {
    return typeof crypto < "u" && crypto != null && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu, (e2) => {
      const n6 = Math.random() * 16 | 0;
      return (e2 === "x" ? n6 : n6 & 3 | 8).toString(16);
    });
  }
  function Wt4() {
    return typeof process < "u" && process.env.IS_VITEST === "true";
  }
  function en2() {
    return typeof window < "u" && (!!window.TelegramWebviewProxy || !!window.Telegram || !!window.TelegramWebviewProxyProto);
  }
  function nn3(e2, n6 = false) {
    const t = Buffer2.from(e2).toString("base64");
    return n6 ? t.replace(/[=]/g, "") : t;
  }
  function le4(e2) {
    return Buffer2.from(e2, "base64").toString("utf-8");
  }
  var Jt4 = "https://rpc.walletconnect.org/v1";
  async function tn2(e2, n6, t, r3, o5, s3) {
    switch (t.t) {
      case "eip191":
        return rn2(e2, n6, t.s);
      case "eip1271":
        return await on2(e2, n6, t.s, r3, o5, s3);
      default:
        throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${t.t}`);
    }
  }
  function rn2(e2, n6, t) {
    return recoverAddress3(hashMessage2(n6), t).toLowerCase() === e2.toLowerCase();
  }
  async function on2(e2, n6, t, r3, o5, s3) {
    const i5 = re3(r3);
    if (!i5.namespace || !i5.reference) throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${r3}`);
    try {
      const u4 = "0x1626ba7e", l6 = "0000000000000000000000000000000000000000000000000000000000000040", c7 = "0000000000000000000000000000000000000000000000000000000000000041", d6 = t.substring(2), a5 = hashMessage2(n6).substring(2), f7 = u4 + a5 + l6 + c7 + d6, h8 = await fetch(`${s3 || Jt4}/?chainId=${r3}&projectId=${o5}`, { method: "POST", body: JSON.stringify({ id: zt4(), jsonrpc: "2.0", method: "eth_call", params: [{ to: e2, data: f7 }, "latest"] }) }), { result: p7 } = await h8.json();
      return p7 ? p7.slice(0, u4.length).toLowerCase() === u4.toLowerCase() : false;
    } catch (u4) {
      return console.error("isValidEip1271Signature: ", u4), false;
    }
  }
  function zt4() {
    return Date.now() + Math.floor(Math.random() * 1e3);
  }
  var Gt4 = Object.defineProperty;
  var Yt4 = Object.defineProperties;
  var Qt3 = Object.getOwnPropertyDescriptors;
  var sn2 = Object.getOwnPropertySymbols;
  var Zt3 = Object.prototype.hasOwnProperty;
  var Xt3 = Object.prototype.propertyIsEnumerable;
  var cn = (e2, n6, t) => n6 in e2 ? Gt4(e2, n6, { enumerable: true, configurable: true, writable: true, value: t }) : e2[n6] = t;
  var de4 = (e2, n6) => {
    for (var t in n6 || (n6 = {})) Zt3.call(n6, t) && cn(e2, t, n6[t]);
    if (sn2) for (var t of sn2(n6)) Xt3.call(n6, t) && cn(e2, t, n6[t]);
    return e2;
  };
  var an = (e2, n6) => Yt4(e2, Qt3(n6));
  var er2 = "did:pkh:";
  var z6 = (e2) => e2?.split(":");
  var un = (e2) => {
    const n6 = e2 && z6(e2);
    if (n6) return e2.includes(er2) ? n6[3] : n6[1];
  };
  var ln = (e2) => {
    const n6 = e2 && z6(e2);
    if (n6) return n6[2] + ":" + n6[3];
  };
  var fe5 = (e2) => {
    const n6 = e2 && z6(e2);
    if (n6) return n6.pop();
  };
  async function nr2(e2) {
    const { cacao: n6, projectId: t } = e2, { s: r3, p: o5 } = n6, s3 = dn(o5, o5.iss), i5 = fe5(o5.iss);
    return await tn2(i5, s3, r3, ln(o5.iss), t);
  }
  var dn = (e2, n6) => {
    const t = `${e2.domain} wants you to sign in with your Ethereum account:`, r3 = fe5(n6);
    if (!e2.aud && !e2.uri) throw new Error("Either `aud` or `uri` is required to construct the message");
    let o5 = e2.statement || void 0;
    const s3 = `URI: ${e2.aud || e2.uri}`, i5 = `Version: ${e2.version}`, u4 = `Chain ID: ${un(n6)}`, l6 = `Nonce: ${e2.nonce}`, c7 = `Issued At: ${e2.iat}`, d6 = e2.exp ? `Expiration Time: ${e2.exp}` : void 0, a5 = e2.nbf ? `Not Before: ${e2.nbf}` : void 0, f7 = e2.requestId ? `Request ID: ${e2.requestId}` : void 0, h8 = e2.resources ? `Resources:${e2.resources.map((m3) => `
- ${m3}`).join("")}` : void 0, p7 = Y3(e2.resources);
    if (p7) {
      const m3 = R3(p7);
      o5 = he5(o5, m3);
    }
    return [t, r3, "", o5, "", s3, i5, u4, l6, c7, d6, a5, f7, h8].filter((m3) => m3 != null).join(`
`);
  };
  function hn(e2) {
    return Buffer2.from(JSON.stringify(e2)).toString("base64");
  }
  function yn2(e2) {
    return JSON.parse(Buffer2.from(e2, "base64").toString("utf-8"));
  }
  function O5(e2) {
    if (!e2) throw new Error("No recap provided, value is undefined");
    if (!e2.att) throw new Error("No `att` property found");
    const n6 = Object.keys(e2.att);
    if (!(n6 != null && n6.length)) throw new Error("No resources found in `att` property");
    n6.forEach((t) => {
      const r3 = e2.att[t];
      if (Array.isArray(r3)) throw new Error(`Resource must be an object: ${t}`);
      if (typeof r3 != "object") throw new Error(`Resource must be an object: ${t}`);
      if (!Object.keys(r3).length) throw new Error(`Resource object is empty: ${t}`);
      Object.keys(r3).forEach((o5) => {
        const s3 = r3[o5];
        if (!Array.isArray(s3)) throw new Error(`Ability limits ${o5} must be an array of objects, found: ${s3}`);
        if (!s3.length) throw new Error(`Value of ${o5} is empty array, must be an array with objects`);
        s3.forEach((i5) => {
          if (typeof i5 != "object") throw new Error(`Ability limits (${o5}) must be an array of objects, found: ${i5}`);
        });
      });
    });
  }
  function gn3(e2, n6, t, r3 = {}) {
    return t?.sort((o5, s3) => o5.localeCompare(s3)), { att: { [e2]: pe5(n6, t, r3) } };
  }
  function pe5(e2, n6, t = {}) {
    n6 = n6?.sort((o5, s3) => o5.localeCompare(s3));
    const r3 = n6.map((o5) => ({ [`${e2}/${o5}`]: [t] }));
    return Object.assign({}, ...r3);
  }
  function G4(e2) {
    return O5(e2), `urn:recap:${hn(e2).replace(/=/g, "")}`;
  }
  function R3(e2) {
    const n6 = yn2(e2.replace("urn:recap:", ""));
    return O5(n6), n6;
  }
  function ir2(e2, n6, t) {
    const r3 = gn3(e2, n6, t);
    return G4(r3);
  }
  function me4(e2) {
    return e2 && e2.includes("urn:recap:");
  }
  function cr3(e2, n6) {
    const t = R3(e2), r3 = R3(n6), o5 = bn2(t, r3);
    return G4(o5);
  }
  function bn2(e2, n6) {
    O5(e2), O5(n6);
    const t = Object.keys(e2.att).concat(Object.keys(n6.att)).sort((o5, s3) => o5.localeCompare(s3)), r3 = { att: {} };
    return t.forEach((o5) => {
      var s3, i5;
      Object.keys(((s3 = e2.att) == null ? void 0 : s3[o5]) || {}).concat(Object.keys(((i5 = n6.att) == null ? void 0 : i5[o5]) || {})).sort((u4, l6) => u4.localeCompare(l6)).forEach((u4) => {
        var l6, c7;
        r3.att[o5] = an(de4({}, r3.att[o5]), { [u4]: ((l6 = e2.att[o5]) == null ? void 0 : l6[u4]) || ((c7 = n6.att[o5]) == null ? void 0 : c7[u4]) });
      });
    }), r3;
  }
  function he5(e2 = "", n6) {
    O5(n6);
    const t = "I further authorize the stated URI to perform the following actions on my behalf: ";
    if (e2.includes(t)) return e2;
    const r3 = [];
    let o5 = 0;
    Object.keys(n6.att).forEach((u4) => {
      const l6 = Object.keys(n6.att[u4]).map((a5) => ({ ability: a5.split("/")[0], action: a5.split("/")[1] }));
      l6.sort((a5, f7) => a5.action.localeCompare(f7.action));
      const c7 = {};
      l6.forEach((a5) => {
        c7[a5.ability] || (c7[a5.ability] = []), c7[a5.ability].push(a5.action);
      });
      const d6 = Object.keys(c7).map((a5) => (o5++, `(${o5}) '${a5}': '${c7[a5].join("', '")}' for '${u4}'.`));
      r3.push(d6.join(", ").replace(".,", "."));
    });
    const s3 = r3.join(" "), i5 = `${t}${s3}`;
    return `${e2 ? e2 + " " : ""}${i5}`;
  }
  function ar2(e2) {
    var n6;
    const t = R3(e2);
    O5(t);
    const r3 = (n6 = t.att) == null ? void 0 : n6.eip155;
    return r3 ? Object.keys(r3).map((o5) => o5.split("/")[1]) : [];
  }
  function ur2(e2) {
    const n6 = R3(e2);
    O5(n6);
    const t = [];
    return Object.values(n6.att).forEach((r3) => {
      Object.values(r3).forEach((o5) => {
        var s3;
        (s3 = o5?.[0]) != null && s3.chains && t.push(o5[0].chains);
      });
    }), [...new Set(t.flat())];
  }
  function Y3(e2) {
    if (!e2) return;
    const n6 = e2?.[e2.length - 1];
    return me4(n6) ? n6 : void 0;
  }
  var ye4 = "base10";
  var g5 = "base16";
  var ge4 = "base64pad";
  var lr2 = "base64url";
  var k5 = "utf8";
  var ve5 = 0;
  var D4 = 1;
  var M5 = 2;
  var dr2 = 0;
  var wn = 1;
  var K4 = 12;
  var be4 = 32;
  function fr2() {
    const e2 = _e4.generateKeyPair();
    return { privateKey: toString4(e2.secretKey, g5), publicKey: toString4(e2.publicKey, g5) };
  }
  function pr2() {
    const e2 = (0, import_random2.randomBytes)(be4);
    return toString4(e2, g5);
  }
  function mr2(e2, n6) {
    const t = _e4.sharedKey(fromString5(e2, g5), fromString5(n6, g5), true), r3 = new import_hkdf2.HKDF(import_sha2567.SHA256, t).expand(be4);
    return toString4(r3, g5);
  }
  function hr2(e2) {
    const n6 = (0, import_sha2567.hash)(fromString5(e2, g5));
    return toString4(n6, g5);
  }
  function yr2(e2) {
    const n6 = (0, import_sha2567.hash)(fromString5(e2, k5));
    return toString4(n6, g5);
  }
  function Ee4(e2) {
    return fromString5(`${e2}`, ye4);
  }
  function A5(e2) {
    return Number(toString4(e2, ye4));
  }
  function gr2(e2) {
    const n6 = Ee4(typeof e2.type < "u" ? e2.type : ve5);
    if (A5(n6) === D4 && typeof e2.senderPublicKey > "u") throw new Error("Missing sender public key for type 1 envelope");
    const t = typeof e2.senderPublicKey < "u" ? fromString5(e2.senderPublicKey, g5) : void 0, r3 = typeof e2.iv < "u" ? fromString5(e2.iv, g5) : (0, import_random2.randomBytes)(K4), o5 = new import_chacha20poly1305.ChaCha20Poly1305(fromString5(e2.symKey, g5)).seal(r3, fromString5(e2.message, k5));
    return we4({ type: n6, sealed: o5, iv: r3, senderPublicKey: t, encoding: e2.encoding });
  }
  function vr3(e2, n6) {
    const t = Ee4(M5), r3 = (0, import_random2.randomBytes)(K4), o5 = fromString5(e2, k5);
    return we4({ type: t, sealed: o5, iv: r3, encoding: n6 });
  }
  function br3(e2) {
    const n6 = new import_chacha20poly1305.ChaCha20Poly1305(fromString5(e2.symKey, g5)), { sealed: t, iv: r3 } = Q4({ encoded: e2.encoded, encoding: e2?.encoding }), o5 = n6.open(r3, t);
    if (o5 === null) throw new Error("Failed to decrypt");
    return toString4(o5, k5);
  }
  function Er2(e2, n6) {
    const { sealed: t } = Q4({ encoded: e2, encoding: n6 });
    return toString4(t, k5);
  }
  function we4(e2) {
    const { encoding: n6 = ge4 } = e2;
    if (A5(e2.type) === M5) return toString4(concat5([e2.type, e2.sealed]), n6);
    if (A5(e2.type) === D4) {
      if (typeof e2.senderPublicKey > "u") throw new Error("Missing sender public key for type 1 envelope");
      return toString4(concat5([e2.type, e2.senderPublicKey, e2.iv, e2.sealed]), n6);
    }
    return toString4(concat5([e2.type, e2.iv, e2.sealed]), n6);
  }
  function Q4(e2) {
    const { encoded: n6, encoding: t = ge4 } = e2, r3 = fromString5(n6, t), o5 = r3.slice(dr2, wn), s3 = wn;
    if (A5(o5) === D4) {
      const c7 = s3 + be4, d6 = c7 + K4, a5 = r3.slice(s3, c7), f7 = r3.slice(c7, d6), h8 = r3.slice(d6);
      return { type: o5, sealed: h8, iv: f7, senderPublicKey: a5 };
    }
    if (A5(o5) === M5) {
      const c7 = r3.slice(s3), d6 = (0, import_random2.randomBytes)(K4);
      return { type: o5, sealed: c7, iv: d6 };
    }
    const i5 = s3 + K4, u4 = r3.slice(s3, i5), l6 = r3.slice(i5);
    return { type: o5, sealed: l6, iv: u4 };
  }
  function wr3(e2, n6) {
    const t = Q4({ encoded: e2, encoding: n6?.encoding });
    return On2({ type: A5(t.type), senderPublicKey: typeof t.senderPublicKey < "u" ? toString4(t.senderPublicKey, g5) : void 0, receiverPublicKey: n6?.receiverPublicKey });
  }
  function On2(e2) {
    const n6 = e2?.type || ve5;
    if (n6 === D4) {
      if (typeof e2?.senderPublicKey > "u") throw new Error("missing sender public key");
      if (typeof e2?.receiverPublicKey > "u") throw new Error("missing receiver public key");
    }
    return { type: n6, senderPublicKey: e2?.senderPublicKey, receiverPublicKey: e2?.receiverPublicKey };
  }
  function Or3(e2) {
    return e2.type === D4 && typeof e2.senderPublicKey == "string" && typeof e2.receiverPublicKey == "string";
  }
  function Nr3(e2) {
    return e2.type === M5;
  }
  function Nn2(e2) {
    return new import_elliptic2.ec("p256").keyFromPublic({ x: Buffer2.from(e2.x, "base64").toString("hex"), y: Buffer2.from(e2.y, "base64").toString("hex") }, "hex");
  }
  function Sr3(e2) {
    let n6 = e2.replace(/-/g, "+").replace(/_/g, "/");
    const t = n6.length % 4;
    return t > 0 && (n6 += "=".repeat(4 - t)), n6;
  }
  function $r3(e2) {
    return Buffer2.from(Sr3(e2), "base64");
  }
  function Rr3(e2, n6) {
    const [t, r3, o5] = e2.split("."), s3 = $r3(o5);
    if (s3.length !== 64) throw new Error("Invalid signature length");
    const i5 = s3.slice(0, 32).toString("hex"), u4 = s3.slice(32, 64).toString("hex"), l6 = `${t}.${r3}`, c7 = new import_sha2567.SHA256().update(Buffer2.from(l6)).digest(), d6 = Nn2(n6), a5 = Buffer2.from(c7).toString("hex");
    if (!d6.verify(a5, { r: i5, s: u4 })) throw new Error("Invalid signature");
    return decodeJWT(e2).payload;
  }
  var Sn2 = "irn";
  function Ir3(e2) {
    return e2?.relay || { protocol: Sn2 };
  }
  function jr3(e2) {
    const n6 = C3[e2];
    if (typeof n6 > "u") throw new Error(`Relay Protocol not supported: ${e2}`);
    return n6;
  }
  var Tr3 = Object.defineProperty;
  var Pr3 = Object.defineProperties;
  var Ar3 = Object.getOwnPropertyDescriptors;
  var $n3 = Object.getOwnPropertySymbols;
  var Cr3 = Object.prototype.hasOwnProperty;
  var Ur3 = Object.prototype.propertyIsEnumerable;
  var Rn2 = (e2, n6, t) => n6 in e2 ? Tr3(e2, n6, { enumerable: true, configurable: true, writable: true, value: t }) : e2[n6] = t;
  var In3 = (e2, n6) => {
    for (var t in n6 || (n6 = {})) Cr3.call(n6, t) && Rn2(e2, t, n6[t]);
    if ($n3) for (var t of $n3(n6)) Ur3.call(n6, t) && Rn2(e2, t, n6[t]);
    return e2;
  };
  var _r3 = (e2, n6) => Pr3(e2, Ar3(n6));
  function jn2(e2, n6 = "-") {
    const t = {}, r3 = "relay" + n6;
    return Object.keys(e2).forEach((o5) => {
      if (o5.startsWith(r3)) {
        const s3 = o5.replace(r3, ""), i5 = e2[o5];
        t[s3] = i5;
      }
    }), t;
  }
  function kr3(e2) {
    if (!e2.includes("wc:")) {
      const l6 = le4(e2);
      l6 != null && l6.includes("wc:") && (e2 = l6);
    }
    e2 = e2.includes("wc://") ? e2.replace("wc://", "") : e2, e2 = e2.includes("wc:") ? e2.replace("wc:", "") : e2;
    const n6 = e2.indexOf(":"), t = e2.indexOf("?") !== -1 ? e2.indexOf("?") : void 0, r3 = e2.substring(0, n6), o5 = e2.substring(n6 + 1, t).split("@"), s3 = typeof t < "u" ? e2.substring(t) : "", i5 = q4.parse(s3), u4 = typeof i5.methods == "string" ? i5.methods.split(",") : void 0;
    return { protocol: r3, topic: Tn3(o5[0]), version: parseInt(o5[1], 10), symKey: i5.symKey, relay: jn2(i5), methods: u4, expiryTimestamp: i5.expiryTimestamp ? parseInt(i5.expiryTimestamp, 10) : void 0 };
  }
  function Tn3(e2) {
    return e2.startsWith("//") ? e2.substring(2) : e2;
  }
  function Pn2(e2, n6 = "-") {
    const t = "relay", r3 = {};
    return Object.keys(e2).forEach((o5) => {
      const s3 = t + n6 + o5;
      e2[o5] && (r3[s3] = e2[o5]);
    }), r3;
  }
  function Dr2(e2) {
    return `${e2.protocol}:${e2.topic}@${e2.version}?` + q4.stringify(In3(_r3(In3({ symKey: e2.symKey }, Pn2(e2.relay)), { expiryTimestamp: e2.expiryTimestamp }), e2.methods ? { methods: e2.methods.join(",") } : {}));
  }
  function xr3(e2, n6, t) {
    return `${e2}?wc_ev=${t}&topic=${n6}`;
  }
  function C6(e2) {
    const n6 = [];
    return e2.forEach((t) => {
      const [r3, o5] = t.split(":");
      n6.push(`${r3}:${o5}`);
    }), n6;
  }
  function Un2(e2) {
    const n6 = [];
    return Object.values(e2).forEach((t) => {
      n6.push(...C6(t.accounts));
    }), n6;
  }
  function _n2(e2, n6) {
    const t = [];
    return Object.values(e2).forEach((r3) => {
      C6(r3.accounts).includes(n6) && t.push(...r3.methods);
    }), t;
  }
  function kn3(e2, n6) {
    const t = [];
    return Object.values(e2).forEach((r3) => {
      C6(r3.accounts).includes(n6) && t.push(...r3.events);
    }), t;
  }
  function xn3(e2) {
    const n6 = {};
    return e2?.forEach((t) => {
      const [r3, o5] = t.split(":");
      n6[r3] || (n6[r3] = { accounts: [], chains: [], events: [] }), n6[r3].accounts.push(t), n6[r3].chains.push(`${r3}:${o5}`);
    }), n6;
  }
  function Jr3(e2, n6) {
    n6 = n6.map((r3) => r3.replace("did:pkh:", ""));
    const t = xn3(n6);
    for (const [r3, o5] of Object.entries(t)) o5.methods ? o5.methods = N11(o5.methods, e2) : o5.methods = e2, o5.events = ["chainChanged", "accountsChanged"];
    return t;
  }
  var Vn2 = { INVALID_METHOD: { message: "Invalid method.", code: 1001 }, INVALID_EVENT: { message: "Invalid event.", code: 1002 }, INVALID_UPDATE_REQUEST: { message: "Invalid update request.", code: 1003 }, INVALID_EXTEND_REQUEST: { message: "Invalid extend request.", code: 1004 }, INVALID_SESSION_SETTLE_REQUEST: { message: "Invalid session settle request.", code: 1005 }, UNAUTHORIZED_METHOD: { message: "Unauthorized method.", code: 3001 }, UNAUTHORIZED_EVENT: { message: "Unauthorized event.", code: 3002 }, UNAUTHORIZED_UPDATE_REQUEST: { message: "Unauthorized update request.", code: 3003 }, UNAUTHORIZED_EXTEND_REQUEST: { message: "Unauthorized extend request.", code: 3004 }, USER_REJECTED: { message: "User rejected.", code: 5e3 }, USER_REJECTED_CHAINS: { message: "User rejected chains.", code: 5001 }, USER_REJECTED_METHODS: { message: "User rejected methods.", code: 5002 }, USER_REJECTED_EVENTS: { message: "User rejected events.", code: 5003 }, UNSUPPORTED_CHAINS: { message: "Unsupported chains.", code: 5100 }, UNSUPPORTED_METHODS: { message: "Unsupported methods.", code: 5101 }, UNSUPPORTED_EVENTS: { message: "Unsupported events.", code: 5102 }, UNSUPPORTED_ACCOUNTS: { message: "Unsupported accounts.", code: 5103 }, UNSUPPORTED_NAMESPACE_KEY: { message: "Unsupported namespace key.", code: 5104 }, USER_DISCONNECTED: { message: "User disconnected.", code: 6e3 }, SESSION_SETTLEMENT_FAILED: { message: "Session settlement failed.", code: 7e3 }, WC_METHOD_UNSUPPORTED: { message: "Unsupported wc_ method.", code: 10001 } };
  var Mn3 = { NOT_INITIALIZED: { message: "Not initialized.", code: 1 }, NO_MATCHING_KEY: { message: "No matching key.", code: 2 }, RESTORE_WILL_OVERRIDE: { message: "Restore will override.", code: 3 }, RESUBSCRIBED: { message: "Resubscribed.", code: 4 }, MISSING_OR_INVALID: { message: "Missing or invalid.", code: 5 }, EXPIRED: { message: "Expired.", code: 6 }, UNKNOWN_TYPE: { message: "Unknown type.", code: 7 }, MISMATCHED_TOPIC: { message: "Mismatched topic.", code: 8 }, NON_CONFORMING_NAMESPACES: { message: "Non conforming namespaces.", code: 9 } };
  function S4(e2, n6) {
    const { message: t, code: r3 } = Mn3[e2];
    return { message: n6 ? `${t} ${n6}` : t, code: r3 };
  }
  function U4(e2, n6) {
    const { message: t, code: r3 } = Vn2[e2];
    return { message: n6 ? `${t} ${n6}` : t, code: r3 };
  }
  function L3(e2, n6) {
    return Array.isArray(e2) ? typeof n6 < "u" && e2.length ? e2.every(n6) : true : false;
  }
  function Z2(e2) {
    return Object.getPrototypeOf(e2) === Object.prototype && Object.keys(e2).length;
  }
  function I3(e2) {
    return typeof e2 > "u";
  }
  function b5(e2, n6) {
    return n6 && I3(e2) ? true : typeof e2 == "string" && !!e2.trim().length;
  }
  function X2(e2, n6) {
    return n6 && I3(e2) ? true : typeof e2 == "number" && !isNaN(e2);
  }
  function zr2(e2, n6) {
    const { requiredNamespaces: t } = n6, r3 = Object.keys(e2.namespaces), o5 = Object.keys(t);
    let s3 = true;
    return $3(o5, r3) ? (r3.forEach((i5) => {
      const { accounts: u4, methods: l6, events: c7 } = e2.namespaces[i5], d6 = C6(u4), a5 = t[i5];
      (!$3(W5(i5, a5), d6) || !$3(a5.methods, l6) || !$3(a5.events, c7)) && (s3 = false);
    }), s3) : false;
  }
  function F2(e2) {
    return b5(e2, false) && e2.includes(":") ? e2.split(":").length === 2 : false;
  }
  function Kn3(e2) {
    if (b5(e2, false) && e2.includes(":")) {
      const n6 = e2.split(":");
      if (n6.length === 3) {
        const t = n6[0] + ":" + n6[1];
        return !!n6[2] && F2(t);
      }
    }
    return false;
  }
  function Gr2(e2) {
    function n6(t) {
      try {
        return typeof new URL(t) < "u";
      } catch {
        return false;
      }
    }
    try {
      if (b5(e2, false)) {
        if (n6(e2)) return true;
        const t = le4(e2);
        return n6(t);
      }
    } catch {
    }
    return false;
  }
  function Yr2(e2) {
    var n6;
    return (n6 = e2?.proposer) == null ? void 0 : n6.publicKey;
  }
  function Qr2(e2) {
    return e2?.topic;
  }
  function Zr2(e2, n6) {
    let t = null;
    return b5(e2?.publicKey, false) || (t = S4("MISSING_OR_INVALID", `${n6} controller public key should be a string`)), t;
  }
  function Se5(e2) {
    let n6 = true;
    return L3(e2) ? e2.length && (n6 = e2.every((t) => b5(t, false))) : n6 = false, n6;
  }
  function Ln3(e2, n6, t) {
    let r3 = null;
    return L3(n6) && n6.length ? n6.forEach((o5) => {
      r3 || F2(o5) || (r3 = U4("UNSUPPORTED_CHAINS", `${t}, chain ${o5} should be a string and conform to "namespace:chainId" format`));
    }) : F2(e2) || (r3 = U4("UNSUPPORTED_CHAINS", `${t}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)), r3;
  }
  function Fn4(e2, n6, t) {
    let r3 = null;
    return Object.entries(e2).forEach(([o5, s3]) => {
      if (r3) return;
      const i5 = Ln3(o5, W5(o5, s3), `${n6} ${t}`);
      i5 && (r3 = i5);
    }), r3;
  }
  function qn3(e2, n6) {
    let t = null;
    return L3(e2) ? e2.forEach((r3) => {
      t || Kn3(r3) || (t = U4("UNSUPPORTED_ACCOUNTS", `${n6}, account ${r3} should be a string and conform to "namespace:chainId:address" format`));
    }) : t = U4("UNSUPPORTED_ACCOUNTS", `${n6}, accounts should be an array of strings conforming to "namespace:chainId:address" format`), t;
  }
  function Bn3(e2, n6) {
    let t = null;
    return Object.values(e2).forEach((r3) => {
      if (t) return;
      const o5 = qn3(r3?.accounts, `${n6} namespace`);
      o5 && (t = o5);
    }), t;
  }
  function Hn3(e2, n6) {
    let t = null;
    return Se5(e2?.methods) ? Se5(e2?.events) || (t = U4("UNSUPPORTED_EVENTS", `${n6}, events should be an array of strings or empty array for no events`)) : t = U4("UNSUPPORTED_METHODS", `${n6}, methods should be an array of strings or empty array for no methods`), t;
  }
  function $e3(e2, n6) {
    let t = null;
    return Object.values(e2).forEach((r3) => {
      if (t) return;
      const o5 = Hn3(r3, `${n6}, namespace`);
      o5 && (t = o5);
    }), t;
  }
  function Xr3(e2, n6, t) {
    let r3 = null;
    if (e2 && Z2(e2)) {
      const o5 = $e3(e2, n6);
      o5 && (r3 = o5);
      const s3 = Fn4(e2, n6, t);
      s3 && (r3 = s3);
    } else r3 = S4("MISSING_OR_INVALID", `${n6}, ${t} should be an object with data`);
    return r3;
  }
  function Wn3(e2, n6) {
    let t = null;
    if (e2 && Z2(e2)) {
      const r3 = $e3(e2, n6);
      r3 && (t = r3);
      const o5 = Bn3(e2, n6);
      o5 && (t = o5);
    } else t = S4("MISSING_OR_INVALID", `${n6}, namespaces should be an object with data`);
    return t;
  }
  function Jn2(e2) {
    return b5(e2.protocol, true);
  }
  function eo2(e2, n6) {
    let t = false;
    return n6 && !e2 ? t = true : e2 && L3(e2) && e2.length && e2.forEach((r3) => {
      t = Jn2(r3);
    }), t;
  }
  function no2(e2) {
    return typeof e2 == "number";
  }
  function to2(e2) {
    return typeof e2 < "u" && typeof e2 !== null;
  }
  function ro2(e2) {
    return !(!e2 || typeof e2 != "object" || !e2.code || !X2(e2.code, false) || !e2.message || !b5(e2.message, false));
  }
  function oo2(e2) {
    return !(I3(e2) || !b5(e2.method, false));
  }
  function so2(e2) {
    return !(I3(e2) || I3(e2.result) && I3(e2.error) || !X2(e2.id, false) || !b5(e2.jsonrpc, false));
  }
  function io2(e2) {
    return !(I3(e2) || !b5(e2.name, false));
  }
  function co2(e2, n6) {
    return !(!F2(n6) || !Un2(e2).includes(n6));
  }
  function ao2(e2, n6, t) {
    return b5(t, false) ? _n2(e2, n6).includes(t) : false;
  }
  function uo3(e2, n6, t) {
    return b5(t, false) ? kn3(e2, n6).includes(t) : false;
  }
  function zn2(e2, n6, t) {
    let r3 = null;
    const o5 = lo3(e2), s3 = fo3(n6), i5 = Object.keys(o5), u4 = Object.keys(s3), l6 = Gn2(Object.keys(e2)), c7 = Gn2(Object.keys(n6)), d6 = l6.filter((a5) => !c7.includes(a5));
    return d6.length && (r3 = S4("NON_CONFORMING_NAMESPACES", `${t} namespaces keys don't satisfy requiredNamespaces.
      Required: ${d6.toString()}
      Received: ${Object.keys(n6).toString()}`)), $3(i5, u4) || (r3 = S4("NON_CONFORMING_NAMESPACES", `${t} namespaces chains don't satisfy required namespaces.
      Required: ${i5.toString()}
      Approved: ${u4.toString()}`)), Object.keys(n6).forEach((a5) => {
      if (!a5.includes(":") || r3) return;
      const f7 = C6(n6[a5].accounts);
      f7.includes(a5) || (r3 = S4("NON_CONFORMING_NAMESPACES", `${t} namespaces accounts don't satisfy namespace accounts for ${a5}
        Required: ${a5}
        Approved: ${f7.toString()}`));
    }), i5.forEach((a5) => {
      r3 || ($3(o5[a5].methods, s3[a5].methods) ? $3(o5[a5].events, s3[a5].events) || (r3 = S4("NON_CONFORMING_NAMESPACES", `${t} namespaces events don't satisfy namespace events for ${a5}`)) : r3 = S4("NON_CONFORMING_NAMESPACES", `${t} namespaces methods don't satisfy namespace methods for ${a5}`));
    }), r3;
  }
  function lo3(e2) {
    const n6 = {};
    return Object.keys(e2).forEach((t) => {
      var r3;
      t.includes(":") ? n6[t] = e2[t] : (r3 = e2[t].chains) == null || r3.forEach((o5) => {
        n6[o5] = { methods: e2[t].methods, events: e2[t].events };
      });
    }), n6;
  }
  function Gn2(e2) {
    return [...new Set(e2.map((n6) => n6.includes(":") ? n6.split(":")[0] : n6))];
  }
  function fo3(e2) {
    const n6 = {};
    return Object.keys(e2).forEach((t) => {
      if (t.includes(":")) n6[t] = e2[t];
      else {
        const r3 = C6(e2[t].accounts);
        r3?.forEach((o5) => {
          n6[o5] = { accounts: e2[t].accounts.filter((s3) => s3.includes(`${o5}:`)), methods: e2[t].methods, events: e2[t].events };
        });
      }
    }), n6;
  }
  function po2(e2, n6) {
    return X2(e2, false) && e2 <= n6.max && e2 >= n6.min;
  }
  function mo2() {
    const e2 = P5();
    return new Promise((n6) => {
      switch (e2) {
        case y7.browser:
          n6(Yn3());
          break;
        case y7.reactNative:
          n6(Qn3());
          break;
        case y7.node:
          n6(Zn2());
          break;
        default:
          n6(true);
      }
    });
  }
  function Yn3() {
    return V3() && navigator?.onLine;
  }
  async function Qn3() {
    if (_4() && typeof global < "u" && global != null && global.NetInfo) {
      const e2 = await (global == null ? void 0 : global.NetInfo.fetch());
      return e2?.isConnected;
    }
    return true;
  }
  function Zn2() {
    return true;
  }
  function ho2(e2) {
    switch (P5()) {
      case y7.browser:
        Xn3(e2);
        break;
      case y7.reactNative:
        et2(e2);
        break;
      case y7.node:
        break;
    }
  }
  function Xn3(e2) {
    !_4() && V3() && (window.addEventListener("online", () => e2(true)), window.addEventListener("offline", () => e2(false)));
  }
  function et2(e2) {
    _4() && typeof global < "u" && global != null && global.NetInfo && global?.NetInfo.addEventListener((n6) => e2(n6?.isConnected));
  }
  var Re4 = {};
  var yo2 = class {
    static get(n6) {
      return Re4[n6];
    }
    static set(n6, t) {
      Re4[n6] = t;
    }
    static delete(n6) {
      delete Re4[n6];
    }
  };

  // ../../node_modules/.pnpm/@walletconnect+auth-client@_379bd4beda0451b726a8e6585ec292f1/node_modules/@walletconnect/auth-client/dist/index.es.js
  var import_time7 = __toESM(require_cjs());

  // ../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib.esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib.esm/message.js
  init_node_compat_inject();
  var messagePrefix2 = "Ethereum Signed Message:\n";
  function hashMessage3(message) {
    if (typeof message === "string") {
      message = toUtf8Bytes(message);
    }
    return keccak2563(concat4([
      toUtf8Bytes(messagePrefix2),
      toUtf8Bytes(String(message.length)),
      message
    ]));
  }

  // ../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib.esm/index.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib.esm/_version.js
  init_node_compat_inject();
  var version15 = "transactions/5.8.0";

  // ../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib.esm/index.js
  var logger8 = new Logger(version15);
  var TransactionTypes2;
  (function(TransactionTypes3) {
    TransactionTypes3[TransactionTypes3["legacy"] = 0] = "legacy";
    TransactionTypes3[TransactionTypes3["eip2930"] = 1] = "eip2930";
    TransactionTypes3[TransactionTypes3["eip1559"] = 2] = "eip1559";
  })(TransactionTypes2 || (TransactionTypes2 = {}));
  function computeAddress2(key2) {
    const publicKey3 = computePublicKey(key2);
    return getAddress2(hexDataSlice(keccak2563(hexDataSlice(publicKey3, 1)), 12));
  }
  function recoverAddress4(digest2, signature2) {
    return computeAddress2(recoverPublicKey3(arrayify(digest2), signature2));
  }

  // ../../node_modules/.pnpm/@walletconnect+auth-client@_379bd4beda0451b726a8e6585ec292f1/node_modules/@walletconnect/auth-client/dist/index.es.js
  var import_isomorphic_unfetch = __toESM(require_browser7());
  var import_random3 = __toESM(require_random());
  var import_sha2568 = __toESM(require_sha2564());
  var G5 = class {
    constructor(t) {
      this.client = t;
    }
  };
  var H5 = class {
    constructor(t) {
      this.opts = t;
    }
  };
  var Y4 = "https://rpc.walletconnect.com/v1";
  var R4 = { wc_authRequest: { req: { ttl: import_time7.ONE_DAY, prompt: true, tag: 3e3 }, res: { ttl: import_time7.ONE_DAY, prompt: false, tag: 3001 } } };
  var U5 = { min: import_time7.FIVE_MINUTES, max: import_time7.SEVEN_DAYS };
  var $4 = "wc";
  var Q5 = 1;
  var Z3 = "auth";
  var B4 = "authClient";
  var F3 = `${$4}@${1}:${Z3}:`;
  var x8 = `${F3}:PUB_KEY`;
  function z7(r3) {
    return r3?.split(":");
  }
  function Ze2(r3) {
    const t = r3 && z7(r3);
    if (t) return t[3];
  }
  function We4(r3) {
    const t = r3 && z7(r3);
    if (t) return t[2] + ":" + t[3];
  }
  function W6(r3) {
    const t = r3 && z7(r3);
    if (t) return t.pop();
  }
  async function et3(r3, t, e2, i5, n6) {
    switch (e2.t) {
      case "eip191":
        return tt(r3, t, e2.s);
      case "eip1271":
        return await rt2(r3, t, e2.s, i5, n6);
      default:
        throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${e2.t}`);
    }
  }
  function tt(r3, t, e2) {
    return recoverAddress4(hashMessage3(t), e2).toLowerCase() === r3.toLowerCase();
  }
  async function rt2(r3, t, e2, i5, n6) {
    try {
      const s3 = "0x1626ba7e", o5 = "0000000000000000000000000000000000000000000000000000000000000040", u4 = "0000000000000000000000000000000000000000000000000000000000000041", a5 = e2.substring(2), c7 = hashMessage3(t).substring(2), h8 = s3 + c7 + o5 + u4 + a5, f7 = await (0, import_isomorphic_unfetch.default)(`${Y4}/?chainId=${i5}&projectId=${n6}`, { method: "POST", body: JSON.stringify({ id: it4(), jsonrpc: "2.0", method: "eth_call", params: [{ to: r3, data: h8 }, "latest"] }) }), { result: p7 } = await f7.json();
      return p7 ? p7.slice(0, s3.length).toLowerCase() === s3.toLowerCase() : false;
    } catch (s3) {
      return console.error("isValidEip1271Signature: ", s3), false;
    }
  }
  function it4() {
    return Date.now() + Math.floor(Math.random() * 1e3);
  }
  function ee5(r3) {
    return r3.getAll().filter((t) => "requester" in t);
  }
  function te5(r3, t) {
    return ee5(r3).find((e2) => e2.id === t);
  }
  function nt2(r3) {
    const t = Gr2(r3.aud), e2 = new RegExp(`${r3.domain}`).test(r3.aud), i5 = !!r3.nonce, n6 = r3.type ? r3.type === "eip4361" : true, s3 = r3.expiry;
    if (s3 && !po2(s3, U5)) {
      const { message: o5 } = S4("MISSING_OR_INVALID", `request() expiry: ${s3}. Expiry must be a number (in seconds) between ${U5.min} and ${U5.max}`);
      throw new Error(o5);
    }
    return !!(t && e2 && i5 && n6);
  }
  function st2(r3, t) {
    return !!te5(t, r3.id);
  }
  function ot(r3 = 0) {
    return globalThis.Buffer != null && globalThis.Buffer.allocUnsafe != null ? globalThis.Buffer.allocUnsafe(r3) : new Uint8Array(r3);
  }
  function ut4(r3, t) {
    if (r3.length >= 255) throw new TypeError("Alphabet too long");
    for (var e2 = new Uint8Array(256), i5 = 0; i5 < e2.length; i5++) e2[i5] = 255;
    for (var n6 = 0; n6 < r3.length; n6++) {
      var s3 = r3.charAt(n6), o5 = s3.charCodeAt(0);
      if (e2[o5] !== 255) throw new TypeError(s3 + " is ambiguous");
      e2[o5] = n6;
    }
    var u4 = r3.length, a5 = r3.charAt(0), c7 = Math.log(u4) / Math.log(256), h8 = Math.log(256) / Math.log(u4);
    function f7(D7) {
      if (D7 instanceof Uint8Array || (ArrayBuffer.isView(D7) ? D7 = new Uint8Array(D7.buffer, D7.byteOffset, D7.byteLength) : Array.isArray(D7) && (D7 = Uint8Array.from(D7))), !(D7 instanceof Uint8Array)) throw new TypeError("Expected Uint8Array");
      if (D7.length === 0) return "";
      for (var l6 = 0, m3 = 0, E6 = 0, y11 = D7.length; E6 !== y11 && D7[E6] === 0; ) E6++, l6++;
      for (var w7 = (y11 - E6) * h8 + 1 >>> 0, g8 = new Uint8Array(w7); E6 !== y11; ) {
        for (var C9 = D7[E6], _6 = 0, b9 = w7 - 1; (C9 !== 0 || _6 < m3) && b9 !== -1; b9--, _6++) C9 += 256 * g8[b9] >>> 0, g8[b9] = C9 % u4 >>> 0, C9 = C9 / u4 >>> 0;
        if (C9 !== 0) throw new Error("Non-zero carry");
        m3 = _6, E6++;
      }
      for (var v13 = w7 - m3; v13 !== w7 && g8[v13] === 0; ) v13++;
      for (var q7 = a5.repeat(l6); v13 < w7; ++v13) q7 += r3.charAt(g8[v13]);
      return q7;
    }
    function p7(D7) {
      if (typeof D7 != "string") throw new TypeError("Expected String");
      if (D7.length === 0) return new Uint8Array();
      var l6 = 0;
      if (D7[l6] !== " ") {
        for (var m3 = 0, E6 = 0; D7[l6] === a5; ) m3++, l6++;
        for (var y11 = (D7.length - l6) * c7 + 1 >>> 0, w7 = new Uint8Array(y11); D7[l6]; ) {
          var g8 = e2[D7.charCodeAt(l6)];
          if (g8 === 255) return;
          for (var C9 = 0, _6 = y11 - 1; (g8 !== 0 || C9 < E6) && _6 !== -1; _6--, C9++) g8 += u4 * w7[_6] >>> 0, w7[_6] = g8 % 256 >>> 0, g8 = g8 / 256 >>> 0;
          if (g8 !== 0) throw new Error("Non-zero carry");
          E6 = C9, l6++;
        }
        if (D7[l6] !== " ") {
          for (var b9 = y11 - E6; b9 !== y11 && w7[b9] === 0; ) b9++;
          for (var v13 = new Uint8Array(m3 + (y11 - b9)), q7 = m3; b9 !== y11; ) v13[q7++] = w7[b9++];
          return v13;
        }
      }
    }
    function A7(D7) {
      var l6 = p7(D7);
      if (l6) return l6;
      throw new Error(`Non-${t} character`);
    }
    return { encode: f7, decodeUnsafe: p7, decode: A7 };
  }
  var at2 = ut4;
  var Dt4 = at2;
  var re4 = (r3) => {
    if (r3 instanceof Uint8Array && r3.constructor.name === "Uint8Array") return r3;
    if (r3 instanceof ArrayBuffer) return new Uint8Array(r3);
    if (ArrayBuffer.isView(r3)) return new Uint8Array(r3.buffer, r3.byteOffset, r3.byteLength);
    throw new Error("Unknown type, must be binary type");
  };
  var ct3 = (r3) => new TextEncoder().encode(r3);
  var ht2 = (r3) => new TextDecoder().decode(r3);
  var lt3 = class {
    constructor(t, e2, i5) {
      this.name = t, this.prefix = e2, this.baseEncode = i5;
    }
    encode(t) {
      if (t instanceof Uint8Array) return `${this.prefix}${this.baseEncode(t)}`;
      throw Error("Unknown type, must be binary type");
    }
  };
  var dt3 = class {
    constructor(t, e2, i5) {
      if (this.name = t, this.prefix = e2, e2.codePointAt(0) === void 0) throw new Error("Invalid prefix character");
      this.prefixCodePoint = e2.codePointAt(0), this.baseDecode = i5;
    }
    decode(t) {
      if (typeof t == "string") {
        if (t.codePointAt(0) !== this.prefixCodePoint) throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);
        return this.baseDecode(t.slice(this.prefix.length));
      } else throw Error("Can only multibase decode strings");
    }
    or(t) {
      return ie4(this, t);
    }
  };
  var pt2 = class {
    constructor(t) {
      this.decoders = t;
    }
    or(t) {
      return ie4(this, t);
    }
    decode(t) {
      const e2 = t[0], i5 = this.decoders[e2];
      if (i5) return i5.decode(t);
      throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`);
    }
  };
  var ie4 = (r3, t) => new pt2({ ...r3.decoders || { [r3.prefix]: r3 }, ...t.decoders || { [t.prefix]: t } });
  var ft2 = class {
    constructor(t, e2, i5, n6) {
      this.name = t, this.prefix = e2, this.baseEncode = i5, this.baseDecode = n6, this.encoder = new lt3(t, e2, i5), this.decoder = new dt3(t, e2, n6);
    }
    encode(t) {
      return this.encoder.encode(t);
    }
    decode(t) {
      return this.decoder.decode(t);
    }
  };
  var O6 = ({ name: r3, prefix: t, encode: e2, decode: i5 }) => new ft2(r3, t, e2, i5);
  var T4 = ({ prefix: r3, name: t, alphabet: e2 }) => {
    const { encode: i5, decode: n6 } = Dt4(e2, t);
    return O6({ prefix: r3, name: t, encode: i5, decode: (s3) => re4(n6(s3)) });
  };
  var gt4 = (r3, t, e2, i5) => {
    const n6 = {};
    for (let h8 = 0; h8 < t.length; ++h8) n6[t[h8]] = h8;
    let s3 = r3.length;
    for (; r3[s3 - 1] === "="; ) --s3;
    const o5 = new Uint8Array(s3 * e2 / 8 | 0);
    let u4 = 0, a5 = 0, c7 = 0;
    for (let h8 = 0; h8 < s3; ++h8) {
      const f7 = n6[r3[h8]];
      if (f7 === void 0) throw new SyntaxError(`Non-${i5} character`);
      a5 = a5 << e2 | f7, u4 += e2, u4 >= 8 && (u4 -= 8, o5[c7++] = 255 & a5 >> u4);
    }
    if (u4 >= e2 || 255 & a5 << 8 - u4) throw new SyntaxError("Unexpected end of data");
    return o5;
  };
  var Et2 = (r3, t, e2) => {
    const i5 = t[t.length - 1] === "=", n6 = (1 << e2) - 1;
    let s3 = "", o5 = 0, u4 = 0;
    for (let a5 = 0; a5 < r3.length; ++a5) for (u4 = u4 << 8 | r3[a5], o5 += 8; o5 > e2; ) o5 -= e2, s3 += t[n6 & u4 >> o5];
    if (o5 && (s3 += t[n6 & u4 << e2 - o5]), i5) for (; s3.length * e2 & 7; ) s3 += "=";
    return s3;
  };
  var d4 = ({ name: r3, prefix: t, bitsPerChar: e2, alphabet: i5 }) => O6({ prefix: t, name: r3, encode(n6) {
    return Et2(n6, i5, e2);
  }, decode(n6) {
    return gt4(n6, i5, e2, r3);
  } });
  var bt3 = O6({ prefix: "\0", name: "identity", encode: (r3) => ht2(r3), decode: (r3) => ct3(r3) });
  var yt3 = Object.freeze({ __proto__: null, identity: bt3 });
  var wt2 = d4({ prefix: "0", name: "base2", alphabet: "01", bitsPerChar: 1 });
  var Ct = Object.freeze({ __proto__: null, base2: wt2 });
  var mt = d4({ prefix: "7", name: "base8", alphabet: "01234567", bitsPerChar: 3 });
  var vt3 = Object.freeze({ __proto__: null, base8: mt });
  var At2 = T4({ prefix: "9", name: "base10", alphabet: "0123456789" });
  var _t3 = Object.freeze({ __proto__: null, base10: At2 });
  var xt3 = d4({ prefix: "f", name: "base16", alphabet: "0123456789abcdef", bitsPerChar: 4 });
  var Rt3 = d4({ prefix: "F", name: "base16upper", alphabet: "0123456789ABCDEF", bitsPerChar: 4 });
  var Ft4 = Object.freeze({ __proto__: null, base16: xt3, base16upper: Rt3 });
  var Tt4 = d4({ prefix: "b", name: "base32", alphabet: "abcdefghijklmnopqrstuvwxyz234567", bitsPerChar: 5 });
  var It3 = d4({ prefix: "B", name: "base32upper", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", bitsPerChar: 5 });
  var qt4 = d4({ prefix: "c", name: "base32pad", alphabet: "abcdefghijklmnopqrstuvwxyz234567=", bitsPerChar: 5 });
  var Ut4 = d4({ prefix: "C", name: "base32padupper", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=", bitsPerChar: 5 });
  var Ot4 = d4({ prefix: "v", name: "base32hex", alphabet: "0123456789abcdefghijklmnopqrstuv", bitsPerChar: 5 });
  var St3 = d4({ prefix: "V", name: "base32hexupper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV", bitsPerChar: 5 });
  var Pt3 = d4({ prefix: "t", name: "base32hexpad", alphabet: "0123456789abcdefghijklmnopqrstuv=", bitsPerChar: 5 });
  var Nt3 = d4({ prefix: "T", name: "base32hexpadupper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV=", bitsPerChar: 5 });
  var $t5 = d4({ prefix: "h", name: "base32z", alphabet: "ybndrfg8ejkmcpqxot1uwisza345h769", bitsPerChar: 5 });
  var Bt4 = Object.freeze({ __proto__: null, base32: Tt4, base32upper: It3, base32pad: qt4, base32padupper: Ut4, base32hex: Ot4, base32hexupper: St3, base32hexpad: Pt3, base32hexpadupper: Nt3, base32z: $t5 });
  var zt5 = T4({ prefix: "k", name: "base36", alphabet: "0123456789abcdefghijklmnopqrstuvwxyz" });
  var jt3 = T4({ prefix: "K", name: "base36upper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" });
  var Mt4 = Object.freeze({ __proto__: null, base36: zt5, base36upper: jt3 });
  var Lt3 = T4({ name: "base58btc", prefix: "z", alphabet: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" });
  var Kt4 = T4({ name: "base58flickr", prefix: "Z", alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ" });
  var Vt4 = Object.freeze({ __proto__: null, base58btc: Lt3, base58flickr: Kt4 });
  var kt3 = d4({ prefix: "m", name: "base64", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", bitsPerChar: 6 });
  var Jt5 = d4({ prefix: "M", name: "base64pad", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", bitsPerChar: 6 });
  var Xt4 = d4({ prefix: "u", name: "base64url", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_", bitsPerChar: 6 });
  var Gt5 = d4({ prefix: "U", name: "base64urlpad", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=", bitsPerChar: 6 });
  var Ht4 = Object.freeze({ __proto__: null, base64: kt3, base64pad: Jt5, base64url: Xt4, base64urlpad: Gt5 });
  var ne5 = Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}");
  var Yt5 = ne5.reduce((r3, t, e2) => (r3[e2] = t, r3), []);
  var Qt4 = ne5.reduce((r3, t, e2) => (r3[t.codePointAt(0)] = e2, r3), []);
  function Zt4(r3) {
    return r3.reduce((t, e2) => (t += Yt5[e2], t), "");
  }
  function Wt5(r3) {
    const t = [];
    for (const e2 of r3) {
      const i5 = Qt4[e2.codePointAt(0)];
      if (i5 === void 0) throw new Error(`Non-base256emoji character: ${e2}`);
      t.push(i5);
    }
    return new Uint8Array(t);
  }
  var er3 = O6({ prefix: "\u{1F680}", name: "base256emoji", encode: Zt4, decode: Wt5 });
  var tr2 = Object.freeze({ __proto__: null, base256emoji: er3 });
  var rr2 = oe3;
  var se3 = 128;
  var ir3 = 127;
  var nr3 = ~ir3;
  var sr2 = Math.pow(2, 31);
  function oe3(r3, t, e2) {
    t = t || [], e2 = e2 || 0;
    for (var i5 = e2; r3 >= sr2; ) t[e2++] = r3 & 255 | se3, r3 /= 128;
    for (; r3 & nr3; ) t[e2++] = r3 & 255 | se3, r3 >>>= 7;
    return t[e2] = r3 | 0, oe3.bytes = e2 - i5 + 1, t;
  }
  var or3 = j4;
  var ur3 = 128;
  var ue3 = 127;
  function j4(r3, i5) {
    var e2 = 0, i5 = i5 || 0, n6 = 0, s3 = i5, o5, u4 = r3.length;
    do {
      if (s3 >= u4) throw j4.bytes = 0, new RangeError("Could not decode varint");
      o5 = r3[s3++], e2 += n6 < 28 ? (o5 & ue3) << n6 : (o5 & ue3) * Math.pow(2, n6), n6 += 7;
    } while (o5 >= ur3);
    return j4.bytes = s3 - i5, e2;
  }
  var ar3 = Math.pow(2, 7);
  var Dr3 = Math.pow(2, 14);
  var cr4 = Math.pow(2, 21);
  var hr3 = Math.pow(2, 28);
  var lr3 = Math.pow(2, 35);
  var dr3 = Math.pow(2, 42);
  var pr3 = Math.pow(2, 49);
  var fr3 = Math.pow(2, 56);
  var gr3 = Math.pow(2, 63);
  var Er3 = function(r3) {
    return r3 < ar3 ? 1 : r3 < Dr3 ? 2 : r3 < cr4 ? 3 : r3 < hr3 ? 4 : r3 < lr3 ? 5 : r3 < dr3 ? 6 : r3 < pr3 ? 7 : r3 < fr3 ? 8 : r3 < gr3 ? 9 : 10;
  };
  var br4 = { encode: rr2, decode: or3, encodingLength: Er3 };
  var ae4 = br4;
  var De3 = (r3, t, e2 = 0) => (ae4.encode(r3, t, e2), t);
  var ce4 = (r3) => ae4.encodingLength(r3);
  var M6 = (r3, t) => {
    const e2 = t.byteLength, i5 = ce4(r3), n6 = i5 + ce4(e2), s3 = new Uint8Array(n6 + e2);
    return De3(r3, s3, 0), De3(e2, s3, i5), s3.set(t, n6), new yr3(r3, e2, t, s3);
  };
  var yr3 = class {
    constructor(t, e2, i5, n6) {
      this.code = t, this.size = e2, this.digest = i5, this.bytes = n6;
    }
  };
  var he6 = ({ name: r3, code: t, encode: e2 }) => new wr4(r3, t, e2);
  var wr4 = class {
    constructor(t, e2, i5) {
      this.name = t, this.code = e2, this.encode = i5;
    }
    digest(t) {
      if (t instanceof Uint8Array) {
        const e2 = this.encode(t);
        return e2 instanceof Uint8Array ? M6(this.code, e2) : e2.then((i5) => M6(this.code, i5));
      } else throw Error("Unknown type, must be binary type");
    }
  };
  var le5 = (r3) => async (t) => new Uint8Array(await crypto.subtle.digest(r3, t));
  var Cr4 = he6({ name: "sha2-256", code: 18, encode: le5("SHA-256") });
  var mr3 = he6({ name: "sha2-512", code: 19, encode: le5("SHA-512") });
  var vr4 = Object.freeze({ __proto__: null, sha256: Cr4, sha512: mr3 });
  var de5 = 0;
  var Ar4 = "identity";
  var pe6 = re4;
  var _r4 = (r3) => M6(de5, pe6(r3));
  var xr4 = { code: de5, name: Ar4, encode: pe6, digest: _r4 };
  var Rr4 = Object.freeze({ __proto__: null, identity: xr4 });
  new TextEncoder(), new TextDecoder();
  var fe6 = { ...yt3, ...Ct, ...vt3, ..._t3, ...Ft4, ...Bt4, ...Mt4, ...Vt4, ...Ht4, ...tr2 };
  ({ ...vr4, ...Rr4 });
  function ge5(r3, t, e2, i5) {
    return { name: r3, prefix: t, encoder: { name: r3, prefix: t, encode: e2 }, decoder: { decode: i5 } };
  }
  var Ee5 = ge5("utf8", "u", (r3) => "u" + new TextDecoder("utf8").decode(r3), (r3) => new TextEncoder().encode(r3.substring(1)));
  var L4 = ge5("ascii", "a", (r3) => {
    let t = "a";
    for (let e2 = 0; e2 < r3.length; e2++) t += String.fromCharCode(r3[e2]);
    return t;
  }, (r3) => {
    r3 = r3.substring(1);
    const t = ot(r3.length);
    for (let e2 = 0; e2 < r3.length; e2++) t[e2] = r3.charCodeAt(e2);
    return t;
  });
  var be5 = { utf8: Ee5, "utf-8": Ee5, hex: fe6.base16, latin1: L4, ascii: L4, binary: L4, ...fe6 };
  function Fr2(r3, t = "utf8") {
    const e2 = be5[t];
    if (!e2) throw new Error(`Unsupported encoding "${t}"`);
    return (t === "utf8" || t === "utf-8") && globalThis.Buffer != null && globalThis.Buffer.from != null ? globalThis.Buffer.from(r3, "utf8") : e2.decoder.decode(`${e2.prefix}${r3}`);
  }
  function Tr4(r3, t = "utf8") {
    const e2 = be5[t];
    if (!e2) throw new Error(`Unsupported encoding "${t}"`);
    return (t === "utf8" || t === "utf-8") && globalThis.Buffer != null && globalThis.Buffer.from != null ? globalThis.Buffer.from(r3.buffer, r3.byteOffset, r3.byteLength).toString("utf8") : e2.encoder.encode(r3).substring(1);
  }
  var ye5 = "base16";
  var we5 = "utf8";
  function K5(r3) {
    const t = (0, import_sha2568.hash)(Fr2(r3, we5));
    return Tr4(t, ye5);
  }
  var Or4 = Object.defineProperty;
  var Sr4 = Object.defineProperties;
  var Pr4 = Object.getOwnPropertyDescriptors;
  var Ce6 = Object.getOwnPropertySymbols;
  var Nr4 = Object.prototype.hasOwnProperty;
  var $r4 = Object.prototype.propertyIsEnumerable;
  var me5 = (r3, t, e2) => t in r3 ? Or4(r3, t, { enumerable: true, configurable: true, writable: true, value: e2 }) : r3[t] = e2;
  var I4 = (r3, t) => {
    for (var e2 in t || (t = {})) Nr4.call(t, e2) && me5(r3, e2, t[e2]);
    if (Ce6) for (var e2 of Ce6(t)) $r4.call(t, e2) && me5(r3, e2, t[e2]);
    return r3;
  };
  var V4 = (r3, t) => Sr4(r3, Pr4(t));
  var Br3 = class extends G5 {
    constructor(t) {
      super(t), this.initialized = false, this.name = "authEngine", this.init = () => {
        this.initialized || (this.registerRelayerEvents(), this.registerPairingEvents(), this.client.core.pairing.register({ methods: Object.keys(R4) }), this.initialized = true);
      }, this.request = async (e2, i5) => {
        if (this.isInitialized(), !nt2(e2)) throw new Error("Invalid request");
        if (i5 != null && i5.topic) return await this.requestOnKnownPairing(i5.topic, e2);
        const { chainId: n6, statement: s3, aud: o5, domain: u4, nonce: a5, type: c7, exp: h8, nbf: f7 } = e2, { topic: p7, uri: A7 } = await this.client.core.pairing.create();
        this.client.logger.info({ message: "Generated new pairing", pairing: { topic: p7, uri: A7 } });
        const D7 = await this.client.core.crypto.generateKeyPair(), l6 = hr2(D7);
        await this.client.authKeys.set(x8, { responseTopic: l6, publicKey: D7 }), await this.client.pairingTopics.set(l6, { topic: l6, pairingTopic: p7 }), await this.client.core.relayer.subscribe(l6), this.client.logger.info(`sending request to new pairing topic: ${p7}`);
        const m3 = await this.sendRequest(p7, "wc_authRequest", { payloadParams: { type: c7 ?? "eip4361", chainId: n6, statement: s3, aud: o5, domain: u4, version: "1", nonce: a5, iat: (/* @__PURE__ */ new Date()).toISOString(), exp: h8, nbf: f7 }, requester: { publicKey: D7, metadata: this.client.metadata } }, {}, e2.expiry);
        return this.client.logger.info(`sent request to new pairing topic: ${p7}`), { uri: A7, id: m3 };
      }, this.respond = async (e2, i5) => {
        if (this.isInitialized(), !st2(e2, this.client.requests)) throw new Error("Invalid response");
        const n6 = te5(this.client.requests, e2.id);
        if (!n6) throw new Error(`Could not find pending auth request with id ${e2.id}`);
        const s3 = n6.requester.publicKey, o5 = await this.client.core.crypto.generateKeyPair(), u4 = hr2(s3), a5 = { type: D4, receiverPublicKey: s3, senderPublicKey: o5 };
        if ("error" in e2) {
          await this.sendError(n6.id, u4, e2, a5);
          return;
        }
        const c7 = { h: { t: "eip4361" }, p: V4(I4({}, n6.cacaoPayload), { iss: i5 }), s: e2.signature };
        await this.sendResult(n6.id, u4, c7, a5), await this.client.core.pairing.activate({ topic: n6.pairingTopic }), await this.client.requests.update(n6.id, I4({}, c7));
      }, this.getPendingRequests = () => ee5(this.client.requests), this.formatMessage = (e2, i5) => {
        this.client.logger.debug(`formatMessage, cacao is: ${JSON.stringify(e2)}`);
        const n6 = `${e2.domain} wants you to sign in with your Ethereum account:`, s3 = W6(i5), o5 = e2.statement, u4 = `URI: ${e2.aud}`, a5 = `Version: ${e2.version}`, c7 = `Chain ID: ${Ze2(i5)}`, h8 = `Nonce: ${e2.nonce}`, f7 = `Issued At: ${e2.iat}`, p7 = e2.exp ? `Expiry: ${e2.exp}` : void 0, A7 = e2.resources && e2.resources.length > 0 ? `Resources:
${e2.resources.map((D7) => `- ${D7}`).join(`
`)}` : void 0;
        return [n6, s3, "", o5, "", u4, a5, c7, h8, f7, p7, A7].filter((D7) => D7 != null).join(`
`);
      }, this.setExpiry = async (e2, i5) => {
        this.client.core.pairing.pairings.keys.includes(e2) && await this.client.core.pairing.updateExpiry({ topic: e2, expiry: i5 }), this.client.core.expirer.set(e2, i5);
      }, this.sendRequest = async (e2, i5, n6, s3, o5) => {
        const u4 = formatJsonRpcRequest(i5, n6), a5 = await this.client.core.crypto.encode(e2, u4, s3), c7 = R4[i5].req;
        if (o5 && (c7.ttl = o5), this.client.core.history.set(e2, u4), V3()) {
          const h8 = K5(JSON.stringify(u4));
          this.client.core.verify.register({ attestationId: h8 });
        }
        return await this.client.core.relayer.publish(e2, a5, V4(I4({}, c7), { internal: { throwOnFailedPublish: true } })), u4.id;
      }, this.sendResult = async (e2, i5, n6, s3) => {
        const o5 = formatJsonRpcResult(e2, n6), u4 = await this.client.core.crypto.encode(i5, o5, s3), a5 = await this.client.core.history.get(i5, e2), c7 = R4[a5.request.method].res;
        return await this.client.core.relayer.publish(i5, u4, V4(I4({}, c7), { internal: { throwOnFailedPublish: true } })), await this.client.core.history.resolve(o5), o5.id;
      }, this.sendError = async (e2, i5, n6, s3) => {
        const o5 = formatJsonRpcError(e2, n6.error), u4 = await this.client.core.crypto.encode(i5, o5, s3), a5 = await this.client.core.history.get(i5, e2), c7 = R4[a5.request.method].res;
        return await this.client.core.relayer.publish(i5, u4, c7), await this.client.core.history.resolve(o5), o5.id;
      }, this.requestOnKnownPairing = async (e2, i5) => {
        const n6 = this.client.core.pairing.pairings.getAll({ active: true }).find((A7) => A7.topic === e2);
        if (!n6) throw new Error(`Could not find pairing for provided topic ${e2}`);
        const { publicKey: s3 } = this.client.authKeys.get(x8), { chainId: o5, statement: u4, aud: a5, domain: c7, nonce: h8, type: f7 } = i5, p7 = await this.sendRequest(n6.topic, "wc_authRequest", { payloadParams: { type: f7 ?? "eip4361", chainId: o5, statement: u4, aud: a5, domain: c7, version: "1", nonce: h8, iat: (/* @__PURE__ */ new Date()).toISOString() }, requester: { publicKey: s3, metadata: this.client.metadata } }, {}, i5.expiry);
        return this.client.logger.info(`sent request to known pairing topic: ${n6.topic}`), { id: p7 };
      }, this.onPairingCreated = (e2) => {
        const i5 = this.getPendingRequests();
        if (i5) {
          const n6 = Object.values(i5).find((s3) => s3.pairingTopic === e2.topic);
          n6 && this.handleAuthRequest(n6);
        }
      }, this.onRelayEventRequest = (e2) => {
        const { topic: i5, payload: n6 } = e2, s3 = n6.method;
        switch (s3) {
          case "wc_authRequest":
            return this.onAuthRequest(i5, n6);
          default:
            return this.client.logger.info(`Unsupported request method ${s3}`);
        }
      }, this.onRelayEventResponse = async (e2) => {
        const { topic: i5, payload: n6 } = e2, s3 = (await this.client.core.history.get(i5, n6.id)).request.method;
        switch (s3) {
          case "wc_authRequest":
            return this.onAuthResponse(i5, n6);
          default:
            return this.client.logger.info(`Unsupported response method ${s3}`);
        }
      }, this.onAuthRequest = async (e2, i5) => {
        const { requester: n6, payloadParams: s3 } = i5.params;
        this.client.logger.info({ type: "onAuthRequest", topic: e2, payload: i5 });
        const o5 = K5(JSON.stringify(i5)), u4 = await this.getVerifyContext(o5, this.client.metadata), a5 = { requester: n6, pairingTopic: e2, id: i5.id, cacaoPayload: s3, verifyContext: u4 };
        await this.client.requests.set(i5.id, a5), this.handleAuthRequest(a5);
      }, this.handleAuthRequest = async (e2) => {
        const { id: i5, pairingTopic: n6, requester: s3, cacaoPayload: o5, verifyContext: u4 } = e2;
        try {
          this.client.emit("auth_request", { id: i5, topic: n6, params: { requester: s3, cacaoPayload: o5 }, verifyContext: u4 });
        } catch (a5) {
          await this.sendError(e2.id, e2.pairingTopic, a5), this.client.logger.error(a5);
        }
      }, this.onAuthResponse = async (e2, i5) => {
        const { id: n6 } = i5;
        if (this.client.logger.info({ type: "onAuthResponse", topic: e2, response: i5 }), isJsonRpcResult(i5)) {
          const { pairingTopic: s3 } = this.client.pairingTopics.get(e2);
          await this.client.core.pairing.activate({ topic: s3 });
          const { s: o5, p: u4 } = i5.result;
          await this.client.requests.set(n6, I4({ id: n6, pairingTopic: s3 }, i5.result));
          const a5 = this.formatMessage(u4, u4.iss);
          this.client.logger.debug(`reconstructed message:
`, JSON.stringify(a5)), this.client.logger.debug("payload.iss:", u4.iss), this.client.logger.debug("signature:", o5);
          const c7 = W6(u4.iss), h8 = We4(u4.iss);
          if (!c7) throw new Error("Could not derive address from `payload.iss`");
          if (!h8) throw new Error("Could not derive chainId from `payload.iss`");
          this.client.logger.debug("walletAddress extracted from `payload.iss`:", c7), await et3(c7, a5, o5, h8, this.client.projectId) ? this.client.emit("auth_response", { id: n6, topic: e2, params: i5 }) : this.client.emit("auth_response", { id: n6, topic: e2, params: { message: "Invalid signature", code: -1 } });
        } else isJsonRpcError(i5) && this.client.emit("auth_response", { id: n6, topic: e2, params: i5 });
      }, this.getVerifyContext = async (e2, i5) => {
        const n6 = { verified: { verifyUrl: i5.verifyUrl || "", validation: "UNKNOWN", origin: i5.url || "" } };
        try {
          const s3 = await this.client.core.verify.resolve({ attestationId: e2, verifyUrl: i5.verifyUrl });
          s3 && (n6.verified.origin = s3.origin, n6.verified.isScam = s3.isScam, n6.verified.validation = origin === new URL(i5.url).origin ? "VALID" : "INVALID");
        } catch (s3) {
          this.client.logger.error(s3);
        }
        return this.client.logger.info(`Verify context: ${JSON.stringify(n6)}`), n6;
      };
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: t } = S4("NOT_INITIALIZED", this.name);
        throw new Error(t);
      }
    }
    registerRelayerEvents() {
      this.client.core.relayer.on(p3.message, async (t) => {
        const { topic: e2, message: i5 } = t, { responseTopic: n6, publicKey: s3 } = this.client.authKeys.keys.includes(x8) ? this.client.authKeys.get(x8) : { responseTopic: void 0, publicKey: void 0 };
        if (n6 && e2 !== n6) {
          this.client.logger.debug("[Auth] Ignoring message from unknown topic", e2);
          return;
        }
        const o5 = await this.client.core.crypto.decode(e2, i5, { receiverPublicKey: s3 });
        isJsonRpcRequest(o5) ? (this.client.core.history.set(e2, o5), this.onRelayEventRequest({ topic: e2, payload: o5 })) : isJsonRpcResponse(o5) && (await this.client.core.history.resolve(o5), this.onRelayEventResponse({ topic: e2, payload: o5 }));
      });
    }
    registerPairingEvents() {
      this.client.core.pairing.events.on(q3.create, (t) => this.onPairingCreated(t));
    }
  };
  var S5 = class _S extends H5 {
    constructor(t) {
      super(t), this.protocol = $4, this.version = Q5, this.name = B4, this.events = new import_events8.EventEmitter(), this.emit = (i5, n6) => this.events.emit(i5, n6), this.on = (i5, n6) => this.events.on(i5, n6), this.once = (i5, n6) => this.events.once(i5, n6), this.off = (i5, n6) => this.events.off(i5, n6), this.removeListener = (i5, n6) => this.events.removeListener(i5, n6), this.request = async (i5, n6) => {
        try {
          return await this.engine.request(i5, n6);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.respond = async (i5, n6) => {
        try {
          return await this.engine.respond(i5, n6);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.getPendingRequests = () => {
        try {
          return this.engine.getPendingRequests();
        } catch (i5) {
          throw this.logger.error(i5.message), i5;
        }
      }, this.formatMessage = (i5, n6) => {
        try {
          return this.engine.formatMessage(i5, n6);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      };
      const e2 = typeof t.logger < "u" && typeof t.logger != "string" ? t.logger : (0, import_pino2.default)(k4({ level: t.logger || "error" }));
      this.name = t?.name || B4, this.metadata = t.metadata, this.projectId = t.projectId, this.core = t.core || new Ji(t), this.logger = E4(e2, this.name), this.authKeys = new ve4(this.core, this.logger, "authKeys", F3, () => x8), this.pairingTopics = new ve4(this.core, this.logger, "pairingTopics", F3), this.requests = new ve4(this.core, this.logger, "requests", F3, (i5) => i5.id), this.engine = new Br3(this);
    }
    static async init(t) {
      const e2 = new _S(t);
      return await e2.initialize(), e2;
    }
    get context() {
      return y6(this.logger);
    }
    async initialize() {
      this.logger.trace("Initialized");
      try {
        await this.core.start(), await this.authKeys.init(), await this.requests.init(), await this.pairingTopics.init(), await this.engine.init(), this.logger.info("AuthClient Initialization Success"), this.logger.info({ authClient: this });
      } catch (t) {
        throw this.logger.info("AuthClient Initialization Failure"), this.logger.error(t.message), t;
      }
    }
  };
  var zr3 = S5;

  // ../../node_modules/.pnpm/@walletconnect+sign-client@2.17.1_bufferutil@4.1.0/node_modules/@walletconnect/sign-client/dist/index.es.js
  init_node_compat_inject();

  // ../../node_modules/.pnpm/@walletconnect+core@2.17.1_bufferutil@4.1.0/node_modules/@walletconnect/core/dist/index.es.js
  init_node_compat_inject();
  var import_events12 = __toESM(require_events());

  // ../../node_modules/.pnpm/@walletconnect+types@2.17.1/node_modules/@walletconnect/types/dist/index.es.js
  init_node_compat_inject();
  var import_events10 = __toESM(require_events());
  var n5 = class extends IEvents {
    constructor(s3) {
      super(), this.opts = s3, this.protocol = "wc", this.version = 2;
    }
  };
  var h6 = class extends IEvents {
    constructor(s3, t) {
      super(), this.core = s3, this.logger = t, this.records = /* @__PURE__ */ new Map();
    }
  };
  var a3 = class {
    constructor(s3, t) {
      this.logger = s3, this.core = t;
    }
  };
  var g6 = class extends IEvents {
    constructor(s3, t) {
      super(), this.relayer = s3, this.logger = t;
    }
  };
  var u2 = class extends IEvents {
    constructor(s3) {
      super();
    }
  };
  var p5 = class {
    constructor(s3, t, e2, f7) {
      this.core = s3, this.logger = t, this.name = e2;
    }
  };
  var d5 = class extends IEvents {
    constructor(s3, t) {
      super(), this.relayer = s3, this.logger = t;
    }
  };
  var x9 = class extends IEvents {
    constructor(s3, t) {
      super(), this.core = s3, this.logger = t;
    }
  };
  var y8 = class {
    constructor(s3, t, e2) {
      this.core = s3, this.logger = t, this.store = e2;
    }
  };
  var v9 = class {
    constructor(s3, t) {
      this.projectId = s3, this.logger = t;
    }
  };
  var C7 = class {
    constructor(s3, t, e2) {
      this.core = s3, this.logger = t, this.telemetryEnabled = e2;
    }
  };
  var S6 = class {
    constructor(s3) {
      this.opts = s3, this.protocol = "wc", this.version = 2;
    }
  };
  var M7 = class {
    constructor(s3) {
      this.client = s3;
    }
  };

  // ../../node_modules/.pnpm/@walletconnect+core@2.17.1_bufferutil@4.1.0/node_modules/@walletconnect/core/dist/index.es.js
  var import_time8 = __toESM(require_cjs());

  // ../../node_modules/.pnpm/@walletconnect+jsonrpc-ws-connection@1.0.14_bufferutil@4.1.0/node_modules/@walletconnect/jsonrpc-ws-connection/dist/index.es.js
  init_node_compat_inject();
  var import_events11 = __toESM(require_events());
  var w4 = () => typeof WebSocket < "u" ? WebSocket : typeof global < "u" && typeof global.WebSocket < "u" ? global.WebSocket : typeof window < "u" && typeof window.WebSocket < "u" ? window.WebSocket : typeof self < "u" && typeof self.WebSocket < "u" ? self.WebSocket : require_browser4();
  var b6 = () => typeof WebSocket < "u" || typeof global < "u" && typeof global.WebSocket < "u" || typeof window < "u" && typeof window.WebSocket < "u" || typeof self < "u" && typeof self.WebSocket < "u";
  var a4 = (c7) => c7.split("?")[0];
  var h7 = 10;
  var S7 = w4();
  var f4 = class {
    constructor(e2) {
      if (this.url = e2, this.events = new import_events11.EventEmitter(), this.registering = false, !isWsUrl(e2)) throw new Error(`Provided URL is not compatible with WebSocket connection: ${e2}`);
      this.url = e2;
    }
    get connected() {
      return typeof this.socket < "u";
    }
    get connecting() {
      return this.registering;
    }
    on(e2, t) {
      this.events.on(e2, t);
    }
    once(e2, t) {
      this.events.once(e2, t);
    }
    off(e2, t) {
      this.events.off(e2, t);
    }
    removeListener(e2, t) {
      this.events.removeListener(e2, t);
    }
    async open(e2 = this.url) {
      await this.register(e2);
    }
    async close() {
      return new Promise((e2, t) => {
        if (typeof this.socket > "u") {
          t(new Error("Connection already closed"));
          return;
        }
        this.socket.onclose = (n6) => {
          this.onClose(n6), e2();
        }, this.socket.close();
      });
    }
    async send(e2) {
      typeof this.socket > "u" && (this.socket = await this.register());
      try {
        this.socket.send(safeJsonStringify(e2));
      } catch (t) {
        this.onError(e2.id, t);
      }
    }
    register(e2 = this.url) {
      if (!isWsUrl(e2)) throw new Error(`Provided URL is not compatible with WebSocket connection: ${e2}`);
      if (this.registering) {
        const t = this.events.getMaxListeners();
        return (this.events.listenerCount("register_error") >= t || this.events.listenerCount("open") >= t) && this.events.setMaxListeners(t + 1), new Promise((n6, o5) => {
          this.events.once("register_error", (s3) => {
            this.resetMaxListeners(), o5(s3);
          }), this.events.once("open", () => {
            if (this.resetMaxListeners(), typeof this.socket > "u") return o5(new Error("WebSocket connection is missing or invalid"));
            n6(this.socket);
          });
        });
      }
      return this.url = e2, this.registering = true, new Promise((t, n6) => {
        const o5 = new URLSearchParams(e2).get("origin"), s3 = (0, esm_exports.isReactNative)() ? { headers: { origin: o5 } } : { rejectUnauthorized: !isLocalhostUrl(e2) }, i5 = new S7(e2, [], s3);
        b6() ? i5.onerror = (r3) => {
          const l6 = r3;
          n6(this.emitError(l6.error));
        } : i5.on("error", (r3) => {
          n6(this.emitError(r3));
        }), i5.onopen = () => {
          this.onOpen(i5), t(i5);
        };
      });
    }
    onOpen(e2) {
      e2.onmessage = (t) => this.onPayload(t), e2.onclose = (t) => this.onClose(t), this.socket = e2, this.registering = false, this.events.emit("open");
    }
    onClose(e2) {
      this.socket = void 0, this.registering = false, this.events.emit("close", e2);
    }
    onPayload(e2) {
      if (typeof e2.data > "u") return;
      const t = typeof e2.data == "string" ? safeJsonParse(e2.data) : e2.data;
      this.events.emit("payload", t);
    }
    onError(e2, t) {
      const n6 = this.parseError(t), o5 = n6.message || n6.toString(), s3 = formatJsonRpcError(e2, o5);
      this.events.emit("payload", s3);
    }
    parseError(e2, t = this.url) {
      return parseConnectionError(e2, a4(t), "WS");
    }
    resetMaxListeners() {
      this.events.getMaxListeners() > h7 && this.events.setMaxListeners(h7);
    }
    emitError(e2) {
      const t = this.parseError(new Error(e2?.message || `WebSocket connection failed for host: ${a4(this.url)}`));
      return this.events.emit("register_error", t), t;
    }
  };

  // ../../node_modules/.pnpm/@walletconnect+core@2.17.1_bufferutil@4.1.0/node_modules/@walletconnect/core/dist/index.es.js
  var import_lodash = __toESM(require_lodash());
  var import_window_getters4 = __toESM(require_cjs2());
  var ye6 = "wc";
  var De4 = 2;
  var ie5 = "core";
  var x10 = `${ye6}@2:${ie5}:`;
  var Ye4 = { name: ie5, logger: "error" };
  var Je5 = { database: ":memory:" };
  var Xe4 = "crypto";
  var me6 = "client_ed25519_seed";
  var We5 = import_time8.ONE_DAY;
  var Ze3 = "keychain";
  var Qe2 = "0.3";
  var et4 = "messages";
  var tt2 = "0.3";
  var it5 = import_time8.SIX_HOURS;
  var st3 = "publisher";
  var rt3 = "irn";
  var nt3 = "error";
  var be6 = "wss://relay.walletconnect.org";
  var ot2 = "relayer";
  var v10 = { message: "relayer_message", message_ack: "relayer_message_ack", connect: "relayer_connect", disconnect: "relayer_disconnect", error: "relayer_error", connection_stalled: "relayer_connection_stalled", transport_closed: "relayer_transport_closed", publish: "relayer_publish" };
  var at3 = "_subscription";
  var I5 = { payload: "payload", connect: "connect", disconnect: "disconnect", error: "error" };
  var ht3 = 0.1;
  var se4 = "2.17.1";
  var M8 = { link_mode: "link_mode", relay: "relay" };
  var ct4 = "0.3";
  var lt4 = "WALLETCONNECT_CLIENT_ID";
  var fe7 = "WALLETCONNECT_LINK_MODE_APPS";
  var O7 = { created: "subscription_created", deleted: "subscription_deleted", expired: "subscription_expired", disabled: "subscription_disabled", sync: "subscription_sync", resubscribed: "subscription_resubscribed" };
  var ut5 = "subscription";
  var dt4 = "0.3";
  var pt3 = import_time8.FIVE_SECONDS * 1e3;
  var gt5 = "pairing";
  var yt4 = "0.3";
  var B5 = { wc_pairingDelete: { req: { ttl: import_time8.ONE_DAY, prompt: false, tag: 1e3 }, res: { ttl: import_time8.ONE_DAY, prompt: false, tag: 1001 } }, wc_pairingPing: { req: { ttl: import_time8.THIRTY_SECONDS, prompt: false, tag: 1002 }, res: { ttl: import_time8.THIRTY_SECONDS, prompt: false, tag: 1003 } }, unregistered_method: { req: { ttl: import_time8.ONE_DAY, prompt: false, tag: 0 }, res: { ttl: import_time8.ONE_DAY, prompt: false, tag: 0 } } };
  var V5 = { create: "pairing_create", expire: "pairing_expire", delete: "pairing_delete", ping: "pairing_ping" };
  var P6 = { created: "history_created", updated: "history_updated", deleted: "history_deleted", sync: "history_sync" };
  var Dt5 = "history";
  var mt2 = "0.3";
  var bt4 = "expirer";
  var S8 = { created: "expirer_created", deleted: "expirer_deleted", expired: "expirer_expired", sync: "expirer_sync" };
  var ft3 = "0.3";
  var _t4 = "verify-api";
  var vs = "https://verify.walletconnect.com";
  var Et3 = "https://verify.walletconnect.org";
  var J4 = Et3;
  var vt4 = `${J4}/v3`;
  var wt3 = [vs, Et3];
  var It4 = "echo";
  var Tt5 = "https://echo.walletconnect.com";
  var z8 = { pairing_started: "pairing_started", pairing_uri_validation_success: "pairing_uri_validation_success", pairing_uri_not_expired: "pairing_uri_not_expired", store_new_pairing: "store_new_pairing", subscribing_pairing_topic: "subscribing_pairing_topic", subscribe_pairing_topic_success: "subscribe_pairing_topic_success", existing_pairing: "existing_pairing", pairing_not_expired: "pairing_not_expired", emit_inactive_pairing: "emit_inactive_pairing", emit_session_proposal: "emit_session_proposal", subscribing_to_pairing_topic: "subscribing_to_pairing_topic" };
  var $5 = { no_wss_connection: "no_wss_connection", no_internet_connection: "no_internet_connection", malformed_pairing_uri: "malformed_pairing_uri", active_pairing_already_exists: "active_pairing_already_exists", subscribe_pairing_topic_failure: "subscribe_pairing_topic_failure", pairing_expired: "pairing_expired", proposal_expired: "proposal_expired", proposal_listener_not_found: "proposal_listener_not_found" };
  var Is = { session_approve_started: "session_approve_started", proposal_not_expired: "proposal_not_expired", session_namespaces_validation_success: "session_namespaces_validation_success", create_session_topic: "create_session_topic", subscribing_session_topic: "subscribing_session_topic", subscribe_session_topic_success: "subscribe_session_topic_success", publishing_session_approve: "publishing_session_approve", session_approve_publish_success: "session_approve_publish_success", store_session: "store_session", publishing_session_settle: "publishing_session_settle", session_settle_publish_success: "session_settle_publish_success" };
  var Ts = { no_internet_connection: "no_internet_connection", no_wss_connection: "no_wss_connection", proposal_expired: "proposal_expired", subscribe_session_topic_failure: "subscribe_session_topic_failure", session_approve_publish_failure: "session_approve_publish_failure", session_settle_publish_failure: "session_settle_publish_failure", session_approve_namespace_validation_failure: "session_approve_namespace_validation_failure", proposal_not_found: "proposal_not_found" };
  var Cs = { authenticated_session_approve_started: "authenticated_session_approve_started", authenticated_session_not_expired: "authenticated_session_not_expired", chains_caip2_compliant: "chains_caip2_compliant", chains_evm_compliant: "chains_evm_compliant", create_authenticated_session_topic: "create_authenticated_session_topic", cacaos_verified: "cacaos_verified", store_authenticated_session: "store_authenticated_session", subscribing_authenticated_session_topic: "subscribing_authenticated_session_topic", subscribe_authenticated_session_topic_success: "subscribe_authenticated_session_topic_success", publishing_authenticated_session_approve: "publishing_authenticated_session_approve", authenticated_session_approve_publish_success: "authenticated_session_approve_publish_success" };
  var Ps = { no_internet_connection: "no_internet_connection", no_wss_connection: "no_wss_connection", missing_session_authenticate_request: "missing_session_authenticate_request", session_authenticate_request_expired: "session_authenticate_request_expired", chains_caip2_compliant_failure: "chains_caip2_compliant_failure", chains_evm_compliant_failure: "chains_evm_compliant_failure", invalid_cacao: "invalid_cacao", subscribe_authenticated_session_topic_failure: "subscribe_authenticated_session_topic_failure", authenticated_session_approve_publish_failure: "authenticated_session_approve_publish_failure", authenticated_session_pending_request_not_found: "authenticated_session_pending_request_not_found" };
  var Ct2 = 0.1;
  var Pt4 = "event-client";
  var St4 = 86400;
  var Rt4 = "https://pulse.walletconnect.org/batch";
  function Ss(o5, e2) {
    if (o5.length >= 255) throw new TypeError("Alphabet too long");
    for (var t = new Uint8Array(256), s3 = 0; s3 < t.length; s3++) t[s3] = 255;
    for (var i5 = 0; i5 < o5.length; i5++) {
      var r3 = o5.charAt(i5), n6 = r3.charCodeAt(0);
      if (t[n6] !== 255) throw new TypeError(r3 + " is ambiguous");
      t[n6] = i5;
    }
    var a5 = o5.length, h8 = o5.charAt(0), c7 = Math.log(a5) / Math.log(256), l6 = Math.log(256) / Math.log(a5);
    function p7(u4) {
      if (u4 instanceof Uint8Array || (ArrayBuffer.isView(u4) ? u4 = new Uint8Array(u4.buffer, u4.byteOffset, u4.byteLength) : Array.isArray(u4) && (u4 = Uint8Array.from(u4))), !(u4 instanceof Uint8Array)) throw new TypeError("Expected Uint8Array");
      if (u4.length === 0) return "";
      for (var g8 = 0, _6 = 0, y11 = 0, b9 = u4.length; y11 !== b9 && u4[y11] === 0; ) y11++, g8++;
      for (var A7 = (b9 - y11) * l6 + 1 >>> 0, T6 = new Uint8Array(A7); y11 !== b9; ) {
        for (var N13 = u4[y11], k7 = 0, R6 = A7 - 1; (N13 !== 0 || k7 < _6) && R6 !== -1; R6--, k7++) N13 += 256 * T6[R6] >>> 0, T6[R6] = N13 % a5 >>> 0, N13 = N13 / a5 >>> 0;
        if (N13 !== 0) throw new Error("Non-zero carry");
        _6 = k7, y11++;
      }
      for (var L6 = A7 - _6; L6 !== A7 && T6[L6] === 0; ) L6++;
      for (var Q7 = h8.repeat(g8); L6 < A7; ++L6) Q7 += o5.charAt(T6[L6]);
      return Q7;
    }
    function D7(u4) {
      if (typeof u4 != "string") throw new TypeError("Expected String");
      if (u4.length === 0) return new Uint8Array();
      var g8 = 0;
      if (u4[g8] !== " ") {
        for (var _6 = 0, y11 = 0; u4[g8] === h8; ) _6++, g8++;
        for (var b9 = (u4.length - g8) * c7 + 1 >>> 0, A7 = new Uint8Array(b9); u4[g8]; ) {
          var T6 = t[u4.charCodeAt(g8)];
          if (T6 === 255) return;
          for (var N13 = 0, k7 = b9 - 1; (T6 !== 0 || N13 < y11) && k7 !== -1; k7--, N13++) T6 += a5 * A7[k7] >>> 0, A7[k7] = T6 % 256 >>> 0, T6 = T6 / 256 >>> 0;
          if (T6 !== 0) throw new Error("Non-zero carry");
          y11 = N13, g8++;
        }
        if (u4[g8] !== " ") {
          for (var R6 = b9 - y11; R6 !== b9 && A7[R6] === 0; ) R6++;
          for (var L6 = new Uint8Array(_6 + (b9 - R6)), Q7 = _6; R6 !== b9; ) L6[Q7++] = A7[R6++];
          return L6;
        }
      }
    }
    function m3(u4) {
      var g8 = D7(u4);
      if (g8) return g8;
      throw new Error(`Non-${e2} character`);
    }
    return { encode: p7, decodeUnsafe: D7, decode: m3 };
  }
  var Rs = Ss;
  var xs = Rs;
  var xt4 = (o5) => {
    if (o5 instanceof Uint8Array && o5.constructor.name === "Uint8Array") return o5;
    if (o5 instanceof ArrayBuffer) return new Uint8Array(o5);
    if (ArrayBuffer.isView(o5)) return new Uint8Array(o5.buffer, o5.byteOffset, o5.byteLength);
    throw new Error("Unknown type, must be binary type");
  };
  var Os = (o5) => new TextEncoder().encode(o5);
  var As = (o5) => new TextDecoder().decode(o5);
  var Ns = class {
    constructor(e2, t, s3) {
      this.name = e2, this.prefix = t, this.baseEncode = s3;
    }
    encode(e2) {
      if (e2 instanceof Uint8Array) return `${this.prefix}${this.baseEncode(e2)}`;
      throw Error("Unknown type, must be binary type");
    }
  };
  var zs = class {
    constructor(e2, t, s3) {
      if (this.name = e2, this.prefix = t, t.codePointAt(0) === void 0) throw new Error("Invalid prefix character");
      this.prefixCodePoint = t.codePointAt(0), this.baseDecode = s3;
    }
    decode(e2) {
      if (typeof e2 == "string") {
        if (e2.codePointAt(0) !== this.prefixCodePoint) throw Error(`Unable to decode multibase string ${JSON.stringify(e2)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);
        return this.baseDecode(e2.slice(this.prefix.length));
      } else throw Error("Can only multibase decode strings");
    }
    or(e2) {
      return Ot5(this, e2);
    }
  };
  var Ls = class {
    constructor(e2) {
      this.decoders = e2;
    }
    or(e2) {
      return Ot5(this, e2);
    }
    decode(e2) {
      const t = e2[0], s3 = this.decoders[t];
      if (s3) return s3.decode(e2);
      throw RangeError(`Unable to decode multibase string ${JSON.stringify(e2)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`);
    }
  };
  var Ot5 = (o5, e2) => new Ls({ ...o5.decoders || { [o5.prefix]: o5 }, ...e2.decoders || { [e2.prefix]: e2 } });
  var $s = class {
    constructor(e2, t, s3, i5) {
      this.name = e2, this.prefix = t, this.baseEncode = s3, this.baseDecode = i5, this.encoder = new Ns(e2, t, s3), this.decoder = new zs(e2, t, i5);
    }
    encode(e2) {
      return this.encoder.encode(e2);
    }
    decode(e2) {
      return this.decoder.decode(e2);
    }
  };
  var re5 = ({ name: o5, prefix: e2, encode: t, decode: s3 }) => new $s(o5, e2, t, s3);
  var X3 = ({ prefix: o5, name: e2, alphabet: t }) => {
    const { encode: s3, decode: i5 } = xs(t, e2);
    return re5({ prefix: o5, name: e2, encode: s3, decode: (r3) => xt4(i5(r3)) });
  };
  var ks = (o5, e2, t, s3) => {
    const i5 = {};
    for (let l6 = 0; l6 < e2.length; ++l6) i5[e2[l6]] = l6;
    let r3 = o5.length;
    for (; o5[r3 - 1] === "="; ) --r3;
    const n6 = new Uint8Array(r3 * t / 8 | 0);
    let a5 = 0, h8 = 0, c7 = 0;
    for (let l6 = 0; l6 < r3; ++l6) {
      const p7 = i5[o5[l6]];
      if (p7 === void 0) throw new SyntaxError(`Non-${s3} character`);
      h8 = h8 << t | p7, a5 += t, a5 >= 8 && (a5 -= 8, n6[c7++] = 255 & h8 >> a5);
    }
    if (a5 >= t || 255 & h8 << 8 - a5) throw new SyntaxError("Unexpected end of data");
    return n6;
  };
  var Ms = (o5, e2, t) => {
    const s3 = e2[e2.length - 1] === "=", i5 = (1 << t) - 1;
    let r3 = "", n6 = 0, a5 = 0;
    for (let h8 = 0; h8 < o5.length; ++h8) for (a5 = a5 << 8 | o5[h8], n6 += 8; n6 > t; ) n6 -= t, r3 += e2[i5 & a5 >> n6];
    if (n6 && (r3 += e2[i5 & a5 << t - n6]), s3) for (; r3.length * t & 7; ) r3 += "=";
    return r3;
  };
  var f5 = ({ name: o5, prefix: e2, bitsPerChar: t, alphabet: s3 }) => re5({ prefix: e2, name: o5, encode(i5) {
    return Ms(i5, s3, t);
  }, decode(i5) {
    return ks(i5, s3, t, o5);
  } });
  var Us = re5({ prefix: "\0", name: "identity", encode: (o5) => As(o5), decode: (o5) => Os(o5) });
  var Fs = Object.freeze({ __proto__: null, identity: Us });
  var Ks = f5({ prefix: "0", name: "base2", alphabet: "01", bitsPerChar: 1 });
  var Bs = Object.freeze({ __proto__: null, base2: Ks });
  var Vs = f5({ prefix: "7", name: "base8", alphabet: "01234567", bitsPerChar: 3 });
  var js = Object.freeze({ __proto__: null, base8: Vs });
  var qs = X3({ prefix: "9", name: "base10", alphabet: "0123456789" });
  var Gs = Object.freeze({ __proto__: null, base10: qs });
  var Hs = f5({ prefix: "f", name: "base16", alphabet: "0123456789abcdef", bitsPerChar: 4 });
  var Ys = f5({ prefix: "F", name: "base16upper", alphabet: "0123456789ABCDEF", bitsPerChar: 4 });
  var Js = Object.freeze({ __proto__: null, base16: Hs, base16upper: Ys });
  var Xs = f5({ prefix: "b", name: "base32", alphabet: "abcdefghijklmnopqrstuvwxyz234567", bitsPerChar: 5 });
  var Ws = f5({ prefix: "B", name: "base32upper", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", bitsPerChar: 5 });
  var Zs = f5({ prefix: "c", name: "base32pad", alphabet: "abcdefghijklmnopqrstuvwxyz234567=", bitsPerChar: 5 });
  var Qs = f5({ prefix: "C", name: "base32padupper", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=", bitsPerChar: 5 });
  var er4 = f5({ prefix: "v", name: "base32hex", alphabet: "0123456789abcdefghijklmnopqrstuv", bitsPerChar: 5 });
  var tr3 = f5({ prefix: "V", name: "base32hexupper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV", bitsPerChar: 5 });
  var ir4 = f5({ prefix: "t", name: "base32hexpad", alphabet: "0123456789abcdefghijklmnopqrstuv=", bitsPerChar: 5 });
  var sr3 = f5({ prefix: "T", name: "base32hexpadupper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV=", bitsPerChar: 5 });
  var rr3 = f5({ prefix: "h", name: "base32z", alphabet: "ybndrfg8ejkmcpqxot1uwisza345h769", bitsPerChar: 5 });
  var nr4 = Object.freeze({ __proto__: null, base32: Xs, base32upper: Ws, base32pad: Zs, base32padupper: Qs, base32hex: er4, base32hexupper: tr3, base32hexpad: ir4, base32hexpadupper: sr3, base32z: rr3 });
  var or4 = X3({ prefix: "k", name: "base36", alphabet: "0123456789abcdefghijklmnopqrstuvwxyz" });
  var ar4 = X3({ prefix: "K", name: "base36upper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" });
  var hr4 = Object.freeze({ __proto__: null, base36: or4, base36upper: ar4 });
  var cr5 = X3({ name: "base58btc", prefix: "z", alphabet: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" });
  var lr4 = X3({ name: "base58flickr", prefix: "Z", alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ" });
  var ur4 = Object.freeze({ __proto__: null, base58btc: cr5, base58flickr: lr4 });
  var dr4 = f5({ prefix: "m", name: "base64", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", bitsPerChar: 6 });
  var pr4 = f5({ prefix: "M", name: "base64pad", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", bitsPerChar: 6 });
  var gr4 = f5({ prefix: "u", name: "base64url", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_", bitsPerChar: 6 });
  var yr4 = f5({ prefix: "U", name: "base64urlpad", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=", bitsPerChar: 6 });
  var Dr4 = Object.freeze({ __proto__: null, base64: dr4, base64pad: pr4, base64url: gr4, base64urlpad: yr4 });
  var At3 = Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}");
  var mr4 = At3.reduce((o5, e2, t) => (o5[t] = e2, o5), []);
  var br5 = At3.reduce((o5, e2, t) => (o5[e2.codePointAt(0)] = t, o5), []);
  function fr4(o5) {
    return o5.reduce((e2, t) => (e2 += mr4[t], e2), "");
  }
  function _r5(o5) {
    const e2 = [];
    for (const t of o5) {
      const s3 = br5[t.codePointAt(0)];
      if (s3 === void 0) throw new Error(`Non-base256emoji character: ${t}`);
      e2.push(s3);
    }
    return new Uint8Array(e2);
  }
  var Er4 = re5({ prefix: "\u{1F680}", name: "base256emoji", encode: fr4, decode: _r5 });
  var vr5 = Object.freeze({ __proto__: null, base256emoji: Er4 });
  var wr5 = zt6;
  var Nt4 = 128;
  var Ir4 = 127;
  var Tr5 = ~Ir4;
  var Cr5 = Math.pow(2, 31);
  function zt6(o5, e2, t) {
    e2 = e2 || [], t = t || 0;
    for (var s3 = t; o5 >= Cr5; ) e2[t++] = o5 & 255 | Nt4, o5 /= 128;
    for (; o5 & Tr5; ) e2[t++] = o5 & 255 | Nt4, o5 >>>= 7;
    return e2[t] = o5 | 0, zt6.bytes = t - s3 + 1, e2;
  }
  var Pr5 = _e5;
  var Sr5 = 128;
  var Lt4 = 127;
  function _e5(o5, s3) {
    var t = 0, s3 = s3 || 0, i5 = 0, r3 = s3, n6, a5 = o5.length;
    do {
      if (r3 >= a5) throw _e5.bytes = 0, new RangeError("Could not decode varint");
      n6 = o5[r3++], t += i5 < 28 ? (n6 & Lt4) << i5 : (n6 & Lt4) * Math.pow(2, i5), i5 += 7;
    } while (n6 >= Sr5);
    return _e5.bytes = r3 - s3, t;
  }
  var Rr5 = Math.pow(2, 7);
  var xr5 = Math.pow(2, 14);
  var Or5 = Math.pow(2, 21);
  var Ar5 = Math.pow(2, 28);
  var Nr5 = Math.pow(2, 35);
  var zr4 = Math.pow(2, 42);
  var Lr2 = Math.pow(2, 49);
  var $r5 = Math.pow(2, 56);
  var kr4 = Math.pow(2, 63);
  var Mr2 = function(o5) {
    return o5 < Rr5 ? 1 : o5 < xr5 ? 2 : o5 < Or5 ? 3 : o5 < Ar5 ? 4 : o5 < Nr5 ? 5 : o5 < zr4 ? 6 : o5 < Lr2 ? 7 : o5 < $r5 ? 8 : o5 < kr4 ? 9 : 10;
  };
  var Ur4 = { encode: wr5, decode: Pr5, encodingLength: Mr2 };
  var $t6 = Ur4;
  var kt4 = (o5, e2, t = 0) => ($t6.encode(o5, e2, t), e2);
  var Mt5 = (o5) => $t6.encodingLength(o5);
  var Ee6 = (o5, e2) => {
    const t = e2.byteLength, s3 = Mt5(o5), i5 = s3 + Mt5(t), r3 = new Uint8Array(i5 + t);
    return kt4(o5, r3, 0), kt4(t, r3, s3), r3.set(e2, i5), new Fr3(o5, t, e2, r3);
  };
  var Fr3 = class {
    constructor(e2, t, s3, i5) {
      this.code = e2, this.size = t, this.digest = s3, this.bytes = i5;
    }
  };
  var Ut5 = ({ name: o5, code: e2, encode: t }) => new Kr2(o5, e2, t);
  var Kr2 = class {
    constructor(e2, t, s3) {
      this.name = e2, this.code = t, this.encode = s3;
    }
    digest(e2) {
      if (e2 instanceof Uint8Array) {
        const t = this.encode(e2);
        return t instanceof Uint8Array ? Ee6(this.code, t) : t.then((s3) => Ee6(this.code, s3));
      } else throw Error("Unknown type, must be binary type");
    }
  };
  var Ft5 = (o5) => async (e2) => new Uint8Array(await crypto.subtle.digest(o5, e2));
  var Br4 = Ut5({ name: "sha2-256", code: 18, encode: Ft5("SHA-256") });
  var Vr2 = Ut5({ name: "sha2-512", code: 19, encode: Ft5("SHA-512") });
  var jr4 = Object.freeze({ __proto__: null, sha256: Br4, sha512: Vr2 });
  var Kt5 = 0;
  var qr2 = "identity";
  var Bt5 = xt4;
  var Gr3 = (o5) => Ee6(Kt5, Bt5(o5));
  var Hr2 = { code: Kt5, name: qr2, encode: Bt5, digest: Gr3 };
  var Yr3 = Object.freeze({ __proto__: null, identity: Hr2 });
  new TextEncoder(), new TextDecoder();
  var Vt5 = { ...Fs, ...Bs, ...js, ...Gs, ...Js, ...nr4, ...hr4, ...ur4, ...Dr4, ...vr5 };
  ({ ...jr4, ...Yr3 });
  function Jr4(o5 = 0) {
    return globalThis.Buffer != null && globalThis.Buffer.allocUnsafe != null ? globalThis.Buffer.allocUnsafe(o5) : new Uint8Array(o5);
  }
  function jt4(o5, e2, t, s3) {
    return { name: o5, prefix: e2, encoder: { name: o5, prefix: e2, encode: t }, decoder: { decode: s3 } };
  }
  var qt5 = jt4("utf8", "u", (o5) => "u" + new TextDecoder("utf8").decode(o5), (o5) => new TextEncoder().encode(o5.substring(1)));
  var ve6 = jt4("ascii", "a", (o5) => {
    let e2 = "a";
    for (let t = 0; t < o5.length; t++) e2 += String.fromCharCode(o5[t]);
    return e2;
  }, (o5) => {
    o5 = o5.substring(1);
    const e2 = Jr4(o5.length);
    for (let t = 0; t < o5.length; t++) e2[t] = o5.charCodeAt(t);
    return e2;
  });
  var Xr4 = { utf8: qt5, "utf-8": qt5, hex: Vt5.base16, latin1: ve6, ascii: ve6, binary: ve6, ...Vt5 };
  function Wr3(o5, e2 = "utf8") {
    const t = Xr4[e2];
    if (!t) throw new Error(`Unsupported encoding "${e2}"`);
    return (e2 === "utf8" || e2 === "utf-8") && globalThis.Buffer != null && globalThis.Buffer.from != null ? globalThis.Buffer.from(o5, "utf8") : t.decoder.decode(`${t.prefix}${o5}`);
  }
  var Gt6 = class {
    constructor(e2, t) {
      this.core = e2, this.logger = t, this.keychain = /* @__PURE__ */ new Map(), this.name = Ze3, this.version = Qe2, this.initialized = false, this.storagePrefix = x10, this.init = async () => {
        if (!this.initialized) {
          const s3 = await this.getKeyChain();
          typeof s3 < "u" && (this.keychain = s3), this.initialized = true;
        }
      }, this.has = (s3) => (this.isInitialized(), this.keychain.has(s3)), this.set = async (s3, i5) => {
        this.isInitialized(), this.keychain.set(s3, i5), await this.persist();
      }, this.get = (s3) => {
        this.isInitialized();
        const i5 = this.keychain.get(s3);
        if (typeof i5 > "u") {
          const { message: r3 } = S4("NO_MATCHING_KEY", `${this.name}: ${s3}`);
          throw new Error(r3);
        }
        return i5;
      }, this.del = async (s3) => {
        this.isInitialized(), this.keychain.delete(s3), await this.persist();
      }, this.core = e2, this.logger = E4(t, this.name);
    }
    get context() {
      return y6(this.logger);
    }
    get storageKey() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//" + this.name;
    }
    async setKeyChain(e2) {
      await this.core.storage.setItem(this.storageKey, Tt3(e2));
    }
    async getKeyChain() {
      const e2 = await this.core.storage.getItem(this.storageKey);
      return typeof e2 < "u" ? Pt2(e2) : void 0;
    }
    async persist() {
      await this.setKeyChain(this.keychain);
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: e2 } = S4("NOT_INITIALIZED", this.name);
        throw new Error(e2);
      }
    }
  };
  var Ht5 = class {
    constructor(e2, t, s3) {
      this.core = e2, this.logger = t, this.name = Xe4, this.randomSessionIdentifier = pr2(), this.initialized = false, this.init = async () => {
        this.initialized || (await this.keychain.init(), this.initialized = true);
      }, this.hasKeys = (i5) => (this.isInitialized(), this.keychain.has(i5)), this.getClientId = async () => {
        this.isInitialized();
        const i5 = await this.getClientSeed(), r3 = generateKeyPair(i5);
        return encodeIss(r3.publicKey);
      }, this.generateKeyPair = () => {
        this.isInitialized();
        const i5 = fr2();
        return this.setPrivateKey(i5.publicKey, i5.privateKey);
      }, this.signJWT = async (i5) => {
        this.isInitialized();
        const r3 = await this.getClientSeed(), n6 = generateKeyPair(r3), a5 = this.randomSessionIdentifier, h8 = We5;
        return await signJWT(a5, i5, h8, n6);
      }, this.generateSharedKey = (i5, r3, n6) => {
        this.isInitialized();
        const a5 = this.getPrivateKey(i5), h8 = mr2(a5, r3);
        return this.setSymKey(h8, n6);
      }, this.setSymKey = async (i5, r3) => {
        this.isInitialized();
        const n6 = r3 || hr2(i5);
        return await this.keychain.set(n6, i5), n6;
      }, this.deleteKeyPair = async (i5) => {
        this.isInitialized(), await this.keychain.del(i5);
      }, this.deleteSymKey = async (i5) => {
        this.isInitialized(), await this.keychain.del(i5);
      }, this.encode = async (i5, r3, n6) => {
        this.isInitialized();
        const a5 = On2(n6), h8 = safeJsonStringify(r3);
        if (Nr3(a5)) return vr3(h8, n6?.encoding);
        if (Or3(a5)) {
          const D7 = a5.senderPublicKey, m3 = a5.receiverPublicKey;
          i5 = await this.generateSharedKey(D7, m3);
        }
        const c7 = this.getSymKey(i5), { type: l6, senderPublicKey: p7 } = a5;
        return gr2({ type: l6, symKey: c7, message: h8, senderPublicKey: p7, encoding: n6?.encoding });
      }, this.decode = async (i5, r3, n6) => {
        this.isInitialized();
        const a5 = wr3(r3, n6);
        if (Nr3(a5)) {
          const h8 = Er2(r3, n6?.encoding);
          return safeJsonParse(h8);
        }
        if (Or3(a5)) {
          const h8 = a5.receiverPublicKey, c7 = a5.senderPublicKey;
          i5 = await this.generateSharedKey(h8, c7);
        }
        try {
          const h8 = this.getSymKey(i5), c7 = br3({ symKey: h8, encoded: r3, encoding: n6?.encoding });
          return safeJsonParse(c7);
        } catch (h8) {
          this.logger.error(`Failed to decode message from topic: '${i5}', clientId: '${await this.getClientId()}'`), this.logger.error(h8);
        }
      }, this.getPayloadType = (i5, r3 = ge4) => {
        const n6 = Q4({ encoded: i5, encoding: r3 });
        return A5(n6.type);
      }, this.getPayloadSenderPublicKey = (i5, r3 = ge4) => {
        const n6 = Q4({ encoded: i5, encoding: r3 });
        return n6.senderPublicKey ? toString4(n6.senderPublicKey, g5) : void 0;
      }, this.core = e2, this.logger = E4(t, this.name), this.keychain = s3 || new Gt6(this.core, this.logger);
    }
    get context() {
      return y6(this.logger);
    }
    async setPrivateKey(e2, t) {
      return await this.keychain.set(e2, t), e2;
    }
    getPrivateKey(e2) {
      return this.keychain.get(e2);
    }
    async getClientSeed() {
      let e2 = "";
      try {
        e2 = this.keychain.get(me6);
      } catch {
        e2 = pr2(), await this.keychain.set(me6, e2);
      }
      return Wr3(e2, "base16");
    }
    getSymKey(e2) {
      return this.keychain.get(e2);
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: e2 } = S4("NOT_INITIALIZED", this.name);
        throw new Error(e2);
      }
    }
  };
  var Yt6 = class extends a3 {
    constructor(e2, t) {
      super(e2, t), this.logger = e2, this.core = t, this.messages = /* @__PURE__ */ new Map(), this.name = et4, this.version = tt2, this.initialized = false, this.storagePrefix = x10, this.init = async () => {
        if (!this.initialized) {
          this.logger.trace("Initialized");
          try {
            const s3 = await this.getRelayerMessages();
            typeof s3 < "u" && (this.messages = s3), this.logger.debug(`Successfully Restored records for ${this.name}`), this.logger.trace({ type: "method", method: "restore", size: this.messages.size });
          } catch (s3) {
            this.logger.debug(`Failed to Restore records for ${this.name}`), this.logger.error(s3);
          } finally {
            this.initialized = true;
          }
        }
      }, this.set = async (s3, i5) => {
        this.isInitialized();
        const r3 = yr2(i5);
        let n6 = this.messages.get(s3);
        return typeof n6 > "u" && (n6 = {}), typeof n6[r3] < "u" || (n6[r3] = i5, this.messages.set(s3, n6), await this.persist()), r3;
      }, this.get = (s3) => {
        this.isInitialized();
        let i5 = this.messages.get(s3);
        return typeof i5 > "u" && (i5 = {}), i5;
      }, this.has = (s3, i5) => {
        this.isInitialized();
        const r3 = this.get(s3), n6 = yr2(i5);
        return typeof r3[n6] < "u";
      }, this.del = async (s3) => {
        this.isInitialized(), this.messages.delete(s3), await this.persist();
      }, this.logger = E4(e2, this.name), this.core = t;
    }
    get context() {
      return y6(this.logger);
    }
    get storageKey() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//" + this.name;
    }
    async setRelayerMessages(e2) {
      await this.core.storage.setItem(this.storageKey, Tt3(e2));
    }
    async getRelayerMessages() {
      const e2 = await this.core.storage.getItem(this.storageKey);
      return typeof e2 < "u" ? Pt2(e2) : void 0;
    }
    async persist() {
      await this.setRelayerMessages(this.messages);
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: e2 } = S4("NOT_INITIALIZED", this.name);
        throw new Error(e2);
      }
    }
  };
  var Zr3 = class extends g6 {
    constructor(e2, t) {
      super(e2, t), this.relayer = e2, this.logger = t, this.events = new import_events12.EventEmitter(), this.name = st3, this.queue = /* @__PURE__ */ new Map(), this.publishTimeout = (0, import_time8.toMiliseconds)(import_time8.ONE_MINUTE), this.failedPublishTimeout = (0, import_time8.toMiliseconds)(import_time8.ONE_SECOND), this.needsTransportRestart = false, this.publish = async (s3, i5, r3) => {
        var n6;
        this.logger.debug("Publishing Payload"), this.logger.trace({ type: "method", method: "publish", params: { topic: s3, message: i5, opts: r3 } });
        const a5 = r3?.ttl || it5, h8 = Ir3(r3), c7 = r3?.prompt || false, l6 = r3?.tag || 0, p7 = r3?.id || getBigIntRpcId().toString(), D7 = { topic: s3, message: i5, opts: { ttl: a5, relay: h8, prompt: c7, tag: l6, id: p7, attestation: r3?.attestation } }, m3 = `Failed to publish payload, please try again. id:${p7} tag:${l6}`, u4 = Date.now();
        let g8, _6 = 1;
        try {
          for (; g8 === void 0; ) {
            if (Date.now() - u4 > this.publishTimeout) throw new Error(m3);
            this.logger.trace({ id: p7, attempts: _6 }, `publisher.publish - attempt ${_6}`), g8 = await await kt2(this.rpcPublish(s3, i5, a5, h8, c7, l6, p7, r3?.attestation).catch((y11) => this.logger.warn(y11)), this.publishTimeout, m3), _6++, g8 || await new Promise((y11) => setTimeout(y11, this.failedPublishTimeout));
          }
          this.relayer.events.emit(v10.publish, D7), this.logger.debug("Successfully Published Payload"), this.logger.trace({ type: "method", method: "publish", params: { id: p7, topic: s3, message: i5, opts: r3 } });
        } catch (y11) {
          if (this.logger.debug("Failed to Publish Payload"), this.logger.error(y11), (n6 = r3?.internal) != null && n6.throwOnFailedPublish) throw y11;
          this.queue.set(p7, D7);
        }
      }, this.on = (s3, i5) => {
        this.events.on(s3, i5);
      }, this.once = (s3, i5) => {
        this.events.once(s3, i5);
      }, this.off = (s3, i5) => {
        this.events.off(s3, i5);
      }, this.removeListener = (s3, i5) => {
        this.events.removeListener(s3, i5);
      }, this.relayer = e2, this.logger = E4(t, this.name), this.registerEventListeners();
    }
    get context() {
      return y6(this.logger);
    }
    rpcPublish(e2, t, s3, i5, r3, n6, a5, h8) {
      var c7, l6, p7, D7;
      const m3 = { method: jr3(i5.protocol).publish, params: { topic: e2, message: t, ttl: s3, prompt: r3, tag: n6, attestation: h8 }, id: a5 };
      return I3((c7 = m3.params) == null ? void 0 : c7.prompt) && ((l6 = m3.params) == null || delete l6.prompt), I3((p7 = m3.params) == null ? void 0 : p7.tag) && ((D7 = m3.params) == null || delete D7.tag), this.logger.debug("Outgoing Relay Payload"), this.logger.trace({ type: "message", direction: "outgoing", request: m3 }), this.relayer.request(m3);
    }
    removeRequestFromQueue(e2) {
      this.queue.delete(e2);
    }
    checkQueue() {
      this.queue.forEach(async (e2) => {
        const { topic: t, message: s3, opts: i5 } = e2;
        await this.publish(t, s3, i5);
      });
    }
    registerEventListeners() {
      this.relayer.core.heartbeat.on(r.pulse, () => {
        if (this.needsTransportRestart) {
          this.needsTransportRestart = false, this.relayer.events.emit(v10.connection_stalled);
          return;
        }
        this.checkQueue();
      }), this.relayer.on(v10.message_ack, (e2) => {
        this.removeRequestFromQueue(e2.id.toString());
      });
    }
  };
  var Qr3 = class {
    constructor() {
      this.map = /* @__PURE__ */ new Map(), this.set = (e2, t) => {
        const s3 = this.get(e2);
        this.exists(e2, t) || this.map.set(e2, [...s3, t]);
      }, this.get = (e2) => this.map.get(e2) || [], this.exists = (e2, t) => this.get(e2).includes(t), this.delete = (e2, t) => {
        if (typeof t > "u") {
          this.map.delete(e2);
          return;
        }
        if (!this.map.has(e2)) return;
        const s3 = this.get(e2);
        if (!this.exists(e2, t)) return;
        const i5 = s3.filter((r3) => r3 !== t);
        if (!i5.length) {
          this.map.delete(e2);
          return;
        }
        this.map.set(e2, i5);
      }, this.clear = () => {
        this.map.clear();
      };
    }
    get topics() {
      return Array.from(this.map.keys());
    }
  };
  var en3 = Object.defineProperty;
  var tn3 = Object.defineProperties;
  var sn3 = Object.getOwnPropertyDescriptors;
  var Jt6 = Object.getOwnPropertySymbols;
  var rn3 = Object.prototype.hasOwnProperty;
  var nn4 = Object.prototype.propertyIsEnumerable;
  var Xt5 = (o5, e2, t) => e2 in o5 ? en3(o5, e2, { enumerable: true, configurable: true, writable: true, value: t }) : o5[e2] = t;
  var W7 = (o5, e2) => {
    for (var t in e2 || (e2 = {})) rn3.call(e2, t) && Xt5(o5, t, e2[t]);
    if (Jt6) for (var t of Jt6(e2)) nn4.call(e2, t) && Xt5(o5, t, e2[t]);
    return o5;
  };
  var we6 = (o5, e2) => tn3(o5, sn3(e2));
  var Wt6 = class extends d5 {
    constructor(e2, t) {
      super(e2, t), this.relayer = e2, this.logger = t, this.subscriptions = /* @__PURE__ */ new Map(), this.topicMap = new Qr3(), this.events = new import_events12.EventEmitter(), this.name = ut5, this.version = dt4, this.pending = /* @__PURE__ */ new Map(), this.cached = [], this.initialized = false, this.pendingSubscriptionWatchLabel = "pending_sub_watch_label", this.pollingInterval = 20, this.storagePrefix = x10, this.subscribeTimeout = (0, import_time8.toMiliseconds)(import_time8.ONE_MINUTE), this.restartInProgress = false, this.batchSubscribeTopicsLimit = 500, this.pendingBatchMessages = [], this.init = async () => {
        this.initialized || (this.logger.trace("Initialized"), this.registerEventListeners(), this.clientId = await this.relayer.core.crypto.getClientId(), await this.restore()), this.initialized = true;
      }, this.subscribe = async (s3, i5) => {
        this.isInitialized(), this.logger.debug("Subscribing Topic"), this.logger.trace({ type: "method", method: "subscribe", params: { topic: s3, opts: i5 } });
        try {
          const r3 = Ir3(i5), n6 = { topic: s3, relay: r3, transportType: i5?.transportType };
          this.pending.set(s3, n6);
          const a5 = await this.rpcSubscribe(s3, r3, i5);
          return typeof a5 == "string" && (this.onSubscribe(a5, n6), this.logger.debug("Successfully Subscribed Topic"), this.logger.trace({ type: "method", method: "subscribe", params: { topic: s3, opts: i5 } })), a5;
        } catch (r3) {
          throw this.logger.debug("Failed to Subscribe Topic"), this.logger.error(r3), r3;
        }
      }, this.unsubscribe = async (s3, i5) => {
        await this.restartToComplete(), this.isInitialized(), typeof i5?.id < "u" ? await this.unsubscribeById(s3, i5.id, i5) : await this.unsubscribeByTopic(s3, i5);
      }, this.isSubscribed = async (s3) => {
        if (this.topics.includes(s3)) return true;
        const i5 = `${this.pendingSubscriptionWatchLabel}_${s3}`;
        return await new Promise((r3, n6) => {
          const a5 = new import_time8.Watch();
          a5.start(i5);
          const h8 = setInterval(() => {
            !this.pending.has(s3) && this.topics.includes(s3) && (clearInterval(h8), a5.stop(i5), r3(true)), a5.elapsed(i5) >= pt3 && (clearInterval(h8), a5.stop(i5), n6(new Error("Subscription resolution timeout")));
          }, this.pollingInterval);
        }).catch(() => false);
      }, this.on = (s3, i5) => {
        this.events.on(s3, i5);
      }, this.once = (s3, i5) => {
        this.events.once(s3, i5);
      }, this.off = (s3, i5) => {
        this.events.off(s3, i5);
      }, this.removeListener = (s3, i5) => {
        this.events.removeListener(s3, i5);
      }, this.start = async () => {
        await this.onConnect();
      }, this.stop = async () => {
        await this.onDisconnect();
      }, this.restart = async () => {
        this.restartInProgress = true, await this.restore(), await this.reset(), this.restartInProgress = false;
      }, this.relayer = e2, this.logger = E4(t, this.name), this.clientId = "";
    }
    get context() {
      return y6(this.logger);
    }
    get storageKey() {
      return this.storagePrefix + this.version + this.relayer.core.customStoragePrefix + "//" + this.name;
    }
    get length() {
      return this.subscriptions.size;
    }
    get ids() {
      return Array.from(this.subscriptions.keys());
    }
    get values() {
      return Array.from(this.subscriptions.values());
    }
    get topics() {
      return this.topicMap.topics;
    }
    hasSubscription(e2, t) {
      let s3 = false;
      try {
        s3 = this.getSubscription(e2).topic === t;
      } catch {
      }
      return s3;
    }
    onEnable() {
      this.cached = [], this.initialized = true;
    }
    onDisable() {
      this.cached = this.values, this.subscriptions.clear(), this.topicMap.clear();
    }
    async unsubscribeByTopic(e2, t) {
      const s3 = this.topicMap.get(e2);
      await Promise.all(s3.map(async (i5) => await this.unsubscribeById(e2, i5, t)));
    }
    async unsubscribeById(e2, t, s3) {
      this.logger.debug("Unsubscribing Topic"), this.logger.trace({ type: "method", method: "unsubscribe", params: { topic: e2, id: t, opts: s3 } });
      try {
        const i5 = Ir3(s3);
        await this.rpcUnsubscribe(e2, t, i5);
        const r3 = U4("USER_DISCONNECTED", `${this.name}, ${e2}`);
        await this.onUnsubscribe(e2, t, r3), this.logger.debug("Successfully Unsubscribed Topic"), this.logger.trace({ type: "method", method: "unsubscribe", params: { topic: e2, id: t, opts: s3 } });
      } catch (i5) {
        throw this.logger.debug("Failed to Unsubscribe Topic"), this.logger.error(i5), i5;
      }
    }
    async rpcSubscribe(e2, t, s3) {
      var i5;
      s3?.transportType === M8.relay && await this.restartToComplete();
      const r3 = { method: jr3(t.protocol).subscribe, params: { topic: e2 } };
      this.logger.debug("Outgoing Relay Payload"), this.logger.trace({ type: "payload", direction: "outgoing", request: r3 });
      const n6 = (i5 = s3?.internal) == null ? void 0 : i5.throwOnFailedPublish;
      try {
        const a5 = yr2(e2 + this.clientId);
        if (s3?.transportType === M8.link_mode) return setTimeout(() => {
          (this.relayer.connected || this.relayer.connecting) && this.relayer.request(r3).catch((c7) => this.logger.warn(c7));
        }, (0, import_time8.toMiliseconds)(import_time8.ONE_SECOND)), a5;
        const h8 = await kt2(this.relayer.request(r3).catch((c7) => this.logger.warn(c7)), this.subscribeTimeout, `Subscribing to ${e2} failed, please try again`);
        if (!h8 && n6) throw new Error(`Subscribing to ${e2} failed, please try again`);
        return h8 ? a5 : null;
      } catch (a5) {
        if (this.logger.debug("Outgoing Relay Subscribe Payload stalled"), this.relayer.events.emit(v10.connection_stalled), n6) throw a5;
      }
      return null;
    }
    async rpcBatchSubscribe(e2) {
      if (!e2.length) return;
      const t = e2[0].relay, s3 = { method: jr3(t.protocol).batchSubscribe, params: { topics: e2.map((i5) => i5.topic) } };
      this.logger.debug("Outgoing Relay Payload"), this.logger.trace({ type: "payload", direction: "outgoing", request: s3 });
      try {
        return await await kt2(this.relayer.request(s3).catch((i5) => this.logger.warn(i5)), this.subscribeTimeout);
      } catch {
        this.relayer.events.emit(v10.connection_stalled);
      }
    }
    async rpcBatchFetchMessages(e2) {
      if (!e2.length) return;
      const t = e2[0].relay, s3 = { method: jr3(t.protocol).batchFetchMessages, params: { topics: e2.map((r3) => r3.topic) } };
      this.logger.debug("Outgoing Relay Payload"), this.logger.trace({ type: "payload", direction: "outgoing", request: s3 });
      let i5;
      try {
        i5 = await await kt2(this.relayer.request(s3).catch((r3) => this.logger.warn(r3)), this.subscribeTimeout);
      } catch {
        this.relayer.events.emit(v10.connection_stalled);
      }
      return i5;
    }
    rpcUnsubscribe(e2, t, s3) {
      const i5 = { method: jr3(s3.protocol).unsubscribe, params: { topic: e2, id: t } };
      return this.logger.debug("Outgoing Relay Payload"), this.logger.trace({ type: "payload", direction: "outgoing", request: i5 }), this.relayer.request(i5);
    }
    onSubscribe(e2, t) {
      this.setSubscription(e2, we6(W7({}, t), { id: e2 })), this.pending.delete(t.topic);
    }
    onBatchSubscribe(e2) {
      e2.length && e2.forEach((t) => {
        this.setSubscription(t.id, W7({}, t)), this.pending.delete(t.topic);
      });
    }
    async onUnsubscribe(e2, t, s3) {
      this.events.removeAllListeners(t), this.hasSubscription(t, e2) && this.deleteSubscription(t, s3), await this.relayer.messages.del(e2);
    }
    async setRelayerSubscriptions(e2) {
      await this.relayer.core.storage.setItem(this.storageKey, e2);
    }
    async getRelayerSubscriptions() {
      return await this.relayer.core.storage.getItem(this.storageKey);
    }
    setSubscription(e2, t) {
      this.logger.debug("Setting subscription"), this.logger.trace({ type: "method", method: "setSubscription", id: e2, subscription: t }), this.addSubscription(e2, t);
    }
    addSubscription(e2, t) {
      this.subscriptions.set(e2, W7({}, t)), this.topicMap.set(t.topic, e2), this.events.emit(O7.created, t);
    }
    getSubscription(e2) {
      this.logger.debug("Getting subscription"), this.logger.trace({ type: "method", method: "getSubscription", id: e2 });
      const t = this.subscriptions.get(e2);
      if (!t) {
        const { message: s3 } = S4("NO_MATCHING_KEY", `${this.name}: ${e2}`);
        throw new Error(s3);
      }
      return t;
    }
    deleteSubscription(e2, t) {
      this.logger.debug("Deleting subscription"), this.logger.trace({ type: "method", method: "deleteSubscription", id: e2, reason: t });
      const s3 = this.getSubscription(e2);
      this.subscriptions.delete(e2), this.topicMap.delete(s3.topic, e2), this.events.emit(O7.deleted, we6(W7({}, s3), { reason: t }));
    }
    async persist() {
      await this.setRelayerSubscriptions(this.values), this.events.emit(O7.sync);
    }
    async reset() {
      if (this.cached.length) {
        const e2 = Math.ceil(this.cached.length / this.batchSubscribeTopicsLimit);
        for (let t = 0; t < e2; t++) {
          const s3 = this.cached.splice(0, this.batchSubscribeTopicsLimit);
          await this.batchFetchMessages(s3), await this.batchSubscribe(s3);
        }
      }
      this.events.emit(O7.resubscribed);
    }
    async restore() {
      try {
        const e2 = await this.getRelayerSubscriptions();
        if (typeof e2 > "u" || !e2.length) return;
        if (this.subscriptions.size) {
          const { message: t } = S4("RESTORE_WILL_OVERRIDE", this.name);
          throw this.logger.error(t), this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`), new Error(t);
        }
        this.cached = e2, this.logger.debug(`Successfully Restored subscriptions for ${this.name}`), this.logger.trace({ type: "method", method: "restore", subscriptions: this.values });
      } catch (e2) {
        this.logger.debug(`Failed to Restore subscriptions for ${this.name}`), this.logger.error(e2);
      }
    }
    async batchSubscribe(e2) {
      if (!e2.length) return;
      const t = await this.rpcBatchSubscribe(e2);
      L3(t) && this.onBatchSubscribe(t.map((s3, i5) => we6(W7({}, e2[i5]), { id: s3 })));
    }
    async batchFetchMessages(e2) {
      if (!e2.length) return;
      this.logger.trace(`Fetching batch messages for ${e2.length} subscriptions`);
      const t = await this.rpcBatchFetchMessages(e2);
      t && t.messages && (this.pendingBatchMessages = this.pendingBatchMessages.concat(t.messages));
    }
    async onConnect() {
      await this.restart(), this.onEnable();
    }
    onDisconnect() {
      this.onDisable();
    }
    async checkPending() {
      if (!this.initialized || !this.relayer.connected) return;
      const e2 = [];
      this.pending.forEach((t) => {
        e2.push(t);
      }), await this.batchSubscribe(e2), this.pendingBatchMessages.length && (await this.relayer.handleBatchMessageEvents(this.pendingBatchMessages), this.pendingBatchMessages = []);
    }
    registerEventListeners() {
      this.relayer.core.heartbeat.on(r.pulse, async () => {
        await this.checkPending();
      }), this.events.on(O7.created, async (e2) => {
        const t = O7.created;
        this.logger.info(`Emitting ${t}`), this.logger.debug({ type: "event", event: t, data: e2 }), await this.persist();
      }), this.events.on(O7.deleted, async (e2) => {
        const t = O7.deleted;
        this.logger.info(`Emitting ${t}`), this.logger.debug({ type: "event", event: t, data: e2 }), await this.persist();
      });
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: e2 } = S4("NOT_INITIALIZED", this.name);
        throw new Error(e2);
      }
    }
    async restartToComplete() {
      !this.relayer.connected && !this.relayer.connecting && await this.relayer.transportOpen(), this.restartInProgress && await new Promise((e2) => {
        const t = setInterval(() => {
          this.restartInProgress || (clearInterval(t), e2());
        }, this.pollingInterval);
      });
    }
  };
  var on3 = Object.defineProperty;
  var Zt5 = Object.getOwnPropertySymbols;
  var an2 = Object.prototype.hasOwnProperty;
  var hn2 = Object.prototype.propertyIsEnumerable;
  var Qt5 = (o5, e2, t) => e2 in o5 ? on3(o5, e2, { enumerable: true, configurable: true, writable: true, value: t }) : o5[e2] = t;
  var ei = (o5, e2) => {
    for (var t in e2 || (e2 = {})) an2.call(e2, t) && Qt5(o5, t, e2[t]);
    if (Zt5) for (var t of Zt5(e2)) hn2.call(e2, t) && Qt5(o5, t, e2[t]);
    return o5;
  };
  var ti = class extends u2 {
    constructor(e2) {
      super(e2), this.protocol = "wc", this.version = 2, this.events = new import_events12.EventEmitter(), this.name = ot2, this.transportExplicitlyClosed = false, this.initialized = false, this.connectionAttemptInProgress = false, this.connectionStatusPollingInterval = 20, this.staleConnectionErrors = ["socket hang up", "stalled", "interrupted"], this.hasExperiencedNetworkDisruption = false, this.requestsInFlight = /* @__PURE__ */ new Map(), this.heartBeatTimeout = (0, import_time8.toMiliseconds)(import_time8.THIRTY_SECONDS + import_time8.ONE_SECOND), this.request = async (t) => {
        var s3, i5;
        this.logger.debug("Publishing Request Payload");
        const r3 = t.id || getBigIntRpcId().toString();
        await this.toEstablishConnection();
        try {
          const n6 = this.provider.request(t);
          this.requestsInFlight.set(r3, { promise: n6, request: t }), this.logger.trace({ id: r3, method: t.method, topic: (s3 = t.params) == null ? void 0 : s3.topic }, "relayer.request - attempt to publish...");
          const a5 = await new Promise(async (h8, c7) => {
            const l6 = () => {
              c7(new Error(`relayer.request - publish interrupted, id: ${r3}`));
            };
            this.provider.on(I5.disconnect, l6);
            const p7 = await n6;
            this.provider.off(I5.disconnect, l6), h8(p7);
          });
          return this.logger.trace({ id: r3, method: t.method, topic: (i5 = t.params) == null ? void 0 : i5.topic }, "relayer.request - published"), a5;
        } catch (n6) {
          throw this.logger.debug(`Failed to Publish Request: ${r3}`), n6;
        } finally {
          this.requestsInFlight.delete(r3);
        }
      }, this.resetPingTimeout = () => {
        if (ce3()) try {
          clearTimeout(this.pingTimeout), this.pingTimeout = setTimeout(() => {
            var t, s3, i5;
            (i5 = (s3 = (t = this.provider) == null ? void 0 : t.connection) == null ? void 0 : s3.socket) == null || i5.terminate();
          }, this.heartBeatTimeout);
        } catch (t) {
          this.logger.warn(t);
        }
      }, this.onPayloadHandler = (t) => {
        this.onProviderPayload(t), this.resetPingTimeout();
      }, this.onConnectHandler = () => {
        this.logger.trace("relayer connected"), this.startPingTimeout(), this.events.emit(v10.connect);
      }, this.onDisconnectHandler = () => {
        this.logger.trace("relayer disconnected"), this.onProviderDisconnect();
      }, this.onProviderErrorHandler = (t) => {
        this.logger.error(t), this.events.emit(v10.error, t), this.logger.info("Fatal socket error received, closing transport"), this.transportClose();
      }, this.registerProviderListeners = () => {
        this.provider.on(I5.payload, this.onPayloadHandler), this.provider.on(I5.connect, this.onConnectHandler), this.provider.on(I5.disconnect, this.onDisconnectHandler), this.provider.on(I5.error, this.onProviderErrorHandler);
      }, this.core = e2.core, this.logger = typeof e2.logger < "u" && typeof e2.logger != "string" ? E4(e2.logger, this.name) : (0, import_pino2.default)(k4({ level: e2.logger || nt3 })), this.messages = new Yt6(this.logger, e2.core), this.subscriber = new Wt6(this, this.logger), this.publisher = new Zr3(this, this.logger), this.relayUrl = e2?.relayUrl || be6, this.projectId = e2.projectId, this.bundleId = Ot3(), this.provider = {};
    }
    async init() {
      if (this.logger.trace("Initialized"), this.registerEventListeners(), await Promise.all([this.messages.init(), this.subscriber.init()]), this.initialized = true, this.subscriber.cached.length > 0) try {
        await this.transportOpen();
      } catch (e2) {
        this.logger.warn(e2);
      }
    }
    get context() {
      return y6(this.logger);
    }
    get connected() {
      var e2, t, s3;
      return ((s3 = (t = (e2 = this.provider) == null ? void 0 : e2.connection) == null ? void 0 : t.socket) == null ? void 0 : s3.readyState) === 1;
    }
    get connecting() {
      var e2, t, s3;
      return ((s3 = (t = (e2 = this.provider) == null ? void 0 : e2.connection) == null ? void 0 : t.socket) == null ? void 0 : s3.readyState) === 0;
    }
    async publish(e2, t, s3) {
      this.isInitialized(), await this.publisher.publish(e2, t, s3), await this.recordMessageEvent({ topic: e2, message: t, publishedAt: Date.now(), transportType: M8.relay });
    }
    async subscribe(e2, t) {
      var s3, i5, r3;
      this.isInitialized(), t?.transportType === "relay" && await this.toEstablishConnection();
      const n6 = typeof ((s3 = t?.internal) == null ? void 0 : s3.throwOnFailedPublish) > "u" ? true : (i5 = t?.internal) == null ? void 0 : i5.throwOnFailedPublish;
      let a5 = ((r3 = this.subscriber.topicMap.get(e2)) == null ? void 0 : r3[0]) || "", h8;
      const c7 = (l6) => {
        l6.topic === e2 && (this.subscriber.off(O7.created, c7), h8());
      };
      return await Promise.all([new Promise((l6) => {
        h8 = l6, this.subscriber.on(O7.created, c7);
      }), new Promise(async (l6, p7) => {
        a5 = await this.subscriber.subscribe(e2, ei({ internal: { throwOnFailedPublish: n6 } }, t)).catch((D7) => {
          n6 && p7(D7);
        }) || a5, l6();
      })]), a5;
    }
    async unsubscribe(e2, t) {
      this.isInitialized(), await this.subscriber.unsubscribe(e2, t);
    }
    on(e2, t) {
      this.events.on(e2, t);
    }
    once(e2, t) {
      this.events.once(e2, t);
    }
    off(e2, t) {
      this.events.off(e2, t);
    }
    removeListener(e2, t) {
      this.events.removeListener(e2, t);
    }
    async transportDisconnect() {
      if (!this.hasExperiencedNetworkDisruption && this.connected && this.requestsInFlight.size > 0) try {
        await Promise.all(Array.from(this.requestsInFlight.values()).map((e2) => e2.promise));
      } catch (e2) {
        this.logger.warn(e2);
      }
      this.hasExperiencedNetworkDisruption || this.connected ? await kt2(this.provider.disconnect(), 2e3, "provider.disconnect()").catch(() => this.onProviderDisconnect()) : this.onProviderDisconnect();
    }
    async transportClose() {
      this.transportExplicitlyClosed = true, await this.transportDisconnect();
    }
    async transportOpen(e2) {
      await this.confirmOnlineStateOrThrow(), e2 && e2 !== this.relayUrl && (this.relayUrl = e2, await this.transportDisconnect()), await this.createProvider(), this.connectionAttemptInProgress = true, this.transportExplicitlyClosed = false;
      try {
        await new Promise(async (t, s3) => {
          const i5 = () => {
            this.provider.off(I5.disconnect, i5), s3(new Error("Connection interrupted while trying to subscribe"));
          };
          this.provider.on(I5.disconnect, i5), await kt2(this.provider.connect(), (0, import_time8.toMiliseconds)(import_time8.ONE_MINUTE), `Socket stalled when trying to connect to ${this.relayUrl}`).catch((r3) => {
            s3(r3);
          }).finally(() => {
            clearTimeout(this.reconnectTimeout), this.reconnectTimeout = void 0;
          }), this.subscriber.start().catch((r3) => {
            this.logger.error(r3), this.onDisconnectHandler();
          }), this.hasExperiencedNetworkDisruption = false, t();
        });
      } catch (t) {
        this.logger.error(t);
        const s3 = t;
        if (this.hasExperiencedNetworkDisruption = true, !this.isConnectionStalled(s3.message)) throw t;
      } finally {
        this.connectionAttemptInProgress = false;
      }
    }
    async restartTransport(e2) {
      this.connectionAttemptInProgress || (this.relayUrl = e2 || this.relayUrl, await this.confirmOnlineStateOrThrow(), await this.transportClose(), await this.transportOpen());
    }
    async confirmOnlineStateOrThrow() {
      if (!await mo2()) throw new Error("No internet connection detected. Please restart your network and try again.");
    }
    async handleBatchMessageEvents(e2) {
      if (e2?.length === 0) {
        this.logger.trace("Batch message events is empty. Ignoring...");
        return;
      }
      const t = e2.sort((s3, i5) => s3.publishedAt - i5.publishedAt);
      this.logger.trace(`Batch of ${t.length} message events sorted`);
      for (const s3 of t) try {
        await this.onMessageEvent(s3);
      } catch (i5) {
        this.logger.warn(i5);
      }
      this.logger.trace(`Batch of ${t.length} message events processed`);
    }
    async onLinkMessageEvent(e2, t) {
      const { topic: s3 } = e2;
      if (!t.sessionExists) {
        const i5 = Mt3(import_time8.FIVE_MINUTES), r3 = { topic: s3, expiry: i5, relay: { protocol: "irn" }, active: false };
        await this.core.pairing.pairings.set(s3, r3);
      }
      this.events.emit(v10.message, e2), await this.recordMessageEvent(e2);
    }
    startPingTimeout() {
      var e2, t, s3, i5, r3;
      if (ce3()) try {
        (t = (e2 = this.provider) == null ? void 0 : e2.connection) != null && t.socket && ((r3 = (i5 = (s3 = this.provider) == null ? void 0 : s3.connection) == null ? void 0 : i5.socket) == null || r3.once("ping", () => {
          this.resetPingTimeout();
        })), this.resetPingTimeout();
      } catch (n6) {
        this.logger.warn(n6);
      }
    }
    isConnectionStalled(e2) {
      return this.staleConnectionErrors.some((t) => e2.includes(t));
    }
    async createProvider() {
      this.provider.connection && this.unregisterProviderListeners();
      const e2 = await this.core.crypto.signJWT(this.relayUrl);
      this.provider = new o3(new f4($t4({ sdkVersion: se4, protocol: this.protocol, version: this.version, relayUrl: this.relayUrl, projectId: this.projectId, auth: e2, useOnCloseEvent: true, bundleId: this.bundleId }))), this.registerProviderListeners();
    }
    async recordMessageEvent(e2) {
      const { topic: t, message: s3 } = e2;
      await this.messages.set(t, s3);
    }
    async shouldIgnoreMessageEvent(e2) {
      const { topic: t, message: s3 } = e2;
      if (!s3 || s3.length === 0) return this.logger.debug(`Ignoring invalid/empty message: ${s3}`), true;
      if (!await this.subscriber.isSubscribed(t)) return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`), true;
      const i5 = this.messages.has(t, s3);
      return i5 && this.logger.debug(`Ignoring duplicate message: ${s3}`), i5;
    }
    async onProviderPayload(e2) {
      if (this.logger.debug("Incoming Relay Payload"), this.logger.trace({ type: "payload", direction: "incoming", payload: e2 }), isJsonRpcRequest(e2)) {
        if (!e2.method.endsWith(at3)) return;
        const t = e2.params, { topic: s3, message: i5, publishedAt: r3, attestation: n6 } = t.data, a5 = { topic: s3, message: i5, publishedAt: r3, transportType: M8.relay, attestation: n6 };
        this.logger.debug("Emitting Relayer Payload"), this.logger.trace(ei({ type: "event", event: t.id }, a5)), this.events.emit(t.id, a5), await this.acknowledgePayload(e2), await this.onMessageEvent(a5);
      } else isJsonRpcResponse(e2) && this.events.emit(v10.message_ack, e2);
    }
    async onMessageEvent(e2) {
      await this.shouldIgnoreMessageEvent(e2) || (this.events.emit(v10.message, e2), await this.recordMessageEvent(e2));
    }
    async acknowledgePayload(e2) {
      const t = formatJsonRpcResult(e2.id, true);
      await this.provider.connection.send(t);
    }
    unregisterProviderListeners() {
      this.provider.off(I5.payload, this.onPayloadHandler), this.provider.off(I5.connect, this.onConnectHandler), this.provider.off(I5.disconnect, this.onDisconnectHandler), this.provider.off(I5.error, this.onProviderErrorHandler), clearTimeout(this.pingTimeout);
    }
    async registerEventListeners() {
      let e2 = await mo2();
      ho2(async (t) => {
        e2 !== t && (e2 = t, t ? await this.restartTransport().catch((s3) => this.logger.error(s3)) : (this.hasExperiencedNetworkDisruption = true, await this.transportDisconnect(), this.transportExplicitlyClosed = false));
      });
    }
    async onProviderDisconnect() {
      await this.subscriber.stop(), this.requestsInFlight.clear(), clearTimeout(this.pingTimeout), this.events.emit(v10.disconnect), this.connectionAttemptInProgress = false, !this.transportExplicitlyClosed && (this.reconnectTimeout || (this.reconnectTimeout = setTimeout(async () => {
        await this.transportOpen().catch((e2) => this.logger.error(e2));
      }, (0, import_time8.toMiliseconds)(ht3))));
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: e2 } = S4("NOT_INITIALIZED", this.name);
        throw new Error(e2);
      }
    }
    async toEstablishConnection() {
      await this.confirmOnlineStateOrThrow(), !this.connected && (this.connectionAttemptInProgress && await new Promise((e2) => {
        const t = setInterval(() => {
          this.connected && (clearInterval(t), e2());
        }, this.connectionStatusPollingInterval);
      }), await this.transportOpen());
    }
  };
  var cn2 = Object.defineProperty;
  var ii = Object.getOwnPropertySymbols;
  var ln2 = Object.prototype.hasOwnProperty;
  var un2 = Object.prototype.propertyIsEnumerable;
  var si = (o5, e2, t) => e2 in o5 ? cn2(o5, e2, { enumerable: true, configurable: true, writable: true, value: t }) : o5[e2] = t;
  var ri = (o5, e2) => {
    for (var t in e2 || (e2 = {})) ln2.call(e2, t) && si(o5, t, e2[t]);
    if (ii) for (var t of ii(e2)) un2.call(e2, t) && si(o5, t, e2[t]);
    return o5;
  };
  var ni = class extends p5 {
    constructor(e2, t, s3, i5 = x10, r3 = void 0) {
      super(e2, t, s3, i5), this.core = e2, this.logger = t, this.name = s3, this.map = /* @__PURE__ */ new Map(), this.version = ct4, this.cached = [], this.initialized = false, this.storagePrefix = x10, this.recentlyDeleted = [], this.recentlyDeletedLimit = 200, this.init = async () => {
        this.initialized || (this.logger.trace("Initialized"), await this.restore(), this.cached.forEach((n6) => {
          this.getKey && n6 !== null && !I3(n6) ? this.map.set(this.getKey(n6), n6) : Yr2(n6) ? this.map.set(n6.id, n6) : Qr2(n6) && this.map.set(n6.topic, n6);
        }), this.cached = [], this.initialized = true);
      }, this.set = async (n6, a5) => {
        this.isInitialized(), this.map.has(n6) ? await this.update(n6, a5) : (this.logger.debug("Setting value"), this.logger.trace({ type: "method", method: "set", key: n6, value: a5 }), this.map.set(n6, a5), await this.persist());
      }, this.get = (n6) => (this.isInitialized(), this.logger.debug("Getting value"), this.logger.trace({ type: "method", method: "get", key: n6 }), this.getData(n6)), this.getAll = (n6) => (this.isInitialized(), n6 ? this.values.filter((a5) => Object.keys(n6).every((h8) => (0, import_lodash.default)(a5[h8], n6[h8]))) : this.values), this.update = async (n6, a5) => {
        this.isInitialized(), this.logger.debug("Updating value"), this.logger.trace({ type: "method", method: "update", key: n6, update: a5 });
        const h8 = ri(ri({}, this.getData(n6)), a5);
        this.map.set(n6, h8), await this.persist();
      }, this.delete = async (n6, a5) => {
        this.isInitialized(), this.map.has(n6) && (this.logger.debug("Deleting value"), this.logger.trace({ type: "method", method: "delete", key: n6, reason: a5 }), this.map.delete(n6), this.addToRecentlyDeleted(n6), await this.persist());
      }, this.logger = E4(t, this.name), this.storagePrefix = i5, this.getKey = r3;
    }
    get context() {
      return y6(this.logger);
    }
    get storageKey() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//" + this.name;
    }
    get length() {
      return this.map.size;
    }
    get keys() {
      return Array.from(this.map.keys());
    }
    get values() {
      return Array.from(this.map.values());
    }
    addToRecentlyDeleted(e2) {
      this.recentlyDeleted.push(e2), this.recentlyDeleted.length >= this.recentlyDeletedLimit && this.recentlyDeleted.splice(0, this.recentlyDeletedLimit / 2);
    }
    async setDataStore(e2) {
      await this.core.storage.setItem(this.storageKey, e2);
    }
    async getDataStore() {
      return await this.core.storage.getItem(this.storageKey);
    }
    getData(e2) {
      const t = this.map.get(e2);
      if (!t) {
        if (this.recentlyDeleted.includes(e2)) {
          const { message: i5 } = S4("MISSING_OR_INVALID", `Record was recently deleted - ${this.name}: ${e2}`);
          throw this.logger.error(i5), new Error(i5);
        }
        const { message: s3 } = S4("NO_MATCHING_KEY", `${this.name}: ${e2}`);
        throw this.logger.error(s3), new Error(s3);
      }
      return t;
    }
    async persist() {
      await this.setDataStore(this.values);
    }
    async restore() {
      try {
        const e2 = await this.getDataStore();
        if (typeof e2 > "u" || !e2.length) return;
        if (this.map.size) {
          const { message: t } = S4("RESTORE_WILL_OVERRIDE", this.name);
          throw this.logger.error(t), new Error(t);
        }
        this.cached = e2, this.logger.debug(`Successfully Restored value for ${this.name}`), this.logger.trace({ type: "method", method: "restore", value: this.values });
      } catch (e2) {
        this.logger.debug(`Failed to Restore value for ${this.name}`), this.logger.error(e2);
      }
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: e2 } = S4("NOT_INITIALIZED", this.name);
        throw new Error(e2);
      }
    }
  };
  var oi = class {
    constructor(e2, t) {
      this.core = e2, this.logger = t, this.name = gt5, this.version = yt4, this.events = new import_events12.default(), this.initialized = false, this.storagePrefix = x10, this.ignoredPayloadTypes = [D4], this.registeredMethods = [], this.init = async () => {
        this.initialized || (await this.pairings.init(), await this.cleanup(), this.registerRelayerEvents(), this.registerExpirerEvents(), this.initialized = true, this.logger.trace("Initialized"));
      }, this.register = ({ methods: s3 }) => {
        this.isInitialized(), this.registeredMethods = [.../* @__PURE__ */ new Set([...this.registeredMethods, ...s3])];
      }, this.create = async (s3) => {
        this.isInitialized();
        const i5 = pr2(), r3 = await this.core.crypto.setSymKey(i5), n6 = Mt3(import_time8.FIVE_MINUTES), a5 = { protocol: rt3 }, h8 = { topic: r3, expiry: n6, relay: a5, active: false, methods: s3?.methods }, c7 = Dr2({ protocol: this.core.protocol, version: this.core.version, topic: r3, symKey: i5, relay: a5, expiryTimestamp: n6, methods: s3?.methods });
        return this.events.emit(V5.create, h8), this.core.expirer.set(r3, n6), await this.pairings.set(r3, h8), await this.core.relayer.subscribe(r3, { transportType: s3?.transportType }), { topic: r3, uri: c7 };
      }, this.pair = async (s3) => {
        this.isInitialized();
        const i5 = this.core.eventClient.createEvent({ properties: { topic: s3?.uri, trace: [z8.pairing_started] } });
        this.isValidPair(s3, i5);
        const { topic: r3, symKey: n6, relay: a5, expiryTimestamp: h8, methods: c7 } = kr3(s3.uri);
        i5.props.properties.topic = r3, i5.addTrace(z8.pairing_uri_validation_success), i5.addTrace(z8.pairing_uri_not_expired);
        let l6;
        if (this.pairings.keys.includes(r3)) {
          if (l6 = this.pairings.get(r3), i5.addTrace(z8.existing_pairing), l6.active) throw i5.setError($5.active_pairing_already_exists), new Error(`Pairing already exists: ${r3}. Please try again with a new connection URI.`);
          i5.addTrace(z8.pairing_not_expired);
        }
        const p7 = h8 || Mt3(import_time8.FIVE_MINUTES), D7 = { topic: r3, relay: a5, expiry: p7, active: false, methods: c7 };
        this.core.expirer.set(r3, p7), await this.pairings.set(r3, D7), i5.addTrace(z8.store_new_pairing), s3.activatePairing && await this.activate({ topic: r3 }), this.events.emit(V5.create, D7), i5.addTrace(z8.emit_inactive_pairing), this.core.crypto.keychain.has(r3) || await this.core.crypto.setSymKey(n6, r3), i5.addTrace(z8.subscribing_pairing_topic);
        try {
          await this.core.relayer.confirmOnlineStateOrThrow();
        } catch {
          i5.setError($5.no_internet_connection);
        }
        try {
          await this.core.relayer.subscribe(r3, { relay: a5 });
        } catch (m3) {
          throw i5.setError($5.subscribe_pairing_topic_failure), m3;
        }
        return i5.addTrace(z8.subscribe_pairing_topic_success), D7;
      }, this.activate = async ({ topic: s3 }) => {
        this.isInitialized();
        const i5 = Mt3(import_time8.THIRTY_DAYS);
        this.core.expirer.set(s3, i5), await this.pairings.update(s3, { active: true, expiry: i5 });
      }, this.ping = async (s3) => {
        this.isInitialized(), await this.isValidPing(s3);
        const { topic: i5 } = s3;
        if (this.pairings.keys.includes(i5)) {
          const r3 = await this.sendRequest(i5, "wc_pairingPing", {}), { done: n6, resolve: a5, reject: h8 } = _t2();
          this.events.once(Lt2("pairing_ping", r3), ({ error: c7 }) => {
            c7 ? h8(c7) : a5();
          }), await n6();
        }
      }, this.updateExpiry = async ({ topic: s3, expiry: i5 }) => {
        this.isInitialized(), await this.pairings.update(s3, { expiry: i5 });
      }, this.updateMetadata = async ({ topic: s3, metadata: i5 }) => {
        this.isInitialized(), await this.pairings.update(s3, { peerMetadata: i5 });
      }, this.getPairings = () => (this.isInitialized(), this.pairings.values), this.disconnect = async (s3) => {
        this.isInitialized(), await this.isValidDisconnect(s3);
        const { topic: i5 } = s3;
        this.pairings.keys.includes(i5) && (await this.sendRequest(i5, "wc_pairingDelete", U4("USER_DISCONNECTED")), await this.deletePairing(i5));
      }, this.formatUriFromPairing = (s3) => {
        this.isInitialized();
        const { topic: i5, relay: r3, expiry: n6, methods: a5 } = s3, h8 = this.core.crypto.keychain.get(i5);
        return Dr2({ protocol: this.core.protocol, version: this.core.version, topic: i5, symKey: h8, relay: r3, expiryTimestamp: n6, methods: a5 });
      }, this.sendRequest = async (s3, i5, r3) => {
        const n6 = formatJsonRpcRequest(i5, r3), a5 = await this.core.crypto.encode(s3, n6), h8 = B5[i5].req;
        return this.core.history.set(s3, n6), this.core.relayer.publish(s3, a5, h8), n6.id;
      }, this.sendResult = async (s3, i5, r3) => {
        const n6 = formatJsonRpcResult(s3, r3), a5 = await this.core.crypto.encode(i5, n6), h8 = await this.core.history.get(i5, s3), c7 = B5[h8.request.method].res;
        await this.core.relayer.publish(i5, a5, c7), await this.core.history.resolve(n6);
      }, this.sendError = async (s3, i5, r3) => {
        const n6 = formatJsonRpcError(s3, r3), a5 = await this.core.crypto.encode(i5, n6), h8 = await this.core.history.get(i5, s3), c7 = B5[h8.request.method] ? B5[h8.request.method].res : B5.unregistered_method.res;
        await this.core.relayer.publish(i5, a5, c7), await this.core.history.resolve(n6);
      }, this.deletePairing = async (s3, i5) => {
        await this.core.relayer.unsubscribe(s3), await Promise.all([this.pairings.delete(s3, U4("USER_DISCONNECTED")), this.core.crypto.deleteSymKey(s3), i5 ? Promise.resolve() : this.core.expirer.del(s3)]);
      }, this.cleanup = async () => {
        const s3 = this.pairings.getAll().filter((i5) => Kt3(i5.expiry));
        await Promise.all(s3.map((i5) => this.deletePairing(i5.topic)));
      }, this.onRelayEventRequest = (s3) => {
        const { topic: i5, payload: r3 } = s3;
        switch (r3.method) {
          case "wc_pairingPing":
            return this.onPairingPingRequest(i5, r3);
          case "wc_pairingDelete":
            return this.onPairingDeleteRequest(i5, r3);
          default:
            return this.onUnknownRpcMethodRequest(i5, r3);
        }
      }, this.onRelayEventResponse = async (s3) => {
        const { topic: i5, payload: r3 } = s3, n6 = (await this.core.history.get(i5, r3.id)).request.method;
        switch (n6) {
          case "wc_pairingPing":
            return this.onPairingPingResponse(i5, r3);
          default:
            return this.onUnknownRpcMethodResponse(n6);
        }
      }, this.onPairingPingRequest = async (s3, i5) => {
        const { id: r3 } = i5;
        try {
          this.isValidPing({ topic: s3 }), await this.sendResult(r3, s3, true), this.events.emit(V5.ping, { id: r3, topic: s3 });
        } catch (n6) {
          await this.sendError(r3, s3, n6), this.logger.error(n6);
        }
      }, this.onPairingPingResponse = (s3, i5) => {
        const { id: r3 } = i5;
        setTimeout(() => {
          isJsonRpcResult(i5) ? this.events.emit(Lt2("pairing_ping", r3), {}) : isJsonRpcError(i5) && this.events.emit(Lt2("pairing_ping", r3), { error: i5.error });
        }, 500);
      }, this.onPairingDeleteRequest = async (s3, i5) => {
        const { id: r3 } = i5;
        try {
          this.isValidDisconnect({ topic: s3 }), await this.deletePairing(s3), this.events.emit(V5.delete, { id: r3, topic: s3 });
        } catch (n6) {
          await this.sendError(r3, s3, n6), this.logger.error(n6);
        }
      }, this.onUnknownRpcMethodRequest = async (s3, i5) => {
        const { id: r3, method: n6 } = i5;
        try {
          if (this.registeredMethods.includes(n6)) return;
          const a5 = U4("WC_METHOD_UNSUPPORTED", n6);
          await this.sendError(r3, s3, a5), this.logger.error(a5);
        } catch (a5) {
          await this.sendError(r3, s3, a5), this.logger.error(a5);
        }
      }, this.onUnknownRpcMethodResponse = (s3) => {
        this.registeredMethods.includes(s3) || this.logger.error(U4("WC_METHOD_UNSUPPORTED", s3));
      }, this.isValidPair = (s3, i5) => {
        var r3;
        if (!to2(s3)) {
          const { message: a5 } = S4("MISSING_OR_INVALID", `pair() params: ${s3}`);
          throw i5.setError($5.malformed_pairing_uri), new Error(a5);
        }
        if (!Gr2(s3.uri)) {
          const { message: a5 } = S4("MISSING_OR_INVALID", `pair() uri: ${s3.uri}`);
          throw i5.setError($5.malformed_pairing_uri), new Error(a5);
        }
        const n6 = kr3(s3?.uri);
        if (!((r3 = n6?.relay) != null && r3.protocol)) {
          const { message: a5 } = S4("MISSING_OR_INVALID", "pair() uri#relay-protocol");
          throw i5.setError($5.malformed_pairing_uri), new Error(a5);
        }
        if (!(n6 != null && n6.symKey)) {
          const { message: a5 } = S4("MISSING_OR_INVALID", "pair() uri#symKey");
          throw i5.setError($5.malformed_pairing_uri), new Error(a5);
        }
        if (n6 != null && n6.expiryTimestamp && (0, import_time8.toMiliseconds)(n6?.expiryTimestamp) < Date.now()) {
          i5.setError($5.pairing_expired);
          const { message: a5 } = S4("EXPIRED", "pair() URI has expired. Please try again with a new connection URI.");
          throw new Error(a5);
        }
      }, this.isValidPing = async (s3) => {
        if (!to2(s3)) {
          const { message: r3 } = S4("MISSING_OR_INVALID", `ping() params: ${s3}`);
          throw new Error(r3);
        }
        const { topic: i5 } = s3;
        await this.isValidPairingTopic(i5);
      }, this.isValidDisconnect = async (s3) => {
        if (!to2(s3)) {
          const { message: r3 } = S4("MISSING_OR_INVALID", `disconnect() params: ${s3}`);
          throw new Error(r3);
        }
        const { topic: i5 } = s3;
        await this.isValidPairingTopic(i5);
      }, this.isValidPairingTopic = async (s3) => {
        if (!b5(s3, false)) {
          const { message: i5 } = S4("MISSING_OR_INVALID", `pairing topic should be a string: ${s3}`);
          throw new Error(i5);
        }
        if (!this.pairings.keys.includes(s3)) {
          const { message: i5 } = S4("NO_MATCHING_KEY", `pairing topic doesn't exist: ${s3}`);
          throw new Error(i5);
        }
        if (Kt3(this.pairings.get(s3).expiry)) {
          await this.deletePairing(s3);
          const { message: i5 } = S4("EXPIRED", `pairing topic: ${s3}`);
          throw new Error(i5);
        }
      }, this.core = e2, this.logger = E4(t, this.name), this.pairings = new ni(this.core, this.logger, this.name, this.storagePrefix);
    }
    get context() {
      return y6(this.logger);
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: e2 } = S4("NOT_INITIALIZED", this.name);
        throw new Error(e2);
      }
    }
    registerRelayerEvents() {
      this.core.relayer.on(v10.message, async (e2) => {
        const { topic: t, message: s3, transportType: i5 } = e2;
        if (!this.pairings.keys.includes(t) || i5 === M8.link_mode || this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(s3))) return;
        const r3 = await this.core.crypto.decode(t, s3);
        try {
          isJsonRpcRequest(r3) ? (this.core.history.set(t, r3), this.onRelayEventRequest({ topic: t, payload: r3 })) : isJsonRpcResponse(r3) && (await this.core.history.resolve(r3), await this.onRelayEventResponse({ topic: t, payload: r3 }), this.core.history.delete(t, r3.id));
        } catch (n6) {
          this.logger.error(n6);
        }
      });
    }
    registerExpirerEvents() {
      this.core.expirer.on(S8.expired, async (e2) => {
        const { topic: t } = Vt3(e2.target);
        t && this.pairings.keys.includes(t) && (await this.deletePairing(t, true), this.events.emit(V5.expire, { topic: t }));
      });
    }
  };
  var ai = class extends h6 {
    constructor(e2, t) {
      super(e2, t), this.core = e2, this.logger = t, this.records = /* @__PURE__ */ new Map(), this.events = new import_events12.EventEmitter(), this.name = Dt5, this.version = mt2, this.cached = [], this.initialized = false, this.storagePrefix = x10, this.init = async () => {
        this.initialized || (this.logger.trace("Initialized"), await this.restore(), this.cached.forEach((s3) => this.records.set(s3.id, s3)), this.cached = [], this.registerEventListeners(), this.initialized = true);
      }, this.set = (s3, i5, r3) => {
        if (this.isInitialized(), this.logger.debug("Setting JSON-RPC request history record"), this.logger.trace({ type: "method", method: "set", topic: s3, request: i5, chainId: r3 }), this.records.has(i5.id)) return;
        const n6 = { id: i5.id, topic: s3, request: { method: i5.method, params: i5.params || null }, chainId: r3, expiry: Mt3(import_time8.THIRTY_DAYS) };
        this.records.set(n6.id, n6), this.persist(), this.events.emit(P6.created, n6);
      }, this.resolve = async (s3) => {
        if (this.isInitialized(), this.logger.debug("Updating JSON-RPC response history record"), this.logger.trace({ type: "method", method: "update", response: s3 }), !this.records.has(s3.id)) return;
        const i5 = await this.getRecord(s3.id);
        typeof i5.response > "u" && (i5.response = isJsonRpcError(s3) ? { error: s3.error } : { result: s3.result }, this.records.set(i5.id, i5), this.persist(), this.events.emit(P6.updated, i5));
      }, this.get = async (s3, i5) => (this.isInitialized(), this.logger.debug("Getting record"), this.logger.trace({ type: "method", method: "get", topic: s3, id: i5 }), await this.getRecord(i5)), this.delete = (s3, i5) => {
        this.isInitialized(), this.logger.debug("Deleting record"), this.logger.trace({ type: "method", method: "delete", id: i5 }), this.values.forEach((r3) => {
          if (r3.topic === s3) {
            if (typeof i5 < "u" && r3.id !== i5) return;
            this.records.delete(r3.id), this.events.emit(P6.deleted, r3);
          }
        }), this.persist();
      }, this.exists = async (s3, i5) => (this.isInitialized(), this.records.has(i5) ? (await this.getRecord(i5)).topic === s3 : false), this.on = (s3, i5) => {
        this.events.on(s3, i5);
      }, this.once = (s3, i5) => {
        this.events.once(s3, i5);
      }, this.off = (s3, i5) => {
        this.events.off(s3, i5);
      }, this.removeListener = (s3, i5) => {
        this.events.removeListener(s3, i5);
      }, this.logger = E4(t, this.name);
    }
    get context() {
      return y6(this.logger);
    }
    get storageKey() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//" + this.name;
    }
    get size() {
      return this.records.size;
    }
    get keys() {
      return Array.from(this.records.keys());
    }
    get values() {
      return Array.from(this.records.values());
    }
    get pending() {
      const e2 = [];
      return this.values.forEach((t) => {
        if (typeof t.response < "u") return;
        const s3 = { topic: t.topic, request: formatJsonRpcRequest(t.request.method, t.request.params, t.id), chainId: t.chainId };
        return e2.push(s3);
      }), e2;
    }
    async setJsonRpcRecords(e2) {
      await this.core.storage.setItem(this.storageKey, e2);
    }
    async getJsonRpcRecords() {
      return await this.core.storage.getItem(this.storageKey);
    }
    getRecord(e2) {
      this.isInitialized();
      const t = this.records.get(e2);
      if (!t) {
        const { message: s3 } = S4("NO_MATCHING_KEY", `${this.name}: ${e2}`);
        throw new Error(s3);
      }
      return t;
    }
    async persist() {
      await this.setJsonRpcRecords(this.values), this.events.emit(P6.sync);
    }
    async restore() {
      try {
        const e2 = await this.getJsonRpcRecords();
        if (typeof e2 > "u" || !e2.length) return;
        if (this.records.size) {
          const { message: t } = S4("RESTORE_WILL_OVERRIDE", this.name);
          throw this.logger.error(t), new Error(t);
        }
        this.cached = e2, this.logger.debug(`Successfully Restored records for ${this.name}`), this.logger.trace({ type: "method", method: "restore", records: this.values });
      } catch (e2) {
        this.logger.debug(`Failed to Restore records for ${this.name}`), this.logger.error(e2);
      }
    }
    registerEventListeners() {
      this.events.on(P6.created, (e2) => {
        const t = P6.created;
        this.logger.info(`Emitting ${t}`), this.logger.debug({ type: "event", event: t, record: e2 });
      }), this.events.on(P6.updated, (e2) => {
        const t = P6.updated;
        this.logger.info(`Emitting ${t}`), this.logger.debug({ type: "event", event: t, record: e2 });
      }), this.events.on(P6.deleted, (e2) => {
        const t = P6.deleted;
        this.logger.info(`Emitting ${t}`), this.logger.debug({ type: "event", event: t, record: e2 });
      }), this.core.heartbeat.on(r.pulse, () => {
        this.cleanup();
      });
    }
    cleanup() {
      try {
        this.isInitialized();
        let e2 = false;
        this.records.forEach((t) => {
          (0, import_time8.toMiliseconds)(t.expiry || 0) - Date.now() <= 0 && (this.logger.info(`Deleting expired history log: ${t.id}`), this.records.delete(t.id), this.events.emit(P6.deleted, t, false), e2 = true);
        }), e2 && this.persist();
      } catch (e2) {
        this.logger.warn(e2);
      }
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: e2 } = S4("NOT_INITIALIZED", this.name);
        throw new Error(e2);
      }
    }
  };
  var hi = class extends x9 {
    constructor(e2, t) {
      super(e2, t), this.core = e2, this.logger = t, this.expirations = /* @__PURE__ */ new Map(), this.events = new import_events12.EventEmitter(), this.name = bt4, this.version = ft3, this.cached = [], this.initialized = false, this.storagePrefix = x10, this.init = async () => {
        this.initialized || (this.logger.trace("Initialized"), await this.restore(), this.cached.forEach((s3) => this.expirations.set(s3.target, s3)), this.cached = [], this.registerEventListeners(), this.initialized = true);
      }, this.has = (s3) => {
        try {
          const i5 = this.formatTarget(s3);
          return typeof this.getExpiration(i5) < "u";
        } catch {
          return false;
        }
      }, this.set = (s3, i5) => {
        this.isInitialized();
        const r3 = this.formatTarget(s3), n6 = { target: r3, expiry: i5 };
        this.expirations.set(r3, n6), this.checkExpiry(r3, n6), this.events.emit(S8.created, { target: r3, expiration: n6 });
      }, this.get = (s3) => {
        this.isInitialized();
        const i5 = this.formatTarget(s3);
        return this.getExpiration(i5);
      }, this.del = (s3) => {
        if (this.isInitialized(), this.has(s3)) {
          const i5 = this.formatTarget(s3), r3 = this.getExpiration(i5);
          this.expirations.delete(i5), this.events.emit(S8.deleted, { target: i5, expiration: r3 });
        }
      }, this.on = (s3, i5) => {
        this.events.on(s3, i5);
      }, this.once = (s3, i5) => {
        this.events.once(s3, i5);
      }, this.off = (s3, i5) => {
        this.events.off(s3, i5);
      }, this.removeListener = (s3, i5) => {
        this.events.removeListener(s3, i5);
      }, this.logger = E4(t, this.name);
    }
    get context() {
      return y6(this.logger);
    }
    get storageKey() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//" + this.name;
    }
    get length() {
      return this.expirations.size;
    }
    get keys() {
      return Array.from(this.expirations.keys());
    }
    get values() {
      return Array.from(this.expirations.values());
    }
    formatTarget(e2) {
      if (typeof e2 == "string") return Dt3(e2);
      if (typeof e2 == "number") return xt2(e2);
      const { message: t } = S4("UNKNOWN_TYPE", `Target type: ${typeof e2}`);
      throw new Error(t);
    }
    async setExpirations(e2) {
      await this.core.storage.setItem(this.storageKey, e2);
    }
    async getExpirations() {
      return await this.core.storage.getItem(this.storageKey);
    }
    async persist() {
      await this.setExpirations(this.values), this.events.emit(S8.sync);
    }
    async restore() {
      try {
        const e2 = await this.getExpirations();
        if (typeof e2 > "u" || !e2.length) return;
        if (this.expirations.size) {
          const { message: t } = S4("RESTORE_WILL_OVERRIDE", this.name);
          throw this.logger.error(t), new Error(t);
        }
        this.cached = e2, this.logger.debug(`Successfully Restored expirations for ${this.name}`), this.logger.trace({ type: "method", method: "restore", expirations: this.values });
      } catch (e2) {
        this.logger.debug(`Failed to Restore expirations for ${this.name}`), this.logger.error(e2);
      }
    }
    getExpiration(e2) {
      const t = this.expirations.get(e2);
      if (!t) {
        const { message: s3 } = S4("NO_MATCHING_KEY", `${this.name}: ${e2}`);
        throw this.logger.warn(s3), new Error(s3);
      }
      return t;
    }
    checkExpiry(e2, t) {
      const { expiry: s3 } = t;
      (0, import_time8.toMiliseconds)(s3) - Date.now() <= 0 && this.expire(e2, t);
    }
    expire(e2, t) {
      this.expirations.delete(e2), this.events.emit(S8.expired, { target: e2, expiration: t });
    }
    checkExpirations() {
      this.core.relayer.connected && this.expirations.forEach((e2, t) => this.checkExpiry(t, e2));
    }
    registerEventListeners() {
      this.core.heartbeat.on(r.pulse, () => this.checkExpirations()), this.events.on(S8.created, (e2) => {
        const t = S8.created;
        this.logger.info(`Emitting ${t}`), this.logger.debug({ type: "event", event: t, data: e2 }), this.persist();
      }), this.events.on(S8.expired, (e2) => {
        const t = S8.expired;
        this.logger.info(`Emitting ${t}`), this.logger.debug({ type: "event", event: t, data: e2 }), this.persist();
      }), this.events.on(S8.deleted, (e2) => {
        const t = S8.deleted;
        this.logger.info(`Emitting ${t}`), this.logger.debug({ type: "event", event: t, data: e2 }), this.persist();
      });
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: e2 } = S4("NOT_INITIALIZED", this.name);
        throw new Error(e2);
      }
    }
  };
  var ci = class extends y8 {
    constructor(e2, t, s3) {
      super(e2, t, s3), this.core = e2, this.logger = t, this.store = s3, this.name = _t4, this.verifyUrlV3 = vt4, this.storagePrefix = x10, this.version = De4, this.init = async () => {
        var i5;
        this.isDevEnv || (this.publicKey = await this.store.getItem(this.storeKey), this.publicKey && (0, import_time8.toMiliseconds)((i5 = this.publicKey) == null ? void 0 : i5.expiresAt) < Date.now() && (this.logger.debug("verify v2 public key expired"), await this.removePublicKey()));
      }, this.register = async (i5) => {
        if (!V3() || this.isDevEnv) return;
        const r3 = window.location.origin, { id: n6, decryptedId: a5 } = i5, h8 = `${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${r3}&id=${n6}&decryptedId=${a5}`;
        try {
          const c7 = (0, import_window_getters4.getDocument)(), l6 = this.startAbortTimer(import_time8.ONE_SECOND * 5), p7 = await new Promise((D7, m3) => {
            const u4 = () => {
              window.removeEventListener("message", _6), c7.body.removeChild(g8), m3("attestation aborted");
            };
            this.abortController.signal.addEventListener("abort", u4);
            const g8 = c7.createElement("iframe");
            g8.src = h8, g8.style.display = "none", g8.addEventListener("error", u4, { signal: this.abortController.signal });
            const _6 = (y11) => {
              if (y11.data && typeof y11.data == "string") try {
                const b9 = JSON.parse(y11.data);
                if (b9.type === "verify_attestation") {
                  if (decodeJWT(b9.attestation).payload.id !== n6) return;
                  clearInterval(l6), c7.body.removeChild(g8), this.abortController.signal.removeEventListener("abort", u4), window.removeEventListener("message", _6), D7(b9.attestation === null ? "" : b9.attestation);
                }
              } catch (b9) {
                this.logger.warn(b9);
              }
            };
            c7.body.appendChild(g8), window.addEventListener("message", _6, { signal: this.abortController.signal });
          });
          return this.logger.debug("jwt attestation", p7), p7;
        } catch (c7) {
          this.logger.warn(c7);
        }
        return "";
      }, this.resolve = async (i5) => {
        if (this.isDevEnv) return "";
        const { attestationId: r3, hash: n6, encryptedId: a5 } = i5;
        if (r3 === "") {
          this.logger.debug("resolve: attestationId is empty, skipping");
          return;
        }
        if (r3) {
          if (decodeJWT(r3).payload.id !== a5) return;
          const c7 = await this.isValidJwtAttestation(r3);
          if (c7) {
            if (!c7.isVerified) {
              this.logger.warn("resolve: jwt attestation: origin url not verified");
              return;
            }
            return c7;
          }
        }
        if (!n6) return;
        const h8 = this.getVerifyUrl(i5?.verifyUrl);
        return this.fetchAttestation(n6, h8);
      }, this.fetchAttestation = async (i5, r3) => {
        this.logger.debug(`resolving attestation: ${i5} from url: ${r3}`);
        const n6 = this.startAbortTimer(import_time8.ONE_SECOND * 5), a5 = await fetch(`${r3}/attestation/${i5}?v2Supported=true`, { signal: this.abortController.signal });
        return clearTimeout(n6), a5.status === 200 ? await a5.json() : void 0;
      }, this.getVerifyUrl = (i5) => {
        let r3 = i5 || J4;
        return wt3.includes(r3) || (this.logger.info(`verify url: ${r3}, not included in trusted list, assigning default: ${J4}`), r3 = J4), r3;
      }, this.fetchPublicKey = async () => {
        try {
          this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);
          const i5 = this.startAbortTimer(import_time8.FIVE_SECONDS), r3 = await fetch(`${this.verifyUrlV3}/public-key`, { signal: this.abortController.signal });
          return clearTimeout(i5), await r3.json();
        } catch (i5) {
          this.logger.warn(i5);
        }
      }, this.persistPublicKey = async (i5) => {
        this.logger.debug("persisting public key to local storage", i5), await this.store.setItem(this.storeKey, i5), this.publicKey = i5;
      }, this.removePublicKey = async () => {
        this.logger.debug("removing verify v2 public key from storage"), await this.store.removeItem(this.storeKey), this.publicKey = void 0;
      }, this.isValidJwtAttestation = async (i5) => {
        const r3 = await this.getPublicKey();
        try {
          if (r3) return this.validateAttestation(i5, r3);
        } catch (a5) {
          this.logger.error(a5), this.logger.warn("error validating attestation");
        }
        const n6 = await this.fetchAndPersistPublicKey();
        try {
          if (n6) return this.validateAttestation(i5, n6);
        } catch (a5) {
          this.logger.error(a5), this.logger.warn("error validating attestation");
        }
      }, this.getPublicKey = async () => this.publicKey ? this.publicKey : await this.fetchAndPersistPublicKey(), this.fetchAndPersistPublicKey = async () => {
        if (this.fetchPromise) return await this.fetchPromise, this.publicKey;
        this.fetchPromise = new Promise(async (r3) => {
          const n6 = await this.fetchPublicKey();
          n6 && (await this.persistPublicKey(n6), r3(n6));
        });
        const i5 = await this.fetchPromise;
        return this.fetchPromise = void 0, i5;
      }, this.validateAttestation = (i5, r3) => {
        const n6 = Rr3(i5, r3.publicKey), a5 = { hasExpired: (0, import_time8.toMiliseconds)(n6.exp) < Date.now(), payload: n6 };
        if (a5.hasExpired) throw this.logger.warn("resolve: jwt attestation expired"), new Error("JWT attestation expired");
        return { origin: a5.payload.origin, isScam: a5.payload.isScam, isVerified: a5.payload.isVerified };
      }, this.logger = E4(t, this.name), this.abortController = new AbortController(), this.isDevEnv = Wt4(), this.init();
    }
    get storeKey() {
      return this.storagePrefix + this.version + this.core.customStoragePrefix + "//verify:public:key";
    }
    get context() {
      return y6(this.logger);
    }
    startAbortTimer(e2) {
      return this.abortController = new AbortController(), setTimeout(() => this.abortController.abort(), (0, import_time8.toMiliseconds)(e2));
    }
  };
  var li = class extends v9 {
    constructor(e2, t) {
      super(e2, t), this.projectId = e2, this.logger = t, this.context = It4, this.registerDeviceToken = async (s3) => {
        const { clientId: i5, token: r3, notificationType: n6, enableEncrypted: a5 = false } = s3, h8 = `${Tt5}/${this.projectId}/clients`;
        await fetch(h8, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ client_id: i5, type: n6, token: r3, always_raw: a5 }) });
      }, this.logger = E4(t, this.context);
    }
  };
  var dn2 = Object.defineProperty;
  var ui = Object.getOwnPropertySymbols;
  var pn = Object.prototype.hasOwnProperty;
  var gn4 = Object.prototype.propertyIsEnumerable;
  var di = (o5, e2, t) => e2 in o5 ? dn2(o5, e2, { enumerable: true, configurable: true, writable: true, value: t }) : o5[e2] = t;
  var Z4 = (o5, e2) => {
    for (var t in e2 || (e2 = {})) pn.call(e2, t) && di(o5, t, e2[t]);
    if (ui) for (var t of ui(e2)) gn4.call(e2, t) && di(o5, t, e2[t]);
    return o5;
  };
  var pi = class extends C7 {
    constructor(e2, t, s3 = true) {
      super(e2, t, s3), this.core = e2, this.logger = t, this.context = Pt4, this.storagePrefix = x10, this.storageVersion = Ct2, this.events = /* @__PURE__ */ new Map(), this.shouldPersist = false, this.init = async () => {
        if (!Wt4()) try {
          const i5 = { eventId: Ht3(), timestamp: Date.now(), domain: this.getAppDomain(), props: { event: "INIT", type: "", properties: { client_id: await this.core.crypto.getClientId(), user_agent: Ge4(this.core.relayer.protocol, this.core.relayer.version, se4) } } };
          await this.sendEvent([i5]);
        } catch (i5) {
          this.logger.warn(i5);
        }
      }, this.createEvent = (i5) => {
        const { event: r3 = "ERROR", type: n6 = "", properties: { topic: a5, trace: h8 } } = i5, c7 = Ht3(), l6 = this.core.projectId || "", p7 = Date.now(), D7 = Z4({ eventId: c7, timestamp: p7, props: { event: r3, type: n6, properties: { topic: a5, trace: h8 } }, bundleId: l6, domain: this.getAppDomain() }, this.setMethods(c7));
        return this.telemetryEnabled && (this.events.set(c7, D7), this.shouldPersist = true), D7;
      }, this.getEvent = (i5) => {
        const { eventId: r3, topic: n6 } = i5;
        if (r3) return this.events.get(r3);
        const a5 = Array.from(this.events.values()).find((h8) => h8.props.properties.topic === n6);
        if (a5) return Z4(Z4({}, a5), this.setMethods(a5.eventId));
      }, this.deleteEvent = (i5) => {
        const { eventId: r3 } = i5;
        this.events.delete(r3), this.shouldPersist = true;
      }, this.setEventListeners = () => {
        this.core.heartbeat.on(r.pulse, async () => {
          this.shouldPersist && await this.persist(), this.events.forEach((i5) => {
            (0, import_time8.fromMiliseconds)(Date.now()) - (0, import_time8.fromMiliseconds)(i5.timestamp) > St4 && (this.events.delete(i5.eventId), this.shouldPersist = true);
          });
        });
      }, this.setMethods = (i5) => ({ addTrace: (r3) => this.addTrace(i5, r3), setError: (r3) => this.setError(i5, r3) }), this.addTrace = (i5, r3) => {
        const n6 = this.events.get(i5);
        n6 && (n6.props.properties.trace.push(r3), this.events.set(i5, n6), this.shouldPersist = true);
      }, this.setError = (i5, r3) => {
        const n6 = this.events.get(i5);
        n6 && (n6.props.type = r3, n6.timestamp = Date.now(), this.events.set(i5, n6), this.shouldPersist = true);
      }, this.persist = async () => {
        await this.core.storage.setItem(this.storageKey, Array.from(this.events.values())), this.shouldPersist = false;
      }, this.restore = async () => {
        try {
          const i5 = await this.core.storage.getItem(this.storageKey) || [];
          if (!i5.length) return;
          i5.forEach((r3) => {
            this.events.set(r3.eventId, Z4(Z4({}, r3), this.setMethods(r3.eventId)));
          });
        } catch (i5) {
          this.logger.warn(i5);
        }
      }, this.submit = async () => {
        if (!this.telemetryEnabled || this.events.size === 0) return;
        const i5 = [];
        for (const [r3, n6] of this.events) n6.props.type && i5.push(n6);
        if (i5.length !== 0) try {
          if ((await this.sendEvent(i5)).ok) for (const r3 of i5) this.events.delete(r3.eventId), this.shouldPersist = true;
        } catch (r3) {
          this.logger.warn(r3);
        }
      }, this.sendEvent = async (i5) => {
        const r3 = this.getAppDomain() ? "" : "&sp=desktop";
        return await fetch(`${Rt4}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${se4}${r3}`, { method: "POST", body: JSON.stringify(i5) });
      }, this.getAppDomain = () => Nt2().url, this.logger = E4(t, this.context), this.telemetryEnabled = s3, s3 ? this.restore().then(async () => {
        await this.submit(), this.setEventListeners();
      }) : this.persist();
    }
    get storageKey() {
      return this.storagePrefix + this.storageVersion + this.core.customStoragePrefix + "//" + this.context;
    }
  };
  var yn3 = Object.defineProperty;
  var gi = Object.getOwnPropertySymbols;
  var Dn = Object.prototype.hasOwnProperty;
  var mn2 = Object.prototype.propertyIsEnumerable;
  var yi = (o5, e2, t) => e2 in o5 ? yn3(o5, e2, { enumerable: true, configurable: true, writable: true, value: t }) : o5[e2] = t;
  var Di = (o5, e2) => {
    for (var t in e2 || (e2 = {})) Dn.call(e2, t) && yi(o5, t, e2[t]);
    if (gi) for (var t of gi(e2)) mn2.call(e2, t) && yi(o5, t, e2[t]);
    return o5;
  };
  var ne6 = class _ne extends n5 {
    constructor(e2) {
      var t;
      super(e2), this.protocol = ye6, this.version = De4, this.name = ie5, this.events = new import_events12.EventEmitter(), this.initialized = false, this.on = (n6, a5) => this.events.on(n6, a5), this.once = (n6, a5) => this.events.once(n6, a5), this.off = (n6, a5) => this.events.off(n6, a5), this.removeListener = (n6, a5) => this.events.removeListener(n6, a5), this.dispatchEnvelope = ({ topic: n6, message: a5, sessionExists: h8 }) => {
        if (!n6 || !a5) return;
        const c7 = { topic: n6, message: a5, publishedAt: Date.now(), transportType: M8.link_mode };
        this.relayer.onLinkMessageEvent(c7, { sessionExists: h8 });
      }, this.projectId = e2?.projectId, this.relayUrl = e2?.relayUrl || be6, this.customStoragePrefix = e2 != null && e2.customStoragePrefix ? `:${e2.customStoragePrefix}` : "";
      const s3 = k4({ level: typeof e2?.logger == "string" && e2.logger ? e2.logger : Ye4.logger }), { logger: i5, chunkLoggerController: r3 } = A4({ opts: s3, maxSizeInBytes: e2?.maxLogBlobSizeInBytes, loggerOverride: e2?.logger });
      this.logChunkController = r3, (t = this.logChunkController) != null && t.downloadLogsBlobInBrowser && (window.downloadLogsBlobInBrowser = async () => {
        var n6, a5;
        (n6 = this.logChunkController) != null && n6.downloadLogsBlobInBrowser && ((a5 = this.logChunkController) == null || a5.downloadLogsBlobInBrowser({ clientId: await this.crypto.getClientId() }));
      }), this.logger = E4(i5, this.name), this.heartbeat = new i(), this.crypto = new Ht5(this, this.logger, e2?.keychain), this.history = new ai(this, this.logger), this.expirer = new hi(this, this.logger), this.storage = e2 != null && e2.storage ? e2.storage : new h2(Di(Di({}, Je5), e2?.storageOptions)), this.relayer = new ti({ core: this, logger: this.logger, relayUrl: this.relayUrl, projectId: this.projectId }), this.pairing = new oi(this, this.logger), this.verify = new ci(this, this.logger, this.storage), this.echoClient = new li(this.projectId || "", this.logger), this.linkModeSupportedApps = [], this.eventClient = new pi(this, this.logger, e2?.telemetryEnabled);
    }
    static async init(e2) {
      const t = new _ne(e2);
      await t.initialize();
      const s3 = await t.crypto.getClientId();
      return await t.storage.setItem(lt4, s3), t;
    }
    get context() {
      return y6(this.logger);
    }
    async start() {
      this.initialized || await this.initialize();
    }
    async getLogsBlob() {
      var e2;
      return (e2 = this.logChunkController) == null ? void 0 : e2.logsToBlob({ clientId: await this.crypto.getClientId() });
    }
    async addLinkModeSupportedApp(e2) {
      this.linkModeSupportedApps.includes(e2) || (this.linkModeSupportedApps.push(e2), await this.storage.setItem(fe7, this.linkModeSupportedApps));
    }
    async initialize() {
      this.logger.trace("Initialized");
      try {
        await this.crypto.init(), await this.history.init(), await this.expirer.init(), await this.relayer.init(), await this.heartbeat.init(), await this.pairing.init(), this.eventClient.init(), this.linkModeSupportedApps = await this.storage.getItem(fe7) || [], this.initialized = true, this.logger.info("Core Initialization Success");
      } catch (e2) {
        throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`, e2), this.logger.error(e2.message), e2;
      }
    }
  };
  var bn3 = ne6;

  // ../../node_modules/.pnpm/@walletconnect+sign-client@2.17.1_bufferutil@4.1.0/node_modules/@walletconnect/sign-client/dist/index.es.js
  var import_events13 = __toESM(require_events());
  var import_time9 = __toESM(require_cjs());
  var be7 = "wc";
  var Ce8 = 2;
  var Le5 = "client";
  var ye7 = `${be7}@${Ce8}:${Le5}:`;
  var we7 = { name: Le5, logger: "error", controller: false, relayUrl: "wss://relay.walletconnect.org" };
  var xe4 = "WALLETCONNECT_DEEPLINK_CHOICE";
  var st4 = "proposal";
  var it6 = "Proposal expired";
  var rt4 = "session";
  var z9 = import_time9.SEVEN_DAYS;
  var nt4 = "engine";
  var v11 = { wc_sessionPropose: { req: { ttl: import_time9.FIVE_MINUTES, prompt: true, tag: 1100 }, res: { ttl: import_time9.FIVE_MINUTES, prompt: false, tag: 1101 }, reject: { ttl: import_time9.FIVE_MINUTES, prompt: false, tag: 1120 }, autoReject: { ttl: import_time9.FIVE_MINUTES, prompt: false, tag: 1121 } }, wc_sessionSettle: { req: { ttl: import_time9.FIVE_MINUTES, prompt: false, tag: 1102 }, res: { ttl: import_time9.FIVE_MINUTES, prompt: false, tag: 1103 } }, wc_sessionUpdate: { req: { ttl: import_time9.ONE_DAY, prompt: false, tag: 1104 }, res: { ttl: import_time9.ONE_DAY, prompt: false, tag: 1105 } }, wc_sessionExtend: { req: { ttl: import_time9.ONE_DAY, prompt: false, tag: 1106 }, res: { ttl: import_time9.ONE_DAY, prompt: false, tag: 1107 } }, wc_sessionRequest: { req: { ttl: import_time9.FIVE_MINUTES, prompt: true, tag: 1108 }, res: { ttl: import_time9.FIVE_MINUTES, prompt: false, tag: 1109 } }, wc_sessionEvent: { req: { ttl: import_time9.FIVE_MINUTES, prompt: true, tag: 1110 }, res: { ttl: import_time9.FIVE_MINUTES, prompt: false, tag: 1111 } }, wc_sessionDelete: { req: { ttl: import_time9.ONE_DAY, prompt: false, tag: 1112 }, res: { ttl: import_time9.ONE_DAY, prompt: false, tag: 1113 } }, wc_sessionPing: { req: { ttl: import_time9.ONE_DAY, prompt: false, tag: 1114 }, res: { ttl: import_time9.ONE_DAY, prompt: false, tag: 1115 } }, wc_sessionAuthenticate: { req: { ttl: import_time9.ONE_HOUR, prompt: true, tag: 1116 }, res: { ttl: import_time9.ONE_HOUR, prompt: false, tag: 1117 }, reject: { ttl: import_time9.FIVE_MINUTES, prompt: false, tag: 1118 }, autoReject: { ttl: import_time9.FIVE_MINUTES, prompt: false, tag: 1119 } } };
  var me7 = { min: import_time9.FIVE_MINUTES, max: import_time9.SEVEN_DAYS };
  var x11 = { idle: "IDLE", active: "ACTIVE" };
  var ot3 = "request";
  var at4 = ["wc_sessionPropose", "wc_sessionRequest", "wc_authRequest", "wc_sessionAuthenticate"];
  var ct5 = "wc";
  var lt5 = "auth";
  var pt4 = "authKeys";
  var ht4 = "pairingTopics";
  var dt5 = "requests";
  var oe5 = `${ct5}@${1.5}:${lt5}:`;
  var ae6 = `${oe5}:PUB_KEY`;
  var ys2 = Object.defineProperty;
  var ws = Object.defineProperties;
  var ms = Object.getOwnPropertyDescriptors;
  var ut6 = Object.getOwnPropertySymbols;
  var _s = Object.prototype.hasOwnProperty;
  var Es = Object.prototype.propertyIsEnumerable;
  var gt6 = (q7, o5, e2) => o5 in q7 ? ys2(q7, o5, { enumerable: true, configurable: true, writable: true, value: e2 }) : q7[o5] = e2;
  var I6 = (q7, o5) => {
    for (var e2 in o5 || (o5 = {})) _s.call(o5, e2) && gt6(q7, e2, o5[e2]);
    if (ut6) for (var e2 of ut6(o5)) Es.call(o5, e2) && gt6(q7, e2, o5[e2]);
    return q7;
  };
  var D5 = (q7, o5) => ws(q7, ms(o5));
  var Rs2 = class extends M7 {
    constructor(o5) {
      super(o5), this.name = nt4, this.events = new import_events13.default(), this.initialized = false, this.requestQueue = { state: x11.idle, queue: [] }, this.sessionRequestQueue = { state: x11.idle, queue: [] }, this.requestQueueDelay = import_time9.ONE_SECOND, this.expectedPairingMethodMap = /* @__PURE__ */ new Map(), this.recentlyDeletedMap = /* @__PURE__ */ new Map(), this.recentlyDeletedLimit = 200, this.relayMessageCache = [], this.init = async () => {
        this.initialized || (await this.cleanup(), this.registerRelayerEvents(), this.registerExpirerEvents(), this.registerPairingEvents(), await this.registerLinkModeListeners(), this.client.core.pairing.register({ methods: Object.keys(v11) }), this.initialized = true, setTimeout(() => {
          this.sessionRequestQueue.queue = this.getPendingSessionRequests(), this.processSessionRequestQueue();
        }, (0, import_time9.toMiliseconds)(this.requestQueueDelay)));
      }, this.connect = async (e2) => {
        this.isInitialized(), await this.confirmOnlineStateOrThrow();
        const t = D5(I6({}, e2), { requiredNamespaces: e2.requiredNamespaces || {}, optionalNamespaces: e2.optionalNamespaces || {} });
        await this.isValidConnect(t);
        const { pairingTopic: s3, requiredNamespaces: i5, optionalNamespaces: r3, sessionProperties: n6, relays: a5 } = t;
        let c7 = s3, h8, p7 = false;
        try {
          c7 && (p7 = this.client.core.pairing.pairings.get(c7).active);
        } catch (E6) {
          throw this.client.logger.error(`connect() -> pairing.get(${c7}) failed`), E6;
        }
        if (!c7 || !p7) {
          const { topic: E6, uri: S10 } = await this.client.core.pairing.create();
          c7 = E6, h8 = S10;
        }
        if (!c7) {
          const { message: E6 } = S4("NO_MATCHING_KEY", `connect() pairing topic: ${c7}`);
          throw new Error(E6);
        }
        const d6 = await this.client.core.crypto.generateKeyPair(), l6 = v11.wc_sessionPropose.req.ttl || import_time9.FIVE_MINUTES, w7 = Mt3(l6), m3 = I6({ requiredNamespaces: i5, optionalNamespaces: r3, relays: a5 ?? [{ protocol: rt3 }], proposer: { publicKey: d6, metadata: this.client.metadata }, expiryTimestamp: w7, pairingTopic: c7 }, n6 && { sessionProperties: n6 }), { reject: y11, resolve: _6, done: R6 } = _t2(l6, it6);
        this.events.once(Lt2("session_connect"), async ({ error: E6, session: S10 }) => {
          if (E6) y11(E6);
          else if (S10) {
            S10.self.publicKey = d6;
            const M9 = D5(I6({}, S10), { pairingTopic: m3.pairingTopic, requiredNamespaces: m3.requiredNamespaces, optionalNamespaces: m3.optionalNamespaces, transportType: M8.relay });
            await this.client.session.set(S10.topic, M9), await this.setExpiry(S10.topic, S10.expiry), c7 && await this.client.core.pairing.updateMetadata({ topic: c7, metadata: S10.peer.metadata }), this.cleanupDuplicatePairings(M9), _6(M9);
          }
        });
        const V7 = await this.sendRequest({ topic: c7, method: "wc_sessionPropose", params: m3, throwOnFailedPublish: true });
        return await this.setProposal(V7, I6({ id: V7 }, m3)), { uri: h8, approval: R6 };
      }, this.pair = async (e2) => {
        this.isInitialized(), await this.confirmOnlineStateOrThrow();
        try {
          return await this.client.core.pairing.pair(e2);
        } catch (t) {
          throw this.client.logger.error("pair() failed"), t;
        }
      }, this.approve = async (e2) => {
        var t, s3, i5;
        const r3 = this.client.core.eventClient.createEvent({ properties: { topic: (t = e2?.id) == null ? void 0 : t.toString(), trace: [Is.session_approve_started] } });
        try {
          this.isInitialized(), await this.confirmOnlineStateOrThrow();
        } catch (N13) {
          throw r3.setError(Ts.no_internet_connection), N13;
        }
        try {
          await this.isValidProposalId(e2?.id);
        } catch (N13) {
          throw this.client.logger.error(`approve() -> proposal.get(${e2?.id}) failed`), r3.setError(Ts.proposal_not_found), N13;
        }
        try {
          await this.isValidApprove(e2);
        } catch (N13) {
          throw this.client.logger.error("approve() -> isValidApprove() failed"), r3.setError(Ts.session_approve_namespace_validation_failure), N13;
        }
        const { id: n6, relayProtocol: a5, namespaces: c7, sessionProperties: h8, sessionConfig: p7 } = e2, d6 = this.client.proposal.get(n6);
        this.client.core.eventClient.deleteEvent({ eventId: r3.eventId });
        const { pairingTopic: l6, proposer: w7, requiredNamespaces: m3, optionalNamespaces: y11 } = d6;
        let _6 = (s3 = this.client.core.eventClient) == null ? void 0 : s3.getEvent({ topic: l6 });
        _6 || (_6 = (i5 = this.client.core.eventClient) == null ? void 0 : i5.createEvent({ type: Is.session_approve_started, properties: { topic: l6, trace: [Is.session_approve_started, Is.session_namespaces_validation_success] } }));
        const R6 = await this.client.core.crypto.generateKeyPair(), V7 = w7.publicKey, E6 = await this.client.core.crypto.generateSharedKey(R6, V7), S10 = I6(I6({ relay: { protocol: a5 ?? "irn" }, namespaces: c7, controller: { publicKey: R6, metadata: this.client.metadata }, expiry: Mt3(z9) }, h8 && { sessionProperties: h8 }), p7 && { sessionConfig: p7 }), M9 = M8.relay;
        _6.addTrace(Is.subscribing_session_topic);
        try {
          await this.client.core.relayer.subscribe(E6, { transportType: M9 });
        } catch (N13) {
          throw _6.setError(Ts.subscribe_session_topic_failure), N13;
        }
        _6.addTrace(Is.subscribe_session_topic_success);
        const W8 = D5(I6({}, S10), { topic: E6, requiredNamespaces: m3, optionalNamespaces: y11, pairingTopic: l6, acknowledged: false, self: S10.controller, peer: { publicKey: w7.publicKey, metadata: w7.metadata }, controller: R6, transportType: M8.relay });
        await this.client.session.set(E6, W8), _6.addTrace(Is.store_session);
        try {
          _6.addTrace(Is.publishing_session_settle), await this.sendRequest({ topic: E6, method: "wc_sessionSettle", params: S10, throwOnFailedPublish: true }).catch((N13) => {
            throw _6?.setError(Ts.session_settle_publish_failure), N13;
          }), _6.addTrace(Is.session_settle_publish_success), _6.addTrace(Is.publishing_session_approve), await this.sendResult({ id: n6, topic: l6, result: { relay: { protocol: a5 ?? "irn" }, responderPublicKey: R6 }, throwOnFailedPublish: true }).catch((N13) => {
            throw _6?.setError(Ts.session_approve_publish_failure), N13;
          }), _6.addTrace(Is.session_approve_publish_success);
        } catch (N13) {
          throw this.client.logger.error(N13), this.client.session.delete(E6, U4("USER_DISCONNECTED")), await this.client.core.relayer.unsubscribe(E6), N13;
        }
        return this.client.core.eventClient.deleteEvent({ eventId: _6.eventId }), await this.client.core.pairing.updateMetadata({ topic: l6, metadata: w7.metadata }), await this.client.proposal.delete(n6, U4("USER_DISCONNECTED")), await this.client.core.pairing.activate({ topic: l6 }), await this.setExpiry(E6, Mt3(z9)), { topic: E6, acknowledged: () => Promise.resolve(this.client.session.get(E6)) };
      }, this.reject = async (e2) => {
        this.isInitialized(), await this.confirmOnlineStateOrThrow();
        try {
          await this.isValidReject(e2);
        } catch (r3) {
          throw this.client.logger.error("reject() -> isValidReject() failed"), r3;
        }
        const { id: t, reason: s3 } = e2;
        let i5;
        try {
          i5 = this.client.proposal.get(t).pairingTopic;
        } catch (r3) {
          throw this.client.logger.error(`reject() -> proposal.get(${t}) failed`), r3;
        }
        i5 && (await this.sendError({ id: t, topic: i5, error: s3, rpcOpts: v11.wc_sessionPropose.reject }), await this.client.proposal.delete(t, U4("USER_DISCONNECTED")));
      }, this.update = async (e2) => {
        this.isInitialized(), await this.confirmOnlineStateOrThrow();
        try {
          await this.isValidUpdate(e2);
        } catch (p7) {
          throw this.client.logger.error("update() -> isValidUpdate() failed"), p7;
        }
        const { topic: t, namespaces: s3 } = e2, { done: i5, resolve: r3, reject: n6 } = _t2(), a5 = payloadId(), c7 = getBigIntRpcId().toString(), h8 = this.client.session.get(t).namespaces;
        return this.events.once(Lt2("session_update", a5), ({ error: p7 }) => {
          p7 ? n6(p7) : r3();
        }), await this.client.session.update(t, { namespaces: s3 }), await this.sendRequest({ topic: t, method: "wc_sessionUpdate", params: { namespaces: s3 }, throwOnFailedPublish: true, clientRpcId: a5, relayRpcId: c7 }).catch((p7) => {
          this.client.logger.error(p7), this.client.session.update(t, { namespaces: h8 }), n6(p7);
        }), { acknowledged: i5 };
      }, this.extend = async (e2) => {
        this.isInitialized(), await this.confirmOnlineStateOrThrow();
        try {
          await this.isValidExtend(e2);
        } catch (a5) {
          throw this.client.logger.error("extend() -> isValidExtend() failed"), a5;
        }
        const { topic: t } = e2, s3 = payloadId(), { done: i5, resolve: r3, reject: n6 } = _t2();
        return this.events.once(Lt2("session_extend", s3), ({ error: a5 }) => {
          a5 ? n6(a5) : r3();
        }), await this.setExpiry(t, Mt3(z9)), this.sendRequest({ topic: t, method: "wc_sessionExtend", params: {}, clientRpcId: s3, throwOnFailedPublish: true }).catch((a5) => {
          n6(a5);
        }), { acknowledged: i5 };
      }, this.request = async (e2) => {
        this.isInitialized();
        try {
          await this.isValidRequest(e2);
        } catch (w7) {
          throw this.client.logger.error("request() -> isValidRequest() failed"), w7;
        }
        const { chainId: t, request: s3, topic: i5, expiry: r3 = v11.wc_sessionRequest.req.ttl } = e2, n6 = this.client.session.get(i5);
        n6?.transportType === M8.relay && await this.confirmOnlineStateOrThrow();
        const a5 = payloadId(), c7 = getBigIntRpcId().toString(), { done: h8, resolve: p7, reject: d6 } = _t2(r3, "Request expired. Please try again.");
        this.events.once(Lt2("session_request", a5), ({ error: w7, result: m3 }) => {
          w7 ? d6(w7) : p7(m3);
        });
        const l6 = this.getAppLinkIfEnabled(n6.peer.metadata, n6.transportType);
        return l6 ? (await this.sendRequest({ clientRpcId: a5, relayRpcId: c7, topic: i5, method: "wc_sessionRequest", params: { request: D5(I6({}, s3), { expiryTimestamp: Mt3(r3) }), chainId: t }, expiry: r3, throwOnFailedPublish: true, appLink: l6 }).catch((w7) => d6(w7)), this.client.events.emit("session_request_sent", { topic: i5, request: s3, chainId: t, id: a5 }), await h8()) : await Promise.all([new Promise(async (w7) => {
          await this.sendRequest({ clientRpcId: a5, relayRpcId: c7, topic: i5, method: "wc_sessionRequest", params: { request: D5(I6({}, s3), { expiryTimestamp: Mt3(r3) }), chainId: t }, expiry: r3, throwOnFailedPublish: true }).catch((m3) => d6(m3)), this.client.events.emit("session_request_sent", { topic: i5, request: s3, chainId: t, id: a5 }), w7();
        }), new Promise(async (w7) => {
          var m3;
          if (!((m3 = n6.sessionConfig) != null && m3.disableDeepLink)) {
            const y11 = await qt3(this.client.core.storage, xe4);
            await Ft3({ id: a5, topic: i5, wcDeepLink: y11 });
          }
          w7();
        }), h8()]).then((w7) => w7[2]);
      }, this.respond = async (e2) => {
        this.isInitialized(), await this.isValidRespond(e2);
        const { topic: t, response: s3 } = e2, { id: i5 } = s3, r3 = this.client.session.get(t);
        r3.transportType === M8.relay && await this.confirmOnlineStateOrThrow();
        const n6 = this.getAppLinkIfEnabled(r3.peer.metadata, r3.transportType);
        isJsonRpcResult(s3) ? await this.sendResult({ id: i5, topic: t, result: s3.result, throwOnFailedPublish: true, appLink: n6 }) : isJsonRpcError(s3) && await this.sendError({ id: i5, topic: t, error: s3.error, appLink: n6 }), this.cleanupAfterResponse(e2);
      }, this.ping = async (e2) => {
        this.isInitialized(), await this.confirmOnlineStateOrThrow();
        try {
          await this.isValidPing(e2);
        } catch (s3) {
          throw this.client.logger.error("ping() -> isValidPing() failed"), s3;
        }
        const { topic: t } = e2;
        if (this.client.session.keys.includes(t)) {
          const s3 = payloadId(), i5 = getBigIntRpcId().toString(), { done: r3, resolve: n6, reject: a5 } = _t2();
          this.events.once(Lt2("session_ping", s3), ({ error: c7 }) => {
            c7 ? a5(c7) : n6();
          }), await Promise.all([this.sendRequest({ topic: t, method: "wc_sessionPing", params: {}, throwOnFailedPublish: true, clientRpcId: s3, relayRpcId: i5 }), r3()]);
        } else this.client.core.pairing.pairings.keys.includes(t) && await this.client.core.pairing.ping({ topic: t });
      }, this.emit = async (e2) => {
        this.isInitialized(), await this.confirmOnlineStateOrThrow(), await this.isValidEmit(e2);
        const { topic: t, event: s3, chainId: i5 } = e2, r3 = getBigIntRpcId().toString();
        await this.sendRequest({ topic: t, method: "wc_sessionEvent", params: { event: s3, chainId: i5 }, throwOnFailedPublish: true, relayRpcId: r3 });
      }, this.disconnect = async (e2) => {
        this.isInitialized(), await this.confirmOnlineStateOrThrow(), await this.isValidDisconnect(e2);
        const { topic: t } = e2;
        if (this.client.session.keys.includes(t)) await this.sendRequest({ topic: t, method: "wc_sessionDelete", params: U4("USER_DISCONNECTED"), throwOnFailedPublish: true }), await this.deleteSession({ topic: t, emitEvent: false });
        else if (this.client.core.pairing.pairings.keys.includes(t)) await this.client.core.pairing.disconnect({ topic: t });
        else {
          const { message: s3 } = S4("MISMATCHED_TOPIC", `Session or pairing topic not found: ${t}`);
          throw new Error(s3);
        }
      }, this.find = (e2) => (this.isInitialized(), this.client.session.getAll().filter((t) => zr2(t, e2))), this.getPendingSessionRequests = () => this.client.pendingRequest.getAll(), this.authenticate = async (e2, t) => {
        var s3;
        this.isInitialized(), this.isValidAuthenticate(e2);
        const i5 = t && this.client.core.linkModeSupportedApps.includes(t) && ((s3 = this.client.metadata.redirect) == null ? void 0 : s3.linkMode), r3 = i5 ? M8.link_mode : M8.relay;
        r3 === M8.relay && await this.confirmOnlineStateOrThrow();
        const { chains: n6, statement: a5 = "", uri: c7, domain: h8, nonce: p7, type: d6, exp: l6, nbf: w7, methods: m3 = [], expiry: y11 } = e2, _6 = [...e2.resources || []], { topic: R6, uri: V7 } = await this.client.core.pairing.create({ methods: ["wc_sessionAuthenticate"], transportType: r3 });
        this.client.logger.info({ message: "Generated new pairing", pairing: { topic: R6, uri: V7 } });
        const E6 = await this.client.core.crypto.generateKeyPair(), S10 = hr2(E6);
        if (await Promise.all([this.client.auth.authKeys.set(ae6, { responseTopic: S10, publicKey: E6 }), this.client.auth.pairingTopics.set(S10, { topic: S10, pairingTopic: R6 })]), await this.client.core.relayer.subscribe(S10, { transportType: r3 }), this.client.logger.info(`sending request to new pairing topic: ${R6}`), m3.length > 0) {
          const { namespace: O9 } = re3(n6[0]);
          let T6 = ir2(O9, "request", m3);
          Y3(_6) && (T6 = cr3(T6, _6.pop())), _6.push(T6);
        }
        const M9 = y11 && y11 > v11.wc_sessionAuthenticate.req.ttl ? y11 : v11.wc_sessionAuthenticate.req.ttl, W8 = { authPayload: { type: d6 ?? "caip122", chains: n6, statement: a5, aud: c7, domain: h8, version: "1", nonce: p7, iat: (/* @__PURE__ */ new Date()).toISOString(), exp: l6, nbf: w7, resources: _6 }, requester: { publicKey: E6, metadata: this.client.metadata }, expiryTimestamp: Mt3(M9) }, N13 = { eip155: { chains: n6, methods: [.../* @__PURE__ */ new Set(["personal_sign", ...m3])], events: ["chainChanged", "accountsChanged"] } }, De5 = { requiredNamespaces: {}, optionalNamespaces: N13, relays: [{ protocol: "irn" }], pairingTopic: R6, proposer: { publicKey: E6, metadata: this.client.metadata }, expiryTimestamp: Mt3(v11.wc_sessionPropose.req.ttl) }, { done: wt4, resolve: Ve3, reject: Ee7 } = _t2(M9, "Request expired"), ce5 = async ({ error: O9, session: T6 }) => {
          if (this.events.off(Lt2("session_request", G6), Re5), O9) Ee7(O9);
          else if (T6) {
            T6.self.publicKey = E6, await this.client.session.set(T6.topic, T6), await this.setExpiry(T6.topic, T6.expiry), R6 && await this.client.core.pairing.updateMetadata({ topic: R6, metadata: T6.peer.metadata });
            const le6 = this.client.session.get(T6.topic);
            await this.deleteProposal(Z6), Ve3({ session: le6 });
          }
        }, Re5 = async (O9) => {
          var T6, le6, Me3;
          if (await this.deletePendingAuthRequest(G6, { message: "fulfilled", code: 0 }), O9.error) {
            const te7 = U4("WC_METHOD_UNSUPPORTED", "wc_sessionAuthenticate");
            return O9.error.code === te7.code ? void 0 : (this.events.off(Lt2("session_connect"), ce5), Ee7(O9.error.message));
          }
          await this.deleteProposal(Z6), this.events.off(Lt2("session_connect"), ce5);
          const { cacaos: ke4, responder: j6 } = O9.result, Ie7 = [], $e4 = [];
          for (const te7 of ke4) {
            await nr2({ cacao: te7, projectId: this.client.core.projectId }) || (this.client.logger.error(te7, "Signature verification failed"), Ee7(U4("SESSION_SETTLEMENT_FAILED", "Signature verification failed")));
            const { p: fe8 } = te7, ve7 = Y3(fe8.resources), Ke5 = [ln(fe8.iss)], mt3 = fe5(fe8.iss);
            if (ve7) {
              const qe4 = ar2(ve7), _t5 = ur2(ve7);
              Ie7.push(...qe4), Ke5.push(..._t5);
            }
            for (const qe4 of Ke5) $e4.push(`${qe4}:${mt3}`);
          }
          const ee8 = await this.client.core.crypto.generateSharedKey(E6, j6.publicKey);
          let pe7;
          Ie7.length > 0 && (pe7 = { topic: ee8, acknowledged: true, self: { publicKey: E6, metadata: this.client.metadata }, peer: j6, controller: j6.publicKey, expiry: Mt3(z9), requiredNamespaces: {}, optionalNamespaces: {}, relay: { protocol: "irn" }, pairingTopic: R6, namespaces: Jr3([...new Set(Ie7)], [...new Set($e4)]), transportType: r3 }, await this.client.core.relayer.subscribe(ee8, { transportType: r3 }), await this.client.session.set(ee8, pe7), R6 && await this.client.core.pairing.updateMetadata({ topic: R6, metadata: j6.metadata }), pe7 = this.client.session.get(ee8)), (T6 = this.client.metadata.redirect) != null && T6.linkMode && (le6 = j6.metadata.redirect) != null && le6.linkMode && (Me3 = j6.metadata.redirect) != null && Me3.universal && t && (this.client.core.addLinkModeSupportedApp(j6.metadata.redirect.universal), this.client.session.update(ee8, { transportType: M8.link_mode })), Ve3({ auths: ke4, session: pe7 });
        }, G6 = payloadId(), Z6 = payloadId();
        this.events.once(Lt2("session_connect"), ce5), this.events.once(Lt2("session_request", G6), Re5);
        let Se6;
        try {
          if (i5) {
            const O9 = formatJsonRpcRequest("wc_sessionAuthenticate", W8, G6);
            this.client.core.history.set(R6, O9);
            const T6 = await this.client.core.crypto.encode("", O9, { type: M5, encoding: lr2 });
            Se6 = xr3(t, R6, T6);
          } else await Promise.all([this.sendRequest({ topic: R6, method: "wc_sessionAuthenticate", params: W8, expiry: e2.expiry, throwOnFailedPublish: true, clientRpcId: G6 }), this.sendRequest({ topic: R6, method: "wc_sessionPropose", params: De5, expiry: v11.wc_sessionPropose.req.ttl, throwOnFailedPublish: true, clientRpcId: Z6 })]);
        } catch (O9) {
          throw this.events.off(Lt2("session_connect"), ce5), this.events.off(Lt2("session_request", G6), Re5), O9;
        }
        return await this.setProposal(Z6, I6({ id: Z6 }, De5)), await this.setAuthRequest(G6, { request: D5(I6({}, W8), { verifyContext: {} }), pairingTopic: R6, transportType: r3 }), { uri: Se6 ?? V7, response: wt4 };
      }, this.approveSessionAuthenticate = async (e2) => {
        const { id: t, auths: s3 } = e2, i5 = this.client.core.eventClient.createEvent({ properties: { topic: t.toString(), trace: [Cs.authenticated_session_approve_started] } });
        try {
          this.isInitialized();
        } catch (y11) {
          throw i5.setError(Ps.no_internet_connection), y11;
        }
        const r3 = this.getPendingAuthRequest(t);
        if (!r3) throw i5.setError(Ps.authenticated_session_pending_request_not_found), new Error(`Could not find pending auth request with id ${t}`);
        const n6 = r3.transportType || M8.relay;
        n6 === M8.relay && await this.confirmOnlineStateOrThrow();
        const a5 = r3.requester.publicKey, c7 = await this.client.core.crypto.generateKeyPair(), h8 = hr2(a5), p7 = { type: D4, receiverPublicKey: a5, senderPublicKey: c7 }, d6 = [], l6 = [];
        for (const y11 of s3) {
          if (!await nr2({ cacao: y11, projectId: this.client.core.projectId })) {
            i5.setError(Ps.invalid_cacao);
            const S10 = U4("SESSION_SETTLEMENT_FAILED", "Signature verification failed");
            throw await this.sendError({ id: t, topic: h8, error: S10, encodeOpts: p7 }), new Error(S10.message);
          }
          i5.addTrace(Cs.cacaos_verified);
          const { p: _6 } = y11, R6 = Y3(_6.resources), V7 = [ln(_6.iss)], E6 = fe5(_6.iss);
          if (R6) {
            const S10 = ar2(R6), M9 = ur2(R6);
            d6.push(...S10), V7.push(...M9);
          }
          for (const S10 of V7) l6.push(`${S10}:${E6}`);
        }
        const w7 = await this.client.core.crypto.generateSharedKey(c7, a5);
        i5.addTrace(Cs.create_authenticated_session_topic);
        let m3;
        if (d6?.length > 0) {
          m3 = { topic: w7, acknowledged: true, self: { publicKey: c7, metadata: this.client.metadata }, peer: { publicKey: a5, metadata: r3.requester.metadata }, controller: a5, expiry: Mt3(z9), authentication: s3, requiredNamespaces: {}, optionalNamespaces: {}, relay: { protocol: "irn" }, pairingTopic: r3.pairingTopic, namespaces: Jr3([...new Set(d6)], [...new Set(l6)]), transportType: n6 }, i5.addTrace(Cs.subscribing_authenticated_session_topic);
          try {
            await this.client.core.relayer.subscribe(w7, { transportType: n6 });
          } catch (y11) {
            throw i5.setError(Ps.subscribe_authenticated_session_topic_failure), y11;
          }
          i5.addTrace(Cs.subscribe_authenticated_session_topic_success), await this.client.session.set(w7, m3), i5.addTrace(Cs.store_authenticated_session), await this.client.core.pairing.updateMetadata({ topic: r3.pairingTopic, metadata: r3.requester.metadata });
        }
        i5.addTrace(Cs.publishing_authenticated_session_approve);
        try {
          await this.sendResult({ topic: h8, id: t, result: { cacaos: s3, responder: { publicKey: c7, metadata: this.client.metadata } }, encodeOpts: p7, throwOnFailedPublish: true, appLink: this.getAppLinkIfEnabled(r3.requester.metadata, n6) });
        } catch (y11) {
          throw i5.setError(Ps.authenticated_session_approve_publish_failure), y11;
        }
        return await this.client.auth.requests.delete(t, { message: "fulfilled", code: 0 }), await this.client.core.pairing.activate({ topic: r3.pairingTopic }), this.client.core.eventClient.deleteEvent({ eventId: i5.eventId }), { session: m3 };
      }, this.rejectSessionAuthenticate = async (e2) => {
        this.isInitialized();
        const { id: t, reason: s3 } = e2, i5 = this.getPendingAuthRequest(t);
        if (!i5) throw new Error(`Could not find pending auth request with id ${t}`);
        i5.transportType === M8.relay && await this.confirmOnlineStateOrThrow();
        const r3 = i5.requester.publicKey, n6 = await this.client.core.crypto.generateKeyPair(), a5 = hr2(r3), c7 = { type: D4, receiverPublicKey: r3, senderPublicKey: n6 };
        await this.sendError({ id: t, topic: a5, error: s3, encodeOpts: c7, rpcOpts: v11.wc_sessionAuthenticate.reject, appLink: this.getAppLinkIfEnabled(i5.requester.metadata, i5.transportType) }), await this.client.auth.requests.delete(t, { message: "rejected", code: 0 }), await this.client.proposal.delete(t, U4("USER_DISCONNECTED"));
      }, this.formatAuthMessage = (e2) => {
        this.isInitialized();
        const { request: t, iss: s3 } = e2;
        return dn(t, s3);
      }, this.processRelayMessageCache = () => {
        setTimeout(async () => {
          if (this.relayMessageCache.length !== 0) for (; this.relayMessageCache.length > 0; ) try {
            const e2 = this.relayMessageCache.shift();
            e2 && await this.onRelayMessage(e2);
          } catch (e2) {
            this.client.logger.error(e2);
          }
        }, 50);
      }, this.cleanupDuplicatePairings = async (e2) => {
        if (e2.pairingTopic) try {
          const t = this.client.core.pairing.pairings.get(e2.pairingTopic), s3 = this.client.core.pairing.pairings.getAll().filter((i5) => {
            var r3, n6;
            return ((r3 = i5.peerMetadata) == null ? void 0 : r3.url) && ((n6 = i5.peerMetadata) == null ? void 0 : n6.url) === e2.peer.metadata.url && i5.topic && i5.topic !== t.topic;
          });
          if (s3.length === 0) return;
          this.client.logger.info(`Cleaning up ${s3.length} duplicate pairing(s)`), await Promise.all(s3.map((i5) => this.client.core.pairing.disconnect({ topic: i5.topic }))), this.client.logger.info("Duplicate pairings clean up finished");
        } catch (t) {
          this.client.logger.error(t);
        }
      }, this.deleteSession = async (e2) => {
        var t;
        const { topic: s3, expirerHasDeleted: i5 = false, emitEvent: r3 = true, id: n6 = 0 } = e2, { self: a5 } = this.client.session.get(s3);
        await this.client.core.relayer.unsubscribe(s3), await this.client.session.delete(s3, U4("USER_DISCONNECTED")), this.addToRecentlyDeleted(s3, "session"), this.client.core.crypto.keychain.has(a5.publicKey) && await this.client.core.crypto.deleteKeyPair(a5.publicKey), this.client.core.crypto.keychain.has(s3) && await this.client.core.crypto.deleteSymKey(s3), i5 || this.client.core.expirer.del(s3), this.client.core.storage.removeItem(xe4).catch((c7) => this.client.logger.warn(c7)), this.getPendingSessionRequests().forEach((c7) => {
          c7.topic === s3 && this.deletePendingSessionRequest(c7.id, U4("USER_DISCONNECTED"));
        }), s3 === ((t = this.sessionRequestQueue.queue[0]) == null ? void 0 : t.topic) && (this.sessionRequestQueue.state = x11.idle), r3 && this.client.events.emit("session_delete", { id: n6, topic: s3 });
      }, this.deleteProposal = async (e2, t) => {
        if (t) try {
          const s3 = this.client.proposal.get(e2), i5 = this.client.core.eventClient.getEvent({ topic: s3.pairingTopic });
          i5?.setError(Ts.proposal_expired);
        } catch {
        }
        await Promise.all([this.client.proposal.delete(e2, U4("USER_DISCONNECTED")), t ? Promise.resolve() : this.client.core.expirer.del(e2)]), this.addToRecentlyDeleted(e2, "proposal");
      }, this.deletePendingSessionRequest = async (e2, t, s3 = false) => {
        await Promise.all([this.client.pendingRequest.delete(e2, t), s3 ? Promise.resolve() : this.client.core.expirer.del(e2)]), this.addToRecentlyDeleted(e2, "request"), this.sessionRequestQueue.queue = this.sessionRequestQueue.queue.filter((i5) => i5.id !== e2), s3 && (this.sessionRequestQueue.state = x11.idle, this.client.events.emit("session_request_expire", { id: e2 }));
      }, this.deletePendingAuthRequest = async (e2, t, s3 = false) => {
        await Promise.all([this.client.auth.requests.delete(e2, t), s3 ? Promise.resolve() : this.client.core.expirer.del(e2)]);
      }, this.setExpiry = async (e2, t) => {
        this.client.session.keys.includes(e2) && (this.client.core.expirer.set(e2, t), await this.client.session.update(e2, { expiry: t }));
      }, this.setProposal = async (e2, t) => {
        this.client.core.expirer.set(e2, Mt3(v11.wc_sessionPropose.req.ttl)), await this.client.proposal.set(e2, t);
      }, this.setAuthRequest = async (e2, t) => {
        const { request: s3, pairingTopic: i5, transportType: r3 = M8.relay } = t;
        this.client.core.expirer.set(e2, s3.expiryTimestamp), await this.client.auth.requests.set(e2, { authPayload: s3.authPayload, requester: s3.requester, expiryTimestamp: s3.expiryTimestamp, id: e2, pairingTopic: i5, verifyContext: s3.verifyContext, transportType: r3 });
      }, this.setPendingSessionRequest = async (e2) => {
        const { id: t, topic: s3, params: i5, verifyContext: r3 } = e2, n6 = i5.request.expiryTimestamp || Mt3(v11.wc_sessionRequest.req.ttl);
        this.client.core.expirer.set(t, n6), await this.client.pendingRequest.set(t, { id: t, topic: s3, params: i5, verifyContext: r3 });
      }, this.sendRequest = async (e2) => {
        const { topic: t, method: s3, params: i5, expiry: r3, relayRpcId: n6, clientRpcId: a5, throwOnFailedPublish: c7, appLink: h8 } = e2, p7 = formatJsonRpcRequest(s3, i5, a5);
        let d6;
        const l6 = !!h8;
        try {
          const y11 = l6 ? lr2 : ge4;
          d6 = await this.client.core.crypto.encode(t, p7, { encoding: y11 });
        } catch (y11) {
          throw await this.cleanup(), this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${t} failed`), y11;
        }
        let w7;
        if (at4.includes(s3)) {
          const y11 = yr2(JSON.stringify(p7)), _6 = yr2(d6);
          w7 = await this.client.core.verify.register({ id: _6, decryptedId: y11 });
        }
        const m3 = v11[s3].req;
        if (m3.attestation = w7, r3 && (m3.ttl = r3), n6 && (m3.id = n6), this.client.core.history.set(t, p7), l6) {
          const y11 = xr3(h8, t, d6);
          await global.Linking.openURL(y11, this.client.name);
        } else {
          const y11 = v11[s3].req;
          r3 && (y11.ttl = r3), n6 && (y11.id = n6), c7 ? (y11.internal = D5(I6({}, y11.internal), { throwOnFailedPublish: true }), await this.client.core.relayer.publish(t, d6, y11)) : this.client.core.relayer.publish(t, d6, y11).catch((_6) => this.client.logger.error(_6));
        }
        return p7.id;
      }, this.sendResult = async (e2) => {
        const { id: t, topic: s3, result: i5, throwOnFailedPublish: r3, encodeOpts: n6, appLink: a5 } = e2, c7 = formatJsonRpcResult(t, i5);
        let h8;
        const p7 = a5 && typeof (global == null ? void 0 : global.Linking) < "u";
        try {
          const l6 = p7 ? lr2 : ge4;
          h8 = await this.client.core.crypto.encode(s3, c7, D5(I6({}, n6 || {}), { encoding: l6 }));
        } catch (l6) {
          throw await this.cleanup(), this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${s3} failed`), l6;
        }
        let d6;
        try {
          d6 = await this.client.core.history.get(s3, t);
        } catch (l6) {
          throw this.client.logger.error(`sendResult() -> history.get(${s3}, ${t}) failed`), l6;
        }
        if (p7) {
          const l6 = xr3(a5, s3, h8);
          await global.Linking.openURL(l6, this.client.name);
        } else {
          const l6 = v11[d6.request.method].res;
          r3 ? (l6.internal = D5(I6({}, l6.internal), { throwOnFailedPublish: true }), await this.client.core.relayer.publish(s3, h8, l6)) : this.client.core.relayer.publish(s3, h8, l6).catch((w7) => this.client.logger.error(w7));
        }
        await this.client.core.history.resolve(c7);
      }, this.sendError = async (e2) => {
        const { id: t, topic: s3, error: i5, encodeOpts: r3, rpcOpts: n6, appLink: a5 } = e2, c7 = formatJsonRpcError(t, i5);
        let h8;
        const p7 = a5 && typeof (global == null ? void 0 : global.Linking) < "u";
        try {
          const l6 = p7 ? lr2 : ge4;
          h8 = await this.client.core.crypto.encode(s3, c7, D5(I6({}, r3 || {}), { encoding: l6 }));
        } catch (l6) {
          throw await this.cleanup(), this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${s3} failed`), l6;
        }
        let d6;
        try {
          d6 = await this.client.core.history.get(s3, t);
        } catch (l6) {
          throw this.client.logger.error(`sendError() -> history.get(${s3}, ${t}) failed`), l6;
        }
        if (p7) {
          const l6 = xr3(a5, s3, h8);
          await global.Linking.openURL(l6, this.client.name);
        } else {
          const l6 = n6 || v11[d6.request.method].res;
          this.client.core.relayer.publish(s3, h8, l6);
        }
        await this.client.core.history.resolve(c7);
      }, this.cleanup = async () => {
        const e2 = [], t = [];
        this.client.session.getAll().forEach((s3) => {
          let i5 = false;
          Kt3(s3.expiry) && (i5 = true), this.client.core.crypto.keychain.has(s3.topic) || (i5 = true), i5 && e2.push(s3.topic);
        }), this.client.proposal.getAll().forEach((s3) => {
          Kt3(s3.expiryTimestamp) && t.push(s3.id);
        }), await Promise.all([...e2.map((s3) => this.deleteSession({ topic: s3 })), ...t.map((s3) => this.deleteProposal(s3))]);
      }, this.onRelayEventRequest = async (e2) => {
        this.requestQueue.queue.push(e2), await this.processRequestsQueue();
      }, this.processRequestsQueue = async () => {
        if (this.requestQueue.state === x11.active) {
          this.client.logger.info("Request queue already active, skipping...");
          return;
        }
        for (this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`); this.requestQueue.queue.length > 0; ) {
          this.requestQueue.state = x11.active;
          const e2 = this.requestQueue.queue.shift();
          if (e2) try {
            await this.processRequest(e2);
          } catch (t) {
            this.client.logger.warn(t);
          }
        }
        this.requestQueue.state = x11.idle;
      }, this.processRequest = async (e2) => {
        const { topic: t, payload: s3, attestation: i5, transportType: r3, encryptedId: n6 } = e2, a5 = s3.method;
        if (!this.shouldIgnorePairingRequest({ topic: t, requestMethod: a5 })) switch (a5) {
          case "wc_sessionPropose":
            return await this.onSessionProposeRequest({ topic: t, payload: s3, attestation: i5, encryptedId: n6 });
          case "wc_sessionSettle":
            return await this.onSessionSettleRequest(t, s3);
          case "wc_sessionUpdate":
            return await this.onSessionUpdateRequest(t, s3);
          case "wc_sessionExtend":
            return await this.onSessionExtendRequest(t, s3);
          case "wc_sessionPing":
            return await this.onSessionPingRequest(t, s3);
          case "wc_sessionDelete":
            return await this.onSessionDeleteRequest(t, s3);
          case "wc_sessionRequest":
            return await this.onSessionRequest({ topic: t, payload: s3, attestation: i5, encryptedId: n6, transportType: r3 });
          case "wc_sessionEvent":
            return await this.onSessionEventRequest(t, s3);
          case "wc_sessionAuthenticate":
            return await this.onSessionAuthenticateRequest({ topic: t, payload: s3, attestation: i5, encryptedId: n6, transportType: r3 });
          default:
            return this.client.logger.info(`Unsupported request method ${a5}`);
        }
      }, this.onRelayEventResponse = async (e2) => {
        const { topic: t, payload: s3, transportType: i5 } = e2, r3 = (await this.client.core.history.get(t, s3.id)).request.method;
        switch (r3) {
          case "wc_sessionPropose":
            return this.onSessionProposeResponse(t, s3, i5);
          case "wc_sessionSettle":
            return this.onSessionSettleResponse(t, s3);
          case "wc_sessionUpdate":
            return this.onSessionUpdateResponse(t, s3);
          case "wc_sessionExtend":
            return this.onSessionExtendResponse(t, s3);
          case "wc_sessionPing":
            return this.onSessionPingResponse(t, s3);
          case "wc_sessionRequest":
            return this.onSessionRequestResponse(t, s3);
          case "wc_sessionAuthenticate":
            return this.onSessionAuthenticateResponse(t, s3);
          default:
            return this.client.logger.info(`Unsupported response method ${r3}`);
        }
      }, this.onRelayEventUnknownPayload = (e2) => {
        const { topic: t } = e2, { message: s3 } = S4("MISSING_OR_INVALID", `Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);
        throw new Error(s3);
      }, this.shouldIgnorePairingRequest = (e2) => {
        const { topic: t, requestMethod: s3 } = e2, i5 = this.expectedPairingMethodMap.get(t);
        return !i5 || i5.includes(s3) ? false : !!(i5.includes("wc_sessionAuthenticate") && this.client.events.listenerCount("session_authenticate") > 0);
      }, this.onSessionProposeRequest = async (e2) => {
        const { topic: t, payload: s3, attestation: i5, encryptedId: r3 } = e2, { params: n6, id: a5 } = s3;
        try {
          const c7 = this.client.core.eventClient.getEvent({ topic: t });
          this.isValidConnect(I6({}, s3.params));
          const h8 = n6.expiryTimestamp || Mt3(v11.wc_sessionPropose.req.ttl), p7 = I6({ id: a5, pairingTopic: t, expiryTimestamp: h8 }, n6);
          await this.setProposal(a5, p7);
          const d6 = await this.getVerifyContext({ attestationId: i5, hash: yr2(JSON.stringify(s3)), encryptedId: r3, metadata: p7.proposer.metadata });
          this.client.events.listenerCount("session_proposal") === 0 && (console.warn("No listener for session_proposal event"), c7?.setError($5.proposal_listener_not_found)), c7?.addTrace(z8.emit_session_proposal), this.client.events.emit("session_proposal", { id: a5, params: p7, verifyContext: d6 });
        } catch (c7) {
          await this.sendError({ id: a5, topic: t, error: c7, rpcOpts: v11.wc_sessionPropose.autoReject }), this.client.logger.error(c7);
        }
      }, this.onSessionProposeResponse = async (e2, t, s3) => {
        const { id: i5 } = t;
        if (isJsonRpcResult(t)) {
          const { result: r3 } = t;
          this.client.logger.trace({ type: "method", method: "onSessionProposeResponse", result: r3 });
          const n6 = this.client.proposal.get(i5);
          this.client.logger.trace({ type: "method", method: "onSessionProposeResponse", proposal: n6 });
          const a5 = n6.proposer.publicKey;
          this.client.logger.trace({ type: "method", method: "onSessionProposeResponse", selfPublicKey: a5 });
          const c7 = r3.responderPublicKey;
          this.client.logger.trace({ type: "method", method: "onSessionProposeResponse", peerPublicKey: c7 });
          const h8 = await this.client.core.crypto.generateSharedKey(a5, c7);
          this.client.logger.trace({ type: "method", method: "onSessionProposeResponse", sessionTopic: h8 });
          const p7 = await this.client.core.relayer.subscribe(h8, { transportType: s3 });
          this.client.logger.trace({ type: "method", method: "onSessionProposeResponse", subscriptionId: p7 }), await this.client.core.pairing.activate({ topic: e2 });
        } else if (isJsonRpcError(t)) {
          await this.client.proposal.delete(i5, U4("USER_DISCONNECTED"));
          const r3 = Lt2("session_connect");
          if (this.events.listenerCount(r3) === 0) throw new Error(`emitting ${r3} without any listeners, 954`);
          this.events.emit(Lt2("session_connect"), { error: t.error });
        }
      }, this.onSessionSettleRequest = async (e2, t) => {
        const { id: s3, params: i5 } = t;
        try {
          this.isValidSessionSettleRequest(i5);
          const { relay: r3, controller: n6, expiry: a5, namespaces: c7, sessionProperties: h8, sessionConfig: p7 } = t.params, d6 = D5(I6(I6({ topic: e2, relay: r3, expiry: a5, namespaces: c7, acknowledged: true, pairingTopic: "", requiredNamespaces: {}, optionalNamespaces: {}, controller: n6.publicKey, self: { publicKey: "", metadata: this.client.metadata }, peer: { publicKey: n6.publicKey, metadata: n6.metadata } }, h8 && { sessionProperties: h8 }), p7 && { sessionConfig: p7 }), { transportType: M8.relay }), l6 = Lt2("session_connect");
          if (this.events.listenerCount(l6) === 0) throw new Error(`emitting ${l6} without any listeners 997`);
          this.events.emit(Lt2("session_connect"), { session: d6 }), await this.sendResult({ id: t.id, topic: e2, result: true, throwOnFailedPublish: true });
        } catch (r3) {
          await this.sendError({ id: s3, topic: e2, error: r3 }), this.client.logger.error(r3);
        }
      }, this.onSessionSettleResponse = async (e2, t) => {
        const { id: s3 } = t;
        isJsonRpcResult(t) ? (await this.client.session.update(e2, { acknowledged: true }), this.events.emit(Lt2("session_approve", s3), {})) : isJsonRpcError(t) && (await this.client.session.delete(e2, U4("USER_DISCONNECTED")), this.events.emit(Lt2("session_approve", s3), { error: t.error }));
      }, this.onSessionUpdateRequest = async (e2, t) => {
        const { params: s3, id: i5 } = t;
        try {
          const r3 = `${e2}_session_update`, n6 = yo2.get(r3);
          if (n6 && this.isRequestOutOfSync(n6, i5)) {
            this.client.logger.info(`Discarding out of sync request - ${i5}`), this.sendError({ id: i5, topic: e2, error: U4("INVALID_UPDATE_REQUEST") });
            return;
          }
          this.isValidUpdate(I6({ topic: e2 }, s3));
          try {
            yo2.set(r3, i5), await this.client.session.update(e2, { namespaces: s3.namespaces }), await this.sendResult({ id: i5, topic: e2, result: true, throwOnFailedPublish: true });
          } catch (a5) {
            throw yo2.delete(r3), a5;
          }
          this.client.events.emit("session_update", { id: i5, topic: e2, params: s3 });
        } catch (r3) {
          await this.sendError({ id: i5, topic: e2, error: r3 }), this.client.logger.error(r3);
        }
      }, this.isRequestOutOfSync = (e2, t) => parseInt(t.toString().slice(0, -3)) <= parseInt(e2.toString().slice(0, -3)), this.onSessionUpdateResponse = (e2, t) => {
        const { id: s3 } = t, i5 = Lt2("session_update", s3);
        if (this.events.listenerCount(i5) === 0) throw new Error(`emitting ${i5} without any listeners`);
        isJsonRpcResult(t) ? this.events.emit(Lt2("session_update", s3), {}) : isJsonRpcError(t) && this.events.emit(Lt2("session_update", s3), { error: t.error });
      }, this.onSessionExtendRequest = async (e2, t) => {
        const { id: s3 } = t;
        try {
          this.isValidExtend({ topic: e2 }), await this.setExpiry(e2, Mt3(z9)), await this.sendResult({ id: s3, topic: e2, result: true, throwOnFailedPublish: true }), this.client.events.emit("session_extend", { id: s3, topic: e2 });
        } catch (i5) {
          await this.sendError({ id: s3, topic: e2, error: i5 }), this.client.logger.error(i5);
        }
      }, this.onSessionExtendResponse = (e2, t) => {
        const { id: s3 } = t, i5 = Lt2("session_extend", s3);
        if (this.events.listenerCount(i5) === 0) throw new Error(`emitting ${i5} without any listeners`);
        isJsonRpcResult(t) ? this.events.emit(Lt2("session_extend", s3), {}) : isJsonRpcError(t) && this.events.emit(Lt2("session_extend", s3), { error: t.error });
      }, this.onSessionPingRequest = async (e2, t) => {
        const { id: s3 } = t;
        try {
          this.isValidPing({ topic: e2 }), await this.sendResult({ id: s3, topic: e2, result: true, throwOnFailedPublish: true }), this.client.events.emit("session_ping", { id: s3, topic: e2 });
        } catch (i5) {
          await this.sendError({ id: s3, topic: e2, error: i5 }), this.client.logger.error(i5);
        }
      }, this.onSessionPingResponse = (e2, t) => {
        const { id: s3 } = t, i5 = Lt2("session_ping", s3);
        if (this.events.listenerCount(i5) === 0) throw new Error(`emitting ${i5} without any listeners`);
        setTimeout(() => {
          isJsonRpcResult(t) ? this.events.emit(Lt2("session_ping", s3), {}) : isJsonRpcError(t) && this.events.emit(Lt2("session_ping", s3), { error: t.error });
        }, 500);
      }, this.onSessionDeleteRequest = async (e2, t) => {
        const { id: s3 } = t;
        try {
          this.isValidDisconnect({ topic: e2, reason: t.params }), Promise.all([new Promise((i5) => {
            this.client.core.relayer.once(v10.publish, async () => {
              i5(await this.deleteSession({ topic: e2, id: s3 }));
            });
          }), this.sendResult({ id: s3, topic: e2, result: true, throwOnFailedPublish: true }), this.cleanupPendingSentRequestsForTopic({ topic: e2, error: U4("USER_DISCONNECTED") })]).catch((i5) => this.client.logger.error(i5));
        } catch (i5) {
          this.client.logger.error(i5);
        }
      }, this.onSessionRequest = async (e2) => {
        var t, s3, i5;
        const { topic: r3, payload: n6, attestation: a5, encryptedId: c7, transportType: h8 } = e2, { id: p7, params: d6 } = n6;
        try {
          await this.isValidRequest(I6({ topic: r3 }, d6));
          const l6 = this.client.session.get(r3), w7 = await this.getVerifyContext({ attestationId: a5, hash: yr2(JSON.stringify(formatJsonRpcRequest("wc_sessionRequest", d6, p7))), encryptedId: c7, metadata: l6.peer.metadata, transportType: h8 }), m3 = { id: p7, topic: r3, params: d6, verifyContext: w7 };
          await this.setPendingSessionRequest(m3), h8 === M8.link_mode && (t = l6.peer.metadata.redirect) != null && t.universal && this.client.core.addLinkModeSupportedApp((s3 = l6.peer.metadata.redirect) == null ? void 0 : s3.universal), (i5 = this.client.signConfig) != null && i5.disableRequestQueue ? this.emitSessionRequest(m3) : (this.addSessionRequestToSessionRequestQueue(m3), this.processSessionRequestQueue());
        } catch (l6) {
          await this.sendError({ id: p7, topic: r3, error: l6 }), this.client.logger.error(l6);
        }
      }, this.onSessionRequestResponse = (e2, t) => {
        const { id: s3 } = t, i5 = Lt2("session_request", s3);
        if (this.events.listenerCount(i5) === 0) throw new Error(`emitting ${i5} without any listeners`);
        isJsonRpcResult(t) ? this.events.emit(Lt2("session_request", s3), { result: t.result }) : isJsonRpcError(t) && this.events.emit(Lt2("session_request", s3), { error: t.error });
      }, this.onSessionEventRequest = async (e2, t) => {
        const { id: s3, params: i5 } = t;
        try {
          const r3 = `${e2}_session_event_${i5.event.name}`, n6 = yo2.get(r3);
          if (n6 && this.isRequestOutOfSync(n6, s3)) {
            this.client.logger.info(`Discarding out of sync request - ${s3}`);
            return;
          }
          this.isValidEmit(I6({ topic: e2 }, i5)), this.client.events.emit("session_event", { id: s3, topic: e2, params: i5 }), yo2.set(r3, s3);
        } catch (r3) {
          await this.sendError({ id: s3, topic: e2, error: r3 }), this.client.logger.error(r3);
        }
      }, this.onSessionAuthenticateResponse = (e2, t) => {
        const { id: s3 } = t;
        this.client.logger.trace({ type: "method", method: "onSessionAuthenticateResponse", topic: e2, payload: t }), isJsonRpcResult(t) ? this.events.emit(Lt2("session_request", s3), { result: t.result }) : isJsonRpcError(t) && this.events.emit(Lt2("session_request", s3), { error: t.error });
      }, this.onSessionAuthenticateRequest = async (e2) => {
        var t;
        const { topic: s3, payload: i5, attestation: r3, encryptedId: n6, transportType: a5 } = e2;
        try {
          const { requester: c7, authPayload: h8, expiryTimestamp: p7 } = i5.params, d6 = await this.getVerifyContext({ attestationId: r3, hash: yr2(JSON.stringify(i5)), encryptedId: n6, metadata: c7.metadata, transportType: a5 }), l6 = { requester: c7, pairingTopic: s3, id: i5.id, authPayload: h8, verifyContext: d6, expiryTimestamp: p7 };
          await this.setAuthRequest(i5.id, { request: l6, pairingTopic: s3, transportType: a5 }), a5 === M8.link_mode && (t = c7.metadata.redirect) != null && t.universal && this.client.core.addLinkModeSupportedApp(c7.metadata.redirect.universal), this.client.events.emit("session_authenticate", { topic: s3, params: i5.params, id: i5.id, verifyContext: d6 });
        } catch (c7) {
          this.client.logger.error(c7);
          const h8 = i5.params.requester.publicKey, p7 = await this.client.core.crypto.generateKeyPair(), d6 = this.getAppLinkIfEnabled(i5.params.requester.metadata, a5), l6 = { type: D4, receiverPublicKey: h8, senderPublicKey: p7 };
          await this.sendError({ id: i5.id, topic: s3, error: c7, encodeOpts: l6, rpcOpts: v11.wc_sessionAuthenticate.autoReject, appLink: d6 });
        }
      }, this.addSessionRequestToSessionRequestQueue = (e2) => {
        this.sessionRequestQueue.queue.push(e2);
      }, this.cleanupAfterResponse = (e2) => {
        this.deletePendingSessionRequest(e2.response.id, { message: "fulfilled", code: 0 }), setTimeout(() => {
          this.sessionRequestQueue.state = x11.idle, this.processSessionRequestQueue();
        }, (0, import_time9.toMiliseconds)(this.requestQueueDelay));
      }, this.cleanupPendingSentRequestsForTopic = ({ topic: e2, error: t }) => {
        const s3 = this.client.core.history.pending;
        s3.length > 0 && s3.filter((i5) => i5.topic === e2 && i5.request.method === "wc_sessionRequest").forEach((i5) => {
          const r3 = i5.request.id, n6 = Lt2("session_request", r3);
          if (this.events.listenerCount(n6) === 0) throw new Error(`emitting ${n6} without any listeners`);
          this.events.emit(Lt2("session_request", i5.request.id), { error: t });
        });
      }, this.processSessionRequestQueue = () => {
        if (this.sessionRequestQueue.state === x11.active) {
          this.client.logger.info("session request queue is already active.");
          return;
        }
        const e2 = this.sessionRequestQueue.queue[0];
        if (!e2) {
          this.client.logger.info("session request queue is empty.");
          return;
        }
        try {
          this.sessionRequestQueue.state = x11.active, this.emitSessionRequest(e2);
        } catch (t) {
          this.client.logger.error(t);
        }
      }, this.emitSessionRequest = (e2) => {
        this.client.events.emit("session_request", e2);
      }, this.onPairingCreated = (e2) => {
        if (e2.methods && this.expectedPairingMethodMap.set(e2.topic, e2.methods), e2.active) return;
        const t = this.client.proposal.getAll().find((s3) => s3.pairingTopic === e2.topic);
        t && this.onSessionProposeRequest({ topic: e2.topic, payload: formatJsonRpcRequest("wc_sessionPropose", { requiredNamespaces: t.requiredNamespaces, optionalNamespaces: t.optionalNamespaces, relays: t.relays, proposer: t.proposer, sessionProperties: t.sessionProperties }, t.id) });
      }, this.isValidConnect = async (e2) => {
        if (!to2(e2)) {
          const { message: a5 } = S4("MISSING_OR_INVALID", `connect() params: ${JSON.stringify(e2)}`);
          throw new Error(a5);
        }
        const { pairingTopic: t, requiredNamespaces: s3, optionalNamespaces: i5, sessionProperties: r3, relays: n6 } = e2;
        if (I3(t) || await this.isValidPairingTopic(t), !eo2(n6, true)) {
          const { message: a5 } = S4("MISSING_OR_INVALID", `connect() relays: ${n6}`);
          throw new Error(a5);
        }
        !I3(s3) && Z2(s3) !== 0 && this.validateNamespaces(s3, "requiredNamespaces"), !I3(i5) && Z2(i5) !== 0 && this.validateNamespaces(i5, "optionalNamespaces"), I3(r3) || this.validateSessionProps(r3, "sessionProperties");
      }, this.validateNamespaces = (e2, t) => {
        const s3 = Xr3(e2, "connect()", t);
        if (s3) throw new Error(s3.message);
      }, this.isValidApprove = async (e2) => {
        if (!to2(e2)) throw new Error(S4("MISSING_OR_INVALID", `approve() params: ${e2}`).message);
        const { id: t, namespaces: s3, relayProtocol: i5, sessionProperties: r3 } = e2;
        this.checkRecentlyDeleted(t), await this.isValidProposalId(t);
        const n6 = this.client.proposal.get(t), a5 = Wn3(s3, "approve()");
        if (a5) throw new Error(a5.message);
        const c7 = zn2(n6.requiredNamespaces, s3, "approve()");
        if (c7) throw new Error(c7.message);
        if (!b5(i5, true)) {
          const { message: h8 } = S4("MISSING_OR_INVALID", `approve() relayProtocol: ${i5}`);
          throw new Error(h8);
        }
        I3(r3) || this.validateSessionProps(r3, "sessionProperties");
      }, this.isValidReject = async (e2) => {
        if (!to2(e2)) {
          const { message: i5 } = S4("MISSING_OR_INVALID", `reject() params: ${e2}`);
          throw new Error(i5);
        }
        const { id: t, reason: s3 } = e2;
        if (this.checkRecentlyDeleted(t), await this.isValidProposalId(t), !ro2(s3)) {
          const { message: i5 } = S4("MISSING_OR_INVALID", `reject() reason: ${JSON.stringify(s3)}`);
          throw new Error(i5);
        }
      }, this.isValidSessionSettleRequest = (e2) => {
        if (!to2(e2)) {
          const { message: c7 } = S4("MISSING_OR_INVALID", `onSessionSettleRequest() params: ${e2}`);
          throw new Error(c7);
        }
        const { relay: t, controller: s3, namespaces: i5, expiry: r3 } = e2;
        if (!Jn2(t)) {
          const { message: c7 } = S4("MISSING_OR_INVALID", "onSessionSettleRequest() relay protocol should be a string");
          throw new Error(c7);
        }
        const n6 = Zr2(s3, "onSessionSettleRequest()");
        if (n6) throw new Error(n6.message);
        const a5 = Wn3(i5, "onSessionSettleRequest()");
        if (a5) throw new Error(a5.message);
        if (Kt3(r3)) {
          const { message: c7 } = S4("EXPIRED", "onSessionSettleRequest()");
          throw new Error(c7);
        }
      }, this.isValidUpdate = async (e2) => {
        if (!to2(e2)) {
          const { message: a5 } = S4("MISSING_OR_INVALID", `update() params: ${e2}`);
          throw new Error(a5);
        }
        const { topic: t, namespaces: s3 } = e2;
        this.checkRecentlyDeleted(t), await this.isValidSessionTopic(t);
        const i5 = this.client.session.get(t), r3 = Wn3(s3, "update()");
        if (r3) throw new Error(r3.message);
        const n6 = zn2(i5.requiredNamespaces, s3, "update()");
        if (n6) throw new Error(n6.message);
      }, this.isValidExtend = async (e2) => {
        if (!to2(e2)) {
          const { message: s3 } = S4("MISSING_OR_INVALID", `extend() params: ${e2}`);
          throw new Error(s3);
        }
        const { topic: t } = e2;
        this.checkRecentlyDeleted(t), await this.isValidSessionTopic(t);
      }, this.isValidRequest = async (e2) => {
        if (!to2(e2)) {
          const { message: a5 } = S4("MISSING_OR_INVALID", `request() params: ${e2}`);
          throw new Error(a5);
        }
        const { topic: t, request: s3, chainId: i5, expiry: r3 } = e2;
        this.checkRecentlyDeleted(t), await this.isValidSessionTopic(t);
        const { namespaces: n6 } = this.client.session.get(t);
        if (!co2(n6, i5)) {
          const { message: a5 } = S4("MISSING_OR_INVALID", `request() chainId: ${i5}`);
          throw new Error(a5);
        }
        if (!oo2(s3)) {
          const { message: a5 } = S4("MISSING_OR_INVALID", `request() ${JSON.stringify(s3)}`);
          throw new Error(a5);
        }
        if (!ao2(n6, i5, s3.method)) {
          const { message: a5 } = S4("MISSING_OR_INVALID", `request() method: ${s3.method}`);
          throw new Error(a5);
        }
        if (r3 && !po2(r3, me7)) {
          const { message: a5 } = S4("MISSING_OR_INVALID", `request() expiry: ${r3}. Expiry must be a number (in seconds) between ${me7.min} and ${me7.max}`);
          throw new Error(a5);
        }
      }, this.isValidRespond = async (e2) => {
        var t;
        if (!to2(e2)) {
          const { message: r3 } = S4("MISSING_OR_INVALID", `respond() params: ${e2}`);
          throw new Error(r3);
        }
        const { topic: s3, response: i5 } = e2;
        try {
          await this.isValidSessionTopic(s3);
        } catch (r3) {
          throw (t = e2?.response) != null && t.id && this.cleanupAfterResponse(e2), r3;
        }
        if (!so2(i5)) {
          const { message: r3 } = S4("MISSING_OR_INVALID", `respond() response: ${JSON.stringify(i5)}`);
          throw new Error(r3);
        }
      }, this.isValidPing = async (e2) => {
        if (!to2(e2)) {
          const { message: s3 } = S4("MISSING_OR_INVALID", `ping() params: ${e2}`);
          throw new Error(s3);
        }
        const { topic: t } = e2;
        await this.isValidSessionOrPairingTopic(t);
      }, this.isValidEmit = async (e2) => {
        if (!to2(e2)) {
          const { message: n6 } = S4("MISSING_OR_INVALID", `emit() params: ${e2}`);
          throw new Error(n6);
        }
        const { topic: t, event: s3, chainId: i5 } = e2;
        await this.isValidSessionTopic(t);
        const { namespaces: r3 } = this.client.session.get(t);
        if (!co2(r3, i5)) {
          const { message: n6 } = S4("MISSING_OR_INVALID", `emit() chainId: ${i5}`);
          throw new Error(n6);
        }
        if (!io2(s3)) {
          const { message: n6 } = S4("MISSING_OR_INVALID", `emit() event: ${JSON.stringify(s3)}`);
          throw new Error(n6);
        }
        if (!uo3(r3, i5, s3.name)) {
          const { message: n6 } = S4("MISSING_OR_INVALID", `emit() event: ${JSON.stringify(s3)}`);
          throw new Error(n6);
        }
      }, this.isValidDisconnect = async (e2) => {
        if (!to2(e2)) {
          const { message: s3 } = S4("MISSING_OR_INVALID", `disconnect() params: ${e2}`);
          throw new Error(s3);
        }
        const { topic: t } = e2;
        await this.isValidSessionOrPairingTopic(t);
      }, this.isValidAuthenticate = (e2) => {
        const { chains: t, uri: s3, domain: i5, nonce: r3 } = e2;
        if (!Array.isArray(t) || t.length === 0) throw new Error("chains is required and must be a non-empty array");
        if (!b5(s3, false)) throw new Error("uri is required parameter");
        if (!b5(i5, false)) throw new Error("domain is required parameter");
        if (!b5(r3, false)) throw new Error("nonce is required parameter");
        if ([...new Set(t.map((a5) => re3(a5).namespace))].length > 1) throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");
        const { namespace: n6 } = re3(t[0]);
        if (n6 !== "eip155") throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.");
      }, this.getVerifyContext = async (e2) => {
        const { attestationId: t, hash: s3, encryptedId: i5, metadata: r3, transportType: n6 } = e2, a5 = { verified: { verifyUrl: r3.verifyUrl || J4, validation: "UNKNOWN", origin: r3.url || "" } };
        try {
          if (n6 === M8.link_mode) {
            const h8 = this.getAppLinkIfEnabled(r3, n6);
            return a5.verified.validation = h8 && new URL(h8).origin === new URL(r3.url).origin ? "VALID" : "INVALID", a5;
          }
          const c7 = await this.client.core.verify.resolve({ attestationId: t, hash: s3, encryptedId: i5, verifyUrl: r3.verifyUrl });
          c7 && (a5.verified.origin = c7.origin, a5.verified.isScam = c7.isScam, a5.verified.validation = c7.origin === new URL(r3.url).origin ? "VALID" : "INVALID");
        } catch (c7) {
          this.client.logger.warn(c7);
        }
        return this.client.logger.debug(`Verify context: ${JSON.stringify(a5)}`), a5;
      }, this.validateSessionProps = (e2, t) => {
        Object.values(e2).forEach((s3) => {
          if (!b5(s3, false)) {
            const { message: i5 } = S4("MISSING_OR_INVALID", `${t} must be in Record<string, string> format. Received: ${JSON.stringify(s3)}`);
            throw new Error(i5);
          }
        });
      }, this.getPendingAuthRequest = (e2) => {
        const t = this.client.auth.requests.get(e2);
        return typeof t == "object" ? t : void 0;
      }, this.addToRecentlyDeleted = (e2, t) => {
        if (this.recentlyDeletedMap.set(e2, t), this.recentlyDeletedMap.size >= this.recentlyDeletedLimit) {
          let s3 = 0;
          const i5 = this.recentlyDeletedLimit / 2;
          for (const r3 of this.recentlyDeletedMap.keys()) {
            if (s3++ >= i5) break;
            this.recentlyDeletedMap.delete(r3);
          }
        }
      }, this.checkRecentlyDeleted = (e2) => {
        const t = this.recentlyDeletedMap.get(e2);
        if (t) {
          const { message: s3 } = S4("MISSING_OR_INVALID", `Record was recently deleted - ${t}: ${e2}`);
          throw new Error(s3);
        }
      }, this.isLinkModeEnabled = (e2, t) => {
        var s3, i5, r3, n6, a5, c7, h8, p7, d6;
        return !e2 || t !== M8.link_mode ? false : ((i5 = (s3 = this.client.metadata) == null ? void 0 : s3.redirect) == null ? void 0 : i5.linkMode) === true && ((n6 = (r3 = this.client.metadata) == null ? void 0 : r3.redirect) == null ? void 0 : n6.universal) !== void 0 && ((c7 = (a5 = this.client.metadata) == null ? void 0 : a5.redirect) == null ? void 0 : c7.universal) !== "" && ((h8 = e2?.redirect) == null ? void 0 : h8.universal) !== void 0 && ((p7 = e2?.redirect) == null ? void 0 : p7.universal) !== "" && ((d6 = e2?.redirect) == null ? void 0 : d6.linkMode) === true && this.client.core.linkModeSupportedApps.includes(e2.redirect.universal) && typeof (global == null ? void 0 : global.Linking) < "u";
      }, this.getAppLinkIfEnabled = (e2, t) => {
        var s3;
        return this.isLinkModeEnabled(e2, t) ? (s3 = e2?.redirect) == null ? void 0 : s3.universal : void 0;
      }, this.handleLinkModeMessage = ({ url: e2 }) => {
        if (!e2 || !e2.includes("wc_ev") || !e2.includes("topic")) return;
        const t = Bt3(e2, "topic") || "", s3 = decodeURIComponent(Bt3(e2, "wc_ev") || ""), i5 = this.client.session.keys.includes(t);
        i5 && this.client.session.update(t, { transportType: M8.link_mode }), this.client.core.dispatchEnvelope({ topic: t, message: s3, sessionExists: i5 });
      }, this.registerLinkModeListeners = async () => {
        var e2;
        if (Wt4() || _4() && (e2 = this.client.metadata.redirect) != null && e2.linkMode) {
          const t = global == null ? void 0 : global.Linking;
          if (typeof t < "u") {
            t.addEventListener("url", this.handleLinkModeMessage, this.client.name);
            const s3 = await t.getInitialURL();
            s3 && setTimeout(() => {
              this.handleLinkModeMessage({ url: s3 });
            }, 50);
          }
        }
      };
    }
    isInitialized() {
      if (!this.initialized) {
        const { message: o5 } = S4("NOT_INITIALIZED", this.name);
        throw new Error(o5);
      }
    }
    async confirmOnlineStateOrThrow() {
      await this.client.core.relayer.confirmOnlineStateOrThrow();
    }
    registerRelayerEvents() {
      this.client.core.relayer.on(v10.message, (o5) => {
        !this.initialized || this.relayMessageCache.length > 0 ? this.relayMessageCache.push(o5) : this.onRelayMessage(o5);
      });
    }
    async onRelayMessage(o5) {
      const { topic: e2, message: t, attestation: s3, transportType: i5 } = o5, { publicKey: r3 } = this.client.auth.authKeys.keys.includes(ae6) ? this.client.auth.authKeys.get(ae6) : { responseTopic: void 0, publicKey: void 0 }, n6 = await this.client.core.crypto.decode(e2, t, { receiverPublicKey: r3, encoding: i5 === M8.link_mode ? lr2 : ge4 });
      try {
        isJsonRpcRequest(n6) ? (this.client.core.history.set(e2, n6), this.onRelayEventRequest({ topic: e2, payload: n6, attestation: s3, transportType: i5, encryptedId: yr2(t) })) : isJsonRpcResponse(n6) ? (await this.client.core.history.resolve(n6), await this.onRelayEventResponse({ topic: e2, payload: n6, transportType: i5 }), this.client.core.history.delete(e2, n6.id)) : this.onRelayEventUnknownPayload({ topic: e2, payload: n6, transportType: i5 });
      } catch (a5) {
        this.client.logger.error(a5);
      }
    }
    registerExpirerEvents() {
      this.client.core.expirer.on(S8.expired, async (o5) => {
        const { topic: e2, id: t } = Vt3(o5.target);
        if (t && this.client.pendingRequest.keys.includes(t)) return await this.deletePendingSessionRequest(t, S4("EXPIRED"), true);
        if (t && this.client.auth.requests.keys.includes(t)) return await this.deletePendingAuthRequest(t, S4("EXPIRED"), true);
        e2 ? this.client.session.keys.includes(e2) && (await this.deleteSession({ topic: e2, expirerHasDeleted: true }), this.client.events.emit("session_expire", { topic: e2 })) : t && (await this.deleteProposal(t, true), this.client.events.emit("proposal_expire", { id: t }));
      });
    }
    registerPairingEvents() {
      this.client.core.pairing.events.on(V5.create, (o5) => this.onPairingCreated(o5)), this.client.core.pairing.events.on(V5.delete, (o5) => {
        this.addToRecentlyDeleted(o5.topic, "pairing");
      });
    }
    isValidPairingTopic(o5) {
      if (!b5(o5, false)) {
        const { message: e2 } = S4("MISSING_OR_INVALID", `pairing topic should be a string: ${o5}`);
        throw new Error(e2);
      }
      if (!this.client.core.pairing.pairings.keys.includes(o5)) {
        const { message: e2 } = S4("NO_MATCHING_KEY", `pairing topic doesn't exist: ${o5}`);
        throw new Error(e2);
      }
      if (Kt3(this.client.core.pairing.pairings.get(o5).expiry)) {
        const { message: e2 } = S4("EXPIRED", `pairing topic: ${o5}`);
        throw new Error(e2);
      }
    }
    async isValidSessionTopic(o5) {
      if (!b5(o5, false)) {
        const { message: e2 } = S4("MISSING_OR_INVALID", `session topic should be a string: ${o5}`);
        throw new Error(e2);
      }
      if (this.checkRecentlyDeleted(o5), !this.client.session.keys.includes(o5)) {
        const { message: e2 } = S4("NO_MATCHING_KEY", `session topic doesn't exist: ${o5}`);
        throw new Error(e2);
      }
      if (Kt3(this.client.session.get(o5).expiry)) {
        await this.deleteSession({ topic: o5 });
        const { message: e2 } = S4("EXPIRED", `session topic: ${o5}`);
        throw new Error(e2);
      }
      if (!this.client.core.crypto.keychain.has(o5)) {
        const { message: e2 } = S4("MISSING_OR_INVALID", `session topic does not exist in keychain: ${o5}`);
        throw await this.deleteSession({ topic: o5 }), new Error(e2);
      }
    }
    async isValidSessionOrPairingTopic(o5) {
      if (this.checkRecentlyDeleted(o5), this.client.session.keys.includes(o5)) await this.isValidSessionTopic(o5);
      else if (this.client.core.pairing.pairings.keys.includes(o5)) this.isValidPairingTopic(o5);
      else if (b5(o5, false)) {
        const { message: e2 } = S4("NO_MATCHING_KEY", `session or pairing topic doesn't exist: ${o5}`);
        throw new Error(e2);
      } else {
        const { message: e2 } = S4("MISSING_OR_INVALID", `session or pairing topic should be a string: ${o5}`);
        throw new Error(e2);
      }
    }
    async isValidProposalId(o5) {
      if (!no2(o5)) {
        const { message: e2 } = S4("MISSING_OR_INVALID", `proposal id should be a number: ${o5}`);
        throw new Error(e2);
      }
      if (!this.client.proposal.keys.includes(o5)) {
        const { message: e2 } = S4("NO_MATCHING_KEY", `proposal id doesn't exist: ${o5}`);
        throw new Error(e2);
      }
      if (Kt3(this.client.proposal.get(o5).expiryTimestamp)) {
        await this.deleteProposal(o5);
        const { message: e2 } = S4("EXPIRED", `proposal id: ${o5}`);
        throw new Error(e2);
      }
    }
  };
  var Ss2 = class extends ni {
    constructor(o5, e2) {
      super(o5, e2, st4, ye7), this.core = o5, this.logger = e2;
    }
  };
  var yt5 = class extends ni {
    constructor(o5, e2) {
      super(o5, e2, rt4, ye7), this.core = o5, this.logger = e2;
    }
  };
  var Is2 = class extends ni {
    constructor(o5, e2) {
      super(o5, e2, ot3, ye7, (t) => t.id), this.core = o5, this.logger = e2;
    }
  };
  var fs = class extends ni {
    constructor(o5, e2) {
      super(o5, e2, pt4, oe5, () => ae6), this.core = o5, this.logger = e2;
    }
  };
  var vs2 = class extends ni {
    constructor(o5, e2) {
      super(o5, e2, ht4, oe5), this.core = o5, this.logger = e2;
    }
  };
  var qs2 = class extends ni {
    constructor(o5, e2) {
      super(o5, e2, dt5, oe5, (t) => t.id), this.core = o5, this.logger = e2;
    }
  };
  var Ts2 = class {
    constructor(o5, e2) {
      this.core = o5, this.logger = e2, this.authKeys = new fs(this.core, this.logger), this.pairingTopics = new vs2(this.core, this.logger), this.requests = new qs2(this.core, this.logger);
    }
    async init() {
      await this.authKeys.init(), await this.pairingTopics.init(), await this.requests.init();
    }
  };
  var _e6 = class __e extends S6 {
    constructor(o5) {
      super(o5), this.protocol = be7, this.version = Ce8, this.name = we7.name, this.events = new import_events13.EventEmitter(), this.on = (t, s3) => this.events.on(t, s3), this.once = (t, s3) => this.events.once(t, s3), this.off = (t, s3) => this.events.off(t, s3), this.removeListener = (t, s3) => this.events.removeListener(t, s3), this.removeAllListeners = (t) => this.events.removeAllListeners(t), this.connect = async (t) => {
        try {
          return await this.engine.connect(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.pair = async (t) => {
        try {
          return await this.engine.pair(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.approve = async (t) => {
        try {
          return await this.engine.approve(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.reject = async (t) => {
        try {
          return await this.engine.reject(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.update = async (t) => {
        try {
          return await this.engine.update(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.extend = async (t) => {
        try {
          return await this.engine.extend(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.request = async (t) => {
        try {
          return await this.engine.request(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.respond = async (t) => {
        try {
          return await this.engine.respond(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.ping = async (t) => {
        try {
          return await this.engine.ping(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.emit = async (t) => {
        try {
          return await this.engine.emit(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.disconnect = async (t) => {
        try {
          return await this.engine.disconnect(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.find = (t) => {
        try {
          return this.engine.find(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.getPendingSessionRequests = () => {
        try {
          return this.engine.getPendingSessionRequests();
        } catch (t) {
          throw this.logger.error(t.message), t;
        }
      }, this.authenticate = async (t, s3) => {
        try {
          return await this.engine.authenticate(t, s3);
        } catch (i5) {
          throw this.logger.error(i5.message), i5;
        }
      }, this.formatAuthMessage = (t) => {
        try {
          return this.engine.formatAuthMessage(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.approveSessionAuthenticate = async (t) => {
        try {
          return await this.engine.approveSessionAuthenticate(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.rejectSessionAuthenticate = async (t) => {
        try {
          return await this.engine.rejectSessionAuthenticate(t);
        } catch (s3) {
          throw this.logger.error(s3.message), s3;
        }
      }, this.name = o5?.name || we7.name, this.metadata = o5?.metadata || Nt2(), this.signConfig = o5?.signConfig;
      const e2 = typeof o5?.logger < "u" && typeof o5?.logger != "string" ? o5.logger : (0, import_pino2.default)(k4({ level: o5?.logger || we7.logger }));
      this.core = o5?.core || new bn3(o5), this.logger = E4(e2, this.name), this.session = new yt5(this.core, this.logger), this.proposal = new Ss2(this.core, this.logger), this.pendingRequest = new Is2(this.core, this.logger), this.engine = new Rs2(this), this.auth = new Ts2(this.core, this.logger);
    }
    static async init(o5) {
      const e2 = new __e(o5);
      return await e2.initialize(), e2;
    }
    get context() {
      return y6(this.logger);
    }
    get pairing() {
      return this.core.pairing.pairings;
    }
    async initialize() {
      this.logger.trace("Initialized");
      try {
        await this.core.start(), await this.session.init(), await this.proposal.init(), await this.pendingRequest.init(), await this.auth.init(), await this.engine.init(), this.logger.info("SignClient Initialization Success"), this.engine.processRelayMessageCache();
      } catch (o5) {
        throw this.logger.info("SignClient Initialization Failure"), this.logger.error(o5.message), o5;
      }
    }
  };
  var Ns2 = yt5;
  var Ps2 = _e6;

  // ../../node_modules/.pnpm/@walletconnect+web3wallet@1_6206cf9ce79dc0f43cbaba3ba20093f1/node_modules/@walletconnect/web3wallet/dist/index.es.js
  var l5 = { exports: {} };
  var c6 = typeof Reflect == "object" ? Reflect : null;
  var y10 = c6 && typeof c6.apply == "function" ? c6.apply : function(t, e2, n6) {
    return Function.prototype.apply.call(t, e2, n6);
  };
  var f6;
  c6 && typeof c6.ownKeys == "function" ? f6 = c6.ownKeys : Object.getOwnPropertySymbols ? f6 = function(t) {
    return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));
  } : f6 = function(t) {
    return Object.getOwnPropertyNames(t);
  };
  function k6(s3) {
    console && console.warn && console.warn(s3);
  }
  var w6 = Number.isNaN || function(t) {
    return t !== t;
  };
  function o4() {
    o4.init.call(this);
  }
  l5.exports = o4, l5.exports.once = K6, o4.EventEmitter = o4, o4.prototype._events = void 0, o4.prototype._eventsCount = 0, o4.prototype._maxListeners = void 0;
  var L5 = 10;
  function g7(s3) {
    if (typeof s3 != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof s3);
  }
  Object.defineProperty(o4, "defaultMaxListeners", { enumerable: true, get: function() {
    return L5;
  }, set: function(s3) {
    if (typeof s3 != "number" || s3 < 0 || w6(s3)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + s3 + ".");
    L5 = s3;
  } }), o4.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;
  }, o4.prototype.setMaxListeners = function(t) {
    if (typeof t != "number" || t < 0 || w6(t)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + ".");
    return this._maxListeners = t, this;
  };
  function _5(s3) {
    return s3._maxListeners === void 0 ? o4.defaultMaxListeners : s3._maxListeners;
  }
  o4.prototype.getMaxListeners = function() {
    return _5(this);
  }, o4.prototype.emit = function(t) {
    for (var e2 = [], n6 = 1; n6 < arguments.length; n6++) e2.push(arguments[n6]);
    var i5 = t === "error", a5 = this._events;
    if (a5 !== void 0) i5 = i5 && a5.error === void 0;
    else if (!i5) return false;
    if (i5) {
      var r3;
      if (e2.length > 0 && (r3 = e2[0]), r3 instanceof Error) throw r3;
      var h8 = new Error("Unhandled error." + (r3 ? " (" + r3.message + ")" : ""));
      throw h8.context = r3, h8;
    }
    var u4 = a5[t];
    if (u4 === void 0) return false;
    if (typeof u4 == "function") y10(u4, this, e2);
    else for (var d6 = u4.length, M9 = O8(u4, d6), n6 = 0; n6 < d6; ++n6) y10(M9[n6], this, e2);
    return true;
  };
  function S9(s3, t, e2, n6) {
    var i5, a5, r3;
    if (g7(e2), a5 = s3._events, a5 === void 0 ? (a5 = s3._events = /* @__PURE__ */ Object.create(null), s3._eventsCount = 0) : (a5.newListener !== void 0 && (s3.emit("newListener", t, e2.listener ? e2.listener : e2), a5 = s3._events), r3 = a5[t]), r3 === void 0) r3 = a5[t] = e2, ++s3._eventsCount;
    else if (typeof r3 == "function" ? r3 = a5[t] = n6 ? [e2, r3] : [r3, e2] : n6 ? r3.unshift(e2) : r3.push(e2), i5 = _5(s3), i5 > 0 && r3.length > i5 && !r3.warned) {
      r3.warned = true;
      var h8 = new Error("Possible EventEmitter memory leak detected. " + r3.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
      h8.name = "MaxListenersExceededWarning", h8.emitter = s3, h8.type = t, h8.count = r3.length, k6(h8);
    }
    return s3;
  }
  o4.prototype.addListener = function(t, e2) {
    return S9(this, t, e2, false);
  }, o4.prototype.on = o4.prototype.addListener, o4.prototype.prependListener = function(t, e2) {
    return S9(this, t, e2, true);
  };
  function D6() {
    if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = true, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
  }
  function C8(s3, t, e2) {
    var n6 = { fired: false, wrapFn: void 0, target: s3, type: t, listener: e2 }, i5 = D6.bind(n6);
    return i5.listener = e2, n6.wrapFn = i5, i5;
  }
  o4.prototype.once = function(t, e2) {
    return g7(e2), this.on(t, C8(this, t, e2)), this;
  }, o4.prototype.prependOnceListener = function(t, e2) {
    return g7(e2), this.prependListener(t, C8(this, t, e2)), this;
  }, o4.prototype.removeListener = function(t, e2) {
    var n6, i5, a5, r3, h8;
    if (g7(e2), i5 = this._events, i5 === void 0) return this;
    if (n6 = i5[t], n6 === void 0) return this;
    if (n6 === e2 || n6.listener === e2) --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete i5[t], i5.removeListener && this.emit("removeListener", t, n6.listener || e2));
    else if (typeof n6 != "function") {
      for (a5 = -1, r3 = n6.length - 1; r3 >= 0; r3--) if (n6[r3] === e2 || n6[r3].listener === e2) {
        h8 = n6[r3].listener, a5 = r3;
        break;
      }
      if (a5 < 0) return this;
      a5 === 0 ? n6.shift() : F5(n6, a5), n6.length === 1 && (i5[t] = n6[0]), i5.removeListener !== void 0 && this.emit("removeListener", t, h8 || e2);
    }
    return this;
  }, o4.prototype.off = o4.prototype.removeListener, o4.prototype.removeAllListeners = function(t) {
    var e2, n6, i5;
    if (n6 = this._events, n6 === void 0) return this;
    if (n6.removeListener === void 0) return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : n6[t] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete n6[t]), this;
    if (arguments.length === 0) {
      var a5 = Object.keys(n6), r3;
      for (i5 = 0; i5 < a5.length; ++i5) r3 = a5[i5], r3 !== "removeListener" && this.removeAllListeners(r3);
      return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
    }
    if (e2 = n6[t], typeof e2 == "function") this.removeListener(t, e2);
    else if (e2 !== void 0) for (i5 = e2.length - 1; i5 >= 0; i5--) this.removeListener(t, e2[i5]);
    return this;
  };
  function b8(s3, t, e2) {
    var n6 = s3._events;
    if (n6 === void 0) return [];
    var i5 = n6[t];
    return i5 === void 0 ? [] : typeof i5 == "function" ? e2 ? [i5.listener || i5] : [i5] : e2 ? z10(i5) : O8(i5, i5.length);
  }
  o4.prototype.listeners = function(t) {
    return b8(this, t, true);
  }, o4.prototype.rawListeners = function(t) {
    return b8(this, t, false);
  }, o4.listenerCount = function(s3, t) {
    return typeof s3.listenerCount == "function" ? s3.listenerCount(t) : E5.call(s3, t);
  }, o4.prototype.listenerCount = E5;
  function E5(s3) {
    var t = this._events;
    if (t !== void 0) {
      var e2 = t[s3];
      if (typeof e2 == "function") return 1;
      if (e2 !== void 0) return e2.length;
    }
    return 0;
  }
  o4.prototype.eventNames = function() {
    return this._eventsCount > 0 ? f6(this._events) : [];
  };
  function O8(s3, t) {
    for (var e2 = new Array(t), n6 = 0; n6 < t; ++n6) e2[n6] = s3[n6];
    return e2;
  }
  function F5(s3, t) {
    for (; t + 1 < s3.length; t++) s3[t] = s3[t + 1];
    s3.pop();
  }
  function z10(s3) {
    for (var t = new Array(s3.length), e2 = 0; e2 < t.length; ++e2) t[e2] = s3[e2].listener || s3[e2];
    return t;
  }
  function K6(s3, t) {
    return new Promise(function(e2, n6) {
      function i5(r3) {
        s3.removeListener(t, a5), n6(r3);
      }
      function a5() {
        typeof s3.removeListener == "function" && s3.removeListener("error", i5), e2([].slice.call(arguments));
      }
      R5(s3, t, a5, { once: true }), t !== "error" && U7(s3, i5, { once: true });
    });
  }
  function U7(s3, t, e2) {
    typeof s3.on == "function" && R5(s3, "error", t, e2);
  }
  function R5(s3, t, e2, n6) {
    if (typeof s3.on == "function") n6.once ? s3.once(t, e2) : s3.on(t, e2);
    else if (typeof s3.addEventListener == "function") s3.addEventListener(t, function i5(a5) {
      n6.once && s3.removeEventListener(t, i5), e2(a5);
    });
    else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof s3);
  }
  var A6 = "wc";
  var p6 = "Web3Wallet";
  var $7 = `${A6}@2:${p6}:`;
  var Q6 = class extends l5.exports {
    constructor() {
      super();
    }
  };
  var x12 = class {
    constructor(t) {
      this.opts = t;
    }
  };
  var P7 = class {
    constructor(t) {
      this.client = t;
    }
  };
  var V6 = Object.defineProperty;
  var B6 = Object.defineProperties;
  var J5 = Object.getOwnPropertyDescriptors;
  var q6 = Object.getOwnPropertySymbols;
  var Y5 = Object.prototype.hasOwnProperty;
  var Z5 = Object.prototype.propertyIsEnumerable;
  var j5 = (s3, t, e2) => t in s3 ? V6(s3, t, { enumerable: true, configurable: true, writable: true, value: e2 }) : s3[t] = e2;
  var ee7 = (s3, t) => {
    for (var e2 in t || (t = {})) Y5.call(t, e2) && j5(s3, e2, t[e2]);
    if (q6) for (var e2 of q6(t)) Z5.call(t, e2) && j5(s3, e2, t[e2]);
    return s3;
  };
  var te6 = (s3, t) => B6(s3, J5(t));
  var se5 = class extends P7 {
    constructor(t) {
      super(t), this.init = async () => {
        this.signClient = await Ps2.init({ core: this.client.core, metadata: this.client.metadata, signConfig: this.client.signConfig }), this.authClient = await zr3.init({ core: this.client.core, projectId: "", metadata: this.client.metadata });
      }, this.pair = async (e2) => {
        await this.client.core.pairing.pair(e2);
      }, this.approveSession = async (e2) => {
        const { topic: n6, acknowledged: i5 } = await this.signClient.approve(te6(ee7({}, e2), { id: e2.id, namespaces: e2.namespaces, sessionProperties: e2.sessionProperties, sessionConfig: e2.sessionConfig }));
        return await i5(), this.signClient.session.get(n6);
      }, this.rejectSession = async (e2) => await this.signClient.reject(e2), this.updateSession = async (e2) => await this.signClient.update(e2), this.extendSession = async (e2) => await this.signClient.extend(e2), this.respondSessionRequest = async (e2) => await this.signClient.respond(e2), this.disconnectSession = async (e2) => await this.signClient.disconnect(e2), this.emitSessionEvent = async (e2) => await this.signClient.emit(e2), this.getActiveSessions = () => this.signClient.session.getAll().reduce((e2, n6) => (e2[n6.topic] = n6, e2), {}), this.getPendingSessionProposals = () => this.signClient.proposal.getAll(), this.getPendingSessionRequests = () => this.signClient.getPendingSessionRequests(), this.respondAuthRequest = async (e2, n6) => await this.authClient.respond(e2, n6), this.getPendingAuthRequests = () => this.authClient.requests.getAll().filter((e2) => "requester" in e2), this.formatMessage = (e2, n6) => this.authClient.formatMessage(e2, n6), this.approveSessionAuthenticate = async (e2) => await this.signClient.approveSessionAuthenticate(e2), this.rejectSessionAuthenticate = async (e2) => await this.signClient.rejectSessionAuthenticate(e2), this.formatAuthMessage = (e2) => this.signClient.formatAuthMessage(e2), this.registerDeviceToken = (e2) => this.client.core.echoClient.registerDeviceToken(e2), this.on = (e2, n6) => (this.setEvent(e2, "off"), this.setEvent(e2, "on"), this.client.events.on(e2, n6)), this.once = (e2, n6) => (this.setEvent(e2, "off"), this.setEvent(e2, "once"), this.client.events.once(e2, n6)), this.off = (e2, n6) => (this.setEvent(e2, "off"), this.client.events.off(e2, n6)), this.removeListener = (e2, n6) => (this.setEvent(e2, "removeListener"), this.client.events.removeListener(e2, n6)), this.onSessionRequest = (e2) => {
        this.client.events.emit("session_request", e2);
      }, this.onSessionProposal = (e2) => {
        this.client.events.emit("session_proposal", e2);
      }, this.onSessionDelete = (e2) => {
        this.client.events.emit("session_delete", e2);
      }, this.onAuthRequest = (e2) => {
        this.client.events.emit("auth_request", e2);
      }, this.onProposalExpire = (e2) => {
        this.client.events.emit("proposal_expire", e2);
      }, this.onSessionRequestExpire = (e2) => {
        this.client.events.emit("session_request_expire", e2);
      }, this.onSessionRequestAuthenticate = (e2) => {
        this.client.events.emit("session_authenticate", e2);
      }, this.setEvent = (e2, n6) => {
        switch (e2) {
          case "session_request":
            this.signClient.events[n6]("session_request", this.onSessionRequest);
            break;
          case "session_proposal":
            this.signClient.events[n6]("session_proposal", this.onSessionProposal);
            break;
          case "session_delete":
            this.signClient.events[n6]("session_delete", this.onSessionDelete);
            break;
          case "auth_request":
            this.authClient[n6]("auth_request", this.onAuthRequest);
            break;
          case "proposal_expire":
            this.signClient.events[n6]("proposal_expire", this.onProposalExpire);
            break;
          case "session_request_expire":
            this.signClient.events[n6]("session_request_expire", this.onSessionRequestExpire);
            break;
          case "session_authenticate":
            this.signClient.events[n6]("session_authenticate", this.onSessionRequestAuthenticate);
            break;
        }
      }, this.signClient = {}, this.authClient = {};
    }
  };
  var ne7 = { decryptMessage: async (s3) => {
    const t = { core: new bn3({ storageOptions: s3.storageOptions, storage: s3.storage }) };
    await t.core.crypto.init();
    const e2 = t.core.crypto.decode(s3.topic, s3.encryptedMessage);
    return t.core = null, e2;
  }, getMetadata: async (s3) => {
    const t = { core: new bn3({ storageOptions: s3.storageOptions, storage: s3.storage }), sessionStore: null };
    t.sessionStore = new Ns2(t.core, t.core.logger), await t.sessionStore.init();
    const e2 = t.sessionStore.get(s3.topic), n6 = e2?.peer.metadata;
    return t.core = null, t.sessionStore = null, n6;
  } };
  var T5 = class extends x12 {
    constructor(s3) {
      super(s3), this.events = new l5.exports(), this.on = (t, e2) => this.engine.on(t, e2), this.once = (t, e2) => this.engine.once(t, e2), this.off = (t, e2) => this.engine.off(t, e2), this.removeListener = (t, e2) => this.engine.removeListener(t, e2), this.pair = async (t) => {
        try {
          return await this.engine.pair(t);
        } catch (e2) {
          throw this.logger.error(e2.message), e2;
        }
      }, this.approveSession = async (t) => {
        try {
          return await this.engine.approveSession(t);
        } catch (e2) {
          throw this.logger.error(e2.message), e2;
        }
      }, this.rejectSession = async (t) => {
        try {
          return await this.engine.rejectSession(t);
        } catch (e2) {
          throw this.logger.error(e2.message), e2;
        }
      }, this.updateSession = async (t) => {
        try {
          return await this.engine.updateSession(t);
        } catch (e2) {
          throw this.logger.error(e2.message), e2;
        }
      }, this.extendSession = async (t) => {
        try {
          return await this.engine.extendSession(t);
        } catch (e2) {
          throw this.logger.error(e2.message), e2;
        }
      }, this.respondSessionRequest = async (t) => {
        try {
          return await this.engine.respondSessionRequest(t);
        } catch (e2) {
          throw this.logger.error(e2.message), e2;
        }
      }, this.disconnectSession = async (t) => {
        try {
          return await this.engine.disconnectSession(t);
        } catch (e2) {
          throw this.logger.error(e2.message), e2;
        }
      }, this.emitSessionEvent = async (t) => {
        try {
          return await this.engine.emitSessionEvent(t);
        } catch (e2) {
          throw this.logger.error(e2.message), e2;
        }
      }, this.getActiveSessions = () => {
        try {
          return this.engine.getActiveSessions();
        } catch (t) {
          throw this.logger.error(t.message), t;
        }
      }, this.getPendingSessionProposals = () => {
        try {
          return this.engine.getPendingSessionProposals();
        } catch (t) {
          throw this.logger.error(t.message), t;
        }
      }, this.getPendingSessionRequests = () => {
        try {
          return this.engine.getPendingSessionRequests();
        } catch (t) {
          throw this.logger.error(t.message), t;
        }
      }, this.respondAuthRequest = async (t, e2) => {
        try {
          return await this.engine.respondAuthRequest(t, e2);
        } catch (n6) {
          throw this.logger.error(n6.message), n6;
        }
      }, this.getPendingAuthRequests = () => {
        try {
          return this.engine.getPendingAuthRequests();
        } catch (t) {
          throw this.logger.error(t.message), t;
        }
      }, this.formatMessage = (t, e2) => {
        try {
          return this.engine.formatMessage(t, e2);
        } catch (n6) {
          throw this.logger.error(n6.message), n6;
        }
      }, this.registerDeviceToken = (t) => {
        try {
          return this.engine.registerDeviceToken(t);
        } catch (e2) {
          throw this.logger.error(e2.message), e2;
        }
      }, this.approveSessionAuthenticate = (t) => {
        try {
          return this.engine.approveSessionAuthenticate(t);
        } catch (e2) {
          throw this.logger.error(e2.message), e2;
        }
      }, this.rejectSessionAuthenticate = (t) => {
        try {
          return this.engine.rejectSessionAuthenticate(t);
        } catch (e2) {
          throw this.logger.error(e2.message), e2;
        }
      }, this.formatAuthMessage = (t) => {
        try {
          return this.engine.formatAuthMessage(t);
        } catch (e2) {
          throw this.logger.error(e2.message), e2;
        }
      }, this.metadata = s3.metadata, this.name = s3.name || p6, this.signConfig = s3.signConfig, this.core = s3.core, this.logger = this.core.logger, this.engine = new se5(this);
    }
    static async init(s3) {
      const t = new T5(s3);
      return await t.initialize(), t;
    }
    async initialize() {
      this.logger.trace("Initialized");
      try {
        await this.engine.init(), this.logger.info("Web3Wallet Initialization Success");
      } catch (s3) {
        throw this.logger.info("Web3Wallet Initialization Failure"), this.logger.error(s3.message), s3;
      }
    }
  };
  var v12 = T5;
  v12.notifications = ne7;
  var ie6 = v12;

  // src/background/walletconnect.ts
  var WalletConnectClient = class {
    wallet = null;
    isInitializing = false;
    async initialize() {
      if (this.wallet) return this.wallet;
      if (this.isInitializing) {
        while (this.isInitializing) {
          await new Promise((resolve) => setTimeout(resolve, 100));
        }
        return this.wallet;
      }
      this.isInitializing = true;
      try {
        const core = new Ji({
          // Standard public test project ID or fallback
          projectId: "8d39c9f0b5d90e0c030d9fb82abdcfa2"
        });
        this.wallet = await ie6.init({
          core,
          metadata: {
            name: "Acorus Extension",
            description: "Ultimate Multi-Chain Wallet",
            url: "https://24wallet.ru",
            icons: ["https://24wallet.ru/favicon.ico"]
          }
        });
        this.wallet.on("session_proposal", this.onSessionProposal.bind(this));
        this.wallet.on("session_request", this.onSessionRequest.bind(this));
        this.wallet.on("session_delete", this.onSessionDelete.bind(this));
        console.log("[WalletConnect] Initialized Web3Wallet");
        return this.wallet;
      } finally {
        this.isInitializing = false;
      }
    }
    async pair(uri) {
      const wallet = await this.initialize();
      await wallet.core.pairing.pair({ uri });
    }
    async approveSession(id, namespaces) {
      const wallet = await this.initialize();
      await wallet.approveSession({
        id,
        namespaces
      });
    }
    async rejectSession(id, reason) {
      const wallet = await this.initialize();
      await wallet.rejectSession({
        id,
        reason: {
          code: 5e3,
          message: reason
        }
      });
    }
    async respondSessionRequest(topic, response) {
      const wallet = await this.initialize();
      await wallet.respondSessionRequest({
        topic,
        response
      });
    }
    onSessionProposal(proposal) {
      console.log("[WalletConnect] Session Proposal:", proposal);
      this.rejectSession(proposal.id, "User rejection").catch(console.error);
    }
    onSessionRequest(request) {
      console.log("[WalletConnect] Session Request:", request);
    }
    onSessionDelete(event) {
      console.log("[WalletConnect] Session Delete:", event);
    }
  };
  var walletConnectClient = new WalletConnectClient();

  // src/background/extension-assets.ts
  init_node_compat_inject();
  var WATCHED_ASSETS_KEY = "acorus_extension_watched_assets";
  var HIDDEN_ASSET_IDS_KEY = "acorus_extension_hidden_assets";
  var ERC20_BALANCE_OF_SELECTOR = "0x70a08231";
  var EXTENSION_API_BASES = [
    "https://24wallet.ru",
    "http://85.239.59.199:8080"
  ];
  var DEFAULT_PUBLIC_EVM_RPCS = {
    1: "https://ethereum-rpc.publicnode.com",
    10: "https://optimism-rpc.publicnode.com",
    56: "https://bsc-rpc.publicnode.com",
    137: "https://polygon-bor-rpc.publicnode.com",
    204: "https://opbnb-rpc.publicnode.com",
    250: "https://fantom-rpc.publicnode.com",
    324: "https://zksync-era-rpc.publicnode.com",
    1329: "https://sei-evm-rpc.publicnode.com",
    8453: "https://base-rpc.publicnode.com",
    42161: "https://arbitrum-one-rpc.publicnode.com",
    43114: "https://avalanche-c-chain-rpc.publicnode.com",
    59144: "https://linea-rpc.publicnode.com"
  };
  var DEFAULT_SOLANA_RPC_URL = "https://api.mainnet-beta.solana.com";
  async function listWatchedAssets() {
    return readStorageValue(WATCHED_ASSETS_KEY, []);
  }
  async function watchAsset2(input) {
    validateAssetRef(input);
    const watched = {
      ...input,
      id: buildAssetId(input),
      addedAt: (/* @__PURE__ */ new Date()).toISOString(),
      hidden: false
    };
    const current = await listWatchedAssets();
    const next = [
      ...current.filter((item) => item.id !== watched.id),
      watched
    ];
    await writeStorageValue(WATCHED_ASSETS_KEY, next);
    return watched;
  }
  async function hideAsset(assetId) {
    const current = await readStorageValue(HIDDEN_ASSET_IDS_KEY, []);
    const next = Array.from(/* @__PURE__ */ new Set([...current, assetId]));
    await writeStorageValue(HIDDEN_ASSET_IDS_KEY, next);
    return next;
  }
  async function unhideAsset(assetId) {
    const current = await readStorageValue(HIDDEN_ASSET_IDS_KEY, []);
    const next = current.filter((item) => item !== assetId);
    await writeStorageValue(HIDDEN_ASSET_IDS_KEY, next);
    return next;
  }
  async function buildExtensionPortfolioSnapshot(input) {
    const vault = await getExtensionVaultStatus();
    const networks = await listExtensionNetworks();
    const watched = await listWatchedAssets();
    const hidden2 = new Set(await readStorageValue(HIDDEN_ASSET_IDS_KEY, []));
    const activeChainId = input?.activeChainId ?? networks[0]?.chainId ?? 1;
    const warnings = [];
    const assets = [];
    for (const network of networks) {
      const profile = vault.profiles.find((item) => item.chainFamily === network.family);
      if (!profile) {
        continue;
      }
      if (network.family === "solana") {
        const solanaAssets = await resolveSolanaPortfolioAssets(
          profile.account,
          network,
          warnings
        );
        for (const solanaAsset of solanaAssets) {
          if (!hidden2.has(buildAssetId(solanaAsset))) {
            assets.push(solanaAsset);
          }
        }
        continue;
      }
      const nativeAsset = buildNativeAsset(network);
      const nativeId = buildAssetId(nativeAsset);
      if (!hidden2.has(nativeId)) {
        assets.push(await resolveAssetBalance({
          asset: nativeAsset,
          ownerAddress: profile.account,
          network,
          warnings
        }));
      }
    }
    for (const asset of watched) {
      if (hidden2.has(asset.id) || asset.hidden) {
        continue;
      }
      const network = await resolveExtensionNetwork(asset.chainId);
      const profile = vault.profiles.find((item) => item.chainFamily === asset.family);
      if (!network || !profile) {
        continue;
      }
      assets.push(await resolveAssetBalance({
        asset,
        ownerAddress: profile.account,
        network,
        warnings
      }));
    }
    const pricedAssets = await enrichAssetsWithPrices(assets, warnings);
    const values = pricedAssets.map((asset) => asset.fiatValue).filter((value) => typeof value === "number" && Number.isFinite(value));
    return {
      updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
      totalFiatValue: values.length ? values.reduce((sum, value) => sum + value, 0) : null,
      activeChainId,
      networks,
      assets: pricedAssets,
      warnings
    };
  }
  async function enrichAssetsWithPrices(assets, warnings = []) {
    const prices = await fetchExtensionPrices(assets, warnings);
    return assets.map((asset) => {
      const price = prices.get(buildPriceKey(asset));
      if (!price) {
        return {
          ...asset,
          priceUsd: null,
          fiatValue: null,
          source: appendSource(asset.source, "price_unavailable")
        };
      }
      const balance = Number(asset.balanceFormatted);
      return {
        ...asset,
        priceUsd: price.price,
        fiatValue: Number.isFinite(balance) ? balance * price.price : null,
        source: appendSource(
          asset.source,
          price.sourceStatus === "cached" || price.sourceStatus === "stale_cache" ? "cached_price" : "live_price"
        )
      };
    });
  }
  async function fetchExtensionPrices(assets, warnings) {
    const byChain = /* @__PURE__ */ new Map();
    for (const asset of assets) {
      const chainId = Number(asset.chainId);
      if (!Number.isFinite(chainId) || !asset.symbol) {
        continue;
      }
      const items = byChain.get(chainId) ?? [];
      items.push(asset);
      byChain.set(chainId, items);
    }
    const prices = /* @__PURE__ */ new Map();
    for (const [chainId, chainAssets] of byChain.entries()) {
      const result = await fetchPricesForChain(chainId, chainAssets, warnings);
      for (const price of result) {
        prices.set(buildPriceKey(price), price);
      }
    }
    return prices;
  }
  async function fetchPricesForChain(chainId, assets, warnings) {
    const params = new URLSearchParams({
      chainId: String(chainId),
      currency: "USD",
      symbols: assets.map((asset) => asset.symbol).join(",")
    });
    params.set(
      "tokenAddresses",
      assets.map((asset) => asset.tokenAddress ?? "").join(",")
    );
    for (const base4 of EXTENSION_API_BASES) {
      try {
        const response = await fetch(`${base4}/api/market/prices?${params.toString()}`);
        if (!response.ok) {
          continue;
        }
        const payload = await response.json();
        if (payload.ok && Array.isArray(payload.prices)) {
          return payload.prices;
        }
      } catch {
      }
    }
    warnings.push(`Prices unavailable for chain ${chainId}.`);
    return [];
  }
  function buildPriceKey(input) {
    return [
      String(input.chainId),
      input.symbol.toUpperCase(),
      input.tokenAddress?.toLowerCase() ?? "native"
    ].join(":");
  }
  function appendSource(current, status) {
    return current ? `${current}+${status}` : status;
  }
  function buildAssetId(asset) {
    return [
      asset.family,
      String(asset.chainId),
      asset.type,
      asset.tokenAddress?.toLowerCase() ?? "native",
      asset.symbol.toUpperCase()
    ].join(":");
  }
  function buildNativeAsset(network) {
    return {
      family: network.family,
      chainId: network.chainId,
      type: network.family === "utxo" ? "utxo" : "native",
      symbol: network.nativeSymbol,
      name: network.name,
      decimals: network.family === "utxo" ? 8 : network.family === "solana" ? 9 : 18,
      tokenAddress: null,
      isVerified: true
    };
  }
  async function resolveAssetBalance(input) {
    const { asset, ownerAddress, network, warnings } = input;
    if (network.family === "solana") {
      if (asset.type === "native") {
        const [native] = await resolveSolanaPortfolioAssets(
          ownerAddress,
          network,
          warnings
        );
        if (native) {
          return native;
        }
      }
      return {
        ...asset,
        balanceRaw: "0",
        balanceFormatted: "0",
        fiatValue: null,
        priceUsd: null,
        source: "unavailable"
      };
    }
    if (network.family !== "evm") {
      warnings.push(`${network.name}: live balance is not enabled in extension yet.`);
      return {
        ...asset,
        balanceRaw: "0",
        balanceFormatted: "0",
        fiatValue: null,
        priceUsd: null,
        source: network.capabilities.balance ? "unavailable" : "skeleton"
      };
    }
    try {
      if (asset.type === "native") {
        const raw = await fetchEvmNativeBalance(
          resolveRpcUrl(network),
          ownerAddress
        );
        return {
          ...asset,
          balanceRaw: raw.toString(),
          balanceFormatted: formatUnits2(raw, asset.decimals),
          fiatValue: null,
          priceUsd: null,
          source: "live_rpc"
        };
      }
      if (asset.type === "erc20" && asset.tokenAddress) {
        const raw = await fetchErc20Balance(
          resolveRpcUrl(network),
          asset.tokenAddress,
          ownerAddress
        );
        return {
          ...asset,
          balanceRaw: raw.toString(),
          balanceFormatted: formatUnits2(raw, asset.decimals),
          fiatValue: null,
          priceUsd: null,
          source: "live_rpc"
        };
      }
    } catch (error51) {
      warnings.push(
        `${network.name}: ${error51 instanceof Error ? error51.message : "balance unavailable"}`
      );
    }
    return {
      ...asset,
      balanceRaw: "0",
      balanceFormatted: "0",
      fiatValue: null,
      priceUsd: null,
      source: "unavailable"
    };
  }
  async function resolveSolanaPortfolioAssets(ownerAddress, network, warnings) {
    try {
      const balances = await getSolanaPortfolioBalances({
        address: ownerAddress,
        rpcUrl: resolveSolanaRpcUrl(network),
        tokens: getCuratedTokens(101).map((token) => ({
          id: `${token.chainId}:${token.address}`,
          chainId: token.chainId,
          tokenAddress: token.address,
          symbol: token.symbol,
          name: token.name,
          decimals: token.decimals,
          logoUrl: token.logoUrl,
          isVerified: token.verified,
          createdAt: "2026-05-19T00:00:00.000Z",
          updatedAt: "2026-05-19T00:00:00.000Z"
        }))
      });
      return balances.map((asset) => ({
        family: "solana",
        chainId: asset.chainId,
        type: asset.type,
        symbol: asset.symbol,
        name: asset.name,
        decimals: asset.decimals,
        tokenAddress: asset.tokenAddress ?? null,
        logoUrl: asset.logoUrl ?? null,
        isVerified: asset.isVerified,
        balanceRaw: asset.balanceRaw,
        balanceFormatted: asset.balanceFormatted,
        fiatValue: null,
        priceUsd: null,
        source: "live_solana_rpc"
      }));
    } catch (error51) {
      warnings.push(
        `${network.name}: ${error51 instanceof Error ? error51.message : "Solana RPC unavailable"}`
      );
      return [{
        family: "solana",
        chainId: 101,
        type: "native",
        symbol: "SOL",
        name: "Solana",
        decimals: 9,
        tokenAddress: null,
        isVerified: true,
        balanceRaw: "0",
        balanceFormatted: "0",
        fiatValue: null,
        priceUsd: null,
        source: "unavailable"
      }];
    }
  }
  function resolveSolanaRpcUrl(network) {
    return network.rpcUrl ?? (typeof process === "undefined" ? void 0 : process.env?.NEXT_PUBLIC_SOLANA_RPC_URL) ?? DEFAULT_SOLANA_RPC_URL;
  }
  function resolveRpcUrl(network) {
    const rpcUrl = network.rpcUrl ?? DEFAULT_PUBLIC_EVM_RPCS[Number(network.chainId)];
    if (!rpcUrl) {
      throw new Error("RPC is not configured for this network.");
    }
    return rpcUrl;
  }
  async function fetchEvmNativeBalance(rpcUrl, ownerAddress) {
    const result = await fetchJsonRpc(rpcUrl, "eth_getBalance", [
      ownerAddress,
      "latest"
    ]);
    return BigInt(result ?? "0x0");
  }
  async function fetchErc20Balance(rpcUrl, tokenAddress, ownerAddress) {
    const result = await fetchJsonRpc(rpcUrl, "eth_call", [
      {
        to: tokenAddress,
        data: encodeErc20BalanceOf(ownerAddress)
      },
      "latest"
    ]);
    return BigInt(result ?? "0x0");
  }
  async function fetchJsonRpc(rpcUrl, method, params) {
    const response = await fetch(rpcUrl, {
      method: "POST",
      headers: { "content-type": "application/json" },
      body: JSON.stringify({
        jsonrpc: "2.0",
        id: 1,
        method,
        params
      })
    });
    if (!response.ok) {
      throw new Error("RPC endpoint did not respond.");
    }
    const payload = await response.json();
    if (payload.error) {
      throw new Error(payload.error.message ?? "RPC call failed.");
    }
    return payload.result ?? null;
  }
  function encodeErc20BalanceOf(ownerAddress) {
    return `${ERC20_BALANCE_OF_SELECTOR}${ownerAddress.toLowerCase().replace(/^0x/u, "").padStart(64, "0")}`;
  }
  function validateAssetRef(input) {
    if (!input.symbol.trim()) {
      throw new Error("Asset symbol is required.");
    }
    if (!input.name.trim()) {
      throw new Error("Asset name is required.");
    }
    if (!Number.isInteger(input.decimals) || input.decimals < 0 || input.decimals > 30) {
      throw new Error("Asset decimals are invalid.");
    }
    if (input.type === "erc20" && !looksLikeEvmAddress2(input.tokenAddress)) {
      throw new Error("ERC-20 token address is invalid.");
    }
  }
  function looksLikeEvmAddress2(value) {
    return typeof value === "string" && /^0x[0-9a-f]{40}$/iu.test(value);
  }
  function formatUnits2(value, decimals) {
    const negative = value < 0n;
    const raw = negative ? -value : value;
    const base4 = 10n ** BigInt(decimals);
    const whole = raw / base4;
    const fraction = raw % base4;
    const fractionText = fraction.toString().padStart(decimals, "0").replace(/0+$/u, "").slice(0, 6);
    return `${negative ? "-" : ""}${whole.toString()}${fractionText ? `.${fractionText}` : ""}`;
  }

  // src/background/request-risk.ts
  init_node_compat_inject();
  var DEFAULT_APPROVAL_WARNING = "Approval requires a second signer confirmation inside the extension before any signature or transaction result is returned.";
  var ERC20_APPROVE_SELECTOR = "0x095ea7b3";
  var ERC721_SET_APPROVAL_FOR_ALL_SELECTOR = "0xa22cb465";
  var MAX_UINT256 = (1n << 256n) - 1n;
  function buildApprovalRiskWarning(input) {
    switch (input.method) {
      case "acorus_signMessage":
        return `${DEFAULT_APPROVAL_WARNING} Message signatures can be reused for login, delegation, or phishing flows, so verify the text and origin carefully.`;
      case "acorus_signTypedData":
        return buildTypedDataWarning(input.params);
      case "acorus_signTransaction":
      case "acorus_sendTransaction":
        return buildTransactionWarning(input.params);
      default:
        return DEFAULT_APPROVAL_WARNING;
    }
  }
  function buildTypedDataWarning(params) {
    const typedData = extractTypedDataPayload(params);
    if (!typedData) {
      return `${DEFAULT_APPROVAL_WARNING} Typed data can authorize permits, approvals, or delegated actions, so verify the domain and contract carefully.`;
    }
    const domainName = getRecordString(typedData.domain, "name");
    const verifyingContract = getRecordString(
      typedData.domain,
      "verifyingContract"
    );
    const primaryType = getRecordString(typedData, "primaryType");
    const details = [
      primaryType ? `type ${primaryType}` : null,
      domainName ? `domain ${domainName}` : null,
      verifyingContract ? `verifying contract ${truncateAddress(verifyingContract)}` : null
    ].filter(Boolean);
    return `${DEFAULT_APPROVAL_WARNING} Typed data can authorize permits, approvals, or delegated actions.${details.length ? ` Review ${details.join(", ")} carefully.` : ""}`;
  }
  function buildTransactionWarning(params) {
    const transaction = extractTransaction(params);
    if (!transaction) {
      return `${DEFAULT_APPROVAL_WARNING} Review destination, native value, and calldata carefully before signing this transaction.`;
    }
    const details = [DEFAULT_APPROVAL_WARNING];
    const to3 = asString(transaction.to);
    const value = formatValue(transaction.value);
    const data = asString(transaction.data);
    if (to3) {
      details.push(`Target ${truncateAddress(to3)}.`);
    } else {
      details.push(
        "No destination address was provided, so this request may deploy a contract."
      );
    }
    if (value) {
      details.push(`Native value ${value}.`);
    }
    if (data && isHexData(data)) {
      details.push(analyzeTransactionData(to3, data));
    } else {
      details.push("No calldata detected; this looks like a direct native transfer.");
    }
    return details.join(" ");
  }
  function extractTypedDataPayload(params) {
    for (const candidate of params) {
      if (isRecord(candidate) && isRecord(candidate.domain)) {
        return candidate;
      }
    }
    return null;
  }
  function extractTransaction(params) {
    const first = params[0];
    return isRecord(first) ? first : null;
  }
  function analyzeTransactionData(to3, data) {
    const selector = data.slice(0, 10).toLowerCase();
    if (selector === ERC20_APPROVE_SELECTOR) {
      const spender = decodeAddressArgument(data, 0);
      const amount = decodeUintArgument(data, 1);
      if (spender && amount !== null) {
        const allowance = amount === MAX_UINT256 ? "unlimited token allowance" : `token allowance raw amount ${amount.toString()}`;
        return `Detected ERC-20 approve call: ${allowance} for spender ${truncateAddress(spender)}${to3 ? ` via contract ${truncateAddress(to3)}` : ""}.`;
      }
    }
    if (selector === ERC721_SET_APPROVAL_FOR_ALL_SELECTOR) {
      const operator = decodeAddressArgument(data, 0);
      const enabled = decodeUintArgument(data, 1);
      if (operator && enabled !== null) {
        return `Detected NFT setApprovalForAll call: operator ${truncateAddress(operator)} will be ${enabled === 0n ? "removed" : "granted access to all matching assets"}${to3 ? ` on contract ${truncateAddress(to3)}` : ""}.`;
      }
    }
    return `Contract calldata is present${to3 ? ` for ${truncateAddress(to3)}` : ""}. Review the method, spender, and asset impact carefully before approving.`;
  }
  function decodeAddressArgument(data, index2) {
    const word = getAbiWord(data, index2);
    if (!word) {
      return null;
    }
    return `0x${word.slice(24)}`;
  }
  function decodeUintArgument(data, index2) {
    const word = getAbiWord(data, index2);
    if (!word) {
      return null;
    }
    return BigInt(`0x${word}`);
  }
  function getAbiWord(data, index2) {
    const body = data.slice(10);
    const start = index2 * 64;
    const word = body.slice(start, start + 64);
    return word.length === 64 ? word : null;
  }
  function formatValue(value) {
    const raw = asString(value);
    if (!raw) {
      return null;
    }
    if (raw.startsWith("0x")) {
      try {
        return `${BigInt(raw).toString()} wei`;
      } catch {
        return truncate(raw, 24);
      }
    }
    return truncate(raw, 24);
  }
  function truncateAddress(value) {
    return value.length <= 14 ? value : `${value.slice(0, 6)}\u2026${value.slice(-4)}`;
  }
  function truncate(value, length2) {
    return value.length > length2 ? `${value.slice(0, length2)}\u2026` : value;
  }
  function asString(value) {
    return typeof value === "string" && value.length > 0 ? value : null;
  }
  function isHexData(value) {
    return /^0x[0-9a-fA-F]+$/.test(value) && value.length > 10;
  }
  function isRecord(value) {
    return typeof value === "object" && value !== null;
  }
  function getRecordString(value, key2) {
    if (!isRecord(value)) {
      return null;
    }
    const field = value[key2];
    return typeof field === "string" && field.length > 0 ? field : null;
  }

  // src/background/swap-activity-store.ts
  init_node_compat_inject();
  var EXTENSION_ACTIVITY_KEY = "acorus_extension_activity";
  var MAX_ACTIVITY_RECORDS = 20;
  async function listExtensionActivity() {
    const result = await chrome.storage.local.get(EXTENSION_ACTIVITY_KEY);
    const items = result[EXTENSION_ACTIVITY_KEY];
    return Array.isArray(items) ? items : [];
  }
  async function appendExtensionActivity(entry) {
    const current = await listExtensionActivity();
    const next = [entry, ...current].slice(0, MAX_ACTIVITY_RECORDS);
    await chrome.storage.local.set({
      [EXTENSION_ACTIVITY_KEY]: next
    });
    return next;
  }

  // src/background/permission-store.ts
  init_node_compat_inject();
  var DAPP_SHELL_STATE_KEY = "acorus_dapp_shell_state";
  var DAPP_WALLET_SYNC_KEY = "acorus_dapp_wallet_sync_state";
  var EMPTY_WALLET_SYNC_STATE = {
    activeProfileId: null,
    profiles: [],
    lastSyncedAt: null
  };
  async function getDappShellState() {
    const result = await chrome.storage.local.get(DAPP_SHELL_STATE_KEY);
    const value = result[DAPP_SHELL_STATE_KEY];
    if (value && typeof value === "object") {
      const normalized = pruneDemoPreviewState(
        normalizeStoredSnapshot(value)
      );
      await setDappShellState(normalized);
      return normalized;
    }
    const seeded = reconcileSnapshotWithWalletState(
      createEmptyDappShellSnapshot(),
      await getWalletSyncState()
    );
    await setDappShellState(seeded);
    return seeded;
  }
  async function initializePermissionStore() {
    await getDappShellState();
  }
  async function setDappShellState(state) {
    await chrome.storage.local.set({
      [DAPP_SHELL_STATE_KEY]: state
    });
  }
  async function refreshDappShellWalletState() {
    const next = reconcileSnapshotWithWalletState(
      await getDappShellState(),
      await getWalletSyncState()
    );
    await setDappShellState(next);
    return next;
  }
  async function getWalletSyncState() {
    const result = await chrome.storage.local.get(DAPP_WALLET_SYNC_KEY);
    const value = result[DAPP_WALLET_SYNC_KEY];
    if (value && typeof value === "object") {
      const candidate = value;
      const webState = {
        activeProfileId: typeof candidate.activeProfileId === "string" ? candidate.activeProfileId : null,
        profiles: Array.isArray(candidate.profiles) ? candidate.profiles.filter(isWalletExposure) : [],
        lastSyncedAt: typeof candidate.lastSyncedAt === "string" ? candidate.lastSyncedAt : null
      };
      if (webState.profiles.length > 0) {
        return webState;
      }
    }
    const extensionVault = await getExtensionVaultStatus();
    if (extensionVault.profiles.length > 0) {
      return {
        activeProfileId: extensionVault.activeProfileId,
        profiles: extensionVault.profiles,
        lastSyncedAt: extensionVault.updatedAt ?? extensionVault.createdAt ?? null
      };
    }
    return EMPTY_WALLET_SYNC_STATE;
  }
  async function syncWalletProfiles(payload) {
    const nextState = buildWalletSyncState(payload);
    await chrome.storage.local.set({
      [DAPP_WALLET_SYNC_KEY]: nextState
    });
    const current = await getDappShellState();
    await setDappShellState(reconcileSnapshotWithWalletState(current, nextState));
    return nextState;
  }
  async function selectWalletProfile(profileId) {
    const current = await getWalletSyncState();
    const exists = current.profiles.some((profile) => profile.profileId === profileId);
    if (!exists) {
      return current;
    }
    const nextState = {
      activeProfileId: profileId,
      profiles: current.profiles.map((profile) => ({
        ...profile,
        selected: profile.profileId === profileId
      })).sort((left, right) => Number(right.selected) - Number(left.selected)),
      lastSyncedAt: current.lastSyncedAt
    };
    await chrome.storage.local.set({
      [DAPP_WALLET_SYNC_KEY]: nextState
    });
    const snapshot = await getDappShellState();
    await setDappShellState(reconcileSnapshotWithWalletState(snapshot, nextState));
    return nextState;
  }
  async function setSessionAccount(sessionId, profileId) {
    const walletState = await getWalletSyncState();
    const exposure = walletState.profiles.find((profile) => profile.profileId === profileId);
    if (!exposure) {
      return getDappShellState();
    }
    const current = await getDappShellState();
    if (!current.sessions.some((session) => session.id === sessionId)) {
      return current;
    }
    const updatedAt = (/* @__PURE__ */ new Date()).toISOString();
    const sessions = current.sessions.map(
      (session) => session.id === sessionId ? {
        ...session,
        providerMode: "wallet_backed",
        accounts: [exposure.account],
        chainIds: exposure.chainIds,
        activeChainId: exposure.chainIds.includes(session.activeChainId ?? -1) ? session.activeChainId : exposure.chainIds[0] ?? null,
        lastUsedAt: updatedAt,
        warning: buildDappSessionWarning({
          transport: session.transport,
          providerMode: "wallet_backed"
        })
      } : session
    );
    const sessionsById = new Map(sessions.map((session) => [session.id, session]));
    const next = {
      ...current,
      sessions,
      pendingRequests: current.pendingRequests.map((request) => {
        const session = request.sessionId ? sessionsById.get(request.sessionId) ?? null : null;
        return request.sessionId === sessionId ? {
          ...request,
          account: session?.accounts[0] ?? request.account ?? null,
          chainId: session?.activeChainId ?? request.chainId ?? null,
          warning: buildDappRequestWarning({
            transport: request.transport
          })
        } : request;
      }),
      updatedAt
    };
    await setDappShellState(next);
    return next;
  }
  async function queueWalletConnectPairingProposal(uri, title) {
    const current = await getDappShellState();
    const walletState = resolveBridgeWalletState(await getWalletSyncState());
    const ensured = queueWalletConnectPairing(current, {
      uri,
      title,
      providerMode: walletState.providerMode,
      requestedAccounts: walletState.accounts,
      requestedChainIds: walletState.chainIds
    });
    if (ensured.created) {
      await setDappShellState(ensured.snapshot);
    }
    return ensured.snapshot;
  }
  async function queueSessionRequestPreviewForSession(sessionId, kind, chainId, summary) {
    const current = await getDappShellState();
    const queued = queueSessionRequestPreview(current, {
      sessionId,
      kind,
      chainId,
      summary
    });
    if (queued.created) {
      await setDappShellState(queued.snapshot);
    }
    return queued.snapshot;
  }
  async function approveProposal(proposalId) {
    const next = approveDappProposal(await getDappShellState(), proposalId);
    await setDappShellState(next);
    return next;
  }
  async function rejectProposal(proposalId) {
    const next = rejectDappProposal(await getDappShellState(), proposalId);
    await setDappShellState(next);
    return next;
  }
  async function approveRequestInQueue(requestId) {
    const next = approveDappRequest(await getDappShellState(), requestId);
    await setDappShellState(next);
    return next;
  }
  async function rejectRequestInQueue(requestId) {
    const next = rejectDappRequest(await getDappShellState(), requestId);
    await setDappShellState(next);
    return next;
  }
  async function revokeSessionInRegistry(sessionId) {
    const next = revokeDappSession(await getDappShellState(), sessionId);
    await setDappShellState(next);
    return next;
  }
  async function ensureOriginConnectionProposal(origin2, family) {
    const current = await getDappShellState();
    const walletState = resolveBridgeWalletState(await getWalletSyncState(), family);
    const ensured = ensureDappConnectionProposal(current, {
      origin: origin2,
      providerMode: walletState.providerMode,
      requestedAccounts: walletState.accounts,
      requestedChainIds: walletState.chainIds,
      warning: walletState.providerMode === "wallet_backed" ? "Approve to expose the selected synced Acorus EVM account to this site. Mnemonic, private keys, passcode, signing output, and broadcast remain blocked." : void 0
    });
    if (ensured.created) {
      await setDappShellState(ensured.snapshot);
    }
    return createDappBridgeSessionView(ensured.snapshot, origin2);
  }
  async function touchOriginSession(origin2) {
    const current = await getDappShellState();
    const session = getActiveDappSession(current, origin2);
    if (!session) {
      return createDappBridgeSessionView(current, origin2);
    }
    const next = touchDappSession(current, session.id);
    await setDappShellState(next);
    return createDappBridgeSessionView(next, origin2);
  }
  async function switchOriginSessionChain(origin2, chainId) {
    const current = await getDappShellState();
    const session = getActiveDappSession(current, origin2);
    if (!session) {
      return createDappBridgeSessionView(current, origin2);
    }
    const next = setDappSessionActiveChain(current, session.id, chainId);
    await setDappShellState(next);
    return createDappBridgeSessionView(next, origin2);
  }
  function buildWalletSyncState(payload) {
    const evmChainIds = getChainsByFamily("evm").map((chain2) => chain2.chainId);
    const eligibleProfiles = payload.profiles.filter(
      (profile) => profile.chainFamily === "evm" && profile.type === "local"
    );
    const resolvedActiveProfileId = eligibleProfiles.some(
      (profile) => profile.id === payload.activeProfileId
    ) ? payload.activeProfileId ?? null : eligibleProfiles[0]?.id ?? null;
    const profiles = eligibleProfiles.map((profile) => ({
      profileId: profile.id,
      name: profile.name,
      account: profile.publicAddress,
      chainFamily: profile.chainFamily,
      chainIds: evmChainIds,
      selected: profile.id === resolvedActiveProfileId
    })).sort((left, right) => Number(right.selected) - Number(left.selected));
    return {
      activeProfileId: resolvedActiveProfileId,
      profiles,
      lastSyncedAt: payload.syncedAt
    };
  }
  function resolveBridgeWalletState(walletState, family) {
    if (walletState.profiles.length === 0) {
      return {
        providerMode: "preview_accounts",
        accounts: [PREVIEW_DAPP_BRIDGE_ACCOUNT],
        chainIds: PREVIEW_DAPP_BRIDGE_CHAIN_IDS
      };
    }
    const eligibleProfiles = family ? walletState.profiles.filter((profile) => profile.chainFamily === family) : walletState.profiles;
    const selectedProfile = eligibleProfiles.find((profile) => profile.selected) ?? eligibleProfiles[0] ?? null;
    return {
      providerMode: "wallet_backed",
      accounts: family ? selectedProfile ? [selectedProfile.account] : [] : eligibleProfiles.map((profile) => profile.account),
      chainIds: selectedProfile ? [...new Set(selectedProfile.chainIds)] : []
    };
  }
  function reconcileSnapshotWithWalletState(snapshot, walletState) {
    const bridgeWalletState = resolveBridgeWalletState(walletState);
    const updatedAt = (/* @__PURE__ */ new Date()).toISOString();
    const exposuresByAccount = new Map(
      walletState.profiles.map((profile) => [profile.account, profile])
    );
    const selectedExposure = walletState.profiles.find((profile) => profile.selected) ?? walletState.profiles[0] ?? null;
    const sessions = snapshot.sessions.map((session) => {
      const pinnedExposure = session.accounts[0] ? exposuresByAccount.get(session.accounts[0]) ?? null : null;
      const resolvedExposure = pinnedExposure ?? selectedExposure;
      const chainIds = resolvedExposure?.chainIds ?? bridgeWalletState.chainIds;
      return {
        ...session,
        providerMode: bridgeWalletState.providerMode,
        accounts: resolvedExposure ? [resolvedExposure.account] : bridgeWalletState.accounts,
        chainIds,
        activeChainId: chainIds.includes(session.activeChainId ?? -1) ? session.activeChainId : chainIds[0] ?? null,
        warning: buildDappSessionWarning({
          transport: session.transport,
          providerMode: bridgeWalletState.providerMode
        })
      };
    });
    const sessionsById = new Map(sessions.map((session) => [session.id, session]));
    return {
      proposals: snapshot.proposals.map((proposal) => ({
        ...proposal,
        providerMode: bridgeWalletState.providerMode,
        requestedAccounts: bridgeWalletState.accounts,
        requestedChainIds: bridgeWalletState.chainIds,
        warning: buildDappProposalWarning({
          transport: proposal.transport,
          providerMode: bridgeWalletState.providerMode
        })
      })),
      sessions,
      pendingRequests: snapshot.pendingRequests.map((request) => {
        const session = request.sessionId ? sessionsById.get(request.sessionId) ?? null : null;
        return {
          ...request,
          account: session?.accounts[0] ?? bridgeWalletState.accounts[0] ?? null,
          chainId: session?.activeChainId ?? bridgeWalletState.chainIds[0] ?? request.chainId ?? null,
          warning: buildDappRequestWarning({
            transport: request.transport
          })
        };
      }),
      approvalResults: snapshot.approvalResults,
      updatedAt
    };
  }
  function isWalletExposure(value) {
    if (typeof value !== "object" || value === null) {
      return false;
    }
    const candidate = value;
    return typeof candidate.profileId === "string" && typeof candidate.name === "string" && typeof candidate.account === "string" && typeof candidate.chainFamily === "string" && Array.isArray(candidate.chainIds) && typeof candidate.selected === "boolean";
  }
  function normalizeStoredSnapshot(snapshot) {
    const sessions = snapshot.sessions.map((session) => ({
      ...session,
      transport: session.transport ?? "injected"
    }));
    const sessionsById = new Map(sessions.map((session) => [session.id, session]));
    return {
      ...snapshot,
      proposals: snapshot.proposals.map((proposal) => ({
        ...proposal,
        transport: proposal.transport ?? "injected"
      })),
      sessions,
      pendingRequests: snapshot.pendingRequests.map((request) => ({
        ...request,
        transport: request.transport ?? (request.sessionId ? sessionsById.get(request.sessionId)?.transport : void 0) ?? "injected"
      }))
    };
  }
  function pruneDemoPreviewState(snapshot) {
    const demoSessionIds = new Set(
      snapshot.sessions.filter((session) => session.id.startsWith("session_demo_")).map((session) => session.id)
    );
    const proposals = snapshot.proposals.filter(
      (proposal) => !proposal.id.startsWith("proposal_demo_")
    );
    const sessions = snapshot.sessions.filter(
      (session) => !demoSessionIds.has(session.id)
    );
    const pendingRequests = snapshot.pendingRequests.filter(
      (request) => !demoSessionIds.has(request.sessionId ?? "") && !request.id.startsWith("request_demo_")
    );
    if (proposals.length === snapshot.proposals.length && sessions.length === snapshot.sessions.length && pendingRequests.length === snapshot.pendingRequests.length) {
      return snapshot;
    }
    return {
      ...snapshot,
      proposals,
      sessions,
      pendingRequests,
      updatedAt: (/* @__PURE__ */ new Date()).toISOString()
    };
  }

  // src/background/messaging.ts
  init_node_compat_inject();
  var MAX_JSON_DEPTH = 18;
  var MAX_JSON_STRING_LENGTH = 1e5;
  var ALLOWED_PAGE_PROTOCOLS = /* @__PURE__ */ new Set(["http:", "https:", "chrome-extension:"]);
  function validateRuntimeMessage(rawMessage, sender, extensionId) {
    const fallbackRequestId = createRequestId("background");
    if (!isJsonRecord(rawMessage)) {
      return reject(fallbackRequestId, "bad_request", "Unknown extension message.");
    }
    const requestId = typeof rawMessage.requestId === "string" ? rawMessage.requestId.slice(0, 160) : fallbackRequestId;
    if (sender.id && sender.id !== extensionId) {
      return reject(requestId, "unauthorized_sender", "The extension message sender is not Acorus Wallet.");
    }
    if (typeof rawMessage.kind !== "string" || typeof rawMessage.surface !== "string") {
      return reject(requestId, "bad_request", "Extension messages require kind and surface.");
    }
    if (!isJsonSerializable(rawMessage)) {
      return reject(requestId, "bad_request", "Extension messages must be JSON-serializable.");
    }
    if (rawMessage.surface === "content") {
      const claimedOrigin = typeof rawMessage.origin === "string" ? rawMessage.origin : null;
      const senderOrigin = sanitizeMessageSenderOrigin(sender.url ?? sender.origin ?? null);
      if (!claimedOrigin || !senderOrigin) {
        return reject(requestId, "bad_origin", "Page-originated messages require a verified origin.");
      }
      if (claimedOrigin !== senderOrigin) {
        return reject(requestId, "origin_mismatch", "The message origin does not match the sender URL.");
      }
    }
    if (rawMessage.kind === "provider_request") {
      if (rawMessage.surface !== "content") {
        return reject(requestId, "bad_surface", "Provider requests must originate from the content script.");
      }
      if (typeof rawMessage.method !== "string" || !isAcorusProviderMethod(rawMessage.method)) {
        return reject(requestId, "unsupported_method", "Unsupported Acorus provider method.");
      }
      if (rawMessage.params !== void 0 && !Array.isArray(rawMessage.params)) {
        return reject(requestId, "bad_params", "Provider request params must be an array.");
      }
    }
    return {
      ok: true,
      message: rawMessage
    };
  }
  function sanitizeMessageSenderOrigin(value) {
    if (!value) {
      return null;
    }
    try {
      const parsed = new URL(value);
      if (!ALLOWED_PAGE_PROTOCOLS.has(parsed.protocol)) {
        return null;
      }
      return parsed.origin;
    } catch {
      return null;
    }
  }
  function reject(requestId, code2, message) {
    return {
      ok: false,
      requestId,
      code: code2,
      message
    };
  }
  function isJsonRecord(value) {
    return typeof value === "object" && value !== null && !Array.isArray(value);
  }
  function isJsonSerializable(value, depth = 0) {
    if (depth > MAX_JSON_DEPTH) {
      return false;
    }
    if (value === null) {
      return true;
    }
    const valueType = typeof value;
    if (typeof value === "string") {
      return value.length <= MAX_JSON_STRING_LENGTH;
    }
    if (valueType === "number") {
      return Number.isFinite(value);
    }
    if (valueType === "boolean") {
      return true;
    }
    if (valueType === "undefined" || valueType === "function" || valueType === "symbol" || valueType === "bigint") {
      return false;
    }
    if (Array.isArray(value)) {
      return value.every((entry) => isJsonSerializable(entry, depth + 1));
    }
    if (!isJsonRecord(value)) {
      return false;
    }
    return Object.entries(value).every(([key2, entry]) => key2.length <= 256 && isJsonSerializable(entry, depth + 1));
  }

  // src/background/index.ts
  var pendingProviderApprovals = /* @__PURE__ */ new Map();
  var pendingProviderExecutions = /* @__PURE__ */ new Map();
  var pendingSignerUnlocks = /* @__PURE__ */ new Map();
  var pendingConnectionApprovals = /* @__PURE__ */ new Map();
  var ACTIVE_PROMPT_ORIGIN_KEY = "acorus_active_prompt_origin";
  chrome.runtime.onInstalled.addListener(() => {
    void initializePermissionStore();
  });
  chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
    void handleRuntimeMessage(message, sender).then(sendResponse);
    return true;
  });
  async function handleRuntimeMessage(message, sender) {
    const validation = validateRuntimeMessage(message, sender, chrome.runtime.id ?? "");
    if (!validation.ok) {
      return {
        requestId: validation.requestId,
        ok: false,
        error: {
          code: validation.code,
          message: validation.message
        }
      };
    }
    const input = validation.message;
    const requestId = input.requestId;
    if (input.kind === "ping") {
      return {
        requestId,
        ok: true,
        result: {
          phase: "skeleton",
          status: "ready",
          surface: input.surface
        }
      };
    }
    if (input.kind === "get_state") {
      const state = await getDappShellState();
      const activityLog = await listExtensionActivity();
      const walletState = await getWalletSyncState();
      const extensionVaultStatus = await getExtensionVaultStatus();
      const activeOrigin = await resolveActiveOrigin(input.origin, sender);
      const queuedSignerUnlocks = getSignerUnlockQueue();
      const signerRequestIds = new Set(
        queuedSignerUnlocks.map((intent) => intent.requestId)
      );
      const walletExposureMode = walletState.profiles.length > 0 ? "wallet_backed" : "preview_accounts";
      return {
        requestId,
        ok: true,
        result: createSkeletonState({
          activeOrigin,
          proposals: state.proposals,
          sessions: state.sessions,
          pendingRequests: state.pendingRequests.filter(
            (request) => !signerRequestIds.has(request.id)
          ),
          approvalResults: state.approvalResults,
          activityLog,
          signerUnlockQueue: queuedSignerUnlocks,
          activeOriginBridge: activeOrigin ? createDappBridgeSessionView(state, activeOrigin) : null,
          lastUpdatedAt: state.updatedAt,
          providerInjection: walletExposureMode === "wallet_backed" ? "wallet_bridge" : "preview_bridge",
          executionEnabled: true,
          walletExposureMode,
          walletExposedAccounts: walletState.profiles,
          walletLastSyncedAt: walletState.lastSyncedAt,
          extensionVaultStatus
        })
      };
    }
    if (input.kind === "create_wallet") {
      try {
        const result = await createExtensionWallet({ name: input.name, passcode: input.passcode });
        return { requestId, ok: true, result };
      } catch (error51) {
        return { requestId, ok: false, error: { code: "create_error", message: error51.message } };
      }
    }
    if (input.kind === "import_wallet") {
      try {
        const result = await importExtensionWallet({ name: input.name, mnemonic: input.mnemonic, passcode: input.passcode });
        return { requestId, ok: true, result };
      } catch (error51) {
        return { requestId, ok: false, error: { code: "import_error", message: error51.message } };
      }
    }
    if (input.kind === "unlock_wallet") {
      try {
        const result = await unlockExtensionWallet({ passcode: input.passcode });
        return { requestId, ok: true, result };
      } catch (error51) {
        return { requestId, ok: false, error: { code: "unlock_error", message: error51.message } };
      }
    }
    if (input.kind === "lock_wallet") {
      try {
        lockExtensionWallet();
        return { requestId, ok: true };
      } catch (error51) {
        return { requestId, ok: false, error: { code: "lock_error", message: error51.message } };
      }
    }
    if (input.kind === "walletconnect_pair") {
      try {
        await walletConnectClient.pair(input.uri);
        return {
          requestId,
          ok: true,
          result: "success"
        };
      } catch (error51) {
        return {
          requestId,
          ok: false,
          error: {
            code: "walletconnect_error",
            message: error51 instanceof Error ? error51.message : "Failed to pair WalletConnect"
          }
        };
      }
    }
    if (input.kind === "get_extension_home") {
      const activeChainId = await getActiveExtensionChainId();
      return {
        requestId,
        ok: true,
        result: await buildExtensionPortfolioSnapshot({ activeChainId })
      };
    }
    if (input.kind === "set_active_extension_chain") {
      try {
        const chainId = await setActiveExtensionChainId(input.chainId);
        return {
          requestId,
          ok: true,
          result: await buildExtensionPortfolioSnapshot({ activeChainId: chainId })
        };
      } catch (error51) {
        return providerError(
          requestId,
          "unsupported_chain",
          error51 instanceof Error ? error51.message : "Unable to switch extension chain."
        );
      }
    }
    if (input.kind === "add_custom_evm_chain") {
      try {
        const network = await addCustomEvmNetwork(input.chain);
        await setActiveExtensionChainId(network.chainId);
        return {
          requestId,
          ok: true,
          result: network
        };
      } catch (error51) {
        return providerError(
          requestId,
          "add_chain_failed",
          error51 instanceof Error ? error51.message : "Unable to add custom EVM chain."
        );
      }
    }
    if (input.kind === "watch_asset") {
      try {
        return {
          requestId,
          ok: true,
          result: await watchAsset2(input.asset)
        };
      } catch (error51) {
        return providerError(
          requestId,
          "watch_asset_failed",
          error51 instanceof Error ? error51.message : "Unable to watch asset."
        );
      }
    }
    if (input.kind === "hide_asset") {
      return {
        requestId,
        ok: true,
        result: await hideAsset(input.assetId)
      };
    }
    if (input.kind === "unhide_asset") {
      return {
        requestId,
        ok: true,
        result: await unhideAsset(input.assetId)
      };
    }
    if (input.kind === "queue_solana_send") {
      try {
        return {
          requestId,
          ok: true,
          result: await queueInternalSolanaSendRequest({
            requestId,
            toAddress: input.toAddress,
            amountFormatted: input.amountFormatted,
            assetType: input.assetType ?? "native",
            tokenAddress: input.tokenAddress ?? null,
            symbol: input.symbol ?? null,
            decimals: input.decimals ?? null,
            balanceRaw: input.balanceRaw ?? null
          })
        };
      } catch (error51) {
        return providerError(
          requestId,
          "solana_send_queue_failed",
          error51 instanceof Error ? error51.message : "Unable to queue Solana send."
        );
      }
    }
    if (input.kind === "queue_evm_approve_token") {
      try {
        return {
          requestId,
          ok: true,
          result: await queueInternalEvmApproveTokenRequest({
            requestId,
            chainId: input.chainId,
            tokenAddress: input.tokenAddress,
            tokenSymbol: input.tokenSymbol,
            tokenDecimals: input.tokenDecimals,
            spender: input.spender,
            amountRaw: input.amountRaw,
            amountFormatted: input.amountFormatted,
            currentAllowanceRaw: input.currentAllowanceRaw,
            requiredAllowanceRaw: input.requiredAllowanceRaw,
            approvalMode: input.approvalMode
          })
        };
      } catch (error51) {
        return providerError(
          requestId,
          "evm_approve_queue_failed",
          error51 instanceof Error ? error51.message : "Unable to queue token approval."
        );
      }
    }
    if (input.kind === "queue_evm_swap_approval") {
      try {
        return {
          requestId,
          ok: true,
          result: await queueInternalEvmSwapRequest({
            requestId,
            quote: input.quote,
            slippageBps: input.slippageBps ?? null
          })
        };
      } catch (error51) {
        return providerError(
          requestId,
          "evm_swap_queue_failed",
          error51 instanceof Error ? error51.message : "Unable to queue swap review."
        );
      }
    }
    if (input.kind === "queue_universal_swap_approval") {
      try {
        return {
          requestId,
          ok: true,
          result: await queueInternalUniversalSwapRequest({
            requestId,
            provider: input.provider,
            route: input.route,
            slippageBps: input.slippageBps ?? null
          })
        };
      } catch (error51) {
        return providerError(
          requestId,
          "universal_swap_queue_failed",
          error51 instanceof Error ? error51.message : "Unable to queue universal swap review."
        );
      }
    }
    if (input.kind === "create_extension_wallet") {
      try {
        const created = await createExtensionWallet({
          name: input.name,
          passcode: input.passcode
        });
        await refreshDappShellWalletState();
        return {
          requestId,
          ok: true,
          result: created
        };
      } catch (error51) {
        return {
          requestId,
          ok: false,
          error: {
            code: "wallet_create_failed",
            message: error51 instanceof Error ? error51.message : "Unable to create the extension wallet."
          }
        };
      }
    }
    if (input.kind === "import_extension_wallet") {
      try {
        const imported = await importExtensionWallet({
          name: input.name,
          mnemonic: input.mnemonic,
          passcode: input.passcode
        });
        await refreshDappShellWalletState();
        return {
          requestId,
          ok: true,
          result: imported
        };
      } catch (error51) {
        return {
          requestId,
          ok: false,
          error: {
            code: "wallet_import_failed",
            message: error51 instanceof Error ? error51.message : "Unable to import the extension wallet."
          }
        };
      }
    }
    if (input.kind === "unlock_extension_wallet") {
      try {
        return {
          requestId,
          ok: true,
          result: await unlockExtensionWallet({
            passcode: input.passcode
          })
        };
      } catch (error51) {
        return {
          requestId,
          ok: false,
          error: {
            code: "wallet_unlock_failed",
            message: error51 instanceof Error ? error51.message : "Unable to unlock the extension wallet."
          }
        };
      }
    }
    if (input.kind === "lock_extension_wallet") {
      return {
        requestId,
        ok: true,
        result: await lockExtensionWallet()
      };
    }
    if (input.kind === "reset_extension_wallet") {
      const status = await resetExtensionWallet();
      await refreshDappShellWalletState();
      return {
        requestId,
        ok: true,
        result: status
      };
    }
    if (input.kind === "sync_wallet_profiles") {
      const walletState = await syncWalletProfiles(input.payload);
      return {
        requestId,
        ok: true,
        result: {
          syncedProfiles: walletState.profiles.length,
          walletExposureMode: walletState.profiles.length > 0 ? "wallet_backed" : "preview_accounts",
          syncedAt: walletState.lastSyncedAt
        }
      };
    }
    if (input.kind === "select_wallet_profile") {
      const walletState = await selectWalletProfile(input.profileId);
      return {
        requestId,
        ok: true,
        result: {
          selectedProfileId: walletState.activeProfileId
        }
      };
    }
    if (input.kind === "set_session_account") {
      return {
        requestId,
        ok: true,
        result: await setSessionAccount(input.sessionId, input.profileId)
      };
    }
    if (input.kind === "queue_walletconnect_pairing") {
      try {
        return {
          requestId,
          ok: true,
          result: await queueWalletConnectPairingProposal(input.uri, input.title)
        };
      } catch (error51) {
        return {
          requestId,
          ok: false,
          error: {
            code: "invalid_walletconnect_uri",
            message: error51 instanceof Error ? error51.message : "WalletConnect pairing URI is invalid."
          }
        };
      }
    }
    if (input.kind === "queue_session_request_preview") {
      try {
        return {
          requestId,
          ok: true,
          result: await queueSessionRequestPreviewForSession(
            input.sessionId,
            input.requestKind,
            input.chainId ?? void 0,
            input.summary
          )
        };
      } catch (error51) {
        return {
          requestId,
          ok: false,
          error: {
            code: "invalid_session_request_preview",
            message: error51 instanceof Error ? error51.message : "Session request preview could not be queued."
          }
        };
      }
    }
    if (input.kind === "approve_proposal") {
      const current = await getDappShellState();
      const proposal = current.proposals.find((item) => item.id === input.proposalId);
      const next = await approveProposal(input.proposalId);
      if (proposal) {
        resolvePendingConnectionApproval(proposal.origin.origin, input.proposalId, next);
      }
      return {
        requestId,
        ok: true,
        result: next
      };
    }
    if (input.kind === "reject_proposal") {
      const current = await getDappShellState();
      const proposal = current.proposals.find((item) => item.id === input.proposalId);
      const next = await rejectProposal(input.proposalId);
      if (proposal) {
        rejectPendingConnectionApproval(
          proposal.origin.origin,
          input.proposalId,
          "user_rejected",
          "The connection request was rejected in Acorus Wallet."
        );
      }
      return {
        requestId,
        ok: true,
        result: next
      };
    }
    if (input.kind === "approve_request") {
      const current = await getDappShellState();
      const request = getPendingDappRequest(current, input.requestIdTarget);
      if (!request) {
        return providerError(
          requestId,
          "request_not_found",
          "The pending request no longer exists."
        );
      }
      const existingIntent = getSignerUnlockIntentByRequestId(request.id);
      if (request.kind === "add_chain" || request.kind === "watch_asset") {
        const execution = pendingProviderExecutions.get(request.id);
        const approvedAt = (/* @__PURE__ */ new Date()).toISOString();
        try {
          const providerResult = await executeApprovedRequest(request, execution, approvedAt);
          const next = await approveRequestInQueue(request.id);
          pendingProviderExecutions.delete(request.id);
          resolvePendingProviderApproval(request, providerResult);
          return {
            requestId,
            ok: true,
            result: next
          };
        } catch (error51) {
          await rejectRequestInQueue(request.id);
          pendingProviderExecutions.delete(request.id);
          await recordActivityFailure(request, error51, "execution_failed");
          rejectPendingProviderApproval(
            request.id,
            "execution_failed",
            error51 instanceof Error ? error51.message : "The extension failed to approve the request."
          );
          return providerError(
            requestId,
            "execution_failed",
            error51 instanceof Error ? error51.message : "The extension failed to approve the request."
          );
        }
      }
      if (!existingIntent) {
        pendingSignerUnlocks.set(
          createSignerUnlockIntentId(request.id),
          buildSignerUnlockIntent(request)
        );
      }
      await setActivePromptOrigin(request.origin.origin);
      if (input.surface !== "popup") {
        openApprovalWindow();
      }
      return {
        requestId,
        ok: true,
        result: {
          requestId: request.id,
          signerUnlockQueued: true
        }
      };
    }
    if (input.kind === "reject_request") {
      const current = await getDappShellState();
      const request = getPendingDappRequest(current, input.requestIdTarget);
      const next = await rejectRequestInQueue(input.requestIdTarget);
      if (request) {
        pendingProviderExecutions.delete(request.id);
        await recordRejectedActivity(request);
        rejectPendingProviderApproval(
          request.id,
          "user_rejected",
          "The request was rejected in Acorus Wallet."
        );
      }
      return {
        requestId,
        ok: true,
        result: next
      };
    }
    if (input.kind === "confirm_signer_unlock") {
      const intent = pendingSignerUnlocks.get(input.intentId);
      if (!intent) {
        return providerError(
          requestId,
          "signer_unlock_not_found",
          "The signer confirmation prompt is no longer available."
        );
      }
      const vaultStatus = await getExtensionVaultStatus();
      if (!vaultStatus.isUnlocked) {
        return providerError(
          requestId,
          "wallet_locked",
          "Unlock Acorus Wallet extension before confirming signing."
        );
      }
      const current = await getDappShellState();
      const request = getPendingDappRequest(current, intent.requestId);
      if (!request) {
        pendingProviderExecutions.delete(intent.requestId);
        pendingSignerUnlocks.delete(input.intentId);
        return providerError(
          requestId,
          "request_not_found",
          "The pending request was removed before signing confirmation completed."
        );
      }
      const execution = pendingProviderExecutions.get(intent.requestId);
      const approvedAt = (/* @__PURE__ */ new Date()).toISOString();
      let providerResult = createApprovedPreviewDappResult(request, approvedAt);
      try {
        providerResult = await executeApprovedRequest(request, execution, approvedAt);
      } catch (error51) {
        await rejectRequestInQueue(intent.requestId);
        pendingProviderExecutions.delete(intent.requestId);
        pendingSignerUnlocks.delete(input.intentId);
        await recordActivityFailure(request, error51, "execution_failed");
        rejectPendingProviderApproval(
          intent.requestId,
          "execution_failed",
          error51 instanceof Error ? error51.message : "The extension failed to execute the approved request."
        );
        return providerError(
          requestId,
          "execution_failed",
          error51 instanceof Error ? error51.message : "The extension failed to execute the approved request."
        );
      }
      const next = await approveRequestInQueue(intent.requestId);
      pendingProviderExecutions.delete(intent.requestId);
      pendingSignerUnlocks.delete(input.intentId);
      resolvePendingProviderApproval(request, providerResult);
      return {
        requestId,
        ok: true,
        result: next
      };
    }
    if (input.kind === "reject_signer_unlock") {
      const intent = pendingSignerUnlocks.get(input.intentId);
      if (!intent) {
        return providerError(
          requestId,
          "signer_unlock_not_found",
          "The signer confirmation prompt is no longer available."
        );
      }
      const current = await getDappShellState();
      const request = getPendingDappRequest(current, intent.requestId);
      const next = await rejectRequestInQueue(intent.requestId);
      pendingProviderExecutions.delete(intent.requestId);
      pendingSignerUnlocks.delete(input.intentId);
      if (request) {
        await recordRejectedActivity(request);
      }
      rejectPendingProviderApproval(
        intent.requestId,
        "user_rejected",
        "The request was rejected during signer confirmation."
      );
      return {
        requestId,
        ok: true,
        result: next
      };
    }
    if (input.kind === "revoke_session") {
      const current = await getDappShellState();
      const affectedRequests = current.pendingRequests.filter(
        (request) => request.sessionId === input.sessionId
      );
      const next = await revokeSessionInRegistry(input.sessionId);
      for (const request of affectedRequests) {
        pendingProviderExecutions.delete(request.id);
        pendingSignerUnlocks.delete(createSignerUnlockIntentId(request.id));
        rejectPendingProviderApproval(
          request.id,
          "session_revoked",
          "The active dApp session was revoked before the request completed."
        );
      }
      return {
        requestId,
        ok: true,
        result: next
      };
    }
    if (input.kind === "provider_request") {
      if (!isAcorusProviderMethod(input.method)) {
        return {
          requestId,
          ok: false,
          error: {
            code: "unsupported_method",
            message: "The Acorus extension skeleton does not recognize this method."
          }
        };
      }
      if (input.method === "acorus_ping") {
        const state = await getDappShellState();
        const bridge = createDappBridgeSessionView(state, input.origin);
        return {
          requestId,
          ok: true,
          result: {
            provider: "acorus_extension_preview_bridge",
            connectivity: bridge.status,
            providerMode: bridge.providerMode,
            origin: input.origin,
            accounts: bridge.accounts,
            chainId: bridge.activeChainId
          }
        };
      }
      return handleProviderMethod(requestId, input.origin, input.method, input.params);
    }
    return {
      requestId,
      ok: false,
      error: {
        code: "unsupported_message_kind",
        message: "Unsupported extension message kind."
      }
    };
  }
  async function handleProviderMethod(requestId, origin2, method, params) {
    const state = await getDappShellState();
    const session = getActiveDappSession(state, origin2);
    if (method === "acorus_getVaultStatus") {
      return {
        requestId,
        ok: true,
        result: await getExtensionVaultStatus()
      };
    }
    if (method === "acorus_createWallet") {
      if (!isTrustedAcorusAppOrigin(origin2)) {
        return trustedAppOnlyError(requestId);
      }
      try {
        const payload = normalizeRecord2(params?.[0]);
        const created = await createExtensionWallet({
          name: String(payload.name ?? "Acorus Wallet"),
          passcode: String(payload.passcode ?? "")
        });
        await refreshDappShellWalletState();
        return { requestId, ok: true, result: created };
      } catch (error51) {
        return providerError(
          requestId,
          "wallet_create_failed",
          error51 instanceof Error ? error51.message : "Unable to create extension wallet."
        );
      }
    }
    if (method === "acorus_importWallet") {
      if (!isTrustedAcorusAppOrigin(origin2)) {
        return trustedAppOnlyError(requestId);
      }
      try {
        const payload = normalizeRecord2(params?.[0]);
        const imported = await importExtensionWallet({
          name: String(payload.name ?? "Acorus Wallet"),
          mnemonic: String(payload.mnemonic ?? ""),
          passcode: String(payload.passcode ?? "")
        });
        await refreshDappShellWalletState();
        return { requestId, ok: true, result: imported };
      } catch (error51) {
        return providerError(
          requestId,
          "wallet_import_failed",
          error51 instanceof Error ? error51.message : "Unable to import extension wallet."
        );
      }
    }
    if (method === "acorus_unlockWallet") {
      if (!isTrustedAcorusAppOrigin(origin2)) {
        return trustedAppOnlyError(requestId);
      }
      try {
        const payload = normalizeRecord2(params?.[0]);
        return {
          requestId,
          ok: true,
          result: await unlockExtensionWallet({
            passcode: String(payload.passcode ?? "")
          })
        };
      } catch (error51) {
        return providerError(
          requestId,
          "wallet_unlock_failed",
          error51 instanceof Error ? error51.message : "Unable to unlock extension wallet."
        );
      }
    }
    if (method === "acorus_lockWallet") {
      if (!isTrustedAcorusAppOrigin(origin2)) {
        return trustedAppOnlyError(requestId);
      }
      return {
        requestId,
        ok: true,
        result: await lockExtensionWallet()
      };
    }
    if (method === "acorus_receiveAddress") {
      const payload = normalizeRecord2(params?.[0]);
      const family = typeof payload.family === "string" ? payload.family : null;
      const vaultStatus = await getExtensionVaultStatus();
      const profile = vaultStatus.profiles.find(
        (item) => (!family || item.chainFamily === family) && (payload.chainId === void 0 || item.chainIds.some((chainId) => String(chainId) === String(payload.chainId)))
      ) ?? vaultStatus.profiles.find((item) => !family || item.chainFamily === family) ?? null;
      return {
        requestId,
        ok: true,
        result: profile ? {
          address: profile.account,
          profileId: profile.profileId,
          chainFamily: profile.chainFamily,
          chainIds: profile.chainIds
        } : null
      };
    }
    if (method === "acorus_requestAccounts") {
      const vaultStatus = await getExtensionVaultStatus();
      const requestedFamily = parseRequestedFamily(params?.[0]);
      if (vaultStatus.hasVault && !vaultStatus.isUnlocked) {
        await setActivePromptOrigin(origin2);
        openApprovalWindow();
        return {
          requestId,
          ok: false,
          error: {
            code: "wallet_locked",
            message: "Unlock Acorus Wallet extension before connecting this site."
          }
        };
      }
      if (session && hasDappPermission(session, "view_accounts")) {
        const bridge2 = await touchOriginSession(origin2);
        return {
          requestId,
          ok: true,
          result: filterAccountsForFamily(
            bridge2.accounts,
            requestedFamily,
            vaultStatus.profiles
          )
        };
      }
      const bridge = await ensureOriginConnectionProposal(origin2, requestedFamily);
      await setActivePromptOrigin(origin2);
      openApprovalWindow();
      return waitForConnectionApproval({
        requestId,
        origin: origin2,
        proposalId: bridge.proposalId ?? getPendingDappProposal(
          await getDappShellState(),
          origin2
        )?.id ?? null
      });
    }
    if (method === "acorus_accounts") {
      const requestedFamily = parseRequestedFamily(params?.[0]);
      if (!session || !hasDappPermission(session, "view_accounts")) {
        return {
          requestId,
          ok: true,
          result: []
        };
      }
      const vaultStatus = await getExtensionVaultStatus();
      return {
        requestId,
        ok: true,
        result: filterAccountsForFamily(
          session.accounts,
          requestedFamily,
          vaultStatus.profiles
        )
      };
    }
    if (method === "acorus_chainId") {
      if (!session || !hasDappPermission(session, "view_chain")) {
        return {
          requestId,
          ok: false,
          error: {
            code: "not_connected",
            message: "No approved session is connected for this origin, so the active chain is unavailable."
          }
        };
      }
      const bridge = await touchOriginSession(origin2);
      return {
        requestId,
        ok: true,
        result: bridge.activeChainId
      };
    }
    if (method === "acorus_getPermissions") {
      return {
        requestId,
        ok: true,
        result: session?.permissions ?? []
      };
    }
    if (method === "acorus_requestPermissions") {
      if (session) {
        await touchOriginSession(origin2);
        return {
          requestId,
          ok: true,
          result: session.permissions
        };
      }
      return handleProviderMethod(requestId, origin2, "acorus_requestAccounts", params);
    }
    if (method === "acorus_revokePermissions") {
      if (session) {
        return {
          requestId,
          ok: true,
          result: await revokeSessionInRegistry(session.id)
        };
      }
      return {
        requestId,
        ok: true,
        result: null
      };
    }
    if (method === "acorus_switchChain") {
      if (!session) {
        return {
          requestId,
          ok: false,
          error: {
            code: "not_connected",
            message: "No approved session is connected for this origin, so chain switching is unavailable."
          }
        };
      }
      if (!hasDappPermission(session, "switch_chain")) {
        return {
          requestId,
          ok: false,
          error: {
            code: "permission_denied",
            message: "This session was not approved for chain switching."
          }
        };
      }
      const requestedChainId = parseRequestedChainId(params?.[0]);
      if (requestedChainId === null) {
        return {
          requestId,
          ok: false,
          error: {
            code: "bad_request",
            message: "acorus_switchChain expects the first parameter to be a string or number chain id."
          }
        };
      }
      const network = await resolveExtensionNetwork(requestedChainId);
      if (!network || network.family !== "evm") {
        return {
          requestId,
          ok: false,
          error: {
            code: "unsupported_chain",
            message: "The requested EVM chain is not configured in Acorus Wallet."
          }
        };
      }
      await setActiveExtensionChainId(requestedChainId);
      const bridge = await switchOriginSessionChain(origin2, requestedChainId);
      return {
        requestId,
        ok: true,
        result: bridge.activeChainId
      };
    }
    if (!session && (method === "acorus_addChain" || method === "acorus_watchAsset")) {
      const providerParams = params ?? [];
      const activeChainId = await getActiveExtensionChainId();
      const queued = queueDappRequest(state, {
        id: requestId,
        sessionId: null,
        kind: getRequestKindForMethod(method),
        origin: origin2,
        account: null,
        chainId: activeChainId,
        summary: buildConnectionlessApprovalSummary(method, providerParams, activeChainId),
        warning: buildApprovalRiskWarning({
          method,
          params: providerParams
        }),
        reviewDetails: buildRequestReviewDetails(
          method,
          providerParams,
          activeChainId
        )
      });
      if (queued.created) {
        await setDappShellState(queued.snapshot);
      }
      pendingProviderExecutions.set(queued.request.id, {
        method,
        params: providerParams
      });
      await setActivePromptOrigin(origin2);
      openApprovalWindow();
      return waitForProviderApproval(queued.request);
    }
    if (isApprovalMethod(method)) {
      if (!session) {
        return {
          requestId,
          ok: false,
          error: {
            code: "not_connected",
            message: "No approved session is connected for this origin, so request review cannot begin."
          }
        };
      }
      const providerParams = params ?? [];
      const queued = queueDappRequest(state, {
        id: requestId,
        sessionId: session.id,
        kind: getRequestKindForMethod(method),
        origin: origin2,
        account: session.accounts[0] ?? null,
        chainId: getDappSessionActiveChainId(session),
        summary: buildApprovalSummary(method, providerParams, session),
        warning: buildApprovalRiskWarning({
          method,
          params: providerParams
        }),
        reviewDetails: buildRequestReviewDetails(
          method,
          providerParams,
          getDappSessionActiveChainId(session)
        )
      });
      if (queued.created) {
        await setDappShellState(queued.snapshot);
      }
      pendingProviderExecutions.set(queued.request.id, {
        method,
        params: providerParams
      });
      return waitForProviderApproval(queued.request);
    }
    return {
      requestId,
      ok: false,
      error: {
        code: "not_enabled",
        message: "This provider method is recognized, but it is not live in the current Acorus bridge wave."
      }
    };
  }
  async function resolveActiveOrigin(inputOrigin, sender) {
    const senderOrigin = normalizeRuntimeOrigin(sender.origin ?? sender.url ?? null);
    return inputOrigin ?? senderOrigin ?? await getActivePromptOrigin();
  }
  function normalizeRuntimeOrigin(value) {
    if (!value) {
      return null;
    }
    try {
      const url2 = new URL(value);
      if (url2.protocol === "chrome-extension:") {
        return null;
      }
      return url2.origin;
    } catch {
      return value.startsWith("chrome-extension://") ? null : value;
    }
  }
  async function setActivePromptOrigin(origin2) {
    await chrome.storage.local.set({
      [ACTIVE_PROMPT_ORIGIN_KEY]: origin2
    });
  }
  async function getActivePromptOrigin() {
    const result = await chrome.storage.local.get(ACTIVE_PROMPT_ORIGIN_KEY);
    const value = result[ACTIVE_PROMPT_ORIGIN_KEY];
    return typeof value === "string" ? value : null;
  }
  function openApprovalWindow() {
    try {
      void chrome.windows?.create?.({
        url: chrome.runtime.getURL("popup.html"),
        type: "popup",
        width: 420,
        height: 720,
        focused: true
      });
    } catch {
    }
  }
  function parseRequestedChainId(value) {
    if (typeof value === "number" || typeof value === "string") {
      return value;
    }
    return null;
  }
  function parseRequestedFamily(value) {
    const candidate = normalizeRecord2(value).family;
    switch (candidate) {
      case "evm":
      case "solana":
      case "tron":
      case "utxo":
      case "ton":
        return candidate;
      default:
        return null;
    }
  }
  function filterAccountsForFamily(accounts, family, profiles) {
    if (!family) {
      return accounts;
    }
    const familyAccounts = new Set(
      profiles.filter((profile) => profile.chainFamily === family).map((profile) => profile.account)
    );
    return accounts.filter((account) => familyAccounts.has(account));
  }
  function normalizeRecord2(value) {
    return typeof value === "object" && value !== null ? value : {};
  }
  function toStringArray(value) {
    return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
  }
  function isTrustedAcorusAppOrigin(origin2) {
    try {
      const url2 = new URL(origin2);
      return url2.origin === "http://85.239.59.199:8080" || url2.origin === "http://24wallet.ru" || url2.origin === "https://24wallet.ru" || url2.origin === "http://www.24wallet.ru" || url2.origin === "https://www.24wallet.ru" || url2.origin === "http://localhost:3000" || url2.origin === "http://127.0.0.1:3000" || url2.origin === "http://localhost:3024" || url2.origin === "http://127.0.0.1:3024";
    } catch {
      return false;
    }
  }
  function trustedAppOnlyError(requestId) {
    return providerError(
      requestId,
      "trusted_app_only",
      "This wallet-management method is only available to the trusted Acorus web app."
    );
  }
  function providerError(requestId, code2, message) {
    return {
      requestId,
      ok: false,
      error: {
        code: code2,
        message
      }
    };
  }
  function isApprovalMethod(method) {
    return method === "acorus_addChain" || method === "acorus_watchAsset" || method === "acorus_multichainSend" || method === "acorus_swap" || method === "acorus_signMessage" || method === "acorus_signTypedData" || method === "acorus_signTransaction" || method === "acorus_sendTransaction";
  }
  function getRequestKindForMethod(method) {
    switch (method) {
      case "acorus_addChain":
        return "add_chain";
      case "acorus_watchAsset":
        return "watch_asset";
      case "acorus_multichainSend":
        return "multichain_send";
      case "acorus_swap":
        return "swap";
      case "acorus_signMessage":
        return "sign_message";
      case "acorus_signTypedData":
        return "sign_typed_data";
      case "acorus_signTransaction":
        return "sign_transaction";
      case "acorus_sendTransaction":
        return "send_transaction";
      default:
        return "sign_message";
    }
  }
  function waitForConnectionApproval(input) {
    return new Promise((resolve) => {
      const timeoutId = setTimeout(() => {
        pendingConnectionApprovals.delete(input.requestId);
        resolve({
          requestId: input.requestId,
          ok: false,
          error: {
            code: "user_rejected",
            message: "The Acorus Wallet connection approval timed out."
          }
        });
      }, 5 * 60 * 1e3);
      pendingConnectionApprovals.set(input.requestId, {
        origin: input.origin,
        proposalId: input.proposalId,
        timeoutId,
        resolve
      });
    });
  }
  function waitForProviderApproval(request) {
    return new Promise((resolve) => {
      pendingProviderApprovals.set(request.id, {
        resolve
      });
    });
  }
  function resolvePendingConnectionApproval(origin2, proposalId, nextSnapshot) {
    const bridge = createDappBridgeSessionView(nextSnapshot, origin2);
    for (const [requestId, pending] of pendingConnectionApprovals.entries()) {
      if (pending.origin !== origin2 && pending.proposalId !== proposalId) {
        continue;
      }
      clearTimeout(pending.timeoutId);
      pendingConnectionApprovals.delete(requestId);
      pending.resolve({
        requestId,
        ok: true,
        result: bridge.accounts
      });
    }
  }
  function rejectPendingConnectionApproval(origin2, proposalId, code2, message) {
    for (const [requestId, pending] of pendingConnectionApprovals.entries()) {
      if (pending.origin !== origin2 && pending.proposalId !== proposalId) {
        continue;
      }
      clearTimeout(pending.timeoutId);
      pendingConnectionApprovals.delete(requestId);
      pending.resolve({
        requestId,
        ok: false,
        error: {
          code: code2,
          message
        }
      });
    }
  }
  function resolvePendingProviderApproval(request, result) {
    const pending = pendingProviderApprovals.get(request.id);
    if (!pending) {
      return;
    }
    pendingProviderApprovals.delete(request.id);
    pending.resolve({
      requestId: request.id,
      ok: true,
      result
    });
  }
  function rejectPendingProviderApproval(requestId, code2, message) {
    const pending = pendingProviderApprovals.get(requestId);
    if (!pending) {
      return;
    }
    pendingProviderApprovals.delete(requestId);
    pending.resolve({
      requestId,
      ok: false,
      error: {
        code: code2,
        message
      }
    });
  }
  function createSignerUnlockIntentId(requestId) {
    return `signer_unlock_${requestId}`;
  }
  function buildSignerUnlockIntent(request) {
    return {
      id: createSignerUnlockIntentId(request.id),
      requestId: request.id,
      kind: request.kind,
      origin: request.origin.origin,
      summary: request.summary,
      warning: request.warning ?? null,
      account: request.account ?? null,
      chainId: request.chainId ?? null,
      createdAt: (/* @__PURE__ */ new Date()).toISOString()
    };
  }
  function getSignerUnlockIntentByRequestId(requestId) {
    const intentId = createSignerUnlockIntentId(requestId);
    return pendingSignerUnlocks.get(intentId) ?? null;
  }
  function getSignerUnlockQueue() {
    return Array.from(pendingSignerUnlocks.values()).sort(
      (left, right) => left.createdAt.localeCompare(right.createdAt)
    );
  }
  async function executeApprovedRequest(request, execution, approvedAt) {
    if (!execution) {
      return createApprovedPreviewDappResult(request, approvedAt);
    }
    switch (execution.method) {
      case "acorus_addChain": {
        const chain2 = await addCustomEvmNetwork(parseAddChainRequest(execution.params));
        await setActiveExtensionChainId(chain2.chainId);
        return createApprovedLiveDappResult(request, approvedAt, {
          metadata: {
            chainId: chain2.chainId,
            chainName: chain2.name
          }
        });
      }
      case "acorus_watchAsset": {
        const asset = await watchAsset2(parseWatchAssetRequest(
          execution.params,
          request.chainId ?? 1
        ));
        return createApprovedLiveDappResult(request, approvedAt, {
          metadata: {
            assetId: asset.id,
            symbol: asset.symbol
          }
        });
      }
      case "acorus_signMessage":
        return createApprovedLiveDappResult(request, approvedAt, {
          signature: await executeExtensionSignMessage({
            params: execution.params,
            chainId: request.chainId ?? null,
            account: request.account ?? null
          })
        });
      case "acorus_signTypedData":
        return createApprovedLiveDappResult(request, approvedAt, {
          signature: await executeExtensionSignTypedData({
            params: execution.params,
            chainId: request.chainId ?? null,
            account: request.account ?? null
          })
        });
      case "acorus_signTransaction":
        return createApprovedLiveDappResult(request, approvedAt, {
          signature: await executeExtensionSignTransaction({
            params: execution.params,
            chainId: request.chainId ?? null,
            account: request.account ?? null
          })
        });
      case "acorus_sendTransaction": {
        const transactionHash = await executeExtensionSendTransaction({
          params: execution.params,
          chainId: request.chainId ?? null,
          account: request.account ?? null
        });
        await recordSubmittedActivity(request, transactionHash);
        return createApprovedLiveDappResult(request, approvedAt, {
          transactionHash
        });
      }
      case "acorus_swap": {
        const payload = normalizeRecord2(execution.params[0]);
        if (payload.provider !== "0x") {
          assertFreshSwapQuote(payload);
          return createApprovedPreviewDappResult(request, approvedAt);
        }
        if (!payload.to || !payload.data) {
          return createApprovedPreviewDappResult(request, approvedAt);
        }
        assertFreshSwapQuote(payload);
        assertTrustedSwapExecution(request, payload);
        const transactionHash = await executeExtensionSendTransaction({
          params: [{
            from: request.account,
            to: payload.to,
            data: payload.data,
            value: payload.value ?? "0x0",
            gas: payload.gas,
            gasPrice: payload.gasPrice,
            chainId: request.chainId
          }],
          chainId: request.chainId ?? null,
          account: request.account ?? null
        });
        await recordSubmittedActivity(request, transactionHash);
        return createApprovedLiveDappResult(request, approvedAt, {
          transactionHash
        });
      }
      case "acorus_multichainSend": {
        const payload = normalizeRecord2(execution.params[0]);
        if (payload.family === "solana") {
          return createApprovedLiveDappResult(request, approvedAt, {
            transactionHash: await executeExtensionSolanaSend({
              params: execution.params,
              account: request.account ?? null
            })
          });
        }
        return createApprovedPreviewDappResult(request, approvedAt);
      }
      default:
        return createApprovedPreviewDappResult(request, approvedAt);
    }
  }
  async function queueInternalSolanaSendRequest(input) {
    const vaultStatus = await getExtensionVaultStatus();
    if (!vaultStatus.isUnlocked) {
      throw new Error("Unlock Acorus Wallet extension before sending SOL.");
    }
    const profile = vaultStatus.profiles.find((item) => item.chainFamily === "solana");
    if (!profile) {
      throw new Error("Solana profile is not available in this wallet.");
    }
    const origin2 = "chrome-extension://acorus-popup";
    const state = await getDappShellState();
    const session = state.sessions.find((item) => item.id === "session_internal_solana_send") ?? {
      id: "session_internal_solana_send",
      origin: createDappOriginMetadata({
        origin: origin2,
        title: "Acorus Wallet Popup",
        trustLevel: "trusted"
      }),
      transport: "injected",
      providerMode: "wallet_backed",
      accounts: [profile.account],
      chainIds: [101],
      activeChainId: 101,
      permissions: ["multichain_send"],
      status: "active",
      connectedAt: (/* @__PURE__ */ new Date()).toISOString(),
      lastUsedAt: null,
      warning: "Internal extension send approval."
    };
    const stateWithSession = state.sessions.some((item) => item.id === session.id) ? state : {
      ...state,
      sessions: [session, ...state.sessions]
    };
    const assetType = input.assetType === "spl" ? "spl" : "native";
    let estimatedFeeFormatted = null;
    let ataWarning = null;
    let draftCanBroadcast = null;
    if (assetType === "spl") {
      if (!input.tokenAddress) {
        throw new Error("SPL transfer requires a token mint address.");
      }
      const draft = await buildSplTransferDraft({
        mintAddress: input.tokenAddress,
        fromOwnerAddress: profile.account,
        toOwnerAddress: input.toAddress,
        amountFormatted: input.amountFormatted,
        decimals: input.decimals ?? 0,
        symbol: input.symbol ?? "SPL",
        balanceRaw: input.balanceRaw
      });
      estimatedFeeFormatted = draft.feeEstimate?.feeFormatted ?? null;
      ataWarning = draft.warnings.find((warning) => warning.toLowerCase().includes("associated token account")) ?? null;
      draftCanBroadcast = draft.canBroadcast;
    }
    const providerParams = [{
      family: "solana",
      fromAddress: profile.account,
      toAddress: input.toAddress,
      amountFormatted: input.amountFormatted,
      assetType,
      tokenAddress: assetType === "spl" ? input.tokenAddress : null,
      symbol: assetType === "spl" ? input.symbol ?? "SPL" : "SOL",
      decimals: assetType === "spl" ? input.decimals ?? 0 : 9,
      balanceRaw: input.balanceRaw ?? null,
      estimatedFeeFormatted,
      ataWarning,
      draftCanBroadcast
    }];
    const assetSymbol = assetType === "spl" ? input.symbol ?? "SPL" : "SOL";
    const queued = queueDappRequest(stateWithSession, {
      id: input.requestId,
      sessionId: session.id,
      kind: "multichain_send",
      origin: origin2,
      account: profile.account,
      chainId: 101,
      summary: `Send ${input.amountFormatted || "0"} ${assetSymbol} on Solana to ${input.toAddress}.`,
      warning: assetType === "spl" && draftCanBroadcast === false ? "This SPL transfer draft has blocking validation errors. Review the token, amount, and recipient before approving." : "Confirm only if the address and amount are correct. Solana transfers cannot be reversed.",
      reviewDetails: buildRequestReviewDetails(
        "acorus_multichainSend",
        providerParams,
        101
      )
    });
    await setDappShellState(queued.snapshot);
    pendingProviderExecutions.set(queued.request.id, {
      method: "acorus_multichainSend",
      params: providerParams
    });
    return {
      requestId: queued.request.id,
      queued: true
    };
  }
  async function queueInternalEvmApproveTokenRequest(input) {
    const vaultStatus = await getExtensionVaultStatus();
    if (!vaultStatus.isUnlocked) {
      throw new Error("Unlock Acorus Wallet extension before approving a token.");
    }
    const profile = vaultStatus.profiles.find((item) => item.chainFamily === "evm");
    if (!profile) {
      throw new Error("EVM profile is not available in this wallet.");
    }
    const network = await resolveExtensionNetwork(input.chainId);
    if (!network || network.family !== "evm") {
      throw new Error("Token approvals are available only for configured EVM networks.");
    }
    const tx = buildSwapApprovalTransaction({
      chainId: input.chainId,
      tokenAddress: input.tokenAddress,
      owner: profile.account,
      spender: input.spender,
      requiredAmountRaw: input.amountRaw
    });
    const origin2 = "chrome-extension://acorus-popup";
    const state = await getDappShellState();
    const session = ensureInternalEvmSession(state, origin2, profile.account, input.chainId);
    const stateWithSession = state.sessions.some((item) => item.id === session.id) ? state : { ...state, sessions: [session, ...state.sessions] };
    const providerParams = [{
      from: profile.account,
      to: tx.to,
      data: tx.data,
      value: tx.value,
      chainId: input.chainId,
      tokenSymbol: input.tokenSymbol,
      spender: input.spender,
      amountRaw: tx.amountRaw,
      approvalMode: "exact"
    }];
    const queued = queueDappRequest(stateWithSession, {
      id: input.requestId,
      sessionId: session.id,
      kind: "send_transaction",
      origin: origin2,
      account: profile.account,
      chainId: input.chainId,
      summary: `Approve ${input.tokenSymbol} for 0x swap spender ${input.spender}.`,
      warning: "Approve token spending only when you trust the route and spender.",
      reviewDetails: {
        kind: "token_approval",
        chainId: input.chainId,
        tokenSymbol: input.tokenSymbol,
        tokenAddress: input.tokenAddress,
        spender: input.spender,
        amountRaw: tx.amountRaw,
        amountFormatted: input.amountFormatted ?? formatApprovalAmount(
          { ...input, approvalMode: "exact" },
          tx.amountRaw
        ),
        currentAllowanceRaw: input.currentAllowanceRaw ?? null,
        requiredAllowanceRaw: input.requiredAllowanceRaw ?? input.amountRaw,
        currentAllowanceFormatted: formatOptionalAllowance(
          input.currentAllowanceRaw,
          input.tokenDecimals
        ),
        requiredAllowanceFormatted: formatOptionalAllowance(
          input.requiredAllowanceRaw ?? input.amountRaw,
          input.tokenDecimals
        ),
        approvalMode: "exact",
        riskLabels: tx.riskLabels
      }
    });
    await setDappShellState(queued.snapshot);
    await appendExtensionActivity({
      id: `${queued.request.id}_approval_requested`,
      kind: "approval_requested",
      provider: "0x",
      chainId: input.chainId,
      account: profile.account,
      tokenSymbol: input.tokenSymbol,
      amountFormatted: input.amountFormatted ?? formatApprovalAmount(
        { ...input, approvalMode: "exact" },
        tx.amountRaw
      ),
      approvalMode: "exact",
      status: "queued",
      createdAt: (/* @__PURE__ */ new Date()).toISOString(),
      updatedAt: (/* @__PURE__ */ new Date()).toISOString()
    });
    pendingProviderExecutions.set(queued.request.id, {
      method: "acorus_sendTransaction",
      params: providerParams
    });
    return {
      requestId: queued.request.id,
      queued: true
    };
  }
  async function queueInternalEvmSwapRequest(input) {
    const vaultStatus = await getExtensionVaultStatus();
    if (!vaultStatus.isUnlocked) {
      throw new Error("Unlock Acorus Wallet extension before swapping.");
    }
    const profile = vaultStatus.profiles.find((item) => item.chainFamily === "evm");
    if (!profile) {
      throw new Error("EVM profile is not available in this wallet.");
    }
    if (normalizeLowerHex2(profile.account) !== normalizeLowerHex2(input.quote.takerAddress)) {
      throw new Error("The quote taker does not match the selected EVM account.");
    }
    const network = await resolveExtensionNetwork(input.quote.chainId);
    if (!network || network.family !== "evm") {
      throw new Error("Swap execution is available only for configured EVM networks.");
    }
    assertFreshSwapQuote({
      expiresAt: input.quote.expiresAt
    });
    if (!looksLikeEvmAddress3(input.quote.to) || !isHexString3(input.quote.data)) {
      throw new Error("Swap quote transaction is invalid.");
    }
    const origin2 = "chrome-extension://acorus-popup";
    const state = await getDappShellState();
    const session = ensureInternalEvmSession(state, origin2, profile.account, input.quote.chainId);
    const stateWithSession = state.sessions.some((item) => item.id === session.id) ? state : { ...state, sessions: [session, ...state.sessions] };
    const providerParams = [{
      provider: "0x",
      quoteId: input.quote.requestId,
      quoteSource: "acorus_backend_0x",
      createdAt: input.quote.createdAt,
      from: profile.account,
      takerAddress: input.quote.takerAddress,
      to: input.quote.to,
      data: input.quote.data,
      dataHash: hashSwapData(input.quote.data),
      value: input.quote.value,
      gas: input.quote.gas,
      gasPrice: input.quote.gasPrice,
      chainId: input.quote.chainId,
      expiresAt: input.quote.expiresAt,
      sellTokenSymbol: input.quote.sellToken.symbol,
      buyTokenSymbol: input.quote.buyToken.symbol,
      sellAmountRaw: input.quote.sellAmountRaw,
      buyAmountRaw: input.quote.buyAmountRaw,
      sellAmountFormatted: shortenFormattedEvmTokenAmount(
        input.quote.sellAmountRaw,
        input.quote.sellToken.decimals
      ),
      buyAmountFormatted: shortenFormattedEvmTokenAmount(
        input.quote.buyAmountRaw,
        input.quote.buyToken.decimals
      ),
      minBuyAmountFormatted: input.quote.minBuyAmountRaw ? shortenFormattedEvmTokenAmount(
        input.quote.minBuyAmountRaw,
        input.quote.buyToken.decimals
      ) : null
    }];
    const riskLabels = ["DEX aggregator", "Irreversible transaction"];
    if (Number(input.quote.estimatedPriceImpact) > 0.05) {
      riskLabels.push("High price impact");
    }
    if (!input.quote.sellToken.logoUrl || !input.quote.buyToken.logoUrl) {
      riskLabels.push("Custom token");
    }
    const queued = queueDappRequest(stateWithSession, {
      id: input.requestId,
      sessionId: session.id,
      kind: "swap",
      origin: origin2,
      account: profile.account,
      chainId: input.quote.chainId,
      summary: `Swap ${input.quote.sellAmountRaw} ${input.quote.sellToken.symbol} for ${input.quote.buyToken.symbol} with 0x.`,
      warning: "Rates can change before execution. Confirm only after checking the route, amount, and destination contract.",
      reviewDetails: {
        kind: "evm_swap",
        provider: "0x",
        chainId: input.quote.chainId,
        sellTokenSymbol: input.quote.sellToken.symbol,
        buyTokenSymbol: input.quote.buyToken.symbol,
        sellAmountRaw: input.quote.sellAmountRaw,
        sellAmountFormatted: shortenFormattedEvmTokenAmount(
          input.quote.sellAmountRaw,
          input.quote.sellToken.decimals
        ),
        buyAmountRaw: input.quote.buyAmountRaw,
        buyAmountFormatted: shortenFormattedEvmTokenAmount(
          input.quote.buyAmountRaw,
          input.quote.buyToken.decimals
        ),
        minBuyAmountRaw: input.quote.minBuyAmountRaw ?? null,
        minBuyAmountFormatted: input.quote.minBuyAmountRaw ? shortenFormattedEvmTokenAmount(
          input.quote.minBuyAmountRaw,
          input.quote.buyToken.decimals
        ) : null,
        slippageBps: input.slippageBps ?? null,
        priceImpact: input.quote.estimatedPriceImpact ?? null,
        routeLabel: input.quote.routeSummary.label,
        contractAddress: input.quote.to,
        value: input.quote.value,
        createdAt: input.quote.createdAt,
        expiresAt: input.quote.expiresAt,
        riskLabels
      }
    });
    await setDappShellState(queued.snapshot);
    await appendExtensionActivity({
      id: `${queued.request.id}_swap_requested`,
      kind: "swap_requested",
      provider: "0x",
      chainId: input.quote.chainId,
      account: profile.account,
      sellTokenSymbol: input.quote.sellToken.symbol,
      buyTokenSymbol: input.quote.buyToken.symbol,
      amountFormatted: shortenFormattedEvmTokenAmount(
        input.quote.sellAmountRaw,
        input.quote.sellToken.decimals
      ),
      buyAmountFormatted: shortenFormattedEvmTokenAmount(
        input.quote.buyAmountRaw,
        input.quote.buyToken.decimals
      ),
      status: "queued",
      createdAt: (/* @__PURE__ */ new Date()).toISOString(),
      updatedAt: (/* @__PURE__ */ new Date()).toISOString()
    });
    pendingProviderExecutions.set(queued.request.id, {
      method: "acorus_swap",
      params: providerParams
    });
    return {
      requestId: queued.request.id,
      queued: true
    };
  }
  async function queueInternalUniversalSwapRequest(input) {
    const vaultStatus = await getExtensionVaultStatus();
    if (!vaultStatus.isUnlocked) {
      throw new Error("Unlock Acorus Wallet extension before reviewing this swap route.");
    }
    const payload = buildUniversalSwapProviderPayload(input);
    assertFreshSwapQuote({ expiresAt: payload.expiresAt });
    const preferredFamily = input.provider === "jupiter" ? "solana" : inferRangoSourceFamily(payload.fromLabel);
    const profile = vaultStatus.profiles.find((item) => item.chainFamily === preferredFamily) ?? vaultStatus.profiles.find((item) => item.selected) ?? vaultStatus.profiles[0];
    if (!profile) {
      throw new Error("No wallet profile is available for swap review.");
    }
    const origin2 = "chrome-extension://acorus-popup";
    const state = await getDappShellState();
    const session = ensureInternalUniversalSwapSession(
      state,
      origin2,
      profile.account,
      payload.chainId
    );
    const stateWithSession = state.sessions.some((item) => item.id === session.id) ? state : { ...state, sessions: [session, ...state.sessions] };
    const providerParams = [{
      ...payload,
      from: profile.account
    }];
    const queued = queueDappRequest(stateWithSession, {
      id: input.requestId,
      sessionId: session.id,
      kind: "swap",
      origin: origin2,
      account: profile.account,
      chainId: payload.chainId,
      summary: `${payload.provider} route review: ${payload.sellAmountRaw} ${payload.fromLabel} to ${payload.toLabel}.`,
      warning: "This route is review-only in the extension until the matching adapter execution is fully audited.",
      reviewDetails: buildRequestReviewDetails(
        "acorus_swap",
        providerParams,
        payload.chainId
      )
    });
    await setDappShellState(queued.snapshot);
    await appendExtensionActivity({
      id: `${queued.request.id}_swap_requested`,
      kind: "swap_requested",
      provider: input.provider,
      chainId: payload.chainId,
      account: profile.account,
      sellTokenSymbol: payload.fromLabel,
      buyTokenSymbol: payload.toLabel,
      amountFormatted: payload.sellAmountFormatted ?? payload.sellAmountRaw,
      buyAmountFormatted: payload.buyAmountFormatted ?? payload.buyAmountRaw ?? null,
      status: "queued",
      createdAt: (/* @__PURE__ */ new Date()).toISOString(),
      updatedAt: (/* @__PURE__ */ new Date()).toISOString()
    });
    pendingProviderExecutions.set(queued.request.id, {
      method: "acorus_swap",
      params: providerParams
    });
    return {
      requestId: queued.request.id,
      queued: true
    };
  }
  function ensureInternalEvmSession(state, origin2, account, chainId) {
    return state.sessions.find((item) => item.id === "session_internal_evm_swap") ?? {
      id: "session_internal_evm_swap",
      origin: createDappOriginMetadata({
        origin: origin2,
        title: "Acorus Wallet Popup",
        trustLevel: "trusted"
      }),
      transport: "injected",
      providerMode: "wallet_backed",
      accounts: [account],
      chainIds: [chainId],
      activeChainId: chainId,
      permissions: ["send_transaction", "swap"],
      status: "active",
      connectedAt: (/* @__PURE__ */ new Date()).toISOString(),
      lastUsedAt: null,
      warning: "Internal extension swap approval."
    };
  }
  function ensureInternalUniversalSwapSession(state, origin2, account, chainId) {
    const id = `session_internal_universal_swap_${String(chainId)}`;
    return state.sessions.find((item) => item.id === id) ?? {
      id,
      origin: createDappOriginMetadata({
        origin: origin2,
        title: "Acorus Wallet Popup",
        trustLevel: "trusted"
      }),
      transport: "injected",
      providerMode: "wallet_backed",
      accounts: [account],
      chainIds: [chainId],
      activeChainId: chainId,
      permissions: ["swap"],
      status: "active",
      connectedAt: (/* @__PURE__ */ new Date()).toISOString(),
      lastUsedAt: null,
      warning: "Internal universal swap review."
    };
  }
  function buildUniversalSwapProviderPayload(input) {
    if (input.provider === "jupiter" && input.route.provider === "jupiter") {
      const routeLabel = input.route.routeSummary.map((step) => step.protocolName).filter((label) => Boolean(label)).join(" + ");
      return {
        provider: "jupiter",
        quoteSource: "acorus_backend_jupiter",
        chainId: 101,
        fromLabel: shortMintLabel(input.route.inputMint),
        toLabel: shortMintLabel(input.route.outputMint),
        sellAmountRaw: input.route.inAmountRaw,
        buyAmountRaw: input.route.outAmountRaw,
        minBuyAmountRaw: input.route.otherAmountThresholdRaw ?? null,
        routeLabel: routeLabel || "Jupiter best route",
        slippageBps: input.slippageBps ?? input.route.slippageBps,
        expiresAt: input.route.expiresAt,
        executionStatus: "review_only",
        swapTransactionHash: "swapTransaction" in input.route ? hashSwapData(input.route.swapTransaction) : null
      };
    }
    if (input.provider === "rango" && input.route.provider === "rango") {
      return {
        provider: "rango",
        quoteSource: "acorus_backend_rango",
        chainId: "crosschain",
        fromLabel: input.route.from,
        toLabel: input.route.to,
        sellAmountRaw: input.route.amountRaw,
        sellAmountFormatted: input.route.amountRaw,
        buyAmountRaw: input.route.outputAmountRaw ?? null,
        buyAmountFormatted: input.route.outputAmountFormatted ?? input.route.outputAmountRaw ?? null,
        routeLabel: input.route.routeLabel || "Rango best route",
        slippageBps: input.slippageBps ?? null,
        expiresAt: input.route.expiresAt,
        executionStatus: "review_only",
        resultType: input.route.resultType ?? null
      };
    }
    throw new Error("Swap provider and route payload do not match.");
  }
  function inferRangoSourceFamily(label) {
    const upper = label.toUpperCase();
    if (upper.startsWith("SOL.")) {
      return "solana";
    }
    if (upper.startsWith("TRON.") || upper.startsWith("TRX.")) {
      return "tron";
    }
    return "evm";
  }
  function shortMintLabel(value) {
    if (value === "So11111111111111111111111111111111111111112") {
      return "SOL";
    }
    if (value === "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v") {
      return "USDC";
    }
    return `${value.slice(0, 4)}...${value.slice(-4)}`;
  }
  function assertFreshSwapQuote(payload) {
    const expiresAt = typeof payload.expiresAt === "string" ? new Date(payload.expiresAt).getTime() : null;
    if (!expiresAt || !Number.isFinite(expiresAt) || expiresAt <= Date.now()) {
      throw new Error("Swap quote expired. Refresh the quote before approving.");
    }
  }
  function assertTrustedSwapExecution(request, payload) {
    if (payload.provider !== "0x" || payload.quoteSource !== "acorus_backend_0x") {
      throw new Error("Swap quote came from an untrusted source.");
    }
    if (Number(payload.chainId) !== Number(request.chainId)) {
      throw new Error("Swap quote chain no longer matches the active request chain.");
    }
    if (normalizeLowerHex2(String(payload.from ?? "")) !== normalizeLowerHex2(String(request.account ?? "")) || normalizeLowerHex2(String(payload.takerAddress ?? "")) !== normalizeLowerHex2(String(request.account ?? ""))) {
      throw new Error("Swap quote taker no longer matches the selected account.");
    }
    if (!isHexString3(String(payload.data ?? ""))) {
      throw new Error("Swap calldata is invalid.");
    }
    if (typeof payload.dataHash !== "string" || payload.dataHash !== hashSwapData(String(payload.data))) {
      throw new Error("Swap calldata changed after quote creation.");
    }
  }
  function hashSwapData(value) {
    let hash5 = 2166136261;
    for (let index2 = 0; index2 < value.length; index2 += 1) {
      hash5 ^= value.charCodeAt(index2);
      hash5 = Math.imul(hash5, 16777619);
    }
    return `fnv1a_${(hash5 >>> 0).toString(16)}`;
  }
  async function recordSubmittedActivity(request, transactionHash) {
    if (request.reviewDetails?.kind === "token_approval") {
      await appendExtensionActivity({
        id: `${request.id}_approval_submitted`,
        kind: "approval_submitted",
        provider: "0x",
        chainId: Number(request.reviewDetails.chainId ?? request.chainId ?? 1),
        account: request.account ?? "",
        tokenSymbol: request.reviewDetails.tokenSymbol,
        amountFormatted: request.reviewDetails.amountFormatted ?? request.reviewDetails.amountRaw,
        approvalMode: request.reviewDetails.approvalMode,
        txHash: transactionHash,
        status: "submitted",
        createdAt: (/* @__PURE__ */ new Date()).toISOString(),
        updatedAt: (/* @__PURE__ */ new Date()).toISOString()
      });
      return;
    }
    if (request.reviewDetails?.kind === "evm_swap") {
      await appendExtensionActivity({
        id: `${request.id}_swap_submitted`,
        kind: "swap_submitted",
        provider: "0x",
        chainId: Number(request.reviewDetails.chainId ?? request.chainId ?? 1),
        account: request.account ?? "",
        sellTokenSymbol: request.reviewDetails.sellTokenSymbol,
        buyTokenSymbol: request.reviewDetails.buyTokenSymbol,
        amountFormatted: request.reviewDetails.sellAmountFormatted ?? request.reviewDetails.sellAmountRaw,
        buyAmountFormatted: request.reviewDetails.buyAmountFormatted ?? request.reviewDetails.buyAmountRaw,
        txHash: transactionHash,
        status: "submitted",
        createdAt: (/* @__PURE__ */ new Date()).toISOString(),
        updatedAt: (/* @__PURE__ */ new Date()).toISOString()
      });
    }
  }
  async function recordRejectedActivity(request) {
    if (request.reviewDetails?.kind === "token_approval") {
      await appendExtensionActivity({
        id: `${request.id}_approval_rejected`,
        kind: "approval_rejected",
        provider: "0x",
        chainId: Number(request.reviewDetails.chainId ?? request.chainId ?? 1),
        account: request.account ?? "",
        tokenSymbol: request.reviewDetails.tokenSymbol,
        amountFormatted: request.reviewDetails.amountFormatted ?? request.reviewDetails.amountRaw,
        approvalMode: request.reviewDetails.approvalMode,
        status: "rejected",
        createdAt: (/* @__PURE__ */ new Date()).toISOString(),
        updatedAt: (/* @__PURE__ */ new Date()).toISOString()
      });
      return;
    }
    if (request.reviewDetails?.kind === "evm_swap") {
      await appendExtensionActivity({
        id: `${request.id}_swap_rejected`,
        kind: "swap_rejected",
        provider: "0x",
        chainId: Number(request.reviewDetails.chainId ?? request.chainId ?? 1),
        account: request.account ?? "",
        sellTokenSymbol: request.reviewDetails.sellTokenSymbol,
        buyTokenSymbol: request.reviewDetails.buyTokenSymbol,
        amountFormatted: request.reviewDetails.sellAmountFormatted ?? request.reviewDetails.sellAmountRaw,
        buyAmountFormatted: request.reviewDetails.buyAmountFormatted ?? request.reviewDetails.buyAmountRaw,
        status: "rejected",
        createdAt: (/* @__PURE__ */ new Date()).toISOString(),
        updatedAt: (/* @__PURE__ */ new Date()).toISOString()
      });
    }
  }
  async function recordActivityFailure(request, error51, errorCode) {
    const message = error51 instanceof Error ? error51.message : "The extension failed to execute the request.";
    if (request.reviewDetails?.kind === "token_approval") {
      await appendExtensionActivity({
        id: `${request.id}_approval_failed`,
        kind: "approval_failed",
        provider: "0x",
        chainId: Number(request.reviewDetails.chainId ?? request.chainId ?? 1),
        account: request.account ?? "",
        tokenSymbol: request.reviewDetails.tokenSymbol,
        amountFormatted: request.reviewDetails.amountFormatted ?? request.reviewDetails.amountRaw,
        approvalMode: request.reviewDetails.approvalMode,
        status: "failed",
        errorCode,
        errorMessage: message,
        createdAt: (/* @__PURE__ */ new Date()).toISOString(),
        updatedAt: (/* @__PURE__ */ new Date()).toISOString()
      });
      return;
    }
    if (request.reviewDetails?.kind === "evm_swap") {
      await appendExtensionActivity({
        id: `${request.id}_swap_failed`,
        kind: "swap_failed",
        provider: "0x",
        chainId: Number(request.reviewDetails.chainId ?? request.chainId ?? 1),
        account: request.account ?? "",
        sellTokenSymbol: request.reviewDetails.sellTokenSymbol,
        buyTokenSymbol: request.reviewDetails.buyTokenSymbol,
        amountFormatted: request.reviewDetails.sellAmountFormatted ?? request.reviewDetails.sellAmountRaw,
        buyAmountFormatted: request.reviewDetails.buyAmountFormatted ?? request.reviewDetails.buyAmountRaw,
        status: "failed",
        errorCode,
        errorMessage: message,
        createdAt: (/* @__PURE__ */ new Date()).toISOString(),
        updatedAt: (/* @__PURE__ */ new Date()).toISOString()
      });
    }
  }
  function formatApprovalAmount(input, amountRaw) {
    if (input.approvalMode === "infinite") {
      return "Unlimited";
    }
    return formatOptionalAllowance(amountRaw, input.tokenDecimals) ?? amountRaw;
  }
  function formatOptionalAllowance(amountRaw, decimals) {
    if (!amountRaw) {
      return null;
    }
    if (!Number.isInteger(decimals) || decimals === null || decimals === void 0) {
      return amountRaw;
    }
    try {
      return shortenFormattedEvmTokenAmount(amountRaw, decimals);
    } catch {
      return amountRaw;
    }
  }
  function createApprovedLiveDappResult(request, approvedAt, input) {
    return {
      requestId: request.id,
      kind: request.kind,
      status: "approved_live",
      account: request.account ?? null,
      chainId: request.chainId ?? null,
      summary: request.summary,
      warning: "Approved and executed inside Acorus Wallet extension after explicit signer confirmation.",
      approvedAt,
      signature: input.signature ?? null,
      transactionHash: input.transactionHash ?? null,
      metadata: input.metadata ?? null
    };
  }
  function parseAddChainRequest(params) {
    const payload = normalizeRecord2(params[0]);
    const nativeCurrency = normalizeRecord2(payload.nativeCurrency);
    const rawChainId = String(payload.chainId ?? "");
    return {
      chainId: Number.parseInt(
        rawChainId,
        rawChainId.startsWith("0x") ? 16 : 10
      ),
      chainName: String(payload.chainName ?? ""),
      nativeCurrency: {
        name: String(nativeCurrency.name ?? ""),
        symbol: String(nativeCurrency.symbol ?? ""),
        decimals: Number(nativeCurrency.decimals ?? 18)
      },
      rpcUrls: toStringArray(payload.rpcUrls),
      blockExplorerUrls: toStringArray(payload.blockExplorerUrls),
      iconUrls: toStringArray(payload.iconUrls)
    };
  }
  function parseWatchAssetRequest(params, activeChainId) {
    const payload = normalizeRecord2(params[0]);
    const options = normalizeRecord2(payload.options);
    return {
      family: "evm",
      chainId: activeChainId,
      type: "erc20",
      symbol: String(options.symbol ?? ""),
      name: String(options.symbol ?? "Custom token"),
      decimals: Number(options.decimals ?? 18),
      tokenAddress: String(options.address ?? ""),
      logoUrl: typeof options.image === "string" ? options.image : null,
      isVerified: false
    };
  }
  function buildApprovalSummary(method, params, session) {
    const chain2 = String(getDappSessionActiveChainId(session) ?? "n/a");
    const payload = summarizePayload(params?.[0]);
    switch (method) {
      case "acorus_addChain": {
        const addChain2 = parseAddChainPreview(params ?? []);
        return `Confirm network add: ${addChain2.chainName || "Unknown network"} \xB7 chainId ${addChain2.chainId || "n/a"} \xB7 symbol ${addChain2.symbol || "n/a"} \xB7 RPC ${addChain2.rpcUrl || "n/a"} \xB7 explorer ${addChain2.explorerUrl || "n/a"}.`;
      }
      case "acorus_watchAsset": {
        const asset = parseWatchAssetPreview(params ?? []);
        return `Confirm token add on chain ${chain2}: ${asset.symbol || "UNKNOWN"} \xB7 ${asset.address || "no address"} \xB7 decimals ${asset.decimals}.`;
      }
      case "acorus_multichainSend":
        return `Multichain send review. Active chain ${chain2}. Draft preview: ${payload}.`;
      case "acorus_swap": {
        const swap = normalizeRecord2(params?.[0]);
        if (swap.provider === "0x") {
          return `Confirm 0x swap on chain ${chain2}: ${String(swap.sellTokenSymbol ?? "sell")} to ${String(swap.buyTokenSymbol ?? "buy")}.`;
        }
        if (swap.provider === "jupiter" || swap.provider === "rango") {
          return `Review ${String(swap.provider)} route: ${String(swap.fromLabel ?? "sell")} to ${String(swap.toLabel ?? "buy")}.`;
        }
        return `Swap review. Active chain ${chain2}. Route preview: ${payload}.`;
      }
      case "acorus_signMessage":
        return `Sign message review on chain ${chain2}. Payload preview: ${payload}.`;
      case "acorus_signTypedData":
        return `Sign typed data review on chain ${chain2}. Payload preview: ${payload}.`;
      case "acorus_signTransaction":
        return `Sign transaction review on chain ${chain2}. Transaction preview: ${payload}.`;
      case "acorus_sendTransaction":
        return `Send transaction review on chain ${chain2}. Broadcast requires signer confirmation in the extension. Payload preview: ${payload}.`;
      default:
        return `Request review on chain ${chain2}. Payload preview: ${payload}.`;
    }
  }
  function buildConnectionlessApprovalSummary(method, params, activeChainId) {
    if (method === "acorus_addChain") {
      const addChain2 = parseAddChainPreview(params ?? []);
      return `Confirm network add: ${addChain2.chainName || "Unknown network"} \xB7 chainId ${addChain2.chainId || "n/a"} \xB7 symbol ${addChain2.symbol || "n/a"} \xB7 RPC ${addChain2.rpcUrl || "n/a"} \xB7 explorer ${addChain2.explorerUrl || "n/a"}.`;
    }
    if (method === "acorus_watchAsset") {
      const asset = parseWatchAssetPreview(params ?? []);
      return `Confirm token add on chain ${String(activeChainId ?? "n/a")}: ${asset.symbol || "UNKNOWN"} \xB7 ${asset.address || "no address"} \xB7 decimals ${asset.decimals}.`;
    }
    return `Review request on chain ${String(activeChainId ?? "n/a")}.`;
  }
  function parseAddChainPreview(params) {
    const payload = normalizeRecord2(params[0]);
    const nativeCurrency = normalizeRecord2(payload.nativeCurrency);
    return {
      chainId: String(payload.chainId ?? ""),
      chainName: String(payload.chainName ?? ""),
      rpcUrl: toStringArray(payload.rpcUrls)[0] ?? "",
      explorerUrl: toStringArray(payload.blockExplorerUrls)[0] ?? "",
      symbol: String(nativeCurrency.symbol ?? "")
    };
  }
  function parseWatchAssetPreview(params) {
    const payload = normalizeRecord2(params[0]);
    const options = normalizeRecord2(payload.options);
    return {
      address: String(options.address ?? ""),
      symbol: String(options.symbol ?? ""),
      decimals: String(options.decimals ?? "")
    };
  }
  function buildRequestReviewDetails(method, params, activeChainId) {
    if (method === "acorus_addChain") {
      const preview = parseAddChainPreview(params);
      const chainIdDecimal = parseMaybeChainId(preview.chainId);
      const rpcHostname = safeHostname(preview.rpcUrl);
      const explorerHostname = safeHostname(preview.explorerUrl);
      const riskLabels = ["Custom network"];
      if (!rpcHostname || !isKnownPublicRpcHostname(rpcHostname)) {
        riskLabels.push("Unknown RPC");
      }
      return {
        kind: "add_chain",
        chainName: preview.chainName,
        chainIdDecimal,
        chainIdHex: chainIdDecimal === null ? preview.chainId : `0x${chainIdDecimal.toString(16)}`,
        rpcUrl: preview.rpcUrl,
        rpcHostname: rpcHostname || "unknown",
        explorerUrl: preview.explorerUrl,
        explorerHostname: explorerHostname || "none",
        nativeSymbol: preview.symbol,
        riskLabels
      };
    }
    if (method === "acorus_watchAsset") {
      const preview = parseWatchAssetPreview(params);
      const decimals = Number(preview.decimals);
      return {
        kind: "watch_asset",
        chainId: activeChainId,
        tokenAddress: preview.address,
        symbol: preview.symbol,
        decimals: Number.isFinite(decimals) ? decimals : null,
        riskLabels: ["Token not verified"]
      };
    }
    if (method === "acorus_multichainSend") {
      const payload = normalizeRecord2(params[0]);
      if (payload.family === "solana") {
        const assetType = payload.assetType === "spl" ? "spl" : "native";
        const tokenAddress = typeof payload.tokenAddress === "string" ? payload.tokenAddress : null;
        const ataWarning = typeof payload.ataWarning === "string" ? payload.ataWarning : null;
        const estimatedFeeFormatted = typeof payload.estimatedFeeFormatted === "string" ? payload.estimatedFeeFormatted : null;
        const riskLabels = ["Irreversible transfer"];
        if (assetType === "spl") {
          riskLabels.push("SPL token transfer");
        }
        if (ataWarning) {
          riskLabels.push("ATA create");
        }
        return {
          kind: "multichain_send",
          family: "solana",
          chainId: activeChainId ?? 101,
          fromAddress: String(payload.fromAddress ?? payload.from ?? ""),
          toAddress: String(payload.toAddress ?? payload.to ?? ""),
          assetSymbol: String(payload.symbol ?? (assetType === "spl" ? "SPL" : "SOL")),
          assetType,
          tokenAddress,
          amountFormatted: String(payload.amountFormatted ?? payload.amount ?? ""),
          estimatedFeeFormatted,
          ataWarning,
          riskLabels
        };
      }
    }
    if (method === "acorus_sendTransaction") {
      const payload = normalizeRecord2(params[0]);
      if (payload.approvalKind === "token_approval" || typeof payload.tokenSymbol === "string" && typeof payload.spender === "string") {
        return {
          kind: "token_approval",
          chainId: activeChainId,
          tokenSymbol: String(payload.tokenSymbol ?? "TOKEN"),
          tokenAddress: String(payload.to ?? payload.tokenAddress ?? ""),
          spender: String(payload.spender ?? ""),
          amountRaw: String(payload.amountRaw ?? ""),
          amountFormatted: typeof payload.amountFormatted === "string" ? payload.amountFormatted : null,
          currentAllowanceRaw: typeof payload.currentAllowanceRaw === "string" ? payload.currentAllowanceRaw : null,
          requiredAllowanceRaw: typeof payload.requiredAllowanceRaw === "string" ? payload.requiredAllowanceRaw : null,
          currentAllowanceFormatted: typeof payload.currentAllowanceFormatted === "string" ? payload.currentAllowanceFormatted : null,
          requiredAllowanceFormatted: typeof payload.requiredAllowanceFormatted === "string" ? payload.requiredAllowanceFormatted : null,
          approvalMode: "exact",
          riskLabels: [
            "Token approval required",
            "Exact allowance",
            "Custom spender"
          ]
        };
      }
    }
    if (method === "acorus_swap") {
      const payload = normalizeRecord2(params[0]);
      if (payload.provider === "0x") {
        const riskLabels = ["DEX aggregator", "Irreversible transaction"];
        if (payload.priceImpact && Number(payload.priceImpact) > 0.05) {
          riskLabels.push("High price impact");
        }
        return {
          kind: "evm_swap",
          provider: "0x",
          chainId: activeChainId,
          sellTokenSymbol: String(payload.sellTokenSymbol ?? "SELL"),
          buyTokenSymbol: String(payload.buyTokenSymbol ?? "BUY"),
          sellAmountRaw: String(payload.sellAmountRaw ?? ""),
          buyAmountRaw: String(payload.buyAmountRaw ?? ""),
          minBuyAmountRaw: typeof payload.minBuyAmountRaw === "string" ? payload.minBuyAmountRaw : null,
          slippageBps: typeof payload.slippageBps === "number" ? payload.slippageBps : null,
          priceImpact: typeof payload.priceImpact === "string" ? payload.priceImpact : null,
          routeLabel: String(payload.routeLabel ?? "0x route"),
          contractAddress: String(payload.to ?? ""),
          value: String(payload.value ?? "0"),
          riskLabels
        };
      }
      if (payload.provider === "jupiter" || payload.provider === "rango") {
        const riskLabels = [
          payload.provider === "jupiter" ? "Solana aggregator" : "Cross-chain aggregator",
          "Review-only route"
        ];
        if (payload.provider === "rango") {
          riskLabels.push("Bridge route");
        }
        return {
          kind: "universal_swap",
          provider: payload.provider,
          chainId: typeof payload.chainId === "string" || typeof payload.chainId === "number" ? payload.chainId : activeChainId,
          fromLabel: String(payload.fromLabel ?? "Sell asset"),
          toLabel: String(payload.toLabel ?? "Buy asset"),
          sellAmountRaw: String(payload.sellAmountRaw ?? ""),
          sellAmountFormatted: typeof payload.sellAmountFormatted === "string" ? payload.sellAmountFormatted : null,
          buyAmountRaw: typeof payload.buyAmountRaw === "string" ? payload.buyAmountRaw : null,
          buyAmountFormatted: typeof payload.buyAmountFormatted === "string" ? payload.buyAmountFormatted : null,
          minBuyAmountRaw: typeof payload.minBuyAmountRaw === "string" ? payload.minBuyAmountRaw : null,
          slippageBps: typeof payload.slippageBps === "number" ? payload.slippageBps : null,
          routeLabel: String(payload.routeLabel ?? `${payload.provider} route`),
          executionStatus: "review_only",
          expiresAt: typeof payload.expiresAt === "string" ? payload.expiresAt : null,
          riskLabels
        };
      }
    }
    return null;
  }
  function parseMaybeChainId(value) {
    const parsed = Number.parseInt(value, value.startsWith("0x") ? 16 : 10);
    return Number.isFinite(parsed) ? parsed : null;
  }
  function safeHostname(value) {
    if (!value) {
      return "";
    }
    try {
      return new URL(value).hostname;
    } catch {
      return "";
    }
  }
  function isKnownPublicRpcHostname(hostname3) {
    return [
      "publicnode.com",
      "ankr.com",
      "infura.io",
      "alchemy.com",
      "quicknode.pro",
      "llamarpc.com"
    ].some((suffix) => hostname3 === suffix || hostname3.endsWith(`.${suffix}`));
  }
  function summarizePayload(value) {
    if (typeof value === "string") {
      return truncate2(value);
    }
    if (typeof value === "number" || typeof value === "boolean") {
      return String(value);
    }
    if (value && typeof value === "object") {
      try {
        return truncate2(JSON.stringify(value));
      } catch {
        return "object";
      }
    }
    if (value === void 0) {
      return "empty";
    }
    return String(value);
  }
  function truncate2(value, length2 = 96) {
    return value.length > length2 ? `${value.slice(0, length2)}\u2026` : value;
  }
  function looksLikeEvmAddress3(value) {
    return typeof value === "string" && /^0x[0-9a-f]{40}$/iu.test(value);
  }
  function isHexString3(value) {
    return typeof value === "string" && /^0x[0-9a-f]+$/iu.test(value);
  }
  function normalizeLowerHex2(value) {
    return value.trim().toLowerCase();
  }
})();
/*! Bundled license information:

ieee754/index.js:
  (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)

buffer/index.js:
  (*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   *)

@noble/hashes/esm/utils.js:
@noble/hashes/utils.js:
  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)

@noble/curves/esm/abstract/utils.js:
@noble/curves/esm/abstract/modular.js:
@noble/curves/esm/abstract/curve.js:
@noble/curves/esm/abstract/weierstrass.js:
@noble/curves/esm/_shortw_utils.js:
@noble/curves/esm/secp256k1.js:
@noble/curves/esm/utils.js:
@noble/curves/esm/abstract/modular.js:
@noble/curves/esm/abstract/curve.js:
@noble/curves/esm/abstract/weierstrass.js:
@noble/curves/esm/_shortw_utils.js:
@noble/curves/esm/secp256k1.js:
@noble/curves/esm/abstract/edwards.js:
@noble/curves/esm/ed25519.js:
@noble/curves/esm/abstract/edwards.js:
@noble/curves/esm/abstract/montgomery.js:
@noble/curves/esm/ed25519.js:
@noble/curves/esm/nist.js:
@noble/curves/esm/p256.js:
  (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)

safe-buffer/index.js:
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)

@solana/buffer-layout/lib/Layout.js:
  (**
   * Support for translating between Uint8Array instances and JavaScript
   * native types.
   *
   * {@link module:Layout~Layout|Layout} is the basis of a class
   * hierarchy that associates property names with sequences of encoded
   * bytes.
   *
   * Layouts are supported for these scalar (numeric) types:
   * * {@link module:Layout~UInt|Unsigned integers in little-endian
   *   format} with {@link module:Layout.u8|8-bit}, {@link
   *   module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},
   *   {@link module:Layout.u32|32-bit}, {@link
   *   module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}
   *   representation ranges;
   * * {@link module:Layout~UIntBE|Unsigned integers in big-endian
   *   format} with {@link module:Layout.u16be|16-bit}, {@link
   *   module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},
   *   {@link module:Layout.u40be|40-bit}, and {@link
   *   module:Layout.u48be|48-bit} representation ranges;
   * * {@link module:Layout~Int|Signed integers in little-endian
   *   format} with {@link module:Layout.s8|8-bit}, {@link
   *   module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},
   *   {@link module:Layout.s32|32-bit}, {@link
   *   module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}
   *   representation ranges;
   * * {@link module:Layout~IntBE|Signed integers in big-endian format}
   *   with {@link module:Layout.s16be|16-bit}, {@link
   *   module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},
   *   {@link module:Layout.s40be|40-bit}, and {@link
   *   module:Layout.s48be|48-bit} representation ranges;
   * * 64-bit integral values that decode to an exact (if magnitude is
   *   less than 2^53) or nearby integral Number in {@link
   *   module:Layout.nu64|unsigned little-endian}, {@link
   *   module:Layout.nu64be|unsigned big-endian}, {@link
   *   module:Layout.ns64|signed little-endian}, and {@link
   *   module:Layout.ns64be|unsigned big-endian} encodings;
   * * 32-bit floating point values with {@link
   *   module:Layout.f32|little-endian} and {@link
   *   module:Layout.f32be|big-endian} representations;
   * * 64-bit floating point values with {@link
   *   module:Layout.f64|little-endian} and {@link
   *   module:Layout.f64be|big-endian} representations;
   * * {@link module:Layout.const|Constants} that take no space in the
   *   encoded expression.
   *
   * and for these aggregate types:
   * * {@link module:Layout.seq|Sequence}s of instances of a {@link
   *   module:Layout~Layout|Layout}, with JavaScript representation as
   *   an Array and constant or data-dependent {@link
   *   module:Layout~Sequence#count|length};
   * * {@link module:Layout.struct|Structure}s that aggregate a
   *   heterogeneous sequence of {@link module:Layout~Layout|Layout}
   *   instances, with JavaScript representation as an Object;
   * * {@link module:Layout.union|Union}s that support multiple {@link
   *   module:Layout~VariantLayout|variant layouts} over a fixed
   *   (padded) or variable (not padded) span of bytes, using an
   *   unsigned integer at the start of the data or a separate {@link
   *   module:Layout.unionLayoutDiscriminator|layout element} to
   *   determine which layout to use when interpreting the buffer
   *   contents;
   * * {@link module:Layout.bits|BitStructure}s that contain a sequence
   *   of individual {@link
   *   module:Layout~BitStructure#addField|BitField}s packed into an 8,
   *   16, 24, or 32-bit unsigned integer starting at the least- or
   *   most-significant bit;
   * * {@link module:Layout.cstr|C strings} of varying length;
   * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link
   *   module:Layout~Blob#length|length} raw data.
   *
   * All {@link module:Layout~Layout|Layout} instances are immutable
   * after construction, to prevent internal state from becoming
   * inconsistent.
   *
   * @local Layout
   * @local ExternalLayout
   * @local GreedyCount
   * @local OffsetLayout
   * @local UInt
   * @local UIntBE
   * @local Int
   * @local IntBE
   * @local NearUInt64
   * @local NearUInt64BE
   * @local NearInt64
   * @local NearInt64BE
   * @local Float
   * @local FloatBE
   * @local Double
   * @local DoubleBE
   * @local Sequence
   * @local Structure
   * @local UnionDiscriminator
   * @local UnionLayoutDiscriminator
   * @local Union
   * @local VariantLayout
   * @local BitStructure
   * @local BitField
   * @local Boolean
   * @local Blob
   * @local CString
   * @local Constant
   * @local bindConstructorLayout
   * @module Layout
   * @license MIT
   * @author Peter A. Bigot
   * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}
   *)

axios/dist/browser/axios.cjs:
  (*! Axios v1.16.1 Copyright (c) 2026 Matt Zabriskie and contributors *)

tslib/tslib.es6.js:
  (*! *****************************************************************************
  Copyright (c) Microsoft Corporation.
  
  Permission to use, copy, modify, and/or distribute this software for any
  purpose with or without fee is hereby granted.
  
  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  PERFORMANCE OF THIS SOFTWARE.
  ***************************************************************************** *)

js-sha3/src/sha3.js:
  (**
   * [js-sha3]{@link https://github.com/emn178/js-sha3}
   *
   * @version 0.8.0
   * @author Chen, Yi-Cyuan [emn178@gmail.com]
   * @copyright Chen, Yi-Cyuan 2015-2018
   * @license MIT
   *)

@scure/base/lib/esm/index.js:
  (*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)

@scure/bip32/lib/esm/index.js:
  (*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)

@scure/bip39/esm/index.js:
  (*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)

@noble/ed25519/index.js:
  (*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) *)

@walletconnect/relay-auth/dist/index.es.js:
  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
  (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)

@noble/ciphers/esm/utils.js:
  (*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) *)
*/
