@telemetryos/sdk 1.7.5 → 1.8.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.
package/dist/index.js CHANGED
@@ -1,39 +1,39 @@
1
1
  var b;
2
2
  (function(n) {
3
- n.assertEqual = (s) => {
3
+ n.assertEqual = (a) => {
4
4
  };
5
- function e(s) {
5
+ function e(a) {
6
6
  }
7
7
  n.assertIs = e;
8
- function t(s) {
8
+ function t(a) {
9
9
  throw new Error();
10
10
  }
11
- n.assertNever = t, n.arrayToEnum = (s) => {
11
+ n.assertNever = t, n.arrayToEnum = (a) => {
12
12
  const i = {};
13
- for (const r of s)
13
+ for (const r of a)
14
14
  i[r] = r;
15
15
  return i;
16
- }, n.getValidEnumValues = (s) => {
17
- const i = n.objectKeys(s).filter((o) => typeof s[s[o]] != "number"), r = {};
16
+ }, n.getValidEnumValues = (a) => {
17
+ const i = n.objectKeys(a).filter((o) => typeof a[a[o]] != "number"), r = {};
18
18
  for (const o of i)
19
- r[o] = s[o];
19
+ r[o] = a[o];
20
20
  return n.objectValues(r);
21
- }, n.objectValues = (s) => n.objectKeys(s).map(function(i) {
22
- return s[i];
23
- }), n.objectKeys = typeof Object.keys == "function" ? (s) => Object.keys(s) : (s) => {
21
+ }, n.objectValues = (a) => n.objectKeys(a).map(function(i) {
22
+ return a[i];
23
+ }), n.objectKeys = typeof Object.keys == "function" ? (a) => Object.keys(a) : (a) => {
24
24
  const i = [];
25
- for (const r in s)
26
- Object.prototype.hasOwnProperty.call(s, r) && i.push(r);
25
+ for (const r in a)
26
+ Object.prototype.hasOwnProperty.call(a, r) && i.push(r);
27
27
  return i;
28
- }, n.find = (s, i) => {
29
- for (const r of s)
28
+ }, n.find = (a, i) => {
29
+ for (const r of a)
30
30
  if (i(r))
31
31
  return r;
32
- }, n.isInteger = typeof Number.isInteger == "function" ? (s) => Number.isInteger(s) : (s) => typeof s == "number" && Number.isFinite(s) && Math.floor(s) === s;
33
- function a(s, i = " | ") {
34
- return s.map((r) => typeof r == "string" ? `'${r}'` : r).join(i);
32
+ }, n.isInteger = typeof Number.isInteger == "function" ? (a) => Number.isInteger(a) : (a) => typeof a == "number" && Number.isFinite(a) && Math.floor(a) === a;
33
+ function s(a, i = " | ") {
34
+ return a.map((r) => typeof r == "string" ? `'${r}'` : r).join(i);
35
35
  }
36
- n.joinValues = a, n.jsonStringifyReplacer = (s, i) => typeof i == "bigint" ? i.toString() : i;
36
+ n.joinValues = s, n.jsonStringifyReplacer = (a, i) => typeof i == "bigint" ? i.toString() : i;
37
37
  })(b || (b = {}));
38
38
  var ye;
39
39
  (function(n) {
@@ -108,10 +108,10 @@ class C extends Error {
108
108
  return this.issues;
109
109
  }
110
110
  constructor(e) {
111
- super(), this.issues = [], this.addIssue = (a) => {
112
- this.issues = [...this.issues, a];
113
- }, this.addIssues = (a = []) => {
114
- this.issues = [...this.issues, ...a];
111
+ super(), this.issues = [], this.addIssue = (s) => {
112
+ this.issues = [...this.issues, s];
113
+ }, this.addIssues = (s = []) => {
114
+ this.issues = [...this.issues, ...s];
115
115
  };
116
116
  const t = new.target.prototype;
117
117
  Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e;
@@ -119,25 +119,25 @@ class C extends Error {
119
119
  format(e) {
120
120
  const t = e || function(i) {
121
121
  return i.message;
122
- }, a = { _errors: [] }, s = (i) => {
122
+ }, s = { _errors: [] }, a = (i) => {
123
123
  for (const r of i.issues)
124
124
  if (r.code === "invalid_union")
125
- r.unionErrors.map(s);
125
+ r.unionErrors.map(a);
126
126
  else if (r.code === "invalid_return_type")
127
- s(r.returnTypeError);
127
+ a(r.returnTypeError);
128
128
  else if (r.code === "invalid_arguments")
129
- s(r.argumentsError);
129
+ a(r.argumentsError);
130
130
  else if (r.path.length === 0)
131
- a._errors.push(t(r));
131
+ s._errors.push(t(r));
132
132
  else {
133
- let o = a, c = 0;
133
+ let o = s, c = 0;
134
134
  for (; c < r.path.length; ) {
135
135
  const h = r.path[c];
136
136
  c === r.path.length - 1 ? (o[h] = o[h] || { _errors: [] }, o[h]._errors.push(t(r))) : o[h] = o[h] || { _errors: [] }, o = o[h], c++;
137
137
  }
138
138
  }
139
139
  };
140
- return s(this), a;
140
+ return a(this), s;
141
141
  }
142
142
  static assert(e) {
143
143
  if (!(e instanceof C))
@@ -153,14 +153,14 @@ class C extends Error {
153
153
  return this.issues.length === 0;
154
154
  }
155
155
  flatten(e = (t) => t.message) {
156
- const t = {}, a = [];
157
- for (const s of this.issues)
158
- if (s.path.length > 0) {
159
- const i = s.path[0];
160
- t[i] = t[i] || [], t[i].push(e(s));
156
+ const t = {}, s = [];
157
+ for (const a of this.issues)
158
+ if (a.path.length > 0) {
159
+ const i = a.path[0];
160
+ t[i] = t[i] || [], t[i].push(e(a));
161
161
  } else
162
- a.push(e(s));
163
- return { formErrors: a, fieldErrors: t };
162
+ s.push(e(a));
163
+ return { formErrors: s, fieldErrors: t };
164
164
  }
165
165
  get formErrors() {
166
166
  return this.flatten();
@@ -228,28 +228,28 @@ function qe() {
228
228
  return Le;
229
229
  }
230
230
  const De = (n) => {
231
- const { data: e, path: t, errorMaps: a, issueData: s } = n, i = [...t, ...s.path || []], r = {
232
- ...s,
231
+ const { data: e, path: t, errorMaps: s, issueData: a } = n, i = [...t, ...a.path || []], r = {
232
+ ...a,
233
233
  path: i
234
234
  };
235
- if (s.message !== void 0)
235
+ if (a.message !== void 0)
236
236
  return {
237
- ...s,
237
+ ...a,
238
238
  path: i,
239
- message: s.message
239
+ message: a.message
240
240
  };
241
241
  let o = "";
242
- const c = a.filter((h) => !!h).slice().reverse();
242
+ const c = s.filter((h) => !!h).slice().reverse();
243
243
  for (const h of c)
244
244
  o = h(r, { data: e, defaultError: o }).message;
245
245
  return {
246
- ...s,
246
+ ...a,
247
247
  path: i,
248
248
  message: o
249
249
  };
250
250
  };
251
251
  function u(n, e) {
252
- const t = qe(), a = De({
252
+ const t = qe(), s = De({
253
253
  issueData: e,
254
254
  data: n.data,
255
255
  path: n.path,
@@ -262,9 +262,9 @@ function u(n, e) {
262
262
  // then global override map
263
263
  t === re ? void 0 : re
264
264
  // then global default map
265
- ].filter((s) => !!s)
265
+ ].filter((a) => !!a)
266
266
  });
267
- n.common.issues.push(a);
267
+ n.common.issues.push(s);
268
268
  }
269
269
  let N = class je {
270
270
  constructor() {
@@ -277,37 +277,37 @@ let N = class je {
277
277
  this.value !== "aborted" && (this.value = "aborted");
278
278
  }
279
279
  static mergeArray(e, t) {
280
- const a = [];
281
- for (const s of t) {
282
- if (s.status === "aborted")
283
- return _;
284
- s.status === "dirty" && e.dirty(), a.push(s.value);
280
+ const s = [];
281
+ for (const a of t) {
282
+ if (a.status === "aborted")
283
+ return g;
284
+ a.status === "dirty" && e.dirty(), s.push(a.value);
285
285
  }
286
- return { status: e.value, value: a };
286
+ return { status: e.value, value: s };
287
287
  }
288
288
  static async mergeObjectAsync(e, t) {
289
- const a = [];
290
- for (const s of t) {
291
- const i = await s.key, r = await s.value;
292
- a.push({
289
+ const s = [];
290
+ for (const a of t) {
291
+ const i = await a.key, r = await a.value;
292
+ s.push({
293
293
  key: i,
294
294
  value: r
295
295
  });
296
296
  }
297
- return je.mergeObjectSync(e, a);
297
+ return je.mergeObjectSync(e, s);
298
298
  }
299
299
  static mergeObjectSync(e, t) {
300
- const a = {};
301
- for (const s of t) {
302
- const { key: i, value: r } = s;
300
+ const s = {};
301
+ for (const a of t) {
302
+ const { key: i, value: r } = a;
303
303
  if (i.status === "aborted" || r.status === "aborted")
304
- return _;
305
- i.status === "dirty" && e.dirty(), r.status === "dirty" && e.dirty(), i.value !== "__proto__" && (typeof r.value < "u" || s.alwaysSet) && (a[i.value] = r.value);
304
+ return g;
305
+ i.status === "dirty" && e.dirty(), r.status === "dirty" && e.dirty(), i.value !== "__proto__" && (typeof r.value < "u" || a.alwaysSet) && (s[i.value] = r.value);
306
306
  }
307
- return { status: e.value, value: a };
307
+ return { status: e.value, value: s };
308
308
  }
309
309
  };
310
- const _ = Object.freeze({
310
+ const g = Object.freeze({
311
311
  status: "aborted"
312
312
  }), ie = (n) => ({ status: "dirty", value: n }), x = (n) => ({ status: "valid", value: n }), ve = (n) => n.status === "aborted", be = (n) => n.status === "dirty", L = (n) => n.status === "valid", X = (n) => typeof Promise < "u" && n instanceof Promise;
313
313
  var p;
@@ -315,8 +315,8 @@ var p;
315
315
  n.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, n.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
316
316
  })(p || (p = {}));
317
317
  let $ = class {
318
- constructor(e, t, a, s) {
319
- this._cachedPath = [], this.parent = e, this.data = t, this._path = a, this._key = s;
318
+ constructor(e, t, s, a) {
319
+ this._cachedPath = [], this.parent = e, this.data = t, this._path = s, this._key = a;
320
320
  }
321
321
  get path() {
322
322
  return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
@@ -340,13 +340,13 @@ const we = (n, e) => {
340
340
  function y(n) {
341
341
  if (!n)
342
342
  return {};
343
- const { errorMap: e, invalid_type_error: t, required_error: a, description: s } = n;
344
- if (e && (t || a))
343
+ const { errorMap: e, invalid_type_error: t, required_error: s, description: a } = n;
344
+ if (e && (t || s))
345
345
  throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
346
- return e ? { errorMap: e, description: s } : { errorMap: (i, r) => {
346
+ return e ? { errorMap: e, description: a } : { errorMap: (i, r) => {
347
347
  const { message: o } = n;
348
- return i.code === "invalid_enum_value" ? { message: o ?? r.defaultError } : typeof r.data > "u" ? { message: o ?? a ?? r.defaultError } : i.code !== "invalid_type" ? { message: r.defaultError } : { message: o ?? t ?? r.defaultError };
349
- }, description: s };
348
+ return i.code === "invalid_enum_value" ? { message: o ?? r.defaultError } : typeof r.data > "u" ? { message: o ?? s ?? r.defaultError } : i.code !== "invalid_type" ? { message: r.defaultError } : { message: o ?? t ?? r.defaultError };
349
+ }, description: a };
350
350
  }
351
351
  let v = class {
352
352
  get description() {
@@ -389,13 +389,13 @@ let v = class {
389
389
  return Promise.resolve(t);
390
390
  }
391
391
  parse(e, t) {
392
- const a = this.safeParse(e, t);
393
- if (a.success)
394
- return a.data;
395
- throw a.error;
392
+ const s = this.safeParse(e, t);
393
+ if (s.success)
394
+ return s.data;
395
+ throw s.error;
396
396
  }
397
397
  safeParse(e, t) {
398
- const a = {
398
+ const s = {
399
399
  common: {
400
400
  issues: [],
401
401
  async: (t == null ? void 0 : t.async) ?? !1,
@@ -406,12 +406,12 @@ let v = class {
406
406
  parent: null,
407
407
  data: e,
408
408
  parsedType: O(e)
409
- }, s = this._parseSync({ data: e, path: a.path, parent: a });
410
- return we(a, s);
409
+ }, a = this._parseSync({ data: e, path: s.path, parent: s });
410
+ return we(s, a);
411
411
  }
412
412
  "~validate"(e) {
413
- var t, a;
414
- const s = {
413
+ var t, s;
414
+ const a = {
415
415
  common: {
416
416
  issues: [],
417
417
  async: !!this["~standard"].async
@@ -424,32 +424,32 @@ let v = class {
424
424
  };
425
425
  if (!this["~standard"].async)
426
426
  try {
427
- const i = this._parseSync({ data: e, path: [], parent: s });
427
+ const i = this._parseSync({ data: e, path: [], parent: a });
428
428
  return L(i) ? {
429
429
  value: i.value
430
430
  } : {
431
- issues: s.common.issues
431
+ issues: a.common.issues
432
432
  };
433
433
  } catch (i) {
434
- (a = (t = i == null ? void 0 : i.message) == null ? void 0 : t.toLowerCase()) != null && a.includes("encountered") && (this["~standard"].async = !0), s.common = {
434
+ (s = (t = i == null ? void 0 : i.message) == null ? void 0 : t.toLowerCase()) != null && s.includes("encountered") && (this["~standard"].async = !0), a.common = {
435
435
  issues: [],
436
436
  async: !0
437
437
  };
438
438
  }
439
- return this._parseAsync({ data: e, path: [], parent: s }).then((i) => L(i) ? {
439
+ return this._parseAsync({ data: e, path: [], parent: a }).then((i) => L(i) ? {
440
440
  value: i.value
441
441
  } : {
442
- issues: s.common.issues
442
+ issues: a.common.issues
443
443
  });
444
444
  }
445
445
  async parseAsync(e, t) {
446
- const a = await this.safeParseAsync(e, t);
447
- if (a.success)
448
- return a.data;
449
- throw a.error;
446
+ const s = await this.safeParseAsync(e, t);
447
+ if (s.success)
448
+ return s.data;
449
+ throw s.error;
450
450
  }
451
451
  async safeParseAsync(e, t) {
452
- const a = {
452
+ const s = {
453
453
  common: {
454
454
  issues: [],
455
455
  contextualErrorMap: t == null ? void 0 : t.errorMap,
@@ -460,26 +460,26 @@ let v = class {
460
460
  parent: null,
461
461
  data: e,
462
462
  parsedType: O(e)
463
- }, s = this._parse({ data: e, path: a.path, parent: a }), i = await (X(s) ? s : Promise.resolve(s));
464
- return we(a, i);
463
+ }, a = this._parse({ data: e, path: s.path, parent: s }), i = await (X(a) ? a : Promise.resolve(a));
464
+ return we(s, i);
465
465
  }
466
466
  refine(e, t) {
467
- const a = (s) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(s) : t;
468
- return this._refinement((s, i) => {
469
- const r = e(s), o = () => i.addIssue({
467
+ const s = (a) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(a) : t;
468
+ return this._refinement((a, i) => {
469
+ const r = e(a), o = () => i.addIssue({
470
470
  code: d.custom,
471
- ...a(s)
471
+ ...s(a)
472
472
  });
473
473
  return typeof Promise < "u" && r instanceof Promise ? r.then((c) => c ? !0 : (o(), !1)) : r ? !0 : (o(), !1);
474
474
  });
475
475
  }
476
476
  refinement(e, t) {
477
- return this._refinement((a, s) => e(a) ? !0 : (s.addIssue(typeof t == "function" ? t(a, s) : t), !1));
477
+ return this._refinement((s, a) => e(s) ? !0 : (a.addIssue(typeof t == "function" ? t(s, a) : t), !1));
478
478
  }
479
479
  _refinement(e) {
480
480
  return new D({
481
481
  schema: this,
482
- typeName: f.ZodEffects,
482
+ typeName: m.ZodEffects,
483
483
  effect: { type: "refinement", refinement: e }
484
484
  });
485
485
  }
@@ -518,7 +518,7 @@ let v = class {
518
518
  return new D({
519
519
  ...y(this._def),
520
520
  schema: this,
521
- typeName: f.ZodEffects,
521
+ typeName: m.ZodEffects,
522
522
  effect: { type: "transform", transform: e }
523
523
  });
524
524
  }
@@ -528,12 +528,12 @@ let v = class {
528
528
  ...y(this._def),
529
529
  innerType: this,
530
530
  defaultValue: t,
531
- typeName: f.ZodDefault
531
+ typeName: m.ZodDefault
532
532
  });
533
533
  }
534
534
  brand() {
535
535
  return new ut({
536
- typeName: f.ZodBranded,
536
+ typeName: m.ZodBranded,
537
537
  type: this,
538
538
  ...y(this._def)
539
539
  });
@@ -544,7 +544,7 @@ let v = class {
544
544
  ...y(this._def),
545
545
  innerType: this,
546
546
  catchValue: t,
547
- typeName: f.ZodCatch
547
+ typeName: m.ZodCatch
548
548
  });
549
549
  }
550
550
  describe(e) {
@@ -569,7 +569,7 @@ let v = class {
569
569
  };
570
570
  const Ve = /^c[^\s-]{8,}$/i, ze = /^[0-9a-z]+$/, Be = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Ue = /^[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, He = /^[a-z0-9_-]{21}$/i, Ke = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, We = /^[-+]?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)?)??$/, Je = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ge = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
571
571
  let ne;
572
- const Ye = /^(?:(?: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])$/, Xe = /^(?:(?: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])$/, Qe = /^(([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]))$/, et = /^(([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])$/, tt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, at = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Pe = "((\\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])))", st = new RegExp(`^${Pe}$`);
572
+ const Ye = /^(?:(?: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])$/, Xe = /^(?:(?: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])$/, Qe = /^(([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]))$/, et = /^(([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])$/, tt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, st = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Pe = "((\\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])))", at = new RegExp(`^${Pe}$`);
573
573
  function Re(n) {
574
574
  let e = "[0-5]\\d";
575
575
  n.precision ? e = `${e}\\.\\d{${n.precision}}` : n.precision == null && (e = `${e}(\\.\\d+)?`);
@@ -594,8 +594,8 @@ function ot(n, e) {
594
594
  const [t] = n.split(".");
595
595
  if (!t)
596
596
  return !1;
597
- const a = t.replace(/-/g, "+").replace(/_/g, "/").padEnd(t.length + (4 - t.length % 4) % 4, "="), s = JSON.parse(atob(a));
598
- return !(typeof s != "object" || s === null || "typ" in s && (s == null ? void 0 : s.typ) !== "JWT" || !s.alg || e && s.alg !== e);
597
+ const s = t.replace(/-/g, "+").replace(/_/g, "/").padEnd(t.length + (4 - t.length % 4) % 4, "="), a = JSON.parse(atob(s));
598
+ return !(typeof a != "object" || a === null || "typ" in a && (a == null ? void 0 : a.typ) !== "JWT" || !a.alg || e && a.alg !== e);
599
599
  } catch {
600
600
  return !1;
601
601
  }
@@ -606,163 +606,163 @@ function ct(n, e) {
606
606
  class A extends v {
607
607
  _parse(e) {
608
608
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== l.string) {
609
- const s = this._getOrReturnCtx(e);
610
- return u(s, {
609
+ const a = this._getOrReturnCtx(e);
610
+ return u(a, {
611
611
  code: d.invalid_type,
612
612
  expected: l.string,
613
- received: s.parsedType
614
- }), _;
613
+ received: a.parsedType
614
+ }), g;
615
615
  }
616
616
  const t = new N();
617
- let a;
618
- for (const s of this._def.checks)
619
- if (s.kind === "min")
620
- e.data.length < s.value && (a = this._getOrReturnCtx(e, a), u(a, {
617
+ let s;
618
+ for (const a of this._def.checks)
619
+ if (a.kind === "min")
620
+ e.data.length < a.value && (s = this._getOrReturnCtx(e, s), u(s, {
621
621
  code: d.too_small,
622
- minimum: s.value,
622
+ minimum: a.value,
623
623
  type: "string",
624
624
  inclusive: !0,
625
625
  exact: !1,
626
- message: s.message
626
+ message: a.message
627
627
  }), t.dirty());
628
- else if (s.kind === "max")
629
- e.data.length > s.value && (a = this._getOrReturnCtx(e, a), u(a, {
628
+ else if (a.kind === "max")
629
+ e.data.length > a.value && (s = this._getOrReturnCtx(e, s), u(s, {
630
630
  code: d.too_big,
631
- maximum: s.value,
631
+ maximum: a.value,
632
632
  type: "string",
633
633
  inclusive: !0,
634
634
  exact: !1,
635
- message: s.message
635
+ message: a.message
636
636
  }), t.dirty());
637
- else if (s.kind === "length") {
638
- const i = e.data.length > s.value, r = e.data.length < s.value;
639
- (i || r) && (a = this._getOrReturnCtx(e, a), i ? u(a, {
637
+ else if (a.kind === "length") {
638
+ const i = e.data.length > a.value, r = e.data.length < a.value;
639
+ (i || r) && (s = this._getOrReturnCtx(e, s), i ? u(s, {
640
640
  code: d.too_big,
641
- maximum: s.value,
641
+ maximum: a.value,
642
642
  type: "string",
643
643
  inclusive: !0,
644
644
  exact: !0,
645
- message: s.message
646
- }) : r && u(a, {
645
+ message: a.message
646
+ }) : r && u(s, {
647
647
  code: d.too_small,
648
- minimum: s.value,
648
+ minimum: a.value,
649
649
  type: "string",
650
650
  inclusive: !0,
651
651
  exact: !0,
652
- message: s.message
652
+ message: a.message
653
653
  }), t.dirty());
654
- } else if (s.kind === "email")
655
- Je.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
654
+ } else if (a.kind === "email")
655
+ Je.test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
656
656
  validation: "email",
657
657
  code: d.invalid_string,
658
- message: s.message
658
+ message: a.message
659
659
  }), t.dirty());
660
- else if (s.kind === "emoji")
661
- ne || (ne = new RegExp(Ge, "u")), ne.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
660
+ else if (a.kind === "emoji")
661
+ ne || (ne = new RegExp(Ge, "u")), ne.test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
662
662
  validation: "emoji",
663
663
  code: d.invalid_string,
664
- message: s.message
664
+ message: a.message
665
665
  }), t.dirty());
666
- else if (s.kind === "uuid")
667
- Ue.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
666
+ else if (a.kind === "uuid")
667
+ Ue.test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
668
668
  validation: "uuid",
669
669
  code: d.invalid_string,
670
- message: s.message
670
+ message: a.message
671
671
  }), t.dirty());
672
- else if (s.kind === "nanoid")
673
- He.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
672
+ else if (a.kind === "nanoid")
673
+ He.test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
674
674
  validation: "nanoid",
675
675
  code: d.invalid_string,
676
- message: s.message
676
+ message: a.message
677
677
  }), t.dirty());
678
- else if (s.kind === "cuid")
679
- Ve.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
678
+ else if (a.kind === "cuid")
679
+ Ve.test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
680
680
  validation: "cuid",
681
681
  code: d.invalid_string,
682
- message: s.message
682
+ message: a.message
683
683
  }), t.dirty());
684
- else if (s.kind === "cuid2")
685
- ze.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
684
+ else if (a.kind === "cuid2")
685
+ ze.test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
686
686
  validation: "cuid2",
687
687
  code: d.invalid_string,
688
- message: s.message
688
+ message: a.message
689
689
  }), t.dirty());
690
- else if (s.kind === "ulid")
691
- Be.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
690
+ else if (a.kind === "ulid")
691
+ Be.test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
692
692
  validation: "ulid",
693
693
  code: d.invalid_string,
694
- message: s.message
694
+ message: a.message
695
695
  }), t.dirty());
696
- else if (s.kind === "url")
696
+ else if (a.kind === "url")
697
697
  try {
698
698
  new URL(e.data);
699
699
  } catch {
700
- a = this._getOrReturnCtx(e, a), u(a, {
700
+ s = this._getOrReturnCtx(e, s), u(s, {
701
701
  validation: "url",
702
702
  code: d.invalid_string,
703
- message: s.message
703
+ message: a.message
704
704
  }), t.dirty();
705
705
  }
706
- else s.kind === "regex" ? (s.regex.lastIndex = 0, s.regex.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
706
+ else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
707
707
  validation: "regex",
708
708
  code: d.invalid_string,
709
- message: s.message
710
- }), t.dirty())) : s.kind === "trim" ? e.data = e.data.trim() : s.kind === "includes" ? e.data.includes(s.value, s.position) || (a = this._getOrReturnCtx(e, a), u(a, {
709
+ message: a.message
710
+ }), t.dirty())) : a.kind === "trim" ? e.data = e.data.trim() : a.kind === "includes" ? e.data.includes(a.value, a.position) || (s = this._getOrReturnCtx(e, s), u(s, {
711
711
  code: d.invalid_string,
712
- validation: { includes: s.value, position: s.position },
713
- message: s.message
714
- }), t.dirty()) : s.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : s.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : s.kind === "startsWith" ? e.data.startsWith(s.value) || (a = this._getOrReturnCtx(e, a), u(a, {
712
+ validation: { includes: a.value, position: a.position },
713
+ message: a.message
714
+ }), t.dirty()) : a.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : a.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : a.kind === "startsWith" ? e.data.startsWith(a.value) || (s = this._getOrReturnCtx(e, s), u(s, {
715
715
  code: d.invalid_string,
716
- validation: { startsWith: s.value },
717
- message: s.message
718
- }), t.dirty()) : s.kind === "endsWith" ? e.data.endsWith(s.value) || (a = this._getOrReturnCtx(e, a), u(a, {
716
+ validation: { startsWith: a.value },
717
+ message: a.message
718
+ }), t.dirty()) : a.kind === "endsWith" ? e.data.endsWith(a.value) || (s = this._getOrReturnCtx(e, s), u(s, {
719
719
  code: d.invalid_string,
720
- validation: { endsWith: s.value },
721
- message: s.message
722
- }), t.dirty()) : s.kind === "datetime" ? rt(s).test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
720
+ validation: { endsWith: a.value },
721
+ message: a.message
722
+ }), t.dirty()) : a.kind === "datetime" ? rt(a).test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
723
723
  code: d.invalid_string,
724
724
  validation: "datetime",
725
- message: s.message
726
- }), t.dirty()) : s.kind === "date" ? st.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
725
+ message: a.message
726
+ }), t.dirty()) : a.kind === "date" ? at.test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
727
727
  code: d.invalid_string,
728
728
  validation: "date",
729
- message: s.message
730
- }), t.dirty()) : s.kind === "time" ? nt(s).test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
729
+ message: a.message
730
+ }), t.dirty()) : a.kind === "time" ? nt(a).test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
731
731
  code: d.invalid_string,
732
732
  validation: "time",
733
- message: s.message
734
- }), t.dirty()) : s.kind === "duration" ? We.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
733
+ message: a.message
734
+ }), t.dirty()) : a.kind === "duration" ? We.test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
735
735
  validation: "duration",
736
736
  code: d.invalid_string,
737
- message: s.message
738
- }), t.dirty()) : s.kind === "ip" ? it(e.data, s.version) || (a = this._getOrReturnCtx(e, a), u(a, {
737
+ message: a.message
738
+ }), t.dirty()) : a.kind === "ip" ? it(e.data, a.version) || (s = this._getOrReturnCtx(e, s), u(s, {
739
739
  validation: "ip",
740
740
  code: d.invalid_string,
741
- message: s.message
742
- }), t.dirty()) : s.kind === "jwt" ? ot(e.data, s.alg) || (a = this._getOrReturnCtx(e, a), u(a, {
741
+ message: a.message
742
+ }), t.dirty()) : a.kind === "jwt" ? ot(e.data, a.alg) || (s = this._getOrReturnCtx(e, s), u(s, {
743
743
  validation: "jwt",
744
744
  code: d.invalid_string,
745
- message: s.message
746
- }), t.dirty()) : s.kind === "cidr" ? ct(e.data, s.version) || (a = this._getOrReturnCtx(e, a), u(a, {
745
+ message: a.message
746
+ }), t.dirty()) : a.kind === "cidr" ? ct(e.data, a.version) || (s = this._getOrReturnCtx(e, s), u(s, {
747
747
  validation: "cidr",
748
748
  code: d.invalid_string,
749
- message: s.message
750
- }), t.dirty()) : s.kind === "base64" ? tt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
749
+ message: a.message
750
+ }), t.dirty()) : a.kind === "base64" ? tt.test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
751
751
  validation: "base64",
752
752
  code: d.invalid_string,
753
- message: s.message
754
- }), t.dirty()) : s.kind === "base64url" ? at.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
753
+ message: a.message
754
+ }), t.dirty()) : a.kind === "base64url" ? st.test(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
755
755
  validation: "base64url",
756
756
  code: d.invalid_string,
757
- message: s.message
758
- }), t.dirty()) : b.assertNever(s);
757
+ message: a.message
758
+ }), t.dirty()) : b.assertNever(a);
759
759
  return { status: t.value, value: e.data };
760
760
  }
761
- _regex(e, t, a) {
762
- return this.refinement((s) => e.test(s), {
761
+ _regex(e, t, s) {
762
+ return this.refinement((a) => e.test(a), {
763
763
  validation: t,
764
764
  code: d.invalid_string,
765
- ...p.errToObj(a)
765
+ ...p.errToObj(s)
766
766
  });
767
767
  }
768
768
  _addCheck(e) {
@@ -982,13 +982,13 @@ class A extends v {
982
982
  }
983
983
  A.create = (n) => new A({
984
984
  checks: [],
985
- typeName: f.ZodString,
985
+ typeName: m.ZodString,
986
986
  coerce: (n == null ? void 0 : n.coerce) ?? !1,
987
987
  ...y(n)
988
988
  });
989
989
  function dt(n, e) {
990
- const t = (n.toString().split(".")[1] || "").length, a = (e.toString().split(".")[1] || "").length, s = t > a ? t : a, i = Number.parseInt(n.toFixed(s).replace(".", "")), r = Number.parseInt(e.toFixed(s).replace(".", ""));
991
- return i % r / 10 ** s;
990
+ const t = (n.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, a = t > s ? t : s, i = Number.parseInt(n.toFixed(a).replace(".", "")), r = Number.parseInt(e.toFixed(a).replace(".", ""));
991
+ return i % r / 10 ** a;
992
992
  }
993
993
  let ke = class oe extends v {
994
994
  constructor() {
@@ -996,44 +996,44 @@ let ke = class oe extends v {
996
996
  }
997
997
  _parse(e) {
998
998
  if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== l.number) {
999
- const s = this._getOrReturnCtx(e);
1000
- return u(s, {
999
+ const a = this._getOrReturnCtx(e);
1000
+ return u(a, {
1001
1001
  code: d.invalid_type,
1002
1002
  expected: l.number,
1003
- received: s.parsedType
1004
- }), _;
1003
+ received: a.parsedType
1004
+ }), g;
1005
1005
  }
1006
1006
  let t;
1007
- const a = new N();
1008
- for (const s of this._def.checks)
1009
- s.kind === "int" ? b.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), u(t, {
1007
+ const s = new N();
1008
+ for (const a of this._def.checks)
1009
+ a.kind === "int" ? b.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), u(t, {
1010
1010
  code: d.invalid_type,
1011
1011
  expected: "integer",
1012
1012
  received: "float",
1013
- message: s.message
1014
- }), a.dirty()) : s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (t = this._getOrReturnCtx(e, t), u(t, {
1013
+ message: a.message
1014
+ }), s.dirty()) : a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (t = this._getOrReturnCtx(e, t), u(t, {
1015
1015
  code: d.too_small,
1016
- minimum: s.value,
1016
+ minimum: a.value,
1017
1017
  type: "number",
1018
- inclusive: s.inclusive,
1018
+ inclusive: a.inclusive,
1019
1019
  exact: !1,
1020
- message: s.message
1021
- }), a.dirty()) : s.kind === "max" ? (s.inclusive ? e.data > s.value : e.data >= s.value) && (t = this._getOrReturnCtx(e, t), u(t, {
1020
+ message: a.message
1021
+ }), s.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (t = this._getOrReturnCtx(e, t), u(t, {
1022
1022
  code: d.too_big,
1023
- maximum: s.value,
1023
+ maximum: a.value,
1024
1024
  type: "number",
1025
- inclusive: s.inclusive,
1025
+ inclusive: a.inclusive,
1026
1026
  exact: !1,
1027
- message: s.message
1028
- }), a.dirty()) : s.kind === "multipleOf" ? dt(e.data, s.value) !== 0 && (t = this._getOrReturnCtx(e, t), u(t, {
1027
+ message: a.message
1028
+ }), s.dirty()) : a.kind === "multipleOf" ? dt(e.data, a.value) !== 0 && (t = this._getOrReturnCtx(e, t), u(t, {
1029
1029
  code: d.not_multiple_of,
1030
- multipleOf: s.value,
1031
- message: s.message
1032
- }), a.dirty()) : s.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), u(t, {
1030
+ multipleOf: a.value,
1031
+ message: a.message
1032
+ }), s.dirty()) : a.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), u(t, {
1033
1033
  code: d.not_finite,
1034
- message: s.message
1035
- }), a.dirty()) : b.assertNever(s);
1036
- return { status: a.value, value: e.data };
1034
+ message: a.message
1035
+ }), s.dirty()) : b.assertNever(a);
1036
+ return { status: s.value, value: e.data };
1037
1037
  }
1038
1038
  gte(e, t) {
1039
1039
  return this.setLimit("min", e, !0, p.toString(t));
@@ -1047,7 +1047,7 @@ let ke = class oe extends v {
1047
1047
  lt(e, t) {
1048
1048
  return this.setLimit("max", e, !1, p.toString(t));
1049
1049
  }
1050
- setLimit(e, t, a, s) {
1050
+ setLimit(e, t, s, a) {
1051
1051
  return new oe({
1052
1052
  ...this._def,
1053
1053
  checks: [
@@ -1055,8 +1055,8 @@ let ke = class oe extends v {
1055
1055
  {
1056
1056
  kind: e,
1057
1057
  value: t,
1058
- inclusive: a,
1059
- message: p.toString(s)
1058
+ inclusive: s,
1059
+ message: p.toString(a)
1060
1060
  }
1061
1061
  ]
1062
1062
  });
@@ -1148,17 +1148,17 @@ let ke = class oe extends v {
1148
1148
  }
1149
1149
  get isFinite() {
1150
1150
  let e = null, t = null;
1151
- for (const a of this._def.checks) {
1152
- if (a.kind === "finite" || a.kind === "int" || a.kind === "multipleOf")
1151
+ for (const s of this._def.checks) {
1152
+ if (s.kind === "finite" || s.kind === "int" || s.kind === "multipleOf")
1153
1153
  return !0;
1154
- a.kind === "min" ? (t === null || a.value > t) && (t = a.value) : a.kind === "max" && (e === null || a.value < e) && (e = a.value);
1154
+ s.kind === "min" ? (t === null || s.value > t) && (t = s.value) : s.kind === "max" && (e === null || s.value < e) && (e = s.value);
1155
1155
  }
1156
1156
  return Number.isFinite(t) && Number.isFinite(e);
1157
1157
  }
1158
1158
  };
1159
1159
  ke.create = (n) => new ke({
1160
1160
  checks: [],
1161
- typeName: f.ZodNumber,
1161
+ typeName: m.ZodNumber,
1162
1162
  coerce: (n == null ? void 0 : n.coerce) || !1,
1163
1163
  ...y(n)
1164
1164
  });
@@ -1176,26 +1176,26 @@ class U extends v {
1176
1176
  if (this._getType(e) !== l.bigint)
1177
1177
  return this._getInvalidInput(e);
1178
1178
  let t;
1179
- const a = new N();
1180
- for (const s of this._def.checks)
1181
- s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (t = this._getOrReturnCtx(e, t), u(t, {
1179
+ const s = new N();
1180
+ for (const a of this._def.checks)
1181
+ a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (t = this._getOrReturnCtx(e, t), u(t, {
1182
1182
  code: d.too_small,
1183
1183
  type: "bigint",
1184
- minimum: s.value,
1185
- inclusive: s.inclusive,
1186
- message: s.message
1187
- }), a.dirty()) : s.kind === "max" ? (s.inclusive ? e.data > s.value : e.data >= s.value) && (t = this._getOrReturnCtx(e, t), u(t, {
1184
+ minimum: a.value,
1185
+ inclusive: a.inclusive,
1186
+ message: a.message
1187
+ }), s.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (t = this._getOrReturnCtx(e, t), u(t, {
1188
1188
  code: d.too_big,
1189
1189
  type: "bigint",
1190
- maximum: s.value,
1191
- inclusive: s.inclusive,
1192
- message: s.message
1193
- }), a.dirty()) : s.kind === "multipleOf" ? e.data % s.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), u(t, {
1190
+ maximum: a.value,
1191
+ inclusive: a.inclusive,
1192
+ message: a.message
1193
+ }), s.dirty()) : a.kind === "multipleOf" ? e.data % a.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), u(t, {
1194
1194
  code: d.not_multiple_of,
1195
- multipleOf: s.value,
1196
- message: s.message
1197
- }), a.dirty()) : b.assertNever(s);
1198
- return { status: a.value, value: e.data };
1195
+ multipleOf: a.value,
1196
+ message: a.message
1197
+ }), s.dirty()) : b.assertNever(a);
1198
+ return { status: s.value, value: e.data };
1199
1199
  }
1200
1200
  _getInvalidInput(e) {
1201
1201
  const t = this._getOrReturnCtx(e);
@@ -1203,7 +1203,7 @@ class U extends v {
1203
1203
  code: d.invalid_type,
1204
1204
  expected: l.bigint,
1205
1205
  received: t.parsedType
1206
- }), _;
1206
+ }), g;
1207
1207
  }
1208
1208
  gte(e, t) {
1209
1209
  return this.setLimit("min", e, !0, p.toString(t));
@@ -1217,7 +1217,7 @@ class U extends v {
1217
1217
  lt(e, t) {
1218
1218
  return this.setLimit("max", e, !1, p.toString(t));
1219
1219
  }
1220
- setLimit(e, t, a, s) {
1220
+ setLimit(e, t, s, a) {
1221
1221
  return new U({
1222
1222
  ...this._def,
1223
1223
  checks: [
@@ -1225,8 +1225,8 @@ class U extends v {
1225
1225
  {
1226
1226
  kind: e,
1227
1227
  value: t,
1228
- inclusive: a,
1229
- message: p.toString(s)
1228
+ inclusive: s,
1229
+ message: p.toString(a)
1230
1230
  }
1231
1231
  ]
1232
1232
  });
@@ -1291,7 +1291,7 @@ class U extends v {
1291
1291
  }
1292
1292
  U.create = (n) => new U({
1293
1293
  checks: [],
1294
- typeName: f.ZodBigInt,
1294
+ typeName: m.ZodBigInt,
1295
1295
  coerce: (n == null ? void 0 : n.coerce) ?? !1,
1296
1296
  ...y(n)
1297
1297
  });
@@ -1303,50 +1303,50 @@ class xe extends v {
1303
1303
  code: d.invalid_type,
1304
1304
  expected: l.boolean,
1305
1305
  received: t.parsedType
1306
- }), _;
1306
+ }), g;
1307
1307
  }
1308
1308
  return x(e.data);
1309
1309
  }
1310
1310
  }
1311
1311
  xe.create = (n) => new xe({
1312
- typeName: f.ZodBoolean,
1312
+ typeName: m.ZodBoolean,
1313
1313
  coerce: (n == null ? void 0 : n.coerce) || !1,
1314
1314
  ...y(n)
1315
1315
  });
1316
1316
  let Se = class Fe extends v {
1317
1317
  _parse(e) {
1318
1318
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== l.date) {
1319
- const s = this._getOrReturnCtx(e);
1320
- return u(s, {
1319
+ const a = this._getOrReturnCtx(e);
1320
+ return u(a, {
1321
1321
  code: d.invalid_type,
1322
1322
  expected: l.date,
1323
- received: s.parsedType
1324
- }), _;
1323
+ received: a.parsedType
1324
+ }), g;
1325
1325
  }
1326
1326
  if (Number.isNaN(e.data.getTime())) {
1327
- const s = this._getOrReturnCtx(e);
1328
- return u(s, {
1327
+ const a = this._getOrReturnCtx(e);
1328
+ return u(a, {
1329
1329
  code: d.invalid_date
1330
- }), _;
1330
+ }), g;
1331
1331
  }
1332
1332
  const t = new N();
1333
- let a;
1334
- for (const s of this._def.checks)
1335
- s.kind === "min" ? e.data.getTime() < s.value && (a = this._getOrReturnCtx(e, a), u(a, {
1333
+ let s;
1334
+ for (const a of this._def.checks)
1335
+ a.kind === "min" ? e.data.getTime() < a.value && (s = this._getOrReturnCtx(e, s), u(s, {
1336
1336
  code: d.too_small,
1337
- message: s.message,
1337
+ message: a.message,
1338
1338
  inclusive: !0,
1339
1339
  exact: !1,
1340
- minimum: s.value,
1340
+ minimum: a.value,
1341
1341
  type: "date"
1342
- }), t.dirty()) : s.kind === "max" ? e.data.getTime() > s.value && (a = this._getOrReturnCtx(e, a), u(a, {
1342
+ }), t.dirty()) : a.kind === "max" ? e.data.getTime() > a.value && (s = this._getOrReturnCtx(e, s), u(s, {
1343
1343
  code: d.too_big,
1344
- message: s.message,
1344
+ message: a.message,
1345
1345
  inclusive: !0,
1346
1346
  exact: !1,
1347
- maximum: s.value,
1347
+ maximum: a.value,
1348
1348
  type: "date"
1349
- }), t.dirty()) : b.assertNever(s);
1349
+ }), t.dirty()) : b.assertNever(a);
1350
1350
  return {
1351
1351
  status: t.value,
1352
1352
  value: new Date(e.data.getTime())
@@ -1388,7 +1388,7 @@ let Se = class Fe extends v {
1388
1388
  Se.create = (n) => new Se({
1389
1389
  checks: [],
1390
1390
  coerce: (n == null ? void 0 : n.coerce) || !1,
1391
- typeName: f.ZodDate,
1391
+ typeName: m.ZodDate,
1392
1392
  ...y(n)
1393
1393
  });
1394
1394
  class Ne extends v {
@@ -1399,13 +1399,13 @@ class Ne extends v {
1399
1399
  code: d.invalid_type,
1400
1400
  expected: l.symbol,
1401
1401
  received: t.parsedType
1402
- }), _;
1402
+ }), g;
1403
1403
  }
1404
1404
  return x(e.data);
1405
1405
  }
1406
1406
  }
1407
1407
  Ne.create = (n) => new Ne({
1408
- typeName: f.ZodSymbol,
1408
+ typeName: m.ZodSymbol,
1409
1409
  ...y(n)
1410
1410
  });
1411
1411
  class Ce extends v {
@@ -1416,13 +1416,13 @@ class Ce extends v {
1416
1416
  code: d.invalid_type,
1417
1417
  expected: l.undefined,
1418
1418
  received: t.parsedType
1419
- }), _;
1419
+ }), g;
1420
1420
  }
1421
1421
  return x(e.data);
1422
1422
  }
1423
1423
  }
1424
1424
  Ce.create = (n) => new Ce({
1425
- typeName: f.ZodUndefined,
1425
+ typeName: m.ZodUndefined,
1426
1426
  ...y(n)
1427
1427
  });
1428
1428
  class Te extends v {
@@ -1433,13 +1433,13 @@ class Te extends v {
1433
1433
  code: d.invalid_type,
1434
1434
  expected: l.null,
1435
1435
  received: t.parsedType
1436
- }), _;
1436
+ }), g;
1437
1437
  }
1438
1438
  return x(e.data);
1439
1439
  }
1440
1440
  }
1441
1441
  Te.create = (n) => new Te({
1442
- typeName: f.ZodNull,
1442
+ typeName: m.ZodNull,
1443
1443
  ...y(n)
1444
1444
  });
1445
1445
  class ce extends v {
@@ -1451,7 +1451,7 @@ class ce extends v {
1451
1451
  }
1452
1452
  }
1453
1453
  ce.create = (n) => new ce({
1454
- typeName: f.ZodAny,
1454
+ typeName: m.ZodAny,
1455
1455
  ...y(n)
1456
1456
  });
1457
1457
  class Ze extends v {
@@ -1463,7 +1463,7 @@ class Ze extends v {
1463
1463
  }
1464
1464
  }
1465
1465
  Ze.create = (n) => new Ze({
1466
- typeName: f.ZodUnknown,
1466
+ typeName: m.ZodUnknown,
1467
1467
  ...y(n)
1468
1468
  });
1469
1469
  let E = class extends v {
@@ -1473,11 +1473,11 @@ let E = class extends v {
1473
1473
  code: d.invalid_type,
1474
1474
  expected: l.never,
1475
1475
  received: t.parsedType
1476
- }), _;
1476
+ }), g;
1477
1477
  }
1478
1478
  };
1479
1479
  E.create = (n) => new E({
1480
- typeName: f.ZodNever,
1480
+ typeName: m.ZodNever,
1481
1481
  ...y(n)
1482
1482
  });
1483
1483
  class Oe extends v {
@@ -1488,54 +1488,54 @@ class Oe extends v {
1488
1488
  code: d.invalid_type,
1489
1489
  expected: l.void,
1490
1490
  received: t.parsedType
1491
- }), _;
1491
+ }), g;
1492
1492
  }
1493
1493
  return x(e.data);
1494
1494
  }
1495
1495
  }
1496
1496
  Oe.create = (n) => new Oe({
1497
- typeName: f.ZodVoid,
1497
+ typeName: m.ZodVoid,
1498
1498
  ...y(n)
1499
1499
  });
1500
1500
  let q = class Y extends v {
1501
1501
  _parse(e) {
1502
- const { ctx: t, status: a } = this._processInputParams(e), s = this._def;
1502
+ const { ctx: t, status: s } = this._processInputParams(e), a = this._def;
1503
1503
  if (t.parsedType !== l.array)
1504
1504
  return u(t, {
1505
1505
  code: d.invalid_type,
1506
1506
  expected: l.array,
1507
1507
  received: t.parsedType
1508
- }), _;
1509
- if (s.exactLength !== null) {
1510
- const r = t.data.length > s.exactLength.value, o = t.data.length < s.exactLength.value;
1508
+ }), g;
1509
+ if (a.exactLength !== null) {
1510
+ const r = t.data.length > a.exactLength.value, o = t.data.length < a.exactLength.value;
1511
1511
  (r || o) && (u(t, {
1512
1512
  code: r ? d.too_big : d.too_small,
1513
- minimum: o ? s.exactLength.value : void 0,
1514
- maximum: r ? s.exactLength.value : void 0,
1513
+ minimum: o ? a.exactLength.value : void 0,
1514
+ maximum: r ? a.exactLength.value : void 0,
1515
1515
  type: "array",
1516
1516
  inclusive: !0,
1517
1517
  exact: !0,
1518
- message: s.exactLength.message
1519
- }), a.dirty());
1518
+ message: a.exactLength.message
1519
+ }), s.dirty());
1520
1520
  }
1521
- if (s.minLength !== null && t.data.length < s.minLength.value && (u(t, {
1521
+ if (a.minLength !== null && t.data.length < a.minLength.value && (u(t, {
1522
1522
  code: d.too_small,
1523
- minimum: s.minLength.value,
1523
+ minimum: a.minLength.value,
1524
1524
  type: "array",
1525
1525
  inclusive: !0,
1526
1526
  exact: !1,
1527
- message: s.minLength.message
1528
- }), a.dirty()), s.maxLength !== null && t.data.length > s.maxLength.value && (u(t, {
1527
+ message: a.minLength.message
1528
+ }), s.dirty()), a.maxLength !== null && t.data.length > a.maxLength.value && (u(t, {
1529
1529
  code: d.too_big,
1530
- maximum: s.maxLength.value,
1530
+ maximum: a.maxLength.value,
1531
1531
  type: "array",
1532
1532
  inclusive: !0,
1533
1533
  exact: !1,
1534
- message: s.maxLength.message
1535
- }), a.dirty()), t.common.async)
1536
- return Promise.all([...t.data].map((r, o) => s.type._parseAsync(new $(t, r, t.path, o)))).then((r) => N.mergeArray(a, r));
1537
- const i = [...t.data].map((r, o) => s.type._parseSync(new $(t, r, t.path, o)));
1538
- return N.mergeArray(a, i);
1534
+ message: a.maxLength.message
1535
+ }), s.dirty()), t.common.async)
1536
+ return Promise.all([...t.data].map((r, o) => a.type._parseAsync(new $(t, r, t.path, o)))).then((r) => N.mergeArray(s, r));
1537
+ const i = [...t.data].map((r, o) => a.type._parseSync(new $(t, r, t.path, o)));
1538
+ return N.mergeArray(s, i);
1539
1539
  }
1540
1540
  get element() {
1541
1541
  return this._def.type;
@@ -1567,15 +1567,15 @@ q.create = (n, e) => new q({
1567
1567
  minLength: null,
1568
1568
  maxLength: null,
1569
1569
  exactLength: null,
1570
- typeName: f.ZodArray,
1570
+ typeName: m.ZodArray,
1571
1571
  ...y(e)
1572
1572
  });
1573
1573
  function M(n) {
1574
1574
  if (n instanceof T) {
1575
1575
  const e = {};
1576
1576
  for (const t in n.shape) {
1577
- const a = n.shape[t];
1578
- e[t] = I.create(M(a));
1577
+ const s = n.shape[t];
1578
+ e[t] = I.create(M(s));
1579
1579
  }
1580
1580
  return new T({
1581
1581
  ...n._def,
@@ -1603,19 +1603,19 @@ let T = class S extends v {
1603
1603
  code: d.invalid_type,
1604
1604
  expected: l.object,
1605
1605
  received: c.parsedType
1606
- }), _;
1606
+ }), g;
1607
1607
  }
1608
- const { status: t, ctx: a } = this._processInputParams(e), { shape: s, keys: i } = this._getCached(), r = [];
1608
+ const { status: t, ctx: s } = this._processInputParams(e), { shape: a, keys: i } = this._getCached(), r = [];
1609
1609
  if (!(this._def.catchall instanceof E && this._def.unknownKeys === "strip"))
1610
- for (const c in a.data)
1610
+ for (const c in s.data)
1611
1611
  i.includes(c) || r.push(c);
1612
1612
  const o = [];
1613
1613
  for (const c of i) {
1614
- const h = s[c], m = a.data[c];
1614
+ const h = a[c], _ = s.data[c];
1615
1615
  o.push({
1616
1616
  key: { status: "valid", value: c },
1617
- value: h._parse(new $(a, m, a.path, c)),
1618
- alwaysSet: c in a.data
1617
+ value: h._parse(new $(s, _, s.path, c)),
1618
+ alwaysSet: c in s.data
1619
1619
  });
1620
1620
  }
1621
1621
  if (this._def.catchall instanceof E) {
@@ -1624,10 +1624,10 @@ let T = class S extends v {
1624
1624
  for (const h of r)
1625
1625
  o.push({
1626
1626
  key: { status: "valid", value: h },
1627
- value: { status: "valid", value: a.data[h] }
1627
+ value: { status: "valid", value: s.data[h] }
1628
1628
  });
1629
1629
  else if (c === "strict")
1630
- r.length > 0 && (u(a, {
1630
+ r.length > 0 && (u(s, {
1631
1631
  code: d.unrecognized_keys,
1632
1632
  keys: r
1633
1633
  }), t.dirty());
@@ -1635,23 +1635,23 @@ let T = class S extends v {
1635
1635
  } else {
1636
1636
  const c = this._def.catchall;
1637
1637
  for (const h of r) {
1638
- const m = a.data[h];
1638
+ const _ = s.data[h];
1639
1639
  o.push({
1640
1640
  key: { status: "valid", value: h },
1641
1641
  value: c._parse(
1642
- new $(a, m, a.path, h)
1642
+ new $(s, _, s.path, h)
1643
1643
  //, ctx.child(key), value, getParsedType(value)
1644
1644
  ),
1645
- alwaysSet: h in a.data
1645
+ alwaysSet: h in s.data
1646
1646
  });
1647
1647
  }
1648
1648
  }
1649
- return a.common.async ? Promise.resolve().then(async () => {
1649
+ return s.common.async ? Promise.resolve().then(async () => {
1650
1650
  const c = [];
1651
1651
  for (const h of o) {
1652
- const m = await h.key, w = await h.value;
1652
+ const _ = await h.key, w = await h.value;
1653
1653
  c.push({
1654
- key: m,
1654
+ key: _,
1655
1655
  value: w,
1656
1656
  alwaysSet: h.alwaysSet
1657
1657
  });
@@ -1667,9 +1667,9 @@ let T = class S extends v {
1667
1667
  ...this._def,
1668
1668
  unknownKeys: "strict",
1669
1669
  ...e !== void 0 ? {
1670
- errorMap: (t, a) => {
1671
- var s, i;
1672
- const r = ((i = (s = this._def).errorMap) == null ? void 0 : i.call(s, t, a).message) ?? a.defaultError;
1670
+ errorMap: (t, s) => {
1671
+ var a, i;
1672
+ const r = ((i = (a = this._def).errorMap) == null ? void 0 : i.call(a, t, s).message) ?? s.defaultError;
1673
1673
  return t.code === "unrecognized_keys" ? {
1674
1674
  message: p.errToObj(e).message ?? r
1675
1675
  } : {
@@ -1730,7 +1730,7 @@ let T = class S extends v {
1730
1730
  ...this._def.shape(),
1731
1731
  ...e._def.shape()
1732
1732
  }),
1733
- typeName: f.ZodObject
1733
+ typeName: m.ZodObject
1734
1734
  });
1735
1735
  }
1736
1736
  // merge<
@@ -1800,8 +1800,8 @@ let T = class S extends v {
1800
1800
  }
1801
1801
  pick(e) {
1802
1802
  const t = {};
1803
- for (const a of b.objectKeys(e))
1804
- e[a] && this.shape[a] && (t[a] = this.shape[a]);
1803
+ for (const s of b.objectKeys(e))
1804
+ e[s] && this.shape[s] && (t[s] = this.shape[s]);
1805
1805
  return new S({
1806
1806
  ...this._def,
1807
1807
  shape: () => t
@@ -1809,8 +1809,8 @@ let T = class S extends v {
1809
1809
  }
1810
1810
  omit(e) {
1811
1811
  const t = {};
1812
- for (const a of b.objectKeys(this.shape))
1813
- e[a] || (t[a] = this.shape[a]);
1812
+ for (const s of b.objectKeys(this.shape))
1813
+ e[s] || (t[s] = this.shape[s]);
1814
1814
  return new S({
1815
1815
  ...this._def,
1816
1816
  shape: () => t
@@ -1824,9 +1824,9 @@ let T = class S extends v {
1824
1824
  }
1825
1825
  partial(e) {
1826
1826
  const t = {};
1827
- for (const a of b.objectKeys(this.shape)) {
1828
- const s = this.shape[a];
1829
- e && !e[a] ? t[a] = s : t[a] = s.optional();
1827
+ for (const s of b.objectKeys(this.shape)) {
1828
+ const a = this.shape[s];
1829
+ e && !e[s] ? t[s] = a : t[s] = a.optional();
1830
1830
  }
1831
1831
  return new S({
1832
1832
  ...this._def,
@@ -1835,14 +1835,14 @@ let T = class S extends v {
1835
1835
  }
1836
1836
  required(e) {
1837
1837
  const t = {};
1838
- for (const a of b.objectKeys(this.shape))
1839
- if (e && !e[a])
1840
- t[a] = this.shape[a];
1838
+ for (const s of b.objectKeys(this.shape))
1839
+ if (e && !e[s])
1840
+ t[s] = this.shape[s];
1841
1841
  else {
1842
- let s = this.shape[a];
1843
- for (; s instanceof I; )
1844
- s = s._def.innerType;
1845
- t[a] = s;
1842
+ let a = this.shape[s];
1843
+ for (; a instanceof I; )
1844
+ a = a._def.innerType;
1845
+ t[s] = a;
1846
1846
  }
1847
1847
  return new S({
1848
1848
  ...this._def,
@@ -1857,27 +1857,27 @@ T.create = (n, e) => new T({
1857
1857
  shape: () => n,
1858
1858
  unknownKeys: "strip",
1859
1859
  catchall: E.create(),
1860
- typeName: f.ZodObject,
1860
+ typeName: m.ZodObject,
1861
1861
  ...y(e)
1862
1862
  });
1863
1863
  T.strictCreate = (n, e) => new T({
1864
1864
  shape: () => n,
1865
1865
  unknownKeys: "strict",
1866
1866
  catchall: E.create(),
1867
- typeName: f.ZodObject,
1867
+ typeName: m.ZodObject,
1868
1868
  ...y(e)
1869
1869
  });
1870
1870
  T.lazycreate = (n, e) => new T({
1871
1871
  shape: n,
1872
1872
  unknownKeys: "strip",
1873
1873
  catchall: E.create(),
1874
- typeName: f.ZodObject,
1874
+ typeName: m.ZodObject,
1875
1875
  ...y(e)
1876
1876
  });
1877
1877
  let Q = class extends v {
1878
1878
  _parse(e) {
1879
- const { ctx: t } = this._processInputParams(e), a = this._def.options;
1880
- function s(i) {
1879
+ const { ctx: t } = this._processInputParams(e), s = this._def.options;
1880
+ function a(i) {
1881
1881
  for (const o of i)
1882
1882
  if (o.result.status === "valid")
1883
1883
  return o.result;
@@ -1888,10 +1888,10 @@ let Q = class extends v {
1888
1888
  return u(t, {
1889
1889
  code: d.invalid_union,
1890
1890
  unionErrors: r
1891
- }), _;
1891
+ }), g;
1892
1892
  }
1893
1893
  if (t.common.async)
1894
- return Promise.all(a.map(async (i) => {
1894
+ return Promise.all(s.map(async (i) => {
1895
1895
  const r = {
1896
1896
  ...t,
1897
1897
  common: {
@@ -1908,11 +1908,11 @@ let Q = class extends v {
1908
1908
  }),
1909
1909
  ctx: r
1910
1910
  };
1911
- })).then(s);
1911
+ })).then(a);
1912
1912
  {
1913
1913
  let i;
1914
1914
  const r = [];
1915
- for (const c of a) {
1915
+ for (const c of s) {
1916
1916
  const h = {
1917
1917
  ...t,
1918
1918
  common: {
@@ -1920,14 +1920,14 @@ let Q = class extends v {
1920
1920
  issues: []
1921
1921
  },
1922
1922
  parent: null
1923
- }, m = c._parseSync({
1923
+ }, _ = c._parseSync({
1924
1924
  data: t.data,
1925
1925
  path: t.path,
1926
1926
  parent: h
1927
1927
  });
1928
- if (m.status === "valid")
1929
- return m;
1930
- m.status === "dirty" && !i && (i = { result: m, ctx: h }), h.common.issues.length && r.push(h.common.issues);
1928
+ if (_.status === "valid")
1929
+ return _;
1930
+ _.status === "dirty" && !i && (i = { result: _, ctx: h }), h.common.issues.length && r.push(h.common.issues);
1931
1931
  }
1932
1932
  if (i)
1933
1933
  return t.common.issues.push(...i.ctx.common.issues), i.result;
@@ -1935,7 +1935,7 @@ let Q = class extends v {
1935
1935
  return u(t, {
1936
1936
  code: d.invalid_union,
1937
1937
  unionErrors: o
1938
- }), _;
1938
+ }), g;
1939
1939
  }
1940
1940
  }
1941
1941
  get options() {
@@ -1944,15 +1944,15 @@ let Q = class extends v {
1944
1944
  };
1945
1945
  Q.create = (n, e) => new Q({
1946
1946
  options: n,
1947
- typeName: f.ZodUnion,
1947
+ typeName: m.ZodUnion,
1948
1948
  ...y(e)
1949
1949
  });
1950
1950
  function de(n, e) {
1951
- const t = O(n), a = O(e);
1951
+ const t = O(n), s = O(e);
1952
1952
  if (n === e)
1953
1953
  return { valid: !0, data: n };
1954
- if (t === l.object && a === l.object) {
1955
- const s = b.objectKeys(e), i = b.objectKeys(n).filter((o) => s.indexOf(o) !== -1), r = { ...n, ...e };
1954
+ if (t === l.object && s === l.object) {
1955
+ const a = b.objectKeys(e), i = b.objectKeys(n).filter((o) => a.indexOf(o) !== -1), r = { ...n, ...e };
1956
1956
  for (const o of i) {
1957
1957
  const c = de(n[o], e[o]);
1958
1958
  if (!c.valid)
@@ -1960,86 +1960,86 @@ function de(n, e) {
1960
1960
  r[o] = c.data;
1961
1961
  }
1962
1962
  return { valid: !0, data: r };
1963
- } else if (t === l.array && a === l.array) {
1963
+ } else if (t === l.array && s === l.array) {
1964
1964
  if (n.length !== e.length)
1965
1965
  return { valid: !1 };
1966
- const s = [];
1966
+ const a = [];
1967
1967
  for (let i = 0; i < n.length; i++) {
1968
1968
  const r = n[i], o = e[i], c = de(r, o);
1969
1969
  if (!c.valid)
1970
1970
  return { valid: !1 };
1971
- s.push(c.data);
1971
+ a.push(c.data);
1972
1972
  }
1973
- return { valid: !0, data: s };
1974
- } else return t === l.date && a === l.date && +n == +e ? { valid: !0, data: n } : { valid: !1 };
1973
+ return { valid: !0, data: a };
1974
+ } else return t === l.date && s === l.date && +n == +e ? { valid: !0, data: n } : { valid: !1 };
1975
1975
  }
1976
1976
  let ee = class extends v {
1977
1977
  _parse(e) {
1978
- const { status: t, ctx: a } = this._processInputParams(e), s = (i, r) => {
1978
+ const { status: t, ctx: s } = this._processInputParams(e), a = (i, r) => {
1979
1979
  if (ve(i) || ve(r))
1980
- return _;
1980
+ return g;
1981
1981
  const o = de(i.value, r.value);
1982
- return o.valid ? ((be(i) || be(r)) && t.dirty(), { status: t.value, value: o.data }) : (u(a, {
1982
+ return o.valid ? ((be(i) || be(r)) && t.dirty(), { status: t.value, value: o.data }) : (u(s, {
1983
1983
  code: d.invalid_intersection_types
1984
- }), _);
1984
+ }), g);
1985
1985
  };
1986
- return a.common.async ? Promise.all([
1986
+ return s.common.async ? Promise.all([
1987
1987
  this._def.left._parseAsync({
1988
- data: a.data,
1989
- path: a.path,
1990
- parent: a
1988
+ data: s.data,
1989
+ path: s.path,
1990
+ parent: s
1991
1991
  }),
1992
1992
  this._def.right._parseAsync({
1993
- data: a.data,
1994
- path: a.path,
1995
- parent: a
1993
+ data: s.data,
1994
+ path: s.path,
1995
+ parent: s
1996
1996
  })
1997
- ]).then(([i, r]) => s(i, r)) : s(this._def.left._parseSync({
1998
- data: a.data,
1999
- path: a.path,
2000
- parent: a
1997
+ ]).then(([i, r]) => a(i, r)) : a(this._def.left._parseSync({
1998
+ data: s.data,
1999
+ path: s.path,
2000
+ parent: s
2001
2001
  }), this._def.right._parseSync({
2002
- data: a.data,
2003
- path: a.path,
2004
- parent: a
2002
+ data: s.data,
2003
+ path: s.path,
2004
+ parent: s
2005
2005
  }));
2006
2006
  }
2007
2007
  };
2008
2008
  ee.create = (n, e, t) => new ee({
2009
2009
  left: n,
2010
2010
  right: e,
2011
- typeName: f.ZodIntersection,
2011
+ typeName: m.ZodIntersection,
2012
2012
  ...y(t)
2013
2013
  });
2014
2014
  class R extends v {
2015
2015
  _parse(e) {
2016
- const { status: t, ctx: a } = this._processInputParams(e);
2017
- if (a.parsedType !== l.array)
2018
- return u(a, {
2016
+ const { status: t, ctx: s } = this._processInputParams(e);
2017
+ if (s.parsedType !== l.array)
2018
+ return u(s, {
2019
2019
  code: d.invalid_type,
2020
2020
  expected: l.array,
2021
- received: a.parsedType
2022
- }), _;
2023
- if (a.data.length < this._def.items.length)
2024
- return u(a, {
2021
+ received: s.parsedType
2022
+ }), g;
2023
+ if (s.data.length < this._def.items.length)
2024
+ return u(s, {
2025
2025
  code: d.too_small,
2026
2026
  minimum: this._def.items.length,
2027
2027
  inclusive: !0,
2028
2028
  exact: !1,
2029
2029
  type: "array"
2030
- }), _;
2031
- !this._def.rest && a.data.length > this._def.items.length && (u(a, {
2030
+ }), g;
2031
+ !this._def.rest && s.data.length > this._def.items.length && (u(s, {
2032
2032
  code: d.too_big,
2033
2033
  maximum: this._def.items.length,
2034
2034
  inclusive: !0,
2035
2035
  exact: !1,
2036
2036
  type: "array"
2037
2037
  }), t.dirty());
2038
- const s = [...a.data].map((i, r) => {
2038
+ const a = [...s.data].map((i, r) => {
2039
2039
  const o = this._def.items[r] || this._def.rest;
2040
- return o ? o._parse(new $(a, i, a.path, r)) : null;
2040
+ return o ? o._parse(new $(s, i, s.path, r)) : null;
2041
2041
  }).filter((i) => !!i);
2042
- return a.common.async ? Promise.all(s).then((i) => N.mergeArray(t, i)) : N.mergeArray(t, s);
2042
+ return s.common.async ? Promise.all(a).then((i) => N.mergeArray(t, i)) : N.mergeArray(t, a);
2043
2043
  }
2044
2044
  get items() {
2045
2045
  return this._def.items;
@@ -2056,7 +2056,7 @@ R.create = (n, e) => {
2056
2056
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
2057
2057
  return new R({
2058
2058
  items: n,
2059
- typeName: f.ZodTuple,
2059
+ typeName: m.ZodTuple,
2060
2060
  rest: null,
2061
2061
  ...y(e)
2062
2062
  });
@@ -2069,35 +2069,35 @@ class Ae extends v {
2069
2069
  return this._def.valueType;
2070
2070
  }
2071
2071
  _parse(e) {
2072
- const { status: t, ctx: a } = this._processInputParams(e);
2073
- if (a.parsedType !== l.map)
2074
- return u(a, {
2072
+ const { status: t, ctx: s } = this._processInputParams(e);
2073
+ if (s.parsedType !== l.map)
2074
+ return u(s, {
2075
2075
  code: d.invalid_type,
2076
2076
  expected: l.map,
2077
- received: a.parsedType
2078
- }), _;
2079
- const s = this._def.keyType, i = this._def.valueType, r = [...a.data.entries()].map(([o, c], h) => ({
2080
- key: s._parse(new $(a, o, a.path, [h, "key"])),
2081
- value: i._parse(new $(a, c, a.path, [h, "value"]))
2077
+ received: s.parsedType
2078
+ }), g;
2079
+ const a = this._def.keyType, i = this._def.valueType, r = [...s.data.entries()].map(([o, c], h) => ({
2080
+ key: a._parse(new $(s, o, s.path, [h, "key"])),
2081
+ value: i._parse(new $(s, c, s.path, [h, "value"]))
2082
2082
  }));
2083
- if (a.common.async) {
2083
+ if (s.common.async) {
2084
2084
  const o = /* @__PURE__ */ new Map();
2085
2085
  return Promise.resolve().then(async () => {
2086
2086
  for (const c of r) {
2087
- const h = await c.key, m = await c.value;
2088
- if (h.status === "aborted" || m.status === "aborted")
2089
- return _;
2090
- (h.status === "dirty" || m.status === "dirty") && t.dirty(), o.set(h.value, m.value);
2087
+ const h = await c.key, _ = await c.value;
2088
+ if (h.status === "aborted" || _.status === "aborted")
2089
+ return g;
2090
+ (h.status === "dirty" || _.status === "dirty") && t.dirty(), o.set(h.value, _.value);
2091
2091
  }
2092
2092
  return { status: t.value, value: o };
2093
2093
  });
2094
2094
  } else {
2095
2095
  const o = /* @__PURE__ */ new Map();
2096
2096
  for (const c of r) {
2097
- const h = c.key, m = c.value;
2098
- if (h.status === "aborted" || m.status === "aborted")
2099
- return _;
2100
- (h.status === "dirty" || m.status === "dirty") && t.dirty(), o.set(h.value, m.value);
2097
+ const h = c.key, _ = c.value;
2098
+ if (h.status === "aborted" || _.status === "aborted")
2099
+ return g;
2100
+ (h.status === "dirty" || _.status === "dirty") && t.dirty(), o.set(h.value, _.value);
2101
2101
  }
2102
2102
  return { status: t.value, value: o };
2103
2103
  }
@@ -2106,46 +2106,46 @@ class Ae extends v {
2106
2106
  Ae.create = (n, e, t) => new Ae({
2107
2107
  valueType: e,
2108
2108
  keyType: n,
2109
- typeName: f.ZodMap,
2109
+ typeName: m.ZodMap,
2110
2110
  ...y(t)
2111
2111
  });
2112
2112
  class H extends v {
2113
2113
  _parse(e) {
2114
- const { status: t, ctx: a } = this._processInputParams(e);
2115
- if (a.parsedType !== l.set)
2116
- return u(a, {
2114
+ const { status: t, ctx: s } = this._processInputParams(e);
2115
+ if (s.parsedType !== l.set)
2116
+ return u(s, {
2117
2117
  code: d.invalid_type,
2118
2118
  expected: l.set,
2119
- received: a.parsedType
2120
- }), _;
2121
- const s = this._def;
2122
- s.minSize !== null && a.data.size < s.minSize.value && (u(a, {
2119
+ received: s.parsedType
2120
+ }), g;
2121
+ const a = this._def;
2122
+ a.minSize !== null && s.data.size < a.minSize.value && (u(s, {
2123
2123
  code: d.too_small,
2124
- minimum: s.minSize.value,
2124
+ minimum: a.minSize.value,
2125
2125
  type: "set",
2126
2126
  inclusive: !0,
2127
2127
  exact: !1,
2128
- message: s.minSize.message
2129
- }), t.dirty()), s.maxSize !== null && a.data.size > s.maxSize.value && (u(a, {
2128
+ message: a.minSize.message
2129
+ }), t.dirty()), a.maxSize !== null && s.data.size > a.maxSize.value && (u(s, {
2130
2130
  code: d.too_big,
2131
- maximum: s.maxSize.value,
2131
+ maximum: a.maxSize.value,
2132
2132
  type: "set",
2133
2133
  inclusive: !0,
2134
2134
  exact: !1,
2135
- message: s.maxSize.message
2135
+ message: a.maxSize.message
2136
2136
  }), t.dirty());
2137
2137
  const i = this._def.valueType;
2138
2138
  function r(c) {
2139
2139
  const h = /* @__PURE__ */ new Set();
2140
- for (const m of c) {
2141
- if (m.status === "aborted")
2142
- return _;
2143
- m.status === "dirty" && t.dirty(), h.add(m.value);
2140
+ for (const _ of c) {
2141
+ if (_.status === "aborted")
2142
+ return g;
2143
+ _.status === "dirty" && t.dirty(), h.add(_.value);
2144
2144
  }
2145
2145
  return { status: t.value, value: h };
2146
2146
  }
2147
- const o = [...a.data.values()].map((c, h) => i._parse(new $(a, c, a.path, h)));
2148
- return a.common.async ? Promise.all(o).then((c) => r(c)) : r(o);
2147
+ const o = [...s.data.values()].map((c, h) => i._parse(new $(s, c, s.path, h)));
2148
+ return s.common.async ? Promise.all(o).then((c) => r(c)) : r(o);
2149
2149
  }
2150
2150
  min(e, t) {
2151
2151
  return new H({
@@ -2170,7 +2170,7 @@ H.create = (n, e) => new H({
2170
2170
  valueType: n,
2171
2171
  minSize: null,
2172
2172
  maxSize: null,
2173
- typeName: f.ZodSet,
2173
+ typeName: m.ZodSet,
2174
2174
  ...y(e)
2175
2175
  });
2176
2176
  class Ie extends v {
@@ -2184,7 +2184,7 @@ class Ie extends v {
2184
2184
  }
2185
2185
  Ie.create = (n, e) => new Ie({
2186
2186
  getter: n,
2187
- typeName: f.ZodLazy,
2187
+ typeName: m.ZodLazy,
2188
2188
  ...y(e)
2189
2189
  });
2190
2190
  let ue = class extends v {
@@ -2195,7 +2195,7 @@ let ue = class extends v {
2195
2195
  received: t.data,
2196
2196
  code: d.invalid_literal,
2197
2197
  expected: this._def.value
2198
- }), _;
2198
+ }), g;
2199
2199
  }
2200
2200
  return { status: "valid", value: e.data };
2201
2201
  }
@@ -2205,33 +2205,33 @@ let ue = class extends v {
2205
2205
  };
2206
2206
  ue.create = (n, e) => new ue({
2207
2207
  value: n,
2208
- typeName: f.ZodLiteral,
2208
+ typeName: m.ZodLiteral,
2209
2209
  ...y(e)
2210
2210
  });
2211
2211
  function Me(n, e) {
2212
2212
  return new me({
2213
2213
  values: n,
2214
- typeName: f.ZodEnum,
2214
+ typeName: m.ZodEnum,
2215
2215
  ...y(e)
2216
2216
  });
2217
2217
  }
2218
2218
  let me = class le extends v {
2219
2219
  _parse(e) {
2220
2220
  if (typeof e.data != "string") {
2221
- const t = this._getOrReturnCtx(e), a = this._def.values;
2221
+ const t = this._getOrReturnCtx(e), s = this._def.values;
2222
2222
  return u(t, {
2223
- expected: b.joinValues(a),
2223
+ expected: b.joinValues(s),
2224
2224
  received: t.parsedType,
2225
2225
  code: d.invalid_type
2226
- }), _;
2226
+ }), g;
2227
2227
  }
2228
2228
  if (this._cache || (this._cache = new Set(this._def.values)), !this._cache.has(e.data)) {
2229
- const t = this._getOrReturnCtx(e), a = this._def.values;
2229
+ const t = this._getOrReturnCtx(e), s = this._def.values;
2230
2230
  return u(t, {
2231
2231
  received: t.data,
2232
2232
  code: d.invalid_enum_value,
2233
- options: a
2234
- }), _;
2233
+ options: s
2234
+ }), g;
2235
2235
  }
2236
2236
  return x(e.data);
2237
2237
  }
@@ -2263,7 +2263,7 @@ let me = class le extends v {
2263
2263
  });
2264
2264
  }
2265
2265
  exclude(e, t = this._def) {
2266
- return le.create(this.options.filter((a) => !e.includes(a)), {
2266
+ return le.create(this.options.filter((s) => !e.includes(s)), {
2267
2267
  ...this._def,
2268
2268
  ...t
2269
2269
  });
@@ -2272,22 +2272,22 @@ let me = class le extends v {
2272
2272
  me.create = Me;
2273
2273
  class $e extends v {
2274
2274
  _parse(e) {
2275
- const t = b.getValidEnumValues(this._def.values), a = this._getOrReturnCtx(e);
2276
- if (a.parsedType !== l.string && a.parsedType !== l.number) {
2277
- const s = b.objectValues(t);
2278
- return u(a, {
2279
- expected: b.joinValues(s),
2280
- received: a.parsedType,
2275
+ const t = b.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
2276
+ if (s.parsedType !== l.string && s.parsedType !== l.number) {
2277
+ const a = b.objectValues(t);
2278
+ return u(s, {
2279
+ expected: b.joinValues(a),
2280
+ received: s.parsedType,
2281
2281
  code: d.invalid_type
2282
- }), _;
2282
+ }), g;
2283
2283
  }
2284
2284
  if (this._cache || (this._cache = new Set(b.getValidEnumValues(this._def.values))), !this._cache.has(e.data)) {
2285
- const s = b.objectValues(t);
2286
- return u(a, {
2287
- received: a.data,
2285
+ const a = b.objectValues(t);
2286
+ return u(s, {
2287
+ received: s.data,
2288
2288
  code: d.invalid_enum_value,
2289
- options: s
2290
- }), _;
2289
+ options: a
2290
+ }), g;
2291
2291
  }
2292
2292
  return x(e.data);
2293
2293
  }
@@ -2297,7 +2297,7 @@ class $e extends v {
2297
2297
  }
2298
2298
  $e.create = (n, e) => new $e({
2299
2299
  values: n,
2300
- typeName: f.ZodNativeEnum,
2300
+ typeName: m.ZodNativeEnum,
2301
2301
  ...y(e)
2302
2302
  });
2303
2303
  let te = class extends v {
@@ -2311,9 +2311,9 @@ let te = class extends v {
2311
2311
  code: d.invalid_type,
2312
2312
  expected: l.promise,
2313
2313
  received: t.parsedType
2314
- }), _;
2315
- const a = t.parsedType === l.promise ? t.data : Promise.resolve(t.data);
2316
- return x(a.then((s) => this._def.type.parseAsync(s, {
2314
+ }), g;
2315
+ const s = t.parsedType === l.promise ? t.data : Promise.resolve(t.data);
2316
+ return x(s.then((a) => this._def.type.parseAsync(a, {
2317
2317
  path: t.path,
2318
2318
  errorMap: t.common.contextualErrorMap
2319
2319
  })));
@@ -2321,99 +2321,99 @@ let te = class extends v {
2321
2321
  };
2322
2322
  te.create = (n, e) => new te({
2323
2323
  type: n,
2324
- typeName: f.ZodPromise,
2324
+ typeName: m.ZodPromise,
2325
2325
  ...y(e)
2326
2326
  });
2327
- class D extends v {
2327
+ let D = class extends v {
2328
2328
  innerType() {
2329
2329
  return this._def.schema;
2330
2330
  }
2331
2331
  sourceType() {
2332
- return this._def.schema._def.typeName === f.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
2332
+ return this._def.schema._def.typeName === m.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
2333
2333
  }
2334
2334
  _parse(e) {
2335
- const { status: t, ctx: a } = this._processInputParams(e), s = this._def.effect || null, i = {
2335
+ const { status: t, ctx: s } = this._processInputParams(e), a = this._def.effect || null, i = {
2336
2336
  addIssue: (r) => {
2337
- u(a, r), r.fatal ? t.abort() : t.dirty();
2337
+ u(s, r), r.fatal ? t.abort() : t.dirty();
2338
2338
  },
2339
2339
  get path() {
2340
- return a.path;
2340
+ return s.path;
2341
2341
  }
2342
2342
  };
2343
- if (i.addIssue = i.addIssue.bind(i), s.type === "preprocess") {
2344
- const r = s.transform(a.data, i);
2345
- if (a.common.async)
2343
+ if (i.addIssue = i.addIssue.bind(i), a.type === "preprocess") {
2344
+ const r = a.transform(s.data, i);
2345
+ if (s.common.async)
2346
2346
  return Promise.resolve(r).then(async (o) => {
2347
2347
  if (t.value === "aborted")
2348
- return _;
2348
+ return g;
2349
2349
  const c = await this._def.schema._parseAsync({
2350
2350
  data: o,
2351
- path: a.path,
2352
- parent: a
2351
+ path: s.path,
2352
+ parent: s
2353
2353
  });
2354
- return c.status === "aborted" ? _ : c.status === "dirty" || t.value === "dirty" ? ie(c.value) : c;
2354
+ return c.status === "aborted" ? g : c.status === "dirty" || t.value === "dirty" ? ie(c.value) : c;
2355
2355
  });
2356
2356
  {
2357
2357
  if (t.value === "aborted")
2358
- return _;
2358
+ return g;
2359
2359
  const o = this._def.schema._parseSync({
2360
2360
  data: r,
2361
- path: a.path,
2362
- parent: a
2361
+ path: s.path,
2362
+ parent: s
2363
2363
  });
2364
- return o.status === "aborted" ? _ : o.status === "dirty" || t.value === "dirty" ? ie(o.value) : o;
2364
+ return o.status === "aborted" ? g : o.status === "dirty" || t.value === "dirty" ? ie(o.value) : o;
2365
2365
  }
2366
2366
  }
2367
- if (s.type === "refinement") {
2367
+ if (a.type === "refinement") {
2368
2368
  const r = (o) => {
2369
- const c = s.refinement(o, i);
2370
- if (a.common.async)
2369
+ const c = a.refinement(o, i);
2370
+ if (s.common.async)
2371
2371
  return Promise.resolve(c);
2372
2372
  if (c instanceof Promise)
2373
2373
  throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
2374
2374
  return o;
2375
2375
  };
2376
- if (a.common.async === !1) {
2376
+ if (s.common.async === !1) {
2377
2377
  const o = this._def.schema._parseSync({
2378
- data: a.data,
2379
- path: a.path,
2380
- parent: a
2378
+ data: s.data,
2379
+ path: s.path,
2380
+ parent: s
2381
2381
  });
2382
- return o.status === "aborted" ? _ : (o.status === "dirty" && t.dirty(), r(o.value), { status: t.value, value: o.value });
2382
+ return o.status === "aborted" ? g : (o.status === "dirty" && t.dirty(), r(o.value), { status: t.value, value: o.value });
2383
2383
  } else
2384
- return this._def.schema._parseAsync({ data: a.data, path: a.path, parent: a }).then((o) => o.status === "aborted" ? _ : (o.status === "dirty" && t.dirty(), r(o.value).then(() => ({ status: t.value, value: o.value }))));
2384
+ return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((o) => o.status === "aborted" ? g : (o.status === "dirty" && t.dirty(), r(o.value).then(() => ({ status: t.value, value: o.value }))));
2385
2385
  }
2386
- if (s.type === "transform")
2387
- if (a.common.async === !1) {
2386
+ if (a.type === "transform")
2387
+ if (s.common.async === !1) {
2388
2388
  const r = this._def.schema._parseSync({
2389
- data: a.data,
2390
- path: a.path,
2391
- parent: a
2389
+ data: s.data,
2390
+ path: s.path,
2391
+ parent: s
2392
2392
  });
2393
2393
  if (!L(r))
2394
- return _;
2395
- const o = s.transform(r.value, i);
2394
+ return g;
2395
+ const o = a.transform(r.value, i);
2396
2396
  if (o instanceof Promise)
2397
2397
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2398
2398
  return { status: t.value, value: o };
2399
2399
  } else
2400
- return this._def.schema._parseAsync({ data: a.data, path: a.path, parent: a }).then((r) => L(r) ? Promise.resolve(s.transform(r.value, i)).then((o) => ({
2400
+ return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((r) => L(r) ? Promise.resolve(a.transform(r.value, i)).then((o) => ({
2401
2401
  status: t.value,
2402
2402
  value: o
2403
- })) : _);
2404
- b.assertNever(s);
2403
+ })) : g);
2404
+ b.assertNever(a);
2405
2405
  }
2406
- }
2406
+ };
2407
2407
  D.create = (n, e, t) => new D({
2408
2408
  schema: n,
2409
- typeName: f.ZodEffects,
2409
+ typeName: m.ZodEffects,
2410
2410
  effect: e,
2411
2411
  ...y(t)
2412
2412
  });
2413
2413
  D.createWithPreprocess = (n, e, t) => new D({
2414
2414
  schema: e,
2415
2415
  effect: { type: "preprocess", transform: n },
2416
- typeName: f.ZodEffects,
2416
+ typeName: m.ZodEffects,
2417
2417
  ...y(t)
2418
2418
  });
2419
2419
  let I = class extends v {
@@ -2426,7 +2426,7 @@ let I = class extends v {
2426
2426
  };
2427
2427
  I.create = (n, e) => new I({
2428
2428
  innerType: n,
2429
- typeName: f.ZodOptional,
2429
+ typeName: m.ZodOptional,
2430
2430
  ...y(e)
2431
2431
  });
2432
2432
  let V = class extends v {
@@ -2439,15 +2439,15 @@ let V = class extends v {
2439
2439
  };
2440
2440
  V.create = (n, e) => new V({
2441
2441
  innerType: n,
2442
- typeName: f.ZodNullable,
2442
+ typeName: m.ZodNullable,
2443
2443
  ...y(e)
2444
2444
  });
2445
2445
  class he extends v {
2446
2446
  _parse(e) {
2447
2447
  const { ctx: t } = this._processInputParams(e);
2448
- let a = t.data;
2449
- return t.parsedType === l.undefined && (a = this._def.defaultValue()), this._def.innerType._parse({
2450
- data: a,
2448
+ let s = t.data;
2449
+ return t.parsedType === l.undefined && (s = this._def.defaultValue()), this._def.innerType._parse({
2450
+ data: s,
2451
2451
  path: t.path,
2452
2452
  parent: t
2453
2453
  });
@@ -2458,40 +2458,40 @@ class he extends v {
2458
2458
  }
2459
2459
  he.create = (n, e) => new he({
2460
2460
  innerType: n,
2461
- typeName: f.ZodDefault,
2461
+ typeName: m.ZodDefault,
2462
2462
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
2463
2463
  ...y(e)
2464
2464
  });
2465
2465
  class pe extends v {
2466
2466
  _parse(e) {
2467
- const { ctx: t } = this._processInputParams(e), a = {
2467
+ const { ctx: t } = this._processInputParams(e), s = {
2468
2468
  ...t,
2469
2469
  common: {
2470
2470
  ...t.common,
2471
2471
  issues: []
2472
2472
  }
2473
- }, s = this._def.innerType._parse({
2474
- data: a.data,
2475
- path: a.path,
2473
+ }, a = this._def.innerType._parse({
2474
+ data: s.data,
2475
+ path: s.path,
2476
2476
  parent: {
2477
- ...a
2477
+ ...s
2478
2478
  }
2479
2479
  });
2480
- return X(s) ? s.then((i) => ({
2480
+ return X(a) ? a.then((i) => ({
2481
2481
  status: "valid",
2482
2482
  value: i.status === "valid" ? i.value : this._def.catchValue({
2483
2483
  get error() {
2484
- return new C(a.common.issues);
2484
+ return new C(s.common.issues);
2485
2485
  },
2486
- input: a.data
2486
+ input: s.data
2487
2487
  })
2488
2488
  })) : {
2489
2489
  status: "valid",
2490
- value: s.status === "valid" ? s.value : this._def.catchValue({
2490
+ value: a.status === "valid" ? a.value : this._def.catchValue({
2491
2491
  get error() {
2492
- return new C(a.common.issues);
2492
+ return new C(s.common.issues);
2493
2493
  },
2494
- input: a.data
2494
+ input: s.data
2495
2495
  })
2496
2496
  };
2497
2497
  }
@@ -2501,7 +2501,7 @@ class pe extends v {
2501
2501
  }
2502
2502
  pe.create = (n, e) => new pe({
2503
2503
  innerType: n,
2504
- typeName: f.ZodCatch,
2504
+ typeName: m.ZodCatch,
2505
2505
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
2506
2506
  ...y(e)
2507
2507
  });
@@ -2513,20 +2513,20 @@ class Ee extends v {
2513
2513
  code: d.invalid_type,
2514
2514
  expected: l.nan,
2515
2515
  received: t.parsedType
2516
- }), _;
2516
+ }), g;
2517
2517
  }
2518
2518
  return { status: "valid", value: e.data };
2519
2519
  }
2520
2520
  }
2521
2521
  Ee.create = (n) => new Ee({
2522
- typeName: f.ZodNaN,
2522
+ typeName: m.ZodNaN,
2523
2523
  ...y(n)
2524
2524
  });
2525
2525
  class ut extends v {
2526
2526
  _parse(e) {
2527
- const { ctx: t } = this._processInputParams(e), a = t.data;
2527
+ const { ctx: t } = this._processInputParams(e), s = t.data;
2528
2528
  return this._def.type._parse({
2529
- data: a,
2529
+ data: s,
2530
2530
  path: t.path,
2531
2531
  parent: t
2532
2532
  });
@@ -2537,33 +2537,33 @@ class ut extends v {
2537
2537
  }
2538
2538
  class _e extends v {
2539
2539
  _parse(e) {
2540
- const { status: t, ctx: a } = this._processInputParams(e);
2541
- if (a.common.async)
2540
+ const { status: t, ctx: s } = this._processInputParams(e);
2541
+ if (s.common.async)
2542
2542
  return (async () => {
2543
- const s = await this._def.in._parseAsync({
2544
- data: a.data,
2545
- path: a.path,
2546
- parent: a
2543
+ const a = await this._def.in._parseAsync({
2544
+ data: s.data,
2545
+ path: s.path,
2546
+ parent: s
2547
2547
  });
2548
- return s.status === "aborted" ? _ : s.status === "dirty" ? (t.dirty(), ie(s.value)) : this._def.out._parseAsync({
2549
- data: s.value,
2550
- path: a.path,
2551
- parent: a
2548
+ return a.status === "aborted" ? g : a.status === "dirty" ? (t.dirty(), ie(a.value)) : this._def.out._parseAsync({
2549
+ data: a.value,
2550
+ path: s.path,
2551
+ parent: s
2552
2552
  });
2553
2553
  })();
2554
2554
  {
2555
- const s = this._def.in._parseSync({
2556
- data: a.data,
2557
- path: a.path,
2558
- parent: a
2555
+ const a = this._def.in._parseSync({
2556
+ data: s.data,
2557
+ path: s.path,
2558
+ parent: s
2559
2559
  });
2560
- return s.status === "aborted" ? _ : s.status === "dirty" ? (t.dirty(), {
2560
+ return a.status === "aborted" ? g : a.status === "dirty" ? (t.dirty(), {
2561
2561
  status: "dirty",
2562
- value: s.value
2562
+ value: a.value
2563
2563
  }) : this._def.out._parseSync({
2564
- data: s.value,
2565
- path: a.path,
2566
- parent: a
2564
+ data: a.value,
2565
+ path: s.path,
2566
+ parent: s
2567
2567
  });
2568
2568
  }
2569
2569
  }
@@ -2571,14 +2571,14 @@ class _e extends v {
2571
2571
  return new _e({
2572
2572
  in: e,
2573
2573
  out: t,
2574
- typeName: f.ZodPipeline
2574
+ typeName: m.ZodPipeline
2575
2575
  });
2576
2576
  }
2577
2577
  }
2578
2578
  class fe extends v {
2579
2579
  _parse(e) {
2580
- const t = this._def.innerType._parse(e), a = (s) => (L(s) && (s.value = Object.freeze(s.value)), s);
2581
- return X(t) ? t.then((s) => a(s)) : a(t);
2580
+ const t = this._def.innerType._parse(e), s = (a) => (L(a) && (a.value = Object.freeze(a.value)), a);
2581
+ return X(t) ? t.then((a) => s(a)) : s(t);
2582
2582
  }
2583
2583
  unwrap() {
2584
2584
  return this._def.innerType;
@@ -2586,13 +2586,13 @@ class fe extends v {
2586
2586
  }
2587
2587
  fe.create = (n, e) => new fe({
2588
2588
  innerType: n,
2589
- typeName: f.ZodReadonly,
2589
+ typeName: m.ZodReadonly,
2590
2590
  ...y(e)
2591
2591
  });
2592
- var f;
2592
+ var m;
2593
2593
  (function(n) {
2594
2594
  n.ZodString = "ZodString", n.ZodNumber = "ZodNumber", n.ZodNaN = "ZodNaN", n.ZodBigInt = "ZodBigInt", n.ZodBoolean = "ZodBoolean", n.ZodDate = "ZodDate", n.ZodSymbol = "ZodSymbol", n.ZodUndefined = "ZodUndefined", n.ZodNull = "ZodNull", n.ZodAny = "ZodAny", n.ZodUnknown = "ZodUnknown", n.ZodNever = "ZodNever", n.ZodVoid = "ZodVoid", n.ZodArray = "ZodArray", n.ZodObject = "ZodObject", n.ZodUnion = "ZodUnion", n.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", n.ZodIntersection = "ZodIntersection", n.ZodTuple = "ZodTuple", n.ZodRecord = "ZodRecord", n.ZodMap = "ZodMap", n.ZodSet = "ZodSet", n.ZodFunction = "ZodFunction", n.ZodLazy = "ZodLazy", n.ZodLiteral = "ZodLiteral", n.ZodEnum = "ZodEnum", n.ZodEffects = "ZodEffects", n.ZodNativeEnum = "ZodNativeEnum", n.ZodOptional = "ZodOptional", n.ZodNullable = "ZodNullable", n.ZodDefault = "ZodDefault", n.ZodCatch = "ZodCatch", n.ZodPromise = "ZodPromise", n.ZodBranded = "ZodBranded", n.ZodPipeline = "ZodPipeline", n.ZodReadonly = "ZodReadonly";
2595
- })(f || (f = {}));
2595
+ })(m || (m = {}));
2596
2596
  const lt = A.create, ht = ce.create;
2597
2597
  E.create;
2598
2598
  q.create;
@@ -2605,7 +2605,7 @@ me.create;
2605
2605
  te.create;
2606
2606
  I.create;
2607
2607
  V.create;
2608
- const mt = "1.7.5", _t = {
2608
+ const mt = "1.8.0", _t = {
2609
2609
  version: mt
2610
2610
  };
2611
2611
  class gt {
@@ -2813,9 +2813,9 @@ class kt {
2813
2813
  this._client = e;
2814
2814
  }
2815
2815
  async fetch(e, t) {
2816
- var a;
2817
- let s;
2818
- typeof e == "string" ? s = e : e instanceof URL ? s = e.toString() : (s = e.url, t || (t = {
2816
+ var s;
2817
+ let a;
2818
+ typeof e == "string" ? a = e : e instanceof URL ? a = e.toString() : (a = e.url, t || (t = {
2819
2819
  method: e.method,
2820
2820
  headers: e.headers,
2821
2821
  body: e.body,
@@ -2826,16 +2826,16 @@ class kt {
2826
2826
  integrity: e.integrity
2827
2827
  }));
2828
2828
  let i = {};
2829
- t != null && t.headers && (t.headers instanceof Headers ? t.headers.forEach((m, w) => {
2830
- i[w] = m;
2831
- }) : Array.isArray(t.headers) ? t.headers.forEach(([m, w]) => {
2832
- i[m] = w;
2829
+ t != null && t.headers && (t.headers instanceof Headers ? t.headers.forEach((_, w) => {
2830
+ i[w] = _;
2831
+ }) : Array.isArray(t.headers) ? t.headers.forEach(([_, w]) => {
2832
+ i[_] = w;
2833
2833
  }) : i = t.headers);
2834
2834
  const r = await this._client.request("proxy.fetch", {
2835
- url: s,
2835
+ url: a,
2836
2836
  method: (t == null ? void 0 : t.method) || "GET",
2837
2837
  headers: i,
2838
- body: (a = t == null ? void 0 : t.body) !== null && a !== void 0 ? a : null
2838
+ body: (s = t == null ? void 0 : t.body) !== null && s !== void 0 ? s : null
2839
2839
  });
2840
2840
  if (!r.success)
2841
2841
  throw new TypeError(r.errorMessage, {
@@ -2849,9 +2849,9 @@ class kt {
2849
2849
  let h = null;
2850
2850
  if (r.body !== null && r.body !== void 0)
2851
2851
  if (r.bodyType === "binary") {
2852
- const m = atob(r.body), w = new Uint8Array(m.length);
2853
- for (let Z = 0; Z < m.length; Z++)
2854
- w[Z] = m.charCodeAt(Z);
2852
+ const _ = atob(r.body), w = new Uint8Array(_.length);
2853
+ for (let Z = 0; Z < _.length; Z++)
2854
+ w[Z] = _.charCodeAt(Z);
2855
2855
  h = w;
2856
2856
  } else r.bodyType === "text" ? h = r.body : r.bodyType === "json" && (h = JSON.stringify(r.body));
2857
2857
  return new Response(h, c);
@@ -2920,8 +2920,8 @@ class xt {
2920
2920
  }
2921
2921
  }
2922
2922
  class K {
2923
- constructor(e, t, a) {
2924
- this._kind = e, this._namespace = t, this._client = a;
2923
+ constructor(e, t, s) {
2924
+ this._kind = e, this._namespace = t, this._client = s;
2925
2925
  }
2926
2926
  /**
2927
2927
  * Saves a value in the store.
@@ -3112,15 +3112,62 @@ class Nt {
3112
3112
  return t.forecast;
3113
3113
  }
3114
3114
  }
3115
+ class Ct {
3116
+ constructor(e) {
3117
+ this._client = e;
3118
+ }
3119
+ /**
3120
+ * Retrieves all available currency symbols and their full names.
3121
+ *
3122
+ * @returns A promise that resolves to a mapping of currency codes to their full names
3123
+ * @throws {Error} If the request fails
3124
+ *
3125
+ * @example
3126
+ * ```typescript
3127
+ * const symbols = await currency().getSymbols()
3128
+ * // { "USD": "United States Dollar", "EUR": "Euro", ... }
3129
+ * ```
3130
+ */
3131
+ async getSymbols() {
3132
+ const e = await this._client.request("currency.getSymbols", {});
3133
+ if (!e.success || !e.symbols)
3134
+ throw new Error("Failed to fetch currency symbols");
3135
+ return e.symbols;
3136
+ }
3137
+ /**
3138
+ * Retrieves current exchange rates for a base currency against target currencies.
3139
+ *
3140
+ * @param params - Currency rate request parameters including base currency and target symbols
3141
+ * @returns A promise that resolves to a mapping of currency codes to their exchange rates
3142
+ * @throws {Error} If the request fails or currencies are invalid
3143
+ *
3144
+ * @example
3145
+ * ```typescript
3146
+ * // Get exchange rates for USD against EUR, GBP, and JPY
3147
+ * const rates = await currency().getRates({
3148
+ * base: 'USD',
3149
+ * symbols: 'EUR,GBP,JPY'
3150
+ * })
3151
+ * // { "EUR": 0.92, "GBP": 0.79, "JPY": 149.50 }
3152
+ * ```
3153
+ */
3154
+ async getRates(e) {
3155
+ var t, s, a;
3156
+ const i = await this._client.request("currency.getRates", e);
3157
+ if (!i.success || !i.rates)
3158
+ throw ((t = i.error) === null || t === void 0 ? void 0 : t.code) === 201 ? new Error(`Invalid base currency '${e.base}'`) : ((s = i.error) === null || s === void 0 ? void 0 : s.code) === 202 ? new Error(`Invalid target currency symbol '${e.symbols}'`) : new Error(((a = i.error) === null || a === void 0 ? void 0 : a.message) || "Failed to fetch currency rates");
3159
+ return i.rates;
3160
+ }
3161
+ }
3115
3162
  function W(n) {
3116
3163
  return { ...n, type: "client" };
3117
3164
  }
3118
- const Ct = pt({
3165
+ const Tt = pt({
3119
3166
  type: ft("bridge"),
3120
3167
  name: lt(),
3121
3168
  data: ht()
3122
3169
  });
3123
- class Tt {
3170
+ class Zt {
3124
3171
  /**
3125
3172
  * Creates a new RootSettingsNavigation API instance.
3126
3173
  *
@@ -3144,11 +3191,11 @@ class Tt {
3144
3191
  */
3145
3192
  async setRootSettingsNavigation(e) {
3146
3193
  var t;
3147
- const a = this._store.shared("root-settings-navigation"), s = (t = await a.get("navigation")) !== null && t !== void 0 ? t : {}, i = this._store._client._applicationSpecifier;
3148
- s[i] = {
3194
+ const s = this._store.shared("root-settings-navigation"), a = (t = await s.get("navigation")) !== null && t !== void 0 ? t : {}, i = this._store._client._applicationSpecifier;
3195
+ a[i] = {
3149
3196
  applicationSpecifier: i,
3150
3197
  entries: e.entries
3151
- }, a.set("navigation", s);
3198
+ }, s.set("navigation", a);
3152
3199
  }
3153
3200
  /**
3154
3201
  * Retrieves the current navigation entries for this root application.
@@ -3160,8 +3207,8 @@ class Tt {
3160
3207
  */
3161
3208
  async getRootSettingsNavigation() {
3162
3209
  var e;
3163
- const t = (e = await this._store.shared("root-settings-navigation").get("navigation")) !== null && e !== void 0 ? e : {}, a = this._store._client._applicationSpecifier;
3164
- return t[a];
3210
+ const t = (e = await this._store.shared("root-settings-navigation").get("navigation")) !== null && e !== void 0 ? e : {}, s = this._store._client._applicationSpecifier;
3211
+ return t[s];
3165
3212
  }
3166
3213
  /**
3167
3214
  * Retrieves the navigation entries for all root applications.
@@ -3181,7 +3228,7 @@ const F = 1e3 * 30, ge = typeof window > "u" && typeof self < "u", B = ge ? self
3181
3228
  function z(n) {
3182
3229
  ge ? self.postMessage(n) : B.parent.postMessage(n, "*");
3183
3230
  }
3184
- class Zt {
3231
+ class Ot {
3185
3232
  /**
3186
3233
  * Creates a new Client instance for communicating with the TelemetryOS platform.
3187
3234
  *
@@ -3311,7 +3358,7 @@ class Zt {
3311
3358
  * @throws {Error} If used by an application not mounted at the 'rootSettingsNavigation' mount point
3312
3359
  */
3313
3360
  get rootSettingsNavigation() {
3314
- return new Tt(this.store);
3361
+ return new Zt(this.store);
3315
3362
  }
3316
3363
  /**
3317
3364
  * Provides access to the weather API for retrieving weather data.
@@ -3327,6 +3374,20 @@ class Zt {
3327
3374
  get weather() {
3328
3375
  return new Nt(this);
3329
3376
  }
3377
+ /**
3378
+ * Provides access to the currency API for retrieving currency exchange rates.
3379
+ *
3380
+ * This property returns a new Currency instance that allows applications to fetch
3381
+ * currency symbols and exchange rates through the TelemetryOS API.
3382
+ *
3383
+ * NOTE: Most application developers should use the global currency() function
3384
+ * instead of accessing this property directly.
3385
+ *
3386
+ * @returns A Currency instance bound to this client
3387
+ */
3388
+ get currency() {
3389
+ return new Ct(this);
3390
+ }
3330
3391
  /**
3331
3392
  * Provides access to the environment API for accessing environment settings.
3332
3393
  *
@@ -3366,13 +3427,13 @@ class Zt {
3366
3427
  * of creating and binding their own Client instances.
3367
3428
  */
3368
3429
  bind() {
3369
- var e, t, a;
3370
- const s = new URL(B.location.href), i = s.searchParams;
3430
+ var e, t, s;
3431
+ const a = new URL(B.location.href), i = a.searchParams;
3371
3432
  if (this._applicationInstance = (e = i.get("applicationInstance")) !== null && e !== void 0 ? e : "", !this._applicationInstance)
3372
3433
  throw new Error("Missing applicationInstance query parameter");
3373
3434
  if (this._applicationSpecifier = (t = i.get("applicationSpecifier")) !== null && t !== void 0 ? t : "", !this._applicationSpecifier) {
3374
- const r = s.hostname.split(".");
3375
- this._applicationSpecifier = (a = r[0]) !== null && a !== void 0 ? a : "";
3435
+ const r = a.hostname.split(".");
3436
+ this._applicationSpecifier = (s = r[0]) !== null && s !== void 0 ? s : "";
3376
3437
  }
3377
3438
  if (!this._applicationSpecifier || this._applicationSpecifier.length !== 40)
3378
3439
  throw new Error(`Invalid applicationSpecifier: expected 40-character hash, got "${this._applicationSpecifier}"`);
@@ -3389,16 +3450,16 @@ class Zt {
3389
3450
  o = { ...c(r.data.data), type: "bridge" };
3390
3451
  }
3391
3452
  if (!o) {
3392
- const c = Ct.safeParse(r.data);
3453
+ const c = Tt.safeParse(r.data);
3393
3454
  if (!c.success)
3394
3455
  return;
3395
3456
  o = c.data;
3396
- const h = this._onHandlers.get(o.name), m = this._onceHandlers.get(o.name);
3457
+ const h = this._onHandlers.get(o.name), _ = this._onceHandlers.get(o.name);
3397
3458
  if (h)
3398
3459
  for (const w of h)
3399
3460
  w(o.data);
3400
- if (m) {
3401
- for (const w of m)
3461
+ if (_) {
3462
+ for (const w of _)
3402
3463
  w(o.data);
3403
3464
  this._onceHandlers.delete(o.name);
3404
3465
  }
@@ -3438,7 +3499,7 @@ class Zt {
3438
3499
  * @param data The data payload to include with the message
3439
3500
  */
3440
3501
  send(e, t) {
3441
- const a = W({
3502
+ const s = W({
3442
3503
  telemetrySdkVersion: G,
3443
3504
  applicationName: this._applicationName,
3444
3505
  applicationSpecifier: this._applicationSpecifier,
@@ -3446,7 +3507,7 @@ class Zt {
3446
3507
  name: e,
3447
3508
  data: t
3448
3509
  });
3449
- z(a);
3510
+ z(s);
3450
3511
  }
3451
3512
  /**
3452
3513
  * Sends a message to the TelemetryOS platform and waits for a response.
@@ -3466,32 +3527,32 @@ class Zt {
3466
3527
  * @throws {Error} If the request times out
3467
3528
  */
3468
3529
  request(e, t) {
3469
- const a = J(), s = W({
3530
+ const s = J(), a = W({
3470
3531
  telemetrySdkVersion: G,
3471
3532
  applicationName: this._applicationName,
3472
3533
  applicationSpecifier: this._applicationSpecifier,
3473
3534
  applicationInstance: this._applicationInstance,
3474
3535
  name: e,
3475
3536
  data: t,
3476
- responseName: a
3537
+ responseName: s
3477
3538
  });
3478
- z(s);
3539
+ z(a);
3479
3540
  let i = !1, r;
3480
- const o = new Promise((h, m) => {
3481
- const w = new Error(`${e} message request with response name of ${a} timed out after ${F}`);
3541
+ const o = new Promise((h, _) => {
3542
+ const w = new Error(`${e} message request with response name of ${s} timed out after ${F}`);
3482
3543
  setTimeout(() => {
3483
- i = !0, this.off(a, r), m(w);
3544
+ i = !0, this.off(s, r), _(w);
3484
3545
  }, F);
3485
3546
  }), c = new Promise((h) => {
3486
- r = (m) => {
3487
- i || h(m);
3488
- }, this.once(a, h);
3547
+ r = (_) => {
3548
+ i || h(_);
3549
+ }, this.once(s, h);
3489
3550
  });
3490
3551
  return Promise.race([o, c]);
3491
3552
  }
3492
- async subscribe(e, t, a) {
3493
- let s, i;
3494
- typeof t == "function" ? i = t : (s = t, i = a);
3553
+ async subscribe(e, t, s) {
3554
+ let a, i;
3555
+ typeof t == "function" ? i = t : (a = t, i = s);
3495
3556
  const r = J(), o = J();
3496
3557
  let c = this._subscriptionNamesBySubjectName.get(e);
3497
3558
  c || (c = [], this._subscriptionNamesBySubjectName.set(e, c)), c.push(r), this._subscriptionNamesByHandler.set(i, r), this.on(r, i);
@@ -3501,27 +3562,27 @@ class Zt {
3501
3562
  applicationSpecifier: this._applicationSpecifier,
3502
3563
  applicationInstance: this._applicationInstance,
3503
3564
  name: e,
3504
- data: s,
3565
+ data: a,
3505
3566
  responseName: o,
3506
3567
  subscriptionName: r
3507
3568
  });
3508
3569
  z(h);
3509
- let m = !1, w;
3570
+ let _ = !1, w;
3510
3571
  const Z = new Promise((j, P) => {
3511
- const se = new Error(`${e} subscribe request with subscription name of ${r} and response name of ${o} timed out after ${F}`);
3572
+ const ae = new Error(`${e} subscribe request with subscription name of ${r} and response name of ${o} timed out after ${F}`);
3512
3573
  setTimeout(() => {
3513
- m = !0, this.off(o, w), P(se);
3574
+ _ = !0, this.off(o, w), P(ae);
3514
3575
  }, F);
3515
- }), ae = new Promise((j) => {
3576
+ }), se = new Promise((j) => {
3516
3577
  w = (P) => {
3517
- m || j(P);
3578
+ _ || j(P);
3518
3579
  }, this.on(o, j);
3519
3580
  });
3520
- return Promise.race([Z, ae]);
3581
+ return Promise.race([Z, se]);
3521
3582
  }
3522
- async unsubscribe(e, t, a) {
3523
- let s, i;
3524
- typeof t == "function" ? i = t : (s = t, i = a);
3583
+ async unsubscribe(e, t, s) {
3584
+ let a, i;
3585
+ typeof t == "function" ? i = t : (a = t, i = s);
3525
3586
  const r = J();
3526
3587
  let o = [];
3527
3588
  if (i) {
@@ -3539,23 +3600,23 @@ class Zt {
3539
3600
  applicationName: this._applicationName,
3540
3601
  applicationSpecifier: this._applicationSpecifier,
3541
3602
  name: e,
3542
- data: s,
3603
+ data: a,
3543
3604
  responseName: r,
3544
3605
  unsubscribeName: c
3545
3606
  });
3546
3607
  z(h);
3547
- let m = !1, w;
3608
+ let _ = !1, w;
3548
3609
  const Z = new Promise((j, P) => {
3549
- const se = new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${r} timed out after ${F}`);
3610
+ const ae = new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${r} timed out after ${F}`);
3550
3611
  setTimeout(() => {
3551
- m = !0, this.off(r, w), P(se);
3612
+ _ = !0, this.off(r, w), P(ae);
3552
3613
  }, F);
3553
- }), ae = new Promise((j) => {
3614
+ }), se = new Promise((j) => {
3554
3615
  w = (P) => {
3555
- m || j(P);
3616
+ _ || j(P);
3556
3617
  }, this.once(r, j);
3557
3618
  });
3558
- if (!(await Promise.race([Z, ae])).success)
3619
+ if (!(await Promise.race([Z, se])).success)
3559
3620
  return { success: !1 };
3560
3621
  }
3561
3622
  return { success: !0 };
@@ -3578,9 +3639,9 @@ class Zt {
3578
3639
  * @param handler The callback function to execute when messages are received
3579
3640
  */
3580
3641
  on(e, t) {
3581
- var a;
3582
- const s = (a = this._onHandlers.get(e)) !== null && a !== void 0 ? a : [];
3583
- s.length === 0 && this._onHandlers.set(e, s), s.push(t);
3642
+ var s;
3643
+ const a = (s = this._onHandlers.get(e)) !== null && s !== void 0 ? s : [];
3644
+ a.length === 0 && this._onHandlers.set(e, a), a.push(t);
3584
3645
  }
3585
3646
  /**
3586
3647
  * Registers a one-time handler for a specific message type.
@@ -3597,9 +3658,9 @@ class Zt {
3597
3658
  * @param handler The callback function to execute when the message is received
3598
3659
  */
3599
3660
  once(e, t) {
3600
- var a;
3601
- const s = (a = this._onceHandlers.get(e)) !== null && a !== void 0 ? a : [];
3602
- s.length === 0 && this._onceHandlers.set(e, s), s.push(t);
3661
+ var s;
3662
+ const a = (s = this._onceHandlers.get(e)) !== null && s !== void 0 ? s : [];
3663
+ a.length === 0 && this._onceHandlers.set(e, a), a.push(t);
3603
3664
  }
3604
3665
  /**
3605
3666
  * Removes previously registered message handlers.
@@ -3617,17 +3678,17 @@ class Zt {
3617
3678
  * all handlers for this message type will be removed.
3618
3679
  */
3619
3680
  off(e, t) {
3620
- const a = this._onHandlers.get(e), s = this._onceHandlers.get(e);
3621
- if (!(!a && !s)) {
3622
- if (a) {
3623
- for (let i = 0; i < a.length; i += 1)
3624
- t && a[i] !== t || (a.splice(i, 1), i -= 1);
3625
- a.length === 0 && this._onHandlers.delete(e);
3626
- }
3681
+ const s = this._onHandlers.get(e), a = this._onceHandlers.get(e);
3682
+ if (!(!s && !a)) {
3627
3683
  if (s) {
3628
3684
  for (let i = 0; i < s.length; i += 1)
3629
3685
  t && s[i] !== t || (s.splice(i, 1), i -= 1);
3630
- s.length === 0 && this._onceHandlers.delete(e);
3686
+ s.length === 0 && this._onHandlers.delete(e);
3687
+ }
3688
+ if (a) {
3689
+ for (let i = 0; i < a.length; i += 1)
3690
+ t && a[i] !== t || (a.splice(i, 1), i -= 1);
3691
+ a.length === 0 && this._onceHandlers.delete(e);
3631
3692
  }
3632
3693
  }
3633
3694
  }
@@ -3636,7 +3697,7 @@ function J() {
3636
3697
  return Math.random().toString(36).slice(2, 9);
3637
3698
  }
3638
3699
  const G = _t.version;
3639
- class Ot {
3700
+ class At {
3640
3701
  constructor(e) {
3641
3702
  this._client = e;
3642
3703
  }
@@ -3685,7 +3746,7 @@ class Ot {
3685
3746
  return !0;
3686
3747
  }
3687
3748
  }
3688
- class At {
3749
+ class It {
3689
3750
  constructor(e) {
3690
3751
  this._client = e;
3691
3752
  }
@@ -3741,77 +3802,80 @@ class At {
3741
3802
  return !0;
3742
3803
  }
3743
3804
  }
3744
- class It extends Zt {
3805
+ class $t extends Ot {
3745
3806
  get playlist() {
3746
- return new At(this);
3807
+ return new It(this);
3747
3808
  }
3748
3809
  get overrides() {
3749
- return new Ot(this);
3810
+ return new At(this);
3750
3811
  }
3751
3812
  }
3752
- let g = null;
3753
- function Dt() {
3754
- return g;
3755
- }
3756
- function Vt(n) {
3757
- g = new It(n), g.bind();
3758
- }
3813
+ let f = null;
3759
3814
  function zt() {
3760
- g == null || g.unbind(), g = null;
3815
+ return f;
3761
3816
  }
3762
- function Bt(...n) {
3763
- return k(g), g.on(...n);
3817
+ function Bt(n) {
3818
+ f = new $t(n), f.bind();
3764
3819
  }
3765
- function Ut(...n) {
3766
- return k(g), g.once(...n);
3820
+ function Ut() {
3821
+ f == null || f.unbind(), f = null;
3767
3822
  }
3768
3823
  function Ht(...n) {
3769
- return k(g), g.off(...n);
3824
+ return k(f), f.on(...n);
3770
3825
  }
3771
3826
  function Kt(...n) {
3772
- return k(g), g.send(...n);
3827
+ return k(f), f.once(...n);
3773
3828
  }
3774
3829
  function Wt(...n) {
3775
- return k(g), g.request(...n);
3830
+ return k(f), f.off(...n);
3776
3831
  }
3777
3832
  function Jt(...n) {
3778
- return k(g), g.subscribe(...n);
3833
+ return k(f), f.send(...n);
3779
3834
  }
3780
3835
  function Gt(...n) {
3781
- return k(g), g.unsubscribe(...n);
3836
+ return k(f), f.request(...n);
3782
3837
  }
3783
- function Yt() {
3784
- return k(g), g.store;
3838
+ function Yt(...n) {
3839
+ return k(f), f.subscribe(...n);
3785
3840
  }
3786
- function Xt() {
3787
- return k(g), g.applications;
3841
+ function Xt(...n) {
3842
+ return k(f), f.unsubscribe(...n);
3788
3843
  }
3789
3844
  function Qt() {
3790
- return k(g), g.media;
3845
+ return k(f), f.store;
3846
+ }
3847
+ function es() {
3848
+ return k(f), f.applications;
3849
+ }
3850
+ function ts() {
3851
+ return k(f), f.media;
3852
+ }
3853
+ function ss() {
3854
+ return k(f), f.accounts;
3791
3855
  }
3792
- function ea() {
3793
- return k(g), g.accounts;
3856
+ function as() {
3857
+ return k(f), f.users;
3794
3858
  }
3795
- function ta() {
3796
- return k(g), g.users;
3859
+ function ns() {
3860
+ return k(f), f.devices;
3797
3861
  }
3798
- function aa() {
3799
- return k(g), g.devices;
3862
+ function rs() {
3863
+ return k(f), f.proxy;
3800
3864
  }
3801
- function sa() {
3802
- return k(g), g.proxy;
3865
+ function is() {
3866
+ return k(f), f.weather;
3803
3867
  }
3804
- function na() {
3805
- return k(g), g.weather;
3868
+ function os() {
3869
+ return k(f), f.currency;
3806
3870
  }
3807
- function ra() {
3808
- return k(g), g.environment;
3871
+ function cs() {
3872
+ return k(f), f.environment;
3809
3873
  }
3810
- function ia() {
3811
- return k(g), g.playlist;
3874
+ function ds() {
3875
+ return k(f), f.playlist;
3812
3876
  }
3813
- function oa() {
3814
- return k(g), g.overrides;
3877
+ function us() {
3878
+ return k(f), f.overrides;
3815
3879
  }
3816
3880
  function k(n) {
3817
3881
  if (!n)
@@ -3820,6 +3884,7 @@ function k(n) {
3820
3884
  export {
3821
3885
  gt as Accounts,
3822
3886
  yt as Applications,
3887
+ Ct as Currency,
3823
3888
  vt as Devices,
3824
3889
  bt as Environment,
3825
3890
  wt as Media,
@@ -3828,26 +3893,27 @@ export {
3828
3893
  K as StoreSlice,
3829
3894
  St as Users,
3830
3895
  Nt as Weather,
3831
- ea as accounts,
3832
- Xt as applications,
3833
- Vt as configure,
3834
- zt as destroy,
3835
- aa as devices,
3836
- ra as environment,
3837
- Dt as globalClient,
3838
- Qt as media,
3839
- Ht as off,
3840
- Bt as on,
3841
- Ut as once,
3842
- oa as overrides,
3843
- ia as playlist,
3844
- sa as proxy,
3845
- Wt as request,
3846
- Kt as send,
3847
- Yt as store,
3848
- Jt as subscribe,
3896
+ ss as accounts,
3897
+ es as applications,
3898
+ Bt as configure,
3899
+ os as currency,
3900
+ Ut as destroy,
3901
+ ns as devices,
3902
+ cs as environment,
3903
+ zt as globalClient,
3904
+ ts as media,
3905
+ Wt as off,
3906
+ Ht as on,
3907
+ Kt as once,
3908
+ us as overrides,
3909
+ ds as playlist,
3910
+ rs as proxy,
3911
+ Gt as request,
3912
+ Jt as send,
3913
+ Qt as store,
3914
+ Yt as subscribe,
3849
3915
  G as telemetrySdkVersion,
3850
- Gt as unsubscribe,
3851
- ta as users,
3852
- na as weather
3916
+ Xt as unsubscribe,
3917
+ as as users,
3918
+ is as weather
3853
3919
  };