@useinsider/guido 1.3.1-beta.cf510dd → 1.3.1
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/README.md +664 -295
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +89 -63
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +13 -13
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +5 -5
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +13 -13
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +15 -18
- package/dist/components/organisms/header/RightSlot.vue.js +10 -10
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +19 -22
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +4 -4
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +8 -8
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +17 -17
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -10
- package/dist/composables/useBlocksConfig.js +20 -23
- package/dist/composables/useConfig.js +5 -51
- package/dist/composables/useHtmlCompiler.js +19 -20
- package/dist/composables/useHtmlValidator.js +41 -41
- package/dist/composables/usePartner.js +9 -19
- package/dist/composables/useStripo.js +11 -11
- package/dist/composables/useTranslations.js +2 -3
- package/dist/config/compiler/unsubscribeCompilerRules.js +1 -1
- package/dist/enums/defaults.js +67 -3
- package/dist/enums/unsubscribe.js +20 -23
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +11 -12
- package/dist/guido.css +1 -1
- package/dist/library.js +2 -12
- package/dist/node_modules/lodash-es/_apply.js +16 -0
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +10 -10
- package/dist/node_modules/lodash-es/_assignMergeValue.js +8 -0
- package/dist/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/lodash-es/_baseCreate.js +17 -0
- package/dist/node_modules/lodash-es/_baseKeysIn.js +15 -0
- package/dist/node_modules/lodash-es/_baseMerge.js +20 -0
- package/dist/node_modules/lodash-es/_baseMergeDeep.js +31 -0
- package/dist/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/lodash-es/_cloneBuffer.js +9 -0
- package/dist/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/lodash-es/_copyArray.js +9 -0
- package/dist/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/lodash-es/_createAssigner.js +15 -0
- package/dist/node_modules/lodash-es/_defineProperty.js +11 -0
- package/dist/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/lodash-es/_nativeKeysIn.js +10 -0
- package/dist/node_modules/lodash-es/_overRest.js +15 -0
- package/dist/node_modules/lodash-es/_safeGet.js +7 -0
- package/dist/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/lodash-es/_shortOut.js +16 -0
- package/dist/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/lodash-es/isPlainObject.js +16 -0
- package/dist/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/lodash-es/merge.js +8 -0
- package/dist/node_modules/lodash-es/toPlainObject.js +8 -0
- package/dist/node_modules/valibot/dist/index.js +103 -476
- package/dist/services/templateLibraryApi.js +18 -18
- package/dist/src/@types/generic.d.ts +45 -4
- package/dist/src/components/Guido.vue.d.ts +12 -13
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +2 -184
- package/dist/src/composables/usePartner.d.ts +0 -8
- package/dist/src/enums/defaults.d.ts +6 -4
- package/dist/src/enums/unsubscribe.d.ts +1 -5
- package/dist/src/library.d.ts +1 -3
- package/dist/src/stores/config.d.ts +102 -1547
- package/dist/stores/config.js +9 -141
- package/package.json +1 -1
- package/dist/@types/config/defaults.js +0 -44
- package/dist/@types/config/schemas.js +0 -229
- package/dist/@types/config/validator.js +0 -56
- package/dist/src/@types/config/defaults.d.ts +0 -68
- package/dist/src/@types/config/index.d.ts +0 -14
- package/dist/src/@types/config/schemas.d.ts +0 -505
- package/dist/src/@types/config/types.d.ts +0 -142
- package/dist/src/@types/config/validator.d.ts +0 -119
|
@@ -1,563 +1,190 @@
|
|
|
1
|
-
var
|
|
1
|
+
var i;
|
|
2
2
|
// @__NO_SIDE_EFFECTS__
|
|
3
|
-
function
|
|
3
|
+
function b(e) {
|
|
4
4
|
return {
|
|
5
|
-
lang: (
|
|
6
|
-
message:
|
|
7
|
-
abortEarly: (
|
|
8
|
-
abortPipeEarly: (
|
|
5
|
+
lang: (e == null ? void 0 : e.lang) ?? (i == null ? void 0 : i.lang),
|
|
6
|
+
message: e == null ? void 0 : e.message,
|
|
7
|
+
abortEarly: (e == null ? void 0 : e.abortEarly) ?? (i == null ? void 0 : i.abortEarly),
|
|
8
|
+
abortPipeEarly: (e == null ? void 0 : e.abortPipeEarly) ?? (i == null ? void 0 : i.abortPipeEarly)
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
var
|
|
11
|
+
var p;
|
|
12
12
|
// @__NO_SIDE_EFFECTS__
|
|
13
|
-
function
|
|
14
|
-
return
|
|
13
|
+
function k(e) {
|
|
14
|
+
return p == null ? void 0 : p.get(e);
|
|
15
15
|
}
|
|
16
|
-
var
|
|
16
|
+
var c;
|
|
17
17
|
// @__NO_SIDE_EFFECTS__
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function E(e) {
|
|
19
|
+
return c == null ? void 0 : c.get(e);
|
|
20
20
|
}
|
|
21
|
-
var
|
|
21
|
+
var m;
|
|
22
22
|
// @__NO_SIDE_EFFECTS__
|
|
23
|
-
function
|
|
24
|
-
var
|
|
25
|
-
return (
|
|
23
|
+
function P(e, n) {
|
|
24
|
+
var r;
|
|
25
|
+
return (r = m == null ? void 0 : m.get(e)) == null ? void 0 : r.get(n);
|
|
26
26
|
}
|
|
27
27
|
// @__NO_SIDE_EFFECTS__
|
|
28
|
-
function $(
|
|
29
|
-
var
|
|
30
|
-
const
|
|
31
|
-
return
|
|
28
|
+
function $(e) {
|
|
29
|
+
var r, s;
|
|
30
|
+
const n = typeof e;
|
|
31
|
+
return n === "string" ? `"${e}"` : n === "number" || n === "bigint" || n === "boolean" ? `${e}` : n === "object" || n === "function" ? (e && ((s = (r = Object.getPrototypeOf(e)) == null ? void 0 : r.constructor) == null ? void 0 : s.name)) ?? "null" : n;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
const
|
|
35
|
-
kind:
|
|
36
|
-
type:
|
|
37
|
-
input:
|
|
38
|
-
expected:
|
|
39
|
-
received:
|
|
40
|
-
message: `Invalid ${
|
|
41
|
-
requirement:
|
|
42
|
-
path:
|
|
43
|
-
issues:
|
|
44
|
-
lang:
|
|
45
|
-
abortEarly:
|
|
46
|
-
abortPipeEarly:
|
|
47
|
-
},
|
|
48
|
-
|
|
33
|
+
function l(e, n, r, s, u) {
|
|
34
|
+
const f = u && "input" in u ? u.input : r.value, y = (u == null ? void 0 : u.expected) ?? e.expects ?? null, v = (u == null ? void 0 : u.received) ?? /* @__PURE__ */ $(f), a = {
|
|
35
|
+
kind: e.kind,
|
|
36
|
+
type: e.type,
|
|
37
|
+
input: f,
|
|
38
|
+
expected: y,
|
|
39
|
+
received: v,
|
|
40
|
+
message: `Invalid ${n}: ${y ? `Expected ${y} but r` : "R"}eceived ${v}`,
|
|
41
|
+
requirement: e.requirement,
|
|
42
|
+
path: u == null ? void 0 : u.path,
|
|
43
|
+
issues: u == null ? void 0 : u.issues,
|
|
44
|
+
lang: s.lang,
|
|
45
|
+
abortEarly: s.abortEarly,
|
|
46
|
+
abortPipeEarly: s.abortPipeEarly
|
|
47
|
+
}, g = e.kind === "schema", t = (u == null ? void 0 : u.message) ?? e.message ?? /* @__PURE__ */ P(e.reference, a.lang) ?? (g ? /* @__PURE__ */ E(a.lang) : null) ?? s.message ?? /* @__PURE__ */ k(a.lang);
|
|
48
|
+
t !== void 0 && (a.message = typeof t == "function" ? (
|
|
49
49
|
// @ts-expect-error
|
|
50
|
-
|
|
51
|
-
) :
|
|
50
|
+
t(a)
|
|
51
|
+
) : t), g && (r.typed = !1), r.issues ? r.issues.push(a) : r.issues = [a];
|
|
52
52
|
}
|
|
53
53
|
// @__NO_SIDE_EFFECTS__
|
|
54
|
-
function
|
|
54
|
+
function d(e) {
|
|
55
55
|
return {
|
|
56
56
|
version: 1,
|
|
57
57
|
vendor: "valibot",
|
|
58
|
-
validate(
|
|
59
|
-
return
|
|
58
|
+
validate(n) {
|
|
59
|
+
return e["~run"]({ value: n }, /* @__PURE__ */ b());
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
// @__NO_SIDE_EFFECTS__
|
|
64
|
-
function
|
|
65
|
-
const e = [...new Set(n)];
|
|
66
|
-
return e.length > 1 ? `(${e.join(` ${r} `)})` : e[0] ?? "never";
|
|
67
|
-
}
|
|
68
|
-
// @__NO_SIDE_EFFECTS__
|
|
69
|
-
function O(n, r) {
|
|
64
|
+
function x(e, n) {
|
|
70
65
|
return {
|
|
71
66
|
kind: "validation",
|
|
72
67
|
type: "check",
|
|
73
|
-
reference:
|
|
68
|
+
reference: x,
|
|
74
69
|
async: !0,
|
|
75
70
|
expects: null,
|
|
76
|
-
requirement:
|
|
77
|
-
message:
|
|
78
|
-
async "~run"(
|
|
79
|
-
return
|
|
71
|
+
requirement: e,
|
|
72
|
+
message: n,
|
|
73
|
+
async "~run"(r, s) {
|
|
74
|
+
return r.typed && !await this.requirement(r.value) && l(this, "input", r, s), r;
|
|
80
75
|
}
|
|
81
76
|
};
|
|
82
77
|
}
|
|
83
78
|
// @__NO_SIDE_EFFECTS__
|
|
84
|
-
function
|
|
79
|
+
function _(e, n) {
|
|
85
80
|
return {
|
|
86
81
|
kind: "validation",
|
|
87
82
|
type: "max_length",
|
|
88
|
-
reference:
|
|
83
|
+
reference: _,
|
|
89
84
|
async: !1,
|
|
90
|
-
expects: `<=${
|
|
91
|
-
requirement:
|
|
92
|
-
message:
|
|
93
|
-
"~run"(
|
|
94
|
-
return
|
|
95
|
-
received: `${
|
|
96
|
-
}),
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
// @__NO_SIDE_EFFECTS__
|
|
101
|
-
function q(n, r) {
|
|
102
|
-
return {
|
|
103
|
-
kind: "validation",
|
|
104
|
-
type: "min_length",
|
|
105
|
-
reference: q,
|
|
106
|
-
async: !1,
|
|
107
|
-
expects: `>=${n}`,
|
|
108
|
-
requirement: n,
|
|
109
|
-
message: r,
|
|
110
|
-
"~run"(e, t) {
|
|
111
|
-
return e.typed && e.value.length < this.requirement && y(this, "length", e, t, {
|
|
112
|
-
received: `${e.value.length}`
|
|
113
|
-
}), e;
|
|
85
|
+
expects: `<=${e}`,
|
|
86
|
+
requirement: e,
|
|
87
|
+
message: n,
|
|
88
|
+
"~run"(r, s) {
|
|
89
|
+
return r.typed && r.value.length > this.requirement && l(this, "length", r, s, {
|
|
90
|
+
received: `${r.value.length}`
|
|
91
|
+
}), r;
|
|
114
92
|
}
|
|
115
93
|
};
|
|
116
94
|
}
|
|
117
95
|
// @__NO_SIDE_EFFECTS__
|
|
118
|
-
function
|
|
96
|
+
function S(e) {
|
|
119
97
|
return {
|
|
120
98
|
kind: "validation",
|
|
121
99
|
type: "non_empty",
|
|
122
|
-
reference:
|
|
100
|
+
reference: S,
|
|
123
101
|
async: !1,
|
|
124
102
|
expects: "!0",
|
|
125
|
-
message:
|
|
126
|
-
"~run"(
|
|
127
|
-
return
|
|
103
|
+
message: e,
|
|
104
|
+
"~run"(n, r) {
|
|
105
|
+
return n.typed && n.value.length === 0 && l(this, "length", n, r, {
|
|
128
106
|
received: "0"
|
|
129
|
-
}),
|
|
107
|
+
}), n;
|
|
130
108
|
}
|
|
131
109
|
};
|
|
132
110
|
}
|
|
133
111
|
// @__NO_SIDE_EFFECTS__
|
|
134
|
-
function
|
|
112
|
+
function o() {
|
|
135
113
|
return {
|
|
136
114
|
kind: "transformation",
|
|
137
115
|
type: "trim",
|
|
138
|
-
reference:
|
|
139
|
-
async: !1,
|
|
140
|
-
"~run"(n) {
|
|
141
|
-
return n.value = n.value.trim(), n;
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
// @__NO_SIDE_EFFECTS__
|
|
146
|
-
function L(n, r, e) {
|
|
147
|
-
return typeof n.fallback == "function" ? (
|
|
148
|
-
// @ts-expect-error
|
|
149
|
-
n.fallback(r, e)
|
|
150
|
-
) : (
|
|
151
|
-
// @ts-expect-error
|
|
152
|
-
n.fallback
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
// @__NO_SIDE_EFFECTS__
|
|
156
|
-
function _(n, r, e) {
|
|
157
|
-
return typeof n.default == "function" ? (
|
|
158
|
-
// @ts-expect-error
|
|
159
|
-
n.default(r, e)
|
|
160
|
-
) : (
|
|
161
|
-
// @ts-expect-error
|
|
162
|
-
n.default
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
// @__NO_SIDE_EFFECTS__
|
|
166
|
-
function N(n, r) {
|
|
167
|
-
return {
|
|
168
|
-
kind: "schema",
|
|
169
|
-
type: "array",
|
|
170
|
-
reference: N,
|
|
171
|
-
expects: "Array",
|
|
172
|
-
async: !1,
|
|
173
|
-
item: n,
|
|
174
|
-
message: r,
|
|
175
|
-
get "~standard"() {
|
|
176
|
-
return /* @__PURE__ */ f(this);
|
|
177
|
-
},
|
|
178
|
-
"~run"(e, t) {
|
|
179
|
-
var a;
|
|
180
|
-
const i = e.value;
|
|
181
|
-
if (Array.isArray(i)) {
|
|
182
|
-
e.typed = !0, e.value = [];
|
|
183
|
-
for (let s = 0; s < i.length; s++) {
|
|
184
|
-
const l = i[s], u = this.item["~run"]({ value: l }, t);
|
|
185
|
-
if (u.issues) {
|
|
186
|
-
const p = {
|
|
187
|
-
type: "array",
|
|
188
|
-
origin: "value",
|
|
189
|
-
input: i,
|
|
190
|
-
key: s,
|
|
191
|
-
value: l
|
|
192
|
-
};
|
|
193
|
-
for (const c of u.issues)
|
|
194
|
-
c.path ? c.path.unshift(p) : c.path = [p], (a = e.issues) == null || a.push(c);
|
|
195
|
-
if (e.issues || (e.issues = u.issues), t.abortEarly) {
|
|
196
|
-
e.typed = !1;
|
|
197
|
-
break;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
u.typed || (e.typed = !1), e.value.push(u.value);
|
|
201
|
-
}
|
|
202
|
-
} else
|
|
203
|
-
y(this, "type", e, t);
|
|
204
|
-
return e;
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
// @__NO_SIDE_EFFECTS__
|
|
209
|
-
function C(n) {
|
|
210
|
-
return {
|
|
211
|
-
kind: "schema",
|
|
212
|
-
type: "boolean",
|
|
213
|
-
reference: C,
|
|
214
|
-
expects: "boolean",
|
|
215
|
-
async: !1,
|
|
216
|
-
message: n,
|
|
217
|
-
get "~standard"() {
|
|
218
|
-
return /* @__PURE__ */ f(this);
|
|
219
|
-
},
|
|
220
|
-
"~run"(r, e) {
|
|
221
|
-
return typeof r.value == "boolean" ? r.typed = !0 : y(this, "type", r, e), r;
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
// @__NO_SIDE_EFFECTS__
|
|
226
|
-
function F(n, r) {
|
|
227
|
-
return {
|
|
228
|
-
kind: "schema",
|
|
229
|
-
type: "custom",
|
|
230
|
-
reference: F,
|
|
231
|
-
expects: "unknown",
|
|
232
|
-
async: !1,
|
|
233
|
-
check: n,
|
|
234
|
-
message: r,
|
|
235
|
-
get "~standard"() {
|
|
236
|
-
return /* @__PURE__ */ f(this);
|
|
237
|
-
},
|
|
238
|
-
"~run"(e, t) {
|
|
239
|
-
return this.check(e.value) ? e.typed = !0 : y(this, "type", e, t), e;
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
// @__NO_SIDE_EFFECTS__
|
|
244
|
-
function K(n, r) {
|
|
245
|
-
return {
|
|
246
|
-
kind: "schema",
|
|
247
|
-
type: "literal",
|
|
248
|
-
reference: K,
|
|
249
|
-
expects: /* @__PURE__ */ $(n),
|
|
250
|
-
async: !1,
|
|
251
|
-
literal: n,
|
|
252
|
-
message: r,
|
|
253
|
-
get "~standard"() {
|
|
254
|
-
return /* @__PURE__ */ f(this);
|
|
255
|
-
},
|
|
256
|
-
"~run"(e, t) {
|
|
257
|
-
return e.value === this.literal ? e.typed = !0 : y(this, "type", e, t), e;
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
// @__NO_SIDE_EFFECTS__
|
|
262
|
-
function R(n) {
|
|
263
|
-
return {
|
|
264
|
-
kind: "schema",
|
|
265
|
-
type: "number",
|
|
266
|
-
reference: R,
|
|
267
|
-
expects: "number",
|
|
116
|
+
reference: o,
|
|
268
117
|
async: !1,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
return /* @__PURE__ */ f(this);
|
|
272
|
-
},
|
|
273
|
-
"~run"(r, e) {
|
|
274
|
-
return typeof r.value == "number" && !isNaN(r.value) ? r.typed = !0 : y(this, "type", r, e), r;
|
|
118
|
+
"~run"(e) {
|
|
119
|
+
return e.value = e.value.trim(), e;
|
|
275
120
|
}
|
|
276
121
|
};
|
|
277
122
|
}
|
|
278
123
|
// @__NO_SIDE_EFFECTS__
|
|
279
|
-
function
|
|
280
|
-
return {
|
|
281
|
-
kind: "schema",
|
|
282
|
-
type: "object",
|
|
283
|
-
reference: V,
|
|
284
|
-
expects: "Object",
|
|
285
|
-
async: !1,
|
|
286
|
-
entries: n,
|
|
287
|
-
message: r,
|
|
288
|
-
get "~standard"() {
|
|
289
|
-
return /* @__PURE__ */ f(this);
|
|
290
|
-
},
|
|
291
|
-
"~run"(e, t) {
|
|
292
|
-
var a;
|
|
293
|
-
const i = e.value;
|
|
294
|
-
if (i && typeof i == "object") {
|
|
295
|
-
e.typed = !0, e.value = {};
|
|
296
|
-
for (const s in this.entries) {
|
|
297
|
-
const l = this.entries[s];
|
|
298
|
-
if (s in i || (l.type === "exact_optional" || l.type === "optional" || l.type === "nullish") && // @ts-expect-error
|
|
299
|
-
l.default !== void 0) {
|
|
300
|
-
const u = s in i ? (
|
|
301
|
-
// @ts-expect-error
|
|
302
|
-
i[s]
|
|
303
|
-
) : /* @__PURE__ */ _(l), p = l["~run"]({ value: u }, t);
|
|
304
|
-
if (p.issues) {
|
|
305
|
-
const c = {
|
|
306
|
-
type: "object",
|
|
307
|
-
origin: "value",
|
|
308
|
-
input: i,
|
|
309
|
-
key: s,
|
|
310
|
-
value: u
|
|
311
|
-
};
|
|
312
|
-
for (const m of p.issues)
|
|
313
|
-
m.path ? m.path.unshift(c) : m.path = [c], (a = e.issues) == null || a.push(m);
|
|
314
|
-
if (e.issues || (e.issues = p.issues), t.abortEarly) {
|
|
315
|
-
e.typed = !1;
|
|
316
|
-
break;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
p.typed || (e.typed = !1), e.value[s] = p.value;
|
|
320
|
-
} else if (l.fallback !== void 0)
|
|
321
|
-
e.value[s] = /* @__PURE__ */ L(l);
|
|
322
|
-
else if (l.type !== "exact_optional" && l.type !== "optional" && l.type !== "nullish" && (y(this, "key", e, t, {
|
|
323
|
-
input: void 0,
|
|
324
|
-
expected: `"${s}"`,
|
|
325
|
-
path: [
|
|
326
|
-
{
|
|
327
|
-
type: "object",
|
|
328
|
-
origin: "key",
|
|
329
|
-
input: i,
|
|
330
|
-
key: s,
|
|
331
|
-
// @ts-expect-error
|
|
332
|
-
value: i[s]
|
|
333
|
-
}
|
|
334
|
-
]
|
|
335
|
-
}), t.abortEarly))
|
|
336
|
-
break;
|
|
337
|
-
}
|
|
338
|
-
} else
|
|
339
|
-
y(this, "type", e, t);
|
|
340
|
-
return e;
|
|
341
|
-
}
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
// @__NO_SIDE_EFFECTS__
|
|
345
|
-
function z(n, r) {
|
|
346
|
-
return {
|
|
347
|
-
kind: "schema",
|
|
348
|
-
type: "optional",
|
|
349
|
-
reference: z,
|
|
350
|
-
expects: `(${n.expects} | undefined)`,
|
|
351
|
-
async: !1,
|
|
352
|
-
wrapped: n,
|
|
353
|
-
default: r,
|
|
354
|
-
get "~standard"() {
|
|
355
|
-
return /* @__PURE__ */ f(this);
|
|
356
|
-
},
|
|
357
|
-
"~run"(e, t) {
|
|
358
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ _(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
359
|
-
}
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
// @__NO_SIDE_EFFECTS__
|
|
363
|
-
function B(n, r) {
|
|
364
|
-
return {
|
|
365
|
-
kind: "schema",
|
|
366
|
-
type: "picklist",
|
|
367
|
-
reference: B,
|
|
368
|
-
expects: /* @__PURE__ */ S(n.map($), "|"),
|
|
369
|
-
async: !1,
|
|
370
|
-
options: n,
|
|
371
|
-
message: r,
|
|
372
|
-
get "~standard"() {
|
|
373
|
-
return /* @__PURE__ */ f(this);
|
|
374
|
-
},
|
|
375
|
-
"~run"(e, t) {
|
|
376
|
-
return this.options.includes(e.value) ? e.typed = !0 : y(this, "type", e, t), e;
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
// @__NO_SIDE_EFFECTS__
|
|
381
|
-
function H(n) {
|
|
124
|
+
function q(e) {
|
|
382
125
|
return {
|
|
383
126
|
kind: "schema",
|
|
384
127
|
type: "string",
|
|
385
|
-
reference:
|
|
128
|
+
reference: q,
|
|
386
129
|
expects: "string",
|
|
387
130
|
async: !1,
|
|
388
|
-
message: n,
|
|
389
|
-
get "~standard"() {
|
|
390
|
-
return /* @__PURE__ */ f(this);
|
|
391
|
-
},
|
|
392
|
-
"~run"(r, e) {
|
|
393
|
-
return typeof r.value == "string" ? r.typed = !0 : y(this, "type", r, e), r;
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
// @__NO_SIDE_EFFECTS__
|
|
398
|
-
function J(n, r, e) {
|
|
399
|
-
return {
|
|
400
|
-
kind: "schema",
|
|
401
|
-
type: "variant",
|
|
402
|
-
reference: J,
|
|
403
|
-
expects: "Object",
|
|
404
|
-
async: !1,
|
|
405
|
-
key: n,
|
|
406
|
-
options: r,
|
|
407
131
|
message: e,
|
|
408
132
|
get "~standard"() {
|
|
409
|
-
return /* @__PURE__ */
|
|
410
|
-
},
|
|
411
|
-
"~run"(t, i) {
|
|
412
|
-
const a = t.value;
|
|
413
|
-
if (a && typeof a == "object") {
|
|
414
|
-
let s, l = 0, u = this.key, p = [];
|
|
415
|
-
const c = (m, j) => {
|
|
416
|
-
for (const h of m.options) {
|
|
417
|
-
if (h.type === "variant")
|
|
418
|
-
c(h, new Set(j).add(h.key));
|
|
419
|
-
else {
|
|
420
|
-
let P = !0, b = 0;
|
|
421
|
-
for (const o of j) {
|
|
422
|
-
const k = h.entries[o];
|
|
423
|
-
if (o in a ? k["~run"](
|
|
424
|
-
// @ts-expect-error
|
|
425
|
-
{ typed: !1, value: a[o] },
|
|
426
|
-
{ abortEarly: !0 }
|
|
427
|
-
).issues : k.type !== "exact_optional" && k.type !== "optional" && k.type !== "nullish") {
|
|
428
|
-
P = !1, u !== o && (l < b || l === b && o in a && !(u in a)) && (l = b, u = o, p = []), u === o && p.push(
|
|
429
|
-
h.entries[o].expects
|
|
430
|
-
);
|
|
431
|
-
break;
|
|
432
|
-
}
|
|
433
|
-
b++;
|
|
434
|
-
}
|
|
435
|
-
if (P) {
|
|
436
|
-
const o = h["~run"]({ value: a }, i);
|
|
437
|
-
(!s || !s.typed && o.typed) && (s = o);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
if (s && !s.issues)
|
|
441
|
-
break;
|
|
442
|
-
}
|
|
443
|
-
};
|
|
444
|
-
if (c(this, /* @__PURE__ */ new Set([this.key])), s)
|
|
445
|
-
return s;
|
|
446
|
-
y(this, "type", t, i, {
|
|
447
|
-
// @ts-expect-error
|
|
448
|
-
input: a[u],
|
|
449
|
-
expected: /* @__PURE__ */ S(p, "|"),
|
|
450
|
-
path: [
|
|
451
|
-
{
|
|
452
|
-
type: "object",
|
|
453
|
-
origin: "value",
|
|
454
|
-
input: a,
|
|
455
|
-
key: u,
|
|
456
|
-
// @ts-expect-error
|
|
457
|
-
value: a[u]
|
|
458
|
-
}
|
|
459
|
-
]
|
|
460
|
-
});
|
|
461
|
-
} else
|
|
462
|
-
y(this, "type", t, i);
|
|
463
|
-
return t;
|
|
464
|
-
}
|
|
465
|
-
};
|
|
466
|
-
}
|
|
467
|
-
// @__NO_SIDE_EFFECTS__
|
|
468
|
-
function Q(...n) {
|
|
469
|
-
return {
|
|
470
|
-
...n[0],
|
|
471
|
-
pipe: n,
|
|
472
|
-
get "~standard"() {
|
|
473
|
-
return /* @__PURE__ */ f(this);
|
|
133
|
+
return /* @__PURE__ */ d(this);
|
|
474
134
|
},
|
|
475
|
-
"~run"(
|
|
476
|
-
|
|
477
|
-
if (t.kind !== "metadata") {
|
|
478
|
-
if (r.issues && (t.kind === "schema" || t.kind === "transformation")) {
|
|
479
|
-
r.typed = !1;
|
|
480
|
-
break;
|
|
481
|
-
}
|
|
482
|
-
(!r.issues || !e.abortEarly && !e.abortPipeEarly) && (r = t["~run"](r, e));
|
|
483
|
-
}
|
|
484
|
-
return r;
|
|
135
|
+
"~run"(n, r) {
|
|
136
|
+
return typeof n.value == "string" ? n.typed = !0 : l(this, "type", n, r), n;
|
|
485
137
|
}
|
|
486
138
|
};
|
|
487
139
|
}
|
|
488
140
|
// @__NO_SIDE_EFFECTS__
|
|
489
|
-
function
|
|
141
|
+
function w(...e) {
|
|
490
142
|
return {
|
|
491
|
-
...
|
|
492
|
-
pipe:
|
|
143
|
+
...e[0],
|
|
144
|
+
pipe: e,
|
|
493
145
|
async: !0,
|
|
494
146
|
get "~standard"() {
|
|
495
|
-
return /* @__PURE__ */
|
|
147
|
+
return /* @__PURE__ */ d(this);
|
|
496
148
|
},
|
|
497
|
-
async "~run"(
|
|
498
|
-
for (const
|
|
499
|
-
if (
|
|
500
|
-
if (
|
|
501
|
-
|
|
149
|
+
async "~run"(n, r) {
|
|
150
|
+
for (const s of e)
|
|
151
|
+
if (s.kind !== "metadata") {
|
|
152
|
+
if (n.issues && (s.kind === "schema" || s.kind === "transformation")) {
|
|
153
|
+
n.typed = !1;
|
|
502
154
|
break;
|
|
503
155
|
}
|
|
504
|
-
(!
|
|
156
|
+
(!n.issues || !r.abortEarly && !r.abortPipeEarly) && (n = await s["~run"](n, r));
|
|
505
157
|
}
|
|
506
|
-
return
|
|
158
|
+
return n;
|
|
507
159
|
}
|
|
508
160
|
};
|
|
509
161
|
}
|
|
510
162
|
// @__NO_SIDE_EFFECTS__
|
|
511
|
-
function
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
success: !t.issues,
|
|
516
|
-
output: t.value,
|
|
517
|
-
issues: t.issues
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
// @__NO_SIDE_EFFECTS__
|
|
521
|
-
async function W(n, r, e) {
|
|
522
|
-
const t = await n["~run"](
|
|
523
|
-
{ value: r },
|
|
524
|
-
/* @__PURE__ */ E(e)
|
|
163
|
+
async function A(e, n, r) {
|
|
164
|
+
const s = await e["~run"](
|
|
165
|
+
{ value: n },
|
|
166
|
+
/* @__PURE__ */ b(r)
|
|
525
167
|
);
|
|
526
168
|
return {
|
|
527
|
-
typed:
|
|
528
|
-
success: !
|
|
529
|
-
output:
|
|
530
|
-
issues:
|
|
169
|
+
typed: s.typed,
|
|
170
|
+
success: !s.issues,
|
|
171
|
+
output: s.value,
|
|
172
|
+
issues: s.issues
|
|
531
173
|
};
|
|
532
174
|
}
|
|
533
175
|
export {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
S as _joinExpects,
|
|
176
|
+
l as _addIssue,
|
|
177
|
+
d as _getStandardProps,
|
|
537
178
|
$ as _stringify,
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
I as maxLength,
|
|
550
|
-
q as minLength,
|
|
551
|
-
M as nonEmpty,
|
|
552
|
-
R as number,
|
|
553
|
-
V as object,
|
|
554
|
-
z as optional,
|
|
555
|
-
B as picklist,
|
|
556
|
-
Q as pipe,
|
|
557
|
-
T as pipeAsync,
|
|
558
|
-
U as safeParse,
|
|
559
|
-
W as safeParseAsync,
|
|
560
|
-
H as string,
|
|
561
|
-
G as trim,
|
|
562
|
-
J as variant
|
|
179
|
+
x as checkAsync,
|
|
180
|
+
b as getGlobalConfig,
|
|
181
|
+
k as getGlobalMessage,
|
|
182
|
+
E as getSchemaMessage,
|
|
183
|
+
P as getSpecificMessage,
|
|
184
|
+
_ as maxLength,
|
|
185
|
+
S as nonEmpty,
|
|
186
|
+
w as pipeAsync,
|
|
187
|
+
A as safeParseAsync,
|
|
188
|
+
q as string,
|
|
189
|
+
o as trim
|
|
563
190
|
};
|