izen-react-starter 2.5.2 → 2.5.3
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/{2SSKDMRQ-CWL4okbo.js → 2SSKDMRQ-MU7tZ_3q.js} +2 -2
- package/dist/{AP7HFJJL-CcatCEJn.js → AP7HFJJL-CQPjYSGN.js} +1 -1
- package/dist/{WDYDFRGG-DCFoZONs.js → WDYDFRGG-COEKW1CJ.js} +2 -2
- package/dist/{index-H_H0CMtF.js → index-CNAniocf.js} +38 -26
- package/dist/react-starter.js +1 -1
- package/dist/react-starter.umd.cjs +1 -1
- package/dist/src/components/layout/DashboardLayout.d.ts.map +1 -1
- package/dist/src/components/navigation/Sidebar.d.ts +3 -1
- package/dist/src/components/navigation/Sidebar.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./AP7HFJJL-
|
|
2
|
-
import { g as h, c as v, a as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./AP7HFJJL-CQPjYSGN.js";
|
|
2
|
+
import { g as h, c as v, a as e } from "./index-CNAniocf.js";
|
|
3
3
|
var C = (r) => {
|
|
4
4
|
const [t, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var xs = Object.defineProperty;
|
|
2
2
|
var $s = (e, t, n) => t in e ? xs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Re = (e, t, n) => $s(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { b as $e, d as B, o as ft, e as H, c as P, a as m, P as No, m as ve, S as K, t as _, i as k, f as U, h as F, j as Cs, k as ur, u as Ce, l as V, s as Qn, n as Yn, p as gt, q as T, r as Ss, v as Ut, w as _t, x as qe, y as ks, z as Rt, A as Bt, B as Es, C as Ds, D as En, F as As, E as Ht, $ as Ho, G as Ms, H as Ts, I as W, J as Vr, K as Fs, L as Is, M as cr, N as Os, O as Ls, Q as Hn, R as Ps, T as qs, U as ie, V as _s, W as Rs } from "./index-
|
|
4
|
+
import { b as $e, d as B, o as ft, e as H, c as P, a as m, P as No, m as ve, S as K, t as _, i as k, f as U, h as F, j as Cs, k as ur, u as Ce, l as V, s as Qn, n as Yn, p as gt, q as T, r as Ss, v as Ut, w as _t, x as qe, y as ks, z as Rt, A as Bt, B as Es, C as Ds, D as En, F as As, E as Ht, $ as Ho, G as Ms, H as Ts, I as W, J as Vr, K as Fs, L as Is, M as cr, N as Os, O as Ls, Q as Hn, R as Ps, T as qs, U as ie, V as _s, W as Rs } from "./index-CNAniocf.js";
|
|
5
5
|
var zs = (e) => e != null, Ks = (e) => e.filter(zs);
|
|
6
6
|
function Bs(e) {
|
|
7
7
|
return (...t) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./AP7HFJJL-
|
|
2
|
-
import { g as d, c as f, a as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./AP7HFJJL-CQPjYSGN.js";
|
|
2
|
+
import { g as d, c as f, a as e } from "./index-CNAniocf.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -9165,7 +9165,7 @@ var Y3e = (e, t = !1) => {
|
|
|
9165
9165
|
const t = O$(() => {
|
|
9166
9166
|
const n = this, [r] = I(this, Cc), [o] = I(this, Ec), [i] = I(this, _c), [a] = I(this, Oc), [s] = I(this, Ff), [l] = I(this, xc), [c] = I(this, Nc);
|
|
9167
9167
|
let u;
|
|
9168
|
-
return I(this, Pc) ? u = I(this, Pc) : (u = E$(() => import("./WDYDFRGG-
|
|
9168
|
+
return I(this, Pc) ? u = I(this, Pc) : (u = E$(() => import("./WDYDFRGG-COEKW1CJ.js")), fe(this, Pc, u)), H$(I(this, $f), I(this, Sc)), S$(u, C$({
|
|
9169
9169
|
get queryFlavor() {
|
|
9170
9170
|
return I(n, Df);
|
|
9171
9171
|
},
|
|
@@ -9272,7 +9272,7 @@ var Y3e = (e, t = !1) => {
|
|
|
9272
9272
|
const t = O$(() => {
|
|
9273
9273
|
const n = this, [r] = I(this, Tc), [o] = I(this, Rc), [i] = I(this, Mc), [a] = I(this, Dc), [s] = I(this, Uf), [l] = I(this, kc), [c] = I(this, Ic), [u] = I(this, Fc);
|
|
9274
9274
|
let d;
|
|
9275
|
-
return I(this, $c) ? d = I(this, $c) : (d = E$(() => import("./2SSKDMRQ-
|
|
9275
|
+
return I(this, $c) ? d = I(this, $c) : (d = E$(() => import("./2SSKDMRQ-MU7tZ_3q.js")), fe(this, $c, d)), H$(I(this, Bf), I(this, Ac)), S$(d, C$({
|
|
9276
9276
|
get queryFlavor() {
|
|
9277
9277
|
return I(n, zf);
|
|
9278
9278
|
},
|
|
@@ -59914,25 +59914,37 @@ const C5e = ({ user: e, onLogout: t, className: n }) => {
|
|
|
59914
59914
|
logoIcon: a = Tre,
|
|
59915
59915
|
className: s,
|
|
59916
59916
|
pageTitles: l = {},
|
|
59917
|
-
|
|
59918
|
-
|
|
59919
|
-
|
|
59920
|
-
|
|
59921
|
-
|
|
59922
|
-
|
|
59923
|
-
|
|
59924
|
-
|
|
59925
|
-
|
|
59926
|
-
|
|
59927
|
-
|
|
59928
|
-
|
|
59929
|
-
|
|
59930
|
-
|
|
59931
|
-
|
|
59932
|
-
|
|
59933
|
-
|
|
59934
|
-
|
|
59935
|
-
|
|
59917
|
+
variant: c = "sidebar",
|
|
59918
|
+
collapsible: u = "icon",
|
|
59919
|
+
...d
|
|
59920
|
+
}) => /* @__PURE__ */ M(
|
|
59921
|
+
IW,
|
|
59922
|
+
{
|
|
59923
|
+
variant: c,
|
|
59924
|
+
collapsible: u,
|
|
59925
|
+
className: j(s),
|
|
59926
|
+
...d,
|
|
59927
|
+
children: [
|
|
59928
|
+
/* @__PURE__ */ v(jW, { children: /* @__PURE__ */ v(Du, { children: /* @__PURE__ */ v(cl, { children: /* @__PURE__ */ v(
|
|
59929
|
+
ul,
|
|
59930
|
+
{
|
|
59931
|
+
size: "lg",
|
|
59932
|
+
asChild: !0,
|
|
59933
|
+
className: "data-[slot=sidebar-menu-button]:!p-1.5",
|
|
59934
|
+
children: /* @__PURE__ */ M("a", { href: i, children: [
|
|
59935
|
+
/* @__PURE__ */ v(a, { className: "h-5 w-5" }),
|
|
59936
|
+
/* @__PURE__ */ v("span", { className: "text-base font-semibold", children: o })
|
|
59937
|
+
] })
|
|
59938
|
+
}
|
|
59939
|
+
) }) }) }),
|
|
59940
|
+
/* @__PURE__ */ M(zW, { children: [
|
|
59941
|
+
/* @__PURE__ */ v(w5e, { items: e, pageTitles: l }),
|
|
59942
|
+
/* @__PURE__ */ v(x5e, { items: t, className: "mt-auto" })
|
|
59943
|
+
] }),
|
|
59944
|
+
n && /* @__PURE__ */ v(LW, { children: /* @__PURE__ */ v(S5e, { user: n, onLogout: r }) })
|
|
59945
|
+
]
|
|
59946
|
+
}
|
|
59947
|
+
), dVe = ({
|
|
59936
59948
|
setSidebarOpen: e,
|
|
59937
59949
|
sidebarOpen: t,
|
|
59938
59950
|
navItems: n,
|
|
@@ -59952,16 +59964,16 @@ function fVe({
|
|
|
59952
59964
|
overlayComponent: i,
|
|
59953
59965
|
className: a
|
|
59954
59966
|
}) {
|
|
59955
|
-
return /* @__PURE__ */
|
|
59956
|
-
/* @__PURE__ */ v(O5e, { ...t }),
|
|
59967
|
+
return /* @__PURE__ */ M(DW, { defaultOpen: r, children: [
|
|
59968
|
+
/* @__PURE__ */ v(O5e, { variant: "inset", ...t }),
|
|
59957
59969
|
/* @__PURE__ */ M(FW, { children: [
|
|
59958
59970
|
/* @__PURE__ */ v(b5e, { ...n }),
|
|
59959
|
-
/* @__PURE__ */
|
|
59971
|
+
/* @__PURE__ */ M("div", { className: j("flex flex-1 flex-col gap-4 p-4 md:gap-6 md:p-6", a), children: [
|
|
59960
59972
|
e,
|
|
59961
59973
|
o && i
|
|
59962
|
-
] })
|
|
59974
|
+
] })
|
|
59963
59975
|
] })
|
|
59964
|
-
] })
|
|
59976
|
+
] });
|
|
59965
59977
|
}
|
|
59966
59978
|
const pVe = ({
|
|
59967
59979
|
isOpen: e,
|
package/dist/react-starter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aZ as s, bj as t, bm as o, bk as r, bl as n, fa as i, a4 as d, a5 as l, bn as u, bp as c, bq as b, bz as g, bA as p, bu as S, by as C, bw as m, bv as T, bs as D, br as M, bx as h, bt as A, fq as v, bo as f, ba as I, bB as P, b2 as F, bC as w, bE as x, bD as B, bF as R, bH as G, bN as L, bJ as k, bK as y, bI as H, bL as N, bM as O, X as U, bP as E, Y as V, bU as z, bT as W, bR as q, bQ as j, bS as X, bV as Y, bW as Z, bX as _, bZ as J, bY as K, f7 as Q, b_ as $, c1 as aa, c2 as ea, c3 as sa, b$ as ta, c0 as oa, c4 as ra, c5 as na, c7 as ia, c6 as da, c8 as la, c9 as ua, cc as ca, cd as ba, ca as ga, ce as pa, cb as Sa, cg as Ca, cf as ma, aW as Ta, ch as Da, cl as Ma, cj as ha, cq as Aa, ck as va, cn as fa, cr as Ia, cv as Pa, cm as Fa, co as wa, cp as xa, cs as Ba, ct as Ra, cu as Ga, ci as La, fp as ka, _ as ya, fd as Ha, ff as Na, a9 as Oa, aa as Ua, ft as Ea, fu as Va, fr as za, cw as Wa, cA as qa, cB as ja, cF as Xa, cD as Ya, cC as Za, cy as _a, cx as Ja, cE as Ka, cz as Qa, cG as $a, cK as ae, cL as ee, cP as se, cN as te, cM as oe, cI as re, cH as ne, cO as ie, cJ as de, cQ as le, cU as ue, cS as ce, cZ as be, cT as ge, cW as pe, c_ as Se, d2 as Ce, cV as me, cX as Te, cY as De, c$ as Me, d0 as he, d1 as Ae, cR as ve, a3 as fe, ah as Ie, d4 as Pe, d7 as Fe, d8 as we, da as xe, d5 as Be, d6 as Re, a2 as Ge, d9 as Le, fi as ke, fz as ye, fw as He, db as Ne, dd as Oe, dc as Ue, de as Ee, ab as Ve, ac as ze, ad as We, ae as qe, df as je, a6 as Xe, dg as Ye, dh as Ze, dj as _e, di as Je, dk as Ke, ai as Qe, dl as $e, dt as as, dp as es, dz as ss, dq as ts, ds as os, dm as rs, dw as ns, du as is, dv as ds, dr as ls, dB as us, dA as cs, dx as bs, dy as gs, dn as ps, a1 as Ss, dC as Cs, b4 as ms, fo as Ts, fl as Ds, fm as Ms, fn as hs, dE as As, dH as vs, dK as fs, dG as Is, dJ as Ps, dF as Fs, dI as ws, dL as xs, fj as Bs, b6 as Rs, fx as Gs, f8 as Ls, fg as ks, dM as ys, dP as Hs, dO as Ns, dN as Os, fs as Us, dQ as Es, dS as Vs, dR as zs, dT as Ws, b0 as qs, dU as js, dV as Xs, bc as Ys, dY as Zs, dX as _s, dW as Js, af as Ks, dZ as Qs, d_ as $s, d$ as at, e3 as et, a8 as st, e0 as tt, a7 as ot, e5 as rt, e4 as nt, e8 as it, e7 as dt, e6 as lt, e2 as ut, e1 as ct, e9 as bt, fh as gt, ea as pt, ee as St, ef as Ct, ej as mt, eh as Tt, eg as Dt, ec as Mt, eb as ht, ei as At, ed as vt, a0 as ft, ek as It, el as Pt, em as Ft, en as wt, eo as xt, ep as Bt, eq as Rt, er as Gt, es as Lt, et as kt, eu as yt, ev as Ht, ew as Nt, ex as Ot, ey as Ut, ez as Et, eA as Vt, eB as zt, eC as Wt, eD as qt, eE as jt, eF as Xt, fk as Yt, eH as Zt, eI as _t, eJ as Jt, eL as Kt, fc as Qt, f9 as $t, fb as ao, fv as eo, eM as so, eP as to, eN as oo, eO as ro, eQ as no, b8 as io, fy as lo, ag as uo, eT as co, eX as bo, eW as go, eV as po, eR as So, eU as Co, bi as mo, eS as To, eK as Do, eY as Mo, e_ as ho, e$ as Ao, f0 as vo, f2 as fo, f3 as Io, f1 as Po, a$ as Fo, Z as wo, bg as xo, as as Bo, bG as Ro, av as Go, at as Lo, au as ko, bO as yo, am as Ho, al as No, an as Oo, aM as Uo, aL as Eo, ar as Vo, fe as zo, aq as Wo, aH as qo, aC as jo, ax as Xo, ap as Yo, ao as Zo, aw as _o, aF as Jo, aG as Ko, aJ as Qo, aK as $o, dD as ar, aN as er, bh as sr, aB as tr, bb as or, f4 as rr, ay as nr, aD as ir, aE as dr, aI as lr, az as ur, aA as cr, f6 as br, eZ as gr, aY as pr, bd as Sr, b3 as Cr, aP as mr, aQ as Tr, aR as Dr, d3 as Mr, aS as hr, aT as Ar, ak as vr, aj as fr, b5 as Ir, b7 as Pr, be as Fr, b1 as wr, aO as xr, bf as Br, aV as Rr, eG as Gr, b9 as Lr, f5 as kr, aU as yr, aX as Hr, a_ as Nr } from "./index-
|
|
1
|
+
import { aZ as s, bj as t, bm as o, bk as r, bl as n, fa as i, a4 as d, a5 as l, bn as u, bp as c, bq as b, bz as g, bA as p, bu as S, by as C, bw as m, bv as T, bs as D, br as M, bx as h, bt as A, fq as v, bo as f, ba as I, bB as P, b2 as F, bC as w, bE as x, bD as B, bF as R, bH as G, bN as L, bJ as k, bK as y, bI as H, bL as N, bM as O, X as U, bP as E, Y as V, bU as z, bT as W, bR as q, bQ as j, bS as X, bV as Y, bW as Z, bX as _, bZ as J, bY as K, f7 as Q, b_ as $, c1 as aa, c2 as ea, c3 as sa, b$ as ta, c0 as oa, c4 as ra, c5 as na, c7 as ia, c6 as da, c8 as la, c9 as ua, cc as ca, cd as ba, ca as ga, ce as pa, cb as Sa, cg as Ca, cf as ma, aW as Ta, ch as Da, cl as Ma, cj as ha, cq as Aa, ck as va, cn as fa, cr as Ia, cv as Pa, cm as Fa, co as wa, cp as xa, cs as Ba, ct as Ra, cu as Ga, ci as La, fp as ka, _ as ya, fd as Ha, ff as Na, a9 as Oa, aa as Ua, ft as Ea, fu as Va, fr as za, cw as Wa, cA as qa, cB as ja, cF as Xa, cD as Ya, cC as Za, cy as _a, cx as Ja, cE as Ka, cz as Qa, cG as $a, cK as ae, cL as ee, cP as se, cN as te, cM as oe, cI as re, cH as ne, cO as ie, cJ as de, cQ as le, cU as ue, cS as ce, cZ as be, cT as ge, cW as pe, c_ as Se, d2 as Ce, cV as me, cX as Te, cY as De, c$ as Me, d0 as he, d1 as Ae, cR as ve, a3 as fe, ah as Ie, d4 as Pe, d7 as Fe, d8 as we, da as xe, d5 as Be, d6 as Re, a2 as Ge, d9 as Le, fi as ke, fz as ye, fw as He, db as Ne, dd as Oe, dc as Ue, de as Ee, ab as Ve, ac as ze, ad as We, ae as qe, df as je, a6 as Xe, dg as Ye, dh as Ze, dj as _e, di as Je, dk as Ke, ai as Qe, dl as $e, dt as as, dp as es, dz as ss, dq as ts, ds as os, dm as rs, dw as ns, du as is, dv as ds, dr as ls, dB as us, dA as cs, dx as bs, dy as gs, dn as ps, a1 as Ss, dC as Cs, b4 as ms, fo as Ts, fl as Ds, fm as Ms, fn as hs, dE as As, dH as vs, dK as fs, dG as Is, dJ as Ps, dF as Fs, dI as ws, dL as xs, fj as Bs, b6 as Rs, fx as Gs, f8 as Ls, fg as ks, dM as ys, dP as Hs, dO as Ns, dN as Os, fs as Us, dQ as Es, dS as Vs, dR as zs, dT as Ws, b0 as qs, dU as js, dV as Xs, bc as Ys, dY as Zs, dX as _s, dW as Js, af as Ks, dZ as Qs, d_ as $s, d$ as at, e3 as et, a8 as st, e0 as tt, a7 as ot, e5 as rt, e4 as nt, e8 as it, e7 as dt, e6 as lt, e2 as ut, e1 as ct, e9 as bt, fh as gt, ea as pt, ee as St, ef as Ct, ej as mt, eh as Tt, eg as Dt, ec as Mt, eb as ht, ei as At, ed as vt, a0 as ft, ek as It, el as Pt, em as Ft, en as wt, eo as xt, ep as Bt, eq as Rt, er as Gt, es as Lt, et as kt, eu as yt, ev as Ht, ew as Nt, ex as Ot, ey as Ut, ez as Et, eA as Vt, eB as zt, eC as Wt, eD as qt, eE as jt, eF as Xt, fk as Yt, eH as Zt, eI as _t, eJ as Jt, eL as Kt, fc as Qt, f9 as $t, fb as ao, fv as eo, eM as so, eP as to, eN as oo, eO as ro, eQ as no, b8 as io, fy as lo, ag as uo, eT as co, eX as bo, eW as go, eV as po, eR as So, eU as Co, bi as mo, eS as To, eK as Do, eY as Mo, e_ as ho, e$ as Ao, f0 as vo, f2 as fo, f3 as Io, f1 as Po, a$ as Fo, Z as wo, bg as xo, as as Bo, bG as Ro, av as Go, at as Lo, au as ko, bO as yo, am as Ho, al as No, an as Oo, aM as Uo, aL as Eo, ar as Vo, fe as zo, aq as Wo, aH as qo, aC as jo, ax as Xo, ap as Yo, ao as Zo, aw as _o, aF as Jo, aG as Ko, aJ as Qo, aK as $o, dD as ar, aN as er, bh as sr, aB as tr, bb as or, f4 as rr, ay as nr, aD as ir, aE as dr, aI as lr, az as ur, aA as cr, f6 as br, eZ as gr, aY as pr, bd as Sr, b3 as Cr, aP as mr, aQ as Tr, aR as Dr, d3 as Mr, aS as hr, aT as Ar, ak as vr, aj as fr, b5 as Ir, b7 as Pr, be as Fr, b1 as wr, aO as xr, bf as Br, aV as Rr, eG as Gr, b9 as Lr, f5 as kr, aU as yr, aX as Hr, a_ as Nr } from "./index-CNAniocf.js";
|
|
2
2
|
export {
|
|
3
3
|
s as AccessControlWrapper,
|
|
4
4
|
t as Accordion,
|
|
@@ -520,7 +520,7 @@ Defaulting to \`null\`.`}var eH=GU,E$e=ZU;const tH=y.forwardRef(({className:e,va
|
|
|
520
520
|
|
|
521
521
|
`)}p.write("payload.value = newResult;"),p.write("return payload;");const w=p.compile();return(S,C)=>w(f,S,C)};let i;const a=Rb,s=!CY.jitless,c=s&&ZLe.value,u=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=r.value);const h=f.value;return a(h)?s&&c&&(p==null?void 0:p.async)===!1&&p.jitless!==!0?(i||(i=o(t.shape)),f=i(f,p),u?UY([],h,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function HY(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!Td(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(a=>xc(a,r,bc())))}),t)}const F8e=he("$ZodUnion",(e,t)=>{kn.init(e,t),It(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),It(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),It(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),It(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>IP(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let a=!1;const s=[];for(const l of t.options){const c=l._zod.run({value:o.value,issues:[]},i);if(c instanceof Promise)s.push(c),a=!0;else{if(c.issues.length===0)return c;s.push(c)}}return a?Promise.all(s).then(l=>HY(l,o,e,i)):HY(s,o,e,i)}}),L8e=he("$ZodIntersection",(e,t)=>{kn.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),a=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([l,c])=>WY(n,l,c)):WY(n,i,a)}});function RP(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(hg(e)&&hg(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const a=RP(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],a=RP(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function WY(e,t,n){const r=new Map;let o;for(const s of t.issues)if(s.code==="unrecognized_keys"){o??(o=s);for(const l of s.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else e.issues.push(s);for(const s of n.issues)if(s.code==="unrecognized_keys")for(const l of s.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else e.issues.push(s);const i=[...r].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&o&&e.issues.push({...o,keys:i}),Td(e))return e;const a=RP(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const z8e=he("$ZodEnum",(e,t)=>{kn.init(e,t);const n=EY(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>XLe.has(typeof o)).map(o=>typeof o=="string"?Bb(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const a=o.value;return r.has(a)||o.issues.push({code:"invalid_value",values:n,input:a,inst:e}),o}}),j8e=he("$ZodTransform",(e,t)=>{kn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new SY(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(n.value=a,n));if(o instanceof Promise)throw new Ad;return n.value=o,n}});function KY(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const GY=he("$ZodOptional",(e,t)=>{kn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",It(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),It(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${IP(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>KY(i,n.value)):KY(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),R8e=he("$ZodExactOptional",(e,t)=>{GY.init(e,t),It(e._zod,"values",()=>t.innerType._zod.values),It(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),B8e=he("$ZodNullable",(e,t)=>{kn.init(e,t),It(e._zod,"optin",()=>t.innerType._zod.optin),It(e._zod,"optout",()=>t.innerType._zod.optout),It(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${IP(n.source)}|null)$`):void 0}),It(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),V8e=he("$ZodDefault",(e,t)=>{kn.init(e,t),e._zod.optin="optional",It(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>YY(i,t)):YY(o,t)}});function YY(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const q8e=he("$ZodPrefault",(e,t)=>{kn.init(e,t),e._zod.optin="optional",It(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),U8e=he("$ZodNonOptional",(e,t)=>{kn.init(e,t),It(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>ZY(i,e)):ZY(o,e)}});function ZY(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const H8e=he("$ZodCatch",(e,t)=>{kn.init(e,t),It(e._zod,"optin",()=>t.innerType._zod.optin),It(e._zod,"optout",()=>t.innerType._zod.optout),It(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>xc(a,r,bc()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>xc(i,r,bc()))},input:n.value}),n.issues=[]),n)}}),W8e=he("$ZodPipe",(e,t)=>{kn.init(e,t),It(e._zod,"values",()=>t.in._zod.values),It(e._zod,"optin",()=>t.in._zod.optin),It(e._zod,"optout",()=>t.out._zod.optout),It(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(a=>Kb(a,t.in,r)):Kb(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>Kb(i,t.out,r)):Kb(o,t.out,r)}});function Kb(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const K8e=he("$ZodReadonly",(e,t)=>{kn.init(e,t),It(e._zod,"propValues",()=>t.innerType._zod.propValues),It(e._zod,"values",()=>t.innerType._zod.values),It(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),It(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(XY):XY(o)}});function XY(e){return e.value=Object.freeze(e.value),e}const G8e=he("$ZodCustom",(e,t)=>{Yr.init(e,t),kn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>QY(i,n,r,e));QY(o,n,r,e)}});function QY(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(gg(o))}}var JY;class Y8e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Z8e(){return new Y8e}(JY=globalThis).__zod_globalRegistry??(JY.__zod_globalRegistry=Z8e());const mg=globalThis.__zod_globalRegistry;function X8e(e,t){return new e({type:"string",...et(t)})}function Q8e(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...et(t)})}function eZ(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...et(t)})}function J8e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...et(t)})}function eze(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...et(t)})}function tze(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...et(t)})}function nze(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...et(t)})}function rze(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...et(t)})}function oze(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...et(t)})}function ize(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...et(t)})}function aze(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...et(t)})}function sze(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...et(t)})}function lze(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...et(t)})}function cze(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...et(t)})}function uze(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...et(t)})}function dze(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...et(t)})}function fze(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...et(t)})}function pze(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...et(t)})}function hze(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...et(t)})}function gze(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...et(t)})}function mze(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...et(t)})}function vze(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...et(t)})}function yze(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...et(t)})}function bze(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...et(t)})}function wze(e,t){return new e({type:"string",format:"date",check:"string_format",...et(t)})}function xze(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...et(t)})}function Sze(e,t){return new e({type:"string",format:"duration",check:"string_format",...et(t)})}function Cze(e,t){return new e({type:"number",checks:[],...et(t)})}function Eze(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...et(t)})}function _ze(e){return new e({type:"any"})}function kze(e){return new e({type:"unknown"})}function Oze(e,t){return new e({type:"never",...et(t)})}function tZ(e,t){return new zY({check:"less_than",...et(t),value:e,inclusive:!1})}function BP(e,t){return new zY({check:"less_than",...et(t),value:e,inclusive:!0})}function nZ(e,t){return new jY({check:"greater_than",...et(t),value:e,inclusive:!1})}function VP(e,t){return new jY({check:"greater_than",...et(t),value:e,inclusive:!0})}function rZ(e,t){return new U6e({check:"multiple_of",...et(t),value:e})}function oZ(e,t){return new W6e({check:"max_length",...et(t),maximum:e})}function Gb(e,t){return new K6e({check:"min_length",...et(t),minimum:e})}function iZ(e,t){return new G6e({check:"length_equals",...et(t),length:e})}function Pze(e,t){return new Y6e({check:"string_format",format:"regex",...et(t),pattern:e})}function Aze(e){return new Z6e({check:"string_format",format:"lowercase",...et(e)})}function Tze(e){return new X6e({check:"string_format",format:"uppercase",...et(e)})}function Mze(e,t){return new Q6e({check:"string_format",format:"includes",...et(t),includes:e})}function Nze(e,t){return new J6e({check:"string_format",format:"starts_with",...et(t),prefix:e})}function Dze(e,t){return new e8e({check:"string_format",format:"ends_with",...et(t),suffix:e})}function Md(e){return new t8e({check:"overwrite",tx:e})}function $ze(e){return Md(t=>t.normalize(e))}function Ize(){return Md(e=>e.trim())}function Fze(){return Md(e=>e.toLowerCase())}function Lze(){return Md(e=>e.toUpperCase())}function zze(){return Md(e=>YLe(e))}function jze(e,t,n){return new e({type:"array",element:t,...et(n)})}function Rze(e,t,n){return new e({type:"custom",check:"custom",fn:t,...et(n)})}function Bze(e){const t=Vze(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(gg(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(gg(o))}},e(n.value,n)));return t}function Vze(e,t){const n=new Yr({check:"custom",...et(t)});return n._zod.check=e,n}function aZ(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??mg,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function dr(e,t,n={path:[],schemaPath:[]}){var u,d;var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const s=(d=(u=e._zod).toJSONSchema)==null?void 0:d.call(u);if(s)a.schema=s;else{const f={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,f);else{const h=a.schema,m=t.processors[o.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(e,t,h,f)}const p=e._zod.parent;p&&(a.ref||(a.ref=p),dr(p,t,f),t.seen.get(p).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&$r(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function sZ(e,t){var a,s,l,c;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const u of e.seen.entries()){const d=(a=e.metadataRegistry.get(u[0]))==null?void 0:a.id;if(d){const f=r.get(d);if(f&&f!==u[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(d,u[0])}}const o=u=>{var m;const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=(m=e.external.registry.get(u[0]))==null?void 0:m.id,b=e.external.uri??(x=>x);if(v)return{ref:b(v)};const w=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=w,{defId:w,ref:`${b("__shared")}#/${d}/${w}`}}if(u[1]===n)return{ref:"#"};const p=`#/${d}/`,h=u[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:p+h}},i=u=>{if(u[1].schema.$ref)return;const d=u[1],{ref:f,defId:p}=o(u);d.def={...d.schema},p&&(d.defId=p);const h=d.schema;for(const m in h)delete h[m];h.$ref=f};if(e.cycles==="throw")for(const u of e.seen.entries()){const d=u[1];if(d.cycle)throw new Error(`Cycle detected: #/${(s=d.cycle)==null?void 0:s.join("/")}/<root>
|
|
522
522
|
|
|
523
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const d=u[1];if(t===u[0]){i(u);continue}if(e.external){const p=(l=e.external.registry.get(u[0]))==null?void 0:l.id;if(t!==u[0]&&p){i(u);continue}}if((c=e.metadataRegistry.get(u[0]))==null?void 0:c.id){i(u);continue}if(d.cycle){i(u);continue}if(d.count>1&&e.reused==="ref"){i(u);continue}}}function lZ(e,t){var a,s,l;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=c=>{const u=e.seen.get(c);if(u.ref===null)return;const d=u.def??u.schema,f={...d},p=u.ref;if(u.ref=null,p){r(p);const m=e.seen.get(p),v=m.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(v)):Object.assign(d,v),Object.assign(d,f),c._zod.parent===p)for(const w in d)w==="$ref"||w==="allOf"||w in f||delete d[w];if(v.$ref)for(const w in d)w==="$ref"||w==="allOf"||w in m.def&&JSON.stringify(d[w])===JSON.stringify(m.def[w])&&delete d[w]}const h=c._zod.parent;if(h&&h!==p){r(h);const m=e.seen.get(h);if(m!=null&&m.schema.$ref&&(d.$ref=m.schema.$ref,m.def))for(const v in d)v==="$ref"||v==="allOf"||v in m.def&&JSON.stringify(d[v])===JSON.stringify(m.def[v])&&delete d[v]}e.override({zodSchema:c,jsonSchema:d,path:u.path??[]})};for(const c of[...e.seen.entries()].reverse())r(c[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const c=(s=e.external.registry.get(t))==null?void 0:s.id;if(!c)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(c)}Object.assign(o,n.def??n.schema);const i=((l=e.external)==null?void 0:l.defs)??{};for(const c of e.seen.entries()){const u=c[1];u.def&&u.defId&&(i[u.defId]=u.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Yb(t,"input",e.processors),output:Yb(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function $r(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return $r(r.element,n);if(r.type==="set")return $r(r.valueType,n);if(r.type==="lazy")return $r(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return $r(r.innerType,n);if(r.type==="intersection")return $r(r.left,n)||$r(r.right,n);if(r.type==="record"||r.type==="map")return $r(r.keyType,n)||$r(r.valueType,n);if(r.type==="pipe")return $r(r.in,n)||$r(r.out,n);if(r.type==="object"){for(const o in r.shape)if($r(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if($r(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if($r(o,n))return!0;return!!(r.rest&&$r(r.rest,n))}return!1}const qze=(e,t={})=>n=>{const r=aZ({...n,processors:t});return dr(e,r),sZ(r,e),lZ(r,e)},Yb=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},a=aZ({...o??{},target:i,io:t,processors:n});return dr(e,a),sZ(a,e),lZ(a,e)},Uze={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Hze=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),s&&(o.format=Uze[s]??s,o.format===""&&delete o.format,s==="time"&&delete o.format),c&&(o.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?o.pattern=u[0].source:u.length>1&&(o.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Wze=(e,t,n,r)=>{const o=n,{minimum:i,maximum:a,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?o.type="integer":o.type="number",typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=u,o.exclusiveMinimum=!0):o.exclusiveMinimum=u),typeof i=="number"&&(o.minimum=i,typeof u=="number"&&t.target!=="draft-04"&&(u>=i?delete o.minimum:delete o.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=c,o.exclusiveMaximum=!0):o.exclusiveMaximum=c),typeof a=="number"&&(o.maximum=a,typeof c=="number"&&t.target!=="draft-04"&&(c<=a?delete o.maximum:delete o.exclusiveMaximum)),typeof l=="number"&&(o.multipleOf=l)},Kze=(e,t,n,r)=>{n.not={}},Gze=(e,t,n,r)=>{},Yze=(e,t,n,r)=>{},Zze=(e,t,n,r)=>{const o=e._zod.def,i=EY(o.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Xze=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Qze=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Jze=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(o.minItems=a),typeof s=="number"&&(o.maxItems=s),o.type="array",o.items=dr(i.element,t,{...r,path:[...r.path,"items"]})},eje=(e,t,n,r)=>{var c;const o=n,i=e._zod.def;o.type="object",o.properties={};const a=i.shape;for(const u in a)o.properties[u]=dr(a[u],t,{...r,path:[...r.path,"properties",u]});const s=new Set(Object.keys(a)),l=new Set([...s].filter(u=>{const d=i.shape[u]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(o.required=Array.from(l)),((c=i.catchall)==null?void 0:c._zod.def.type)==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=dr(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},tje=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,a=o.options.map((s,l)=>dr(s,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=a:n.anyOf=a},nje=(e,t,n,r)=>{const o=e._zod.def,i=dr(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=dr(o.right,t,{...r,path:[...r.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=l},rje=(e,t,n,r)=>{const o=e._zod.def,i=dr(o.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},oje=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},ije=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},aje=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},sje=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},lje=(e,t,n,r)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;dr(i,t,r);const a=t.seen.get(e);a.ref=i},cje=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},cZ=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},uje=he("ZodISODateTime",(e,t)=>{g8e.init(e,t),yn.init(e,t)});function dje(e){return bze(uje,e)}const fje=he("ZodISODate",(e,t)=>{m8e.init(e,t),yn.init(e,t)});function pje(e){return wze(fje,e)}const hje=he("ZodISOTime",(e,t)=>{v8e.init(e,t),yn.init(e,t)});function gje(e){return xze(hje,e)}const mje=he("ZodISODuration",(e,t)=>{y8e.init(e,t),yn.init(e,t)});function vje(e){return Sze(mje,e)}const Bo=he("ZodError",(e,t)=>{MY.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>l6e(e,n)},flatten:{value:n=>s6e(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,NP,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,NP,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),yje=LP(Bo),bje=zP(Bo),wje=qb(Bo),xje=Ub(Bo),Sje=d6e(Bo),Cje=f6e(Bo),Eje=p6e(Bo),_je=h6e(Bo),kje=g6e(Bo),Oje=m6e(Bo),Pje=v6e(Bo),Aje=y6e(Bo),On=he("ZodType",(e,t)=>(kn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Yb(e,"input"),output:Yb(e,"output")}}),e.toJSONSchema=qze(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Gs(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Ys(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>yje(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>wje(e,n,r),e.parseAsync=async(n,r)=>bje(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>xje(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Sje(e,n,r),e.decode=(n,r)=>Cje(e,n,r),e.encodeAsync=async(n,r)=>Eje(e,n,r),e.decodeAsync=async(n,r)=>_je(e,n,r),e.safeEncode=(n,r)=>kje(e,n,r),e.safeDecode=(n,r)=>Oje(e,n,r),e.safeEncodeAsync=async(n,r)=>Pje(e,n,r),e.safeDecodeAsync=async(n,r)=>Aje(e,n,r),e.refine=(n,r)=>e.check(_7e(n,r)),e.superRefine=n=>e.check(k7e(n)),e.overwrite=n=>e.check(Md(n)),e.optional=()=>vZ(e),e.exactOptional=()=>f7e(e),e.nullable=()=>yZ(e),e.nullish=()=>vZ(yZ(e)),e.nonoptional=n=>y7e(e,n),e.array=()=>n7e(e),e.or=n=>i7e([e,n]),e.and=n=>s7e(e,n),e.transform=n=>wZ(e,u7e(n)),e.default=n=>g7e(e,n),e.prefault=n=>v7e(e,n),e.catch=n=>w7e(e,n),e.pipe=n=>wZ(e,n),e.readonly=()=>C7e(e),e.describe=n=>{const r=e.clone();return mg.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=mg.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return mg.get(e);const r=e.clone();return mg.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),uZ=he("_ZodString",(e,t)=>{jP.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Hze(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Pze(...r)),e.includes=(...r)=>e.check(Mze(...r)),e.startsWith=(...r)=>e.check(Nze(...r)),e.endsWith=(...r)=>e.check(Dze(...r)),e.min=(...r)=>e.check(Gb(...r)),e.max=(...r)=>e.check(oZ(...r)),e.length=(...r)=>e.check(iZ(...r)),e.nonempty=(...r)=>e.check(Gb(1,...r)),e.lowercase=r=>e.check(Aze(r)),e.uppercase=r=>e.check(Tze(r)),e.trim=()=>e.check(Ize()),e.normalize=(...r)=>e.check($ze(...r)),e.toLowerCase=()=>e.check(Fze()),e.toUpperCase=()=>e.check(Lze()),e.slugify=()=>e.check(zze())}),Tje=he("ZodString",(e,t)=>{jP.init(e,t),uZ.init(e,t),e.email=n=>e.check(Q8e(Mje,n)),e.url=n=>e.check(rze(Nje,n)),e.jwt=n=>e.check(yze(Kje,n)),e.emoji=n=>e.check(oze(Dje,n)),e.guid=n=>e.check(eZ(dZ,n)),e.uuid=n=>e.check(J8e(Zb,n)),e.uuidv4=n=>e.check(eze(Zb,n)),e.uuidv6=n=>e.check(tze(Zb,n)),e.uuidv7=n=>e.check(nze(Zb,n)),e.nanoid=n=>e.check(ize($je,n)),e.guid=n=>e.check(eZ(dZ,n)),e.cuid=n=>e.check(aze(Ije,n)),e.cuid2=n=>e.check(sze(Fje,n)),e.ulid=n=>e.check(lze(Lje,n)),e.base64=n=>e.check(gze(Uje,n)),e.base64url=n=>e.check(mze(Hje,n)),e.xid=n=>e.check(cze(zje,n)),e.ksuid=n=>e.check(uze(jje,n)),e.ipv4=n=>e.check(dze(Rje,n)),e.ipv6=n=>e.check(fze(Bje,n)),e.cidrv4=n=>e.check(pze(Vje,n)),e.cidrv6=n=>e.check(hze(qje,n)),e.e164=n=>e.check(vze(Wje,n)),e.datetime=n=>e.check(dje(n)),e.date=n=>e.check(pje(n)),e.time=n=>e.check(gje(n)),e.duration=n=>e.check(vje(n))});function Nd(e){return X8e(Tje,e)}const yn=he("ZodStringFormat",(e,t)=>{cn.init(e,t),uZ.init(e,t)}),Mje=he("ZodEmail",(e,t)=>{a8e.init(e,t),yn.init(e,t)}),dZ=he("ZodGUID",(e,t)=>{o8e.init(e,t),yn.init(e,t)}),Zb=he("ZodUUID",(e,t)=>{i8e.init(e,t),yn.init(e,t)}),Nje=he("ZodURL",(e,t)=>{s8e.init(e,t),yn.init(e,t)}),Dje=he("ZodEmoji",(e,t)=>{l8e.init(e,t),yn.init(e,t)}),$je=he("ZodNanoID",(e,t)=>{c8e.init(e,t),yn.init(e,t)}),Ije=he("ZodCUID",(e,t)=>{u8e.init(e,t),yn.init(e,t)}),Fje=he("ZodCUID2",(e,t)=>{d8e.init(e,t),yn.init(e,t)}),Lje=he("ZodULID",(e,t)=>{f8e.init(e,t),yn.init(e,t)}),zje=he("ZodXID",(e,t)=>{p8e.init(e,t),yn.init(e,t)}),jje=he("ZodKSUID",(e,t)=>{h8e.init(e,t),yn.init(e,t)}),Rje=he("ZodIPv4",(e,t)=>{b8e.init(e,t),yn.init(e,t)}),Bje=he("ZodIPv6",(e,t)=>{w8e.init(e,t),yn.init(e,t)}),Vje=he("ZodCIDRv4",(e,t)=>{x8e.init(e,t),yn.init(e,t)}),qje=he("ZodCIDRv6",(e,t)=>{S8e.init(e,t),yn.init(e,t)}),Uje=he("ZodBase64",(e,t)=>{C8e.init(e,t),yn.init(e,t)}),Hje=he("ZodBase64URL",(e,t)=>{_8e.init(e,t),yn.init(e,t)}),Wje=he("ZodE164",(e,t)=>{k8e.init(e,t),yn.init(e,t)}),Kje=he("ZodJWT",(e,t)=>{P8e.init(e,t),yn.init(e,t)}),fZ=he("ZodNumber",(e,t)=>{BY.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Wze(e,r,o),e.gt=(r,o)=>e.check(nZ(r,o)),e.gte=(r,o)=>e.check(VP(r,o)),e.min=(r,o)=>e.check(VP(r,o)),e.lt=(r,o)=>e.check(tZ(r,o)),e.lte=(r,o)=>e.check(BP(r,o)),e.max=(r,o)=>e.check(BP(r,o)),e.int=r=>e.check(pZ(r)),e.safe=r=>e.check(pZ(r)),e.positive=r=>e.check(nZ(0,r)),e.nonnegative=r=>e.check(VP(0,r)),e.negative=r=>e.check(tZ(0,r)),e.nonpositive=r=>e.check(BP(0,r)),e.multipleOf=(r,o)=>e.check(rZ(r,o)),e.step=(r,o)=>e.check(rZ(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Gje(e){return Cze(fZ,e)}const Yje=he("ZodNumberFormat",(e,t)=>{A8e.init(e,t),fZ.init(e,t)});function pZ(e){return Eze(Yje,e)}const Zje=he("ZodAny",(e,t)=>{T8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Gze()});function Xje(){return _ze(Zje)}const Qje=he("ZodUnknown",(e,t)=>{M8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yze()});function hZ(){return kze(Qje)}const Jje=he("ZodNever",(e,t)=>{N8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kze(e,n,r)});function e7e(e){return Oze(Jje,e)}const t7e=he("ZodArray",(e,t)=>{D8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jze(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Gb(n,r)),e.nonempty=n=>e.check(Gb(1,n)),e.max=(n,r)=>e.check(oZ(n,r)),e.length=(n,r)=>e.check(iZ(n,r)),e.unwrap=()=>e.element});function n7e(e,t){return jze(t7e,e,t)}const r7e=he("ZodObject",(e,t)=>{I8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eje(e,n,r,o),It(e,"shape",()=>t.shape),e.keyof=()=>l7e(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:hZ()}),e.loose=()=>e.clone({...e._zod.def,catchall:hZ()}),e.strict=()=>e.clone({...e._zod.def,catchall:e7e()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>n6e(e,n),e.safeExtend=n=>r6e(e,n),e.merge=n=>o6e(e,n),e.pick=n=>e6e(e,n),e.omit=n=>t6e(e,n),e.partial=(...n)=>i6e(mZ,e,n[0]),e.required=(...n)=>a6e(bZ,e,n[0])});function gZ(e,t){const n={type:"object",shape:e??{},...et(t)};return new r7e(n)}const o7e=he("ZodUnion",(e,t)=>{F8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tje(e,n,r,o),e.options=t.options});function i7e(e,t){return new o7e({type:"union",options:e,...et(t)})}const a7e=he("ZodIntersection",(e,t)=>{L8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nje(e,n,r,o)});function s7e(e,t){return new a7e({type:"intersection",left:e,right:t})}const qP=he("ZodEnum",(e,t)=>{z8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Zze(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const a of r)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new qP({...t,checks:[],...et(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const a of r)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new qP({...t,checks:[],...et(o),entries:i})}});function l7e(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new qP({type:"enum",entries:n,...et(t)})}const c7e=he("ZodTransform",(e,t)=>{j8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qze(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new SY(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(gg(i,n.value,t));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(gg(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function u7e(e){return new c7e({type:"transform",transform:e})}const mZ=he("ZodOptional",(e,t)=>{GY.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cZ(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function vZ(e){return new mZ({type:"optional",innerType:e})}const d7e=he("ZodExactOptional",(e,t)=>{R8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cZ(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function f7e(e){return new d7e({type:"optional",innerType:e})}const p7e=he("ZodNullable",(e,t)=>{B8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function yZ(e){return new p7e({type:"nullable",innerType:e})}const h7e=he("ZodDefault",(e,t)=>{V8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ije(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function g7e(e,t){return new h7e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():PY(t)}})}const m7e=he("ZodPrefault",(e,t)=>{q8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>aje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function v7e(e,t){return new m7e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():PY(t)}})}const bZ=he("ZodNonOptional",(e,t)=>{U8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>oje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function y7e(e,t){return new bZ({type:"nonoptional",innerType:e,...et(t)})}const b7e=he("ZodCatch",(e,t)=>{H8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>sje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function w7e(e,t){return new b7e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const x7e=he("ZodPipe",(e,t)=>{W8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lje(e,n,r,o),e.in=t.in,e.out=t.out});function wZ(e,t){return new x7e({type:"pipe",in:e,out:t})}const S7e=he("ZodReadonly",(e,t)=>{K8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function C7e(e){return new S7e({type:"readonly",innerType:e})}const E7e=he("ZodCustom",(e,t)=>{G8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xze(e,n)});function _7e(e,t={}){return Rze(E7e,e,t)}function k7e(e){return Bze(e)}const Xb=y.forwardRef(({className:e,...t},n)=>g.jsx("div",{className:"relative w-full overflow-auto",children:g.jsx("table",{ref:n,className:U("w-full caption-bottom text-sm",e),...t})}));Xb.displayName="Table";const Qb=y.forwardRef(({className:e,...t},n)=>g.jsx("thead",{ref:n,className:U("[&_tr]:border-b",e),...t}));Qb.displayName="TableHeader";const Jb=y.forwardRef(({className:e,...t},n)=>g.jsx("tbody",{ref:n,className:U("[&_tr:last-child]:border-0",e),...t}));Jb.displayName="TableBody";const O7e=y.forwardRef(({className:e,...t},n)=>g.jsx("tfoot",{ref:n,className:U("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));O7e.displayName="TableFooter";const os=y.forwardRef(({className:e,...t},n)=>g.jsx("tr",{ref:n,className:U("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));os.displayName="TableRow";const ew=y.forwardRef(({className:e,...t},n)=>g.jsx("th",{ref:n,className:U("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));ew.displayName="TableHead";const Dd=y.forwardRef(({className:e,...t},n)=>g.jsx("td",{ref:n,className:U("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Dd.displayName="TableCell";const P7e=y.forwardRef(({className:e,...t},n)=>g.jsx("caption",{ref:n,className:U("mt-4 text-sm text-muted-foreground",e),...t}));P7e.displayName="TableCaption";const A7e=gZ({id:Gje(),header:Nd(),type:Nd(),status:Nd(),target:Nd(),limit:Nd(),reviewer:Nd()});function T7e({id:e}){const{attributes:t,listeners:n}=iY({id:e});return g.jsxs(mt,{...t,...n,variant:"ghost",size:"icon",className:"size-7 text-muted-foreground hover:bg-transparent",children:[g.jsx(Vue,{className:"size-3 text-muted-foreground"}),g.jsx("span",{className:"sr-only",children:"Drag to reorder"})]})}const xZ=[{id:"drag",header:()=>null,cell:({row:e})=>g.jsx(T7e,{id:e.original.id})},{id:"select",header:({table:e})=>g.jsx("div",{className:"flex items-center justify-center",children:g.jsx(fh,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":"Select all"})}),cell:({row:e})=>g.jsx("div",{className:"flex items-center justify-center",children:g.jsx(fh,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":"Select row"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"header",header:"Header",cell:({row:e})=>g.jsx(I7e,{item:e.original}),enableHiding:!1},{accessorKey:"type",header:"Section Type",cell:({row:e})=>g.jsx("div",{className:"w-32",children:g.jsx(ap,{variant:"outline",className:"px-1.5 text-muted-foreground",children:e.original.type})})},{accessorKey:"status",header:"Status",cell:({row:e})=>g.jsxs(ap,{variant:"outline",className:"flex gap-1 px-1.5 text-muted-foreground [&_svg]:size-3",children:[e.original.status==="Done"?g.jsx(Nue,{className:"text-green-500 dark:text-green-400"}):g.jsx(Wue,{}),e.original.status]})},{accessorKey:"target",header:()=>g.jsx("div",{className:"w-full text-right",children:"Target"}),cell:({row:e})=>g.jsxs("form",{onSubmit:t=>{t.preventDefault(),gK.promise(new Promise(n=>setTimeout(n,1e3)),{loading:`Saving ${e.original.header}`,success:"Done",error:"Error"})},children:[g.jsx(Wr,{htmlFor:`${e.original.id}-target`,className:"sr-only",children:"Target"}),g.jsx(xi,{className:"h-8 w-16 border-transparent bg-transparent text-right shadow-none hover:bg-input/30 focus-visible:border focus-visible:bg-background",defaultValue:e.original.target,id:`${e.original.id}-target`})]})},{accessorKey:"limit",header:()=>g.jsx("div",{className:"w-full text-right",children:"Limit"}),cell:({row:e})=>g.jsxs("form",{onSubmit:t=>{t.preventDefault(),gK.promise(new Promise(n=>setTimeout(n,1e3)),{loading:`Saving ${e.original.header}`,success:"Done",error:"Error"})},children:[g.jsx(Wr,{htmlFor:`${e.original.id}-limit`,className:"sr-only",children:"Limit"}),g.jsx(xi,{className:"h-8 w-16 border-transparent bg-transparent text-right shadow-none hover:bg-input/30 focus-visible:border focus-visible:bg-background",defaultValue:e.original.limit,id:`${e.original.id}-limit`})]})},{accessorKey:"reviewer",header:"Reviewer",cell:({row:e})=>e.original.reviewer!=="Assign reviewer"?e.original.reviewer:g.jsxs(g.Fragment,{children:[g.jsx(Wr,{htmlFor:`${e.original.id}-reviewer`,className:"sr-only",children:"Reviewer"}),g.jsxs(Ei,{children:[g.jsx(zo,{className:"h-8 w-40",id:`${e.original.id}-reviewer`,children:g.jsx(_i,{placeholder:"Assign reviewer"})}),g.jsxs(jo,{align:"end",children:[g.jsx(Pt,{value:"Eddie Lake",children:"Eddie Lake"}),g.jsx(Pt,{value:"Jamik Tashpulatov",children:"Jamik Tashpulatov"})]})]})]})},{id:"actions",cell:()=>g.jsxs(oc,{children:[g.jsx(ic,{asChild:!0,children:g.jsxs(mt,{variant:"ghost",className:"flex size-8 text-muted-foreground data-[state=open]:bg-muted",size:"icon",children:[g.jsx(bx,{}),g.jsx("span",{className:"sr-only",children:"Open menu"})]})}),g.jsxs(zs,{align:"end",className:"w-32",children:[g.jsx(wr,{children:"Edit"}),g.jsx(wr,{children:"Make a copy"}),g.jsx(wr,{children:"Favorite"}),g.jsx(nd,{}),g.jsx(wr,{children:"Delete"})]})]})}];function M7e({row:e}){const{transform:t,transition:n,setNodeRef:r,isDragging:o}=iY({id:e.original.id});return g.jsx(os,{"data-state":e.getIsSelected()&&"selected","data-dragging":o,ref:r,className:"relative z-0 data-[dragging=true]:z-10 data-[dragging=true]:opacity-80",style:{transform:sg.Transform.toString(t),transition:n},children:e.getVisibleCells().map(i=>g.jsx(Dd,{children:jb(i.column.columnDef.cell,i.getContext())},i.id))})}function N7e({data:e,className:t}){var x;const[n,r]=y.useState(()=>e),[o,i]=y.useState({}),[a,s]=y.useState({}),[l,c]=y.useState([]),[u,d]=y.useState([]),[f,p]=y.useState({pageIndex:0,pageSize:10}),h=y.useId(),m=R4e(oP(qG,{}),oP(UG,{}),oP(uP,{})),v=y.useMemo(()=>(n==null?void 0:n.map(({id:S})=>S))||[],[n]),b=xY({data:n,columns:xZ,state:{sorting:u,columnVisibility:a,rowSelection:o,columnFilters:l,pagination:f},getRowId:S=>S.id.toString(),enableRowSelection:!0,onRowSelectionChange:i,onSortingChange:d,onColumnFiltersChange:c,onColumnVisibilityChange:s,onPaginationChange:p,getCoreRowModel:vY(),getFilteredRowModel:bY(),getPaginationRowModel:wY(),getSortedRowModel:ULe(),getFacetedRowModel:VLe(),getFacetedUniqueValues:qLe()});function w(S){const{active:C,over:_}=S;C&&_&&C.id!==_.id&&r(k=>{const O=v.indexOf(C.id),P=v.indexOf(_.id);return gP(k,O,P)})}return g.jsxs(zK,{defaultValue:"outline",className:U("flex w-full flex-col justify-start gap-6",t),children:[g.jsxs("div",{className:"flex items-center justify-between px-4 lg:px-6",children:[g.jsx(Wr,{htmlFor:"view-selector",className:"sr-only",children:"View"}),g.jsxs(Ei,{defaultValue:"outline",children:[g.jsx(zo,{className:"@4xl/main:hidden flex w-fit",id:"view-selector",children:g.jsx(_i,{placeholder:"Select a view"})}),g.jsxs(jo,{children:[g.jsx(Pt,{value:"outline",children:"Outline"}),g.jsx(Pt,{value:"past-performance",children:"Past Performance"}),g.jsx(Pt,{value:"key-personnel",children:"Key Personnel"}),g.jsx(Pt,{value:"focus-documents",children:"Focus Documents"})]})]}),g.jsxs(TO,{className:"@4xl/main:flex hidden",children:[g.jsx(Ed,{value:"outline",children:"Outline"}),g.jsxs(Ed,{value:"past-performance",className:"gap-1",children:["Past Performance",g.jsx(ap,{variant:"secondary",className:"flex h-5 w-5 items-center justify-center rounded-full bg-muted-foreground/30",children:"3"})]}),g.jsxs(Ed,{value:"key-personnel",className:"gap-1",children:["Key Personnel",g.jsx(ap,{variant:"secondary",className:"flex h-5 w-5 items-center justify-center rounded-full bg-muted-foreground/30",children:"2"})]}),g.jsx(Ed,{value:"focus-documents",children:"Focus Documents"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs(oc,{children:[g.jsx(ic,{asChild:!0,children:g.jsxs(mt,{variant:"outline",size:"sm",children:[g.jsx(Iue,{}),g.jsx("span",{className:"hidden lg:inline",children:"Customize Columns"}),g.jsx("span",{className:"lg:hidden",children:"Columns"}),g.jsx(ev,{})]})}),g.jsx(zs,{align:"end",className:"w-56",children:b.getAllColumns().filter(S=>typeof S.accessorFn<"u"&&S.getCanHide()).map(S=>g.jsx(ik,{className:"capitalize",checked:S.getIsVisible(),onCheckedChange:C=>S.toggleVisibility(!!C),children:S.id},S.id))})]}),g.jsxs(mt,{variant:"outline",size:"sm",children:[g.jsx(xx,{}),g.jsx("span",{className:"hidden lg:inline",children:"Add Section"})]})]})]}),g.jsxs(yc,{value:"outline",className:"relative flex flex-col gap-4 overflow-auto px-4 lg:px-6",children:[g.jsx("div",{className:"overflow-hidden rounded-lg border",children:g.jsx(VFe,{collisionDetection:H4e,modifiers:[ZFe],onDragEnd:w,sensors:m,id:h,children:g.jsxs(Xb,{children:[g.jsx(Qb,{className:"sticky top-0 z-10 bg-muted",children:b.getHeaderGroups().map(S=>g.jsx(os,{children:S.headers.map(C=>g.jsx(ew,{colSpan:C.colSpan,children:C.isPlaceholder?null:jb(C.column.columnDef.header,C.getContext())},C.id))},S.id))}),g.jsx(Jb,{className:"**:data-[slot=table-cell]:first:w-8",children:(x=b.getRowModel().rows)!=null&&x.length?g.jsx(nLe,{items:v,strategy:eLe,children:b.getRowModel().rows.map(S=>g.jsx(M7e,{row:S},S.id))}):g.jsx(os,{children:g.jsx(Dd,{colSpan:xZ.length,className:"h-24 text-center",children:"No results."})})})]})})}),g.jsxs("div",{className:"flex items-center justify-between px-4",children:[g.jsxs("div",{className:"hidden flex-1 text-sm text-muted-foreground lg:flex",children:[b.getFilteredSelectedRowModel().rows.length," of ",b.getFilteredRowModel().rows.length," row(s) selected."]}),g.jsxs("div",{className:"flex w-full items-center gap-8 lg:w-fit",children:[g.jsxs("div",{className:"hidden items-center gap-2 lg:flex",children:[g.jsx(Wr,{htmlFor:"rows-per-page",className:"text-sm font-medium",children:"Rows per page"}),g.jsxs(Ei,{value:`${b.getState().pagination.pageSize}`,onValueChange:S=>b.setPageSize(Number(S)),children:[g.jsx(zo,{className:"w-20",id:"rows-per-page",children:g.jsx(_i,{placeholder:b.getState().pagination.pageSize})}),g.jsx(jo,{side:"top",children:[10,20,30,40,50].map(S=>g.jsx(Pt,{value:`${S}`,children:S},S))})]})]}),g.jsxs("div",{className:"flex w-fit items-center justify-center text-sm font-medium",children:["Page ",b.getState().pagination.pageIndex+1," of ",b.getPageCount()]}),g.jsxs("div",{className:"ml-auto flex items-center gap-2 lg:ml-0",children:[g.jsxs(mt,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>b.setPageIndex(0),disabled:!b.getCanPreviousPage(),children:[g.jsx("span",{className:"sr-only",children:"Go to first page"}),g.jsx(Pue,{})]}),g.jsxs(mt,{variant:"outline",className:"size-8",size:"icon",onClick:()=>b.previousPage(),disabled:!b.getCanPreviousPage(),children:[g.jsx("span",{className:"sr-only",children:"Go to previous page"}),g.jsx(wu,{})]}),g.jsxs(mt,{variant:"outline",className:"size-8",size:"icon",onClick:()=>b.nextPage(),disabled:!b.getCanNextPage(),children:[g.jsx("span",{className:"sr-only",children:"Go to next page"}),g.jsx(Oa,{})]}),g.jsxs(mt,{variant:"outline",className:"hidden size-8 lg:flex",size:"icon",onClick:()=>b.setPageIndex(b.getPageCount()-1),disabled:!b.getCanNextPage(),children:[g.jsx("span",{className:"sr-only",children:"Go to last page"}),g.jsx(Aue,{})]})]})]})]})]}),g.jsx(yc,{value:"past-performance",className:"flex flex-col px-4 lg:px-6",children:g.jsx("div",{className:"aspect-video w-full flex-1 rounded-lg border border-dashed"})}),g.jsx(yc,{value:"key-personnel",className:"flex flex-col px-4 lg:px-6",children:g.jsx("div",{className:"aspect-video w-full flex-1 rounded-lg border border-dashed"})}),g.jsx(yc,{value:"focus-documents",className:"flex flex-col px-4 lg:px-6",children:g.jsx("div",{className:"aspect-video w-full flex-1 rounded-lg border border-dashed"})})]})}const D7e=[{month:"January",desktop:186,mobile:80},{month:"February",desktop:305,mobile:200},{month:"March",desktop:237,mobile:120},{month:"April",desktop:73,mobile:190},{month:"May",desktop:209,mobile:130},{month:"June",desktop:214,mobile:140}],$7e={desktop:{label:"Desktop",color:"var(--primary)"},mobile:{label:"Mobile",color:"var(--primary)"}};function I7e({item:e}){const t=pb();return g.jsxs(Rh,{children:[g.jsx(zq,{asChild:!0,children:g.jsx(mt,{variant:"link",className:"w-fit px-0 text-left text-foreground",children:e.header})}),g.jsxs(ad,{side:"right",className:"flex flex-col",children:[g.jsxs(Bh,{className:"gap-1",children:[g.jsx(Vh,{children:e.header}),g.jsx(qh,{children:"Showing total visitors for the last 6 months"})]}),g.jsxs("div",{className:"flex flex-1 flex-col gap-4 overflow-y-auto py-4 text-sm",children:[!t&&g.jsxs(g.Fragment,{children:[g.jsx(s0,{config:$7e,children:g.jsxs(B7,{accessibilityLayer:!0,data:D7e,margin:{left:0,right:10},children:[g.jsx($2,{vertical:!1}),g.jsx(q2,{dataKey:"month",tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:n=>n.slice(0,3),hide:!0}),g.jsx(Z2,{cursor:!1,content:g.jsx(l0,{indicator:"dot"})}),g.jsx(uh,{dataKey:"mobile",type:"natural",fill:"var(--color-mobile)",fillOpacity:.6,stroke:"var(--color-mobile)",stackId:"a"}),g.jsx(uh,{dataKey:"desktop",type:"natural",fill:"var(--color-desktop)",fillOpacity:.4,stroke:"var(--color-desktop)",stackId:"a"})]})}),g.jsx(bd,{}),g.jsxs("div",{className:"grid gap-2",children:[g.jsxs("div",{className:"flex gap-2 font-medium leading-none",children:["Trending up by 5.2% this month ",g.jsx(nde,{className:"size-4"})]}),g.jsx("div",{className:"text-muted-foreground",children:"Showing total visitors for the last 6 months. This is just some random text to test the layout. It spans multiple lines and should wrap around."})]}),g.jsx(bd,{})]}),g.jsxs("form",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Wr,{htmlFor:"header",children:"Header"}),g.jsx(xi,{id:"header",defaultValue:e.header})]}),g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Wr,{htmlFor:"type",children:"Type"}),g.jsxs(Ei,{defaultValue:e.type,children:[g.jsx(zo,{id:"type",className:"w-full",children:g.jsx(_i,{placeholder:"Select a type"})}),g.jsxs(jo,{children:[g.jsx(Pt,{value:"Table of Contents",children:"Table of Contents"}),g.jsx(Pt,{value:"Executive Summary",children:"Executive Summary"}),g.jsx(Pt,{value:"Technical Approach",children:"Technical Approach"}),g.jsx(Pt,{value:"Design",children:"Design"}),g.jsx(Pt,{value:"Capabilities",children:"Capabilities"}),g.jsx(Pt,{value:"Focus Documents",children:"Focus Documents"}),g.jsx(Pt,{value:"Narrative",children:"Narrative"}),g.jsx(Pt,{value:"Cover Page",children:"Cover Page"})]})]})]}),g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Wr,{htmlFor:"status",children:"Status"}),g.jsxs(Ei,{defaultValue:e.status,children:[g.jsx(zo,{id:"status",className:"w-full",children:g.jsx(_i,{placeholder:"Select a status"})}),g.jsxs(jo,{children:[g.jsx(Pt,{value:"Done",children:"Done"}),g.jsx(Pt,{value:"In Progress",children:"In Progress"}),g.jsx(Pt,{value:"Not Started",children:"Not Started"})]})]})]})]}),g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Wr,{htmlFor:"target",children:"Target"}),g.jsx(xi,{id:"target",defaultValue:e.target})]}),g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Wr,{htmlFor:"limit",children:"Limit"}),g.jsx(xi,{id:"limit",defaultValue:e.limit})]})]}),g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Wr,{htmlFor:"reviewer",children:"Reviewer"}),g.jsxs(Ei,{defaultValue:e.reviewer,children:[g.jsx(zo,{id:"reviewer",className:"w-full",children:g.jsx(_i,{placeholder:"Select a reviewer"})}),g.jsxs(jo,{children:[g.jsx(Pt,{value:"Eddie Lake",children:"Eddie Lake"}),g.jsx(Pt,{value:"Jamik Tashpulatov",children:"Jamik Tashpulatov"}),g.jsx(Pt,{value:"Emily Whalen",children:"Emily Whalen"})]})]})]})]})]}),g.jsxs(H0,{className:"mt-auto flex gap-2 sm:flex-col sm:space-x-0",children:[g.jsx(mt,{className:"w-full",children:"Submit"}),g.jsx(jq,{asChild:!0,children:g.jsx(mt,{variant:"outline",className:"w-full",children:"Done"})})]})]})]})}const F7e=({columnCount:e,rowCount:t=10,searchableColumnCount:n=0,filterableColumnCount:r=0,showViewOptions:o=!0,className:i})=>g.jsxs("div",{className:U("w-full space-y-3 overflow-auto",i),children:[g.jsxs("div",{className:"flex w-full items-center justify-between space-x-2 overflow-auto p-1",children:[g.jsxs("div",{className:"flex flex-1 items-center space-x-2 space-y-4",children:[n>0?Array.from({length:n}).map((a,s)=>g.jsx(rn,{className:"h-10 w-[150px] lg:w-[250px]"},s)):null,r>0?Array.from({length:r}).map((a,s)=>g.jsx(rn,{className:"h-10 w-[70px] border-dashed"},s)):null]}),o?g.jsx(rn,{className:"ml-auto hidden h-7 w-[70px] lg:flex"}):null]}),g.jsx("div",{className:"rounded-md border",children:g.jsxs(Xb,{children:[g.jsx(Qb,{children:Array.from({length:1}).map((a,s)=>g.jsx(os,{className:"hover:bg-transparent",children:Array.from({length:e}).map((l,c)=>g.jsx(ew,{children:g.jsx(rn,{className:"h-6 w-full"})},c))},s))}),g.jsx(Jb,{children:Array.from({length:t}).map((a,s)=>g.jsx(os,{className:"hover:bg-transparent",children:Array.from({length:e}).map((l,c)=>g.jsx(Dd,{children:g.jsx(rn,{className:"h-6 w-full"})},c))},s))})]})}),g.jsxs("div",{className:"flex w-full flex-col items-center justify-between gap-4 overflow-auto px-2 py-1 sm:flex-row sm:gap-8",children:[g.jsx("div",{className:"flex-1",children:g.jsx(rn,{className:"h-8 w-40"})}),g.jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(rn,{className:"h-8 w-24"}),g.jsx(rn,{className:"h-8 w-[70px]"})]}),g.jsx("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:g.jsx(rn,{className:"h-8 w-20"})}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(rn,{className:"hidden size-8 lg:block"}),g.jsx(rn,{className:"size-8"}),g.jsx(rn,{className:"size-8"}),g.jsx(rn,{className:"hidden size-8 lg:block"})]})]})]})]}),SZ=({className:e,...t})=>g.jsx("nav",{role:"navigation","aria-label":"pagination",className:U("mx-auto flex w-full justify-center",e),...t});SZ.displayName="Pagination";const CZ=y.forwardRef(({className:e,...t},n)=>g.jsx("ul",{ref:n,className:U("flex flex-row items-center gap-1",e),...t}));CZ.displayName="PaginationContent";const tw=y.forwardRef(({className:e,...t},n)=>g.jsx("li",{ref:n,className:U("",e),...t}));tw.displayName="PaginationItem";const $d=({className:e,isActive:t,size:n="icon",...r})=>g.jsx("a",{"aria-current":t?"page":void 0,className:U(Al({variant:t?"outline":"ghost",size:n}),e),...r});$d.displayName="PaginationLink";const EZ=({className:e,...t})=>g.jsxs($d,{"aria-label":"Go to previous page",size:"default",className:U("gap-1 pl-2.5",e),...t,children:[g.jsx(wu,{className:"h-4 w-4"}),g.jsx("span",{children:"Previous"})]});EZ.displayName="PaginationPrevious";const _Z=({className:e,...t})=>g.jsxs($d,{"aria-label":"Go to next page",size:"default",className:U("gap-1 pr-2.5",e),...t,children:[g.jsx("span",{children:"Next"}),g.jsx(Oa,{className:"h-4 w-4"})]});_Z.displayName="PaginationNext";const UP=({className:e,...t})=>g.jsxs("span",{"aria-hidden":!0,className:U("flex h-9 w-9 items-center justify-center",e),...t,children:[g.jsx(tv,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"More pages"})]});UP.displayName="PaginationEllipsis";const kZ=({className:e,...t})=>g.jsxs($d,{"aria-label":"Go to next page",size:"default",className:U("gap-1 pr-2.5",e),...t,children:[g.jsx("span",{className:"sr-only",children:"Next Last"}),g.jsx(Oa,{className:"h-4 w-4"})]});kZ.displayName="PaginationNextLast";const OZ=({className:e,...t})=>g.jsxs($d,{"aria-label":"Go to previous page",size:"default",className:U("gap-1 pl-2.5",e),...t,children:[g.jsx(wu,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Previous Last"})]});OZ.displayName="PaginationPreviousLast";const L7e=({totalPosts:e,postsPerPage:t,currentPage:n,setCurrentPage:r})=>{const o=[];for(let p=1;p<=Math.ceil(e/t);p++)o.push(p);const a=Math.floor(2/2),s=o.slice(Math.max(0,n-1-a),Math.min(n-1+a+1,o.length)),l=()=>{n<o.length&&r(n+1)},c=()=>{n>1&&r(n-1)},u=()=>{n>1&&r(1)},d=()=>{n<o.length&&r(o.length)},f=()=>{const p=s.map((h,m)=>g.jsx(tw,{className:n===h?"rounded-md bg-primary":"",children:g.jsx($d,{onClick:()=>r(h),children:h})},m));return s[0]>1&&p.unshift(g.jsx(UP,{onClick:()=>r(s[0]-1)},"ellipsis-start")),s[s.length-1]<o.length&&p.push(g.jsx(UP,{onClick:()=>r(s[s.length-1]+1)},"ellipsis-end")),p};return g.jsx("div",{className:"p-4",children:g.jsx(SZ,{children:g.jsxs(CZ,{children:[g.jsxs(tw,{children:[g.jsx(OZ,{onClick:u}),g.jsx(EZ,{onClick:c})]}),f(),g.jsxs(tw,{children:[g.jsx(_Z,{onClick:l}),g.jsx(kZ,{onClick:d})]})]})})})},z7e=({columns:e,data:t,pageCount:n,pageSizeOptions:r=[10,20,30,40,50],className:o})=>{var b;const[i,a]=En.useSearchParams(),s=(i==null?void 0:i.get("page"))??"1",l=Number(s),c=isNaN(l)||l<1?1:l,u=(i==null?void 0:i.get("limit"))??"10",d=Number(u),f=isNaN(d)?10:d,[{pageIndex:p,pageSize:h},m]=E.useState({pageIndex:c-1,pageSize:f});E.useEffect(()=>{a({...Object.fromEntries(i),page:(p+1).toString(),limit:h.toString()})},[p,h,i,a]);const v=xY({data:t,columns:e,pageCount:n??-1,getCoreRowModel:vY(),getFilteredRowModel:bY(),state:{pagination:{pageIndex:p,pageSize:h}},onPaginationChange:m,getPaginationRowModel:wY(),manualPagination:!0,manualFiltering:!0});return g.jsxs("div",{className:o,children:[g.jsxs(Hh,{className:"h-[calc(80vh-220px)] rounded-md border",children:[g.jsxs(Xb,{className:"relative",children:[g.jsx(Qb,{children:v.getHeaderGroups().map(w=>g.jsx(os,{children:w.headers.map(x=>g.jsx(ew,{children:x.isPlaceholder?null:jb(x.column.columnDef.header,x.getContext())},x.id))},w.id))}),g.jsx(Jb,{children:(b=v.getRowModel().rows)!=null&&b.length?v.getRowModel().rows.map(w=>g.jsx(os,{"data-state":w.getIsSelected()&&"selected",children:w.getVisibleCells().map(x=>g.jsx(Dd,{children:jb(x.column.columnDef.cell,x.getContext())},x.id))},w.id)):g.jsx(os,{children:g.jsx(Dd,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]}),g.jsx(Wh,{orientation:"horizontal"})]}),g.jsxs("div",{className:"flex flex-col items-center justify-end gap-2 space-x-2 py-4 sm:flex-row",children:[g.jsxs("div",{className:"flex w-full items-center justify-between",children:[g.jsxs("div",{className:"flex-1 text-sm text-muted-foreground",children:[v.getFilteredSelectedRowModel().rows.length," of"," ",v.getFilteredRowModel().rows.length," row(s) selected."]}),g.jsx("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("p",{className:"whitespace-nowrap text-sm font-medium",children:"Rows per page"}),g.jsxs(Ei,{value:`${v.getState().pagination.pageSize}`,onValueChange:w=>{v.setPageSize(Number(w))},children:[g.jsx(zo,{className:"h-8 w-[70px]",children:g.jsx(_i,{placeholder:v.getState().pagination.pageSize})}),g.jsx(jo,{side:"top",children:r.map(w=>g.jsx(Pt,{value:`${w}`,children:w},w))})]})]})})]}),g.jsxs("div",{className:"flex w-full items-center justify-between gap-2 sm:justify-end",children:[g.jsxs("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",v.getState().pagination.pageIndex+1," of"," ",v.getPageCount()]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(mt,{"aria-label":"Go to first page",variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>v.setPageIndex(0),disabled:!v.getCanPreviousPage(),children:g.jsx(vte,{className:"h-4 w-4","aria-hidden":"true"})}),g.jsx(mt,{"aria-label":"Go to previous page",variant:"outline",className:"h-8 w-8 p-0",onClick:()=>v.previousPage(),disabled:!v.getCanPreviousPage(),children:g.jsx(wu,{className:"h-4 w-4","aria-hidden":"true"})}),g.jsx(mt,{"aria-label":"Go to next page",variant:"outline",className:"h-8 w-8 p-0",onClick:()=>v.nextPage(),disabled:!v.getCanNextPage(),children:g.jsx(Oa,{className:"h-4 w-4","aria-hidden":"true"})}),g.jsx(mt,{"aria-label":"Go to last page",variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>v.setPageIndex(v.getPageCount()-1),disabled:!v.getCanNextPage(),children:g.jsx(bte,{className:"h-4 w-4","aria-hidden":"true"})})]})]})]})]})};function j7e({key:e,data:t,handleAction:n,className:r}){return g.jsx(yc,{value:e,className:U("mt-4",r),children:g.jsx("div",{className:"h-40 w-full overflow-auto rounded-md border p-4",children:g.jsxs("table",{className:"w-full",children:[g.jsx("thead",{children:g.jsxs("tr",{children:[g.jsx("th",{className:"border p-2 text-left pb-2",children:"Note"}),g.jsx("th",{className:"border p-2 text-left pb-2",children:"Actions"})]})}),g.jsx("tbody",{children:t==null?void 0:t.map(o=>g.jsxs("tr",{children:[g.jsx("td",{className:"border p-2 text-left pb-2",children:o.text}),g.jsx("td",{className:"flex justify-left border p-2 text-center",children:g.jsx(ZO,{link:"form-card",handleAction:n,Item:o})})]},o.id))})]})})})}const R7e={position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.5)",zIndex:9999};function B7e({show:e,className:t}){return e?g.jsx("div",{style:R7e,className:t}):null}function PZ({pageTitles:e={},defaultTitle:t="Default Title",className:n}){const r=En.useLocation(),o=e[r.pathname]||t;return g.jsx("header",{className:U("group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 flex h-12 shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear",n),children:g.jsxs("div",{className:"flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6",children:[g.jsx(vO,{className:"-ml-1"}),g.jsx(bd,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),g.jsx("h1",{className:"text-xl font-bold",children:o})]})})}function AZ({items:e,pageTitles:t={}}){const n=En.useLocation(),r=En.useNavigate(),o=t[n.pathname]||"Default Title";return g.jsx(Jh,{children:g.jsx(hb,{className:"flex flex-col gap-2",children:g.jsx(vc,{children:e.map(i=>g.jsx(Vs,{className:o==i.title?"font-bold bg-white rounded-lg shadow-md":"",children:g.jsxs(qs,{tooltip:i.title,onClick:()=>{r(i.url)},children:[i.icon&&g.jsx(i.icon,{}),g.jsx("span",{children:i.title})]})},i.title))})})})}function TZ({items:e,...t}){return g.jsx(Jh,{...t,children:g.jsx(hb,{children:g.jsx(vc,{children:e.map(n=>g.jsx(Vs,{children:g.jsx(qs,{asChild:!0,children:g.jsxs("a",{href:n.url,target:n.target||"",children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})})},n.title))})})})}function MZ({user:e,onLogout:t,menuItems:n=[],className:r}){const{isMobile:o}=mc();return g.jsx(vc,{children:g.jsx(Vs,{children:g.jsxs(oc,{children:[g.jsx(ic,{asChild:!0,children:g.jsxs(qs,{size:"lg",className:U("data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",r),children:[g.jsxs(rp,{className:"h-8 w-8 rounded-lg",children:[g.jsx(op,{src:e.avatar,alt:e.name}),g.jsx(ip,{className:"rounded-lg",children:e.name.split(" ").map(i=>i[0]).join("").toUpperCase().slice(0,2)})]}),g.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[g.jsx("span",{className:"truncate font-medium",children:e.name}),g.jsx("span",{className:"truncate text-xs text-muted-foreground",children:e.email})]}),g.jsx(bx,{className:"ml-auto size-4"})]})}),g.jsxs(zs,{className:"w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg",side:o?"bottom":"right",align:"end",sideOffset:4,children:[g.jsx($0,{className:"p-0 font-normal",children:g.jsxs("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:[g.jsxs(rp,{className:"h-8 w-8 rounded-lg",children:[g.jsx(op,{src:e.avatar,alt:e.name}),g.jsx(ip,{className:"rounded-lg",children:e.name.split(" ").map(i=>i[0]).join("").toUpperCase().slice(0,2)})]}),g.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[g.jsx("span",{className:"truncate font-medium",children:e.name}),g.jsx("span",{className:"truncate text-xs text-muted-foreground",children:e.email})]})]})}),g.jsx(nd,{}),n.map((i,a)=>g.jsxs(wr,{onClick:i.onClick,children:[i.icon&&g.jsx(i.icon,{className:"mr-2 h-4 w-4"}),i.label]},a)),n.length>0&&g.jsx(nd,{}),g.jsxs(wr,{onClick:t,children:[g.jsx(Gue,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})})}function V7e({items:e,className:t}){const{isMobile:n}=mc();return g.jsxs(Jh,{className:U("group-data-[collapsible=icon]:hidden",t),children:[g.jsx(SO,{children:"Documents"}),g.jsxs(vc,{children:[e.map(r=>g.jsxs(Vs,{children:[g.jsx(qs,{asChild:!0,children:g.jsxs("a",{href:r.url,children:[g.jsx(r.icon,{}),g.jsx("span",{children:r.name})]})}),g.jsxs(oc,{children:[g.jsx(ic,{asChild:!0,children:g.jsxs(CO,{showOnHover:!0,className:"rounded-sm data-[state=open]:bg-accent",children:[g.jsx(tv,{}),g.jsx("span",{className:"sr-only",children:"More"})]})}),g.jsxs(zs,{className:"w-24 rounded-lg",side:n?"bottom":"right",align:n?"end":"start",children:[g.jsxs(wr,{children:[g.jsx(Bue,{}),g.jsx("span",{children:"Open"})]}),g.jsxs(wr,{children:[g.jsx(Jue,{}),g.jsx("span",{children:"Share"})]})]})]})]},r.name)),g.jsx(Vs,{children:g.jsxs(qs,{className:"text-sidebar-foreground/70",children:[g.jsx(tv,{className:"text-sidebar-foreground/70"}),g.jsx("span",{children:"More"})]})})]})]})}const NZ=({user:e,onLogout:t,className:n})=>{var r;return g.jsxs(oc,{children:[g.jsx(ic,{asChild:!0,children:g.jsx(mt,{variant:"ghost",className:U("relative h-12 w-14 rounded-full",n),children:g.jsxs(rp,{className:"h-12 w-12",children:[g.jsx(op,{src:(e==null?void 0:e.avatar)||"https://png.pngtree.com/png-clipart/20230927/original/pngtree-man-avatar-image-for-profile-png-image_13001882.png",alt:(e==null?void 0:e.name)||""}),g.jsx(ip,{children:((r=e==null?void 0:e.name)==null?void 0:r.substring(0,2).toUpperCase())||"U"})]})})}),g.jsxs(zs,{className:"w-56",align:"end",forceMount:!0,children:[g.jsx($0,{className:"font-normal",children:g.jsxs("div",{className:"flex flex-col space-y-1",children:[g.jsx("p",{className:"text-sm font-medium leading-none",children:e==null?void 0:e.name}),g.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:e==null?void 0:e.email})]})}),g.jsx(nd,{}),g.jsx(wr,{onClick:t,children:"Log out"})]})]})},q7e=({item:e,setOpen:t})=>{const n=typeof e.icon=="string"?q0[e.icon]||q0.arrowRight:e.icon||q0.arrowRight;return g.jsx("div",{className:"space-y-3 text-white",onClickCapture:()=>{t&&t(!1)},children:g.jsxs(En.NavLink,{className:({isActive:r})=>U("flex transform items-center rounded-full px-3 py-2 text-gray-200 transition-colors duration-300 hover:bg-gray-50 hover:text-primary hover:dark:text-black ",r&&"bg-gray-50 text-primary dark:text-black"),to:e.href,end:!0,children:[g.jsx(n,{className:"h-5 w-5","aria-hidden":"true"}),g.jsx("span",{className:"mx-2 text-sm font-medium",children:e.label})]})},e.href)},DZ=({items:e,setOpen:t,className:n})=>e!=null&&e.length?g.jsx("nav",{className:U("-mx-3 space-y-6",n),children:e.filter(r=>r.isShow!==!1).map(r=>g.jsx(q7e,{item:r,setOpen:t},r.href))}):null,$Z=({navMain:e=[],navSecondary:t=[],user:n,onLogout:r,logoText:o="ACS Tracking",logoHref:i="#",logoIcon:a=Mue,className:s,pageTitles:l={},...c})=>g.jsxs(qW,{collapsible:"icon",...c,className:s,children:[g.jsx(bO,{children:g.jsx(vc,{children:g.jsx(Vs,{children:g.jsx(qs,{asChild:!0,className:"data-[slot=sidebar-menu-button]:!p-1.5",children:g.jsxs("a",{href:i,children:[g.jsx(a,{className:"h-5 w-5"}),g.jsx("span",{className:"text-base font-semibold",children:o})]})})})})}),g.jsxs(xO,{children:[g.jsx(AZ,{items:e,pageTitles:l}),g.jsx(TZ,{items:t,className:"mt-auto"})]}),n&&g.jsx(wO,{children:g.jsx(MZ,{user:n,onLogout:r})})]}),U7e=({setSidebarOpen:e,sidebarOpen:t,navItems:n,logoText:r="Logo",logoHref:o="/",className:i})=>g.jsx(g.Fragment,{children:g.jsx(Rh,{open:t,onOpenChange:e,children:g.jsx(ad,{side:"left",className:U("bg-background !px-0",i),children:g.jsx("div",{className:"space-y-4 py-4",children:g.jsxs("div",{className:"space-y-4 px-3 py-2",children:[g.jsx(En.Link,{to:o,className:"py-2 text-2xl font-bold text-white ",children:r}),g.jsx("div",{className:"space-y-1 px-2",children:g.jsx(DZ,{items:n,setOpen:e})})]})})})})});function H7e({children:e,sidebarProps:t,headerProps:n,defaultOpen:r=!0,showOverlay:o=!1,overlayComponent:i,className:a}){return g.jsx("div",{className:U("flex h-screen overflow-hidden bg-secondary",a),children:g.jsx("main",{className:"relative flex-1 overflow-y-auto bg-background focus:outline-none",children:g.jsxs(mO,{defaultOpen:r,children:[g.jsx($Z,{...t}),g.jsxs(yO,{children:[g.jsx(PZ,{...n}),g.jsx("div",{className:"flex flex-1 flex-col shadow-lg",children:g.jsx("div",{className:"@container/main flex flex-1 flex-col gap-2",children:g.jsxs("div",{className:"flex flex-col gap-4 py-4 md:gap-6 md:py-6",children:[e,o&&i]})})})]})]})})})}const W7e=({isOpen:e,onClose:t,onConfirm:n,loading:r,title:o="Are you sure?",description:i="Are you sure you want to continue?",className:a})=>g.jsx(Z0,{title:o,description:i,isOpen:e,onClose:t,className:a,children:g.jsxs("div",{className:"flex w-full items-center justify-end space-x-2 pt-6",children:[g.jsx(mt,{disabled:r,variant:"outline",onClick:t,children:"Cancel"}),g.jsx(mt,{disabled:r,variant:"destructive",onClick:n,children:"Continue"})]})}),K7e=({openDeleteDialog:e,setIsOpenDeleteDialog:t,onDelete:n,className:r})=>g.jsx("div",{className:"flex gap-3 mb-4",children:g.jsx(Z0,{isOpen:e,onClose:()=>t(!1),className:U("justify-center bg-transparent border-none",r),children:g.jsxs("div",{className:"rounded-md bg-gray-50 p-4 md:p-6",children:[g.jsx("p",{className:"text-black",children:"Are you sure you want to delete?"}),g.jsxs("div",{className:"flex items-center justify-between mt-4 space-x-4",children:[g.jsx(mt,{className:"flex-1 bg-red-500 disabled:bg-gray-500",onClick:n,children:"Yes"}),g.jsx(mt,{className:"flex-1",onClick:()=>t(!1),children:"No"})]})]})},"delete")}),G7e=({renderModal:e,modalName:t,showAddBtn:n=!0,title:r,userPopup:o=!1,extraBtns:i,isOpen:a,setIsOpen:s,isAllowedCreate:l=!0,className:c})=>{const u=()=>{s("")};return g.jsxs("div",{className:"flex justify-end",children:[g.jsxs("div",{className:"flex gap-2",children:[n&&l&&g.jsxs(mt,{className:"flex justify-end ml-auto text-xs md:text-sm ",onClick:()=>s(t??"create"),children:[g.jsx(xx,{className:"mr-2 h-4 w-4"})," Add New"]}),i&&i()]}),g.jsxs(Z0,{userPopup:o,isOpen:a,onClose:u,className:U("!bg-background !px-1 w-full lg:w-[85%]",c),children:[g.jsx("h5",{className:"text-2xl font-bold px-10",children:r??"Add Client"}),g.jsx(Hh,{className:"px-6",children:e(u)})]})]})},IZ=({onChange:e,startDate:t,endDate:n,className:r})=>{const[o,i]=y.useState({from:t,to:n}),[a,s]=y.useState(!1),l=()=>{e(o==null?void 0:o.from,o==null?void 0:o.to),s(!1)};return g.jsx(g.Fragment,{children:g.jsxs("div",{className:U("grid z-50",r),children:[g.jsx("label",{className:"mb-0 block text-md font-bold",children:"Pick a date"}),g.jsxs(ud,{open:a,children:[g.jsx(dd,{asChild:!0,onClick:()=>s(c=>!c),children:g.jsxs(mt,{id:"date",variant:"outline",className:U("w-[100%] justify-start text-left font-normal truncate overflow-hidden text-ellipsis",!o&&"text-muted-foreground"),children:[g.jsx(kue,{className:"pr-2"}),o!=null&&o.from?o.to?g.jsxs(g.Fragment,{children:[Jo(o.from,"LLL dd, y")," -"," ",Jo(o.to,"LLL dd, y")]}):Jo(o.from,"LLL dd, y"):g.jsx("span",{children:"Pick a date"})]})}),g.jsxs(lc,{className:"w-auto p-0 ",align:"start",style:{left:"1rem"},children:[g.jsx(dp,{style:{left:"1rem"},mode:"range",defaultMonth:o==null?void 0:o.from,selected:o,onSelect:i,numberOfMonths:3}),g.jsx(mt,{onClick:l,className:"m-2",children:"Apply"})]})]})]})})},Y7e=({className:e,startDateParamName:t="filterStartDate",endDateParamName:n="filterEndDate"})=>{const r=new URLSearchParams(location.search),o=En.useNavigate(),i=(u,d)=>{u&&d&&(s(u==null?void 0:u.toISOString().split("T")[0]),c(d==null?void 0:d.toISOString().split("T")[0]),r.set(t,u.toISOString().split("T")[0]),r.set(n,d.toISOString().split("T")[0]),o({search:r.toString()}))};E.useEffect(()=>{const u=r.get(t)??iM(new Date).toISOString().split("T")[0],d=r.get(n)??Ef(new Date,3).toISOString().split("T")[0];s(u),c(d)},[location.search]);const[a,s]=E.useState(()=>r.get(t)??iM(new Date).toISOString().split("T")[0]),[l,c]=E.useState(()=>r.get(n)??Ef(new Date,3).toISOString().split("T")[0]);return g.jsx(IZ,{startDate:new Date(a+"T00:00"),endDate:new Date(l+"T00:00"),onChange:i,className:`pt-0 ${e}`})};function Z7e(e,t,n,r){var o=this,i=E.useRef(null),a=E.useRef(0),s=E.useRef(0),l=E.useRef(null),c=E.useRef([]),u=E.useRef(),d=E.useRef(),f=E.useRef(e),p=E.useRef(!0);f.current=e;var h=typeof window<"u",m=!t&&t!==0&&h;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var v=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,w="maxWait"in n,x="debounceOnServer"in n&&!!n.debounceOnServer,S=w?Math.max(+n.maxWait||0,t):null;E.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var C=E.useMemo(function(){var _=function(D){var $=c.current,G=u.current;return c.current=u.current=null,a.current=D,s.current=s.current||D,d.current=f.current.apply(G,$)},k=function(D,$){m&&cancelAnimationFrame(l.current),l.current=m?requestAnimationFrame(D):setTimeout(D,$)},O=function(D){if(!p.current)return!1;var $=D-i.current;return!i.current||$>=t||$<0||w&&D-a.current>=S},P=function(D){return l.current=null,b&&c.current?_(D):(c.current=u.current=null,d.current)},A=function D(){var $=Date.now();if(v&&s.current===a.current&&T(),O($))return P($);if(p.current){var G=t-($-i.current),z=w?Math.min(G,S-($-a.current)):G;k(D,z)}},T=function(){r&&r({})},N=function(){if(h||x){var D=Date.now(),$=O(D);if(c.current=[].slice.call(arguments),u.current=o,i.current=D,$){if(!l.current&&p.current)return a.current=i.current,k(A,t),v?_(i.current):d.current;if(w)return k(A,t),_(i.current)}return l.current||k(A,t),d.current}};return N.cancel=function(){var D=l.current;D&&(m?cancelAnimationFrame(l.current):clearTimeout(l.current)),a.current=0,c.current=i.current=u.current=l.current=null,D&&r&&r({})},N.isPending=function(){return!!l.current},N.flush=function(){return l.current?P(Date.now()):d.current},N},[v,w,t,S,b,m,h,x,r]);return C}function X7e(e,t){return e===t}function Q7e(e,t,n){var r=X7e,o=E.useRef(e),i=E.useState({})[1],a=Z7e(E.useCallback(function(l){o.current=l,i({})},[i]),t,n,i),s=E.useRef(e);return r(s.current,e)||(a(e),s.current=e),[o.current,a]}const J7e=({placeholder:e,className:t})=>{const[n,r]=En.useSearchParams(),o=n.get("search")||"",[i,a]=E.useState(o),[s]=Q7e(i,1e3),l=E.useCallback(c=>{if(c===""||c===void 0||!c){n.delete("search"),r(n);return}r({...Object.fromEntries(n),page:"1",search:c})},[n,r]);return E.useEffect(()=>{l(s)},[s,l]),g.jsx(xi,{placeholder:e||"Search country...",value:i,onChange:c=>a(c.target.value),className:U("w-full md:max-w-sm",t)})},FZ=({title:e,description:t,className:n})=>g.jsxs("div",{className:n,children:[g.jsx("h2",{className:"text-sm font-bold t sm:text-xl xs:hidden",children:e}),g.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),e9e=({title:e="Kutubi"})=>g.jsx(_ae,{children:g.jsxs("title",{children:[" ",e," "]})}),LZ=({setTheme:e,className:t})=>g.jsxs(oc,{children:[g.jsx(ic,{asChild:!0,children:g.jsxs(mt,{variant:"outline",size:"icon",className:t,children:[g.jsx(tde,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),g.jsx(kI,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),g.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),g.jsxs(zs,{align:"end",children:[g.jsx(wr,{onClick:()=>e("light"),children:"Light"}),g.jsx(wr,{onClick:()=>e("dark"),children:"Dark"}),g.jsx(wr,{onClick:()=>e("pink"),children:"Pink"}),g.jsx(wr,{onClick:()=>e("system"),children:"System"})]})]}),t9e=({title:e="App Title",onLogout:t,user:n,setTheme:r,extraContent:o,className:i})=>g.jsxs("div",{className:U("flex flex-1 items-center bg-secondary px-4",i),children:[g.jsx(FZ,{title:e}),g.jsxs("div",{className:"ml-4 flex items-center md:ml-6",children:[g.jsx(NZ,{user:n,onLogout:t}),g.jsx(LZ,{setTheme:r}),o,g.jsx("h2",{className:"text-xl font-bold tracking-tight text-primary sm:text-3xl sm:hidden",children:e.substring(0,3).toUpperCase()})]})]}),zZ=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ie(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},jZ=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?zZ(r.ref,n,e):r.refs&&r.refs.forEach(o=>zZ(o,n,e))}},n9e=(e,t)=>{t.shouldUseNativeValidation&&jZ(e,t);const n={};for(const r in e){const o=Ie(t.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(r9e(t.names||Object.keys(e),r)){const a=Object.assign({},Ie(n,r));$t(a,"root",i),$t(n,r,a)}else $t(n,r,i)}return n},r9e=(e,t)=>e.some(n=>n.startsWith(t+"."));var o9e=function(e,t){for(var n={};e.length;){var r=e[0],o=r.code,i=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[a]={message:s.message,type:s.code}}else n[a]={message:i,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),t){var l=n[a].types,c=l&&l[r.code];n[a]=cV(a,t,n,o,c?[].concat(c,r.message):r.message)}e.shift()}return n},i9e=function(e,t,n){return n===void 0&&(n={}),function(r,o,i){try{return Promise.resolve((function(a,s){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return i.shouldUseNativeValidation&&jZ({},i),{errors:{},values:n.raw?r:c}})}catch(c){return s(c)}return l&&l.then?l.then(void 0,s):l})(0,function(a){if((function(s){return Array.isArray(s==null?void 0:s.errors)})(a))return{values:{},errors:n9e(o9e(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};function a9e(){const{pathname:e}=En.useLocation();return E.useMemo(()=>e,[e])}function RZ(){const e=En.useNavigate();return E.useMemo(()=>({back:()=>e(-1),forward:()=>e(1),reload:()=>window.location.reload(),push:n=>e(n),replace:n=>e(n,{replace:!0})}),[e])}function BZ({loading:e,edit:t,showCancelBtn:n,showNewBtn:r,onClick:o,className:i}){const a=E.useContext(yi),s=a==null?void 0:a.reset;return g.jsxs("div",{className:U("m-2 flex justify-end gap-4",i),children:[n&&g.jsx(mt,{type:"button",className:"flex h-10 items-center rounded-lg bg-gray-100 px-4 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-200",children:"Cancel"}),r&&g.jsx(mt,{type:"button",variant:"outline",onClick:()=>s==null?void 0:s(),className:"flex h-10 items-center rounded-lg px-4 text-sm font-medium transition-colors",disabled:e,"aria-disabled":e,children:"New"}),t&&g.jsx(mt,{type:"submit",onClick:o,className:"flex h-10 items-center rounded-lg px-4 text-sm font-medium transition-colors",disabled:e,"aria-disabled":e,children:e?"please wait..":"Submit"})]})}function s9e(e){const t={};return Object.keys(e||{}).forEach(n=>{t[n]=Xje()}),gZ(t)}function l9e(e,t){if(!t)return e;const n=new FormData;for(const r in e)if(t[r]!==void 0){const o=t[r](e[r]);if(o==null)continue;Array.isArray(o)?o.forEach(i=>{n.append(`${r}[]`,i)}):n.append(r,o)}else n.append(r,e[r]);return n}function c9e({item:e,url:t,redirectUrl:n,edit:r=!0,showCancelBtn:o=!1,showNewBtn:i=!0,onSave:a,onReset:s,onError:l,children:c,resetForm:u=!1,validationSchema:d,requestHeaders:f,dataFormatter:p,baseURL:h="",multipartUrls:m=[]}){const v=RZ(),{toast:b}=Cb(),w=E.useRef(null),[x,S]=E.useState(!1),[C,_]=E.useState(e),[k,O]=E.useState(!(e!=null&&e.id)),P=Qf(),[A,T]=HD(t,{baseURL:h,customHeaders:f??{},multipartUrls:m}),{isAllowed:N,getResourceByUrl:D}=pd(),$=e!=null&&e.id?r?fd.Update:fd.Read:fd.Create,[G,z]=E.useState(!0);E.useEffect(()=>{z(N($,D(t)))},[$,D,N,t]);const K=d??s9e(e||{}),R=OV({defaultValues:E.useMemo(()=>e||void 0,[e]),resolver:i9e(K)}),W=()=>{R.reset(),_(void 0),O(!0),s&&s()};E.useEffect(()=>{_(e),e&&Object.keys(e).length>0&&Object.keys(R.getValues()).forEach(H=>{R.setValue(H,e[H])}),O(!(e!=null&&e.id))},[e,R]);const Z=()=>{var H;(H=w.current)==null||H.requestSubmit()},te={...R,errors:R.formState.errors,create:k,edit:r,itemState:C,submit:Z,reset:W,formState:R.formState},V=R.handleSubmit(async(H,F)=>{var ae,Q,X,q,J,se,I,Ce,oe,ve,De,je;F==null||F.preventDefault(),S(!0);const ee=p?l9e(H,p):H;if(k){const fe=b({title:"Please wait ..."});try{const pe=await P.post(A,ee,T);n&&n!=="#"&&v.push(n),b({title:((ae=pe.data)==null?void 0:ae.message)??"Success",description:Tf(new Date)}),u&&W(),a==null||a(((Q=pe.data)==null?void 0:Q.data)??pe.data,"add")}catch(pe){l==null||l(pe);const Re=((q=(X=pe==null?void 0:pe.response)==null?void 0:X.data)==null?void 0:q.message)||(pe==null?void 0:pe.message)||"Something went wrong";R.setError("root",{message:Yw(Re)}),b({title:((se=(J=pe==null?void 0:pe.response)==null?void 0:J.data)==null?void 0:se.error)??"Request failed",description:Tf(new Date),variant:"destructive"})}finally{fe.dismiss(),S(!1)}return}if(r){const fe=b({title:"Please wait ..."});try{const pe=await P.patch(`${A}/${C==null?void 0:C.id}`,ee,T);b({title:((I=pe.data)==null?void 0:I.message)??"Success",description:Tf(new Date)}),a==null||a(((Ce=pe.data)==null?void 0:Ce.data)??pe.data,"edit"),u&&W()}catch(pe){l==null||l(pe);const Re=((ve=(oe=pe==null?void 0:pe.response)==null?void 0:oe.data)==null?void 0:ve.message)||(pe==null?void 0:pe.message)||"Something went wrong";R.setError("root",{message:Yw(Re)}),b({title:((je=(De=pe==null?void 0:pe.response)==null?void 0:De.data)==null?void 0:je.error)??"Request failed",description:Tf(new Date),variant:"destructive"})}finally{fe.dismiss(),S(!1)}}});return g.jsx(NN,{fallback:g.jsx("div",{children:"Something went wrong. Please try again."}),onError:H=>{console.error("Form Error:",H),l==null||l(H)},children:g.jsx(yi.Provider,{value:te,children:g.jsx("form",{onSubmit:V,ref:w,children:G?g.jsx("div",{className:`rounded-md flex flex-col ${t==="/login"?"h-[90vh]":""}`,children:g.jsx("div",{className:"rounded-md bg-white dark:bg-stone-950 flex-1 overflow-auto p-4",children:g.jsxs(Dx,{className:"p-4",children:[c,R.formState.errors.root&&g.jsxs(X1,{variant:"destructive",className:"mt-2",children:[g.jsx(Tue,{className:"h-4 w-4"}),g.jsx(Q1,{children:"Error"}),g.jsx(J1,{children:g.jsx("p",{dangerouslySetInnerHTML:{__html:R.formState.errors.root.message??""}})})]}),g.jsx("div",{className:"p-4 bg-white dark:bg-stone-950 border-t sticky bottom-0 z-10",children:g.jsx(BZ,{showNewBtn:i,loading:x,showCancelBtn:o,edit:r})})]})})}):g.jsx("div",{className:"text-center font-bold w-full text-stone-600",children:"Not Allowed"})})})})}const VZ=y.forwardRef(({onFileSelect:e,accept:t="*/*",validationRules:n={maxSize:5*1024*1024,acceptedTypes:void 0},children:r,...o},i)=>{const a=E.useRef(null),{toast:s}=Cb(),l=d=>{if(n.maxSize&&d.size>n.maxSize){const f=n.maxSize/1048576;return s({title:"File too large",description:`File size should be less than ${f}MB`,variant:"destructive"}),!1}if(n.acceptedTypes&&n.acceptedTypes.length>0&&!n.acceptedTypes.includes(d.type))return s({title:"Invalid file type",description:`Please select: ${n.acceptedTypes.join(", ")}`,variant:"destructive"}),!1;if(n.customValidation){const f=n.customValidation(d);if(typeof f=="string")return s({title:"File validation failed",description:f,variant:"destructive"}),!1;if(!f)return s({title:"File validation failed",variant:"destructive"}),!1}return!0},c=d=>{var p;const f=(p=d.target.files)==null?void 0:p[0];f&&(l(f)&&(e==null||e(f),s({title:"File selected",description:f.name})),d.target.value="")},u=d=>{var f,p;d.preventDefault(),(f=a.current)==null||f.click(),(p=o.onClick)==null||p.call(o,d)};return g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx("input",{type:"file",ref:a,className:"hidden",accept:t,onChange:c}),g.jsx(mt,{...o,onClick:u,ref:i,children:r})]})});VZ.displayName="FileUploadButton";function u9e({title:e,name:t,icon:n,placeholder:r,selected:o,options:i=[],onTypeing:a,otherOption:s,onChange:l,className:c,hidden:u,disabled:d},f){const p=E.useContext(yi),[h,m]=y.useState(!1),[v,b]=y.useState(i);y.useEffect(()=>{b(i||[])},[i]);const w=x=>{const S=v.find(C=>String(C.value)===String(x));return S?S.label:s&&String(x)==="0"?s:""};return g.jsx(es,{control:p==null?void 0:p.control,name:t,render:({field:x})=>{const S=x.value??o??"",C=w(S);return u?g.jsx(g.Fragment,{}):g.jsxs(bi,{className:U("mb-2",c),children:[e?g.jsxs(wi,{className:"font-bold flex items-center gap-2",children:[n||null,e]}):null,g.jsx(ts,{children:g.jsxs(ud,{open:h,onOpenChange:m,children:[g.jsx(dd,{asChild:!0,children:g.jsxs(mt,{ref:f,type:"button",variant:"outline",role:"combobox","aria-expanded":h,className:U("w-full justify-between truncate overflow-hidden text-ellipsis",d&&"opacity-60 cursor-not-allowed"),disabled:d,children:[g.jsx("span",{className:"truncate w-full text-left",children:C||r||"Select..."}),g.jsx(EI,{className:"opacity-50 flex-shrink-0"})]})}),!d&&g.jsx(lc,{className:"w-full p-0",children:g.jsxs(gh,{children:[g.jsx(p0,{placeholder:r,className:"h-9",onValueChange:a}),g.jsxs(h0,{children:[g.jsx(g0,{children:"No item found."}),g.jsxs(m0,{children:[s&&g.jsxs(Yu,{value:`0 ${s}`,onSelect:()=>{x.onChange("0"),l==null||l(ei(t,"0")),m(!1)},children:[s,g.jsx(ka,{className:U("ml-auto",String(S)==="0"?"opacity-100":"opacity-0")})]},"__other__"),v.map(_=>g.jsxs(Yu,{value:`${_.value} ${_.label}`,onSelect:()=>{const k=String(_.value),O=String(S)===k?"":k;x.onChange(O),l==null||l(ei(t,O)),m(!1)},children:[_.label,g.jsx(ka,{className:U("ml-auto",String(S)===String(_.value)?"opacity-100":"opacity-0")})]},String(_.value)))]})]})]})})]})}),g.jsx(ns,{className:"h-auto min-h-2"})]})}})}const d9e=y.forwardRef(u9e);function f9e({title:e,name:t,placeholder:n,className:r,selected:o,options:i,onChange:a,...s},l){const c=E.useContext(yi),[u,d]=E.useState(""),[f,p]=E.useState(i||[]),h=v=>String(v.value)+v.label;E.useEffect(()=>{Array.isArray(i)&&i.length>0&&p([...i])},[i]);const m=typeof(c==null?void 0:c.watch)=="function"?c==null?void 0:c.watch(t):o;return E.useEffect(()=>{const v=f.filter(b=>String(b.value)===String(m));v.length>0?d(h(v[0])):d("")},[f,m]),c?g.jsx(es,{control:c.control,name:t,render:({field:v})=>g.jsxs(bi,{className:`mb-2 ${r??""}`,children:[e&&g.jsx(wi,{children:e}),g.jsxs(Ei,{onValueChange:b=>{const w=b===u?"":b;d(w),a&&a(ei(t,w)),v.onChange(w)},defaultValue:String(v.value??""),children:[g.jsx(ts,{children:g.jsx(zo,{children:g.jsx(_i,{placeholder:s.otherOption?"":n||"Select"})})}),g.jsxs(jo,{children:[s.otherOption&&g.jsx(Pt,{value:"0",children:"Please Select"}),f.map(b=>g.jsx(Pt,{value:String(b.value),children:b.label},b.value))]})]}),g.jsx(ns,{className:"mt-1 h-auto min-h-2"})]})}):null}const p9e=E.forwardRef(f9e);function h9e(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`}function g9e({title:e,name:t,placeholder:n,className:r,error:o},i){var m,v;const a=E.useContext(yi),s=a==null?void 0:a.watch(t),[l,c]=y.useState((m=a==null?void 0:a.getValues)!=null&&m.call(a)[t]?new Date(String((v=a.getValues)==null?void 0:v.call(a)[t])+"T00:00:00"):void 0),[u,d]=y.useState(l||new Date);E.useEffect(()=>{if(!a)return;const b=l?h9e(l):void 0;a.setValue(t,b)},[l,a,t]),E.useEffect(()=>{a&&(s?typeof s=="string"&&c(new Date(s+"T00:00")):c(void 0))},[s,a]);const f=b=>{d(b)},p=b=>{const w=parseInt(b,10),x=new Date(u.setFullYear(w));d(x)},h=Array.from(new Array(200),(b,w)=>u.getFullYear()-100+w);return a?g.jsx(es,{control:a.control,name:t,render:()=>g.jsxs(bi,{className:`mb-2 ${r??""}`,children:[e&&g.jsx(wi,{children:e}),g.jsxs(ud,{children:[g.jsx(dd,{asChild:!0,children:g.jsxs(mt,{variant:"outline",className:U("w-full justify-start text-left font-normal",!l&&"text-muted-foreground",o?"border-red-300":"border-gray-200"),children:[g.jsx(ET,{className:"mr-2 h-4 w-4"}),l?Jo(l,"PPP"):g.jsx("span",{children:n})]})}),g.jsxs(lc,{style:{width:"fit-content"},className:"p-0",children:[g.jsxs(Ei,{value:u.getFullYear()+"",onValueChange:p,children:[g.jsx(zo,{className:"rounded-none shadow-none",children:g.jsx(_i,{placeholder:"Select a Year"})}),g.jsx(jo,{children:h.map(b=>g.jsx(Pt,{value:b+"",children:b},b))})]}),g.jsx(dp,{mode:"single",selected:l,onSelect:c,month:u,onMonthChange:f,initialFocus:!0})]})]}),g.jsx(ns,{className:"h-auto min-h-2"})]})}):null}const m9e=y.forwardRef(g9e);function v9e({title:e,placeholder:t,name:n,items:r,className:o,disabled:i,onChange:a}){const s=E.useContext(yi);return s?g.jsx(es,{control:s.control,name:n,render:()=>g.jsxs(bi,{className:`mb-3 ${o??""}`,children:[g.jsxs("div",{className:"mb-3",children:[e&&g.jsx(wi,{className:"text-base",children:e}),t&&g.jsx(yk,{children:t})]}),r.map(l=>g.jsx(es,{control:s.control,name:n,render:({field:c})=>{const u=c.value,d=Array.isArray(u)?u==null?void 0:u.includes(l.value):String(u)===String(l.value);return g.jsxs(bi,{className:"flex flex-row items-start space-x-3 space-y-0",children:[g.jsx(ts,{children:g.jsx(fh,{disabled:i,checked:l.checked||d,onCheckedChange:f=>{let p=[l.value];return Array.isArray(u)&&u&&(p=[...u,...p]),a&&a(ei(n,String(l.value??""))),f?c.onChange(r.length===1?l.value:p):c.onChange(Array.isArray(u)?u==null?void 0:u.filter(h=>h!==l.value):"")}})}),g.jsx(wi,{className:"text-sm font-normal",children:l.label})]})}},l.value)),g.jsx(ns,{className:"h-auto min-h-2"})]})}):null}function y9e({title:e,name:t,items:n,onChange:r,vertical:o=!1},i){const a=E.useContext(yi);return a?g.jsx(es,{control:a.control,name:t,render:({field:s})=>g.jsxs(bi,{className:"mb-2",children:[e&&g.jsx(wi,{children:e}),g.jsx(ts,{children:g.jsx(Kk,{onValueChange:l=>{r==null||r(ei(t,l)),s.onChange(l)},defaultValue:s.value,className:o?"flex flex-col space-y-1":"flex flex-row flex-wrap gap-4",children:n.map(l=>g.jsxs(bi,{className:"flex items-center space-x-3 space-y-0",children:[g.jsx(ts,{children:g.jsx(Gk,{value:String(l.value),checked:String(l.value)===String(s.value)})}),g.jsxs(wi,{className:"font-normal flex gap-2 ml-1 pt-1",children:[l.title,l.icon&&E.cloneElement(l.icon,{className:"h-4 w-4"})]})]},l.title))})}),g.jsx(ns,{className:"h-auto min-h-2"})]})}):null}const b9e=E.forwardRef(y9e);function w9e({title:e,name:t,type:n,placeholder:r,className:o,...i},a){const s=E.useContext(yi),l=c=>c.replace(/\D/g,"").replace(/(\d{4})(?=\d)/g,"$1 ");return s?g.jsx(es,{control:s.control,name:t,render:({field:c})=>i.hidden?g.jsx(g.Fragment,{}):g.jsxs(bi,{className:U("mb-2",o),children:[e?g.jsxs(wi,{className:"font-bold",children:[e,n==="date"&&c.value?g.jsxs("span",{className:"text-orange-500 ml-1",children:["(",new Date(String(c.value)).toUTCString().substring(5,11),")"]}):null]}):null,g.jsx(ts,{children:n==="textarea"?g.jsx(MO,{placeholder:r,...c,...i,value:c.value??i.value??"",ref:a}):g.jsx(xi,{type:n,placeholder:r,...c,...i,value:c.value??i.value??"",onChange:u=>{const d=n==="cardNumber"?l(u.target.value):u.target.value;c.onChange(d)},ref:a})}),g.jsx(ns,{className:"h-auto min-h-2"})]})}):null}const x9e=E.forwardRef(w9e);function qZ(e){return/^\d{1,}$/.test(e)}function S9e({title:e,name:t,type:n,placeholder:r,error:o,onChange:i,...a},s){const l=E.useContext(yi),[c,u]=E.useState(null),[d,f]=E.useState(null),p=l==null?void 0:l.watch(t);E.useEffect(()=>{if(!l)return;const v=l.getValues(t);try{u(Number(v==null?void 0:v.split(":")[0])),f(Number(v==null?void 0:v.split(":")[1]))}catch{u(0),f(0)}},[l,t]),E.useEffect(()=>{if(l)try{const v=p==null?void 0:p.split(":")[0],b=p==null?void 0:p.split(":")[1];v&&qZ(v)&&Number(v)!==Number(c)&&u(Number(v)),b&&qZ(b)&&Number(b)!==Number(d)&&f(Number(b))}catch{u(0),f(0)}},[p,l,c,d,t]),E.useEffect(()=>{var w;if(!l||c==null||d==null)return;const v=String(c).padStart(2,"0")+":"+String(d).padStart(2,"0"),b=((w=l.getValues(t))==null?void 0:w.split(":").length)===3?":00":"";if(v+b!==l.getValues(t)&&(l.setValue(t,v),i)){const x=ei(t,v);i(x)}},[d,c,l,t,i]);const h=v=>{f(Number(v.target.value))},m=v=>{u(Number(v.target.value))};return g.jsxs("div",{className:`mb-2 ${a.className??""}`,children:[e&&g.jsx("label",{htmlFor:t,className:`mb-2 block text-sm font-bold ${a.className??""}`,children:e}),g.jsxs("div",{className:"relative inline-flex",children:[g.jsx("input",{id:`${t}-hours`,name:`${t}-hours`,type:"number",disabled:a.disabled,onChange:m,value:String(c??0).padStart(2,"0"),min:"0",placeholder:r,className:`h-9 peer block w-full ${a.disabled?"":"cursor-pointer"} rounded-md border ${["time"].includes(String(n))?"py-0":"py-2"} pl-10 text-sm outline-2 placeholder:text-gray-500 ${o?"border-red-300":"border-gray-200"} ${a.disabled?"text-gray-400":"text-black"} p-1`,ref:s}),g.jsx("div",{className:"self-center p-2 text-2xl",children:":"}),g.jsx("input",{id:`${t}-minutes`,name:`${t}-minutes`,type:"number",disabled:a.disabled,onChange:h,value:String(d??0).padStart(2,"0"),placeholder:r,min:"0",className:`h-9 peer block w-full ${a.disabled?"":"cursor-pointer"} rounded-md border ${["time"].includes(String(n))?"":"py-2"} pl-10 text-sm outline-2 placeholder:text-gray-500 ${o?"border-red-300":"border-gray-200"} ${a.disabled?"text-gray-400":"text-black"} p-1`,ref:s})]}),o&&g.jsx("p",{className:"text-xs italic text-red-500 mt-2",children:o})]})}const C9e=E.forwardRef(S9e);var nw={exports:{}},rw={exports:{}},At={};/** @license React v16.13.1
|
|
523
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const d=u[1];if(t===u[0]){i(u);continue}if(e.external){const p=(l=e.external.registry.get(u[0]))==null?void 0:l.id;if(t!==u[0]&&p){i(u);continue}}if((c=e.metadataRegistry.get(u[0]))==null?void 0:c.id){i(u);continue}if(d.cycle){i(u);continue}if(d.count>1&&e.reused==="ref"){i(u);continue}}}function lZ(e,t){var a,s,l;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=c=>{const u=e.seen.get(c);if(u.ref===null)return;const d=u.def??u.schema,f={...d},p=u.ref;if(u.ref=null,p){r(p);const m=e.seen.get(p),v=m.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(v)):Object.assign(d,v),Object.assign(d,f),c._zod.parent===p)for(const w in d)w==="$ref"||w==="allOf"||w in f||delete d[w];if(v.$ref)for(const w in d)w==="$ref"||w==="allOf"||w in m.def&&JSON.stringify(d[w])===JSON.stringify(m.def[w])&&delete d[w]}const h=c._zod.parent;if(h&&h!==p){r(h);const m=e.seen.get(h);if(m!=null&&m.schema.$ref&&(d.$ref=m.schema.$ref,m.def))for(const v in d)v==="$ref"||v==="allOf"||v in m.def&&JSON.stringify(d[v])===JSON.stringify(m.def[v])&&delete d[v]}e.override({zodSchema:c,jsonSchema:d,path:u.path??[]})};for(const c of[...e.seen.entries()].reverse())r(c[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const c=(s=e.external.registry.get(t))==null?void 0:s.id;if(!c)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(c)}Object.assign(o,n.def??n.schema);const i=((l=e.external)==null?void 0:l.defs)??{};for(const c of e.seen.entries()){const u=c[1];u.def&&u.defId&&(i[u.defId]=u.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Yb(t,"input",e.processors),output:Yb(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function $r(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return $r(r.element,n);if(r.type==="set")return $r(r.valueType,n);if(r.type==="lazy")return $r(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return $r(r.innerType,n);if(r.type==="intersection")return $r(r.left,n)||$r(r.right,n);if(r.type==="record"||r.type==="map")return $r(r.keyType,n)||$r(r.valueType,n);if(r.type==="pipe")return $r(r.in,n)||$r(r.out,n);if(r.type==="object"){for(const o in r.shape)if($r(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if($r(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if($r(o,n))return!0;return!!(r.rest&&$r(r.rest,n))}return!1}const qze=(e,t={})=>n=>{const r=aZ({...n,processors:t});return dr(e,r),sZ(r,e),lZ(r,e)},Yb=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},a=aZ({...o??{},target:i,io:t,processors:n});return dr(e,a),sZ(a,e),lZ(a,e)},Uze={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Hze=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),s&&(o.format=Uze[s]??s,o.format===""&&delete o.format,s==="time"&&delete o.format),c&&(o.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?o.pattern=u[0].source:u.length>1&&(o.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Wze=(e,t,n,r)=>{const o=n,{minimum:i,maximum:a,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?o.type="integer":o.type="number",typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=u,o.exclusiveMinimum=!0):o.exclusiveMinimum=u),typeof i=="number"&&(o.minimum=i,typeof u=="number"&&t.target!=="draft-04"&&(u>=i?delete o.minimum:delete o.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=c,o.exclusiveMaximum=!0):o.exclusiveMaximum=c),typeof a=="number"&&(o.maximum=a,typeof c=="number"&&t.target!=="draft-04"&&(c<=a?delete o.maximum:delete o.exclusiveMaximum)),typeof l=="number"&&(o.multipleOf=l)},Kze=(e,t,n,r)=>{n.not={}},Gze=(e,t,n,r)=>{},Yze=(e,t,n,r)=>{},Zze=(e,t,n,r)=>{const o=e._zod.def,i=EY(o.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Xze=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Qze=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Jze=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(o.minItems=a),typeof s=="number"&&(o.maxItems=s),o.type="array",o.items=dr(i.element,t,{...r,path:[...r.path,"items"]})},eje=(e,t,n,r)=>{var c;const o=n,i=e._zod.def;o.type="object",o.properties={};const a=i.shape;for(const u in a)o.properties[u]=dr(a[u],t,{...r,path:[...r.path,"properties",u]});const s=new Set(Object.keys(a)),l=new Set([...s].filter(u=>{const d=i.shape[u]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(o.required=Array.from(l)),((c=i.catchall)==null?void 0:c._zod.def.type)==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=dr(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},tje=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,a=o.options.map((s,l)=>dr(s,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=a:n.anyOf=a},nje=(e,t,n,r)=>{const o=e._zod.def,i=dr(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=dr(o.right,t,{...r,path:[...r.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=l},rje=(e,t,n,r)=>{const o=e._zod.def,i=dr(o.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},oje=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},ije=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},aje=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},sje=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},lje=(e,t,n,r)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;dr(i,t,r);const a=t.seen.get(e);a.ref=i},cje=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},cZ=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},uje=he("ZodISODateTime",(e,t)=>{g8e.init(e,t),yn.init(e,t)});function dje(e){return bze(uje,e)}const fje=he("ZodISODate",(e,t)=>{m8e.init(e,t),yn.init(e,t)});function pje(e){return wze(fje,e)}const hje=he("ZodISOTime",(e,t)=>{v8e.init(e,t),yn.init(e,t)});function gje(e){return xze(hje,e)}const mje=he("ZodISODuration",(e,t)=>{y8e.init(e,t),yn.init(e,t)});function vje(e){return Sze(mje,e)}const Bo=he("ZodError",(e,t)=>{MY.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>l6e(e,n)},flatten:{value:n=>s6e(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,NP,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,NP,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),yje=LP(Bo),bje=zP(Bo),wje=qb(Bo),xje=Ub(Bo),Sje=d6e(Bo),Cje=f6e(Bo),Eje=p6e(Bo),_je=h6e(Bo),kje=g6e(Bo),Oje=m6e(Bo),Pje=v6e(Bo),Aje=y6e(Bo),On=he("ZodType",(e,t)=>(kn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Yb(e,"input"),output:Yb(e,"output")}}),e.toJSONSchema=qze(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Gs(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Ys(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>yje(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>wje(e,n,r),e.parseAsync=async(n,r)=>bje(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>xje(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Sje(e,n,r),e.decode=(n,r)=>Cje(e,n,r),e.encodeAsync=async(n,r)=>Eje(e,n,r),e.decodeAsync=async(n,r)=>_je(e,n,r),e.safeEncode=(n,r)=>kje(e,n,r),e.safeDecode=(n,r)=>Oje(e,n,r),e.safeEncodeAsync=async(n,r)=>Pje(e,n,r),e.safeDecodeAsync=async(n,r)=>Aje(e,n,r),e.refine=(n,r)=>e.check(_7e(n,r)),e.superRefine=n=>e.check(k7e(n)),e.overwrite=n=>e.check(Md(n)),e.optional=()=>vZ(e),e.exactOptional=()=>f7e(e),e.nullable=()=>yZ(e),e.nullish=()=>vZ(yZ(e)),e.nonoptional=n=>y7e(e,n),e.array=()=>n7e(e),e.or=n=>i7e([e,n]),e.and=n=>s7e(e,n),e.transform=n=>wZ(e,u7e(n)),e.default=n=>g7e(e,n),e.prefault=n=>v7e(e,n),e.catch=n=>w7e(e,n),e.pipe=n=>wZ(e,n),e.readonly=()=>C7e(e),e.describe=n=>{const r=e.clone();return mg.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=mg.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return mg.get(e);const r=e.clone();return mg.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),uZ=he("_ZodString",(e,t)=>{jP.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Hze(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Pze(...r)),e.includes=(...r)=>e.check(Mze(...r)),e.startsWith=(...r)=>e.check(Nze(...r)),e.endsWith=(...r)=>e.check(Dze(...r)),e.min=(...r)=>e.check(Gb(...r)),e.max=(...r)=>e.check(oZ(...r)),e.length=(...r)=>e.check(iZ(...r)),e.nonempty=(...r)=>e.check(Gb(1,...r)),e.lowercase=r=>e.check(Aze(r)),e.uppercase=r=>e.check(Tze(r)),e.trim=()=>e.check(Ize()),e.normalize=(...r)=>e.check($ze(...r)),e.toLowerCase=()=>e.check(Fze()),e.toUpperCase=()=>e.check(Lze()),e.slugify=()=>e.check(zze())}),Tje=he("ZodString",(e,t)=>{jP.init(e,t),uZ.init(e,t),e.email=n=>e.check(Q8e(Mje,n)),e.url=n=>e.check(rze(Nje,n)),e.jwt=n=>e.check(yze(Kje,n)),e.emoji=n=>e.check(oze(Dje,n)),e.guid=n=>e.check(eZ(dZ,n)),e.uuid=n=>e.check(J8e(Zb,n)),e.uuidv4=n=>e.check(eze(Zb,n)),e.uuidv6=n=>e.check(tze(Zb,n)),e.uuidv7=n=>e.check(nze(Zb,n)),e.nanoid=n=>e.check(ize($je,n)),e.guid=n=>e.check(eZ(dZ,n)),e.cuid=n=>e.check(aze(Ije,n)),e.cuid2=n=>e.check(sze(Fje,n)),e.ulid=n=>e.check(lze(Lje,n)),e.base64=n=>e.check(gze(Uje,n)),e.base64url=n=>e.check(mze(Hje,n)),e.xid=n=>e.check(cze(zje,n)),e.ksuid=n=>e.check(uze(jje,n)),e.ipv4=n=>e.check(dze(Rje,n)),e.ipv6=n=>e.check(fze(Bje,n)),e.cidrv4=n=>e.check(pze(Vje,n)),e.cidrv6=n=>e.check(hze(qje,n)),e.e164=n=>e.check(vze(Wje,n)),e.datetime=n=>e.check(dje(n)),e.date=n=>e.check(pje(n)),e.time=n=>e.check(gje(n)),e.duration=n=>e.check(vje(n))});function Nd(e){return X8e(Tje,e)}const yn=he("ZodStringFormat",(e,t)=>{cn.init(e,t),uZ.init(e,t)}),Mje=he("ZodEmail",(e,t)=>{a8e.init(e,t),yn.init(e,t)}),dZ=he("ZodGUID",(e,t)=>{o8e.init(e,t),yn.init(e,t)}),Zb=he("ZodUUID",(e,t)=>{i8e.init(e,t),yn.init(e,t)}),Nje=he("ZodURL",(e,t)=>{s8e.init(e,t),yn.init(e,t)}),Dje=he("ZodEmoji",(e,t)=>{l8e.init(e,t),yn.init(e,t)}),$je=he("ZodNanoID",(e,t)=>{c8e.init(e,t),yn.init(e,t)}),Ije=he("ZodCUID",(e,t)=>{u8e.init(e,t),yn.init(e,t)}),Fje=he("ZodCUID2",(e,t)=>{d8e.init(e,t),yn.init(e,t)}),Lje=he("ZodULID",(e,t)=>{f8e.init(e,t),yn.init(e,t)}),zje=he("ZodXID",(e,t)=>{p8e.init(e,t),yn.init(e,t)}),jje=he("ZodKSUID",(e,t)=>{h8e.init(e,t),yn.init(e,t)}),Rje=he("ZodIPv4",(e,t)=>{b8e.init(e,t),yn.init(e,t)}),Bje=he("ZodIPv6",(e,t)=>{w8e.init(e,t),yn.init(e,t)}),Vje=he("ZodCIDRv4",(e,t)=>{x8e.init(e,t),yn.init(e,t)}),qje=he("ZodCIDRv6",(e,t)=>{S8e.init(e,t),yn.init(e,t)}),Uje=he("ZodBase64",(e,t)=>{C8e.init(e,t),yn.init(e,t)}),Hje=he("ZodBase64URL",(e,t)=>{_8e.init(e,t),yn.init(e,t)}),Wje=he("ZodE164",(e,t)=>{k8e.init(e,t),yn.init(e,t)}),Kje=he("ZodJWT",(e,t)=>{P8e.init(e,t),yn.init(e,t)}),fZ=he("ZodNumber",(e,t)=>{BY.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Wze(e,r,o),e.gt=(r,o)=>e.check(nZ(r,o)),e.gte=(r,o)=>e.check(VP(r,o)),e.min=(r,o)=>e.check(VP(r,o)),e.lt=(r,o)=>e.check(tZ(r,o)),e.lte=(r,o)=>e.check(BP(r,o)),e.max=(r,o)=>e.check(BP(r,o)),e.int=r=>e.check(pZ(r)),e.safe=r=>e.check(pZ(r)),e.positive=r=>e.check(nZ(0,r)),e.nonnegative=r=>e.check(VP(0,r)),e.negative=r=>e.check(tZ(0,r)),e.nonpositive=r=>e.check(BP(0,r)),e.multipleOf=(r,o)=>e.check(rZ(r,o)),e.step=(r,o)=>e.check(rZ(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Gje(e){return Cze(fZ,e)}const Yje=he("ZodNumberFormat",(e,t)=>{A8e.init(e,t),fZ.init(e,t)});function pZ(e){return Eze(Yje,e)}const Zje=he("ZodAny",(e,t)=>{T8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Gze()});function Xje(){return _ze(Zje)}const Qje=he("ZodUnknown",(e,t)=>{M8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yze()});function hZ(){return kze(Qje)}const Jje=he("ZodNever",(e,t)=>{N8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kze(e,n,r)});function e7e(e){return Oze(Jje,e)}const t7e=he("ZodArray",(e,t)=>{D8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jze(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Gb(n,r)),e.nonempty=n=>e.check(Gb(1,n)),e.max=(n,r)=>e.check(oZ(n,r)),e.length=(n,r)=>e.check(iZ(n,r)),e.unwrap=()=>e.element});function n7e(e,t){return jze(t7e,e,t)}const r7e=he("ZodObject",(e,t)=>{I8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eje(e,n,r,o),It(e,"shape",()=>t.shape),e.keyof=()=>l7e(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:hZ()}),e.loose=()=>e.clone({...e._zod.def,catchall:hZ()}),e.strict=()=>e.clone({...e._zod.def,catchall:e7e()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>n6e(e,n),e.safeExtend=n=>r6e(e,n),e.merge=n=>o6e(e,n),e.pick=n=>e6e(e,n),e.omit=n=>t6e(e,n),e.partial=(...n)=>i6e(mZ,e,n[0]),e.required=(...n)=>a6e(bZ,e,n[0])});function gZ(e,t){const n={type:"object",shape:e??{},...et(t)};return new r7e(n)}const o7e=he("ZodUnion",(e,t)=>{F8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tje(e,n,r,o),e.options=t.options});function i7e(e,t){return new o7e({type:"union",options:e,...et(t)})}const a7e=he("ZodIntersection",(e,t)=>{L8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nje(e,n,r,o)});function s7e(e,t){return new a7e({type:"intersection",left:e,right:t})}const qP=he("ZodEnum",(e,t)=>{z8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Zze(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const a of r)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new qP({...t,checks:[],...et(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const a of r)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new qP({...t,checks:[],...et(o),entries:i})}});function l7e(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new qP({type:"enum",entries:n,...et(t)})}const c7e=he("ZodTransform",(e,t)=>{j8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qze(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new SY(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(gg(i,n.value,t));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(gg(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function u7e(e){return new c7e({type:"transform",transform:e})}const mZ=he("ZodOptional",(e,t)=>{GY.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cZ(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function vZ(e){return new mZ({type:"optional",innerType:e})}const d7e=he("ZodExactOptional",(e,t)=>{R8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cZ(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function f7e(e){return new d7e({type:"optional",innerType:e})}const p7e=he("ZodNullable",(e,t)=>{B8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function yZ(e){return new p7e({type:"nullable",innerType:e})}const h7e=he("ZodDefault",(e,t)=>{V8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ije(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function g7e(e,t){return new h7e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():PY(t)}})}const m7e=he("ZodPrefault",(e,t)=>{q8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>aje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function v7e(e,t){return new m7e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():PY(t)}})}const bZ=he("ZodNonOptional",(e,t)=>{U8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>oje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function y7e(e,t){return new bZ({type:"nonoptional",innerType:e,...et(t)})}const b7e=he("ZodCatch",(e,t)=>{H8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>sje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function w7e(e,t){return new b7e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const x7e=he("ZodPipe",(e,t)=>{W8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lje(e,n,r,o),e.in=t.in,e.out=t.out});function wZ(e,t){return new x7e({type:"pipe",in:e,out:t})}const S7e=he("ZodReadonly",(e,t)=>{K8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function C7e(e){return new S7e({type:"readonly",innerType:e})}const E7e=he("ZodCustom",(e,t)=>{G8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xze(e,n)});function _7e(e,t={}){return Rze(E7e,e,t)}function k7e(e){return Bze(e)}const Xb=y.forwardRef(({className:e,...t},n)=>g.jsx("div",{className:"relative w-full overflow-auto",children:g.jsx("table",{ref:n,className:U("w-full caption-bottom text-sm",e),...t})}));Xb.displayName="Table";const Qb=y.forwardRef(({className:e,...t},n)=>g.jsx("thead",{ref:n,className:U("[&_tr]:border-b",e),...t}));Qb.displayName="TableHeader";const Jb=y.forwardRef(({className:e,...t},n)=>g.jsx("tbody",{ref:n,className:U("[&_tr:last-child]:border-0",e),...t}));Jb.displayName="TableBody";const O7e=y.forwardRef(({className:e,...t},n)=>g.jsx("tfoot",{ref:n,className:U("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));O7e.displayName="TableFooter";const os=y.forwardRef(({className:e,...t},n)=>g.jsx("tr",{ref:n,className:U("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));os.displayName="TableRow";const ew=y.forwardRef(({className:e,...t},n)=>g.jsx("th",{ref:n,className:U("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));ew.displayName="TableHead";const Dd=y.forwardRef(({className:e,...t},n)=>g.jsx("td",{ref:n,className:U("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Dd.displayName="TableCell";const P7e=y.forwardRef(({className:e,...t},n)=>g.jsx("caption",{ref:n,className:U("mt-4 text-sm text-muted-foreground",e),...t}));P7e.displayName="TableCaption";const A7e=gZ({id:Gje(),header:Nd(),type:Nd(),status:Nd(),target:Nd(),limit:Nd(),reviewer:Nd()});function T7e({id:e}){const{attributes:t,listeners:n}=iY({id:e});return g.jsxs(mt,{...t,...n,variant:"ghost",size:"icon",className:"size-7 text-muted-foreground hover:bg-transparent",children:[g.jsx(Vue,{className:"size-3 text-muted-foreground"}),g.jsx("span",{className:"sr-only",children:"Drag to reorder"})]})}const xZ=[{id:"drag",header:()=>null,cell:({row:e})=>g.jsx(T7e,{id:e.original.id})},{id:"select",header:({table:e})=>g.jsx("div",{className:"flex items-center justify-center",children:g.jsx(fh,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":"Select all"})}),cell:({row:e})=>g.jsx("div",{className:"flex items-center justify-center",children:g.jsx(fh,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":"Select row"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"header",header:"Header",cell:({row:e})=>g.jsx(I7e,{item:e.original}),enableHiding:!1},{accessorKey:"type",header:"Section Type",cell:({row:e})=>g.jsx("div",{className:"w-32",children:g.jsx(ap,{variant:"outline",className:"px-1.5 text-muted-foreground",children:e.original.type})})},{accessorKey:"status",header:"Status",cell:({row:e})=>g.jsxs(ap,{variant:"outline",className:"flex gap-1 px-1.5 text-muted-foreground [&_svg]:size-3",children:[e.original.status==="Done"?g.jsx(Nue,{className:"text-green-500 dark:text-green-400"}):g.jsx(Wue,{}),e.original.status]})},{accessorKey:"target",header:()=>g.jsx("div",{className:"w-full text-right",children:"Target"}),cell:({row:e})=>g.jsxs("form",{onSubmit:t=>{t.preventDefault(),gK.promise(new Promise(n=>setTimeout(n,1e3)),{loading:`Saving ${e.original.header}`,success:"Done",error:"Error"})},children:[g.jsx(Wr,{htmlFor:`${e.original.id}-target`,className:"sr-only",children:"Target"}),g.jsx(xi,{className:"h-8 w-16 border-transparent bg-transparent text-right shadow-none hover:bg-input/30 focus-visible:border focus-visible:bg-background",defaultValue:e.original.target,id:`${e.original.id}-target`})]})},{accessorKey:"limit",header:()=>g.jsx("div",{className:"w-full text-right",children:"Limit"}),cell:({row:e})=>g.jsxs("form",{onSubmit:t=>{t.preventDefault(),gK.promise(new Promise(n=>setTimeout(n,1e3)),{loading:`Saving ${e.original.header}`,success:"Done",error:"Error"})},children:[g.jsx(Wr,{htmlFor:`${e.original.id}-limit`,className:"sr-only",children:"Limit"}),g.jsx(xi,{className:"h-8 w-16 border-transparent bg-transparent text-right shadow-none hover:bg-input/30 focus-visible:border focus-visible:bg-background",defaultValue:e.original.limit,id:`${e.original.id}-limit`})]})},{accessorKey:"reviewer",header:"Reviewer",cell:({row:e})=>e.original.reviewer!=="Assign reviewer"?e.original.reviewer:g.jsxs(g.Fragment,{children:[g.jsx(Wr,{htmlFor:`${e.original.id}-reviewer`,className:"sr-only",children:"Reviewer"}),g.jsxs(Ei,{children:[g.jsx(zo,{className:"h-8 w-40",id:`${e.original.id}-reviewer`,children:g.jsx(_i,{placeholder:"Assign reviewer"})}),g.jsxs(jo,{align:"end",children:[g.jsx(Pt,{value:"Eddie Lake",children:"Eddie Lake"}),g.jsx(Pt,{value:"Jamik Tashpulatov",children:"Jamik Tashpulatov"})]})]})]})},{id:"actions",cell:()=>g.jsxs(oc,{children:[g.jsx(ic,{asChild:!0,children:g.jsxs(mt,{variant:"ghost",className:"flex size-8 text-muted-foreground data-[state=open]:bg-muted",size:"icon",children:[g.jsx(bx,{}),g.jsx("span",{className:"sr-only",children:"Open menu"})]})}),g.jsxs(zs,{align:"end",className:"w-32",children:[g.jsx(wr,{children:"Edit"}),g.jsx(wr,{children:"Make a copy"}),g.jsx(wr,{children:"Favorite"}),g.jsx(nd,{}),g.jsx(wr,{children:"Delete"})]})]})}];function M7e({row:e}){const{transform:t,transition:n,setNodeRef:r,isDragging:o}=iY({id:e.original.id});return g.jsx(os,{"data-state":e.getIsSelected()&&"selected","data-dragging":o,ref:r,className:"relative z-0 data-[dragging=true]:z-10 data-[dragging=true]:opacity-80",style:{transform:sg.Transform.toString(t),transition:n},children:e.getVisibleCells().map(i=>g.jsx(Dd,{children:jb(i.column.columnDef.cell,i.getContext())},i.id))})}function N7e({data:e,className:t}){var x;const[n,r]=y.useState(()=>e),[o,i]=y.useState({}),[a,s]=y.useState({}),[l,c]=y.useState([]),[u,d]=y.useState([]),[f,p]=y.useState({pageIndex:0,pageSize:10}),h=y.useId(),m=R4e(oP(qG,{}),oP(UG,{}),oP(uP,{})),v=y.useMemo(()=>(n==null?void 0:n.map(({id:S})=>S))||[],[n]),b=xY({data:n,columns:xZ,state:{sorting:u,columnVisibility:a,rowSelection:o,columnFilters:l,pagination:f},getRowId:S=>S.id.toString(),enableRowSelection:!0,onRowSelectionChange:i,onSortingChange:d,onColumnFiltersChange:c,onColumnVisibilityChange:s,onPaginationChange:p,getCoreRowModel:vY(),getFilteredRowModel:bY(),getPaginationRowModel:wY(),getSortedRowModel:ULe(),getFacetedRowModel:VLe(),getFacetedUniqueValues:qLe()});function w(S){const{active:C,over:_}=S;C&&_&&C.id!==_.id&&r(k=>{const O=v.indexOf(C.id),P=v.indexOf(_.id);return gP(k,O,P)})}return g.jsxs(zK,{defaultValue:"outline",className:U("flex w-full flex-col justify-start gap-6",t),children:[g.jsxs("div",{className:"flex items-center justify-between px-4 lg:px-6",children:[g.jsx(Wr,{htmlFor:"view-selector",className:"sr-only",children:"View"}),g.jsxs(Ei,{defaultValue:"outline",children:[g.jsx(zo,{className:"@4xl/main:hidden flex w-fit",id:"view-selector",children:g.jsx(_i,{placeholder:"Select a view"})}),g.jsxs(jo,{children:[g.jsx(Pt,{value:"outline",children:"Outline"}),g.jsx(Pt,{value:"past-performance",children:"Past Performance"}),g.jsx(Pt,{value:"key-personnel",children:"Key Personnel"}),g.jsx(Pt,{value:"focus-documents",children:"Focus Documents"})]})]}),g.jsxs(TO,{className:"@4xl/main:flex hidden",children:[g.jsx(Ed,{value:"outline",children:"Outline"}),g.jsxs(Ed,{value:"past-performance",className:"gap-1",children:["Past Performance",g.jsx(ap,{variant:"secondary",className:"flex h-5 w-5 items-center justify-center rounded-full bg-muted-foreground/30",children:"3"})]}),g.jsxs(Ed,{value:"key-personnel",className:"gap-1",children:["Key Personnel",g.jsx(ap,{variant:"secondary",className:"flex h-5 w-5 items-center justify-center rounded-full bg-muted-foreground/30",children:"2"})]}),g.jsx(Ed,{value:"focus-documents",children:"Focus Documents"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs(oc,{children:[g.jsx(ic,{asChild:!0,children:g.jsxs(mt,{variant:"outline",size:"sm",children:[g.jsx(Iue,{}),g.jsx("span",{className:"hidden lg:inline",children:"Customize Columns"}),g.jsx("span",{className:"lg:hidden",children:"Columns"}),g.jsx(ev,{})]})}),g.jsx(zs,{align:"end",className:"w-56",children:b.getAllColumns().filter(S=>typeof S.accessorFn<"u"&&S.getCanHide()).map(S=>g.jsx(ik,{className:"capitalize",checked:S.getIsVisible(),onCheckedChange:C=>S.toggleVisibility(!!C),children:S.id},S.id))})]}),g.jsxs(mt,{variant:"outline",size:"sm",children:[g.jsx(xx,{}),g.jsx("span",{className:"hidden lg:inline",children:"Add Section"})]})]})]}),g.jsxs(yc,{value:"outline",className:"relative flex flex-col gap-4 overflow-auto px-4 lg:px-6",children:[g.jsx("div",{className:"overflow-hidden rounded-lg border",children:g.jsx(VFe,{collisionDetection:H4e,modifiers:[ZFe],onDragEnd:w,sensors:m,id:h,children:g.jsxs(Xb,{children:[g.jsx(Qb,{className:"sticky top-0 z-10 bg-muted",children:b.getHeaderGroups().map(S=>g.jsx(os,{children:S.headers.map(C=>g.jsx(ew,{colSpan:C.colSpan,children:C.isPlaceholder?null:jb(C.column.columnDef.header,C.getContext())},C.id))},S.id))}),g.jsx(Jb,{className:"**:data-[slot=table-cell]:first:w-8",children:(x=b.getRowModel().rows)!=null&&x.length?g.jsx(nLe,{items:v,strategy:eLe,children:b.getRowModel().rows.map(S=>g.jsx(M7e,{row:S},S.id))}):g.jsx(os,{children:g.jsx(Dd,{colSpan:xZ.length,className:"h-24 text-center",children:"No results."})})})]})})}),g.jsxs("div",{className:"flex items-center justify-between px-4",children:[g.jsxs("div",{className:"hidden flex-1 text-sm text-muted-foreground lg:flex",children:[b.getFilteredSelectedRowModel().rows.length," of ",b.getFilteredRowModel().rows.length," row(s) selected."]}),g.jsxs("div",{className:"flex w-full items-center gap-8 lg:w-fit",children:[g.jsxs("div",{className:"hidden items-center gap-2 lg:flex",children:[g.jsx(Wr,{htmlFor:"rows-per-page",className:"text-sm font-medium",children:"Rows per page"}),g.jsxs(Ei,{value:`${b.getState().pagination.pageSize}`,onValueChange:S=>b.setPageSize(Number(S)),children:[g.jsx(zo,{className:"w-20",id:"rows-per-page",children:g.jsx(_i,{placeholder:b.getState().pagination.pageSize})}),g.jsx(jo,{side:"top",children:[10,20,30,40,50].map(S=>g.jsx(Pt,{value:`${S}`,children:S},S))})]})]}),g.jsxs("div",{className:"flex w-fit items-center justify-center text-sm font-medium",children:["Page ",b.getState().pagination.pageIndex+1," of ",b.getPageCount()]}),g.jsxs("div",{className:"ml-auto flex items-center gap-2 lg:ml-0",children:[g.jsxs(mt,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>b.setPageIndex(0),disabled:!b.getCanPreviousPage(),children:[g.jsx("span",{className:"sr-only",children:"Go to first page"}),g.jsx(Pue,{})]}),g.jsxs(mt,{variant:"outline",className:"size-8",size:"icon",onClick:()=>b.previousPage(),disabled:!b.getCanPreviousPage(),children:[g.jsx("span",{className:"sr-only",children:"Go to previous page"}),g.jsx(wu,{})]}),g.jsxs(mt,{variant:"outline",className:"size-8",size:"icon",onClick:()=>b.nextPage(),disabled:!b.getCanNextPage(),children:[g.jsx("span",{className:"sr-only",children:"Go to next page"}),g.jsx(Oa,{})]}),g.jsxs(mt,{variant:"outline",className:"hidden size-8 lg:flex",size:"icon",onClick:()=>b.setPageIndex(b.getPageCount()-1),disabled:!b.getCanNextPage(),children:[g.jsx("span",{className:"sr-only",children:"Go to last page"}),g.jsx(Aue,{})]})]})]})]})]}),g.jsx(yc,{value:"past-performance",className:"flex flex-col px-4 lg:px-6",children:g.jsx("div",{className:"aspect-video w-full flex-1 rounded-lg border border-dashed"})}),g.jsx(yc,{value:"key-personnel",className:"flex flex-col px-4 lg:px-6",children:g.jsx("div",{className:"aspect-video w-full flex-1 rounded-lg border border-dashed"})}),g.jsx(yc,{value:"focus-documents",className:"flex flex-col px-4 lg:px-6",children:g.jsx("div",{className:"aspect-video w-full flex-1 rounded-lg border border-dashed"})})]})}const D7e=[{month:"January",desktop:186,mobile:80},{month:"February",desktop:305,mobile:200},{month:"March",desktop:237,mobile:120},{month:"April",desktop:73,mobile:190},{month:"May",desktop:209,mobile:130},{month:"June",desktop:214,mobile:140}],$7e={desktop:{label:"Desktop",color:"var(--primary)"},mobile:{label:"Mobile",color:"var(--primary)"}};function I7e({item:e}){const t=pb();return g.jsxs(Rh,{children:[g.jsx(zq,{asChild:!0,children:g.jsx(mt,{variant:"link",className:"w-fit px-0 text-left text-foreground",children:e.header})}),g.jsxs(ad,{side:"right",className:"flex flex-col",children:[g.jsxs(Bh,{className:"gap-1",children:[g.jsx(Vh,{children:e.header}),g.jsx(qh,{children:"Showing total visitors for the last 6 months"})]}),g.jsxs("div",{className:"flex flex-1 flex-col gap-4 overflow-y-auto py-4 text-sm",children:[!t&&g.jsxs(g.Fragment,{children:[g.jsx(s0,{config:$7e,children:g.jsxs(B7,{accessibilityLayer:!0,data:D7e,margin:{left:0,right:10},children:[g.jsx($2,{vertical:!1}),g.jsx(q2,{dataKey:"month",tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:n=>n.slice(0,3),hide:!0}),g.jsx(Z2,{cursor:!1,content:g.jsx(l0,{indicator:"dot"})}),g.jsx(uh,{dataKey:"mobile",type:"natural",fill:"var(--color-mobile)",fillOpacity:.6,stroke:"var(--color-mobile)",stackId:"a"}),g.jsx(uh,{dataKey:"desktop",type:"natural",fill:"var(--color-desktop)",fillOpacity:.4,stroke:"var(--color-desktop)",stackId:"a"})]})}),g.jsx(bd,{}),g.jsxs("div",{className:"grid gap-2",children:[g.jsxs("div",{className:"flex gap-2 font-medium leading-none",children:["Trending up by 5.2% this month ",g.jsx(nde,{className:"size-4"})]}),g.jsx("div",{className:"text-muted-foreground",children:"Showing total visitors for the last 6 months. This is just some random text to test the layout. It spans multiple lines and should wrap around."})]}),g.jsx(bd,{})]}),g.jsxs("form",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Wr,{htmlFor:"header",children:"Header"}),g.jsx(xi,{id:"header",defaultValue:e.header})]}),g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Wr,{htmlFor:"type",children:"Type"}),g.jsxs(Ei,{defaultValue:e.type,children:[g.jsx(zo,{id:"type",className:"w-full",children:g.jsx(_i,{placeholder:"Select a type"})}),g.jsxs(jo,{children:[g.jsx(Pt,{value:"Table of Contents",children:"Table of Contents"}),g.jsx(Pt,{value:"Executive Summary",children:"Executive Summary"}),g.jsx(Pt,{value:"Technical Approach",children:"Technical Approach"}),g.jsx(Pt,{value:"Design",children:"Design"}),g.jsx(Pt,{value:"Capabilities",children:"Capabilities"}),g.jsx(Pt,{value:"Focus Documents",children:"Focus Documents"}),g.jsx(Pt,{value:"Narrative",children:"Narrative"}),g.jsx(Pt,{value:"Cover Page",children:"Cover Page"})]})]})]}),g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Wr,{htmlFor:"status",children:"Status"}),g.jsxs(Ei,{defaultValue:e.status,children:[g.jsx(zo,{id:"status",className:"w-full",children:g.jsx(_i,{placeholder:"Select a status"})}),g.jsxs(jo,{children:[g.jsx(Pt,{value:"Done",children:"Done"}),g.jsx(Pt,{value:"In Progress",children:"In Progress"}),g.jsx(Pt,{value:"Not Started",children:"Not Started"})]})]})]})]}),g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Wr,{htmlFor:"target",children:"Target"}),g.jsx(xi,{id:"target",defaultValue:e.target})]}),g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Wr,{htmlFor:"limit",children:"Limit"}),g.jsx(xi,{id:"limit",defaultValue:e.limit})]})]}),g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Wr,{htmlFor:"reviewer",children:"Reviewer"}),g.jsxs(Ei,{defaultValue:e.reviewer,children:[g.jsx(zo,{id:"reviewer",className:"w-full",children:g.jsx(_i,{placeholder:"Select a reviewer"})}),g.jsxs(jo,{children:[g.jsx(Pt,{value:"Eddie Lake",children:"Eddie Lake"}),g.jsx(Pt,{value:"Jamik Tashpulatov",children:"Jamik Tashpulatov"}),g.jsx(Pt,{value:"Emily Whalen",children:"Emily Whalen"})]})]})]})]})]}),g.jsxs(H0,{className:"mt-auto flex gap-2 sm:flex-col sm:space-x-0",children:[g.jsx(mt,{className:"w-full",children:"Submit"}),g.jsx(jq,{asChild:!0,children:g.jsx(mt,{variant:"outline",className:"w-full",children:"Done"})})]})]})]})}const F7e=({columnCount:e,rowCount:t=10,searchableColumnCount:n=0,filterableColumnCount:r=0,showViewOptions:o=!0,className:i})=>g.jsxs("div",{className:U("w-full space-y-3 overflow-auto",i),children:[g.jsxs("div",{className:"flex w-full items-center justify-between space-x-2 overflow-auto p-1",children:[g.jsxs("div",{className:"flex flex-1 items-center space-x-2 space-y-4",children:[n>0?Array.from({length:n}).map((a,s)=>g.jsx(rn,{className:"h-10 w-[150px] lg:w-[250px]"},s)):null,r>0?Array.from({length:r}).map((a,s)=>g.jsx(rn,{className:"h-10 w-[70px] border-dashed"},s)):null]}),o?g.jsx(rn,{className:"ml-auto hidden h-7 w-[70px] lg:flex"}):null]}),g.jsx("div",{className:"rounded-md border",children:g.jsxs(Xb,{children:[g.jsx(Qb,{children:Array.from({length:1}).map((a,s)=>g.jsx(os,{className:"hover:bg-transparent",children:Array.from({length:e}).map((l,c)=>g.jsx(ew,{children:g.jsx(rn,{className:"h-6 w-full"})},c))},s))}),g.jsx(Jb,{children:Array.from({length:t}).map((a,s)=>g.jsx(os,{className:"hover:bg-transparent",children:Array.from({length:e}).map((l,c)=>g.jsx(Dd,{children:g.jsx(rn,{className:"h-6 w-full"})},c))},s))})]})}),g.jsxs("div",{className:"flex w-full flex-col items-center justify-between gap-4 overflow-auto px-2 py-1 sm:flex-row sm:gap-8",children:[g.jsx("div",{className:"flex-1",children:g.jsx(rn,{className:"h-8 w-40"})}),g.jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(rn,{className:"h-8 w-24"}),g.jsx(rn,{className:"h-8 w-[70px]"})]}),g.jsx("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:g.jsx(rn,{className:"h-8 w-20"})}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(rn,{className:"hidden size-8 lg:block"}),g.jsx(rn,{className:"size-8"}),g.jsx(rn,{className:"size-8"}),g.jsx(rn,{className:"hidden size-8 lg:block"})]})]})]})]}),SZ=({className:e,...t})=>g.jsx("nav",{role:"navigation","aria-label":"pagination",className:U("mx-auto flex w-full justify-center",e),...t});SZ.displayName="Pagination";const CZ=y.forwardRef(({className:e,...t},n)=>g.jsx("ul",{ref:n,className:U("flex flex-row items-center gap-1",e),...t}));CZ.displayName="PaginationContent";const tw=y.forwardRef(({className:e,...t},n)=>g.jsx("li",{ref:n,className:U("",e),...t}));tw.displayName="PaginationItem";const $d=({className:e,isActive:t,size:n="icon",...r})=>g.jsx("a",{"aria-current":t?"page":void 0,className:U(Al({variant:t?"outline":"ghost",size:n}),e),...r});$d.displayName="PaginationLink";const EZ=({className:e,...t})=>g.jsxs($d,{"aria-label":"Go to previous page",size:"default",className:U("gap-1 pl-2.5",e),...t,children:[g.jsx(wu,{className:"h-4 w-4"}),g.jsx("span",{children:"Previous"})]});EZ.displayName="PaginationPrevious";const _Z=({className:e,...t})=>g.jsxs($d,{"aria-label":"Go to next page",size:"default",className:U("gap-1 pr-2.5",e),...t,children:[g.jsx("span",{children:"Next"}),g.jsx(Oa,{className:"h-4 w-4"})]});_Z.displayName="PaginationNext";const UP=({className:e,...t})=>g.jsxs("span",{"aria-hidden":!0,className:U("flex h-9 w-9 items-center justify-center",e),...t,children:[g.jsx(tv,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"More pages"})]});UP.displayName="PaginationEllipsis";const kZ=({className:e,...t})=>g.jsxs($d,{"aria-label":"Go to next page",size:"default",className:U("gap-1 pr-2.5",e),...t,children:[g.jsx("span",{className:"sr-only",children:"Next Last"}),g.jsx(Oa,{className:"h-4 w-4"})]});kZ.displayName="PaginationNextLast";const OZ=({className:e,...t})=>g.jsxs($d,{"aria-label":"Go to previous page",size:"default",className:U("gap-1 pl-2.5",e),...t,children:[g.jsx(wu,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Previous Last"})]});OZ.displayName="PaginationPreviousLast";const L7e=({totalPosts:e,postsPerPage:t,currentPage:n,setCurrentPage:r})=>{const o=[];for(let p=1;p<=Math.ceil(e/t);p++)o.push(p);const a=Math.floor(2/2),s=o.slice(Math.max(0,n-1-a),Math.min(n-1+a+1,o.length)),l=()=>{n<o.length&&r(n+1)},c=()=>{n>1&&r(n-1)},u=()=>{n>1&&r(1)},d=()=>{n<o.length&&r(o.length)},f=()=>{const p=s.map((h,m)=>g.jsx(tw,{className:n===h?"rounded-md bg-primary":"",children:g.jsx($d,{onClick:()=>r(h),children:h})},m));return s[0]>1&&p.unshift(g.jsx(UP,{onClick:()=>r(s[0]-1)},"ellipsis-start")),s[s.length-1]<o.length&&p.push(g.jsx(UP,{onClick:()=>r(s[s.length-1]+1)},"ellipsis-end")),p};return g.jsx("div",{className:"p-4",children:g.jsx(SZ,{children:g.jsxs(CZ,{children:[g.jsxs(tw,{children:[g.jsx(OZ,{onClick:u}),g.jsx(EZ,{onClick:c})]}),f(),g.jsxs(tw,{children:[g.jsx(_Z,{onClick:l}),g.jsx(kZ,{onClick:d})]})]})})})},z7e=({columns:e,data:t,pageCount:n,pageSizeOptions:r=[10,20,30,40,50],className:o})=>{var b;const[i,a]=En.useSearchParams(),s=(i==null?void 0:i.get("page"))??"1",l=Number(s),c=isNaN(l)||l<1?1:l,u=(i==null?void 0:i.get("limit"))??"10",d=Number(u),f=isNaN(d)?10:d,[{pageIndex:p,pageSize:h},m]=E.useState({pageIndex:c-1,pageSize:f});E.useEffect(()=>{a({...Object.fromEntries(i),page:(p+1).toString(),limit:h.toString()})},[p,h,i,a]);const v=xY({data:t,columns:e,pageCount:n??-1,getCoreRowModel:vY(),getFilteredRowModel:bY(),state:{pagination:{pageIndex:p,pageSize:h}},onPaginationChange:m,getPaginationRowModel:wY(),manualPagination:!0,manualFiltering:!0});return g.jsxs("div",{className:o,children:[g.jsxs(Hh,{className:"h-[calc(80vh-220px)] rounded-md border",children:[g.jsxs(Xb,{className:"relative",children:[g.jsx(Qb,{children:v.getHeaderGroups().map(w=>g.jsx(os,{children:w.headers.map(x=>g.jsx(ew,{children:x.isPlaceholder?null:jb(x.column.columnDef.header,x.getContext())},x.id))},w.id))}),g.jsx(Jb,{children:(b=v.getRowModel().rows)!=null&&b.length?v.getRowModel().rows.map(w=>g.jsx(os,{"data-state":w.getIsSelected()&&"selected",children:w.getVisibleCells().map(x=>g.jsx(Dd,{children:jb(x.column.columnDef.cell,x.getContext())},x.id))},w.id)):g.jsx(os,{children:g.jsx(Dd,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]}),g.jsx(Wh,{orientation:"horizontal"})]}),g.jsxs("div",{className:"flex flex-col items-center justify-end gap-2 space-x-2 py-4 sm:flex-row",children:[g.jsxs("div",{className:"flex w-full items-center justify-between",children:[g.jsxs("div",{className:"flex-1 text-sm text-muted-foreground",children:[v.getFilteredSelectedRowModel().rows.length," of"," ",v.getFilteredRowModel().rows.length," row(s) selected."]}),g.jsx("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("p",{className:"whitespace-nowrap text-sm font-medium",children:"Rows per page"}),g.jsxs(Ei,{value:`${v.getState().pagination.pageSize}`,onValueChange:w=>{v.setPageSize(Number(w))},children:[g.jsx(zo,{className:"h-8 w-[70px]",children:g.jsx(_i,{placeholder:v.getState().pagination.pageSize})}),g.jsx(jo,{side:"top",children:r.map(w=>g.jsx(Pt,{value:`${w}`,children:w},w))})]})]})})]}),g.jsxs("div",{className:"flex w-full items-center justify-between gap-2 sm:justify-end",children:[g.jsxs("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",v.getState().pagination.pageIndex+1," of"," ",v.getPageCount()]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(mt,{"aria-label":"Go to first page",variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>v.setPageIndex(0),disabled:!v.getCanPreviousPage(),children:g.jsx(vte,{className:"h-4 w-4","aria-hidden":"true"})}),g.jsx(mt,{"aria-label":"Go to previous page",variant:"outline",className:"h-8 w-8 p-0",onClick:()=>v.previousPage(),disabled:!v.getCanPreviousPage(),children:g.jsx(wu,{className:"h-4 w-4","aria-hidden":"true"})}),g.jsx(mt,{"aria-label":"Go to next page",variant:"outline",className:"h-8 w-8 p-0",onClick:()=>v.nextPage(),disabled:!v.getCanNextPage(),children:g.jsx(Oa,{className:"h-4 w-4","aria-hidden":"true"})}),g.jsx(mt,{"aria-label":"Go to last page",variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>v.setPageIndex(v.getPageCount()-1),disabled:!v.getCanNextPage(),children:g.jsx(bte,{className:"h-4 w-4","aria-hidden":"true"})})]})]})]})]})};function j7e({key:e,data:t,handleAction:n,className:r}){return g.jsx(yc,{value:e,className:U("mt-4",r),children:g.jsx("div",{className:"h-40 w-full overflow-auto rounded-md border p-4",children:g.jsxs("table",{className:"w-full",children:[g.jsx("thead",{children:g.jsxs("tr",{children:[g.jsx("th",{className:"border p-2 text-left pb-2",children:"Note"}),g.jsx("th",{className:"border p-2 text-left pb-2",children:"Actions"})]})}),g.jsx("tbody",{children:t==null?void 0:t.map(o=>g.jsxs("tr",{children:[g.jsx("td",{className:"border p-2 text-left pb-2",children:o.text}),g.jsx("td",{className:"flex justify-left border p-2 text-center",children:g.jsx(ZO,{link:"form-card",handleAction:n,Item:o})})]},o.id))})]})})})}const R7e={position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.5)",zIndex:9999};function B7e({show:e,className:t}){return e?g.jsx("div",{style:R7e,className:t}):null}function PZ({pageTitles:e={},defaultTitle:t="Default Title",className:n}){const r=En.useLocation(),o=e[r.pathname]||t;return g.jsx("header",{className:U("group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 flex h-12 shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear",n),children:g.jsxs("div",{className:"flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6",children:[g.jsx(vO,{className:"-ml-1"}),g.jsx(bd,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),g.jsx("h1",{className:"text-xl font-bold",children:o})]})})}function AZ({items:e,pageTitles:t={}}){const n=En.useLocation(),r=En.useNavigate(),o=t[n.pathname]||"Default Title";return g.jsx(Jh,{children:g.jsx(hb,{className:"flex flex-col gap-2",children:g.jsx(vc,{children:e.map(i=>g.jsx(Vs,{className:o==i.title?"font-bold bg-white rounded-lg shadow-md":"",children:g.jsxs(qs,{tooltip:i.title,onClick:()=>{r(i.url)},children:[i.icon&&g.jsx(i.icon,{}),g.jsx("span",{children:i.title})]})},i.title))})})})}function TZ({items:e,...t}){return g.jsx(Jh,{...t,children:g.jsx(hb,{children:g.jsx(vc,{children:e.map(n=>g.jsx(Vs,{children:g.jsx(qs,{asChild:!0,children:g.jsxs("a",{href:n.url,target:n.target||"",children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})})},n.title))})})})}function MZ({user:e,onLogout:t,menuItems:n=[],className:r}){const{isMobile:o}=mc();return g.jsx(vc,{children:g.jsx(Vs,{children:g.jsxs(oc,{children:[g.jsx(ic,{asChild:!0,children:g.jsxs(qs,{size:"lg",className:U("data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",r),children:[g.jsxs(rp,{className:"h-8 w-8 rounded-lg",children:[g.jsx(op,{src:e.avatar,alt:e.name}),g.jsx(ip,{className:"rounded-lg",children:e.name.split(" ").map(i=>i[0]).join("").toUpperCase().slice(0,2)})]}),g.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[g.jsx("span",{className:"truncate font-medium",children:e.name}),g.jsx("span",{className:"truncate text-xs text-muted-foreground",children:e.email})]}),g.jsx(bx,{className:"ml-auto size-4"})]})}),g.jsxs(zs,{className:"w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg",side:o?"bottom":"right",align:"end",sideOffset:4,children:[g.jsx($0,{className:"p-0 font-normal",children:g.jsxs("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:[g.jsxs(rp,{className:"h-8 w-8 rounded-lg",children:[g.jsx(op,{src:e.avatar,alt:e.name}),g.jsx(ip,{className:"rounded-lg",children:e.name.split(" ").map(i=>i[0]).join("").toUpperCase().slice(0,2)})]}),g.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[g.jsx("span",{className:"truncate font-medium",children:e.name}),g.jsx("span",{className:"truncate text-xs text-muted-foreground",children:e.email})]})]})}),g.jsx(nd,{}),n.map((i,a)=>g.jsxs(wr,{onClick:i.onClick,children:[i.icon&&g.jsx(i.icon,{className:"mr-2 h-4 w-4"}),i.label]},a)),n.length>0&&g.jsx(nd,{}),g.jsxs(wr,{onClick:t,children:[g.jsx(Gue,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})})}function V7e({items:e,className:t}){const{isMobile:n}=mc();return g.jsxs(Jh,{className:U("group-data-[collapsible=icon]:hidden",t),children:[g.jsx(SO,{children:"Documents"}),g.jsxs(vc,{children:[e.map(r=>g.jsxs(Vs,{children:[g.jsx(qs,{asChild:!0,children:g.jsxs("a",{href:r.url,children:[g.jsx(r.icon,{}),g.jsx("span",{children:r.name})]})}),g.jsxs(oc,{children:[g.jsx(ic,{asChild:!0,children:g.jsxs(CO,{showOnHover:!0,className:"rounded-sm data-[state=open]:bg-accent",children:[g.jsx(tv,{}),g.jsx("span",{className:"sr-only",children:"More"})]})}),g.jsxs(zs,{className:"w-24 rounded-lg",side:n?"bottom":"right",align:n?"end":"start",children:[g.jsxs(wr,{children:[g.jsx(Bue,{}),g.jsx("span",{children:"Open"})]}),g.jsxs(wr,{children:[g.jsx(Jue,{}),g.jsx("span",{children:"Share"})]})]})]})]},r.name)),g.jsx(Vs,{children:g.jsxs(qs,{className:"text-sidebar-foreground/70",children:[g.jsx(tv,{className:"text-sidebar-foreground/70"}),g.jsx("span",{children:"More"})]})})]})]})}const NZ=({user:e,onLogout:t,className:n})=>{var r;return g.jsxs(oc,{children:[g.jsx(ic,{asChild:!0,children:g.jsx(mt,{variant:"ghost",className:U("relative h-12 w-14 rounded-full",n),children:g.jsxs(rp,{className:"h-12 w-12",children:[g.jsx(op,{src:(e==null?void 0:e.avatar)||"https://png.pngtree.com/png-clipart/20230927/original/pngtree-man-avatar-image-for-profile-png-image_13001882.png",alt:(e==null?void 0:e.name)||""}),g.jsx(ip,{children:((r=e==null?void 0:e.name)==null?void 0:r.substring(0,2).toUpperCase())||"U"})]})})}),g.jsxs(zs,{className:"w-56",align:"end",forceMount:!0,children:[g.jsx($0,{className:"font-normal",children:g.jsxs("div",{className:"flex flex-col space-y-1",children:[g.jsx("p",{className:"text-sm font-medium leading-none",children:e==null?void 0:e.name}),g.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:e==null?void 0:e.email})]})}),g.jsx(nd,{}),g.jsx(wr,{onClick:t,children:"Log out"})]})]})},q7e=({item:e,setOpen:t})=>{const n=typeof e.icon=="string"?q0[e.icon]||q0.arrowRight:e.icon||q0.arrowRight;return g.jsx("div",{className:"space-y-3 text-white",onClickCapture:()=>{t&&t(!1)},children:g.jsxs(En.NavLink,{className:({isActive:r})=>U("flex transform items-center rounded-full px-3 py-2 text-gray-200 transition-colors duration-300 hover:bg-gray-50 hover:text-primary hover:dark:text-black ",r&&"bg-gray-50 text-primary dark:text-black"),to:e.href,end:!0,children:[g.jsx(n,{className:"h-5 w-5","aria-hidden":"true"}),g.jsx("span",{className:"mx-2 text-sm font-medium",children:e.label})]})},e.href)},DZ=({items:e,setOpen:t,className:n})=>e!=null&&e.length?g.jsx("nav",{className:U("-mx-3 space-y-6",n),children:e.filter(r=>r.isShow!==!1).map(r=>g.jsx(q7e,{item:r,setOpen:t},r.href))}):null,$Z=({navMain:e=[],navSecondary:t=[],user:n,onLogout:r,logoText:o="ACS Tracking",logoHref:i="#",logoIcon:a=Mue,className:s,pageTitles:l={},variant:c="sidebar",collapsible:u="icon",...d})=>g.jsxs(qW,{variant:c,collapsible:u,className:U(s),...d,children:[g.jsx(bO,{children:g.jsx(vc,{children:g.jsx(Vs,{children:g.jsx(qs,{size:"lg",asChild:!0,className:"data-[slot=sidebar-menu-button]:!p-1.5",children:g.jsxs("a",{href:i,children:[g.jsx(a,{className:"h-5 w-5"}),g.jsx("span",{className:"text-base font-semibold",children:o})]})})})})}),g.jsxs(xO,{children:[g.jsx(AZ,{items:e,pageTitles:l}),g.jsx(TZ,{items:t,className:"mt-auto"})]}),n&&g.jsx(wO,{children:g.jsx(MZ,{user:n,onLogout:r})})]}),U7e=({setSidebarOpen:e,sidebarOpen:t,navItems:n,logoText:r="Logo",logoHref:o="/",className:i})=>g.jsx(g.Fragment,{children:g.jsx(Rh,{open:t,onOpenChange:e,children:g.jsx(ad,{side:"left",className:U("bg-background !px-0",i),children:g.jsx("div",{className:"space-y-4 py-4",children:g.jsxs("div",{className:"space-y-4 px-3 py-2",children:[g.jsx(En.Link,{to:o,className:"py-2 text-2xl font-bold text-white ",children:r}),g.jsx("div",{className:"space-y-1 px-2",children:g.jsx(DZ,{items:n,setOpen:e})})]})})})})});function H7e({children:e,sidebarProps:t,headerProps:n,defaultOpen:r=!0,showOverlay:o=!1,overlayComponent:i,className:a}){return g.jsxs(mO,{defaultOpen:r,children:[g.jsx($Z,{variant:"inset",...t}),g.jsxs(yO,{children:[g.jsx(PZ,{...n}),g.jsxs("div",{className:U("flex flex-1 flex-col gap-4 p-4 md:gap-6 md:p-6",a),children:[e,o&&i]})]})]})}const W7e=({isOpen:e,onClose:t,onConfirm:n,loading:r,title:o="Are you sure?",description:i="Are you sure you want to continue?",className:a})=>g.jsx(Z0,{title:o,description:i,isOpen:e,onClose:t,className:a,children:g.jsxs("div",{className:"flex w-full items-center justify-end space-x-2 pt-6",children:[g.jsx(mt,{disabled:r,variant:"outline",onClick:t,children:"Cancel"}),g.jsx(mt,{disabled:r,variant:"destructive",onClick:n,children:"Continue"})]})}),K7e=({openDeleteDialog:e,setIsOpenDeleteDialog:t,onDelete:n,className:r})=>g.jsx("div",{className:"flex gap-3 mb-4",children:g.jsx(Z0,{isOpen:e,onClose:()=>t(!1),className:U("justify-center bg-transparent border-none",r),children:g.jsxs("div",{className:"rounded-md bg-gray-50 p-4 md:p-6",children:[g.jsx("p",{className:"text-black",children:"Are you sure you want to delete?"}),g.jsxs("div",{className:"flex items-center justify-between mt-4 space-x-4",children:[g.jsx(mt,{className:"flex-1 bg-red-500 disabled:bg-gray-500",onClick:n,children:"Yes"}),g.jsx(mt,{className:"flex-1",onClick:()=>t(!1),children:"No"})]})]})},"delete")}),G7e=({renderModal:e,modalName:t,showAddBtn:n=!0,title:r,userPopup:o=!1,extraBtns:i,isOpen:a,setIsOpen:s,isAllowedCreate:l=!0,className:c})=>{const u=()=>{s("")};return g.jsxs("div",{className:"flex justify-end",children:[g.jsxs("div",{className:"flex gap-2",children:[n&&l&&g.jsxs(mt,{className:"flex justify-end ml-auto text-xs md:text-sm ",onClick:()=>s(t??"create"),children:[g.jsx(xx,{className:"mr-2 h-4 w-4"})," Add New"]}),i&&i()]}),g.jsxs(Z0,{userPopup:o,isOpen:a,onClose:u,className:U("!bg-background !px-1 w-full lg:w-[85%]",c),children:[g.jsx("h5",{className:"text-2xl font-bold px-10",children:r??"Add Client"}),g.jsx(Hh,{className:"px-6",children:e(u)})]})]})},IZ=({onChange:e,startDate:t,endDate:n,className:r})=>{const[o,i]=y.useState({from:t,to:n}),[a,s]=y.useState(!1),l=()=>{e(o==null?void 0:o.from,o==null?void 0:o.to),s(!1)};return g.jsx(g.Fragment,{children:g.jsxs("div",{className:U("grid z-50",r),children:[g.jsx("label",{className:"mb-0 block text-md font-bold",children:"Pick a date"}),g.jsxs(ud,{open:a,children:[g.jsx(dd,{asChild:!0,onClick:()=>s(c=>!c),children:g.jsxs(mt,{id:"date",variant:"outline",className:U("w-[100%] justify-start text-left font-normal truncate overflow-hidden text-ellipsis",!o&&"text-muted-foreground"),children:[g.jsx(kue,{className:"pr-2"}),o!=null&&o.from?o.to?g.jsxs(g.Fragment,{children:[Jo(o.from,"LLL dd, y")," -"," ",Jo(o.to,"LLL dd, y")]}):Jo(o.from,"LLL dd, y"):g.jsx("span",{children:"Pick a date"})]})}),g.jsxs(lc,{className:"w-auto p-0 ",align:"start",style:{left:"1rem"},children:[g.jsx(dp,{style:{left:"1rem"},mode:"range",defaultMonth:o==null?void 0:o.from,selected:o,onSelect:i,numberOfMonths:3}),g.jsx(mt,{onClick:l,className:"m-2",children:"Apply"})]})]})]})})},Y7e=({className:e,startDateParamName:t="filterStartDate",endDateParamName:n="filterEndDate"})=>{const r=new URLSearchParams(location.search),o=En.useNavigate(),i=(u,d)=>{u&&d&&(s(u==null?void 0:u.toISOString().split("T")[0]),c(d==null?void 0:d.toISOString().split("T")[0]),r.set(t,u.toISOString().split("T")[0]),r.set(n,d.toISOString().split("T")[0]),o({search:r.toString()}))};E.useEffect(()=>{const u=r.get(t)??iM(new Date).toISOString().split("T")[0],d=r.get(n)??Ef(new Date,3).toISOString().split("T")[0];s(u),c(d)},[location.search]);const[a,s]=E.useState(()=>r.get(t)??iM(new Date).toISOString().split("T")[0]),[l,c]=E.useState(()=>r.get(n)??Ef(new Date,3).toISOString().split("T")[0]);return g.jsx(IZ,{startDate:new Date(a+"T00:00"),endDate:new Date(l+"T00:00"),onChange:i,className:`pt-0 ${e}`})};function Z7e(e,t,n,r){var o=this,i=E.useRef(null),a=E.useRef(0),s=E.useRef(0),l=E.useRef(null),c=E.useRef([]),u=E.useRef(),d=E.useRef(),f=E.useRef(e),p=E.useRef(!0);f.current=e;var h=typeof window<"u",m=!t&&t!==0&&h;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var v=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,w="maxWait"in n,x="debounceOnServer"in n&&!!n.debounceOnServer,S=w?Math.max(+n.maxWait||0,t):null;E.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var C=E.useMemo(function(){var _=function(D){var $=c.current,G=u.current;return c.current=u.current=null,a.current=D,s.current=s.current||D,d.current=f.current.apply(G,$)},k=function(D,$){m&&cancelAnimationFrame(l.current),l.current=m?requestAnimationFrame(D):setTimeout(D,$)},O=function(D){if(!p.current)return!1;var $=D-i.current;return!i.current||$>=t||$<0||w&&D-a.current>=S},P=function(D){return l.current=null,b&&c.current?_(D):(c.current=u.current=null,d.current)},A=function D(){var $=Date.now();if(v&&s.current===a.current&&T(),O($))return P($);if(p.current){var G=t-($-i.current),z=w?Math.min(G,S-($-a.current)):G;k(D,z)}},T=function(){r&&r({})},N=function(){if(h||x){var D=Date.now(),$=O(D);if(c.current=[].slice.call(arguments),u.current=o,i.current=D,$){if(!l.current&&p.current)return a.current=i.current,k(A,t),v?_(i.current):d.current;if(w)return k(A,t),_(i.current)}return l.current||k(A,t),d.current}};return N.cancel=function(){var D=l.current;D&&(m?cancelAnimationFrame(l.current):clearTimeout(l.current)),a.current=0,c.current=i.current=u.current=l.current=null,D&&r&&r({})},N.isPending=function(){return!!l.current},N.flush=function(){return l.current?P(Date.now()):d.current},N},[v,w,t,S,b,m,h,x,r]);return C}function X7e(e,t){return e===t}function Q7e(e,t,n){var r=X7e,o=E.useRef(e),i=E.useState({})[1],a=Z7e(E.useCallback(function(l){o.current=l,i({})},[i]),t,n,i),s=E.useRef(e);return r(s.current,e)||(a(e),s.current=e),[o.current,a]}const J7e=({placeholder:e,className:t})=>{const[n,r]=En.useSearchParams(),o=n.get("search")||"",[i,a]=E.useState(o),[s]=Q7e(i,1e3),l=E.useCallback(c=>{if(c===""||c===void 0||!c){n.delete("search"),r(n);return}r({...Object.fromEntries(n),page:"1",search:c})},[n,r]);return E.useEffect(()=>{l(s)},[s,l]),g.jsx(xi,{placeholder:e||"Search country...",value:i,onChange:c=>a(c.target.value),className:U("w-full md:max-w-sm",t)})},FZ=({title:e,description:t,className:n})=>g.jsxs("div",{className:n,children:[g.jsx("h2",{className:"text-sm font-bold t sm:text-xl xs:hidden",children:e}),g.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),e9e=({title:e="Kutubi"})=>g.jsx(_ae,{children:g.jsxs("title",{children:[" ",e," "]})}),LZ=({setTheme:e,className:t})=>g.jsxs(oc,{children:[g.jsx(ic,{asChild:!0,children:g.jsxs(mt,{variant:"outline",size:"icon",className:t,children:[g.jsx(tde,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),g.jsx(kI,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),g.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),g.jsxs(zs,{align:"end",children:[g.jsx(wr,{onClick:()=>e("light"),children:"Light"}),g.jsx(wr,{onClick:()=>e("dark"),children:"Dark"}),g.jsx(wr,{onClick:()=>e("pink"),children:"Pink"}),g.jsx(wr,{onClick:()=>e("system"),children:"System"})]})]}),t9e=({title:e="App Title",onLogout:t,user:n,setTheme:r,extraContent:o,className:i})=>g.jsxs("div",{className:U("flex flex-1 items-center bg-secondary px-4",i),children:[g.jsx(FZ,{title:e}),g.jsxs("div",{className:"ml-4 flex items-center md:ml-6",children:[g.jsx(NZ,{user:n,onLogout:t}),g.jsx(LZ,{setTheme:r}),o,g.jsx("h2",{className:"text-xl font-bold tracking-tight text-primary sm:text-3xl sm:hidden",children:e.substring(0,3).toUpperCase()})]})]}),zZ=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ie(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},jZ=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?zZ(r.ref,n,e):r.refs&&r.refs.forEach(o=>zZ(o,n,e))}},n9e=(e,t)=>{t.shouldUseNativeValidation&&jZ(e,t);const n={};for(const r in e){const o=Ie(t.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(r9e(t.names||Object.keys(e),r)){const a=Object.assign({},Ie(n,r));$t(a,"root",i),$t(n,r,a)}else $t(n,r,i)}return n},r9e=(e,t)=>e.some(n=>n.startsWith(t+"."));var o9e=function(e,t){for(var n={};e.length;){var r=e[0],o=r.code,i=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[a]={message:s.message,type:s.code}}else n[a]={message:i,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),t){var l=n[a].types,c=l&&l[r.code];n[a]=cV(a,t,n,o,c?[].concat(c,r.message):r.message)}e.shift()}return n},i9e=function(e,t,n){return n===void 0&&(n={}),function(r,o,i){try{return Promise.resolve((function(a,s){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return i.shouldUseNativeValidation&&jZ({},i),{errors:{},values:n.raw?r:c}})}catch(c){return s(c)}return l&&l.then?l.then(void 0,s):l})(0,function(a){if((function(s){return Array.isArray(s==null?void 0:s.errors)})(a))return{values:{},errors:n9e(o9e(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};function a9e(){const{pathname:e}=En.useLocation();return E.useMemo(()=>e,[e])}function RZ(){const e=En.useNavigate();return E.useMemo(()=>({back:()=>e(-1),forward:()=>e(1),reload:()=>window.location.reload(),push:n=>e(n),replace:n=>e(n,{replace:!0})}),[e])}function BZ({loading:e,edit:t,showCancelBtn:n,showNewBtn:r,onClick:o,className:i}){const a=E.useContext(yi),s=a==null?void 0:a.reset;return g.jsxs("div",{className:U("m-2 flex justify-end gap-4",i),children:[n&&g.jsx(mt,{type:"button",className:"flex h-10 items-center rounded-lg bg-gray-100 px-4 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-200",children:"Cancel"}),r&&g.jsx(mt,{type:"button",variant:"outline",onClick:()=>s==null?void 0:s(),className:"flex h-10 items-center rounded-lg px-4 text-sm font-medium transition-colors",disabled:e,"aria-disabled":e,children:"New"}),t&&g.jsx(mt,{type:"submit",onClick:o,className:"flex h-10 items-center rounded-lg px-4 text-sm font-medium transition-colors",disabled:e,"aria-disabled":e,children:e?"please wait..":"Submit"})]})}function s9e(e){const t={};return Object.keys(e||{}).forEach(n=>{t[n]=Xje()}),gZ(t)}function l9e(e,t){if(!t)return e;const n=new FormData;for(const r in e)if(t[r]!==void 0){const o=t[r](e[r]);if(o==null)continue;Array.isArray(o)?o.forEach(i=>{n.append(`${r}[]`,i)}):n.append(r,o)}else n.append(r,e[r]);return n}function c9e({item:e,url:t,redirectUrl:n,edit:r=!0,showCancelBtn:o=!1,showNewBtn:i=!0,onSave:a,onReset:s,onError:l,children:c,resetForm:u=!1,validationSchema:d,requestHeaders:f,dataFormatter:p,baseURL:h="",multipartUrls:m=[]}){const v=RZ(),{toast:b}=Cb(),w=E.useRef(null),[x,S]=E.useState(!1),[C,_]=E.useState(e),[k,O]=E.useState(!(e!=null&&e.id)),P=Qf(),[A,T]=HD(t,{baseURL:h,customHeaders:f??{},multipartUrls:m}),{isAllowed:N,getResourceByUrl:D}=pd(),$=e!=null&&e.id?r?fd.Update:fd.Read:fd.Create,[G,z]=E.useState(!0);E.useEffect(()=>{z(N($,D(t)))},[$,D,N,t]);const K=d??s9e(e||{}),R=OV({defaultValues:E.useMemo(()=>e||void 0,[e]),resolver:i9e(K)}),W=()=>{R.reset(),_(void 0),O(!0),s&&s()};E.useEffect(()=>{_(e),e&&Object.keys(e).length>0&&Object.keys(R.getValues()).forEach(H=>{R.setValue(H,e[H])}),O(!(e!=null&&e.id))},[e,R]);const Z=()=>{var H;(H=w.current)==null||H.requestSubmit()},te={...R,errors:R.formState.errors,create:k,edit:r,itemState:C,submit:Z,reset:W,formState:R.formState},V=R.handleSubmit(async(H,F)=>{var ae,Q,X,q,J,se,I,Ce,oe,ve,De,je;F==null||F.preventDefault(),S(!0);const ee=p?l9e(H,p):H;if(k){const fe=b({title:"Please wait ..."});try{const pe=await P.post(A,ee,T);n&&n!=="#"&&v.push(n),b({title:((ae=pe.data)==null?void 0:ae.message)??"Success",description:Tf(new Date)}),u&&W(),a==null||a(((Q=pe.data)==null?void 0:Q.data)??pe.data,"add")}catch(pe){l==null||l(pe);const Re=((q=(X=pe==null?void 0:pe.response)==null?void 0:X.data)==null?void 0:q.message)||(pe==null?void 0:pe.message)||"Something went wrong";R.setError("root",{message:Yw(Re)}),b({title:((se=(J=pe==null?void 0:pe.response)==null?void 0:J.data)==null?void 0:se.error)??"Request failed",description:Tf(new Date),variant:"destructive"})}finally{fe.dismiss(),S(!1)}return}if(r){const fe=b({title:"Please wait ..."});try{const pe=await P.patch(`${A}/${C==null?void 0:C.id}`,ee,T);b({title:((I=pe.data)==null?void 0:I.message)??"Success",description:Tf(new Date)}),a==null||a(((Ce=pe.data)==null?void 0:Ce.data)??pe.data,"edit"),u&&W()}catch(pe){l==null||l(pe);const Re=((ve=(oe=pe==null?void 0:pe.response)==null?void 0:oe.data)==null?void 0:ve.message)||(pe==null?void 0:pe.message)||"Something went wrong";R.setError("root",{message:Yw(Re)}),b({title:((je=(De=pe==null?void 0:pe.response)==null?void 0:De.data)==null?void 0:je.error)??"Request failed",description:Tf(new Date),variant:"destructive"})}finally{fe.dismiss(),S(!1)}}});return g.jsx(NN,{fallback:g.jsx("div",{children:"Something went wrong. Please try again."}),onError:H=>{console.error("Form Error:",H),l==null||l(H)},children:g.jsx(yi.Provider,{value:te,children:g.jsx("form",{onSubmit:V,ref:w,children:G?g.jsx("div",{className:`rounded-md flex flex-col ${t==="/login"?"h-[90vh]":""}`,children:g.jsx("div",{className:"rounded-md bg-white dark:bg-stone-950 flex-1 overflow-auto p-4",children:g.jsxs(Dx,{className:"p-4",children:[c,R.formState.errors.root&&g.jsxs(X1,{variant:"destructive",className:"mt-2",children:[g.jsx(Tue,{className:"h-4 w-4"}),g.jsx(Q1,{children:"Error"}),g.jsx(J1,{children:g.jsx("p",{dangerouslySetInnerHTML:{__html:R.formState.errors.root.message??""}})})]}),g.jsx("div",{className:"p-4 bg-white dark:bg-stone-950 border-t sticky bottom-0 z-10",children:g.jsx(BZ,{showNewBtn:i,loading:x,showCancelBtn:o,edit:r})})]})})}):g.jsx("div",{className:"text-center font-bold w-full text-stone-600",children:"Not Allowed"})})})})}const VZ=y.forwardRef(({onFileSelect:e,accept:t="*/*",validationRules:n={maxSize:5*1024*1024,acceptedTypes:void 0},children:r,...o},i)=>{const a=E.useRef(null),{toast:s}=Cb(),l=d=>{if(n.maxSize&&d.size>n.maxSize){const f=n.maxSize/1048576;return s({title:"File too large",description:`File size should be less than ${f}MB`,variant:"destructive"}),!1}if(n.acceptedTypes&&n.acceptedTypes.length>0&&!n.acceptedTypes.includes(d.type))return s({title:"Invalid file type",description:`Please select: ${n.acceptedTypes.join(", ")}`,variant:"destructive"}),!1;if(n.customValidation){const f=n.customValidation(d);if(typeof f=="string")return s({title:"File validation failed",description:f,variant:"destructive"}),!1;if(!f)return s({title:"File validation failed",variant:"destructive"}),!1}return!0},c=d=>{var p;const f=(p=d.target.files)==null?void 0:p[0];f&&(l(f)&&(e==null||e(f),s({title:"File selected",description:f.name})),d.target.value="")},u=d=>{var f,p;d.preventDefault(),(f=a.current)==null||f.click(),(p=o.onClick)==null||p.call(o,d)};return g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx("input",{type:"file",ref:a,className:"hidden",accept:t,onChange:c}),g.jsx(mt,{...o,onClick:u,ref:i,children:r})]})});VZ.displayName="FileUploadButton";function u9e({title:e,name:t,icon:n,placeholder:r,selected:o,options:i=[],onTypeing:a,otherOption:s,onChange:l,className:c,hidden:u,disabled:d},f){const p=E.useContext(yi),[h,m]=y.useState(!1),[v,b]=y.useState(i);y.useEffect(()=>{b(i||[])},[i]);const w=x=>{const S=v.find(C=>String(C.value)===String(x));return S?S.label:s&&String(x)==="0"?s:""};return g.jsx(es,{control:p==null?void 0:p.control,name:t,render:({field:x})=>{const S=x.value??o??"",C=w(S);return u?g.jsx(g.Fragment,{}):g.jsxs(bi,{className:U("mb-2",c),children:[e?g.jsxs(wi,{className:"font-bold flex items-center gap-2",children:[n||null,e]}):null,g.jsx(ts,{children:g.jsxs(ud,{open:h,onOpenChange:m,children:[g.jsx(dd,{asChild:!0,children:g.jsxs(mt,{ref:f,type:"button",variant:"outline",role:"combobox","aria-expanded":h,className:U("w-full justify-between truncate overflow-hidden text-ellipsis",d&&"opacity-60 cursor-not-allowed"),disabled:d,children:[g.jsx("span",{className:"truncate w-full text-left",children:C||r||"Select..."}),g.jsx(EI,{className:"opacity-50 flex-shrink-0"})]})}),!d&&g.jsx(lc,{className:"w-full p-0",children:g.jsxs(gh,{children:[g.jsx(p0,{placeholder:r,className:"h-9",onValueChange:a}),g.jsxs(h0,{children:[g.jsx(g0,{children:"No item found."}),g.jsxs(m0,{children:[s&&g.jsxs(Yu,{value:`0 ${s}`,onSelect:()=>{x.onChange("0"),l==null||l(ei(t,"0")),m(!1)},children:[s,g.jsx(ka,{className:U("ml-auto",String(S)==="0"?"opacity-100":"opacity-0")})]},"__other__"),v.map(_=>g.jsxs(Yu,{value:`${_.value} ${_.label}`,onSelect:()=>{const k=String(_.value),O=String(S)===k?"":k;x.onChange(O),l==null||l(ei(t,O)),m(!1)},children:[_.label,g.jsx(ka,{className:U("ml-auto",String(S)===String(_.value)?"opacity-100":"opacity-0")})]},String(_.value)))]})]})]})})]})}),g.jsx(ns,{className:"h-auto min-h-2"})]})}})}const d9e=y.forwardRef(u9e);function f9e({title:e,name:t,placeholder:n,className:r,selected:o,options:i,onChange:a,...s},l){const c=E.useContext(yi),[u,d]=E.useState(""),[f,p]=E.useState(i||[]),h=v=>String(v.value)+v.label;E.useEffect(()=>{Array.isArray(i)&&i.length>0&&p([...i])},[i]);const m=typeof(c==null?void 0:c.watch)=="function"?c==null?void 0:c.watch(t):o;return E.useEffect(()=>{const v=f.filter(b=>String(b.value)===String(m));v.length>0?d(h(v[0])):d("")},[f,m]),c?g.jsx(es,{control:c.control,name:t,render:({field:v})=>g.jsxs(bi,{className:`mb-2 ${r??""}`,children:[e&&g.jsx(wi,{children:e}),g.jsxs(Ei,{onValueChange:b=>{const w=b===u?"":b;d(w),a&&a(ei(t,w)),v.onChange(w)},defaultValue:String(v.value??""),children:[g.jsx(ts,{children:g.jsx(zo,{children:g.jsx(_i,{placeholder:s.otherOption?"":n||"Select"})})}),g.jsxs(jo,{children:[s.otherOption&&g.jsx(Pt,{value:"0",children:"Please Select"}),f.map(b=>g.jsx(Pt,{value:String(b.value),children:b.label},b.value))]})]}),g.jsx(ns,{className:"mt-1 h-auto min-h-2"})]})}):null}const p9e=E.forwardRef(f9e);function h9e(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`}function g9e({title:e,name:t,placeholder:n,className:r,error:o},i){var m,v;const a=E.useContext(yi),s=a==null?void 0:a.watch(t),[l,c]=y.useState((m=a==null?void 0:a.getValues)!=null&&m.call(a)[t]?new Date(String((v=a.getValues)==null?void 0:v.call(a)[t])+"T00:00:00"):void 0),[u,d]=y.useState(l||new Date);E.useEffect(()=>{if(!a)return;const b=l?h9e(l):void 0;a.setValue(t,b)},[l,a,t]),E.useEffect(()=>{a&&(s?typeof s=="string"&&c(new Date(s+"T00:00")):c(void 0))},[s,a]);const f=b=>{d(b)},p=b=>{const w=parseInt(b,10),x=new Date(u.setFullYear(w));d(x)},h=Array.from(new Array(200),(b,w)=>u.getFullYear()-100+w);return a?g.jsx(es,{control:a.control,name:t,render:()=>g.jsxs(bi,{className:`mb-2 ${r??""}`,children:[e&&g.jsx(wi,{children:e}),g.jsxs(ud,{children:[g.jsx(dd,{asChild:!0,children:g.jsxs(mt,{variant:"outline",className:U("w-full justify-start text-left font-normal",!l&&"text-muted-foreground",o?"border-red-300":"border-gray-200"),children:[g.jsx(ET,{className:"mr-2 h-4 w-4"}),l?Jo(l,"PPP"):g.jsx("span",{children:n})]})}),g.jsxs(lc,{style:{width:"fit-content"},className:"p-0",children:[g.jsxs(Ei,{value:u.getFullYear()+"",onValueChange:p,children:[g.jsx(zo,{className:"rounded-none shadow-none",children:g.jsx(_i,{placeholder:"Select a Year"})}),g.jsx(jo,{children:h.map(b=>g.jsx(Pt,{value:b+"",children:b},b))})]}),g.jsx(dp,{mode:"single",selected:l,onSelect:c,month:u,onMonthChange:f,initialFocus:!0})]})]}),g.jsx(ns,{className:"h-auto min-h-2"})]})}):null}const m9e=y.forwardRef(g9e);function v9e({title:e,placeholder:t,name:n,items:r,className:o,disabled:i,onChange:a}){const s=E.useContext(yi);return s?g.jsx(es,{control:s.control,name:n,render:()=>g.jsxs(bi,{className:`mb-3 ${o??""}`,children:[g.jsxs("div",{className:"mb-3",children:[e&&g.jsx(wi,{className:"text-base",children:e}),t&&g.jsx(yk,{children:t})]}),r.map(l=>g.jsx(es,{control:s.control,name:n,render:({field:c})=>{const u=c.value,d=Array.isArray(u)?u==null?void 0:u.includes(l.value):String(u)===String(l.value);return g.jsxs(bi,{className:"flex flex-row items-start space-x-3 space-y-0",children:[g.jsx(ts,{children:g.jsx(fh,{disabled:i,checked:l.checked||d,onCheckedChange:f=>{let p=[l.value];return Array.isArray(u)&&u&&(p=[...u,...p]),a&&a(ei(n,String(l.value??""))),f?c.onChange(r.length===1?l.value:p):c.onChange(Array.isArray(u)?u==null?void 0:u.filter(h=>h!==l.value):"")}})}),g.jsx(wi,{className:"text-sm font-normal",children:l.label})]})}},l.value)),g.jsx(ns,{className:"h-auto min-h-2"})]})}):null}function y9e({title:e,name:t,items:n,onChange:r,vertical:o=!1},i){const a=E.useContext(yi);return a?g.jsx(es,{control:a.control,name:t,render:({field:s})=>g.jsxs(bi,{className:"mb-2",children:[e&&g.jsx(wi,{children:e}),g.jsx(ts,{children:g.jsx(Kk,{onValueChange:l=>{r==null||r(ei(t,l)),s.onChange(l)},defaultValue:s.value,className:o?"flex flex-col space-y-1":"flex flex-row flex-wrap gap-4",children:n.map(l=>g.jsxs(bi,{className:"flex items-center space-x-3 space-y-0",children:[g.jsx(ts,{children:g.jsx(Gk,{value:String(l.value),checked:String(l.value)===String(s.value)})}),g.jsxs(wi,{className:"font-normal flex gap-2 ml-1 pt-1",children:[l.title,l.icon&&E.cloneElement(l.icon,{className:"h-4 w-4"})]})]},l.title))})}),g.jsx(ns,{className:"h-auto min-h-2"})]})}):null}const b9e=E.forwardRef(y9e);function w9e({title:e,name:t,type:n,placeholder:r,className:o,...i},a){const s=E.useContext(yi),l=c=>c.replace(/\D/g,"").replace(/(\d{4})(?=\d)/g,"$1 ");return s?g.jsx(es,{control:s.control,name:t,render:({field:c})=>i.hidden?g.jsx(g.Fragment,{}):g.jsxs(bi,{className:U("mb-2",o),children:[e?g.jsxs(wi,{className:"font-bold",children:[e,n==="date"&&c.value?g.jsxs("span",{className:"text-orange-500 ml-1",children:["(",new Date(String(c.value)).toUTCString().substring(5,11),")"]}):null]}):null,g.jsx(ts,{children:n==="textarea"?g.jsx(MO,{placeholder:r,...c,...i,value:c.value??i.value??"",ref:a}):g.jsx(xi,{type:n,placeholder:r,...c,...i,value:c.value??i.value??"",onChange:u=>{const d=n==="cardNumber"?l(u.target.value):u.target.value;c.onChange(d)},ref:a})}),g.jsx(ns,{className:"h-auto min-h-2"})]})}):null}const x9e=E.forwardRef(w9e);function qZ(e){return/^\d{1,}$/.test(e)}function S9e({title:e,name:t,type:n,placeholder:r,error:o,onChange:i,...a},s){const l=E.useContext(yi),[c,u]=E.useState(null),[d,f]=E.useState(null),p=l==null?void 0:l.watch(t);E.useEffect(()=>{if(!l)return;const v=l.getValues(t);try{u(Number(v==null?void 0:v.split(":")[0])),f(Number(v==null?void 0:v.split(":")[1]))}catch{u(0),f(0)}},[l,t]),E.useEffect(()=>{if(l)try{const v=p==null?void 0:p.split(":")[0],b=p==null?void 0:p.split(":")[1];v&&qZ(v)&&Number(v)!==Number(c)&&u(Number(v)),b&&qZ(b)&&Number(b)!==Number(d)&&f(Number(b))}catch{u(0),f(0)}},[p,l,c,d,t]),E.useEffect(()=>{var w;if(!l||c==null||d==null)return;const v=String(c).padStart(2,"0")+":"+String(d).padStart(2,"0"),b=((w=l.getValues(t))==null?void 0:w.split(":").length)===3?":00":"";if(v+b!==l.getValues(t)&&(l.setValue(t,v),i)){const x=ei(t,v);i(x)}},[d,c,l,t,i]);const h=v=>{f(Number(v.target.value))},m=v=>{u(Number(v.target.value))};return g.jsxs("div",{className:`mb-2 ${a.className??""}`,children:[e&&g.jsx("label",{htmlFor:t,className:`mb-2 block text-sm font-bold ${a.className??""}`,children:e}),g.jsxs("div",{className:"relative inline-flex",children:[g.jsx("input",{id:`${t}-hours`,name:`${t}-hours`,type:"number",disabled:a.disabled,onChange:m,value:String(c??0).padStart(2,"0"),min:"0",placeholder:r,className:`h-9 peer block w-full ${a.disabled?"":"cursor-pointer"} rounded-md border ${["time"].includes(String(n))?"py-0":"py-2"} pl-10 text-sm outline-2 placeholder:text-gray-500 ${o?"border-red-300":"border-gray-200"} ${a.disabled?"text-gray-400":"text-black"} p-1`,ref:s}),g.jsx("div",{className:"self-center p-2 text-2xl",children:":"}),g.jsx("input",{id:`${t}-minutes`,name:`${t}-minutes`,type:"number",disabled:a.disabled,onChange:h,value:String(d??0).padStart(2,"0"),placeholder:r,min:"0",className:`h-9 peer block w-full ${a.disabled?"":"cursor-pointer"} rounded-md border ${["time"].includes(String(n))?"":"py-2"} pl-10 text-sm outline-2 placeholder:text-gray-500 ${o?"border-red-300":"border-gray-200"} ${a.disabled?"text-gray-400":"text-black"} p-1`,ref:s})]}),o&&g.jsx("p",{className:"text-xs italic text-red-500 mt-2",children:o})]})}const C9e=E.forwardRef(S9e);var nw={exports:{}},rw={exports:{}},At={};/** @license React v16.13.1
|
|
524
524
|
* react-is.production.min.js
|
|
525
525
|
*
|
|
526
526
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/DashboardLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAW,YAAY,EAAE,MAAM,eAAe,CAAA;AAErD,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IAC7C,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,WAAkB,EAClB,WAAmB,EACnB,gBAAgB,EAChB,SAAS,GACV,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"DashboardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/DashboardLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAW,YAAY,EAAE,MAAM,eAAe,CAAA;AAErD,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IAC7C,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,WAAkB,EAClB,WAAmB,EACnB,gBAAgB,EAChB,SAAS,GACV,EAAE,oBAAoB,2CAatB"}
|
|
@@ -11,6 +11,8 @@ export type SidebarProps = {
|
|
|
11
11
|
logoIcon?: LucideIcon;
|
|
12
12
|
className?: string;
|
|
13
13
|
pageTitles?: Record<string, string>;
|
|
14
|
+
variant?: 'sidebar' | 'floating' | 'inset';
|
|
15
|
+
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
14
16
|
};
|
|
15
|
-
export declare const Sidebar: ({ navMain, navSecondary, user, onLogout, logoText, logoHref, logoIcon: LogoIcon, className, pageTitles, ...props }: SidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const Sidebar: ({ navMain, navSecondary, user, onLogout, logoText, logoHref, logoIcon: LogoIcon, className, pageTitles, variant, collapsible, ...props }: SidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
//# sourceMappingURL=Sidebar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,UAAU,EAAE,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,UAAU,EAAE,MAAM,cAAc,CAAA;AAW5D,OAAO,EAAgB,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAW,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAGxD,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC5B,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACjC,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAA;IAC1C,WAAW,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,CAAA;CAC5C,CAAA;AAED,eAAO,MAAM,OAAO,GAAI,0IAarB,YAAY,4CAmCd,CAAA"}
|
package/package.json
CHANGED