sixseconds-modules 1.6.147 → 1.6.148
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/index.cjs.js +646 -262
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +646 -262
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -549,10 +549,10 @@ function isFunction$2(value) {
|
|
|
549
549
|
return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
|
|
550
550
|
}
|
|
551
551
|
var coreJsData = root["__core-js_shared__"];
|
|
552
|
-
var maskSrcKey =
|
|
552
|
+
var maskSrcKey = function() {
|
|
553
553
|
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
554
554
|
return uid ? "Symbol(src)_1." + uid : "";
|
|
555
|
-
}
|
|
555
|
+
}();
|
|
556
556
|
function isMasked(func) {
|
|
557
557
|
return !!maskSrcKey && maskSrcKey in func;
|
|
558
558
|
}
|
|
@@ -721,14 +721,14 @@ function arrayEach(array2, iteratee) {
|
|
|
721
721
|
}
|
|
722
722
|
return array2;
|
|
723
723
|
}
|
|
724
|
-
var defineProperty =
|
|
724
|
+
var defineProperty = function() {
|
|
725
725
|
try {
|
|
726
726
|
var func = getNative(Object, "defineProperty");
|
|
727
727
|
func({}, "", {});
|
|
728
728
|
return func;
|
|
729
729
|
} catch (e) {
|
|
730
730
|
}
|
|
731
|
-
}
|
|
731
|
+
}();
|
|
732
732
|
function baseAssignValue(object2, key, value) {
|
|
733
733
|
if (key == "__proto__" && defineProperty) {
|
|
734
734
|
defineProperty(object2, key, {
|
|
@@ -781,9 +781,9 @@ function baseIsArguments(value) {
|
|
|
781
781
|
var objectProto$6 = Object.prototype;
|
|
782
782
|
var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
|
|
783
783
|
var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
|
|
784
|
-
var isArguments = baseIsArguments(/* @__PURE__ */
|
|
784
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
785
785
|
return arguments;
|
|
786
|
-
}
|
|
786
|
+
}()) ? baseIsArguments : function(value) {
|
|
787
787
|
return isObjectLike(value) && hasOwnProperty$4.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
788
788
|
};
|
|
789
789
|
var isArray$1 = Array.isArray;
|
|
@@ -824,7 +824,7 @@ var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType &
|
|
|
824
824
|
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
825
825
|
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
826
826
|
var freeProcess = moduleExports$1 && freeGlobal.process;
|
|
827
|
-
var nodeUtil =
|
|
827
|
+
var nodeUtil = function() {
|
|
828
828
|
try {
|
|
829
829
|
var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
|
|
830
830
|
if (types) {
|
|
@@ -833,7 +833,7 @@ var nodeUtil = (function() {
|
|
|
833
833
|
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
834
834
|
} catch (e) {
|
|
835
835
|
}
|
|
836
|
-
}
|
|
836
|
+
}();
|
|
837
837
|
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
838
838
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
839
839
|
var objectProto$5 = Object.prototype;
|
|
@@ -1084,7 +1084,7 @@ function initCloneByTag(object2, tag, isDeep) {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
}
|
|
1086
1086
|
var objectCreate = Object.create;
|
|
1087
|
-
var baseCreate = /* @__PURE__ */
|
|
1087
|
+
var baseCreate = /* @__PURE__ */ function() {
|
|
1088
1088
|
function object2() {
|
|
1089
1089
|
}
|
|
1090
1090
|
return function(proto2) {
|
|
@@ -1099,7 +1099,7 @@ var baseCreate = /* @__PURE__ */ (function() {
|
|
|
1099
1099
|
object2.prototype = void 0;
|
|
1100
1100
|
return result;
|
|
1101
1101
|
};
|
|
1102
|
-
}
|
|
1102
|
+
}();
|
|
1103
1103
|
function initCloneObject(object2) {
|
|
1104
1104
|
return typeof object2.constructor == "function" && !isPrototype(object2) ? baseCreate(getPrototype(object2)) : {};
|
|
1105
1105
|
}
|
|
@@ -1361,7 +1361,7 @@ function requireReactIs_production_min() {
|
|
|
1361
1361
|
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
1362
1362
|
hasRequiredReactIs_production_min = 1;
|
|
1363
1363
|
var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
|
|
1364
|
-
function
|
|
1364
|
+
function z2(a) {
|
|
1365
1365
|
if ("object" === typeof a && null !== a) {
|
|
1366
1366
|
var u = a.$$typeof;
|
|
1367
1367
|
switch (u) {
|
|
@@ -1392,7 +1392,7 @@ function requireReactIs_production_min() {
|
|
|
1392
1392
|
}
|
|
1393
1393
|
}
|
|
1394
1394
|
function A(a) {
|
|
1395
|
-
return
|
|
1395
|
+
return z2(a) === m;
|
|
1396
1396
|
}
|
|
1397
1397
|
reactIs_production_min.AsyncMode = l;
|
|
1398
1398
|
reactIs_production_min.ConcurrentMode = m;
|
|
@@ -1408,46 +1408,46 @@ function requireReactIs_production_min() {
|
|
|
1408
1408
|
reactIs_production_min.StrictMode = f;
|
|
1409
1409
|
reactIs_production_min.Suspense = p;
|
|
1410
1410
|
reactIs_production_min.isAsyncMode = function(a) {
|
|
1411
|
-
return A(a) ||
|
|
1411
|
+
return A(a) || z2(a) === l;
|
|
1412
1412
|
};
|
|
1413
1413
|
reactIs_production_min.isConcurrentMode = A;
|
|
1414
1414
|
reactIs_production_min.isContextConsumer = function(a) {
|
|
1415
|
-
return
|
|
1415
|
+
return z2(a) === k;
|
|
1416
1416
|
};
|
|
1417
1417
|
reactIs_production_min.isContextProvider = function(a) {
|
|
1418
|
-
return
|
|
1418
|
+
return z2(a) === h;
|
|
1419
1419
|
};
|
|
1420
1420
|
reactIs_production_min.isElement = function(a) {
|
|
1421
1421
|
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
1422
1422
|
};
|
|
1423
1423
|
reactIs_production_min.isForwardRef = function(a) {
|
|
1424
|
-
return
|
|
1424
|
+
return z2(a) === n;
|
|
1425
1425
|
};
|
|
1426
1426
|
reactIs_production_min.isFragment = function(a) {
|
|
1427
|
-
return
|
|
1427
|
+
return z2(a) === e;
|
|
1428
1428
|
};
|
|
1429
1429
|
reactIs_production_min.isLazy = function(a) {
|
|
1430
|
-
return
|
|
1430
|
+
return z2(a) === t;
|
|
1431
1431
|
};
|
|
1432
1432
|
reactIs_production_min.isMemo = function(a) {
|
|
1433
|
-
return
|
|
1433
|
+
return z2(a) === r;
|
|
1434
1434
|
};
|
|
1435
1435
|
reactIs_production_min.isPortal = function(a) {
|
|
1436
|
-
return
|
|
1436
|
+
return z2(a) === d;
|
|
1437
1437
|
};
|
|
1438
1438
|
reactIs_production_min.isProfiler = function(a) {
|
|
1439
|
-
return
|
|
1439
|
+
return z2(a) === g;
|
|
1440
1440
|
};
|
|
1441
1441
|
reactIs_production_min.isStrictMode = function(a) {
|
|
1442
|
-
return
|
|
1442
|
+
return z2(a) === f;
|
|
1443
1443
|
};
|
|
1444
1444
|
reactIs_production_min.isSuspense = function(a) {
|
|
1445
|
-
return
|
|
1445
|
+
return z2(a) === p;
|
|
1446
1446
|
};
|
|
1447
1447
|
reactIs_production_min.isValidElementType = function(a) {
|
|
1448
1448
|
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
1449
1449
|
};
|
|
1450
|
-
reactIs_production_min.typeOf =
|
|
1450
|
+
reactIs_production_min.typeOf = z2;
|
|
1451
1451
|
return reactIs_production_min;
|
|
1452
1452
|
}
|
|
1453
1453
|
var reactIs_development = {};
|
|
@@ -2213,16 +2213,15 @@ function useFormik(_ref) {
|
|
|
2213
2213
|
});
|
|
2214
2214
|
}, []);
|
|
2215
2215
|
var setFieldValue = useEventCallback(function(field, value, shouldValidate) {
|
|
2216
|
-
var resolvedValue = isFunction$1(value) ? value(getIn$1(state.values, field)) : value;
|
|
2217
2216
|
dispatch({
|
|
2218
2217
|
type: "SET_FIELD_VALUE",
|
|
2219
2218
|
payload: {
|
|
2220
2219
|
field,
|
|
2221
|
-
value
|
|
2220
|
+
value
|
|
2222
2221
|
}
|
|
2223
2222
|
});
|
|
2224
2223
|
var willValidate = shouldValidate === void 0 ? validateOnChange : shouldValidate;
|
|
2225
|
-
return willValidate ? validateFormWithHighPriority(setIn(state.values, field,
|
|
2224
|
+
return willValidate ? validateFormWithHighPriority(setIn(state.values, field, value)) : Promise.resolve();
|
|
2226
2225
|
});
|
|
2227
2226
|
var executeChange = React.useCallback(function(eventOrTextValue, maybePath) {
|
|
2228
2227
|
var field = maybePath;
|
|
@@ -2677,8 +2676,7 @@ function createEnv(opts) {
|
|
|
2677
2676
|
}
|
|
2678
2677
|
var util;
|
|
2679
2678
|
(function(util2) {
|
|
2680
|
-
util2.assertEqual = (
|
|
2681
|
-
};
|
|
2679
|
+
util2.assertEqual = (val) => val;
|
|
2682
2680
|
function assertIs(_arg) {
|
|
2683
2681
|
}
|
|
2684
2682
|
util2.assertIs = assertIs;
|
|
@@ -2722,7 +2720,7 @@ var util;
|
|
|
2722
2720
|
}
|
|
2723
2721
|
return void 0;
|
|
2724
2722
|
};
|
|
2725
|
-
util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" &&
|
|
2723
|
+
util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
|
|
2726
2724
|
function joinValues(array2, separator = " | ") {
|
|
2727
2725
|
return array2.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
|
|
2728
2726
|
}
|
|
@@ -2774,7 +2772,7 @@ const getParsedType = (data) => {
|
|
|
2774
2772
|
case "string":
|
|
2775
2773
|
return ZodParsedType.string;
|
|
2776
2774
|
case "number":
|
|
2777
|
-
return
|
|
2775
|
+
return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
|
|
2778
2776
|
case "boolean":
|
|
2779
2777
|
return ZodParsedType.boolean;
|
|
2780
2778
|
case "function":
|
|
@@ -2825,6 +2823,10 @@ const ZodIssueCode = util.arrayToEnum([
|
|
|
2825
2823
|
"not_multiple_of",
|
|
2826
2824
|
"not_finite"
|
|
2827
2825
|
]);
|
|
2826
|
+
const quotelessJson = (obj) => {
|
|
2827
|
+
const json = JSON.stringify(obj, null, 2);
|
|
2828
|
+
return json.replace(/"([^"]+)":/g, "$1:");
|
|
2829
|
+
};
|
|
2828
2830
|
class ZodError extends Error {
|
|
2829
2831
|
get errors() {
|
|
2830
2832
|
return this.issues;
|
|
@@ -2902,9 +2904,8 @@ class ZodError extends Error {
|
|
|
2902
2904
|
const formErrors = [];
|
|
2903
2905
|
for (const sub of this.issues) {
|
|
2904
2906
|
if (sub.path.length > 0) {
|
|
2905
|
-
|
|
2906
|
-
fieldErrors[
|
|
2907
|
-
fieldErrors[firstEl].push(mapper(sub));
|
|
2907
|
+
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
2908
|
+
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
2908
2909
|
} else {
|
|
2909
2910
|
formErrors.push(mapper(sub));
|
|
2910
2911
|
}
|
|
@@ -2980,8 +2981,6 @@ const errorMap = (issue, _ctx) => {
|
|
|
2980
2981
|
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
2981
2982
|
else if (issue.type === "number")
|
|
2982
2983
|
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
2983
|
-
else if (issue.type === "bigint")
|
|
2984
|
-
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
2985
2984
|
else if (issue.type === "date")
|
|
2986
2985
|
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
|
|
2987
2986
|
else
|
|
@@ -3020,6 +3019,9 @@ const errorMap = (issue, _ctx) => {
|
|
|
3020
3019
|
return { message };
|
|
3021
3020
|
};
|
|
3022
3021
|
let overrideErrorMap = errorMap;
|
|
3022
|
+
function setErrorMap(map2) {
|
|
3023
|
+
overrideErrorMap = map2;
|
|
3024
|
+
}
|
|
3023
3025
|
function getErrorMap() {
|
|
3024
3026
|
return overrideErrorMap;
|
|
3025
3027
|
}
|
|
@@ -3048,6 +3050,7 @@ const makeIssue = (params) => {
|
|
|
3048
3050
|
message: errorMessage
|
|
3049
3051
|
};
|
|
3050
3052
|
};
|
|
3053
|
+
const EMPTY_PATH = [];
|
|
3051
3054
|
function addIssueToContext(ctx, issueData) {
|
|
3052
3055
|
const overrideMap = getErrorMap();
|
|
3053
3056
|
const issue = makeIssue({
|
|
@@ -3130,11 +3133,24 @@ const isAborted = (x) => x.status === "aborted";
|
|
|
3130
3133
|
const isDirty = (x) => x.status === "dirty";
|
|
3131
3134
|
const isValid$3 = (x) => x.status === "valid";
|
|
3132
3135
|
const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
3136
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
3137
|
+
if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
3138
|
+
return state.get(receiver);
|
|
3139
|
+
}
|
|
3140
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
3141
|
+
if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
3142
|
+
return state.set(receiver, value), value;
|
|
3143
|
+
}
|
|
3144
|
+
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
3145
|
+
var e = new Error(message);
|
|
3146
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
3147
|
+
};
|
|
3133
3148
|
var errorUtil;
|
|
3134
3149
|
(function(errorUtil2) {
|
|
3135
3150
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
3136
|
-
errorUtil2.toString = (message) => typeof message === "string" ? message : message
|
|
3151
|
+
errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
|
|
3137
3152
|
})(errorUtil || (errorUtil = {}));
|
|
3153
|
+
var _ZodEnum_cache, _ZodNativeEnum_cache;
|
|
3138
3154
|
class ParseInputLazyPath {
|
|
3139
3155
|
constructor(parent, value, path, key) {
|
|
3140
3156
|
this._cachedPath = [];
|
|
@@ -3145,7 +3161,7 @@ class ParseInputLazyPath {
|
|
|
3145
3161
|
}
|
|
3146
3162
|
get path() {
|
|
3147
3163
|
if (!this._cachedPath.length) {
|
|
3148
|
-
if (
|
|
3164
|
+
if (this._key instanceof Array) {
|
|
3149
3165
|
this._cachedPath.push(...this._path, ...this._key);
|
|
3150
3166
|
} else {
|
|
3151
3167
|
this._cachedPath.push(...this._path, this._key);
|
|
@@ -3183,16 +3199,17 @@ function processCreateParams(params) {
|
|
|
3183
3199
|
if (errorMap2)
|
|
3184
3200
|
return { errorMap: errorMap2, description };
|
|
3185
3201
|
const customMap = (iss, ctx) => {
|
|
3202
|
+
var _a, _b;
|
|
3186
3203
|
const { message } = params;
|
|
3187
3204
|
if (iss.code === "invalid_enum_value") {
|
|
3188
|
-
return { message: message
|
|
3205
|
+
return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
|
|
3189
3206
|
}
|
|
3190
3207
|
if (typeof ctx.data === "undefined") {
|
|
3191
|
-
return { message: message
|
|
3208
|
+
return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
|
|
3192
3209
|
}
|
|
3193
3210
|
if (iss.code !== "invalid_type")
|
|
3194
3211
|
return { message: ctx.defaultError };
|
|
3195
|
-
return { message: message
|
|
3212
|
+
return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
|
|
3196
3213
|
};
|
|
3197
3214
|
return { errorMap: customMap, description };
|
|
3198
3215
|
}
|
|
@@ -3244,13 +3261,14 @@ class ZodType {
|
|
|
3244
3261
|
throw result.error;
|
|
3245
3262
|
}
|
|
3246
3263
|
safeParse(data, params) {
|
|
3264
|
+
var _a;
|
|
3247
3265
|
const ctx = {
|
|
3248
3266
|
common: {
|
|
3249
3267
|
issues: [],
|
|
3250
|
-
async: params
|
|
3251
|
-
contextualErrorMap: params
|
|
3268
|
+
async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
|
|
3269
|
+
contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
|
|
3252
3270
|
},
|
|
3253
|
-
path: params
|
|
3271
|
+
path: (params === null || params === void 0 ? void 0 : params.path) || [],
|
|
3254
3272
|
schemaErrorMap: this._def.errorMap,
|
|
3255
3273
|
parent: null,
|
|
3256
3274
|
data,
|
|
@@ -3260,6 +3278,7 @@ class ZodType {
|
|
|
3260
3278
|
return handleResult(ctx, result);
|
|
3261
3279
|
}
|
|
3262
3280
|
"~validate"(data) {
|
|
3281
|
+
var _a, _b;
|
|
3263
3282
|
const ctx = {
|
|
3264
3283
|
common: {
|
|
3265
3284
|
issues: [],
|
|
@@ -3280,7 +3299,7 @@ class ZodType {
|
|
|
3280
3299
|
issues: ctx.common.issues
|
|
3281
3300
|
};
|
|
3282
3301
|
} catch (err) {
|
|
3283
|
-
if (err
|
|
3302
|
+
if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes("encountered")) {
|
|
3284
3303
|
this["~standard"].async = true;
|
|
3285
3304
|
}
|
|
3286
3305
|
ctx.common = {
|
|
@@ -3305,10 +3324,10 @@ class ZodType {
|
|
|
3305
3324
|
const ctx = {
|
|
3306
3325
|
common: {
|
|
3307
3326
|
issues: [],
|
|
3308
|
-
contextualErrorMap: params
|
|
3327
|
+
contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
|
|
3309
3328
|
async: true
|
|
3310
3329
|
},
|
|
3311
|
-
path: params
|
|
3330
|
+
path: (params === null || params === void 0 ? void 0 : params.path) || [],
|
|
3312
3331
|
schemaErrorMap: this._def.errorMap,
|
|
3313
3332
|
parent: null,
|
|
3314
3333
|
data,
|
|
@@ -3533,20 +3552,16 @@ function isValidJWT(jwt, alg) {
|
|
|
3533
3552
|
return false;
|
|
3534
3553
|
try {
|
|
3535
3554
|
const [header] = jwt.split(".");
|
|
3536
|
-
if (!header)
|
|
3537
|
-
return false;
|
|
3538
3555
|
const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
|
|
3539
3556
|
const decoded = JSON.parse(atob(base64));
|
|
3540
3557
|
if (typeof decoded !== "object" || decoded === null)
|
|
3541
3558
|
return false;
|
|
3542
|
-
if (
|
|
3543
|
-
return false;
|
|
3544
|
-
if (!decoded.alg)
|
|
3559
|
+
if (!decoded.typ || !decoded.alg)
|
|
3545
3560
|
return false;
|
|
3546
3561
|
if (alg && decoded.alg !== alg)
|
|
3547
3562
|
return false;
|
|
3548
3563
|
return true;
|
|
3549
|
-
} catch {
|
|
3564
|
+
} catch (_a) {
|
|
3550
3565
|
return false;
|
|
3551
3566
|
}
|
|
3552
3567
|
}
|
|
@@ -3705,7 +3720,7 @@ class ZodString extends ZodType {
|
|
|
3705
3720
|
} else if (check.kind === "url") {
|
|
3706
3721
|
try {
|
|
3707
3722
|
new URL(input.data);
|
|
3708
|
-
} catch {
|
|
3723
|
+
} catch (_a) {
|
|
3709
3724
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
3710
3725
|
addIssueToContext(ctx, {
|
|
3711
3726
|
validation: "url",
|
|
@@ -3917,6 +3932,7 @@ class ZodString extends ZodType {
|
|
|
3917
3932
|
return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
|
|
3918
3933
|
}
|
|
3919
3934
|
datetime(options) {
|
|
3935
|
+
var _a, _b;
|
|
3920
3936
|
if (typeof options === "string") {
|
|
3921
3937
|
return this._addCheck({
|
|
3922
3938
|
kind: "datetime",
|
|
@@ -3928,10 +3944,10 @@ class ZodString extends ZodType {
|
|
|
3928
3944
|
}
|
|
3929
3945
|
return this._addCheck({
|
|
3930
3946
|
kind: "datetime",
|
|
3931
|
-
precision: typeof options
|
|
3932
|
-
offset: options
|
|
3933
|
-
local: options
|
|
3934
|
-
...errorUtil.errToObj(options
|
|
3947
|
+
precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
|
|
3948
|
+
offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
|
|
3949
|
+
local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
|
|
3950
|
+
...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
|
|
3935
3951
|
});
|
|
3936
3952
|
}
|
|
3937
3953
|
date(message) {
|
|
@@ -3947,8 +3963,8 @@ class ZodString extends ZodType {
|
|
|
3947
3963
|
}
|
|
3948
3964
|
return this._addCheck({
|
|
3949
3965
|
kind: "time",
|
|
3950
|
-
precision: typeof options
|
|
3951
|
-
...errorUtil.errToObj(options
|
|
3966
|
+
precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
|
|
3967
|
+
...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
|
|
3952
3968
|
});
|
|
3953
3969
|
}
|
|
3954
3970
|
duration(message) {
|
|
@@ -3965,8 +3981,8 @@ class ZodString extends ZodType {
|
|
|
3965
3981
|
return this._addCheck({
|
|
3966
3982
|
kind: "includes",
|
|
3967
3983
|
value,
|
|
3968
|
-
position: options
|
|
3969
|
-
...errorUtil.errToObj(options
|
|
3984
|
+
position: options === null || options === void 0 ? void 0 : options.position,
|
|
3985
|
+
...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
|
|
3970
3986
|
});
|
|
3971
3987
|
}
|
|
3972
3988
|
startsWith(value, message) {
|
|
@@ -4098,10 +4114,11 @@ class ZodString extends ZodType {
|
|
|
4098
4114
|
}
|
|
4099
4115
|
}
|
|
4100
4116
|
ZodString.create = (params) => {
|
|
4117
|
+
var _a;
|
|
4101
4118
|
return new ZodString({
|
|
4102
4119
|
checks: [],
|
|
4103
4120
|
typeName: ZodFirstPartyTypeKind.ZodString,
|
|
4104
|
-
coerce: params
|
|
4121
|
+
coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
|
|
4105
4122
|
...processCreateParams(params)
|
|
4106
4123
|
});
|
|
4107
4124
|
};
|
|
@@ -4109,9 +4126,9 @@ function floatSafeRemainder(val, step) {
|
|
|
4109
4126
|
const valDecCount = (val.toString().split(".")[1] || "").length;
|
|
4110
4127
|
const stepDecCount = (step.toString().split(".")[1] || "").length;
|
|
4111
4128
|
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
4112
|
-
const valInt =
|
|
4113
|
-
const stepInt =
|
|
4114
|
-
return valInt % stepInt / 10
|
|
4129
|
+
const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
|
|
4130
|
+
const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
|
|
4131
|
+
return valInt % stepInt / Math.pow(10, decCount);
|
|
4115
4132
|
}
|
|
4116
4133
|
class ZodNumber extends ZodType {
|
|
4117
4134
|
constructor() {
|
|
@@ -4321,8 +4338,7 @@ class ZodNumber extends ZodType {
|
|
|
4321
4338
|
return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
|
|
4322
4339
|
}
|
|
4323
4340
|
get isFinite() {
|
|
4324
|
-
let max2 = null;
|
|
4325
|
-
let min2 = null;
|
|
4341
|
+
let max2 = null, min2 = null;
|
|
4326
4342
|
for (const ch of this._def.checks) {
|
|
4327
4343
|
if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
|
|
4328
4344
|
return true;
|
|
@@ -4341,7 +4357,7 @@ ZodNumber.create = (params) => {
|
|
|
4341
4357
|
return new ZodNumber({
|
|
4342
4358
|
checks: [],
|
|
4343
4359
|
typeName: ZodFirstPartyTypeKind.ZodNumber,
|
|
4344
|
-
coerce: params
|
|
4360
|
+
coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
|
|
4345
4361
|
...processCreateParams(params)
|
|
4346
4362
|
});
|
|
4347
4363
|
};
|
|
@@ -4355,7 +4371,7 @@ class ZodBigInt extends ZodType {
|
|
|
4355
4371
|
if (this._def.coerce) {
|
|
4356
4372
|
try {
|
|
4357
4373
|
input.data = BigInt(input.data);
|
|
4358
|
-
} catch {
|
|
4374
|
+
} catch (_a) {
|
|
4359
4375
|
return this._getInvalidInput(input);
|
|
4360
4376
|
}
|
|
4361
4377
|
}
|
|
@@ -4510,10 +4526,11 @@ class ZodBigInt extends ZodType {
|
|
|
4510
4526
|
}
|
|
4511
4527
|
}
|
|
4512
4528
|
ZodBigInt.create = (params) => {
|
|
4529
|
+
var _a;
|
|
4513
4530
|
return new ZodBigInt({
|
|
4514
4531
|
checks: [],
|
|
4515
4532
|
typeName: ZodFirstPartyTypeKind.ZodBigInt,
|
|
4516
|
-
coerce: params
|
|
4533
|
+
coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
|
|
4517
4534
|
...processCreateParams(params)
|
|
4518
4535
|
});
|
|
4519
4536
|
};
|
|
@@ -4538,7 +4555,7 @@ class ZodBoolean extends ZodType {
|
|
|
4538
4555
|
ZodBoolean.create = (params) => {
|
|
4539
4556
|
return new ZodBoolean({
|
|
4540
4557
|
typeName: ZodFirstPartyTypeKind.ZodBoolean,
|
|
4541
|
-
coerce: params
|
|
4558
|
+
coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
|
|
4542
4559
|
...processCreateParams(params)
|
|
4543
4560
|
});
|
|
4544
4561
|
};
|
|
@@ -4557,7 +4574,7 @@ class ZodDate extends ZodType {
|
|
|
4557
4574
|
});
|
|
4558
4575
|
return INVALID;
|
|
4559
4576
|
}
|
|
4560
|
-
if (
|
|
4577
|
+
if (isNaN(input.data.getTime())) {
|
|
4561
4578
|
const ctx2 = this._getOrReturnCtx(input);
|
|
4562
4579
|
addIssueToContext(ctx2, {
|
|
4563
4580
|
code: ZodIssueCode.invalid_date
|
|
@@ -4646,7 +4663,7 @@ class ZodDate extends ZodType {
|
|
|
4646
4663
|
ZodDate.create = (params) => {
|
|
4647
4664
|
return new ZodDate({
|
|
4648
4665
|
checks: [],
|
|
4649
|
-
coerce: params
|
|
4666
|
+
coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
|
|
4650
4667
|
typeName: ZodFirstPartyTypeKind.ZodDate,
|
|
4651
4668
|
...processCreateParams(params)
|
|
4652
4669
|
});
|
|
@@ -4921,8 +4938,7 @@ class ZodObject extends ZodType {
|
|
|
4921
4938
|
return this._cached;
|
|
4922
4939
|
const shape = this._def.shape();
|
|
4923
4940
|
const keys2 = util.objectKeys(shape);
|
|
4924
|
-
this._cached = { shape, keys: keys2 };
|
|
4925
|
-
return this._cached;
|
|
4941
|
+
return this._cached = { shape, keys: keys2 };
|
|
4926
4942
|
}
|
|
4927
4943
|
_parse(input) {
|
|
4928
4944
|
const parsedType = this._getType(input);
|
|
@@ -5020,10 +5036,11 @@ class ZodObject extends ZodType {
|
|
|
5020
5036
|
unknownKeys: "strict",
|
|
5021
5037
|
...message !== void 0 ? {
|
|
5022
5038
|
errorMap: (issue, ctx) => {
|
|
5023
|
-
|
|
5039
|
+
var _a, _b, _c, _d;
|
|
5040
|
+
const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;
|
|
5024
5041
|
if (issue.code === "unrecognized_keys")
|
|
5025
5042
|
return {
|
|
5026
|
-
message: errorUtil.errToObj(message).message
|
|
5043
|
+
message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError
|
|
5027
5044
|
};
|
|
5028
5045
|
return {
|
|
5029
5046
|
message: defaultError
|
|
@@ -5154,11 +5171,11 @@ class ZodObject extends ZodType {
|
|
|
5154
5171
|
}
|
|
5155
5172
|
pick(mask) {
|
|
5156
5173
|
const shape = {};
|
|
5157
|
-
|
|
5174
|
+
util.objectKeys(mask).forEach((key) => {
|
|
5158
5175
|
if (mask[key] && this.shape[key]) {
|
|
5159
5176
|
shape[key] = this.shape[key];
|
|
5160
5177
|
}
|
|
5161
|
-
}
|
|
5178
|
+
});
|
|
5162
5179
|
return new ZodObject({
|
|
5163
5180
|
...this._def,
|
|
5164
5181
|
shape: () => shape
|
|
@@ -5166,11 +5183,11 @@ class ZodObject extends ZodType {
|
|
|
5166
5183
|
}
|
|
5167
5184
|
omit(mask) {
|
|
5168
5185
|
const shape = {};
|
|
5169
|
-
|
|
5186
|
+
util.objectKeys(this.shape).forEach((key) => {
|
|
5170
5187
|
if (!mask[key]) {
|
|
5171
5188
|
shape[key] = this.shape[key];
|
|
5172
5189
|
}
|
|
5173
|
-
}
|
|
5190
|
+
});
|
|
5174
5191
|
return new ZodObject({
|
|
5175
5192
|
...this._def,
|
|
5176
5193
|
shape: () => shape
|
|
@@ -5184,14 +5201,14 @@ class ZodObject extends ZodType {
|
|
|
5184
5201
|
}
|
|
5185
5202
|
partial(mask) {
|
|
5186
5203
|
const newShape = {};
|
|
5187
|
-
|
|
5204
|
+
util.objectKeys(this.shape).forEach((key) => {
|
|
5188
5205
|
const fieldSchema = this.shape[key];
|
|
5189
5206
|
if (mask && !mask[key]) {
|
|
5190
5207
|
newShape[key] = fieldSchema;
|
|
5191
5208
|
} else {
|
|
5192
5209
|
newShape[key] = fieldSchema.optional();
|
|
5193
5210
|
}
|
|
5194
|
-
}
|
|
5211
|
+
});
|
|
5195
5212
|
return new ZodObject({
|
|
5196
5213
|
...this._def,
|
|
5197
5214
|
shape: () => newShape
|
|
@@ -5199,7 +5216,7 @@ class ZodObject extends ZodType {
|
|
|
5199
5216
|
}
|
|
5200
5217
|
required(mask) {
|
|
5201
5218
|
const newShape = {};
|
|
5202
|
-
|
|
5219
|
+
util.objectKeys(this.shape).forEach((key) => {
|
|
5203
5220
|
if (mask && !mask[key]) {
|
|
5204
5221
|
newShape[key] = this.shape[key];
|
|
5205
5222
|
} else {
|
|
@@ -5210,7 +5227,7 @@ class ZodObject extends ZodType {
|
|
|
5210
5227
|
}
|
|
5211
5228
|
newShape[key] = newField;
|
|
5212
5229
|
}
|
|
5213
|
-
}
|
|
5230
|
+
});
|
|
5214
5231
|
return new ZodObject({
|
|
5215
5232
|
...this._def,
|
|
5216
5233
|
shape: () => newShape
|
|
@@ -5338,6 +5355,113 @@ ZodUnion.create = (types, params) => {
|
|
|
5338
5355
|
...processCreateParams(params)
|
|
5339
5356
|
});
|
|
5340
5357
|
};
|
|
5358
|
+
const getDiscriminator = (type) => {
|
|
5359
|
+
if (type instanceof ZodLazy) {
|
|
5360
|
+
return getDiscriminator(type.schema);
|
|
5361
|
+
} else if (type instanceof ZodEffects) {
|
|
5362
|
+
return getDiscriminator(type.innerType());
|
|
5363
|
+
} else if (type instanceof ZodLiteral) {
|
|
5364
|
+
return [type.value];
|
|
5365
|
+
} else if (type instanceof ZodEnum) {
|
|
5366
|
+
return type.options;
|
|
5367
|
+
} else if (type instanceof ZodNativeEnum) {
|
|
5368
|
+
return util.objectValues(type.enum);
|
|
5369
|
+
} else if (type instanceof ZodDefault) {
|
|
5370
|
+
return getDiscriminator(type._def.innerType);
|
|
5371
|
+
} else if (type instanceof ZodUndefined) {
|
|
5372
|
+
return [void 0];
|
|
5373
|
+
} else if (type instanceof ZodNull) {
|
|
5374
|
+
return [null];
|
|
5375
|
+
} else if (type instanceof ZodOptional) {
|
|
5376
|
+
return [void 0, ...getDiscriminator(type.unwrap())];
|
|
5377
|
+
} else if (type instanceof ZodNullable) {
|
|
5378
|
+
return [null, ...getDiscriminator(type.unwrap())];
|
|
5379
|
+
} else if (type instanceof ZodBranded) {
|
|
5380
|
+
return getDiscriminator(type.unwrap());
|
|
5381
|
+
} else if (type instanceof ZodReadonly) {
|
|
5382
|
+
return getDiscriminator(type.unwrap());
|
|
5383
|
+
} else if (type instanceof ZodCatch) {
|
|
5384
|
+
return getDiscriminator(type._def.innerType);
|
|
5385
|
+
} else {
|
|
5386
|
+
return [];
|
|
5387
|
+
}
|
|
5388
|
+
};
|
|
5389
|
+
class ZodDiscriminatedUnion extends ZodType {
|
|
5390
|
+
_parse(input) {
|
|
5391
|
+
const { ctx } = this._processInputParams(input);
|
|
5392
|
+
if (ctx.parsedType !== ZodParsedType.object) {
|
|
5393
|
+
addIssueToContext(ctx, {
|
|
5394
|
+
code: ZodIssueCode.invalid_type,
|
|
5395
|
+
expected: ZodParsedType.object,
|
|
5396
|
+
received: ctx.parsedType
|
|
5397
|
+
});
|
|
5398
|
+
return INVALID;
|
|
5399
|
+
}
|
|
5400
|
+
const discriminator = this.discriminator;
|
|
5401
|
+
const discriminatorValue = ctx.data[discriminator];
|
|
5402
|
+
const option = this.optionsMap.get(discriminatorValue);
|
|
5403
|
+
if (!option) {
|
|
5404
|
+
addIssueToContext(ctx, {
|
|
5405
|
+
code: ZodIssueCode.invalid_union_discriminator,
|
|
5406
|
+
options: Array.from(this.optionsMap.keys()),
|
|
5407
|
+
path: [discriminator]
|
|
5408
|
+
});
|
|
5409
|
+
return INVALID;
|
|
5410
|
+
}
|
|
5411
|
+
if (ctx.common.async) {
|
|
5412
|
+
return option._parseAsync({
|
|
5413
|
+
data: ctx.data,
|
|
5414
|
+
path: ctx.path,
|
|
5415
|
+
parent: ctx
|
|
5416
|
+
});
|
|
5417
|
+
} else {
|
|
5418
|
+
return option._parseSync({
|
|
5419
|
+
data: ctx.data,
|
|
5420
|
+
path: ctx.path,
|
|
5421
|
+
parent: ctx
|
|
5422
|
+
});
|
|
5423
|
+
}
|
|
5424
|
+
}
|
|
5425
|
+
get discriminator() {
|
|
5426
|
+
return this._def.discriminator;
|
|
5427
|
+
}
|
|
5428
|
+
get options() {
|
|
5429
|
+
return this._def.options;
|
|
5430
|
+
}
|
|
5431
|
+
get optionsMap() {
|
|
5432
|
+
return this._def.optionsMap;
|
|
5433
|
+
}
|
|
5434
|
+
/**
|
|
5435
|
+
* The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
|
|
5436
|
+
* However, it only allows a union of objects, all of which need to share a discriminator property. This property must
|
|
5437
|
+
* have a different value for each object in the union.
|
|
5438
|
+
* @param discriminator the name of the discriminator property
|
|
5439
|
+
* @param types an array of object schemas
|
|
5440
|
+
* @param params
|
|
5441
|
+
*/
|
|
5442
|
+
static create(discriminator, options, params) {
|
|
5443
|
+
const optionsMap = /* @__PURE__ */ new Map();
|
|
5444
|
+
for (const type of options) {
|
|
5445
|
+
const discriminatorValues = getDiscriminator(type.shape[discriminator]);
|
|
5446
|
+
if (!discriminatorValues.length) {
|
|
5447
|
+
throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
|
|
5448
|
+
}
|
|
5449
|
+
for (const value of discriminatorValues) {
|
|
5450
|
+
if (optionsMap.has(value)) {
|
|
5451
|
+
throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
|
|
5452
|
+
}
|
|
5453
|
+
optionsMap.set(value, type);
|
|
5454
|
+
}
|
|
5455
|
+
}
|
|
5456
|
+
return new ZodDiscriminatedUnion({
|
|
5457
|
+
typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,
|
|
5458
|
+
discriminator,
|
|
5459
|
+
options,
|
|
5460
|
+
optionsMap,
|
|
5461
|
+
...processCreateParams(params)
|
|
5462
|
+
});
|
|
5463
|
+
}
|
|
5464
|
+
}
|
|
5341
5465
|
function mergeValues(a, b) {
|
|
5342
5466
|
const aType = getParsedType(a);
|
|
5343
5467
|
const bType = getParsedType(b);
|
|
@@ -5496,6 +5620,59 @@ ZodTuple.create = (schemas, params) => {
|
|
|
5496
5620
|
...processCreateParams(params)
|
|
5497
5621
|
});
|
|
5498
5622
|
};
|
|
5623
|
+
class ZodRecord extends ZodType {
|
|
5624
|
+
get keySchema() {
|
|
5625
|
+
return this._def.keyType;
|
|
5626
|
+
}
|
|
5627
|
+
get valueSchema() {
|
|
5628
|
+
return this._def.valueType;
|
|
5629
|
+
}
|
|
5630
|
+
_parse(input) {
|
|
5631
|
+
const { status, ctx } = this._processInputParams(input);
|
|
5632
|
+
if (ctx.parsedType !== ZodParsedType.object) {
|
|
5633
|
+
addIssueToContext(ctx, {
|
|
5634
|
+
code: ZodIssueCode.invalid_type,
|
|
5635
|
+
expected: ZodParsedType.object,
|
|
5636
|
+
received: ctx.parsedType
|
|
5637
|
+
});
|
|
5638
|
+
return INVALID;
|
|
5639
|
+
}
|
|
5640
|
+
const pairs = [];
|
|
5641
|
+
const keyType = this._def.keyType;
|
|
5642
|
+
const valueType = this._def.valueType;
|
|
5643
|
+
for (const key in ctx.data) {
|
|
5644
|
+
pairs.push({
|
|
5645
|
+
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
|
|
5646
|
+
value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
|
|
5647
|
+
alwaysSet: key in ctx.data
|
|
5648
|
+
});
|
|
5649
|
+
}
|
|
5650
|
+
if (ctx.common.async) {
|
|
5651
|
+
return ParseStatus.mergeObjectAsync(status, pairs);
|
|
5652
|
+
} else {
|
|
5653
|
+
return ParseStatus.mergeObjectSync(status, pairs);
|
|
5654
|
+
}
|
|
5655
|
+
}
|
|
5656
|
+
get element() {
|
|
5657
|
+
return this._def.valueType;
|
|
5658
|
+
}
|
|
5659
|
+
static create(first, second, third) {
|
|
5660
|
+
if (second instanceof ZodType) {
|
|
5661
|
+
return new ZodRecord({
|
|
5662
|
+
keyType: first,
|
|
5663
|
+
valueType: second,
|
|
5664
|
+
typeName: ZodFirstPartyTypeKind.ZodRecord,
|
|
5665
|
+
...processCreateParams(third)
|
|
5666
|
+
});
|
|
5667
|
+
}
|
|
5668
|
+
return new ZodRecord({
|
|
5669
|
+
keyType: ZodString.create(),
|
|
5670
|
+
valueType: first,
|
|
5671
|
+
typeName: ZodFirstPartyTypeKind.ZodRecord,
|
|
5672
|
+
...processCreateParams(second)
|
|
5673
|
+
});
|
|
5674
|
+
}
|
|
5675
|
+
}
|
|
5499
5676
|
class ZodMap extends ZodType {
|
|
5500
5677
|
get keySchema() {
|
|
5501
5678
|
return this._def.keyType;
|
|
@@ -5647,6 +5824,121 @@ ZodSet.create = (valueType, params) => {
|
|
|
5647
5824
|
...processCreateParams(params)
|
|
5648
5825
|
});
|
|
5649
5826
|
};
|
|
5827
|
+
class ZodFunction extends ZodType {
|
|
5828
|
+
constructor() {
|
|
5829
|
+
super(...arguments);
|
|
5830
|
+
this.validate = this.implement;
|
|
5831
|
+
}
|
|
5832
|
+
_parse(input) {
|
|
5833
|
+
const { ctx } = this._processInputParams(input);
|
|
5834
|
+
if (ctx.parsedType !== ZodParsedType.function) {
|
|
5835
|
+
addIssueToContext(ctx, {
|
|
5836
|
+
code: ZodIssueCode.invalid_type,
|
|
5837
|
+
expected: ZodParsedType.function,
|
|
5838
|
+
received: ctx.parsedType
|
|
5839
|
+
});
|
|
5840
|
+
return INVALID;
|
|
5841
|
+
}
|
|
5842
|
+
function makeArgsIssue(args, error) {
|
|
5843
|
+
return makeIssue({
|
|
5844
|
+
data: args,
|
|
5845
|
+
path: ctx.path,
|
|
5846
|
+
errorMaps: [
|
|
5847
|
+
ctx.common.contextualErrorMap,
|
|
5848
|
+
ctx.schemaErrorMap,
|
|
5849
|
+
getErrorMap(),
|
|
5850
|
+
errorMap
|
|
5851
|
+
].filter((x) => !!x),
|
|
5852
|
+
issueData: {
|
|
5853
|
+
code: ZodIssueCode.invalid_arguments,
|
|
5854
|
+
argumentsError: error
|
|
5855
|
+
}
|
|
5856
|
+
});
|
|
5857
|
+
}
|
|
5858
|
+
function makeReturnsIssue(returns, error) {
|
|
5859
|
+
return makeIssue({
|
|
5860
|
+
data: returns,
|
|
5861
|
+
path: ctx.path,
|
|
5862
|
+
errorMaps: [
|
|
5863
|
+
ctx.common.contextualErrorMap,
|
|
5864
|
+
ctx.schemaErrorMap,
|
|
5865
|
+
getErrorMap(),
|
|
5866
|
+
errorMap
|
|
5867
|
+
].filter((x) => !!x),
|
|
5868
|
+
issueData: {
|
|
5869
|
+
code: ZodIssueCode.invalid_return_type,
|
|
5870
|
+
returnTypeError: error
|
|
5871
|
+
}
|
|
5872
|
+
});
|
|
5873
|
+
}
|
|
5874
|
+
const params = { errorMap: ctx.common.contextualErrorMap };
|
|
5875
|
+
const fn = ctx.data;
|
|
5876
|
+
if (this._def.returns instanceof ZodPromise) {
|
|
5877
|
+
const me = this;
|
|
5878
|
+
return OK(async function(...args) {
|
|
5879
|
+
const error = new ZodError([]);
|
|
5880
|
+
const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
|
|
5881
|
+
error.addIssue(makeArgsIssue(args, e));
|
|
5882
|
+
throw error;
|
|
5883
|
+
});
|
|
5884
|
+
const result = await Reflect.apply(fn, this, parsedArgs);
|
|
5885
|
+
const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
|
5886
|
+
error.addIssue(makeReturnsIssue(result, e));
|
|
5887
|
+
throw error;
|
|
5888
|
+
});
|
|
5889
|
+
return parsedReturns;
|
|
5890
|
+
});
|
|
5891
|
+
} else {
|
|
5892
|
+
const me = this;
|
|
5893
|
+
return OK(function(...args) {
|
|
5894
|
+
const parsedArgs = me._def.args.safeParse(args, params);
|
|
5895
|
+
if (!parsedArgs.success) {
|
|
5896
|
+
throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
|
5897
|
+
}
|
|
5898
|
+
const result = Reflect.apply(fn, this, parsedArgs.data);
|
|
5899
|
+
const parsedReturns = me._def.returns.safeParse(result, params);
|
|
5900
|
+
if (!parsedReturns.success) {
|
|
5901
|
+
throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
|
|
5902
|
+
}
|
|
5903
|
+
return parsedReturns.data;
|
|
5904
|
+
});
|
|
5905
|
+
}
|
|
5906
|
+
}
|
|
5907
|
+
parameters() {
|
|
5908
|
+
return this._def.args;
|
|
5909
|
+
}
|
|
5910
|
+
returnType() {
|
|
5911
|
+
return this._def.returns;
|
|
5912
|
+
}
|
|
5913
|
+
args(...items) {
|
|
5914
|
+
return new ZodFunction({
|
|
5915
|
+
...this._def,
|
|
5916
|
+
args: ZodTuple.create(items).rest(ZodUnknown.create())
|
|
5917
|
+
});
|
|
5918
|
+
}
|
|
5919
|
+
returns(returnType) {
|
|
5920
|
+
return new ZodFunction({
|
|
5921
|
+
...this._def,
|
|
5922
|
+
returns: returnType
|
|
5923
|
+
});
|
|
5924
|
+
}
|
|
5925
|
+
implement(func) {
|
|
5926
|
+
const validatedFunc = this.parse(func);
|
|
5927
|
+
return validatedFunc;
|
|
5928
|
+
}
|
|
5929
|
+
strictImplement(func) {
|
|
5930
|
+
const validatedFunc = this.parse(func);
|
|
5931
|
+
return validatedFunc;
|
|
5932
|
+
}
|
|
5933
|
+
static create(args, returns, params) {
|
|
5934
|
+
return new ZodFunction({
|
|
5935
|
+
args: args ? args : ZodTuple.create([]).rest(ZodUnknown.create()),
|
|
5936
|
+
returns: returns || ZodUnknown.create(),
|
|
5937
|
+
typeName: ZodFirstPartyTypeKind.ZodFunction,
|
|
5938
|
+
...processCreateParams(params)
|
|
5939
|
+
});
|
|
5940
|
+
}
|
|
5941
|
+
}
|
|
5650
5942
|
class ZodLazy extends ZodType {
|
|
5651
5943
|
get schema() {
|
|
5652
5944
|
return this._def.getter();
|
|
@@ -5696,6 +5988,10 @@ function createZodEnum(values, params) {
|
|
|
5696
5988
|
});
|
|
5697
5989
|
}
|
|
5698
5990
|
class ZodEnum extends ZodType {
|
|
5991
|
+
constructor() {
|
|
5992
|
+
super(...arguments);
|
|
5993
|
+
_ZodEnum_cache.set(this, void 0);
|
|
5994
|
+
}
|
|
5699
5995
|
_parse(input) {
|
|
5700
5996
|
if (typeof input.data !== "string") {
|
|
5701
5997
|
const ctx = this._getOrReturnCtx(input);
|
|
@@ -5707,10 +6003,10 @@ class ZodEnum extends ZodType {
|
|
|
5707
6003
|
});
|
|
5708
6004
|
return INVALID;
|
|
5709
6005
|
}
|
|
5710
|
-
if (!this
|
|
5711
|
-
this
|
|
6006
|
+
if (!__classPrivateFieldGet(this, _ZodEnum_cache)) {
|
|
6007
|
+
__classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values));
|
|
5712
6008
|
}
|
|
5713
|
-
if (!this.
|
|
6009
|
+
if (!__classPrivateFieldGet(this, _ZodEnum_cache).has(input.data)) {
|
|
5714
6010
|
const ctx = this._getOrReturnCtx(input);
|
|
5715
6011
|
const expectedValues = this._def.values;
|
|
5716
6012
|
addIssueToContext(ctx, {
|
|
@@ -5759,8 +6055,13 @@ class ZodEnum extends ZodType {
|
|
|
5759
6055
|
});
|
|
5760
6056
|
}
|
|
5761
6057
|
}
|
|
6058
|
+
_ZodEnum_cache = /* @__PURE__ */ new WeakMap();
|
|
5762
6059
|
ZodEnum.create = createZodEnum;
|
|
5763
6060
|
class ZodNativeEnum extends ZodType {
|
|
6061
|
+
constructor() {
|
|
6062
|
+
super(...arguments);
|
|
6063
|
+
_ZodNativeEnum_cache.set(this, void 0);
|
|
6064
|
+
}
|
|
5764
6065
|
_parse(input) {
|
|
5765
6066
|
const nativeEnumValues = util.getValidEnumValues(this._def.values);
|
|
5766
6067
|
const ctx = this._getOrReturnCtx(input);
|
|
@@ -5773,10 +6074,10 @@ class ZodNativeEnum extends ZodType {
|
|
|
5773
6074
|
});
|
|
5774
6075
|
return INVALID;
|
|
5775
6076
|
}
|
|
5776
|
-
if (!this
|
|
5777
|
-
this
|
|
6077
|
+
if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache)) {
|
|
6078
|
+
__classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)));
|
|
5778
6079
|
}
|
|
5779
|
-
if (!this.
|
|
6080
|
+
if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache).has(input.data)) {
|
|
5780
6081
|
const expectedValues = util.objectValues(nativeEnumValues);
|
|
5781
6082
|
addIssueToContext(ctx, {
|
|
5782
6083
|
received: ctx.data,
|
|
@@ -5791,6 +6092,7 @@ class ZodNativeEnum extends ZodType {
|
|
|
5791
6092
|
return this._def.values;
|
|
5792
6093
|
}
|
|
5793
6094
|
}
|
|
6095
|
+
_ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
|
|
5794
6096
|
ZodNativeEnum.create = (values, params) => {
|
|
5795
6097
|
return new ZodNativeEnum({
|
|
5796
6098
|
values,
|
|
@@ -5931,7 +6233,7 @@ class ZodEffects extends ZodType {
|
|
|
5931
6233
|
parent: ctx
|
|
5932
6234
|
});
|
|
5933
6235
|
if (!isValid$3(base))
|
|
5934
|
-
return
|
|
6236
|
+
return base;
|
|
5935
6237
|
const result = effect.transform(base.value, checkCtx);
|
|
5936
6238
|
if (result instanceof Promise) {
|
|
5937
6239
|
throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
|
|
@@ -5940,11 +6242,8 @@ class ZodEffects extends ZodType {
|
|
|
5940
6242
|
} else {
|
|
5941
6243
|
return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
|
|
5942
6244
|
if (!isValid$3(base))
|
|
5943
|
-
return
|
|
5944
|
-
return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
|
|
5945
|
-
status: status.value,
|
|
5946
|
-
value: result
|
|
5947
|
-
}));
|
|
6245
|
+
return base;
|
|
6246
|
+
return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
|
|
5948
6247
|
});
|
|
5949
6248
|
}
|
|
5950
6249
|
}
|
|
@@ -6104,6 +6403,7 @@ ZodNaN.create = (params) => {
|
|
|
6104
6403
|
...processCreateParams(params)
|
|
6105
6404
|
});
|
|
6106
6405
|
};
|
|
6406
|
+
const BRAND = Symbol("zod_brand");
|
|
6107
6407
|
class ZodBranded extends ZodType {
|
|
6108
6408
|
_parse(input) {
|
|
6109
6409
|
const { ctx } = this._processInputParams(input);
|
|
@@ -6195,6 +6495,38 @@ ZodReadonly.create = (type, params) => {
|
|
|
6195
6495
|
...processCreateParams(params)
|
|
6196
6496
|
});
|
|
6197
6497
|
};
|
|
6498
|
+
function cleanParams(params, data) {
|
|
6499
|
+
const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
|
|
6500
|
+
const p2 = typeof p === "string" ? { message: p } : p;
|
|
6501
|
+
return p2;
|
|
6502
|
+
}
|
|
6503
|
+
function custom(check, _params = {}, fatal) {
|
|
6504
|
+
if (check)
|
|
6505
|
+
return ZodAny.create().superRefine((data, ctx) => {
|
|
6506
|
+
var _a, _b;
|
|
6507
|
+
const r = check(data);
|
|
6508
|
+
if (r instanceof Promise) {
|
|
6509
|
+
return r.then((r2) => {
|
|
6510
|
+
var _a2, _b2;
|
|
6511
|
+
if (!r2) {
|
|
6512
|
+
const params = cleanParams(_params, data);
|
|
6513
|
+
const _fatal = (_b2 = (_a2 = params.fatal) !== null && _a2 !== void 0 ? _a2 : fatal) !== null && _b2 !== void 0 ? _b2 : true;
|
|
6514
|
+
ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
|
|
6515
|
+
}
|
|
6516
|
+
});
|
|
6517
|
+
}
|
|
6518
|
+
if (!r) {
|
|
6519
|
+
const params = cleanParams(_params, data);
|
|
6520
|
+
const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
|
|
6521
|
+
ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
|
|
6522
|
+
}
|
|
6523
|
+
return;
|
|
6524
|
+
});
|
|
6525
|
+
return ZodAny.create();
|
|
6526
|
+
}
|
|
6527
|
+
const late = {
|
|
6528
|
+
object: ZodObject.lazycreate
|
|
6529
|
+
};
|
|
6198
6530
|
var ZodFirstPartyTypeKind;
|
|
6199
6531
|
(function(ZodFirstPartyTypeKind2) {
|
|
6200
6532
|
ZodFirstPartyTypeKind2["ZodString"] = "ZodString";
|
|
@@ -6234,20 +6566,177 @@ var ZodFirstPartyTypeKind;
|
|
|
6234
6566
|
ZodFirstPartyTypeKind2["ZodPipeline"] = "ZodPipeline";
|
|
6235
6567
|
ZodFirstPartyTypeKind2["ZodReadonly"] = "ZodReadonly";
|
|
6236
6568
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
6569
|
+
const instanceOfType = (cls, params = {
|
|
6570
|
+
message: `Input not instance of ${cls.name}`
|
|
6571
|
+
}) => custom((data) => data instanceof cls, params);
|
|
6237
6572
|
const stringType = ZodString.create;
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
const
|
|
6573
|
+
const numberType = ZodNumber.create;
|
|
6574
|
+
const nanType = ZodNaN.create;
|
|
6575
|
+
const bigIntType = ZodBigInt.create;
|
|
6576
|
+
const booleanType = ZodBoolean.create;
|
|
6577
|
+
const dateType = ZodDate.create;
|
|
6578
|
+
const symbolType = ZodSymbol.create;
|
|
6579
|
+
const undefinedType = ZodUndefined.create;
|
|
6580
|
+
const nullType = ZodNull.create;
|
|
6581
|
+
const anyType = ZodAny.create;
|
|
6582
|
+
const unknownType = ZodUnknown.create;
|
|
6583
|
+
const neverType = ZodNever.create;
|
|
6584
|
+
const voidType = ZodVoid.create;
|
|
6585
|
+
const arrayType = ZodArray.create;
|
|
6586
|
+
const objectType = ZodObject.create;
|
|
6587
|
+
const strictObjectType = ZodObject.strictCreate;
|
|
6588
|
+
const unionType = ZodUnion.create;
|
|
6589
|
+
const discriminatedUnionType = ZodDiscriminatedUnion.create;
|
|
6590
|
+
const intersectionType = ZodIntersection.create;
|
|
6591
|
+
const tupleType = ZodTuple.create;
|
|
6592
|
+
const recordType = ZodRecord.create;
|
|
6593
|
+
const mapType = ZodMap.create;
|
|
6594
|
+
const setType = ZodSet.create;
|
|
6595
|
+
const functionType = ZodFunction.create;
|
|
6596
|
+
const lazyType = ZodLazy.create;
|
|
6597
|
+
const literalType = ZodLiteral.create;
|
|
6598
|
+
const enumType = ZodEnum.create;
|
|
6599
|
+
const nativeEnumType = ZodNativeEnum.create;
|
|
6600
|
+
const promiseType = ZodPromise.create;
|
|
6601
|
+
const effectsType = ZodEffects.create;
|
|
6602
|
+
const optionalType = ZodOptional.create;
|
|
6603
|
+
const nullableType = ZodNullable.create;
|
|
6604
|
+
const preprocessType = ZodEffects.createWithPreprocess;
|
|
6605
|
+
const pipelineType = ZodPipeline.create;
|
|
6606
|
+
const ostring = () => stringType().optional();
|
|
6607
|
+
const onumber = () => numberType().optional();
|
|
6608
|
+
const oboolean = () => booleanType().optional();
|
|
6609
|
+
const coerce = {
|
|
6610
|
+
string: (arg) => ZodString.create({ ...arg, coerce: true }),
|
|
6611
|
+
number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
|
|
6612
|
+
boolean: (arg) => ZodBoolean.create({
|
|
6613
|
+
...arg,
|
|
6614
|
+
coerce: true
|
|
6615
|
+
}),
|
|
6616
|
+
bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
|
|
6617
|
+
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
6618
|
+
};
|
|
6619
|
+
const NEVER = INVALID;
|
|
6620
|
+
var z = /* @__PURE__ */ Object.freeze({
|
|
6621
|
+
__proto__: null,
|
|
6622
|
+
defaultErrorMap: errorMap,
|
|
6623
|
+
setErrorMap,
|
|
6624
|
+
getErrorMap,
|
|
6625
|
+
makeIssue,
|
|
6626
|
+
EMPTY_PATH,
|
|
6627
|
+
addIssueToContext,
|
|
6628
|
+
ParseStatus,
|
|
6629
|
+
INVALID,
|
|
6630
|
+
DIRTY,
|
|
6631
|
+
OK,
|
|
6632
|
+
isAborted,
|
|
6633
|
+
isDirty,
|
|
6634
|
+
isValid: isValid$3,
|
|
6635
|
+
isAsync,
|
|
6636
|
+
get util() {
|
|
6637
|
+
return util;
|
|
6638
|
+
},
|
|
6639
|
+
get objectUtil() {
|
|
6640
|
+
return objectUtil;
|
|
6641
|
+
},
|
|
6642
|
+
ZodParsedType,
|
|
6643
|
+
getParsedType,
|
|
6644
|
+
ZodType,
|
|
6645
|
+
datetimeRegex,
|
|
6646
|
+
ZodString,
|
|
6647
|
+
ZodNumber,
|
|
6648
|
+
ZodBigInt,
|
|
6649
|
+
ZodBoolean,
|
|
6650
|
+
ZodDate,
|
|
6651
|
+
ZodSymbol,
|
|
6652
|
+
ZodUndefined,
|
|
6653
|
+
ZodNull,
|
|
6654
|
+
ZodAny,
|
|
6655
|
+
ZodUnknown,
|
|
6656
|
+
ZodNever,
|
|
6657
|
+
ZodVoid,
|
|
6658
|
+
ZodArray,
|
|
6659
|
+
ZodObject,
|
|
6660
|
+
ZodUnion,
|
|
6661
|
+
ZodDiscriminatedUnion,
|
|
6662
|
+
ZodIntersection,
|
|
6663
|
+
ZodTuple,
|
|
6664
|
+
ZodRecord,
|
|
6665
|
+
ZodMap,
|
|
6666
|
+
ZodSet,
|
|
6667
|
+
ZodFunction,
|
|
6668
|
+
ZodLazy,
|
|
6669
|
+
ZodLiteral,
|
|
6670
|
+
ZodEnum,
|
|
6671
|
+
ZodNativeEnum,
|
|
6672
|
+
ZodPromise,
|
|
6673
|
+
ZodEffects,
|
|
6674
|
+
ZodTransformer: ZodEffects,
|
|
6675
|
+
ZodOptional,
|
|
6676
|
+
ZodNullable,
|
|
6677
|
+
ZodDefault,
|
|
6678
|
+
ZodCatch,
|
|
6679
|
+
ZodNaN,
|
|
6680
|
+
BRAND,
|
|
6681
|
+
ZodBranded,
|
|
6682
|
+
ZodPipeline,
|
|
6683
|
+
ZodReadonly,
|
|
6684
|
+
custom,
|
|
6685
|
+
Schema: ZodType,
|
|
6686
|
+
ZodSchema: ZodType,
|
|
6687
|
+
late,
|
|
6688
|
+
get ZodFirstPartyTypeKind() {
|
|
6689
|
+
return ZodFirstPartyTypeKind;
|
|
6690
|
+
},
|
|
6691
|
+
coerce,
|
|
6692
|
+
any: anyType,
|
|
6693
|
+
array: arrayType,
|
|
6694
|
+
bigint: bigIntType,
|
|
6695
|
+
boolean: booleanType,
|
|
6696
|
+
date: dateType,
|
|
6697
|
+
discriminatedUnion: discriminatedUnionType,
|
|
6698
|
+
effect: effectsType,
|
|
6699
|
+
"enum": enumType,
|
|
6700
|
+
"function": functionType,
|
|
6701
|
+
"instanceof": instanceOfType,
|
|
6702
|
+
intersection: intersectionType,
|
|
6703
|
+
lazy: lazyType,
|
|
6704
|
+
literal: literalType,
|
|
6705
|
+
map: mapType,
|
|
6706
|
+
nan: nanType,
|
|
6707
|
+
nativeEnum: nativeEnumType,
|
|
6708
|
+
never: neverType,
|
|
6709
|
+
"null": nullType,
|
|
6710
|
+
nullable: nullableType,
|
|
6711
|
+
number: numberType,
|
|
6712
|
+
object: objectType,
|
|
6713
|
+
oboolean,
|
|
6714
|
+
onumber,
|
|
6715
|
+
optional: optionalType,
|
|
6716
|
+
ostring,
|
|
6717
|
+
pipeline: pipelineType,
|
|
6718
|
+
preprocess: preprocessType,
|
|
6719
|
+
promise: promiseType,
|
|
6720
|
+
record: recordType,
|
|
6721
|
+
set: setType,
|
|
6722
|
+
strictObject: strictObjectType,
|
|
6723
|
+
string: stringType,
|
|
6724
|
+
symbol: symbolType,
|
|
6725
|
+
transformer: effectsType,
|
|
6726
|
+
tuple: tupleType,
|
|
6727
|
+
"undefined": undefinedType,
|
|
6728
|
+
union: unionType,
|
|
6729
|
+
unknown: unknownType,
|
|
6730
|
+
"void": voidType,
|
|
6731
|
+
NEVER,
|
|
6732
|
+
ZodIssueCode,
|
|
6733
|
+
quotelessJson,
|
|
6734
|
+
ZodError
|
|
6735
|
+
});
|
|
6736
|
+
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "qa", "PROD": true, "SSR": false, "VITE_MODULES_CARDS_ADMIN_FRONTEND_BASE_URL": "https://qa-sso.6seconds.org", "VITE_MODULES_CARDS_HOME_FRONTEND_BASE_URL": "https://qa-sso.6seconds.org", "VITE_MODULES_CERT_FRONTEND_BASE_URL": "https://qa-sso.6seconds.org", "VITE_MODULES_ENV": "qa", "VITE_MODULES_EVENTS_FRONTEND_BASE_URL": "https://qa-sso.6seconds.org", "VITE_MODULES_SSO_BACKEND_BASE_URL": "https://qa-ssoapi.6seconds.org", "VITE_MODULES_SSO_FRONTEND_BASE_URL": "https://qa-sso.6seconds.org", "VITE_MODULES_TOOLS_FRONTEND_BASE_URL": "https://qa-sso.6seconds.org" };
|
|
6248
6737
|
const env = createEnv({
|
|
6249
6738
|
client: {
|
|
6250
|
-
VITE_MODULES_ENV:
|
|
6739
|
+
VITE_MODULES_ENV: z.string()
|
|
6251
6740
|
},
|
|
6252
6741
|
runtimeEnv: __vite_import_meta_env__
|
|
6253
6742
|
});
|
|
@@ -10960,20 +11449,19 @@ function createValidation(config) {
|
|
|
10960
11449
|
abortEarly = schema.spec.abortEarly,
|
|
10961
11450
|
disableStackTrace = schema.spec.disableStackTrace
|
|
10962
11451
|
} = options;
|
|
10963
|
-
|
|
10964
|
-
value,
|
|
10965
|
-
|
|
10966
|
-
context
|
|
10967
|
-
};
|
|
11452
|
+
function resolve(item) {
|
|
11453
|
+
return Reference.isRef(item) ? item.getValue(value, parent, context) : item;
|
|
11454
|
+
}
|
|
10968
11455
|
function createError(overrides = {}) {
|
|
10969
|
-
const nextParams =
|
|
11456
|
+
const nextParams = Object.assign({
|
|
10970
11457
|
value,
|
|
10971
11458
|
originalValue,
|
|
10972
11459
|
label: schema.spec.label,
|
|
10973
11460
|
path: overrides.path || path,
|
|
10974
11461
|
spec: schema.spec,
|
|
10975
11462
|
disableStackTrace: overrides.disableStackTrace || disableStackTrace
|
|
10976
|
-
}, params, overrides.params)
|
|
11463
|
+
}, params, overrides.params);
|
|
11464
|
+
for (const key of Object.keys(nextParams)) nextParams[key] = resolve(nextParams[key]);
|
|
10977
11465
|
const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);
|
|
10978
11466
|
error.params = nextParams;
|
|
10979
11467
|
return error;
|
|
@@ -10985,9 +11473,7 @@ function createValidation(config) {
|
|
|
10985
11473
|
type: name,
|
|
10986
11474
|
from: options.from,
|
|
10987
11475
|
createError,
|
|
10988
|
-
resolve
|
|
10989
|
-
return resolveMaybeRef(item, resolveOptions);
|
|
10990
|
-
},
|
|
11476
|
+
resolve,
|
|
10991
11477
|
options,
|
|
10992
11478
|
originalValue,
|
|
10993
11479
|
schema
|
|
@@ -11024,16 +11510,6 @@ function createValidation(config) {
|
|
|
11024
11510
|
validate.OPTIONS = config;
|
|
11025
11511
|
return validate;
|
|
11026
11512
|
}
|
|
11027
|
-
function resolveParams(params, options) {
|
|
11028
|
-
if (!params) return params;
|
|
11029
|
-
for (const key of Object.keys(params)) {
|
|
11030
|
-
params[key] = resolveMaybeRef(params[key], options);
|
|
11031
|
-
}
|
|
11032
|
-
return params;
|
|
11033
|
-
}
|
|
11034
|
-
function resolveMaybeRef(item, options) {
|
|
11035
|
-
return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;
|
|
11036
|
-
}
|
|
11037
11513
|
function getIn(schema, path, value, context = value) {
|
|
11038
11514
|
let parent, lastPart, lastPartDebug;
|
|
11039
11515
|
if (!path) return {
|
|
@@ -11130,69 +11606,6 @@ function clone(src, seen = /* @__PURE__ */ new Map()) {
|
|
|
11130
11606
|
}
|
|
11131
11607
|
return copy2;
|
|
11132
11608
|
}
|
|
11133
|
-
function createStandardPath(path) {
|
|
11134
|
-
if (!(path != null && path.length)) {
|
|
11135
|
-
return void 0;
|
|
11136
|
-
}
|
|
11137
|
-
const segments = [];
|
|
11138
|
-
let currentSegment = "";
|
|
11139
|
-
let inBrackets = false;
|
|
11140
|
-
let inQuotes = false;
|
|
11141
|
-
for (let i = 0; i < path.length; i++) {
|
|
11142
|
-
const char2 = path[i];
|
|
11143
|
-
if (char2 === "[" && !inQuotes) {
|
|
11144
|
-
if (currentSegment) {
|
|
11145
|
-
segments.push(...currentSegment.split(".").filter(Boolean));
|
|
11146
|
-
currentSegment = "";
|
|
11147
|
-
}
|
|
11148
|
-
inBrackets = true;
|
|
11149
|
-
continue;
|
|
11150
|
-
}
|
|
11151
|
-
if (char2 === "]" && !inQuotes) {
|
|
11152
|
-
if (currentSegment) {
|
|
11153
|
-
if (/^\d+$/.test(currentSegment)) {
|
|
11154
|
-
segments.push(currentSegment);
|
|
11155
|
-
} else {
|
|
11156
|
-
segments.push(currentSegment.replace(/^"|"$/g, ""));
|
|
11157
|
-
}
|
|
11158
|
-
currentSegment = "";
|
|
11159
|
-
}
|
|
11160
|
-
inBrackets = false;
|
|
11161
|
-
continue;
|
|
11162
|
-
}
|
|
11163
|
-
if (char2 === '"') {
|
|
11164
|
-
inQuotes = !inQuotes;
|
|
11165
|
-
continue;
|
|
11166
|
-
}
|
|
11167
|
-
if (char2 === "." && !inBrackets && !inQuotes) {
|
|
11168
|
-
if (currentSegment) {
|
|
11169
|
-
segments.push(currentSegment);
|
|
11170
|
-
currentSegment = "";
|
|
11171
|
-
}
|
|
11172
|
-
continue;
|
|
11173
|
-
}
|
|
11174
|
-
currentSegment += char2;
|
|
11175
|
-
}
|
|
11176
|
-
if (currentSegment) {
|
|
11177
|
-
segments.push(...currentSegment.split(".").filter(Boolean));
|
|
11178
|
-
}
|
|
11179
|
-
return segments;
|
|
11180
|
-
}
|
|
11181
|
-
function createStandardIssues(error, parentPath) {
|
|
11182
|
-
const path = parentPath ? `${parentPath}.${error.path}` : error.path;
|
|
11183
|
-
return error.errors.map((err) => ({
|
|
11184
|
-
message: err,
|
|
11185
|
-
path: createStandardPath(path)
|
|
11186
|
-
}));
|
|
11187
|
-
}
|
|
11188
|
-
function issuesFromValidationError(error, parentPath) {
|
|
11189
|
-
var _error$inner;
|
|
11190
|
-
if (!((_error$inner = error.inner) != null && _error$inner.length) && error.errors.length) {
|
|
11191
|
-
return createStandardIssues(error, parentPath);
|
|
11192
|
-
}
|
|
11193
|
-
const path = parentPath ? `${parentPath}.${error.path}` : error.path;
|
|
11194
|
-
return error.inner.flatMap((err) => issuesFromValidationError(err, path));
|
|
11195
|
-
}
|
|
11196
11609
|
class Schema {
|
|
11197
11610
|
constructor(options) {
|
|
11198
11611
|
this.type = void 0;
|
|
@@ -11322,11 +11735,9 @@ class Schema {
|
|
|
11322
11735
|
* Run the configured transform pipeline over an input value.
|
|
11323
11736
|
*/
|
|
11324
11737
|
cast(value, options = {}) {
|
|
11325
|
-
let resolvedSchema = this.resolve(Object.assign({
|
|
11738
|
+
let resolvedSchema = this.resolve(Object.assign({
|
|
11326
11739
|
value
|
|
11327
|
-
|
|
11328
|
-
// context: options.context,
|
|
11329
|
-
}));
|
|
11740
|
+
}, options));
|
|
11330
11741
|
let allowOptionality = options.assert === "ignore-optionality";
|
|
11331
11742
|
let result = resolvedSchema._cast(value, options);
|
|
11332
11743
|
if (options.assert !== false && !resolvedSchema.isType(result)) {
|
|
@@ -11343,7 +11754,7 @@ attempted value: ${formattedValue}
|
|
|
11343
11754
|
return result;
|
|
11344
11755
|
}
|
|
11345
11756
|
_cast(rawValue, options) {
|
|
11346
|
-
let value = rawValue === void 0 ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this
|
|
11757
|
+
let value = rawValue === void 0 ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this), rawValue);
|
|
11347
11758
|
if (value === void 0) {
|
|
11348
11759
|
value = this.getDefault(options);
|
|
11349
11760
|
}
|
|
@@ -11738,41 +12149,13 @@ attempted value: ${formattedValue}
|
|
|
11738
12149
|
type: next2.type,
|
|
11739
12150
|
oneOf: next2._whitelist.describe(),
|
|
11740
12151
|
notOneOf: next2._blacklist.describe(),
|
|
11741
|
-
tests: next2.tests.
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
params
|
|
11746
|
-
};
|
|
11747
|
-
})
|
|
12152
|
+
tests: next2.tests.map((fn) => ({
|
|
12153
|
+
name: fn.OPTIONS.name,
|
|
12154
|
+
params: fn.OPTIONS.params
|
|
12155
|
+
})).filter((n, idx, list) => list.findIndex((c) => c.name === n.name) === idx)
|
|
11748
12156
|
};
|
|
11749
12157
|
return description;
|
|
11750
12158
|
}
|
|
11751
|
-
get ["~standard"]() {
|
|
11752
|
-
const schema = this;
|
|
11753
|
-
const standard = {
|
|
11754
|
-
version: 1,
|
|
11755
|
-
vendor: "yup",
|
|
11756
|
-
async validate(value) {
|
|
11757
|
-
try {
|
|
11758
|
-
const result = await schema.validate(value, {
|
|
11759
|
-
abortEarly: false
|
|
11760
|
-
});
|
|
11761
|
-
return {
|
|
11762
|
-
value: result
|
|
11763
|
-
};
|
|
11764
|
-
} catch (err) {
|
|
11765
|
-
if (err instanceof ValidationError) {
|
|
11766
|
-
return {
|
|
11767
|
-
issues: issuesFromValidationError(err)
|
|
11768
|
-
};
|
|
11769
|
-
}
|
|
11770
|
-
throw err;
|
|
11771
|
-
}
|
|
11772
|
-
}
|
|
11773
|
-
};
|
|
11774
|
-
return standard;
|
|
11775
|
-
}
|
|
11776
12159
|
}
|
|
11777
12160
|
Schema.prototype.__isYupSchema__ = true;
|
|
11778
12161
|
for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At`] = function(path, value, options = {}) {
|
|
@@ -11871,8 +12254,8 @@ class StringSchema extends Schema {
|
|
|
11871
12254
|
}
|
|
11872
12255
|
});
|
|
11873
12256
|
this.withMutation(() => {
|
|
11874
|
-
this.transform((value, _raw) => {
|
|
11875
|
-
if (!
|
|
12257
|
+
this.transform((value, _raw, ctx) => {
|
|
12258
|
+
if (!ctx.spec.coerce || ctx.isType(value)) return value;
|
|
11876
12259
|
if (Array.isArray(value)) return value;
|
|
11877
12260
|
const strValue = value != null && value.toString ? value.toString() : value;
|
|
11878
12261
|
if (strValue === objStringTag) return value;
|
|
@@ -12074,15 +12457,15 @@ class NumberSchema extends Schema {
|
|
|
12074
12457
|
}
|
|
12075
12458
|
});
|
|
12076
12459
|
this.withMutation(() => {
|
|
12077
|
-
this.transform((value, _raw) => {
|
|
12078
|
-
if (!
|
|
12460
|
+
this.transform((value, _raw, ctx) => {
|
|
12461
|
+
if (!ctx.spec.coerce) return value;
|
|
12079
12462
|
let parsed = value;
|
|
12080
12463
|
if (typeof parsed === "string") {
|
|
12081
12464
|
parsed = parsed.replace(/\s/g, "");
|
|
12082
12465
|
if (parsed === "") return NaN;
|
|
12083
12466
|
parsed = +parsed;
|
|
12084
12467
|
}
|
|
12085
|
-
if (
|
|
12468
|
+
if (ctx.isType(parsed) || parsed === null) return parsed;
|
|
12086
12469
|
return parseFloat(parsed);
|
|
12087
12470
|
});
|
|
12088
12471
|
});
|
|
@@ -12181,8 +12564,8 @@ class DateSchema extends Schema {
|
|
|
12181
12564
|
}
|
|
12182
12565
|
});
|
|
12183
12566
|
this.withMutation(() => {
|
|
12184
|
-
this.transform((value, _raw) => {
|
|
12185
|
-
if (!
|
|
12567
|
+
this.transform((value, _raw, ctx) => {
|
|
12568
|
+
if (!ctx.spec.coerce || ctx.isType(value) || value === null) return value;
|
|
12186
12569
|
value = parseIsoDate(value);
|
|
12187
12570
|
return !isNaN(value) ? new Date(value) : DateSchema.INVALID_DATE;
|
|
12188
12571
|
});
|
|
@@ -12264,7 +12647,7 @@ function sortByKeyOrder(keys2) {
|
|
|
12264
12647
|
return findIndex(keys2, a) - findIndex(keys2, b);
|
|
12265
12648
|
};
|
|
12266
12649
|
}
|
|
12267
|
-
const parseJson = (value, _,
|
|
12650
|
+
const parseJson = (value, _, ctx) => {
|
|
12268
12651
|
if (typeof value !== "string") {
|
|
12269
12652
|
return value;
|
|
12270
12653
|
}
|
|
@@ -12273,7 +12656,7 @@ const parseJson = (value, _, schema) => {
|
|
|
12273
12656
|
parsed = JSON.parse(value);
|
|
12274
12657
|
} catch (err) {
|
|
12275
12658
|
}
|
|
12276
|
-
return
|
|
12659
|
+
return ctx.isType(parsed) ? parsed : value;
|
|
12277
12660
|
};
|
|
12278
12661
|
function deepPartial(schema) {
|
|
12279
12662
|
if ("fields" in schema) {
|
|
@@ -12349,9 +12732,9 @@ class ObjectSchema extends Schema {
|
|
|
12349
12732
|
for (const prop of props) {
|
|
12350
12733
|
let field = fields[prop];
|
|
12351
12734
|
let exists = prop in value;
|
|
12352
|
-
let inputValue = value[prop];
|
|
12353
12735
|
if (field) {
|
|
12354
12736
|
let fieldValue;
|
|
12737
|
+
let inputValue = value[prop];
|
|
12355
12738
|
innerOptions.path = (options.path ? `${options.path}.` : "") + prop;
|
|
12356
12739
|
field = field.resolve({
|
|
12357
12740
|
value: inputValue,
|
|
@@ -12364,14 +12747,17 @@ class ObjectSchema extends Schema {
|
|
|
12364
12747
|
isChanged = isChanged || prop in value;
|
|
12365
12748
|
continue;
|
|
12366
12749
|
}
|
|
12367
|
-
fieldValue = !options.__validating || !strict ?
|
|
12750
|
+
fieldValue = !options.__validating || !strict ? (
|
|
12751
|
+
// TODO: use _cast, this is double resolving
|
|
12752
|
+
field.cast(value[prop], innerOptions)
|
|
12753
|
+
) : value[prop];
|
|
12368
12754
|
if (fieldValue !== void 0) {
|
|
12369
12755
|
intermediateValue[prop] = fieldValue;
|
|
12370
12756
|
}
|
|
12371
12757
|
} else if (exists && !strip) {
|
|
12372
|
-
intermediateValue[prop] =
|
|
12758
|
+
intermediateValue[prop] = value[prop];
|
|
12373
12759
|
}
|
|
12374
|
-
if (exists !== prop in intermediateValue || intermediateValue[prop] !==
|
|
12760
|
+
if (exists !== prop in intermediateValue || intermediateValue[prop] !== value[prop]) {
|
|
12375
12761
|
isChanged = true;
|
|
12376
12762
|
}
|
|
12377
12763
|
}
|
|
@@ -12705,8 +13091,8 @@ function requireDist() {
|
|
|
12705
13091
|
dist.default = urlcat2;
|
|
12706
13092
|
function urlcatImpl(pathTemplate, params, baseUrl) {
|
|
12707
13093
|
var _a = path(pathTemplate, params), renderedPath = _a.renderedPath, remainingParams = _a.remainingParams;
|
|
12708
|
-
var
|
|
12709
|
-
var renderedQuery = query(
|
|
13094
|
+
var cleanParams2 = removeNullOrUndef(remainingParams);
|
|
13095
|
+
var renderedQuery = query(cleanParams2);
|
|
12710
13096
|
var pathAndQuery = join(renderedPath, "?", renderedQuery);
|
|
12711
13097
|
return baseUrl ? join(baseUrl, "/", pathAndQuery) : pathAndQuery;
|
|
12712
13098
|
}
|
|
@@ -13345,13 +13731,13 @@ function ViewProfileDialog({ userData, setInitialState, isOpen }) {
|
|
|
13345
13731
|
material.Dialog,
|
|
13346
13732
|
{
|
|
13347
13733
|
fullWidth: false,
|
|
13348
|
-
sx: { "& .MuiPaper-root": { maxWidth: "800px", borderRadius: "12px"
|
|
13734
|
+
sx: { "& .MuiPaper-root": { maxWidth: "800px", borderRadius: "12px" } },
|
|
13349
13735
|
onClose: () => handleCloseUtil(setInitialState),
|
|
13350
13736
|
open: isOpen,
|
|
13351
13737
|
"aria-labelledby": "draggable-dialog-title",
|
|
13352
13738
|
children: [
|
|
13353
13739
|
/* @__PURE__ */ jsxRuntime.jsxs(ProfileStyled, { children: [
|
|
13354
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { textAlign: "right", padding: "10px 10px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13740
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { textAlign: "right", padding: "10px 10px 0px 0px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13355
13741
|
material.IconButton,
|
|
13356
13742
|
{
|
|
13357
13743
|
onClick: () => setInitialState((p) => ({ ...p, toggles: { ...p.toggles, viewProfile: false } })),
|
|
@@ -13360,7 +13746,7 @@ function ViewProfileDialog({ userData, setInitialState, isOpen }) {
|
|
|
13360
13746
|
children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {})
|
|
13361
13747
|
}
|
|
13362
13748
|
) }),
|
|
13363
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { p: 2
|
|
13749
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { p: 2 }, children: /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { container: true, spacing: 2, children: [
|
|
13364
13750
|
/* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { item: true, xs: 12, lg: 5, children: [
|
|
13365
13751
|
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13366
13752
|
material.Avatar,
|
|
@@ -13531,7 +13917,7 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
|
|
|
13531
13917
|
onClose: () => handleCloseUtil(setInitialState),
|
|
13532
13918
|
open: isOpen,
|
|
13533
13919
|
"aria-labelledby": "draggable-dialog-title",
|
|
13534
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("form", { onSubmit: formik.handleSubmit, children: /* @__PURE__ */ jsxRuntime.jsx(ChangePasswordStyled, { children: /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: {
|
|
13920
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("form", { onSubmit: formik.handleSubmit, children: /* @__PURE__ */ jsxRuntime.jsx(ChangePasswordStyled, { children: /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { pr: { xs: 0, lg: 8 }, p: 2 }, children: [
|
|
13535
13921
|
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "h6", sx: { display: "flex", alignItems: "center" }, className: "Heading", children: "Change Password" }),
|
|
13536
13922
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13537
13923
|
material.Box,
|
|
@@ -13543,7 +13929,7 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
|
|
|
13543
13929
|
mt: 2
|
|
13544
13930
|
},
|
|
13545
13931
|
children: /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { container: true, spacing: 2, children: [
|
|
13546
|
-
/* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { item: true, xs: 12,
|
|
13932
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { item: true, xs: 12, lg: 6, children: [
|
|
13547
13933
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13548
13934
|
LabeledInput,
|
|
13549
13935
|
{
|
|
@@ -13551,13 +13937,12 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
|
|
|
13551
13937
|
label: t2("New password"),
|
|
13552
13938
|
fullWidth: true,
|
|
13553
13939
|
size: "small",
|
|
13554
|
-
...formik.getFieldProps("newPassword")
|
|
13555
|
-
sx: { width: { md: "93%", lg: "93%", xs: "99%" } }
|
|
13940
|
+
...formik.getFieldProps("newPassword")
|
|
13556
13941
|
}
|
|
13557
13942
|
),
|
|
13558
13943
|
/* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { formik, fieldName: "newPassword" })
|
|
13559
13944
|
] }),
|
|
13560
|
-
/* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { item: true, xs: 12,
|
|
13945
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { item: true, xs: 12, lg: 6, children: [
|
|
13561
13946
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13562
13947
|
LabeledInput,
|
|
13563
13948
|
{
|
|
@@ -13565,8 +13950,7 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
|
|
|
13565
13950
|
label: t2("Confirm new password"),
|
|
13566
13951
|
fullWidth: true,
|
|
13567
13952
|
size: "small",
|
|
13568
|
-
...formik.getFieldProps("passwordConfirmation")
|
|
13569
|
-
sx: { width: { md: "99%", lg: "99%", xs: "99%" } }
|
|
13953
|
+
...formik.getFieldProps("passwordConfirmation")
|
|
13570
13954
|
}
|
|
13571
13955
|
),
|
|
13572
13956
|
/* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { formik, fieldName: "passwordConfirmation" })
|
|
@@ -13576,7 +13960,7 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
|
|
|
13576
13960
|
{
|
|
13577
13961
|
isLoading: formik.isSubmitting,
|
|
13578
13962
|
className: "invite",
|
|
13579
|
-
sx: { width: "auto !important"
|
|
13963
|
+
sx: { width: "auto !important" },
|
|
13580
13964
|
type: "submit",
|
|
13581
13965
|
disabled: formik.isSubmitting,
|
|
13582
13966
|
btnTitle: t2("Change Password")
|
|
@@ -13888,7 +14272,7 @@ function parseThreshold(scrollThreshold) {
|
|
|
13888
14272
|
}
|
|
13889
14273
|
var InfiniteScroll = (
|
|
13890
14274
|
/** @class */
|
|
13891
|
-
|
|
14275
|
+
function(_super) {
|
|
13892
14276
|
__extends(InfiniteScroll2, _super);
|
|
13893
14277
|
function InfiniteScroll2(props) {
|
|
13894
14278
|
var _this = _super.call(this, props) || this;
|
|
@@ -14103,7 +14487,7 @@ var InfiniteScroll = (
|
|
|
14103
14487
|
);
|
|
14104
14488
|
};
|
|
14105
14489
|
return InfiniteScroll2;
|
|
14106
|
-
}
|
|
14490
|
+
}(React.Component)
|
|
14107
14491
|
);
|
|
14108
14492
|
const Notification = ({ setInitialState, notificationAccessApps, initialState, t: t2 }) => {
|
|
14109
14493
|
const [notifications, setNotifications] = React.useState([]);
|
|
@@ -15142,7 +15526,7 @@ function createStyleElement(options) {
|
|
|
15142
15526
|
tag.setAttribute("data-s", "");
|
|
15143
15527
|
return tag;
|
|
15144
15528
|
}
|
|
15145
|
-
var StyleSheet = /* @__PURE__ */
|
|
15529
|
+
var StyleSheet = /* @__PURE__ */ function() {
|
|
15146
15530
|
function StyleSheet2(options) {
|
|
15147
15531
|
var _this = this;
|
|
15148
15532
|
this._insertTag = function(tag) {
|
|
@@ -15200,7 +15584,7 @@ var StyleSheet = /* @__PURE__ */ (function() {
|
|
|
15200
15584
|
this.ctr = 0;
|
|
15201
15585
|
};
|
|
15202
15586
|
return StyleSheet2;
|
|
15203
|
-
}
|
|
15587
|
+
}();
|
|
15204
15588
|
var MS = "-ms-";
|
|
15205
15589
|
var MOZ = "-moz-";
|
|
15206
15590
|
var WEBKIT = "-webkit-";
|
|
@@ -15516,9 +15900,9 @@ function ruleset(value, root2, parent, index, offset2, rules, points, type, prop
|
|
|
15516
15900
|
var rule = offset2 === 0 ? rules : [""];
|
|
15517
15901
|
var size = sizeof(rule);
|
|
15518
15902
|
for (var i = 0, j = 0, k = 0; i < index; ++i)
|
|
15519
|
-
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])),
|
|
15520
|
-
if (
|
|
15521
|
-
props[k++] =
|
|
15903
|
+
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z2 = value; x < size; ++x)
|
|
15904
|
+
if (z2 = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
|
|
15905
|
+
props[k++] = z2;
|
|
15522
15906
|
return node(value, root2, parent, offset2 === 0 ? RULESET : type, props, children, length2);
|
|
15523
15907
|
}
|
|
15524
15908
|
function comment(value, root2, parent) {
|