@ericbutera/kaleido 0.1.0 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import z, { createContext as lr, useContext as It, useEffect as $e, useState as at, useRef as cr, useMemo as dr } from "react";
1
+ import F, { createContext as lr, useContext as It, useEffect as Ze, useState as qe, useRef as cr, useMemo as dr } from "react";
2
2
  import ur from "react-hot-toast";
3
- import { useNavigate as be, useSearchParams as We, useLocation as fr, Link as qe } from "react-router-dom";
4
- import { useForm as Pe } from "react-hook-form";
5
- import { faRightToBracket as hr, faSort as mr, faSortUp as pr, faSortDown as gr } from "@fortawesome/free-solid-svg-icons";
6
- import { FontAwesomeIcon as it } from "@fortawesome/react-fontawesome";
7
- var Me = { exports: {} }, Ee = {};
3
+ import { useNavigate as we, useSearchParams as Ye, useLocation as fr, Link as ge } from "react-router-dom";
4
+ import { useForm as Ie } from "react-hook-form";
5
+ import { faRightToBracket as hr, faStore as mr, faSort as pr, faSortUp as gr, faSortDown as yr } from "@fortawesome/free-solid-svg-icons";
6
+ import { FontAwesomeIcon as Qe } from "@fortawesome/react-fontawesome";
7
+ var Le = { exports: {} }, Ce = {};
8
8
  var dt;
9
- function yr() {
10
- if (dt) return Ee;
9
+ function vr() {
10
+ if (dt) return Ce;
11
11
  dt = 1;
12
12
  var r = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
13
13
  function t(s, n, a) {
14
- var c = null;
15
- if (a !== void 0 && (c = "" + a), n.key !== void 0 && (c = "" + n.key), "key" in n) {
14
+ var d = null;
15
+ if (a !== void 0 && (d = "" + a), n.key !== void 0 && (d = "" + n.key), "key" in n) {
16
16
  a = {};
17
17
  for (var u in n)
18
18
  u !== "key" && (a[u] = n[u]);
@@ -20,21 +20,21 @@ function yr() {
20
20
  return n = a.ref, {
21
21
  $$typeof: r,
22
22
  type: s,
23
- key: c,
23
+ key: d,
24
24
  ref: n !== void 0 ? n : null,
25
25
  props: a
26
26
  };
27
27
  }
28
- return Ee.Fragment = e, Ee.jsx = t, Ee.jsxs = t, Ee;
28
+ return Ce.Fragment = e, Ce.jsx = t, Ce.jsxs = t, Ce;
29
29
  }
30
- var Ce = {};
30
+ var Se = {};
31
31
  var ut;
32
- function vr() {
32
+ function _r() {
33
33
  return ut || (ut = 1, process.env.NODE_ENV !== "production" && (function() {
34
34
  function r(m) {
35
35
  if (m == null) return null;
36
36
  if (typeof m == "function")
37
- return m.$$typeof === Y ? null : m.displayName || m.name || null;
37
+ return m.$$typeof === q ? null : m.displayName || m.name || null;
38
38
  if (typeof m == "string") return m;
39
39
  switch (m) {
40
40
  case x:
@@ -54,11 +54,11 @@ function vr() {
54
54
  switch (typeof m.tag == "number" && console.error(
55
55
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
56
56
  ), m.$$typeof) {
57
- case k:
57
+ case w:
58
58
  return "Portal";
59
59
  case I:
60
60
  return m.displayName || "Context";
61
- case w:
61
+ case k:
62
62
  return (m._context.displayName || "Context") + ".Consumer";
63
63
  case L:
64
64
  var E = m.render;
@@ -112,8 +112,8 @@ function vr() {
112
112
  function a() {
113
113
  return Error("react-stack-top-frame");
114
114
  }
115
- function c(m) {
116
- if (Q.call(m, "key")) {
115
+ function d(m) {
116
+ if (Y.call(m, "key")) {
117
117
  var E = Object.getOwnPropertyDescriptor(m, "key").get;
118
118
  if (E && E.isReactWarning) return !1;
119
119
  }
@@ -121,7 +121,7 @@ function vr() {
121
121
  }
122
122
  function u(m, E) {
123
123
  function $() {
124
- we || (we = !0, console.error(
124
+ ke || (ke = !0, console.error(
125
125
  "%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)",
126
126
  E
127
127
  ));
@@ -137,15 +137,15 @@ function vr() {
137
137
  "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."
138
138
  )), m = this.props.ref, m !== void 0 ? m : null;
139
139
  }
140
- function o(m, E, $, D, Ie, Ye) {
141
- var U = $.ref;
140
+ function o(m, E, $, D, Me, He) {
141
+ var V = $.ref;
142
142
  return m = {
143
143
  $$typeof: y,
144
144
  type: m,
145
145
  key: E,
146
146
  props: $,
147
147
  _owner: D
148
- }, (U !== void 0 ? U : null) !== null ? Object.defineProperty(m, "ref", {
148
+ }, (V !== void 0 ? V : null) !== null ? Object.defineProperty(m, "ref", {
149
149
  enumerable: !1,
150
150
  get: i
151
151
  }) : Object.defineProperty(m, "ref", { enumerable: !1, value: null }), m._store = {}, Object.defineProperty(m._store, "validated", {
@@ -162,33 +162,33 @@ function vr() {
162
162
  configurable: !1,
163
163
  enumerable: !1,
164
164
  writable: !0,
165
- value: Ie
165
+ value: Me
166
166
  }), Object.defineProperty(m, "_debugTask", {
167
167
  configurable: !1,
168
168
  enumerable: !1,
169
169
  writable: !0,
170
- value: Ye
170
+ value: He
171
171
  }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
172
172
  }
173
- function l(m, E, $, D, Ie, Ye) {
174
- var U = E.children;
175
- if (U !== void 0)
173
+ function l(m, E, $, D, Me, He) {
174
+ var V = E.children;
175
+ if (V !== void 0)
176
176
  if (D)
177
- if (q(U)) {
178
- for (D = 0; D < U.length; D++)
179
- f(U[D]);
180
- Object.freeze && Object.freeze(U);
177
+ if (Q(V)) {
178
+ for (D = 0; D < V.length; D++)
179
+ f(V[D]);
180
+ Object.freeze && Object.freeze(V);
181
181
  } else
182
182
  console.error(
183
183
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
184
184
  );
185
- else f(U);
186
- if (Q.call(E, "key")) {
187
- U = r(m);
185
+ else f(V);
186
+ if (Y.call(E, "key")) {
187
+ V = r(m);
188
188
  var he = Object.keys(E).filter(function(or) {
189
189
  return or !== "key";
190
190
  });
191
- D = 0 < he.length ? "{key: someKey, " + he.join(": ..., ") + ": ...}" : "{key: someKey}", Ne[U + D] || (he = 0 < he.length ? "{" + he.join(": ..., ") + ": ...}" : "{}", console.error(
191
+ D = 0 < he.length ? "{key: someKey, " + he.join(": ..., ") + ": ...}" : "{key: someKey}", Ee[V + D] || (he = 0 < he.length ? "{" + he.join(": ..., ") + ": ...}" : "{}", console.error(
192
192
  `A props object containing a "key" prop is being spread into JSX:
193
193
  let props = %s;
194
194
  <%s {...props} />
@@ -196,26 +196,26 @@ React keys must be passed directly to JSX without using spread:
196
196
  let props = %s;
197
197
  <%s key={someKey} {...props} />`,
198
198
  D,
199
- U,
199
+ V,
200
200
  he,
201
- U
202
- ), Ne[U + D] = !0);
201
+ V
202
+ ), Ee[V + D] = !0);
203
203
  }
204
- if (U = null, $ !== void 0 && (t($), U = "" + $), c(E) && (t(E.key), U = "" + E.key), "key" in E) {
204
+ if (V = null, $ !== void 0 && (t($), V = "" + $), d(E) && (t(E.key), V = "" + E.key), "key" in E) {
205
205
  $ = {};
206
- for (var Qe in E)
207
- Qe !== "key" && ($[Qe] = E[Qe]);
206
+ for (var Ge in E)
207
+ Ge !== "key" && ($[Ge] = E[Ge]);
208
208
  } else $ = E;
209
- return U && u(
209
+ return V && u(
210
210
  $,
211
211
  typeof m == "function" ? m.displayName || m.name || "Unknown" : m
212
212
  ), o(
213
213
  m,
214
- U,
214
+ V,
215
215
  $,
216
216
  n(),
217
- Ie,
218
- Ye
217
+ Me,
218
+ He
219
219
  );
220
220
  }
221
221
  function f(m) {
@@ -224,7 +224,7 @@ React keys must be passed directly to JSX without using spread:
224
224
  function h(m) {
225
225
  return typeof m == "object" && m !== null && m.$$typeof === y;
226
226
  }
227
- var p = z, y = /* @__PURE__ */ Symbol.for("react.transitional.element"), k = /* @__PURE__ */ Symbol.for("react.portal"), x = /* @__PURE__ */ Symbol.for("react.fragment"), M = /* @__PURE__ */ Symbol.for("react.strict_mode"), R = /* @__PURE__ */ Symbol.for("react.profiler"), w = /* @__PURE__ */ Symbol.for("react.consumer"), I = /* @__PURE__ */ Symbol.for("react.context"), L = /* @__PURE__ */ Symbol.for("react.forward_ref"), O = /* @__PURE__ */ Symbol.for("react.suspense"), B = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), G = /* @__PURE__ */ Symbol.for("react.lazy"), le = /* @__PURE__ */ Symbol.for("react.activity"), Y = /* @__PURE__ */ Symbol.for("react.client.reference"), P = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = Object.prototype.hasOwnProperty, q = Array.isArray, V = console.createTask ? console.createTask : function() {
227
+ var p = F, y = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), x = /* @__PURE__ */ Symbol.for("react.fragment"), M = /* @__PURE__ */ Symbol.for("react.strict_mode"), R = /* @__PURE__ */ Symbol.for("react.profiler"), k = /* @__PURE__ */ Symbol.for("react.consumer"), I = /* @__PURE__ */ Symbol.for("react.context"), L = /* @__PURE__ */ Symbol.for("react.forward_ref"), O = /* @__PURE__ */ Symbol.for("react.suspense"), B = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), G = /* @__PURE__ */ Symbol.for("react.lazy"), le = /* @__PURE__ */ Symbol.for("react.activity"), q = /* @__PURE__ */ Symbol.for("react.client.reference"), P = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, Q = Array.isArray, U = console.createTask ? console.createTask : function() {
228
228
  return null;
229
229
  };
230
230
  p = {
@@ -232,40 +232,40 @@ React keys must be passed directly to JSX without using spread:
232
232
  return m();
233
233
  }
234
234
  };
235
- var we, re = {}, ke = p.react_stack_bottom_frame.bind(
235
+ var ke, re = {}, je = p.react_stack_bottom_frame.bind(
236
236
  p,
237
237
  a
238
- )(), je = V(s(a)), Ne = {};
239
- Ce.Fragment = x, Ce.jsx = function(m, E, $) {
238
+ )(), Ne = U(s(a)), Ee = {};
239
+ Se.Fragment = x, Se.jsx = function(m, E, $) {
240
240
  var D = 1e4 > P.recentlyCreatedOwnerStacks++;
241
241
  return l(
242
242
  m,
243
243
  E,
244
244
  $,
245
245
  !1,
246
- D ? Error("react-stack-top-frame") : ke,
247
- D ? V(s(m)) : je
246
+ D ? Error("react-stack-top-frame") : je,
247
+ D ? U(s(m)) : Ne
248
248
  );
249
- }, Ce.jsxs = function(m, E, $) {
249
+ }, Se.jsxs = function(m, E, $) {
250
250
  var D = 1e4 > P.recentlyCreatedOwnerStacks++;
251
251
  return l(
252
252
  m,
253
253
  E,
254
254
  $,
255
255
  !0,
256
- D ? Error("react-stack-top-frame") : ke,
257
- D ? V(s(m)) : je
256
+ D ? Error("react-stack-top-frame") : je,
257
+ D ? U(s(m)) : Ne
258
258
  );
259
259
  };
260
- })()), Ce;
260
+ })()), Se;
261
261
  }
262
262
  var ft;
263
- function _r() {
264
- return ft || (ft = 1, process.env.NODE_ENV === "production" ? Me.exports = yr() : Me.exports = vr()), Me.exports;
263
+ function xr() {
264
+ return ft || (ft = 1, process.env.NODE_ENV === "production" ? Le.exports = vr() : Le.exports = _r()), Le.exports;
265
265
  }
266
- var d = _r();
266
+ var c = xr();
267
267
  const ot = lr(null);
268
- function xr({
268
+ function br({
269
269
  client: r,
270
270
  config: e = {},
271
271
  children: t
@@ -275,7 +275,7 @@ function xr({
275
275
  registrationEnabled: !0,
276
276
  OAuthButton: void 0
277
277
  }, ...e };
278
- return /* @__PURE__ */ d.jsx(ot.Provider, { value: { client: r, config: n }, children: t });
278
+ return /* @__PURE__ */ c.jsx(ot.Provider, { value: { client: r, config: n }, children: t });
279
279
  }
280
280
  function te() {
281
281
  const r = It(ot);
@@ -295,10 +295,10 @@ function Mt() {
295
295
  }
296
296
  function lt(r, e, t = "An error occurred", s = !0) {
297
297
  const n = r;
298
- if (n?.errors && Object.entries(n.errors).forEach(([a, c]) => {
298
+ if (n?.errors && Object.entries(n.errors).forEach(([a, d]) => {
299
299
  e(a, {
300
300
  type: "server",
301
- message: c[0]
301
+ message: d[0]
302
302
  });
303
303
  }), s) {
304
304
  const a = n?.message || t;
@@ -310,23 +310,23 @@ function Lt(r, e, t = "/") {
310
310
  r(n || t, { replace: !0 });
311
311
  }
312
312
  function oe({ children: r }) {
313
- return /* @__PURE__ */ d.jsx("div", { className: "min-h-screen flex items-center justify-center bg-gradient-to-br from-primary/10 to-secondary/10", children: /* @__PURE__ */ d.jsx("div", { className: "card bg-base-100 shadow-soft hover:shadow-medium transition-shadow border border-base-300 w-full max-w-md mx-4", children: /* @__PURE__ */ d.jsx("div", { className: "card-body p-8", children: r }) }) });
313
+ return /* @__PURE__ */ c.jsx("div", { className: "min-h-screen flex items-center justify-center bg-gradient-to-br from-primary/10 to-secondary/10", children: /* @__PURE__ */ c.jsx("div", { className: "card bg-base-100 shadow-soft hover:shadow-medium transition-shadow border border-base-300 w-full max-w-md mx-4", children: /* @__PURE__ */ c.jsx("div", { className: "card-body p-8", children: r }) }) });
314
314
  }
315
- function br() {
316
- const r = be(), [e] = We(), { useVerifyEmail: t } = te(), s = t(), n = e.get("token"), a = async () => {
315
+ function wr() {
316
+ const r = we(), [e] = Ye(), { useVerifyEmail: t } = te(), s = t(), n = e.get("token"), a = async () => {
317
317
  try {
318
318
  n && await s.mutateAsync(n), r("/");
319
319
  } catch {
320
320
  }
321
321
  };
322
- return /* @__PURE__ */ d.jsxs(oe, { children: [
323
- /* @__PURE__ */ d.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Confirm Email" }),
324
- /* @__PURE__ */ d.jsx("p", { className: "mb-4", children: "Click the button to confirm your email address." }),
325
- /* @__PURE__ */ d.jsx("div", { className: "join", children: /* @__PURE__ */ d.jsx("button", { className: "btn btn-primary", onClick: a, children: "Confirm" }) })
322
+ return /* @__PURE__ */ c.jsxs(oe, { children: [
323
+ /* @__PURE__ */ c.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Confirm Email" }),
324
+ /* @__PURE__ */ c.jsx("p", { className: "mb-4", children: "Click the button to confirm your email address." }),
325
+ /* @__PURE__ */ c.jsx("div", { className: "join", children: /* @__PURE__ */ c.jsx("button", { className: "btn btn-primary", onClick: a, children: "Confirm" }) })
326
326
  ] });
327
327
  }
328
- function wr() {
329
- const { register: r, handleSubmit: e } = Pe({
328
+ function kr() {
329
+ const { register: r, handleSubmit: e } = Ie({
330
330
  defaultValues: { email: "" }
331
331
  }), { useForgotPassword: t } = te(), s = t(), n = async (a) => {
332
332
  try {
@@ -334,36 +334,36 @@ function wr() {
334
334
  } catch {
335
335
  }
336
336
  };
337
- return /* @__PURE__ */ d.jsxs(oe, { children: [
338
- /* @__PURE__ */ d.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Forgot Password" }),
339
- /* @__PURE__ */ d.jsxs("form", { onSubmit: e(n), children: [
340
- /* @__PURE__ */ d.jsx("label", { className: "label", children: "Email" }),
341
- /* @__PURE__ */ d.jsx(
337
+ return /* @__PURE__ */ c.jsxs(oe, { children: [
338
+ /* @__PURE__ */ c.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Forgot Password" }),
339
+ /* @__PURE__ */ c.jsxs("form", { onSubmit: e(n), children: [
340
+ /* @__PURE__ */ c.jsx("label", { className: "label", children: "Email" }),
341
+ /* @__PURE__ */ c.jsx(
342
342
  "input",
343
343
  {
344
344
  className: "input input-bordered w-full",
345
345
  ...r("email", { required: !0 })
346
346
  }
347
347
  ),
348
- /* @__PURE__ */ d.jsx("button", { className: "btn btn-primary mt-4", children: "Send Reset" })
348
+ /* @__PURE__ */ c.jsx("button", { className: "btn btn-primary mt-4", children: "Send Reset" })
349
349
  ] })
350
350
  ] });
351
351
  }
352
- function kr() {
352
+ function jr() {
353
353
  const {
354
354
  register: r,
355
355
  handleSubmit: e,
356
356
  setError: t,
357
357
  formState: { errors: s, isSubmitting: n }
358
- } = Pe({
358
+ } = Ie({
359
359
  defaultValues: { email: "", password: "" }
360
- }), a = be(), c = fr(), { useLoginUser: u, useCurrentUser: i } = te(), { oauthEnabled: o, registrationEnabled: l, OAuthButton: f } = Mt(), h = u(), { user: p } = i();
361
- $e(() => {
362
- p && Lt(a, c);
363
- }, [p, a, c]);
364
- const y = async (k) => {
360
+ }), a = we(), d = fr(), { useLoginUser: u, useCurrentUser: i } = te(), { oauthEnabled: o, registrationEnabled: l, OAuthButton: f } = Mt(), h = u(), { user: p } = i();
361
+ Ze(() => {
362
+ p && Lt(a, d);
363
+ }, [p, a, d]);
364
+ const y = async (w) => {
365
365
  try {
366
- await h.mutateAsync(k, t), a("/");
366
+ await h.mutateAsync(w, t), a("/");
367
367
  } catch (x) {
368
368
  const M = x?.response?.status;
369
369
  if (M == 401)
@@ -372,30 +372,30 @@ function kr() {
372
372
  message: "Invalid email or password"
373
373
  });
374
374
  else if (M == 422) {
375
- const R = x?.response?.data, w = R && (R.error || R.message) || "Too many login attempts. Please try again later.";
376
- t("root", { type: "server", message: w });
375
+ const R = x?.response?.data, k = R && (R.error || R.message) || "Too many login attempts. Please try again later.";
376
+ t("root", { type: "server", message: k });
377
377
  } else {
378
378
  const R = x?.response?.data ?? x;
379
379
  lt(R, t, "Failed to sign in");
380
380
  }
381
381
  }
382
382
  };
383
- return /* @__PURE__ */ d.jsxs(oe, { children: [
384
- /* @__PURE__ */ d.jsxs("div", { className: "text-center mb-6", children: [
385
- /* @__PURE__ */ d.jsx("div", { className: "inline-flex items-center justify-center w-16 h-16 bg-primary/10 rounded-full mb-4", children: /* @__PURE__ */ d.jsx(
386
- it,
383
+ return /* @__PURE__ */ c.jsxs(oe, { children: [
384
+ /* @__PURE__ */ c.jsxs("div", { className: "text-center mb-6", children: [
385
+ /* @__PURE__ */ c.jsx("div", { className: "inline-flex items-center justify-center w-16 h-16 bg-primary/10 rounded-full mb-4", children: /* @__PURE__ */ c.jsx(
386
+ Qe,
387
387
  {
388
388
  icon: hr,
389
389
  className: "text-3xl text-primary"
390
390
  }
391
391
  ) }),
392
- /* @__PURE__ */ d.jsx("h2", { className: "text-3xl font-bold mb-2", children: "Welcome Back" })
392
+ /* @__PURE__ */ c.jsx("h2", { className: "text-3xl font-bold mb-2", children: "Welcome Back" })
393
393
  ] }),
394
- /* @__PURE__ */ d.jsxs("form", { onSubmit: e(y), children: [
395
- s.root && /* @__PURE__ */ d.jsx("div", { className: "alert alert-error alert-soft mb-4", children: /* @__PURE__ */ d.jsx("span", { children: s.root.message }) }),
396
- /* @__PURE__ */ d.jsxs("fieldset", { className: "fieldset", children: [
397
- /* @__PURE__ */ d.jsx("label", { className: "label", htmlFor: "login-email", children: /* @__PURE__ */ d.jsx("span", { className: "label-text", children: "Email" }) }),
398
- /* @__PURE__ */ d.jsx(
394
+ /* @__PURE__ */ c.jsxs("form", { onSubmit: e(y), children: [
395
+ s.root && /* @__PURE__ */ c.jsx("div", { className: "alert alert-error alert-soft mb-4", children: /* @__PURE__ */ c.jsx("span", { children: s.root.message }) }),
396
+ /* @__PURE__ */ c.jsxs("fieldset", { className: "fieldset", children: [
397
+ /* @__PURE__ */ c.jsx("label", { className: "label", htmlFor: "login-email", children: /* @__PURE__ */ c.jsx("span", { className: "label-text", children: "Email" }) }),
398
+ /* @__PURE__ */ c.jsx(
399
399
  "input",
400
400
  {
401
401
  id: "login-email",
@@ -405,9 +405,9 @@ function kr() {
405
405
  ...r("email", { required: "Email is required" })
406
406
  }
407
407
  ),
408
- s.email && /* @__PURE__ */ d.jsx("span", { className: "text-error text-sm", children: s.email.message }),
409
- /* @__PURE__ */ d.jsx("label", { className: "label mt-4", htmlFor: "login-password", children: /* @__PURE__ */ d.jsx("span", { className: "label-text", children: "Password" }) }),
410
- /* @__PURE__ */ d.jsx(
408
+ s.email && /* @__PURE__ */ c.jsx("span", { className: "text-error text-sm", children: s.email.message }),
409
+ /* @__PURE__ */ c.jsx("label", { className: "label mt-4", htmlFor: "login-password", children: /* @__PURE__ */ c.jsx("span", { className: "label-text", children: "Password" }) }),
410
+ /* @__PURE__ */ c.jsx(
411
411
  "input",
412
412
  {
413
413
  id: "login-password",
@@ -418,8 +418,8 @@ function kr() {
418
418
  ...r("password", { required: "Password is required" })
419
419
  }
420
420
  ),
421
- s.password && /* @__PURE__ */ d.jsx("span", { className: "text-error text-sm", children: s.password.message }),
422
- /* @__PURE__ */ d.jsx(
421
+ s.password && /* @__PURE__ */ c.jsx("span", { className: "text-error text-sm", children: s.password.message }),
422
+ /* @__PURE__ */ c.jsx(
423
423
  "button",
424
424
  {
425
425
  type: "submit",
@@ -430,12 +430,12 @@ function kr() {
430
430
  )
431
431
  ] })
432
432
  ] }),
433
- o && f && /* @__PURE__ */ d.jsx(f, { text: "Sign in with Google" }),
434
- /* @__PURE__ */ d.jsx("div", { className: "divider" }),
435
- /* @__PURE__ */ d.jsxs("div", { className: "join w-full justify-center", children: [
436
- /* @__PURE__ */ d.jsx(qe, { className: "btn join-item", to: "/", children: "Home" }),
437
- /* @__PURE__ */ d.jsx(
438
- qe,
433
+ o && f && /* @__PURE__ */ c.jsx(f, { text: "Sign in with Google" }),
434
+ /* @__PURE__ */ c.jsx("div", { className: "divider" }),
435
+ /* @__PURE__ */ c.jsxs("div", { className: "join w-full justify-center", children: [
436
+ /* @__PURE__ */ c.jsx(ge, { className: "btn join-item", to: "/", children: "Home" }),
437
+ /* @__PURE__ */ c.jsx(
438
+ ge,
439
439
  {
440
440
  className: "btn join-item",
441
441
  to: "/signup",
@@ -443,18 +443,18 @@ function kr() {
443
443
  children: "Create Account"
444
444
  }
445
445
  ),
446
- /* @__PURE__ */ d.jsx(qe, { className: "btn join-item", to: "/forgot-password", children: "Forgot password" })
446
+ /* @__PURE__ */ c.jsx(ge, { className: "btn join-item", to: "/forgot-password", children: "Forgot password" })
447
447
  ] })
448
448
  ] });
449
449
  }
450
- function jr() {
451
- const r = be(), { useTokenRefresh: e } = te(), t = e?.();
452
- return $e(() => {
450
+ function Nr() {
451
+ const r = we(), { useTokenRefresh: e } = te(), t = e?.();
452
+ return Ze(() => {
453
453
  t?.mutateAsync?.().finally(() => r("/"));
454
- }, [r, t]), /* @__PURE__ */ d.jsx("div", { children: "Processing OAuth callback..." });
454
+ }, [r, t]), /* @__PURE__ */ c.jsx("div", { children: "Processing OAuth callback..." });
455
455
  }
456
- function Nr() {
457
- const { register: r, handleSubmit: e } = Pe({
456
+ function Er() {
457
+ const { register: r, handleSubmit: e } = Ie({
458
458
  defaultValues: { email: "" }
459
459
  }), { useResendConfirmationEmail: t } = te(), s = t(), n = async (a) => {
460
460
  try {
@@ -462,112 +462,195 @@ function Nr() {
462
462
  } catch {
463
463
  }
464
464
  };
465
- return /* @__PURE__ */ d.jsxs(oe, { children: [
466
- /* @__PURE__ */ d.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Resend Confirmation" }),
467
- /* @__PURE__ */ d.jsxs("form", { onSubmit: e(n), children: [
468
- /* @__PURE__ */ d.jsx("label", { className: "label", children: "Email" }),
469
- /* @__PURE__ */ d.jsx(
465
+ return /* @__PURE__ */ c.jsxs(oe, { children: [
466
+ /* @__PURE__ */ c.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Resend Confirmation" }),
467
+ /* @__PURE__ */ c.jsxs("form", { onSubmit: e(n), children: [
468
+ /* @__PURE__ */ c.jsx("label", { className: "label", children: "Email" }),
469
+ /* @__PURE__ */ c.jsx(
470
470
  "input",
471
471
  {
472
472
  className: "input input-bordered w-full",
473
473
  ...r("email", { required: !0 })
474
474
  }
475
475
  ),
476
- /* @__PURE__ */ d.jsx("button", { className: "btn btn-primary mt-4", children: "Resend" })
476
+ /* @__PURE__ */ c.jsx("button", { className: "btn btn-primary mt-4", children: "Resend" })
477
477
  ] })
478
478
  ] });
479
479
  }
480
- function Er() {
481
- const { register: r, handleSubmit: e } = Pe({ defaultValues: { token: "", password: "" } }), { useResetPassword: t } = te(), s = t(), n = be(), [a] = We(), c = a.get("token") || void 0, u = async (i) => {
480
+ function Cr() {
481
+ const { register: r, handleSubmit: e } = Ie({ defaultValues: { token: "", password: "" } }), { useResetPassword: t } = te(), s = t(), n = we(), [a] = Ye(), d = a.get("token") || void 0, u = async (i) => {
482
482
  try {
483
483
  await s.mutateAsync(i), n("/");
484
484
  } catch {
485
485
  }
486
486
  };
487
- return /* @__PURE__ */ d.jsxs(oe, { children: [
488
- /* @__PURE__ */ d.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Reset Password" }),
489
- /* @__PURE__ */ d.jsxs("form", { onSubmit: e(u), children: [
490
- /* @__PURE__ */ d.jsx(
487
+ return /* @__PURE__ */ c.jsxs(oe, { children: [
488
+ /* @__PURE__ */ c.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Reset Password" }),
489
+ /* @__PURE__ */ c.jsxs("form", { onSubmit: e(u), children: [
490
+ /* @__PURE__ */ c.jsx(
491
491
  "input",
492
492
  {
493
493
  type: "hidden",
494
494
  ...r("token"),
495
- defaultValue: c
495
+ defaultValue: d
496
496
  }
497
497
  ),
498
- /* @__PURE__ */ d.jsx("label", { className: "label", children: "New password" }),
499
- /* @__PURE__ */ d.jsx(
498
+ /* @__PURE__ */ c.jsx("label", { className: "label", children: "New password" }),
499
+ /* @__PURE__ */ c.jsx(
500
500
  "input",
501
501
  {
502
502
  className: "input input-bordered w-full",
503
503
  ...r("password", { required: !0 })
504
504
  }
505
505
  ),
506
- /* @__PURE__ */ d.jsx("button", { className: "btn btn-primary mt-4", children: "Reset" })
506
+ /* @__PURE__ */ c.jsx("button", { className: "btn btn-primary mt-4", children: "Reset" })
507
507
  ] })
508
508
  ] });
509
509
  }
510
- function Cr() {
511
- const { register: r, handleSubmit: e, setError: t } = Pe({ defaultValues: { email: "", password: "", name: "" } }), { useRegisterUser: s } = te(), n = s(), a = be(), c = async (u) => {
510
+ function Sr({ redirectUrl: r = "" }) {
511
+ const {
512
+ register: e,
513
+ handleSubmit: t,
514
+ setError: s,
515
+ watch: n,
516
+ formState: { errors: a, isSubmitting: d }
517
+ } = Ie({
518
+ defaultValues: { name: "", email: "", password: "", confirmPassword: "" }
519
+ }), u = we(), i = !1, { useRegisterUser: o } = te(), l = o(), [f, h] = qe(null), p = async (y) => {
520
+ if (h(null), y.password !== y.confirmPassword) {
521
+ s("confirmPassword", {
522
+ type: "manual",
523
+ message: "Passwords do not match"
524
+ });
525
+ return;
526
+ }
512
527
  try {
513
- await n.mutateAsync(u, t), a("/");
514
- } catch (i) {
515
- lt(
516
- i?.response?.data ?? i,
517
- t,
518
- "Failed to register"
519
- );
528
+ await l.mutateAsync(y, s), u("/confirm-email", { state: { email: y.email } });
529
+ } catch (w) {
530
+ lt(w, s, "Failed to register account", !1);
520
531
  }
521
532
  };
522
- return /* @__PURE__ */ d.jsxs(oe, { children: [
523
- /* @__PURE__ */ d.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Create account" }),
524
- /* @__PURE__ */ d.jsxs("form", { onSubmit: e(c), children: [
525
- /* @__PURE__ */ d.jsx("label", { className: "label", children: "Name" }),
526
- /* @__PURE__ */ d.jsx("input", { className: "input input-bordered w-full", ...r("name") }),
527
- /* @__PURE__ */ d.jsx("label", { className: "label", children: "Email" }),
528
- /* @__PURE__ */ d.jsx(
533
+ return /* @__PURE__ */ c.jsxs(oe, { children: [
534
+ /* @__PURE__ */ c.jsxs("h2", { className: "card-title text-2xl mb-4", children: [
535
+ /* @__PURE__ */ c.jsx(Qe, { icon: mr, className: "text-primary mr-2" }),
536
+ "Sign Up"
537
+ ] }),
538
+ f && /* @__PURE__ */ c.jsx("div", { role: "alert", className: "alert alert-warning alert-soft mb-4", children: /* @__PURE__ */ c.jsx("span", { children: f }) }),
539
+ /* @__PURE__ */ c.jsx("form", { onSubmit: t(p), children: /* @__PURE__ */ c.jsxs("fieldset", { className: "fieldset", children: [
540
+ /* @__PURE__ */ c.jsx("legend", { className: "fieldset-legend", children: "Account Details" }),
541
+ /* @__PURE__ */ c.jsx("label", { className: "label", htmlFor: "signup-name", children: /* @__PURE__ */ c.jsx("span", { className: "label-text", children: "Name" }) }),
542
+ /* @__PURE__ */ c.jsx(
529
543
  "input",
530
544
  {
531
- className: "input input-bordered w-full",
532
- ...r("email", { required: !0 })
545
+ id: "signup-name",
546
+ type: "text",
547
+ placeholder: "Your Name",
548
+ className: `input input-bordered w-full ${a.name ? "input-error" : ""}`,
549
+ ...e("name", {
550
+ required: "Name is required",
551
+ minLength: {
552
+ value: 2,
553
+ message: "Name must be at least 2 characters"
554
+ }
555
+ })
533
556
  }
534
557
  ),
535
- /* @__PURE__ */ d.jsx("label", { className: "label", children: "Password" }),
536
- /* @__PURE__ */ d.jsx(
558
+ a.name && /* @__PURE__ */ c.jsx("span", { className: "text-error text-sm", children: a.name.message }),
559
+ /* @__PURE__ */ c.jsx("label", { className: "label", htmlFor: "signup-email", children: /* @__PURE__ */ c.jsx("span", { className: "label-text", children: "Email" }) }),
560
+ /* @__PURE__ */ c.jsx(
537
561
  "input",
538
562
  {
539
- className: "input input-bordered w-full",
540
- ...r("password", { required: !0 })
563
+ id: "signup-email",
564
+ type: "email",
565
+ placeholder: "email@example.com",
566
+ className: `input input-bordered w-full ${a.email ? "input-error" : ""}`,
567
+ ...e("email", {
568
+ required: "Email is required",
569
+ pattern: {
570
+ value: /^[^@\s]+@[^@\s]+\.[^@\s]+$/,
571
+ message: "Invalid email address"
572
+ }
573
+ })
574
+ }
575
+ ),
576
+ a.email && /* @__PURE__ */ c.jsx("span", { className: "text-error text-sm", children: a.email.message }),
577
+ /* @__PURE__ */ c.jsx("label", { className: "label", htmlFor: "signup-password", children: /* @__PURE__ */ c.jsx("span", { className: "label-text", children: "Password" }) }),
578
+ /* @__PURE__ */ c.jsx(
579
+ "input",
580
+ {
581
+ id: "signup-password",
582
+ type: "password",
583
+ placeholder: "••••••••",
584
+ className: `input input-bordered w-full ${a.password ? "input-error" : ""}`,
585
+ ...e("password", {
586
+ required: "Password is required",
587
+ minLength: {
588
+ value: 6,
589
+ message: "Password must be at least 6 characters"
590
+ }
591
+ })
541
592
  }
542
593
  ),
543
- /* @__PURE__ */ d.jsx("button", { className: "btn btn-primary mt-4", children: "Sign up" })
594
+ a.password && /* @__PURE__ */ c.jsx("span", { className: "text-error text-sm", children: a.password.message }),
595
+ /* @__PURE__ */ c.jsx("label", { className: "label", htmlFor: "signup-confirm", children: /* @__PURE__ */ c.jsx("span", { className: "label-text", children: "Confirm Password" }) }),
596
+ /* @__PURE__ */ c.jsx(
597
+ "input",
598
+ {
599
+ id: "signup-confirm",
600
+ type: "password",
601
+ placeholder: "Confirm password",
602
+ className: `input input-bordered w-full ${a.confirmPassword ? "input-error" : ""}`,
603
+ ...e("confirmPassword", {
604
+ required: "Please confirm password",
605
+ validate: (y) => y === n("password") || "Passwords do not match"
606
+ })
607
+ }
608
+ ),
609
+ a.confirmPassword && /* @__PURE__ */ c.jsx("span", { className: "text-error text-sm", children: a.confirmPassword.message }),
610
+ /* @__PURE__ */ c.jsx(
611
+ "button",
612
+ {
613
+ type: "submit",
614
+ className: "btn btn-primary w-full mt-4",
615
+ disabled: d || !1,
616
+ children: d ? "Creating Account…" : "Sign Up"
617
+ }
618
+ )
619
+ ] }) }),
620
+ i,
621
+ !1,
622
+ /* @__PURE__ */ c.jsx("div", { className: "divider" }),
623
+ /* @__PURE__ */ c.jsxs("div", { className: "join w-full justify-center", children: [
624
+ /* @__PURE__ */ c.jsx(ge, { className: "btn join-item", to: "/", children: "Home" }),
625
+ /* @__PURE__ */ c.jsx(ge, { to: "/login", className: "btn join-item", children: "Login" }),
626
+ /* @__PURE__ */ c.jsx(ge, { to: "/forgot-password", className: "btn join-item", children: "Forgot Password" })
544
627
  ] })
545
628
  ] });
546
629
  }
547
- function Sr() {
548
- const r = be(), [e] = We(), { useVerifyEmail: t } = te(), s = t(), n = e.get("token"), a = async () => {
630
+ function Rr() {
631
+ const r = we(), [e] = Ye(), { useVerifyEmail: t } = te(), s = t(), n = e.get("token"), a = async () => {
549
632
  try {
550
633
  n && await s.mutateAsync(n), r("/");
551
634
  } catch {
552
635
  }
553
636
  };
554
- return /* @__PURE__ */ d.jsxs(oe, { children: [
555
- /* @__PURE__ */ d.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Verify Email" }),
556
- /* @__PURE__ */ d.jsx("button", { className: "btn btn-primary", onClick: a, children: "Verify" })
637
+ return /* @__PURE__ */ c.jsxs(oe, { children: [
638
+ /* @__PURE__ */ c.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Verify Email" }),
639
+ /* @__PURE__ */ c.jsx("button", { className: "btn btn-primary", onClick: a, children: "Verify" })
557
640
  ] });
558
641
  }
559
- const Js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
642
+ const Xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
560
643
  __proto__: null,
561
644
  AuthLayout: oe,
562
- AuthProvider: xr,
563
- ConfirmEmail: br,
564
- ForgotPassword: wr,
565
- Login: kr,
566
- OAuthCallback: jr,
567
- ResendConfirmation: Nr,
568
- Reset: Er,
569
- SignUp: Cr,
570
- Verify: Sr,
645
+ AuthProvider: br,
646
+ ConfirmEmail: wr,
647
+ ForgotPassword: kr,
648
+ Login: jr,
649
+ OAuthCallback: Nr,
650
+ ResendConfirmation: Er,
651
+ Reset: Cr,
652
+ SignUp: Sr,
653
+ Verify: Rr,
571
654
  handleFormError: lt,
572
655
  redirectToOrigin: Lt,
573
656
  useAuthApi: te,
@@ -577,21 +660,21 @@ function $t({
577
660
  title: r,
578
661
  children: e
579
662
  }) {
580
- return /* @__PURE__ */ d.jsxs("div", { className: "p-6", children: [
581
- /* @__PURE__ */ d.jsx("div", { className: "mb-6", children: /* @__PURE__ */ d.jsx("div", { className: "text-2xl font-bold", children: r }) }),
582
- /* @__PURE__ */ d.jsx("div", { children: e })
663
+ return /* @__PURE__ */ c.jsxs("div", { className: "p-6", children: [
664
+ /* @__PURE__ */ c.jsx("div", { className: "mb-6", children: /* @__PURE__ */ c.jsx("div", { className: "text-2xl font-bold", children: r }) }),
665
+ /* @__PURE__ */ c.jsx("div", { children: e })
583
666
  ] });
584
667
  }
585
- function Rr({
668
+ function Ar({
586
669
  icon: r,
587
670
  title: e,
588
671
  message: t,
589
672
  action: s
590
673
  }) {
591
- return /* @__PURE__ */ d.jsx("div", { className: "min-h-screen flex items-center justify-center bg-gradient-to-br from-primary/10 to-secondary/10", children: /* @__PURE__ */ d.jsx("div", { className: "card bg-base-100 shadow-soft hover:shadow-medium transition-shadow border border-base-300 w-full max-w-md mx-4", children: /* @__PURE__ */ d.jsxs("div", { className: "card-body p-8", children: [
592
- /* @__PURE__ */ d.jsxs("h2", { className: "card-title text-2xl mb-4", children: [
593
- r && /* @__PURE__ */ d.jsx(
594
- it,
674
+ return /* @__PURE__ */ c.jsx("div", { className: "min-h-screen flex items-center justify-center bg-gradient-to-br from-primary/10 to-secondary/10", children: /* @__PURE__ */ c.jsx("div", { className: "card bg-base-100 shadow-soft hover:shadow-medium transition-shadow border border-base-300 w-full max-w-md mx-4", children: /* @__PURE__ */ c.jsxs("div", { className: "card-body p-8", children: [
675
+ /* @__PURE__ */ c.jsxs("h2", { className: "card-title text-2xl mb-4", children: [
676
+ r && /* @__PURE__ */ c.jsx(
677
+ Qe,
595
678
  {
596
679
  icon: r,
597
680
  className: "text-neutral-content-300 mb-4"
@@ -599,18 +682,18 @@ function Rr({
599
682
  ),
600
683
  e
601
684
  ] }),
602
- /* @__PURE__ */ d.jsx("div", { className: "mt-4 text-sm text-center", children: t }),
603
- s && /* @__PURE__ */ d.jsx("div", { children: s })
685
+ /* @__PURE__ */ c.jsx("div", { className: "mt-4 text-sm text-center", children: t }),
686
+ s && /* @__PURE__ */ c.jsx("div", { children: s })
604
687
  ] }) }) });
605
688
  }
606
- function Ar({
689
+ function Tr({
607
690
  isOpen: r,
608
691
  title: e,
609
692
  handleSubmit: t,
610
693
  isSubmitting: s,
611
694
  isSaving: n = !1,
612
695
  uploadProgress: a,
613
- onSave: c,
696
+ onSave: d,
614
697
  onClose: u,
615
698
  onCancel: i,
616
699
  children: o,
@@ -621,26 +704,26 @@ function Ar({
621
704
  if (!r) return null;
622
705
  const p = s || n, y = () => {
623
706
  p || (i && i(), u());
624
- }, k = `max-w-${l}`;
625
- return /* @__PURE__ */ d.jsx("div", { className: "modal modal-open", onClick: y, children: /* @__PURE__ */ d.jsxs(
707
+ }, w = `max-w-${l}`;
708
+ return /* @__PURE__ */ c.jsx("div", { className: "modal modal-open", onClick: y, children: /* @__PURE__ */ c.jsxs(
626
709
  "div",
627
710
  {
628
- className: `modal-box ${k}`,
711
+ className: `modal-box ${w}`,
629
712
  onClick: (x) => x.stopPropagation(),
630
713
  children: [
631
- /* @__PURE__ */ d.jsxs("h3", { className: "font-bold text-lg mb-4", children: [
714
+ /* @__PURE__ */ c.jsxs("h3", { className: "font-bold text-lg mb-4", children: [
632
715
  e,
633
- p && /* @__PURE__ */ d.jsx("span", { className: "loading loading-spinner loading-xs ml-2" })
716
+ p && /* @__PURE__ */ c.jsx("span", { className: "loading loading-spinner loading-xs ml-2" })
634
717
  ] }),
635
- a !== void 0 && a > 0 && a < 100 && /* @__PURE__ */ d.jsxs("div", { className: "mb-4", children: [
636
- /* @__PURE__ */ d.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
637
- /* @__PURE__ */ d.jsx("span", { className: "text-sm", children: "Uploading..." }),
638
- /* @__PURE__ */ d.jsxs("span", { className: "text-sm font-semibold", children: [
718
+ a !== void 0 && a > 0 && a < 100 && /* @__PURE__ */ c.jsxs("div", { className: "mb-4", children: [
719
+ /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
720
+ /* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "Uploading..." }),
721
+ /* @__PURE__ */ c.jsxs("span", { className: "text-sm font-semibold", children: [
639
722
  a,
640
723
  "%"
641
724
  ] })
642
725
  ] }),
643
- /* @__PURE__ */ d.jsx(
726
+ /* @__PURE__ */ c.jsx(
644
727
  "progress",
645
728
  {
646
729
  className: "progress progress-primary w-full",
@@ -649,10 +732,10 @@ function Ar({
649
732
  }
650
733
  )
651
734
  ] }),
652
- /* @__PURE__ */ d.jsxs("form", { onSubmit: t((x) => c(x, { onClose: u })), children: [
735
+ /* @__PURE__ */ c.jsxs("form", { onSubmit: t((x) => d(x, { onClose: u })), children: [
653
736
  o,
654
- /* @__PURE__ */ d.jsxs("div", { className: "modal-action", children: [
655
- /* @__PURE__ */ d.jsx(
737
+ /* @__PURE__ */ c.jsxs("div", { className: "modal-action", children: [
738
+ /* @__PURE__ */ c.jsx(
656
739
  "button",
657
740
  {
658
741
  type: "button",
@@ -662,14 +745,14 @@ function Ar({
662
745
  children: h
663
746
  }
664
747
  ),
665
- /* @__PURE__ */ d.jsxs(
748
+ /* @__PURE__ */ c.jsxs(
666
749
  "button",
667
750
  {
668
751
  type: "submit",
669
752
  className: "btn btn-primary",
670
753
  disabled: p,
671
754
  children: [
672
- p && /* @__PURE__ */ d.jsx("span", { className: "loading loading-spinner loading-xs" }),
755
+ p && /* @__PURE__ */ c.jsx("span", { className: "loading loading-spinner loading-xs" }),
673
756
  f
674
757
  ]
675
758
  }
@@ -680,238 +763,238 @@ function Ar({
680
763
  }
681
764
  ) });
682
765
  }
683
- var Tr = typeof global == "object" && global && global.Object === Object && global, Or = typeof self == "object" && self && self.Object === Object && self, Zt = Tr || Or || Function("return this")(), Ze = Zt.Symbol, Dt = Object.prototype, Pr = Dt.hasOwnProperty, Ir = Dt.toString, Se = Ze ? Ze.toStringTag : void 0;
684
- function Mr(r) {
685
- var e = Pr.call(r, Se), t = r[Se];
766
+ function Zt({
767
+ page: r,
768
+ perPage: e,
769
+ total: t,
770
+ onPageChange: s,
771
+ className: n = "",
772
+ visiblePages: a = 5
773
+ }) {
774
+ const d = Math.max(1, Math.ceil(t / e));
775
+ if (d <= 1) return null;
776
+ const u = (p) => {
777
+ p !== r && p >= 1 && p <= d && s(p);
778
+ }, i = (p) => /* @__PURE__ */ c.jsx(
779
+ "button",
780
+ {
781
+ className: `join-item btn ${p === r ? "btn-active" : ""}`,
782
+ onClick: () => u(p),
783
+ children: p
784
+ },
785
+ p
786
+ ), o = Math.max(1, Math.min(a, d));
787
+ let l = r - Math.floor(o / 2);
788
+ l < 1 && (l = 1);
789
+ let f = l + o - 1;
790
+ f > d && (f = d, l = Math.max(1, f - o + 1));
791
+ const h = [];
792
+ for (let p = l; p <= f; p++) h.push(p);
793
+ return /* @__PURE__ */ c.jsx("div", { className: `flex justify-center ${n}`, children: /* @__PURE__ */ c.jsxs("div", { className: "join", children: [
794
+ /* @__PURE__ */ c.jsx(
795
+ "button",
796
+ {
797
+ className: "join-item btn",
798
+ disabled: r === 1,
799
+ onClick: () => u(r - 1),
800
+ children: "«"
801
+ }
802
+ ),
803
+ h.map((p) => i(p)),
804
+ /* @__PURE__ */ c.jsx(
805
+ "button",
806
+ {
807
+ className: "join-item btn",
808
+ disabled: r === d,
809
+ onClick: () => u(r + 1),
810
+ children: "»"
811
+ }
812
+ )
813
+ ] }) });
814
+ }
815
+ function Ks(r, e) {
816
+ const t = e?.defaultPage ?? 1, s = e?.defaultPerPage ?? 25, n = {};
817
+ r.page !== void 0 && r.page !== null && r.page !== t && (n.page = Number(r.page)), r.per_page !== void 0 && r.per_page !== null && r.per_page !== s && (n.per_page = Number(r.per_page));
818
+ const a = {};
819
+ r.sort_by && (a.sort_by = String(r.sort_by)), r.sort_order && (a.sort_order = String(r.sort_order));
820
+ const d = r.q ?? r.q, u = {};
821
+ return Object.keys(n).length && (u.pagination = n), d != null && String(d) !== "" && (u.q = d), Object.keys(a).length && (u.sort = a), u;
822
+ }
823
+ function ht(r, e) {
824
+ const t = {};
825
+ for (const [s, n] of r.entries())
826
+ t[s] = n;
827
+ return t;
828
+ }
829
+ function $e(r) {
830
+ const e = new URLSearchParams();
831
+ return Object.entries(r || {}).forEach(([t, s]) => {
832
+ s != null && e.set(t, String(s));
833
+ }), e;
834
+ }
835
+ var Or = typeof global == "object" && global && global.Object === Object && global, Pr = typeof self == "object" && self && self.Object === Object && self, Dt = Or || Pr || Function("return this")(), De = Dt.Symbol, Ft = Object.prototype, Ir = Ft.hasOwnProperty, Mr = Ft.toString, Re = De ? De.toStringTag : void 0;
836
+ function Lr(r) {
837
+ var e = Ir.call(r, Re), t = r[Re];
686
838
  try {
687
- r[Se] = void 0;
839
+ r[Re] = void 0;
688
840
  var s = !0;
689
841
  } catch {
690
842
  }
691
- var n = Ir.call(r);
692
- return s && (e ? r[Se] = t : delete r[Se]), n;
843
+ var n = Mr.call(r);
844
+ return s && (e ? r[Re] = t : delete r[Re]), n;
693
845
  }
694
- var Lr = Object.prototype, $r = Lr.toString;
695
- function Zr(r) {
696
- return $r.call(r);
846
+ var $r = Object.prototype, Zr = $r.toString;
847
+ function Dr(r) {
848
+ return Zr.call(r);
697
849
  }
698
- var Dr = "[object Null]", zr = "[object Undefined]", ht = Ze ? Ze.toStringTag : void 0;
699
- function Fr(r) {
700
- return r == null ? r === void 0 ? zr : Dr : ht && ht in Object(r) ? Mr(r) : Zr(r);
850
+ var Fr = "[object Null]", zr = "[object Undefined]", mt = De ? De.toStringTag : void 0;
851
+ function Ur(r) {
852
+ return r == null ? r === void 0 ? zr : Fr : mt && mt in Object(r) ? Lr(r) : Dr(r);
701
853
  }
702
854
  function Vr(r) {
703
855
  return r != null && typeof r == "object";
704
856
  }
705
- var Ur = "[object Symbol]";
706
- function Br(r) {
707
- return typeof r == "symbol" || Vr(r) && Fr(r) == Ur;
857
+ var Br = "[object Symbol]";
858
+ function Wr(r) {
859
+ return typeof r == "symbol" || Vr(r) && Ur(r) == Br;
708
860
  }
709
- var Wr = /\s/;
861
+ var qr = /\s/;
710
862
  function Yr(r) {
711
- for (var e = r.length; e-- && Wr.test(r.charAt(e)); )
863
+ for (var e = r.length; e-- && qr.test(r.charAt(e)); )
712
864
  ;
713
865
  return e;
714
866
  }
715
867
  var Qr = /^\s+/;
716
- function qr(r) {
868
+ function Hr(r) {
717
869
  return r && r.slice(0, Yr(r) + 1).replace(Qr, "");
718
870
  }
719
- function Je(r) {
871
+ function Ke(r) {
720
872
  var e = typeof r;
721
873
  return r != null && (e == "object" || e == "function");
722
874
  }
723
- var mt = NaN, Hr = /^[-+]0x[0-9a-f]+$/i, Gr = /^0b[01]+$/i, Jr = /^0o[0-7]+$/i, Xr = parseInt;
724
- function pt(r) {
875
+ var pt = NaN, Gr = /^[-+]0x[0-9a-f]+$/i, Jr = /^0b[01]+$/i, Xr = /^0o[0-7]+$/i, Kr = parseInt;
876
+ function gt(r) {
725
877
  if (typeof r == "number")
726
878
  return r;
727
- if (Br(r))
728
- return mt;
729
- if (Je(r)) {
879
+ if (Wr(r))
880
+ return pt;
881
+ if (Ke(r)) {
730
882
  var e = typeof r.valueOf == "function" ? r.valueOf() : r;
731
- r = Je(e) ? e + "" : e;
883
+ r = Ke(e) ? e + "" : e;
732
884
  }
733
885
  if (typeof r != "string")
734
886
  return r === 0 ? r : +r;
735
- r = qr(r);
736
- var t = Gr.test(r);
737
- return t || Jr.test(r) ? Xr(r.slice(2), t ? 2 : 8) : Hr.test(r) ? mt : +r;
887
+ r = Hr(r);
888
+ var t = Jr.test(r);
889
+ return t || Xr.test(r) ? Kr(r.slice(2), t ? 2 : 8) : Gr.test(r) ? pt : +r;
738
890
  }
739
- var He = function() {
740
- return Zt.Date.now();
741
- }, Kr = "Expected a function", es = Math.max, ts = Math.min;
742
- function rs(r, e, t) {
743
- var s, n, a, c, u, i, o = 0, l = !1, f = !1, h = !0;
891
+ var Je = function() {
892
+ return Dt.Date.now();
893
+ }, es = "Expected a function", ts = Math.max, rs = Math.min;
894
+ function ss(r, e, t) {
895
+ var s, n, a, d, u, i, o = 0, l = !1, f = !1, h = !0;
744
896
  if (typeof r != "function")
745
- throw new TypeError(Kr);
746
- e = pt(e) || 0, Je(t) && (l = !!t.leading, f = "maxWait" in t, a = f ? es(pt(t.maxWait) || 0, e) : a, h = "trailing" in t ? !!t.trailing : h);
897
+ throw new TypeError(es);
898
+ e = gt(e) || 0, Ke(t) && (l = !!t.leading, f = "maxWait" in t, a = f ? ts(gt(t.maxWait) || 0, e) : a, h = "trailing" in t ? !!t.trailing : h);
747
899
  function p(O) {
748
900
  var B = s, W = n;
749
- return s = n = void 0, o = O, c = r.apply(W, B), c;
901
+ return s = n = void 0, o = O, d = r.apply(W, B), d;
750
902
  }
751
903
  function y(O) {
752
- return o = O, u = setTimeout(M, e), l ? p(O) : c;
904
+ return o = O, u = setTimeout(M, e), l ? p(O) : d;
753
905
  }
754
- function k(O) {
906
+ function w(O) {
755
907
  var B = O - i, W = O - o, G = e - B;
756
- return f ? ts(G, a - W) : G;
908
+ return f ? rs(G, a - W) : G;
757
909
  }
758
910
  function x(O) {
759
911
  var B = O - i, W = O - o;
760
912
  return i === void 0 || B >= e || B < 0 || f && W >= a;
761
913
  }
762
914
  function M() {
763
- var O = He();
915
+ var O = Je();
764
916
  if (x(O))
765
917
  return R(O);
766
- u = setTimeout(M, k(O));
918
+ u = setTimeout(M, w(O));
767
919
  }
768
920
  function R(O) {
769
- return u = void 0, h && s ? p(O) : (s = n = void 0, c);
921
+ return u = void 0, h && s ? p(O) : (s = n = void 0, d);
770
922
  }
771
- function w() {
923
+ function k() {
772
924
  u !== void 0 && clearTimeout(u), o = 0, s = i = n = u = void 0;
773
925
  }
774
926
  function I() {
775
- return u === void 0 ? c : R(He());
927
+ return u === void 0 ? d : R(Je());
776
928
  }
777
929
  function L() {
778
- var O = He(), B = x(O);
930
+ var O = Je(), B = x(O);
779
931
  if (s = arguments, n = this, i = O, B) {
780
932
  if (u === void 0)
781
933
  return y(i);
782
934
  if (f)
783
935
  return clearTimeout(u), u = setTimeout(M, e), p(i);
784
936
  }
785
- return u === void 0 && (u = setTimeout(M, e)), c;
937
+ return u === void 0 && (u = setTimeout(M, e)), d;
786
938
  }
787
- return L.cancel = w, L.flush = I, L;
788
- }
789
- function Xs(r, e) {
790
- const t = e?.defaultPage ?? 1, s = e?.defaultPerPage ?? 25, n = {};
791
- r.page !== void 0 && r.page !== null && r.page !== t && (n.page = Number(r.page)), r.per_page !== void 0 && r.per_page !== null && r.per_page !== s && (n.per_page = Number(r.per_page));
792
- const a = {};
793
- r.sort_by && (a.sort_by = String(r.sort_by)), r.sort_order && (a.sort_order = String(r.sort_order));
794
- const c = r.q ?? r.q, u = {};
795
- return Object.keys(n).length && (u.pagination = n), c != null && String(c) !== "" && (u.q = c), Object.keys(a).length && (u.sort = a), u;
796
- }
797
- function gt(r, e) {
798
- const t = {};
799
- for (const [s, n] of r.entries())
800
- t[s] = n;
801
- return t;
802
- }
803
- function Le(r) {
804
- const e = new URLSearchParams();
805
- return Object.entries(r || {}).forEach(([t, s]) => {
806
- s != null && e.set(t, String(s));
807
- }), e;
939
+ return L.cancel = k, L.flush = I, L;
808
940
  }
809
941
  function zt({
810
- page: r,
811
- perPage: e,
812
- total: t,
813
- onPageChange: s,
814
- className: n = "",
815
- visiblePages: a = 5
816
- }) {
817
- const c = Math.max(1, Math.ceil(t / e));
818
- if (c <= 1) return null;
819
- const u = (p) => {
820
- p !== r && p >= 1 && p <= c && s(p);
821
- }, i = (p) => /* @__PURE__ */ d.jsx(
822
- "button",
823
- {
824
- className: `join-item btn ${p === r ? "btn-active" : ""}`,
825
- onClick: () => u(p),
826
- children: p
827
- },
828
- p
829
- ), o = Math.max(1, Math.min(a, c));
830
- let l = r - Math.floor(o / 2);
831
- l < 1 && (l = 1);
832
- let f = l + o - 1;
833
- f > c && (f = c, l = Math.max(1, f - o + 1));
834
- const h = [];
835
- for (let p = l; p <= f; p++) h.push(p);
836
- return /* @__PURE__ */ d.jsx("div", { className: `flex justify-center ${n}`, children: /* @__PURE__ */ d.jsxs("div", { className: "join", children: [
837
- /* @__PURE__ */ d.jsx(
838
- "button",
839
- {
840
- className: "join-item btn",
841
- disabled: r === 1,
842
- onClick: () => u(r - 1),
843
- children: "«"
844
- }
845
- ),
846
- h.map((p) => i(p)),
847
- /* @__PURE__ */ d.jsx(
848
- "button",
849
- {
850
- className: "join-item btn",
851
- disabled: r === c,
852
- onClick: () => u(r + 1),
853
- children: "»"
854
- }
855
- )
856
- ] }) });
857
- }
858
- function Ft({
859
942
  title: r,
860
943
  actions: e,
861
944
  paramsSchema: t,
862
945
  useQuery: s,
863
946
  renderFilters: n,
864
947
  columns: a,
865
- emptyMessage: c = "No items found.",
948
+ emptyMessage: d = "No items found.",
866
949
  onRowClick: u,
867
950
  paginationType: i = "pages"
868
951
  }) {
869
- const [o, l] = We(), f = gt(o), { data: h, isLoading: p, raw: y } = s(f), k = y?.metadata?.total ?? 0, x = f.page ?? 1, M = f.per_page ?? 20, [R, w] = at(f), I = cr(f);
870
- $e(() => {
871
- JSON.stringify(f) !== JSON.stringify(I.current) && (w(f), I.current = f);
952
+ const [o, l] = Ye(), f = ht(o), { data: h, isLoading: p, raw: y } = s(f), w = y?.metadata?.total ?? 0, x = f.page ?? 1, M = f.per_page ?? 20, [R, k] = qe(f), I = cr(f);
953
+ Ze(() => {
954
+ JSON.stringify(f) !== JSON.stringify(I.current) && (k(f), I.current = f);
872
955
  }, [f]);
873
956
  const L = dr(
874
- () => rs((P) => {
875
- l(Le(P));
957
+ () => ss((P) => {
958
+ l($e(P));
876
959
  }, 300),
877
960
  [l]
878
961
  );
879
- $e(() => () => L.cancel(), [L]);
880
- const O = (P, Q) => {
881
- const q = {
962
+ Ze(() => () => L.cancel(), [L]);
963
+ const O = (P, Y) => {
964
+ const Q = {
882
965
  ...R,
883
- [P]: Q === "" ? void 0 : Q,
966
+ [P]: Y === "" ? void 0 : Y,
884
967
  // Reset to page 1 when filters change
885
968
  page: 1
886
969
  };
887
- w(q), L(q);
970
+ k(Q), L(Q);
888
971
  }, B = (P) => {
889
- const Q = {
972
+ const Y = {
890
973
  ...R,
891
974
  ...P,
892
975
  // Reset to page 1 when filters change
893
976
  page: 1
894
977
  };
895
- w(Q), L(Q);
978
+ k(Y), L(Y);
896
979
  }, W = () => {
897
- L.cancel(), l(Le(R));
980
+ L.cancel(), l($e(R));
898
981
  }, G = () => {
899
- const P = gt(new URLSearchParams());
900
- w(P), L.cancel(), l(Le(P));
982
+ const P = ht(new URLSearchParams());
983
+ k(P), L.cancel(), l($e(P));
901
984
  }, le = (P) => {
902
- const Q = { ...f, page: P };
903
- l(Le(Q));
904
- }, Y = r || e || n;
905
- return /* @__PURE__ */ d.jsx("div", { className: "card bg-base-100 shadow-xl", children: /* @__PURE__ */ d.jsxs("div", { className: "card-body", children: [
906
- Y && /* @__PURE__ */ d.jsxs("div", { className: "flex flex-col gap-4 mb-4", children: [
907
- /* @__PURE__ */ d.jsxs("div", { className: "flex items-center justify-between", children: [
908
- r && /* @__PURE__ */ d.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ d.jsx("h2", { className: "card-title m-0 text-2xl font-bold", children: r }) }),
909
- e && /* @__PURE__ */ d.jsx("div", { className: "flex items-center gap-3", children: e })
985
+ const Y = { ...f, page: P };
986
+ l($e(Y));
987
+ }, q = r || e || n;
988
+ return /* @__PURE__ */ c.jsx("div", { className: "card bg-base-100 shadow-xl", children: /* @__PURE__ */ c.jsxs("div", { className: "card-body", children: [
989
+ q && /* @__PURE__ */ c.jsxs("div", { className: "flex flex-col gap-4 mb-4", children: [
990
+ /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
991
+ r && /* @__PURE__ */ c.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ c.jsx("h2", { className: "card-title m-0 text-2xl font-bold", children: r }) }),
992
+ e && /* @__PURE__ */ c.jsx("div", { className: "flex items-center gap-3", children: e })
910
993
  ] }),
911
- n && /* @__PURE__ */ d.jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2 bg-base-200/50 p-2 rounded-lg w-full", children: [
912
- /* @__PURE__ */ d.jsx("div", { className: "flex flex-wrap gap-2 justify-end flex-1", children: n(R, O) }),
913
- /* @__PURE__ */ d.jsxs("div", { className: "join", children: [
914
- /* @__PURE__ */ d.jsx(
994
+ n && /* @__PURE__ */ c.jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2 bg-base-200/50 p-2 rounded-lg w-full", children: [
995
+ /* @__PURE__ */ c.jsx("div", { className: "flex flex-wrap gap-2 justify-end flex-1", children: n(R, O) }),
996
+ /* @__PURE__ */ c.jsxs("div", { className: "join", children: [
997
+ /* @__PURE__ */ c.jsx(
915
998
  "button",
916
999
  {
917
1000
  className: "join-item btn btn-sm btn-neutral",
@@ -919,7 +1002,7 @@ function Ft({
919
1002
  children: "Search"
920
1003
  }
921
1004
  ),
922
- /* @__PURE__ */ d.jsx(
1005
+ /* @__PURE__ */ c.jsx(
923
1006
  "button",
924
1007
  {
925
1008
  className: "join-item btn btn-sm btn-ghost border-base-300",
@@ -930,59 +1013,59 @@ function Ft({
930
1013
  ] })
931
1014
  ] })
932
1015
  ] }),
933
- p ? /* @__PURE__ */ d.jsx("div", { className: "flex justify-center items-center py-10", children: /* @__PURE__ */ d.jsx("span", { className: "loading loading-spinner loading-lg" }) }) : h.length === 0 ? /* @__PURE__ */ d.jsx("div", { className: "text-center py-8", children: c }) : /* @__PURE__ */ d.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ d.jsxs("table", { className: "table table-zebra w-full", children: [
934
- /* @__PURE__ */ d.jsx("thead", { children: /* @__PURE__ */ d.jsx("tr", { children: a.map((P) => /* @__PURE__ */ d.jsx("th", { className: P.className, children: typeof P.header == "function" ? P.header(f, O, B) : P.header }, P.key)) }) }),
935
- /* @__PURE__ */ d.jsx("tbody", { children: h.map((P, Q) => {
936
- const q = P.id !== void 0 ? String(P.id) : `row-${Q}`;
937
- return /* @__PURE__ */ d.jsx(
1016
+ p ? /* @__PURE__ */ c.jsx("div", { className: "flex justify-center items-center py-10", children: /* @__PURE__ */ c.jsx("span", { className: "loading loading-spinner loading-lg" }) }) : h.length === 0 ? /* @__PURE__ */ c.jsx("div", { className: "text-center py-8", children: d }) : /* @__PURE__ */ c.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ c.jsxs("table", { className: "table table-zebra w-full", children: [
1017
+ /* @__PURE__ */ c.jsx("thead", { children: /* @__PURE__ */ c.jsx("tr", { children: a.map((P) => /* @__PURE__ */ c.jsx("th", { className: P.className, children: typeof P.header == "function" ? P.header(f, O, B) : P.header }, P.key)) }) }),
1018
+ /* @__PURE__ */ c.jsx("tbody", { children: h.map((P, Y) => {
1019
+ const Q = P.id !== void 0 ? String(P.id) : `row-${Y}`;
1020
+ return /* @__PURE__ */ c.jsx(
938
1021
  "tr",
939
1022
  {
940
1023
  className: u ? "cursor-pointer hover:bg-base-200" : "",
941
1024
  onClick: () => u?.(P),
942
- children: a.map((V) => /* @__PURE__ */ d.jsx(
1025
+ children: a.map((U) => /* @__PURE__ */ c.jsx(
943
1026
  "td",
944
1027
  {
945
- className: V.className,
946
- children: V.render ? V.render(P) : P[V.key]
1028
+ className: U.className,
1029
+ children: U.render ? U.render(P) : P[U.key]
947
1030
  },
948
- `${q}-${V.key}`
1031
+ `${Q}-${U.key}`
949
1032
  ))
950
1033
  },
951
- q
1034
+ Q
952
1035
  );
953
1036
  }) })
954
1037
  ] }) }),
955
- i !== "none" && /* @__PURE__ */ d.jsx("div", { className: "mt-4", children: /* @__PURE__ */ d.jsx(
956
- zt,
1038
+ i !== "none" && /* @__PURE__ */ c.jsx("div", { className: "mt-4", children: /* @__PURE__ */ c.jsx(
1039
+ Zt,
957
1040
  {
958
1041
  page: x,
959
1042
  perPage: M,
960
- total: k,
1043
+ total: w,
961
1044
  onPageChange: le
962
1045
  }
963
1046
  ) })
964
1047
  ] }) });
965
1048
  }
966
- function ss({
1049
+ function ns({
967
1050
  errors: r,
968
1051
  className: e = ""
969
1052
  }) {
970
- return !Array.isArray(r) || r.length === 0 ? null : /* @__PURE__ */ d.jsx("div", { className: `alert alert-error mb-4 ${e}`.trim(), children: /* @__PURE__ */ d.jsx("ul", { className: "list-disc list-inside", children: r.map((t, s) => /* @__PURE__ */ d.jsx("li", { children: t }, s)) }) });
1053
+ return !Array.isArray(r) || r.length === 0 ? null : /* @__PURE__ */ c.jsx("div", { className: `alert alert-error mb-4 ${e}`.trim(), children: /* @__PURE__ */ c.jsx("ul", { className: "list-disc list-inside", children: r.map((t, s) => /* @__PURE__ */ c.jsx("li", { children: t }, s)) }) });
971
1054
  }
972
- var ns = Object.defineProperty, De = Object.getOwnPropertySymbols, Vt = Object.prototype.hasOwnProperty, Ut = Object.prototype.propertyIsEnumerable, yt = (r, e, t) => e in r ? ns(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Xe = (r, e) => {
1055
+ var as = Object.defineProperty, Fe = Object.getOwnPropertySymbols, Ut = Object.prototype.hasOwnProperty, Vt = Object.prototype.propertyIsEnumerable, yt = (r, e, t) => e in r ? as(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, et = (r, e) => {
973
1056
  for (var t in e || (e = {}))
974
- Vt.call(e, t) && yt(r, t, e[t]);
975
- if (De)
976
- for (var t of De(e))
977
- Ut.call(e, t) && yt(r, t, e[t]);
1057
+ Ut.call(e, t) && yt(r, t, e[t]);
1058
+ if (Fe)
1059
+ for (var t of Fe(e))
1060
+ Vt.call(e, t) && yt(r, t, e[t]);
978
1061
  return r;
979
- }, Ke = (r, e) => {
1062
+ }, tt = (r, e) => {
980
1063
  var t = {};
981
1064
  for (var s in r)
982
- Vt.call(r, s) && e.indexOf(s) < 0 && (t[s] = r[s]);
983
- if (r != null && De)
984
- for (var s of De(r))
985
- e.indexOf(s) < 0 && Ut.call(r, s) && (t[s] = r[s]);
1065
+ Ut.call(r, s) && e.indexOf(s) < 0 && (t[s] = r[s]);
1066
+ if (r != null && Fe)
1067
+ for (var s of Fe(r))
1068
+ e.indexOf(s) < 0 && Vt.call(r, s) && (t[s] = r[s]);
986
1069
  return t;
987
1070
  };
988
1071
  var ce;
@@ -1008,10 +1091,10 @@ var ce;
1008
1091
  const p = this.addEccAndInterleave(l);
1009
1092
  if (this.drawCodewords(p), f == -1) {
1010
1093
  let y = 1e9;
1011
- for (let k = 0; k < 8; k++) {
1012
- this.applyMask(k), this.drawFormatBits(k);
1094
+ for (let w = 0; w < 8; w++) {
1095
+ this.applyMask(w), this.drawFormatBits(w);
1013
1096
  const x = this.getPenaltyScore();
1014
- x < y && (f = k, y = x), this.applyMask(k);
1097
+ x < y && (f = w, y = x), this.applyMask(w);
1015
1098
  }
1016
1099
  }
1017
1100
  n(0 <= f && f <= 7), this.mask = f, this.applyMask(f), this.drawFormatBits(f), this.isFunction = [];
@@ -1047,33 +1130,33 @@ var ce;
1047
1130
  static encodeSegments(i, o, l = 1, f = 40, h = -1, p = !0) {
1048
1131
  if (!(S.MIN_VERSION <= l && l <= f && f <= S.MAX_VERSION) || h < -1 || h > 7)
1049
1132
  throw new RangeError("Invalid value");
1050
- let y, k;
1133
+ let y, w;
1051
1134
  for (y = l; ; y++) {
1052
- const w = S.getNumDataCodewords(y, o) * 8, I = c.getTotalBits(i, y);
1053
- if (I <= w) {
1054
- k = I;
1135
+ const k = S.getNumDataCodewords(y, o) * 8, I = d.getTotalBits(i, y);
1136
+ if (I <= k) {
1137
+ w = I;
1055
1138
  break;
1056
1139
  }
1057
1140
  if (y >= f)
1058
1141
  throw new RangeError("Data too long");
1059
1142
  }
1060
- for (const w of [S.Ecc.MEDIUM, S.Ecc.QUARTILE, S.Ecc.HIGH])
1061
- p && k <= S.getNumDataCodewords(y, w) * 8 && (o = w);
1143
+ for (const k of [S.Ecc.MEDIUM, S.Ecc.QUARTILE, S.Ecc.HIGH])
1144
+ p && w <= S.getNumDataCodewords(y, k) * 8 && (o = k);
1062
1145
  let x = [];
1063
- for (const w of i) {
1064
- t(w.mode.modeBits, 4, x), t(w.numChars, w.mode.numCharCountBits(y), x);
1065
- for (const I of w.getData())
1146
+ for (const k of i) {
1147
+ t(k.mode.modeBits, 4, x), t(k.numChars, k.mode.numCharCountBits(y), x);
1148
+ for (const I of k.getData())
1066
1149
  x.push(I);
1067
1150
  }
1068
- n(x.length == k);
1151
+ n(x.length == w);
1069
1152
  const M = S.getNumDataCodewords(y, o) * 8;
1070
1153
  n(x.length <= M), t(0, Math.min(4, M - x.length), x), t(0, (8 - x.length % 8) % 8, x), n(x.length % 8 == 0);
1071
- for (let w = 236; x.length < M; w ^= 253)
1072
- t(w, 8, x);
1154
+ for (let k = 236; x.length < M; k ^= 253)
1155
+ t(k, 8, x);
1073
1156
  let R = [];
1074
1157
  for (; R.length * 8 < x.length; )
1075
1158
  R.push(0);
1076
- return x.forEach((w, I) => R[I >>> 3] |= w << 7 - (I & 7)), new S(y, o, R, h);
1159
+ return x.forEach((k, I) => R[I >>> 3] |= k << 7 - (I & 7)), new S(y, o, R, h);
1077
1160
  }
1078
1161
  /*-- Accessor methods --*/
1079
1162
  // Returns the color of the module (pixel) at the given coordinates, which is false
@@ -1161,19 +1244,19 @@ var ce;
1161
1244
  const o = this.version, l = this.errorCorrectionLevel;
1162
1245
  if (i.length != S.getNumDataCodewords(o, l))
1163
1246
  throw new RangeError("Invalid argument");
1164
- const f = S.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][o], h = S.ECC_CODEWORDS_PER_BLOCK[l.ordinal][o], p = Math.floor(S.getNumRawDataModules(o) / 8), y = f - p % f, k = Math.floor(p / f);
1247
+ const f = S.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][o], h = S.ECC_CODEWORDS_PER_BLOCK[l.ordinal][o], p = Math.floor(S.getNumRawDataModules(o) / 8), y = f - p % f, w = Math.floor(p / f);
1165
1248
  let x = [];
1166
1249
  const M = S.reedSolomonComputeDivisor(h);
1167
- for (let w = 0, I = 0; w < f; w++) {
1168
- let L = i.slice(I, I + k - h + (w < y ? 0 : 1));
1250
+ for (let k = 0, I = 0; k < f; k++) {
1251
+ let L = i.slice(I, I + w - h + (k < y ? 0 : 1));
1169
1252
  I += L.length;
1170
1253
  const O = S.reedSolomonComputeRemainder(L, M);
1171
- w < y && L.push(0), x.push(L.concat(O));
1254
+ k < y && L.push(0), x.push(L.concat(O));
1172
1255
  }
1173
1256
  let R = [];
1174
- for (let w = 0; w < x[0].length; w++)
1257
+ for (let k = 0; k < x[0].length; k++)
1175
1258
  x.forEach((I, L) => {
1176
- (w != k - h || L >= y) && R.push(I[w]);
1259
+ (k != w - h || L >= y) && R.push(I[k]);
1177
1260
  });
1178
1261
  return n(R.length == p), R;
1179
1262
  }
@@ -1187,8 +1270,8 @@ var ce;
1187
1270
  l == 6 && (l = 5);
1188
1271
  for (let f = 0; f < this.size; f++)
1189
1272
  for (let h = 0; h < 2; h++) {
1190
- const p = l - h, k = (l + 1 & 2) == 0 ? this.size - 1 - f : f;
1191
- !this.isFunction[k][p] && o < i.length * 8 && (this.modules[k][p] = s(i[o >>> 3], 7 - (o & 7)), o++);
1273
+ const p = l - h, w = (l + 1 & 2) == 0 ? this.size - 1 - f : f;
1274
+ !this.isFunction[w][p] && o < i.length * 8 && (this.modules[w][p] = s(i[o >>> 3], 7 - (o & 7)), o++);
1192
1275
  }
1193
1276
  }
1194
1277
  n(o == i.length * 8);
@@ -1240,16 +1323,16 @@ var ce;
1240
1323
  getPenaltyScore() {
1241
1324
  let i = 0;
1242
1325
  for (let h = 0; h < this.size; h++) {
1243
- let p = !1, y = 0, k = [0, 0, 0, 0, 0, 0, 0];
1326
+ let p = !1, y = 0, w = [0, 0, 0, 0, 0, 0, 0];
1244
1327
  for (let x = 0; x < this.size; x++)
1245
- this.modules[h][x] == p ? (y++, y == 5 ? i += S.PENALTY_N1 : y > 5 && i++) : (this.finderPenaltyAddHistory(y, k), p || (i += this.finderPenaltyCountPatterns(k) * S.PENALTY_N3), p = this.modules[h][x], y = 1);
1246
- i += this.finderPenaltyTerminateAndCount(p, y, k) * S.PENALTY_N3;
1328
+ this.modules[h][x] == p ? (y++, y == 5 ? i += S.PENALTY_N1 : y > 5 && i++) : (this.finderPenaltyAddHistory(y, w), p || (i += this.finderPenaltyCountPatterns(w) * S.PENALTY_N3), p = this.modules[h][x], y = 1);
1329
+ i += this.finderPenaltyTerminateAndCount(p, y, w) * S.PENALTY_N3;
1247
1330
  }
1248
1331
  for (let h = 0; h < this.size; h++) {
1249
- let p = !1, y = 0, k = [0, 0, 0, 0, 0, 0, 0];
1332
+ let p = !1, y = 0, w = [0, 0, 0, 0, 0, 0, 0];
1250
1333
  for (let x = 0; x < this.size; x++)
1251
- this.modules[x][h] == p ? (y++, y == 5 ? i += S.PENALTY_N1 : y > 5 && i++) : (this.finderPenaltyAddHistory(y, k), p || (i += this.finderPenaltyCountPatterns(k) * S.PENALTY_N3), p = this.modules[x][h], y = 1);
1252
- i += this.finderPenaltyTerminateAndCount(p, y, k) * S.PENALTY_N3;
1334
+ this.modules[x][h] == p ? (y++, y == 5 ? i += S.PENALTY_N1 : y > 5 && i++) : (this.finderPenaltyAddHistory(y, w), p || (i += this.finderPenaltyCountPatterns(w) * S.PENALTY_N3), p = this.modules[x][h], y = 1);
1335
+ i += this.finderPenaltyTerminateAndCount(p, y, w) * S.PENALTY_N3;
1253
1336
  }
1254
1337
  for (let h = 0; h < this.size - 1; h++)
1255
1338
  for (let p = 0; p < this.size - 1; p++) {
@@ -1488,7 +1571,7 @@ var ce;
1488
1571
  }
1489
1572
  };
1490
1573
  a.NUMERIC_REGEX = /^[0-9]*$/, a.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\/:-]*$/, a.ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";
1491
- let c = a;
1574
+ let d = a;
1492
1575
  r.QrSegment = a;
1493
1576
  })(ce || (ce = {}));
1494
1577
  ((r) => {
@@ -1521,52 +1604,52 @@ var ce;
1521
1604
  })(r.QrSegment || (r.QrSegment = {}));
1522
1605
  })(ce || (ce = {}));
1523
1606
  var pe = ce;
1524
- var as = {
1607
+ var is = {
1525
1608
  L: pe.QrCode.Ecc.LOW,
1526
1609
  M: pe.QrCode.Ecc.MEDIUM,
1527
1610
  Q: pe.QrCode.Ecc.QUARTILE,
1528
1611
  H: pe.QrCode.Ecc.HIGH
1529
- }, Bt = 128, Wt = "L", Yt = "#FFFFFF", Qt = "#000000", qt = !1, Ht = 1, is = 4, os = 0, ls = 0.1;
1612
+ }, Bt = 128, Wt = "L", qt = "#FFFFFF", Yt = "#000000", Qt = !1, Ht = 1, os = 4, ls = 0, cs = 0.1;
1530
1613
  function Gt(r, e = 0) {
1531
1614
  const t = [];
1532
1615
  return r.forEach(function(s, n) {
1533
1616
  let a = null;
1534
- s.forEach(function(c, u) {
1535
- if (!c && a !== null) {
1617
+ s.forEach(function(d, u) {
1618
+ if (!d && a !== null) {
1536
1619
  t.push(
1537
1620
  `M${a + e} ${n + e}h${u - a}v1H${a + e}z`
1538
1621
  ), a = null;
1539
1622
  return;
1540
1623
  }
1541
1624
  if (u === s.length - 1) {
1542
- if (!c)
1625
+ if (!d)
1543
1626
  return;
1544
1627
  a === null ? t.push(`M${u + e},${n + e} h1v1H${u + e}z`) : t.push(
1545
1628
  `M${a + e},${n + e} h${u + 1 - a}v1H${a + e}z`
1546
1629
  );
1547
1630
  return;
1548
1631
  }
1549
- c && a === null && (a = u);
1632
+ d && a === null && (a = u);
1550
1633
  });
1551
1634
  }), t.join("");
1552
1635
  }
1553
1636
  function Jt(r, e) {
1554
1637
  return r.slice().map((t, s) => s < e.y || s >= e.y + e.h ? t : t.map((n, a) => a < e.x || a >= e.x + e.w ? n : !1));
1555
1638
  }
1556
- function cs(r, e, t, s) {
1639
+ function ds(r, e, t, s) {
1557
1640
  if (s == null)
1558
1641
  return null;
1559
- const n = r.length + t * 2, a = Math.floor(e * ls), c = n / e, u = (s.width || a) * c, i = (s.height || a) * c, o = s.x == null ? r.length / 2 - u / 2 : s.x * c, l = s.y == null ? r.length / 2 - i / 2 : s.y * c, f = s.opacity == null ? 1 : s.opacity;
1642
+ const n = r.length + t * 2, a = Math.floor(e * cs), d = n / e, u = (s.width || a) * d, i = (s.height || a) * d, o = s.x == null ? r.length / 2 - u / 2 : s.x * d, l = s.y == null ? r.length / 2 - i / 2 : s.y * d, f = s.opacity == null ? 1 : s.opacity;
1560
1643
  let h = null;
1561
1644
  if (s.excavate) {
1562
- let y = Math.floor(o), k = Math.floor(l), x = Math.ceil(u + o - y), M = Math.ceil(i + l - k);
1563
- h = { x: y, y: k, w: x, h: M };
1645
+ let y = Math.floor(o), w = Math.floor(l), x = Math.ceil(u + o - y), M = Math.ceil(i + l - w);
1646
+ h = { x: y, y: w, w: x, h: M };
1564
1647
  }
1565
1648
  const p = s.crossOrigin;
1566
1649
  return { x: o, y: l, h: i, w: u, excavation: h, opacity: f, crossOrigin: p };
1567
1650
  }
1568
- function ds(r, e) {
1569
- return e != null ? Math.max(Math.floor(e), 0) : r ? is : os;
1651
+ function us(r, e) {
1652
+ return e != null ? Math.max(Math.floor(e), 0) : r ? os : ls;
1570
1653
  }
1571
1654
  function Xt({
1572
1655
  value: r,
@@ -1575,35 +1658,35 @@ function Xt({
1575
1658
  includeMargin: s,
1576
1659
  marginSize: n,
1577
1660
  imageSettings: a,
1578
- size: c,
1661
+ size: d,
1579
1662
  boostLevel: u
1580
1663
  }) {
1581
- let i = z.useMemo(() => {
1582
- const y = (Array.isArray(r) ? r : [r]).reduce((k, x) => (k.push(...pe.QrSegment.makeSegments(x)), k), []);
1664
+ let i = F.useMemo(() => {
1665
+ const y = (Array.isArray(r) ? r : [r]).reduce((w, x) => (w.push(...pe.QrSegment.makeSegments(x)), w), []);
1583
1666
  return pe.QrCode.encodeSegments(
1584
1667
  y,
1585
- as[e],
1668
+ is[e],
1586
1669
  t,
1587
1670
  void 0,
1588
1671
  void 0,
1589
1672
  u
1590
1673
  );
1591
1674
  }, [r, e, t, u]);
1592
- const { cells: o, margin: l, numCells: f, calculatedImageSettings: h } = z.useMemo(() => {
1675
+ const { cells: o, margin: l, numCells: f, calculatedImageSettings: h } = F.useMemo(() => {
1593
1676
  let p = i.getModules();
1594
- const y = ds(s, n), k = p.length + y * 2, x = cs(
1677
+ const y = us(s, n), w = p.length + y * 2, x = ds(
1595
1678
  p,
1596
- c,
1679
+ d,
1597
1680
  y,
1598
1681
  a
1599
1682
  );
1600
1683
  return {
1601
1684
  cells: p,
1602
1685
  margin: y,
1603
- numCells: k,
1686
+ numCells: w,
1604
1687
  calculatedImageSettings: x
1605
1688
  };
1606
- }, [i, c, a, s, n]);
1689
+ }, [i, d, a, s, n]);
1607
1690
  return {
1608
1691
  qrcode: i,
1609
1692
  margin: l,
@@ -1612,27 +1695,27 @@ function Xt({
1612
1695
  calculatedImageSettings: h
1613
1696
  };
1614
1697
  }
1615
- var us = (function() {
1698
+ var fs = (function() {
1616
1699
  try {
1617
1700
  new Path2D().addPath(new Path2D());
1618
1701
  } catch {
1619
1702
  return !1;
1620
1703
  }
1621
1704
  return !0;
1622
- })(), fs = z.forwardRef(
1705
+ })(), hs = F.forwardRef(
1623
1706
  function(e, t) {
1624
1707
  const s = e, {
1625
1708
  value: n,
1626
1709
  size: a = Bt,
1627
- level: c = Wt,
1628
- bgColor: u = Yt,
1629
- fgColor: i = Qt,
1630
- includeMargin: o = qt,
1710
+ level: d = Wt,
1711
+ bgColor: u = qt,
1712
+ fgColor: i = Yt,
1713
+ includeMargin: o = Qt,
1631
1714
  minVersion: l = Ht,
1632
1715
  boostLevel: f,
1633
1716
  marginSize: h,
1634
1717
  imageSettings: p
1635
- } = s, k = Ke(s, [
1718
+ } = s, w = tt(s, [
1636
1719
  "value",
1637
1720
  "size",
1638
1721
  "level",
@@ -1643,14 +1726,14 @@ var us = (function() {
1643
1726
  "boostLevel",
1644
1727
  "marginSize",
1645
1728
  "imageSettings"
1646
- ]), { style: x } = k, M = Ke(k, ["style"]), R = p?.src, w = z.useRef(null), I = z.useRef(null), L = z.useCallback(
1647
- (q) => {
1648
- w.current = q, typeof t == "function" ? t(q) : t && (t.current = q);
1729
+ ]), { style: x } = w, M = tt(w, ["style"]), R = p?.src, k = F.useRef(null), I = F.useRef(null), L = F.useCallback(
1730
+ (Q) => {
1731
+ k.current = Q, typeof t == "function" ? t(Q) : t && (t.current = Q);
1649
1732
  },
1650
1733
  [t]
1651
- ), [O, B] = z.useState(!1), { margin: W, cells: G, numCells: le, calculatedImageSettings: Y } = Xt({
1734
+ ), [O, B] = F.useState(!1), { margin: W, cells: G, numCells: le, calculatedImageSettings: q } = Xt({
1652
1735
  value: n,
1653
- level: c,
1736
+ level: d,
1654
1737
  minVersion: l,
1655
1738
  boostLevel: f,
1656
1739
  includeMargin: o,
@@ -1658,38 +1741,38 @@ var us = (function() {
1658
1741
  imageSettings: p,
1659
1742
  size: a
1660
1743
  });
1661
- z.useEffect(() => {
1662
- if (w.current != null) {
1663
- const q = w.current, V = q.getContext("2d");
1664
- if (!V)
1744
+ F.useEffect(() => {
1745
+ if (k.current != null) {
1746
+ const Q = k.current, U = Q.getContext("2d");
1747
+ if (!U)
1665
1748
  return;
1666
- let we = G;
1667
- const re = I.current, ke = Y != null && re !== null && re.complete && re.naturalHeight !== 0 && re.naturalWidth !== 0;
1668
- ke && Y.excavation != null && (we = Jt(
1749
+ let ke = G;
1750
+ const re = I.current, je = q != null && re !== null && re.complete && re.naturalHeight !== 0 && re.naturalWidth !== 0;
1751
+ je && q.excavation != null && (ke = Jt(
1669
1752
  G,
1670
- Y.excavation
1753
+ q.excavation
1671
1754
  ));
1672
- const je = window.devicePixelRatio || 1;
1673
- q.height = q.width = a * je;
1674
- const Ne = a / le * je;
1675
- V.scale(Ne, Ne), V.fillStyle = u, V.fillRect(0, 0, le, le), V.fillStyle = i, us ? V.fill(new Path2D(Gt(we, W))) : G.forEach(function(m, E) {
1755
+ const Ne = window.devicePixelRatio || 1;
1756
+ Q.height = Q.width = a * Ne;
1757
+ const Ee = a / le * Ne;
1758
+ U.scale(Ee, Ee), U.fillStyle = u, U.fillRect(0, 0, le, le), U.fillStyle = i, fs ? U.fill(new Path2D(Gt(ke, W))) : G.forEach(function(m, E) {
1676
1759
  m.forEach(function($, D) {
1677
- $ && V.fillRect(D + W, E + W, 1, 1);
1760
+ $ && U.fillRect(D + W, E + W, 1, 1);
1678
1761
  });
1679
- }), Y && (V.globalAlpha = Y.opacity), ke && V.drawImage(
1762
+ }), q && (U.globalAlpha = q.opacity), je && U.drawImage(
1680
1763
  re,
1681
- Y.x + W,
1682
- Y.y + W,
1683
- Y.w,
1684
- Y.h
1764
+ q.x + W,
1765
+ q.y + W,
1766
+ q.w,
1767
+ q.h
1685
1768
  );
1686
1769
  }
1687
- }), z.useEffect(() => {
1770
+ }), F.useEffect(() => {
1688
1771
  B(!1);
1689
1772
  }, [R]);
1690
- const P = Xe({ height: a, width: a }, x);
1691
- let Q = null;
1692
- return R != null && (Q = /* @__PURE__ */ z.createElement(
1773
+ const P = et({ height: a, width: a }, x);
1774
+ let Y = null;
1775
+ return R != null && (Y = /* @__PURE__ */ F.createElement(
1693
1776
  "img",
1694
1777
  {
1695
1778
  src: R,
@@ -1699,36 +1782,36 @@ var us = (function() {
1699
1782
  B(!0);
1700
1783
  },
1701
1784
  ref: I,
1702
- crossOrigin: Y?.crossOrigin
1785
+ crossOrigin: q?.crossOrigin
1703
1786
  }
1704
- )), /* @__PURE__ */ z.createElement(z.Fragment, null, /* @__PURE__ */ z.createElement(
1787
+ )), /* @__PURE__ */ F.createElement(F.Fragment, null, /* @__PURE__ */ F.createElement(
1705
1788
  "canvas",
1706
- Xe({
1789
+ et({
1707
1790
  style: P,
1708
1791
  height: a,
1709
1792
  width: a,
1710
1793
  ref: L,
1711
1794
  role: "img"
1712
1795
  }, M)
1713
- ), Q);
1796
+ ), Y);
1714
1797
  }
1715
1798
  );
1716
- fs.displayName = "QRCodeCanvas";
1717
- var Kt = z.forwardRef(
1799
+ hs.displayName = "QRCodeCanvas";
1800
+ var Kt = F.forwardRef(
1718
1801
  function(e, t) {
1719
1802
  const s = e, {
1720
1803
  value: n,
1721
1804
  size: a = Bt,
1722
- level: c = Wt,
1723
- bgColor: u = Yt,
1724
- fgColor: i = Qt,
1725
- includeMargin: o = qt,
1805
+ level: d = Wt,
1806
+ bgColor: u = qt,
1807
+ fgColor: i = Yt,
1808
+ includeMargin: o = Qt,
1726
1809
  minVersion: l = Ht,
1727
1810
  boostLevel: f,
1728
1811
  title: h,
1729
1812
  marginSize: p,
1730
1813
  imageSettings: y
1731
- } = s, k = Ke(s, [
1814
+ } = s, w = tt(s, [
1732
1815
  "value",
1733
1816
  "size",
1734
1817
  "level",
@@ -1740,9 +1823,9 @@ var Kt = z.forwardRef(
1740
1823
  "title",
1741
1824
  "marginSize",
1742
1825
  "imageSettings"
1743
- ]), { margin: x, cells: M, numCells: R, calculatedImageSettings: w } = Xt({
1826
+ ]), { margin: x, cells: M, numCells: R, calculatedImageSettings: k } = Xt({
1744
1827
  value: n,
1745
- level: c,
1828
+ level: d,
1746
1829
  minVersion: l,
1747
1830
  boostLevel: f,
1748
1831
  includeMargin: o,
@@ -1751,34 +1834,34 @@ var Kt = z.forwardRef(
1751
1834
  size: a
1752
1835
  });
1753
1836
  let I = M, L = null;
1754
- y != null && w != null && (w.excavation != null && (I = Jt(
1837
+ y != null && k != null && (k.excavation != null && (I = Jt(
1755
1838
  M,
1756
- w.excavation
1757
- )), L = /* @__PURE__ */ z.createElement(
1839
+ k.excavation
1840
+ )), L = /* @__PURE__ */ F.createElement(
1758
1841
  "image",
1759
1842
  {
1760
1843
  href: y.src,
1761
- height: w.h,
1762
- width: w.w,
1763
- x: w.x + x,
1764
- y: w.y + x,
1844
+ height: k.h,
1845
+ width: k.w,
1846
+ x: k.x + x,
1847
+ y: k.y + x,
1765
1848
  preserveAspectRatio: "none",
1766
- opacity: w.opacity,
1767
- crossOrigin: w.crossOrigin
1849
+ opacity: k.opacity,
1850
+ crossOrigin: k.crossOrigin
1768
1851
  }
1769
1852
  ));
1770
1853
  const O = Gt(I, x);
1771
- return /* @__PURE__ */ z.createElement(
1854
+ return /* @__PURE__ */ F.createElement(
1772
1855
  "svg",
1773
- Xe({
1856
+ et({
1774
1857
  height: a,
1775
1858
  width: a,
1776
1859
  viewBox: `0 0 ${R} ${R}`,
1777
1860
  ref: t,
1778
1861
  role: "img"
1779
- }, k),
1780
- !!h && /* @__PURE__ */ z.createElement("title", null, h),
1781
- /* @__PURE__ */ z.createElement(
1862
+ }, w),
1863
+ !!h && /* @__PURE__ */ F.createElement("title", null, h),
1864
+ /* @__PURE__ */ F.createElement(
1782
1865
  "path",
1783
1866
  {
1784
1867
  fill: u,
@@ -1786,13 +1869,13 @@ var Kt = z.forwardRef(
1786
1869
  shapeRendering: "crispEdges"
1787
1870
  }
1788
1871
  ),
1789
- /* @__PURE__ */ z.createElement("path", { fill: i, d: O, shapeRendering: "crispEdges" }),
1872
+ /* @__PURE__ */ F.createElement("path", { fill: i, d: O, shapeRendering: "crispEdges" }),
1790
1873
  L
1791
1874
  );
1792
1875
  }
1793
1876
  );
1794
1877
  Kt.displayName = "QRCodeSVG";
1795
- const hs = (r, e = "qr-code", t = 4) => {
1878
+ const ms = (r, e = "qr-code", t = 4) => {
1796
1879
  const s = document.getElementById(r);
1797
1880
  if (!s) return;
1798
1881
  let n = new XMLSerializer().serializeToString(s);
@@ -1800,10 +1883,10 @@ const hs = (r, e = "qr-code", t = 4) => {
1800
1883
  /<svg(\s+)/,
1801
1884
  '<svg xmlns="http://www.w3.org/2000/svg" '
1802
1885
  ));
1803
- const a = s.getAttribute("width") ? parseInt(s.getAttribute("width"), 10) : s.clientWidth || 200, c = s.getAttribute("height") ? parseInt(s.getAttribute("height"), 10) : s.clientHeight || a, u = Math.round(a * t), i = Math.round(c * t);
1886
+ const a = s.getAttribute("width") ? parseInt(s.getAttribute("width"), 10) : s.clientWidth || 200, d = s.getAttribute("height") ? parseInt(s.getAttribute("height"), 10) : s.clientHeight || a, u = Math.round(a * t), i = Math.round(d * t);
1804
1887
  /viewBox=/.test(n) || (n = n.replace(
1805
1888
  /<svg(\s+)/,
1806
- `<svg viewBox="0 0 ${a} ${c}" `
1889
+ `<svg viewBox="0 0 ${a} ${d}" `
1807
1890
  )), /width="[^"]*"/.test(n) ? n = n.replace(/width="[^"]*"/, `width="${u}"`) : n = n.replace(/<svg(\s+)/, `<svg width="${u}" `), /height="[^"]*"/.test(n) ? n = n.replace(/height="[^"]*"/, `height="${i}"`) : n = n.replace(/<svg(\s+)/, `<svg height="${i}" `);
1808
1891
  const o = document.createElement("canvas");
1809
1892
  o.width = u, o.height = i;
@@ -1814,7 +1897,7 @@ const hs = (r, e = "qr-code", t = 4) => {
1814
1897
  p.download = `${e}.png`, p.href = h, p.click();
1815
1898
  }, f.src = "data:image/svg+xml;base64," + btoa(unescape(encodeURIComponent(n)));
1816
1899
  };
1817
- function ms({
1900
+ function ps({
1818
1901
  id: r = "qr-code",
1819
1902
  value: e,
1820
1903
  size: t = 200,
@@ -1822,16 +1905,16 @@ function ms({
1822
1905
  filenameBase: n,
1823
1906
  showDownloads: a = !0
1824
1907
  }) {
1825
- const c = n || e.replace(/[^a-z0-9_-]/gi, "-").slice(0, 40) || "qr-code";
1826
- return /* @__PURE__ */ d.jsxs("div", { className: "flex flex-col items-start ", children: [
1827
- /* @__PURE__ */ d.jsx("div", { className: "bg-base-100 p-4 rounded-lg", children: /* @__PURE__ */ d.jsx(Kt, { id: r, value: e, size: t, level: s }) }),
1828
- a && /* @__PURE__ */ d.jsx("div", { className: "join justify-center self-center", children: /* @__PURE__ */ d.jsx(ps, { id: r, fileBase: c }) })
1908
+ const d = n || e.replace(/[^a-z0-9_-]/gi, "-").slice(0, 40) || "qr-code";
1909
+ return /* @__PURE__ */ c.jsxs("div", { className: "flex flex-col items-start ", children: [
1910
+ /* @__PURE__ */ c.jsx("div", { className: "bg-base-100 p-4 rounded-lg", children: /* @__PURE__ */ c.jsx(Kt, { id: r, value: e, size: t, level: s }) }),
1911
+ a && /* @__PURE__ */ c.jsx("div", { className: "join justify-center self-center", children: /* @__PURE__ */ c.jsx(gs, { id: r, fileBase: d }) })
1829
1912
  ] });
1830
1913
  }
1831
- function ps({ id: r, fileBase: e }) {
1832
- const [t, s] = at(8), n = (a) => a === 8 ? "large" : a === 4 ? "medium" : "small";
1833
- return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
1834
- /* @__PURE__ */ d.jsxs(
1914
+ function gs({ id: r, fileBase: e }) {
1915
+ const [t, s] = qe(8), n = (a) => a === 8 ? "large" : a === 4 ? "medium" : "small";
1916
+ return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
1917
+ /* @__PURE__ */ c.jsxs(
1835
1918
  "select",
1836
1919
  {
1837
1920
  className: "select join-item",
@@ -1839,24 +1922,24 @@ function ps({ id: r, fileBase: e }) {
1839
1922
  onChange: (a) => s(Number(a.target.value)),
1840
1923
  "aria-label": "Download scale",
1841
1924
  children: [
1842
- /* @__PURE__ */ d.jsx("option", { value: 8, children: "Large" }),
1843
- /* @__PURE__ */ d.jsx("option", { value: 4, children: "Medium" }),
1844
- /* @__PURE__ */ d.jsx("option", { value: 2, children: "Small" })
1925
+ /* @__PURE__ */ c.jsx("option", { value: 8, children: "Large" }),
1926
+ /* @__PURE__ */ c.jsx("option", { value: 4, children: "Medium" }),
1927
+ /* @__PURE__ */ c.jsx("option", { value: 2, children: "Small" })
1845
1928
  ]
1846
1929
  }
1847
1930
  ),
1848
- /* @__PURE__ */ d.jsx(
1931
+ /* @__PURE__ */ c.jsx(
1849
1932
  "button",
1850
1933
  {
1851
1934
  className: "btn btn-secondary join-item",
1852
- onClick: () => hs(r, `${e}-${n(t)}`, t),
1935
+ onClick: () => ms(r, `${e}-${n(t)}`, t),
1853
1936
  title: `Download ${t}x`,
1854
1937
  children: "Download"
1855
1938
  }
1856
1939
  )
1857
1940
  ] });
1858
1941
  }
1859
- function Ae(r) {
1942
+ function Te(r) {
1860
1943
  if (!r) return "";
1861
1944
  try {
1862
1945
  return new Date(r).toLocaleString();
@@ -1876,28 +1959,28 @@ var T;
1876
1959
  }
1877
1960
  r.assertNever = t, r.arrayToEnum = (n) => {
1878
1961
  const a = {};
1879
- for (const c of n)
1880
- a[c] = c;
1962
+ for (const d of n)
1963
+ a[d] = d;
1881
1964
  return a;
1882
1965
  }, r.getValidEnumValues = (n) => {
1883
- const a = r.objectKeys(n).filter((u) => typeof n[n[u]] != "number"), c = {};
1966
+ const a = r.objectKeys(n).filter((u) => typeof n[n[u]] != "number"), d = {};
1884
1967
  for (const u of a)
1885
- c[u] = n[u];
1886
- return r.objectValues(c);
1968
+ d[u] = n[u];
1969
+ return r.objectValues(d);
1887
1970
  }, r.objectValues = (n) => r.objectKeys(n).map(function(a) {
1888
1971
  return n[a];
1889
1972
  }), r.objectKeys = typeof Object.keys == "function" ? (n) => Object.keys(n) : (n) => {
1890
1973
  const a = [];
1891
- for (const c in n)
1892
- Object.prototype.hasOwnProperty.call(n, c) && a.push(c);
1974
+ for (const d in n)
1975
+ Object.prototype.hasOwnProperty.call(n, d) && a.push(d);
1893
1976
  return a;
1894
1977
  }, r.find = (n, a) => {
1895
- for (const c of n)
1896
- if (a(c))
1897
- return c;
1978
+ for (const d of n)
1979
+ if (a(d))
1980
+ return d;
1898
1981
  }, r.isInteger = typeof Number.isInteger == "function" ? (n) => Number.isInteger(n) : (n) => typeof n == "number" && Number.isFinite(n) && Math.floor(n) === n;
1899
1982
  function s(n, a = " | ") {
1900
- return n.map((c) => typeof c == "string" ? `'${c}'` : c).join(a);
1983
+ return n.map((d) => typeof d == "string" ? `'${d}'` : d).join(a);
1901
1984
  }
1902
1985
  r.joinValues = s, r.jsonStringifyReplacer = (n, a) => typeof a == "bigint" ? a.toString() : a;
1903
1986
  })(T || (T = {}));
@@ -1986,20 +2069,20 @@ class ee extends Error {
1986
2069
  const t = e || function(a) {
1987
2070
  return a.message;
1988
2071
  }, s = { _errors: [] }, n = (a) => {
1989
- for (const c of a.issues)
1990
- if (c.code === "invalid_union")
1991
- c.unionErrors.map(n);
1992
- else if (c.code === "invalid_return_type")
1993
- n(c.returnTypeError);
1994
- else if (c.code === "invalid_arguments")
1995
- n(c.argumentsError);
1996
- else if (c.path.length === 0)
1997
- s._errors.push(t(c));
2072
+ for (const d of a.issues)
2073
+ if (d.code === "invalid_union")
2074
+ d.unionErrors.map(n);
2075
+ else if (d.code === "invalid_return_type")
2076
+ n(d.returnTypeError);
2077
+ else if (d.code === "invalid_arguments")
2078
+ n(d.argumentsError);
2079
+ else if (d.path.length === 0)
2080
+ s._errors.push(t(d));
1998
2081
  else {
1999
2082
  let u = s, i = 0;
2000
- for (; i < c.path.length; ) {
2001
- const o = c.path[i];
2002
- i === c.path.length - 1 ? (u[o] = u[o] || { _errors: [] }, u[o]._errors.push(t(c))) : u[o] = u[o] || { _errors: [] }, u = u[o], i++;
2083
+ for (; i < d.path.length; ) {
2084
+ const o = d.path[i];
2085
+ i === d.path.length - 1 ? (u[o] = u[o] || { _errors: [] }, u[o]._errors.push(t(d))) : u[o] = u[o] || { _errors: [] }, u = u[o], i++;
2003
2086
  }
2004
2087
  }
2005
2088
  };
@@ -2033,7 +2116,7 @@ class ee extends Error {
2033
2116
  }
2034
2117
  }
2035
2118
  ee.create = (r) => new ee(r);
2036
- const et = (r, e) => {
2119
+ const rt = (r, e) => {
2037
2120
  let t;
2038
2121
  switch (r.code) {
2039
2122
  case g.invalid_type:
@@ -2089,12 +2172,12 @@ const et = (r, e) => {
2089
2172
  }
2090
2173
  return { message: t };
2091
2174
  };
2092
- let gs = et;
2093
- function ys() {
2094
- return gs;
2175
+ let ys = rt;
2176
+ function vs() {
2177
+ return ys;
2095
2178
  }
2096
- const vs = (r) => {
2097
- const { data: e, path: t, errorMaps: s, issueData: n } = r, a = [...t, ...n.path || []], c = {
2179
+ const _s = (r) => {
2180
+ const { data: e, path: t, errorMaps: s, issueData: n } = r, a = [...t, ...n.path || []], d = {
2098
2181
  ...n,
2099
2182
  path: a
2100
2183
  };
@@ -2107,7 +2190,7 @@ const vs = (r) => {
2107
2190
  let u = "";
2108
2191
  const i = s.filter((o) => !!o).slice().reverse();
2109
2192
  for (const o of i)
2110
- u = o(c, { data: e, defaultError: u }).message;
2193
+ u = o(d, { data: e, defaultError: u }).message;
2111
2194
  return {
2112
2195
  ...n,
2113
2196
  path: a,
@@ -2115,7 +2198,7 @@ const vs = (r) => {
2115
2198
  };
2116
2199
  };
2117
2200
  function v(r, e) {
2118
- const t = ys(), s = vs({
2201
+ const t = vs(), s = _s({
2119
2202
  issueData: e,
2120
2203
  data: r.data,
2121
2204
  path: r.path,
@@ -2126,7 +2209,7 @@ function v(r, e) {
2126
2209
  // then schema-bound map if available
2127
2210
  t,
2128
2211
  // then global override map
2129
- t === et ? void 0 : et
2212
+ t === rt ? void 0 : rt
2130
2213
  // then global default map
2131
2214
  ].filter((n) => !!n)
2132
2215
  });
@@ -2154,10 +2237,10 @@ class H {
2154
2237
  static async mergeObjectAsync(e, t) {
2155
2238
  const s = [];
2156
2239
  for (const n of t) {
2157
- const a = await n.key, c = await n.value;
2240
+ const a = await n.key, d = await n.value;
2158
2241
  s.push({
2159
2242
  key: a,
2160
- value: c
2243
+ value: d
2161
2244
  });
2162
2245
  }
2163
2246
  return H.mergeObjectSync(e, s);
@@ -2165,17 +2248,17 @@ class H {
2165
2248
  static mergeObjectSync(e, t) {
2166
2249
  const s = {};
2167
2250
  for (const n of t) {
2168
- const { key: a, value: c } = n;
2169
- if (a.status === "aborted" || c.status === "aborted")
2251
+ const { key: a, value: d } = n;
2252
+ if (a.status === "aborted" || d.status === "aborted")
2170
2253
  return j;
2171
- a.status === "dirty" && e.dirty(), c.status === "dirty" && e.dirty(), a.value !== "__proto__" && (typeof c.value < "u" || n.alwaysSet) && (s[a.value] = c.value);
2254
+ a.status === "dirty" && e.dirty(), d.status === "dirty" && e.dirty(), a.value !== "__proto__" && (typeof d.value < "u" || n.alwaysSet) && (s[a.value] = d.value);
2172
2255
  }
2173
2256
  return { status: e.value, value: s };
2174
2257
  }
2175
2258
  }
2176
2259
  const j = Object.freeze({
2177
2260
  status: "aborted"
2178
- }), Te = (r) => ({ status: "dirty", value: r }), J = (r) => ({ status: "valid", value: r }), _t = (r) => r.status === "aborted", xt = (r) => r.status === "dirty", ge = (r) => r.status === "valid", ze = (r) => typeof Promise < "u" && r instanceof Promise;
2261
+ }), Oe = (r) => ({ status: "dirty", value: r }), J = (r) => ({ status: "valid", value: r }), _t = (r) => r.status === "aborted", xt = (r) => r.status === "dirty", ye = (r) => r.status === "valid", ze = (r) => typeof Promise < "u" && r instanceof Promise;
2179
2262
  var b;
2180
2263
  (function(r) {
2181
2264
  r.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, r.toString = (e) => typeof e == "string" ? e : e?.message;
@@ -2189,7 +2272,7 @@ class ae {
2189
2272
  }
2190
2273
  }
2191
2274
  const bt = (r, e) => {
2192
- if (ge(e))
2275
+ if (ye(e))
2193
2276
  return { success: !0, data: e.value };
2194
2277
  if (!r.common.issues.length)
2195
2278
  throw new Error("Validation failed but no issues detected.");
@@ -2209,9 +2292,9 @@ function C(r) {
2209
2292
  const { errorMap: e, invalid_type_error: t, required_error: s, description: n } = r;
2210
2293
  if (e && (t || s))
2211
2294
  throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
2212
- return e ? { errorMap: e, description: n } : { errorMap: (c, u) => {
2295
+ return e ? { errorMap: e, description: n } : { errorMap: (d, u) => {
2213
2296
  const { message: i } = r;
2214
- return c.code === "invalid_enum_value" ? { message: i ?? u.defaultError } : typeof u.data > "u" ? { message: i ?? s ?? u.defaultError } : c.code !== "invalid_type" ? { message: u.defaultError } : { message: i ?? t ?? u.defaultError };
2297
+ return d.code === "invalid_enum_value" ? { message: i ?? u.defaultError } : typeof u.data > "u" ? { message: i ?? s ?? u.defaultError } : d.code !== "invalid_type" ? { message: u.defaultError } : { message: i ?? t ?? u.defaultError };
2215
2298
  }, description: n };
2216
2299
  }
2217
2300
  class A {
@@ -2290,7 +2373,7 @@ class A {
2290
2373
  if (!this["~standard"].async)
2291
2374
  try {
2292
2375
  const s = this._parseSync({ data: e, path: [], parent: t });
2293
- return ge(s) ? {
2376
+ return ye(s) ? {
2294
2377
  value: s.value
2295
2378
  } : {
2296
2379
  issues: t.common.issues
@@ -2301,7 +2384,7 @@ class A {
2301
2384
  async: !0
2302
2385
  };
2303
2386
  }
2304
- return this._parseAsync({ data: e, path: [], parent: t }).then((s) => ge(s) ? {
2387
+ return this._parseAsync({ data: e, path: [], parent: t }).then((s) => ye(s) ? {
2305
2388
  value: s.value
2306
2389
  } : {
2307
2390
  issues: t.common.issues
@@ -2331,18 +2414,18 @@ class A {
2331
2414
  refine(e, t) {
2332
2415
  const s = (n) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(n) : t;
2333
2416
  return this._refinement((n, a) => {
2334
- const c = e(n), u = () => a.addIssue({
2417
+ const d = e(n), u = () => a.addIssue({
2335
2418
  code: g.custom,
2336
2419
  ...s(n)
2337
2420
  });
2338
- return typeof Promise < "u" && c instanceof Promise ? c.then((i) => i ? !0 : (u(), !1)) : c ? !0 : (u(), !1);
2421
+ return typeof Promise < "u" && d instanceof Promise ? d.then((i) => i ? !0 : (u(), !1)) : d ? !0 : (u(), !1);
2339
2422
  });
2340
2423
  }
2341
2424
  refinement(e, t) {
2342
2425
  return this._refinement((s, n) => e(s) ? !0 : (n.addIssue(typeof t == "function" ? t(s, n) : t), !1));
2343
2426
  }
2344
2427
  _refinement(e) {
2345
- return new _e({
2428
+ return new xe({
2346
2429
  schema: this,
2347
2430
  typeName: N.ZodEffects,
2348
2431
  effect: { type: "refinement", refinement: e }
@@ -2362,7 +2445,7 @@ class A {
2362
2445
  return ne.create(this, this._def);
2363
2446
  }
2364
2447
  nullable() {
2365
- return xe.create(this, this._def);
2448
+ return be.create(this, this._def);
2366
2449
  }
2367
2450
  nullish() {
2368
2451
  return this.nullable().optional();
@@ -2371,16 +2454,16 @@ class A {
2371
2454
  return X.create(this);
2372
2455
  }
2373
2456
  promise() {
2374
- return Be.create(this, this._def);
2457
+ return We.create(this, this._def);
2375
2458
  }
2376
2459
  or(e) {
2377
2460
  return Ve.create([this, e], this._def);
2378
2461
  }
2379
2462
  and(e) {
2380
- return Ue.create(this, e, this._def);
2463
+ return Be.create(this, e, this._def);
2381
2464
  }
2382
2465
  transform(e) {
2383
- return new _e({
2466
+ return new xe({
2384
2467
  ...C(this._def),
2385
2468
  schema: this,
2386
2469
  typeName: N.ZodEffects,
@@ -2389,7 +2472,7 @@ class A {
2389
2472
  }
2390
2473
  default(e) {
2391
2474
  const t = typeof e == "function" ? e : () => e;
2392
- return new rt({
2475
+ return new nt({
2393
2476
  ...C(this._def),
2394
2477
  innerType: this,
2395
2478
  defaultValue: t,
@@ -2397,7 +2480,7 @@ class A {
2397
2480
  });
2398
2481
  }
2399
2482
  brand() {
2400
- return new Fs({
2483
+ return new Us({
2401
2484
  typeName: N.ZodBranded,
2402
2485
  type: this,
2403
2486
  ...C(this._def)
@@ -2405,7 +2488,7 @@ class A {
2405
2488
  }
2406
2489
  catch(e) {
2407
2490
  const t = typeof e == "function" ? e : () => e;
2408
- return new st({
2491
+ return new at({
2409
2492
  ...C(this._def),
2410
2493
  innerType: this,
2411
2494
  catchValue: t,
@@ -2423,7 +2506,7 @@ class A {
2423
2506
  return ct.create(this, e);
2424
2507
  }
2425
2508
  readonly() {
2426
- return nt.create(this);
2509
+ return it.create(this);
2427
2510
  }
2428
2511
  isOptional() {
2429
2512
  return this.safeParse(void 0).success;
@@ -2432,28 +2515,28 @@ class A {
2432
2515
  return this.safeParse(null).success;
2433
2516
  }
2434
2517
  }
2435
- const _s = /^c[^\s-]{8,}$/i, xs = /^[0-9a-z]+$/, bs = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ws = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, ks = /^[a-z0-9_-]{21}$/i, js = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ns = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Es = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Cs = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
2436
- let Ge;
2437
- const Ss = /^(?:(?: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])$/, Rs = /^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/, As = /^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Ts = /^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Os = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ps = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, er = "((\\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])))", Is = new RegExp(`^${er}$`);
2518
+ const xs = /^c[^\s-]{8,}$/i, bs = /^[0-9a-z]+$/, ws = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ks = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, js = /^[a-z0-9_-]{21}$/i, Ns = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Es = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Cs = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ss = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
2519
+ let Xe;
2520
+ const Rs = /^(?:(?: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])$/, As = /^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/, Ts = /^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Os = /^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ps = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Is = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, er = "((\\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])))", Ms = new RegExp(`^${er}$`);
2438
2521
  function tr(r) {
2439
2522
  let e = "[0-5]\\d";
2440
2523
  r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`);
2441
2524
  const t = r.precision ? "+" : "?";
2442
2525
  return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`;
2443
2526
  }
2444
- function Ms(r) {
2527
+ function Ls(r) {
2445
2528
  return new RegExp(`^${tr(r)}$`);
2446
2529
  }
2447
- function Ls(r) {
2530
+ function $s(r) {
2448
2531
  let e = `${er}T${tr(r)}`;
2449
2532
  const t = [];
2450
2533
  return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
2451
2534
  }
2452
- function $s(r, e) {
2453
- return !!((e === "v4" || !e) && Ss.test(r) || (e === "v6" || !e) && As.test(r));
2454
- }
2455
2535
  function Zs(r, e) {
2456
- if (!js.test(r))
2536
+ return !!((e === "v4" || !e) && Rs.test(r) || (e === "v6" || !e) && Ts.test(r));
2537
+ }
2538
+ function Ds(r, e) {
2539
+ if (!Ns.test(r))
2457
2540
  return !1;
2458
2541
  try {
2459
2542
  const [t] = r.split(".");
@@ -2465,8 +2548,8 @@ function Zs(r, e) {
2465
2548
  return !1;
2466
2549
  }
2467
2550
  }
2468
- function Ds(r, e) {
2469
- return !!((e === "v4" || !e) && Rs.test(r) || (e === "v6" || !e) && Ts.test(r));
2551
+ function Fs(r, e) {
2552
+ return !!((e === "v4" || !e) && As.test(r) || (e === "v6" || !e) && Os.test(r));
2470
2553
  }
2471
2554
  class K extends A {
2472
2555
  _parse(e) {
@@ -2500,8 +2583,8 @@ class K extends A {
2500
2583
  message: a.message
2501
2584
  }), s.dirty());
2502
2585
  else if (a.kind === "length") {
2503
- const c = e.data.length > a.value, u = e.data.length < a.value;
2504
- (c || u) && (n = this._getOrReturnCtx(e, n), c ? v(n, {
2586
+ const d = e.data.length > a.value, u = e.data.length < a.value;
2587
+ (d || u) && (n = this._getOrReturnCtx(e, n), d ? v(n, {
2505
2588
  code: g.too_big,
2506
2589
  maximum: a.value,
2507
2590
  type: "string",
@@ -2517,43 +2600,43 @@ class K extends A {
2517
2600
  message: a.message
2518
2601
  }), s.dirty());
2519
2602
  } else if (a.kind === "email")
2520
- Es.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2603
+ Cs.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2521
2604
  validation: "email",
2522
2605
  code: g.invalid_string,
2523
2606
  message: a.message
2524
2607
  }), s.dirty());
2525
2608
  else if (a.kind === "emoji")
2526
- Ge || (Ge = new RegExp(Cs, "u")), Ge.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2609
+ Xe || (Xe = new RegExp(Ss, "u")), Xe.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2527
2610
  validation: "emoji",
2528
2611
  code: g.invalid_string,
2529
2612
  message: a.message
2530
2613
  }), s.dirty());
2531
2614
  else if (a.kind === "uuid")
2532
- ws.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2615
+ ks.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2533
2616
  validation: "uuid",
2534
2617
  code: g.invalid_string,
2535
2618
  message: a.message
2536
2619
  }), s.dirty());
2537
2620
  else if (a.kind === "nanoid")
2538
- ks.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2621
+ js.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2539
2622
  validation: "nanoid",
2540
2623
  code: g.invalid_string,
2541
2624
  message: a.message
2542
2625
  }), s.dirty());
2543
2626
  else if (a.kind === "cuid")
2544
- _s.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2627
+ xs.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2545
2628
  validation: "cuid",
2546
2629
  code: g.invalid_string,
2547
2630
  message: a.message
2548
2631
  }), s.dirty());
2549
2632
  else if (a.kind === "cuid2")
2550
- xs.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2633
+ bs.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2551
2634
  validation: "cuid2",
2552
2635
  code: g.invalid_string,
2553
2636
  message: a.message
2554
2637
  }), s.dirty());
2555
2638
  else if (a.kind === "ulid")
2556
- bs.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2639
+ ws.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2557
2640
  validation: "ulid",
2558
2641
  code: g.invalid_string,
2559
2642
  message: a.message
@@ -2584,39 +2667,39 @@ class K extends A {
2584
2667
  code: g.invalid_string,
2585
2668
  validation: { endsWith: a.value },
2586
2669
  message: a.message
2587
- }), s.dirty()) : a.kind === "datetime" ? Ls(a).test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2670
+ }), s.dirty()) : a.kind === "datetime" ? $s(a).test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2588
2671
  code: g.invalid_string,
2589
2672
  validation: "datetime",
2590
2673
  message: a.message
2591
- }), s.dirty()) : a.kind === "date" ? Is.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2674
+ }), s.dirty()) : a.kind === "date" ? Ms.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2592
2675
  code: g.invalid_string,
2593
2676
  validation: "date",
2594
2677
  message: a.message
2595
- }), s.dirty()) : a.kind === "time" ? Ms(a).test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2678
+ }), s.dirty()) : a.kind === "time" ? Ls(a).test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2596
2679
  code: g.invalid_string,
2597
2680
  validation: "time",
2598
2681
  message: a.message
2599
- }), s.dirty()) : a.kind === "duration" ? Ns.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2682
+ }), s.dirty()) : a.kind === "duration" ? Es.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2600
2683
  validation: "duration",
2601
2684
  code: g.invalid_string,
2602
2685
  message: a.message
2603
- }), s.dirty()) : a.kind === "ip" ? $s(e.data, a.version) || (n = this._getOrReturnCtx(e, n), v(n, {
2686
+ }), s.dirty()) : a.kind === "ip" ? Zs(e.data, a.version) || (n = this._getOrReturnCtx(e, n), v(n, {
2604
2687
  validation: "ip",
2605
2688
  code: g.invalid_string,
2606
2689
  message: a.message
2607
- }), s.dirty()) : a.kind === "jwt" ? Zs(e.data, a.alg) || (n = this._getOrReturnCtx(e, n), v(n, {
2690
+ }), s.dirty()) : a.kind === "jwt" ? Ds(e.data, a.alg) || (n = this._getOrReturnCtx(e, n), v(n, {
2608
2691
  validation: "jwt",
2609
2692
  code: g.invalid_string,
2610
2693
  message: a.message
2611
- }), s.dirty()) : a.kind === "cidr" ? Ds(e.data, a.version) || (n = this._getOrReturnCtx(e, n), v(n, {
2694
+ }), s.dirty()) : a.kind === "cidr" ? Fs(e.data, a.version) || (n = this._getOrReturnCtx(e, n), v(n, {
2612
2695
  validation: "cidr",
2613
2696
  code: g.invalid_string,
2614
2697
  message: a.message
2615
- }), s.dirty()) : a.kind === "base64" ? Os.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2698
+ }), s.dirty()) : a.kind === "base64" ? Ps.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2616
2699
  validation: "base64",
2617
2700
  code: g.invalid_string,
2618
2701
  message: a.message
2619
- }), s.dirty()) : a.kind === "base64url" ? Ps.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2702
+ }), s.dirty()) : a.kind === "base64url" ? Is.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2620
2703
  validation: "base64url",
2621
2704
  code: g.invalid_string,
2622
2705
  message: a.message
@@ -2852,8 +2935,8 @@ K.create = (r) => new K({
2852
2935
  ...C(r)
2853
2936
  });
2854
2937
  function zs(r, e) {
2855
- const t = (r.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, n = t > s ? t : s, a = Number.parseInt(r.toFixed(n).replace(".", "")), c = Number.parseInt(e.toFixed(n).replace(".", ""));
2856
- return a % c / 10 ** n;
2938
+ const t = (r.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, n = t > s ? t : s, a = Number.parseInt(r.toFixed(n).replace(".", "")), d = Number.parseInt(e.toFixed(n).replace(".", ""));
2939
+ return a % d / 10 ** n;
2857
2940
  }
2858
2941
  class de extends A {
2859
2942
  constructor() {
@@ -3160,7 +3243,7 @@ ue.create = (r) => new ue({
3160
3243
  coerce: r?.coerce ?? !1,
3161
3244
  ...C(r)
3162
3245
  });
3163
- class Fe extends A {
3246
+ class Ue extends A {
3164
3247
  _parse(e) {
3165
3248
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== _.boolean) {
3166
3249
  const s = this._getOrReturnCtx(e);
@@ -3173,12 +3256,12 @@ class Fe extends A {
3173
3256
  return J(e.data);
3174
3257
  }
3175
3258
  }
3176
- Fe.create = (r) => new Fe({
3259
+ Ue.create = (r) => new Ue({
3177
3260
  typeName: N.ZodBoolean,
3178
3261
  coerce: r?.coerce || !1,
3179
3262
  ...C(r)
3180
3263
  });
3181
- class ye extends A {
3264
+ class ve extends A {
3182
3265
  _parse(e) {
3183
3266
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== _.date) {
3184
3267
  const a = this._getOrReturnCtx(e);
@@ -3218,7 +3301,7 @@ class ye extends A {
3218
3301
  };
3219
3302
  }
3220
3303
  _addCheck(e) {
3221
- return new ye({
3304
+ return new ve({
3222
3305
  ...this._def,
3223
3306
  checks: [...this._def.checks, e]
3224
3307
  });
@@ -3250,7 +3333,7 @@ class ye extends A {
3250
3333
  return e != null ? new Date(e) : null;
3251
3334
  }
3252
3335
  }
3253
- ye.create = (r) => new ye({
3336
+ ve.create = (r) => new ve({
3254
3337
  checks: [],
3255
3338
  coerce: r?.coerce || !1,
3256
3339
  typeName: N.ZodDate,
@@ -3372,11 +3455,11 @@ class X extends A {
3372
3455
  received: t.parsedType
3373
3456
  }), j;
3374
3457
  if (n.exactLength !== null) {
3375
- const c = t.data.length > n.exactLength.value, u = t.data.length < n.exactLength.value;
3376
- (c || u) && (v(t, {
3377
- code: c ? g.too_big : g.too_small,
3458
+ const d = t.data.length > n.exactLength.value, u = t.data.length < n.exactLength.value;
3459
+ (d || u) && (v(t, {
3460
+ code: d ? g.too_big : g.too_small,
3378
3461
  minimum: u ? n.exactLength.value : void 0,
3379
- maximum: c ? n.exactLength.value : void 0,
3462
+ maximum: d ? n.exactLength.value : void 0,
3380
3463
  type: "array",
3381
3464
  inclusive: !0,
3382
3465
  exact: !0,
@@ -3398,8 +3481,8 @@ class X extends A {
3398
3481
  exact: !1,
3399
3482
  message: n.maxLength.message
3400
3483
  }), s.dirty()), t.common.async)
3401
- return Promise.all([...t.data].map((c, u) => n.type._parseAsync(new ae(t, c, t.path, u)))).then((c) => H.mergeArray(s, c));
3402
- const a = [...t.data].map((c, u) => n.type._parseSync(new ae(t, c, t.path, u)));
3484
+ return Promise.all([...t.data].map((d, u) => n.type._parseAsync(new ae(t, d, t.path, u)))).then((d) => H.mergeArray(s, d));
3485
+ const a = [...t.data].map((d, u) => n.type._parseSync(new ae(t, d, t.path, u)));
3403
3486
  return H.mergeArray(s, a);
3404
3487
  }
3405
3488
  get element() {
@@ -3436,22 +3519,22 @@ X.create = (r, e) => new X({
3436
3519
  ...C(e)
3437
3520
  });
3438
3521
  function me(r) {
3439
- if (r instanceof F) {
3522
+ if (r instanceof z) {
3440
3523
  const e = {};
3441
3524
  for (const t in r.shape) {
3442
3525
  const s = r.shape[t];
3443
3526
  e[t] = ne.create(me(s));
3444
3527
  }
3445
- return new F({
3528
+ return new z({
3446
3529
  ...r._def,
3447
3530
  shape: () => e
3448
3531
  });
3449
3532
  } else return r instanceof X ? new X({
3450
3533
  ...r._def,
3451
3534
  type: me(r.element)
3452
- }) : r instanceof ne ? ne.create(me(r.unwrap())) : r instanceof xe ? xe.create(me(r.unwrap())) : r instanceof fe ? fe.create(r.items.map((e) => me(e))) : r;
3535
+ }) : r instanceof ne ? ne.create(me(r.unwrap())) : r instanceof be ? be.create(me(r.unwrap())) : r instanceof fe ? fe.create(r.items.map((e) => me(e))) : r;
3453
3536
  }
3454
- class F extends A {
3537
+ class z extends A {
3455
3538
  constructor() {
3456
3539
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
3457
3540
  }
@@ -3470,12 +3553,12 @@ class F extends A {
3470
3553
  received: o.parsedType
3471
3554
  }), j;
3472
3555
  }
3473
- const { status: s, ctx: n } = this._processInputParams(e), { shape: a, keys: c } = this._getCached(), u = [];
3556
+ const { status: s, ctx: n } = this._processInputParams(e), { shape: a, keys: d } = this._getCached(), u = [];
3474
3557
  if (!(this._def.catchall instanceof ie && this._def.unknownKeys === "strip"))
3475
3558
  for (const o in n.data)
3476
- c.includes(o) || u.push(o);
3559
+ d.includes(o) || u.push(o);
3477
3560
  const i = [];
3478
- for (const o of c) {
3561
+ for (const o of d) {
3479
3562
  const l = a[o], f = n.data[o];
3480
3563
  i.push({
3481
3564
  key: { status: "valid", value: o },
@@ -3528,7 +3611,7 @@ class F extends A {
3528
3611
  return this._def.shape();
3529
3612
  }
3530
3613
  strict(e) {
3531
- return b.errToObj, new F({
3614
+ return b.errToObj, new z({
3532
3615
  ...this._def,
3533
3616
  unknownKeys: "strict",
3534
3617
  ...e !== void 0 ? {
@@ -3544,13 +3627,13 @@ class F extends A {
3544
3627
  });
3545
3628
  }
3546
3629
  strip() {
3547
- return new F({
3630
+ return new z({
3548
3631
  ...this._def,
3549
3632
  unknownKeys: "strip"
3550
3633
  });
3551
3634
  }
3552
3635
  passthrough() {
3553
- return new F({
3636
+ return new z({
3554
3637
  ...this._def,
3555
3638
  unknownKeys: "passthrough"
3556
3639
  });
@@ -3573,7 +3656,7 @@ class F extends A {
3573
3656
  // }) as any;
3574
3657
  // };
3575
3658
  extend(e) {
3576
- return new F({
3659
+ return new z({
3577
3660
  ...this._def,
3578
3661
  shape: () => ({
3579
3662
  ...this._def.shape(),
@@ -3587,7 +3670,7 @@ class F extends A {
3587
3670
  * upgrade if you are experiencing issues.
3588
3671
  */
3589
3672
  merge(e) {
3590
- return new F({
3673
+ return new z({
3591
3674
  unknownKeys: e._def.unknownKeys,
3592
3675
  catchall: e._def.catchall,
3593
3676
  shape: () => ({
@@ -3657,7 +3740,7 @@ class F extends A {
3657
3740
  // return merged;
3658
3741
  // }
3659
3742
  catchall(e) {
3660
- return new F({
3743
+ return new z({
3661
3744
  ...this._def,
3662
3745
  catchall: e
3663
3746
  });
@@ -3666,7 +3749,7 @@ class F extends A {
3666
3749
  const t = {};
3667
3750
  for (const s of T.objectKeys(e))
3668
3751
  e[s] && this.shape[s] && (t[s] = this.shape[s]);
3669
- return new F({
3752
+ return new z({
3670
3753
  ...this._def,
3671
3754
  shape: () => t
3672
3755
  });
@@ -3675,7 +3758,7 @@ class F extends A {
3675
3758
  const t = {};
3676
3759
  for (const s of T.objectKeys(this.shape))
3677
3760
  e[s] || (t[s] = this.shape[s]);
3678
- return new F({
3761
+ return new z({
3679
3762
  ...this._def,
3680
3763
  shape: () => t
3681
3764
  });
@@ -3692,7 +3775,7 @@ class F extends A {
3692
3775
  const n = this.shape[s];
3693
3776
  e && !e[s] ? t[s] = n : t[s] = n.optional();
3694
3777
  }
3695
- return new F({
3778
+ return new z({
3696
3779
  ...this._def,
3697
3780
  shape: () => t
3698
3781
  });
@@ -3708,7 +3791,7 @@ class F extends A {
3708
3791
  a = a._def.innerType;
3709
3792
  t[s] = a;
3710
3793
  }
3711
- return new F({
3794
+ return new z({
3712
3795
  ...this._def,
3713
3796
  shape: () => t
3714
3797
  });
@@ -3717,21 +3800,21 @@ class F extends A {
3717
3800
  return rr(T.objectKeys(this.shape));
3718
3801
  }
3719
3802
  }
3720
- F.create = (r, e) => new F({
3803
+ z.create = (r, e) => new z({
3721
3804
  shape: () => r,
3722
3805
  unknownKeys: "strip",
3723
3806
  catchall: ie.create(),
3724
3807
  typeName: N.ZodObject,
3725
3808
  ...C(e)
3726
3809
  });
3727
- F.strictCreate = (r, e) => new F({
3810
+ z.strictCreate = (r, e) => new z({
3728
3811
  shape: () => r,
3729
3812
  unknownKeys: "strict",
3730
3813
  catchall: ie.create(),
3731
3814
  typeName: N.ZodObject,
3732
3815
  ...C(e)
3733
3816
  });
3734
- F.lazycreate = (r, e) => new F({
3817
+ z.lazycreate = (r, e) => new z({
3735
3818
  shape: r,
3736
3819
  unknownKeys: "strip",
3737
3820
  catchall: ie.create(),
@@ -3748,15 +3831,15 @@ class Ve extends A {
3748
3831
  for (const u of a)
3749
3832
  if (u.result.status === "dirty")
3750
3833
  return t.common.issues.push(...u.ctx.common.issues), u.result;
3751
- const c = a.map((u) => new ee(u.ctx.common.issues));
3834
+ const d = a.map((u) => new ee(u.ctx.common.issues));
3752
3835
  return v(t, {
3753
3836
  code: g.invalid_union,
3754
- unionErrors: c
3837
+ unionErrors: d
3755
3838
  }), j;
3756
3839
  }
3757
3840
  if (t.common.async)
3758
3841
  return Promise.all(s.map(async (a) => {
3759
- const c = {
3842
+ const d = {
3760
3843
  ...t,
3761
3844
  common: {
3762
3845
  ...t.common,
@@ -3768,14 +3851,14 @@ class Ve extends A {
3768
3851
  result: await a._parseAsync({
3769
3852
  data: t.data,
3770
3853
  path: t.path,
3771
- parent: c
3854
+ parent: d
3772
3855
  }),
3773
- ctx: c
3856
+ ctx: d
3774
3857
  };
3775
3858
  })).then(n);
3776
3859
  {
3777
3860
  let a;
3778
- const c = [];
3861
+ const d = [];
3779
3862
  for (const i of s) {
3780
3863
  const o = {
3781
3864
  ...t,
@@ -3791,11 +3874,11 @@ class Ve extends A {
3791
3874
  });
3792
3875
  if (l.status === "valid")
3793
3876
  return l;
3794
- l.status === "dirty" && !a && (a = { result: l, ctx: o }), o.common.issues.length && c.push(o.common.issues);
3877
+ l.status === "dirty" && !a && (a = { result: l, ctx: o }), o.common.issues.length && d.push(o.common.issues);
3795
3878
  }
3796
3879
  if (a)
3797
3880
  return t.common.issues.push(...a.ctx.common.issues), a.result;
3798
- const u = c.map((i) => new ee(i));
3881
+ const u = d.map((i) => new ee(i));
3799
3882
  return v(t, {
3800
3883
  code: g.invalid_union,
3801
3884
  unionErrors: u
@@ -3811,25 +3894,25 @@ Ve.create = (r, e) => new Ve({
3811
3894
  typeName: N.ZodUnion,
3812
3895
  ...C(e)
3813
3896
  });
3814
- function tt(r, e) {
3897
+ function st(r, e) {
3815
3898
  const t = se(r), s = se(e);
3816
3899
  if (r === e)
3817
3900
  return { valid: !0, data: r };
3818
3901
  if (t === _.object && s === _.object) {
3819
- const n = T.objectKeys(e), a = T.objectKeys(r).filter((u) => n.indexOf(u) !== -1), c = { ...r, ...e };
3902
+ const n = T.objectKeys(e), a = T.objectKeys(r).filter((u) => n.indexOf(u) !== -1), d = { ...r, ...e };
3820
3903
  for (const u of a) {
3821
- const i = tt(r[u], e[u]);
3904
+ const i = st(r[u], e[u]);
3822
3905
  if (!i.valid)
3823
3906
  return { valid: !1 };
3824
- c[u] = i.data;
3907
+ d[u] = i.data;
3825
3908
  }
3826
- return { valid: !0, data: c };
3909
+ return { valid: !0, data: d };
3827
3910
  } else if (t === _.array && s === _.array) {
3828
3911
  if (r.length !== e.length)
3829
3912
  return { valid: !1 };
3830
3913
  const n = [];
3831
3914
  for (let a = 0; a < r.length; a++) {
3832
- const c = r[a], u = e[a], i = tt(c, u);
3915
+ const d = r[a], u = e[a], i = st(d, u);
3833
3916
  if (!i.valid)
3834
3917
  return { valid: !1 };
3835
3918
  n.push(i.data);
@@ -3837,13 +3920,13 @@ function tt(r, e) {
3837
3920
  return { valid: !0, data: n };
3838
3921
  } else return t === _.date && s === _.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
3839
3922
  }
3840
- class Ue extends A {
3923
+ class Be extends A {
3841
3924
  _parse(e) {
3842
- const { status: t, ctx: s } = this._processInputParams(e), n = (a, c) => {
3843
- if (_t(a) || _t(c))
3925
+ const { status: t, ctx: s } = this._processInputParams(e), n = (a, d) => {
3926
+ if (_t(a) || _t(d))
3844
3927
  return j;
3845
- const u = tt(a.value, c.value);
3846
- return u.valid ? ((xt(a) || xt(c)) && t.dirty(), { status: t.value, value: u.data }) : (v(s, {
3928
+ const u = st(a.value, d.value);
3929
+ return u.valid ? ((xt(a) || xt(d)) && t.dirty(), { status: t.value, value: u.data }) : (v(s, {
3847
3930
  code: g.invalid_intersection_types
3848
3931
  }), j);
3849
3932
  };
@@ -3858,7 +3941,7 @@ class Ue extends A {
3858
3941
  path: s.path,
3859
3942
  parent: s
3860
3943
  })
3861
- ]).then(([a, c]) => n(a, c)) : n(this._def.left._parseSync({
3944
+ ]).then(([a, d]) => n(a, d)) : n(this._def.left._parseSync({
3862
3945
  data: s.data,
3863
3946
  path: s.path,
3864
3947
  parent: s
@@ -3869,7 +3952,7 @@ class Ue extends A {
3869
3952
  }));
3870
3953
  }
3871
3954
  }
3872
- Ue.create = (r, e, t) => new Ue({
3955
+ Be.create = (r, e, t) => new Be({
3873
3956
  left: r,
3874
3957
  right: e,
3875
3958
  typeName: N.ZodIntersection,
@@ -3899,11 +3982,11 @@ class fe extends A {
3899
3982
  exact: !1,
3900
3983
  type: "array"
3901
3984
  }), t.dirty());
3902
- const a = [...s.data].map((c, u) => {
3985
+ const a = [...s.data].map((d, u) => {
3903
3986
  const i = this._def.items[u] || this._def.rest;
3904
- return i ? i._parse(new ae(s, c, s.path, u)) : null;
3905
- }).filter((c) => !!c);
3906
- return s.common.async ? Promise.all(a).then((c) => H.mergeArray(t, c)) : H.mergeArray(t, a);
3987
+ return i ? i._parse(new ae(s, d, s.path, u)) : null;
3988
+ }).filter((d) => !!d);
3989
+ return s.common.async ? Promise.all(a).then((d) => H.mergeArray(t, d)) : H.mergeArray(t, a);
3907
3990
  }
3908
3991
  get items() {
3909
3992
  return this._def.items;
@@ -3940,14 +4023,14 @@ class St extends A {
3940
4023
  expected: _.map,
3941
4024
  received: s.parsedType
3942
4025
  }), j;
3943
- const n = this._def.keyType, a = this._def.valueType, c = [...s.data.entries()].map(([u, i], o) => ({
4026
+ const n = this._def.keyType, a = this._def.valueType, d = [...s.data.entries()].map(([u, i], o) => ({
3944
4027
  key: n._parse(new ae(s, u, s.path, [o, "key"])),
3945
4028
  value: a._parse(new ae(s, i, s.path, [o, "value"]))
3946
4029
  }));
3947
4030
  if (s.common.async) {
3948
4031
  const u = /* @__PURE__ */ new Map();
3949
4032
  return Promise.resolve().then(async () => {
3950
- for (const i of c) {
4033
+ for (const i of d) {
3951
4034
  const o = await i.key, l = await i.value;
3952
4035
  if (o.status === "aborted" || l.status === "aborted")
3953
4036
  return j;
@@ -3957,7 +4040,7 @@ class St extends A {
3957
4040
  });
3958
4041
  } else {
3959
4042
  const u = /* @__PURE__ */ new Map();
3960
- for (const i of c) {
4043
+ for (const i of d) {
3961
4044
  const o = i.key, l = i.value;
3962
4045
  if (o.status === "aborted" || l.status === "aborted")
3963
4046
  return j;
@@ -3973,7 +4056,7 @@ St.create = (r, e, t) => new St({
3973
4056
  typeName: N.ZodMap,
3974
4057
  ...C(t)
3975
4058
  });
3976
- class Oe extends A {
4059
+ class Pe extends A {
3977
4060
  _parse(e) {
3978
4061
  const { status: t, ctx: s } = this._processInputParams(e);
3979
4062
  if (s.parsedType !== _.set)
@@ -3999,7 +4082,7 @@ class Oe extends A {
3999
4082
  message: n.maxSize.message
4000
4083
  }), t.dirty());
4001
4084
  const a = this._def.valueType;
4002
- function c(i) {
4085
+ function d(i) {
4003
4086
  const o = /* @__PURE__ */ new Set();
4004
4087
  for (const l of i) {
4005
4088
  if (l.status === "aborted")
@@ -4009,16 +4092,16 @@ class Oe extends A {
4009
4092
  return { status: t.value, value: o };
4010
4093
  }
4011
4094
  const u = [...s.data.values()].map((i, o) => a._parse(new ae(s, i, s.path, o)));
4012
- return s.common.async ? Promise.all(u).then((i) => c(i)) : c(u);
4095
+ return s.common.async ? Promise.all(u).then((i) => d(i)) : d(u);
4013
4096
  }
4014
4097
  min(e, t) {
4015
- return new Oe({
4098
+ return new Pe({
4016
4099
  ...this._def,
4017
4100
  minSize: { value: e, message: b.toString(t) }
4018
4101
  });
4019
4102
  }
4020
4103
  max(e, t) {
4021
- return new Oe({
4104
+ return new Pe({
4022
4105
  ...this._def,
4023
4106
  maxSize: { value: e, message: b.toString(t) }
4024
4107
  });
@@ -4030,7 +4113,7 @@ class Oe extends A {
4030
4113
  return this.min(1, e);
4031
4114
  }
4032
4115
  }
4033
- Oe.create = (r, e) => new Oe({
4116
+ Pe.create = (r, e) => new Pe({
4034
4117
  valueType: r,
4035
4118
  minSize: null,
4036
4119
  maxSize: null,
@@ -4073,13 +4156,13 @@ At.create = (r, e) => new At({
4073
4156
  ...C(e)
4074
4157
  });
4075
4158
  function rr(r, e) {
4076
- return new ve({
4159
+ return new _e({
4077
4160
  values: r,
4078
4161
  typeName: N.ZodEnum,
4079
4162
  ...C(e)
4080
4163
  });
4081
4164
  }
4082
- class ve extends A {
4165
+ class _e extends A {
4083
4166
  _parse(e) {
4084
4167
  if (typeof e.data != "string") {
4085
4168
  const t = this._getOrReturnCtx(e), s = this._def.values;
@@ -4121,19 +4204,19 @@ class ve extends A {
4121
4204
  return e;
4122
4205
  }
4123
4206
  extract(e, t = this._def) {
4124
- return ve.create(e, {
4207
+ return _e.create(e, {
4125
4208
  ...this._def,
4126
4209
  ...t
4127
4210
  });
4128
4211
  }
4129
4212
  exclude(e, t = this._def) {
4130
- return ve.create(this.options.filter((s) => !e.includes(s)), {
4213
+ return _e.create(this.options.filter((s) => !e.includes(s)), {
4131
4214
  ...this._def,
4132
4215
  ...t
4133
4216
  });
4134
4217
  }
4135
4218
  }
4136
- ve.create = rr;
4219
+ _e.create = rr;
4137
4220
  class Tt extends A {
4138
4221
  _parse(e) {
4139
4222
  const t = T.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
@@ -4164,7 +4247,7 @@ Tt.create = (r, e) => new Tt({
4164
4247
  typeName: N.ZodNativeEnum,
4165
4248
  ...C(e)
4166
4249
  });
4167
- class Be extends A {
4250
+ class We extends A {
4168
4251
  unwrap() {
4169
4252
  return this._def.type;
4170
4253
  }
@@ -4183,12 +4266,12 @@ class Be extends A {
4183
4266
  })));
4184
4267
  }
4185
4268
  }
4186
- Be.create = (r, e) => new Be({
4269
+ We.create = (r, e) => new We({
4187
4270
  type: r,
4188
4271
  typeName: N.ZodPromise,
4189
4272
  ...C(e)
4190
4273
  });
4191
- class _e extends A {
4274
+ class xe extends A {
4192
4275
  innerType() {
4193
4276
  return this._def.schema;
4194
4277
  }
@@ -4197,17 +4280,17 @@ class _e extends A {
4197
4280
  }
4198
4281
  _parse(e) {
4199
4282
  const { status: t, ctx: s } = this._processInputParams(e), n = this._def.effect || null, a = {
4200
- addIssue: (c) => {
4201
- v(s, c), c.fatal ? t.abort() : t.dirty();
4283
+ addIssue: (d) => {
4284
+ v(s, d), d.fatal ? t.abort() : t.dirty();
4202
4285
  },
4203
4286
  get path() {
4204
4287
  return s.path;
4205
4288
  }
4206
4289
  };
4207
4290
  if (a.addIssue = a.addIssue.bind(a), n.type === "preprocess") {
4208
- const c = n.transform(s.data, a);
4291
+ const d = n.transform(s.data, a);
4209
4292
  if (s.common.async)
4210
- return Promise.resolve(c).then(async (u) => {
4293
+ return Promise.resolve(d).then(async (u) => {
4211
4294
  if (t.value === "aborted")
4212
4295
  return j;
4213
4296
  const i = await this._def.schema._parseAsync({
@@ -4215,21 +4298,21 @@ class _e extends A {
4215
4298
  path: s.path,
4216
4299
  parent: s
4217
4300
  });
4218
- return i.status === "aborted" ? j : i.status === "dirty" || t.value === "dirty" ? Te(i.value) : i;
4301
+ return i.status === "aborted" ? j : i.status === "dirty" || t.value === "dirty" ? Oe(i.value) : i;
4219
4302
  });
4220
4303
  {
4221
4304
  if (t.value === "aborted")
4222
4305
  return j;
4223
4306
  const u = this._def.schema._parseSync({
4224
- data: c,
4307
+ data: d,
4225
4308
  path: s.path,
4226
4309
  parent: s
4227
4310
  });
4228
- return u.status === "aborted" ? j : u.status === "dirty" || t.value === "dirty" ? Te(u.value) : u;
4311
+ return u.status === "aborted" ? j : u.status === "dirty" || t.value === "dirty" ? Oe(u.value) : u;
4229
4312
  }
4230
4313
  }
4231
4314
  if (n.type === "refinement") {
4232
- const c = (u) => {
4315
+ const d = (u) => {
4233
4316
  const i = n.refinement(u, a);
4234
4317
  if (s.common.async)
4235
4318
  return Promise.resolve(i);
@@ -4243,38 +4326,38 @@ class _e extends A {
4243
4326
  path: s.path,
4244
4327
  parent: s
4245
4328
  });
4246
- return u.status === "aborted" ? j : (u.status === "dirty" && t.dirty(), c(u.value), { status: t.value, value: u.value });
4329
+ return u.status === "aborted" ? j : (u.status === "dirty" && t.dirty(), d(u.value), { status: t.value, value: u.value });
4247
4330
  } else
4248
- return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((u) => u.status === "aborted" ? j : (u.status === "dirty" && t.dirty(), c(u.value).then(() => ({ status: t.value, value: u.value }))));
4331
+ return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((u) => u.status === "aborted" ? j : (u.status === "dirty" && t.dirty(), d(u.value).then(() => ({ status: t.value, value: u.value }))));
4249
4332
  }
4250
4333
  if (n.type === "transform")
4251
4334
  if (s.common.async === !1) {
4252
- const c = this._def.schema._parseSync({
4335
+ const d = this._def.schema._parseSync({
4253
4336
  data: s.data,
4254
4337
  path: s.path,
4255
4338
  parent: s
4256
4339
  });
4257
- if (!ge(c))
4340
+ if (!ye(d))
4258
4341
  return j;
4259
- const u = n.transform(c.value, a);
4342
+ const u = n.transform(d.value, a);
4260
4343
  if (u instanceof Promise)
4261
4344
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
4262
4345
  return { status: t.value, value: u };
4263
4346
  } else
4264
- return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((c) => ge(c) ? Promise.resolve(n.transform(c.value, a)).then((u) => ({
4347
+ return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((d) => ye(d) ? Promise.resolve(n.transform(d.value, a)).then((u) => ({
4265
4348
  status: t.value,
4266
4349
  value: u
4267
4350
  })) : j);
4268
4351
  T.assertNever(n);
4269
4352
  }
4270
4353
  }
4271
- _e.create = (r, e, t) => new _e({
4354
+ xe.create = (r, e, t) => new xe({
4272
4355
  schema: r,
4273
4356
  typeName: N.ZodEffects,
4274
4357
  effect: e,
4275
4358
  ...C(t)
4276
4359
  });
4277
- _e.createWithPreprocess = (r, e, t) => new _e({
4360
+ xe.createWithPreprocess = (r, e, t) => new xe({
4278
4361
  schema: e,
4279
4362
  effect: { type: "preprocess", transform: r },
4280
4363
  typeName: N.ZodEffects,
@@ -4293,7 +4376,7 @@ ne.create = (r, e) => new ne({
4293
4376
  typeName: N.ZodOptional,
4294
4377
  ...C(e)
4295
4378
  });
4296
- class xe extends A {
4379
+ class be extends A {
4297
4380
  _parse(e) {
4298
4381
  return this._getType(e) === _.null ? J(null) : this._def.innerType._parse(e);
4299
4382
  }
@@ -4301,12 +4384,12 @@ class xe extends A {
4301
4384
  return this._def.innerType;
4302
4385
  }
4303
4386
  }
4304
- xe.create = (r, e) => new xe({
4387
+ be.create = (r, e) => new be({
4305
4388
  innerType: r,
4306
4389
  typeName: N.ZodNullable,
4307
4390
  ...C(e)
4308
4391
  });
4309
- class rt extends A {
4392
+ class nt extends A {
4310
4393
  _parse(e) {
4311
4394
  const { ctx: t } = this._processInputParams(e);
4312
4395
  let s = t.data;
@@ -4320,13 +4403,13 @@ class rt extends A {
4320
4403
  return this._def.innerType;
4321
4404
  }
4322
4405
  }
4323
- rt.create = (r, e) => new rt({
4406
+ nt.create = (r, e) => new nt({
4324
4407
  innerType: r,
4325
4408
  typeName: N.ZodDefault,
4326
4409
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
4327
4410
  ...C(e)
4328
4411
  });
4329
- class st extends A {
4412
+ class at extends A {
4330
4413
  _parse(e) {
4331
4414
  const { ctx: t } = this._processInputParams(e), s = {
4332
4415
  ...t,
@@ -4363,7 +4446,7 @@ class st extends A {
4363
4446
  return this._def.innerType;
4364
4447
  }
4365
4448
  }
4366
- st.create = (r, e) => new st({
4449
+ at.create = (r, e) => new at({
4367
4450
  innerType: r,
4368
4451
  typeName: N.ZodCatch,
4369
4452
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
@@ -4386,7 +4469,7 @@ Ot.create = (r) => new Ot({
4386
4469
  typeName: N.ZodNaN,
4387
4470
  ...C(r)
4388
4471
  });
4389
- class Fs extends A {
4472
+ class Us extends A {
4390
4473
  _parse(e) {
4391
4474
  const { ctx: t } = this._processInputParams(e), s = t.data;
4392
4475
  return this._def.type._parse({
@@ -4409,7 +4492,7 @@ class ct extends A {
4409
4492
  path: s.path,
4410
4493
  parent: s
4411
4494
  });
4412
- return a.status === "aborted" ? j : a.status === "dirty" ? (t.dirty(), Te(a.value)) : this._def.out._parseAsync({
4495
+ return a.status === "aborted" ? j : a.status === "dirty" ? (t.dirty(), Oe(a.value)) : this._def.out._parseAsync({
4413
4496
  data: a.value,
4414
4497
  path: s.path,
4415
4498
  parent: s
@@ -4439,16 +4522,16 @@ class ct extends A {
4439
4522
  });
4440
4523
  }
4441
4524
  }
4442
- class nt extends A {
4525
+ class it extends A {
4443
4526
  _parse(e) {
4444
- const t = this._def.innerType._parse(e), s = (n) => (ge(n) && (n.value = Object.freeze(n.value)), n);
4527
+ const t = this._def.innerType._parse(e), s = (n) => (ye(n) && (n.value = Object.freeze(n.value)), n);
4445
4528
  return ze(t) ? t.then((n) => s(n)) : s(t);
4446
4529
  }
4447
4530
  unwrap() {
4448
4531
  return this._def.innerType;
4449
4532
  }
4450
4533
  }
4451
- nt.create = (r, e) => new nt({
4534
+ it.create = (r, e) => new it({
4452
4535
  innerType: r,
4453
4536
  typeName: N.ZodReadonly,
4454
4537
  ...C(e)
@@ -4457,36 +4540,36 @@ var N;
4457
4540
  (function(r) {
4458
4541
  r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
4459
4542
  })(N || (N = {}));
4460
- const Re = K.create;
4543
+ const Ae = K.create;
4461
4544
  de.create;
4462
4545
  ue.create;
4463
- Fe.create;
4464
- ye.create;
4546
+ Ue.create;
4547
+ ve.create;
4465
4548
  ie.create;
4466
4549
  X.create;
4467
- const Vs = F.create;
4550
+ const Vs = z.create;
4468
4551
  Ve.create;
4469
- Ue.create;
4470
- fe.create;
4471
- ve.create;
4472
4552
  Be.create;
4553
+ fe.create;
4554
+ _e.create;
4555
+ We.create;
4473
4556
  ne.create;
4474
- xe.create;
4557
+ be.create;
4475
4558
  const Pt = {
4476
4559
  string: ((r) => K.create({ ...r, coerce: !0 })),
4477
4560
  number: ((r) => de.create({ ...r, coerce: !0 })),
4478
- boolean: ((r) => Fe.create({
4561
+ boolean: ((r) => Ue.create({
4479
4562
  ...r,
4480
4563
  coerce: !0
4481
4564
  })),
4482
4565
  bigint: ((r) => ue.create({ ...r, coerce: !0 })),
4483
- date: ((r) => ye.create({ ...r, coerce: !0 }))
4484
- }, Us = Vs({
4485
- q: Re().optional(),
4486
- task_type: Re().optional(),
4487
- status: Re().optional(),
4488
- from_date: Re().optional(),
4489
- to_date: Re().optional(),
4566
+ date: ((r) => ve.create({ ...r, coerce: !0 }))
4567
+ }, Bs = Vs({
4568
+ q: Ae().optional(),
4569
+ task_type: Ae().optional(),
4570
+ status: Ae().optional(),
4571
+ from_date: Ae().optional(),
4572
+ to_date: Ae().optional(),
4490
4573
  page: Pt.number().int().positive().default(1),
4491
4574
  per_page: Pt.number().int().positive().default(20)
4492
4575
  });
@@ -4498,10 +4581,10 @@ function nr(r) {
4498
4581
  }
4499
4582
  function ar({ setSelectedTask: r }) {
4500
4583
  const e = (s) => {
4501
- const { data: n, raw: a, isLoading: c } = sr();
4584
+ const { data: n, raw: a, isLoading: d } = sr();
4502
4585
  return {
4503
4586
  data: n ?? [],
4504
- isLoading: c,
4587
+ isLoading: d,
4505
4588
  raw: a
4506
4589
  };
4507
4590
  }, t = [
@@ -4511,7 +4594,7 @@ function ar({ setSelectedTask: r }) {
4511
4594
  {
4512
4595
  key: "attempts",
4513
4596
  header: "Attempts",
4514
- render: (s) => /* @__PURE__ */ d.jsxs("span", { children: [
4597
+ render: (s) => /* @__PURE__ */ c.jsxs("span", { children: [
4515
4598
  s.attempts,
4516
4599
  "/",
4517
4600
  s.max_attempts
@@ -4521,24 +4604,24 @@ function ar({ setSelectedTask: r }) {
4521
4604
  key: "error",
4522
4605
  header: "Error",
4523
4606
  className: "max-w-xs truncate",
4524
- render: (s) => /* @__PURE__ */ d.jsx("span", { title: s.error || "", children: s.error })
4607
+ render: (s) => /* @__PURE__ */ c.jsx("span", { title: s.error || "", children: s.error })
4525
4608
  },
4526
4609
  {
4527
4610
  key: "created_at",
4528
4611
  header: "Created",
4529
- render: (s) => Ae(s.created_at)
4612
+ render: (s) => Te(s.created_at)
4530
4613
  }
4531
4614
  ];
4532
- return /* @__PURE__ */ d.jsx(
4533
- Ft,
4615
+ return /* @__PURE__ */ c.jsx(
4616
+ zt,
4534
4617
  {
4535
4618
  title: "Background Tasks",
4536
- paramsSchema: Us,
4619
+ paramsSchema: Bs,
4537
4620
  useQuery: e,
4538
4621
  columns: t,
4539
4622
  onRowClick: r,
4540
- renderFilters: (s, n) => /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
4541
- /* @__PURE__ */ d.jsx(
4623
+ renderFilters: (s, n) => /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
4624
+ /* @__PURE__ */ c.jsx(
4542
4625
  "input",
4543
4626
  {
4544
4627
  type: "search",
@@ -4548,38 +4631,38 @@ function ar({ setSelectedTask: r }) {
4548
4631
  onChange: (a) => n("q", a.target.value)
4549
4632
  }
4550
4633
  ),
4551
- /* @__PURE__ */ d.jsxs(
4634
+ /* @__PURE__ */ c.jsxs(
4552
4635
  "select",
4553
4636
  {
4554
4637
  className: "select select-sm select-bordered w-40",
4555
4638
  value: s.task_type || "",
4556
4639
  onChange: (a) => n("task_type", a.target.value),
4557
4640
  children: [
4558
- /* @__PURE__ */ d.jsx("option", { value: "", children: "All Types" }),
4559
- /* @__PURE__ */ d.jsx("option", { value: "email_registration", children: "Email Registration" }),
4560
- /* @__PURE__ */ d.jsx("option", { value: "email_password_reset", children: "Email Password Reset" }),
4561
- /* @__PURE__ */ d.jsx("option", { value: "email_notification", children: "Email Notification" }),
4562
- /* @__PURE__ */ d.jsx("option", { value: "resize_image", children: "Resize Image" }),
4563
- /* @__PURE__ */ d.jsx("option", { value: "zip_import", children: "Zip Import" })
4641
+ /* @__PURE__ */ c.jsx("option", { value: "", children: "All Types" }),
4642
+ /* @__PURE__ */ c.jsx("option", { value: "email_registration", children: "Email Registration" }),
4643
+ /* @__PURE__ */ c.jsx("option", { value: "email_password_reset", children: "Email Password Reset" }),
4644
+ /* @__PURE__ */ c.jsx("option", { value: "email_notification", children: "Email Notification" }),
4645
+ /* @__PURE__ */ c.jsx("option", { value: "resize_image", children: "Resize Image" }),
4646
+ /* @__PURE__ */ c.jsx("option", { value: "zip_import", children: "Zip Import" })
4564
4647
  ]
4565
4648
  }
4566
4649
  ),
4567
- /* @__PURE__ */ d.jsxs(
4650
+ /* @__PURE__ */ c.jsxs(
4568
4651
  "select",
4569
4652
  {
4570
4653
  className: "select select-sm select-bordered w-40",
4571
4654
  value: s.status || "",
4572
4655
  onChange: (a) => n("status", a.target.value),
4573
4656
  children: [
4574
- /* @__PURE__ */ d.jsx("option", { value: "", children: "All Statuses" }),
4575
- /* @__PURE__ */ d.jsx("option", { value: "pending", children: "Pending" }),
4576
- /* @__PURE__ */ d.jsx("option", { value: "running", children: "Running" }),
4577
- /* @__PURE__ */ d.jsx("option", { value: "completed", children: "Completed" }),
4578
- /* @__PURE__ */ d.jsx("option", { value: "failed", children: "Failed" })
4657
+ /* @__PURE__ */ c.jsx("option", { value: "", children: "All Statuses" }),
4658
+ /* @__PURE__ */ c.jsx("option", { value: "pending", children: "Pending" }),
4659
+ /* @__PURE__ */ c.jsx("option", { value: "running", children: "Running" }),
4660
+ /* @__PURE__ */ c.jsx("option", { value: "completed", children: "Completed" }),
4661
+ /* @__PURE__ */ c.jsx("option", { value: "failed", children: "Failed" })
4579
4662
  ]
4580
4663
  }
4581
4664
  ),
4582
- /* @__PURE__ */ d.jsx(
4665
+ /* @__PURE__ */ c.jsx(
4583
4666
  "input",
4584
4667
  {
4585
4668
  type: "date",
@@ -4587,12 +4670,12 @@ function ar({ setSelectedTask: r }) {
4587
4670
  className: "input input-sm input-bordered w-40",
4588
4671
  value: s.from_date ? s.from_date.split("T")[0] : "",
4589
4672
  onChange: (a) => {
4590
- const c = a.target.value ? new Date(a.target.value).toISOString() : void 0;
4591
- n("from_date", c);
4673
+ const d = a.target.value ? new Date(a.target.value).toISOString() : void 0;
4674
+ n("from_date", d);
4592
4675
  }
4593
4676
  }
4594
4677
  ),
4595
- /* @__PURE__ */ d.jsx(
4678
+ /* @__PURE__ */ c.jsx(
4596
4679
  "input",
4597
4680
  {
4598
4681
  type: "date",
@@ -4600,8 +4683,8 @@ function ar({ setSelectedTask: r }) {
4600
4683
  className: "input input-sm input-bordered w-40",
4601
4684
  value: s.to_date ? s.to_date.split("T")[0] : "",
4602
4685
  onChange: (a) => {
4603
- const c = a.target.value ? new Date(a.target.value).toISOString() : void 0;
4604
- n("to_date", c);
4686
+ const d = a.target.value ? new Date(a.target.value).toISOString() : void 0;
4687
+ n("to_date", d);
4605
4688
  }
4606
4689
  }
4607
4690
  )
@@ -4614,104 +4697,104 @@ function ir({ selectedTask: r, setSelectedTask: e }) {
4614
4697
  const s = nr(r?.id).data ?? null;
4615
4698
  if (!r) return null;
4616
4699
  const n = s?.payload ?? r.payload ?? null;
4617
- return /* @__PURE__ */ d.jsx(
4700
+ return /* @__PURE__ */ c.jsx(
4618
4701
  "div",
4619
4702
  {
4620
4703
  className: "modal modal-open",
4621
4704
  role: "dialog",
4622
4705
  onClick: () => e(null),
4623
- children: /* @__PURE__ */ d.jsxs("div", { className: "modal-box max-w-3xl", onClick: (a) => a.stopPropagation(), children: [
4624
- /* @__PURE__ */ d.jsxs("h3", { className: "font-bold text-lg", children: [
4706
+ children: /* @__PURE__ */ c.jsxs("div", { className: "modal-box max-w-3xl", onClick: (a) => a.stopPropagation(), children: [
4707
+ /* @__PURE__ */ c.jsxs("h3", { className: "font-bold text-lg", children: [
4625
4708
  "Task #",
4626
4709
  r.id,
4627
4710
  " — ",
4628
4711
  r.task_type
4629
4712
  ] }),
4630
- /* @__PURE__ */ d.jsxs("div", { className: "mt-4 grid grid-cols-2 gap-4 text-sm", children: [
4631
- /* @__PURE__ */ d.jsxs("div", { children: [
4632
- /* @__PURE__ */ d.jsx("strong", { children: "Status:" }),
4713
+ /* @__PURE__ */ c.jsxs("div", { className: "mt-4 grid grid-cols-2 gap-4 text-sm", children: [
4714
+ /* @__PURE__ */ c.jsxs("div", { children: [
4715
+ /* @__PURE__ */ c.jsx("strong", { children: "Status:" }),
4633
4716
  " ",
4634
4717
  r.status
4635
4718
  ] }),
4636
- /* @__PURE__ */ d.jsxs("div", { children: [
4637
- /* @__PURE__ */ d.jsx("strong", { children: "Attempts:" }),
4719
+ /* @__PURE__ */ c.jsxs("div", { children: [
4720
+ /* @__PURE__ */ c.jsx("strong", { children: "Attempts:" }),
4638
4721
  " ",
4639
4722
  r.attempts,
4640
4723
  "/",
4641
4724
  r.max_attempts
4642
4725
  ] }),
4643
- /* @__PURE__ */ d.jsxs("div", { children: [
4644
- /* @__PURE__ */ d.jsx("strong", { children: "Scheduled:" }),
4726
+ /* @__PURE__ */ c.jsxs("div", { children: [
4727
+ /* @__PURE__ */ c.jsx("strong", { children: "Scheduled:" }),
4645
4728
  " ",
4646
4729
  r.scheduled_for ?? "—"
4647
4730
  ] }),
4648
- /* @__PURE__ */ d.jsxs("div", { children: [
4649
- /* @__PURE__ */ d.jsx("strong", { children: "Started:" }),
4731
+ /* @__PURE__ */ c.jsxs("div", { children: [
4732
+ /* @__PURE__ */ c.jsx("strong", { children: "Started:" }),
4650
4733
  " ",
4651
- Ae(r.started_at)
4734
+ Te(r.started_at)
4652
4735
  ] }),
4653
- /* @__PURE__ */ d.jsxs("div", { children: [
4654
- /* @__PURE__ */ d.jsx("strong", { children: "Completed:" }),
4736
+ /* @__PURE__ */ c.jsxs("div", { children: [
4737
+ /* @__PURE__ */ c.jsx("strong", { children: "Completed:" }),
4655
4738
  " ",
4656
- Ae(r.completed_at)
4739
+ Te(r.completed_at)
4657
4740
  ] }),
4658
- /* @__PURE__ */ d.jsxs("div", { children: [
4659
- /* @__PURE__ */ d.jsx("strong", { children: "Created:" }),
4741
+ /* @__PURE__ */ c.jsxs("div", { children: [
4742
+ /* @__PURE__ */ c.jsx("strong", { children: "Created:" }),
4660
4743
  " ",
4661
- Ae(r.created_at)
4744
+ Te(r.created_at)
4662
4745
  ] }),
4663
- /* @__PURE__ */ d.jsxs("div", { children: [
4664
- /* @__PURE__ */ d.jsx("strong", { children: "Updated:" }),
4746
+ /* @__PURE__ */ c.jsxs("div", { children: [
4747
+ /* @__PURE__ */ c.jsx("strong", { children: "Updated:" }),
4665
4748
  " ",
4666
- Ae(r.updated_at)
4749
+ Te(r.updated_at)
4667
4750
  ] }),
4668
- /* @__PURE__ */ d.jsxs("div", { className: "col-span-2", children: [
4669
- /* @__PURE__ */ d.jsx("strong", { children: "Error:" }),
4670
- /* @__PURE__ */ d.jsx("div", { className: "whitespace-pre-wrap", children: r.error ?? "—" })
4751
+ /* @__PURE__ */ c.jsxs("div", { className: "col-span-2", children: [
4752
+ /* @__PURE__ */ c.jsx("strong", { children: "Error:" }),
4753
+ /* @__PURE__ */ c.jsx("div", { className: "whitespace-pre-wrap", children: r.error ?? "—" })
4671
4754
  ] }),
4672
- /* @__PURE__ */ d.jsxs("div", { className: "col-span-2", children: [
4673
- /* @__PURE__ */ d.jsx("strong", { children: "Payload:" }),
4674
- /* @__PURE__ */ d.jsx("pre", { className: "bg-base-200 p-2 rounded max-h-48 overflow-auto text-xs", children: (() => {
4755
+ /* @__PURE__ */ c.jsxs("div", { className: "col-span-2", children: [
4756
+ /* @__PURE__ */ c.jsx("strong", { children: "Payload:" }),
4757
+ /* @__PURE__ */ c.jsx("pre", { className: "bg-base-200 p-2 rounded max-h-48 overflow-auto text-xs", children: (() => {
4675
4758
  const a = n;
4676
4759
  if (a == null) return "—";
4677
4760
  try {
4678
- const c = typeof a == "string" ? JSON.parse(a) : a;
4679
- return JSON.stringify(c ?? "—", null, 2);
4761
+ const d = typeof a == "string" ? JSON.parse(a) : a;
4762
+ return JSON.stringify(d ?? "—", null, 2);
4680
4763
  } catch {
4681
4764
  return typeof a == "string" ? a : JSON.stringify(a);
4682
4765
  }
4683
4766
  })() })
4684
4767
  ] })
4685
4768
  ] }),
4686
- /* @__PURE__ */ d.jsx("div", { className: "modal-action", children: /* @__PURE__ */ d.jsx("button", { className: "btn", onClick: () => e(null), children: "Close" }) })
4769
+ /* @__PURE__ */ c.jsx("div", { className: "modal-action", children: /* @__PURE__ */ c.jsx("button", { className: "btn", onClick: () => e(null), children: "Close" }) })
4687
4770
  ] })
4688
4771
  }
4689
4772
  );
4690
4773
  }
4691
- const tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4774
+ const rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4692
4775
  __proto__: null,
4693
4776
  AdminLayout: $t,
4694
- AlertCard: Rr,
4695
- GenericFormModal: Ar,
4696
- GenericList: Ft,
4697
- ModalErrors: ss,
4698
- Pagination: zt,
4699
- QRCodeGenerator: ms,
4777
+ AlertCard: Ar,
4778
+ GenericFormModal: Tr,
4779
+ GenericList: zt,
4780
+ ModalErrors: ns,
4781
+ Pagination: Zt,
4782
+ QRCodeGenerator: ps,
4700
4783
  TasksList: ar,
4701
4784
  TasksModal: ir
4702
4785
  }, Symbol.toStringTag, { value: "Module" }));
4703
- function Bs() {
4704
- const [r, e] = at(null);
4705
- return /* @__PURE__ */ d.jsxs($t, { title: "Tasks", children: [
4706
- /* @__PURE__ */ d.jsx(ar, { setSelectedTask: e }),
4707
- /* @__PURE__ */ d.jsx(ir, { selectedTask: r, setSelectedTask: e })
4786
+ function Ws() {
4787
+ const [r, e] = qe(null);
4788
+ return /* @__PURE__ */ c.jsxs($t, { title: "Tasks", children: [
4789
+ /* @__PURE__ */ c.jsx(ar, { setSelectedTask: e }),
4790
+ /* @__PURE__ */ c.jsx(ir, { selectedTask: r, setSelectedTask: e })
4708
4791
  ] });
4709
4792
  }
4710
- const rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4793
+ const sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4711
4794
  __proto__: null,
4712
- AdminTasks: Bs
4795
+ AdminTasks: Ws
4713
4796
  }, Symbol.toStringTag, { value: "Module" }));
4714
- function sn({
4797
+ function nn({
4715
4798
  label: r,
4716
4799
  field: e,
4717
4800
  params: t,
@@ -4719,22 +4802,22 @@ function sn({
4719
4802
  setFilters: n,
4720
4803
  className: a = ""
4721
4804
  }) {
4722
- const c = t.sort_by, u = t.sort_order, i = c === e, o = i ? u === "asc" ? pr : gr : mr, l = () => {
4805
+ const d = t.sort_by, u = t.sort_order, i = d === e, o = i ? u === "asc" ? gr : yr : pr, l = () => {
4723
4806
  let f = "asc";
4724
4807
  i && u === "asc" && (f = "desc"), n ? n({
4725
4808
  sort_by: e,
4726
4809
  sort_order: f
4727
4810
  }) : (s("sort_by", e), s("sort_order", f));
4728
4811
  };
4729
- return /* @__PURE__ */ d.jsxs(
4812
+ return /* @__PURE__ */ c.jsxs(
4730
4813
  "div",
4731
4814
  {
4732
4815
  className: `cursor-pointer hover:bg-base-200 transition-colors flex items-center gap-2 select-none ${a}`,
4733
4816
  onClick: l,
4734
4817
  children: [
4735
4818
  r,
4736
- /* @__PURE__ */ d.jsx(
4737
- it,
4819
+ /* @__PURE__ */ c.jsx(
4820
+ Qe,
4738
4821
  {
4739
4822
  icon: o,
4740
4823
  className: i ? "text-primary" : "text-base-content/30"
@@ -4744,13 +4827,13 @@ function sn({
4744
4827
  }
4745
4828
  );
4746
4829
  }
4747
- function nn() {
4830
+ function an() {
4748
4831
  return {
4749
4832
  useList: (r) => sr(),
4750
4833
  useGet: (r) => nr()
4751
4834
  };
4752
4835
  }
4753
- function an(r, e) {
4836
+ function on(r, e) {
4754
4837
  const t = {};
4755
4838
  e.defaults && Object.assign(t, e.defaults);
4756
4839
  for (const [s, n] of Object.entries(r || {}))
@@ -4770,18 +4853,18 @@ function an(r, e) {
4770
4853
  }
4771
4854
  export {
4772
4855
  $t as AdminLayout,
4773
- xr as AuthProvider,
4774
- Ft as GenericList,
4775
- zt as Pagination,
4776
- sn as SortHeader,
4777
- Js as auth,
4778
- Xs as buildApiQuery,
4779
- tn as components,
4780
- rn as pages,
4781
- gt as parseParams,
4782
- Le as toSearchParams,
4856
+ br as AuthProvider,
4857
+ zt as GenericList,
4858
+ Zt as Pagination,
4859
+ nn as SortHeader,
4860
+ Xs as auth,
4861
+ Ks as buildApiQuery,
4862
+ rn as components,
4863
+ sn as pages,
4864
+ ht as parseParams,
4865
+ $e as toSearchParams,
4783
4866
  te as useAuthApi,
4784
4867
  Mt as useAuthConfig,
4785
- nn as useTasksApi,
4786
- an as validateParams
4868
+ an as useTasksApi,
4869
+ on as validateParams
4787
4870
  };