@object-ui/plugin-timeline 4.0.1 → 4.0.4
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/CHANGELOG.md +39 -0
- package/dist/index.js +158 -3033
- package/dist/index.umd.cjs +1 -69
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,204 +1,28 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
2
|
import { useCallback as t, useEffect as n, useState as r } from "react";
|
|
3
3
|
import { NavigationOverlay as i, cn as a, cva as o, renderChildren as s } from "@object-ui/components";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
13
|
-
function r(e, n, r) {
|
|
14
|
-
var i = null;
|
|
15
|
-
if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) for (var a in r = {}, n) a !== "key" && (r[a] = n[a]);
|
|
16
|
-
else r = n;
|
|
17
|
-
return n = r.ref, {
|
|
18
|
-
$$typeof: t,
|
|
19
|
-
type: e,
|
|
20
|
-
key: i,
|
|
21
|
-
ref: n === void 0 ? null : n,
|
|
22
|
-
props: r
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
e.Fragment = n, e.jsx = r, e.jsxs = r;
|
|
26
|
-
})), g = /* @__PURE__ */ h(((e) => {
|
|
27
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
28
|
-
function t(e) {
|
|
29
|
-
if (e == null) return null;
|
|
30
|
-
if (typeof e == "function") return e.$$typeof === w ? null : e.displayName || e.name || null;
|
|
31
|
-
if (typeof e == "string") return e;
|
|
32
|
-
switch (e) {
|
|
33
|
-
case g: return "Fragment";
|
|
34
|
-
case v: return "Profiler";
|
|
35
|
-
case _: return "StrictMode";
|
|
36
|
-
case ie: return "Suspense";
|
|
37
|
-
case b: return "SuspenseList";
|
|
38
|
-
case C: return "Activity";
|
|
39
|
-
}
|
|
40
|
-
if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
|
|
41
|
-
case te: return "Portal";
|
|
42
|
-
case re: return e.displayName || "Context";
|
|
43
|
-
case ne: return (e._context.displayName || "Context") + ".Consumer";
|
|
44
|
-
case y:
|
|
45
|
-
var n = e.render;
|
|
46
|
-
return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
|
|
47
|
-
case x: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
|
|
48
|
-
case S:
|
|
49
|
-
n = e._payload, e = e._init;
|
|
50
|
-
try {
|
|
51
|
-
return t(e(n));
|
|
52
|
-
} catch {}
|
|
53
|
-
}
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
function n(e) {
|
|
57
|
-
return "" + e;
|
|
58
|
-
}
|
|
59
|
-
function r(e) {
|
|
60
|
-
try {
|
|
61
|
-
n(e);
|
|
62
|
-
var t = !1;
|
|
63
|
-
} catch {
|
|
64
|
-
t = !0;
|
|
65
|
-
}
|
|
66
|
-
if (t) {
|
|
67
|
-
t = console;
|
|
68
|
-
var r = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
69
|
-
return r.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), n(e);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
function i(e) {
|
|
73
|
-
if (e === g) return "<>";
|
|
74
|
-
if (typeof e == "object" && e && e.$$typeof === S) return "<...>";
|
|
75
|
-
try {
|
|
76
|
-
var n = t(e);
|
|
77
|
-
return n ? "<" + n + ">" : "<...>";
|
|
78
|
-
} catch {
|
|
79
|
-
return "<...>";
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function a() {
|
|
83
|
-
var e = T.A;
|
|
84
|
-
return e === null ? null : e.getOwner();
|
|
85
|
-
}
|
|
86
|
-
function o() {
|
|
87
|
-
return Error("react-stack-top-frame");
|
|
88
|
-
}
|
|
89
|
-
function s(e) {
|
|
90
|
-
if (E.call(e, "key")) {
|
|
91
|
-
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
92
|
-
if (t && t.isReactWarning) return !1;
|
|
93
|
-
}
|
|
94
|
-
return e.key !== void 0;
|
|
95
|
-
}
|
|
96
|
-
function c(e, t) {
|
|
97
|
-
function n() {
|
|
98
|
-
k || (k = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
|
|
99
|
-
}
|
|
100
|
-
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
101
|
-
get: n,
|
|
102
|
-
configurable: !0
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
function l() {
|
|
106
|
-
var e = t(this.type);
|
|
107
|
-
return A[e] || (A[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
|
|
108
|
-
}
|
|
109
|
-
function u(e, t, n, r, i, a) {
|
|
110
|
-
var o = n.ref;
|
|
111
|
-
return e = {
|
|
112
|
-
$$typeof: h,
|
|
113
|
-
type: e,
|
|
114
|
-
key: t,
|
|
115
|
-
props: n,
|
|
116
|
-
_owner: r
|
|
117
|
-
}, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
|
|
118
|
-
enumerable: !1,
|
|
119
|
-
value: null
|
|
120
|
-
}) : Object.defineProperty(e, "ref", {
|
|
121
|
-
enumerable: !1,
|
|
122
|
-
get: l
|
|
123
|
-
}), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
124
|
-
configurable: !1,
|
|
125
|
-
enumerable: !1,
|
|
126
|
-
writable: !0,
|
|
127
|
-
value: 0
|
|
128
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
|
129
|
-
configurable: !1,
|
|
130
|
-
enumerable: !1,
|
|
131
|
-
writable: !0,
|
|
132
|
-
value: null
|
|
133
|
-
}), Object.defineProperty(e, "_debugStack", {
|
|
134
|
-
configurable: !1,
|
|
135
|
-
enumerable: !1,
|
|
136
|
-
writable: !0,
|
|
137
|
-
value: i
|
|
138
|
-
}), Object.defineProperty(e, "_debugTask", {
|
|
139
|
-
configurable: !1,
|
|
140
|
-
enumerable: !1,
|
|
141
|
-
writable: !0,
|
|
142
|
-
value: a
|
|
143
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
144
|
-
}
|
|
145
|
-
function d(e, n, i, o, l, d) {
|
|
146
|
-
var p = n.children;
|
|
147
|
-
if (p !== void 0) if (o) if (D(p)) {
|
|
148
|
-
for (o = 0; o < p.length; o++) f(p[o]);
|
|
149
|
-
Object.freeze && Object.freeze(p);
|
|
150
|
-
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
151
|
-
else f(p);
|
|
152
|
-
if (E.call(n, "key")) {
|
|
153
|
-
p = t(e);
|
|
154
|
-
var m = Object.keys(n).filter(function(e) {
|
|
155
|
-
return e !== "key";
|
|
156
|
-
});
|
|
157
|
-
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", N[p + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, p, m, p), N[p + o] = !0);
|
|
158
|
-
}
|
|
159
|
-
if (p = null, i !== void 0 && (r(i), p = "" + i), s(n) && (r(n.key), p = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
|
|
160
|
-
else i = n;
|
|
161
|
-
return p && c(i, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), u(e, p, i, a(), l, d);
|
|
162
|
-
}
|
|
163
|
-
function f(e) {
|
|
164
|
-
p(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === S && (e._payload.status === "fulfilled" ? p(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
165
|
-
}
|
|
166
|
-
function p(e) {
|
|
167
|
-
return typeof e == "object" && !!e && e.$$typeof === h;
|
|
168
|
-
}
|
|
169
|
-
var m = ee("react"), h = Symbol.for("react.transitional.element"), te = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), ne = Symbol.for("react.consumer"), re = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), ie = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), C = Symbol.for("react.activity"), w = Symbol.for("react.client.reference"), T = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, E = Object.prototype.hasOwnProperty, D = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
170
|
-
return null;
|
|
171
|
-
};
|
|
172
|
-
m = { react_stack_bottom_frame: function(e) {
|
|
173
|
-
return e();
|
|
174
|
-
} };
|
|
175
|
-
var k, A = {}, j = m.react_stack_bottom_frame.bind(m, o)(), M = O(i(o)), N = {};
|
|
176
|
-
e.Fragment = g, e.jsx = function(e, t, n) {
|
|
177
|
-
var r = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
178
|
-
return d(e, t, n, !1, r ? Error("react-stack-top-frame") : j, r ? O(i(e)) : M);
|
|
179
|
-
}, e.jsxs = function(e, t, n) {
|
|
180
|
-
var r = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
181
|
-
return d(e, t, n, !0, r ? Error("react-stack-top-frame") : j, r ? O(i(e)) : M);
|
|
182
|
-
};
|
|
183
|
-
})();
|
|
184
|
-
})), _ = (/* @__PURE__ */ h(((e, t) => {
|
|
185
|
-
process.env.NODE_ENV === "production" ? t.exports = te() : t.exports = g();
|
|
186
|
-
})))(), v = 10080 * 60 * 1e3;
|
|
187
|
-
function ne(e) {
|
|
4
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
import { ComponentRegistry as u, buildExpandFields as d, extractRecords as f } from "@object-ui/core";
|
|
6
|
+
import { useDataScope as p, useNavigationOverlay as m, useSchemaContext as h } from "@object-ui/react";
|
|
7
|
+
import { usePullToRefresh as g } from "@object-ui/mobile";
|
|
8
|
+
import { z as _ } from "zod";
|
|
9
|
+
//#region src/renderer.tsx
|
|
10
|
+
var v = 10080 * 60 * 1e3;
|
|
11
|
+
function y(e) {
|
|
188
12
|
let t = e.flatMap((e) => (e.items || []).flatMap((e) => [e.startDate, e.endDate])), n = Math.min(...t.map((e) => new Date(e).getTime())), r = Math.max(...t.map((e) => new Date(e).getTime()));
|
|
189
13
|
return {
|
|
190
14
|
minDate: new Date(n).toISOString().split("T")[0],
|
|
191
15
|
maxDate: new Date(r).toISOString().split("T")[0]
|
|
192
16
|
};
|
|
193
17
|
}
|
|
194
|
-
function
|
|
18
|
+
function b(e, t, n, r) {
|
|
195
19
|
let i = new Date(e).getTime(), a = new Date(t).getTime(), o = new Date(n).getTime(), s = new Date(r).getTime() - o, c = i - o, l = a - i;
|
|
196
20
|
return {
|
|
197
21
|
start: c / s * 100,
|
|
198
22
|
width: l / s * 100
|
|
199
23
|
};
|
|
200
24
|
}
|
|
201
|
-
function
|
|
25
|
+
function x(e, t) {
|
|
202
26
|
let n = new Date(e);
|
|
203
27
|
return t === "short" ? n.toLocaleDateString() : t === "long" ? n.toLocaleDateString("en-US", {
|
|
204
28
|
year: "numeric",
|
|
@@ -206,27 +30,27 @@ function y(e, t) {
|
|
|
206
30
|
day: "numeric"
|
|
207
31
|
}) : n.toISOString().split("T")[0];
|
|
208
32
|
}
|
|
209
|
-
var
|
|
210
|
-
let { variant: r = "vertical", items: i = [], dateFormat: o = "short", onItemClick:
|
|
211
|
-
if (r === "vertical") return /* @__PURE__ */ (
|
|
33
|
+
var S = ({ schema: e, className: t, ...n }) => {
|
|
34
|
+
let { variant: r = "vertical", items: i = [], dateFormat: o = "short", onItemClick: u } = e;
|
|
35
|
+
if (r === "vertical") return /* @__PURE__ */ c(E, {
|
|
212
36
|
className: t,
|
|
213
37
|
...n,
|
|
214
|
-
children: i.map((e, t) => /* @__PURE__ */ (
|
|
215
|
-
className: a(e.className,
|
|
216
|
-
onClick: () =>
|
|
217
|
-
children: [/* @__PURE__ */ (
|
|
38
|
+
children: i.map((e, t) => /* @__PURE__ */ l(O, {
|
|
39
|
+
className: a(e.className, u && "cursor-pointer"),
|
|
40
|
+
onClick: () => u?.(e),
|
|
41
|
+
children: [/* @__PURE__ */ c(A, {
|
|
218
42
|
variant: e.variant || "default",
|
|
219
|
-
children: e.icon && /* @__PURE__ */ (
|
|
43
|
+
children: e.icon && /* @__PURE__ */ c("span", {
|
|
220
44
|
className: "text-xs",
|
|
221
45
|
children: e.icon
|
|
222
46
|
})
|
|
223
|
-
}), /* @__PURE__ */ (
|
|
224
|
-
e.time && /* @__PURE__ */ (
|
|
47
|
+
}), /* @__PURE__ */ l(j, { children: [
|
|
48
|
+
e.time && /* @__PURE__ */ c(N, {
|
|
225
49
|
dateTime: e.time,
|
|
226
|
-
children:
|
|
50
|
+
children: x(e.time, o)
|
|
227
51
|
}),
|
|
228
|
-
e.title && /* @__PURE__ */ (
|
|
229
|
-
e.description && /* @__PURE__ */ (
|
|
52
|
+
e.title && /* @__PURE__ */ c(M, { children: e.title }),
|
|
53
|
+
e.description && /* @__PURE__ */ c(P, {
|
|
230
54
|
className: "line-clamp-2 sm:line-clamp-none",
|
|
231
55
|
children: e.description
|
|
232
56
|
}),
|
|
@@ -234,51 +58,51 @@ var ie = ({ schema: e, className: t, ...n }) => {
|
|
|
234
58
|
] })]
|
|
235
59
|
}, t))
|
|
236
60
|
});
|
|
237
|
-
if (r === "horizontal") return /* @__PURE__ */ (
|
|
61
|
+
if (r === "horizontal") return /* @__PURE__ */ c(F, {
|
|
238
62
|
className: a("overflow-x-auto [-webkit-overflow-scrolling:touch]", t),
|
|
239
63
|
...n,
|
|
240
|
-
children: i.map((e, t) => /* @__PURE__ */ (
|
|
241
|
-
className: a(e.className,
|
|
242
|
-
onClick: () =>
|
|
243
|
-
children: [/* @__PURE__ */ (
|
|
64
|
+
children: i.map((e, t) => /* @__PURE__ */ l(I, {
|
|
65
|
+
className: a(e.className, u && "cursor-pointer"),
|
|
66
|
+
onClick: () => u?.(e),
|
|
67
|
+
children: [/* @__PURE__ */ l("div", {
|
|
244
68
|
className: "flex flex-col items-center",
|
|
245
|
-
children: [/* @__PURE__ */ (
|
|
69
|
+
children: [/* @__PURE__ */ c(A, {
|
|
246
70
|
variant: e.variant || "default",
|
|
247
|
-
children: e.icon && /* @__PURE__ */ (
|
|
71
|
+
children: e.icon && /* @__PURE__ */ c("span", {
|
|
248
72
|
className: "text-xs",
|
|
249
73
|
children: e.icon
|
|
250
74
|
})
|
|
251
|
-
}), /* @__PURE__ */ (
|
|
75
|
+
}), /* @__PURE__ */ l("div", {
|
|
252
76
|
className: "mt-4 text-center",
|
|
253
77
|
children: [
|
|
254
|
-
e.time && /* @__PURE__ */ (
|
|
78
|
+
e.time && /* @__PURE__ */ c(N, {
|
|
255
79
|
dateTime: e.time,
|
|
256
|
-
children:
|
|
80
|
+
children: x(e.time, o)
|
|
257
81
|
}),
|
|
258
|
-
e.title && /* @__PURE__ */ (
|
|
259
|
-
e.description && /* @__PURE__ */ (
|
|
82
|
+
e.title && /* @__PURE__ */ c(M, { children: e.title }),
|
|
83
|
+
e.description && /* @__PURE__ */ c(P, {
|
|
260
84
|
className: "text-center line-clamp-2 sm:line-clamp-none",
|
|
261
85
|
children: e.description
|
|
262
86
|
}),
|
|
263
87
|
e.content && s(e.content)
|
|
264
88
|
]
|
|
265
89
|
})]
|
|
266
|
-
}), t < i.length - 1 && /* @__PURE__ */ (
|
|
90
|
+
}), t < i.length - 1 && /* @__PURE__ */ c("div", { className: "absolute left-full w-16 border-t-2 border-gray-200 top-3" })]
|
|
267
91
|
}, t))
|
|
268
92
|
});
|
|
269
93
|
if (r === "gantt") {
|
|
270
|
-
let r =
|
|
271
|
-
let e = [], t = new Date(s), n = new Date(
|
|
272
|
-
if (
|
|
94
|
+
let r = y(i), s = e.minDate || r.minDate, d = e.maxDate || r.maxDate, f = e.timeScale || "month", p = (() => {
|
|
95
|
+
let e = [], t = new Date(s), n = new Date(d);
|
|
96
|
+
if (f === "month") {
|
|
273
97
|
let r = new Date(t);
|
|
274
98
|
for (; r <= n;) e.push(r.toLocaleDateString("en-US", {
|
|
275
99
|
month: "short",
|
|
276
100
|
year: "numeric"
|
|
277
101
|
})), r.setMonth(r.getMonth() + 1);
|
|
278
|
-
} else if (
|
|
102
|
+
} else if (f === "week") {
|
|
279
103
|
let r = new Date(t);
|
|
280
104
|
for (; r <= n;) e.push(`Week ${Math.ceil((r.getTime() - t.getTime()) / v) + 1}`), r.setDate(r.getDate() + 7);
|
|
281
|
-
} else if (
|
|
105
|
+
} else if (f === "day") {
|
|
282
106
|
let r = new Date(t);
|
|
283
107
|
for (; r <= n;) e.push(r.toLocaleDateString("en-US", {
|
|
284
108
|
month: "short",
|
|
@@ -287,40 +111,40 @@ var ie = ({ schema: e, className: t, ...n }) => {
|
|
|
287
111
|
}
|
|
288
112
|
return e;
|
|
289
113
|
})();
|
|
290
|
-
return /* @__PURE__ */ (
|
|
114
|
+
return /* @__PURE__ */ l(L, {
|
|
291
115
|
className: a("overflow-x-auto [-webkit-overflow-scrolling:touch]", t),
|
|
292
116
|
...n,
|
|
293
|
-
children: [/* @__PURE__ */ (
|
|
117
|
+
children: [/* @__PURE__ */ l(R, { children: [/* @__PURE__ */ c(z, {
|
|
294
118
|
className: "flex items-center px-2 sm:px-4 py-2 sm:py-3",
|
|
295
|
-
children: /* @__PURE__ */ (
|
|
119
|
+
children: /* @__PURE__ */ c("span", {
|
|
296
120
|
className: "font-semibold text-xs sm:text-sm",
|
|
297
121
|
children: e.rowLabel || "Items"
|
|
298
122
|
})
|
|
299
|
-
}), /* @__PURE__ */ (
|
|
123
|
+
}), /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c("div", {
|
|
300
124
|
className: "flex h-full",
|
|
301
|
-
children:
|
|
125
|
+
children: p.map((e, t) => /* @__PURE__ */ c("div", {
|
|
302
126
|
className: "flex-1 px-1 sm:px-2 py-2 sm:py-3 border-r text-xs font-medium text-center",
|
|
303
127
|
children: e
|
|
304
128
|
}, t))
|
|
305
|
-
}) })] }), /* @__PURE__ */ (
|
|
129
|
+
}) })] }), /* @__PURE__ */ c("div", { children: /* @__PURE__ */ l("div", {
|
|
306
130
|
className: "flex",
|
|
307
|
-
children: [/* @__PURE__ */ (
|
|
131
|
+
children: [/* @__PURE__ */ c(z, { children: i.map((e, t) => /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(H, {
|
|
308
132
|
title: e.label,
|
|
309
133
|
className: "truncate",
|
|
310
134
|
children: e.label
|
|
311
|
-
}) }, t)) }), /* @__PURE__ */ (
|
|
135
|
+
}) }, t)) }), /* @__PURE__ */ c(B, {
|
|
312
136
|
className: "relative",
|
|
313
|
-
children: i.map((e, t) => /* @__PURE__ */ (
|
|
137
|
+
children: i.map((e, t) => /* @__PURE__ */ c(V, {
|
|
314
138
|
className: "relative",
|
|
315
139
|
children: (e.items || []).map((n, r) => {
|
|
316
|
-
let i =
|
|
317
|
-
return /* @__PURE__ */ (
|
|
140
|
+
let i = b(n.startDate, n.endDate, s, d);
|
|
141
|
+
return /* @__PURE__ */ c(U, {
|
|
318
142
|
start: i.start,
|
|
319
143
|
width: i.width,
|
|
320
144
|
variant: n.variant || "default",
|
|
321
|
-
onClick: () =>
|
|
322
|
-
title: `${n.title || ""}\n${
|
|
323
|
-
children: /* @__PURE__ */ (
|
|
145
|
+
onClick: () => u?.(n, e, t, r),
|
|
146
|
+
title: `${n.title || ""}\n${x(n.startDate, o)} - ${x(n.endDate, o)}`,
|
|
147
|
+
children: /* @__PURE__ */ c(W, { children: n.title })
|
|
324
148
|
}, r);
|
|
325
149
|
})
|
|
326
150
|
}, t))
|
|
@@ -330,7 +154,7 @@ var ie = ({ schema: e, className: t, ...n }) => {
|
|
|
330
154
|
}
|
|
331
155
|
return null;
|
|
332
156
|
};
|
|
333
|
-
|
|
157
|
+
u.register("timeline", S, {
|
|
334
158
|
namespace: "plugin-timeline",
|
|
335
159
|
label: "Timeline",
|
|
336
160
|
category: "data-display",
|
|
@@ -526,2722 +350,23 @@ c.register("timeline", ie, {
|
|
|
526
350
|
}
|
|
527
351
|
});
|
|
528
352
|
//#endregion
|
|
529
|
-
//#region
|
|
530
|
-
var
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
let i = n?.Parent ?? Object;
|
|
549
|
-
class a extends i {}
|
|
550
|
-
Object.defineProperty(a, "name", { value: e });
|
|
551
|
-
function o(e) {
|
|
552
|
-
var t;
|
|
553
|
-
let i = n?.Parent ? new a() : this;
|
|
554
|
-
r(i, e), (t = i._zod).deferred ?? (t.deferred = []);
|
|
555
|
-
for (let e of i._zod.deferred) e();
|
|
556
|
-
return i;
|
|
557
|
-
}
|
|
558
|
-
return Object.defineProperty(o, "init", { value: r }), Object.defineProperty(o, Symbol.hasInstance, { value: (t) => n?.Parent && t instanceof n.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(o, "name", { value: e }), o;
|
|
559
|
-
}
|
|
560
|
-
var S = class extends Error {
|
|
561
|
-
constructor() {
|
|
562
|
-
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
563
|
-
}
|
|
564
|
-
}, C = class extends Error {
|
|
565
|
-
constructor(e) {
|
|
566
|
-
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
567
|
-
}
|
|
568
|
-
};
|
|
569
|
-
(b = globalThis).__zod_globalConfig ?? (b.__zod_globalConfig = {});
|
|
570
|
-
var w = globalThis.__zod_globalConfig;
|
|
571
|
-
function T(e) {
|
|
572
|
-
return e && Object.assign(w, e), w;
|
|
573
|
-
}
|
|
574
|
-
//#endregion
|
|
575
|
-
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
|
|
576
|
-
function E(e) {
|
|
577
|
-
let t = Object.values(e).filter((e) => typeof e == "number");
|
|
578
|
-
return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
|
|
579
|
-
}
|
|
580
|
-
function D(e, t) {
|
|
581
|
-
return typeof t == "bigint" ? t.toString() : t;
|
|
582
|
-
}
|
|
583
|
-
function O(e) {
|
|
584
|
-
return { get value() {
|
|
585
|
-
{
|
|
586
|
-
let t = e();
|
|
587
|
-
return Object.defineProperty(this, "value", { value: t }), t;
|
|
588
|
-
}
|
|
589
|
-
throw Error("cached value already set");
|
|
590
|
-
} };
|
|
591
|
-
}
|
|
592
|
-
function k(e) {
|
|
593
|
-
return e == null;
|
|
594
|
-
}
|
|
595
|
-
function A(e) {
|
|
596
|
-
let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
597
|
-
return e.slice(t, n);
|
|
598
|
-
}
|
|
599
|
-
var j = /* @__PURE__ */ Symbol("evaluating");
|
|
600
|
-
function M(e, t, n) {
|
|
601
|
-
let r;
|
|
602
|
-
Object.defineProperty(e, t, {
|
|
603
|
-
get() {
|
|
604
|
-
if (r !== j) return r === void 0 && (r = j, r = n()), r;
|
|
605
|
-
},
|
|
606
|
-
set(n) {
|
|
607
|
-
Object.defineProperty(e, t, { value: n });
|
|
608
|
-
},
|
|
609
|
-
configurable: !0
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
function N(e, t, n) {
|
|
613
|
-
Object.defineProperty(e, t, {
|
|
614
|
-
value: n,
|
|
615
|
-
writable: !0,
|
|
616
|
-
enumerable: !0,
|
|
617
|
-
configurable: !0
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
function P(...e) {
|
|
621
|
-
let t = {};
|
|
622
|
-
for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n));
|
|
623
|
-
return Object.defineProperties({}, t);
|
|
624
|
-
}
|
|
625
|
-
function ae(e) {
|
|
626
|
-
return JSON.stringify(e);
|
|
627
|
-
}
|
|
628
|
-
function oe(e) {
|
|
629
|
-
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
630
|
-
}
|
|
631
|
-
var se = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
|
|
632
|
-
function ce(e) {
|
|
633
|
-
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
634
|
-
}
|
|
635
|
-
var le = /* @__PURE__ */ O(() => {
|
|
636
|
-
if (w.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
637
|
-
try {
|
|
638
|
-
return Function(""), !0;
|
|
639
|
-
} catch {
|
|
640
|
-
return !1;
|
|
641
|
-
}
|
|
642
|
-
});
|
|
643
|
-
function F(e) {
|
|
644
|
-
if (ce(e) === !1) return !1;
|
|
645
|
-
let t = e.constructor;
|
|
646
|
-
if (t === void 0 || typeof t != "function") return !0;
|
|
647
|
-
let n = t.prototype;
|
|
648
|
-
return !(ce(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
649
|
-
}
|
|
650
|
-
function ue(e) {
|
|
651
|
-
return F(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
|
|
652
|
-
}
|
|
653
|
-
var de = /* @__PURE__ */ new Set([
|
|
654
|
-
"string",
|
|
655
|
-
"number",
|
|
656
|
-
"symbol"
|
|
657
|
-
]);
|
|
658
|
-
function fe(e) {
|
|
659
|
-
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
660
|
-
}
|
|
661
|
-
function I(e, t, n) {
|
|
662
|
-
let r = new e._zod.constr(t ?? e._zod.def);
|
|
663
|
-
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
664
|
-
}
|
|
665
|
-
function L(e) {
|
|
666
|
-
let t = e;
|
|
667
|
-
if (!t) return {};
|
|
668
|
-
if (typeof t == "string") return { error: () => t };
|
|
669
|
-
if (t?.message !== void 0) {
|
|
670
|
-
if (t?.error !== void 0) throw Error("Cannot specify both `message` and `error` params");
|
|
671
|
-
t.error = t.message;
|
|
672
|
-
}
|
|
673
|
-
return delete t.message, typeof t.error == "string" ? {
|
|
674
|
-
...t,
|
|
675
|
-
error: () => t.error
|
|
676
|
-
} : t;
|
|
677
|
-
}
|
|
678
|
-
function pe(e) {
|
|
679
|
-
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
680
|
-
}
|
|
681
|
-
-Number.MAX_VALUE, Number.MAX_VALUE;
|
|
682
|
-
function me(e, t) {
|
|
683
|
-
let n = e._zod.def, r = n.checks;
|
|
684
|
-
if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
|
|
685
|
-
return I(e, P(e._zod.def, {
|
|
686
|
-
get shape() {
|
|
687
|
-
let e = {};
|
|
688
|
-
for (let r in t) {
|
|
689
|
-
if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`);
|
|
690
|
-
t[r] && (e[r] = n.shape[r]);
|
|
691
|
-
}
|
|
692
|
-
return N(this, "shape", e), e;
|
|
693
|
-
},
|
|
694
|
-
checks: []
|
|
695
|
-
}));
|
|
696
|
-
}
|
|
697
|
-
function he(e, t) {
|
|
698
|
-
let n = e._zod.def, r = n.checks;
|
|
699
|
-
if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
|
|
700
|
-
return I(e, P(e._zod.def, {
|
|
701
|
-
get shape() {
|
|
702
|
-
let r = { ...e._zod.def.shape };
|
|
703
|
-
for (let e in t) {
|
|
704
|
-
if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`);
|
|
705
|
-
t[e] && delete r[e];
|
|
706
|
-
}
|
|
707
|
-
return N(this, "shape", r), r;
|
|
708
|
-
},
|
|
709
|
-
checks: []
|
|
710
|
-
}));
|
|
711
|
-
}
|
|
712
|
-
function ge(e, t) {
|
|
713
|
-
if (!F(t)) throw Error("Invalid input to extend: expected a plain object");
|
|
714
|
-
let n = e._zod.def.checks;
|
|
715
|
-
if (n && n.length > 0) {
|
|
716
|
-
let n = e._zod.def.shape;
|
|
717
|
-
for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
718
|
-
}
|
|
719
|
-
return I(e, P(e._zod.def, { get shape() {
|
|
720
|
-
let n = {
|
|
721
|
-
...e._zod.def.shape,
|
|
722
|
-
...t
|
|
723
|
-
};
|
|
724
|
-
return N(this, "shape", n), n;
|
|
725
|
-
} }));
|
|
726
|
-
}
|
|
727
|
-
function _e(e, t) {
|
|
728
|
-
if (!F(t)) throw Error("Invalid input to safeExtend: expected a plain object");
|
|
729
|
-
return I(e, P(e._zod.def, { get shape() {
|
|
730
|
-
let n = {
|
|
731
|
-
...e._zod.def.shape,
|
|
732
|
-
...t
|
|
733
|
-
};
|
|
734
|
-
return N(this, "shape", n), n;
|
|
735
|
-
} }));
|
|
736
|
-
}
|
|
737
|
-
function ve(e, t) {
|
|
738
|
-
if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
739
|
-
return I(e, P(e._zod.def, {
|
|
740
|
-
get shape() {
|
|
741
|
-
let n = {
|
|
742
|
-
...e._zod.def.shape,
|
|
743
|
-
...t._zod.def.shape
|
|
744
|
-
};
|
|
745
|
-
return N(this, "shape", n), n;
|
|
746
|
-
},
|
|
747
|
-
get catchall() {
|
|
748
|
-
return t._zod.def.catchall;
|
|
749
|
-
},
|
|
750
|
-
checks: t._zod.def.checks ?? []
|
|
751
|
-
}));
|
|
752
|
-
}
|
|
753
|
-
function ye(e, t, n) {
|
|
754
|
-
let r = t._zod.def.checks;
|
|
755
|
-
if (r && r.length > 0) throw Error(".partial() cannot be used on object schemas containing refinements");
|
|
756
|
-
return I(t, P(t._zod.def, {
|
|
757
|
-
get shape() {
|
|
758
|
-
let r = t._zod.def.shape, i = { ...r };
|
|
759
|
-
if (n) for (let t in n) {
|
|
760
|
-
if (!(t in r)) throw Error(`Unrecognized key: "${t}"`);
|
|
761
|
-
n[t] && (i[t] = e ? new e({
|
|
762
|
-
type: "optional",
|
|
763
|
-
innerType: r[t]
|
|
764
|
-
}) : r[t]);
|
|
765
|
-
}
|
|
766
|
-
else for (let t in r) i[t] = e ? new e({
|
|
767
|
-
type: "optional",
|
|
768
|
-
innerType: r[t]
|
|
769
|
-
}) : r[t];
|
|
770
|
-
return N(this, "shape", i), i;
|
|
771
|
-
},
|
|
772
|
-
checks: []
|
|
773
|
-
}));
|
|
774
|
-
}
|
|
775
|
-
function be(e, t, n) {
|
|
776
|
-
return I(t, P(t._zod.def, { get shape() {
|
|
777
|
-
let r = t._zod.def.shape, i = { ...r };
|
|
778
|
-
if (n) for (let t in n) {
|
|
779
|
-
if (!(t in i)) throw Error(`Unrecognized key: "${t}"`);
|
|
780
|
-
n[t] && (i[t] = new e({
|
|
781
|
-
type: "nonoptional",
|
|
782
|
-
innerType: r[t]
|
|
783
|
-
}));
|
|
784
|
-
}
|
|
785
|
-
else for (let t in r) i[t] = new e({
|
|
786
|
-
type: "nonoptional",
|
|
787
|
-
innerType: r[t]
|
|
788
|
-
});
|
|
789
|
-
return N(this, "shape", i), i;
|
|
790
|
-
} }));
|
|
791
|
-
}
|
|
792
|
-
function R(e, t = 0) {
|
|
793
|
-
if (e.aborted === !0) return !0;
|
|
794
|
-
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
|
|
795
|
-
return !1;
|
|
796
|
-
}
|
|
797
|
-
function xe(e, t = 0) {
|
|
798
|
-
if (e.aborted === !0) return !0;
|
|
799
|
-
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
|
|
800
|
-
return !1;
|
|
801
|
-
}
|
|
802
|
-
function Se(e, t) {
|
|
803
|
-
return t.map((t) => {
|
|
804
|
-
var n;
|
|
805
|
-
return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
|
|
806
|
-
});
|
|
807
|
-
}
|
|
808
|
-
function Ce(e) {
|
|
809
|
-
return typeof e == "string" ? e : e?.message;
|
|
810
|
-
}
|
|
811
|
-
function z(e, t, n) {
|
|
812
|
-
let r = e.message ? e.message : Ce(e.inst?._zod.def?.error?.(e)) ?? Ce(t?.error?.(e)) ?? Ce(n.customError?.(e)) ?? Ce(n.localeError?.(e)) ?? "Invalid input", { inst: i, continue: a, input: o, ...s } = e;
|
|
813
|
-
return s.path ??= [], s.message = r, t?.reportInput && (s.input = o), s;
|
|
814
|
-
}
|
|
815
|
-
function we(e) {
|
|
816
|
-
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
817
|
-
}
|
|
818
|
-
function B(...e) {
|
|
819
|
-
let [t, n, r] = e;
|
|
820
|
-
return typeof t == "string" ? {
|
|
821
|
-
message: t,
|
|
822
|
-
code: "custom",
|
|
823
|
-
input: n,
|
|
824
|
-
inst: r
|
|
825
|
-
} : { ...t };
|
|
826
|
-
}
|
|
827
|
-
//#endregion
|
|
828
|
-
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
|
|
829
|
-
var Te = (e, t) => {
|
|
830
|
-
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
831
|
-
value: e._zod,
|
|
832
|
-
enumerable: !1
|
|
833
|
-
}), Object.defineProperty(e, "issues", {
|
|
834
|
-
value: t,
|
|
835
|
-
enumerable: !1
|
|
836
|
-
}), e.message = JSON.stringify(t, D, 2), Object.defineProperty(e, "toString", {
|
|
837
|
-
value: () => e.message,
|
|
838
|
-
enumerable: !1
|
|
839
|
-
});
|
|
840
|
-
}, Ee = x("$ZodError", Te), De = x("$ZodError", Te, { Parent: Error });
|
|
841
|
-
function Oe(e, t = (e) => e.message) {
|
|
842
|
-
let n = {}, r = [];
|
|
843
|
-
for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i));
|
|
844
|
-
return {
|
|
845
|
-
formErrors: r,
|
|
846
|
-
fieldErrors: n
|
|
847
|
-
};
|
|
848
|
-
}
|
|
849
|
-
function ke(e, t = (e) => e.message) {
|
|
850
|
-
let n = { _errors: [] }, r = (e, i = []) => {
|
|
851
|
-
for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
|
|
852
|
-
else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
|
|
853
|
-
else if (a.code === "invalid_element") r({ issues: a.issues }, [...i, ...a.path]);
|
|
854
|
-
else {
|
|
855
|
-
let e = [...i, ...a.path];
|
|
856
|
-
if (e.length === 0) n._errors.push(t(a));
|
|
857
|
-
else {
|
|
858
|
-
let r = n, i = 0;
|
|
859
|
-
for (; i < e.length;) {
|
|
860
|
-
let n = e[i];
|
|
861
|
-
i === e.length - 1 ? (r[n] = r[n] || { _errors: [] }, r[n]._errors.push(t(a))) : r[n] = r[n] || { _errors: [] }, r = r[n], i++;
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
};
|
|
866
|
-
return r(e), n;
|
|
867
|
-
}
|
|
868
|
-
//#endregion
|
|
869
|
-
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
|
|
870
|
-
var Ae = (e) => (t, n, r, i) => {
|
|
871
|
-
let a = r ? {
|
|
872
|
-
...r,
|
|
873
|
-
async: !1
|
|
874
|
-
} : { async: !1 }, o = t._zod.run({
|
|
875
|
-
value: n,
|
|
876
|
-
issues: []
|
|
877
|
-
}, a);
|
|
878
|
-
if (o instanceof Promise) throw new S();
|
|
879
|
-
if (o.issues.length) {
|
|
880
|
-
let t = new (i?.Err ?? e)(o.issues.map((e) => z(e, a, T())));
|
|
881
|
-
throw se(t, i?.callee), t;
|
|
882
|
-
}
|
|
883
|
-
return o.value;
|
|
884
|
-
}, je = (e) => async (t, n, r, i) => {
|
|
885
|
-
let a = r ? {
|
|
886
|
-
...r,
|
|
887
|
-
async: !0
|
|
888
|
-
} : { async: !0 }, o = t._zod.run({
|
|
889
|
-
value: n,
|
|
890
|
-
issues: []
|
|
891
|
-
}, a);
|
|
892
|
-
if (o instanceof Promise && (o = await o), o.issues.length) {
|
|
893
|
-
let t = new (i?.Err ?? e)(o.issues.map((e) => z(e, a, T())));
|
|
894
|
-
throw se(t, i?.callee), t;
|
|
895
|
-
}
|
|
896
|
-
return o.value;
|
|
897
|
-
}, Me = (e) => (t, n, r) => {
|
|
898
|
-
let i = r ? {
|
|
899
|
-
...r,
|
|
900
|
-
async: !1
|
|
901
|
-
} : { async: !1 }, a = t._zod.run({
|
|
902
|
-
value: n,
|
|
903
|
-
issues: []
|
|
904
|
-
}, i);
|
|
905
|
-
if (a instanceof Promise) throw new S();
|
|
906
|
-
return a.issues.length ? {
|
|
907
|
-
success: !1,
|
|
908
|
-
error: new (e ?? Ee)(a.issues.map((e) => z(e, i, T())))
|
|
909
|
-
} : {
|
|
910
|
-
success: !0,
|
|
911
|
-
data: a.value
|
|
912
|
-
};
|
|
913
|
-
}, Ne = /* @__PURE__ */ Me(De), Pe = (e) => async (t, n, r) => {
|
|
914
|
-
let i = r ? {
|
|
915
|
-
...r,
|
|
916
|
-
async: !0
|
|
917
|
-
} : { async: !0 }, a = t._zod.run({
|
|
918
|
-
value: n,
|
|
919
|
-
issues: []
|
|
920
|
-
}, i);
|
|
921
|
-
return a instanceof Promise && (a = await a), a.issues.length ? {
|
|
922
|
-
success: !1,
|
|
923
|
-
error: new e(a.issues.map((e) => z(e, i, T())))
|
|
924
|
-
} : {
|
|
925
|
-
success: !0,
|
|
926
|
-
data: a.value
|
|
927
|
-
};
|
|
928
|
-
}, Fe = /* @__PURE__ */ Pe(De), Ie = (e) => (t, n, r) => {
|
|
929
|
-
let i = r ? {
|
|
930
|
-
...r,
|
|
931
|
-
direction: "backward"
|
|
932
|
-
} : { direction: "backward" };
|
|
933
|
-
return Ae(e)(t, n, i);
|
|
934
|
-
}, Le = (e) => (t, n, r) => Ae(e)(t, n, r), Re = (e) => async (t, n, r) => {
|
|
935
|
-
let i = r ? {
|
|
936
|
-
...r,
|
|
937
|
-
direction: "backward"
|
|
938
|
-
} : { direction: "backward" };
|
|
939
|
-
return je(e)(t, n, i);
|
|
940
|
-
}, ze = (e) => async (t, n, r) => je(e)(t, n, r), Be = (e) => (t, n, r) => {
|
|
941
|
-
let i = r ? {
|
|
942
|
-
...r,
|
|
943
|
-
direction: "backward"
|
|
944
|
-
} : { direction: "backward" };
|
|
945
|
-
return Me(e)(t, n, i);
|
|
946
|
-
}, Ve = (e) => (t, n, r) => Me(e)(t, n, r), He = (e) => async (t, n, r) => {
|
|
947
|
-
let i = r ? {
|
|
948
|
-
...r,
|
|
949
|
-
direction: "backward"
|
|
950
|
-
} : { direction: "backward" };
|
|
951
|
-
return Pe(e)(t, n, i);
|
|
952
|
-
}, Ue = (e) => async (t, n, r) => Pe(e)(t, n, r), We = /^[cC][0-9a-z]{6,}$/, Ge = /^[0-9a-z]+$/, Ke = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, qe = /^[0-9a-vA-V]{20}$/, Je = /^[A-Za-z0-9]{27}$/, Ye = /^[a-zA-Z0-9_-]{21}$/, Xe = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Ze = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Qe = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, $e = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, et = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
953
|
-
function tt() {
|
|
954
|
-
return new RegExp(et, "u");
|
|
955
|
-
}
|
|
956
|
-
var nt = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, rt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, it = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, at = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ot = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, st = /^[A-Za-z0-9_-]*$/, ct = /^https?$/, lt = /^\+[1-9]\d{6,14}$/, ut = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", dt = /* @__PURE__ */ RegExp(`^${ut}$`);
|
|
957
|
-
function ft(e) {
|
|
958
|
-
let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
959
|
-
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
960
|
-
}
|
|
961
|
-
function pt(e) {
|
|
962
|
-
return RegExp(`^${ft(e)}$`);
|
|
963
|
-
}
|
|
964
|
-
function mt(e) {
|
|
965
|
-
let t = ft({ precision: e.precision }), n = ["Z"];
|
|
966
|
-
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
967
|
-
let r = `${t}(?:${n.join("|")})`;
|
|
968
|
-
return RegExp(`^${ut}T(?:${r})$`);
|
|
969
|
-
}
|
|
970
|
-
var ht = (e) => {
|
|
971
|
-
let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
972
|
-
return RegExp(`^${t}$`);
|
|
973
|
-
}, gt = /^[^A-Z]*$/, _t = /^[^a-z]*$/, V = /* @__PURE__ */ x("$ZodCheck", (e, t) => {
|
|
974
|
-
var n;
|
|
975
|
-
e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
976
|
-
}), vt = /* @__PURE__ */ x("$ZodCheckMaxLength", (e, t) => {
|
|
977
|
-
var n;
|
|
978
|
-
V.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
979
|
-
let t = e.value;
|
|
980
|
-
return !k(t) && t.length !== void 0;
|
|
981
|
-
}), e._zod.onattach.push((e) => {
|
|
982
|
-
let n = e._zod.bag.maximum ?? Infinity;
|
|
983
|
-
t.maximum < n && (e._zod.bag.maximum = t.maximum);
|
|
984
|
-
}), e._zod.check = (n) => {
|
|
985
|
-
let r = n.value;
|
|
986
|
-
if (r.length <= t.maximum) return;
|
|
987
|
-
let i = we(r);
|
|
988
|
-
n.issues.push({
|
|
989
|
-
origin: i,
|
|
990
|
-
code: "too_big",
|
|
991
|
-
maximum: t.maximum,
|
|
992
|
-
inclusive: !0,
|
|
993
|
-
input: r,
|
|
994
|
-
inst: e,
|
|
995
|
-
continue: !t.abort
|
|
996
|
-
});
|
|
997
|
-
};
|
|
998
|
-
}), yt = /* @__PURE__ */ x("$ZodCheckMinLength", (e, t) => {
|
|
999
|
-
var n;
|
|
1000
|
-
V.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
1001
|
-
let t = e.value;
|
|
1002
|
-
return !k(t) && t.length !== void 0;
|
|
1003
|
-
}), e._zod.onattach.push((e) => {
|
|
1004
|
-
let n = e._zod.bag.minimum ?? -Infinity;
|
|
1005
|
-
t.minimum > n && (e._zod.bag.minimum = t.minimum);
|
|
1006
|
-
}), e._zod.check = (n) => {
|
|
1007
|
-
let r = n.value;
|
|
1008
|
-
if (r.length >= t.minimum) return;
|
|
1009
|
-
let i = we(r);
|
|
1010
|
-
n.issues.push({
|
|
1011
|
-
origin: i,
|
|
1012
|
-
code: "too_small",
|
|
1013
|
-
minimum: t.minimum,
|
|
1014
|
-
inclusive: !0,
|
|
1015
|
-
input: r,
|
|
1016
|
-
inst: e,
|
|
1017
|
-
continue: !t.abort
|
|
1018
|
-
});
|
|
1019
|
-
};
|
|
1020
|
-
}), bt = /* @__PURE__ */ x("$ZodCheckLengthEquals", (e, t) => {
|
|
1021
|
-
var n;
|
|
1022
|
-
V.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
1023
|
-
let t = e.value;
|
|
1024
|
-
return !k(t) && t.length !== void 0;
|
|
1025
|
-
}), e._zod.onattach.push((e) => {
|
|
1026
|
-
let n = e._zod.bag;
|
|
1027
|
-
n.minimum = t.length, n.maximum = t.length, n.length = t.length;
|
|
1028
|
-
}), e._zod.check = (n) => {
|
|
1029
|
-
let r = n.value, i = r.length;
|
|
1030
|
-
if (i === t.length) return;
|
|
1031
|
-
let a = we(r), o = i > t.length;
|
|
1032
|
-
n.issues.push({
|
|
1033
|
-
origin: a,
|
|
1034
|
-
...o ? {
|
|
1035
|
-
code: "too_big",
|
|
1036
|
-
maximum: t.length
|
|
1037
|
-
} : {
|
|
1038
|
-
code: "too_small",
|
|
1039
|
-
minimum: t.length
|
|
1040
|
-
},
|
|
1041
|
-
inclusive: !0,
|
|
1042
|
-
exact: !0,
|
|
1043
|
-
input: n.value,
|
|
1044
|
-
inst: e,
|
|
1045
|
-
continue: !t.abort
|
|
1046
|
-
});
|
|
1047
|
-
};
|
|
1048
|
-
}), xt = /* @__PURE__ */ x("$ZodCheckStringFormat", (e, t) => {
|
|
1049
|
-
var n, r;
|
|
1050
|
-
V.init(e, t), e._zod.onattach.push((e) => {
|
|
1051
|
-
let n = e._zod.bag;
|
|
1052
|
-
n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
|
|
1053
|
-
}), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
|
|
1054
|
-
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
1055
|
-
origin: "string",
|
|
1056
|
-
code: "invalid_format",
|
|
1057
|
-
format: t.format,
|
|
1058
|
-
input: n.value,
|
|
1059
|
-
...t.pattern ? { pattern: t.pattern.toString() } : {},
|
|
1060
|
-
inst: e,
|
|
1061
|
-
continue: !t.abort
|
|
1062
|
-
});
|
|
1063
|
-
}) : (r = e._zod).check ?? (r.check = () => {});
|
|
1064
|
-
}), St = /* @__PURE__ */ x("$ZodCheckRegex", (e, t) => {
|
|
1065
|
-
xt.init(e, t), e._zod.check = (n) => {
|
|
1066
|
-
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
1067
|
-
origin: "string",
|
|
1068
|
-
code: "invalid_format",
|
|
1069
|
-
format: "regex",
|
|
1070
|
-
input: n.value,
|
|
1071
|
-
pattern: t.pattern.toString(),
|
|
1072
|
-
inst: e,
|
|
1073
|
-
continue: !t.abort
|
|
1074
|
-
});
|
|
1075
|
-
};
|
|
1076
|
-
}), Ct = /* @__PURE__ */ x("$ZodCheckLowerCase", (e, t) => {
|
|
1077
|
-
t.pattern ??= gt, xt.init(e, t);
|
|
1078
|
-
}), wt = /* @__PURE__ */ x("$ZodCheckUpperCase", (e, t) => {
|
|
1079
|
-
t.pattern ??= _t, xt.init(e, t);
|
|
1080
|
-
}), Tt = /* @__PURE__ */ x("$ZodCheckIncludes", (e, t) => {
|
|
1081
|
-
V.init(e, t);
|
|
1082
|
-
let n = fe(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
1083
|
-
t.pattern = r, e._zod.onattach.push((e) => {
|
|
1084
|
-
let t = e._zod.bag;
|
|
1085
|
-
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
|
|
1086
|
-
}), e._zod.check = (n) => {
|
|
1087
|
-
n.value.includes(t.includes, t.position) || n.issues.push({
|
|
1088
|
-
origin: "string",
|
|
1089
|
-
code: "invalid_format",
|
|
1090
|
-
format: "includes",
|
|
1091
|
-
includes: t.includes,
|
|
1092
|
-
input: n.value,
|
|
1093
|
-
inst: e,
|
|
1094
|
-
continue: !t.abort
|
|
1095
|
-
});
|
|
1096
|
-
};
|
|
1097
|
-
}), Et = /* @__PURE__ */ x("$ZodCheckStartsWith", (e, t) => {
|
|
1098
|
-
V.init(e, t);
|
|
1099
|
-
let n = RegExp(`^${fe(t.prefix)}.*`);
|
|
1100
|
-
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
1101
|
-
let t = e._zod.bag;
|
|
1102
|
-
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
1103
|
-
}), e._zod.check = (n) => {
|
|
1104
|
-
n.value.startsWith(t.prefix) || n.issues.push({
|
|
1105
|
-
origin: "string",
|
|
1106
|
-
code: "invalid_format",
|
|
1107
|
-
format: "starts_with",
|
|
1108
|
-
prefix: t.prefix,
|
|
1109
|
-
input: n.value,
|
|
1110
|
-
inst: e,
|
|
1111
|
-
continue: !t.abort
|
|
1112
|
-
});
|
|
1113
|
-
};
|
|
1114
|
-
}), Dt = /* @__PURE__ */ x("$ZodCheckEndsWith", (e, t) => {
|
|
1115
|
-
V.init(e, t);
|
|
1116
|
-
let n = RegExp(`.*${fe(t.suffix)}$`);
|
|
1117
|
-
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
1118
|
-
let t = e._zod.bag;
|
|
1119
|
-
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
1120
|
-
}), e._zod.check = (n) => {
|
|
1121
|
-
n.value.endsWith(t.suffix) || n.issues.push({
|
|
1122
|
-
origin: "string",
|
|
1123
|
-
code: "invalid_format",
|
|
1124
|
-
format: "ends_with",
|
|
1125
|
-
suffix: t.suffix,
|
|
1126
|
-
input: n.value,
|
|
1127
|
-
inst: e,
|
|
1128
|
-
continue: !t.abort
|
|
1129
|
-
});
|
|
1130
|
-
};
|
|
1131
|
-
}), Ot = /* @__PURE__ */ x("$ZodCheckOverwrite", (e, t) => {
|
|
1132
|
-
V.init(e, t), e._zod.check = (e) => {
|
|
1133
|
-
e.value = t.tx(e.value);
|
|
1134
|
-
};
|
|
1135
|
-
}), kt = class {
|
|
1136
|
-
constructor(e = []) {
|
|
1137
|
-
this.content = [], this.indent = 0, this && (this.args = e);
|
|
1138
|
-
}
|
|
1139
|
-
indented(e) {
|
|
1140
|
-
this.indent += 1, e(this), --this.indent;
|
|
1141
|
-
}
|
|
1142
|
-
write(e) {
|
|
1143
|
-
if (typeof e == "function") {
|
|
1144
|
-
e(this, { execution: "sync" }), e(this, { execution: "async" });
|
|
1145
|
-
return;
|
|
1146
|
-
}
|
|
1147
|
-
let t = e.split("\n").filter((e) => e), n = Math.min(...t.map((e) => e.length - e.trimStart().length)), r = t.map((e) => e.slice(n)).map((e) => " ".repeat(this.indent * 2) + e);
|
|
1148
|
-
for (let e of r) this.content.push(e);
|
|
1149
|
-
}
|
|
1150
|
-
compile() {
|
|
1151
|
-
let e = Function, t = this?.args, n = [...(this?.content ?? [""]).map((e) => ` ${e}`)];
|
|
1152
|
-
return new e(...t, n.join("\n"));
|
|
1153
|
-
}
|
|
1154
|
-
}, At = {
|
|
1155
|
-
major: 4,
|
|
1156
|
-
minor: 4,
|
|
1157
|
-
patch: 3
|
|
1158
|
-
}, H = /* @__PURE__ */ x("$ZodType", (e, t) => {
|
|
1159
|
-
var n;
|
|
1160
|
-
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = At;
|
|
1161
|
-
let r = [...e._zod.def.checks ?? []];
|
|
1162
|
-
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
1163
|
-
for (let t of r) for (let n of t._zod.onattach) n(e);
|
|
1164
|
-
if (r.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
|
|
1165
|
-
e._zod.run = e._zod.parse;
|
|
1166
|
-
});
|
|
1167
|
-
else {
|
|
1168
|
-
let t = (e, t, n) => {
|
|
1169
|
-
let r = R(e), i;
|
|
1170
|
-
for (let a of t) {
|
|
1171
|
-
if (a._zod.def.when) {
|
|
1172
|
-
if (xe(e) || !a._zod.def.when(e)) continue;
|
|
1173
|
-
} else if (r) continue;
|
|
1174
|
-
let t = e.issues.length, o = a._zod.check(e);
|
|
1175
|
-
if (o instanceof Promise && n?.async === !1) throw new S();
|
|
1176
|
-
if (i || o instanceof Promise) i = (i ?? Promise.resolve()).then(async () => {
|
|
1177
|
-
await o, e.issues.length !== t && (r ||= R(e, t));
|
|
1178
|
-
});
|
|
1179
|
-
else {
|
|
1180
|
-
if (e.issues.length === t) continue;
|
|
1181
|
-
r ||= R(e, t);
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
return i ? i.then(() => e) : e;
|
|
1185
|
-
}, n = (n, i, a) => {
|
|
1186
|
-
if (R(n)) return n.aborted = !0, n;
|
|
1187
|
-
let o = t(i, r, a);
|
|
1188
|
-
if (o instanceof Promise) {
|
|
1189
|
-
if (a.async === !1) throw new S();
|
|
1190
|
-
return o.then((t) => e._zod.parse(t, a));
|
|
1191
|
-
}
|
|
1192
|
-
return e._zod.parse(o, a);
|
|
1193
|
-
};
|
|
1194
|
-
e._zod.run = (i, a) => {
|
|
1195
|
-
if (a.skipChecks) return e._zod.parse(i, a);
|
|
1196
|
-
if (a.direction === "backward") {
|
|
1197
|
-
let t = e._zod.parse({
|
|
1198
|
-
value: i.value,
|
|
1199
|
-
issues: []
|
|
1200
|
-
}, {
|
|
1201
|
-
...a,
|
|
1202
|
-
skipChecks: !0
|
|
1203
|
-
});
|
|
1204
|
-
return t instanceof Promise ? t.then((e) => n(e, i, a)) : n(t, i, a);
|
|
1205
|
-
}
|
|
1206
|
-
let o = e._zod.parse(i, a);
|
|
1207
|
-
if (o instanceof Promise) {
|
|
1208
|
-
if (a.async === !1) throw new S();
|
|
1209
|
-
return o.then((e) => t(e, r, a));
|
|
1210
|
-
}
|
|
1211
|
-
return t(o, r, a);
|
|
1212
|
-
};
|
|
1213
|
-
}
|
|
1214
|
-
M(e, "~standard", () => ({
|
|
1215
|
-
validate: (t) => {
|
|
1216
|
-
try {
|
|
1217
|
-
let n = Ne(e, t);
|
|
1218
|
-
return n.success ? { value: n.data } : { issues: n.error?.issues };
|
|
1219
|
-
} catch {
|
|
1220
|
-
return Fe(e, t).then((e) => e.success ? { value: e.data } : { issues: e.error?.issues });
|
|
1221
|
-
}
|
|
1222
|
-
},
|
|
1223
|
-
vendor: "zod",
|
|
1224
|
-
version: 1
|
|
1225
|
-
}));
|
|
1226
|
-
}), jt = /* @__PURE__ */ x("$ZodString", (e, t) => {
|
|
1227
|
-
H.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? ht(e._zod.bag), e._zod.parse = (n, r) => {
|
|
1228
|
-
if (t.coerce) try {
|
|
1229
|
-
n.value = String(n.value);
|
|
1230
|
-
} catch {}
|
|
1231
|
-
return typeof n.value == "string" || n.issues.push({
|
|
1232
|
-
expected: "string",
|
|
1233
|
-
code: "invalid_type",
|
|
1234
|
-
input: n.value,
|
|
1235
|
-
inst: e
|
|
1236
|
-
}), n;
|
|
1237
|
-
};
|
|
1238
|
-
}), U = /* @__PURE__ */ x("$ZodStringFormat", (e, t) => {
|
|
1239
|
-
xt.init(e, t), jt.init(e, t);
|
|
1240
|
-
}), Mt = /* @__PURE__ */ x("$ZodGUID", (e, t) => {
|
|
1241
|
-
t.pattern ??= Ze, U.init(e, t);
|
|
1242
|
-
}), Nt = /* @__PURE__ */ x("$ZodUUID", (e, t) => {
|
|
1243
|
-
if (t.version) {
|
|
1244
|
-
let e = {
|
|
1245
|
-
v1: 1,
|
|
1246
|
-
v2: 2,
|
|
1247
|
-
v3: 3,
|
|
1248
|
-
v4: 4,
|
|
1249
|
-
v5: 5,
|
|
1250
|
-
v6: 6,
|
|
1251
|
-
v7: 7,
|
|
1252
|
-
v8: 8
|
|
1253
|
-
}[t.version];
|
|
1254
|
-
if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
|
|
1255
|
-
t.pattern ??= Qe(e);
|
|
1256
|
-
} else t.pattern ??= Qe();
|
|
1257
|
-
U.init(e, t);
|
|
1258
|
-
}), Pt = /* @__PURE__ */ x("$ZodEmail", (e, t) => {
|
|
1259
|
-
t.pattern ??= $e, U.init(e, t);
|
|
1260
|
-
}), Ft = /* @__PURE__ */ x("$ZodURL", (e, t) => {
|
|
1261
|
-
U.init(e, t), e._zod.check = (n) => {
|
|
1262
|
-
try {
|
|
1263
|
-
let r = n.value.trim();
|
|
1264
|
-
if (!t.normalize && t.protocol?.source === ct.source && !/^https?:\/\//i.test(r)) {
|
|
1265
|
-
n.issues.push({
|
|
1266
|
-
code: "invalid_format",
|
|
1267
|
-
format: "url",
|
|
1268
|
-
note: "Invalid URL format",
|
|
1269
|
-
input: n.value,
|
|
1270
|
-
inst: e,
|
|
1271
|
-
continue: !t.abort
|
|
1272
|
-
});
|
|
1273
|
-
return;
|
|
1274
|
-
}
|
|
1275
|
-
let i = new URL(r);
|
|
1276
|
-
t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(i.hostname) || n.issues.push({
|
|
1277
|
-
code: "invalid_format",
|
|
1278
|
-
format: "url",
|
|
1279
|
-
note: "Invalid hostname",
|
|
1280
|
-
pattern: t.hostname.source,
|
|
1281
|
-
input: n.value,
|
|
1282
|
-
inst: e,
|
|
1283
|
-
continue: !t.abort
|
|
1284
|
-
})), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(i.protocol.endsWith(":") ? i.protocol.slice(0, -1) : i.protocol) || n.issues.push({
|
|
1285
|
-
code: "invalid_format",
|
|
1286
|
-
format: "url",
|
|
1287
|
-
note: "Invalid protocol",
|
|
1288
|
-
pattern: t.protocol.source,
|
|
1289
|
-
input: n.value,
|
|
1290
|
-
inst: e,
|
|
1291
|
-
continue: !t.abort
|
|
1292
|
-
})), t.normalize ? n.value = i.href : n.value = r;
|
|
1293
|
-
return;
|
|
1294
|
-
} catch {
|
|
1295
|
-
n.issues.push({
|
|
1296
|
-
code: "invalid_format",
|
|
1297
|
-
format: "url",
|
|
1298
|
-
input: n.value,
|
|
1299
|
-
inst: e,
|
|
1300
|
-
continue: !t.abort
|
|
1301
|
-
});
|
|
1302
|
-
}
|
|
1303
|
-
};
|
|
1304
|
-
}), It = /* @__PURE__ */ x("$ZodEmoji", (e, t) => {
|
|
1305
|
-
t.pattern ??= tt(), U.init(e, t);
|
|
1306
|
-
}), Lt = /* @__PURE__ */ x("$ZodNanoID", (e, t) => {
|
|
1307
|
-
t.pattern ??= Ye, U.init(e, t);
|
|
1308
|
-
}), Rt = /* @__PURE__ */ x("$ZodCUID", (e, t) => {
|
|
1309
|
-
t.pattern ??= We, U.init(e, t);
|
|
1310
|
-
}), zt = /* @__PURE__ */ x("$ZodCUID2", (e, t) => {
|
|
1311
|
-
t.pattern ??= Ge, U.init(e, t);
|
|
1312
|
-
}), Bt = /* @__PURE__ */ x("$ZodULID", (e, t) => {
|
|
1313
|
-
t.pattern ??= Ke, U.init(e, t);
|
|
1314
|
-
}), Vt = /* @__PURE__ */ x("$ZodXID", (e, t) => {
|
|
1315
|
-
t.pattern ??= qe, U.init(e, t);
|
|
1316
|
-
}), Ht = /* @__PURE__ */ x("$ZodKSUID", (e, t) => {
|
|
1317
|
-
t.pattern ??= Je, U.init(e, t);
|
|
1318
|
-
}), Ut = /* @__PURE__ */ x("$ZodISODateTime", (e, t) => {
|
|
1319
|
-
t.pattern ??= mt(t), U.init(e, t);
|
|
1320
|
-
}), Wt = /* @__PURE__ */ x("$ZodISODate", (e, t) => {
|
|
1321
|
-
t.pattern ??= dt, U.init(e, t);
|
|
1322
|
-
}), Gt = /* @__PURE__ */ x("$ZodISOTime", (e, t) => {
|
|
1323
|
-
t.pattern ??= pt(t), U.init(e, t);
|
|
1324
|
-
}), Kt = /* @__PURE__ */ x("$ZodISODuration", (e, t) => {
|
|
1325
|
-
t.pattern ??= Xe, U.init(e, t);
|
|
1326
|
-
}), qt = /* @__PURE__ */ x("$ZodIPv4", (e, t) => {
|
|
1327
|
-
t.pattern ??= nt, U.init(e, t), e._zod.bag.format = "ipv4";
|
|
1328
|
-
}), Jt = /* @__PURE__ */ x("$ZodIPv6", (e, t) => {
|
|
1329
|
-
t.pattern ??= rt, U.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
1330
|
-
try {
|
|
1331
|
-
new URL(`http://[${n.value}]`);
|
|
1332
|
-
} catch {
|
|
1333
|
-
n.issues.push({
|
|
1334
|
-
code: "invalid_format",
|
|
1335
|
-
format: "ipv6",
|
|
1336
|
-
input: n.value,
|
|
1337
|
-
inst: e,
|
|
1338
|
-
continue: !t.abort
|
|
1339
|
-
});
|
|
1340
|
-
}
|
|
1341
|
-
};
|
|
1342
|
-
}), Yt = /* @__PURE__ */ x("$ZodCIDRv4", (e, t) => {
|
|
1343
|
-
t.pattern ??= it, U.init(e, t);
|
|
1344
|
-
}), Xt = /* @__PURE__ */ x("$ZodCIDRv6", (e, t) => {
|
|
1345
|
-
t.pattern ??= at, U.init(e, t), e._zod.check = (n) => {
|
|
1346
|
-
let r = n.value.split("/");
|
|
1347
|
-
try {
|
|
1348
|
-
if (r.length !== 2) throw Error();
|
|
1349
|
-
let [e, t] = r;
|
|
1350
|
-
if (!t) throw Error();
|
|
1351
|
-
let n = Number(t);
|
|
1352
|
-
if (`${n}` !== t || n < 0 || n > 128) throw Error();
|
|
1353
|
-
new URL(`http://[${e}]`);
|
|
1354
|
-
} catch {
|
|
1355
|
-
n.issues.push({
|
|
1356
|
-
code: "invalid_format",
|
|
1357
|
-
format: "cidrv6",
|
|
1358
|
-
input: n.value,
|
|
1359
|
-
inst: e,
|
|
1360
|
-
continue: !t.abort
|
|
1361
|
-
});
|
|
1362
|
-
}
|
|
1363
|
-
};
|
|
1364
|
-
});
|
|
1365
|
-
function Zt(e) {
|
|
1366
|
-
if (e === "") return !0;
|
|
1367
|
-
if (/\s/.test(e) || e.length % 4 != 0) return !1;
|
|
1368
|
-
try {
|
|
1369
|
-
return atob(e), !0;
|
|
1370
|
-
} catch {
|
|
1371
|
-
return !1;
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
var Qt = /* @__PURE__ */ x("$ZodBase64", (e, t) => {
|
|
1375
|
-
t.pattern ??= ot, U.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1376
|
-
Zt(n.value) || n.issues.push({
|
|
1377
|
-
code: "invalid_format",
|
|
1378
|
-
format: "base64",
|
|
1379
|
-
input: n.value,
|
|
1380
|
-
inst: e,
|
|
1381
|
-
continue: !t.abort
|
|
1382
|
-
});
|
|
1383
|
-
};
|
|
1384
|
-
});
|
|
1385
|
-
function $t(e) {
|
|
1386
|
-
if (!st.test(e)) return !1;
|
|
1387
|
-
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
1388
|
-
return Zt(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
1389
|
-
}
|
|
1390
|
-
var en = /* @__PURE__ */ x("$ZodBase64URL", (e, t) => {
|
|
1391
|
-
t.pattern ??= st, U.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1392
|
-
$t(n.value) || n.issues.push({
|
|
1393
|
-
code: "invalid_format",
|
|
1394
|
-
format: "base64url",
|
|
1395
|
-
input: n.value,
|
|
1396
|
-
inst: e,
|
|
1397
|
-
continue: !t.abort
|
|
1398
|
-
});
|
|
1399
|
-
};
|
|
1400
|
-
}), tn = /* @__PURE__ */ x("$ZodE164", (e, t) => {
|
|
1401
|
-
t.pattern ??= lt, U.init(e, t);
|
|
1402
|
-
});
|
|
1403
|
-
function nn(e, t = null) {
|
|
1404
|
-
try {
|
|
1405
|
-
let n = e.split(".");
|
|
1406
|
-
if (n.length !== 3) return !1;
|
|
1407
|
-
let [r] = n;
|
|
1408
|
-
if (!r) return !1;
|
|
1409
|
-
let i = JSON.parse(atob(r));
|
|
1410
|
-
return !("typ" in i && i?.typ !== "JWT" || !i.alg || t && (!("alg" in i) || i.alg !== t));
|
|
1411
|
-
} catch {
|
|
1412
|
-
return !1;
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
var rn = /* @__PURE__ */ x("$ZodJWT", (e, t) => {
|
|
1416
|
-
U.init(e, t), e._zod.check = (n) => {
|
|
1417
|
-
nn(n.value, t.alg) || n.issues.push({
|
|
1418
|
-
code: "invalid_format",
|
|
1419
|
-
format: "jwt",
|
|
1420
|
-
input: n.value,
|
|
1421
|
-
inst: e,
|
|
1422
|
-
continue: !t.abort
|
|
1423
|
-
});
|
|
1424
|
-
};
|
|
1425
|
-
}), an = /* @__PURE__ */ x("$ZodUnknown", (e, t) => {
|
|
1426
|
-
H.init(e, t), e._zod.parse = (e) => e;
|
|
1427
|
-
}), on = /* @__PURE__ */ x("$ZodNever", (e, t) => {
|
|
1428
|
-
H.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
1429
|
-
expected: "never",
|
|
1430
|
-
code: "invalid_type",
|
|
1431
|
-
input: t.value,
|
|
1432
|
-
inst: e
|
|
1433
|
-
}), t);
|
|
1434
|
-
});
|
|
1435
|
-
function sn(e, t, n) {
|
|
1436
|
-
e.issues.length && t.issues.push(...Se(n, e.issues)), t.value[n] = e.value;
|
|
1437
|
-
}
|
|
1438
|
-
var cn = /* @__PURE__ */ x("$ZodArray", (e, t) => {
|
|
1439
|
-
H.init(e, t), e._zod.parse = (n, r) => {
|
|
1440
|
-
let i = n.value;
|
|
1441
|
-
if (!Array.isArray(i)) return n.issues.push({
|
|
1442
|
-
expected: "array",
|
|
1443
|
-
code: "invalid_type",
|
|
1444
|
-
input: i,
|
|
1445
|
-
inst: e
|
|
1446
|
-
}), n;
|
|
1447
|
-
n.value = Array(i.length);
|
|
1448
|
-
let a = [];
|
|
1449
|
-
for (let e = 0; e < i.length; e++) {
|
|
1450
|
-
let o = i[e], s = t.element._zod.run({
|
|
1451
|
-
value: o,
|
|
1452
|
-
issues: []
|
|
1453
|
-
}, r);
|
|
1454
|
-
s instanceof Promise ? a.push(s.then((t) => sn(t, n, e))) : sn(s, n, e);
|
|
1455
|
-
}
|
|
1456
|
-
return a.length ? Promise.all(a).then(() => n) : n;
|
|
1457
|
-
};
|
|
1458
|
-
});
|
|
1459
|
-
function ln(e, t, n, r, i, a) {
|
|
1460
|
-
let o = n in r;
|
|
1461
|
-
if (e.issues.length) {
|
|
1462
|
-
if (i && a && !o) return;
|
|
1463
|
-
t.issues.push(...Se(n, e.issues));
|
|
1464
|
-
}
|
|
1465
|
-
if (!o && !i) {
|
|
1466
|
-
e.issues.length || t.issues.push({
|
|
1467
|
-
code: "invalid_type",
|
|
1468
|
-
expected: "nonoptional",
|
|
1469
|
-
input: void 0,
|
|
1470
|
-
path: [n]
|
|
1471
|
-
});
|
|
1472
|
-
return;
|
|
1473
|
-
}
|
|
1474
|
-
e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1475
|
-
}
|
|
1476
|
-
function un(e) {
|
|
1477
|
-
let t = Object.keys(e.shape);
|
|
1478
|
-
for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${n}": expected a Zod schema`);
|
|
1479
|
-
let n = pe(e.shape);
|
|
1480
|
-
return {
|
|
1481
|
-
...e,
|
|
1482
|
-
keys: t,
|
|
1483
|
-
keySet: new Set(t),
|
|
1484
|
-
numKeys: t.length,
|
|
1485
|
-
optionalKeys: new Set(n)
|
|
1486
|
-
};
|
|
1487
|
-
}
|
|
1488
|
-
function dn(e, t, n, r, i, a) {
|
|
1489
|
-
let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin === "optional", d = c.optout === "optional";
|
|
1490
|
-
for (let i in t) {
|
|
1491
|
-
if (i === "__proto__" || s.has(i)) continue;
|
|
1492
|
-
if (l === "never") {
|
|
1493
|
-
o.push(i);
|
|
1494
|
-
continue;
|
|
1495
|
-
}
|
|
1496
|
-
let a = c.run({
|
|
1497
|
-
value: t[i],
|
|
1498
|
-
issues: []
|
|
1499
|
-
}, r);
|
|
1500
|
-
a instanceof Promise ? e.push(a.then((e) => ln(e, n, i, t, u, d))) : ln(a, n, i, t, u, d);
|
|
1501
|
-
}
|
|
1502
|
-
return o.length && n.issues.push({
|
|
1503
|
-
code: "unrecognized_keys",
|
|
1504
|
-
keys: o,
|
|
1505
|
-
input: t,
|
|
1506
|
-
inst: a
|
|
1507
|
-
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1508
|
-
}
|
|
1509
|
-
var fn = /* @__PURE__ */ x("$ZodObject", (e, t) => {
|
|
1510
|
-
if (H.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1511
|
-
let e = t.shape;
|
|
1512
|
-
Object.defineProperty(t, "shape", { get: () => {
|
|
1513
|
-
let n = { ...e };
|
|
1514
|
-
return Object.defineProperty(t, "shape", { value: n }), n;
|
|
1515
|
-
} });
|
|
1516
|
-
}
|
|
1517
|
-
let n = O(() => un(t));
|
|
1518
|
-
M(e._zod, "propValues", () => {
|
|
1519
|
-
let e = t.shape, n = {};
|
|
1520
|
-
for (let t in e) {
|
|
1521
|
-
let r = e[t]._zod;
|
|
1522
|
-
if (r.values) {
|
|
1523
|
-
n[t] ?? (n[t] = /* @__PURE__ */ new Set());
|
|
1524
|
-
for (let e of r.values) n[t].add(e);
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
return n;
|
|
1528
|
-
});
|
|
1529
|
-
let r = ce, i = t.catchall, a;
|
|
1530
|
-
e._zod.parse = (t, o) => {
|
|
1531
|
-
a ??= n.value;
|
|
1532
|
-
let s = t.value;
|
|
1533
|
-
if (!r(s)) return t.issues.push({
|
|
1534
|
-
expected: "object",
|
|
1535
|
-
code: "invalid_type",
|
|
1536
|
-
input: s,
|
|
1537
|
-
inst: e
|
|
1538
|
-
}), t;
|
|
1539
|
-
t.value = {};
|
|
1540
|
-
let c = [], l = a.shape;
|
|
1541
|
-
for (let e of a.keys) {
|
|
1542
|
-
let n = l[e], r = n._zod.optin === "optional", i = n._zod.optout === "optional", a = n._zod.run({
|
|
1543
|
-
value: s[e],
|
|
1544
|
-
issues: []
|
|
1545
|
-
}, o);
|
|
1546
|
-
a instanceof Promise ? c.push(a.then((n) => ln(n, t, e, s, r, i))) : ln(a, t, e, s, r, i);
|
|
1547
|
-
}
|
|
1548
|
-
return i ? dn(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t;
|
|
1549
|
-
};
|
|
1550
|
-
}), pn = /* @__PURE__ */ x("$ZodObjectJIT", (e, t) => {
|
|
1551
|
-
fn.init(e, t);
|
|
1552
|
-
let n = e._zod.parse, r = O(() => un(t)), i = (e) => {
|
|
1553
|
-
let t = new kt([
|
|
1554
|
-
"shape",
|
|
1555
|
-
"payload",
|
|
1556
|
-
"ctx"
|
|
1557
|
-
]), n = r.value, i = (e) => {
|
|
1558
|
-
let t = ae(e);
|
|
1559
|
-
return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`;
|
|
1560
|
-
};
|
|
1561
|
-
t.write("const input = payload.value;");
|
|
1562
|
-
let a = Object.create(null), o = 0;
|
|
1563
|
-
for (let e of n.keys) a[e] = `key_${o++}`;
|
|
1564
|
-
t.write("const newResult = {};");
|
|
1565
|
-
for (let r of n.keys) {
|
|
1566
|
-
let n = a[r], o = ae(r), s = e[r], c = s?._zod?.optin === "optional", l = s?._zod?.optout === "optional";
|
|
1567
|
-
t.write(`const ${n} = ${i(r)};`), c && l ? t.write(`
|
|
1568
|
-
if (${n}.issues.length) {
|
|
1569
|
-
if (${o} in input) {
|
|
1570
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
1571
|
-
...iss,
|
|
1572
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
1573
|
-
})));
|
|
1574
|
-
}
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
if (${n}.value === undefined) {
|
|
1578
|
-
if (${o} in input) {
|
|
1579
|
-
newResult[${o}] = undefined;
|
|
1580
|
-
}
|
|
1581
|
-
} else {
|
|
1582
|
-
newResult[${o}] = ${n}.value;
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
`) : c ? t.write(`
|
|
1586
|
-
if (${n}.issues.length) {
|
|
1587
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
1588
|
-
...iss,
|
|
1589
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
1590
|
-
})));
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
if (${n}.value === undefined) {
|
|
1594
|
-
if (${o} in input) {
|
|
1595
|
-
newResult[${o}] = undefined;
|
|
1596
|
-
}
|
|
1597
|
-
} else {
|
|
1598
|
-
newResult[${o}] = ${n}.value;
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
|
-
`) : t.write(`
|
|
1602
|
-
const ${n}_present = ${o} in input;
|
|
1603
|
-
if (${n}.issues.length) {
|
|
1604
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
1605
|
-
...iss,
|
|
1606
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
1607
|
-
})));
|
|
1608
|
-
}
|
|
1609
|
-
if (!${n}_present && !${n}.issues.length) {
|
|
1610
|
-
payload.issues.push({
|
|
1611
|
-
code: "invalid_type",
|
|
1612
|
-
expected: "nonoptional",
|
|
1613
|
-
input: undefined,
|
|
1614
|
-
path: [${o}]
|
|
1615
|
-
});
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
if (${n}_present) {
|
|
1619
|
-
if (${n}.value === undefined) {
|
|
1620
|
-
newResult[${o}] = undefined;
|
|
1621
|
-
} else {
|
|
1622
|
-
newResult[${o}] = ${n}.value;
|
|
1623
|
-
}
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
`);
|
|
1627
|
-
}
|
|
1628
|
-
t.write("payload.value = newResult;"), t.write("return payload;");
|
|
1629
|
-
let s = t.compile();
|
|
1630
|
-
return (t, n) => s(e, t, n);
|
|
1631
|
-
}, a, o = ce, s = !w.jitless, c = s && le.value, l = t.catchall, u;
|
|
1632
|
-
e._zod.parse = (d, f) => {
|
|
1633
|
-
u ??= r.value;
|
|
1634
|
-
let p = d.value;
|
|
1635
|
-
return o(p) ? s && c && f?.async === !1 && f.jitless !== !0 ? (a ||= i(t.shape), d = a(d, f), l ? dn([], p, d, f, u, e) : d) : n(d, f) : (d.issues.push({
|
|
1636
|
-
expected: "object",
|
|
1637
|
-
code: "invalid_type",
|
|
1638
|
-
input: p,
|
|
1639
|
-
inst: e
|
|
1640
|
-
}), d);
|
|
1641
|
-
};
|
|
1642
|
-
});
|
|
1643
|
-
function mn(e, t, n, r) {
|
|
1644
|
-
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
1645
|
-
let i = e.filter((e) => !R(e));
|
|
1646
|
-
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
1647
|
-
code: "invalid_union",
|
|
1648
|
-
input: t.value,
|
|
1649
|
-
inst: n,
|
|
1650
|
-
errors: e.map((e) => e.issues.map((e) => z(e, r, T())))
|
|
1651
|
-
}), t);
|
|
1652
|
-
}
|
|
1653
|
-
var hn = /* @__PURE__ */ x("$ZodUnion", (e, t) => {
|
|
1654
|
-
H.init(e, t), M(e._zod, "optin", () => t.options.some((e) => e._zod.optin === "optional") ? "optional" : void 0), M(e._zod, "optout", () => t.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), M(e._zod, "values", () => {
|
|
1655
|
-
if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values)));
|
|
1656
|
-
}), M(e._zod, "pattern", () => {
|
|
1657
|
-
if (t.options.every((e) => e._zod.pattern)) {
|
|
1658
|
-
let e = t.options.map((e) => e._zod.pattern);
|
|
1659
|
-
return RegExp(`^(${e.map((e) => A(e.source)).join("|")})$`);
|
|
1660
|
-
}
|
|
1661
|
-
});
|
|
1662
|
-
let n = t.options.length === 1 ? t.options[0]._zod.run : null;
|
|
1663
|
-
e._zod.parse = (r, i) => {
|
|
1664
|
-
if (n) return n(r, i);
|
|
1665
|
-
let a = !1, o = [];
|
|
1666
|
-
for (let e of t.options) {
|
|
1667
|
-
let t = e._zod.run({
|
|
1668
|
-
value: r.value,
|
|
1669
|
-
issues: []
|
|
1670
|
-
}, i);
|
|
1671
|
-
if (t instanceof Promise) o.push(t), a = !0;
|
|
1672
|
-
else {
|
|
1673
|
-
if (t.issues.length === 0) return t;
|
|
1674
|
-
o.push(t);
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
return a ? Promise.all(o).then((t) => mn(t, r, e, i)) : mn(o, r, e, i);
|
|
1678
|
-
};
|
|
1679
|
-
}), gn = /* @__PURE__ */ x("$ZodIntersection", (e, t) => {
|
|
1680
|
-
H.init(e, t), e._zod.parse = (e, n) => {
|
|
1681
|
-
let r = e.value, i = t.left._zod.run({
|
|
1682
|
-
value: r,
|
|
1683
|
-
issues: []
|
|
1684
|
-
}, n), a = t.right._zod.run({
|
|
1685
|
-
value: r,
|
|
1686
|
-
issues: []
|
|
1687
|
-
}, n);
|
|
1688
|
-
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => vn(e, t, n)) : vn(e, i, a);
|
|
1689
|
-
};
|
|
1690
|
-
});
|
|
1691
|
-
function _n(e, t) {
|
|
1692
|
-
if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
|
|
1693
|
-
valid: !0,
|
|
1694
|
-
data: e
|
|
1695
|
-
};
|
|
1696
|
-
if (F(e) && F(t)) {
|
|
1697
|
-
let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
|
|
1698
|
-
...e,
|
|
1699
|
-
...t
|
|
1700
|
-
};
|
|
1701
|
-
for (let n of r) {
|
|
1702
|
-
let r = _n(e[n], t[n]);
|
|
1703
|
-
if (!r.valid) return {
|
|
1704
|
-
valid: !1,
|
|
1705
|
-
mergeErrorPath: [n, ...r.mergeErrorPath]
|
|
1706
|
-
};
|
|
1707
|
-
i[n] = r.data;
|
|
1708
|
-
}
|
|
1709
|
-
return {
|
|
1710
|
-
valid: !0,
|
|
1711
|
-
data: i
|
|
1712
|
-
};
|
|
1713
|
-
}
|
|
1714
|
-
if (Array.isArray(e) && Array.isArray(t)) {
|
|
1715
|
-
if (e.length !== t.length) return {
|
|
1716
|
-
valid: !1,
|
|
1717
|
-
mergeErrorPath: []
|
|
1718
|
-
};
|
|
1719
|
-
let n = [];
|
|
1720
|
-
for (let r = 0; r < e.length; r++) {
|
|
1721
|
-
let i = e[r], a = t[r], o = _n(i, a);
|
|
1722
|
-
if (!o.valid) return {
|
|
1723
|
-
valid: !1,
|
|
1724
|
-
mergeErrorPath: [r, ...o.mergeErrorPath]
|
|
1725
|
-
};
|
|
1726
|
-
n.push(o.data);
|
|
1727
|
-
}
|
|
1728
|
-
return {
|
|
1729
|
-
valid: !0,
|
|
1730
|
-
data: n
|
|
1731
|
-
};
|
|
1732
|
-
}
|
|
1733
|
-
return {
|
|
1734
|
-
valid: !1,
|
|
1735
|
-
mergeErrorPath: []
|
|
1736
|
-
};
|
|
1737
|
-
}
|
|
1738
|
-
function vn(e, t, n) {
|
|
1739
|
-
let r = /* @__PURE__ */ new Map(), i;
|
|
1740
|
-
for (let n of t.issues) if (n.code === "unrecognized_keys") {
|
|
1741
|
-
i ??= n;
|
|
1742
|
-
for (let e of n.keys) r.has(e) || r.set(e, {}), r.get(e).l = !0;
|
|
1743
|
-
} else e.issues.push(n);
|
|
1744
|
-
for (let t of n.issues) if (t.code === "unrecognized_keys") for (let e of t.keys) r.has(e) || r.set(e, {}), r.get(e).r = !0;
|
|
1745
|
-
else e.issues.push(t);
|
|
1746
|
-
let a = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e);
|
|
1747
|
-
if (a.length && i && e.issues.push({
|
|
1748
|
-
...i,
|
|
1749
|
-
keys: a
|
|
1750
|
-
}), R(e)) return e;
|
|
1751
|
-
let o = _n(t.value, n.value);
|
|
1752
|
-
if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
|
|
1753
|
-
return e.value = o.data, e;
|
|
1754
|
-
}
|
|
1755
|
-
var yn = /* @__PURE__ */ x("$ZodEnum", (e, t) => {
|
|
1756
|
-
H.init(e, t);
|
|
1757
|
-
let n = E(t.entries), r = new Set(n);
|
|
1758
|
-
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => de.has(typeof e)).map((e) => typeof e == "string" ? fe(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
|
|
1759
|
-
let a = t.value;
|
|
1760
|
-
return r.has(a) || t.issues.push({
|
|
1761
|
-
code: "invalid_value",
|
|
1762
|
-
values: n,
|
|
1763
|
-
input: a,
|
|
1764
|
-
inst: e
|
|
1765
|
-
}), t;
|
|
1766
|
-
};
|
|
1767
|
-
}), bn = /* @__PURE__ */ x("$ZodTransform", (e, t) => {
|
|
1768
|
-
H.init(e, t), e._zod.optin = "optional", e._zod.parse = (n, r) => {
|
|
1769
|
-
if (r.direction === "backward") throw new C(e.constructor.name);
|
|
1770
|
-
let i = t.transform(n.value, n);
|
|
1771
|
-
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n.fallback = !0, n));
|
|
1772
|
-
if (i instanceof Promise) throw new S();
|
|
1773
|
-
return n.value = i, n.fallback = !0, n;
|
|
1774
|
-
};
|
|
1775
|
-
});
|
|
1776
|
-
function xn(e, t) {
|
|
1777
|
-
return t === void 0 && (e.issues.length || e.fallback) ? {
|
|
1778
|
-
issues: [],
|
|
1779
|
-
value: void 0
|
|
1780
|
-
} : e;
|
|
1781
|
-
}
|
|
1782
|
-
var Sn = /* @__PURE__ */ x("$ZodOptional", (e, t) => {
|
|
1783
|
-
H.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", M(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, void 0]) : void 0), M(e._zod, "pattern", () => {
|
|
1784
|
-
let e = t.innerType._zod.pattern;
|
|
1785
|
-
return e ? RegExp(`^(${A(e.source)})?$`) : void 0;
|
|
1786
|
-
}), e._zod.parse = (e, n) => {
|
|
1787
|
-
if (t.innerType._zod.optin === "optional") {
|
|
1788
|
-
let r = e.value, i = t.innerType._zod.run(e, n);
|
|
1789
|
-
return i instanceof Promise ? i.then((e) => xn(e, r)) : xn(i, r);
|
|
1790
|
-
}
|
|
1791
|
-
return e.value === void 0 ? e : t.innerType._zod.run(e, n);
|
|
1792
|
-
};
|
|
1793
|
-
}), Cn = /* @__PURE__ */ x("$ZodExactOptional", (e, t) => {
|
|
1794
|
-
Sn.init(e, t), M(e._zod, "values", () => t.innerType._zod.values), M(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
1795
|
-
}), wn = /* @__PURE__ */ x("$ZodNullable", (e, t) => {
|
|
1796
|
-
H.init(e, t), M(e._zod, "optin", () => t.innerType._zod.optin), M(e._zod, "optout", () => t.innerType._zod.optout), M(e._zod, "pattern", () => {
|
|
1797
|
-
let e = t.innerType._zod.pattern;
|
|
1798
|
-
return e ? RegExp(`^(${A(e.source)}|null)$`) : void 0;
|
|
1799
|
-
}), M(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
|
|
1800
|
-
}), Tn = /* @__PURE__ */ x("$ZodDefault", (e, t) => {
|
|
1801
|
-
H.init(e, t), e._zod.optin = "optional", M(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1802
|
-
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1803
|
-
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
1804
|
-
let r = t.innerType._zod.run(e, n);
|
|
1805
|
-
return r instanceof Promise ? r.then((e) => En(e, t)) : En(r, t);
|
|
1806
|
-
};
|
|
1807
|
-
});
|
|
1808
|
-
function En(e, t) {
|
|
1809
|
-
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1810
|
-
}
|
|
1811
|
-
var Dn = /* @__PURE__ */ x("$ZodPrefault", (e, t) => {
|
|
1812
|
-
H.init(e, t), e._zod.optin = "optional", M(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
|
|
1813
|
-
}), On = /* @__PURE__ */ x("$ZodNonOptional", (e, t) => {
|
|
1814
|
-
H.init(e, t), M(e._zod, "values", () => {
|
|
1815
|
-
let e = t.innerType._zod.values;
|
|
1816
|
-
return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
|
|
1817
|
-
}), e._zod.parse = (n, r) => {
|
|
1818
|
-
let i = t.innerType._zod.run(n, r);
|
|
1819
|
-
return i instanceof Promise ? i.then((t) => kn(t, e)) : kn(i, e);
|
|
1820
|
-
};
|
|
1821
|
-
});
|
|
1822
|
-
function kn(e, t) {
|
|
1823
|
-
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1824
|
-
code: "invalid_type",
|
|
1825
|
-
expected: "nonoptional",
|
|
1826
|
-
input: e.value,
|
|
1827
|
-
inst: t
|
|
1828
|
-
}), e;
|
|
1829
|
-
}
|
|
1830
|
-
var An = /* @__PURE__ */ x("$ZodCatch", (e, t) => {
|
|
1831
|
-
H.init(e, t), e._zod.optin = "optional", M(e._zod, "optout", () => t.innerType._zod.optout), M(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1832
|
-
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1833
|
-
let r = t.innerType._zod.run(e, n);
|
|
1834
|
-
return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1835
|
-
...e,
|
|
1836
|
-
error: { issues: r.issues.map((e) => z(e, n, T())) },
|
|
1837
|
-
input: e.value
|
|
1838
|
-
}), e.issues = [], e.fallback = !0), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1839
|
-
...e,
|
|
1840
|
-
error: { issues: r.issues.map((e) => z(e, n, T())) },
|
|
1841
|
-
input: e.value
|
|
1842
|
-
}), e.issues = [], e.fallback = !0), e);
|
|
1843
|
-
};
|
|
1844
|
-
}), jn = /* @__PURE__ */ x("$ZodPipe", (e, t) => {
|
|
1845
|
-
H.init(e, t), M(e._zod, "values", () => t.in._zod.values), M(e._zod, "optin", () => t.in._zod.optin), M(e._zod, "optout", () => t.out._zod.optout), M(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
1846
|
-
if (n.direction === "backward") {
|
|
1847
|
-
let r = t.out._zod.run(e, n);
|
|
1848
|
-
return r instanceof Promise ? r.then((e) => Mn(e, t.in, n)) : Mn(r, t.in, n);
|
|
1849
|
-
}
|
|
1850
|
-
let r = t.in._zod.run(e, n);
|
|
1851
|
-
return r instanceof Promise ? r.then((e) => Mn(e, t.out, n)) : Mn(r, t.out, n);
|
|
1852
|
-
};
|
|
1853
|
-
});
|
|
1854
|
-
function Mn(e, t, n) {
|
|
1855
|
-
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({
|
|
1856
|
-
value: e.value,
|
|
1857
|
-
issues: e.issues,
|
|
1858
|
-
fallback: e.fallback
|
|
1859
|
-
}, n);
|
|
1860
|
-
}
|
|
1861
|
-
var Nn = /* @__PURE__ */ x("$ZodReadonly", (e, t) => {
|
|
1862
|
-
H.init(e, t), M(e._zod, "propValues", () => t.innerType._zod.propValues), M(e._zod, "values", () => t.innerType._zod.values), M(e._zod, "optin", () => t.innerType?._zod?.optin), M(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
1863
|
-
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1864
|
-
let r = t.innerType._zod.run(e, n);
|
|
1865
|
-
return r instanceof Promise ? r.then(Pn) : Pn(r);
|
|
1866
|
-
};
|
|
1867
|
-
});
|
|
1868
|
-
function Pn(e) {
|
|
1869
|
-
return e.value = Object.freeze(e.value), e;
|
|
1870
|
-
}
|
|
1871
|
-
var Fn = /* @__PURE__ */ x("$ZodCustom", (e, t) => {
|
|
1872
|
-
V.init(e, t), H.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
|
|
1873
|
-
let r = n.value, i = t.fn(r);
|
|
1874
|
-
if (i instanceof Promise) return i.then((t) => In(t, n, r, e));
|
|
1875
|
-
In(i, n, r, e);
|
|
1876
|
-
};
|
|
1877
|
-
});
|
|
1878
|
-
function In(e, t, n, r) {
|
|
1879
|
-
if (!e) {
|
|
1880
|
-
let e = {
|
|
1881
|
-
code: "custom",
|
|
1882
|
-
input: n,
|
|
1883
|
-
inst: r,
|
|
1884
|
-
path: [...r._zod.def.path ?? []],
|
|
1885
|
-
continue: !r._zod.def.abort
|
|
1886
|
-
};
|
|
1887
|
-
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(B(e));
|
|
1888
|
-
}
|
|
1889
|
-
}
|
|
1890
|
-
//#endregion
|
|
1891
|
-
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
|
|
1892
|
-
var Ln, Rn = class {
|
|
1893
|
-
constructor() {
|
|
1894
|
-
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
1895
|
-
}
|
|
1896
|
-
add(e, ...t) {
|
|
1897
|
-
let n = t[0];
|
|
1898
|
-
return this._map.set(e, n), n && typeof n == "object" && "id" in n && this._idmap.set(n.id, e), this;
|
|
1899
|
-
}
|
|
1900
|
-
clear() {
|
|
1901
|
-
return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
|
|
1902
|
-
}
|
|
1903
|
-
remove(e) {
|
|
1904
|
-
let t = this._map.get(e);
|
|
1905
|
-
return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(e), this;
|
|
1906
|
-
}
|
|
1907
|
-
get(e) {
|
|
1908
|
-
let t = e._zod.parent;
|
|
1909
|
-
if (t) {
|
|
1910
|
-
let n = { ...this.get(t) ?? {} };
|
|
1911
|
-
delete n.id;
|
|
1912
|
-
let r = {
|
|
1913
|
-
...n,
|
|
1914
|
-
...this._map.get(e)
|
|
1915
|
-
};
|
|
1916
|
-
return Object.keys(r).length ? r : void 0;
|
|
1917
|
-
}
|
|
1918
|
-
return this._map.get(e);
|
|
1919
|
-
}
|
|
1920
|
-
has(e) {
|
|
1921
|
-
return this._map.has(e);
|
|
1922
|
-
}
|
|
1923
|
-
};
|
|
1924
|
-
function zn() {
|
|
1925
|
-
return new Rn();
|
|
1926
|
-
}
|
|
1927
|
-
(Ln = globalThis).__zod_globalRegistry ?? (Ln.__zod_globalRegistry = zn());
|
|
1928
|
-
var W = globalThis.__zod_globalRegistry;
|
|
1929
|
-
//#endregion
|
|
1930
|
-
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
|
|
1931
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1932
|
-
function Bn(e, t) {
|
|
1933
|
-
return new e({
|
|
1934
|
-
type: "string",
|
|
1935
|
-
...L(t)
|
|
1936
|
-
});
|
|
1937
|
-
}
|
|
1938
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1939
|
-
function Vn(e, t) {
|
|
1940
|
-
return new e({
|
|
1941
|
-
type: "string",
|
|
1942
|
-
format: "email",
|
|
1943
|
-
check: "string_format",
|
|
1944
|
-
abort: !1,
|
|
1945
|
-
...L(t)
|
|
1946
|
-
});
|
|
1947
|
-
}
|
|
1948
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1949
|
-
function Hn(e, t) {
|
|
1950
|
-
return new e({
|
|
1951
|
-
type: "string",
|
|
1952
|
-
format: "guid",
|
|
1953
|
-
check: "string_format",
|
|
1954
|
-
abort: !1,
|
|
1955
|
-
...L(t)
|
|
1956
|
-
});
|
|
1957
|
-
}
|
|
1958
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1959
|
-
function Un(e, t) {
|
|
1960
|
-
return new e({
|
|
1961
|
-
type: "string",
|
|
1962
|
-
format: "uuid",
|
|
1963
|
-
check: "string_format",
|
|
1964
|
-
abort: !1,
|
|
1965
|
-
...L(t)
|
|
1966
|
-
});
|
|
1967
|
-
}
|
|
1968
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1969
|
-
function Wn(e, t) {
|
|
1970
|
-
return new e({
|
|
1971
|
-
type: "string",
|
|
1972
|
-
format: "uuid",
|
|
1973
|
-
check: "string_format",
|
|
1974
|
-
abort: !1,
|
|
1975
|
-
version: "v4",
|
|
1976
|
-
...L(t)
|
|
1977
|
-
});
|
|
1978
|
-
}
|
|
1979
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1980
|
-
function Gn(e, t) {
|
|
1981
|
-
return new e({
|
|
1982
|
-
type: "string",
|
|
1983
|
-
format: "uuid",
|
|
1984
|
-
check: "string_format",
|
|
1985
|
-
abort: !1,
|
|
1986
|
-
version: "v6",
|
|
1987
|
-
...L(t)
|
|
1988
|
-
});
|
|
1989
|
-
}
|
|
1990
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1991
|
-
function Kn(e, t) {
|
|
1992
|
-
return new e({
|
|
1993
|
-
type: "string",
|
|
1994
|
-
format: "uuid",
|
|
1995
|
-
check: "string_format",
|
|
1996
|
-
abort: !1,
|
|
1997
|
-
version: "v7",
|
|
1998
|
-
...L(t)
|
|
1999
|
-
});
|
|
2000
|
-
}
|
|
2001
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2002
|
-
function qn(e, t) {
|
|
2003
|
-
return new e({
|
|
2004
|
-
type: "string",
|
|
2005
|
-
format: "url",
|
|
2006
|
-
check: "string_format",
|
|
2007
|
-
abort: !1,
|
|
2008
|
-
...L(t)
|
|
2009
|
-
});
|
|
2010
|
-
}
|
|
2011
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2012
|
-
function Jn(e, t) {
|
|
2013
|
-
return new e({
|
|
2014
|
-
type: "string",
|
|
2015
|
-
format: "emoji",
|
|
2016
|
-
check: "string_format",
|
|
2017
|
-
abort: !1,
|
|
2018
|
-
...L(t)
|
|
2019
|
-
});
|
|
2020
|
-
}
|
|
2021
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2022
|
-
function Yn(e, t) {
|
|
2023
|
-
return new e({
|
|
2024
|
-
type: "string",
|
|
2025
|
-
format: "nanoid",
|
|
2026
|
-
check: "string_format",
|
|
2027
|
-
abort: !1,
|
|
2028
|
-
...L(t)
|
|
2029
|
-
});
|
|
2030
|
-
}
|
|
2031
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2032
|
-
function Xn(e, t) {
|
|
2033
|
-
return new e({
|
|
2034
|
-
type: "string",
|
|
2035
|
-
format: "cuid",
|
|
2036
|
-
check: "string_format",
|
|
2037
|
-
abort: !1,
|
|
2038
|
-
...L(t)
|
|
2039
|
-
});
|
|
2040
|
-
}
|
|
2041
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2042
|
-
function Zn(e, t) {
|
|
2043
|
-
return new e({
|
|
2044
|
-
type: "string",
|
|
2045
|
-
format: "cuid2",
|
|
2046
|
-
check: "string_format",
|
|
2047
|
-
abort: !1,
|
|
2048
|
-
...L(t)
|
|
2049
|
-
});
|
|
2050
|
-
}
|
|
2051
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2052
|
-
function Qn(e, t) {
|
|
2053
|
-
return new e({
|
|
2054
|
-
type: "string",
|
|
2055
|
-
format: "ulid",
|
|
2056
|
-
check: "string_format",
|
|
2057
|
-
abort: !1,
|
|
2058
|
-
...L(t)
|
|
2059
|
-
});
|
|
2060
|
-
}
|
|
2061
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2062
|
-
function $n(e, t) {
|
|
2063
|
-
return new e({
|
|
2064
|
-
type: "string",
|
|
2065
|
-
format: "xid",
|
|
2066
|
-
check: "string_format",
|
|
2067
|
-
abort: !1,
|
|
2068
|
-
...L(t)
|
|
2069
|
-
});
|
|
2070
|
-
}
|
|
2071
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2072
|
-
function er(e, t) {
|
|
2073
|
-
return new e({
|
|
2074
|
-
type: "string",
|
|
2075
|
-
format: "ksuid",
|
|
2076
|
-
check: "string_format",
|
|
2077
|
-
abort: !1,
|
|
2078
|
-
...L(t)
|
|
2079
|
-
});
|
|
2080
|
-
}
|
|
2081
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2082
|
-
function tr(e, t) {
|
|
2083
|
-
return new e({
|
|
2084
|
-
type: "string",
|
|
2085
|
-
format: "ipv4",
|
|
2086
|
-
check: "string_format",
|
|
2087
|
-
abort: !1,
|
|
2088
|
-
...L(t)
|
|
2089
|
-
});
|
|
2090
|
-
}
|
|
2091
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2092
|
-
function nr(e, t) {
|
|
2093
|
-
return new e({
|
|
2094
|
-
type: "string",
|
|
2095
|
-
format: "ipv6",
|
|
2096
|
-
check: "string_format",
|
|
2097
|
-
abort: !1,
|
|
2098
|
-
...L(t)
|
|
2099
|
-
});
|
|
2100
|
-
}
|
|
2101
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2102
|
-
function rr(e, t) {
|
|
2103
|
-
return new e({
|
|
2104
|
-
type: "string",
|
|
2105
|
-
format: "cidrv4",
|
|
2106
|
-
check: "string_format",
|
|
2107
|
-
abort: !1,
|
|
2108
|
-
...L(t)
|
|
2109
|
-
});
|
|
2110
|
-
}
|
|
2111
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2112
|
-
function ir(e, t) {
|
|
2113
|
-
return new e({
|
|
2114
|
-
type: "string",
|
|
2115
|
-
format: "cidrv6",
|
|
2116
|
-
check: "string_format",
|
|
2117
|
-
abort: !1,
|
|
2118
|
-
...L(t)
|
|
2119
|
-
});
|
|
2120
|
-
}
|
|
2121
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2122
|
-
function ar(e, t) {
|
|
2123
|
-
return new e({
|
|
2124
|
-
type: "string",
|
|
2125
|
-
format: "base64",
|
|
2126
|
-
check: "string_format",
|
|
2127
|
-
abort: !1,
|
|
2128
|
-
...L(t)
|
|
2129
|
-
});
|
|
2130
|
-
}
|
|
2131
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2132
|
-
function or(e, t) {
|
|
2133
|
-
return new e({
|
|
2134
|
-
type: "string",
|
|
2135
|
-
format: "base64url",
|
|
2136
|
-
check: "string_format",
|
|
2137
|
-
abort: !1,
|
|
2138
|
-
...L(t)
|
|
2139
|
-
});
|
|
2140
|
-
}
|
|
2141
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2142
|
-
function sr(e, t) {
|
|
2143
|
-
return new e({
|
|
2144
|
-
type: "string",
|
|
2145
|
-
format: "e164",
|
|
2146
|
-
check: "string_format",
|
|
2147
|
-
abort: !1,
|
|
2148
|
-
...L(t)
|
|
2149
|
-
});
|
|
2150
|
-
}
|
|
2151
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2152
|
-
function cr(e, t) {
|
|
2153
|
-
return new e({
|
|
2154
|
-
type: "string",
|
|
2155
|
-
format: "jwt",
|
|
2156
|
-
check: "string_format",
|
|
2157
|
-
abort: !1,
|
|
2158
|
-
...L(t)
|
|
2159
|
-
});
|
|
2160
|
-
}
|
|
2161
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2162
|
-
function lr(e, t) {
|
|
2163
|
-
return new e({
|
|
2164
|
-
type: "string",
|
|
2165
|
-
format: "datetime",
|
|
2166
|
-
check: "string_format",
|
|
2167
|
-
offset: !1,
|
|
2168
|
-
local: !1,
|
|
2169
|
-
precision: null,
|
|
2170
|
-
...L(t)
|
|
2171
|
-
});
|
|
2172
|
-
}
|
|
2173
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2174
|
-
function ur(e, t) {
|
|
2175
|
-
return new e({
|
|
2176
|
-
type: "string",
|
|
2177
|
-
format: "date",
|
|
2178
|
-
check: "string_format",
|
|
2179
|
-
...L(t)
|
|
2180
|
-
});
|
|
2181
|
-
}
|
|
2182
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2183
|
-
function dr(e, t) {
|
|
2184
|
-
return new e({
|
|
2185
|
-
type: "string",
|
|
2186
|
-
format: "time",
|
|
2187
|
-
check: "string_format",
|
|
2188
|
-
precision: null,
|
|
2189
|
-
...L(t)
|
|
2190
|
-
});
|
|
2191
|
-
}
|
|
2192
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2193
|
-
function fr(e, t) {
|
|
2194
|
-
return new e({
|
|
2195
|
-
type: "string",
|
|
2196
|
-
format: "duration",
|
|
2197
|
-
check: "string_format",
|
|
2198
|
-
...L(t)
|
|
2199
|
-
});
|
|
2200
|
-
}
|
|
2201
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2202
|
-
function pr(e) {
|
|
2203
|
-
return new e({ type: "unknown" });
|
|
2204
|
-
}
|
|
2205
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2206
|
-
function mr(e, t) {
|
|
2207
|
-
return new e({
|
|
2208
|
-
type: "never",
|
|
2209
|
-
...L(t)
|
|
2210
|
-
});
|
|
2211
|
-
}
|
|
2212
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2213
|
-
function hr(e, t) {
|
|
2214
|
-
return new vt({
|
|
2215
|
-
check: "max_length",
|
|
2216
|
-
...L(t),
|
|
2217
|
-
maximum: e
|
|
2218
|
-
});
|
|
2219
|
-
}
|
|
2220
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2221
|
-
function G(e, t) {
|
|
2222
|
-
return new yt({
|
|
2223
|
-
check: "min_length",
|
|
2224
|
-
...L(t),
|
|
2225
|
-
minimum: e
|
|
2226
|
-
});
|
|
2227
|
-
}
|
|
2228
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2229
|
-
function gr(e, t) {
|
|
2230
|
-
return new bt({
|
|
2231
|
-
check: "length_equals",
|
|
2232
|
-
...L(t),
|
|
2233
|
-
length: e
|
|
2234
|
-
});
|
|
2235
|
-
}
|
|
2236
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2237
|
-
function _r(e, t) {
|
|
2238
|
-
return new St({
|
|
2239
|
-
check: "string_format",
|
|
2240
|
-
format: "regex",
|
|
2241
|
-
...L(t),
|
|
2242
|
-
pattern: e
|
|
2243
|
-
});
|
|
2244
|
-
}
|
|
2245
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2246
|
-
function vr(e) {
|
|
2247
|
-
return new Ct({
|
|
2248
|
-
check: "string_format",
|
|
2249
|
-
format: "lowercase",
|
|
2250
|
-
...L(e)
|
|
2251
|
-
});
|
|
2252
|
-
}
|
|
2253
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2254
|
-
function yr(e) {
|
|
2255
|
-
return new wt({
|
|
2256
|
-
check: "string_format",
|
|
2257
|
-
format: "uppercase",
|
|
2258
|
-
...L(e)
|
|
2259
|
-
});
|
|
2260
|
-
}
|
|
2261
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2262
|
-
function br(e, t) {
|
|
2263
|
-
return new Tt({
|
|
2264
|
-
check: "string_format",
|
|
2265
|
-
format: "includes",
|
|
2266
|
-
...L(t),
|
|
2267
|
-
includes: e
|
|
2268
|
-
});
|
|
2269
|
-
}
|
|
2270
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2271
|
-
function xr(e, t) {
|
|
2272
|
-
return new Et({
|
|
2273
|
-
check: "string_format",
|
|
2274
|
-
format: "starts_with",
|
|
2275
|
-
...L(t),
|
|
2276
|
-
prefix: e
|
|
2277
|
-
});
|
|
2278
|
-
}
|
|
2279
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2280
|
-
function Sr(e, t) {
|
|
2281
|
-
return new Dt({
|
|
2282
|
-
check: "string_format",
|
|
2283
|
-
format: "ends_with",
|
|
2284
|
-
...L(t),
|
|
2285
|
-
suffix: e
|
|
2286
|
-
});
|
|
2287
|
-
}
|
|
2288
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2289
|
-
function K(e) {
|
|
2290
|
-
return new Ot({
|
|
2291
|
-
check: "overwrite",
|
|
2292
|
-
tx: e
|
|
2293
|
-
});
|
|
2294
|
-
}
|
|
2295
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2296
|
-
function Cr(e) {
|
|
2297
|
-
return /* @__PURE__ */ K((t) => t.normalize(e));
|
|
2298
|
-
}
|
|
2299
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2300
|
-
function wr() {
|
|
2301
|
-
return /* @__PURE__ */ K((e) => e.trim());
|
|
2302
|
-
}
|
|
2303
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2304
|
-
function Tr() {
|
|
2305
|
-
return /* @__PURE__ */ K((e) => e.toLowerCase());
|
|
2306
|
-
}
|
|
2307
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2308
|
-
function Er() {
|
|
2309
|
-
return /* @__PURE__ */ K((e) => e.toUpperCase());
|
|
2310
|
-
}
|
|
2311
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2312
|
-
function Dr() {
|
|
2313
|
-
return /* @__PURE__ */ K((e) => oe(e));
|
|
2314
|
-
}
|
|
2315
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2316
|
-
function Or(e, t, n) {
|
|
2317
|
-
return new e({
|
|
2318
|
-
type: "array",
|
|
2319
|
-
element: t,
|
|
2320
|
-
...L(n)
|
|
2321
|
-
});
|
|
2322
|
-
}
|
|
2323
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2324
|
-
function kr(e, t, n) {
|
|
2325
|
-
return new e({
|
|
2326
|
-
type: "custom",
|
|
2327
|
-
check: "custom",
|
|
2328
|
-
fn: t,
|
|
2329
|
-
...L(n)
|
|
2330
|
-
});
|
|
2331
|
-
}
|
|
2332
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2333
|
-
function Ar(e, t) {
|
|
2334
|
-
let n = /* @__PURE__ */ jr((t) => (t.addIssue = (e) => {
|
|
2335
|
-
if (typeof e == "string") t.issues.push(B(e, t.value, n._zod.def));
|
|
2336
|
-
else {
|
|
2337
|
-
let r = e;
|
|
2338
|
-
r.fatal && (r.continue = !1), r.code ??= "custom", r.input ??= t.value, r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(B(r));
|
|
2339
|
-
}
|
|
2340
|
-
}, e(t.value, t)), t);
|
|
2341
|
-
return n;
|
|
2342
|
-
}
|
|
2343
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2344
|
-
function jr(e, t) {
|
|
2345
|
-
let n = new V({
|
|
2346
|
-
check: "custom",
|
|
2347
|
-
...L(t)
|
|
2348
|
-
});
|
|
2349
|
-
return n._zod.check = e, n;
|
|
2350
|
-
}
|
|
2351
|
-
//#endregion
|
|
2352
|
-
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
|
|
2353
|
-
function Mr(e) {
|
|
2354
|
-
let t = e?.target ?? "draft-2020-12";
|
|
2355
|
-
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2356
|
-
processors: e.processors ?? {},
|
|
2357
|
-
metadataRegistry: e?.metadata ?? W,
|
|
2358
|
-
target: t,
|
|
2359
|
-
unrepresentable: e?.unrepresentable ?? "throw",
|
|
2360
|
-
override: e?.override ?? (() => {}),
|
|
2361
|
-
io: e?.io ?? "output",
|
|
2362
|
-
counter: 0,
|
|
2363
|
-
seen: /* @__PURE__ */ new Map(),
|
|
2364
|
-
cycles: e?.cycles ?? "ref",
|
|
2365
|
-
reused: e?.reused ?? "inline",
|
|
2366
|
-
external: e?.external ?? void 0
|
|
2367
|
-
};
|
|
2368
|
-
}
|
|
2369
|
-
function q(e, t, n = {
|
|
2370
|
-
path: [],
|
|
2371
|
-
schemaPath: []
|
|
2372
|
-
}) {
|
|
2373
|
-
var r;
|
|
2374
|
-
let i = e._zod.def, a = t.seen.get(e);
|
|
2375
|
-
if (a) return a.count++, n.schemaPath.includes(e) && (a.cycle = n.path), a.schema;
|
|
2376
|
-
let o = {
|
|
2377
|
-
schema: {},
|
|
2378
|
-
count: 1,
|
|
2379
|
-
cycle: void 0,
|
|
2380
|
-
path: n.path
|
|
2381
|
-
};
|
|
2382
|
-
t.seen.set(e, o);
|
|
2383
|
-
let s = e._zod.toJSONSchema?.();
|
|
2384
|
-
if (s) o.schema = s;
|
|
2385
|
-
else {
|
|
2386
|
-
let r = {
|
|
2387
|
-
...n,
|
|
2388
|
-
schemaPath: [...n.schemaPath, e],
|
|
2389
|
-
path: n.path
|
|
2390
|
-
};
|
|
2391
|
-
if (e._zod.processJSONSchema) e._zod.processJSONSchema(t, o.schema, r);
|
|
2392
|
-
else {
|
|
2393
|
-
let n = o.schema, a = t.processors[i.type];
|
|
2394
|
-
if (!a) throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);
|
|
2395
|
-
a(e, t, n, r);
|
|
2396
|
-
}
|
|
2397
|
-
let a = e._zod.parent;
|
|
2398
|
-
a && (o.ref ||= a, q(a, t, r), t.seen.get(a).isParent = !0);
|
|
2399
|
-
}
|
|
2400
|
-
let c = t.metadataRegistry.get(e);
|
|
2401
|
-
return c && Object.assign(o.schema, c), t.io === "input" && J(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
|
|
2402
|
-
}
|
|
2403
|
-
function Nr(e, t) {
|
|
2404
|
-
let n = e.seen.get(t);
|
|
2405
|
-
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2406
|
-
let r = /* @__PURE__ */ new Map();
|
|
2407
|
-
for (let t of e.seen.entries()) {
|
|
2408
|
-
let n = e.metadataRegistry.get(t[0])?.id;
|
|
2409
|
-
if (n) {
|
|
2410
|
-
let e = r.get(n);
|
|
2411
|
-
if (e && e !== t[0]) throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
|
|
2412
|
-
r.set(n, t[0]);
|
|
2413
|
-
}
|
|
2414
|
-
}
|
|
2415
|
-
let i = (t) => {
|
|
2416
|
-
let r = e.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
2417
|
-
if (e.external) {
|
|
2418
|
-
let n = e.external.registry.get(t[0])?.id, i = e.external.uri ?? ((e) => e);
|
|
2419
|
-
if (n) return { ref: i(n) };
|
|
2420
|
-
let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
|
|
2421
|
-
return t[1].defId = a, {
|
|
2422
|
-
defId: a,
|
|
2423
|
-
ref: `${i("__shared")}#/${r}/${a}`
|
|
2424
|
-
};
|
|
2425
|
-
}
|
|
2426
|
-
if (t[1] === n) return { ref: "#" };
|
|
2427
|
-
let i = `#/${r}/`, a = t[1].schema.id ?? `__schema${e.counter++}`;
|
|
2428
|
-
return {
|
|
2429
|
-
defId: a,
|
|
2430
|
-
ref: i + a
|
|
2431
|
-
};
|
|
2432
|
-
}, a = (e) => {
|
|
2433
|
-
if (e[1].schema.$ref) return;
|
|
2434
|
-
let t = e[1], { ref: n, defId: r } = i(e);
|
|
2435
|
-
t.def = { ...t.schema }, r && (t.defId = r);
|
|
2436
|
-
let a = t.schema;
|
|
2437
|
-
for (let e in a) delete a[e];
|
|
2438
|
-
a.$ref = n;
|
|
2439
|
-
};
|
|
2440
|
-
if (e.cycles === "throw") for (let t of e.seen.entries()) {
|
|
2441
|
-
let e = t[1];
|
|
2442
|
-
if (e.cycle) throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
|
|
2443
|
-
|
|
2444
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
|
|
2445
|
-
}
|
|
2446
|
-
for (let n of e.seen.entries()) {
|
|
2447
|
-
let r = n[1];
|
|
2448
|
-
if (t === n[0]) {
|
|
2449
|
-
a(n);
|
|
2450
|
-
continue;
|
|
2451
|
-
}
|
|
2452
|
-
if (e.external) {
|
|
2453
|
-
let r = e.external.registry.get(n[0])?.id;
|
|
2454
|
-
if (t !== n[0] && r) {
|
|
2455
|
-
a(n);
|
|
2456
|
-
continue;
|
|
2457
|
-
}
|
|
2458
|
-
}
|
|
2459
|
-
if (e.metadataRegistry.get(n[0])?.id) {
|
|
2460
|
-
a(n);
|
|
2461
|
-
continue;
|
|
2462
|
-
}
|
|
2463
|
-
if (r.cycle) {
|
|
2464
|
-
a(n);
|
|
2465
|
-
continue;
|
|
2466
|
-
}
|
|
2467
|
-
if (r.count > 1 && e.reused === "ref") {
|
|
2468
|
-
a(n);
|
|
2469
|
-
continue;
|
|
2470
|
-
}
|
|
2471
|
-
}
|
|
2472
|
-
}
|
|
2473
|
-
function Pr(e, t) {
|
|
2474
|
-
let n = e.seen.get(t);
|
|
2475
|
-
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2476
|
-
let r = (t) => {
|
|
2477
|
-
let n = e.seen.get(t);
|
|
2478
|
-
if (n.ref === null) return;
|
|
2479
|
-
let i = n.def ?? n.schema, a = { ...i }, o = n.ref;
|
|
2480
|
-
if (n.ref = null, o) {
|
|
2481
|
-
r(o);
|
|
2482
|
-
let n = e.seen.get(o), s = n.schema;
|
|
2483
|
-
if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : Object.assign(i, s), Object.assign(i, a), t._zod.parent === o) for (let e in i) e === "$ref" || e === "allOf" || e in a || delete i[e];
|
|
2484
|
-
if (s.$ref && n.def) for (let e in i) e === "$ref" || e === "allOf" || e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e];
|
|
2485
|
-
}
|
|
2486
|
-
let s = t._zod.parent;
|
|
2487
|
-
if (s && s !== o) {
|
|
2488
|
-
r(s);
|
|
2489
|
-
let t = e.seen.get(s);
|
|
2490
|
-
if (t?.schema.$ref && (i.$ref = t.schema.$ref, t.def)) for (let e in i) e === "$ref" || e === "allOf" || e in t.def && JSON.stringify(i[e]) === JSON.stringify(t.def[e]) && delete i[e];
|
|
2491
|
-
}
|
|
2492
|
-
e.override({
|
|
2493
|
-
zodSchema: t,
|
|
2494
|
-
jsonSchema: i,
|
|
2495
|
-
path: n.path ?? []
|
|
2496
|
-
});
|
|
2497
|
-
};
|
|
2498
|
-
for (let t of [...e.seen.entries()].reverse()) r(t[0]);
|
|
2499
|
-
let i = {};
|
|
2500
|
-
if (e.target === "draft-2020-12" ? i.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? i.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? i.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
|
|
2501
|
-
let n = e.external.registry.get(t)?.id;
|
|
2502
|
-
if (!n) throw Error("Schema is missing an `id` property");
|
|
2503
|
-
i.$id = e.external.uri(n);
|
|
2504
|
-
}
|
|
2505
|
-
Object.assign(i, n.def ?? n.schema);
|
|
2506
|
-
let a = e.metadataRegistry.get(t)?.id;
|
|
2507
|
-
a !== void 0 && i.id === a && delete i.id;
|
|
2508
|
-
let o = e.external?.defs ?? {};
|
|
2509
|
-
for (let t of e.seen.entries()) {
|
|
2510
|
-
let e = t[1];
|
|
2511
|
-
e.def && e.defId && (e.def.id === e.defId && delete e.def.id, o[e.defId] = e.def);
|
|
2512
|
-
}
|
|
2513
|
-
e.external || Object.keys(o).length > 0 && (e.target === "draft-2020-12" ? i.$defs = o : i.definitions = o);
|
|
2514
|
-
try {
|
|
2515
|
-
let n = JSON.parse(JSON.stringify(i));
|
|
2516
|
-
return Object.defineProperty(n, "~standard", {
|
|
2517
|
-
value: {
|
|
2518
|
-
...t["~standard"],
|
|
2519
|
-
jsonSchema: {
|
|
2520
|
-
input: Ir(t, "input", e.processors),
|
|
2521
|
-
output: Ir(t, "output", e.processors)
|
|
2522
|
-
}
|
|
2523
|
-
},
|
|
2524
|
-
enumerable: !1,
|
|
2525
|
-
writable: !1
|
|
2526
|
-
}), n;
|
|
2527
|
-
} catch {
|
|
2528
|
-
throw Error("Error converting schema to JSON.");
|
|
2529
|
-
}
|
|
2530
|
-
}
|
|
2531
|
-
function J(e, t) {
|
|
2532
|
-
let n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
2533
|
-
if (n.seen.has(e)) return !1;
|
|
2534
|
-
n.seen.add(e);
|
|
2535
|
-
let r = e._zod.def;
|
|
2536
|
-
if (r.type === "transform") return !0;
|
|
2537
|
-
if (r.type === "array") return J(r.element, n);
|
|
2538
|
-
if (r.type === "set") return J(r.valueType, n);
|
|
2539
|
-
if (r.type === "lazy") return J(r.getter(), n);
|
|
2540
|
-
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault") return J(r.innerType, n);
|
|
2541
|
-
if (r.type === "intersection") return J(r.left, n) || J(r.right, n);
|
|
2542
|
-
if (r.type === "record" || r.type === "map") return J(r.keyType, n) || J(r.valueType, n);
|
|
2543
|
-
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : J(r.in, n) || J(r.out, n);
|
|
2544
|
-
if (r.type === "object") {
|
|
2545
|
-
for (let e in r.shape) if (J(r.shape[e], n)) return !0;
|
|
2546
|
-
return !1;
|
|
2547
|
-
}
|
|
2548
|
-
if (r.type === "union") {
|
|
2549
|
-
for (let e of r.options) if (J(e, n)) return !0;
|
|
2550
|
-
return !1;
|
|
2551
|
-
}
|
|
2552
|
-
if (r.type === "tuple") {
|
|
2553
|
-
for (let e of r.items) if (J(e, n)) return !0;
|
|
2554
|
-
return !!(r.rest && J(r.rest, n));
|
|
2555
|
-
}
|
|
2556
|
-
return !1;
|
|
2557
|
-
}
|
|
2558
|
-
var Fr = (e, t = {}) => (n) => {
|
|
2559
|
-
let r = Mr({
|
|
2560
|
-
...n,
|
|
2561
|
-
processors: t
|
|
2562
|
-
});
|
|
2563
|
-
return q(e, r), Nr(r, e), Pr(r, e);
|
|
2564
|
-
}, Ir = (e, t, n = {}) => (r) => {
|
|
2565
|
-
let { libraryOptions: i, target: a } = r ?? {}, o = Mr({
|
|
2566
|
-
...i ?? {},
|
|
2567
|
-
target: a,
|
|
2568
|
-
io: t,
|
|
2569
|
-
processors: n
|
|
2570
|
-
});
|
|
2571
|
-
return q(e, o), Nr(o, e), Pr(o, e);
|
|
2572
|
-
}, Lr = {
|
|
2573
|
-
guid: "uuid",
|
|
2574
|
-
url: "uri",
|
|
2575
|
-
datetime: "date-time",
|
|
2576
|
-
json_string: "json-string",
|
|
2577
|
-
regex: ""
|
|
2578
|
-
}, Rr = (e, t, n, r) => {
|
|
2579
|
-
let i = n;
|
|
2580
|
-
i.type = "string";
|
|
2581
|
-
let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l } = e._zod.bag;
|
|
2582
|
-
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = Lr[s] ?? s, i.format === "" && delete i.format, s === "time" && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
|
|
2583
|
-
let e = [...c];
|
|
2584
|
-
e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
|
|
2585
|
-
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
2586
|
-
pattern: e.source
|
|
2587
|
-
}))]);
|
|
2588
|
-
}
|
|
2589
|
-
}, zr = (e, t, n, r) => {
|
|
2590
|
-
n.not = {};
|
|
2591
|
-
}, Br = (e, t, n, r) => {
|
|
2592
|
-
let i = e._zod.def, a = E(i.entries);
|
|
2593
|
-
a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), n.enum = a;
|
|
2594
|
-
}, Vr = (e, t, n, r) => {
|
|
2595
|
-
if (t.unrepresentable === "throw") throw Error("Custom types cannot be represented in JSON Schema");
|
|
2596
|
-
}, Hr = (e, t, n, r) => {
|
|
2597
|
-
if (t.unrepresentable === "throw") throw Error("Transforms cannot be represented in JSON Schema");
|
|
2598
|
-
}, Ur = (e, t, n, r) => {
|
|
2599
|
-
let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
|
|
2600
|
-
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = q(a.element, t, {
|
|
2601
|
-
...r,
|
|
2602
|
-
path: [...r.path, "items"]
|
|
2603
|
-
});
|
|
2604
|
-
}, Wr = (e, t, n, r) => {
|
|
2605
|
-
let i = n, a = e._zod.def;
|
|
2606
|
-
i.type = "object", i.properties = {};
|
|
2607
|
-
let o = a.shape;
|
|
2608
|
-
for (let e in o) i.properties[e] = q(o[e], t, {
|
|
2609
|
-
...r,
|
|
2610
|
-
path: [
|
|
2611
|
-
...r.path,
|
|
2612
|
-
"properties",
|
|
2613
|
-
e
|
|
2614
|
-
]
|
|
2615
|
-
});
|
|
2616
|
-
let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
|
|
2617
|
-
let n = a.shape[e]._zod;
|
|
2618
|
-
return t.io === "input" ? n.optin === void 0 : n.optout === void 0;
|
|
2619
|
-
}));
|
|
2620
|
-
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = q(a.catchall, t, {
|
|
2621
|
-
...r,
|
|
2622
|
-
path: [...r.path, "additionalProperties"]
|
|
2623
|
-
})) : t.io === "output" && (i.additionalProperties = !1);
|
|
2624
|
-
}, Gr = (e, t, n, r) => {
|
|
2625
|
-
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => q(e, t, {
|
|
2626
|
-
...r,
|
|
2627
|
-
path: [
|
|
2628
|
-
...r.path,
|
|
2629
|
-
a ? "oneOf" : "anyOf",
|
|
2630
|
-
n
|
|
2631
|
-
]
|
|
2632
|
-
}));
|
|
2633
|
-
a ? n.oneOf = o : n.anyOf = o;
|
|
2634
|
-
}, Kr = (e, t, n, r) => {
|
|
2635
|
-
let i = e._zod.def, a = q(i.left, t, {
|
|
2636
|
-
...r,
|
|
2637
|
-
path: [
|
|
2638
|
-
...r.path,
|
|
2639
|
-
"allOf",
|
|
2640
|
-
0
|
|
2641
|
-
]
|
|
2642
|
-
}), o = q(i.right, t, {
|
|
2643
|
-
...r,
|
|
2644
|
-
path: [
|
|
2645
|
-
...r.path,
|
|
2646
|
-
"allOf",
|
|
2647
|
-
1
|
|
2648
|
-
]
|
|
2649
|
-
}), s = (e) => "allOf" in e && Object.keys(e).length === 1;
|
|
2650
|
-
n.allOf = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
|
|
2651
|
-
}, qr = (e, t, n, r) => {
|
|
2652
|
-
let i = e._zod.def, a = q(i.innerType, t, r), o = t.seen.get(e);
|
|
2653
|
-
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
2654
|
-
}, Jr = (e, t, n, r) => {
|
|
2655
|
-
let i = e._zod.def;
|
|
2656
|
-
q(i.innerType, t, r);
|
|
2657
|
-
let a = t.seen.get(e);
|
|
2658
|
-
a.ref = i.innerType;
|
|
2659
|
-
}, Yr = (e, t, n, r) => {
|
|
2660
|
-
let i = e._zod.def;
|
|
2661
|
-
q(i.innerType, t, r);
|
|
2662
|
-
let a = t.seen.get(e);
|
|
2663
|
-
a.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue));
|
|
2664
|
-
}, Xr = (e, t, n, r) => {
|
|
2665
|
-
let i = e._zod.def;
|
|
2666
|
-
q(i.innerType, t, r);
|
|
2667
|
-
let a = t.seen.get(e);
|
|
2668
|
-
a.ref = i.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue)));
|
|
2669
|
-
}, Zr = (e, t, n, r) => {
|
|
2670
|
-
let i = e._zod.def;
|
|
2671
|
-
q(i.innerType, t, r);
|
|
2672
|
-
let a = t.seen.get(e);
|
|
2673
|
-
a.ref = i.innerType;
|
|
2674
|
-
let o;
|
|
2675
|
-
try {
|
|
2676
|
-
o = i.catchValue(void 0);
|
|
2677
|
-
} catch {
|
|
2678
|
-
throw Error("Dynamic catch values are not supported in JSON Schema");
|
|
2679
|
-
}
|
|
2680
|
-
n.default = o;
|
|
2681
|
-
}, Qr = (e, t, n, r) => {
|
|
2682
|
-
let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
|
|
2683
|
-
q(o, t, r);
|
|
2684
|
-
let s = t.seen.get(e);
|
|
2685
|
-
s.ref = o;
|
|
2686
|
-
}, $r = (e, t, n, r) => {
|
|
2687
|
-
let i = e._zod.def;
|
|
2688
|
-
q(i.innerType, t, r);
|
|
2689
|
-
let a = t.seen.get(e);
|
|
2690
|
-
a.ref = i.innerType, n.readOnly = !0;
|
|
2691
|
-
}, ei = (e, t, n, r) => {
|
|
2692
|
-
let i = e._zod.def;
|
|
2693
|
-
q(i.innerType, t, r);
|
|
2694
|
-
let a = t.seen.get(e);
|
|
2695
|
-
a.ref = i.innerType;
|
|
2696
|
-
}, ti = /* @__PURE__ */ x("ZodISODateTime", (e, t) => {
|
|
2697
|
-
Ut.init(e, t), Q.init(e, t);
|
|
2698
|
-
});
|
|
2699
|
-
function ni(e) {
|
|
2700
|
-
return /* @__PURE__ */ lr(ti, e);
|
|
2701
|
-
}
|
|
2702
|
-
var ri = /* @__PURE__ */ x("ZodISODate", (e, t) => {
|
|
2703
|
-
Wt.init(e, t), Q.init(e, t);
|
|
2704
|
-
});
|
|
2705
|
-
function ii(e) {
|
|
2706
|
-
return /* @__PURE__ */ ur(ri, e);
|
|
2707
|
-
}
|
|
2708
|
-
var ai = /* @__PURE__ */ x("ZodISOTime", (e, t) => {
|
|
2709
|
-
Gt.init(e, t), Q.init(e, t);
|
|
2710
|
-
});
|
|
2711
|
-
function oi(e) {
|
|
2712
|
-
return /* @__PURE__ */ dr(ai, e);
|
|
2713
|
-
}
|
|
2714
|
-
var si = /* @__PURE__ */ x("ZodISODuration", (e, t) => {
|
|
2715
|
-
Kt.init(e, t), Q.init(e, t);
|
|
2716
|
-
});
|
|
2717
|
-
function ci(e) {
|
|
2718
|
-
return /* @__PURE__ */ fr(si, e);
|
|
2719
|
-
}
|
|
2720
|
-
var Y = /* @__PURE__ */ x("ZodError", (e, t) => {
|
|
2721
|
-
Ee.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2722
|
-
format: { value: (t) => ke(e, t) },
|
|
2723
|
-
flatten: { value: (t) => Oe(e, t) },
|
|
2724
|
-
addIssue: { value: (t) => {
|
|
2725
|
-
e.issues.push(t), e.message = JSON.stringify(e.issues, D, 2);
|
|
2726
|
-
} },
|
|
2727
|
-
addIssues: { value: (t) => {
|
|
2728
|
-
e.issues.push(...t), e.message = JSON.stringify(e.issues, D, 2);
|
|
2729
|
-
} },
|
|
2730
|
-
isEmpty: { get() {
|
|
2731
|
-
return e.issues.length === 0;
|
|
2732
|
-
} }
|
|
2733
|
-
});
|
|
2734
|
-
}, { Parent: Error }), li = /* @__PURE__ */ Ae(Y), ui = /* @__PURE__ */ je(Y), di = /* @__PURE__ */ Me(Y), fi = /* @__PURE__ */ Pe(Y), pi = /* @__PURE__ */ Ie(Y), mi = /* @__PURE__ */ Le(Y), hi = /* @__PURE__ */ Re(Y), gi = /* @__PURE__ */ ze(Y), _i = /* @__PURE__ */ Be(Y), vi = /* @__PURE__ */ Ve(Y), yi = /* @__PURE__ */ He(Y), bi = /* @__PURE__ */ Ue(Y), xi = /* @__PURE__ */ new WeakMap();
|
|
2735
|
-
function Si(e, t, n) {
|
|
2736
|
-
let r = Object.getPrototypeOf(e), i = xi.get(r);
|
|
2737
|
-
if (i || (i = /* @__PURE__ */ new Set(), xi.set(r, i)), !i.has(t)) {
|
|
2738
|
-
i.add(t);
|
|
2739
|
-
for (let e in n) {
|
|
2740
|
-
let t = n[e];
|
|
2741
|
-
Object.defineProperty(r, e, {
|
|
2742
|
-
configurable: !0,
|
|
2743
|
-
enumerable: !1,
|
|
2744
|
-
get() {
|
|
2745
|
-
let n = t.bind(this);
|
|
2746
|
-
return Object.defineProperty(this, e, {
|
|
2747
|
-
configurable: !0,
|
|
2748
|
-
writable: !0,
|
|
2749
|
-
enumerable: !0,
|
|
2750
|
-
value: n
|
|
2751
|
-
}), n;
|
|
2752
|
-
},
|
|
2753
|
-
set(t) {
|
|
2754
|
-
Object.defineProperty(this, e, {
|
|
2755
|
-
configurable: !0,
|
|
2756
|
-
writable: !0,
|
|
2757
|
-
enumerable: !0,
|
|
2758
|
-
value: t
|
|
2759
|
-
});
|
|
2760
|
-
}
|
|
2761
|
-
});
|
|
2762
|
-
}
|
|
2763
|
-
}
|
|
2764
|
-
}
|
|
2765
|
-
var X = /* @__PURE__ */ x("ZodType", (e, t) => (H.init(e, t), Object.assign(e["~standard"], { jsonSchema: {
|
|
2766
|
-
input: Ir(e, "input"),
|
|
2767
|
-
output: Ir(e, "output")
|
|
2768
|
-
} }), e.toJSONSchema = Fr(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => li(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => di(e, t, n), e.parseAsync = async (t, n) => ui(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => fi(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => pi(e, t, n), e.decode = (t, n) => mi(e, t, n), e.encodeAsync = async (t, n) => hi(e, t, n), e.decodeAsync = async (t, n) => gi(e, t, n), e.safeEncode = (t, n) => _i(e, t, n), e.safeDecode = (t, n) => vi(e, t, n), e.safeEncodeAsync = async (t, n) => yi(e, t, n), e.safeDecodeAsync = async (t, n) => bi(e, t, n), Si(e, "ZodType", {
|
|
2769
|
-
check(...e) {
|
|
2770
|
-
let t = this.def;
|
|
2771
|
-
return this.clone(P(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
2772
|
-
check: e,
|
|
2773
|
-
def: { check: "custom" },
|
|
2774
|
-
onattach: []
|
|
2775
|
-
} } : e)] }), { parent: !0 });
|
|
2776
|
-
},
|
|
2777
|
-
with(...e) {
|
|
2778
|
-
return this.check(...e);
|
|
2779
|
-
},
|
|
2780
|
-
clone(e, t) {
|
|
2781
|
-
return I(this, e, t);
|
|
2782
|
-
},
|
|
2783
|
-
brand() {
|
|
2784
|
-
return this;
|
|
2785
|
-
},
|
|
2786
|
-
register(e, t) {
|
|
2787
|
-
return e.add(this, t), this;
|
|
2788
|
-
},
|
|
2789
|
-
refine(e, t) {
|
|
2790
|
-
return this.check(Ta(e, t));
|
|
2791
|
-
},
|
|
2792
|
-
superRefine(e, t) {
|
|
2793
|
-
return this.check(Ea(e, t));
|
|
2794
|
-
},
|
|
2795
|
-
overwrite(e) {
|
|
2796
|
-
return this.check(/* @__PURE__ */ K(e));
|
|
2797
|
-
},
|
|
2798
|
-
optional() {
|
|
2799
|
-
return sa(this);
|
|
2800
|
-
},
|
|
2801
|
-
exactOptional() {
|
|
2802
|
-
return la(this);
|
|
2803
|
-
},
|
|
2804
|
-
nullable() {
|
|
2805
|
-
return da(this);
|
|
2806
|
-
},
|
|
2807
|
-
nullish() {
|
|
2808
|
-
return sa(da(this));
|
|
2809
|
-
},
|
|
2810
|
-
nonoptional(e) {
|
|
2811
|
-
return _a(this, e);
|
|
2812
|
-
},
|
|
2813
|
-
array() {
|
|
2814
|
-
return Yi(this);
|
|
2815
|
-
},
|
|
2816
|
-
or(e) {
|
|
2817
|
-
return $i([this, e]);
|
|
2818
|
-
},
|
|
2819
|
-
and(e) {
|
|
2820
|
-
return ta(this, e);
|
|
2821
|
-
},
|
|
2822
|
-
transform(e) {
|
|
2823
|
-
return xa(this, aa(e));
|
|
2824
|
-
},
|
|
2825
|
-
default(e) {
|
|
2826
|
-
return pa(this, e);
|
|
2827
|
-
},
|
|
2828
|
-
prefault(e) {
|
|
2829
|
-
return ha(this, e);
|
|
2830
|
-
},
|
|
2831
|
-
catch(e) {
|
|
2832
|
-
return ya(this, e);
|
|
2833
|
-
},
|
|
2834
|
-
pipe(e) {
|
|
2835
|
-
return xa(this, e);
|
|
2836
|
-
},
|
|
2837
|
-
readonly() {
|
|
2838
|
-
return Ca(this);
|
|
2839
|
-
},
|
|
2840
|
-
describe(e) {
|
|
2841
|
-
let t = this.clone();
|
|
2842
|
-
return W.add(t, { description: e }), t;
|
|
2843
|
-
},
|
|
2844
|
-
meta(...e) {
|
|
2845
|
-
if (e.length === 0) return W.get(this);
|
|
2846
|
-
let t = this.clone();
|
|
2847
|
-
return W.add(t, e[0]), t;
|
|
2848
|
-
},
|
|
2849
|
-
isOptional() {
|
|
2850
|
-
return this.safeParse(void 0).success;
|
|
2851
|
-
},
|
|
2852
|
-
isNullable() {
|
|
2853
|
-
return this.safeParse(null).success;
|
|
2854
|
-
},
|
|
2855
|
-
apply(e) {
|
|
2856
|
-
return e(this);
|
|
2857
|
-
}
|
|
2858
|
-
}), Object.defineProperty(e, "description", {
|
|
2859
|
-
get() {
|
|
2860
|
-
return W.get(e)?.description;
|
|
2861
|
-
},
|
|
2862
|
-
configurable: !0
|
|
2863
|
-
}), e)), Ci = /* @__PURE__ */ x("_ZodString", (e, t) => {
|
|
2864
|
-
jt.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Rr(e, t, n, r);
|
|
2865
|
-
let n = e._zod.bag;
|
|
2866
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, Si(e, "_ZodString", {
|
|
2867
|
-
regex(...e) {
|
|
2868
|
-
return this.check(/* @__PURE__ */ _r(...e));
|
|
2869
|
-
},
|
|
2870
|
-
includes(...e) {
|
|
2871
|
-
return this.check(/* @__PURE__ */ br(...e));
|
|
2872
|
-
},
|
|
2873
|
-
startsWith(...e) {
|
|
2874
|
-
return this.check(/* @__PURE__ */ xr(...e));
|
|
2875
|
-
},
|
|
2876
|
-
endsWith(...e) {
|
|
2877
|
-
return this.check(/* @__PURE__ */ Sr(...e));
|
|
2878
|
-
},
|
|
2879
|
-
min(...e) {
|
|
2880
|
-
return this.check(/* @__PURE__ */ G(...e));
|
|
2881
|
-
},
|
|
2882
|
-
max(...e) {
|
|
2883
|
-
return this.check(/* @__PURE__ */ hr(...e));
|
|
2884
|
-
},
|
|
2885
|
-
length(...e) {
|
|
2886
|
-
return this.check(/* @__PURE__ */ gr(...e));
|
|
2887
|
-
},
|
|
2888
|
-
nonempty(...e) {
|
|
2889
|
-
return this.check(/* @__PURE__ */ G(1, ...e));
|
|
2890
|
-
},
|
|
2891
|
-
lowercase(e) {
|
|
2892
|
-
return this.check(/* @__PURE__ */ vr(e));
|
|
2893
|
-
},
|
|
2894
|
-
uppercase(e) {
|
|
2895
|
-
return this.check(/* @__PURE__ */ yr(e));
|
|
2896
|
-
},
|
|
2897
|
-
trim() {
|
|
2898
|
-
return this.check(/* @__PURE__ */ wr());
|
|
2899
|
-
},
|
|
2900
|
-
normalize(...e) {
|
|
2901
|
-
return this.check(/* @__PURE__ */ Cr(...e));
|
|
2902
|
-
},
|
|
2903
|
-
toLowerCase() {
|
|
2904
|
-
return this.check(/* @__PURE__ */ Tr());
|
|
2905
|
-
},
|
|
2906
|
-
toUpperCase() {
|
|
2907
|
-
return this.check(/* @__PURE__ */ Er());
|
|
2908
|
-
},
|
|
2909
|
-
slugify() {
|
|
2910
|
-
return this.check(/* @__PURE__ */ Dr());
|
|
2911
|
-
}
|
|
2912
|
-
});
|
|
2913
|
-
}), wi = /* @__PURE__ */ x("ZodString", (e, t) => {
|
|
2914
|
-
jt.init(e, t), Ci.init(e, t), e.email = (t) => e.check(/* @__PURE__ */ Vn(Ti, t)), e.url = (t) => e.check(/* @__PURE__ */ qn(Oi, t)), e.jwt = (t) => e.check(/* @__PURE__ */ cr(Ui, t)), e.emoji = (t) => e.check(/* @__PURE__ */ Jn(ki, t)), e.guid = (t) => e.check(/* @__PURE__ */ Hn(Ei, t)), e.uuid = (t) => e.check(/* @__PURE__ */ Un(Di, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ Wn(Di, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ Gn(Di, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ Kn(Di, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ Yn(Ai, t)), e.guid = (t) => e.check(/* @__PURE__ */ Hn(Ei, t)), e.cuid = (t) => e.check(/* @__PURE__ */ Xn(ji, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ Zn(Mi, t)), e.ulid = (t) => e.check(/* @__PURE__ */ Qn(Ni, t)), e.base64 = (t) => e.check(/* @__PURE__ */ ar(Bi, t)), e.base64url = (t) => e.check(/* @__PURE__ */ or(Vi, t)), e.xid = (t) => e.check(/* @__PURE__ */ $n(Pi, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ er(Fi, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ tr(Ii, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ nr(Li, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ rr(Ri, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ ir(zi, t)), e.e164 = (t) => e.check(/* @__PURE__ */ sr(Hi, t)), e.datetime = (t) => e.check(ni(t)), e.date = (t) => e.check(ii(t)), e.time = (t) => e.check(oi(t)), e.duration = (t) => e.check(ci(t));
|
|
2915
|
-
});
|
|
2916
|
-
function Z(e) {
|
|
2917
|
-
return /* @__PURE__ */ Bn(wi, e);
|
|
2918
|
-
}
|
|
2919
|
-
var Q = /* @__PURE__ */ x("ZodStringFormat", (e, t) => {
|
|
2920
|
-
U.init(e, t), Ci.init(e, t);
|
|
2921
|
-
}), Ti = /* @__PURE__ */ x("ZodEmail", (e, t) => {
|
|
2922
|
-
Pt.init(e, t), Q.init(e, t);
|
|
2923
|
-
}), Ei = /* @__PURE__ */ x("ZodGUID", (e, t) => {
|
|
2924
|
-
Mt.init(e, t), Q.init(e, t);
|
|
2925
|
-
}), Di = /* @__PURE__ */ x("ZodUUID", (e, t) => {
|
|
2926
|
-
Nt.init(e, t), Q.init(e, t);
|
|
2927
|
-
}), Oi = /* @__PURE__ */ x("ZodURL", (e, t) => {
|
|
2928
|
-
Ft.init(e, t), Q.init(e, t);
|
|
2929
|
-
}), ki = /* @__PURE__ */ x("ZodEmoji", (e, t) => {
|
|
2930
|
-
It.init(e, t), Q.init(e, t);
|
|
2931
|
-
}), Ai = /* @__PURE__ */ x("ZodNanoID", (e, t) => {
|
|
2932
|
-
Lt.init(e, t), Q.init(e, t);
|
|
2933
|
-
}), ji = /* @__PURE__ */ x("ZodCUID", (e, t) => {
|
|
2934
|
-
Rt.init(e, t), Q.init(e, t);
|
|
2935
|
-
}), Mi = /* @__PURE__ */ x("ZodCUID2", (e, t) => {
|
|
2936
|
-
zt.init(e, t), Q.init(e, t);
|
|
2937
|
-
}), Ni = /* @__PURE__ */ x("ZodULID", (e, t) => {
|
|
2938
|
-
Bt.init(e, t), Q.init(e, t);
|
|
2939
|
-
}), Pi = /* @__PURE__ */ x("ZodXID", (e, t) => {
|
|
2940
|
-
Vt.init(e, t), Q.init(e, t);
|
|
2941
|
-
}), Fi = /* @__PURE__ */ x("ZodKSUID", (e, t) => {
|
|
2942
|
-
Ht.init(e, t), Q.init(e, t);
|
|
2943
|
-
}), Ii = /* @__PURE__ */ x("ZodIPv4", (e, t) => {
|
|
2944
|
-
qt.init(e, t), Q.init(e, t);
|
|
2945
|
-
}), Li = /* @__PURE__ */ x("ZodIPv6", (e, t) => {
|
|
2946
|
-
Jt.init(e, t), Q.init(e, t);
|
|
2947
|
-
}), Ri = /* @__PURE__ */ x("ZodCIDRv4", (e, t) => {
|
|
2948
|
-
Yt.init(e, t), Q.init(e, t);
|
|
2949
|
-
}), zi = /* @__PURE__ */ x("ZodCIDRv6", (e, t) => {
|
|
2950
|
-
Xt.init(e, t), Q.init(e, t);
|
|
2951
|
-
}), Bi = /* @__PURE__ */ x("ZodBase64", (e, t) => {
|
|
2952
|
-
Qt.init(e, t), Q.init(e, t);
|
|
2953
|
-
}), Vi = /* @__PURE__ */ x("ZodBase64URL", (e, t) => {
|
|
2954
|
-
en.init(e, t), Q.init(e, t);
|
|
2955
|
-
}), Hi = /* @__PURE__ */ x("ZodE164", (e, t) => {
|
|
2956
|
-
tn.init(e, t), Q.init(e, t);
|
|
2957
|
-
}), Ui = /* @__PURE__ */ x("ZodJWT", (e, t) => {
|
|
2958
|
-
rn.init(e, t), Q.init(e, t);
|
|
2959
|
-
}), Wi = /* @__PURE__ */ x("ZodUnknown", (e, t) => {
|
|
2960
|
-
an.init(e, t), X.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
2961
|
-
});
|
|
2962
|
-
function Gi() {
|
|
2963
|
-
return /* @__PURE__ */ pr(Wi);
|
|
2964
|
-
}
|
|
2965
|
-
var Ki = /* @__PURE__ */ x("ZodNever", (e, t) => {
|
|
2966
|
-
on.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => zr(e, t, n, r);
|
|
2967
|
-
});
|
|
2968
|
-
function qi(e) {
|
|
2969
|
-
return /* @__PURE__ */ mr(Ki, e);
|
|
2970
|
-
}
|
|
2971
|
-
var Ji = /* @__PURE__ */ x("ZodArray", (e, t) => {
|
|
2972
|
-
cn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ur(e, t, n, r), e.element = t.element, Si(e, "ZodArray", {
|
|
2973
|
-
min(e, t) {
|
|
2974
|
-
return this.check(/* @__PURE__ */ G(e, t));
|
|
2975
|
-
},
|
|
2976
|
-
nonempty(e) {
|
|
2977
|
-
return this.check(/* @__PURE__ */ G(1, e));
|
|
2978
|
-
},
|
|
2979
|
-
max(e, t) {
|
|
2980
|
-
return this.check(/* @__PURE__ */ hr(e, t));
|
|
2981
|
-
},
|
|
2982
|
-
length(e, t) {
|
|
2983
|
-
return this.check(/* @__PURE__ */ gr(e, t));
|
|
2984
|
-
},
|
|
2985
|
-
unwrap() {
|
|
2986
|
-
return this.element;
|
|
2987
|
-
}
|
|
2988
|
-
});
|
|
2989
|
-
});
|
|
2990
|
-
function Yi(e, t) {
|
|
2991
|
-
return /* @__PURE__ */ Or(Ji, e, t);
|
|
2992
|
-
}
|
|
2993
|
-
var Xi = /* @__PURE__ */ x("ZodObject", (e, t) => {
|
|
2994
|
-
pn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wr(e, t, n, r), M(e, "shape", () => t.shape), Si(e, "ZodObject", {
|
|
2995
|
-
keyof() {
|
|
2996
|
-
return ra(Object.keys(this._zod.def.shape));
|
|
2997
|
-
},
|
|
2998
|
-
catchall(e) {
|
|
2999
|
-
return this.clone({
|
|
3000
|
-
...this._zod.def,
|
|
3001
|
-
catchall: e
|
|
3002
|
-
});
|
|
3003
|
-
},
|
|
3004
|
-
passthrough() {
|
|
3005
|
-
return this.clone({
|
|
3006
|
-
...this._zod.def,
|
|
3007
|
-
catchall: Gi()
|
|
3008
|
-
});
|
|
3009
|
-
},
|
|
3010
|
-
loose() {
|
|
3011
|
-
return this.clone({
|
|
3012
|
-
...this._zod.def,
|
|
3013
|
-
catchall: Gi()
|
|
3014
|
-
});
|
|
3015
|
-
},
|
|
3016
|
-
strict() {
|
|
3017
|
-
return this.clone({
|
|
3018
|
-
...this._zod.def,
|
|
3019
|
-
catchall: qi()
|
|
3020
|
-
});
|
|
3021
|
-
},
|
|
3022
|
-
strip() {
|
|
3023
|
-
return this.clone({
|
|
3024
|
-
...this._zod.def,
|
|
3025
|
-
catchall: void 0
|
|
3026
|
-
});
|
|
3027
|
-
},
|
|
3028
|
-
extend(e) {
|
|
3029
|
-
return ge(this, e);
|
|
3030
|
-
},
|
|
3031
|
-
safeExtend(e) {
|
|
3032
|
-
return _e(this, e);
|
|
3033
|
-
},
|
|
3034
|
-
merge(e) {
|
|
3035
|
-
return ve(this, e);
|
|
3036
|
-
},
|
|
3037
|
-
pick(e) {
|
|
3038
|
-
return me(this, e);
|
|
3039
|
-
},
|
|
3040
|
-
omit(e) {
|
|
3041
|
-
return he(this, e);
|
|
3042
|
-
},
|
|
3043
|
-
partial(...e) {
|
|
3044
|
-
return ye(oa, this, e[0]);
|
|
3045
|
-
},
|
|
3046
|
-
required(...e) {
|
|
3047
|
-
return be(ga, this, e[0]);
|
|
3048
|
-
}
|
|
3049
|
-
});
|
|
3050
|
-
});
|
|
3051
|
-
function Zi(e, t) {
|
|
3052
|
-
return new Xi({
|
|
3053
|
-
type: "object",
|
|
3054
|
-
shape: e ?? {},
|
|
3055
|
-
...L(t)
|
|
3056
|
-
});
|
|
3057
|
-
}
|
|
3058
|
-
var Qi = /* @__PURE__ */ x("ZodUnion", (e, t) => {
|
|
3059
|
-
hn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Gr(e, t, n, r), e.options = t.options;
|
|
3060
|
-
});
|
|
3061
|
-
function $i(e, t) {
|
|
3062
|
-
return new Qi({
|
|
3063
|
-
type: "union",
|
|
3064
|
-
options: e,
|
|
3065
|
-
...L(t)
|
|
3066
|
-
});
|
|
3067
|
-
}
|
|
3068
|
-
var ea = /* @__PURE__ */ x("ZodIntersection", (e, t) => {
|
|
3069
|
-
gn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Kr(e, t, n, r);
|
|
3070
|
-
});
|
|
3071
|
-
function ta(e, t) {
|
|
3072
|
-
return new ea({
|
|
3073
|
-
type: "intersection",
|
|
3074
|
-
left: e,
|
|
3075
|
-
right: t
|
|
3076
|
-
});
|
|
3077
|
-
}
|
|
3078
|
-
var na = /* @__PURE__ */ x("ZodEnum", (e, t) => {
|
|
3079
|
-
yn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Br(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
3080
|
-
let n = new Set(Object.keys(t.entries));
|
|
3081
|
-
e.extract = (e, r) => {
|
|
3082
|
-
let i = {};
|
|
3083
|
-
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
3084
|
-
else throw Error(`Key ${r} not found in enum`);
|
|
3085
|
-
return new na({
|
|
3086
|
-
...t,
|
|
3087
|
-
checks: [],
|
|
3088
|
-
...L(r),
|
|
3089
|
-
entries: i
|
|
3090
|
-
});
|
|
3091
|
-
}, e.exclude = (e, r) => {
|
|
3092
|
-
let i = { ...t.entries };
|
|
3093
|
-
for (let t of e) if (n.has(t)) delete i[t];
|
|
3094
|
-
else throw Error(`Key ${t} not found in enum`);
|
|
3095
|
-
return new na({
|
|
3096
|
-
...t,
|
|
3097
|
-
checks: [],
|
|
3098
|
-
...L(r),
|
|
3099
|
-
entries: i
|
|
3100
|
-
});
|
|
3101
|
-
};
|
|
3102
|
-
});
|
|
3103
|
-
function ra(e, t) {
|
|
3104
|
-
return new na({
|
|
3105
|
-
type: "enum",
|
|
3106
|
-
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
3107
|
-
...L(t)
|
|
3108
|
-
});
|
|
3109
|
-
}
|
|
3110
|
-
var ia = /* @__PURE__ */ x("ZodTransform", (e, t) => {
|
|
3111
|
-
bn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Hr(e, t, n, r), e._zod.parse = (n, r) => {
|
|
3112
|
-
if (r.direction === "backward") throw new C(e.constructor.name);
|
|
3113
|
-
n.addIssue = (r) => {
|
|
3114
|
-
if (typeof r == "string") n.issues.push(B(r, n.value, t));
|
|
3115
|
-
else {
|
|
3116
|
-
let t = r;
|
|
3117
|
-
t.fatal && (t.continue = !1), t.code ??= "custom", t.input ??= n.value, t.inst ??= e, n.issues.push(B(t));
|
|
3118
|
-
}
|
|
3119
|
-
};
|
|
3120
|
-
let i = t.transform(n.value, n);
|
|
3121
|
-
return i instanceof Promise ? i.then((e) => (n.value = e, n.fallback = !0, n)) : (n.value = i, n.fallback = !0, n);
|
|
3122
|
-
};
|
|
3123
|
-
});
|
|
3124
|
-
function aa(e) {
|
|
3125
|
-
return new ia({
|
|
3126
|
-
type: "transform",
|
|
3127
|
-
transform: e
|
|
3128
|
-
});
|
|
3129
|
-
}
|
|
3130
|
-
var oa = /* @__PURE__ */ x("ZodOptional", (e, t) => {
|
|
3131
|
-
Sn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => ei(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3132
|
-
});
|
|
3133
|
-
function sa(e) {
|
|
3134
|
-
return new oa({
|
|
3135
|
-
type: "optional",
|
|
3136
|
-
innerType: e
|
|
3137
|
-
});
|
|
3138
|
-
}
|
|
3139
|
-
var ca = /* @__PURE__ */ x("ZodExactOptional", (e, t) => {
|
|
3140
|
-
Cn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => ei(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3141
|
-
});
|
|
3142
|
-
function la(e) {
|
|
3143
|
-
return new ca({
|
|
3144
|
-
type: "optional",
|
|
3145
|
-
innerType: e
|
|
3146
|
-
});
|
|
3147
|
-
}
|
|
3148
|
-
var ua = /* @__PURE__ */ x("ZodNullable", (e, t) => {
|
|
3149
|
-
wn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => qr(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3150
|
-
});
|
|
3151
|
-
function da(e) {
|
|
3152
|
-
return new ua({
|
|
3153
|
-
type: "nullable",
|
|
3154
|
-
innerType: e
|
|
3155
|
-
});
|
|
3156
|
-
}
|
|
3157
|
-
var fa = /* @__PURE__ */ x("ZodDefault", (e, t) => {
|
|
3158
|
-
Tn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Yr(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
3159
|
-
});
|
|
3160
|
-
function pa(e, t) {
|
|
3161
|
-
return new fa({
|
|
3162
|
-
type: "default",
|
|
3163
|
-
innerType: e,
|
|
3164
|
-
get defaultValue() {
|
|
3165
|
-
return typeof t == "function" ? t() : ue(t);
|
|
3166
|
-
}
|
|
3167
|
-
});
|
|
3168
|
-
}
|
|
3169
|
-
var ma = /* @__PURE__ */ x("ZodPrefault", (e, t) => {
|
|
3170
|
-
Dn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xr(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3171
|
-
});
|
|
3172
|
-
function ha(e, t) {
|
|
3173
|
-
return new ma({
|
|
3174
|
-
type: "prefault",
|
|
3175
|
-
innerType: e,
|
|
3176
|
-
get defaultValue() {
|
|
3177
|
-
return typeof t == "function" ? t() : ue(t);
|
|
3178
|
-
}
|
|
3179
|
-
});
|
|
3180
|
-
}
|
|
3181
|
-
var ga = /* @__PURE__ */ x("ZodNonOptional", (e, t) => {
|
|
3182
|
-
On.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Jr(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3183
|
-
});
|
|
3184
|
-
function _a(e, t) {
|
|
3185
|
-
return new ga({
|
|
3186
|
-
type: "nonoptional",
|
|
3187
|
-
innerType: e,
|
|
3188
|
-
...L(t)
|
|
3189
|
-
});
|
|
3190
|
-
}
|
|
3191
|
-
var va = /* @__PURE__ */ x("ZodCatch", (e, t) => {
|
|
3192
|
-
An.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Zr(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
3193
|
-
});
|
|
3194
|
-
function ya(e, t) {
|
|
3195
|
-
return new va({
|
|
3196
|
-
type: "catch",
|
|
3197
|
-
innerType: e,
|
|
3198
|
-
catchValue: typeof t == "function" ? t : () => t
|
|
3199
|
-
});
|
|
3200
|
-
}
|
|
3201
|
-
var ba = /* @__PURE__ */ x("ZodPipe", (e, t) => {
|
|
3202
|
-
jn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qr(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
3203
|
-
});
|
|
3204
|
-
function xa(e, t) {
|
|
3205
|
-
return new ba({
|
|
3206
|
-
type: "pipe",
|
|
3207
|
-
in: e,
|
|
3208
|
-
out: t
|
|
3209
|
-
});
|
|
3210
|
-
}
|
|
3211
|
-
var Sa = /* @__PURE__ */ x("ZodReadonly", (e, t) => {
|
|
3212
|
-
Nn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => $r(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3213
|
-
});
|
|
3214
|
-
function Ca(e) {
|
|
3215
|
-
return new Sa({
|
|
3216
|
-
type: "readonly",
|
|
3217
|
-
innerType: e
|
|
3218
|
-
});
|
|
3219
|
-
}
|
|
3220
|
-
var wa = /* @__PURE__ */ x("ZodCustom", (e, t) => {
|
|
3221
|
-
Fn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => Vr(e, t, n, r);
|
|
3222
|
-
});
|
|
3223
|
-
function Ta(e, t = {}) {
|
|
3224
|
-
return /* @__PURE__ */ kr(wa, e, t);
|
|
3225
|
-
}
|
|
3226
|
-
function Ea(e, t) {
|
|
3227
|
-
return /* @__PURE__ */ Ar(e, t);
|
|
3228
|
-
}
|
|
3229
|
-
var Da = Zi({
|
|
3230
|
-
mapping: Zi({
|
|
3231
|
-
title: Z().optional(),
|
|
3232
|
-
date: Z().optional(),
|
|
3233
|
-
description: Z().optional(),
|
|
3234
|
-
variant: Z().optional()
|
|
3235
|
-
}).optional(),
|
|
3236
|
-
objectName: Z().optional(),
|
|
3237
|
-
titleField: Z().optional(),
|
|
3238
|
-
dateField: Z().optional(),
|
|
3239
|
-
startDateField: Z().optional(),
|
|
3240
|
-
endDateField: Z().optional(),
|
|
3241
|
-
descriptionField: Z().optional(),
|
|
3242
|
-
groupByField: Z().optional(),
|
|
3243
|
-
colorField: Z().optional(),
|
|
3244
|
-
scale: ra([
|
|
353
|
+
//#region src/ObjectTimeline.tsx
|
|
354
|
+
var C = _.object({
|
|
355
|
+
title: _.string().optional(),
|
|
356
|
+
date: _.string().optional(),
|
|
357
|
+
description: _.string().optional(),
|
|
358
|
+
variant: _.string().optional()
|
|
359
|
+
}), w = _.object({
|
|
360
|
+
mapping: C.optional(),
|
|
361
|
+
objectName: _.string().optional(),
|
|
362
|
+
titleField: _.string().optional(),
|
|
363
|
+
dateField: _.string().optional(),
|
|
364
|
+
startDateField: _.string().optional(),
|
|
365
|
+
endDateField: _.string().optional(),
|
|
366
|
+
descriptionField: _.string().optional(),
|
|
367
|
+
groupByField: _.string().optional(),
|
|
368
|
+
colorField: _.string().optional(),
|
|
369
|
+
scale: _.enum([
|
|
3245
370
|
"hour",
|
|
3246
371
|
"day",
|
|
3247
372
|
"week",
|
|
@@ -3249,19 +374,19 @@ var Da = Zi({
|
|
|
3249
374
|
"quarter",
|
|
3250
375
|
"year"
|
|
3251
376
|
]).optional()
|
|
3252
|
-
}),
|
|
3253
|
-
let [
|
|
377
|
+
}), T = ({ schema: e, dataSource: a, className: o, onRowClick: s, onItemClick: u, ...h }) => {
|
|
378
|
+
let [_, v] = r([]), [y, b] = r(!1), [x, C] = r(null), [T, E] = r(0), [D, O] = r(null), k = e.timeline;
|
|
3254
379
|
n(() => {
|
|
3255
|
-
let t =
|
|
380
|
+
let t = w.safeParse(e);
|
|
3256
381
|
t.success || console.warn("[ObjectTimeline] Invalid timeline configuration:", t.error.format());
|
|
3257
382
|
}, [e]);
|
|
3258
|
-
let
|
|
383
|
+
let A = p(e.bind);
|
|
3259
384
|
n(() => {
|
|
3260
385
|
let t = !0;
|
|
3261
386
|
return (async () => {
|
|
3262
387
|
if (!(!a || typeof a.getObjectSchema != "function" || !e.objectName)) try {
|
|
3263
388
|
let n = await a.getObjectSchema(e.objectName);
|
|
3264
|
-
t &&
|
|
389
|
+
t && O(n);
|
|
3265
390
|
} catch (e) {
|
|
3266
391
|
console.warn("Failed to fetch object def for ObjectTimeline", e);
|
|
3267
392
|
}
|
|
@@ -3269,35 +394,35 @@ var Da = Zi({
|
|
|
3269
394
|
t = !1;
|
|
3270
395
|
};
|
|
3271
396
|
}, [e.objectName, a]), n(() => {
|
|
3272
|
-
e.objectName && !
|
|
397
|
+
e.objectName && !A && !e.items && !h.data && (async () => {
|
|
3273
398
|
if (!(!a || typeof a.find != "function" || !e.objectName)) {
|
|
3274
|
-
|
|
399
|
+
b(!0);
|
|
3275
400
|
try {
|
|
3276
|
-
let t =
|
|
3277
|
-
|
|
401
|
+
let t = d(D?.fields);
|
|
402
|
+
v(f(await a.find(e.objectName, {
|
|
3278
403
|
options: { $top: 100 },
|
|
3279
404
|
...t.length > 0 ? { $expand: t } : {}
|
|
3280
405
|
})));
|
|
3281
406
|
} catch (e) {
|
|
3282
|
-
console.error(e),
|
|
407
|
+
console.error(e), C(e);
|
|
3283
408
|
} finally {
|
|
3284
|
-
|
|
409
|
+
b(!1);
|
|
3285
410
|
}
|
|
3286
411
|
}
|
|
3287
412
|
})();
|
|
3288
413
|
}, [
|
|
3289
414
|
e.objectName,
|
|
3290
415
|
a,
|
|
3291
|
-
|
|
416
|
+
A,
|
|
3292
417
|
e.items,
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
418
|
+
h.data,
|
|
419
|
+
T,
|
|
420
|
+
D
|
|
3296
421
|
]);
|
|
3297
|
-
let
|
|
3298
|
-
if (!
|
|
3299
|
-
let t =
|
|
3300
|
-
|
|
422
|
+
let j = h.data || A || _, M = e.items;
|
|
423
|
+
if (!M && j && Array.isArray(j)) {
|
|
424
|
+
let t = k?.titleField ?? e.mapping?.title ?? e.titleField ?? "name", n = k?.startDateField ?? e.mapping?.date ?? e.startDateField ?? e.dateField ?? "date", r = k?.endDateField ?? e.endDateField ?? n, i = e.mapping?.description ?? e.descriptionField ?? "description", a = e.mapping?.variant ?? "variant", o = k?.groupByField ?? e.groupByField, s = k?.colorField ?? e.colorField;
|
|
425
|
+
M = j.map((e) => ({
|
|
3301
426
|
title: e[t],
|
|
3302
427
|
time: e[n],
|
|
3303
428
|
startDate: e[n],
|
|
@@ -3309,49 +434,49 @@ var Da = Zi({
|
|
|
3309
434
|
_data: e
|
|
3310
435
|
}));
|
|
3311
436
|
}
|
|
3312
|
-
let { ref:
|
|
437
|
+
let { ref: N, isRefreshing: P, pullDistance: F } = g({
|
|
3313
438
|
onRefresh: t(async () => {
|
|
3314
|
-
|
|
439
|
+
E((e) => e + 1);
|
|
3315
440
|
}, []),
|
|
3316
441
|
enabled: !!e.objectName && !!a
|
|
3317
|
-
}),
|
|
442
|
+
}), I = m({
|
|
3318
443
|
navigation: e.navigation,
|
|
3319
444
|
objectName: e.objectName,
|
|
3320
|
-
onRowClick: s ??
|
|
3321
|
-
}),
|
|
445
|
+
onRowClick: s ?? u
|
|
446
|
+
}), L = k?.scale ?? e.scale, R = {
|
|
3322
447
|
...e,
|
|
3323
|
-
items:
|
|
448
|
+
items: M || [],
|
|
3324
449
|
className: o || e.className,
|
|
3325
|
-
...
|
|
450
|
+
...L ? { timeScale: L } : {},
|
|
3326
451
|
onItemClick: (e) => {
|
|
3327
452
|
let t = e._data || e;
|
|
3328
|
-
|
|
453
|
+
I.handleClick(t), u?.(t);
|
|
3329
454
|
}
|
|
3330
455
|
};
|
|
3331
|
-
return
|
|
456
|
+
return x ? /* @__PURE__ */ l("div", {
|
|
3332
457
|
className: "p-4 text-red-500",
|
|
3333
|
-
children: ["Error loading timeline: ",
|
|
3334
|
-
}) : /* @__PURE__ */ (
|
|
3335
|
-
ref:
|
|
458
|
+
children: ["Error loading timeline: ", x.message]
|
|
459
|
+
}) : /* @__PURE__ */ l("div", {
|
|
460
|
+
ref: N,
|
|
3336
461
|
className: "relative overflow-auto h-full min-w-0",
|
|
3337
462
|
children: [
|
|
3338
|
-
|
|
463
|
+
F > 0 && /* @__PURE__ */ c("div", {
|
|
3339
464
|
className: "flex items-center justify-center text-xs text-muted-foreground",
|
|
3340
|
-
style: { height:
|
|
3341
|
-
children:
|
|
465
|
+
style: { height: F },
|
|
466
|
+
children: P ? "Refreshing…" : "Pull to refresh"
|
|
3342
467
|
}),
|
|
3343
|
-
/* @__PURE__ */ (
|
|
3344
|
-
|
|
3345
|
-
...
|
|
468
|
+
/* @__PURE__ */ c(S, { schema: R }),
|
|
469
|
+
I.isOverlay && /* @__PURE__ */ c(i, {
|
|
470
|
+
...I,
|
|
3346
471
|
title: "Timeline Item",
|
|
3347
|
-
children: (e) => /* @__PURE__ */ (
|
|
472
|
+
children: (e) => /* @__PURE__ */ c("div", {
|
|
3348
473
|
className: "space-y-3",
|
|
3349
|
-
children: Object.entries(e).map(([e, t]) => /* @__PURE__ */ (
|
|
474
|
+
children: Object.entries(e).map(([e, t]) => /* @__PURE__ */ l("div", {
|
|
3350
475
|
className: "flex flex-col",
|
|
3351
|
-
children: [/* @__PURE__ */ (
|
|
476
|
+
children: [/* @__PURE__ */ c("span", {
|
|
3352
477
|
className: "text-xs font-medium text-muted-foreground uppercase tracking-wide",
|
|
3353
478
|
children: e.replace(/_/g, " ")
|
|
3354
|
-
}), /* @__PURE__ */ (
|
|
479
|
+
}), /* @__PURE__ */ c("span", {
|
|
3355
480
|
className: "text-sm",
|
|
3356
481
|
children: String(t ?? "—")
|
|
3357
482
|
})]
|
|
@@ -3360,26 +485,26 @@ var Da = Zi({
|
|
|
3360
485
|
})
|
|
3361
486
|
]
|
|
3362
487
|
});
|
|
3363
|
-
},
|
|
488
|
+
}, E = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("ol", {
|
|
3364
489
|
ref: n,
|
|
3365
490
|
className: a("relative ml-3 border-l border-gray-200", e),
|
|
3366
491
|
...t
|
|
3367
492
|
}));
|
|
3368
|
-
|
|
3369
|
-
var
|
|
493
|
+
E.displayName = "Timeline";
|
|
494
|
+
var D = o("ml-6", {
|
|
3370
495
|
variants: { density: {
|
|
3371
496
|
default: "mb-10",
|
|
3372
497
|
compact: "mb-3",
|
|
3373
498
|
comfortable: "mb-6"
|
|
3374
499
|
} },
|
|
3375
500
|
defaultVariants: { density: "default" }
|
|
3376
|
-
}),
|
|
501
|
+
}), O = e.forwardRef(({ className: e, density: t, ...n }, r) => /* @__PURE__ */ c("li", {
|
|
3377
502
|
ref: r,
|
|
3378
|
-
className: a(
|
|
503
|
+
className: a(D({ density: t }), e),
|
|
3379
504
|
...n
|
|
3380
505
|
}));
|
|
3381
|
-
|
|
3382
|
-
var
|
|
506
|
+
O.displayName = "TimelineItem";
|
|
507
|
+
var k = o("absolute -left-3 w-6 h-6 rounded-full border-2 flex items-center justify-center", {
|
|
3383
508
|
variants: { variant: {
|
|
3384
509
|
default: "bg-blue-200 border-blue-400",
|
|
3385
510
|
success: "bg-emerald-200 border-emerald-500",
|
|
@@ -3391,85 +516,85 @@ var Ma = o("absolute -left-3 w-6 h-6 rounded-full border-2 flex items-center jus
|
|
|
3391
516
|
done: "bg-emerald-200 border-emerald-500"
|
|
3392
517
|
} },
|
|
3393
518
|
defaultVariants: { variant: "default" }
|
|
3394
|
-
}),
|
|
519
|
+
}), A = e.forwardRef(({ className: e, variant: t = "default", ...n }, r) => /* @__PURE__ */ c("div", {
|
|
3395
520
|
ref: r,
|
|
3396
|
-
className: a(
|
|
521
|
+
className: a(k({ variant: t }), e),
|
|
3397
522
|
...n
|
|
3398
523
|
}));
|
|
3399
|
-
|
|
3400
|
-
var
|
|
524
|
+
A.displayName = "TimelineMarker";
|
|
525
|
+
var j = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("div", {
|
|
3401
526
|
ref: n,
|
|
3402
527
|
className: e,
|
|
3403
528
|
...t
|
|
3404
529
|
}));
|
|
3405
|
-
|
|
3406
|
-
var
|
|
530
|
+
j.displayName = "TimelineContent";
|
|
531
|
+
var M = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("h3", {
|
|
3407
532
|
ref: n,
|
|
3408
533
|
className: a("font-semibold text-lg mb-1", e),
|
|
3409
534
|
...t
|
|
3410
535
|
}));
|
|
3411
|
-
|
|
3412
|
-
var
|
|
536
|
+
M.displayName = "TimelineTitle";
|
|
537
|
+
var N = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("time", {
|
|
3413
538
|
ref: n,
|
|
3414
539
|
className: a("text-sm font-normal text-gray-500 mb-2 block", e),
|
|
3415
540
|
...t
|
|
3416
541
|
}));
|
|
3417
|
-
|
|
3418
|
-
var
|
|
542
|
+
N.displayName = "TimelineTime";
|
|
543
|
+
var P = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("p", {
|
|
3419
544
|
ref: n,
|
|
3420
545
|
className: a("text-base text-gray-700", e),
|
|
3421
546
|
...t
|
|
3422
547
|
}));
|
|
3423
|
-
|
|
3424
|
-
var
|
|
548
|
+
P.displayName = "TimelineDescription";
|
|
549
|
+
var F = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("div", {
|
|
3425
550
|
ref: n,
|
|
3426
551
|
className: a("relative flex overflow-x-auto py-8", e),
|
|
3427
552
|
...t
|
|
3428
553
|
}));
|
|
3429
|
-
|
|
3430
|
-
var
|
|
554
|
+
F.displayName = "TimelineHorizontal";
|
|
555
|
+
var I = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("div", {
|
|
3431
556
|
ref: n,
|
|
3432
557
|
className: a("flex-shrink-0 w-64 relative", e),
|
|
3433
558
|
...t
|
|
3434
559
|
}));
|
|
3435
|
-
|
|
3436
|
-
var
|
|
560
|
+
I.displayName = "TimelineHorizontalItem";
|
|
561
|
+
var L = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("div", {
|
|
3437
562
|
ref: n,
|
|
3438
563
|
className: a("relative w-full border rounded-lg overflow-hidden", e),
|
|
3439
564
|
...t
|
|
3440
565
|
}));
|
|
3441
|
-
|
|
3442
|
-
var
|
|
566
|
+
L.displayName = "TimelineGantt";
|
|
567
|
+
var R = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("div", {
|
|
3443
568
|
ref: n,
|
|
3444
569
|
className: a("flex border-b bg-gray-50", e),
|
|
3445
570
|
...t
|
|
3446
571
|
}));
|
|
3447
|
-
|
|
3448
|
-
var
|
|
572
|
+
R.displayName = "TimelineGanttHeader";
|
|
573
|
+
var z = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("div", {
|
|
3449
574
|
ref: n,
|
|
3450
575
|
className: a("w-48 border-r bg-white", e),
|
|
3451
576
|
...t
|
|
3452
577
|
}));
|
|
3453
|
-
|
|
3454
|
-
var
|
|
578
|
+
z.displayName = "TimelineGanttRowLabels";
|
|
579
|
+
var B = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("div", {
|
|
3455
580
|
ref: n,
|
|
3456
581
|
className: a("flex-1 overflow-x-auto", e),
|
|
3457
582
|
...t
|
|
3458
583
|
}));
|
|
3459
|
-
|
|
3460
|
-
var
|
|
584
|
+
B.displayName = "TimelineGanttGrid";
|
|
585
|
+
var V = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("div", {
|
|
3461
586
|
ref: n,
|
|
3462
587
|
className: a("flex items-center border-b min-h-12", e),
|
|
3463
588
|
...t
|
|
3464
589
|
}));
|
|
3465
|
-
|
|
3466
|
-
var
|
|
590
|
+
V.displayName = "TimelineGanttRow";
|
|
591
|
+
var H = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("div", {
|
|
3467
592
|
ref: n,
|
|
3468
593
|
className: a("px-4 py-2 font-medium text-sm truncate", e),
|
|
3469
594
|
...t
|
|
3470
595
|
}));
|
|
3471
|
-
|
|
3472
|
-
var
|
|
596
|
+
H.displayName = "TimelineGanttLabel";
|
|
597
|
+
var U = e.forwardRef(({ className: e, start: t = 0, width: n = 100, variant: r = "default", ...i }, o) => /* @__PURE__ */ c("div", {
|
|
3473
598
|
ref: o,
|
|
3474
599
|
className: a("absolute h-8 rounded-md transition-colors cursor-pointer", {
|
|
3475
600
|
default: "bg-blue-500 hover:bg-blue-600",
|
|
@@ -3484,22 +609,22 @@ var Ga = e.forwardRef(({ className: e, start: t = 0, width: n = 100, variant: r
|
|
|
3484
609
|
},
|
|
3485
610
|
...i
|
|
3486
611
|
}));
|
|
3487
|
-
|
|
3488
|
-
var
|
|
612
|
+
U.displayName = "TimelineGanttBar";
|
|
613
|
+
var W = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("div", {
|
|
3489
614
|
ref: n,
|
|
3490
615
|
className: a("px-2 py-1 text-white text-xs font-medium truncate", e),
|
|
3491
616
|
...t
|
|
3492
617
|
}));
|
|
3493
|
-
|
|
3494
|
-
var
|
|
3495
|
-
let { dataSource: n } =
|
|
3496
|
-
return /* @__PURE__ */ (
|
|
618
|
+
W.displayName = "TimelineGanttBarContent";
|
|
619
|
+
var G = ({ schema: e, ...t }) => {
|
|
620
|
+
let { dataSource: n } = h() || {};
|
|
621
|
+
return /* @__PURE__ */ c(T, {
|
|
3497
622
|
schema: e,
|
|
3498
623
|
dataSource: n,
|
|
3499
624
|
...t
|
|
3500
625
|
});
|
|
3501
626
|
};
|
|
3502
|
-
|
|
627
|
+
u.register("object-timeline", G, {
|
|
3503
628
|
namespace: "plugin-timeline",
|
|
3504
629
|
label: "Object Timeline",
|
|
3505
630
|
category: "view",
|
|
@@ -3518,7 +643,7 @@ c.register("object-timeline", qa, {
|
|
|
3518
643
|
],
|
|
3519
644
|
defaultValue: "vertical"
|
|
3520
645
|
}]
|
|
3521
|
-
}),
|
|
646
|
+
}), u.register("timeline", G, {
|
|
3522
647
|
namespace: "view",
|
|
3523
648
|
label: "Timeline View",
|
|
3524
649
|
category: "view",
|
|
@@ -3539,4 +664,4 @@ c.register("object-timeline", qa, {
|
|
|
3539
664
|
}]
|
|
3540
665
|
});
|
|
3541
666
|
//#endregion
|
|
3542
|
-
export {
|
|
667
|
+
export { T as ObjectTimeline, G as ObjectTimelineRenderer, E as Timeline, j as TimelineContent, P as TimelineDescription, L as TimelineGantt, U as TimelineGanttBar, W as TimelineGanttBarContent, B as TimelineGanttGrid, R as TimelineGanttHeader, H as TimelineGanttLabel, V as TimelineGanttRow, z as TimelineGanttRowLabels, F as TimelineHorizontal, I as TimelineHorizontalItem, O as TimelineItem, A as TimelineMarker, S as TimelineRenderer, N as TimelineTime, M as TimelineTitle, D as timelineItemVariants, k as timelineMarkerVariants };
|