@useinsider/guido 3.21.2-beta.cfc5be2 → 3.21.2-beta.eea8885

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.
Files changed (58) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +39 -41
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +79 -81
  5. package/dist/composables/useBlocksConfig.js +24 -32
  6. package/dist/enums/academy.js +0 -1
  7. package/dist/guido.css +1 -1
  8. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +92 -93
  9. package/dist/node_modules/valibot/dist/index.js +261 -297
  10. package/dist/src/@types/config/schemas.d.ts +0 -4
  11. package/dist/src/composables/useConfig.d.ts +0 -2
  12. package/dist/src/enums/academy.d.ts +0 -1
  13. package/dist/src/stores/config.d.ts +0 -166
  14. package/dist/stores/config.js +6 -13
  15. package/dist/utils/pairProductVariables.js +98 -91
  16. package/package.json +1 -1
  17. package/dist/@types/display-condition.js +0 -25
  18. package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +0 -20
  19. package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +0 -30
  20. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +0 -30
  21. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +0 -71
  22. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +0 -34
  23. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +0 -57
  24. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +0 -17
  25. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +0 -22
  26. package/dist/composables/useDisplayConditions.js +0 -102
  27. package/dist/enums/display-condition.js +0 -12
  28. package/dist/extensions/DisplayConditions/bridge.js +0 -17
  29. package/dist/extensions/DisplayConditions/constants.js +0 -17
  30. package/dist/extensions/DisplayConditions/control.js +0 -178
  31. package/dist/extensions/DisplayConditions/display-conditions.css.js +0 -201
  32. package/dist/extensions/DisplayConditions/extension.js +0 -28
  33. package/dist/extensions/DisplayConditions/iconsRegistry.js +0 -20
  34. package/dist/extensions/DisplayConditions/library.js +0 -27
  35. package/dist/extensions/DisplayConditions/settingsPanel.js +0 -17
  36. package/dist/services/displayConditionApi.js +0 -39
  37. package/dist/src/@types/display-condition.d.ts +0 -59
  38. package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +0 -43
  39. package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +0 -2
  40. package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +0 -2
  41. package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +0 -2
  42. package/dist/src/composables/useDisplayConditions.d.ts +0 -16
  43. package/dist/src/enums/display-condition.d.ts +0 -15
  44. package/dist/src/extensions/DisplayConditions/bridge.d.ts +0 -6
  45. package/dist/src/extensions/DisplayConditions/constants.d.ts +0 -14
  46. package/dist/src/extensions/DisplayConditions/control.d.ts +0 -23
  47. package/dist/src/extensions/DisplayConditions/extension.d.ts +0 -2
  48. package/dist/src/extensions/DisplayConditions/iconsRegistry.d.ts +0 -4
  49. package/dist/src/extensions/DisplayConditions/library.d.ts +0 -8
  50. package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +0 -5
  51. package/dist/src/mock/api/display-conditions.d.ts +0 -2
  52. package/dist/src/services/displayConditionApi.d.ts +0 -8
  53. package/dist/src/stores/display-condition.d.ts +0 -81
  54. package/dist/src/utils/displayCondition.d.ts +0 -10
  55. package/dist/src/utils/protectTableText.d.ts +0 -2
  56. package/dist/stores/display-condition.js +0 -28
  57. package/dist/utils/displayCondition.js +0 -26
  58. package/dist/utils/protectTableText.js +0 -22
@@ -1,6 +1,6 @@
1
1
  let m;
2
2
  // @__NO_SIDE_EFFECTS__
3
- function g(n) {
3
+ function j(n) {
4
4
  return {
5
5
  lang: (n == null ? void 0 : n.lang) ?? (m == null ? void 0 : m.lang),
6
6
  message: n == null ? void 0 : n.message,
@@ -8,76 +8,66 @@ function g(n) {
8
8
  abortPipeEarly: (n == null ? void 0 : n.abortPipeEarly) ?? (m == null ? void 0 : m.abortPipeEarly)
9
9
  };
10
10
  }
11
- let E;
11
+ let g;
12
12
  // @__NO_SIDE_EFFECTS__
13
13
  function A(n) {
14
- return E == null ? void 0 : E.get(n);
14
+ return g == null ? void 0 : g.get(n);
15
15
  }
16
- let j;
16
+ let x;
17
17
  // @__NO_SIDE_EFFECTS__
18
- function V(n) {
19
- return j == null ? void 0 : j.get(n);
18
+ function q(n) {
19
+ return x == null ? void 0 : x.get(n);
20
20
  }
21
- let _;
21
+ let E;
22
22
  // @__NO_SIDE_EFFECTS__
23
- function q(n, r) {
23
+ function K(n, s) {
24
24
  var e;
25
- return (e = _ == null ? void 0 : _.get(n)) == null ? void 0 : e.get(r);
25
+ return (e = E == null ? void 0 : E.get(n)) == null ? void 0 : e.get(s);
26
26
  }
27
27
  // @__NO_SIDE_EFFECTS__
28
- function w(n) {
29
- var e, s;
30
- const r = typeof n;
31
- return r === "string" ? `"${n}"` : r === "number" || r === "bigint" || r === "boolean" ? `${n}` : r === "object" || r === "function" ? (n && ((s = (e = Object.getPrototypeOf(n)) == null ? void 0 : e.constructor) == null ? void 0 : s.name)) ?? "null" : r;
28
+ function _(n) {
29
+ var e, r;
30
+ const s = typeof n;
31
+ return s === "string" ? `"${n}"` : s === "number" || s === "bigint" || s === "boolean" ? `${n}` : s === "object" || s === "function" ? (n && ((r = (e = Object.getPrototypeOf(n)) == null ? void 0 : e.constructor) == null ? void 0 : r.name)) ?? "null" : s;
32
32
  }
33
- function f(n, r, e, s, t) {
34
- const l = t && "input" in t ? t.input : e.value, u = (t == null ? void 0 : t.expected) ?? n.expects ?? null, a = (t == null ? void 0 : t.received) ?? /* @__PURE__ */ w(l), i = {
33
+ function f(n, s, e, r, t) {
34
+ const l = t && "input" in t ? t.input : e.value, i = (t == null ? void 0 : t.expected) ?? n.expects ?? null, a = (t == null ? void 0 : t.received) ?? /* @__PURE__ */ _(l), u = {
35
35
  kind: n.kind,
36
36
  type: n.type,
37
37
  input: l,
38
- expected: u,
38
+ expected: i,
39
39
  received: a,
40
- message: `Invalid ${r}: ${u ? `Expected ${u} but r` : "R"}eceived ${a}`,
40
+ message: `Invalid ${s}: ${i ? `Expected ${i} but r` : "R"}eceived ${a}`,
41
41
  requirement: n.requirement,
42
42
  path: t == null ? void 0 : t.path,
43
43
  issues: t == null ? void 0 : t.issues,
44
- lang: s.lang,
45
- abortEarly: s.abortEarly,
46
- abortPipeEarly: s.abortPipeEarly
47
- }, p = n.kind === "schema", c = (t == null ? void 0 : t.message) ?? n.message ?? /* @__PURE__ */ q(n.reference, i.lang) ?? (p ? /* @__PURE__ */ V(i.lang) : null) ?? s.message ?? /* @__PURE__ */ A(i.lang);
48
- c !== void 0 && (i.message = typeof c == "function" ? c(i) : c), p && (e.typed = !1), e.issues ? e.issues.push(i) : e.issues = [i];
44
+ lang: r.lang,
45
+ abortEarly: r.abortEarly,
46
+ abortPipeEarly: r.abortPipeEarly
47
+ }, p = n.kind === "schema", c = (t == null ? void 0 : t.message) ?? n.message ?? /* @__PURE__ */ K(n.reference, u.lang) ?? (p ? /* @__PURE__ */ q(u.lang) : null) ?? r.message ?? /* @__PURE__ */ A(u.lang);
48
+ c !== void 0 && (u.message = typeof c == "function" ? c(u) : c), p && (e.typed = !1), e.issues ? e.issues.push(u) : e.issues = [u];
49
49
  }
50
50
  // @__NO_SIDE_EFFECTS__
51
51
  function o(n) {
52
52
  return {
53
53
  version: 1,
54
54
  vendor: "valibot",
55
- validate(r) {
56
- return n["~run"]({ value: r }, /* @__PURE__ */ g());
55
+ validate(s) {
56
+ return n["~run"]({ value: s }, /* @__PURE__ */ j());
57
57
  }
58
58
  };
59
59
  }
60
60
  // @__NO_SIDE_EFFECTS__
61
- function I(n, r) {
62
- return Object.hasOwn(n, r) && r !== "__proto__" && r !== "prototype" && r !== "constructor";
61
+ function I(n, s) {
62
+ return Object.hasOwn(n, s) && s !== "__proto__" && s !== "prototype" && s !== "constructor";
63
63
  }
64
64
  // @__NO_SIDE_EFFECTS__
65
- function D(n, r) {
65
+ function D(n, s) {
66
66
  const e = [...new Set(n)];
67
- return e.length > 1 ? `(${e.join(` ${r} `)})` : e[0] ?? "never";
68
- }
69
- var K = class extends Error {
70
- /**
71
- * Creates a Valibot error with useful information.
72
- *
73
- * @param issues The error issues.
74
- */
75
- constructor(n) {
76
- super(n[0].message), this.name = "ValiError", this.issues = n;
77
- }
78
- };
67
+ return e.length > 1 ? `(${e.join(` ${s} `)})` : e[0] ?? "never";
68
+ }
79
69
  // @__NO_SIDE_EFFECTS__
80
- function M(n, r) {
70
+ function M(n, s) {
81
71
  return {
82
72
  kind: "validation",
83
73
  type: "check",
@@ -85,75 +75,75 @@ function M(n, r) {
85
75
  async: !0,
86
76
  expects: null,
87
77
  requirement: n,
88
- message: r,
89
- async "~run"(e, s) {
90
- return e.typed && !await this.requirement(e.value) && f(this, "input", e, s), e;
78
+ message: s,
79
+ async "~run"(e, r) {
80
+ return e.typed && !await this.requirement(e.value) && f(this, "input", e, r), e;
91
81
  }
92
82
  };
93
83
  }
94
84
  // @__NO_SIDE_EFFECTS__
95
- function z(n, r) {
85
+ function V(n, s) {
96
86
  return {
97
87
  kind: "validation",
98
88
  type: "max_length",
99
- reference: z,
89
+ reference: V,
100
90
  async: !1,
101
91
  expects: `<=${n}`,
102
92
  requirement: n,
103
- message: r,
104
- "~run"(e, s) {
105
- return e.typed && e.value.length > this.requirement && f(this, "length", e, s, { received: `${e.value.length}` }), e;
93
+ message: s,
94
+ "~run"(e, r) {
95
+ return e.typed && e.value.length > this.requirement && f(this, "length", e, r, { received: `${e.value.length}` }), e;
106
96
  }
107
97
  };
108
98
  }
109
99
  // @__NO_SIDE_EFFECTS__
110
- function G(n, r) {
100
+ function z(n, s) {
111
101
  return {
112
102
  kind: "validation",
113
103
  type: "min_length",
114
- reference: G,
104
+ reference: z,
115
105
  async: !1,
116
106
  expects: `>=${n}`,
117
107
  requirement: n,
118
- message: r,
119
- "~run"(e, s) {
120
- return e.typed && e.value.length < this.requirement && f(this, "length", e, s, { received: `${e.value.length}` }), e;
108
+ message: s,
109
+ "~run"(e, r) {
110
+ return e.typed && e.value.length < this.requirement && f(this, "length", e, r, { received: `${e.value.length}` }), e;
121
111
  }
122
112
  };
123
113
  }
124
114
  // @__NO_SIDE_EFFECTS__
125
- function L(n) {
115
+ function G(n) {
126
116
  return {
127
117
  kind: "validation",
128
118
  type: "non_empty",
129
- reference: L,
119
+ reference: G,
130
120
  async: !1,
131
121
  expects: "!0",
132
122
  message: n,
133
- "~run"(r, e) {
134
- return r.typed && r.value.length === 0 && f(this, "length", r, e, { received: "0" }), r;
123
+ "~run"(s, e) {
124
+ return s.typed && s.value.length === 0 && f(this, "length", s, e, { received: "0" }), s;
135
125
  }
136
126
  };
137
127
  }
138
128
  // @__NO_SIDE_EFFECTS__
139
- function N(n) {
129
+ function L(n) {
140
130
  return {
141
131
  kind: "transformation",
142
132
  type: "transform",
143
- reference: N,
133
+ reference: L,
144
134
  async: !1,
145
135
  operation: n,
146
- "~run"(r) {
147
- return r.value = this.operation(r.value), r;
136
+ "~run"(s) {
137
+ return s.value = this.operation(s.value), s;
148
138
  }
149
139
  };
150
140
  }
151
141
  // @__NO_SIDE_EFFECTS__
152
- function C() {
142
+ function N() {
153
143
  return {
154
144
  kind: "transformation",
155
145
  type: "trim",
156
- reference: C,
146
+ reference: N,
157
147
  async: !1,
158
148
  "~run"(n) {
159
149
  return n.value = n.value.trim(), n;
@@ -161,362 +151,344 @@ function C() {
161
151
  };
162
152
  }
163
153
  // @__NO_SIDE_EFFECTS__
164
- function P(n, r, e) {
165
- return typeof n.fallback == "function" ? n.fallback(r, e) : n.fallback;
154
+ function P(n, s, e) {
155
+ return typeof n.fallback == "function" ? n.fallback(s, e) : n.fallback;
166
156
  }
167
157
  // @__NO_SIDE_EFFECTS__
168
- function se(n, r) {
158
+ function ne(n, s) {
169
159
  return {
170
160
  ...n,
171
- fallback: r,
161
+ fallback: s,
172
162
  get "~standard"() {
173
163
  return /* @__PURE__ */ o(this);
174
164
  },
175
- "~run"(e, s) {
176
- const t = n["~run"](e, s);
165
+ "~run"(e, r) {
166
+ const t = n["~run"](e, r);
177
167
  return t.issues ? {
178
168
  typed: !0,
179
- value: /* @__PURE__ */ P(this, t, s)
169
+ value: /* @__PURE__ */ P(this, t, r)
180
170
  } : t;
181
171
  }
182
172
  };
183
173
  }
184
174
  // @__NO_SIDE_EFFECTS__
185
- function x(n, r, e) {
186
- return typeof n.default == "function" ? n.default(r, e) : n.default;
175
+ function w(n, s, e) {
176
+ return typeof n.default == "function" ? n.default(s, e) : n.default;
187
177
  }
188
178
  // @__NO_SIDE_EFFECTS__
189
- function F(n, r) {
179
+ function C(n, s) {
190
180
  return {
191
181
  kind: "schema",
192
182
  type: "array",
193
- reference: F,
183
+ reference: C,
194
184
  expects: "Array",
195
185
  async: !1,
196
186
  item: n,
197
- message: r,
187
+ message: s,
198
188
  get "~standard"() {
199
189
  return /* @__PURE__ */ o(this);
200
190
  },
201
- "~run"(e, s) {
191
+ "~run"(e, r) {
202
192
  var l;
203
193
  const t = e.value;
204
194
  if (Array.isArray(t)) {
205
195
  e.typed = !0, e.value = [];
206
- for (let u = 0; u < t.length; u++) {
207
- const a = t[u], i = this.item["~run"]({ value: a }, s);
208
- if (i.issues) {
196
+ for (let i = 0; i < t.length; i++) {
197
+ const a = t[i], u = this.item["~run"]({ value: a }, r);
198
+ if (u.issues) {
209
199
  const p = {
210
200
  type: "array",
211
201
  origin: "value",
212
202
  input: t,
213
- key: u,
203
+ key: i,
214
204
  value: a
215
205
  };
216
- for (const c of i.issues)
206
+ for (const c of u.issues)
217
207
  c.path ? c.path.unshift(p) : c.path = [p], (l = e.issues) == null || l.push(c);
218
- if (e.issues || (e.issues = i.issues), s.abortEarly) {
208
+ if (e.issues || (e.issues = u.issues), r.abortEarly) {
219
209
  e.typed = !1;
220
210
  break;
221
211
  }
222
212
  }
223
- i.typed || (e.typed = !1), e.value.push(i.value);
213
+ u.typed || (e.typed = !1), e.value.push(u.value);
224
214
  }
225
- } else f(this, "type", e, s);
215
+ } else f(this, "type", e, r);
226
216
  return e;
227
217
  }
228
218
  };
229
219
  }
230
220
  // @__NO_SIDE_EFFECTS__
231
- function R(n) {
221
+ function F(n) {
232
222
  return {
233
223
  kind: "schema",
234
224
  type: "boolean",
235
- reference: R,
225
+ reference: F,
236
226
  expects: "boolean",
237
227
  async: !1,
238
228
  message: n,
239
229
  get "~standard"() {
240
230
  return /* @__PURE__ */ o(this);
241
231
  },
242
- "~run"(r, e) {
243
- return typeof r.value == "boolean" ? r.typed = !0 : f(this, "type", r, e), r;
232
+ "~run"(s, e) {
233
+ return typeof s.value == "boolean" ? s.typed = !0 : f(this, "type", s, e), s;
244
234
  }
245
235
  };
246
236
  }
247
237
  // @__NO_SIDE_EFFECTS__
248
- function B(n, r) {
238
+ function R(n, s) {
249
239
  return {
250
240
  kind: "schema",
251
241
  type: "custom",
252
- reference: B,
242
+ reference: R,
253
243
  expects: "unknown",
254
244
  async: !1,
255
245
  check: n,
256
- message: r,
246
+ message: s,
257
247
  get "~standard"() {
258
248
  return /* @__PURE__ */ o(this);
259
249
  },
260
- "~run"(e, s) {
261
- return this.check(e.value) ? e.typed = !0 : f(this, "type", e, s), e;
250
+ "~run"(e, r) {
251
+ return this.check(e.value) ? e.typed = !0 : f(this, "type", e, r), e;
262
252
  }
263
253
  };
264
254
  }
265
255
  // @__NO_SIDE_EFFECTS__
266
- function H(n) {
256
+ function B(n) {
267
257
  return {
268
258
  kind: "schema",
269
259
  type: "lazy",
270
- reference: H,
260
+ reference: B,
271
261
  expects: "unknown",
272
262
  async: !1,
273
263
  getter: n,
274
264
  get "~standard"() {
275
265
  return /* @__PURE__ */ o(this);
276
266
  },
277
- "~run"(r, e) {
278
- return this.getter(r.value)["~run"](r, e);
267
+ "~run"(s, e) {
268
+ return this.getter(s.value)["~run"](s, e);
279
269
  }
280
270
  };
281
271
  }
282
272
  // @__NO_SIDE_EFFECTS__
283
- function J(n, r) {
273
+ function H(n, s) {
284
274
  return {
285
275
  kind: "schema",
286
276
  type: "literal",
287
- reference: J,
288
- expects: /* @__PURE__ */ w(n),
277
+ reference: H,
278
+ expects: /* @__PURE__ */ _(n),
289
279
  async: !1,
290
280
  literal: n,
291
- message: r,
281
+ message: s,
292
282
  get "~standard"() {
293
283
  return /* @__PURE__ */ o(this);
294
284
  },
295
- "~run"(e, s) {
296
- return e.value === this.literal ? e.typed = !0 : f(this, "type", e, s), e;
285
+ "~run"(e, r) {
286
+ return e.value === this.literal ? e.typed = !0 : f(this, "type", e, r), e;
297
287
  }
298
288
  };
299
289
  }
300
290
  // @__NO_SIDE_EFFECTS__
301
- function Q(n, r) {
291
+ function J(n, s) {
302
292
  return {
303
293
  kind: "schema",
304
294
  type: "loose_object",
305
- reference: Q,
295
+ reference: J,
306
296
  expects: "Object",
307
297
  async: !1,
308
298
  entries: n,
309
- message: r,
299
+ message: s,
310
300
  get "~standard"() {
311
301
  return /* @__PURE__ */ o(this);
312
302
  },
313
- "~run"(e, s) {
303
+ "~run"(e, r) {
314
304
  var l;
315
305
  const t = e.value;
316
306
  if (t && typeof t == "object") {
317
307
  e.typed = !0, e.value = {};
318
- for (const u in this.entries) {
319
- const a = this.entries[u];
320
- if (u in t || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
321
- const i = u in t ? t[u] : /* @__PURE__ */ x(a), p = a["~run"]({ value: i }, s);
308
+ for (const i in this.entries) {
309
+ const a = this.entries[i];
310
+ if (i in t || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
311
+ const u = i in t ? t[i] : /* @__PURE__ */ w(a), p = a["~run"]({ value: u }, r);
322
312
  if (p.issues) {
323
313
  const c = {
324
314
  type: "object",
325
315
  origin: "value",
326
316
  input: t,
327
- key: u,
328
- value: i
317
+ key: i,
318
+ value: u
329
319
  };
330
320
  for (const y of p.issues)
331
321
  y.path ? y.path.unshift(c) : y.path = [c], (l = e.issues) == null || l.push(y);
332
- if (e.issues || (e.issues = p.issues), s.abortEarly) {
322
+ if (e.issues || (e.issues = p.issues), r.abortEarly) {
333
323
  e.typed = !1;
334
324
  break;
335
325
  }
336
326
  }
337
- p.typed || (e.typed = !1), e.value[u] = p.value;
338
- } else if (a.fallback !== void 0) e.value[u] = /* @__PURE__ */ P(a);
339
- else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (f(this, "key", e, s, {
327
+ p.typed || (e.typed = !1), e.value[i] = p.value;
328
+ } else if (a.fallback !== void 0) e.value[i] = /* @__PURE__ */ P(a);
329
+ else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (f(this, "key", e, r, {
340
330
  input: void 0,
341
- expected: `"${u}"`,
331
+ expected: `"${i}"`,
342
332
  path: [{
343
333
  type: "object",
344
334
  origin: "key",
345
335
  input: t,
346
- key: u,
347
- value: t[u]
336
+ key: i,
337
+ value: t[i]
348
338
  }]
349
- }), s.abortEarly))
339
+ }), r.abortEarly))
350
340
  break;
351
341
  }
352
- if (!e.issues || !s.abortEarly)
353
- for (const u in t) /* @__PURE__ */ I(t, u) && !(u in this.entries) && (e.value[u] = t[u]);
354
- } else f(this, "type", e, s);
342
+ if (!e.issues || !r.abortEarly)
343
+ for (const i in t) /* @__PURE__ */ I(t, i) && !(i in this.entries) && (e.value[i] = t[i]);
344
+ } else f(this, "type", e, r);
355
345
  return e;
356
346
  }
357
347
  };
358
348
  }
359
349
  // @__NO_SIDE_EFFECTS__
360
- function T(n, r) {
361
- return {
362
- kind: "schema",
363
- type: "nullish",
364
- reference: T,
365
- expects: `(${n.expects} | null | undefined)`,
366
- async: !1,
367
- wrapped: n,
368
- default: r,
369
- get "~standard"() {
370
- return /* @__PURE__ */ o(this);
371
- },
372
- "~run"(e, s) {
373
- return (e.value === null || e.value === void 0) && (this.default !== void 0 && (e.value = /* @__PURE__ */ x(this, e, s)), e.value === null || e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, s);
374
- }
375
- };
376
- }
377
- // @__NO_SIDE_EFFECTS__
378
- function U(n) {
350
+ function Q(n) {
379
351
  return {
380
352
  kind: "schema",
381
353
  type: "number",
382
- reference: U,
354
+ reference: Q,
383
355
  expects: "number",
384
356
  async: !1,
385
357
  message: n,
386
358
  get "~standard"() {
387
359
  return /* @__PURE__ */ o(this);
388
360
  },
389
- "~run"(r, e) {
390
- return typeof r.value == "number" && !isNaN(r.value) ? r.typed = !0 : f(this, "type", r, e), r;
361
+ "~run"(s, e) {
362
+ return typeof s.value == "number" && !isNaN(s.value) ? s.typed = !0 : f(this, "type", s, e), s;
391
363
  }
392
364
  };
393
365
  }
394
366
  // @__NO_SIDE_EFFECTS__
395
- function W(n, r) {
367
+ function T(n, s) {
396
368
  return {
397
369
  kind: "schema",
398
370
  type: "object",
399
- reference: W,
371
+ reference: T,
400
372
  expects: "Object",
401
373
  async: !1,
402
374
  entries: n,
403
- message: r,
375
+ message: s,
404
376
  get "~standard"() {
405
377
  return /* @__PURE__ */ o(this);
406
378
  },
407
- "~run"(e, s) {
379
+ "~run"(e, r) {
408
380
  var l;
409
381
  const t = e.value;
410
382
  if (t && typeof t == "object") {
411
383
  e.typed = !0, e.value = {};
412
- for (const u in this.entries) {
413
- const a = this.entries[u];
414
- if (u in t || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
415
- const i = u in t ? t[u] : /* @__PURE__ */ x(a), p = a["~run"]({ value: i }, s);
384
+ for (const i in this.entries) {
385
+ const a = this.entries[i];
386
+ if (i in t || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
387
+ const u = i in t ? t[i] : /* @__PURE__ */ w(a), p = a["~run"]({ value: u }, r);
416
388
  if (p.issues) {
417
389
  const c = {
418
390
  type: "object",
419
391
  origin: "value",
420
392
  input: t,
421
- key: u,
422
- value: i
393
+ key: i,
394
+ value: u
423
395
  };
424
396
  for (const y of p.issues)
425
397
  y.path ? y.path.unshift(c) : y.path = [c], (l = e.issues) == null || l.push(y);
426
- if (e.issues || (e.issues = p.issues), s.abortEarly) {
398
+ if (e.issues || (e.issues = p.issues), r.abortEarly) {
427
399
  e.typed = !1;
428
400
  break;
429
401
  }
430
402
  }
431
- p.typed || (e.typed = !1), e.value[u] = p.value;
432
- } else if (a.fallback !== void 0) e.value[u] = /* @__PURE__ */ P(a);
433
- else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (f(this, "key", e, s, {
403
+ p.typed || (e.typed = !1), e.value[i] = p.value;
404
+ } else if (a.fallback !== void 0) e.value[i] = /* @__PURE__ */ P(a);
405
+ else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (f(this, "key", e, r, {
434
406
  input: void 0,
435
- expected: `"${u}"`,
407
+ expected: `"${i}"`,
436
408
  path: [{
437
409
  type: "object",
438
410
  origin: "key",
439
411
  input: t,
440
- key: u,
441
- value: t[u]
412
+ key: i,
413
+ value: t[i]
442
414
  }]
443
- }), s.abortEarly))
415
+ }), r.abortEarly))
444
416
  break;
445
417
  }
446
- } else f(this, "type", e, s);
418
+ } else f(this, "type", e, r);
447
419
  return e;
448
420
  }
449
421
  };
450
422
  }
451
423
  // @__NO_SIDE_EFFECTS__
452
- function X(n, r) {
424
+ function U(n, s) {
453
425
  return {
454
426
  kind: "schema",
455
427
  type: "optional",
456
- reference: X,
428
+ reference: U,
457
429
  expects: `(${n.expects} | undefined)`,
458
430
  async: !1,
459
431
  wrapped: n,
460
- default: r,
432
+ default: s,
461
433
  get "~standard"() {
462
434
  return /* @__PURE__ */ o(this);
463
435
  },
464
- "~run"(e, s) {
465
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ x(this, e, s)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, s);
436
+ "~run"(e, r) {
437
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ w(this, e, r)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, r);
466
438
  }
467
439
  };
468
440
  }
469
441
  // @__NO_SIDE_EFFECTS__
470
- function Y(n, r) {
442
+ function W(n, s) {
471
443
  return {
472
444
  kind: "schema",
473
445
  type: "picklist",
474
- reference: Y,
475
- expects: /* @__PURE__ */ D(n.map(w), "|"),
446
+ reference: W,
447
+ expects: /* @__PURE__ */ D(n.map(_), "|"),
476
448
  async: !1,
477
449
  options: n,
478
- message: r,
450
+ message: s,
479
451
  get "~standard"() {
480
452
  return /* @__PURE__ */ o(this);
481
453
  },
482
- "~run"(e, s) {
483
- return this.options.includes(e.value) ? e.typed = !0 : f(this, "type", e, s), e;
454
+ "~run"(e, r) {
455
+ return this.options.includes(e.value) ? e.typed = !0 : f(this, "type", e, r), e;
484
456
  }
485
457
  };
486
458
  }
487
459
  // @__NO_SIDE_EFFECTS__
488
- function Z(n, r, e) {
460
+ function X(n, s, e) {
489
461
  return {
490
462
  kind: "schema",
491
463
  type: "record",
492
- reference: Z,
464
+ reference: X,
493
465
  expects: "Object",
494
466
  async: !1,
495
467
  key: n,
496
- value: r,
468
+ value: s,
497
469
  message: e,
498
470
  get "~standard"() {
499
471
  return /* @__PURE__ */ o(this);
500
472
  },
501
- "~run"(s, t) {
502
- var u, a;
503
- const l = s.value;
473
+ "~run"(r, t) {
474
+ var i, a;
475
+ const l = r.value;
504
476
  if (l && typeof l == "object") {
505
- s.typed = !0, s.value = {};
506
- for (const i in l) if (/* @__PURE__ */ I(l, i)) {
507
- const p = l[i], c = this.key["~run"]({ value: i }, t);
477
+ r.typed = !0, r.value = {};
478
+ for (const u in l) if (/* @__PURE__ */ I(l, u)) {
479
+ const p = l[u], c = this.key["~run"]({ value: u }, t);
508
480
  if (c.issues) {
509
481
  const b = {
510
482
  type: "object",
511
483
  origin: "key",
512
484
  input: l,
513
- key: i,
485
+ key: u,
514
486
  value: p
515
487
  };
516
488
  for (const h of c.issues)
517
- h.path = [b], (u = s.issues) == null || u.push(h);
518
- if (s.issues || (s.issues = c.issues), t.abortEarly) {
519
- s.typed = !1;
489
+ h.path = [b], (i = r.issues) == null || i.push(h);
490
+ if (r.issues || (r.issues = c.issues), t.abortEarly) {
491
+ r.typed = !1;
520
492
  break;
521
493
  }
522
494
  }
@@ -526,88 +498,88 @@ function Z(n, r, e) {
526
498
  type: "object",
527
499
  origin: "value",
528
500
  input: l,
529
- key: i,
501
+ key: u,
530
502
  value: p
531
503
  };
532
504
  for (const h of y.issues)
533
- h.path ? h.path.unshift(b) : h.path = [b], (a = s.issues) == null || a.push(h);
534
- if (s.issues || (s.issues = y.issues), t.abortEarly) {
535
- s.typed = !1;
505
+ h.path ? h.path.unshift(b) : h.path = [b], (a = r.issues) == null || a.push(h);
506
+ if (r.issues || (r.issues = y.issues), t.abortEarly) {
507
+ r.typed = !1;
536
508
  break;
537
509
  }
538
510
  }
539
- (!c.typed || !y.typed) && (s.typed = !1), c.typed && (s.value[c.value] = y.value);
511
+ (!c.typed || !y.typed) && (r.typed = !1), c.typed && (r.value[c.value] = y.value);
540
512
  }
541
- } else f(this, "type", s, t);
542
- return s;
513
+ } else f(this, "type", r, t);
514
+ return r;
543
515
  }
544
516
  };
545
517
  }
546
518
  // @__NO_SIDE_EFFECTS__
547
- function $(n) {
519
+ function Y(n) {
548
520
  return {
549
521
  kind: "schema",
550
522
  type: "string",
551
- reference: $,
523
+ reference: Y,
552
524
  expects: "string",
553
525
  async: !1,
554
526
  message: n,
555
527
  get "~standard"() {
556
528
  return /* @__PURE__ */ o(this);
557
529
  },
558
- "~run"(r, e) {
559
- return typeof r.value == "string" ? r.typed = !0 : f(this, "type", r, e), r;
530
+ "~run"(s, e) {
531
+ return typeof s.value == "string" ? s.typed = !0 : f(this, "type", s, e), s;
560
532
  }
561
533
  };
562
534
  }
563
535
  // @__NO_SIDE_EFFECTS__
564
536
  function S(n) {
565
- let r;
566
- if (n) for (const e of n) r ? r.push(...e.issues) : r = e.issues;
567
- return r;
537
+ let s;
538
+ if (n) for (const e of n) s ? s.push(...e.issues) : s = e.issues;
539
+ return s;
568
540
  }
569
541
  // @__NO_SIDE_EFFECTS__
570
- function ee(n, r) {
542
+ function Z(n, s) {
571
543
  return {
572
544
  kind: "schema",
573
545
  type: "union",
574
- reference: ee,
546
+ reference: Z,
575
547
  expects: /* @__PURE__ */ D(n.map((e) => e.expects), "|"),
576
548
  async: !1,
577
549
  options: n,
578
- message: r,
550
+ message: s,
579
551
  get "~standard"() {
580
552
  return /* @__PURE__ */ o(this);
581
553
  },
582
- "~run"(e, s) {
583
- let t, l, u;
554
+ "~run"(e, r) {
555
+ let t, l, i;
584
556
  for (const a of this.options) {
585
- const i = a["~run"]({ value: e.value }, s);
586
- if (i.typed) if (i.issues) l ? l.push(i) : l = [i];
557
+ const u = a["~run"]({ value: e.value }, r);
558
+ if (u.typed) if (u.issues) l ? l.push(u) : l = [u];
587
559
  else {
588
- t = i;
560
+ t = u;
589
561
  break;
590
562
  }
591
- else u ? u.push(i) : u = [i];
563
+ else i ? i.push(u) : i = [u];
592
564
  }
593
565
  if (t) return t;
594
566
  if (l) {
595
567
  if (l.length === 1) return l[0];
596
- f(this, "type", e, s, { issues: /* @__PURE__ */ S(l) }), e.typed = !0;
568
+ f(this, "type", e, r, { issues: /* @__PURE__ */ S(l) }), e.typed = !0;
597
569
  } else {
598
- if ((u == null ? void 0 : u.length) === 1) return u[0];
599
- f(this, "type", e, s, { issues: /* @__PURE__ */ S(u) });
570
+ if ((i == null ? void 0 : i.length) === 1) return i[0];
571
+ f(this, "type", e, r, { issues: /* @__PURE__ */ S(i) });
600
572
  }
601
573
  return e;
602
574
  }
603
575
  };
604
576
  }
605
577
  // @__NO_SIDE_EFFECTS__
606
- function ne() {
578
+ function $() {
607
579
  return {
608
580
  kind: "schema",
609
581
  type: "unknown",
610
- reference: ne,
582
+ reference: $,
611
583
  expects: "unknown",
612
584
  async: !1,
613
585
  get "~standard"() {
@@ -619,23 +591,23 @@ function ne() {
619
591
  };
620
592
  }
621
593
  // @__NO_SIDE_EFFECTS__
622
- function re(n, r, e) {
594
+ function ee(n, s, e) {
623
595
  return {
624
596
  kind: "schema",
625
597
  type: "variant",
626
- reference: re,
598
+ reference: ee,
627
599
  expects: "Object",
628
600
  async: !1,
629
601
  key: n,
630
- options: r,
602
+ options: s,
631
603
  message: e,
632
604
  get "~standard"() {
633
605
  return /* @__PURE__ */ o(this);
634
606
  },
635
- "~run"(s, t) {
636
- const l = s.value;
607
+ "~run"(r, t) {
608
+ const l = r.value;
637
609
  if (l && typeof l == "object") {
638
- let u, a = 0, i = this.key, p = [];
610
+ let i, a = 0, u = this.key, p = [];
639
611
  const c = (y, b) => {
640
612
  for (const h of y.options) {
641
613
  if (h.type === "variant") c(h, new Set(b).add(h.key));
@@ -647,63 +619,58 @@ function re(n, r, e) {
647
619
  typed: !1,
648
620
  value: l[v]
649
621
  }, { abortEarly: !0 }).issues : d.type !== "exact_optional" && d.type !== "optional" && d.type !== "nullish") {
650
- O = !1, i !== v && (a < k || a === k && v in l && !(i in l)) && (a = k, i = v, p = []), i === v && p.push(h.entries[v].expects);
622
+ O = !1, u !== v && (a < k || a === k && v in l && !(u in l)) && (a = k, u = v, p = []), u === v && p.push(h.entries[v].expects);
651
623
  break;
652
624
  }
653
625
  k++;
654
626
  }
655
627
  if (O) {
656
628
  const v = h["~run"]({ value: l }, t);
657
- (!u || !u.typed && v.typed) && (u = v);
629
+ (!i || !i.typed && v.typed) && (i = v);
658
630
  }
659
631
  }
660
- if (u && !u.issues) break;
632
+ if (i && !i.issues) break;
661
633
  }
662
634
  };
663
- if (c(this, /* @__PURE__ */ new Set([this.key])), u) return u;
664
- f(this, "type", s, t, {
665
- input: l[i],
635
+ if (c(this, /* @__PURE__ */ new Set([this.key])), i) return i;
636
+ f(this, "type", r, t, {
637
+ input: l[u],
666
638
  expected: /* @__PURE__ */ D(p, "|"),
667
639
  path: [{
668
640
  type: "object",
669
641
  origin: "value",
670
642
  input: l,
671
- key: i,
672
- value: l[i]
643
+ key: u,
644
+ value: l[u]
673
645
  }]
674
646
  });
675
- } else f(this, "type", s, t);
676
- return s;
647
+ } else f(this, "type", r, t);
648
+ return r;
677
649
  }
678
650
  };
679
651
  }
680
- function te(n, r, e) {
681
- const s = n["~run"]({ value: r }, /* @__PURE__ */ g(e));
682
- if (s.issues) throw new K(s.issues);
683
- return s.value;
684
- }
685
652
  // @__NO_SIDE_EFFECTS__
686
- function ue(...n) {
653
+ function se(...n) {
687
654
  return {
688
655
  ...n[0],
689
656
  pipe: n,
690
657
  get "~standard"() {
691
658
  return /* @__PURE__ */ o(this);
692
659
  },
693
- "~run"(r, e) {
694
- for (const s of n) if (s.kind !== "metadata") {
695
- if (r.issues && (s.kind === "schema" || s.kind === "transformation")) {
696
- r.typed = !1;
660
+ "~run"(s, e) {
661
+ for (const r of n) if (r.kind !== "metadata") {
662
+ if (s.issues && (r.kind === "schema" || r.kind === "transformation")) {
663
+ s.typed = !1;
697
664
  break;
698
665
  }
699
- (!r.issues || !e.abortEarly && !e.abortPipeEarly) && (r = s["~run"](r, e));
666
+ (!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = r["~run"](s, e));
700
667
  }
701
- return r;
668
+ return s;
702
669
  }
703
670
  };
704
671
  }
705
672
  // @__NO_SIDE_EFFECTS__
706
- function ie(...n) {
673
+ function re(...n) {
707
674
  return {
708
675
  ...n[0],
709
676
  pipe: n,
@@ -711,77 +678,74 @@ function ie(...n) {
711
678
  get "~standard"() {
712
679
  return /* @__PURE__ */ o(this);
713
680
  },
714
- async "~run"(r, e) {
715
- for (const s of n) if (s.kind !== "metadata") {
716
- if (r.issues && (s.kind === "schema" || s.kind === "transformation")) {
717
- r.typed = !1;
681
+ async "~run"(s, e) {
682
+ for (const r of n) if (r.kind !== "metadata") {
683
+ if (s.issues && (r.kind === "schema" || r.kind === "transformation")) {
684
+ s.typed = !1;
718
685
  break;
719
686
  }
720
- (!r.issues || !e.abortEarly && !e.abortPipeEarly) && (r = await s["~run"](r, e));
687
+ (!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = await r["~run"](s, e));
721
688
  }
722
- return r;
689
+ return s;
723
690
  }
724
691
  };
725
692
  }
726
693
  // @__NO_SIDE_EFFECTS__
727
- function le(n, r, e) {
728
- const s = n["~run"]({ value: r }, /* @__PURE__ */ g(e));
694
+ function te(n, s, e) {
695
+ const r = n["~run"]({ value: s }, /* @__PURE__ */ j(e));
729
696
  return {
730
- typed: s.typed,
731
- success: !s.issues,
732
- output: s.value,
733
- issues: s.issues
697
+ typed: r.typed,
698
+ success: !r.issues,
699
+ output: r.value,
700
+ issues: r.issues
734
701
  };
735
702
  }
736
703
  // @__NO_SIDE_EFFECTS__
737
- async function ae(n, r, e) {
738
- const s = await n["~run"]({ value: r }, /* @__PURE__ */ g(e));
704
+ async function ie(n, s, e) {
705
+ const r = await n["~run"]({ value: s }, /* @__PURE__ */ j(e));
739
706
  return {
740
- typed: s.typed,
741
- success: !s.issues,
742
- output: s.value,
743
- issues: s.issues
707
+ typed: r.typed,
708
+ success: !r.issues,
709
+ output: r.value,
710
+ issues: r.issues
744
711
  };
745
712
  }
746
713
  export {
747
- K as ValiError,
748
714
  f as _addIssue,
749
715
  o as _getStandardProps,
750
716
  I as _isValidObjectKey,
751
717
  D as _joinExpects,
752
- w as _stringify,
753
- F as array,
754
- R as boolean,
718
+ _ as _stringify,
719
+ C as array,
720
+ F as boolean,
755
721
  M as checkAsync,
756
- B as custom,
757
- se as fallback,
758
- x as getDefault,
722
+ R as custom,
723
+ ne as fallback,
724
+ w as getDefault,
759
725
  P as getFallback,
760
- g as getGlobalConfig,
726
+ j as getGlobalConfig,
761
727
  A as getGlobalMessage,
762
- V as getSchemaMessage,
763
- q as getSpecificMessage,
764
- H as lazy,
765
- J as literal,
766
- Q as looseObject,
767
- z as maxLength,
768
- G as minLength,
769
- L as nonEmpty,
770
- T as nullish,
771
- U as number,
772
- W as object,
773
- X as optional,
774
- te as parse,
775
- Y as picklist,
776
- ue as pipe,
777
- ie as pipeAsync,
778
- Z as record,
779
- le as safeParse,
780
- ae as safeParseAsync,
781
- $ as string,
782
- N as transform,
783
- C as trim,
784
- ee as union,
785
- ne as unknown,
786
- re as variant
728
+ q as getSchemaMessage,
729
+ K as getSpecificMessage,
730
+ B as lazy,
731
+ H as literal,
732
+ J as looseObject,
733
+ V as maxLength,
734
+ z as minLength,
735
+ G as nonEmpty,
736
+ Q as number,
737
+ T as object,
738
+ U as optional,
739
+ W as picklist,
740
+ se as pipe,
741
+ re as pipeAsync,
742
+ X as record,
743
+ te as safeParse,
744
+ ie as safeParseAsync,
745
+ Y as string,
746
+ L as transform,
747
+ N as trim,
748
+ Z as union,
749
+ $ as unknown,
750
+ ee as variant
787
751
  };