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