@boostxyz/cli 5.1.0 → 6.0.0-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import ta from "node:fs/promises";
2
2
  import na from "node:path";
3
- import { Deployable as ra, SignatureType as st, FilterType as Nr, PrimitiveType as Fr, StrategyType as Pn, BOOST_REGISTRY_ADDRESSES as sa, BoostRegistry as aa, BOOST_CORE_ADDRESSES as ia, BoostCore as oa, Roles as En, allowListFromAddress as ca } from "@boostxyz/sdk";
4
- import { a4 as ua, a5 as da, a6 as la, u as fa, a7 as ha, a8 as pa, a9 as tn, aa as ma, ab as ya, ac as ba, a3 as ga } from "./utils-ClgLOuAN.js";
3
+ import { Deployable as ra, SignatureType as st, FilterType as Nr, PrimitiveType as Fr, StrategyType as Pn, ValueType as sa, BOOST_REGISTRY_ADDRESSES as aa, BoostRegistry as ia, BOOST_CORE_ADDRESSES as oa, BoostCore as ca, Roles as En, allowListFromAddress as ua } from "@boostxyz/sdk";
4
+ import { a4 as da, a5 as la, a6 as fa, u as ha, a7 as pa, a8 as ma, a9 as tn, aa as ya, ab as ba, ac as ga, a3 as va } from "./utils-ClgLOuAN.js";
5
5
  function An(t, e) {
6
6
  if (t === e)
7
7
  return !0;
@@ -36,16 +36,16 @@ function An(t, e) {
36
36
  }
37
37
  return t !== t && e !== e;
38
38
  }
39
- class va extends ua {
39
+ class wa extends da {
40
40
  constructor({ value: e }) {
41
41
  super(`Number \`${e}\` is not a valid decimal number.`, {
42
42
  name: "InvalidDecimalNumberError"
43
43
  });
44
44
  }
45
45
  }
46
- function wa(t, e) {
46
+ function xa(t, e) {
47
47
  if (!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))
48
- throw new va({ value: t });
48
+ throw new wa({ value: t });
49
49
  let [n, r = "0"] = t.split(".");
50
50
  const s = n.startsWith("-");
51
51
  if (s && (n = n.slice(1)), r = r.replace(/(0+)$/, ""), e === 0)
@@ -62,10 +62,10 @@ function wa(t, e) {
62
62
  return BigInt(`${s ? "-" : ""}${n}${r}`);
63
63
  }
64
64
  function zr(t, e = "wei") {
65
- return wa(t, da[e]);
65
+ return xa(t, la[e]);
66
66
  }
67
67
  const gr = "0x0000000000000000000000000000000000000000";
68
- var $;
68
+ var k;
69
69
  (function(t) {
70
70
  t.assertEqual = (s) => s;
71
71
  function e(s) {
@@ -100,7 +100,7 @@ var $;
100
100
  return s.map((i) => typeof i == "string" ? `'${i}'` : i).join(a);
101
101
  }
102
102
  t.joinValues = r, t.jsonStringifyReplacer = (s, a) => typeof a == "bigint" ? a.toString() : a;
103
- })($ || ($ = {}));
103
+ })(k || (k = {}));
104
104
  var Cn;
105
105
  (function(t) {
106
106
  t.mergeShapes = (e, n) => ({
@@ -109,7 +109,7 @@ var Cn;
109
109
  // second overwrites first
110
110
  });
111
111
  })(Cn || (Cn = {}));
112
- const g = $.arrayToEnum([
112
+ const g = k.arrayToEnum([
113
113
  "string",
114
114
  "nan",
115
115
  "number",
@@ -151,7 +151,7 @@ const g = $.arrayToEnum([
151
151
  default:
152
152
  return g.unknown;
153
153
  }
154
- }, h = $.arrayToEnum([
154
+ }, h = k.arrayToEnum([
155
155
  "invalid_type",
156
156
  "invalid_literal",
157
157
  "custom",
@@ -168,8 +168,8 @@ const g = $.arrayToEnum([
168
168
  "invalid_intersection_types",
169
169
  "not_multiple_of",
170
170
  "not_finite"
171
- ]), xa = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
172
- class W extends Error {
171
+ ]), _a = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
172
+ class q extends Error {
173
173
  get errors() {
174
174
  return this.issues;
175
175
  }
@@ -206,14 +206,14 @@ class W extends Error {
206
206
  return s(this), r;
207
207
  }
208
208
  static assert(e) {
209
- if (!(e instanceof W))
209
+ if (!(e instanceof q))
210
210
  throw new Error(`Not a ZodError: ${e}`);
211
211
  }
212
212
  toString() {
213
213
  return this.message;
214
214
  }
215
215
  get message() {
216
- return JSON.stringify(this.issues, $.jsonStringifyReplacer, 2);
216
+ return JSON.stringify(this.issues, k.jsonStringifyReplacer, 2);
217
217
  }
218
218
  get isEmpty() {
219
219
  return this.issues.length === 0;
@@ -228,7 +228,7 @@ class W extends Error {
228
228
  return this.flatten();
229
229
  }
230
230
  }
231
- W.create = (t) => new W(t);
231
+ q.create = (t) => new q(t);
232
232
  const Ve = (t, e) => {
233
233
  let n;
234
234
  switch (t.code) {
@@ -236,19 +236,19 @@ const Ve = (t, e) => {
236
236
  t.received === g.undefined ? n = "Required" : n = `Expected ${t.expected}, received ${t.received}`;
237
237
  break;
238
238
  case h.invalid_literal:
239
- n = `Invalid literal value, expected ${JSON.stringify(t.expected, $.jsonStringifyReplacer)}`;
239
+ n = `Invalid literal value, expected ${JSON.stringify(t.expected, k.jsonStringifyReplacer)}`;
240
240
  break;
241
241
  case h.unrecognized_keys:
242
- n = `Unrecognized key(s) in object: ${$.joinValues(t.keys, ", ")}`;
242
+ n = `Unrecognized key(s) in object: ${k.joinValues(t.keys, ", ")}`;
243
243
  break;
244
244
  case h.invalid_union:
245
245
  n = "Invalid input";
246
246
  break;
247
247
  case h.invalid_union_discriminator:
248
- n = `Invalid discriminator value. Expected ${$.joinValues(t.options)}`;
248
+ n = `Invalid discriminator value. Expected ${k.joinValues(t.options)}`;
249
249
  break;
250
250
  case h.invalid_enum_value:
251
- n = `Invalid enum value. Expected ${$.joinValues(t.options)}, received '${t.received}'`;
251
+ n = `Invalid enum value. Expected ${k.joinValues(t.options)}, received '${t.received}'`;
252
252
  break;
253
253
  case h.invalid_arguments:
254
254
  n = "Invalid function arguments";
@@ -260,7 +260,7 @@ const Ve = (t, e) => {
260
260
  n = "Invalid date";
261
261
  break;
262
262
  case h.invalid_string:
263
- typeof t.validation == "object" ? "includes" in t.validation ? (n = `Invalid input: must include "${t.validation.includes}"`, typeof t.validation.position == "number" && (n = `${n} at one or more positions greater than or equal to ${t.validation.position}`)) : "startsWith" in t.validation ? n = `Invalid input: must start with "${t.validation.startsWith}"` : "endsWith" in t.validation ? n = `Invalid input: must end with "${t.validation.endsWith}"` : $.assertNever(t.validation) : t.validation !== "regex" ? n = `Invalid ${t.validation}` : n = "Invalid";
263
+ typeof t.validation == "object" ? "includes" in t.validation ? (n = `Invalid input: must include "${t.validation.includes}"`, typeof t.validation.position == "number" && (n = `${n} at one or more positions greater than or equal to ${t.validation.position}`)) : "startsWith" in t.validation ? n = `Invalid input: must start with "${t.validation.startsWith}"` : "endsWith" in t.validation ? n = `Invalid input: must end with "${t.validation.endsWith}"` : k.assertNever(t.validation) : t.validation !== "regex" ? n = `Invalid ${t.validation}` : n = "Invalid";
264
264
  break;
265
265
  case h.too_small:
266
266
  t.type === "array" ? n = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "more than"} ${t.minimum} element(s)` : t.type === "string" ? n = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "over"} ${t.minimum} character(s)` : t.type === "number" ? n = `Number must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater than "}${t.minimum}` : t.type === "date" ? n = `Date must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(t.minimum))}` : n = "Invalid input";
@@ -281,16 +281,16 @@ const Ve = (t, e) => {
281
281
  n = "Number must be finite";
282
282
  break;
283
283
  default:
284
- n = e.defaultError, $.assertNever(t);
284
+ n = e.defaultError, k.assertNever(t);
285
285
  }
286
286
  return { message: n };
287
287
  };
288
- let Lr = Ve;
289
- function _a(t) {
290
- Lr = t;
288
+ let Zr = Ve;
289
+ function Pa(t) {
290
+ Zr = t;
291
291
  }
292
292
  function Dt() {
293
- return Lr;
293
+ return Zr;
294
294
  }
295
295
  const Vt = (t) => {
296
296
  const { data: e, path: n, errorMaps: r, issueData: s } = t, a = [...n, ...s.path || []], i = {
@@ -312,7 +312,7 @@ const Vt = (t) => {
312
312
  path: a,
313
313
  message: o
314
314
  };
315
- }, Pa = [];
315
+ }, Ea = [];
316
316
  function b(t, e) {
317
317
  const n = Dt(), r = Vt({
318
318
  issueData: e,
@@ -374,12 +374,12 @@ class z {
374
374
  }
375
375
  const _ = Object.freeze({
376
376
  status: "aborted"
377
- }), Fe = (t) => ({ status: "dirty", value: t }), Z = (t) => ({ status: "valid", value: t }), kn = (t) => t.status === "aborted", Tn = (t) => t.status === "dirty", Ie = (t) => t.status === "valid", at = (t) => typeof Promise < "u" && t instanceof Promise;
377
+ }), Fe = (t) => ({ status: "dirty", value: t }), L = (t) => ({ status: "valid", value: t }), Tn = (t) => t.status === "aborted", $n = (t) => t.status === "dirty", Ie = (t) => t.status === "valid", at = (t) => typeof Promise < "u" && t instanceof Promise;
378
378
  function Ut(t, e, n, r) {
379
379
  if (typeof e == "function" ? t !== e || !r : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
380
380
  return e.get(t);
381
381
  }
382
- function Zr(t, e, n, r, s) {
382
+ function Lr(t, e, n, r, s) {
383
383
  if (typeof e == "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
384
384
  return e.set(t, n), n;
385
385
  }
@@ -406,7 +406,7 @@ const vr = (t, e) => {
406
406
  get error() {
407
407
  if (this._error)
408
408
  return this._error;
409
- const n = new W(t.common.issues);
409
+ const n = new q(t.common.issues);
410
410
  return this._error = n, this._error;
411
411
  }
412
412
  };
@@ -423,7 +423,7 @@ function E(t) {
423
423
  return i.code === "invalid_enum_value" ? { message: d ?? o.defaultError } : typeof o.data > "u" ? { message: (u = d ?? r) !== null && u !== void 0 ? u : o.defaultError } : i.code !== "invalid_type" ? { message: o.defaultError } : { message: (c = d ?? n) !== null && c !== void 0 ? c : o.defaultError };
424
424
  }, description: s };
425
425
  }
426
- class k {
426
+ class T {
427
427
  get description() {
428
428
  return this._def.description;
429
429
  }
@@ -608,7 +608,7 @@ class k {
608
608
  });
609
609
  }
610
610
  brand() {
611
- return new Wn({
611
+ return new qn({
612
612
  typeName: x.ZodBranded,
613
613
  type: this,
614
614
  ...E(this._def)
@@ -643,9 +643,9 @@ class k {
643
643
  return this.safeParse(null).success;
644
644
  }
645
645
  }
646
- const Ea = /^c[^\s-]{8,}$/i, Aa = /^[0-9a-z]+$/, Ca = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ka = /^[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, Ta = /^[a-z0-9_-]{21}$/i, $a = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ia = /^[-+]?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)?)??$/, Sa = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ra = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
646
+ const Aa = /^c[^\s-]{8,}$/i, Ca = /^[0-9a-z]+$/, Ta = /^[0-9A-HJKMNP-TV-Z]{26}$/i, $a = /^[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, ka = /^[a-z0-9_-]{21}$/i, Ia = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Sa = /^[-+]?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)?)??$/, Ra = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Oa = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
647
647
  let pn;
648
- const Oa = /^(?:(?: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])$/, Ma = /^(?:(?: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])$/, ja = /^(([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]))$/, Ba = /^(([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])$/, Na = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Fa = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Dr = "((\\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])))", za = new RegExp(`^${Dr}$`);
648
+ const Ma = /^(?:(?: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])$/, ja = /^(?:(?: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])$/, Ba = /^(([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]))$/, Na = /^(([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])$/, Fa = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, za = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Dr = "((\\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])))", Za = new RegExp(`^${Dr}$`);
649
649
  function Vr(t) {
650
650
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
651
651
  return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
@@ -658,11 +658,11 @@ function Ur(t) {
658
658
  const n = [];
659
659
  return n.push(t.local ? "Z?" : "Z"), t.offset && n.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${n.join("|")})`, new RegExp(`^${e}$`);
660
660
  }
661
- function Za(t, e) {
662
- return !!((e === "v4" || !e) && Oa.test(t) || (e === "v6" || !e) && ja.test(t));
663
- }
664
661
  function Da(t, e) {
665
- if (!$a.test(t))
662
+ return !!((e === "v4" || !e) && Ma.test(t) || (e === "v6" || !e) && Ba.test(t));
663
+ }
664
+ function Va(t, e) {
665
+ if (!Ia.test(t))
666
666
  return !1;
667
667
  try {
668
668
  const [n] = t.split("."), r = n.replace(/-/g, "+").replace(/_/g, "/").padEnd(n.length + (4 - n.length % 4) % 4, "="), s = JSON.parse(atob(r));
@@ -671,10 +671,10 @@ function Da(t, e) {
671
671
  return !1;
672
672
  }
673
673
  }
674
- function Va(t, e) {
675
- return !!((e === "v4" || !e) && Ma.test(t) || (e === "v6" || !e) && Ba.test(t));
674
+ function Ua(t, e) {
675
+ return !!((e === "v4" || !e) && ja.test(t) || (e === "v6" || !e) && Na.test(t));
676
676
  }
677
- class ee extends k {
677
+ class ee extends T {
678
678
  _parse(e) {
679
679
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== g.string) {
680
680
  const a = this._getOrReturnCtx(e);
@@ -723,43 +723,43 @@ class ee extends k {
723
723
  message: a.message
724
724
  }), r.dirty());
725
725
  } else if (a.kind === "email")
726
- Sa.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
726
+ Ra.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
727
727
  validation: "email",
728
728
  code: h.invalid_string,
729
729
  message: a.message
730
730
  }), r.dirty());
731
731
  else if (a.kind === "emoji")
732
- pn || (pn = new RegExp(Ra, "u")), pn.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
732
+ pn || (pn = new RegExp(Oa, "u")), pn.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
733
733
  validation: "emoji",
734
734
  code: h.invalid_string,
735
735
  message: a.message
736
736
  }), r.dirty());
737
737
  else if (a.kind === "uuid")
738
- ka.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
738
+ $a.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
739
739
  validation: "uuid",
740
740
  code: h.invalid_string,
741
741
  message: a.message
742
742
  }), r.dirty());
743
743
  else if (a.kind === "nanoid")
744
- Ta.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
744
+ ka.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
745
745
  validation: "nanoid",
746
746
  code: h.invalid_string,
747
747
  message: a.message
748
748
  }), r.dirty());
749
749
  else if (a.kind === "cuid")
750
- Ea.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
750
+ Aa.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
751
751
  validation: "cuid",
752
752
  code: h.invalid_string,
753
753
  message: a.message
754
754
  }), r.dirty());
755
755
  else if (a.kind === "cuid2")
756
- Aa.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
756
+ Ca.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
757
757
  validation: "cuid2",
758
758
  code: h.invalid_string,
759
759
  message: a.message
760
760
  }), r.dirty());
761
761
  else if (a.kind === "ulid")
762
- Ca.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
762
+ Ta.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
763
763
  validation: "ulid",
764
764
  code: h.invalid_string,
765
765
  message: a.message
@@ -794,7 +794,7 @@ class ee extends k {
794
794
  code: h.invalid_string,
795
795
  validation: "datetime",
796
796
  message: a.message
797
- }), r.dirty()) : a.kind === "date" ? za.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
797
+ }), r.dirty()) : a.kind === "date" ? Za.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
798
798
  code: h.invalid_string,
799
799
  validation: "date",
800
800
  message: a.message
@@ -802,31 +802,31 @@ class ee extends k {
802
802
  code: h.invalid_string,
803
803
  validation: "time",
804
804
  message: a.message
805
- }), r.dirty()) : a.kind === "duration" ? Ia.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
805
+ }), r.dirty()) : a.kind === "duration" ? Sa.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
806
806
  validation: "duration",
807
807
  code: h.invalid_string,
808
808
  message: a.message
809
- }), r.dirty()) : a.kind === "ip" ? Za(e.data, a.version) || (s = this._getOrReturnCtx(e, s), b(s, {
809
+ }), r.dirty()) : a.kind === "ip" ? Da(e.data, a.version) || (s = this._getOrReturnCtx(e, s), b(s, {
810
810
  validation: "ip",
811
811
  code: h.invalid_string,
812
812
  message: a.message
813
- }), r.dirty()) : a.kind === "jwt" ? Da(e.data, a.alg) || (s = this._getOrReturnCtx(e, s), b(s, {
813
+ }), r.dirty()) : a.kind === "jwt" ? Va(e.data, a.alg) || (s = this._getOrReturnCtx(e, s), b(s, {
814
814
  validation: "jwt",
815
815
  code: h.invalid_string,
816
816
  message: a.message
817
- }), r.dirty()) : a.kind === "cidr" ? Va(e.data, a.version) || (s = this._getOrReturnCtx(e, s), b(s, {
817
+ }), r.dirty()) : a.kind === "cidr" ? Ua(e.data, a.version) || (s = this._getOrReturnCtx(e, s), b(s, {
818
818
  validation: "cidr",
819
819
  code: h.invalid_string,
820
820
  message: a.message
821
- }), r.dirty()) : a.kind === "base64" ? Na.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
821
+ }), r.dirty()) : a.kind === "base64" ? Fa.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
822
822
  validation: "base64",
823
823
  code: h.invalid_string,
824
824
  message: a.message
825
- }), r.dirty()) : a.kind === "base64url" ? Fa.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
825
+ }), r.dirty()) : a.kind === "base64url" ? za.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
826
826
  validation: "base64url",
827
827
  code: h.invalid_string,
828
828
  message: a.message
829
- }), r.dirty()) : $.assertNever(a);
829
+ }), r.dirty()) : k.assertNever(a);
830
830
  return { status: r.value, value: e.data };
831
831
  }
832
832
  _regex(e, n, r) {
@@ -1061,11 +1061,11 @@ ee.create = (t) => {
1061
1061
  ...E(t)
1062
1062
  });
1063
1063
  };
1064
- function Ua(t, e) {
1064
+ function Ga(t, e) {
1065
1065
  const n = (t.toString().split(".")[1] || "").length, r = (e.toString().split(".")[1] || "").length, s = n > r ? n : r, a = parseInt(t.toFixed(s).replace(".", "")), i = parseInt(e.toFixed(s).replace(".", ""));
1066
1066
  return a % i / Math.pow(10, s);
1067
1067
  }
1068
- class ve extends k {
1068
+ class ve extends T {
1069
1069
  constructor() {
1070
1070
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1071
1071
  }
@@ -1081,7 +1081,7 @@ class ve extends k {
1081
1081
  let r;
1082
1082
  const s = new z();
1083
1083
  for (const a of this._def.checks)
1084
- a.kind === "int" ? $.isInteger(e.data) || (r = this._getOrReturnCtx(e, r), b(r, {
1084
+ a.kind === "int" ? k.isInteger(e.data) || (r = this._getOrReturnCtx(e, r), b(r, {
1085
1085
  code: h.invalid_type,
1086
1086
  expected: "integer",
1087
1087
  received: "float",
@@ -1100,14 +1100,14 @@ class ve extends k {
1100
1100
  inclusive: a.inclusive,
1101
1101
  exact: !1,
1102
1102
  message: a.message
1103
- }), s.dirty()) : a.kind === "multipleOf" ? Ua(e.data, a.value) !== 0 && (r = this._getOrReturnCtx(e, r), b(r, {
1103
+ }), s.dirty()) : a.kind === "multipleOf" ? Ga(e.data, a.value) !== 0 && (r = this._getOrReturnCtx(e, r), b(r, {
1104
1104
  code: h.not_multiple_of,
1105
1105
  multipleOf: a.value,
1106
1106
  message: a.message
1107
1107
  }), s.dirty()) : a.kind === "finite" ? Number.isFinite(e.data) || (r = this._getOrReturnCtx(e, r), b(r, {
1108
1108
  code: h.not_finite,
1109
1109
  message: a.message
1110
- }), s.dirty()) : $.assertNever(a);
1110
+ }), s.dirty()) : k.assertNever(a);
1111
1111
  return { status: s.value, value: e.data };
1112
1112
  }
1113
1113
  gte(e, n) {
@@ -1219,7 +1219,7 @@ class ve extends k {
1219
1219
  return e;
1220
1220
  }
1221
1221
  get isInt() {
1222
- return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && $.isInteger(e.value));
1222
+ return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && k.isInteger(e.value));
1223
1223
  }
1224
1224
  get isFinite() {
1225
1225
  let e = null, n = null;
@@ -1237,7 +1237,7 @@ ve.create = (t) => new ve({
1237
1237
  coerce: (t == null ? void 0 : t.coerce) || !1,
1238
1238
  ...E(t)
1239
1239
  });
1240
- class we extends k {
1240
+ class we extends T {
1241
1241
  constructor() {
1242
1242
  super(...arguments), this.min = this.gte, this.max = this.lte;
1243
1243
  }
@@ -1269,7 +1269,7 @@ class we extends k {
1269
1269
  code: h.not_multiple_of,
1270
1270
  multipleOf: a.value,
1271
1271
  message: a.message
1272
- }), s.dirty()) : $.assertNever(a);
1272
+ }), s.dirty()) : k.assertNever(a);
1273
1273
  return { status: s.value, value: e.data };
1274
1274
  }
1275
1275
  _getInvalidInput(e) {
@@ -1373,7 +1373,7 @@ we.create = (t) => {
1373
1373
  ...E(t)
1374
1374
  });
1375
1375
  };
1376
- class it extends k {
1376
+ class it extends T {
1377
1377
  _parse(e) {
1378
1378
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== g.boolean) {
1379
1379
  const r = this._getOrReturnCtx(e);
@@ -1383,7 +1383,7 @@ class it extends k {
1383
1383
  received: r.parsedType
1384
1384
  }), _;
1385
1385
  }
1386
- return Z(e.data);
1386
+ return L(e.data);
1387
1387
  }
1388
1388
  }
1389
1389
  it.create = (t) => new it({
@@ -1391,7 +1391,7 @@ it.create = (t) => new it({
1391
1391
  coerce: (t == null ? void 0 : t.coerce) || !1,
1392
1392
  ...E(t)
1393
1393
  });
1394
- class Se extends k {
1394
+ class Se extends T {
1395
1395
  _parse(e) {
1396
1396
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== g.date) {
1397
1397
  const a = this._getOrReturnCtx(e);
@@ -1424,7 +1424,7 @@ class Se extends k {
1424
1424
  exact: !1,
1425
1425
  maximum: a.value,
1426
1426
  type: "date"
1427
- }), r.dirty()) : $.assertNever(a);
1427
+ }), r.dirty()) : k.assertNever(a);
1428
1428
  return {
1429
1429
  status: r.value,
1430
1430
  value: new Date(e.data.getTime())
@@ -1469,7 +1469,7 @@ Se.create = (t) => new Se({
1469
1469
  typeName: x.ZodDate,
1470
1470
  ...E(t)
1471
1471
  });
1472
- class Gt extends k {
1472
+ class Gt extends T {
1473
1473
  _parse(e) {
1474
1474
  if (this._getType(e) !== g.symbol) {
1475
1475
  const r = this._getOrReturnCtx(e);
@@ -1479,14 +1479,14 @@ class Gt extends k {
1479
1479
  received: r.parsedType
1480
1480
  }), _;
1481
1481
  }
1482
- return Z(e.data);
1482
+ return L(e.data);
1483
1483
  }
1484
1484
  }
1485
1485
  Gt.create = (t) => new Gt({
1486
1486
  typeName: x.ZodSymbol,
1487
1487
  ...E(t)
1488
1488
  });
1489
- class ot extends k {
1489
+ class ot extends T {
1490
1490
  _parse(e) {
1491
1491
  if (this._getType(e) !== g.undefined) {
1492
1492
  const r = this._getOrReturnCtx(e);
@@ -1496,14 +1496,14 @@ class ot extends k {
1496
1496
  received: r.parsedType
1497
1497
  }), _;
1498
1498
  }
1499
- return Z(e.data);
1499
+ return L(e.data);
1500
1500
  }
1501
1501
  }
1502
1502
  ot.create = (t) => new ot({
1503
1503
  typeName: x.ZodUndefined,
1504
1504
  ...E(t)
1505
1505
  });
1506
- class ct extends k {
1506
+ class ct extends T {
1507
1507
  _parse(e) {
1508
1508
  if (this._getType(e) !== g.null) {
1509
1509
  const r = this._getOrReturnCtx(e);
@@ -1513,38 +1513,38 @@ class ct extends k {
1513
1513
  received: r.parsedType
1514
1514
  }), _;
1515
1515
  }
1516
- return Z(e.data);
1516
+ return L(e.data);
1517
1517
  }
1518
1518
  }
1519
1519
  ct.create = (t) => new ct({
1520
1520
  typeName: x.ZodNull,
1521
1521
  ...E(t)
1522
1522
  });
1523
- class Ue extends k {
1523
+ class Ue extends T {
1524
1524
  constructor() {
1525
1525
  super(...arguments), this._any = !0;
1526
1526
  }
1527
1527
  _parse(e) {
1528
- return Z(e.data);
1528
+ return L(e.data);
1529
1529
  }
1530
1530
  }
1531
1531
  Ue.create = (t) => new Ue({
1532
1532
  typeName: x.ZodAny,
1533
1533
  ...E(t)
1534
1534
  });
1535
- class $e extends k {
1535
+ class ke extends T {
1536
1536
  constructor() {
1537
1537
  super(...arguments), this._unknown = !0;
1538
1538
  }
1539
1539
  _parse(e) {
1540
- return Z(e.data);
1540
+ return L(e.data);
1541
1541
  }
1542
1542
  }
1543
- $e.create = (t) => new $e({
1543
+ ke.create = (t) => new ke({
1544
1544
  typeName: x.ZodUnknown,
1545
1545
  ...E(t)
1546
1546
  });
1547
- class me extends k {
1547
+ class me extends T {
1548
1548
  _parse(e) {
1549
1549
  const n = this._getOrReturnCtx(e);
1550
1550
  return b(n, {
@@ -1558,7 +1558,7 @@ me.create = (t) => new me({
1558
1558
  typeName: x.ZodNever,
1559
1559
  ...E(t)
1560
1560
  });
1561
- class Ht extends k {
1561
+ class Ht extends T {
1562
1562
  _parse(e) {
1563
1563
  if (this._getType(e) !== g.undefined) {
1564
1564
  const r = this._getOrReturnCtx(e);
@@ -1568,14 +1568,14 @@ class Ht extends k {
1568
1568
  received: r.parsedType
1569
1569
  }), _;
1570
1570
  }
1571
- return Z(e.data);
1571
+ return L(e.data);
1572
1572
  }
1573
1573
  }
1574
1574
  Ht.create = (t) => new Ht({
1575
1575
  typeName: x.ZodVoid,
1576
1576
  ...E(t)
1577
1577
  });
1578
- class te extends k {
1578
+ class te extends T {
1579
1579
  _parse(e) {
1580
1580
  const { ctx: n, status: r } = this._processInputParams(e), s = this._def;
1581
1581
  if (n.parsedType !== g.array)
@@ -1664,14 +1664,14 @@ function Ne(t) {
1664
1664
  type: Ne(t.element)
1665
1665
  }) : t instanceof ae ? ae.create(Ne(t.unwrap())) : t instanceof _e ? _e.create(Ne(t.unwrap())) : t instanceof oe ? oe.create(t.items.map((e) => Ne(e))) : t;
1666
1666
  }
1667
- class j extends k {
1667
+ class j extends T {
1668
1668
  constructor() {
1669
1669
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
1670
1670
  }
1671
1671
  _getCached() {
1672
1672
  if (this._cached !== null)
1673
1673
  return this._cached;
1674
- const e = this._def.shape(), n = $.objectKeys(e);
1674
+ const e = this._def.shape(), n = k.objectKeys(e);
1675
1675
  return this._cached = { shape: e, keys: n };
1676
1676
  }
1677
1677
  _parse(e) {
@@ -1878,7 +1878,7 @@ class j extends k {
1878
1878
  }
1879
1879
  pick(e) {
1880
1880
  const n = {};
1881
- return $.objectKeys(e).forEach((r) => {
1881
+ return k.objectKeys(e).forEach((r) => {
1882
1882
  e[r] && this.shape[r] && (n[r] = this.shape[r]);
1883
1883
  }), new j({
1884
1884
  ...this._def,
@@ -1887,7 +1887,7 @@ class j extends k {
1887
1887
  }
1888
1888
  omit(e) {
1889
1889
  const n = {};
1890
- return $.objectKeys(this.shape).forEach((r) => {
1890
+ return k.objectKeys(this.shape).forEach((r) => {
1891
1891
  e[r] || (n[r] = this.shape[r]);
1892
1892
  }), new j({
1893
1893
  ...this._def,
@@ -1902,7 +1902,7 @@ class j extends k {
1902
1902
  }
1903
1903
  partial(e) {
1904
1904
  const n = {};
1905
- return $.objectKeys(this.shape).forEach((r) => {
1905
+ return k.objectKeys(this.shape).forEach((r) => {
1906
1906
  const s = this.shape[r];
1907
1907
  e && !e[r] ? n[r] = s : n[r] = s.optional();
1908
1908
  }), new j({
@@ -1912,7 +1912,7 @@ class j extends k {
1912
1912
  }
1913
1913
  required(e) {
1914
1914
  const n = {};
1915
- return $.objectKeys(this.shape).forEach((r) => {
1915
+ return k.objectKeys(this.shape).forEach((r) => {
1916
1916
  if (e && !e[r])
1917
1917
  n[r] = this.shape[r];
1918
1918
  else {
@@ -1927,7 +1927,7 @@ class j extends k {
1927
1927
  });
1928
1928
  }
1929
1929
  keyof() {
1930
- return Gr($.objectKeys(this.shape));
1930
+ return Gr(k.objectKeys(this.shape));
1931
1931
  }
1932
1932
  }
1933
1933
  j.create = (t, e) => new j({
@@ -1951,7 +1951,7 @@ j.lazycreate = (t, e) => new j({
1951
1951
  typeName: x.ZodObject,
1952
1952
  ...E(e)
1953
1953
  });
1954
- class ut extends k {
1954
+ class ut extends T {
1955
1955
  _parse(e) {
1956
1956
  const { ctx: n } = this._processInputParams(e), r = this._def.options;
1957
1957
  function s(a) {
@@ -1961,7 +1961,7 @@ class ut extends k {
1961
1961
  for (const o of a)
1962
1962
  if (o.result.status === "dirty")
1963
1963
  return n.common.issues.push(...o.ctx.common.issues), o.result;
1964
- const i = a.map((o) => new W(o.ctx.common.issues));
1964
+ const i = a.map((o) => new q(o.ctx.common.issues));
1965
1965
  return b(n, {
1966
1966
  code: h.invalid_union,
1967
1967
  unionErrors: i
@@ -2008,7 +2008,7 @@ class ut extends k {
2008
2008
  }
2009
2009
  if (a)
2010
2010
  return n.common.issues.push(...a.ctx.common.issues), a.result;
2011
- const o = i.map((u) => new W(u));
2011
+ const o = i.map((u) => new q(u));
2012
2012
  return b(n, {
2013
2013
  code: h.invalid_union,
2014
2014
  unionErrors: o
@@ -2024,8 +2024,8 @@ ut.create = (t, e) => new ut({
2024
2024
  typeName: x.ZodUnion,
2025
2025
  ...E(e)
2026
2026
  });
2027
- const fe = (t) => t instanceof ft ? fe(t.schema) : t instanceof ne ? fe(t.innerType()) : t instanceof ht ? [t.value] : t instanceof xe ? t.options : t instanceof pt ? $.objectValues(t.enum) : t instanceof mt ? fe(t._def.innerType) : t instanceof ot ? [void 0] : t instanceof ct ? [null] : t instanceof ae ? [void 0, ...fe(t.unwrap())] : t instanceof _e ? [null, ...fe(t.unwrap())] : t instanceof Wn || t instanceof bt ? fe(t.unwrap()) : t instanceof yt ? fe(t._def.innerType) : [];
2028
- class nn extends k {
2027
+ const fe = (t) => t instanceof ft ? fe(t.schema) : t instanceof ne ? fe(t.innerType()) : t instanceof ht ? [t.value] : t instanceof xe ? t.options : t instanceof pt ? k.objectValues(t.enum) : t instanceof mt ? fe(t._def.innerType) : t instanceof ot ? [void 0] : t instanceof ct ? [null] : t instanceof ae ? [void 0, ...fe(t.unwrap())] : t instanceof _e ? [null, ...fe(t.unwrap())] : t instanceof qn || t instanceof bt ? fe(t.unwrap()) : t instanceof yt ? fe(t._def.innerType) : [];
2028
+ class nn extends T {
2029
2029
  _parse(e) {
2030
2030
  const { ctx: n } = this._processInputParams(e);
2031
2031
  if (n.parsedType !== g.object)
@@ -2087,14 +2087,14 @@ class nn extends k {
2087
2087
  });
2088
2088
  }
2089
2089
  }
2090
- function $n(t, e) {
2090
+ function kn(t, e) {
2091
2091
  const n = he(t), r = he(e);
2092
2092
  if (t === e)
2093
2093
  return { valid: !0, data: t };
2094
2094
  if (n === g.object && r === g.object) {
2095
- const s = $.objectKeys(e), a = $.objectKeys(t).filter((o) => s.indexOf(o) !== -1), i = { ...t, ...e };
2095
+ const s = k.objectKeys(e), a = k.objectKeys(t).filter((o) => s.indexOf(o) !== -1), i = { ...t, ...e };
2096
2096
  for (const o of a) {
2097
- const u = $n(t[o], e[o]);
2097
+ const u = kn(t[o], e[o]);
2098
2098
  if (!u.valid)
2099
2099
  return { valid: !1 };
2100
2100
  i[o] = u.data;
@@ -2105,7 +2105,7 @@ function $n(t, e) {
2105
2105
  return { valid: !1 };
2106
2106
  const s = [];
2107
2107
  for (let a = 0; a < t.length; a++) {
2108
- const i = t[a], o = e[a], u = $n(i, o);
2108
+ const i = t[a], o = e[a], u = kn(i, o);
2109
2109
  if (!u.valid)
2110
2110
  return { valid: !1 };
2111
2111
  s.push(u.data);
@@ -2113,13 +2113,13 @@ function $n(t, e) {
2113
2113
  return { valid: !0, data: s };
2114
2114
  } else return n === g.date && r === g.date && +t == +e ? { valid: !0, data: t } : { valid: !1 };
2115
2115
  }
2116
- class dt extends k {
2116
+ class dt extends T {
2117
2117
  _parse(e) {
2118
2118
  const { status: n, ctx: r } = this._processInputParams(e), s = (a, i) => {
2119
- if (kn(a) || kn(i))
2119
+ if (Tn(a) || Tn(i))
2120
2120
  return _;
2121
- const o = $n(a.value, i.value);
2122
- return o.valid ? ((Tn(a) || Tn(i)) && n.dirty(), { status: n.value, value: o.data }) : (b(r, {
2121
+ const o = kn(a.value, i.value);
2122
+ return o.valid ? (($n(a) || $n(i)) && n.dirty(), { status: n.value, value: o.data }) : (b(r, {
2123
2123
  code: h.invalid_intersection_types
2124
2124
  }), _);
2125
2125
  };
@@ -2151,7 +2151,7 @@ dt.create = (t, e, n) => new dt({
2151
2151
  typeName: x.ZodIntersection,
2152
2152
  ...E(n)
2153
2153
  });
2154
- class oe extends k {
2154
+ class oe extends T {
2155
2155
  _parse(e) {
2156
2156
  const { status: n, ctx: r } = this._processInputParams(e);
2157
2157
  if (r.parsedType !== g.array)
@@ -2201,7 +2201,7 @@ oe.create = (t, e) => {
2201
2201
  ...E(e)
2202
2202
  });
2203
2203
  };
2204
- class lt extends k {
2204
+ class lt extends T {
2205
2205
  get keySchema() {
2206
2206
  return this._def.keyType;
2207
2207
  }
@@ -2229,7 +2229,7 @@ class lt extends k {
2229
2229
  return this._def.valueType;
2230
2230
  }
2231
2231
  static create(e, n, r) {
2232
- return n instanceof k ? new lt({
2232
+ return n instanceof T ? new lt({
2233
2233
  keyType: e,
2234
2234
  valueType: n,
2235
2235
  typeName: x.ZodRecord,
@@ -2242,7 +2242,7 @@ class lt extends k {
2242
2242
  });
2243
2243
  }
2244
2244
  }
2245
- class Wt extends k {
2245
+ class qt extends T {
2246
2246
  get keySchema() {
2247
2247
  return this._def.keyType;
2248
2248
  }
@@ -2284,13 +2284,13 @@ class Wt extends k {
2284
2284
  }
2285
2285
  }
2286
2286
  }
2287
- Wt.create = (t, e, n) => new Wt({
2287
+ qt.create = (t, e, n) => new qt({
2288
2288
  valueType: e,
2289
2289
  keyType: t,
2290
2290
  typeName: x.ZodMap,
2291
2291
  ...E(n)
2292
2292
  });
2293
- class Re extends k {
2293
+ class Re extends T {
2294
2294
  _parse(e) {
2295
2295
  const { status: n, ctx: r } = this._processInputParams(e);
2296
2296
  if (r.parsedType !== g.set)
@@ -2354,7 +2354,7 @@ Re.create = (t, e) => new Re({
2354
2354
  typeName: x.ZodSet,
2355
2355
  ...E(e)
2356
2356
  });
2357
- class Le extends k {
2357
+ class Ze extends T {
2358
2358
  constructor() {
2359
2359
  super(...arguments), this.validate = this.implement;
2360
2360
  }
@@ -2401,8 +2401,8 @@ class Le extends k {
2401
2401
  const a = { errorMap: n.common.contextualErrorMap }, i = n.data;
2402
2402
  if (this._def.returns instanceof Ge) {
2403
2403
  const o = this;
2404
- return Z(async function(...u) {
2405
- const c = new W([]), d = await o._def.args.parseAsync(u, a).catch((m) => {
2404
+ return L(async function(...u) {
2405
+ const c = new q([]), d = await o._def.args.parseAsync(u, a).catch((m) => {
2406
2406
  throw c.addIssue(r(u, m)), c;
2407
2407
  }), l = await Reflect.apply(i, this, d);
2408
2408
  return await o._def.returns._def.type.parseAsync(l, a).catch((m) => {
@@ -2411,13 +2411,13 @@ class Le extends k {
2411
2411
  });
2412
2412
  } else {
2413
2413
  const o = this;
2414
- return Z(function(...u) {
2414
+ return L(function(...u) {
2415
2415
  const c = o._def.args.safeParse(u, a);
2416
2416
  if (!c.success)
2417
- throw new W([r(u, c.error)]);
2417
+ throw new q([r(u, c.error)]);
2418
2418
  const d = Reflect.apply(i, this, c.data), l = o._def.returns.safeParse(d, a);
2419
2419
  if (!l.success)
2420
- throw new W([s(d, l.error)]);
2420
+ throw new q([s(d, l.error)]);
2421
2421
  return l.data;
2422
2422
  });
2423
2423
  }
@@ -2429,13 +2429,13 @@ class Le extends k {
2429
2429
  return this._def.returns;
2430
2430
  }
2431
2431
  args(...e) {
2432
- return new Le({
2432
+ return new Ze({
2433
2433
  ...this._def,
2434
- args: oe.create(e).rest($e.create())
2434
+ args: oe.create(e).rest(ke.create())
2435
2435
  });
2436
2436
  }
2437
2437
  returns(e) {
2438
- return new Le({
2438
+ return new Ze({
2439
2439
  ...this._def,
2440
2440
  returns: e
2441
2441
  });
@@ -2447,15 +2447,15 @@ class Le extends k {
2447
2447
  return this.parse(e);
2448
2448
  }
2449
2449
  static create(e, n, r) {
2450
- return new Le({
2451
- args: e || oe.create([]).rest($e.create()),
2452
- returns: n || $e.create(),
2450
+ return new Ze({
2451
+ args: e || oe.create([]).rest(ke.create()),
2452
+ returns: n || ke.create(),
2453
2453
  typeName: x.ZodFunction,
2454
2454
  ...E(r)
2455
2455
  });
2456
2456
  }
2457
2457
  }
2458
- class ft extends k {
2458
+ class ft extends T {
2459
2459
  get schema() {
2460
2460
  return this._def.getter();
2461
2461
  }
@@ -2469,7 +2469,7 @@ ft.create = (t, e) => new ft({
2469
2469
  typeName: x.ZodLazy,
2470
2470
  ...E(e)
2471
2471
  });
2472
- class ht extends k {
2472
+ class ht extends T {
2473
2473
  _parse(e) {
2474
2474
  if (e.data !== this._def.value) {
2475
2475
  const n = this._getOrReturnCtx(e);
@@ -2497,7 +2497,7 @@ function Gr(t, e) {
2497
2497
  ...E(e)
2498
2498
  });
2499
2499
  }
2500
- class xe extends k {
2500
+ class xe extends T {
2501
2501
  constructor() {
2502
2502
  super(...arguments), tt.set(this, void 0);
2503
2503
  }
@@ -2505,12 +2505,12 @@ class xe extends k {
2505
2505
  if (typeof e.data != "string") {
2506
2506
  const n = this._getOrReturnCtx(e), r = this._def.values;
2507
2507
  return b(n, {
2508
- expected: $.joinValues(r),
2508
+ expected: k.joinValues(r),
2509
2509
  received: n.parsedType,
2510
2510
  code: h.invalid_type
2511
2511
  }), _;
2512
2512
  }
2513
- if (Ut(this, tt) || Zr(this, tt, new Set(this._def.values)), !Ut(this, tt).has(e.data)) {
2513
+ if (Ut(this, tt) || Lr(this, tt, new Set(this._def.values)), !Ut(this, tt).has(e.data)) {
2514
2514
  const n = this._getOrReturnCtx(e), r = this._def.values;
2515
2515
  return b(n, {
2516
2516
  received: n.data,
@@ -2518,7 +2518,7 @@ class xe extends k {
2518
2518
  options: r
2519
2519
  }), _;
2520
2520
  }
2521
- return Z(e.data);
2521
+ return L(e.data);
2522
2522
  }
2523
2523
  get options() {
2524
2524
  return this._def.values;
@@ -2556,29 +2556,29 @@ class xe extends k {
2556
2556
  }
2557
2557
  tt = /* @__PURE__ */ new WeakMap();
2558
2558
  xe.create = Gr;
2559
- class pt extends k {
2559
+ class pt extends T {
2560
2560
  constructor() {
2561
2561
  super(...arguments), nt.set(this, void 0);
2562
2562
  }
2563
2563
  _parse(e) {
2564
- const n = $.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(e);
2564
+ const n = k.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(e);
2565
2565
  if (r.parsedType !== g.string && r.parsedType !== g.number) {
2566
- const s = $.objectValues(n);
2566
+ const s = k.objectValues(n);
2567
2567
  return b(r, {
2568
- expected: $.joinValues(s),
2568
+ expected: k.joinValues(s),
2569
2569
  received: r.parsedType,
2570
2570
  code: h.invalid_type
2571
2571
  }), _;
2572
2572
  }
2573
- if (Ut(this, nt) || Zr(this, nt, new Set($.getValidEnumValues(this._def.values))), !Ut(this, nt).has(e.data)) {
2574
- const s = $.objectValues(n);
2573
+ if (Ut(this, nt) || Lr(this, nt, new Set(k.getValidEnumValues(this._def.values))), !Ut(this, nt).has(e.data)) {
2574
+ const s = k.objectValues(n);
2575
2575
  return b(r, {
2576
2576
  received: r.data,
2577
2577
  code: h.invalid_enum_value,
2578
2578
  options: s
2579
2579
  }), _;
2580
2580
  }
2581
- return Z(e.data);
2581
+ return L(e.data);
2582
2582
  }
2583
2583
  get enum() {
2584
2584
  return this._def.values;
@@ -2590,7 +2590,7 @@ pt.create = (t, e) => new pt({
2590
2590
  typeName: x.ZodNativeEnum,
2591
2591
  ...E(e)
2592
2592
  });
2593
- class Ge extends k {
2593
+ class Ge extends T {
2594
2594
  unwrap() {
2595
2595
  return this._def.type;
2596
2596
  }
@@ -2603,7 +2603,7 @@ class Ge extends k {
2603
2603
  received: n.parsedType
2604
2604
  }), _;
2605
2605
  const r = n.parsedType === g.promise ? n.data : Promise.resolve(n.data);
2606
- return Z(r.then((s) => this._def.type.parseAsync(s, {
2606
+ return L(r.then((s) => this._def.type.parseAsync(s, {
2607
2607
  path: n.path,
2608
2608
  errorMap: n.common.contextualErrorMap
2609
2609
  })));
@@ -2614,7 +2614,7 @@ Ge.create = (t, e) => new Ge({
2614
2614
  typeName: x.ZodPromise,
2615
2615
  ...E(e)
2616
2616
  });
2617
- class ne extends k {
2617
+ class ne extends T {
2618
2618
  innerType() {
2619
2619
  return this._def.schema;
2620
2620
  }
@@ -2688,7 +2688,7 @@ class ne extends k {
2688
2688
  return { status: n.value, value: o };
2689
2689
  } else
2690
2690
  return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((i) => Ie(i) ? Promise.resolve(s.transform(i.value, a)).then((o) => ({ status: n.value, value: o })) : i);
2691
- $.assertNever(s);
2691
+ k.assertNever(s);
2692
2692
  }
2693
2693
  }
2694
2694
  ne.create = (t, e, n) => new ne({
@@ -2703,9 +2703,9 @@ ne.createWithPreprocess = (t, e, n) => new ne({
2703
2703
  typeName: x.ZodEffects,
2704
2704
  ...E(n)
2705
2705
  });
2706
- class ae extends k {
2706
+ class ae extends T {
2707
2707
  _parse(e) {
2708
- return this._getType(e) === g.undefined ? Z(void 0) : this._def.innerType._parse(e);
2708
+ return this._getType(e) === g.undefined ? L(void 0) : this._def.innerType._parse(e);
2709
2709
  }
2710
2710
  unwrap() {
2711
2711
  return this._def.innerType;
@@ -2716,9 +2716,9 @@ ae.create = (t, e) => new ae({
2716
2716
  typeName: x.ZodOptional,
2717
2717
  ...E(e)
2718
2718
  });
2719
- class _e extends k {
2719
+ class _e extends T {
2720
2720
  _parse(e) {
2721
- return this._getType(e) === g.null ? Z(null) : this._def.innerType._parse(e);
2721
+ return this._getType(e) === g.null ? L(null) : this._def.innerType._parse(e);
2722
2722
  }
2723
2723
  unwrap() {
2724
2724
  return this._def.innerType;
@@ -2729,7 +2729,7 @@ _e.create = (t, e) => new _e({
2729
2729
  typeName: x.ZodNullable,
2730
2730
  ...E(e)
2731
2731
  });
2732
- class mt extends k {
2732
+ class mt extends T {
2733
2733
  _parse(e) {
2734
2734
  const { ctx: n } = this._processInputParams(e);
2735
2735
  let r = n.data;
@@ -2749,7 +2749,7 @@ mt.create = (t, e) => new mt({
2749
2749
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
2750
2750
  ...E(e)
2751
2751
  });
2752
- class yt extends k {
2752
+ class yt extends T {
2753
2753
  _parse(e) {
2754
2754
  const { ctx: n } = this._processInputParams(e), r = {
2755
2755
  ...n,
@@ -2768,7 +2768,7 @@ class yt extends k {
2768
2768
  status: "valid",
2769
2769
  value: a.status === "valid" ? a.value : this._def.catchValue({
2770
2770
  get error() {
2771
- return new W(r.common.issues);
2771
+ return new q(r.common.issues);
2772
2772
  },
2773
2773
  input: r.data
2774
2774
  })
@@ -2776,7 +2776,7 @@ class yt extends k {
2776
2776
  status: "valid",
2777
2777
  value: s.status === "valid" ? s.value : this._def.catchValue({
2778
2778
  get error() {
2779
- return new W(r.common.issues);
2779
+ return new q(r.common.issues);
2780
2780
  },
2781
2781
  input: r.data
2782
2782
  })
@@ -2792,7 +2792,7 @@ yt.create = (t, e) => new yt({
2792
2792
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
2793
2793
  ...E(e)
2794
2794
  });
2795
- class qt extends k {
2795
+ class Wt extends T {
2796
2796
  _parse(e) {
2797
2797
  if (this._getType(e) !== g.nan) {
2798
2798
  const r = this._getOrReturnCtx(e);
@@ -2805,12 +2805,12 @@ class qt extends k {
2805
2805
  return { status: "valid", value: e.data };
2806
2806
  }
2807
2807
  }
2808
- qt.create = (t) => new qt({
2808
+ Wt.create = (t) => new Wt({
2809
2809
  typeName: x.ZodNaN,
2810
2810
  ...E(t)
2811
2811
  });
2812
- const Ga = Symbol("zod_brand");
2813
- class Wn extends k {
2812
+ const Ha = Symbol("zod_brand");
2813
+ class qn extends T {
2814
2814
  _parse(e) {
2815
2815
  const { ctx: n } = this._processInputParams(e), r = n.data;
2816
2816
  return this._def.type._parse({
@@ -2823,7 +2823,7 @@ class Wn extends k {
2823
2823
  return this._def.type;
2824
2824
  }
2825
2825
  }
2826
- class Bt extends k {
2826
+ class Bt extends T {
2827
2827
  _parse(e) {
2828
2828
  const { status: n, ctx: r } = this._processInputParams(e);
2829
2829
  if (r.common.async)
@@ -2863,7 +2863,7 @@ class Bt extends k {
2863
2863
  });
2864
2864
  }
2865
2865
  }
2866
- class bt extends k {
2866
+ class bt extends T {
2867
2867
  _parse(e) {
2868
2868
  const n = this._def.innerType._parse(e), r = (s) => (Ie(s) && (s.value = Object.freeze(s.value)), s);
2869
2869
  return at(n) ? n.then((s) => r(s)) : r(n);
@@ -2886,7 +2886,7 @@ function Hr(t, e = {}, n) {
2886
2886
  }
2887
2887
  }) : Ue.create();
2888
2888
  }
2889
- const Ha = {
2889
+ const qa = {
2890
2890
  object: j.lazycreate
2891
2891
  };
2892
2892
  var x;
@@ -2895,7 +2895,7 @@ var x;
2895
2895
  })(x || (x = {}));
2896
2896
  const Wa = (t, e = {
2897
2897
  message: `Input not instance of ${t.name}`
2898
- }) => Hr((n) => n instanceof t, e), Wr = ee.create, qr = ve.create, qa = qt.create, Ka = we.create, Kr = it.create, Ja = Se.create, Ya = Gt.create, Xa = ot.create, Qa = ct.create, ei = Ue.create, ti = $e.create, ni = me.create, ri = Ht.create, si = te.create, ai = j.create, ii = j.strictCreate, oi = ut.create, ci = nn.create, ui = dt.create, di = oe.create, li = lt.create, fi = Wt.create, hi = Re.create, pi = Le.create, mi = ft.create, yi = ht.create, bi = xe.create, gi = pt.create, vi = Ge.create, wr = ne.create, wi = ae.create, xi = _e.create, _i = ne.createWithPreprocess, Pi = Bt.create, Ei = () => Wr().optional(), Ai = () => qr().optional(), Ci = () => Kr().optional(), ki = {
2898
+ }) => Hr((n) => n instanceof t, e), qr = ee.create, Wr = ve.create, Ka = Wt.create, Ja = we.create, Kr = it.create, Ya = Se.create, Xa = Gt.create, Qa = ot.create, ei = ct.create, ti = Ue.create, ni = ke.create, ri = me.create, si = Ht.create, ai = te.create, ii = j.create, oi = j.strictCreate, ci = ut.create, ui = nn.create, di = dt.create, li = oe.create, fi = lt.create, hi = qt.create, pi = Re.create, mi = Ze.create, yi = ft.create, bi = ht.create, gi = xe.create, vi = pt.create, wi = Ge.create, wr = ne.create, xi = ae.create, _i = _e.create, Pi = ne.createWithPreprocess, Ei = Bt.create, Ai = () => qr().optional(), Ci = () => Wr().optional(), Ti = () => Kr().optional(), $i = {
2899
2899
  string: (t) => ee.create({ ...t, coerce: !0 }),
2900
2900
  number: (t) => ve.create({ ...t, coerce: !0 }),
2901
2901
  boolean: (t) => it.create({
@@ -2904,32 +2904,32 @@ const Wa = (t, e = {
2904
2904
  }),
2905
2905
  bigint: (t) => we.create({ ...t, coerce: !0 }),
2906
2906
  date: (t) => Se.create({ ...t, coerce: !0 })
2907
- }, Ti = _;
2907
+ }, ki = _;
2908
2908
  var p = /* @__PURE__ */ Object.freeze({
2909
2909
  __proto__: null,
2910
2910
  defaultErrorMap: Ve,
2911
- setErrorMap: _a,
2911
+ setErrorMap: Pa,
2912
2912
  getErrorMap: Dt,
2913
2913
  makeIssue: Vt,
2914
- EMPTY_PATH: Pa,
2914
+ EMPTY_PATH: Ea,
2915
2915
  addIssueToContext: b,
2916
2916
  ParseStatus: z,
2917
2917
  INVALID: _,
2918
2918
  DIRTY: Fe,
2919
- OK: Z,
2920
- isAborted: kn,
2921
- isDirty: Tn,
2919
+ OK: L,
2920
+ isAborted: Tn,
2921
+ isDirty: $n,
2922
2922
  isValid: Ie,
2923
2923
  isAsync: at,
2924
2924
  get util() {
2925
- return $;
2925
+ return k;
2926
2926
  },
2927
2927
  get objectUtil() {
2928
2928
  return Cn;
2929
2929
  },
2930
2930
  ZodParsedType: g,
2931
2931
  getParsedType: he,
2932
- ZodType: k,
2932
+ ZodType: T,
2933
2933
  datetimeRegex: Ur,
2934
2934
  ZodString: ee,
2935
2935
  ZodNumber: ve,
@@ -2940,7 +2940,7 @@ var p = /* @__PURE__ */ Object.freeze({
2940
2940
  ZodUndefined: ot,
2941
2941
  ZodNull: ct,
2942
2942
  ZodAny: Ue,
2943
- ZodUnknown: $e,
2943
+ ZodUnknown: ke,
2944
2944
  ZodNever: me,
2945
2945
  ZodVoid: Ht,
2946
2946
  ZodArray: te,
@@ -2950,9 +2950,9 @@ var p = /* @__PURE__ */ Object.freeze({
2950
2950
  ZodIntersection: dt,
2951
2951
  ZodTuple: oe,
2952
2952
  ZodRecord: lt,
2953
- ZodMap: Wt,
2953
+ ZodMap: qt,
2954
2954
  ZodSet: Re,
2955
- ZodFunction: Le,
2955
+ ZodFunction: Ze,
2956
2956
  ZodLazy: ft,
2957
2957
  ZodLiteral: ht,
2958
2958
  ZodEnum: xe,
@@ -2964,62 +2964,62 @@ var p = /* @__PURE__ */ Object.freeze({
2964
2964
  ZodNullable: _e,
2965
2965
  ZodDefault: mt,
2966
2966
  ZodCatch: yt,
2967
- ZodNaN: qt,
2968
- BRAND: Ga,
2969
- ZodBranded: Wn,
2967
+ ZodNaN: Wt,
2968
+ BRAND: Ha,
2969
+ ZodBranded: qn,
2970
2970
  ZodPipeline: Bt,
2971
2971
  ZodReadonly: bt,
2972
2972
  custom: Hr,
2973
- Schema: k,
2974
- ZodSchema: k,
2975
- late: Ha,
2973
+ Schema: T,
2974
+ ZodSchema: T,
2975
+ late: qa,
2976
2976
  get ZodFirstPartyTypeKind() {
2977
2977
  return x;
2978
2978
  },
2979
- coerce: ki,
2980
- any: ei,
2981
- array: si,
2982
- bigint: Ka,
2979
+ coerce: $i,
2980
+ any: ti,
2981
+ array: ai,
2982
+ bigint: Ja,
2983
2983
  boolean: Kr,
2984
- date: Ja,
2985
- discriminatedUnion: ci,
2984
+ date: Ya,
2985
+ discriminatedUnion: ui,
2986
2986
  effect: wr,
2987
- enum: bi,
2988
- function: pi,
2987
+ enum: gi,
2988
+ function: mi,
2989
2989
  instanceof: Wa,
2990
- intersection: ui,
2991
- lazy: mi,
2992
- literal: yi,
2993
- map: fi,
2994
- nan: qa,
2995
- nativeEnum: gi,
2996
- never: ni,
2997
- null: Qa,
2998
- nullable: xi,
2999
- number: qr,
3000
- object: ai,
3001
- oboolean: Ci,
3002
- onumber: Ai,
3003
- optional: wi,
3004
- ostring: Ei,
3005
- pipeline: Pi,
3006
- preprocess: _i,
3007
- promise: vi,
3008
- record: li,
3009
- set: hi,
3010
- strictObject: ii,
3011
- string: Wr,
3012
- symbol: Ya,
2990
+ intersection: di,
2991
+ lazy: yi,
2992
+ literal: bi,
2993
+ map: hi,
2994
+ nan: Ka,
2995
+ nativeEnum: vi,
2996
+ never: ri,
2997
+ null: ei,
2998
+ nullable: _i,
2999
+ number: Wr,
3000
+ object: ii,
3001
+ oboolean: Ti,
3002
+ onumber: Ci,
3003
+ optional: xi,
3004
+ ostring: Ai,
3005
+ pipeline: Ei,
3006
+ preprocess: Pi,
3007
+ promise: wi,
3008
+ record: fi,
3009
+ set: pi,
3010
+ strictObject: oi,
3011
+ string: qr,
3012
+ symbol: Xa,
3013
3013
  transformer: wr,
3014
- tuple: di,
3015
- undefined: Xa,
3016
- union: oi,
3017
- unknown: ti,
3018
- void: ri,
3019
- NEVER: Ti,
3014
+ tuple: li,
3015
+ undefined: Qa,
3016
+ union: ci,
3017
+ unknown: ni,
3018
+ void: si,
3019
+ NEVER: ki,
3020
3020
  ZodIssueCode: h,
3021
- quotelessJson: xa,
3022
- ZodError: W
3021
+ quotelessJson: _a,
3022
+ ZodError: q
3023
3023
  });
3024
3024
  const Jr = "2.22.1";
3025
3025
  let Xe = {
@@ -3084,14 +3084,14 @@ class Xr extends y {
3084
3084
  super(`Number "${a}" is not in safe ${s ? `${s * 8}-bit ${r ? "signed" : "unsigned"} ` : ""}integer range ${e ? `(${n} to ${e})` : `(above ${n})`}`, { name: "IntegerOutOfRangeError" });
3085
3085
  }
3086
3086
  }
3087
- class $i extends y {
3087
+ class Ii extends y {
3088
3088
  constructor(e) {
3089
3089
  super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
3090
3090
  name: "InvalidBytesBooleanError"
3091
3091
  });
3092
3092
  }
3093
3093
  }
3094
- class Ii extends y {
3094
+ class Si extends y {
3095
3095
  constructor({ givenSize: e, maxSize: n }) {
3096
3096
  super(`Size cannot exceed ${n} bytes. Given size: ${e} bytes.`, { name: "SizeOverflowError" });
3097
3097
  }
@@ -3112,7 +3112,7 @@ class xr extends y {
3112
3112
  }
3113
3113
  }
3114
3114
  function Je(t, { dir: e, size: n = 32 } = {}) {
3115
- return typeof t == "string" ? ge(t, { dir: e, size: n }) : Si(t, { dir: e, size: n });
3115
+ return typeof t == "string" ? ge(t, { dir: e, size: n }) : Ri(t, { dir: e, size: n });
3116
3116
  }
3117
3117
  function ge(t, { dir: e, size: n = 32 } = {}) {
3118
3118
  if (n === null)
@@ -3126,7 +3126,7 @@ function ge(t, { dir: e, size: n = 32 } = {}) {
3126
3126
  });
3127
3127
  return `0x${r[e === "right" ? "padEnd" : "padStart"](n * 2, "0")}`;
3128
3128
  }
3129
- function Si(t, { dir: e, size: n = 32 } = {}) {
3129
+ function Ri(t, { dir: e, size: n = 32 } = {}) {
3130
3130
  if (n === null)
3131
3131
  return t;
3132
3132
  if (t.length > n)
@@ -3148,17 +3148,17 @@ function Pe(t, { strict: e = !0 } = {}) {
3148
3148
  function N(t) {
3149
3149
  return Pe(t, { strict: !1 }) ? Math.ceil((t.length - 2) / 2) : t.length;
3150
3150
  }
3151
- function qn(t, { dir: e = "left" } = {}) {
3151
+ function Wn(t, { dir: e = "left" } = {}) {
3152
3152
  let n = typeof t == "string" ? t.replace("0x", "") : t, r = 0;
3153
3153
  for (let s = 0; s < n.length - 1 && n[e === "left" ? s : n.length - s - 1].toString() === "0"; s++)
3154
3154
  r++;
3155
3155
  return n = e === "left" ? n.slice(r) : n.slice(0, n.length - r), typeof t == "string" ? (n.length === 1 && e === "right" && (n = `${n}0`), `0x${n.length % 2 === 1 ? `0${n}` : n}`) : n;
3156
3156
  }
3157
- const Ri = /* @__PURE__ */ new TextEncoder();
3157
+ const Oi = /* @__PURE__ */ new TextEncoder();
3158
3158
  function Kn(t, e = {}) {
3159
- return typeof t == "number" || typeof t == "bigint" ? Mi(t, e) : typeof t == "boolean" ? Oi(t, e) : Pe(t) ? ye(t, e) : ts(t, e);
3159
+ return typeof t == "number" || typeof t == "bigint" ? ji(t, e) : typeof t == "boolean" ? Mi(t, e) : Pe(t) ? ye(t, e) : ts(t, e);
3160
3160
  }
3161
- function Oi(t, e = {}) {
3161
+ function Mi(t, e = {}) {
3162
3162
  const n = new Uint8Array(1);
3163
3163
  return n[0] = Number(t), typeof e.size == "number" ? (ce(n, { size: e.size }), Je(n, { size: e.size })) : n;
3164
3164
  }
@@ -3192,17 +3192,17 @@ function ye(t, e = {}) {
3192
3192
  }
3193
3193
  return a;
3194
3194
  }
3195
- function Mi(t, e) {
3195
+ function ji(t, e) {
3196
3196
  const n = O(t, e);
3197
3197
  return ye(n);
3198
3198
  }
3199
3199
  function ts(t, e = {}) {
3200
- const n = Ri.encode(t);
3200
+ const n = Oi.encode(t);
3201
3201
  return typeof e.size == "number" ? (ce(n, { size: e.size }), Je(n, { dir: "right", size: e.size })) : n;
3202
3202
  }
3203
3203
  function ce(t, { size: e }) {
3204
3204
  if (N(t) > e)
3205
- throw new Ii({
3205
+ throw new Si({
3206
3206
  givenSize: N(t),
3207
3207
  maxSize: e
3208
3208
  });
@@ -3219,7 +3219,7 @@ function gt(t, e = {}) {
3219
3219
  function He(t, e = {}) {
3220
3220
  return Number(gt(t, e));
3221
3221
  }
3222
- const ji = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
3222
+ const Bi = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
3223
3223
  function Sn(t, e = {}) {
3224
3224
  return typeof t == "number" || typeof t == "bigint" ? O(t, e) : typeof t == "string" ? Jn(t, e) : typeof t == "boolean" ? ns(t, e) : G(t, e);
3225
3225
  }
@@ -3230,7 +3230,7 @@ function ns(t, e = {}) {
3230
3230
  function G(t, e = {}) {
3231
3231
  let n = "";
3232
3232
  for (let s = 0; s < t.length; s++)
3233
- n += ji[t[s]];
3233
+ n += Bi[t[s]];
3234
3234
  const r = `0x${n}`;
3235
3235
  return typeof e.size == "number" ? (ce(r, { size: e.size }), Je(r, { dir: "right", size: e.size })) : r;
3236
3236
  }
@@ -3252,23 +3252,23 @@ function O(t, e = {}) {
3252
3252
  const o = `0x${(n && s < 0 ? (1n << BigInt(r * 8)) + BigInt(s) : s).toString(16)}`;
3253
3253
  return r ? Je(o, { size: r }) : o;
3254
3254
  }
3255
- const Bi = /* @__PURE__ */ new TextEncoder();
3255
+ const Ni = /* @__PURE__ */ new TextEncoder();
3256
3256
  function Jn(t, e = {}) {
3257
- const n = Bi.encode(t);
3257
+ const n = Ni.encode(t);
3258
3258
  return G(n, e);
3259
3259
  }
3260
- function We(t, { includeName: e = !1 } = {}) {
3260
+ function qe(t, { includeName: e = !1 } = {}) {
3261
3261
  if (t.type !== "function" && t.type !== "event" && t.type !== "error")
3262
- throw new qi(t.type);
3262
+ throw new Ki(t.type);
3263
3263
  return `${t.name}(${Yn(t.inputs, { includeName: e })})`;
3264
3264
  }
3265
3265
  function Yn(t, { includeName: e = !1 } = {}) {
3266
- return t ? t.map((n) => Ni(n, { includeName: e })).join(e ? ", " : ",") : "";
3266
+ return t ? t.map((n) => Fi(n, { includeName: e })).join(e ? ", " : ",") : "";
3267
3267
  }
3268
- function Ni(t, { includeName: e }) {
3268
+ function Fi(t, { includeName: e }) {
3269
3269
  return t.type.startsWith("tuple") ? `(${Yn(t.components, { includeName: e })})${t.type.slice(5)}` : t.type + (e && t.name ? ` ${t.name}` : "");
3270
3270
  }
3271
- class Fi extends y {
3271
+ class zi extends y {
3272
3272
  constructor({ docsPath: e }) {
3273
3273
  super([
3274
3274
  "A constructor was not found on the ABI.",
@@ -3292,7 +3292,7 @@ class Pr extends y {
3292
3292
  });
3293
3293
  }
3294
3294
  }
3295
- class zi extends y {
3295
+ class Zi extends y {
3296
3296
  constructor({ data: e, params: n, size: r }) {
3297
3297
  super([`Data size of ${r} bytes is too small for given parameters.`].join(`
3298
3298
  `), {
@@ -3336,12 +3336,12 @@ class Li extends y {
3336
3336
  `), { name: "AbiEncodingArrayLengthMismatchError" });
3337
3337
  }
3338
3338
  }
3339
- class Zi extends y {
3339
+ class Di extends y {
3340
3340
  constructor({ expectedSize: e, value: n }) {
3341
3341
  super(`Size of bytes "${n}" (bytes${N(n)}) does not match expected size (bytes${e}).`, { name: "AbiEncodingBytesSizeMismatchError" });
3342
3342
  }
3343
3343
  }
3344
- class Di extends y {
3344
+ class Vi extends y {
3345
3345
  constructor({ expectedLength: e, givenLength: n }) {
3346
3346
  super([
3347
3347
  "ABI encoding params/values length mismatch.",
@@ -3381,7 +3381,7 @@ class Kt extends y {
3381
3381
  });
3382
3382
  }
3383
3383
  }
3384
- class Vi extends y {
3384
+ class Ui extends y {
3385
3385
  constructor(e, { docsPath: n }) {
3386
3386
  super([
3387
3387
  `Function "${e}" does not contain any \`outputs\` on ABI.`,
@@ -3394,12 +3394,12 @@ class Vi extends y {
3394
3394
  });
3395
3395
  }
3396
3396
  }
3397
- class Ui extends y {
3397
+ class Gi extends y {
3398
3398
  constructor(e, n) {
3399
3399
  super("Found ambiguous types in overloaded ABI items.", {
3400
3400
  metaMessages: [
3401
- `\`${e.type}\` in \`${We(e.abiItem)}\`, and`,
3402
- `\`${n.type}\` in \`${We(n.abiItem)}\``,
3401
+ `\`${e.type}\` in \`${qe(e.abiItem)}\`, and`,
3402
+ `\`${n.type}\` in \`${qe(n.abiItem)}\``,
3403
3403
  "",
3404
3404
  "These types encode differently and cannot be distinguished at runtime.",
3405
3405
  "Remove one of the ambiguous items in the ABI."
@@ -3408,7 +3408,7 @@ class Ui extends y {
3408
3408
  });
3409
3409
  }
3410
3410
  }
3411
- class Gi extends y {
3411
+ class Hi extends y {
3412
3412
  constructor(e, { docsPath: n }) {
3413
3413
  super([
3414
3414
  `Type "${e}" is not a valid encoding type.`,
@@ -3417,7 +3417,7 @@ class Gi extends y {
3417
3417
  `), { docsPath: n, name: "InvalidAbiEncodingType" });
3418
3418
  }
3419
3419
  }
3420
- class Hi extends y {
3420
+ class qi extends y {
3421
3421
  constructor(e, { docsPath: n }) {
3422
3422
  super([
3423
3423
  `Type "${e}" is not a valid decoding type.`,
@@ -3434,7 +3434,7 @@ class Wi extends y {
3434
3434
  });
3435
3435
  }
3436
3436
  }
3437
- class qi extends y {
3437
+ class Ki extends y {
3438
3438
  constructor(e) {
3439
3439
  super([
3440
3440
  `"${e}" is not a valid definition type.`,
@@ -3443,10 +3443,10 @@ class qi extends y {
3443
3443
  `), { name: "InvalidDefinitionTypeError" });
3444
3444
  }
3445
3445
  }
3446
- function qe(t) {
3447
- return typeof t[0] == "string" ? rn(t) : Ki(t);
3446
+ function We(t) {
3447
+ return typeof t[0] == "string" ? rn(t) : Ji(t);
3448
3448
  }
3449
- function Ki(t) {
3449
+ function Ji(t) {
3450
3450
  let e = 0;
3451
3451
  for (const s of t)
3452
3452
  e += s.length;
@@ -3492,7 +3492,7 @@ class sn extends Map {
3492
3492
  }
3493
3493
  }
3494
3494
  function Nt(t, e) {
3495
- const n = e || "hex", r = la(Pe(t, { strict: !1 }) ? Kn(t) : t);
3495
+ const n = e || "hex", r = fa(Pe(t, { strict: !1 }) ? Kn(t) : t);
3496
3496
  return n === "bytes" ? r : Sn(r);
3497
3497
  }
3498
3498
  const mn = /* @__PURE__ */ new sn(8192);
@@ -3505,21 +3505,21 @@ function an(t, e) {
3505
3505
  const a = `0x${s.join("")}`;
3506
3506
  return mn.set(`${t}.${e}`, a), a;
3507
3507
  }
3508
- function Ji(t, e) {
3508
+ function Yi(t, e) {
3509
3509
  if (!Ee(t, { strict: !1 }))
3510
3510
  throw new vt({ address: t });
3511
3511
  return an(t, e);
3512
3512
  }
3513
- const Yi = /^0x[a-fA-F0-9]{40}$/, yn = /* @__PURE__ */ new sn(8192);
3513
+ const Xi = /^0x[a-fA-F0-9]{40}$/, yn = /* @__PURE__ */ new sn(8192);
3514
3514
  function Ee(t, e) {
3515
3515
  const { strict: n = !0 } = e ?? {}, r = `${t}.${n}`;
3516
3516
  if (yn.has(r))
3517
3517
  return yn.get(r);
3518
- const s = Yi.test(t) ? t.toLowerCase() === t ? !0 : n ? an(t) === t : !0 : !1;
3518
+ const s = Xi.test(t) ? t.toLowerCase() === t ? !0 : n ? an(t) === t : !0 : !1;
3519
3519
  return yn.set(r, s), s;
3520
3520
  }
3521
3521
  function Jt(t, e, n, { strict: r } = {}) {
3522
- return Pe(t, { strict: !1 }) ? Xi(t, e, n, {
3522
+ return Pe(t, { strict: !1 }) ? Qi(t, e, n, {
3523
3523
  strict: r
3524
3524
  }) : is(t, e, n, {
3525
3525
  strict: r
@@ -3546,25 +3546,25 @@ function is(t, e, n, { strict: r } = {}) {
3546
3546
  const s = t.slice(e, n);
3547
3547
  return r && as(s, e, n), s;
3548
3548
  }
3549
- function Xi(t, e, n, { strict: r } = {}) {
3549
+ function Qi(t, e, n, { strict: r } = {}) {
3550
3550
  ss(t, e);
3551
3551
  const s = `0x${t.replace("0x", "").slice((e ?? 0) * 2, (n ?? t.length) * 2)}`;
3552
3552
  return r && as(s, e, n), s;
3553
3553
  }
3554
- const Qi = /^(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)?$/;
3554
+ const eo = /^(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)?$/;
3555
3555
  function os(t, e) {
3556
3556
  if (t.length !== e.length)
3557
- throw new Di({
3557
+ throw new Vi({
3558
3558
  expectedLength: t.length,
3559
3559
  givenLength: e.length
3560
3560
  });
3561
- const n = eo({
3561
+ const n = to({
3562
3562
  params: t,
3563
3563
  values: e
3564
3564
  }), r = er(n);
3565
3565
  return r.length === 0 ? "0x" : r;
3566
3566
  }
3567
- function eo({ params: t, values: e }) {
3567
+ function to({ params: t, values: e }) {
3568
3568
  const n = [];
3569
3569
  for (let r = 0; r < t.length; r++)
3570
3570
  n.push(Qn({ param: t[r], value: e[r] }));
@@ -3574,28 +3574,28 @@ function Qn({ param: t, value: e }) {
3574
3574
  const n = tr(t.type);
3575
3575
  if (n) {
3576
3576
  const [r, s] = n;
3577
- return no(e, { length: r, param: { ...t, type: s } });
3577
+ return ro(e, { length: r, param: { ...t, type: s } });
3578
3578
  }
3579
3579
  if (t.type === "tuple")
3580
- return oo(e, {
3580
+ return co(e, {
3581
3581
  param: t
3582
3582
  });
3583
3583
  if (t.type === "address")
3584
- return to(e);
3584
+ return no(e);
3585
3585
  if (t.type === "bool")
3586
- return so(e);
3586
+ return ao(e);
3587
3587
  if (t.type.startsWith("uint") || t.type.startsWith("int")) {
3588
- const r = t.type.startsWith("int"), [, , s = "256"] = Qi.exec(t.type) ?? [];
3589
- return ao(e, {
3588
+ const r = t.type.startsWith("int"), [, , s = "256"] = eo.exec(t.type) ?? [];
3589
+ return io(e, {
3590
3590
  signed: r,
3591
3591
  size: Number(s)
3592
3592
  });
3593
3593
  }
3594
3594
  if (t.type.startsWith("bytes"))
3595
- return ro(e, { param: t });
3595
+ return so(e, { param: t });
3596
3596
  if (t.type === "string")
3597
- return io(e);
3598
- throw new Gi(t.type, {
3597
+ return oo(e);
3598
+ throw new Hi(t.type, {
3599
3599
  docsPath: "/docs/contract/encodeAbiParameters"
3600
3600
  });
3601
3601
  }
@@ -3611,14 +3611,14 @@ function er(t) {
3611
3611
  const { dynamic: i, encoded: o } = t[a];
3612
3612
  i ? (n.push(O(e + s, { size: 32 })), r.push(o), s += N(o)) : n.push(o);
3613
3613
  }
3614
- return qe([...n, ...r]);
3614
+ return We([...n, ...r]);
3615
3615
  }
3616
- function to(t) {
3616
+ function no(t) {
3617
3617
  if (!Ee(t))
3618
3618
  throw new vt({ address: t });
3619
3619
  return { dynamic: !1, encoded: ge(t.toLowerCase()) };
3620
3620
  }
3621
- function no(t, { length: e, param: n }) {
3621
+ function ro(t, { length: e, param: n }) {
3622
3622
  const r = e === null;
3623
3623
  if (!Array.isArray(t))
3624
3624
  throw new Wi(t);
@@ -3640,7 +3640,7 @@ function no(t, { length: e, param: n }) {
3640
3640
  const o = O(a.length, { size: 32 });
3641
3641
  return {
3642
3642
  dynamic: !0,
3643
- encoded: a.length > 0 ? qe([o, i]) : o
3643
+ encoded: a.length > 0 ? We([o, i]) : o
3644
3644
  };
3645
3645
  }
3646
3646
  if (s)
@@ -3648,10 +3648,10 @@ function no(t, { length: e, param: n }) {
3648
3648
  }
3649
3649
  return {
3650
3650
  dynamic: !1,
3651
- encoded: qe(a.map(({ encoded: i }) => i))
3651
+ encoded: We(a.map(({ encoded: i }) => i))
3652
3652
  };
3653
3653
  }
3654
- function ro(t, { param: e }) {
3654
+ function so(t, { param: e }) {
3655
3655
  const [, n] = e.type.split("bytes"), r = N(t);
3656
3656
  if (!n) {
3657
3657
  let s = t;
@@ -3660,22 +3660,22 @@ function ro(t, { param: e }) {
3660
3660
  size: Math.ceil((t.length - 2) / 2 / 32) * 32
3661
3661
  })), {
3662
3662
  dynamic: !0,
3663
- encoded: qe([ge(O(r, { size: 32 })), s])
3663
+ encoded: We([ge(O(r, { size: 32 })), s])
3664
3664
  };
3665
3665
  }
3666
3666
  if (r !== Number.parseInt(n))
3667
- throw new Zi({
3667
+ throw new Di({
3668
3668
  expectedSize: Number.parseInt(n),
3669
3669
  value: t
3670
3670
  });
3671
3671
  return { dynamic: !1, encoded: ge(t, { dir: "right" }) };
3672
3672
  }
3673
- function so(t) {
3673
+ function ao(t) {
3674
3674
  if (typeof t != "boolean")
3675
3675
  throw new y(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);
3676
3676
  return { dynamic: !1, encoded: ge(ns(t)) };
3677
3677
  }
3678
- function ao(t, { signed: e, size: n = 256 }) {
3678
+ function io(t, { signed: e, size: n = 256 }) {
3679
3679
  if (typeof n == "number") {
3680
3680
  const r = 2n ** (BigInt(n) - (e ? 1n : 0n)) - 1n, s = e ? -r - 1n : 0n;
3681
3681
  if (t > r || t < s)
@@ -3695,7 +3695,7 @@ function ao(t, { signed: e, size: n = 256 }) {
3695
3695
  })
3696
3696
  };
3697
3697
  }
3698
- function io(t) {
3698
+ function oo(t) {
3699
3699
  const e = Jn(t), n = Math.ceil(N(e) / 32), r = [];
3700
3700
  for (let s = 0; s < n; s++)
3701
3701
  r.push(ge(Jt(e, s * 32, (s + 1) * 32), {
@@ -3703,13 +3703,13 @@ function io(t) {
3703
3703
  }));
3704
3704
  return {
3705
3705
  dynamic: !0,
3706
- encoded: qe([
3706
+ encoded: We([
3707
3707
  ge(O(N(e), { size: 32 })),
3708
3708
  ...r
3709
3709
  ])
3710
3710
  };
3711
3711
  }
3712
- function oo(t, { param: e }) {
3712
+ function co(t, { param: e }) {
3713
3713
  let n = !1;
3714
3714
  const r = [];
3715
3715
  for (let s = 0; s < e.components.length; s++) {
@@ -3721,7 +3721,7 @@ function oo(t, { param: e }) {
3721
3721
  }
3722
3722
  return {
3723
3723
  dynamic: n,
3724
- encoded: n ? er(r) : qe(r.map(({ encoded: s }) => s))
3724
+ encoded: n ? er(r) : We(r.map(({ encoded: s }) => s))
3725
3725
  };
3726
3726
  }
3727
3727
  function tr(t) {
@@ -3738,7 +3738,7 @@ function cs(t) {
3738
3738
  return r;
3739
3739
  const s = e.find((i) => "type" in i && i.type === "constructor");
3740
3740
  if (!s)
3741
- throw new Fi({ docsPath: bn });
3741
+ throw new zi({ docsPath: bn });
3742
3742
  if (!("inputs" in s))
3743
3743
  throw new Pr({ docsPath: bn });
3744
3744
  if (!s.inputs || s.inputs.length === 0)
@@ -3771,11 +3771,11 @@ class gn extends y {
3771
3771
  });
3772
3772
  }
3773
3773
  }
3774
- function co(t) {
3774
+ function uo(t) {
3775
3775
  const e = Nt(`0x${t.substring(4)}`).substring(26);
3776
3776
  return an(`0x${e}`);
3777
3777
  }
3778
- async function uo({ hash: t, signature: e }) {
3778
+ async function lo({ hash: t, signature: e }) {
3779
3779
  const n = Pe(t) ? t : Sn(t), { secp256k1: r } = await import("./utils-ClgLOuAN.js").then((i) => i.al);
3780
3780
  return `0x${(() => {
3781
3781
  if (typeof e == "object" && "r" in e && "s" in e) {
@@ -3795,8 +3795,8 @@ function Er(t) {
3795
3795
  return 1;
3796
3796
  throw new Error("Invalid yParityOrV value");
3797
3797
  }
3798
- async function lo({ hash: t, signature: e }) {
3799
- return co(await uo({ hash: t, signature: e }));
3798
+ async function fo({ hash: t, signature: e }) {
3799
+ return uo(await lo({ hash: t, signature: e }));
3800
3800
  }
3801
3801
  class Ar extends y {
3802
3802
  constructor({ offset: e }) {
@@ -3805,17 +3805,17 @@ class Ar extends y {
3805
3805
  });
3806
3806
  }
3807
3807
  }
3808
- class fo extends y {
3808
+ class ho extends y {
3809
3809
  constructor({ length: e, position: n }) {
3810
3810
  super(`Position \`${n}\` is out of bounds (\`0 < position < ${e}\`).`, { name: "PositionOutOfBoundsError" });
3811
3811
  }
3812
3812
  }
3813
- class ho extends y {
3813
+ class po extends y {
3814
3814
  constructor({ count: e, limit: n }) {
3815
3815
  super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${e}\`).`, { name: "RecursiveReadLimitExceededError" });
3816
3816
  }
3817
3817
  }
3818
- const po = {
3818
+ const mo = {
3819
3819
  bytes: new Uint8Array(),
3820
3820
  dataView: new DataView(new ArrayBuffer(0)),
3821
3821
  position: 0,
@@ -3824,14 +3824,14 @@ const po = {
3824
3824
  recursiveReadLimit: Number.POSITIVE_INFINITY,
3825
3825
  assertReadLimit() {
3826
3826
  if (this.recursiveReadCount >= this.recursiveReadLimit)
3827
- throw new ho({
3827
+ throw new po({
3828
3828
  count: this.recursiveReadCount + 1,
3829
3829
  limit: this.recursiveReadLimit
3830
3830
  });
3831
3831
  },
3832
3832
  assertPosition(t) {
3833
3833
  if (t < 0 || t > this.bytes.length - 1)
3834
- throw new fo({
3834
+ throw new ho({
3835
3835
  length: this.bytes.length,
3836
3836
  position: t
3837
3837
  });
@@ -3938,17 +3938,17 @@ const po = {
3938
3938
  }
3939
3939
  };
3940
3940
  function nr(t, { recursiveReadLimit: e = 8192 } = {}) {
3941
- const n = Object.create(po);
3941
+ const n = Object.create(mo);
3942
3942
  return n.bytes = t, n.dataView = new DataView(t.buffer, t.byteOffset, t.byteLength), n.positionReadCount = /* @__PURE__ */ new Map(), n.recursiveReadLimit = e, n;
3943
3943
  }
3944
- function mo(t, e = "hex") {
3944
+ function yo(t, e = "hex") {
3945
3945
  const n = ds(t), r = nr(new Uint8Array(n.length));
3946
3946
  return n.encode(r), e === "hex" ? G(r.bytes) : r.bytes;
3947
3947
  }
3948
3948
  function ds(t) {
3949
- return Array.isArray(t) ? yo(t.map((e) => ds(e))) : bo(t);
3949
+ return Array.isArray(t) ? bo(t.map((e) => ds(e))) : go(t);
3950
3950
  }
3951
- function yo(t) {
3951
+ function bo(t) {
3952
3952
  const e = t.reduce((s, a) => s + a.length, 0), n = ls(e);
3953
3953
  return {
3954
3954
  length: e <= 55 ? 1 + e : 1 + n + e,
@@ -3959,7 +3959,7 @@ function yo(t) {
3959
3959
  }
3960
3960
  };
3961
3961
  }
3962
- function bo(t) {
3962
+ function go(t) {
3963
3963
  const e = typeof t == "string" ? ye(t) : t, n = ls(e.length);
3964
3964
  return {
3965
3965
  length: e.length === 1 && e[0] < 128 ? 1 : e.length <= 55 ? 1 + e.length : 1 + n + e.length,
@@ -3979,10 +3979,10 @@ function ls(t) {
3979
3979
  return 4;
3980
3980
  throw new y("Length is too large.");
3981
3981
  }
3982
- function go(t) {
3982
+ function vo(t) {
3983
3983
  const { chainId: e, contractAddress: n, nonce: r, to: s } = t, a = Nt(rn([
3984
3984
  "0x05",
3985
- mo([
3985
+ yo([
3986
3986
  e ? O(e) : "0x",
3987
3987
  n,
3988
3988
  r ? O(r) : "0x"
@@ -3992,8 +3992,8 @@ function go(t) {
3992
3992
  }
3993
3993
  async function fs(t) {
3994
3994
  const { authorization: e, signature: n } = t;
3995
- return lo({
3996
- hash: go(e),
3995
+ return fo({
3996
+ hash: vo(e),
3997
3997
  signature: n ?? e
3998
3998
  });
3999
3999
  }
@@ -4012,7 +4012,7 @@ class Rn extends y {
4012
4012
  });
4013
4013
  }
4014
4014
  }
4015
- class vo extends y {
4015
+ class wo extends y {
4016
4016
  constructor({ chain: e, currentChainId: n }) {
4017
4017
  super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`, {
4018
4018
  metaMessages: [
@@ -4023,7 +4023,7 @@ class vo extends y {
4023
4023
  });
4024
4024
  }
4025
4025
  }
4026
- class wo extends y {
4026
+ class xo extends y {
4027
4027
  constructor() {
4028
4028
  super([
4029
4029
  "No chain was provided to the request.",
@@ -4041,16 +4041,16 @@ class hs extends y {
4041
4041
  });
4042
4042
  }
4043
4043
  }
4044
- function xo({ chain: t, currentChainId: e }) {
4044
+ function _o({ chain: t, currentChainId: e }) {
4045
4045
  if (!t)
4046
- throw new wo();
4046
+ throw new xo();
4047
4047
  if (e !== t.id)
4048
- throw new vo({ chain: t, currentChainId: e });
4048
+ throw new wo({ chain: t, currentChainId: e });
4049
4049
  }
4050
- const _o = {
4050
+ const Po = {
4051
4051
  gwei: 9,
4052
4052
  wei: 18
4053
- }, Po = {
4053
+ }, Eo = {
4054
4054
  ether: -9,
4055
4055
  wei: 9
4056
4056
  };
@@ -4065,7 +4065,7 @@ function ps(t, e) {
4065
4065
  return a = a.replace(/(0+)$/, ""), `${r ? "-" : ""}${s || "0"}${a ? `.${a}` : ""}`;
4066
4066
  }
4067
4067
  function U(t, e = "wei") {
4068
- return ps(t, Po[e]);
4068
+ return ps(t, Eo[e]);
4069
4069
  }
4070
4070
  class ze extends y {
4071
4071
  constructor({ cause: e, message: n } = {}) {
@@ -4209,7 +4209,7 @@ Object.defineProperty(zn, "nodeMessage", {
4209
4209
  writable: !0,
4210
4210
  value: /intrinsic gas too low/
4211
4211
  });
4212
- class Ln extends y {
4212
+ class Zn extends y {
4213
4213
  constructor({ cause: e }) {
4214
4214
  super("The transaction type is not supported for this chain.", {
4215
4215
  cause: e,
@@ -4217,7 +4217,7 @@ class Ln extends y {
4217
4217
  });
4218
4218
  }
4219
4219
  }
4220
- Object.defineProperty(Ln, "nodeMessage", {
4220
+ Object.defineProperty(Zn, "nodeMessage", {
4221
4221
  enumerable: !0,
4222
4222
  configurable: !0,
4223
4223
  writable: !0,
@@ -4249,14 +4249,14 @@ class on extends y {
4249
4249
  }
4250
4250
  }
4251
4251
  function rr(t, e = "wei") {
4252
- return ps(t, _o[e]);
4252
+ return ps(t, Po[e]);
4253
4253
  }
4254
4254
  function Ft(t) {
4255
4255
  const e = Object.entries(t).map(([r, s]) => s === void 0 || s === !1 ? null : [r, s]).filter(Boolean), n = e.reduce((r, [s]) => Math.max(r, s.length), 0);
4256
4256
  return e.map(([r, s]) => ` ${`${r}:`.padEnd(n + 1)} ${s}`).join(`
4257
4257
  `);
4258
4258
  }
4259
- class Eo extends y {
4259
+ class Ao extends y {
4260
4260
  constructor() {
4261
4261
  super([
4262
4262
  "Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.",
@@ -4265,7 +4265,7 @@ class Eo extends y {
4265
4265
  `), { name: "FeeConflictError" });
4266
4266
  }
4267
4267
  }
4268
- class Ao extends y {
4268
+ class Co extends y {
4269
4269
  constructor({ transaction: e }) {
4270
4270
  super("Cannot infer a transaction type from provided transaction.", {
4271
4271
  metaMessages: [
@@ -4286,7 +4286,7 @@ class Ao extends y {
4286
4286
  });
4287
4287
  }
4288
4288
  }
4289
- class Co extends y {
4289
+ class To extends y {
4290
4290
  constructor(e, { account: n, docsPath: r, chain: s, data: a, gas: i, gasPrice: o, maxFeePerGas: u, maxPriorityFeePerGas: c, nonce: d, to: l, value: f }) {
4291
4291
  var v;
4292
4292
  const m = Ft({
@@ -4318,7 +4318,7 @@ class Co extends y {
4318
4318
  }), this.cause = e;
4319
4319
  }
4320
4320
  }
4321
- const cn = (t, e, n) => JSON.stringify(t, (r, s) => typeof s == "bigint" ? s.toString() : s, n), ko = (t) => t, ms = (t) => t;
4321
+ const cn = (t, e, n) => JSON.stringify(t, (r, s) => typeof s == "bigint" ? s.toString() : s, n), $o = (t) => t, ms = (t) => t;
4322
4322
  class ys extends y {
4323
4323
  constructor({ body: e, cause: n, details: r, headers: s, status: a, url: i }) {
4324
4324
  super("HTTP request failed.", {
@@ -4373,7 +4373,7 @@ class bs extends y {
4373
4373
  }), this.code = n.code, this.data = n.data;
4374
4374
  }
4375
4375
  }
4376
- const To = -1;
4376
+ const ko = -1;
4377
4377
  class H extends y {
4378
4378
  constructor(e, { code: n, docsPath: r, metaMessages: s, name: a, shortMessage: i }) {
4379
4379
  super(i, {
@@ -4386,7 +4386,7 @@ class H extends y {
4386
4386
  configurable: !0,
4387
4387
  writable: !0,
4388
4388
  value: void 0
4389
- }), this.name = a || e.name, this.code = e instanceof bs ? e.code : n ?? To;
4389
+ }), this.name = a || e.name, this.code = e instanceof bs ? e.code : n ?? ko;
4390
4390
  }
4391
4391
  }
4392
4392
  class Ye extends H {
@@ -4532,31 +4532,31 @@ Object.defineProperty(Ct, "code", {
4532
4532
  writable: !0,
4533
4533
  value: -32002
4534
4534
  });
4535
- class kt extends H {
4535
+ class Tt extends H {
4536
4536
  constructor(e) {
4537
4537
  super(e, {
4538
- code: kt.code,
4538
+ code: Tt.code,
4539
4539
  name: "TransactionRejectedRpcError",
4540
4540
  shortMessage: "Transaction creation failed."
4541
4541
  });
4542
4542
  }
4543
4543
  }
4544
- Object.defineProperty(kt, "code", {
4544
+ Object.defineProperty(Tt, "code", {
4545
4545
  enumerable: !0,
4546
4546
  configurable: !0,
4547
4547
  writable: !0,
4548
4548
  value: -32003
4549
4549
  });
4550
- class Tt extends H {
4550
+ class $t extends H {
4551
4551
  constructor(e, { method: n } = {}) {
4552
4552
  super(e, {
4553
- code: Tt.code,
4553
+ code: $t.code,
4554
4554
  name: "MethodNotSupportedRpcError",
4555
4555
  shortMessage: `Method${n ? ` "${n}"` : ""} is not implemented.`
4556
4556
  });
4557
4557
  }
4558
4558
  }
4559
- Object.defineProperty(Tt, "code", {
4559
+ Object.defineProperty($t, "code", {
4560
4560
  enumerable: !0,
4561
4561
  configurable: !0,
4562
4562
  writable: !0,
@@ -4577,31 +4577,31 @@ Object.defineProperty(Ke, "code", {
4577
4577
  writable: !0,
4578
4578
  value: -32005
4579
4579
  });
4580
- class $t extends H {
4580
+ class kt extends H {
4581
4581
  constructor(e) {
4582
4582
  super(e, {
4583
- code: $t.code,
4583
+ code: kt.code,
4584
4584
  name: "JsonRpcVersionUnsupportedError",
4585
4585
  shortMessage: "Version of JSON-RPC protocol is not supported."
4586
4586
  });
4587
4587
  }
4588
4588
  }
4589
- Object.defineProperty($t, "code", {
4589
+ Object.defineProperty(kt, "code", {
4590
4590
  enumerable: !0,
4591
4591
  configurable: !0,
4592
4592
  writable: !0,
4593
4593
  value: -32006
4594
4594
  });
4595
- class Ze extends Ye {
4595
+ class Le extends Ye {
4596
4596
  constructor(e) {
4597
4597
  super(e, {
4598
- code: Ze.code,
4598
+ code: Le.code,
4599
4599
  name: "UserRejectedRequestError",
4600
4600
  shortMessage: "User rejected the request."
4601
4601
  });
4602
4602
  }
4603
4603
  }
4604
- Object.defineProperty(Ze, "code", {
4604
+ Object.defineProperty(Le, "code", {
4605
4605
  enumerable: !0,
4606
4606
  configurable: !0,
4607
4607
  writable: !0,
@@ -4682,7 +4682,7 @@ Object.defineProperty(Mt, "code", {
4682
4682
  writable: !0,
4683
4683
  value: 4902
4684
4684
  });
4685
- class $o extends H {
4685
+ class Io extends H {
4686
4686
  constructor(e) {
4687
4687
  super(e, {
4688
4688
  name: "UnknownRpcError",
@@ -4704,7 +4704,7 @@ function sr(t, e) {
4704
4704
  }) : On.nodeMessage.test(n) ? new On({
4705
4705
  cause: t,
4706
4706
  maxFeePerGas: e == null ? void 0 : e.maxFeePerGas
4707
- }) : Mn.nodeMessage.test(n) ? new Mn({ cause: t, nonce: e == null ? void 0 : e.nonce }) : jn.nodeMessage.test(n) ? new jn({ cause: t, nonce: e == null ? void 0 : e.nonce }) : Bn.nodeMessage.test(n) ? new Bn({ cause: t, nonce: e == null ? void 0 : e.nonce }) : Nn.nodeMessage.test(n) ? new Nn({ cause: t }) : Fn.nodeMessage.test(n) ? new Fn({ cause: t, gas: e == null ? void 0 : e.gas }) : zn.nodeMessage.test(n) ? new zn({ cause: t, gas: e == null ? void 0 : e.gas }) : Ln.nodeMessage.test(n) ? new Ln({ cause: t }) : Xt.nodeMessage.test(n) ? new Xt({
4707
+ }) : Mn.nodeMessage.test(n) ? new Mn({ cause: t, nonce: e == null ? void 0 : e.nonce }) : jn.nodeMessage.test(n) ? new jn({ cause: t, nonce: e == null ? void 0 : e.nonce }) : Bn.nodeMessage.test(n) ? new Bn({ cause: t, nonce: e == null ? void 0 : e.nonce }) : Nn.nodeMessage.test(n) ? new Nn({ cause: t }) : Fn.nodeMessage.test(n) ? new Fn({ cause: t, gas: e == null ? void 0 : e.gas }) : zn.nodeMessage.test(n) ? new zn({ cause: t, gas: e == null ? void 0 : e.gas }) : Zn.nodeMessage.test(n) ? new Zn({ cause: t }) : Xt.nodeMessage.test(n) ? new Xt({
4708
4708
  cause: t,
4709
4709
  maxFeePerGas: e == null ? void 0 : e.maxFeePerGas,
4710
4710
  maxPriorityFeePerGas: e == null ? void 0 : e.maxPriorityFeePerGas
@@ -4712,12 +4712,12 @@ function sr(t, e) {
4712
4712
  cause: t
4713
4713
  });
4714
4714
  }
4715
- function Io(t, { docsPath: e, ...n }) {
4715
+ function So(t, { docsPath: e, ...n }) {
4716
4716
  const r = (() => {
4717
4717
  const s = sr(t, n);
4718
4718
  return s instanceof on ? t : s;
4719
4719
  })();
4720
- return new Co(r, {
4720
+ return new To(r, {
4721
4721
  docsPath: e,
4722
4722
  ...n
4723
4723
  });
@@ -4734,7 +4734,7 @@ function ar(t, { format: e }) {
4734
4734
  const s = e(t || {});
4735
4735
  return r(s), n;
4736
4736
  }
4737
- const So = {
4737
+ const Ro = {
4738
4738
  legacy: "0x0",
4739
4739
  eip2930: "0x1",
4740
4740
  eip1559: "0x2",
@@ -4743,9 +4743,9 @@ const So = {
4743
4743
  };
4744
4744
  function ir(t) {
4745
4745
  const e = {};
4746
- return typeof t.authorizationList < "u" && (e.authorizationList = Ro(t.authorizationList)), typeof t.accessList < "u" && (e.accessList = t.accessList), typeof t.blobVersionedHashes < "u" && (e.blobVersionedHashes = t.blobVersionedHashes), typeof t.blobs < "u" && (typeof t.blobs[0] != "string" ? e.blobs = t.blobs.map((n) => G(n)) : e.blobs = t.blobs), typeof t.data < "u" && (e.data = t.data), typeof t.from < "u" && (e.from = t.from), typeof t.gas < "u" && (e.gas = O(t.gas)), typeof t.gasPrice < "u" && (e.gasPrice = O(t.gasPrice)), typeof t.maxFeePerBlobGas < "u" && (e.maxFeePerBlobGas = O(t.maxFeePerBlobGas)), typeof t.maxFeePerGas < "u" && (e.maxFeePerGas = O(t.maxFeePerGas)), typeof t.maxPriorityFeePerGas < "u" && (e.maxPriorityFeePerGas = O(t.maxPriorityFeePerGas)), typeof t.nonce < "u" && (e.nonce = O(t.nonce)), typeof t.to < "u" && (e.to = t.to), typeof t.type < "u" && (e.type = So[t.type]), typeof t.value < "u" && (e.value = O(t.value)), e;
4746
+ return typeof t.authorizationList < "u" && (e.authorizationList = Oo(t.authorizationList)), typeof t.accessList < "u" && (e.accessList = t.accessList), typeof t.blobVersionedHashes < "u" && (e.blobVersionedHashes = t.blobVersionedHashes), typeof t.blobs < "u" && (typeof t.blobs[0] != "string" ? e.blobs = t.blobs.map((n) => G(n)) : e.blobs = t.blobs), typeof t.data < "u" && (e.data = t.data), typeof t.from < "u" && (e.from = t.from), typeof t.gas < "u" && (e.gas = O(t.gas)), typeof t.gasPrice < "u" && (e.gasPrice = O(t.gasPrice)), typeof t.maxFeePerBlobGas < "u" && (e.maxFeePerBlobGas = O(t.maxFeePerBlobGas)), typeof t.maxFeePerGas < "u" && (e.maxFeePerGas = O(t.maxFeePerGas)), typeof t.maxPriorityFeePerGas < "u" && (e.maxPriorityFeePerGas = O(t.maxPriorityFeePerGas)), typeof t.nonce < "u" && (e.nonce = O(t.nonce)), typeof t.to < "u" && (e.to = t.to), typeof t.type < "u" && (e.type = Ro[t.type]), typeof t.value < "u" && (e.value = O(t.value)), e;
4747
4747
  }
4748
- function Ro(t) {
4748
+ function Oo(t) {
4749
4749
  return t.map((e) => ({
4750
4750
  address: e.contractAddress,
4751
4751
  r: e.r,
@@ -4756,14 +4756,14 @@ function Ro(t) {
4756
4756
  ...typeof e.v < "u" && typeof e.yParity > "u" ? { v: O(e.v) } : {}
4757
4757
  }));
4758
4758
  }
4759
- function L(t, e, n) {
4759
+ function Z(t, e, n) {
4760
4760
  const r = t[e.name];
4761
4761
  if (typeof r == "function")
4762
4762
  return r;
4763
4763
  const s = t[n];
4764
4764
  return typeof s == "function" ? s : (a) => e(t, a);
4765
4765
  }
4766
- const Oo = 2n ** 256n - 1n;
4766
+ const Mo = 2n ** 256n - 1n;
4767
4767
  function un(t) {
4768
4768
  const { account: e, gasPrice: n, maxFeePerGas: r, maxPriorityFeePerGas: s, to: a } = t, i = e ? ue(e) : void 0;
4769
4769
  if (i && !Ee(i.address))
@@ -4771,8 +4771,8 @@ function un(t) {
4771
4771
  if (a && !Ee(a))
4772
4772
  throw new vt({ address: a });
4773
4773
  if (typeof n < "u" && (typeof r < "u" || typeof s < "u"))
4774
- throw new Eo();
4775
- if (r && r > Oo)
4774
+ throw new Ao();
4775
+ if (r && r > Mo)
4776
4776
  throw new Yt({ maxFeePerGas: r });
4777
4777
  if (s && r && s > r)
4778
4778
  throw new Xt({ maxFeePerGas: r, maxPriorityFeePerGas: s });
@@ -4783,7 +4783,7 @@ async function gs(t) {
4783
4783
  }, { dedupe: !0 });
4784
4784
  return He(e);
4785
4785
  }
4786
- class Mo extends y {
4786
+ class jo extends y {
4787
4787
  constructor() {
4788
4788
  super("`baseFeeMultiplier` must be greater than 1.", {
4789
4789
  name: "BaseFeeScalarError"
@@ -4797,25 +4797,25 @@ class or extends y {
4797
4797
  });
4798
4798
  }
4799
4799
  }
4800
- class jo extends y {
4800
+ class Bo extends y {
4801
4801
  constructor({ maxPriorityFeePerGas: e }) {
4802
4802
  super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${U(e)} gwei).`, { name: "MaxFeePerGasTooLowError" });
4803
4803
  }
4804
4804
  }
4805
- class Bo extends y {
4805
+ class No extends y {
4806
4806
  constructor({ blockHash: e, blockNumber: n }) {
4807
4807
  let r = "Block";
4808
4808
  e && (r = `Block at hash "${e}"`), n && (r = `Block at number "${n}"`), super(`${r} could not be found.`, { name: "BlockNotFoundError" });
4809
4809
  }
4810
4810
  }
4811
- const No = {
4811
+ const Fo = {
4812
4812
  "0x0": "legacy",
4813
4813
  "0x1": "eip2930",
4814
4814
  "0x2": "eip1559",
4815
4815
  "0x3": "eip4844",
4816
4816
  "0x4": "eip7702"
4817
4817
  };
4818
- function Fo(t) {
4818
+ function zo(t) {
4819
4819
  const e = {
4820
4820
  ...t,
4821
4821
  blockHash: t.blockHash ? t.blockHash : null,
@@ -4829,12 +4829,12 @@ function Fo(t) {
4829
4829
  nonce: t.nonce ? He(t.nonce) : void 0,
4830
4830
  to: t.to ? t.to : null,
4831
4831
  transactionIndex: t.transactionIndex ? Number(t.transactionIndex) : null,
4832
- type: t.type ? No[t.type] : void 0,
4832
+ type: t.type ? Fo[t.type] : void 0,
4833
4833
  typeHex: t.type ? t.type : void 0,
4834
4834
  value: t.value ? BigInt(t.value) : void 0,
4835
4835
  v: t.v ? BigInt(t.v) : void 0
4836
4836
  };
4837
- return t.authorizationList && (e.authorizationList = zo(t.authorizationList)), e.yParity = (() => {
4837
+ return t.authorizationList && (e.authorizationList = Zo(t.authorizationList)), e.yParity = (() => {
4838
4838
  if (t.yParity)
4839
4839
  return Number(t.yParity);
4840
4840
  if (typeof e.v == "bigint") {
@@ -4847,7 +4847,7 @@ function Fo(t) {
4847
4847
  }
4848
4848
  })(), e.type === "legacy" && (delete e.accessList, delete e.maxFeePerBlobGas, delete e.maxFeePerGas, delete e.maxPriorityFeePerGas, delete e.yParity), e.type === "eip2930" && (delete e.maxFeePerBlobGas, delete e.maxFeePerGas, delete e.maxPriorityFeePerGas), e.type === "eip1559" && delete e.maxFeePerBlobGas, e;
4849
4849
  }
4850
- function zo(t) {
4850
+ function Zo(t) {
4851
4851
  return t.map((e) => ({
4852
4852
  contractAddress: e.address,
4853
4853
  chainId: Number(e.chainId),
@@ -4858,7 +4858,7 @@ function zo(t) {
4858
4858
  }));
4859
4859
  }
4860
4860
  function Lo(t) {
4861
- const e = (t.transactions ?? []).map((n) => typeof n == "string" ? n : Fo(n));
4861
+ const e = (t.transactions ?? []).map((n) => typeof n == "string" ? n : zo(n));
4862
4862
  return {
4863
4863
  ...t,
4864
4864
  baseFeePerGas: t.baseFeePerGas ? BigInt(t.baseFeePerGas) : null,
@@ -4888,7 +4888,7 @@ async function Qt(t, { blockHash: e, blockNumber: n, blockTag: r, includeTransac
4888
4888
  method: "eth_getBlockByNumber",
4889
4889
  params: [o || a, i]
4890
4890
  }, { dedupe: !!o }), !u)
4891
- throw new Bo({ blockHash: e, blockNumber: n });
4891
+ throw new No({ blockHash: e, blockNumber: n });
4892
4892
  return (((f = (l = (d = t.chain) == null ? void 0 : d.formatters) == null ? void 0 : l.block) == null ? void 0 : f.format) || Lo)(u);
4893
4893
  }
4894
4894
  async function vs(t) {
@@ -4897,13 +4897,13 @@ async function vs(t) {
4897
4897
  });
4898
4898
  return BigInt(e);
4899
4899
  }
4900
- async function Zo(t, e) {
4900
+ async function Do(t, e) {
4901
4901
  var a, i;
4902
4902
  const { block: n, chain: r = t.chain, request: s } = e || {};
4903
4903
  try {
4904
4904
  const o = ((a = r == null ? void 0 : r.fees) == null ? void 0 : a.maxPriorityFeePerGas) ?? ((i = r == null ? void 0 : r.fees) == null ? void 0 : i.defaultPriorityFee);
4905
4905
  if (typeof o == "function") {
4906
- const c = n || await L(t, Qt, "getBlock")({}), d = await o({
4906
+ const c = n || await Z(t, Qt, "getBlock")({}), d = await o({
4907
4907
  block: c,
4908
4908
  client: t,
4909
4909
  request: s
@@ -4920,8 +4920,8 @@ async function Zo(t, e) {
4920
4920
  return gt(u);
4921
4921
  } catch {
4922
4922
  const [o, u] = await Promise.all([
4923
- n ? Promise.resolve(n) : L(t, Qt, "getBlock")({}),
4924
- L(t, vs, "getGasPrice")({})
4923
+ n ? Promise.resolve(n) : Z(t, Qt, "getBlock")({}),
4924
+ Z(t, vs, "getGasPrice")({})
4925
4925
  ]);
4926
4926
  if (typeof o.baseFeePerGas != "bigint")
4927
4927
  throw new or();
@@ -4932,16 +4932,16 @@ async function Zo(t, e) {
4932
4932
  async function Cr(t, e) {
4933
4933
  var f, m;
4934
4934
  const { block: n, chain: r = t.chain, request: s, type: a = "eip1559" } = e || {}, i = await (async () => {
4935
- var v, T;
4935
+ var v, $;
4936
4936
  return typeof ((v = r == null ? void 0 : r.fees) == null ? void 0 : v.baseFeeMultiplier) == "function" ? r.fees.baseFeeMultiplier({
4937
4937
  block: n,
4938
4938
  client: t,
4939
4939
  request: s
4940
- }) : ((T = r == null ? void 0 : r.fees) == null ? void 0 : T.baseFeeMultiplier) ?? 1.2;
4940
+ }) : (($ = r == null ? void 0 : r.fees) == null ? void 0 : $.baseFeeMultiplier) ?? 1.2;
4941
4941
  })();
4942
4942
  if (i < 1)
4943
- throw new Mo();
4944
- const u = 10 ** (((f = i.toString().split(".")[1]) == null ? void 0 : f.length) ?? 0), c = (v) => v * BigInt(Math.ceil(i * u)) / BigInt(u), d = n || await L(t, Qt, "getBlock")({});
4943
+ throw new jo();
4944
+ const u = 10 ** (((f = i.toString().split(".")[1]) == null ? void 0 : f.length) ?? 0), c = (v) => v * BigInt(Math.ceil(i * u)) / BigInt(u), d = n || await Z(t, Qt, "getBlock")({});
4945
4945
  if (typeof ((m = r == null ? void 0 : r.fees) == null ? void 0 : m.estimateFeesPerGas) == "function") {
4946
4946
  const v = await r.fees.estimateFeesPerGas({
4947
4947
  block: n,
@@ -4956,21 +4956,21 @@ async function Cr(t, e) {
4956
4956
  if (a === "eip1559") {
4957
4957
  if (typeof d.baseFeePerGas != "bigint")
4958
4958
  throw new or();
4959
- const v = typeof (s == null ? void 0 : s.maxPriorityFeePerGas) == "bigint" ? s.maxPriorityFeePerGas : await Zo(t, {
4959
+ const v = typeof (s == null ? void 0 : s.maxPriorityFeePerGas) == "bigint" ? s.maxPriorityFeePerGas : await Do(t, {
4960
4960
  block: d,
4961
4961
  chain: r,
4962
4962
  request: s
4963
- }), T = c(d.baseFeePerGas);
4963
+ }), $ = c(d.baseFeePerGas);
4964
4964
  return {
4965
- maxFeePerGas: (s == null ? void 0 : s.maxFeePerGas) ?? T + v,
4965
+ maxFeePerGas: (s == null ? void 0 : s.maxFeePerGas) ?? $ + v,
4966
4966
  maxPriorityFeePerGas: v
4967
4967
  };
4968
4968
  }
4969
4969
  return {
4970
- gasPrice: (s == null ? void 0 : s.gasPrice) ?? c(await L(t, vs, "getGasPrice")({}))
4970
+ gasPrice: (s == null ? void 0 : s.gasPrice) ?? c(await Z(t, vs, "getGasPrice")({}))
4971
4971
  };
4972
4972
  }
4973
- class Do extends y {
4973
+ class Vo extends y {
4974
4974
  constructor(e, { account: n, docsPath: r, chain: s, data: a, gas: i, gasPrice: o, maxFeePerGas: u, maxPriorityFeePerGas: c, nonce: d, to: l, value: f }) {
4975
4975
  var v;
4976
4976
  const m = Ft({
@@ -5001,35 +5001,35 @@ class Do extends y {
5001
5001
  }), this.cause = e;
5002
5002
  }
5003
5003
  }
5004
- function Vo(t, { docsPath: e, ...n }) {
5004
+ function Uo(t, { docsPath: e, ...n }) {
5005
5005
  const r = (() => {
5006
5006
  const s = sr(t, n);
5007
5007
  return s instanceof on ? t : s;
5008
5008
  })();
5009
- return new Do(r, {
5009
+ return new Vo(r, {
5010
5010
  docsPath: e,
5011
5011
  ...n
5012
5012
  });
5013
5013
  }
5014
- class Uo extends y {
5014
+ class Go extends y {
5015
5015
  constructor({ address: e }) {
5016
5016
  super(`State for account "${e}" is set multiple times.`, {
5017
5017
  name: "AccountStateConflictError"
5018
5018
  });
5019
5019
  }
5020
5020
  }
5021
- class Go extends y {
5021
+ class Ho extends y {
5022
5022
  constructor() {
5023
5023
  super("state and stateDiff are set on the same account.", {
5024
5024
  name: "StateAssignmentConflictError"
5025
5025
  });
5026
5026
  }
5027
5027
  }
5028
- function kr(t) {
5028
+ function Tr(t) {
5029
5029
  return t.reduce((e, { slot: n, value: r }) => `${e} ${n}: ${r}
5030
5030
  `, "");
5031
5031
  }
5032
- function Ho(t) {
5032
+ function qo(t) {
5033
5033
  return t.reduce((e, { address: n, ...r }) => {
5034
5034
  let s = `${e} ${n}:
5035
5035
  `;
@@ -5037,12 +5037,12 @@ function Ho(t) {
5037
5037
  `), r.balance && (s += ` balance: ${r.balance}
5038
5038
  `), r.code && (s += ` code: ${r.code}
5039
5039
  `), r.state && (s += ` state:
5040
- `, s += kr(r.state)), r.stateDiff && (s += ` stateDiff:
5041
- `, s += kr(r.stateDiff)), s;
5040
+ `, s += Tr(r.state)), r.stateDiff && (s += ` stateDiff:
5041
+ `, s += Tr(r.stateDiff)), s;
5042
5042
  }, ` State Override:
5043
5043
  `).slice(0, -1);
5044
5044
  }
5045
- function Tr(t) {
5045
+ function $r(t) {
5046
5046
  if (!(!t || t.length === 0))
5047
5047
  return t.reduce((e, { slot: n, value: r }) => {
5048
5048
  if (n.length !== 66)
@@ -5062,10 +5062,10 @@ function Tr(t) {
5062
5062
  }
5063
5063
  function Wo(t) {
5064
5064
  const { balance: e, nonce: n, state: r, stateDiff: s, code: a } = t, i = {};
5065
- if (a !== void 0 && (i.code = a), e !== void 0 && (i.balance = O(e)), n !== void 0 && (i.nonce = O(n)), r !== void 0 && (i.state = Tr(r)), s !== void 0) {
5065
+ if (a !== void 0 && (i.code = a), e !== void 0 && (i.balance = O(e)), n !== void 0 && (i.nonce = O(n)), r !== void 0 && (i.state = $r(r)), s !== void 0) {
5066
5066
  if (i.state)
5067
- throw new Go();
5068
- i.stateDiff = Tr(s);
5067
+ throw new Ho();
5068
+ i.stateDiff = $r(s);
5069
5069
  }
5070
5070
  return i;
5071
5071
  }
@@ -5077,37 +5077,37 @@ function ws(t) {
5077
5077
  if (!Ee(n, { strict: !1 }))
5078
5078
  throw new vt({ address: n });
5079
5079
  if (e[n])
5080
- throw new Uo({ address: n });
5080
+ throw new Go({ address: n });
5081
5081
  e[n] = Wo(r);
5082
5082
  }
5083
5083
  return e;
5084
5084
  }
5085
- async function qo(t, { address: e, blockNumber: n, blockTag: r = "latest" }) {
5085
+ async function Ko(t, { address: e, blockNumber: n, blockTag: r = "latest" }) {
5086
5086
  const s = n ? O(n) : void 0, a = await t.request({
5087
5087
  method: "eth_getBalance",
5088
5088
  params: [e, s || r]
5089
5089
  });
5090
5090
  return BigInt(a);
5091
5091
  }
5092
- async function Ko(t, e) {
5092
+ async function Jo(t, e) {
5093
5093
  var s, a, i;
5094
5094
  const { account: n = t.account } = e, r = n ? ue(n) : void 0;
5095
5095
  try {
5096
5096
  let de = function(V) {
5097
- const { block: X, request: J, rpcStateOverride: ke } = V;
5097
+ const { block: X, request: J, rpcStateOverride: Te } = V;
5098
5098
  return t.request({
5099
5099
  method: "eth_estimateGas",
5100
- params: ke ? [J, X ?? "latest", ke] : X ? [J, X] : [J]
5100
+ params: Te ? [J, X ?? "latest", Te] : X ? [J, X] : [J]
5101
5101
  });
5102
5102
  };
5103
- const { accessList: o, authorizationList: u, blobs: c, blobVersionedHashes: d, blockNumber: l, blockTag: f, data: m, gas: v, gasPrice: T, maxFeePerBlobGas: P, maxFeePerGas: S, maxPriorityFeePerGas: R, nonce: A, value: M, stateOverride: q, ...F } = await Cs(t, {
5103
+ const { accessList: o, authorizationList: u, blobs: c, blobVersionedHashes: d, blockNumber: l, blockTag: f, data: m, gas: v, gasPrice: $, maxFeePerBlobGas: P, maxFeePerGas: S, maxPriorityFeePerGas: R, nonce: A, value: M, stateOverride: W, ...F } = await Cs(t, {
5104
5104
  ...e,
5105
5105
  parameters: (
5106
5106
  // Some RPC Providers do not compute versioned hashes from blobs. We will need
5107
5107
  // to compute them.
5108
5108
  (r == null ? void 0 : r.type) === "local" ? void 0 : ["blobVersionedHashes"]
5109
5109
  )
5110
- }), re = (l ? O(l) : void 0) || f, C = ws(q), B = await (async () => {
5110
+ }), re = (l ? O(l) : void 0) || f, C = ws(W), B = await (async () => {
5111
5111
  if (F.to)
5112
5112
  return F.to;
5113
5113
  if (u && u.length > 0)
@@ -5128,7 +5128,7 @@ async function Ko(t, e) {
5128
5128
  blobVersionedHashes: d,
5129
5129
  data: m,
5130
5130
  gas: v,
5131
- gasPrice: T,
5131
+ gasPrice: $,
5132
5132
  maxFeePerBlobGas: P,
5133
5133
  maxFeePerGas: S,
5134
5134
  maxPriorityFeePerGas: R,
@@ -5138,32 +5138,32 @@ async function Ko(t, e) {
5138
5138
  });
5139
5139
  let se = BigInt(await de({ block: re, request: K, rpcStateOverride: C }));
5140
5140
  if (u) {
5141
- const V = await qo(t, { address: K.from }), X = await Promise.all(u.map(async (J) => {
5142
- const { contractAddress: ke } = J, Be = await de({
5141
+ const V = await Ko(t, { address: K.from }), X = await Promise.all(u.map(async (J) => {
5142
+ const { contractAddress: Te } = J, Be = await de({
5143
5143
  block: re,
5144
5144
  request: {
5145
5145
  authorizationList: void 0,
5146
5146
  data: m,
5147
5147
  from: r == null ? void 0 : r.address,
5148
- to: ke,
5148
+ to: Te,
5149
5149
  value: O(V)
5150
5150
  },
5151
5151
  rpcStateOverride: C
5152
5152
  }).catch(() => 100000n);
5153
5153
  return 2n * BigInt(Be);
5154
5154
  }));
5155
- se += X.reduce((J, ke) => J + ke, 0n);
5155
+ se += X.reduce((J, Te) => J + Te, 0n);
5156
5156
  }
5157
5157
  return se;
5158
5158
  } catch (o) {
5159
- throw Vo(o, {
5159
+ throw Uo(o, {
5160
5160
  ...e,
5161
5161
  account: r,
5162
5162
  chain: t.chain
5163
5163
  });
5164
5164
  }
5165
5165
  }
5166
- async function Jo(t, { address: e, blockTag: n = "latest", blockNumber: r }) {
5166
+ async function Yo(t, { address: e, blockTag: n = "latest", blockNumber: r }) {
5167
5167
  const s = await t.request({
5168
5168
  method: "eth_getTransactionCount",
5169
5169
  params: [e, r ? O(r) : n]
@@ -5184,27 +5184,27 @@ function _s(t) {
5184
5184
  }
5185
5185
  return n === "bytes" ? a : a.map((i) => G(i));
5186
5186
  }
5187
- function Yo(t, e) {
5188
- return fa(Pe(t, { strict: !1 }) ? Kn(t) : t);
5187
+ function Xo(t, e) {
5188
+ return ha(Pe(t, { strict: !1 }) ? Kn(t) : t);
5189
5189
  }
5190
- function Xo(t) {
5191
- const { commitment: e, version: n = 1 } = t, r = t.to ?? (typeof e == "string" ? "hex" : "bytes"), s = Yo(e);
5190
+ function Qo(t) {
5191
+ const { commitment: e, version: n = 1 } = t, r = t.to ?? (typeof e == "string" ? "hex" : "bytes"), s = Xo(e);
5192
5192
  return s.set([n], 0), r === "bytes" ? s : G(s);
5193
5193
  }
5194
- function Qo(t) {
5194
+ function ec(t) {
5195
5195
  const { commitments: e, version: n } = t, r = t.to ?? (typeof e[0] == "string" ? "hex" : "bytes"), s = [];
5196
5196
  for (const a of e)
5197
- s.push(Xo({
5197
+ s.push(Qo({
5198
5198
  commitment: a,
5199
5199
  to: r,
5200
5200
  version: n
5201
5201
  }));
5202
5202
  return s;
5203
5203
  }
5204
- const $r = 6, Ps = 32, cr = 4096, Es = Ps * cr, Ir = Es * $r - // terminator byte (0x80).
5204
+ const kr = 6, Ps = 32, cr = 4096, Es = Ps * cr, Ir = Es * kr - // terminator byte (0x80).
5205
5205
  1 - // zero byte (0x00) appended to each field element.
5206
- 1 * cr * $r;
5207
- class ec extends y {
5206
+ 1 * cr * kr;
5207
+ class tc extends y {
5208
5208
  constructor({ maxSize: e, size: n }) {
5209
5209
  super("Blob size is too large.", {
5210
5210
  metaMessages: [`Max: ${e} bytes`, `Given: ${n} bytes`],
@@ -5212,17 +5212,17 @@ class ec extends y {
5212
5212
  });
5213
5213
  }
5214
5214
  }
5215
- class tc extends y {
5215
+ class nc extends y {
5216
5216
  constructor() {
5217
5217
  super("Blob data must not be empty.", { name: "EmptyBlobError" });
5218
5218
  }
5219
5219
  }
5220
- function nc(t) {
5220
+ function rc(t) {
5221
5221
  const e = t.to ?? (typeof t.data == "string" ? "hex" : "bytes"), n = typeof t.data == "string" ? ye(t.data) : t.data, r = N(n);
5222
5222
  if (!r)
5223
- throw new tc();
5223
+ throw new nc();
5224
5224
  if (r > Ir)
5225
- throw new ec({
5225
+ throw new tc({
5226
5226
  maxSize: Ir,
5227
5227
  size: r
5228
5228
  });
@@ -5243,8 +5243,8 @@ function nc(t) {
5243
5243
  }
5244
5244
  return e === "bytes" ? s.map((o) => o.bytes) : s.map((o) => G(o.bytes));
5245
5245
  }
5246
- function rc(t) {
5247
- const { data: e, kzg: n, to: r } = t, s = t.blobs ?? nc({ data: e, to: r }), a = t.commitments ?? xs({ blobs: s, kzg: n, to: r }), i = t.proofs ?? _s({ blobs: s, commitments: a, kzg: n, to: r }), o = [];
5246
+ function sc(t) {
5247
+ const { data: e, kzg: n, to: r } = t, s = t.blobs ?? rc({ data: e, to: r }), a = t.commitments ?? xs({ blobs: s, kzg: n, to: r }), i = t.proofs ?? _s({ blobs: s, commitments: a, kzg: n, to: r }), o = [];
5248
5248
  for (let u = 0; u < s.length; u++)
5249
5249
  o.push({
5250
5250
  blob: s[u],
@@ -5253,7 +5253,7 @@ function rc(t) {
5253
5253
  });
5254
5254
  return o;
5255
5255
  }
5256
- function sc(t) {
5256
+ function ac(t) {
5257
5257
  if (t.type)
5258
5258
  return t.type;
5259
5259
  if (typeof t.authorizationList < "u")
@@ -5264,7 +5264,7 @@ function sc(t) {
5264
5264
  return "eip1559";
5265
5265
  if (typeof t.gasPrice < "u")
5266
5266
  return typeof t.accessList < "u" ? "eip2930" : "legacy";
5267
- throw new Ao({ transaction: t });
5267
+ throw new Co({ transaction: t });
5268
5268
  }
5269
5269
  const As = [
5270
5270
  "blobVersionedHashes",
@@ -5278,23 +5278,23 @@ async function Cs(t, e) {
5278
5278
  const { account: n = t.account, blobs: r, chain: s, gas: a, kzg: i, nonce: o, nonceManager: u, parameters: c = As, type: d } = e, l = n && ue(n), f = { ...e, ...l ? { from: l == null ? void 0 : l.address } : {} };
5279
5279
  let m;
5280
5280
  async function v() {
5281
- return m || (m = await L(t, Qt, "getBlock")({ blockTag: "latest" }), m);
5281
+ return m || (m = await Z(t, Qt, "getBlock")({ blockTag: "latest" }), m);
5282
5282
  }
5283
- let T;
5283
+ let $;
5284
5284
  async function P() {
5285
- return T || (s ? s.id : typeof e.chainId < "u" ? e.chainId : (T = await L(t, gs, "getChainId")({}), T));
5285
+ return $ || (s ? s.id : typeof e.chainId < "u" ? e.chainId : ($ = await Z(t, gs, "getChainId")({}), $));
5286
5286
  }
5287
5287
  if ((c.includes("blobVersionedHashes") || c.includes("sidecars")) && r && i) {
5288
5288
  const S = xs({ blobs: r, kzg: i });
5289
5289
  if (c.includes("blobVersionedHashes")) {
5290
- const R = Qo({
5290
+ const R = ec({
5291
5291
  commitments: S,
5292
5292
  to: "hex"
5293
5293
  });
5294
5294
  f.blobVersionedHashes = R;
5295
5295
  }
5296
5296
  if (c.includes("sidecars")) {
5297
- const R = _s({ blobs: r, commitments: S, kzg: i }), A = rc({
5297
+ const R = _s({ blobs: r, commitments: S, kzg: i }), A = sc({
5298
5298
  blobs: r,
5299
5299
  commitments: S,
5300
5300
  proofs: R,
@@ -5312,13 +5312,13 @@ async function Cs(t, e) {
5312
5312
  client: t
5313
5313
  });
5314
5314
  } else
5315
- f.nonce = await L(t, Jo, "getTransactionCount")({
5315
+ f.nonce = await Z(t, Yo, "getTransactionCount")({
5316
5316
  address: l.address,
5317
5317
  blockTag: "pending"
5318
5318
  });
5319
5319
  if ((c.includes("fees") || c.includes("type")) && typeof d > "u")
5320
5320
  try {
5321
- f.type = sc(f);
5321
+ f.type = ac(f);
5322
5322
  } catch {
5323
5323
  const S = await v();
5324
5324
  f.type = typeof (S == null ? void 0 : S.baseFeePerGas) == "bigint" ? "eip1559" : "legacy";
@@ -5332,7 +5332,7 @@ async function Cs(t, e) {
5332
5332
  request: f
5333
5333
  });
5334
5334
  if (typeof e.maxPriorityFeePerGas > "u" && e.maxFeePerGas && e.maxFeePerGas < A)
5335
- throw new jo({
5335
+ throw new Bo({
5336
5336
  maxPriorityFeePerGas: A
5337
5337
  });
5338
5338
  f.maxPriorityFeePerGas = A, f.maxFeePerGas = R;
@@ -5348,21 +5348,21 @@ async function Cs(t, e) {
5348
5348
  });
5349
5349
  f.gasPrice = R;
5350
5350
  }
5351
- return c.includes("gas") && typeof a > "u" && (f.gas = await L(t, Ko, "estimateGas")({
5351
+ return c.includes("gas") && typeof a > "u" && (f.gas = await Z(t, Jo, "estimateGas")({
5352
5352
  ...f,
5353
5353
  account: l && { address: l.address, type: "json-rpc" }
5354
5354
  })), un(f), delete f.parameters, f;
5355
5355
  }
5356
- async function ac(t, { serializedTransaction: e }) {
5356
+ async function ic(t, { serializedTransaction: e }) {
5357
5357
  return t.request({
5358
5358
  method: "eth_sendRawTransaction",
5359
5359
  params: [e]
5360
5360
  }, { retryCount: 0 });
5361
5361
  }
5362
5362
  const vn = new sn(128);
5363
- async function ic(t, e) {
5363
+ async function oc(t, e) {
5364
5364
  var S, R, A, M;
5365
- const { account: n = t.account, chain: r = t.chain, accessList: s, authorizationList: a, blobs: i, data: o, gas: u, gasPrice: c, maxFeePerBlobGas: d, maxFeePerGas: l, maxPriorityFeePerGas: f, nonce: m, value: v, ...T } = e;
5365
+ const { account: n = t.account, chain: r = t.chain, accessList: s, authorizationList: a, blobs: i, data: o, gas: u, gasPrice: c, maxFeePerBlobGas: d, maxFeePerGas: l, maxPriorityFeePerGas: f, nonce: m, value: v, ...$ } = e;
5366
5366
  if (typeof n > "u")
5367
5367
  throw new us({
5368
5368
  docsPath: "/docs/actions/wallet/sendTransaction"
@@ -5370,7 +5370,7 @@ async function ic(t, e) {
5370
5370
  const P = n ? ue(n) : null;
5371
5371
  try {
5372
5372
  un(e);
5373
- const q = await (async () => {
5373
+ const W = await (async () => {
5374
5374
  if (e.to)
5375
5375
  return e.to;
5376
5376
  if (a && a.length > 0)
@@ -5382,13 +5382,13 @@ async function ic(t, e) {
5382
5382
  })();
5383
5383
  if ((P == null ? void 0 : P.type) === "json-rpc" || P === null) {
5384
5384
  let F;
5385
- r !== null && (F = await L(t, gs, "getChainId")({}), xo({
5385
+ r !== null && (F = await Z(t, gs, "getChainId")({}), _o({
5386
5386
  currentChainId: F,
5387
5387
  chain: r
5388
5388
  }));
5389
5389
  const Y = (A = (R = (S = t.chain) == null ? void 0 : S.formatters) == null ? void 0 : R.transactionRequest) == null ? void 0 : A.format, C = (Y || ir)({
5390
5390
  // Pick out extra data that might exist on the chain's transaction request type.
5391
- ...ar(T, { format: Y }),
5391
+ ...ar($, { format: Y }),
5392
5392
  accessList: s,
5393
5393
  authorizationList: a,
5394
5394
  blobs: i,
@@ -5401,7 +5401,7 @@ async function ic(t, e) {
5401
5401
  maxFeePerGas: l,
5402
5402
  maxPriorityFeePerGas: f,
5403
5403
  nonce: m,
5404
- to: q,
5404
+ to: W,
5405
5405
  value: v
5406
5406
  }), B = vn.get(t.uid), Ce = B ? "wallet_sendTransaction" : "eth_sendTransaction";
5407
5407
  try {
@@ -5425,7 +5425,7 @@ async function ic(t, e) {
5425
5425
  }
5426
5426
  }
5427
5427
  if ((P == null ? void 0 : P.type) === "local") {
5428
- const F = await L(t, Cs, "prepareTransactionRequest")({
5428
+ const F = await Z(t, Cs, "prepareTransactionRequest")({
5429
5429
  account: P,
5430
5430
  accessList: s,
5431
5431
  authorizationList: a,
@@ -5441,12 +5441,12 @@ async function ic(t, e) {
5441
5441
  nonceManager: P.nonceManager,
5442
5442
  parameters: [...As, "sidecars"],
5443
5443
  value: v,
5444
- ...T,
5445
- to: q
5444
+ ...$,
5445
+ to: W
5446
5446
  }), Y = (M = r == null ? void 0 : r.serializers) == null ? void 0 : M.transaction, re = await P.signTransaction(F, {
5447
5447
  serializer: Y
5448
5448
  });
5449
- return await L(t, ac, "sendRawTransaction")({
5449
+ return await Z(t, ic, "sendRawTransaction")({
5450
5450
  serializedTransaction: re
5451
5451
  });
5452
5452
  }
@@ -5460,8 +5460,8 @@ async function ic(t, e) {
5460
5460
  docsPath: "/docs/actions/wallet/sendTransaction",
5461
5461
  type: P == null ? void 0 : P.type
5462
5462
  });
5463
- } catch (q) {
5464
- throw q instanceof gn ? q : Io(q, {
5463
+ } catch (W) {
5464
+ throw W instanceof gn ? W : So(W, {
5465
5465
  ...e,
5466
5466
  account: P,
5467
5467
  chain: e.chain || void 0
@@ -5511,15 +5511,15 @@ const Sr = [
5511
5511
  type: "function"
5512
5512
  }
5513
5513
  ];
5514
- function oc(t, e = {}) {
5514
+ function cc(t, e = {}) {
5515
5515
  typeof e.size < "u" && ce(t, { size: e.size });
5516
5516
  const n = G(t, e);
5517
5517
  return gt(n, e);
5518
5518
  }
5519
- function cc(t, e = {}) {
5519
+ function uc(t, e = {}) {
5520
5520
  let n = t;
5521
- if (typeof e.size < "u" && (ce(n, { size: e.size }), n = qn(n)), n.length > 1 || n[0] > 1)
5522
- throw new $i(n);
5521
+ if (typeof e.size < "u" && (ce(n, { size: e.size }), n = Wn(n)), n.length > 1 || n[0] > 1)
5522
+ throw new Ii(n);
5523
5523
  return !!n[0];
5524
5524
  }
5525
5525
  function pe(t, e = {}) {
@@ -5527,16 +5527,16 @@ function pe(t, e = {}) {
5527
5527
  const n = G(t, e);
5528
5528
  return He(n, e);
5529
5529
  }
5530
- function uc(t, e = {}) {
5530
+ function dc(t, e = {}) {
5531
5531
  let n = t;
5532
- return typeof e.size < "u" && (ce(n, { size: e.size }), n = qn(n, { dir: "right" })), new TextDecoder().decode(n);
5532
+ return typeof e.size < "u" && (ce(n, { size: e.size }), n = Wn(n, { dir: "right" })), new TextDecoder().decode(n);
5533
5533
  }
5534
- function ks(t, e) {
5534
+ function Ts(t, e) {
5535
5535
  const n = typeof e == "string" ? ye(e) : e, r = nr(n);
5536
5536
  if (N(n) === 0 && t.length > 0)
5537
5537
  throw new Xn();
5538
5538
  if (N(e) && N(e) < 32)
5539
- throw new zi({
5539
+ throw new Zi({
5540
5540
  data: typeof e == "string" ? e : G(e),
5541
5541
  params: t,
5542
5542
  size: N(e)
@@ -5557,47 +5557,47 @@ function De(t, e, { staticPosition: n }) {
5557
5557
  const r = tr(e.type);
5558
5558
  if (r) {
5559
5559
  const [s, a] = r;
5560
- return lc(t, { ...e, type: a }, { length: s, staticPosition: n });
5560
+ return fc(t, { ...e, type: a }, { length: s, staticPosition: n });
5561
5561
  }
5562
5562
  if (e.type === "tuple")
5563
- return mc(t, e, { staticPosition: n });
5563
+ return yc(t, e, { staticPosition: n });
5564
5564
  if (e.type === "address")
5565
- return dc(t);
5565
+ return lc(t);
5566
5566
  if (e.type === "bool")
5567
- return fc(t);
5567
+ return hc(t);
5568
5568
  if (e.type.startsWith("bytes"))
5569
- return hc(t, e, { staticPosition: n });
5569
+ return pc(t, e, { staticPosition: n });
5570
5570
  if (e.type.startsWith("uint") || e.type.startsWith("int"))
5571
- return pc(t, e);
5571
+ return mc(t, e);
5572
5572
  if (e.type === "string")
5573
- return yc(t, { staticPosition: n });
5574
- throw new Hi(e.type, {
5573
+ return bc(t, { staticPosition: n });
5574
+ throw new qi(e.type, {
5575
5575
  docsPath: "/docs/contract/decodeAbiParameters"
5576
5576
  });
5577
5577
  }
5578
- const Rr = 32, Zn = 32;
5579
- function dc(t) {
5578
+ const Rr = 32, Ln = 32;
5579
+ function lc(t) {
5580
5580
  const e = t.readBytes(32);
5581
5581
  return [an(G(is(e, -20))), 32];
5582
5582
  }
5583
- function lc(t, e, { length: n, staticPosition: r }) {
5583
+ function fc(t, e, { length: n, staticPosition: r }) {
5584
5584
  if (!n) {
5585
- const i = pe(t.readBytes(Zn)), o = r + i, u = o + Rr;
5585
+ const i = pe(t.readBytes(Ln)), o = r + i, u = o + Rr;
5586
5586
  t.setPosition(o);
5587
5587
  const c = pe(t.readBytes(Rr)), d = jt(e);
5588
5588
  let l = 0;
5589
5589
  const f = [];
5590
5590
  for (let m = 0; m < c; ++m) {
5591
5591
  t.setPosition(u + (d ? m * 32 : l));
5592
- const [v, T] = De(t, e, {
5592
+ const [v, $] = De(t, e, {
5593
5593
  staticPosition: u
5594
5594
  });
5595
- l += T, f.push(v);
5595
+ l += $, f.push(v);
5596
5596
  }
5597
5597
  return t.setPosition(r + 32), [f, 32];
5598
5598
  }
5599
5599
  if (jt(e)) {
5600
- const i = pe(t.readBytes(Zn)), o = r + i, u = [];
5600
+ const i = pe(t.readBytes(Ln)), o = r + i, u = [];
5601
5601
  for (let c = 0; c < n; ++c) {
5602
5602
  t.setPosition(o + c * 32);
5603
5603
  const [d] = De(t, e, {
@@ -5617,10 +5617,10 @@ function lc(t, e, { length: n, staticPosition: r }) {
5617
5617
  }
5618
5618
  return [a, s];
5619
5619
  }
5620
- function fc(t) {
5621
- return [cc(t.readBytes(32), { size: 32 }), 32];
5620
+ function hc(t) {
5621
+ return [uc(t.readBytes(32), { size: 32 }), 32];
5622
5622
  }
5623
- function hc(t, e, { staticPosition: n }) {
5623
+ function pc(t, e, { staticPosition: n }) {
5624
5624
  const [r, s] = e.type.split("bytes");
5625
5625
  if (!s) {
5626
5626
  const i = pe(t.readBytes(32));
@@ -5633,18 +5633,18 @@ function hc(t, e, { staticPosition: n }) {
5633
5633
  }
5634
5634
  return [G(t.readBytes(Number.parseInt(s), 32)), 32];
5635
5635
  }
5636
- function pc(t, e) {
5636
+ function mc(t, e) {
5637
5637
  const n = e.type.startsWith("int"), r = Number.parseInt(e.type.split("int")[1] || "256"), s = t.readBytes(32);
5638
5638
  return [
5639
- r > 48 ? oc(s, { signed: n }) : pe(s, { signed: n }),
5639
+ r > 48 ? cc(s, { signed: n }) : pe(s, { signed: n }),
5640
5640
  32
5641
5641
  ];
5642
5642
  }
5643
- function mc(t, e, { staticPosition: n }) {
5643
+ function yc(t, e, { staticPosition: n }) {
5644
5644
  const r = e.components.length === 0 || e.components.some(({ name: i }) => !i), s = r ? [] : {};
5645
5645
  let a = 0;
5646
5646
  if (jt(e)) {
5647
- const i = pe(t.readBytes(Zn)), o = n + i;
5647
+ const i = pe(t.readBytes(Ln)), o = n + i;
5648
5648
  for (let u = 0; u < e.components.length; ++u) {
5649
5649
  const c = e.components[u];
5650
5650
  t.setPosition(o + a);
@@ -5663,13 +5663,13 @@ function mc(t, e, { staticPosition: n }) {
5663
5663
  }
5664
5664
  return [s, a];
5665
5665
  }
5666
- function yc(t, { staticPosition: e }) {
5666
+ function bc(t, { staticPosition: e }) {
5667
5667
  const n = pe(t.readBytes(32)), r = e + n;
5668
5668
  t.setPosition(r);
5669
5669
  const s = pe(t.readBytes(32));
5670
5670
  if (s === 0)
5671
5671
  return t.setPosition(e + 32), ["", 32];
5672
- const a = t.readBytes(s, 32), i = uc(qn(a));
5672
+ const a = t.readBytes(s, 32), i = dc(Wn(a));
5673
5673
  return t.setPosition(e + 32), [i, 32];
5674
5674
  }
5675
5675
  function jt(t) {
@@ -5682,11 +5682,11 @@ function jt(t) {
5682
5682
  const n = tr(t.type);
5683
5683
  return !!(n && jt({ ...t, type: n[1] }));
5684
5684
  }
5685
- const bc = (t) => Nt(Kn(t));
5686
- function gc(t) {
5687
- return bc(t);
5685
+ const gc = (t) => Nt(Kn(t));
5686
+ function vc(t) {
5687
+ return gc(t);
5688
5688
  }
5689
- const vc = "1.0.7";
5689
+ const wc = "1.0.7";
5690
5690
  class D extends Error {
5691
5691
  constructor(e, n = {}) {
5692
5692
  var i;
@@ -5696,7 +5696,7 @@ class D extends Error {
5696
5696
  ...n.metaMessages ? [...n.metaMessages, ""] : [],
5697
5697
  ...s ? [`Docs: https://abitype.dev${s}`] : [],
5698
5698
  ...r ? [`Details: ${r}`] : [],
5699
- `Version: abitype@${vc}`
5699
+ `Version: abitype@${wc}`
5700
5700
  ].join(`
5701
5701
  `);
5702
5702
  super(a), Object.defineProperty(this, "details", {
@@ -5731,7 +5731,7 @@ function Ae(t, e) {
5731
5731
  const n = t.exec(e);
5732
5732
  return n == null ? void 0 : n.groups;
5733
5733
  }
5734
- const Ts = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, $s = /^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)?$/, Is = /^\(.+?\).*?$/, Or = /^tuple(?<array>(\[(\d*)\])*)$/;
5734
+ const $s = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, ks = /^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)?$/, Is = /^\(.+?\).*?$/, Or = /^tuple(?<array>(\[(\d*)\])*)$/;
5735
5735
  function Dn(t) {
5736
5736
  let e = t.type;
5737
5737
  if (Or.test(t.type) && "components" in t) {
@@ -5758,59 +5758,59 @@ function Qe(t) {
5758
5758
  }
5759
5759
  return e;
5760
5760
  }
5761
- function wc(t) {
5761
+ function xc(t) {
5762
5762
  var e;
5763
5763
  return t.type === "function" ? `function ${t.name}(${Qe(t.inputs)})${t.stateMutability && t.stateMutability !== "nonpayable" ? ` ${t.stateMutability}` : ""}${(e = t.outputs) != null && e.length ? ` returns (${Qe(t.outputs)})` : ""}` : t.type === "event" ? `event ${t.name}(${Qe(t.inputs)})` : t.type === "error" ? `error ${t.name}(${Qe(t.inputs)})` : t.type === "constructor" ? `constructor(${Qe(t.inputs)})${t.stateMutability === "payable" ? " payable" : ""}` : t.type === "fallback" ? `fallback() external${t.stateMutability === "payable" ? " payable" : ""}` : "receive() external payable";
5764
5764
  }
5765
5765
  const Ss = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
5766
- function xc(t) {
5766
+ function _c(t) {
5767
5767
  return Ss.test(t);
5768
5768
  }
5769
- function _c(t) {
5769
+ function Pc(t) {
5770
5770
  return Ae(Ss, t);
5771
5771
  }
5772
5772
  const Rs = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
5773
- function Pc(t) {
5773
+ function Ec(t) {
5774
5774
  return Rs.test(t);
5775
5775
  }
5776
- function Ec(t) {
5776
+ function Ac(t) {
5777
5777
  return Ae(Rs, t);
5778
5778
  }
5779
5779
  const Os = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;
5780
- function Ac(t) {
5780
+ function Cc(t) {
5781
5781
  return Os.test(t);
5782
5782
  }
5783
- function Cc(t) {
5783
+ function Tc(t) {
5784
5784
  return Ae(Os, t);
5785
5785
  }
5786
5786
  const Ms = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
5787
5787
  function js(t) {
5788
5788
  return Ms.test(t);
5789
5789
  }
5790
- function kc(t) {
5790
+ function $c(t) {
5791
5791
  return Ae(Ms, t);
5792
5792
  }
5793
5793
  const Bs = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
5794
- function Tc(t) {
5794
+ function kc(t) {
5795
5795
  return Bs.test(t);
5796
5796
  }
5797
- function $c(t) {
5797
+ function Ic(t) {
5798
5798
  return Ae(Bs, t);
5799
5799
  }
5800
- const Ic = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;
5801
- function Sc(t) {
5802
- return Ic.test(t);
5800
+ const Sc = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;
5801
+ function Rc(t) {
5802
+ return Sc.test(t);
5803
5803
  }
5804
- const Rc = /^receive\(\) external payable$/;
5805
- function Oc(t) {
5806
- return Rc.test(t);
5804
+ const Oc = /^receive\(\) external payable$/;
5805
+ function Mc(t) {
5806
+ return Oc.test(t);
5807
5807
  }
5808
- const Mc = /* @__PURE__ */ new Set(["indexed"]), Vn = /* @__PURE__ */ new Set([
5808
+ const jc = /* @__PURE__ */ new Set(["indexed"]), Vn = /* @__PURE__ */ new Set([
5809
5809
  "calldata",
5810
5810
  "memory",
5811
5811
  "storage"
5812
5812
  ]);
5813
- class jc extends D {
5813
+ class Bc extends D {
5814
5814
  constructor({ type: e }) {
5815
5815
  super("Unknown type.", {
5816
5816
  metaMessages: [
@@ -5824,7 +5824,7 @@ class jc extends D {
5824
5824
  });
5825
5825
  }
5826
5826
  }
5827
- class Bc extends D {
5827
+ class Nc extends D {
5828
5828
  constructor({ type: e }) {
5829
5829
  super("Unknown type.", {
5830
5830
  metaMessages: [`Type "${e}" is not a valid ABI type.`]
@@ -5836,7 +5836,7 @@ class Bc extends D {
5836
5836
  });
5837
5837
  }
5838
5838
  }
5839
- class Nc extends D {
5839
+ class Fc extends D {
5840
5840
  constructor({ param: e }) {
5841
5841
  super("Invalid ABI parameter.", {
5842
5842
  details: e
@@ -5848,7 +5848,7 @@ class Nc extends D {
5848
5848
  });
5849
5849
  }
5850
5850
  }
5851
- class Fc extends D {
5851
+ class zc extends D {
5852
5852
  constructor({ param: e, name: n }) {
5853
5853
  super("Invalid ABI parameter.", {
5854
5854
  details: e,
@@ -5863,7 +5863,7 @@ class Fc extends D {
5863
5863
  });
5864
5864
  }
5865
5865
  }
5866
- class zc extends D {
5866
+ class Zc extends D {
5867
5867
  constructor({ param: e, type: n, modifier: r }) {
5868
5868
  super("Invalid ABI parameter.", {
5869
5869
  details: e,
@@ -5894,7 +5894,7 @@ class Lc extends D {
5894
5894
  });
5895
5895
  }
5896
5896
  }
5897
- class Zc extends D {
5897
+ class Dc extends D {
5898
5898
  constructor({ abiParameter: e }) {
5899
5899
  super("Invalid ABI parameter.", {
5900
5900
  details: JSON.stringify(e, null, 2),
@@ -5919,7 +5919,7 @@ class rt extends D {
5919
5919
  });
5920
5920
  }
5921
5921
  }
5922
- class Dc extends D {
5922
+ class Vc extends D {
5923
5923
  constructor({ signature: e }) {
5924
5924
  super("Unknown signature.", {
5925
5925
  details: e
@@ -5931,7 +5931,7 @@ class Dc extends D {
5931
5931
  });
5932
5932
  }
5933
5933
  }
5934
- class Vc extends D {
5934
+ class Uc extends D {
5935
5935
  constructor({ signature: e }) {
5936
5936
  super("Invalid struct signature.", {
5937
5937
  details: e,
@@ -5944,7 +5944,7 @@ class Vc extends D {
5944
5944
  });
5945
5945
  }
5946
5946
  }
5947
- class Uc extends D {
5947
+ class Gc extends D {
5948
5948
  constructor({ type: e }) {
5949
5949
  super("Circular reference detected.", {
5950
5950
  metaMessages: [`Struct "${e}" is a circular reference.`]
@@ -5956,7 +5956,7 @@ class Uc extends D {
5956
5956
  });
5957
5957
  }
5958
5958
  }
5959
- class Gc extends D {
5959
+ class Hc extends D {
5960
5960
  constructor({ current: e, depth: n }) {
5961
5961
  super("Unbalanced parentheses.", {
5962
5962
  metaMessages: [
@@ -5971,7 +5971,7 @@ class Gc extends D {
5971
5971
  });
5972
5972
  }
5973
5973
  }
5974
- function Hc(t, e, n) {
5974
+ function qc(t, e, n) {
5975
5975
  let r = "";
5976
5976
  if (n)
5977
5977
  for (const s of Object.entries(n)) {
@@ -6039,13 +6039,13 @@ const wn = /* @__PURE__ */ new Map([
6039
6039
  ]
6040
6040
  ]);
6041
6041
  function Wc(t, e = {}) {
6042
- if (Ac(t)) {
6043
- const n = Cc(t);
6042
+ if (Cc(t)) {
6043
+ const n = Tc(t);
6044
6044
  if (!n)
6045
6045
  throw new rt({ signature: t, type: "function" });
6046
6046
  const r = Q(n.parameters), s = [], a = r.length;
6047
6047
  for (let o = 0; o < a; o++)
6048
- s.push(Te(r[o], {
6048
+ s.push($e(r[o], {
6049
6049
  modifiers: Vn,
6050
6050
  structs: e,
6051
6051
  type: "function"
@@ -6054,7 +6054,7 @@ function Wc(t, e = {}) {
6054
6054
  if (n.returns) {
6055
6055
  const o = Q(n.returns), u = o.length;
6056
6056
  for (let c = 0; c < u; c++)
6057
- i.push(Te(o[c], {
6057
+ i.push($e(o[c], {
6058
6058
  modifiers: Vn,
6059
6059
  structs: e,
6060
6060
  type: "function"
@@ -6068,83 +6068,83 @@ function Wc(t, e = {}) {
6068
6068
  outputs: i
6069
6069
  };
6070
6070
  }
6071
- if (Pc(t)) {
6072
- const n = Ec(t);
6071
+ if (Ec(t)) {
6072
+ const n = Ac(t);
6073
6073
  if (!n)
6074
6074
  throw new rt({ signature: t, type: "event" });
6075
6075
  const r = Q(n.parameters), s = [], a = r.length;
6076
6076
  for (let i = 0; i < a; i++)
6077
- s.push(Te(r[i], {
6078
- modifiers: Mc,
6077
+ s.push($e(r[i], {
6078
+ modifiers: jc,
6079
6079
  structs: e,
6080
6080
  type: "event"
6081
6081
  }));
6082
6082
  return { name: n.name, type: "event", inputs: s };
6083
6083
  }
6084
- if (xc(t)) {
6085
- const n = _c(t);
6084
+ if (_c(t)) {
6085
+ const n = Pc(t);
6086
6086
  if (!n)
6087
6087
  throw new rt({ signature: t, type: "error" });
6088
6088
  const r = Q(n.parameters), s = [], a = r.length;
6089
6089
  for (let i = 0; i < a; i++)
6090
- s.push(Te(r[i], { structs: e, type: "error" }));
6090
+ s.push($e(r[i], { structs: e, type: "error" }));
6091
6091
  return { name: n.name, type: "error", inputs: s };
6092
6092
  }
6093
- if (Tc(t)) {
6094
- const n = $c(t);
6093
+ if (kc(t)) {
6094
+ const n = Ic(t);
6095
6095
  if (!n)
6096
6096
  throw new rt({ signature: t, type: "constructor" });
6097
6097
  const r = Q(n.parameters), s = [], a = r.length;
6098
6098
  for (let i = 0; i < a; i++)
6099
- s.push(Te(r[i], { structs: e, type: "constructor" }));
6099
+ s.push($e(r[i], { structs: e, type: "constructor" }));
6100
6100
  return {
6101
6101
  type: "constructor",
6102
6102
  stateMutability: n.stateMutability ?? "nonpayable",
6103
6103
  inputs: s
6104
6104
  };
6105
6105
  }
6106
- if (Sc(t))
6106
+ if (Rc(t))
6107
6107
  return { type: "fallback" };
6108
- if (Oc(t))
6108
+ if (Mc(t))
6109
6109
  return {
6110
6110
  type: "receive",
6111
6111
  stateMutability: "payable"
6112
6112
  };
6113
- throw new Dc({ signature: t });
6113
+ throw new Vc({ signature: t });
6114
6114
  }
6115
- const qc = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Kc = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Jc = /^u?int$/;
6116
- function Te(t, e) {
6115
+ const Kc = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Jc = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Yc = /^u?int$/;
6116
+ function $e(t, e) {
6117
6117
  var l, f;
6118
- const n = Hc(t, e == null ? void 0 : e.type, e == null ? void 0 : e.structs);
6118
+ const n = qc(t, e == null ? void 0 : e.type, e == null ? void 0 : e.structs);
6119
6119
  if (wn.has(n))
6120
6120
  return wn.get(n);
6121
- const r = Is.test(t), s = Ae(r ? Kc : qc, t);
6121
+ const r = Is.test(t), s = Ae(r ? Jc : Kc, t);
6122
6122
  if (!s)
6123
- throw new Nc({ param: t });
6124
- if (s.name && Xc(s.name))
6125
- throw new Fc({ param: t, name: s.name });
6123
+ throw new Fc({ param: t });
6124
+ if (s.name && Qc(s.name))
6125
+ throw new zc({ param: t, name: s.name });
6126
6126
  const a = s.name ? { name: s.name } : {}, i = s.modifier === "indexed" ? { indexed: !0 } : {}, o = (e == null ? void 0 : e.structs) ?? {};
6127
6127
  let u, c = {};
6128
6128
  if (r) {
6129
6129
  u = "tuple";
6130
- const m = Q(s.type), v = [], T = m.length;
6131
- for (let P = 0; P < T; P++)
6132
- v.push(Te(m[P], { structs: o }));
6130
+ const m = Q(s.type), v = [], $ = m.length;
6131
+ for (let P = 0; P < $; P++)
6132
+ v.push($e(m[P], { structs: o }));
6133
6133
  c = { components: v };
6134
6134
  } else if (s.type in o)
6135
6135
  u = "tuple", c = { components: o[s.type] };
6136
- else if (Jc.test(s.type))
6136
+ else if (Yc.test(s.type))
6137
6137
  u = `${s.type}256`;
6138
6138
  else if (u = s.type, (e == null ? void 0 : e.type) !== "struct" && !Ns(u))
6139
- throw new Bc({ type: u });
6139
+ throw new Nc({ type: u });
6140
6140
  if (s.modifier) {
6141
6141
  if (!((f = (l = e == null ? void 0 : e.modifiers) == null ? void 0 : l.has) != null && f.call(l, s.modifier)))
6142
- throw new zc({
6142
+ throw new Zc({
6143
6143
  param: t,
6144
6144
  type: e == null ? void 0 : e.type,
6145
6145
  modifier: s.modifier
6146
6146
  });
6147
- if (Vn.has(s.modifier) && !Qc(u, !!s.array))
6147
+ if (Vn.has(s.modifier) && !eu(u, !!s.array))
6148
6148
  throw new Lc({
6149
6149
  param: t,
6150
6150
  type: e == null ? void 0 : e.type,
@@ -6177,26 +6177,26 @@ function Q(t, e = [], n = "", r = 0) {
6177
6177
  if (n === "")
6178
6178
  return e;
6179
6179
  if (r !== 0)
6180
- throw new Gc({ current: n, depth: r });
6180
+ throw new Hc({ current: n, depth: r });
6181
6181
  return e.push(n.trim()), e;
6182
6182
  }
6183
6183
  function Ns(t) {
6184
- return t === "address" || t === "bool" || t === "function" || t === "string" || Ts.test(t) || $s.test(t);
6184
+ return t === "address" || t === "bool" || t === "function" || t === "string" || $s.test(t) || ks.test(t);
6185
6185
  }
6186
- const Yc = /^(?: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)$/;
6187
- function Xc(t) {
6188
- return t === "address" || t === "bool" || t === "function" || t === "string" || t === "tuple" || Ts.test(t) || $s.test(t) || Yc.test(t);
6186
+ const Xc = /^(?: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)$/;
6187
+ function Qc(t) {
6188
+ return t === "address" || t === "bool" || t === "function" || t === "string" || t === "tuple" || $s.test(t) || ks.test(t) || Xc.test(t);
6189
6189
  }
6190
- function Qc(t, e) {
6190
+ function eu(t, e) {
6191
6191
  return e || t === "bytes" || t === "string" || t === "tuple";
6192
6192
  }
6193
- function eu(t) {
6193
+ function tu(t) {
6194
6194
  const e = {}, n = t.length;
6195
6195
  for (let i = 0; i < n; i++) {
6196
6196
  const o = t[i];
6197
6197
  if (!js(o))
6198
6198
  continue;
6199
- const u = kc(o);
6199
+ const u = $c(o);
6200
6200
  if (!u)
6201
6201
  throw new rt({ signature: o, type: "struct" });
6202
6202
  const c = u.properties.split(";"), d = [], l = c.length;
@@ -6204,13 +6204,13 @@ function eu(t) {
6204
6204
  const v = c[f].trim();
6205
6205
  if (!v)
6206
6206
  continue;
6207
- const T = Te(v, {
6207
+ const $ = $e(v, {
6208
6208
  type: "struct"
6209
6209
  });
6210
- d.push(T);
6210
+ d.push($);
6211
6211
  }
6212
6212
  if (!d.length)
6213
- throw new Vc({ signature: o });
6213
+ throw new Uc({ signature: o });
6214
6214
  e[u.name] = d;
6215
6215
  }
6216
6216
  const r = {}, s = Object.entries(e), a = s.length;
@@ -6220,7 +6220,7 @@ function eu(t) {
6220
6220
  }
6221
6221
  return r;
6222
6222
  }
6223
- const tu = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
6223
+ const nu = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
6224
6224
  function Fs(t, e, n = /* @__PURE__ */ new Set()) {
6225
6225
  const r = [], s = t.length;
6226
6226
  for (let a = 0; a < s; a++) {
@@ -6228,13 +6228,13 @@ function Fs(t, e, n = /* @__PURE__ */ new Set()) {
6228
6228
  if (Is.test(i.type))
6229
6229
  r.push(i);
6230
6230
  else {
6231
- const u = Ae(tu, i.type);
6231
+ const u = Ae(nu, i.type);
6232
6232
  if (!(u != null && u.type))
6233
- throw new Zc({ abiParameter: i });
6233
+ throw new Dc({ abiParameter: i });
6234
6234
  const { array: c, type: d } = u;
6235
6235
  if (d in e) {
6236
6236
  if (n.has(d))
6237
- throw new Uc({ type: d });
6237
+ throw new Gc({ type: d });
6238
6238
  r.push({
6239
6239
  ...i,
6240
6240
  type: `tuple${c ?? ""}`,
@@ -6243,20 +6243,20 @@ function Fs(t, e, n = /* @__PURE__ */ new Set()) {
6243
6243
  } else if (Ns(d))
6244
6244
  r.push(i);
6245
6245
  else
6246
- throw new jc({ type: d });
6246
+ throw new Bc({ type: d });
6247
6247
  }
6248
6248
  }
6249
6249
  return r;
6250
6250
  }
6251
6251
  function zs(t) {
6252
- const e = eu(t), n = [], r = t.length;
6252
+ const e = tu(t), n = [], r = t.length;
6253
6253
  for (let s = 0; s < r; s++) {
6254
6254
  const a = t[s];
6255
6255
  js(a) || n.push(Wc(a, e));
6256
6256
  }
6257
6257
  return n;
6258
6258
  }
6259
- function nu(t) {
6259
+ function ru(t) {
6260
6260
  let e = !0, n = "", r = 0, s = "", a = !1;
6261
6261
  for (let i = 0; i < t.length; i++) {
6262
6262
  const o = t[i];
@@ -6281,16 +6281,16 @@ function nu(t) {
6281
6281
  throw new y("Unable to normalize signature.");
6282
6282
  return s;
6283
6283
  }
6284
- const ru = (t) => {
6285
- const e = typeof t == "string" ? t : wc(t);
6286
- return nu(e);
6284
+ const su = (t) => {
6285
+ const e = typeof t == "string" ? t : xc(t);
6286
+ return ru(e);
6287
6287
  };
6288
- function Ls(t) {
6289
- return gc(ru(t));
6288
+ function Zs(t) {
6289
+ return vc(su(t));
6290
6290
  }
6291
- const su = Ls, ur = (t) => Jt(Ls(t), 0, 4);
6291
+ const au = Zs, ur = (t) => Jt(Zs(t), 0, 4);
6292
6292
  function dr(t) {
6293
- const { abi: e, args: n = [], name: r } = t, s = Pe(r, { strict: !1 }), a = e.filter((o) => s ? o.type === "function" ? ur(o) === r : o.type === "event" ? su(o) === r : !1 : "name" in o && o.name === r);
6293
+ const { abi: e, args: n = [], name: r } = t, s = Pe(r, { strict: !1 }), a = e.filter((o) => s ? o.type === "function" ? ur(o) === r : o.type === "event" ? au(o) === r : !1 : "name" in o && o.name === r);
6294
6294
  if (a.length === 0)
6295
6295
  return;
6296
6296
  if (a.length === 1)
@@ -6311,9 +6311,9 @@ function dr(t) {
6311
6311
  return l ? Un(c, l) : !1;
6312
6312
  })) {
6313
6313
  if (i && "inputs" in i && i.inputs) {
6314
- const c = Zs(o.inputs, i.inputs, n);
6314
+ const c = Ls(o.inputs, i.inputs, n);
6315
6315
  if (c)
6316
- throw new Ui({
6316
+ throw new Gi({
6317
6317
  abiItem: o,
6318
6318
  type: c[0]
6319
6319
  }, {
@@ -6345,11 +6345,11 @@ function Un(t, e) {
6345
6345
  })) : !1;
6346
6346
  }
6347
6347
  }
6348
- function Zs(t, e, n) {
6348
+ function Ls(t, e, n) {
6349
6349
  for (const r in t) {
6350
6350
  const s = t[r], a = e[r];
6351
6351
  if (s.type === "tuple" && a.type === "tuple" && "components" in s && "components" in a)
6352
- return Zs(s.components, a.components, n[r]);
6352
+ return Ls(s.components, a.components, n[r]);
6353
6353
  const i = [s.type, a.type];
6354
6354
  if (i.includes("address") && i.includes("bytes20") ? !0 : i.includes("address") && i.includes("string") ? Ee(n[r], { strict: !1 }) : i.includes("address") && i.includes("bytes") ? Ee(n[r], { strict: !1 }) : !1)
6355
6355
  return i;
@@ -6368,15 +6368,15 @@ function lr(t) {
6368
6368
  if (a.type !== "function")
6369
6369
  throw new Kt(void 0, { docsPath: xn });
6370
6370
  if (!a.outputs)
6371
- throw new Vi(a.name, { docsPath: xn });
6372
- const i = ks(a.outputs, s);
6371
+ throw new Ui(a.name, { docsPath: xn });
6372
+ const i = Ts(a.outputs, s);
6373
6373
  if (i && i.length > 1)
6374
6374
  return i;
6375
6375
  if (i && i.length === 1)
6376
6376
  return i[0];
6377
6377
  }
6378
6378
  const Mr = "/docs/contract/encodeFunctionData";
6379
- function au(t) {
6379
+ function iu(t) {
6380
6380
  const { abi: e, args: n, functionName: r } = t;
6381
6381
  let s = e[0];
6382
6382
  if (r) {
@@ -6393,17 +6393,17 @@ function au(t) {
6393
6393
  throw new Kt(void 0, { docsPath: Mr });
6394
6394
  return {
6395
6395
  abi: [s],
6396
- functionName: ur(We(s))
6396
+ functionName: ur(qe(s))
6397
6397
  };
6398
6398
  }
6399
6399
  function dn(t) {
6400
6400
  const { args: e } = t, { abi: n, functionName: r } = (() => {
6401
6401
  var o;
6402
- return t.abi.length === 1 && ((o = t.functionName) != null && o.startsWith("0x")) ? t : au(t);
6402
+ return t.abi.length === 1 && ((o = t.functionName) != null && o.startsWith("0x")) ? t : iu(t);
6403
6403
  })(), s = n[0], a = r, i = "inputs" in s && s.inputs ? os(s.inputs, e ?? []) : void 0;
6404
6404
  return rn([a, i ?? "0x"]);
6405
6405
  }
6406
- function iu({ blockNumber: t, chain: e, contract: n }) {
6406
+ function ou({ blockNumber: t, chain: e, contract: n }) {
6407
6407
  var s;
6408
6408
  const r = (s = e == null ? void 0 : e.contracts) == null ? void 0 : s[n];
6409
6409
  if (!r)
@@ -6422,7 +6422,7 @@ function iu({ blockNumber: t, chain: e, contract: n }) {
6422
6422
  });
6423
6423
  return r.address;
6424
6424
  }
6425
- const ou = {
6425
+ const cu = {
6426
6426
  1: "An `assert` condition failed.",
6427
6427
  17: "Arithmetic operation resulted in underflow or overflow.",
6428
6428
  18: "Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",
@@ -6432,7 +6432,7 @@ const ou = {
6432
6432
  50: "Array index is out of bounds.",
6433
6433
  65: "Allocated too much memory or created an array which is too large.",
6434
6434
  81: "Attempted to call a zero-initialized variable of internal function type."
6435
- }, cu = {
6435
+ }, uu = {
6436
6436
  inputs: [
6437
6437
  {
6438
6438
  name: "message",
@@ -6441,7 +6441,7 @@ const ou = {
6441
6441
  ],
6442
6442
  name: "Error",
6443
6443
  type: "error"
6444
- }, uu = {
6444
+ }, du = {
6445
6445
  inputs: [
6446
6446
  {
6447
6447
  name: "reason",
@@ -6451,18 +6451,18 @@ const ou = {
6451
6451
  name: "Panic",
6452
6452
  type: "error"
6453
6453
  };
6454
- function du(t) {
6454
+ function lu(t) {
6455
6455
  const { abi: e, data: n } = t, r = Jt(n, 0, 4);
6456
6456
  if (r === "0x")
6457
6457
  throw new Xn();
6458
- const a = [...e || [], cu, uu].find((i) => i.type === "error" && r === ur(We(i)));
6458
+ const a = [...e || [], uu, du].find((i) => i.type === "error" && r === ur(qe(i)));
6459
6459
  if (!a)
6460
6460
  throw new rs(r, {
6461
6461
  docsPath: "/docs/contract/decodeErrorResult"
6462
6462
  });
6463
6463
  return {
6464
6464
  abiItem: a,
6465
- args: "inputs" in a && a.inputs && a.inputs.length > 0 ? ks(a.inputs, Jt(n, 4)) : void 0,
6465
+ args: "inputs" in a && a.inputs && a.inputs.length > 0 ? Ts(a.inputs, Jt(n, 4)) : void 0,
6466
6466
  errorName: a.name
6467
6467
  };
6468
6468
  }
@@ -6470,11 +6470,11 @@ function Ds({ abiItem: t, args: e, includeFunctionName: n = !0, includeName: r =
6470
6470
  if ("name" in t && "inputs" in t && t.inputs)
6471
6471
  return `${n ? t.name : ""}(${t.inputs.map((s, a) => `${r && s.name ? `${s.name}: ` : ""}${typeof e[a] == "object" ? cn(e[a]) : e[a]}`).join(", ")})`;
6472
6472
  }
6473
- class lu extends y {
6473
+ class fu extends y {
6474
6474
  constructor(e, { account: n, docsPath: r, chain: s, data: a, gas: i, gasPrice: o, maxFeePerGas: u, maxPriorityFeePerGas: c, nonce: d, to: l, value: f, stateOverride: m }) {
6475
6475
  var P;
6476
6476
  const v = n ? ue(n) : void 0;
6477
- let T = Ft({
6477
+ let $ = Ft({
6478
6478
  from: v == null ? void 0 : v.address,
6479
6479
  to: l,
6480
6480
  value: typeof f < "u" && `${rr(f)} ${((P = s == null ? void 0 : s.nativeCurrency) == null ? void 0 : P.symbol) || "ETH"}`,
@@ -6485,14 +6485,14 @@ class lu extends y {
6485
6485
  maxPriorityFeePerGas: typeof c < "u" && `${U(c)} gwei`,
6486
6486
  nonce: d
6487
6487
  });
6488
- m && (T += `
6489
- ${Ho(m)}`), super(e.shortMessage, {
6488
+ m && ($ += `
6489
+ ${qo(m)}`), super(e.shortMessage, {
6490
6490
  cause: e,
6491
6491
  docsPath: r,
6492
6492
  metaMessages: [
6493
6493
  ...e.metaMessages ? [...e.metaMessages, " "] : [],
6494
6494
  "Raw Call Arguments:",
6495
- T
6495
+ $
6496
6496
  ].filter(Boolean),
6497
6497
  name: "CallExecutionError"
6498
6498
  }), Object.defineProperty(this, "cause", {
@@ -6503,15 +6503,15 @@ ${Ho(m)}`), super(e.shortMessage, {
6503
6503
  }), this.cause = e;
6504
6504
  }
6505
6505
  }
6506
- class fu extends y {
6506
+ class hu extends y {
6507
6507
  constructor(e, { abi: n, args: r, contractAddress: s, docsPath: a, functionName: i, sender: o }) {
6508
6508
  const u = dr({ abi: n, args: r, name: i }), c = u ? Ds({
6509
6509
  abiItem: u,
6510
6510
  args: r,
6511
6511
  includeFunctionName: !1,
6512
6512
  includeName: !1
6513
- }) : void 0, d = u ? We(u, { includeName: !0 }) : void 0, l = Ft({
6514
- address: s && ko(s),
6513
+ }) : void 0, d = u ? qe(u, { includeName: !0 }) : void 0, l = Ft({
6514
+ address: s && $o(s),
6515
6515
  function: d,
6516
6516
  args: c && c !== "()" && `${[...Array((i == null ? void 0 : i.length) ?? 0).keys()].map(() => " ").join("")}${c}`,
6517
6517
  sender: o
@@ -6563,20 +6563,20 @@ class fu extends y {
6563
6563
  }), this.abi = n, this.args = r, this.cause = e, this.contractAddress = s, this.functionName = i, this.sender = o;
6564
6564
  }
6565
6565
  }
6566
- class hu extends y {
6566
+ class pu extends y {
6567
6567
  constructor({ abi: e, data: n, functionName: r, message: s }) {
6568
6568
  let a, i, o, u;
6569
6569
  if (n && n !== "0x")
6570
6570
  try {
6571
- i = du({ abi: e, data: n });
6571
+ i = lu({ abi: e, data: n });
6572
6572
  const { abiItem: d, errorName: l, args: f } = i;
6573
6573
  if (l === "Error")
6574
6574
  u = f[0];
6575
6575
  else if (l === "Panic") {
6576
6576
  const [m] = f;
6577
- u = ou[m];
6577
+ u = cu[m];
6578
6578
  } else {
6579
- const m = d ? We(d, { includeName: !0 }) : void 0, v = d && f ? Ds({
6579
+ const m = d ? qe(d, { includeName: !0 }) : void 0, v = d && f ? Ds({
6580
6580
  abiItem: d,
6581
6581
  args: f,
6582
6582
  includeFunctionName: !1,
@@ -6622,7 +6622,7 @@ class hu extends y {
6622
6622
  }), this.data = i, this.reason = u, this.signature = c;
6623
6623
  }
6624
6624
  }
6625
- class pu extends y {
6625
+ class mu extends y {
6626
6626
  constructor({ functionName: e }) {
6627
6627
  super(`The contract function "${e}" returned no data ("0x").`, {
6628
6628
  metaMessages: [
@@ -6635,7 +6635,7 @@ class pu extends y {
6635
6635
  });
6636
6636
  }
6637
6637
  }
6638
- class mu extends y {
6638
+ class yu extends y {
6639
6639
  constructor({ factory: e }) {
6640
6640
  super(`Deployment for counterfactual contract call failed${e ? ` for factory "${e}".` : ""}`, {
6641
6641
  metaMessages: [
@@ -6662,15 +6662,15 @@ class Vs extends y {
6662
6662
  }), this.data = e;
6663
6663
  }
6664
6664
  }
6665
- const yu = 3;
6665
+ const bu = 3;
6666
6666
  function fr(t, { abi: e, address: n, args: r, docsPath: s, functionName: a, sender: i }) {
6667
- const o = t instanceof Vs ? t : t instanceof y ? t.walk((v) => "data" in v) || t.walk() : {}, { code: u, data: c, details: d, message: l, shortMessage: f } = o, m = t instanceof Xn ? new pu({ functionName: a }) : [yu, Oe.code].includes(u) && (c || d || l || f) ? new hu({
6667
+ const o = t instanceof Vs ? t : t instanceof y ? t.walk((v) => "data" in v) || t.walk() : {}, { code: u, data: c, details: d, message: l, shortMessage: f } = o, m = t instanceof Xn ? new mu({ functionName: a }) : [bu, Oe.code].includes(u) && (c || d || l || f) ? new pu({
6668
6668
  abi: e,
6669
6669
  data: typeof c == "object" ? c.data : c,
6670
6670
  functionName: a,
6671
6671
  message: o instanceof bs ? d : f ?? l
6672
6672
  }) : t;
6673
- return new fu(m, {
6673
+ return new hu(m, {
6674
6674
  abi: e,
6675
6675
  args: r,
6676
6676
  contractAddress: n,
@@ -6679,18 +6679,18 @@ function fr(t, { abi: e, address: n, args: r, docsPath: s, functionName: a, send
6679
6679
  sender: i
6680
6680
  });
6681
6681
  }
6682
- const bu = "0x82ad56cb", gu = "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe", vu = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";
6683
- function wu(t, { docsPath: e, ...n }) {
6682
+ const gu = "0x82ad56cb", vu = "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe", wu = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";
6683
+ function xu(t, { docsPath: e, ...n }) {
6684
6684
  const r = (() => {
6685
6685
  const s = sr(t, n);
6686
6686
  return s instanceof on ? t : s;
6687
6687
  })();
6688
- return new lu(r, {
6688
+ return new fu(r, {
6689
6689
  docsPath: e,
6690
6690
  ...n
6691
6691
  });
6692
6692
  }
6693
- function xu() {
6693
+ function _u() {
6694
6694
  let t = () => {
6695
6695
  }, e = () => {
6696
6696
  };
@@ -6699,7 +6699,7 @@ function xu() {
6699
6699
  }), resolve: t, reject: e };
6700
6700
  }
6701
6701
  const _n = /* @__PURE__ */ new Map();
6702
- function _u({ fn: t, id: e, shouldSplitBatch: n, wait: r = 0, sort: s }) {
6702
+ function Pu({ fn: t, id: e, shouldSplitBatch: n, wait: r = 0, sort: s }) {
6703
6703
  const a = async () => {
6704
6704
  const d = u();
6705
6705
  i();
@@ -6720,22 +6720,22 @@ function _u({ fn: t, id: e, shouldSplitBatch: n, wait: r = 0, sort: s }) {
6720
6720
  return {
6721
6721
  flush: i,
6722
6722
  async schedule(d) {
6723
- const { promise: l, resolve: f, reject: m } = xu();
6723
+ const { promise: l, resolve: f, reject: m } = _u();
6724
6724
  return (n == null ? void 0 : n([...o(), d])) && a(), u().length > 0 ? (c({ args: d, resolve: f, reject: m }), l) : (c({ args: d, resolve: f, reject: m }), setTimeout(a, r), l);
6725
6725
  }
6726
6726
  };
6727
6727
  }
6728
6728
  async function Us(t, e) {
6729
6729
  var Ce, je, K, de;
6730
- const { account: n = t.account, batch: r = !!((Ce = t.batch) != null && Ce.multicall), blockNumber: s, blockTag: a = "latest", accessList: i, blobs: o, code: u, data: c, factory: d, factoryData: l, gas: f, gasPrice: m, maxFeePerBlobGas: v, maxFeePerGas: T, maxPriorityFeePerGas: P, nonce: S, to: R, value: A, stateOverride: M, ...q } = e, F = n ? ue(n) : void 0;
6730
+ const { account: n = t.account, batch: r = !!((Ce = t.batch) != null && Ce.multicall), blockNumber: s, blockTag: a = "latest", accessList: i, blobs: o, code: u, data: c, factory: d, factoryData: l, gas: f, gasPrice: m, maxFeePerBlobGas: v, maxFeePerGas: $, maxPriorityFeePerGas: P, nonce: S, to: R, value: A, stateOverride: M, ...W } = e, F = n ? ue(n) : void 0;
6731
6731
  if (u && (d || l))
6732
6732
  throw new y("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
6733
6733
  if (u && R)
6734
6734
  throw new y("Cannot provide both `code` & `to` as parameters.");
6735
- const Y = u && c, re = d && l && R && c, C = Y || re, B = Y ? Au({
6735
+ const Y = u && c, re = d && l && R && c, C = Y || re, B = Y ? Cu({
6736
6736
  code: u,
6737
6737
  data: c
6738
- }) : re ? Cu({
6738
+ }) : re ? Tu({
6739
6739
  data: c,
6740
6740
  factory: d,
6741
6741
  factoryData: l,
@@ -6745,7 +6745,7 @@ async function Us(t, e) {
6745
6745
  un(e);
6746
6746
  const V = (s ? O(s) : void 0) || a, X = ws(M), J = (de = (K = (je = t.chain) == null ? void 0 : je.formatters) == null ? void 0 : K.transactionRequest) == null ? void 0 : de.format, Be = (J || ir)({
6747
6747
  // Pick out extra data that might exist on the chain's transaction request type.
6748
- ...ar(q, { format: J }),
6748
+ ...ar(W, { format: J }),
6749
6749
  from: F == null ? void 0 : F.address,
6750
6750
  accessList: i,
6751
6751
  blobs: o,
@@ -6753,15 +6753,15 @@ async function Us(t, e) {
6753
6753
  gas: f,
6754
6754
  gasPrice: m,
6755
6755
  maxFeePerBlobGas: v,
6756
- maxFeePerGas: T,
6756
+ maxFeePerGas: $,
6757
6757
  maxPriorityFeePerGas: P,
6758
6758
  nonce: S,
6759
6759
  to: C ? void 0 : R,
6760
6760
  value: A
6761
6761
  });
6762
- if (r && Pu({ request: Be }) && !X)
6762
+ if (r && Eu({ request: Be }) && !X)
6763
6763
  try {
6764
- return await Eu(t, {
6764
+ return await Au(t, {
6765
6765
  ...Be,
6766
6766
  blockNumber: s,
6767
6767
  blockTag: a
@@ -6780,34 +6780,34 @@ async function Us(t, e) {
6780
6780
  });
6781
6781
  return br === "0x" ? { data: void 0 } : { data: br };
6782
6782
  } catch (se) {
6783
- const V = ku(se), { offchainLookup: X, offchainLookupSignature: J } = await import("./ccip-CS9Qngig.js");
6783
+ const V = $u(se), { offchainLookup: X, offchainLookupSignature: J } = await import("./ccip-D7NdwxMj.js");
6784
6784
  if (t.ccipRead !== !1 && (V == null ? void 0 : V.slice(0, 10)) === J && R)
6785
6785
  return { data: await X(t, { data: V, to: R }) };
6786
- throw C && (V == null ? void 0 : V.slice(0, 10)) === "0x101bb98d" ? new mu({ factory: d }) : wu(se, {
6786
+ throw C && (V == null ? void 0 : V.slice(0, 10)) === "0x101bb98d" ? new yu({ factory: d }) : xu(se, {
6787
6787
  ...e,
6788
6788
  account: F,
6789
6789
  chain: t.chain
6790
6790
  });
6791
6791
  }
6792
6792
  }
6793
- function Pu({ request: t }) {
6793
+ function Eu({ request: t }) {
6794
6794
  const { data: e, to: n, ...r } = t;
6795
- return !(!e || e.startsWith(bu) || !n || Object.values(r).filter((s) => typeof s < "u").length > 0);
6795
+ return !(!e || e.startsWith(gu) || !n || Object.values(r).filter((s) => typeof s < "u").length > 0);
6796
6796
  }
6797
- async function Eu(t, e) {
6798
- var T;
6799
- const { batchSize: n = 1024, wait: r = 0 } = typeof ((T = t.batch) == null ? void 0 : T.multicall) == "object" ? t.batch.multicall : {}, { blockNumber: s, blockTag: a = "latest", data: i, multicallAddress: o, to: u } = e;
6797
+ async function Au(t, e) {
6798
+ var $;
6799
+ const { batchSize: n = 1024, wait: r = 0 } = typeof (($ = t.batch) == null ? void 0 : $.multicall) == "object" ? t.batch.multicall : {}, { blockNumber: s, blockTag: a = "latest", data: i, multicallAddress: o, to: u } = e;
6800
6800
  let c = o;
6801
6801
  if (!c) {
6802
6802
  if (!t.chain)
6803
6803
  throw new hs();
6804
- c = iu({
6804
+ c = ou({
6805
6805
  blockNumber: s,
6806
6806
  chain: t.chain,
6807
6807
  contract: "multicall3"
6808
6808
  });
6809
6809
  }
6810
- const l = (s ? O(s) : void 0) || a, { schedule: f } = _u({
6810
+ const l = (s ? O(s) : void 0) || a, { schedule: f } = Pu({
6811
6811
  id: `${t.uid}.${l}`,
6812
6812
  wait: r,
6813
6813
  shouldSplitBatch(P) {
@@ -6844,37 +6844,37 @@ async function Eu(t, e) {
6844
6844
  throw new Vs({ data: m });
6845
6845
  return m === "0x" ? { data: void 0 } : { data: m };
6846
6846
  }
6847
- function Au(t) {
6847
+ function Cu(t) {
6848
6848
  const { code: e, data: n } = t;
6849
6849
  return cs({
6850
6850
  abi: zs(["constructor(bytes, bytes)"]),
6851
- bytecode: gu,
6851
+ bytecode: vu,
6852
6852
  args: [e, n]
6853
6853
  });
6854
6854
  }
6855
- function Cu(t) {
6855
+ function Tu(t) {
6856
6856
  const { data: e, factory: n, factoryData: r, to: s } = t;
6857
6857
  return cs({
6858
6858
  abi: zs(["constructor(address, bytes, address, bytes)"]),
6859
- bytecode: vu,
6859
+ bytecode: wu,
6860
6860
  args: [s, e, n, r]
6861
6861
  });
6862
6862
  }
6863
- function ku(t) {
6863
+ function $u(t) {
6864
6864
  var n;
6865
6865
  if (!(t instanceof y))
6866
6866
  return;
6867
6867
  const e = t.walk();
6868
6868
  return typeof (e == null ? void 0 : e.data) == "object" ? (n = e.data) == null ? void 0 : n.data : e.data;
6869
6869
  }
6870
- async function Tu(t, e) {
6870
+ async function ku(t, e) {
6871
6871
  const { abi: n, address: r, args: s, functionName: a, ...i } = e, o = dn({
6872
6872
  abi: n,
6873
6873
  args: s,
6874
6874
  functionName: a
6875
6875
  });
6876
6876
  try {
6877
- const { data: u } = await L(t, Us, "call")({
6877
+ const { data: u } = await Z(t, Us, "call")({
6878
6878
  ...i,
6879
6879
  data: o,
6880
6880
  to: r
@@ -6895,11 +6895,11 @@ async function Tu(t, e) {
6895
6895
  });
6896
6896
  }
6897
6897
  }
6898
- async function $u(t) {
6898
+ async function Iu(t) {
6899
6899
  return new Promise((e) => setTimeout(e, t));
6900
6900
  }
6901
6901
  const zt = /* @__PURE__ */ new sn(8192);
6902
- function Iu(t, { enabled: e = !0, id: n }) {
6902
+ function Su(t, { enabled: e = !0, id: n }) {
6903
6903
  if (!e || !n)
6904
6904
  return t();
6905
6905
  if (zt.get(n))
@@ -6907,12 +6907,12 @@ function Iu(t, { enabled: e = !0, id: n }) {
6907
6907
  const r = t().finally(() => zt.delete(n));
6908
6908
  return zt.set(n, r), r;
6909
6909
  }
6910
- function Su(t, { delay: e = 100, retryCount: n = 2, shouldRetry: r = () => !0 } = {}) {
6910
+ function Ru(t, { delay: e = 100, retryCount: n = 2, shouldRetry: r = () => !0 } = {}) {
6911
6911
  return new Promise((s, a) => {
6912
6912
  const i = async ({ count: o = 0 } = {}) => {
6913
6913
  const u = async ({ error: c }) => {
6914
6914
  const d = typeof e == "function" ? e({ count: o, error: c }) : e;
6915
- d && await $u(d), i({ count: o + 1 });
6915
+ d && await Iu(d), i({ count: o + 1 });
6916
6916
  };
6917
6917
  try {
6918
6918
  const c = await t();
@@ -6926,13 +6926,13 @@ function Su(t, { delay: e = 100, retryCount: n = 2, shouldRetry: r = () => !0 }
6926
6926
  i();
6927
6927
  });
6928
6928
  }
6929
- function Ru(t, e = {}) {
6929
+ function Ou(t, e = {}) {
6930
6930
  return async (n, r = {}) => {
6931
6931
  const { dedupe: s = !1, retryDelay: a = 150, retryCount: i = 3, uid: o } = {
6932
6932
  ...e,
6933
6933
  ...r
6934
6934
  }, u = s ? Nt(Jn(`${o}.${cn(n)}`)) : void 0;
6935
- return Iu(() => Su(async () => {
6935
+ return Su(() => Ru(async () => {
6936
6936
  try {
6937
6937
  return await t(n);
6938
6938
  } catch (c) {
@@ -6954,18 +6954,18 @@ function Ru(t, e = {}) {
6954
6954
  throw new At(d);
6955
6955
  case Ct.code:
6956
6956
  throw new Ct(d);
6957
- case kt.code:
6958
- throw new kt(d);
6959
6957
  case Tt.code:
6960
- throw new Tt(d, {
6958
+ throw new Tt(d);
6959
+ case $t.code:
6960
+ throw new $t(d, {
6961
6961
  method: n.method
6962
6962
  });
6963
6963
  case Ke.code:
6964
6964
  throw new Ke(d);
6965
- case $t.code:
6966
- throw new $t(d);
6967
- case Ze.code:
6968
- throw new Ze(d);
6965
+ case kt.code:
6966
+ throw new kt(d);
6967
+ case Le.code:
6968
+ throw new Le(d);
6969
6969
  case It.code:
6970
6970
  throw new It(d);
6971
6971
  case St.code:
@@ -6977,9 +6977,9 @@ function Ru(t, e = {}) {
6977
6977
  case Mt.code:
6978
6978
  throw new Mt(d);
6979
6979
  case 5e3:
6980
- throw new Ze(d);
6980
+ throw new Le(d);
6981
6981
  default:
6982
- throw c instanceof y ? c : new $o(d);
6982
+ throw c instanceof y ? c : new Io(d);
6983
6983
  }
6984
6984
  }
6985
6985
  }, {
@@ -6993,17 +6993,17 @@ function Ru(t, e = {}) {
6993
6993
  return ~~(1 << c) * a;
6994
6994
  },
6995
6995
  retryCount: i,
6996
- shouldRetry: ({ error: c }) => Ou(c)
6996
+ shouldRetry: ({ error: c }) => Mu(c)
6997
6997
  }), { enabled: s, id: u });
6998
6998
  };
6999
6999
  }
7000
- function Ou(t) {
7000
+ function Mu(t) {
7001
7001
  return "code" in t && typeof t.code == "number" ? t.code === -1 || t.code === Ke.code || t.code === Oe.code : t instanceof ys && t.status ? t.status === 403 || t.status === 408 || t.status === 413 || t.status === 429 || t.status === 500 || t.status === 502 || t.status === 503 || t.status === 504 : !0;
7002
7002
  }
7003
- async function Mu(t, e) {
7003
+ async function ju(t, e) {
7004
7004
  const { abi: n, address: r, args: s, dataSuffix: a, functionName: i, ...o } = e, u = o.account ? ue(o.account) : t.account, c = dn({ abi: n, args: s, functionName: i });
7005
7005
  try {
7006
- const { data: d } = await L(t, Us, "call")({
7006
+ const { data: d } = await Z(t, Us, "call")({
7007
7007
  batch: !1,
7008
7008
  data: `${c}${a ? a.replace("0x", "") : ""}`,
7009
7009
  to: r,
@@ -7038,7 +7038,7 @@ async function Mu(t, e) {
7038
7038
  });
7039
7039
  }
7040
7040
  }
7041
- async function ju(t, e) {
7041
+ async function Bu(t, e) {
7042
7042
  const { abi: n, account: r = t.account, address: s, args: a, dataSuffix: i, functionName: o, ...u } = e;
7043
7043
  if (typeof r > "u")
7044
7044
  throw new us({
@@ -7050,7 +7050,7 @@ async function ju(t, e) {
7050
7050
  functionName: o
7051
7051
  });
7052
7052
  try {
7053
- return await L(t, ic, "sendTransaction")({
7053
+ return await Z(t, oc, "sendTransaction")({
7054
7054
  data: `${d}${i ? i.replace("0x", "") : ""}`,
7055
7055
  to: s,
7056
7056
  account: c,
@@ -7068,16 +7068,16 @@ async function ju(t, e) {
7068
7068
  }
7069
7069
  }
7070
7070
  const Gn = 256;
7071
- let Lt = Gn, Zt;
7071
+ let Zt = Gn, Lt;
7072
7072
  function Gs(t = 11) {
7073
- if (!Zt || Lt + t > Gn * 2) {
7074
- Zt = "", Lt = 0;
7073
+ if (!Lt || Zt + t > Gn * 2) {
7074
+ Lt = "", Zt = 0;
7075
7075
  for (let e = 0; e < Gn; e++)
7076
- Zt += (256 + Math.random() * 256 | 0).toString(16).substring(1);
7076
+ Lt += (256 + Math.random() * 256 | 0).toString(16).substring(1);
7077
7077
  }
7078
- return Zt.substring(Lt, Lt++ + t);
7078
+ return Lt.substring(Zt, Zt++ + t);
7079
7079
  }
7080
- function Bu(t) {
7080
+ function Nu(t) {
7081
7081
  const { batch: e, cacheTime: n = t.pollingInterval ?? 4e3, ccipRead: r, key: s = "base", name: a = "Base Client", pollingInterval: i = 4e3, type: o = "base" } = t, u = t.chain, c = t.account ? ue(t.account) : void 0, { config: d, request: l, value: f } = t.transport({
7082
7082
  chain: u,
7083
7083
  pollingInterval: i
@@ -7095,18 +7095,18 @@ function Bu(t) {
7095
7095
  type: o,
7096
7096
  uid: Gs()
7097
7097
  };
7098
- function T(P) {
7098
+ function $(P) {
7099
7099
  return (S) => {
7100
7100
  const R = S(P);
7101
7101
  for (const M in v)
7102
7102
  delete R[M];
7103
7103
  const A = { ...P, ...R };
7104
- return Object.assign(A, { extend: T(A) });
7104
+ return Object.assign(A, { extend: $(A) });
7105
7105
  };
7106
7106
  }
7107
- return Object.assign(v, { extend: T(v) });
7107
+ return Object.assign(v, { extend: $(v) });
7108
7108
  }
7109
- function Nu({ key: t, name: e, request: n, retryCount: r = 3, retryDelay: s = 150, timeout: a, type: i }, o) {
7109
+ function Fu({ key: t, name: e, request: n, retryCount: r = 3, retryDelay: s = 150, timeout: a, type: i }, o) {
7110
7110
  const u = Gs();
7111
7111
  return {
7112
7112
  config: {
@@ -7118,13 +7118,13 @@ function Nu({ key: t, name: e, request: n, retryCount: r = 3, retryDelay: s = 15
7118
7118
  timeout: a,
7119
7119
  type: i
7120
7120
  },
7121
- request: Ru(n, { retryCount: r, retryDelay: s, uid: u }),
7121
+ request: Ou(n, { retryCount: r, retryDelay: s, uid: u }),
7122
7122
  value: o
7123
7123
  };
7124
7124
  }
7125
- function Fu(t, e = {}) {
7125
+ function zu(t, e = {}) {
7126
7126
  const { key: n = "custom", name: r = "Custom Provider", retryDelay: s } = e;
7127
- return ({ retryCount: a }) => Nu({
7127
+ return ({ retryCount: a }) => Fu({
7128
7128
  key: n,
7129
7129
  name: r,
7130
7130
  request: t.request.bind(t),
@@ -7200,12 +7200,12 @@ function pr(t, e, n) {
7200
7200
  const s = t[n];
7201
7201
  return typeof s == "function" ? s : (a) => e(t, a);
7202
7202
  }
7203
- const zu = "2.13.8", Lu = () => `@wagmi/core@${zu}`;
7203
+ const Zu = "2.13.8", Lu = () => `@wagmi/core@${Zu}`;
7204
7204
  var Hs = function(t, e, n, r) {
7205
7205
  if (n === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
7206
7206
  if (typeof e == "function" ? t !== e || !r : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
7207
7207
  return n === "m" ? r : n === "a" ? r.call(t) : r ? r.value : e.get(t);
7208
- }, en, Ws;
7208
+ }, en, qs;
7209
7209
  class Me extends Error {
7210
7210
  get docsBaseUrl() {
7211
7211
  return "https://wagmi.sh/core";
@@ -7255,13 +7255,13 @@ class Me extends Error {
7255
7255
  `), n.cause && (this.cause = n.cause), this.details = s, this.docsPath = a, this.metaMessages = n.metaMessages, this.shortMessage = e;
7256
7256
  }
7257
7257
  walk(e) {
7258
- return Hs(this, en, "m", Ws).call(this, this, e);
7258
+ return Hs(this, en, "m", qs).call(this, this, e);
7259
7259
  }
7260
7260
  }
7261
- en = /* @__PURE__ */ new WeakSet(), Ws = function t(e, n) {
7261
+ en = /* @__PURE__ */ new WeakSet(), qs = function t(e, n) {
7262
7262
  return n != null && n(e) ? e : e.cause ? Hs(this, en, "m", t).call(this, e.cause, n) : e;
7263
7263
  };
7264
- class Zu extends Me {
7264
+ class Du extends Me {
7265
7265
  constructor() {
7266
7266
  super("Connector not connected."), Object.defineProperty(this, "name", {
7267
7267
  enumerable: !0,
@@ -7271,7 +7271,7 @@ class Zu extends Me {
7271
7271
  });
7272
7272
  }
7273
7273
  }
7274
- class Du extends Me {
7274
+ class Vu extends Me {
7275
7275
  constructor({ address: e, connector: n }) {
7276
7276
  super(`Account "${e}" not found for connector "${n.name}".`), Object.defineProperty(this, "name", {
7277
7277
  enumerable: !0,
@@ -7281,7 +7281,7 @@ class Du extends Me {
7281
7281
  });
7282
7282
  }
7283
7283
  }
7284
- class Vu extends Me {
7284
+ class Uu extends Me {
7285
7285
  constructor({ connectionChainId: e, connectorChainId: n }) {
7286
7286
  super(`The current chain of the connector (id: ${n}) does not match the connection's chain (id: ${e}).`, {
7287
7287
  metaMessages: [
@@ -7296,7 +7296,7 @@ class Vu extends Me {
7296
7296
  });
7297
7297
  }
7298
7298
  }
7299
- class Uu extends Me {
7299
+ class Gu extends Me {
7300
7300
  constructor({ connector: e }) {
7301
7301
  super(`Connector "${e.name}" unavailable while reconnecting.`, {
7302
7302
  details: [
@@ -7312,12 +7312,12 @@ class Uu extends Me {
7312
7312
  });
7313
7313
  }
7314
7314
  }
7315
- async function qs(t, e = {}) {
7315
+ async function Ws(t, e = {}) {
7316
7316
  let n;
7317
7317
  if (e.connector) {
7318
7318
  const { connector: c } = e;
7319
7319
  if (t.state.status === "reconnecting" && !c.getAccounts && !c.getChainId)
7320
- throw new Uu({ connector: c });
7320
+ throw new Gu({ connector: c });
7321
7321
  const [d, l] = await Promise.all([
7322
7322
  c.getAccounts(),
7323
7323
  c.getChainId()
@@ -7330,10 +7330,10 @@ async function qs(t, e = {}) {
7330
7330
  } else
7331
7331
  n = t.state.connections.get(t.state.current);
7332
7332
  if (!n)
7333
- throw new Zu();
7333
+ throw new Du();
7334
7334
  const r = e.chainId ?? n.chainId, s = await n.connector.getChainId();
7335
7335
  if (s !== n.chainId)
7336
- throw new Vu({
7336
+ throw new Uu({
7337
7337
  connectionChainId: n.chainId,
7338
7338
  connectorChainId: s
7339
7339
  });
@@ -7341,27 +7341,27 @@ async function qs(t, e = {}) {
7341
7341
  if (a.getClient)
7342
7342
  return a.getClient({ chainId: r });
7343
7343
  const i = ue(e.account ?? n.accounts[0]);
7344
- if (i.address = Ji(i.address), e.account && !n.accounts.some((c) => c.toLowerCase() === i.address.toLowerCase()))
7345
- throw new Du({
7344
+ if (i.address = Yi(i.address), e.account && !n.accounts.some((c) => c.toLowerCase() === i.address.toLowerCase()))
7345
+ throw new Vu({
7346
7346
  address: i.address,
7347
7347
  connector: a
7348
7348
  });
7349
7349
  const o = t.chains.find((c) => c.id === r), u = await n.connector.getProvider({ chainId: r });
7350
- return Bu({
7350
+ return Nu({
7351
7351
  account: i,
7352
7352
  chain: o,
7353
7353
  name: "Connector Client",
7354
- transport: (c) => Fu(u)({ ...c, retryCount: 0 })
7354
+ transport: (c) => zu(u)({ ...c, retryCount: 0 })
7355
7355
  });
7356
7356
  }
7357
7357
  async function Hn(t, e) {
7358
7358
  const { abi: n, chainId: r, connector: s, ...a } = e;
7359
7359
  let i;
7360
- e.account ? i = e.account : i = (await qs(t, {
7360
+ e.account ? i = e.account : i = (await Ws(t, {
7361
7361
  chainId: r,
7362
7362
  connector: s
7363
7363
  })).account;
7364
- const o = t.getClient({ chainId: r }), u = pr(o, Mu, "simulateContract"), { result: c, request: d } = await u({ ...a, abi: n, account: i });
7364
+ const o = t.getClient({ chainId: r }), u = pr(o, ju, "simulateContract"), { result: c, request: d } = await u({ ...a, abi: n, account: i });
7365
7365
  return {
7366
7366
  chainId: o.chain.id,
7367
7367
  result: c,
@@ -7387,7 +7387,7 @@ function mr(t) {
7387
7387
  }
7388
7388
  function jr(t, e) {
7389
7389
  const { chainId: n, ...r } = e, s = t.getClient({ chainId: n });
7390
- return pr(s, Tu, "readContract")(r);
7390
+ return pr(s, ku, "readContract")(r);
7391
7391
  }
7392
7392
  function Ks(t) {
7393
7393
  return t.address !== void 0 && typeof t.address == "object" ? (e, n) => {
@@ -7409,7 +7409,7 @@ function Ks(t) {
7409
7409
  async function Br(t, e) {
7410
7410
  const { account: n, chainId: r, connector: s, __mode: a, ...i } = e;
7411
7411
  let o;
7412
- typeof n == "object" && n.type === "local" ? o = t.getClient({ chainId: r }) : o = await qs(t, { account: n, chainId: r, connector: s });
7412
+ typeof n == "object" && n.type === "local" ? o = t.getClient({ chainId: r }) : o = await Ws(t, { account: n, chainId: r, connector: s });
7413
7413
  const { connector: u } = ln(t);
7414
7414
  let c;
7415
7415
  if (a === "prepared" || u != null && u.supportsSimulation)
@@ -7422,7 +7422,7 @@ async function Br(t, e) {
7422
7422
  });
7423
7423
  c = d;
7424
7424
  }
7425
- return await pr(o, ju, "writeContract")({
7425
+ return await pr(o, Bu, "writeContract")({
7426
7426
  ...c,
7427
7427
  ...n ? { account: n } : {},
7428
7428
  chain: r ? { id: r } : null
@@ -7452,6 +7452,7 @@ const be = [
7452
7452
  { type: "error", inputs: [], name: "InsufficientAllowance" },
7453
7453
  { type: "error", inputs: [], name: "InsufficientBalance" },
7454
7454
  { type: "error", inputs: [], name: "InvalidPermit" },
7455
+ { type: "error", inputs: [], name: "Permit2AllowanceIsFixedAtInfinity" },
7455
7456
  { type: "error", inputs: [], name: "PermitExpired" },
7456
7457
  { type: "error", inputs: [], name: "TotalSupplyOverflow" },
7457
7458
  {
@@ -7619,34 +7620,34 @@ const be = [
7619
7620
  outputs: [{ name: "", internalType: "bool", type: "bool" }],
7620
7621
  stateMutability: "nonpayable"
7621
7622
  }
7622
- ], Gu = /* @__PURE__ */ Ks({
7623
+ ], Hu = /* @__PURE__ */ Ks({
7623
7624
  abi: be,
7624
7625
  functionName: "allowance"
7625
- }), Hu = /* @__PURE__ */ Ks({
7626
+ }), qu = /* @__PURE__ */ Ks({
7626
7627
  abi: be,
7627
7628
  functionName: "balanceOf"
7628
7629
  }), Wu = /* @__PURE__ */ yr({
7629
7630
  abi: be,
7630
7631
  functionName: "approve"
7631
- }), qu = /* @__PURE__ */ yr({
7632
+ }), Ku = /* @__PURE__ */ yr({
7632
7633
  abi: be,
7633
7634
  functionName: "mint"
7634
- }), Ku = /* @__PURE__ */ yr({
7635
+ }), Ju = /* @__PURE__ */ yr({
7635
7636
  abi: be,
7636
7637
  functionName: "mintPayable"
7637
- }), Ju = /* @__PURE__ */ mr({
7638
+ }), Yu = /* @__PURE__ */ mr({
7638
7639
  abi: be,
7639
7640
  functionName: "approve"
7640
- }), Yu = /* @__PURE__ */ mr({
7641
+ }), Xu = /* @__PURE__ */ mr({
7641
7642
  abi: be,
7642
7643
  functionName: "mint"
7643
- }), Xu = /* @__PURE__ */ mr({
7644
+ }), Qu = /* @__PURE__ */ mr({
7644
7645
  abi: be,
7645
7646
  functionName: "mintPayable"
7646
- }), Qu = "0x6080604052348015600e575f80fd5b50610a3c8061001c5f395ff3fe6080604052600436106100d9575f3560e01c806340c10f191161007c57806395d89b411161005757806395d89b4114610323578063a9059cbb14610368578063d505accf14610387578063dd62ed3e146103a6575f80fd5b806340c10f19146102a257806370a08231146102c15780637ecebe00146102f2575f80fd5b806318160ddd116100b757806318160ddd1461017857806323b872dd1461019e578063313ce567146101bd5780633644e515146101d8575f80fd5b806306fdde03146100dd578063095ea7b31461013457806317d304b014610163575b5f80fd5b3480156100e8575f80fd5b5060408051808201909152600a81527f4d6f636b2045524332300000000000000000000000000000000000000000000060208201525b60405161012b9190610833565b60405180910390f35b34801561013f575f80fd5b5061015361014e3660046108ae565b6103da565b604051901515815260200161012b565b6101766101713660046108ae565b610429565b005b348015610183575f80fd5b506805345cdf77eb68f44c545b60405190815260200161012b565b3480156101a9575f80fd5b506101536101b83660046108d6565b6104af565b3480156101c8575f80fd5b506040516012815260200161012b565b3480156101e3575f80fd5b50604080518082018252600a81527f4d6f636b2045524332300000000000000000000000000000000000000000000060209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527fa5c9260bf133e670eeaf4d41f5c4289fc23bb146bf11ba8fa70a2ea91ba1a330918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc69181019190915246606082015230608082015260a09020610190565b3480156102ad575f80fd5b506101766102bc3660046108ae565b6104a1565b3480156102cc575f80fd5b506101906102db366004610910565b6387a211a2600c9081525f91909152602090205490565b3480156102fd575f80fd5b5061019061030c366004610910565b6338377508600c9081525f91909152602090205490565b34801561032e575f80fd5b5060408051808201909152600481527f4d4f434b00000000000000000000000000000000000000000000000000000000602082015261011e565b348015610373575f80fd5b506101536103823660046108ae565b610569565b348015610392575f80fd5b506101766103a1366004610930565b6105e0565b3480156103b1575f80fd5b506101906103c036600461099d565b602052637f5e9f20600c9081525f91909152603490205490565b5f82602052637f5e9f20600c52335f52816034600c2055815f52602c5160601c337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560205fa350600192915050565b6104346064826109ce565b3410156104a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4d6f636b45524332303a2067696d6d65206d6f7265206d6f6e65792100000000604482015260640160405180910390fd5b6104ab82826107b7565b5050565b5f8360601b33602052637f5e9f208117600c526034600c20805460018101156104ed57808511156104e7576313be252b5f526004601cfd5b84810382555b50506387a211a28117600c526020600c208054808511156105155763f4d678b85f526004601cfd5b84810382555050835f526020600c208381540181555082602052600c5160601c8160601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a3505060019392505050565b5f6387a211a2600c52335f526020600c208054808411156105915763f4d678b85f526004601cfd5b83810382555050825f526020600c208281540181555081602052600c5160601c337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a350600192915050565b60408051808201909152600a81527f4d6f636b204552433230000000000000000000000000000000000000000000006020909101527fa5c9260bf133e670eeaf4d41f5c4289fc23bb146bf11ba8fa70a2ea91ba1a3308442111561064b57631a15a3cc5f526004601cfd5b6040518860601b60601c98508760601b60601c975065383775081901600e52885f526020600c2080547f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83528360208401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6604084015246606084015230608084015260a08320602e527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c983528a60208401528960408401528860608401528060808401528760a084015260c08320604e526042602c205f528660ff16602052856040528460605260208060805f60015afa8b3d51146107535763ddafbaef5f526004601cfd5b019055777f5e9f20000000000000000000000000000000000000000088176040526034602c2087905587897f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602060608501a360405250505f606052505050505050565b6805345cdf77eb68f44c54818101818110156107da5763e5cfe9575f526004601cfd5b806805345cdf77eb68f44c5550506387a211a2600c52815f526020600c208181540181555080602052600c5160601c5f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a35050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146108a9575f80fd5b919050565b5f80604083850312156108bf575f80fd5b6108c883610886565b946020939093013593505050565b5f805f606084860312156108e8575f80fd5b6108f184610886565b92506108ff60208501610886565b929592945050506040919091013590565b5f60208284031215610920575f80fd5b61092982610886565b9392505050565b5f805f805f805f60e0888a031215610946575f80fd5b61094f88610886565b965061095d60208901610886565b95506040880135945060608801359350608088013560ff81168114610980575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f80604083850312156109ae575f80fd5b6109b783610886565b91506109c560208401610886565b90509250929050565b5f82610a01577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea2646970667358221220e9f2a6c8a0f6903aa66381a940f90d1a4bd641eefee9027e191158343e018f4b64736f6c634300081a0033";
7647
+ }), ed = "0x6080604052348015600e575f80fd5b50610b398061001c5f395ff3fe6080604052600436106100d9575f3560e01c806340c10f191161007c57806395d89b411161005757806395d89b4114610323578063a9059cbb14610368578063d505accf14610387578063dd62ed3e146103a6575f80fd5b806340c10f19146102a257806370a08231146102c15780637ecebe00146102f2575f80fd5b806318160ddd116100b757806318160ddd1461017857806323b872dd1461019e578063313ce567146101bd5780633644e515146101d8575f80fd5b806306fdde03146100dd578063095ea7b31461013457806317d304b014610163575b5f80fd5b3480156100e8575f80fd5b5060408051808201909152600a81527f4d6f636b2045524332300000000000000000000000000000000000000000000060208201525b60405161012b9190610930565b60405180910390f35b34801561013f575f80fd5b5061015361014e3660046109ab565b6103c5565b604051901515815260200161012b565b6101766101713660046109ab565b610452565b005b348015610183575f80fd5b506805345cdf77eb68f44c545b60405190815260200161012b565b3480156101a9575f80fd5b506101536101b83660046109d3565b6104d8565b3480156101c8575f80fd5b506040516012815260200161012b565b3480156101e3575f80fd5b50604080518082018252600a81527f4d6f636b2045524332300000000000000000000000000000000000000000000060209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527fa5c9260bf133e670eeaf4d41f5c4289fc23bb146bf11ba8fa70a2ea91ba1a330918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc69181019190915246606082015230608082015260a09020610190565b3480156102ad575f80fd5b506101766102bc3660046109ab565b6104ca565b3480156102cc575f80fd5b506101906102db366004610a0d565b6387a211a2600c9081525f91909152602090205490565b3480156102fd575f80fd5b5061019061030c366004610a0d565b6338377508600c9081525f91909152602090205490565b34801561032e575f80fd5b5060408051808201909152600481527f4d4f434b00000000000000000000000000000000000000000000000000000000602082015261011e565b348015610373575f80fd5b506101536103823660046109ab565b6105a7565b348015610392575f80fd5b506101766103a1366004610a2d565b61061e565b3480156103b1575f80fd5b506101906103c0366004610a9a565b610834565b5f73ffffffffffffffffffffffffffffffffffffffff83166e22d473030f116ddee9f6b43ac78ba3188219151761040357633f68539a5f526004601cfd5b82602052637f5e9f20600c52335f52816034600c2055815f52602c5160601c337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560205fa35060015b92915050565b61045d606482610acb565b3410156104ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4d6f636b45524332303a2067696d6d65206d6f7265206d6f6e65792100000000604482015260640160405180910390fd5b6104d482826108b4565b5050565b5f8360601b6e22d473030f116ddee9f6b43ac78ba3331461052d5733602052637f5e9f208117600c526034600c20805480191561052a5780851115610524576313be252b5f526004601cfd5b84810382555b50505b6387a211a28117600c526020600c208054808511156105535763f4d678b85f526004601cfd5b84810382555050835f526020600c208381540181555082602052600c5160601c8160601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a3505060019392505050565b5f6387a211a2600c52335f526020600c208054808411156105cf5763f4d678b85f526004601cfd5b83810382555050825f526020600c208281540181555081602052600c5160601c337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff86166e22d473030f116ddee9f6b43ac78ba3188519151761065b57633f68539a5f526004601cfd5b60408051808201909152600a81527f4d6f636b204552433230000000000000000000000000000000000000000000006020909101527fa5c9260bf133e670eeaf4d41f5c4289fc23bb146bf11ba8fa70a2ea91ba1a3307fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6428610156106e757631a15a3cc5f526004601cfd5b6040518960601b60601c99508860601b60601c985065383775081901600e52895f526020600c2080547f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f835284602084015283604084015246606084015230608084015260a08320602e527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c983528b60208401528a60408401528960608401528060808401528860a084015260c08320604e526042602c205f528760ff16602052866040528560605260208060805f60015afa8c3d51146107cf5763ddafbaef5f526004601cfd5b019055777f5e9f20000000000000000000000000000000000000000089176040526034602c20889055888a7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602060608501a360405250505f60605250505050505050565b5f7fffffffffffffffffffffffffffffffffffdd2b8cfcf0ee922116094bc538745d73ffffffffffffffffffffffffffffffffffffffff83160161089957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61044c565b50602052637f5e9f20600c9081525f91909152603490205490565b6805345cdf77eb68f44c54818101818110156108d75763e5cfe9575f526004601cfd5b806805345cdf77eb68f44c5550506387a211a2600c52815f526020600c208181540181555080602052600c5160601c5f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a35050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146109a6575f80fd5b919050565b5f80604083850312156109bc575f80fd5b6109c583610983565b946020939093013593505050565b5f805f606084860312156109e5575f80fd5b6109ee84610983565b92506109fc60208501610983565b929592945050506040919091013590565b5f60208284031215610a1d575f80fd5b610a2682610983565b9392505050565b5f805f805f805f60e0888a031215610a43575f80fd5b610a4c88610983565b9650610a5a60208901610983565b95506040880135945060608801359350608088013560ff81168114610a7d575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215610aab575f80fd5b610ab483610983565b9150610ac260208401610983565b90509250929050565b5f82610afe577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea2646970667358221220f5df3612b8f8d82660db05f290d8446fb4142408d492fd3d2eb82b366b3cf76964736f6c634300081a0033";
7647
7648
  class Js extends ra {
7648
7649
  async balanceOf(e, n) {
7649
- return await Hu(this._config, {
7650
+ return await qu(this._config, {
7650
7651
  address: this.assertValidAddress(),
7651
7652
  args: [e],
7652
7653
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -7654,7 +7655,7 @@ class Js extends ra {
7654
7655
  });
7655
7656
  }
7656
7657
  async allowance(e, n, r) {
7657
- return await Gu(this._config, {
7658
+ return await Hu(this._config, {
7658
7659
  address: this.assertValidAddress(),
7659
7660
  args: [e, n],
7660
7661
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -7665,7 +7666,7 @@ class Js extends ra {
7665
7666
  return await this.awaitResult(this.approveRaw(e, n, r));
7666
7667
  }
7667
7668
  async approveRaw(e, n, r) {
7668
- const { request: s, result: a } = await Ju(this._config, {
7669
+ const { request: s, result: a } = await Yu(this._config, {
7669
7670
  address: this.assertValidAddress(),
7670
7671
  args: [e, n],
7671
7672
  ...this.optionallyAttachAccount(),
@@ -7678,14 +7679,14 @@ class Js extends ra {
7678
7679
  return await this.awaitResult(this.mintRaw(e, n, r));
7679
7680
  }
7680
7681
  async mintRaw(e, n, r) {
7681
- const { request: s, result: a } = await Yu(this._config, {
7682
+ const { request: s, result: a } = await Xu(this._config, {
7682
7683
  address: this.assertValidAddress(),
7683
7684
  args: [e, n],
7684
7685
  ...this.optionallyAttachAccount(),
7685
7686
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
7686
7687
  ...r
7687
7688
  });
7688
- return { hash: await qu(this._config, s), result: a };
7689
+ return { hash: await Ku(this._config, s), result: a };
7689
7690
  }
7690
7691
  async mintPayable(e, n, r) {
7691
7692
  return await this.awaitResult(
@@ -7694,7 +7695,7 @@ class Js extends ra {
7694
7695
  );
7695
7696
  }
7696
7697
  async mintPayableRaw(e, n, r) {
7697
- const { request: s, result: a } = await Xu(
7698
+ const { request: s, result: a } = await Qu(
7698
7699
  this._config,
7699
7700
  {
7700
7701
  address: this.assertValidAddress(),
@@ -7704,18 +7705,18 @@ class Js extends ra {
7704
7705
  ...r
7705
7706
  }
7706
7707
  );
7707
- return { hash: await Ku(this._config, s), result: a };
7708
+ return { hash: await Ju(this._config, s), result: a };
7708
7709
  }
7709
7710
  buildParameters(e = {}, n) {
7710
7711
  const [, r] = this.validateDeploymentConfig(e, n);
7711
7712
  return {
7712
7713
  abi: be,
7713
- bytecode: Qu,
7714
+ bytecode: ed,
7714
7715
  ...this.optionallyAttachAccount(r.account)
7715
7716
  };
7716
7717
  }
7717
7718
  }
7718
- const ed = [
7719
+ const td = [
7719
7720
  {
7720
7721
  account: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
7721
7722
  key: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
@@ -7758,52 +7759,52 @@ const ed = [
7758
7759
  }
7759
7760
  ].map((t) => ({
7760
7761
  ...t,
7761
- privateKey: ha(t.key)
7762
- })), td = "test test test test test test test test test test test junk", kd = async function(e, n) {
7763
- const r = n.privateKey, s = n.mnemonic ?? td, a = n.chain || "anvil", [{ config: i, account: o }, u] = ga({
7762
+ privateKey: pa(t.key)
7763
+ })), nd = "test test test test test test test test test test test junk", $d = async function(e, n) {
7764
+ const r = n.privateKey, s = n.mnemonic ?? nd, a = n.chain || "anvil", [{ config: i, account: o }, u] = va({
7764
7765
  chain: a,
7765
7766
  rpcUrl: n.rpcUrl,
7766
7767
  privateKey: r,
7767
7768
  mnemonic: s
7768
7769
  }), c = u.id;
7769
7770
  if (e.at(0) === "generate")
7770
- return _d({ account: o == null ? void 0 : o.address, chainId: c });
7771
+ return Pd({ account: o == null ? void 0 : o.address, chainId: c });
7771
7772
  if (e.at(0) === "erc20") {
7772
7773
  let A = new Js({ config: i, account: o }, {});
7773
7774
  return await A.deploy(), {
7774
7775
  erc20: A.assertValidAddress()
7775
7776
  };
7776
7777
  }
7777
- const d = sa[c];
7778
+ const d = aa[c];
7778
7779
  if (!d)
7779
7780
  throw new Error(
7780
7781
  `Unable to select a deployed BoostRegistry with chain ID ${c}`
7781
7782
  );
7782
- const l = new aa({
7783
+ const l = new ia({
7783
7784
  config: i,
7784
7785
  account: o,
7785
7786
  address: d
7786
- }), f = ia[c];
7787
+ }), f = oa[c];
7787
7788
  if (!f)
7788
7789
  throw new Error(
7789
7790
  `Unable to select a deployed BoostCore with chain ID ${c}`
7790
7791
  );
7791
- const m = new oa({
7792
+ const m = new ca({
7792
7793
  config: i,
7793
7794
  account: o,
7794
7795
  address: f
7795
7796
  });
7796
7797
  if (!e.length) throw new Error("No seed provided");
7797
- const v = await Promise.all(e.map(nd));
7798
- let T, P;
7798
+ const v = await Promise.all(e.map(rd));
7799
+ let $, P;
7799
7800
  const S = [];
7800
7801
  let R;
7801
7802
  for (const A of v) {
7802
7803
  let M;
7803
7804
  if (typeof A.budget == "string" && tn(A.budget))
7804
7805
  M = m.ManagedBudget(A.budget);
7805
- else if (An(P, A.budget) && T)
7806
- M = T;
7806
+ else if (An(P, A.budget) && $)
7807
+ M = $;
7807
7808
  else {
7808
7809
  let C = A.budget;
7809
7810
  switch (C.type) {
@@ -7831,9 +7832,9 @@ const ed = [
7831
7832
  );
7832
7833
  }
7833
7834
  }
7834
- T = M, P = A.budget, R = M.assertValidAddress();
7835
+ $ = M, P = A.budget, R = M.assertValidAddress();
7835
7836
  }
7836
- const q = A.incentives.map(async (C) => {
7837
+ const W = A.incentives.map(async (C) => {
7837
7838
  let B = 0n;
7838
7839
  switch (C.type) {
7839
7840
  case "AllowListIncentive":
@@ -7845,16 +7846,16 @@ const ed = [
7845
7846
  config: i,
7846
7847
  account: o
7847
7848
  }), m.ERC20Incentive(C);
7848
- case "ERC20VariableCriteriaIncentive":
7849
+ case "ERC20VariableCriteriaIncentiveV2":
7849
7850
  return B += C.limit, C.shouldMintAndAllocate && await et(M, B, C.asset, {
7850
7851
  config: i,
7851
7852
  account: o
7852
- }), m.ERC20VariableCriteriaIncentive(C);
7853
- case "ERC20PeggedVariableCriteriaIncentive":
7853
+ }), m.ERC20VariableCriteriaIncentiveV2(C);
7854
+ case "ERC20PeggedVariableCriteriaIncentiveV2":
7854
7855
  return B += C.limit, C.shouldMintAndAllocate && await et(M, B, C.asset, {
7855
7856
  config: i,
7856
7857
  account: o
7857
- }), m.ERC20PeggedVariableCriteriaIncentive(C);
7858
+ }), m.ERC20PeggedVariableCriteriaIncentiveV2(C);
7858
7859
  case "ERC20VariableIncentive":
7859
7860
  return B += C.limit, C.shouldMintAndAllocate && await et(M, B, C.asset, {
7860
7861
  config: i,
@@ -7866,7 +7867,7 @@ const ed = [
7866
7867
  account: o
7867
7868
  }), m.CGDAIncentive(C);
7868
7869
  }
7869
- }), F = await Promise.all(q), Y = {
7870
+ }), F = await Promise.all(W), Y = {
7870
7871
  protocolFee: A.protocolFee,
7871
7872
  maxParticipants: A.maxParticipants,
7872
7873
  budget: M,
@@ -7886,19 +7887,19 @@ const ed = [
7886
7887
  async function et(t, e, n, r) {
7887
7888
  if (n && e) {
7888
7889
  let s = new Js(r, n);
7889
- await xd(r, s, t, zr(e.toString()));
7890
+ await _d(r, s, t, zr(e.toString()));
7890
7891
  }
7891
7892
  }
7892
- async function nd(t) {
7893
+ async function rd(t) {
7893
7894
  const e = await ta.readFile(na.normalize(t), {
7894
7895
  encoding: "utf8"
7895
7896
  });
7896
7897
  return Qs.parse(JSON.parse(e));
7897
7898
  }
7898
- const rd = p.custom(pa, "invalid Hex payload"), I = p.string().transform((t, e) => (/^0x[a-fA-F0-9]{40}$/.test(t) || e.addIssue({
7899
+ const sd = p.custom(ma, "invalid Hex payload"), I = p.string().transform((t, e) => (/^0x[a-fA-F0-9]{40}$/.test(t) || e.addIssue({
7899
7900
  code: p.ZodIssueCode.custom,
7900
7901
  message: `Invalid Address ${t}`
7901
- }), t)).pipe(p.custom(tn, "invalid eth address")), Ys = p.coerce.number().min(1).max(2).transform(BigInt).pipe(p.custom()), sd = p.object({
7902
+ }), t)).pipe(p.custom(tn, "invalid eth address")), Ys = p.coerce.number().min(1).max(2).transform(BigInt).pipe(p.custom()), ad = p.object({
7902
7903
  type: p.literal("ManagedBudgetWithFeesV2"),
7903
7904
  owner: I,
7904
7905
  authorized: p.array(I),
@@ -7907,7 +7908,7 @@ const rd = p.custom(pa, "invalid Hex payload"), I = p.string().transform((t, e)
7907
7908
  }).refine(
7908
7909
  (t) => t.authorized.length === t.roles.length,
7909
7910
  "length mismatch authorized and roles"
7910
- ), ad = p.object({
7911
+ ), id = p.object({
7911
7912
  type: p.literal("ManagedBudget"),
7912
7913
  owner: I,
7913
7914
  authorized: p.array(I),
@@ -7920,54 +7921,54 @@ const rd = p.custom(pa, "invalid Hex payload"), I = p.string().transform((t, e)
7920
7921
  message: "signature must start with `event` or function`"
7921
7922
  }).transform((t) => {
7922
7923
  if (t.startsWith("function"))
7923
- return ma(ya(t));
7924
- if (t.startsWith("event")) return ba(t);
7924
+ return ya(ba(t));
7925
+ if (t.startsWith("event")) return ga(t);
7925
7926
  throw new Error("unreachable");
7926
7927
  })
7927
- ), id = p.object({
7928
+ ), od = p.object({
7928
7929
  signatureType: p.nativeEnum(st),
7929
7930
  signature: fn,
7930
7931
  fieldIndex: p.number().nonnegative(),
7931
7932
  targetContract: I,
7932
7933
  chainid: p.number().nonnegative()
7933
- }), od = p.object({
7934
+ }), cd = p.object({
7934
7935
  filterType: p.nativeEnum(Nr),
7935
7936
  fieldType: p.nativeEnum(Fr),
7936
7937
  fieldIndex: p.number().nonnegative(),
7937
- filterData: rd
7938
- }), cd = p.object({
7938
+ filterData: sd
7939
+ }), ud = p.object({
7939
7940
  signature: fn,
7940
7941
  signatureType: p.nativeEnum(st),
7941
7942
  actionType: p.number().optional(),
7942
7943
  targetContract: I,
7943
7944
  chainid: p.number().nonnegative(),
7944
- actionParameter: od
7945
- }), ud = p.object({
7946
- type: p.literal("EventAction"),
7947
- actionClaimant: id,
7948
- actionSteps: p.array(cd).max(4)
7945
+ actionParameter: cd
7949
7946
  }), dd = p.object({
7947
+ type: p.literal("EventAction"),
7948
+ actionClaimant: od,
7949
+ actionSteps: p.array(ud).max(4)
7950
+ }), ld = p.object({
7950
7951
  type: p.literal("LimitedSignerValidator"),
7951
7952
  signers: p.array(I),
7952
7953
  validatorCaller: I,
7953
7954
  maxClaimCount: p.coerce.number()
7954
- }), ld = p.object({
7955
+ }), fd = p.object({
7955
7956
  type: p.literal("SignerValidator"),
7956
7957
  signers: p.array(I),
7957
7958
  validatorCaller: I
7958
- }), fd = p.object({
7959
+ }), hd = p.object({
7959
7960
  type: p.literal("SimpleDenyList"),
7960
7961
  owner: I,
7961
7962
  denied: p.array(I)
7962
- }), hd = p.object({
7963
+ }), pd = p.object({
7963
7964
  type: p.literal("SimpleAllowList"),
7964
7965
  owner: I,
7965
7966
  allowed: p.array(I)
7966
- }), pd = p.object({
7967
+ }), md = p.object({
7967
7968
  type: p.literal("AllowListIncentive"),
7968
7969
  allowList: I,
7969
7970
  limit: p.coerce.bigint()
7970
- }), md = p.object({
7971
+ }), yd = p.object({
7971
7972
  type: p.literal("ERC20Incentive"),
7972
7973
  asset: I,
7973
7974
  shouldMintAndAllocate: p.boolean().optional().default(!1),
@@ -7975,7 +7976,7 @@ const rd = p.custom(pa, "invalid Hex payload"), I = p.string().transform((t, e)
7975
7976
  reward: p.coerce.bigint(),
7976
7977
  limit: p.coerce.bigint(),
7977
7978
  manager: I.optional()
7978
- }), yd = p.object({
7979
+ }), bd = p.object({
7979
7980
  type: p.literal("ERC20VariableIncentive"),
7980
7981
  asset: I,
7981
7982
  shouldMintAndAllocate: p.boolean().optional().default(!1),
@@ -7986,17 +7987,18 @@ const rd = p.custom(pa, "invalid Hex payload"), I = p.string().transform((t, e)
7986
7987
  criteriaType: p.nativeEnum(st),
7987
7988
  signature: fn,
7988
7989
  fieldIndex: p.number().nonnegative(),
7989
- targetContract: I
7990
- }), bd = p.object({
7991
- type: p.literal("ERC20VariableCriteriaIncentive"),
7990
+ targetContract: I,
7991
+ valueType: p.nativeEnum(sa)
7992
+ }), gd = p.object({
7993
+ type: p.literal("ERC20VariableCriteriaIncentiveV2"),
7992
7994
  asset: I,
7993
7995
  shouldMintAndAllocate: p.boolean().optional().default(!1),
7994
7996
  reward: p.coerce.bigint(),
7995
7997
  limit: p.coerce.bigint(),
7996
7998
  manager: I.optional(),
7997
7999
  criteria: Xs
7998
- }), gd = p.object({
7999
- type: p.literal("ERC20PeggedVariableCriteriaIncentive"),
8000
+ }), vd = p.object({
8001
+ type: p.literal("ERC20PeggedVariableCriteriaIncentiveV2"),
8000
8002
  asset: I,
8001
8003
  shouldMintAndAllocate: p.boolean().optional().default(!1),
8002
8004
  maxReward: p.coerce.bigint(),
@@ -8005,7 +8007,7 @@ const rd = p.custom(pa, "invalid Hex payload"), I = p.string().transform((t, e)
8005
8007
  limit: p.coerce.bigint(),
8006
8008
  manager: I.optional(),
8007
8009
  criteria: Xs
8008
- }), vd = p.object({
8010
+ }), wd = p.object({
8009
8011
  type: p.literal("CGDAIncentive"),
8010
8012
  asset: I,
8011
8013
  shouldMintAndAllocate: p.boolean().optional().default(!1),
@@ -8014,7 +8016,7 @@ const rd = p.custom(pa, "invalid Hex payload"), I = p.string().transform((t, e)
8014
8016
  rewardBoost: p.coerce.bigint(),
8015
8017
  totalBudget: p.coerce.bigint(),
8016
8018
  manager: I
8017
- }), wd = p.object({
8019
+ }), xd = p.object({
8018
8020
  type: p.literal("PointsIncentive"),
8019
8021
  venue: I,
8020
8022
  selector: fn,
@@ -8025,28 +8027,28 @@ const rd = p.custom(pa, "invalid Hex payload"), I = p.string().transform((t, e)
8025
8027
  maxParticipants: p.coerce.bigint(),
8026
8028
  budget: p.union([
8027
8029
  I,
8028
- ad,
8029
- sd
8030
+ id,
8031
+ ad
8030
8032
  ]),
8031
- action: p.union([I, ud]),
8032
- validator: p.union([I, ld, dd]).optional(),
8033
- allowList: p.union([I, fd, hd]).optional(),
8033
+ action: p.union([I, dd]),
8034
+ validator: p.union([I, fd, ld]).optional(),
8035
+ allowList: p.union([I, hd, pd]).optional(),
8034
8036
  incentives: p.array(
8035
8037
  p.union([
8036
- pd,
8037
8038
  md,
8038
- bd,
8039
- gd,
8040
8039
  yd,
8040
+ gd,
8041
8041
  vd,
8042
- wd
8042
+ bd,
8043
+ wd,
8044
+ xd
8043
8045
  ])
8044
8046
  )
8045
8047
  });
8046
8048
  async function ea({ allowList: t }, { core: e }) {
8047
8049
  if (!t) return e.OpenAllowList();
8048
8050
  if (typeof t == "string" && tn(t))
8049
- return await ca(
8051
+ return await ua(
8050
8052
  //@ts-expect-error i do what i want
8051
8053
  { config: e._config, account: e._account },
8052
8054
  t
@@ -8060,16 +8062,16 @@ async function ea({ allowList: t }, { core: e }) {
8060
8062
  throw new Error("unusupported AllowList: " + t);
8061
8063
  }
8062
8064
  }
8063
- async function xd(t, e, n, r = zr("110")) {
8064
- return await e.mint(t.account.address, r), await e.approve(n.assertValidAddress(), r), await n.allocate({
8065
+ async function _d(t, e, n, r = zr("110")) {
8066
+ return await e.mint(t.account.address, r), await e.approve(n.assertValidAddress(), r), "allocate" in n && await n.allocate({
8065
8067
  amount: r,
8066
8068
  asset: e.assertValidAddress(),
8067
8069
  target: t.account.address
8068
8070
  }), { budget: n, erc20: e };
8069
8071
  }
8070
- function _d({
8072
+ function Pd({
8071
8073
  asset: t = "0xf3B2d0E4f2d8F453DBCc278b10e88b20d7f19f8D",
8072
- account: e = ed[0].account,
8074
+ account: e = td[0].account,
8073
8075
  chainId: n
8074
8076
  }) {
8075
8077
  return {
@@ -8130,7 +8132,7 @@ function _d({
8130
8132
  ]
8131
8133
  };
8132
8134
  }
8133
- async function Td(t, e) {
8135
+ async function kd(t, e) {
8134
8136
  const n = Qs.parse(t);
8135
8137
  let r;
8136
8138
  if (typeof n.budget == "string" && tn(n.budget))
@@ -8145,10 +8147,10 @@ async function Td(t, e) {
8145
8147
  return e.PointsIncentive(i);
8146
8148
  case "ERC20Incentive":
8147
8149
  return e.ERC20Incentive(i);
8148
- case "ERC20VariableCriteriaIncentive":
8149
- return e.ERC20VariableCriteriaIncentive(i);
8150
- case "ERC20PeggedVariableCriteriaIncentive":
8151
- return e.ERC20PeggedVariableCriteriaIncentive(i);
8150
+ case "ERC20VariableCriteriaIncentiveV2":
8151
+ return e.ERC20VariableCriteriaIncentiveV2(i);
8152
+ case "ERC20PeggedVariableCriteriaIncentiveV2":
8153
+ return e.ERC20PeggedVariableCriteriaIncentiveV2(i);
8152
8154
  case "ERC20VariableIncentive":
8153
8155
  return e.ERC20VariableIncentive(i);
8154
8156
  case "CGDAIncentive":
@@ -8177,37 +8179,37 @@ async function Td(t, e) {
8177
8179
  return a;
8178
8180
  }
8179
8181
  export {
8180
- id as A,
8182
+ od as A,
8181
8183
  y as B,
8182
- vd as C,
8183
- ud as E,
8184
+ wd as C,
8185
+ dd as E,
8184
8186
  ys as H,
8185
8187
  vt as I,
8186
- dd as L,
8187
- sd as M,
8188
- wd as P,
8189
- ld as S,
8188
+ ld as L,
8189
+ ad as M,
8190
+ xd as P,
8191
+ fd as S,
8190
8192
  cn as a,
8191
- qe as b,
8193
+ We as b,
8192
8194
  Us as c,
8193
- du as d,
8195
+ lu as d,
8194
8196
  os as e,
8195
8197
  Pe as f,
8196
8198
  ms as g,
8197
- ad as h,
8199
+ id as h,
8198
8200
  Ee as i,
8199
- od as j,
8200
- cd as k,
8201
- fd as l,
8202
- hd as m,
8203
- pd as n,
8204
- md as o,
8205
- yd as p,
8201
+ cd as j,
8202
+ ud as k,
8203
+ hd as l,
8204
+ pd as m,
8205
+ md as n,
8206
+ yd as o,
8207
+ bd as p,
8206
8208
  Xs as q,
8207
- bd as r,
8208
- kd as s,
8209
- gd as t,
8209
+ gd as r,
8210
+ $d as s,
8211
+ vd as t,
8210
8212
  Qs as u,
8211
- _d as v,
8212
- Td as w
8213
+ Pd as v,
8214
+ kd as w
8213
8215
  };