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