@feedmepos/mf-connect 0.1.38-beta.21 → 0.1.38-beta.23
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/{Analytic-CEd_WApy.js → Analytic-xMxbAEul.js} +13 -13
- package/dist/{App-ulCtuU5o.js → App-DkBJoQa2.js} +303 -307
- package/dist/{AuditLogs-BM1Np61K.js → AuditLogs-CkpffM8N.js} +9 -9
- package/dist/{Bin-icbjnKXw.js → Bin-D3JHC66F.js} +8 -8
- package/dist/{Broadcast-COQ3E8vI.js → Broadcast-eCxNA0EG.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BbXEYOFK.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BMrLc0hX.js} +6 -6
- package/dist/{Card-Cwh3GXi0.js → Card-CaOvpWvL.js} +16 -16
- package/dist/{Collections-EuOjzpkL.js → Collections-CxScAHZl.js} +6 -6
- package/dist/{Credit-BY2Fpdhh.js → Credit-BnPpMq8q.js} +9 -9
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BEnaGmCW.js +3109 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BLw3-hI1.js → EffectSheet.vue_vue_type_style_index_0_lang-DJhtUAk_.js} +6 -6
- package/dist/{Experience-rAH7zk71.js → Experience-nMxubr1P.js} +9 -9
- package/dist/{Game-DlI0yNF0.js → Game-C8pHAp1o.js} +10 -10
- package/dist/Grab-DjTma0rb.js +282 -0
- package/dist/{Index-DemXFS3d.js → Index-COHMtBIi.js} +10 -10
- package/dist/{Marketing-shNBO9Rc.js → Marketing-C3R9Rw4y.js} +7112 -5424
- package/dist/{Member-C19ZgpaL.js → Member-gjwH9kPr.js} +10 -10
- package/dist/{MemberList-B2tNB4yg.js → MemberList-Bg_zsGbz.js} +25 -25
- package/dist/{MemberTransactions-BN3qaTVY.js → MemberTransactions-7aZsIeZL.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BY3j1h72.js → MessageInput.vue_vue_type_script_setup_true_lang-DtPV3l4w.js} +2285 -2219
- package/dist/{Mission-j1KI0-hJ.js → Mission-DqAahrB0.js} +10 -10
- package/dist/{Overview-BN2Vdu8Q.js → Overview-_b_4mLBe.js} +18 -18
- package/dist/{Point-8zy7QcTk.js → Point-CsMZA2do.js} +9 -9
- package/dist/{Promotion-mcUcylXB.js → Promotion-j4_gUzqi.js} +10 -10
- package/dist/{Queue-BsNv4P8u.js → Queue-MOdvEl5u.js} +10 -10
- package/dist/{Record-VA6Bdlnz.js → Record-BQIQBdc6.js} +8 -8
- package/dist/{Reward-CVyO3Ga1.js → Reward-DABAfCmo.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BR9_a9bJ.js → RewardGroup.vue_vue_type_script_setup_true_lang-D-BK8GZ4.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Dhs2whAH.js → RuleGroup.vue_vue_type_script_setup_true_lang-ClwtUvs9.js} +13 -13
- package/dist/{Segment-BMgcdIIS.js → Segment-DSpcce-q.js} +22 -22
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CKRpWcn_.js → SelectItems.vue_vue_type_script_setup_true_lang-CZu-7I-8.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DZCNcdVW.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D5Oc0pqy.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BESF672g.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-7NWmWQjo.js} +3 -3
- package/dist/{Setting-BMKKkZTD.js → Setting-DTFpHJd7.js} +11 -11
- package/dist/{Store-DdxMDtfL.js → Store-mAraPykq.js} +19 -19
- package/dist/{StoreRewards-CRyeHEMF.js → StoreRewards-C1Cw1Nij.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS6-9WP9.js → StoreTransactions.vue_vue_type_script_setup_true_lang-C_igl8vi.js} +20 -20
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BTKpclKX.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D3c0qO9i.js} +1 -1
- package/dist/{Tier-D5Xmp5vV.js → Tier-B7AUECOs.js} +20 -20
- package/dist/{Title-CsK2crqD.js → Title-DWw4-4cE.js} +19 -19
- package/dist/{Transaction-Dvfc9x4f.js → Transaction-ClZvbeDP.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CqCxWltm.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cen_yXF7.js} +6 -6
- package/dist/{Voucher-CPN7TMho.js → Voucher-BBYDF1GX.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DMye9MS3.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Vscwqd3r.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CnaQAEKo.js → ZodTextField.vue_vue_type_script_setup_true_lang-C2yUE0Cq.js} +1 -1
- package/dist/{app-DRBevJsF.js → app-9boJd9tw.js} +1 -1
- package/dist/{app-DteFjR9L.js → app-DLdolyB3.js} +740 -676
- package/dist/app.js +1 -1
- package/dist/{business-BqV9jK-p.js → business-D900a5Tb.js} +1 -1
- package/dist/{campaign-CsWoG6e_.js → campaign-DXo7F7aH.js} +29 -25
- package/dist/{campaign-BHDq-yx-.js → campaign-D_F3xj3O.js} +27 -14
- package/dist/{campaign.enum-Dfa96W5V.js → campaign.enum-CG0IjpL0.js} +3 -2
- package/dist/{campaign.fn-pLrwyHA_.js → campaign.fn-B6f4zAed.js} +37 -37
- package/dist/{collectible.enum-BYTYWPsR.js → collectible.enum-0jg7mZtz.js} +1 -1
- package/dist/{collection.fn-CYLIQJig.js → collection.fn-BDcZoQfR.js} +2 -2
- package/dist/{dto-DBfDbpyb.js → dto-Diu2Xl3e.js} +51 -39
- package/dist/{effect-D9pD5RCk.js → effect-DvIk5Cg6.js} +1 -1
- package/dist/{email-addresses-BApvdLkQ.js → email-addresses-DQf3ZdZP.js} +1 -1
- package/dist/{export--EfmCiw0.js → export-WSVAzeqR.js} +3 -3
- package/dist/{helper-BHiK3pLT.js → helper-CzsKE573.js} +1 -1
- package/dist/{index-CD2bkLo_.js → index-1-H1oqKb.js} +1 -1
- package/dist/{index-B9_Tn8si.js → index-B6Kbxgky.js} +1 -1
- package/dist/{index-DXM3o6kl.js → index-B6KkRHaV.js} +1 -1
- package/dist/{index-DYgdunxw.js → index-Bej-AJUB.js} +3 -3
- package/dist/{index-C1Vrltkc.js → index-CErvxcDp.js} +1 -1
- package/dist/{index-Bqc7PV3K.js → index-D-VZHYyP.js} +1 -1
- package/dist/{index-CVxruvVB.js → index-D1fzmeG6.js} +3 -3
- package/dist/{index-Pd9RCQxn.js → index-D3wppWii.js} +1 -1
- package/dist/{index-COiVJ9pA.js → index-DMg2pJLu.js} +1 -1
- package/dist/{index-qd_dvZcw.js → index-DPyNXHg6.js} +16 -16
- package/dist/{index-Cc80pBYX.js → index-DWN3abQr.js} +573 -573
- package/dist/{index-CDLBLuYq.js → index-DlwPVNEv.js} +845 -708
- package/dist/{index-2dknXEFJ.js → index-__X1c_dR.js} +184 -15
- package/dist/{index-BSQXDDQY.js → index-uJ-YdKV1.js} +3 -3
- package/dist/{index.esm2017-DAWS_ALH.js → index.esm2017-shNT9EQF.js} +1 -1
- package/dist/{loading-BVUeda4s.js → loading-CBKMbqM5.js} +1 -1
- package/dist/{membership-BL_43RJR.js → membership-DQa8yaY2.js} +3 -3
- package/dist/{money-Cd8hLiNc.js → money-IYgOL6F1.js} +1 -1
- package/dist/{number-DVb8PSrj.js → number-DXdhRp2S.js} +1 -1
- package/dist/{objectid-D33s3gxp.js → objectid-DABStWGB.js} +5 -5
- package/dist/{plugins-BKtBkC9Q.js → plugins-DXwZ_v63.js} +2 -2
- package/dist/{reward-f41dJcaL.js → reward-DYiYZcJC.js} +1 -1
- package/dist/{rule-Cbux1-fC.js → rule-Beum_Zy5.js} +3 -3
- package/dist/{rule-builder-BrZeF45Z.js → rule-builder-BLNgIsjE.js} +12 -10
- package/dist/style.css +1 -1
- package/dist/{template-tqhgmIdT.js → template-C5PTDFfm.js} +4 -4
- package/dist/{timezone-DaTVH4y0.js → timezone-PLVeOMdC.js} +1 -1
- package/dist/{trigger-C34RfwrT.js → trigger-B0u2ZuY-.js} +4 -4
- package/dist/{user-DgKhDLYr.js → user-BlM3HCwC.js} +1 -1
- package/dist/{vue-i18n-xo56wiwi.js → vue-i18n-CwrnHMwQ.js} +246 -246
- package/dist/{xlsx-D8ZZRjtf.js → xlsx-BAbyCaI0.js} +1 -1
- package/package.json +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BbsLgUMQ.js +0 -2188
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineAsyncComponent as T } from "vue";
|
|
2
2
|
import { withPermission as C, Permission as b } from "@feedmepos/mf-common";
|
|
3
|
-
const
|
|
3
|
+
const Ne = {
|
|
4
4
|
common: {
|
|
5
5
|
submit: "Submit",
|
|
6
6
|
confirm: "Confirm",
|
|
@@ -80,7 +80,18 @@ const Pe = {
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
mission_configuration: "Mission configuration",
|
|
83
|
-
reward_setup: "Reward setup"
|
|
83
|
+
reward_setup: "Reward setup",
|
|
84
|
+
grab_quota: "Quotas",
|
|
85
|
+
grab_condition: "Conditions",
|
|
86
|
+
totalCount: "Max distribute",
|
|
87
|
+
totalCountPerUser: "Max per user",
|
|
88
|
+
minBasketAmount: "Min spend",
|
|
89
|
+
bundleQuantity: "Bundle quantity",
|
|
90
|
+
operationHours: "Active Period",
|
|
91
|
+
eaterType: "Eater type",
|
|
92
|
+
allEaters: "All eaters",
|
|
93
|
+
newEatersOnly: "New eaters",
|
|
94
|
+
existingEatersOnly: "Existing eaters"
|
|
84
95
|
},
|
|
85
96
|
campaign: {
|
|
86
97
|
common: {
|
|
@@ -176,6 +187,20 @@ const Pe = {
|
|
|
176
187
|
success: "Promotion {action} successfully"
|
|
177
188
|
}
|
|
178
189
|
},
|
|
190
|
+
grab: {
|
|
191
|
+
title: "Grab Campaign",
|
|
192
|
+
typeLabel: "{type} grab campaign",
|
|
193
|
+
create: {
|
|
194
|
+
title: "Create grab campaign",
|
|
195
|
+
description: "Special offers or deals made available for a limited time to encourage user engagement and purchases.",
|
|
196
|
+
button: "Create grab campaign"
|
|
197
|
+
},
|
|
198
|
+
update: {
|
|
199
|
+
creating: "Creating grab campaign",
|
|
200
|
+
updating: "Updating grab campaign",
|
|
201
|
+
success: "Grab campaign {action} successfully"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
179
204
|
voucher: {
|
|
180
205
|
title: "Voucher",
|
|
181
206
|
claimed: "{count} claimed",
|
|
@@ -224,6 +249,26 @@ const Pe = {
|
|
|
224
249
|
createPromotionCampaign: "Create promotion campaign",
|
|
225
250
|
description: "Special offers or deals made available for a limited time to encourage user engagement and purchases. Promotions are generally available to all eligible users without the need for a specific code and are applied by merchant during the promotional period."
|
|
226
251
|
},
|
|
252
|
+
grab: {
|
|
253
|
+
createCampaign: "Create campaign",
|
|
254
|
+
promotionTitle: "Grab campaign title",
|
|
255
|
+
status: "Status",
|
|
256
|
+
type: "Type",
|
|
257
|
+
summary: "Summary",
|
|
258
|
+
actions: "Actions",
|
|
259
|
+
confirmRemove: "Are you sure you want to remove {name}?",
|
|
260
|
+
removing: "Removing {name}",
|
|
261
|
+
removedSuccessfully: "Removed {name} successfully",
|
|
262
|
+
updating: "Updating grab campaign",
|
|
263
|
+
creating: "Creating grab campaign",
|
|
264
|
+
updatedSuccessfully: "Promotion updated successfully",
|
|
265
|
+
createdSuccessfully: "Promotion created successfully",
|
|
266
|
+
title: "Grab Campaign",
|
|
267
|
+
search: "search",
|
|
268
|
+
location: "Location: ",
|
|
269
|
+
createPromotionCampaign: "Create grab campaign",
|
|
270
|
+
description: "Special offers or deals made available for a limited time to encourage user engagement and purchases."
|
|
271
|
+
},
|
|
227
272
|
voucher: {
|
|
228
273
|
createCampaign: "Create campaign",
|
|
229
274
|
voucherTitle: "Voucher title",
|
|
@@ -272,7 +317,8 @@ const Pe = {
|
|
|
272
317
|
referral: "Referral",
|
|
273
318
|
queue: "Queue",
|
|
274
319
|
auditLogs: "Audit Logs",
|
|
275
|
-
bin: "Bin"
|
|
320
|
+
bin: "Bin",
|
|
321
|
+
grab: "Grab Campaign"
|
|
276
322
|
},
|
|
277
323
|
bin: {
|
|
278
324
|
title: "Bin",
|
|
@@ -1043,7 +1089,7 @@ const Pe = {
|
|
|
1043
1089
|
effect_required: "Effect is required"
|
|
1044
1090
|
}
|
|
1045
1091
|
}, De = {
|
|
1046
|
-
connect:
|
|
1092
|
+
connect: Ne,
|
|
1047
1093
|
connectZod: Le,
|
|
1048
1094
|
connectZodCustom: je
|
|
1049
1095
|
}, Be = {
|
|
@@ -3839,44 +3885,44 @@ const Pe = {
|
|
|
3839
3885
|
connectZodCustom: We
|
|
3840
3886
|
};
|
|
3841
3887
|
var x;
|
|
3842
|
-
(function(
|
|
3843
|
-
|
|
3844
|
-
function e(
|
|
3888
|
+
(function(a) {
|
|
3889
|
+
a.assertEqual = (i) => i;
|
|
3890
|
+
function e(i) {
|
|
3845
3891
|
}
|
|
3846
|
-
|
|
3847
|
-
function t(
|
|
3892
|
+
a.assertIs = e;
|
|
3893
|
+
function t(i) {
|
|
3848
3894
|
throw new Error();
|
|
3849
3895
|
}
|
|
3850
|
-
|
|
3896
|
+
a.assertNever = t, a.arrayToEnum = (i) => {
|
|
3851
3897
|
const r = {};
|
|
3852
|
-
for (const s of
|
|
3898
|
+
for (const s of i)
|
|
3853
3899
|
r[s] = s;
|
|
3854
3900
|
return r;
|
|
3855
|
-
},
|
|
3856
|
-
const r =
|
|
3901
|
+
}, a.getValidEnumValues = (i) => {
|
|
3902
|
+
const r = a.objectKeys(i).filter((o) => typeof i[i[o]] != "number"), s = {};
|
|
3857
3903
|
for (const o of r)
|
|
3858
|
-
s[o] =
|
|
3859
|
-
return
|
|
3860
|
-
},
|
|
3861
|
-
return
|
|
3862
|
-
}),
|
|
3904
|
+
s[o] = i[o];
|
|
3905
|
+
return a.objectValues(s);
|
|
3906
|
+
}, a.objectValues = (i) => a.objectKeys(i).map(function(r) {
|
|
3907
|
+
return i[r];
|
|
3908
|
+
}), a.objectKeys = typeof Object.keys == "function" ? (i) => Object.keys(i) : (i) => {
|
|
3863
3909
|
const r = [];
|
|
3864
|
-
for (const s in
|
|
3865
|
-
Object.prototype.hasOwnProperty.call(
|
|
3910
|
+
for (const s in i)
|
|
3911
|
+
Object.prototype.hasOwnProperty.call(i, s) && r.push(s);
|
|
3866
3912
|
return r;
|
|
3867
|
-
},
|
|
3868
|
-
for (const s of
|
|
3913
|
+
}, a.find = (i, r) => {
|
|
3914
|
+
for (const s of i)
|
|
3869
3915
|
if (r(s))
|
|
3870
3916
|
return s;
|
|
3871
|
-
},
|
|
3872
|
-
function i
|
|
3873
|
-
return
|
|
3917
|
+
}, a.isInteger = typeof Number.isInteger == "function" ? (i) => Number.isInteger(i) : (i) => typeof i == "number" && isFinite(i) && Math.floor(i) === i;
|
|
3918
|
+
function n(i, r = " | ") {
|
|
3919
|
+
return i.map((s) => typeof s == "string" ? `'${s}'` : s).join(r);
|
|
3874
3920
|
}
|
|
3875
|
-
|
|
3921
|
+
a.joinValues = n, a.jsonStringifyReplacer = (i, r) => typeof r == "bigint" ? r.toString() : r;
|
|
3876
3922
|
})(x || (x = {}));
|
|
3877
3923
|
var be;
|
|
3878
|
-
(function(
|
|
3879
|
-
|
|
3924
|
+
(function(a) {
|
|
3925
|
+
a.mergeShapes = (e, t) => ({
|
|
3880
3926
|
...e,
|
|
3881
3927
|
...t
|
|
3882
3928
|
// second overwrites first
|
|
@@ -3903,14 +3949,14 @@ const l = x.arrayToEnum([
|
|
|
3903
3949
|
"never",
|
|
3904
3950
|
"map",
|
|
3905
3951
|
"set"
|
|
3906
|
-
]), j = (
|
|
3907
|
-
switch (typeof
|
|
3952
|
+
]), j = (a) => {
|
|
3953
|
+
switch (typeof a) {
|
|
3908
3954
|
case "undefined":
|
|
3909
3955
|
return l.undefined;
|
|
3910
3956
|
case "string":
|
|
3911
3957
|
return l.string;
|
|
3912
3958
|
case "number":
|
|
3913
|
-
return isNaN(
|
|
3959
|
+
return isNaN(a) ? l.nan : l.number;
|
|
3914
3960
|
case "boolean":
|
|
3915
3961
|
return l.boolean;
|
|
3916
3962
|
case "function":
|
|
@@ -3920,7 +3966,7 @@ const l = x.arrayToEnum([
|
|
|
3920
3966
|
case "symbol":
|
|
3921
3967
|
return l.symbol;
|
|
3922
3968
|
case "object":
|
|
3923
|
-
return Array.isArray(
|
|
3969
|
+
return Array.isArray(a) ? l.array : a === null ? l.null : a.then && typeof a.then == "function" && a.catch && typeof a.catch == "function" ? l.promise : typeof Map < "u" && a instanceof Map ? l.map : typeof Set < "u" && a instanceof Set ? l.set : typeof Date < "u" && a instanceof Date ? l.date : l.object;
|
|
3924
3970
|
default:
|
|
3925
3971
|
return l.unknown;
|
|
3926
3972
|
}
|
|
@@ -3941,13 +3987,13 @@ const l = x.arrayToEnum([
|
|
|
3941
3987
|
"invalid_intersection_types",
|
|
3942
3988
|
"not_multiple_of",
|
|
3943
3989
|
"not_finite"
|
|
3944
|
-
]), Fe = (
|
|
3990
|
+
]), Fe = (a) => JSON.stringify(a, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
3945
3991
|
class E extends Error {
|
|
3946
3992
|
constructor(e) {
|
|
3947
|
-
super(), this.issues = [], this.addIssue = (
|
|
3948
|
-
this.issues = [...this.issues,
|
|
3949
|
-
}, this.addIssues = (
|
|
3950
|
-
this.issues = [...this.issues, ...
|
|
3993
|
+
super(), this.issues = [], this.addIssue = (n) => {
|
|
3994
|
+
this.issues = [...this.issues, n];
|
|
3995
|
+
}, this.addIssues = (n = []) => {
|
|
3996
|
+
this.issues = [...this.issues, ...n];
|
|
3951
3997
|
};
|
|
3952
3998
|
const t = new.target.prototype;
|
|
3953
3999
|
Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e;
|
|
@@ -3958,25 +4004,25 @@ class E extends Error {
|
|
|
3958
4004
|
format(e) {
|
|
3959
4005
|
const t = e || function(r) {
|
|
3960
4006
|
return r.message;
|
|
3961
|
-
},
|
|
4007
|
+
}, n = { _errors: [] }, i = (r) => {
|
|
3962
4008
|
for (const s of r.issues)
|
|
3963
4009
|
if (s.code === "invalid_union")
|
|
3964
|
-
s.unionErrors.map(
|
|
4010
|
+
s.unionErrors.map(i);
|
|
3965
4011
|
else if (s.code === "invalid_return_type")
|
|
3966
|
-
|
|
4012
|
+
i(s.returnTypeError);
|
|
3967
4013
|
else if (s.code === "invalid_arguments")
|
|
3968
|
-
|
|
4014
|
+
i(s.argumentsError);
|
|
3969
4015
|
else if (s.path.length === 0)
|
|
3970
|
-
|
|
4016
|
+
n._errors.push(t(s));
|
|
3971
4017
|
else {
|
|
3972
|
-
let o =
|
|
4018
|
+
let o = n, m = 0;
|
|
3973
4019
|
for (; m < s.path.length; ) {
|
|
3974
4020
|
const d = s.path[m];
|
|
3975
4021
|
m === s.path.length - 1 ? (o[d] = o[d] || { _errors: [] }, o[d]._errors.push(t(s))) : o[d] = o[d] || { _errors: [] }, o = o[d], m++;
|
|
3976
4022
|
}
|
|
3977
4023
|
}
|
|
3978
4024
|
};
|
|
3979
|
-
return
|
|
4025
|
+
return i(this), n;
|
|
3980
4026
|
}
|
|
3981
4027
|
toString() {
|
|
3982
4028
|
return this.message;
|
|
@@ -3988,36 +4034,36 @@ class E extends Error {
|
|
|
3988
4034
|
return this.issues.length === 0;
|
|
3989
4035
|
}
|
|
3990
4036
|
flatten(e = (t) => t.message) {
|
|
3991
|
-
const t = {},
|
|
3992
|
-
for (const
|
|
3993
|
-
|
|
3994
|
-
return { formErrors:
|
|
4037
|
+
const t = {}, n = [];
|
|
4038
|
+
for (const i of this.issues)
|
|
4039
|
+
i.path.length > 0 ? (t[i.path[0]] = t[i.path[0]] || [], t[i.path[0]].push(e(i))) : n.push(e(i));
|
|
4040
|
+
return { formErrors: n, fieldErrors: t };
|
|
3995
4041
|
}
|
|
3996
4042
|
get formErrors() {
|
|
3997
4043
|
return this.flatten();
|
|
3998
4044
|
}
|
|
3999
4045
|
}
|
|
4000
|
-
E.create = (
|
|
4001
|
-
const F = (
|
|
4046
|
+
E.create = (a) => new E(a);
|
|
4047
|
+
const F = (a, e) => {
|
|
4002
4048
|
let t;
|
|
4003
|
-
switch (
|
|
4049
|
+
switch (a.code) {
|
|
4004
4050
|
case c.invalid_type:
|
|
4005
|
-
|
|
4051
|
+
a.received === l.undefined ? t = "Required" : t = `Expected ${a.expected}, received ${a.received}`;
|
|
4006
4052
|
break;
|
|
4007
4053
|
case c.invalid_literal:
|
|
4008
|
-
t = `Invalid literal value, expected ${JSON.stringify(
|
|
4054
|
+
t = `Invalid literal value, expected ${JSON.stringify(a.expected, x.jsonStringifyReplacer)}`;
|
|
4009
4055
|
break;
|
|
4010
4056
|
case c.unrecognized_keys:
|
|
4011
|
-
t = `Unrecognized key(s) in object: ${x.joinValues(
|
|
4057
|
+
t = `Unrecognized key(s) in object: ${x.joinValues(a.keys, ", ")}`;
|
|
4012
4058
|
break;
|
|
4013
4059
|
case c.invalid_union:
|
|
4014
4060
|
t = "Invalid input";
|
|
4015
4061
|
break;
|
|
4016
4062
|
case c.invalid_union_discriminator:
|
|
4017
|
-
t = `Invalid discriminator value. Expected ${x.joinValues(
|
|
4063
|
+
t = `Invalid discriminator value. Expected ${x.joinValues(a.options)}`;
|
|
4018
4064
|
break;
|
|
4019
4065
|
case c.invalid_enum_value:
|
|
4020
|
-
t = `Invalid enum value. Expected ${x.joinValues(
|
|
4066
|
+
t = `Invalid enum value. Expected ${x.joinValues(a.options)}, received '${a.received}'`;
|
|
4021
4067
|
break;
|
|
4022
4068
|
case c.invalid_arguments:
|
|
4023
4069
|
t = "Invalid function arguments";
|
|
@@ -4029,13 +4075,13 @@ const F = (n, e) => {
|
|
|
4029
4075
|
t = "Invalid date";
|
|
4030
4076
|
break;
|
|
4031
4077
|
case c.invalid_string:
|
|
4032
|
-
typeof
|
|
4078
|
+
typeof a.validation == "object" ? "includes" in a.validation ? (t = `Invalid input: must include "${a.validation.includes}"`, typeof a.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${a.validation.position}`)) : "startsWith" in a.validation ? t = `Invalid input: must start with "${a.validation.startsWith}"` : "endsWith" in a.validation ? t = `Invalid input: must end with "${a.validation.endsWith}"` : x.assertNever(a.validation) : a.validation !== "regex" ? t = `Invalid ${a.validation}` : t = "Invalid";
|
|
4033
4079
|
break;
|
|
4034
4080
|
case c.too_small:
|
|
4035
|
-
|
|
4081
|
+
a.type === "array" ? t = `Array must contain ${a.exact ? "exactly" : a.inclusive ? "at least" : "more than"} ${a.minimum} element(s)` : a.type === "string" ? t = `String must contain ${a.exact ? "exactly" : a.inclusive ? "at least" : "over"} ${a.minimum} character(s)` : a.type === "number" ? t = `Number must be ${a.exact ? "exactly equal to " : a.inclusive ? "greater than or equal to " : "greater than "}${a.minimum}` : a.type === "date" ? t = `Date must be ${a.exact ? "exactly equal to " : a.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(a.minimum))}` : t = "Invalid input";
|
|
4036
4082
|
break;
|
|
4037
4083
|
case c.too_big:
|
|
4038
|
-
|
|
4084
|
+
a.type === "array" ? t = `Array must contain ${a.exact ? "exactly" : a.inclusive ? "at most" : "less than"} ${a.maximum} element(s)` : a.type === "string" ? t = `String must contain ${a.exact ? "exactly" : a.inclusive ? "at most" : "under"} ${a.maximum} character(s)` : a.type === "number" ? t = `Number must be ${a.exact ? "exactly" : a.inclusive ? "less than or equal to" : "less than"} ${a.maximum}` : a.type === "bigint" ? t = `BigInt must be ${a.exact ? "exactly" : a.inclusive ? "less than or equal to" : "less than"} ${a.maximum}` : a.type === "date" ? t = `Date must be ${a.exact ? "exactly" : a.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(a.maximum))}` : t = "Invalid input";
|
|
4039
4085
|
break;
|
|
4040
4086
|
case c.custom:
|
|
4041
4087
|
t = "Invalid input";
|
|
@@ -4044,52 +4090,52 @@ const F = (n, e) => {
|
|
|
4044
4090
|
t = "Intersection results could not be merged";
|
|
4045
4091
|
break;
|
|
4046
4092
|
case c.not_multiple_of:
|
|
4047
|
-
t = `Number must be a multiple of ${
|
|
4093
|
+
t = `Number must be a multiple of ${a.multipleOf}`;
|
|
4048
4094
|
break;
|
|
4049
4095
|
case c.not_finite:
|
|
4050
4096
|
t = "Number must be finite";
|
|
4051
4097
|
break;
|
|
4052
4098
|
default:
|
|
4053
|
-
t = e.defaultError, x.assertNever(
|
|
4099
|
+
t = e.defaultError, x.assertNever(a);
|
|
4054
4100
|
}
|
|
4055
4101
|
return { message: t };
|
|
4056
4102
|
};
|
|
4057
4103
|
let Re = F;
|
|
4058
|
-
function He(
|
|
4059
|
-
Re =
|
|
4104
|
+
function He(a) {
|
|
4105
|
+
Re = a;
|
|
4060
4106
|
}
|
|
4061
4107
|
function ce() {
|
|
4062
4108
|
return Re;
|
|
4063
4109
|
}
|
|
4064
|
-
const de = (
|
|
4065
|
-
const { data: e, path: t, errorMaps:
|
|
4066
|
-
...
|
|
4110
|
+
const de = (a) => {
|
|
4111
|
+
const { data: e, path: t, errorMaps: n, issueData: i } = a, r = [...t, ...i.path || []], s = {
|
|
4112
|
+
...i,
|
|
4067
4113
|
path: r
|
|
4068
4114
|
};
|
|
4069
4115
|
let o = "";
|
|
4070
|
-
const m =
|
|
4116
|
+
const m = n.filter((d) => !!d).slice().reverse();
|
|
4071
4117
|
for (const d of m)
|
|
4072
4118
|
o = d(s, { data: e, defaultError: o }).message;
|
|
4073
4119
|
return {
|
|
4074
|
-
...
|
|
4120
|
+
...i,
|
|
4075
4121
|
path: r,
|
|
4076
|
-
message:
|
|
4122
|
+
message: i.message || o
|
|
4077
4123
|
};
|
|
4078
|
-
},
|
|
4079
|
-
function u(
|
|
4124
|
+
}, Qe = [];
|
|
4125
|
+
function u(a, e) {
|
|
4080
4126
|
const t = de({
|
|
4081
4127
|
issueData: e,
|
|
4082
|
-
data:
|
|
4083
|
-
path:
|
|
4128
|
+
data: a.data,
|
|
4129
|
+
path: a.path,
|
|
4084
4130
|
errorMaps: [
|
|
4085
|
-
|
|
4086
|
-
|
|
4131
|
+
a.common.contextualErrorMap,
|
|
4132
|
+
a.schemaErrorMap,
|
|
4087
4133
|
ce(),
|
|
4088
4134
|
F
|
|
4089
4135
|
// then global default map
|
|
4090
|
-
].filter((
|
|
4136
|
+
].filter((n) => !!n)
|
|
4091
4137
|
});
|
|
4092
|
-
|
|
4138
|
+
a.common.issues.push(t);
|
|
4093
4139
|
}
|
|
4094
4140
|
class k {
|
|
4095
4141
|
constructor() {
|
|
@@ -4102,71 +4148,71 @@ class k {
|
|
|
4102
4148
|
this.value !== "aborted" && (this.value = "aborted");
|
|
4103
4149
|
}
|
|
4104
4150
|
static mergeArray(e, t) {
|
|
4105
|
-
const
|
|
4106
|
-
for (const
|
|
4107
|
-
if (
|
|
4108
|
-
return
|
|
4109
|
-
|
|
4151
|
+
const n = [];
|
|
4152
|
+
for (const i of t) {
|
|
4153
|
+
if (i.status === "aborted")
|
|
4154
|
+
return g;
|
|
4155
|
+
i.status === "dirty" && e.dirty(), n.push(i.value);
|
|
4110
4156
|
}
|
|
4111
|
-
return { status: e.value, value:
|
|
4157
|
+
return { status: e.value, value: n };
|
|
4112
4158
|
}
|
|
4113
4159
|
static async mergeObjectAsync(e, t) {
|
|
4114
|
-
const
|
|
4115
|
-
for (const
|
|
4116
|
-
|
|
4117
|
-
key: await
|
|
4118
|
-
value: await
|
|
4160
|
+
const n = [];
|
|
4161
|
+
for (const i of t)
|
|
4162
|
+
n.push({
|
|
4163
|
+
key: await i.key,
|
|
4164
|
+
value: await i.value
|
|
4119
4165
|
});
|
|
4120
|
-
return k.mergeObjectSync(e,
|
|
4166
|
+
return k.mergeObjectSync(e, n);
|
|
4121
4167
|
}
|
|
4122
4168
|
static mergeObjectSync(e, t) {
|
|
4123
|
-
const
|
|
4124
|
-
for (const
|
|
4125
|
-
const { key: r, value: s } =
|
|
4169
|
+
const n = {};
|
|
4170
|
+
for (const i of t) {
|
|
4171
|
+
const { key: r, value: s } = i;
|
|
4126
4172
|
if (r.status === "aborted" || s.status === "aborted")
|
|
4127
|
-
return
|
|
4128
|
-
r.status === "dirty" && e.dirty(), s.status === "dirty" && e.dirty(), r.value !== "__proto__" && (typeof s.value < "u" ||
|
|
4173
|
+
return g;
|
|
4174
|
+
r.status === "dirty" && e.dirty(), s.status === "dirty" && e.dirty(), r.value !== "__proto__" && (typeof s.value < "u" || i.alwaysSet) && (n[r.value] = s.value);
|
|
4129
4175
|
}
|
|
4130
|
-
return { status: e.value, value:
|
|
4176
|
+
return { status: e.value, value: n };
|
|
4131
4177
|
}
|
|
4132
4178
|
}
|
|
4133
|
-
const
|
|
4179
|
+
const g = Object.freeze({
|
|
4134
4180
|
status: "aborted"
|
|
4135
|
-
}), Se = (
|
|
4181
|
+
}), Se = (a) => ({ status: "dirty", value: a }), R = (a) => ({ status: "valid", value: a }), xe = (a) => a.status === "aborted", we = (a) => a.status === "dirty", H = (a) => a.status === "valid", le = (a) => typeof Promise < "u" && a instanceof Promise;
|
|
4136
4182
|
var p;
|
|
4137
|
-
(function(
|
|
4138
|
-
|
|
4183
|
+
(function(a) {
|
|
4184
|
+
a.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, a.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
4139
4185
|
})(p || (p = {}));
|
|
4140
|
-
class
|
|
4141
|
-
constructor(e, t,
|
|
4142
|
-
this._cachedPath = [], this.parent = e, this.data = t, this._path =
|
|
4186
|
+
class I {
|
|
4187
|
+
constructor(e, t, n, i) {
|
|
4188
|
+
this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = i;
|
|
4143
4189
|
}
|
|
4144
4190
|
get path() {
|
|
4145
4191
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
4146
4192
|
}
|
|
4147
4193
|
}
|
|
4148
|
-
const Ce = (
|
|
4194
|
+
const Ce = (a, e) => {
|
|
4149
4195
|
if (H(e))
|
|
4150
4196
|
return { success: !0, data: e.value };
|
|
4151
|
-
if (!
|
|
4197
|
+
if (!a.common.issues.length)
|
|
4152
4198
|
throw new Error("Validation failed but no issues detected.");
|
|
4153
4199
|
return {
|
|
4154
4200
|
success: !1,
|
|
4155
4201
|
get error() {
|
|
4156
4202
|
if (this._error)
|
|
4157
4203
|
return this._error;
|
|
4158
|
-
const t = new E(
|
|
4204
|
+
const t = new E(a.common.issues);
|
|
4159
4205
|
return this._error = t, this._error;
|
|
4160
4206
|
}
|
|
4161
4207
|
};
|
|
4162
4208
|
};
|
|
4163
|
-
function
|
|
4164
|
-
if (!
|
|
4209
|
+
function _(a) {
|
|
4210
|
+
if (!a)
|
|
4165
4211
|
return {};
|
|
4166
|
-
const { errorMap: e, invalid_type_error: t, required_error:
|
|
4167
|
-
if (e && (t ||
|
|
4212
|
+
const { errorMap: e, invalid_type_error: t, required_error: n, description: i } = a;
|
|
4213
|
+
if (e && (t || n))
|
|
4168
4214
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
4169
|
-
return e ? { errorMap: e, description:
|
|
4215
|
+
return e ? { errorMap: e, description: i } : { errorMap: (s, o) => s.code !== "invalid_type" ? { message: o.defaultError } : typeof o.data > "u" ? { message: n ?? o.defaultError } : { message: t ?? o.defaultError }, description: i };
|
|
4170
4216
|
}
|
|
4171
4217
|
class v {
|
|
4172
4218
|
constructor(e) {
|
|
@@ -4212,17 +4258,17 @@ class v {
|
|
|
4212
4258
|
return Promise.resolve(t);
|
|
4213
4259
|
}
|
|
4214
4260
|
parse(e, t) {
|
|
4215
|
-
const
|
|
4216
|
-
if (
|
|
4217
|
-
return
|
|
4218
|
-
throw
|
|
4261
|
+
const n = this.safeParse(e, t);
|
|
4262
|
+
if (n.success)
|
|
4263
|
+
return n.data;
|
|
4264
|
+
throw n.error;
|
|
4219
4265
|
}
|
|
4220
4266
|
safeParse(e, t) {
|
|
4221
|
-
var
|
|
4222
|
-
const
|
|
4267
|
+
var n;
|
|
4268
|
+
const i = {
|
|
4223
4269
|
common: {
|
|
4224
4270
|
issues: [],
|
|
4225
|
-
async: (
|
|
4271
|
+
async: (n = t == null ? void 0 : t.async) !== null && n !== void 0 ? n : !1,
|
|
4226
4272
|
contextualErrorMap: t == null ? void 0 : t.errorMap
|
|
4227
4273
|
},
|
|
4228
4274
|
path: (t == null ? void 0 : t.path) || [],
|
|
@@ -4230,17 +4276,17 @@ class v {
|
|
|
4230
4276
|
parent: null,
|
|
4231
4277
|
data: e,
|
|
4232
4278
|
parsedType: j(e)
|
|
4233
|
-
}, r = this._parseSync({ data: e, path:
|
|
4234
|
-
return Ce(
|
|
4279
|
+
}, r = this._parseSync({ data: e, path: i.path, parent: i });
|
|
4280
|
+
return Ce(i, r);
|
|
4235
4281
|
}
|
|
4236
4282
|
async parseAsync(e, t) {
|
|
4237
|
-
const
|
|
4238
|
-
if (
|
|
4239
|
-
return
|
|
4240
|
-
throw
|
|
4283
|
+
const n = await this.safeParseAsync(e, t);
|
|
4284
|
+
if (n.success)
|
|
4285
|
+
return n.data;
|
|
4286
|
+
throw n.error;
|
|
4241
4287
|
}
|
|
4242
4288
|
async safeParseAsync(e, t) {
|
|
4243
|
-
const
|
|
4289
|
+
const n = {
|
|
4244
4290
|
common: {
|
|
4245
4291
|
issues: [],
|
|
4246
4292
|
contextualErrorMap: t == null ? void 0 : t.errorMap,
|
|
@@ -4251,24 +4297,24 @@ class v {
|
|
|
4251
4297
|
parent: null,
|
|
4252
4298
|
data: e,
|
|
4253
4299
|
parsedType: j(e)
|
|
4254
|
-
},
|
|
4255
|
-
return Ce(
|
|
4300
|
+
}, i = this._parse({ data: e, path: n.path, parent: n }), r = await (le(i) ? i : Promise.resolve(i));
|
|
4301
|
+
return Ce(n, r);
|
|
4256
4302
|
}
|
|
4257
4303
|
refine(e, t) {
|
|
4258
|
-
const
|
|
4259
|
-
return this._refinement((
|
|
4260
|
-
const s = e(
|
|
4304
|
+
const n = (i) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(i) : t;
|
|
4305
|
+
return this._refinement((i, r) => {
|
|
4306
|
+
const s = e(i), o = () => r.addIssue({
|
|
4261
4307
|
code: c.custom,
|
|
4262
|
-
...i
|
|
4308
|
+
...n(i)
|
|
4263
4309
|
});
|
|
4264
4310
|
return typeof Promise < "u" && s instanceof Promise ? s.then((m) => m ? !0 : (o(), !1)) : s ? !0 : (o(), !1);
|
|
4265
4311
|
});
|
|
4266
4312
|
}
|
|
4267
4313
|
refinement(e, t) {
|
|
4268
|
-
return this._refinement((
|
|
4314
|
+
return this._refinement((n, i) => e(n) ? !0 : (i.addIssue(typeof t == "function" ? t(n, i) : t), !1));
|
|
4269
4315
|
}
|
|
4270
4316
|
_refinement(e) {
|
|
4271
|
-
return new
|
|
4317
|
+
return new M({
|
|
4272
4318
|
schema: this,
|
|
4273
4319
|
typeName: f.ZodEffects,
|
|
4274
4320
|
effect: { type: "refinement", refinement: e }
|
|
@@ -4278,7 +4324,7 @@ class v {
|
|
|
4278
4324
|
return this._refinement(e);
|
|
4279
4325
|
}
|
|
4280
4326
|
optional() {
|
|
4281
|
-
return
|
|
4327
|
+
return N.create(this, this._def);
|
|
4282
4328
|
}
|
|
4283
4329
|
nullable() {
|
|
4284
4330
|
return q.create(this, this._def);
|
|
@@ -4299,8 +4345,8 @@ class v {
|
|
|
4299
4345
|
return ee.create(this, e, this._def);
|
|
4300
4346
|
}
|
|
4301
4347
|
transform(e) {
|
|
4302
|
-
return new
|
|
4303
|
-
...
|
|
4348
|
+
return new M({
|
|
4349
|
+
..._(this._def),
|
|
4304
4350
|
schema: this,
|
|
4305
4351
|
typeName: f.ZodEffects,
|
|
4306
4352
|
effect: { type: "transform", transform: e }
|
|
@@ -4309,7 +4355,7 @@ class v {
|
|
|
4309
4355
|
default(e) {
|
|
4310
4356
|
const t = typeof e == "function" ? e : () => e;
|
|
4311
4357
|
return new re({
|
|
4312
|
-
...
|
|
4358
|
+
..._(this._def),
|
|
4313
4359
|
innerType: this,
|
|
4314
4360
|
defaultValue: t,
|
|
4315
4361
|
typeName: f.ZodDefault
|
|
@@ -4319,13 +4365,13 @@ class v {
|
|
|
4319
4365
|
return new Ee({
|
|
4320
4366
|
typeName: f.ZodBranded,
|
|
4321
4367
|
type: this,
|
|
4322
|
-
...
|
|
4368
|
+
..._(this._def)
|
|
4323
4369
|
});
|
|
4324
4370
|
}
|
|
4325
4371
|
catch(e) {
|
|
4326
4372
|
const t = typeof e == "function" ? e : () => e;
|
|
4327
4373
|
return new fe({
|
|
4328
|
-
...
|
|
4374
|
+
..._(this._def),
|
|
4329
4375
|
innerType: this,
|
|
4330
4376
|
catchValue: t,
|
|
4331
4377
|
typeName: f.ZodCatch
|
|
@@ -4342,7 +4388,7 @@ class v {
|
|
|
4342
4388
|
return se.create(this, e);
|
|
4343
4389
|
}
|
|
4344
4390
|
readonly() {
|
|
4345
|
-
return
|
|
4391
|
+
return ge.create(this);
|
|
4346
4392
|
}
|
|
4347
4393
|
isOptional() {
|
|
4348
4394
|
return this.safeParse(void 0).success;
|
|
@@ -4351,11 +4397,11 @@ class v {
|
|
|
4351
4397
|
return this.safeParse(null).success;
|
|
4352
4398
|
}
|
|
4353
4399
|
}
|
|
4354
|
-
const
|
|
4400
|
+
const Je = /^c[^\s-]{8,}$/i, Xe = /^[a-z][a-z0-9]*$/, Ke = /^[0-9A-HJKMNP-TV-Z]{26}$/, et = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, tt = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, at = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
4355
4401
|
let ye;
|
|
4356
|
-
const
|
|
4357
|
-
function st(
|
|
4358
|
-
return !!((e === "v4" || !e) &&
|
|
4402
|
+
const nt = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/, it = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, rt = (a) => a.precision ? a.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}Z$`) : a.precision === 0 ? a.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : a.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");
|
|
4403
|
+
function st(a, e) {
|
|
4404
|
+
return !!((e === "v4" || !e) && nt.test(a) || (e === "v6" || !e) && it.test(a));
|
|
4359
4405
|
}
|
|
4360
4406
|
class A extends v {
|
|
4361
4407
|
_parse(e) {
|
|
@@ -4369,124 +4415,124 @@ class A extends v {
|
|
|
4369
4415
|
received: r.parsedType
|
|
4370
4416
|
}
|
|
4371
4417
|
//
|
|
4372
|
-
),
|
|
4418
|
+
), g;
|
|
4373
4419
|
}
|
|
4374
|
-
const
|
|
4375
|
-
let
|
|
4420
|
+
const n = new k();
|
|
4421
|
+
let i;
|
|
4376
4422
|
for (const r of this._def.checks)
|
|
4377
4423
|
if (r.kind === "min")
|
|
4378
|
-
e.data.length < r.value && (
|
|
4424
|
+
e.data.length < r.value && (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4379
4425
|
code: c.too_small,
|
|
4380
4426
|
minimum: r.value,
|
|
4381
4427
|
type: "string",
|
|
4382
4428
|
inclusive: !0,
|
|
4383
4429
|
exact: !1,
|
|
4384
4430
|
message: r.message
|
|
4385
|
-
}),
|
|
4431
|
+
}), n.dirty());
|
|
4386
4432
|
else if (r.kind === "max")
|
|
4387
|
-
e.data.length > r.value && (
|
|
4433
|
+
e.data.length > r.value && (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4388
4434
|
code: c.too_big,
|
|
4389
4435
|
maximum: r.value,
|
|
4390
4436
|
type: "string",
|
|
4391
4437
|
inclusive: !0,
|
|
4392
4438
|
exact: !1,
|
|
4393
4439
|
message: r.message
|
|
4394
|
-
}),
|
|
4440
|
+
}), n.dirty());
|
|
4395
4441
|
else if (r.kind === "length") {
|
|
4396
4442
|
const s = e.data.length > r.value, o = e.data.length < r.value;
|
|
4397
|
-
(s || o) && (
|
|
4443
|
+
(s || o) && (i = this._getOrReturnCtx(e, i), s ? u(i, {
|
|
4398
4444
|
code: c.too_big,
|
|
4399
4445
|
maximum: r.value,
|
|
4400
4446
|
type: "string",
|
|
4401
4447
|
inclusive: !0,
|
|
4402
4448
|
exact: !0,
|
|
4403
4449
|
message: r.message
|
|
4404
|
-
}) : o && u(
|
|
4450
|
+
}) : o && u(i, {
|
|
4405
4451
|
code: c.too_small,
|
|
4406
4452
|
minimum: r.value,
|
|
4407
4453
|
type: "string",
|
|
4408
4454
|
inclusive: !0,
|
|
4409
4455
|
exact: !0,
|
|
4410
4456
|
message: r.message
|
|
4411
|
-
}),
|
|
4457
|
+
}), n.dirty());
|
|
4412
4458
|
} else if (r.kind === "email")
|
|
4413
|
-
tt.test(e.data) || (
|
|
4459
|
+
tt.test(e.data) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4414
4460
|
validation: "email",
|
|
4415
4461
|
code: c.invalid_string,
|
|
4416
4462
|
message: r.message
|
|
4417
|
-
}),
|
|
4463
|
+
}), n.dirty());
|
|
4418
4464
|
else if (r.kind === "emoji")
|
|
4419
|
-
ye || (ye = new RegExp(
|
|
4465
|
+
ye || (ye = new RegExp(at, "u")), ye.test(e.data) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4420
4466
|
validation: "emoji",
|
|
4421
4467
|
code: c.invalid_string,
|
|
4422
4468
|
message: r.message
|
|
4423
|
-
}),
|
|
4469
|
+
}), n.dirty());
|
|
4424
4470
|
else if (r.kind === "uuid")
|
|
4425
|
-
et.test(e.data) || (
|
|
4471
|
+
et.test(e.data) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4426
4472
|
validation: "uuid",
|
|
4427
4473
|
code: c.invalid_string,
|
|
4428
4474
|
message: r.message
|
|
4429
|
-
}),
|
|
4475
|
+
}), n.dirty());
|
|
4430
4476
|
else if (r.kind === "cuid")
|
|
4431
|
-
|
|
4477
|
+
Je.test(e.data) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4432
4478
|
validation: "cuid",
|
|
4433
4479
|
code: c.invalid_string,
|
|
4434
4480
|
message: r.message
|
|
4435
|
-
}),
|
|
4481
|
+
}), n.dirty());
|
|
4436
4482
|
else if (r.kind === "cuid2")
|
|
4437
|
-
Xe.test(e.data) || (
|
|
4483
|
+
Xe.test(e.data) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4438
4484
|
validation: "cuid2",
|
|
4439
4485
|
code: c.invalid_string,
|
|
4440
4486
|
message: r.message
|
|
4441
|
-
}),
|
|
4487
|
+
}), n.dirty());
|
|
4442
4488
|
else if (r.kind === "ulid")
|
|
4443
|
-
Ke.test(e.data) || (
|
|
4489
|
+
Ke.test(e.data) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4444
4490
|
validation: "ulid",
|
|
4445
4491
|
code: c.invalid_string,
|
|
4446
4492
|
message: r.message
|
|
4447
|
-
}),
|
|
4493
|
+
}), n.dirty());
|
|
4448
4494
|
else if (r.kind === "url")
|
|
4449
4495
|
try {
|
|
4450
4496
|
new URL(e.data);
|
|
4451
4497
|
} catch {
|
|
4452
|
-
|
|
4498
|
+
i = this._getOrReturnCtx(e, i), u(i, {
|
|
4453
4499
|
validation: "url",
|
|
4454
4500
|
code: c.invalid_string,
|
|
4455
4501
|
message: r.message
|
|
4456
|
-
}),
|
|
4502
|
+
}), n.dirty();
|
|
4457
4503
|
}
|
|
4458
|
-
else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (
|
|
4504
|
+
else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4459
4505
|
validation: "regex",
|
|
4460
4506
|
code: c.invalid_string,
|
|
4461
4507
|
message: r.message
|
|
4462
|
-
}),
|
|
4508
|
+
}), n.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4463
4509
|
code: c.invalid_string,
|
|
4464
4510
|
validation: { includes: r.value, position: r.position },
|
|
4465
4511
|
message: r.message
|
|
4466
|
-
}),
|
|
4512
|
+
}), n.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4467
4513
|
code: c.invalid_string,
|
|
4468
4514
|
validation: { startsWith: r.value },
|
|
4469
4515
|
message: r.message
|
|
4470
|
-
}),
|
|
4516
|
+
}), n.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4471
4517
|
code: c.invalid_string,
|
|
4472
4518
|
validation: { endsWith: r.value },
|
|
4473
4519
|
message: r.message
|
|
4474
|
-
}),
|
|
4520
|
+
}), n.dirty()) : r.kind === "datetime" ? rt(r).test(e.data) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4475
4521
|
code: c.invalid_string,
|
|
4476
4522
|
validation: "datetime",
|
|
4477
4523
|
message: r.message
|
|
4478
|
-
}),
|
|
4524
|
+
}), n.dirty()) : r.kind === "ip" ? st(e.data, r.version) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4479
4525
|
validation: "ip",
|
|
4480
4526
|
code: c.invalid_string,
|
|
4481
4527
|
message: r.message
|
|
4482
|
-
}),
|
|
4483
|
-
return { status:
|
|
4528
|
+
}), n.dirty()) : x.assertNever(r);
|
|
4529
|
+
return { status: n.value, value: e.data };
|
|
4484
4530
|
}
|
|
4485
|
-
_regex(e, t,
|
|
4486
|
-
return this.refinement((
|
|
4531
|
+
_regex(e, t, n) {
|
|
4532
|
+
return this.refinement((i) => e.test(i), {
|
|
4487
4533
|
validation: t,
|
|
4488
4534
|
code: c.invalid_string,
|
|
4489
|
-
...p.errToObj(
|
|
4535
|
+
...p.errToObj(n)
|
|
4490
4536
|
});
|
|
4491
4537
|
}
|
|
4492
4538
|
_addCheck(e) {
|
|
@@ -4648,18 +4694,18 @@ class A extends v {
|
|
|
4648
4694
|
return e;
|
|
4649
4695
|
}
|
|
4650
4696
|
}
|
|
4651
|
-
A.create = (
|
|
4697
|
+
A.create = (a) => {
|
|
4652
4698
|
var e;
|
|
4653
4699
|
return new A({
|
|
4654
4700
|
checks: [],
|
|
4655
4701
|
typeName: f.ZodString,
|
|
4656
|
-
coerce: (e =
|
|
4657
|
-
...
|
|
4702
|
+
coerce: (e = a == null ? void 0 : a.coerce) !== null && e !== void 0 ? e : !1,
|
|
4703
|
+
..._(a)
|
|
4658
4704
|
});
|
|
4659
4705
|
};
|
|
4660
|
-
function ot(
|
|
4661
|
-
const t = (
|
|
4662
|
-
return r % s / Math.pow(10,
|
|
4706
|
+
function ot(a, e) {
|
|
4707
|
+
const t = (a.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, i = t > n ? t : n, r = parseInt(a.toFixed(i).replace(".", "")), s = parseInt(e.toFixed(i).replace(".", ""));
|
|
4708
|
+
return r % s / Math.pow(10, i);
|
|
4663
4709
|
}
|
|
4664
4710
|
class D extends v {
|
|
4665
4711
|
constructor() {
|
|
@@ -4672,39 +4718,39 @@ class D extends v {
|
|
|
4672
4718
|
code: c.invalid_type,
|
|
4673
4719
|
expected: l.number,
|
|
4674
4720
|
received: r.parsedType
|
|
4675
|
-
}),
|
|
4721
|
+
}), g;
|
|
4676
4722
|
}
|
|
4677
|
-
let
|
|
4678
|
-
const
|
|
4723
|
+
let n;
|
|
4724
|
+
const i = new k();
|
|
4679
4725
|
for (const r of this._def.checks)
|
|
4680
|
-
r.kind === "int" ? x.isInteger(e.data) || (
|
|
4726
|
+
r.kind === "int" ? x.isInteger(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4681
4727
|
code: c.invalid_type,
|
|
4682
4728
|
expected: "integer",
|
|
4683
4729
|
received: "float",
|
|
4684
4730
|
message: r.message
|
|
4685
|
-
}),
|
|
4731
|
+
}), i.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4686
4732
|
code: c.too_small,
|
|
4687
4733
|
minimum: r.value,
|
|
4688
4734
|
type: "number",
|
|
4689
4735
|
inclusive: r.inclusive,
|
|
4690
4736
|
exact: !1,
|
|
4691
4737
|
message: r.message
|
|
4692
|
-
}),
|
|
4738
|
+
}), i.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4693
4739
|
code: c.too_big,
|
|
4694
4740
|
maximum: r.value,
|
|
4695
4741
|
type: "number",
|
|
4696
4742
|
inclusive: r.inclusive,
|
|
4697
4743
|
exact: !1,
|
|
4698
4744
|
message: r.message
|
|
4699
|
-
}),
|
|
4745
|
+
}), i.dirty()) : r.kind === "multipleOf" ? ot(e.data, r.value) !== 0 && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4700
4746
|
code: c.not_multiple_of,
|
|
4701
4747
|
multipleOf: r.value,
|
|
4702
4748
|
message: r.message
|
|
4703
|
-
}),
|
|
4749
|
+
}), i.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4704
4750
|
code: c.not_finite,
|
|
4705
4751
|
message: r.message
|
|
4706
|
-
}),
|
|
4707
|
-
return { status:
|
|
4752
|
+
}), i.dirty()) : x.assertNever(r);
|
|
4753
|
+
return { status: i.value, value: e.data };
|
|
4708
4754
|
}
|
|
4709
4755
|
gte(e, t) {
|
|
4710
4756
|
return this.setLimit("min", e, !0, p.toString(t));
|
|
@@ -4718,7 +4764,7 @@ class D extends v {
|
|
|
4718
4764
|
lt(e, t) {
|
|
4719
4765
|
return this.setLimit("max", e, !1, p.toString(t));
|
|
4720
4766
|
}
|
|
4721
|
-
setLimit(e, t,
|
|
4767
|
+
setLimit(e, t, n, i) {
|
|
4722
4768
|
return new D({
|
|
4723
4769
|
...this._def,
|
|
4724
4770
|
checks: [
|
|
@@ -4726,8 +4772,8 @@ class D extends v {
|
|
|
4726
4772
|
{
|
|
4727
4773
|
kind: e,
|
|
4728
4774
|
value: t,
|
|
4729
|
-
inclusive:
|
|
4730
|
-
message: p.toString(
|
|
4775
|
+
inclusive: n,
|
|
4776
|
+
message: p.toString(i)
|
|
4731
4777
|
}
|
|
4732
4778
|
]
|
|
4733
4779
|
});
|
|
@@ -4819,19 +4865,19 @@ class D extends v {
|
|
|
4819
4865
|
}
|
|
4820
4866
|
get isFinite() {
|
|
4821
4867
|
let e = null, t = null;
|
|
4822
|
-
for (const
|
|
4823
|
-
if (
|
|
4868
|
+
for (const n of this._def.checks) {
|
|
4869
|
+
if (n.kind === "finite" || n.kind === "int" || n.kind === "multipleOf")
|
|
4824
4870
|
return !0;
|
|
4825
|
-
|
|
4871
|
+
n.kind === "min" ? (t === null || n.value > t) && (t = n.value) : n.kind === "max" && (e === null || n.value < e) && (e = n.value);
|
|
4826
4872
|
}
|
|
4827
4873
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
4828
4874
|
}
|
|
4829
4875
|
}
|
|
4830
|
-
D.create = (
|
|
4876
|
+
D.create = (a) => new D({
|
|
4831
4877
|
checks: [],
|
|
4832
4878
|
typeName: f.ZodNumber,
|
|
4833
|
-
coerce: (
|
|
4834
|
-
...
|
|
4879
|
+
coerce: (a == null ? void 0 : a.coerce) || !1,
|
|
4880
|
+
..._(a)
|
|
4835
4881
|
});
|
|
4836
4882
|
class B extends v {
|
|
4837
4883
|
constructor() {
|
|
@@ -4844,29 +4890,29 @@ class B extends v {
|
|
|
4844
4890
|
code: c.invalid_type,
|
|
4845
4891
|
expected: l.bigint,
|
|
4846
4892
|
received: r.parsedType
|
|
4847
|
-
}),
|
|
4893
|
+
}), g;
|
|
4848
4894
|
}
|
|
4849
|
-
let
|
|
4850
|
-
const
|
|
4895
|
+
let n;
|
|
4896
|
+
const i = new k();
|
|
4851
4897
|
for (const r of this._def.checks)
|
|
4852
|
-
r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (
|
|
4898
|
+
r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4853
4899
|
code: c.too_small,
|
|
4854
4900
|
type: "bigint",
|
|
4855
4901
|
minimum: r.value,
|
|
4856
4902
|
inclusive: r.inclusive,
|
|
4857
4903
|
message: r.message
|
|
4858
|
-
}),
|
|
4904
|
+
}), i.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4859
4905
|
code: c.too_big,
|
|
4860
4906
|
type: "bigint",
|
|
4861
4907
|
maximum: r.value,
|
|
4862
4908
|
inclusive: r.inclusive,
|
|
4863
4909
|
message: r.message
|
|
4864
|
-
}),
|
|
4910
|
+
}), i.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4865
4911
|
code: c.not_multiple_of,
|
|
4866
4912
|
multipleOf: r.value,
|
|
4867
4913
|
message: r.message
|
|
4868
|
-
}),
|
|
4869
|
-
return { status:
|
|
4914
|
+
}), i.dirty()) : x.assertNever(r);
|
|
4915
|
+
return { status: i.value, value: e.data };
|
|
4870
4916
|
}
|
|
4871
4917
|
gte(e, t) {
|
|
4872
4918
|
return this.setLimit("min", e, !0, p.toString(t));
|
|
@@ -4880,7 +4926,7 @@ class B extends v {
|
|
|
4880
4926
|
lt(e, t) {
|
|
4881
4927
|
return this.setLimit("max", e, !1, p.toString(t));
|
|
4882
4928
|
}
|
|
4883
|
-
setLimit(e, t,
|
|
4929
|
+
setLimit(e, t, n, i) {
|
|
4884
4930
|
return new B({
|
|
4885
4931
|
...this._def,
|
|
4886
4932
|
checks: [
|
|
@@ -4888,8 +4934,8 @@ class B extends v {
|
|
|
4888
4934
|
{
|
|
4889
4935
|
kind: e,
|
|
4890
4936
|
value: t,
|
|
4891
|
-
inclusive:
|
|
4892
|
-
message: p.toString(
|
|
4937
|
+
inclusive: n,
|
|
4938
|
+
message: p.toString(i)
|
|
4893
4939
|
}
|
|
4894
4940
|
]
|
|
4895
4941
|
});
|
|
@@ -4952,32 +4998,32 @@ class B extends v {
|
|
|
4952
4998
|
return e;
|
|
4953
4999
|
}
|
|
4954
5000
|
}
|
|
4955
|
-
B.create = (
|
|
5001
|
+
B.create = (a) => {
|
|
4956
5002
|
var e;
|
|
4957
5003
|
return new B({
|
|
4958
5004
|
checks: [],
|
|
4959
5005
|
typeName: f.ZodBigInt,
|
|
4960
|
-
coerce: (e =
|
|
4961
|
-
...
|
|
5006
|
+
coerce: (e = a == null ? void 0 : a.coerce) !== null && e !== void 0 ? e : !1,
|
|
5007
|
+
..._(a)
|
|
4962
5008
|
});
|
|
4963
5009
|
};
|
|
4964
|
-
class
|
|
5010
|
+
class Q extends v {
|
|
4965
5011
|
_parse(e) {
|
|
4966
5012
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== l.boolean) {
|
|
4967
|
-
const
|
|
4968
|
-
return u(
|
|
5013
|
+
const n = this._getOrReturnCtx(e);
|
|
5014
|
+
return u(n, {
|
|
4969
5015
|
code: c.invalid_type,
|
|
4970
5016
|
expected: l.boolean,
|
|
4971
|
-
received:
|
|
4972
|
-
}),
|
|
5017
|
+
received: n.parsedType
|
|
5018
|
+
}), g;
|
|
4973
5019
|
}
|
|
4974
5020
|
return R(e.data);
|
|
4975
5021
|
}
|
|
4976
5022
|
}
|
|
4977
|
-
|
|
5023
|
+
Q.create = (a) => new Q({
|
|
4978
5024
|
typeName: f.ZodBoolean,
|
|
4979
|
-
coerce: (
|
|
4980
|
-
...
|
|
5025
|
+
coerce: (a == null ? void 0 : a.coerce) || !1,
|
|
5026
|
+
..._(a)
|
|
4981
5027
|
});
|
|
4982
5028
|
class $ extends v {
|
|
4983
5029
|
_parse(e) {
|
|
@@ -4987,34 +5033,34 @@ class $ extends v {
|
|
|
4987
5033
|
code: c.invalid_type,
|
|
4988
5034
|
expected: l.date,
|
|
4989
5035
|
received: r.parsedType
|
|
4990
|
-
}),
|
|
5036
|
+
}), g;
|
|
4991
5037
|
}
|
|
4992
5038
|
if (isNaN(e.data.getTime())) {
|
|
4993
5039
|
const r = this._getOrReturnCtx(e);
|
|
4994
5040
|
return u(r, {
|
|
4995
5041
|
code: c.invalid_date
|
|
4996
|
-
}),
|
|
5042
|
+
}), g;
|
|
4997
5043
|
}
|
|
4998
|
-
const
|
|
4999
|
-
let
|
|
5044
|
+
const n = new k();
|
|
5045
|
+
let i;
|
|
5000
5046
|
for (const r of this._def.checks)
|
|
5001
|
-
r.kind === "min" ? e.data.getTime() < r.value && (
|
|
5047
|
+
r.kind === "min" ? e.data.getTime() < r.value && (i = this._getOrReturnCtx(e, i), u(i, {
|
|
5002
5048
|
code: c.too_small,
|
|
5003
5049
|
message: r.message,
|
|
5004
5050
|
inclusive: !0,
|
|
5005
5051
|
exact: !1,
|
|
5006
5052
|
minimum: r.value,
|
|
5007
5053
|
type: "date"
|
|
5008
|
-
}),
|
|
5054
|
+
}), n.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (i = this._getOrReturnCtx(e, i), u(i, {
|
|
5009
5055
|
code: c.too_big,
|
|
5010
5056
|
message: r.message,
|
|
5011
5057
|
inclusive: !0,
|
|
5012
5058
|
exact: !1,
|
|
5013
5059
|
maximum: r.value,
|
|
5014
5060
|
type: "date"
|
|
5015
|
-
}),
|
|
5061
|
+
}), n.dirty()) : x.assertNever(r);
|
|
5016
5062
|
return {
|
|
5017
|
-
status:
|
|
5063
|
+
status: n.value,
|
|
5018
5064
|
value: new Date(e.data.getTime())
|
|
5019
5065
|
};
|
|
5020
5066
|
}
|
|
@@ -5051,62 +5097,62 @@ class $ extends v {
|
|
|
5051
5097
|
return e != null ? new Date(e) : null;
|
|
5052
5098
|
}
|
|
5053
5099
|
}
|
|
5054
|
-
$.create = (
|
|
5100
|
+
$.create = (a) => new $({
|
|
5055
5101
|
checks: [],
|
|
5056
|
-
coerce: (
|
|
5102
|
+
coerce: (a == null ? void 0 : a.coerce) || !1,
|
|
5057
5103
|
typeName: f.ZodDate,
|
|
5058
|
-
...
|
|
5104
|
+
..._(a)
|
|
5059
5105
|
});
|
|
5060
5106
|
class ue extends v {
|
|
5061
5107
|
_parse(e) {
|
|
5062
5108
|
if (this._getType(e) !== l.symbol) {
|
|
5063
|
-
const
|
|
5064
|
-
return u(
|
|
5109
|
+
const n = this._getOrReturnCtx(e);
|
|
5110
|
+
return u(n, {
|
|
5065
5111
|
code: c.invalid_type,
|
|
5066
5112
|
expected: l.symbol,
|
|
5067
|
-
received:
|
|
5068
|
-
}),
|
|
5113
|
+
received: n.parsedType
|
|
5114
|
+
}), g;
|
|
5069
5115
|
}
|
|
5070
5116
|
return R(e.data);
|
|
5071
5117
|
}
|
|
5072
5118
|
}
|
|
5073
|
-
ue.create = (
|
|
5119
|
+
ue.create = (a) => new ue({
|
|
5074
5120
|
typeName: f.ZodSymbol,
|
|
5075
|
-
...
|
|
5121
|
+
..._(a)
|
|
5076
5122
|
});
|
|
5077
|
-
class
|
|
5123
|
+
class J extends v {
|
|
5078
5124
|
_parse(e) {
|
|
5079
5125
|
if (this._getType(e) !== l.undefined) {
|
|
5080
|
-
const
|
|
5081
|
-
return u(
|
|
5126
|
+
const n = this._getOrReturnCtx(e);
|
|
5127
|
+
return u(n, {
|
|
5082
5128
|
code: c.invalid_type,
|
|
5083
5129
|
expected: l.undefined,
|
|
5084
|
-
received:
|
|
5085
|
-
}),
|
|
5130
|
+
received: n.parsedType
|
|
5131
|
+
}), g;
|
|
5086
5132
|
}
|
|
5087
5133
|
return R(e.data);
|
|
5088
5134
|
}
|
|
5089
5135
|
}
|
|
5090
|
-
|
|
5136
|
+
J.create = (a) => new J({
|
|
5091
5137
|
typeName: f.ZodUndefined,
|
|
5092
|
-
...
|
|
5138
|
+
..._(a)
|
|
5093
5139
|
});
|
|
5094
5140
|
class X extends v {
|
|
5095
5141
|
_parse(e) {
|
|
5096
5142
|
if (this._getType(e) !== l.null) {
|
|
5097
|
-
const
|
|
5098
|
-
return u(
|
|
5143
|
+
const n = this._getOrReturnCtx(e);
|
|
5144
|
+
return u(n, {
|
|
5099
5145
|
code: c.invalid_type,
|
|
5100
5146
|
expected: l.null,
|
|
5101
|
-
received:
|
|
5102
|
-
}),
|
|
5147
|
+
received: n.parsedType
|
|
5148
|
+
}), g;
|
|
5103
5149
|
}
|
|
5104
5150
|
return R(e.data);
|
|
5105
5151
|
}
|
|
5106
5152
|
}
|
|
5107
|
-
X.create = (
|
|
5153
|
+
X.create = (a) => new X({
|
|
5108
5154
|
typeName: f.ZodNull,
|
|
5109
|
-
...
|
|
5155
|
+
..._(a)
|
|
5110
5156
|
});
|
|
5111
5157
|
class W extends v {
|
|
5112
5158
|
constructor() {
|
|
@@ -5116,9 +5162,9 @@ class W extends v {
|
|
|
5116
5162
|
return R(e.data);
|
|
5117
5163
|
}
|
|
5118
5164
|
}
|
|
5119
|
-
W.create = (
|
|
5165
|
+
W.create = (a) => new W({
|
|
5120
5166
|
typeName: f.ZodAny,
|
|
5121
|
-
...
|
|
5167
|
+
..._(a)
|
|
5122
5168
|
});
|
|
5123
5169
|
class V extends v {
|
|
5124
5170
|
constructor() {
|
|
@@ -5128,9 +5174,9 @@ class V extends v {
|
|
|
5128
5174
|
return R(e.data);
|
|
5129
5175
|
}
|
|
5130
5176
|
}
|
|
5131
|
-
V.create = (
|
|
5177
|
+
V.create = (a) => new V({
|
|
5132
5178
|
typeName: f.ZodUnknown,
|
|
5133
|
-
...
|
|
5179
|
+
..._(a)
|
|
5134
5180
|
});
|
|
5135
5181
|
class L extends v {
|
|
5136
5182
|
_parse(e) {
|
|
@@ -5139,69 +5185,69 @@ class L extends v {
|
|
|
5139
5185
|
code: c.invalid_type,
|
|
5140
5186
|
expected: l.never,
|
|
5141
5187
|
received: t.parsedType
|
|
5142
|
-
}),
|
|
5188
|
+
}), g;
|
|
5143
5189
|
}
|
|
5144
5190
|
}
|
|
5145
|
-
L.create = (
|
|
5191
|
+
L.create = (a) => new L({
|
|
5146
5192
|
typeName: f.ZodNever,
|
|
5147
|
-
...
|
|
5193
|
+
..._(a)
|
|
5148
5194
|
});
|
|
5149
5195
|
class me extends v {
|
|
5150
5196
|
_parse(e) {
|
|
5151
5197
|
if (this._getType(e) !== l.undefined) {
|
|
5152
|
-
const
|
|
5153
|
-
return u(
|
|
5198
|
+
const n = this._getOrReturnCtx(e);
|
|
5199
|
+
return u(n, {
|
|
5154
5200
|
code: c.invalid_type,
|
|
5155
5201
|
expected: l.void,
|
|
5156
|
-
received:
|
|
5157
|
-
}),
|
|
5202
|
+
received: n.parsedType
|
|
5203
|
+
}), g;
|
|
5158
5204
|
}
|
|
5159
5205
|
return R(e.data);
|
|
5160
5206
|
}
|
|
5161
5207
|
}
|
|
5162
|
-
me.create = (
|
|
5208
|
+
me.create = (a) => new me({
|
|
5163
5209
|
typeName: f.ZodVoid,
|
|
5164
|
-
...
|
|
5210
|
+
..._(a)
|
|
5165
5211
|
});
|
|
5166
5212
|
class O extends v {
|
|
5167
5213
|
_parse(e) {
|
|
5168
|
-
const { ctx: t, status:
|
|
5214
|
+
const { ctx: t, status: n } = this._processInputParams(e), i = this._def;
|
|
5169
5215
|
if (t.parsedType !== l.array)
|
|
5170
5216
|
return u(t, {
|
|
5171
5217
|
code: c.invalid_type,
|
|
5172
5218
|
expected: l.array,
|
|
5173
5219
|
received: t.parsedType
|
|
5174
|
-
}),
|
|
5175
|
-
if (
|
|
5176
|
-
const s = t.data.length >
|
|
5220
|
+
}), g;
|
|
5221
|
+
if (i.exactLength !== null) {
|
|
5222
|
+
const s = t.data.length > i.exactLength.value, o = t.data.length < i.exactLength.value;
|
|
5177
5223
|
(s || o) && (u(t, {
|
|
5178
5224
|
code: s ? c.too_big : c.too_small,
|
|
5179
|
-
minimum: o ?
|
|
5180
|
-
maximum: s ?
|
|
5225
|
+
minimum: o ? i.exactLength.value : void 0,
|
|
5226
|
+
maximum: s ? i.exactLength.value : void 0,
|
|
5181
5227
|
type: "array",
|
|
5182
5228
|
inclusive: !0,
|
|
5183
5229
|
exact: !0,
|
|
5184
|
-
message:
|
|
5185
|
-
}),
|
|
5230
|
+
message: i.exactLength.message
|
|
5231
|
+
}), n.dirty());
|
|
5186
5232
|
}
|
|
5187
|
-
if (
|
|
5233
|
+
if (i.minLength !== null && t.data.length < i.minLength.value && (u(t, {
|
|
5188
5234
|
code: c.too_small,
|
|
5189
|
-
minimum:
|
|
5235
|
+
minimum: i.minLength.value,
|
|
5190
5236
|
type: "array",
|
|
5191
5237
|
inclusive: !0,
|
|
5192
5238
|
exact: !1,
|
|
5193
|
-
message:
|
|
5194
|
-
}),
|
|
5239
|
+
message: i.minLength.message
|
|
5240
|
+
}), n.dirty()), i.maxLength !== null && t.data.length > i.maxLength.value && (u(t, {
|
|
5195
5241
|
code: c.too_big,
|
|
5196
|
-
maximum:
|
|
5242
|
+
maximum: i.maxLength.value,
|
|
5197
5243
|
type: "array",
|
|
5198
5244
|
inclusive: !0,
|
|
5199
5245
|
exact: !1,
|
|
5200
|
-
message:
|
|
5201
|
-
}),
|
|
5202
|
-
return Promise.all([...t.data].map((s, o) =>
|
|
5203
|
-
const r = [...t.data].map((s, o) =>
|
|
5204
|
-
return k.mergeArray(
|
|
5246
|
+
message: i.maxLength.message
|
|
5247
|
+
}), n.dirty()), t.common.async)
|
|
5248
|
+
return Promise.all([...t.data].map((s, o) => i.type._parseAsync(new I(t, s, t.path, o)))).then((s) => k.mergeArray(n, s));
|
|
5249
|
+
const r = [...t.data].map((s, o) => i.type._parseSync(new I(t, s, t.path, o)));
|
|
5250
|
+
return k.mergeArray(n, r);
|
|
5205
5251
|
}
|
|
5206
5252
|
get element() {
|
|
5207
5253
|
return this._def.type;
|
|
@@ -5228,29 +5274,29 @@ class O extends v {
|
|
|
5228
5274
|
return this.min(1, e);
|
|
5229
5275
|
}
|
|
5230
5276
|
}
|
|
5231
|
-
O.create = (
|
|
5232
|
-
type:
|
|
5277
|
+
O.create = (a, e) => new O({
|
|
5278
|
+
type: a,
|
|
5233
5279
|
minLength: null,
|
|
5234
5280
|
maxLength: null,
|
|
5235
5281
|
exactLength: null,
|
|
5236
5282
|
typeName: f.ZodArray,
|
|
5237
|
-
...
|
|
5283
|
+
..._(e)
|
|
5238
5284
|
});
|
|
5239
|
-
function G(
|
|
5240
|
-
if (
|
|
5285
|
+
function G(a) {
|
|
5286
|
+
if (a instanceof w) {
|
|
5241
5287
|
const e = {};
|
|
5242
|
-
for (const t in
|
|
5243
|
-
const
|
|
5244
|
-
e[t] =
|
|
5288
|
+
for (const t in a.shape) {
|
|
5289
|
+
const n = a.shape[t];
|
|
5290
|
+
e[t] = N.create(G(n));
|
|
5245
5291
|
}
|
|
5246
5292
|
return new w({
|
|
5247
|
-
...
|
|
5293
|
+
...a._def,
|
|
5248
5294
|
shape: () => e
|
|
5249
5295
|
});
|
|
5250
|
-
} else return
|
|
5251
|
-
...
|
|
5252
|
-
type: G(
|
|
5253
|
-
}) :
|
|
5296
|
+
} else return a instanceof O ? new O({
|
|
5297
|
+
...a._def,
|
|
5298
|
+
type: G(a.element)
|
|
5299
|
+
}) : a instanceof N ? N.create(G(a.unwrap())) : a instanceof q ? q.create(G(a.unwrap())) : a instanceof P ? P.create(a.items.map((e) => G(e))) : a;
|
|
5254
5300
|
}
|
|
5255
5301
|
class w extends v {
|
|
5256
5302
|
constructor() {
|
|
@@ -5269,19 +5315,19 @@ class w extends v {
|
|
|
5269
5315
|
code: c.invalid_type,
|
|
5270
5316
|
expected: l.object,
|
|
5271
5317
|
received: d.parsedType
|
|
5272
|
-
}),
|
|
5318
|
+
}), g;
|
|
5273
5319
|
}
|
|
5274
|
-
const { status:
|
|
5320
|
+
const { status: n, ctx: i } = this._processInputParams(e), { shape: r, keys: s } = this._getCached(), o = [];
|
|
5275
5321
|
if (!(this._def.catchall instanceof L && this._def.unknownKeys === "strip"))
|
|
5276
|
-
for (const d in
|
|
5322
|
+
for (const d in i.data)
|
|
5277
5323
|
s.includes(d) || o.push(d);
|
|
5278
5324
|
const m = [];
|
|
5279
5325
|
for (const d of s) {
|
|
5280
|
-
const y = r[d], S =
|
|
5326
|
+
const y = r[d], S = i.data[d];
|
|
5281
5327
|
m.push({
|
|
5282
5328
|
key: { status: "valid", value: d },
|
|
5283
|
-
value: y._parse(new
|
|
5284
|
-
alwaysSet: d in
|
|
5329
|
+
value: y._parse(new I(i, S, i.path, d)),
|
|
5330
|
+
alwaysSet: d in i.data
|
|
5285
5331
|
});
|
|
5286
5332
|
}
|
|
5287
5333
|
if (this._def.catchall instanceof L) {
|
|
@@ -5290,29 +5336,29 @@ class w extends v {
|
|
|
5290
5336
|
for (const y of o)
|
|
5291
5337
|
m.push({
|
|
5292
5338
|
key: { status: "valid", value: y },
|
|
5293
|
-
value: { status: "valid", value:
|
|
5339
|
+
value: { status: "valid", value: i.data[y] }
|
|
5294
5340
|
});
|
|
5295
5341
|
else if (d === "strict")
|
|
5296
|
-
o.length > 0 && (u(
|
|
5342
|
+
o.length > 0 && (u(i, {
|
|
5297
5343
|
code: c.unrecognized_keys,
|
|
5298
5344
|
keys: o
|
|
5299
|
-
}),
|
|
5345
|
+
}), n.dirty());
|
|
5300
5346
|
else if (d !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
5301
5347
|
} else {
|
|
5302
5348
|
const d = this._def.catchall;
|
|
5303
5349
|
for (const y of o) {
|
|
5304
|
-
const S =
|
|
5350
|
+
const S = i.data[y];
|
|
5305
5351
|
m.push({
|
|
5306
5352
|
key: { status: "valid", value: y },
|
|
5307
5353
|
value: d._parse(
|
|
5308
|
-
new
|
|
5354
|
+
new I(i, S, i.path, y)
|
|
5309
5355
|
//, ctx.child(key), value, getParsedType(value)
|
|
5310
5356
|
),
|
|
5311
|
-
alwaysSet: y in
|
|
5357
|
+
alwaysSet: y in i.data
|
|
5312
5358
|
});
|
|
5313
5359
|
}
|
|
5314
5360
|
}
|
|
5315
|
-
return
|
|
5361
|
+
return i.common.async ? Promise.resolve().then(async () => {
|
|
5316
5362
|
const d = [];
|
|
5317
5363
|
for (const y of m) {
|
|
5318
5364
|
const S = await y.key;
|
|
@@ -5323,7 +5369,7 @@ class w extends v {
|
|
|
5323
5369
|
});
|
|
5324
5370
|
}
|
|
5325
5371
|
return d;
|
|
5326
|
-
}).then((d) => k.mergeObjectSync(
|
|
5372
|
+
}).then((d) => k.mergeObjectSync(n, d)) : k.mergeObjectSync(n, m);
|
|
5327
5373
|
}
|
|
5328
5374
|
get shape() {
|
|
5329
5375
|
return this._def.shape();
|
|
@@ -5333,9 +5379,9 @@ class w extends v {
|
|
|
5333
5379
|
...this._def,
|
|
5334
5380
|
unknownKeys: "strict",
|
|
5335
5381
|
...e !== void 0 ? {
|
|
5336
|
-
errorMap: (t,
|
|
5337
|
-
var
|
|
5338
|
-
const m = (s = (r = (
|
|
5382
|
+
errorMap: (t, n) => {
|
|
5383
|
+
var i, r, s, o;
|
|
5384
|
+
const m = (s = (r = (i = this._def).errorMap) === null || r === void 0 ? void 0 : r.call(i, t, n).message) !== null && s !== void 0 ? s : n.defaultError;
|
|
5339
5385
|
return t.code === "unrecognized_keys" ? {
|
|
5340
5386
|
message: (o = p.errToObj(e).message) !== null && o !== void 0 ? o : m
|
|
5341
5387
|
} : {
|
|
@@ -5466,8 +5512,8 @@ class w extends v {
|
|
|
5466
5512
|
}
|
|
5467
5513
|
pick(e) {
|
|
5468
5514
|
const t = {};
|
|
5469
|
-
return x.objectKeys(e).forEach((
|
|
5470
|
-
e[
|
|
5515
|
+
return x.objectKeys(e).forEach((n) => {
|
|
5516
|
+
e[n] && this.shape[n] && (t[n] = this.shape[n]);
|
|
5471
5517
|
}), new w({
|
|
5472
5518
|
...this._def,
|
|
5473
5519
|
shape: () => t
|
|
@@ -5475,8 +5521,8 @@ class w extends v {
|
|
|
5475
5521
|
}
|
|
5476
5522
|
omit(e) {
|
|
5477
5523
|
const t = {};
|
|
5478
|
-
return x.objectKeys(this.shape).forEach((
|
|
5479
|
-
e[
|
|
5524
|
+
return x.objectKeys(this.shape).forEach((n) => {
|
|
5525
|
+
e[n] || (t[n] = this.shape[n]);
|
|
5480
5526
|
}), new w({
|
|
5481
5527
|
...this._def,
|
|
5482
5528
|
shape: () => t
|
|
@@ -5490,9 +5536,9 @@ class w extends v {
|
|
|
5490
5536
|
}
|
|
5491
5537
|
partial(e) {
|
|
5492
5538
|
const t = {};
|
|
5493
|
-
return x.objectKeys(this.shape).forEach((
|
|
5494
|
-
const
|
|
5495
|
-
e && !e[
|
|
5539
|
+
return x.objectKeys(this.shape).forEach((n) => {
|
|
5540
|
+
const i = this.shape[n];
|
|
5541
|
+
e && !e[n] ? t[n] = i : t[n] = i.optional();
|
|
5496
5542
|
}), new w({
|
|
5497
5543
|
...this._def,
|
|
5498
5544
|
shape: () => t
|
|
@@ -5500,14 +5546,14 @@ class w extends v {
|
|
|
5500
5546
|
}
|
|
5501
5547
|
required(e) {
|
|
5502
5548
|
const t = {};
|
|
5503
|
-
return x.objectKeys(this.shape).forEach((
|
|
5504
|
-
if (e && !e[
|
|
5505
|
-
t[
|
|
5549
|
+
return x.objectKeys(this.shape).forEach((n) => {
|
|
5550
|
+
if (e && !e[n])
|
|
5551
|
+
t[n] = this.shape[n];
|
|
5506
5552
|
else {
|
|
5507
|
-
let r = this.shape[
|
|
5508
|
-
for (; r instanceof
|
|
5553
|
+
let r = this.shape[n];
|
|
5554
|
+
for (; r instanceof N; )
|
|
5509
5555
|
r = r._def.innerType;
|
|
5510
|
-
t[
|
|
5556
|
+
t[n] = r;
|
|
5511
5557
|
}
|
|
5512
5558
|
}), new w({
|
|
5513
5559
|
...this._def,
|
|
@@ -5518,31 +5564,31 @@ class w extends v {
|
|
|
5518
5564
|
return Ae(x.objectKeys(this.shape));
|
|
5519
5565
|
}
|
|
5520
5566
|
}
|
|
5521
|
-
w.create = (
|
|
5522
|
-
shape: () =>
|
|
5567
|
+
w.create = (a, e) => new w({
|
|
5568
|
+
shape: () => a,
|
|
5523
5569
|
unknownKeys: "strip",
|
|
5524
5570
|
catchall: L.create(),
|
|
5525
5571
|
typeName: f.ZodObject,
|
|
5526
|
-
...
|
|
5572
|
+
..._(e)
|
|
5527
5573
|
});
|
|
5528
|
-
w.strictCreate = (
|
|
5529
|
-
shape: () =>
|
|
5574
|
+
w.strictCreate = (a, e) => new w({
|
|
5575
|
+
shape: () => a,
|
|
5530
5576
|
unknownKeys: "strict",
|
|
5531
5577
|
catchall: L.create(),
|
|
5532
5578
|
typeName: f.ZodObject,
|
|
5533
|
-
...
|
|
5579
|
+
..._(e)
|
|
5534
5580
|
});
|
|
5535
|
-
w.lazycreate = (
|
|
5536
|
-
shape:
|
|
5581
|
+
w.lazycreate = (a, e) => new w({
|
|
5582
|
+
shape: a,
|
|
5537
5583
|
unknownKeys: "strip",
|
|
5538
5584
|
catchall: L.create(),
|
|
5539
5585
|
typeName: f.ZodObject,
|
|
5540
|
-
...
|
|
5586
|
+
..._(e)
|
|
5541
5587
|
});
|
|
5542
5588
|
class K extends v {
|
|
5543
5589
|
_parse(e) {
|
|
5544
|
-
const { ctx: t } = this._processInputParams(e),
|
|
5545
|
-
function
|
|
5590
|
+
const { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
5591
|
+
function i(r) {
|
|
5546
5592
|
for (const o of r)
|
|
5547
5593
|
if (o.result.status === "valid")
|
|
5548
5594
|
return o.result;
|
|
@@ -5553,10 +5599,10 @@ class K extends v {
|
|
|
5553
5599
|
return u(t, {
|
|
5554
5600
|
code: c.invalid_union,
|
|
5555
5601
|
unionErrors: s
|
|
5556
|
-
}),
|
|
5602
|
+
}), g;
|
|
5557
5603
|
}
|
|
5558
5604
|
if (t.common.async)
|
|
5559
|
-
return Promise.all(
|
|
5605
|
+
return Promise.all(n.map(async (r) => {
|
|
5560
5606
|
const s = {
|
|
5561
5607
|
...t,
|
|
5562
5608
|
common: {
|
|
@@ -5573,11 +5619,11 @@ class K extends v {
|
|
|
5573
5619
|
}),
|
|
5574
5620
|
ctx: s
|
|
5575
5621
|
};
|
|
5576
|
-
})).then(
|
|
5622
|
+
})).then(i);
|
|
5577
5623
|
{
|
|
5578
5624
|
let r;
|
|
5579
5625
|
const s = [];
|
|
5580
|
-
for (const m of
|
|
5626
|
+
for (const m of n) {
|
|
5581
5627
|
const d = {
|
|
5582
5628
|
...t,
|
|
5583
5629
|
common: {
|
|
@@ -5600,20 +5646,20 @@ class K extends v {
|
|
|
5600
5646
|
return u(t, {
|
|
5601
5647
|
code: c.invalid_union,
|
|
5602
5648
|
unionErrors: o
|
|
5603
|
-
}),
|
|
5649
|
+
}), g;
|
|
5604
5650
|
}
|
|
5605
5651
|
}
|
|
5606
5652
|
get options() {
|
|
5607
5653
|
return this._def.options;
|
|
5608
5654
|
}
|
|
5609
5655
|
}
|
|
5610
|
-
K.create = (
|
|
5611
|
-
options:
|
|
5656
|
+
K.create = (a, e) => new K({
|
|
5657
|
+
options: a,
|
|
5612
5658
|
typeName: f.ZodUnion,
|
|
5613
|
-
...
|
|
5659
|
+
..._(e)
|
|
5614
5660
|
});
|
|
5615
|
-
const oe = (
|
|
5616
|
-
class
|
|
5661
|
+
const oe = (a) => a instanceof ae ? oe(a.schema) : a instanceof M ? oe(a.innerType()) : a instanceof ne ? [a.value] : a instanceof Z ? a.options : a instanceof ie ? Object.keys(a.enum) : a instanceof re ? oe(a._def.innerType) : a instanceof J ? [void 0] : a instanceof X ? [null] : null;
|
|
5662
|
+
class _e extends v {
|
|
5617
5663
|
_parse(e) {
|
|
5618
5664
|
const { ctx: t } = this._processInputParams(e);
|
|
5619
5665
|
if (t.parsedType !== l.object)
|
|
@@ -5621,8 +5667,8 @@ class ge extends v {
|
|
|
5621
5667
|
code: c.invalid_type,
|
|
5622
5668
|
expected: l.object,
|
|
5623
5669
|
received: t.parsedType
|
|
5624
|
-
}),
|
|
5625
|
-
const
|
|
5670
|
+
}), g;
|
|
5671
|
+
const n = this.discriminator, i = t.data[n], r = this.optionsMap.get(i);
|
|
5626
5672
|
return r ? t.common.async ? r._parseAsync({
|
|
5627
5673
|
data: t.data,
|
|
5628
5674
|
path: t.path,
|
|
@@ -5634,8 +5680,8 @@ class ge extends v {
|
|
|
5634
5680
|
}) : (u(t, {
|
|
5635
5681
|
code: c.invalid_union_discriminator,
|
|
5636
5682
|
options: Array.from(this.optionsMap.keys()),
|
|
5637
|
-
path: [
|
|
5638
|
-
}),
|
|
5683
|
+
path: [n]
|
|
5684
|
+
}), g);
|
|
5639
5685
|
}
|
|
5640
5686
|
get discriminator() {
|
|
5641
5687
|
return this._def.discriminator;
|
|
@@ -5654,139 +5700,139 @@ class ge extends v {
|
|
|
5654
5700
|
* @param types an array of object schemas
|
|
5655
5701
|
* @param params
|
|
5656
5702
|
*/
|
|
5657
|
-
static create(e, t,
|
|
5658
|
-
const
|
|
5703
|
+
static create(e, t, n) {
|
|
5704
|
+
const i = /* @__PURE__ */ new Map();
|
|
5659
5705
|
for (const r of t) {
|
|
5660
5706
|
const s = oe(r.shape[e]);
|
|
5661
5707
|
if (!s)
|
|
5662
5708
|
throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
|
|
5663
5709
|
for (const o of s) {
|
|
5664
|
-
if (
|
|
5710
|
+
if (i.has(o))
|
|
5665
5711
|
throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);
|
|
5666
|
-
|
|
5712
|
+
i.set(o, r);
|
|
5667
5713
|
}
|
|
5668
5714
|
}
|
|
5669
|
-
return new
|
|
5715
|
+
return new _e({
|
|
5670
5716
|
typeName: f.ZodDiscriminatedUnion,
|
|
5671
5717
|
discriminator: e,
|
|
5672
5718
|
options: t,
|
|
5673
|
-
optionsMap:
|
|
5674
|
-
...
|
|
5719
|
+
optionsMap: i,
|
|
5720
|
+
..._(n)
|
|
5675
5721
|
});
|
|
5676
5722
|
}
|
|
5677
5723
|
}
|
|
5678
|
-
function Te(
|
|
5679
|
-
const t = j(
|
|
5680
|
-
if (
|
|
5681
|
-
return { valid: !0, data:
|
|
5682
|
-
if (t === l.object &&
|
|
5683
|
-
const
|
|
5724
|
+
function Te(a, e) {
|
|
5725
|
+
const t = j(a), n = j(e);
|
|
5726
|
+
if (a === e)
|
|
5727
|
+
return { valid: !0, data: a };
|
|
5728
|
+
if (t === l.object && n === l.object) {
|
|
5729
|
+
const i = x.objectKeys(e), r = x.objectKeys(a).filter((o) => i.indexOf(o) !== -1), s = { ...a, ...e };
|
|
5684
5730
|
for (const o of r) {
|
|
5685
|
-
const m = Te(
|
|
5731
|
+
const m = Te(a[o], e[o]);
|
|
5686
5732
|
if (!m.valid)
|
|
5687
5733
|
return { valid: !1 };
|
|
5688
5734
|
s[o] = m.data;
|
|
5689
5735
|
}
|
|
5690
5736
|
return { valid: !0, data: s };
|
|
5691
|
-
} else if (t === l.array &&
|
|
5692
|
-
if (
|
|
5737
|
+
} else if (t === l.array && n === l.array) {
|
|
5738
|
+
if (a.length !== e.length)
|
|
5693
5739
|
return { valid: !1 };
|
|
5694
|
-
const
|
|
5695
|
-
for (let r = 0; r <
|
|
5696
|
-
const s =
|
|
5740
|
+
const i = [];
|
|
5741
|
+
for (let r = 0; r < a.length; r++) {
|
|
5742
|
+
const s = a[r], o = e[r], m = Te(s, o);
|
|
5697
5743
|
if (!m.valid)
|
|
5698
5744
|
return { valid: !1 };
|
|
5699
|
-
|
|
5745
|
+
i.push(m.data);
|
|
5700
5746
|
}
|
|
5701
|
-
return { valid: !0, data:
|
|
5702
|
-
} else return t === l.date &&
|
|
5747
|
+
return { valid: !0, data: i };
|
|
5748
|
+
} else return t === l.date && n === l.date && +a == +e ? { valid: !0, data: a } : { valid: !1 };
|
|
5703
5749
|
}
|
|
5704
5750
|
class ee extends v {
|
|
5705
5751
|
_parse(e) {
|
|
5706
|
-
const { status: t, ctx:
|
|
5752
|
+
const { status: t, ctx: n } = this._processInputParams(e), i = (r, s) => {
|
|
5707
5753
|
if (xe(r) || xe(s))
|
|
5708
|
-
return
|
|
5754
|
+
return g;
|
|
5709
5755
|
const o = Te(r.value, s.value);
|
|
5710
|
-
return o.valid ? ((we(r) || we(s)) && t.dirty(), { status: t.value, value: o.data }) : (u(
|
|
5756
|
+
return o.valid ? ((we(r) || we(s)) && t.dirty(), { status: t.value, value: o.data }) : (u(n, {
|
|
5711
5757
|
code: c.invalid_intersection_types
|
|
5712
|
-
}),
|
|
5758
|
+
}), g);
|
|
5713
5759
|
};
|
|
5714
|
-
return
|
|
5760
|
+
return n.common.async ? Promise.all([
|
|
5715
5761
|
this._def.left._parseAsync({
|
|
5716
|
-
data:
|
|
5717
|
-
path:
|
|
5718
|
-
parent:
|
|
5762
|
+
data: n.data,
|
|
5763
|
+
path: n.path,
|
|
5764
|
+
parent: n
|
|
5719
5765
|
}),
|
|
5720
5766
|
this._def.right._parseAsync({
|
|
5721
|
-
data:
|
|
5722
|
-
path:
|
|
5723
|
-
parent:
|
|
5767
|
+
data: n.data,
|
|
5768
|
+
path: n.path,
|
|
5769
|
+
parent: n
|
|
5724
5770
|
})
|
|
5725
|
-
]).then(([r, s]) =>
|
|
5726
|
-
data:
|
|
5727
|
-
path:
|
|
5728
|
-
parent:
|
|
5771
|
+
]).then(([r, s]) => i(r, s)) : i(this._def.left._parseSync({
|
|
5772
|
+
data: n.data,
|
|
5773
|
+
path: n.path,
|
|
5774
|
+
parent: n
|
|
5729
5775
|
}), this._def.right._parseSync({
|
|
5730
|
-
data:
|
|
5731
|
-
path:
|
|
5732
|
-
parent:
|
|
5776
|
+
data: n.data,
|
|
5777
|
+
path: n.path,
|
|
5778
|
+
parent: n
|
|
5733
5779
|
}));
|
|
5734
5780
|
}
|
|
5735
5781
|
}
|
|
5736
|
-
ee.create = (
|
|
5737
|
-
left:
|
|
5782
|
+
ee.create = (a, e, t) => new ee({
|
|
5783
|
+
left: a,
|
|
5738
5784
|
right: e,
|
|
5739
5785
|
typeName: f.ZodIntersection,
|
|
5740
|
-
...
|
|
5786
|
+
..._(t)
|
|
5741
5787
|
});
|
|
5742
|
-
class
|
|
5788
|
+
class P extends v {
|
|
5743
5789
|
_parse(e) {
|
|
5744
|
-
const { status: t, ctx:
|
|
5745
|
-
if (
|
|
5746
|
-
return u(
|
|
5790
|
+
const { status: t, ctx: n } = this._processInputParams(e);
|
|
5791
|
+
if (n.parsedType !== l.array)
|
|
5792
|
+
return u(n, {
|
|
5747
5793
|
code: c.invalid_type,
|
|
5748
5794
|
expected: l.array,
|
|
5749
|
-
received:
|
|
5750
|
-
}),
|
|
5751
|
-
if (
|
|
5752
|
-
return u(
|
|
5795
|
+
received: n.parsedType
|
|
5796
|
+
}), g;
|
|
5797
|
+
if (n.data.length < this._def.items.length)
|
|
5798
|
+
return u(n, {
|
|
5753
5799
|
code: c.too_small,
|
|
5754
5800
|
minimum: this._def.items.length,
|
|
5755
5801
|
inclusive: !0,
|
|
5756
5802
|
exact: !1,
|
|
5757
5803
|
type: "array"
|
|
5758
|
-
}),
|
|
5759
|
-
!this._def.rest &&
|
|
5804
|
+
}), g;
|
|
5805
|
+
!this._def.rest && n.data.length > this._def.items.length && (u(n, {
|
|
5760
5806
|
code: c.too_big,
|
|
5761
5807
|
maximum: this._def.items.length,
|
|
5762
5808
|
inclusive: !0,
|
|
5763
5809
|
exact: !1,
|
|
5764
5810
|
type: "array"
|
|
5765
5811
|
}), t.dirty());
|
|
5766
|
-
const r = [...
|
|
5812
|
+
const r = [...n.data].map((s, o) => {
|
|
5767
5813
|
const m = this._def.items[o] || this._def.rest;
|
|
5768
|
-
return m ? m._parse(new
|
|
5814
|
+
return m ? m._parse(new I(n, s, n.path, o)) : null;
|
|
5769
5815
|
}).filter((s) => !!s);
|
|
5770
|
-
return
|
|
5816
|
+
return n.common.async ? Promise.all(r).then((s) => k.mergeArray(t, s)) : k.mergeArray(t, r);
|
|
5771
5817
|
}
|
|
5772
5818
|
get items() {
|
|
5773
5819
|
return this._def.items;
|
|
5774
5820
|
}
|
|
5775
5821
|
rest(e) {
|
|
5776
|
-
return new
|
|
5822
|
+
return new P({
|
|
5777
5823
|
...this._def,
|
|
5778
5824
|
rest: e
|
|
5779
5825
|
});
|
|
5780
5826
|
}
|
|
5781
5827
|
}
|
|
5782
|
-
|
|
5783
|
-
if (!Array.isArray(
|
|
5828
|
+
P.create = (a, e) => {
|
|
5829
|
+
if (!Array.isArray(a))
|
|
5784
5830
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
5785
|
-
return new
|
|
5786
|
-
items:
|
|
5831
|
+
return new P({
|
|
5832
|
+
items: a,
|
|
5787
5833
|
typeName: f.ZodTuple,
|
|
5788
5834
|
rest: null,
|
|
5789
|
-
...
|
|
5835
|
+
..._(e)
|
|
5790
5836
|
});
|
|
5791
5837
|
};
|
|
5792
5838
|
class te extends v {
|
|
@@ -5797,35 +5843,35 @@ class te extends v {
|
|
|
5797
5843
|
return this._def.valueType;
|
|
5798
5844
|
}
|
|
5799
5845
|
_parse(e) {
|
|
5800
|
-
const { status: t, ctx:
|
|
5801
|
-
if (
|
|
5802
|
-
return u(
|
|
5846
|
+
const { status: t, ctx: n } = this._processInputParams(e);
|
|
5847
|
+
if (n.parsedType !== l.object)
|
|
5848
|
+
return u(n, {
|
|
5803
5849
|
code: c.invalid_type,
|
|
5804
5850
|
expected: l.object,
|
|
5805
|
-
received:
|
|
5806
|
-
}),
|
|
5807
|
-
const
|
|
5808
|
-
for (const o in
|
|
5809
|
-
|
|
5810
|
-
key: r._parse(new
|
|
5811
|
-
value: s._parse(new
|
|
5851
|
+
received: n.parsedType
|
|
5852
|
+
}), g;
|
|
5853
|
+
const i = [], r = this._def.keyType, s = this._def.valueType;
|
|
5854
|
+
for (const o in n.data)
|
|
5855
|
+
i.push({
|
|
5856
|
+
key: r._parse(new I(n, o, n.path, o)),
|
|
5857
|
+
value: s._parse(new I(n, n.data[o], n.path, o))
|
|
5812
5858
|
});
|
|
5813
|
-
return
|
|
5859
|
+
return n.common.async ? k.mergeObjectAsync(t, i) : k.mergeObjectSync(t, i);
|
|
5814
5860
|
}
|
|
5815
5861
|
get element() {
|
|
5816
5862
|
return this._def.valueType;
|
|
5817
5863
|
}
|
|
5818
|
-
static create(e, t,
|
|
5864
|
+
static create(e, t, n) {
|
|
5819
5865
|
return t instanceof v ? new te({
|
|
5820
5866
|
keyType: e,
|
|
5821
5867
|
valueType: t,
|
|
5822
5868
|
typeName: f.ZodRecord,
|
|
5823
|
-
...
|
|
5869
|
+
..._(n)
|
|
5824
5870
|
}) : new te({
|
|
5825
5871
|
keyType: A.create(),
|
|
5826
5872
|
valueType: e,
|
|
5827
5873
|
typeName: f.ZodRecord,
|
|
5828
|
-
...
|
|
5874
|
+
..._(t)
|
|
5829
5875
|
});
|
|
5830
5876
|
}
|
|
5831
5877
|
}
|
|
@@ -5837,24 +5883,24 @@ class pe extends v {
|
|
|
5837
5883
|
return this._def.valueType;
|
|
5838
5884
|
}
|
|
5839
5885
|
_parse(e) {
|
|
5840
|
-
const { status: t, ctx:
|
|
5841
|
-
if (
|
|
5842
|
-
return u(
|
|
5886
|
+
const { status: t, ctx: n } = this._processInputParams(e);
|
|
5887
|
+
if (n.parsedType !== l.map)
|
|
5888
|
+
return u(n, {
|
|
5843
5889
|
code: c.invalid_type,
|
|
5844
5890
|
expected: l.map,
|
|
5845
|
-
received:
|
|
5846
|
-
}),
|
|
5847
|
-
const
|
|
5848
|
-
key:
|
|
5849
|
-
value: r._parse(new
|
|
5891
|
+
received: n.parsedType
|
|
5892
|
+
}), g;
|
|
5893
|
+
const i = this._def.keyType, r = this._def.valueType, s = [...n.data.entries()].map(([o, m], d) => ({
|
|
5894
|
+
key: i._parse(new I(n, o, n.path, [d, "key"])),
|
|
5895
|
+
value: r._parse(new I(n, m, n.path, [d, "value"]))
|
|
5850
5896
|
}));
|
|
5851
|
-
if (
|
|
5897
|
+
if (n.common.async) {
|
|
5852
5898
|
const o = /* @__PURE__ */ new Map();
|
|
5853
5899
|
return Promise.resolve().then(async () => {
|
|
5854
5900
|
for (const m of s) {
|
|
5855
5901
|
const d = await m.key, y = await m.value;
|
|
5856
5902
|
if (d.status === "aborted" || y.status === "aborted")
|
|
5857
|
-
return
|
|
5903
|
+
return g;
|
|
5858
5904
|
(d.status === "dirty" || y.status === "dirty") && t.dirty(), o.set(d.value, y.value);
|
|
5859
5905
|
}
|
|
5860
5906
|
return { status: t.value, value: o };
|
|
@@ -5864,56 +5910,56 @@ class pe extends v {
|
|
|
5864
5910
|
for (const m of s) {
|
|
5865
5911
|
const d = m.key, y = m.value;
|
|
5866
5912
|
if (d.status === "aborted" || y.status === "aborted")
|
|
5867
|
-
return
|
|
5913
|
+
return g;
|
|
5868
5914
|
(d.status === "dirty" || y.status === "dirty") && t.dirty(), o.set(d.value, y.value);
|
|
5869
5915
|
}
|
|
5870
5916
|
return { status: t.value, value: o };
|
|
5871
5917
|
}
|
|
5872
5918
|
}
|
|
5873
5919
|
}
|
|
5874
|
-
pe.create = (
|
|
5920
|
+
pe.create = (a, e, t) => new pe({
|
|
5875
5921
|
valueType: e,
|
|
5876
|
-
keyType:
|
|
5922
|
+
keyType: a,
|
|
5877
5923
|
typeName: f.ZodMap,
|
|
5878
|
-
...
|
|
5924
|
+
..._(t)
|
|
5879
5925
|
});
|
|
5880
5926
|
class U extends v {
|
|
5881
5927
|
_parse(e) {
|
|
5882
|
-
const { status: t, ctx:
|
|
5883
|
-
if (
|
|
5884
|
-
return u(
|
|
5928
|
+
const { status: t, ctx: n } = this._processInputParams(e);
|
|
5929
|
+
if (n.parsedType !== l.set)
|
|
5930
|
+
return u(n, {
|
|
5885
5931
|
code: c.invalid_type,
|
|
5886
5932
|
expected: l.set,
|
|
5887
|
-
received:
|
|
5888
|
-
}),
|
|
5889
|
-
const
|
|
5890
|
-
|
|
5933
|
+
received: n.parsedType
|
|
5934
|
+
}), g;
|
|
5935
|
+
const i = this._def;
|
|
5936
|
+
i.minSize !== null && n.data.size < i.minSize.value && (u(n, {
|
|
5891
5937
|
code: c.too_small,
|
|
5892
|
-
minimum:
|
|
5938
|
+
minimum: i.minSize.value,
|
|
5893
5939
|
type: "set",
|
|
5894
5940
|
inclusive: !0,
|
|
5895
5941
|
exact: !1,
|
|
5896
|
-
message:
|
|
5897
|
-
}), t.dirty()),
|
|
5942
|
+
message: i.minSize.message
|
|
5943
|
+
}), t.dirty()), i.maxSize !== null && n.data.size > i.maxSize.value && (u(n, {
|
|
5898
5944
|
code: c.too_big,
|
|
5899
|
-
maximum:
|
|
5945
|
+
maximum: i.maxSize.value,
|
|
5900
5946
|
type: "set",
|
|
5901
5947
|
inclusive: !0,
|
|
5902
5948
|
exact: !1,
|
|
5903
|
-
message:
|
|
5949
|
+
message: i.maxSize.message
|
|
5904
5950
|
}), t.dirty());
|
|
5905
5951
|
const r = this._def.valueType;
|
|
5906
5952
|
function s(m) {
|
|
5907
5953
|
const d = /* @__PURE__ */ new Set();
|
|
5908
5954
|
for (const y of m) {
|
|
5909
5955
|
if (y.status === "aborted")
|
|
5910
|
-
return
|
|
5956
|
+
return g;
|
|
5911
5957
|
y.status === "dirty" && t.dirty(), d.add(y.value);
|
|
5912
5958
|
}
|
|
5913
5959
|
return { status: t.value, value: d };
|
|
5914
5960
|
}
|
|
5915
|
-
const o = [...
|
|
5916
|
-
return
|
|
5961
|
+
const o = [...n.data.values()].map((m, d) => r._parse(new I(n, m, n.path, d)));
|
|
5962
|
+
return n.common.async ? Promise.all(o).then((m) => s(m)) : s(o);
|
|
5917
5963
|
}
|
|
5918
5964
|
min(e, t) {
|
|
5919
5965
|
return new U({
|
|
@@ -5934,12 +5980,12 @@ class U extends v {
|
|
|
5934
5980
|
return this.min(1, e);
|
|
5935
5981
|
}
|
|
5936
5982
|
}
|
|
5937
|
-
U.create = (
|
|
5938
|
-
valueType:
|
|
5983
|
+
U.create = (a, e) => new U({
|
|
5984
|
+
valueType: a,
|
|
5939
5985
|
minSize: null,
|
|
5940
5986
|
maxSize: null,
|
|
5941
5987
|
typeName: f.ZodSet,
|
|
5942
|
-
...
|
|
5988
|
+
..._(e)
|
|
5943
5989
|
});
|
|
5944
5990
|
class z extends v {
|
|
5945
5991
|
constructor() {
|
|
@@ -5952,8 +5998,8 @@ class z extends v {
|
|
|
5952
5998
|
code: c.invalid_type,
|
|
5953
5999
|
expected: l.function,
|
|
5954
6000
|
received: t.parsedType
|
|
5955
|
-
}),
|
|
5956
|
-
function
|
|
6001
|
+
}), g;
|
|
6002
|
+
function n(o, m) {
|
|
5957
6003
|
return de({
|
|
5958
6004
|
data: o,
|
|
5959
6005
|
path: t.path,
|
|
@@ -5969,7 +6015,7 @@ class z extends v {
|
|
|
5969
6015
|
}
|
|
5970
6016
|
});
|
|
5971
6017
|
}
|
|
5972
|
-
function
|
|
6018
|
+
function i(o, m) {
|
|
5973
6019
|
return de({
|
|
5974
6020
|
data: o,
|
|
5975
6021
|
path: t.path,
|
|
@@ -5990,10 +6036,10 @@ class z extends v {
|
|
|
5990
6036
|
const o = this;
|
|
5991
6037
|
return R(async function(...m) {
|
|
5992
6038
|
const d = new E([]), y = await o._def.args.parseAsync(m, r).catch((ve) => {
|
|
5993
|
-
throw d.addIssue(
|
|
6039
|
+
throw d.addIssue(n(m, ve)), d;
|
|
5994
6040
|
}), S = await Reflect.apply(s, this, y);
|
|
5995
6041
|
return await o._def.returns._def.type.parseAsync(S, r).catch((ve) => {
|
|
5996
|
-
throw d.addIssue(
|
|
6042
|
+
throw d.addIssue(i(S, ve)), d;
|
|
5997
6043
|
});
|
|
5998
6044
|
});
|
|
5999
6045
|
} else {
|
|
@@ -6001,10 +6047,10 @@ class z extends v {
|
|
|
6001
6047
|
return R(function(...m) {
|
|
6002
6048
|
const d = o._def.args.safeParse(m, r);
|
|
6003
6049
|
if (!d.success)
|
|
6004
|
-
throw new E([
|
|
6050
|
+
throw new E([n(m, d.error)]);
|
|
6005
6051
|
const y = Reflect.apply(s, this, d.data), S = o._def.returns.safeParse(y, r);
|
|
6006
6052
|
if (!S.success)
|
|
6007
|
-
throw new E([
|
|
6053
|
+
throw new E([i(y, S.error)]);
|
|
6008
6054
|
return S.data;
|
|
6009
6055
|
});
|
|
6010
6056
|
}
|
|
@@ -6018,7 +6064,7 @@ class z extends v {
|
|
|
6018
6064
|
args(...e) {
|
|
6019
6065
|
return new z({
|
|
6020
6066
|
...this._def,
|
|
6021
|
-
args:
|
|
6067
|
+
args: P.create(e).rest(V.create())
|
|
6022
6068
|
});
|
|
6023
6069
|
}
|
|
6024
6070
|
returns(e) {
|
|
@@ -6033,16 +6079,16 @@ class z extends v {
|
|
|
6033
6079
|
strictImplement(e) {
|
|
6034
6080
|
return this.parse(e);
|
|
6035
6081
|
}
|
|
6036
|
-
static create(e, t,
|
|
6082
|
+
static create(e, t, n) {
|
|
6037
6083
|
return new z({
|
|
6038
|
-
args: e ||
|
|
6084
|
+
args: e || P.create([]).rest(V.create()),
|
|
6039
6085
|
returns: t || V.create(),
|
|
6040
6086
|
typeName: f.ZodFunction,
|
|
6041
|
-
...
|
|
6087
|
+
..._(n)
|
|
6042
6088
|
});
|
|
6043
6089
|
}
|
|
6044
6090
|
}
|
|
6045
|
-
class
|
|
6091
|
+
class ae extends v {
|
|
6046
6092
|
get schema() {
|
|
6047
6093
|
return this._def.getter();
|
|
6048
6094
|
}
|
|
@@ -6051,12 +6097,12 @@ class ne extends v {
|
|
|
6051
6097
|
return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
|
|
6052
6098
|
}
|
|
6053
6099
|
}
|
|
6054
|
-
|
|
6055
|
-
getter:
|
|
6100
|
+
ae.create = (a, e) => new ae({
|
|
6101
|
+
getter: a,
|
|
6056
6102
|
typeName: f.ZodLazy,
|
|
6057
|
-
...
|
|
6103
|
+
..._(e)
|
|
6058
6104
|
});
|
|
6059
|
-
class
|
|
6105
|
+
class ne extends v {
|
|
6060
6106
|
_parse(e) {
|
|
6061
6107
|
if (e.data !== this._def.value) {
|
|
6062
6108
|
const t = this._getOrReturnCtx(e);
|
|
@@ -6064,7 +6110,7 @@ class ie extends v {
|
|
|
6064
6110
|
received: t.data,
|
|
6065
6111
|
code: c.invalid_literal,
|
|
6066
6112
|
expected: this._def.value
|
|
6067
|
-
}),
|
|
6113
|
+
}), g;
|
|
6068
6114
|
}
|
|
6069
6115
|
return { status: "valid", value: e.data };
|
|
6070
6116
|
}
|
|
@@ -6072,35 +6118,35 @@ class ie extends v {
|
|
|
6072
6118
|
return this._def.value;
|
|
6073
6119
|
}
|
|
6074
6120
|
}
|
|
6075
|
-
|
|
6076
|
-
value:
|
|
6121
|
+
ne.create = (a, e) => new ne({
|
|
6122
|
+
value: a,
|
|
6077
6123
|
typeName: f.ZodLiteral,
|
|
6078
|
-
...
|
|
6124
|
+
..._(e)
|
|
6079
6125
|
});
|
|
6080
|
-
function Ae(
|
|
6126
|
+
function Ae(a, e) {
|
|
6081
6127
|
return new Z({
|
|
6082
|
-
values:
|
|
6128
|
+
values: a,
|
|
6083
6129
|
typeName: f.ZodEnum,
|
|
6084
|
-
...
|
|
6130
|
+
..._(e)
|
|
6085
6131
|
});
|
|
6086
6132
|
}
|
|
6087
6133
|
class Z extends v {
|
|
6088
6134
|
_parse(e) {
|
|
6089
6135
|
if (typeof e.data != "string") {
|
|
6090
|
-
const t = this._getOrReturnCtx(e),
|
|
6136
|
+
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
6091
6137
|
return u(t, {
|
|
6092
|
-
expected: x.joinValues(
|
|
6138
|
+
expected: x.joinValues(n),
|
|
6093
6139
|
received: t.parsedType,
|
|
6094
6140
|
code: c.invalid_type
|
|
6095
|
-
}),
|
|
6141
|
+
}), g;
|
|
6096
6142
|
}
|
|
6097
6143
|
if (this._def.values.indexOf(e.data) === -1) {
|
|
6098
|
-
const t = this._getOrReturnCtx(e),
|
|
6144
|
+
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
6099
6145
|
return u(t, {
|
|
6100
6146
|
received: t.data,
|
|
6101
6147
|
code: c.invalid_enum_value,
|
|
6102
|
-
options:
|
|
6103
|
-
}),
|
|
6148
|
+
options: n
|
|
6149
|
+
}), g;
|
|
6104
6150
|
}
|
|
6105
6151
|
return R(e.data);
|
|
6106
6152
|
}
|
|
@@ -6133,24 +6179,24 @@ class Z extends v {
|
|
|
6133
6179
|
}
|
|
6134
6180
|
}
|
|
6135
6181
|
Z.create = Ae;
|
|
6136
|
-
class
|
|
6182
|
+
class ie extends v {
|
|
6137
6183
|
_parse(e) {
|
|
6138
|
-
const t = x.getValidEnumValues(this._def.values),
|
|
6139
|
-
if (
|
|
6140
|
-
const
|
|
6141
|
-
return u(
|
|
6142
|
-
expected: x.joinValues(
|
|
6143
|
-
received:
|
|
6184
|
+
const t = x.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
6185
|
+
if (n.parsedType !== l.string && n.parsedType !== l.number) {
|
|
6186
|
+
const i = x.objectValues(t);
|
|
6187
|
+
return u(n, {
|
|
6188
|
+
expected: x.joinValues(i),
|
|
6189
|
+
received: n.parsedType,
|
|
6144
6190
|
code: c.invalid_type
|
|
6145
|
-
}),
|
|
6191
|
+
}), g;
|
|
6146
6192
|
}
|
|
6147
6193
|
if (t.indexOf(e.data) === -1) {
|
|
6148
|
-
const
|
|
6149
|
-
return u(
|
|
6150
|
-
received:
|
|
6194
|
+
const i = x.objectValues(t);
|
|
6195
|
+
return u(n, {
|
|
6196
|
+
received: n.data,
|
|
6151
6197
|
code: c.invalid_enum_value,
|
|
6152
|
-
options:
|
|
6153
|
-
}),
|
|
6198
|
+
options: i
|
|
6199
|
+
}), g;
|
|
6154
6200
|
}
|
|
6155
6201
|
return R(e.data);
|
|
6156
6202
|
}
|
|
@@ -6158,10 +6204,10 @@ class ae extends v {
|
|
|
6158
6204
|
return this._def.values;
|
|
6159
6205
|
}
|
|
6160
6206
|
}
|
|
6161
|
-
|
|
6162
|
-
values:
|
|
6207
|
+
ie.create = (a, e) => new ie({
|
|
6208
|
+
values: a,
|
|
6163
6209
|
typeName: f.ZodNativeEnum,
|
|
6164
|
-
...
|
|
6210
|
+
..._(e)
|
|
6165
6211
|
});
|
|
6166
6212
|
class Y extends v {
|
|
6167
6213
|
unwrap() {
|
|
@@ -6174,20 +6220,20 @@ class Y extends v {
|
|
|
6174
6220
|
code: c.invalid_type,
|
|
6175
6221
|
expected: l.promise,
|
|
6176
6222
|
received: t.parsedType
|
|
6177
|
-
}),
|
|
6178
|
-
const
|
|
6179
|
-
return R(
|
|
6223
|
+
}), g;
|
|
6224
|
+
const n = t.parsedType === l.promise ? t.data : Promise.resolve(t.data);
|
|
6225
|
+
return R(n.then((i) => this._def.type.parseAsync(i, {
|
|
6180
6226
|
path: t.path,
|
|
6181
6227
|
errorMap: t.common.contextualErrorMap
|
|
6182
6228
|
})));
|
|
6183
6229
|
}
|
|
6184
6230
|
}
|
|
6185
|
-
Y.create = (
|
|
6186
|
-
type:
|
|
6231
|
+
Y.create = (a, e) => new Y({
|
|
6232
|
+
type: a,
|
|
6187
6233
|
typeName: f.ZodPromise,
|
|
6188
|
-
...
|
|
6234
|
+
..._(e)
|
|
6189
6235
|
});
|
|
6190
|
-
class
|
|
6236
|
+
class M extends v {
|
|
6191
6237
|
innerType() {
|
|
6192
6238
|
return this._def.schema;
|
|
6193
6239
|
}
|
|
@@ -6195,79 +6241,79 @@ class I extends v {
|
|
|
6195
6241
|
return this._def.schema._def.typeName === f.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
6196
6242
|
}
|
|
6197
6243
|
_parse(e) {
|
|
6198
|
-
const { status: t, ctx:
|
|
6244
|
+
const { status: t, ctx: n } = this._processInputParams(e), i = this._def.effect || null, r = {
|
|
6199
6245
|
addIssue: (s) => {
|
|
6200
|
-
u(
|
|
6246
|
+
u(n, s), s.fatal ? t.abort() : t.dirty();
|
|
6201
6247
|
},
|
|
6202
6248
|
get path() {
|
|
6203
|
-
return
|
|
6249
|
+
return n.path;
|
|
6204
6250
|
}
|
|
6205
6251
|
};
|
|
6206
|
-
if (r.addIssue = r.addIssue.bind(r),
|
|
6207
|
-
const s =
|
|
6208
|
-
return
|
|
6252
|
+
if (r.addIssue = r.addIssue.bind(r), i.type === "preprocess") {
|
|
6253
|
+
const s = i.transform(n.data, r);
|
|
6254
|
+
return n.common.issues.length ? {
|
|
6209
6255
|
status: "dirty",
|
|
6210
|
-
value:
|
|
6211
|
-
} :
|
|
6256
|
+
value: n.data
|
|
6257
|
+
} : n.common.async ? Promise.resolve(s).then((o) => this._def.schema._parseAsync({
|
|
6212
6258
|
data: o,
|
|
6213
|
-
path:
|
|
6214
|
-
parent:
|
|
6259
|
+
path: n.path,
|
|
6260
|
+
parent: n
|
|
6215
6261
|
})) : this._def.schema._parseSync({
|
|
6216
6262
|
data: s,
|
|
6217
|
-
path:
|
|
6218
|
-
parent:
|
|
6263
|
+
path: n.path,
|
|
6264
|
+
parent: n
|
|
6219
6265
|
});
|
|
6220
6266
|
}
|
|
6221
|
-
if (
|
|
6267
|
+
if (i.type === "refinement") {
|
|
6222
6268
|
const s = (o) => {
|
|
6223
|
-
const m =
|
|
6224
|
-
if (
|
|
6269
|
+
const m = i.refinement(o, r);
|
|
6270
|
+
if (n.common.async)
|
|
6225
6271
|
return Promise.resolve(m);
|
|
6226
6272
|
if (m instanceof Promise)
|
|
6227
6273
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
6228
6274
|
return o;
|
|
6229
6275
|
};
|
|
6230
|
-
if (
|
|
6276
|
+
if (n.common.async === !1) {
|
|
6231
6277
|
const o = this._def.schema._parseSync({
|
|
6232
|
-
data:
|
|
6233
|
-
path:
|
|
6234
|
-
parent:
|
|
6278
|
+
data: n.data,
|
|
6279
|
+
path: n.path,
|
|
6280
|
+
parent: n
|
|
6235
6281
|
});
|
|
6236
|
-
return o.status === "aborted" ?
|
|
6282
|
+
return o.status === "aborted" ? g : (o.status === "dirty" && t.dirty(), s(o.value), { status: t.value, value: o.value });
|
|
6237
6283
|
} else
|
|
6238
|
-
return this._def.schema._parseAsync({ data:
|
|
6284
|
+
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((o) => o.status === "aborted" ? g : (o.status === "dirty" && t.dirty(), s(o.value).then(() => ({ status: t.value, value: o.value }))));
|
|
6239
6285
|
}
|
|
6240
|
-
if (
|
|
6241
|
-
if (
|
|
6286
|
+
if (i.type === "transform")
|
|
6287
|
+
if (n.common.async === !1) {
|
|
6242
6288
|
const s = this._def.schema._parseSync({
|
|
6243
|
-
data:
|
|
6244
|
-
path:
|
|
6245
|
-
parent:
|
|
6289
|
+
data: n.data,
|
|
6290
|
+
path: n.path,
|
|
6291
|
+
parent: n
|
|
6246
6292
|
});
|
|
6247
6293
|
if (!H(s))
|
|
6248
6294
|
return s;
|
|
6249
|
-
const o =
|
|
6295
|
+
const o = i.transform(s.value, r);
|
|
6250
6296
|
if (o instanceof Promise)
|
|
6251
6297
|
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
6252
6298
|
return { status: t.value, value: o };
|
|
6253
6299
|
} else
|
|
6254
|
-
return this._def.schema._parseAsync({ data:
|
|
6255
|
-
x.assertNever(
|
|
6300
|
+
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((s) => H(s) ? Promise.resolve(i.transform(s.value, r)).then((o) => ({ status: t.value, value: o })) : s);
|
|
6301
|
+
x.assertNever(i);
|
|
6256
6302
|
}
|
|
6257
6303
|
}
|
|
6258
|
-
|
|
6259
|
-
schema:
|
|
6304
|
+
M.create = (a, e, t) => new M({
|
|
6305
|
+
schema: a,
|
|
6260
6306
|
typeName: f.ZodEffects,
|
|
6261
6307
|
effect: e,
|
|
6262
|
-
...
|
|
6308
|
+
..._(t)
|
|
6263
6309
|
});
|
|
6264
|
-
|
|
6310
|
+
M.createWithPreprocess = (a, e, t) => new M({
|
|
6265
6311
|
schema: e,
|
|
6266
|
-
effect: { type: "preprocess", transform:
|
|
6312
|
+
effect: { type: "preprocess", transform: a },
|
|
6267
6313
|
typeName: f.ZodEffects,
|
|
6268
|
-
...
|
|
6314
|
+
..._(t)
|
|
6269
6315
|
});
|
|
6270
|
-
class
|
|
6316
|
+
class N extends v {
|
|
6271
6317
|
_parse(e) {
|
|
6272
6318
|
return this._getType(e) === l.undefined ? R(void 0) : this._def.innerType._parse(e);
|
|
6273
6319
|
}
|
|
@@ -6275,10 +6321,10 @@ class P extends v {
|
|
|
6275
6321
|
return this._def.innerType;
|
|
6276
6322
|
}
|
|
6277
6323
|
}
|
|
6278
|
-
|
|
6279
|
-
innerType:
|
|
6324
|
+
N.create = (a, e) => new N({
|
|
6325
|
+
innerType: a,
|
|
6280
6326
|
typeName: f.ZodOptional,
|
|
6281
|
-
...
|
|
6327
|
+
..._(e)
|
|
6282
6328
|
});
|
|
6283
6329
|
class q extends v {
|
|
6284
6330
|
_parse(e) {
|
|
@@ -6288,17 +6334,17 @@ class q extends v {
|
|
|
6288
6334
|
return this._def.innerType;
|
|
6289
6335
|
}
|
|
6290
6336
|
}
|
|
6291
|
-
q.create = (
|
|
6292
|
-
innerType:
|
|
6337
|
+
q.create = (a, e) => new q({
|
|
6338
|
+
innerType: a,
|
|
6293
6339
|
typeName: f.ZodNullable,
|
|
6294
|
-
...
|
|
6340
|
+
..._(e)
|
|
6295
6341
|
});
|
|
6296
6342
|
class re extends v {
|
|
6297
6343
|
_parse(e) {
|
|
6298
6344
|
const { ctx: t } = this._processInputParams(e);
|
|
6299
|
-
let
|
|
6300
|
-
return t.parsedType === l.undefined && (
|
|
6301
|
-
data:
|
|
6345
|
+
let n = t.data;
|
|
6346
|
+
return t.parsedType === l.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
|
|
6347
|
+
data: n,
|
|
6302
6348
|
path: t.path,
|
|
6303
6349
|
parent: t
|
|
6304
6350
|
});
|
|
@@ -6307,42 +6353,42 @@ class re extends v {
|
|
|
6307
6353
|
return this._def.innerType;
|
|
6308
6354
|
}
|
|
6309
6355
|
}
|
|
6310
|
-
re.create = (
|
|
6311
|
-
innerType:
|
|
6356
|
+
re.create = (a, e) => new re({
|
|
6357
|
+
innerType: a,
|
|
6312
6358
|
typeName: f.ZodDefault,
|
|
6313
6359
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
6314
|
-
...
|
|
6360
|
+
..._(e)
|
|
6315
6361
|
});
|
|
6316
6362
|
class fe extends v {
|
|
6317
6363
|
_parse(e) {
|
|
6318
|
-
const { ctx: t } = this._processInputParams(e),
|
|
6364
|
+
const { ctx: t } = this._processInputParams(e), n = {
|
|
6319
6365
|
...t,
|
|
6320
6366
|
common: {
|
|
6321
6367
|
...t.common,
|
|
6322
6368
|
issues: []
|
|
6323
6369
|
}
|
|
6324
|
-
},
|
|
6325
|
-
data:
|
|
6326
|
-
path:
|
|
6370
|
+
}, i = this._def.innerType._parse({
|
|
6371
|
+
data: n.data,
|
|
6372
|
+
path: n.path,
|
|
6327
6373
|
parent: {
|
|
6328
|
-
...
|
|
6374
|
+
...n
|
|
6329
6375
|
}
|
|
6330
6376
|
});
|
|
6331
|
-
return le(
|
|
6377
|
+
return le(i) ? i.then((r) => ({
|
|
6332
6378
|
status: "valid",
|
|
6333
6379
|
value: r.status === "valid" ? r.value : this._def.catchValue({
|
|
6334
6380
|
get error() {
|
|
6335
|
-
return new E(
|
|
6381
|
+
return new E(n.common.issues);
|
|
6336
6382
|
},
|
|
6337
|
-
input:
|
|
6383
|
+
input: n.data
|
|
6338
6384
|
})
|
|
6339
6385
|
})) : {
|
|
6340
6386
|
status: "valid",
|
|
6341
|
-
value:
|
|
6387
|
+
value: i.status === "valid" ? i.value : this._def.catchValue({
|
|
6342
6388
|
get error() {
|
|
6343
|
-
return new E(
|
|
6389
|
+
return new E(n.common.issues);
|
|
6344
6390
|
},
|
|
6345
|
-
input:
|
|
6391
|
+
input: n.data
|
|
6346
6392
|
})
|
|
6347
6393
|
};
|
|
6348
6394
|
}
|
|
@@ -6350,35 +6396,35 @@ class fe extends v {
|
|
|
6350
6396
|
return this._def.innerType;
|
|
6351
6397
|
}
|
|
6352
6398
|
}
|
|
6353
|
-
fe.create = (
|
|
6354
|
-
innerType:
|
|
6399
|
+
fe.create = (a, e) => new fe({
|
|
6400
|
+
innerType: a,
|
|
6355
6401
|
typeName: f.ZodCatch,
|
|
6356
6402
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
6357
|
-
...
|
|
6403
|
+
..._(e)
|
|
6358
6404
|
});
|
|
6359
6405
|
class he extends v {
|
|
6360
6406
|
_parse(e) {
|
|
6361
6407
|
if (this._getType(e) !== l.nan) {
|
|
6362
|
-
const
|
|
6363
|
-
return u(
|
|
6408
|
+
const n = this._getOrReturnCtx(e);
|
|
6409
|
+
return u(n, {
|
|
6364
6410
|
code: c.invalid_type,
|
|
6365
6411
|
expected: l.nan,
|
|
6366
|
-
received:
|
|
6367
|
-
}),
|
|
6412
|
+
received: n.parsedType
|
|
6413
|
+
}), g;
|
|
6368
6414
|
}
|
|
6369
6415
|
return { status: "valid", value: e.data };
|
|
6370
6416
|
}
|
|
6371
6417
|
}
|
|
6372
|
-
he.create = (
|
|
6418
|
+
he.create = (a) => new he({
|
|
6373
6419
|
typeName: f.ZodNaN,
|
|
6374
|
-
...
|
|
6420
|
+
..._(a)
|
|
6375
6421
|
});
|
|
6376
6422
|
const ct = Symbol("zod_brand");
|
|
6377
6423
|
class Ee extends v {
|
|
6378
6424
|
_parse(e) {
|
|
6379
|
-
const { ctx: t } = this._processInputParams(e),
|
|
6425
|
+
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
6380
6426
|
return this._def.type._parse({
|
|
6381
|
-
data:
|
|
6427
|
+
data: n,
|
|
6382
6428
|
path: t.path,
|
|
6383
6429
|
parent: t
|
|
6384
6430
|
});
|
|
@@ -6389,33 +6435,33 @@ class Ee extends v {
|
|
|
6389
6435
|
}
|
|
6390
6436
|
class se extends v {
|
|
6391
6437
|
_parse(e) {
|
|
6392
|
-
const { status: t, ctx:
|
|
6393
|
-
if (
|
|
6438
|
+
const { status: t, ctx: n } = this._processInputParams(e);
|
|
6439
|
+
if (n.common.async)
|
|
6394
6440
|
return (async () => {
|
|
6395
6441
|
const r = await this._def.in._parseAsync({
|
|
6396
|
-
data:
|
|
6397
|
-
path:
|
|
6398
|
-
parent:
|
|
6442
|
+
data: n.data,
|
|
6443
|
+
path: n.path,
|
|
6444
|
+
parent: n
|
|
6399
6445
|
});
|
|
6400
|
-
return r.status === "aborted" ?
|
|
6446
|
+
return r.status === "aborted" ? g : r.status === "dirty" ? (t.dirty(), Se(r.value)) : this._def.out._parseAsync({
|
|
6401
6447
|
data: r.value,
|
|
6402
|
-
path:
|
|
6403
|
-
parent:
|
|
6448
|
+
path: n.path,
|
|
6449
|
+
parent: n
|
|
6404
6450
|
});
|
|
6405
6451
|
})();
|
|
6406
6452
|
{
|
|
6407
|
-
const
|
|
6408
|
-
data:
|
|
6409
|
-
path:
|
|
6410
|
-
parent:
|
|
6453
|
+
const i = this._def.in._parseSync({
|
|
6454
|
+
data: n.data,
|
|
6455
|
+
path: n.path,
|
|
6456
|
+
parent: n
|
|
6411
6457
|
});
|
|
6412
|
-
return
|
|
6458
|
+
return i.status === "aborted" ? g : i.status === "dirty" ? (t.dirty(), {
|
|
6413
6459
|
status: "dirty",
|
|
6414
|
-
value:
|
|
6460
|
+
value: i.value
|
|
6415
6461
|
}) : this._def.out._parseSync({
|
|
6416
|
-
data:
|
|
6417
|
-
path:
|
|
6418
|
-
parent:
|
|
6462
|
+
data: i.value,
|
|
6463
|
+
path: n.path,
|
|
6464
|
+
parent: n
|
|
6419
6465
|
});
|
|
6420
6466
|
}
|
|
6421
6467
|
}
|
|
@@ -6427,52 +6473,52 @@ class se extends v {
|
|
|
6427
6473
|
});
|
|
6428
6474
|
}
|
|
6429
6475
|
}
|
|
6430
|
-
class
|
|
6476
|
+
class ge extends v {
|
|
6431
6477
|
_parse(e) {
|
|
6432
6478
|
const t = this._def.innerType._parse(e);
|
|
6433
6479
|
return H(t) && (t.value = Object.freeze(t.value)), t;
|
|
6434
6480
|
}
|
|
6435
6481
|
}
|
|
6436
|
-
|
|
6437
|
-
innerType:
|
|
6482
|
+
ge.create = (a, e) => new ge({
|
|
6483
|
+
innerType: a,
|
|
6438
6484
|
typeName: f.ZodReadonly,
|
|
6439
|
-
...
|
|
6485
|
+
..._(e)
|
|
6440
6486
|
});
|
|
6441
|
-
const Oe = (
|
|
6487
|
+
const Oe = (a, e = {}, t) => a ? W.create().superRefine((n, i) => {
|
|
6442
6488
|
var r, s;
|
|
6443
|
-
if (!n
|
|
6444
|
-
const o = typeof e == "function" ? e(
|
|
6445
|
-
|
|
6489
|
+
if (!a(n)) {
|
|
6490
|
+
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, m = (s = (r = o.fatal) !== null && r !== void 0 ? r : t) !== null && s !== void 0 ? s : !0, d = typeof o == "string" ? { message: o } : o;
|
|
6491
|
+
i.addIssue({ code: "custom", ...d, fatal: m });
|
|
6446
6492
|
}
|
|
6447
6493
|
}) : W.create(), dt = {
|
|
6448
6494
|
object: w.lazycreate
|
|
6449
6495
|
};
|
|
6450
6496
|
var f;
|
|
6451
|
-
(function(
|
|
6452
|
-
|
|
6497
|
+
(function(a) {
|
|
6498
|
+
a.ZodString = "ZodString", a.ZodNumber = "ZodNumber", a.ZodNaN = "ZodNaN", a.ZodBigInt = "ZodBigInt", a.ZodBoolean = "ZodBoolean", a.ZodDate = "ZodDate", a.ZodSymbol = "ZodSymbol", a.ZodUndefined = "ZodUndefined", a.ZodNull = "ZodNull", a.ZodAny = "ZodAny", a.ZodUnknown = "ZodUnknown", a.ZodNever = "ZodNever", a.ZodVoid = "ZodVoid", a.ZodArray = "ZodArray", a.ZodObject = "ZodObject", a.ZodUnion = "ZodUnion", a.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", a.ZodIntersection = "ZodIntersection", a.ZodTuple = "ZodTuple", a.ZodRecord = "ZodRecord", a.ZodMap = "ZodMap", a.ZodSet = "ZodSet", a.ZodFunction = "ZodFunction", a.ZodLazy = "ZodLazy", a.ZodLiteral = "ZodLiteral", a.ZodEnum = "ZodEnum", a.ZodEffects = "ZodEffects", a.ZodNativeEnum = "ZodNativeEnum", a.ZodOptional = "ZodOptional", a.ZodNullable = "ZodNullable", a.ZodDefault = "ZodDefault", a.ZodCatch = "ZodCatch", a.ZodPromise = "ZodPromise", a.ZodBranded = "ZodBranded", a.ZodPipeline = "ZodPipeline", a.ZodReadonly = "ZodReadonly";
|
|
6453
6499
|
})(f || (f = {}));
|
|
6454
|
-
const lt = (
|
|
6455
|
-
message: `Input not instance of ${
|
|
6456
|
-
}) => Oe((t) => t instanceof
|
|
6457
|
-
string: (
|
|
6458
|
-
number: (
|
|
6459
|
-
boolean: (
|
|
6460
|
-
...
|
|
6500
|
+
const lt = (a, e = {
|
|
6501
|
+
message: `Input not instance of ${a.name}`
|
|
6502
|
+
}) => Oe((t) => t instanceof a, e), Me = A.create, Ie = D.create, ut = he.create, mt = B.create, Pe = Q.create, pt = $.create, ft = ue.create, ht = J.create, gt = X.create, _t = W.create, vt = V.create, yt = L.create, bt = me.create, xt = O.create, wt = w.create, Tt = w.strictCreate, Ct = K.create, kt = _e.create, Rt = ee.create, St = P.create, At = te.create, Et = pe.create, Ot = U.create, Mt = z.create, It = ae.create, Pt = ne.create, Nt = Z.create, Lt = ie.create, jt = Y.create, ke = M.create, Dt = N.create, Bt = q.create, Zt = M.createWithPreprocess, Vt = se.create, $t = () => Me().optional(), Ut = () => Ie().optional(), qt = () => Pe().optional(), Gt = {
|
|
6503
|
+
string: (a) => A.create({ ...a, coerce: !0 }),
|
|
6504
|
+
number: (a) => D.create({ ...a, coerce: !0 }),
|
|
6505
|
+
boolean: (a) => Q.create({
|
|
6506
|
+
...a,
|
|
6461
6507
|
coerce: !0
|
|
6462
6508
|
}),
|
|
6463
|
-
bigint: (
|
|
6464
|
-
date: (
|
|
6465
|
-
}, zt =
|
|
6509
|
+
bigint: (a) => B.create({ ...a, coerce: !0 }),
|
|
6510
|
+
date: (a) => $.create({ ...a, coerce: !0 })
|
|
6511
|
+
}, zt = g;
|
|
6466
6512
|
var Wt = /* @__PURE__ */ Object.freeze({
|
|
6467
6513
|
__proto__: null,
|
|
6468
6514
|
defaultErrorMap: F,
|
|
6469
6515
|
setErrorMap: He,
|
|
6470
6516
|
getErrorMap: ce,
|
|
6471
6517
|
makeIssue: de,
|
|
6472
|
-
EMPTY_PATH:
|
|
6518
|
+
EMPTY_PATH: Qe,
|
|
6473
6519
|
addIssueToContext: u,
|
|
6474
6520
|
ParseStatus: k,
|
|
6475
|
-
INVALID:
|
|
6521
|
+
INVALID: g,
|
|
6476
6522
|
DIRTY: Se,
|
|
6477
6523
|
OK: R,
|
|
6478
6524
|
isAborted: xe,
|
|
@@ -6491,10 +6537,10 @@ var Wt = /* @__PURE__ */ Object.freeze({
|
|
|
6491
6537
|
ZodString: A,
|
|
6492
6538
|
ZodNumber: D,
|
|
6493
6539
|
ZodBigInt: B,
|
|
6494
|
-
ZodBoolean:
|
|
6540
|
+
ZodBoolean: Q,
|
|
6495
6541
|
ZodDate: $,
|
|
6496
6542
|
ZodSymbol: ue,
|
|
6497
|
-
ZodUndefined:
|
|
6543
|
+
ZodUndefined: J,
|
|
6498
6544
|
ZodNull: X,
|
|
6499
6545
|
ZodAny: W,
|
|
6500
6546
|
ZodUnknown: V,
|
|
@@ -6503,21 +6549,21 @@ var Wt = /* @__PURE__ */ Object.freeze({
|
|
|
6503
6549
|
ZodArray: O,
|
|
6504
6550
|
ZodObject: w,
|
|
6505
6551
|
ZodUnion: K,
|
|
6506
|
-
ZodDiscriminatedUnion:
|
|
6552
|
+
ZodDiscriminatedUnion: _e,
|
|
6507
6553
|
ZodIntersection: ee,
|
|
6508
|
-
ZodTuple:
|
|
6554
|
+
ZodTuple: P,
|
|
6509
6555
|
ZodRecord: te,
|
|
6510
6556
|
ZodMap: pe,
|
|
6511
6557
|
ZodSet: U,
|
|
6512
6558
|
ZodFunction: z,
|
|
6513
|
-
ZodLazy:
|
|
6514
|
-
ZodLiteral:
|
|
6559
|
+
ZodLazy: ae,
|
|
6560
|
+
ZodLiteral: ne,
|
|
6515
6561
|
ZodEnum: Z,
|
|
6516
|
-
ZodNativeEnum:
|
|
6562
|
+
ZodNativeEnum: ie,
|
|
6517
6563
|
ZodPromise: Y,
|
|
6518
|
-
ZodEffects:
|
|
6519
|
-
ZodTransformer:
|
|
6520
|
-
ZodOptional:
|
|
6564
|
+
ZodEffects: M,
|
|
6565
|
+
ZodTransformer: M,
|
|
6566
|
+
ZodOptional: N,
|
|
6521
6567
|
ZodNullable: q,
|
|
6522
6568
|
ZodDefault: re,
|
|
6523
6569
|
ZodCatch: fe,
|
|
@@ -6525,7 +6571,7 @@ var Wt = /* @__PURE__ */ Object.freeze({
|
|
|
6525
6571
|
BRAND: ct,
|
|
6526
6572
|
ZodBranded: Ee,
|
|
6527
6573
|
ZodPipeline: se,
|
|
6528
|
-
ZodReadonly:
|
|
6574
|
+
ZodReadonly: ge,
|
|
6529
6575
|
custom: Oe,
|
|
6530
6576
|
Schema: v,
|
|
6531
6577
|
ZodSchema: v,
|
|
@@ -6534,26 +6580,26 @@ var Wt = /* @__PURE__ */ Object.freeze({
|
|
|
6534
6580
|
return f;
|
|
6535
6581
|
},
|
|
6536
6582
|
coerce: Gt,
|
|
6537
|
-
any:
|
|
6583
|
+
any: _t,
|
|
6538
6584
|
array: xt,
|
|
6539
6585
|
bigint: mt,
|
|
6540
|
-
boolean:
|
|
6586
|
+
boolean: Pe,
|
|
6541
6587
|
date: pt,
|
|
6542
6588
|
discriminatedUnion: kt,
|
|
6543
6589
|
effect: ke,
|
|
6544
|
-
enum:
|
|
6545
|
-
function:
|
|
6590
|
+
enum: Nt,
|
|
6591
|
+
function: Mt,
|
|
6546
6592
|
instanceof: lt,
|
|
6547
6593
|
intersection: Rt,
|
|
6548
|
-
lazy:
|
|
6549
|
-
literal:
|
|
6594
|
+
lazy: It,
|
|
6595
|
+
literal: Pt,
|
|
6550
6596
|
map: Et,
|
|
6551
6597
|
nan: ut,
|
|
6552
6598
|
nativeEnum: Lt,
|
|
6553
6599
|
never: yt,
|
|
6554
|
-
null:
|
|
6600
|
+
null: gt,
|
|
6555
6601
|
nullable: Bt,
|
|
6556
|
-
number:
|
|
6602
|
+
number: Ie,
|
|
6557
6603
|
object: wt,
|
|
6558
6604
|
oboolean: qt,
|
|
6559
6605
|
onumber: Ut,
|
|
@@ -6565,7 +6611,7 @@ var Wt = /* @__PURE__ */ Object.freeze({
|
|
|
6565
6611
|
record: At,
|
|
6566
6612
|
set: Ot,
|
|
6567
6613
|
strictObject: Tt,
|
|
6568
|
-
string:
|
|
6614
|
+
string: Me,
|
|
6569
6615
|
symbol: ft,
|
|
6570
6616
|
transformer: ke,
|
|
6571
6617
|
tuple: St,
|
|
@@ -6583,6 +6629,7 @@ const Yt = [
|
|
|
6583
6629
|
"ANALYTIC",
|
|
6584
6630
|
"CAMPAIGN",
|
|
6585
6631
|
"CAMPAIGN_PROMOTION",
|
|
6632
|
+
"CAMPAIGN_GRAB",
|
|
6586
6633
|
"CAMPAIGN_VOUCHER",
|
|
6587
6634
|
"CAMPAIGN_VOUCHER_COLLECTIONS",
|
|
6588
6635
|
"CAMPAIGN_BROADCAST",
|
|
@@ -6614,7 +6661,7 @@ const Yt = [
|
|
|
6614
6661
|
"AUDIT_LOGS",
|
|
6615
6662
|
"BIN",
|
|
6616
6663
|
"QUEUE"
|
|
6617
|
-
].map((
|
|
6664
|
+
].map((a) => `$connect-${a}`), Ft = Wt.enum(Yt), h = Ft.Enum, Xt = [
|
|
6618
6665
|
{
|
|
6619
6666
|
path: "",
|
|
6620
6667
|
name: h["$connect-DASHBOARD"],
|
|
@@ -6629,7 +6676,7 @@ const Yt = [
|
|
|
6629
6676
|
path: "/analytic",
|
|
6630
6677
|
name: h["$connect-ANALYTIC"],
|
|
6631
6678
|
component: C(
|
|
6632
|
-
T(() => import("./Analytic-
|
|
6679
|
+
T(() => import("./Analytic-xMxbAEul.js"))
|
|
6633
6680
|
),
|
|
6634
6681
|
meta: {
|
|
6635
6682
|
validationManifest: {
|
|
@@ -6654,7 +6701,7 @@ const Yt = [
|
|
|
6654
6701
|
path: "/campaign/promotion",
|
|
6655
6702
|
name: h["$connect-CAMPAIGN_PROMOTION"],
|
|
6656
6703
|
component: C(
|
|
6657
|
-
T(() => import("./Promotion-
|
|
6704
|
+
T(() => import("./Promotion-j4_gUzqi.js"))
|
|
6658
6705
|
),
|
|
6659
6706
|
meta: {
|
|
6660
6707
|
validationManifest: {
|
|
@@ -6675,7 +6722,7 @@ const Yt = [
|
|
|
6675
6722
|
path: "/campaign/voucher",
|
|
6676
6723
|
name: h["$connect-CAMPAIGN_VOUCHER"],
|
|
6677
6724
|
component: C(
|
|
6678
|
-
T(() => import("./Voucher-
|
|
6725
|
+
T(() => import("./Voucher-BBYDF1GX.js"))
|
|
6679
6726
|
),
|
|
6680
6727
|
meta: {
|
|
6681
6728
|
validationManifest: {
|
|
@@ -6693,7 +6740,7 @@ const Yt = [
|
|
|
6693
6740
|
name: h["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
6694
6741
|
component: C(
|
|
6695
6742
|
T(
|
|
6696
|
-
() => import("./Collections-
|
|
6743
|
+
() => import("./Collections-CxScAHZl.js")
|
|
6697
6744
|
)
|
|
6698
6745
|
),
|
|
6699
6746
|
meta: {
|
|
@@ -6713,7 +6760,7 @@ const Yt = [
|
|
|
6713
6760
|
path: "/campaign/broadcast",
|
|
6714
6761
|
name: h["$connect-CAMPAIGN_BROADCAST"],
|
|
6715
6762
|
component: C(
|
|
6716
|
-
T(() => import("./Broadcast-
|
|
6763
|
+
T(() => import("./Broadcast-eCxNA0EG.js"))
|
|
6717
6764
|
),
|
|
6718
6765
|
meta: {
|
|
6719
6766
|
validationManifest: {
|
|
@@ -6750,37 +6797,54 @@ const Yt = [
|
|
|
6750
6797
|
{
|
|
6751
6798
|
path: "/program/tier",
|
|
6752
6799
|
name: h["$connect-PROGRAM_TIER"],
|
|
6753
|
-
component: () => import("./Tier-
|
|
6800
|
+
component: () => import("./Tier-B7AUECOs.js")
|
|
6754
6801
|
},
|
|
6755
6802
|
{
|
|
6756
6803
|
path: "/program/title",
|
|
6757
6804
|
name: h["$connect-PROGRAM_TITLE"],
|
|
6758
|
-
component: () => import("./Title-
|
|
6805
|
+
component: () => import("./Title-DWw4-4cE.js")
|
|
6759
6806
|
},
|
|
6760
6807
|
{
|
|
6761
6808
|
path: "/program/experience",
|
|
6762
6809
|
name: h["$connect-PROGRAM_EXPERIENCE"],
|
|
6763
|
-
component: () => import("./Experience-
|
|
6810
|
+
component: () => import("./Experience-nMxubr1P.js")
|
|
6764
6811
|
},
|
|
6765
6812
|
{
|
|
6766
6813
|
path: "/program/point",
|
|
6767
6814
|
name: h["$connect-PROGRAM_POINT"],
|
|
6768
|
-
component: () => import("./Point-
|
|
6815
|
+
component: () => import("./Point-CsMZA2do.js")
|
|
6769
6816
|
},
|
|
6770
6817
|
{
|
|
6771
6818
|
path: "/program/credit",
|
|
6772
6819
|
name: h["$connect-PROGRAM_CREDIT"],
|
|
6773
|
-
component: () => import("./Credit-
|
|
6820
|
+
component: () => import("./Credit-BnPpMq8q.js")
|
|
6774
6821
|
},
|
|
6775
6822
|
{
|
|
6776
6823
|
path: "/program/game",
|
|
6777
6824
|
name: h["$connect-PROGRAM_GAME"],
|
|
6778
|
-
component: () => import("./Game-
|
|
6825
|
+
component: () => import("./Game-C8pHAp1o.js")
|
|
6779
6826
|
},
|
|
6780
6827
|
{
|
|
6781
6828
|
path: "/program/mission",
|
|
6782
6829
|
name: h["$connect-PROGRAM_MISSION"],
|
|
6783
|
-
component: () => import("./Mission-
|
|
6830
|
+
component: () => import("./Mission-DqAahrB0.js")
|
|
6831
|
+
},
|
|
6832
|
+
{
|
|
6833
|
+
path: "/campaign/grab",
|
|
6834
|
+
name: h["$connect-CAMPAIGN_GRAB"],
|
|
6835
|
+
component: C(
|
|
6836
|
+
T(() => import("./Grab-DjTma0rb.js"))
|
|
6837
|
+
),
|
|
6838
|
+
meta: {
|
|
6839
|
+
validationManifest: {
|
|
6840
|
+
requiredCaslPermissions: [
|
|
6841
|
+
{
|
|
6842
|
+
action: b.Action.manage,
|
|
6843
|
+
subject: b.Subject.Business.promotion
|
|
6844
|
+
}
|
|
6845
|
+
]
|
|
6846
|
+
}
|
|
6847
|
+
}
|
|
6784
6848
|
}
|
|
6785
6849
|
]
|
|
6786
6850
|
},
|
|
@@ -6805,7 +6869,7 @@ const Yt = [
|
|
|
6805
6869
|
{
|
|
6806
6870
|
path: "/loyalty/member",
|
|
6807
6871
|
name: h["$connect-LOYALTY_MEMBER"],
|
|
6808
|
-
component: () => import("./Member-
|
|
6872
|
+
component: () => import("./Member-gjwH9kPr.js"),
|
|
6809
6873
|
redirect: {
|
|
6810
6874
|
name: h["$connect-LOYALTY_MEMBER_OVERVIEW"]
|
|
6811
6875
|
},
|
|
@@ -6818,24 +6882,24 @@ const Yt = [
|
|
|
6818
6882
|
{
|
|
6819
6883
|
path: "/loyalty/member/list",
|
|
6820
6884
|
name: h["$connect-LOYALTY_MEMBER_LIST"],
|
|
6821
|
-
component: () => import("./MemberList-
|
|
6885
|
+
component: () => import("./MemberList-Bg_zsGbz.js")
|
|
6822
6886
|
},
|
|
6823
6887
|
{
|
|
6824
6888
|
path: "/loyalty/member/transactions/:id",
|
|
6825
6889
|
name: h["$connect-LOYALTY_MEMBER_TRANSACTIONS"],
|
|
6826
|
-
component: () => import("./MemberTransactions-
|
|
6890
|
+
component: () => import("./MemberTransactions-7aZsIeZL.js")
|
|
6827
6891
|
}
|
|
6828
6892
|
]
|
|
6829
6893
|
},
|
|
6830
6894
|
{
|
|
6831
6895
|
path: "/loyalty/segment",
|
|
6832
6896
|
name: h["$connect-LOYALTY_SEGMENT"],
|
|
6833
|
-
component: () => import("./Segment-
|
|
6897
|
+
component: () => import("./Segment-DSpcce-q.js")
|
|
6834
6898
|
},
|
|
6835
6899
|
{
|
|
6836
6900
|
path: "/loyalty/card",
|
|
6837
6901
|
name: h["$connect-LOYALTY_CARD"],
|
|
6838
|
-
component: () => import("./Card-
|
|
6902
|
+
component: () => import("./Card-CaOvpWvL.js")
|
|
6839
6903
|
}
|
|
6840
6904
|
]
|
|
6841
6905
|
},
|
|
@@ -6859,7 +6923,7 @@ const Yt = [
|
|
|
6859
6923
|
{
|
|
6860
6924
|
path: "/referral",
|
|
6861
6925
|
name: h["$connect-REFERRAL"],
|
|
6862
|
-
component: () => import("./Index-
|
|
6926
|
+
component: () => import("./Index-COHMtBIi.js"),
|
|
6863
6927
|
redirect: {
|
|
6864
6928
|
name: h["$connect-REFERRAL_OVERVIEW"]
|
|
6865
6929
|
},
|
|
@@ -6867,12 +6931,12 @@ const Yt = [
|
|
|
6867
6931
|
{
|
|
6868
6932
|
path: "/referral",
|
|
6869
6933
|
name: h["$connect-REFERRAL_OVERVIEW"],
|
|
6870
|
-
component: () => import("./Overview-
|
|
6934
|
+
component: () => import("./Overview-_b_4mLBe.js")
|
|
6871
6935
|
},
|
|
6872
6936
|
{
|
|
6873
6937
|
path: "/referral/record",
|
|
6874
6938
|
name: h["$connect-REFERRAL_RECORD"],
|
|
6875
|
-
component: () => import("./Record-
|
|
6939
|
+
component: () => import("./Record-BQIQBdc6.js")
|
|
6876
6940
|
}
|
|
6877
6941
|
]
|
|
6878
6942
|
}
|
|
@@ -6897,7 +6961,7 @@ const Yt = [
|
|
|
6897
6961
|
{
|
|
6898
6962
|
path: "/store",
|
|
6899
6963
|
name: h["$connect-STORE"],
|
|
6900
|
-
component: () => import("./Store-
|
|
6964
|
+
component: () => import("./Store-mAraPykq.js")
|
|
6901
6965
|
},
|
|
6902
6966
|
{
|
|
6903
6967
|
path: "/store/rewards",
|
|
@@ -6906,12 +6970,12 @@ const Yt = [
|
|
|
6906
6970
|
{
|
|
6907
6971
|
path: "/store/rewards",
|
|
6908
6972
|
name: h["$connect-STORE_REWARDS"],
|
|
6909
|
-
component: () => import("./StoreRewards-
|
|
6973
|
+
component: () => import("./StoreRewards-C1Cw1Nij.js")
|
|
6910
6974
|
},
|
|
6911
6975
|
{
|
|
6912
6976
|
path: "/store/rewards/:id/collections",
|
|
6913
6977
|
name: h["$connect-STORE_REWARD_COLLECTIONS"],
|
|
6914
|
-
component: () => import("./Collections-
|
|
6978
|
+
component: () => import("./Collections-CxScAHZl.js")
|
|
6915
6979
|
}
|
|
6916
6980
|
]
|
|
6917
6981
|
}
|
|
@@ -6936,7 +7000,7 @@ const Yt = [
|
|
|
6936
7000
|
{
|
|
6937
7001
|
path: "/transaction",
|
|
6938
7002
|
name: h["$connect-TRANSACTION"],
|
|
6939
|
-
component: () => import("./Transaction-
|
|
7003
|
+
component: () => import("./Transaction-ClZvbeDP.js")
|
|
6940
7004
|
}
|
|
6941
7005
|
]
|
|
6942
7006
|
},
|
|
@@ -6959,7 +7023,7 @@ const Yt = [
|
|
|
6959
7023
|
{
|
|
6960
7024
|
path: "/marketing",
|
|
6961
7025
|
name: h["$connect-MARKETING"],
|
|
6962
|
-
component: () => import("./Marketing-
|
|
7026
|
+
component: () => import("./Marketing-C3R9Rw4y.js")
|
|
6963
7027
|
}
|
|
6964
7028
|
]
|
|
6965
7029
|
},
|
|
@@ -6982,7 +7046,7 @@ const Yt = [
|
|
|
6982
7046
|
{
|
|
6983
7047
|
path: "/reward",
|
|
6984
7048
|
name: h["$connect-REWARD_TEMPLATE"],
|
|
6985
|
-
component: () => import("./Reward-
|
|
7049
|
+
component: () => import("./Reward-DABAfCmo.js")
|
|
6986
7050
|
}
|
|
6987
7051
|
]
|
|
6988
7052
|
},
|
|
@@ -7005,7 +7069,7 @@ const Yt = [
|
|
|
7005
7069
|
{
|
|
7006
7070
|
path: "/audit-logs",
|
|
7007
7071
|
name: h["$connect-AUDIT_LOGS"],
|
|
7008
|
-
component: () => import("./AuditLogs-
|
|
7072
|
+
component: () => import("./AuditLogs-CkpffM8N.js")
|
|
7009
7073
|
}
|
|
7010
7074
|
]
|
|
7011
7075
|
},
|
|
@@ -7028,7 +7092,7 @@ const Yt = [
|
|
|
7028
7092
|
{
|
|
7029
7093
|
path: "/setting",
|
|
7030
7094
|
name: h["$connect-SETTING"],
|
|
7031
|
-
component: () => import("./Setting-
|
|
7095
|
+
component: () => import("./Setting-DTFpHJd7.js")
|
|
7032
7096
|
}
|
|
7033
7097
|
]
|
|
7034
7098
|
},
|
|
@@ -7051,7 +7115,7 @@ const Yt = [
|
|
|
7051
7115
|
{
|
|
7052
7116
|
path: "/bin",
|
|
7053
7117
|
name: h["$connect-BIN"],
|
|
7054
|
-
component: () => import("./Bin-
|
|
7118
|
+
component: () => import("./Bin-D3JHC66F.js")
|
|
7055
7119
|
}
|
|
7056
7120
|
]
|
|
7057
7121
|
},
|
|
@@ -7074,7 +7138,7 @@ const Yt = [
|
|
|
7074
7138
|
{
|
|
7075
7139
|
path: "/queue",
|
|
7076
7140
|
name: h["$connect-QUEUE"],
|
|
7077
|
-
component: () => import("./Queue-
|
|
7141
|
+
component: () => import("./Queue-MOdvEl5u.js")
|
|
7078
7142
|
}
|
|
7079
7143
|
]
|
|
7080
7144
|
}
|
|
@@ -7083,9 +7147,9 @@ const Yt = [
|
|
|
7083
7147
|
"zh-CN": $e,
|
|
7084
7148
|
"th-TH": qe,
|
|
7085
7149
|
"zh-Hant": Ye
|
|
7086
|
-
},
|
|
7150
|
+
}, ea = T(() => import("./App-DkBJoQa2.js"));
|
|
7087
7151
|
export {
|
|
7088
|
-
|
|
7152
|
+
ea as F,
|
|
7089
7153
|
h as R,
|
|
7090
7154
|
c as Z,
|
|
7091
7155
|
l as a,
|