izen-react-starter 2.6.9 → 2.7.0
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-CsnlLi7M.js → 2SSKDMRQ-Bwbmnh2W.js} +2 -2
- package/dist/{AP7HFJJL-CtEeDAyi.js → AP7HFJJL-C1Hce8CA.js} +1 -1
- package/dist/{WDYDFRGG-CRWytfJY.js → WDYDFRGG-1kEiWRf1.js} +2 -2
- package/dist/{index-Cm9n9HTN.js → index-BcMuYxDM.js} +14 -13
- package/dist/react-starter.js +1 -1
- package/dist/react-starter.umd.cjs +1 -1
- package/dist/src/components/layout/DashboardLayout.d.ts +2 -1
- package/dist/src/components/layout/DashboardLayout.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-C1Hce8CA.js";
|
|
2
|
+
import { g as h, c as v, a as e } from "./index-BcMuYxDM.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-BcMuYxDM.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-C1Hce8CA.js";
|
|
2
|
+
import { g as d, c as f, a as e } from "./index-BcMuYxDM.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -9165,7 +9165,7 @@ var Z3e = (e, t = !1) => {
|
|
|
9165
9165
|
const t = O$(() => {
|
|
9166
9166
|
const n = this, [r] = I(this, xc), [o] = I(this, Sc), [i] = I(this, Cc), [a] = I(this, Ec), [s] = I(this, $f), [l] = I(this, bc), [c] = I(this, Oc);
|
|
9167
9167
|
let u;
|
|
9168
|
-
return I(this, _c) ? u = I(this, _c) : (u = E$(() => import("./WDYDFRGG-
|
|
9168
|
+
return I(this, _c) ? u = I(this, _c) : (u = E$(() => import("./WDYDFRGG-1kEiWRf1.js")), fe(this, _c, u)), H$(I(this, If), I(this, wc)), S$(u, C$({
|
|
9169
9169
|
get queryFlavor() {
|
|
9170
9170
|
return I(n, Mf);
|
|
9171
9171
|
},
|
|
@@ -9272,7 +9272,7 @@ var Z3e = (e, t = !1) => {
|
|
|
9272
9272
|
const t = O$(() => {
|
|
9273
9273
|
const n = this, [r] = I(this, kc), [o] = I(this, Ac), [i] = I(this, Tc), [a] = I(this, Rc), [s] = I(this, Bf), [l] = I(this, Pc), [c] = I(this, Mc), [u] = I(this, Ic);
|
|
9274
9274
|
let d;
|
|
9275
|
-
return I(this, Dc) ? d = I(this, Dc) : (d = E$(() => import("./2SSKDMRQ-
|
|
9275
|
+
return I(this, Dc) ? d = I(this, Dc) : (d = E$(() => import("./2SSKDMRQ-Bwbmnh2W.js")), fe(this, Dc, d)), H$(I(this, Vf), I(this, Nc)), S$(d, C$({
|
|
9276
9276
|
get queryFlavor() {
|
|
9277
9277
|
return I(n, Lf);
|
|
9278
9278
|
},
|
|
@@ -60005,20 +60005,21 @@ const hVe = ({
|
|
|
60005
60005
|
] }) }) }) }) });
|
|
60006
60006
|
function mVe({
|
|
60007
60007
|
children: e,
|
|
60008
|
-
|
|
60009
|
-
|
|
60010
|
-
|
|
60011
|
-
|
|
60012
|
-
|
|
60008
|
+
customSidebar: t,
|
|
60009
|
+
useCustomSidebar: n = !1,
|
|
60010
|
+
sidebarProps: r,
|
|
60011
|
+
headerProps: o,
|
|
60012
|
+
defaultOpen: i = !0,
|
|
60013
|
+
className: a
|
|
60013
60014
|
}) {
|
|
60014
|
-
const { showOverlay:
|
|
60015
|
-
return /* @__PURE__ */ T(DW, { defaultOpen:
|
|
60016
|
-
|
|
60015
|
+
const { showOverlay: s } = dJ();
|
|
60016
|
+
return /* @__PURE__ */ T(DW, { defaultOpen: i, children: [
|
|
60017
|
+
n && t ? t : /* @__PURE__ */ v(P5e, { ...r }),
|
|
60017
60018
|
/* @__PURE__ */ T($W, { children: [
|
|
60018
|
-
/* @__PURE__ */ v(E5e, { ...
|
|
60019
|
-
/* @__PURE__ */ T("div", { className: j("flex flex-1 flex-col gap-4 p-4 md:gap-6 md:p-6",
|
|
60019
|
+
/* @__PURE__ */ v(E5e, { ...o }),
|
|
60020
|
+
/* @__PURE__ */ T("div", { className: j("flex flex-1 flex-col gap-4 p-4 md:gap-6 md:p-6", a), children: [
|
|
60020
60021
|
e,
|
|
60021
|
-
/* @__PURE__ */ v(C5e, { show:
|
|
60022
|
+
/* @__PURE__ */ v(C5e, { show: s })
|
|
60022
60023
|
] })
|
|
60023
60024
|
] })
|
|
60024
60025
|
] });
|
package/dist/react-starter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aZ as t, bk as o, bn as r, bl as n, bm as i, fb as d, a4 as l, a5 as u, bo as c, bq as b, br as p, bA as g, bB as S, bv as C, bz as m, bx as T, bw as D, bt as M, bs as A, by as h, bu as v, fr as f, bp as I, ba as P, bC as F, b2 as w, bD as x, bF as B, bE as R, bG as G, bI as L, bO as k, bK as y, bL as H, bJ as N, bM as O, bN as U, X as E, bQ as V, Y as z, bV as W, bU as q, bS as j, bR as X, bT as Y, bW as Z, bX as _, bY as J, b_ as K, bZ as Q, f8 as $, b$ as aa, c2 as ea, c3 as sa, c4 as ta, c0 as oa, c1 as ra, c5 as na, c6 as ia, c8 as da, c7 as la, c9 as ua, ca, cd as ba, ce as pa, cb as ga, cf as Sa, cc as Ca, ch as ma, cg as Ta, aW as Da, ci as Ma, cm as Aa, ck as ha, cr as va, cl as fa, co as Ia, cs as Pa, cw as Fa, cn as wa, cp as xa, cq as Ba, ct as Ra, cu as Ga, cv as La, cj as ka, fq as ya, _ as Ha, fe as Na, fg as Oa, a9 as Ua, aa as Ea, fu as Va, fv as za, fs as Wa, cx as qa, cB as ja, cC as Xa, cG as Ya, cE as Za, cD as _a, cz as Ja, cy as Ka, cF as Qa, cA as $a, cH as ae, cL as ee, cM as se, cQ as te, cO as oe, cN as re, cJ as ne, cI as ie, cP as de, cK as le, cR as ue, cV as ce, cT as be, c_ as pe, cU as ge, cX as Se, c$ as Ce, d3 as me, cW as Te, cY as De, cZ as Me, d0 as Ae, d1 as he, d2 as ve, cS as fe, a3 as Ie, ah as Pe, d5 as Fe, d8 as we, d9 as xe, db as Be, d6 as Re, d7 as Ge, a2 as Le, da as ke, fj as ye, fA as He, fx as Ne, dc as Oe, de as Ue, dd as Ee, df as Ve, ab as ze, ac as We, ad as qe, ae as je, dg as Xe, a6 as Ye, dh as Ze, di as _e, dk as Je, dj as Ke, dl as Qe, ai as $e, dm as as, du as es, dq as ss, dA as ts, dr as os, dt as rs, dn as ns, dx as is, dv as ds, dw as ls, ds as us, dC as cs, dB as bs, dy as ps, dz as gs, dp as Ss, a1 as Cs, dD as ms, b4 as Ts, fp as Ds, fm as Ms, fn as As, fo as hs, dF as vs, dI as fs, dL as Is, dH as Ps, dK as Fs, dG as ws, dJ as xs, dM as Bs, fk as Rs, b6 as Gs, fy as Ls, f9 as ks, fh as ys, dN as Hs, dQ as Ns, dP as Os, dO as Us, ft as Es, dR as Vs, dT as zs, dS as Ws, dU as qs, b0 as js, dV as Xs, dW as Ys, bc as Zs, dZ as _s, dY as Js, dX as Ks, af as Qs, d_ as $s, d$ as at, e0 as et, e4 as st, a8 as tt, e1 as ot, a7 as rt, e6 as nt, e5 as it, e9 as dt, e8 as lt, e7 as ut, e3 as ct, e2 as bt, ea as pt, fi as gt, eb as St, ef as Ct, eg as mt, ek as Tt, ei as Dt, eh as Mt, ed as At, ec as ht, ej as vt, ee as ft, a0 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, eG as Yt, fl as Zt, eI as _t, eJ as Jt, eK as Kt, eM as Qt, fd as $t, fa as ao, fc as eo, fw as so, eN as to, eQ as oo, eO as ro, eP as no, eR as io, b8 as lo, fz as uo, ag as co, eU as bo, eY as po, eX as go, eW as So, eS as Co, eV as mo, bj as To, eT as Do, eL as Mo, eZ as Ao, e$ as ho, f0 as vo, f1 as fo, f3 as Io, f4 as Po, f2 as Fo, a$ as wo, Z as xo, bg as Bo, as as Ro, bH as Go, av as Lo, at as ko, au as yo, bP as Ho, am as No, al as Oo, an as Uo, aM as Eo, aL as Vo, ar as zo, ff as Wo, aq as qo, aH as jo, aC as Xo, ax as Yo, ap as Zo, ao as _o, aw as Jo, aF as Ko, aG as Qo, aJ as $o, aK as ar, dE as er, aN as sr, bi as tr, aB as or, bb as rr, f5 as nr, ay as ir, aD as dr, aE as lr, aI as ur, az as cr, aA as br, f7 as pr, e_ as gr, aY as Sr, bh as Cr, bd as mr, b3 as Tr, aP as Dr, aQ as Mr, aR as Ar, d4 as hr, aS as vr, aT as fr, ak as Ir, aj as Pr, b5 as Fr, b7 as wr, be as xr, b1 as Br, aO as Rr, bf as Gr, aV as Lr, eH as kr, b9 as yr, f6 as Hr, aU as Nr, aX as Or, a_ as Ur } from "./index-
|
|
1
|
+
import { aZ as t, bk as o, bn as r, bl as n, bm as i, fb as d, a4 as l, a5 as u, bo as c, bq as b, br as p, bA as g, bB as S, bv as C, bz as m, bx as T, bw as D, bt as M, bs as A, by as h, bu as v, fr as f, bp as I, ba as P, bC as F, b2 as w, bD as x, bF as B, bE as R, bG as G, bI as L, bO as k, bK as y, bL as H, bJ as N, bM as O, bN as U, X as E, bQ as V, Y as z, bV as W, bU as q, bS as j, bR as X, bT as Y, bW as Z, bX as _, bY as J, b_ as K, bZ as Q, f8 as $, b$ as aa, c2 as ea, c3 as sa, c4 as ta, c0 as oa, c1 as ra, c5 as na, c6 as ia, c8 as da, c7 as la, c9 as ua, ca, cd as ba, ce as pa, cb as ga, cf as Sa, cc as Ca, ch as ma, cg as Ta, aW as Da, ci as Ma, cm as Aa, ck as ha, cr as va, cl as fa, co as Ia, cs as Pa, cw as Fa, cn as wa, cp as xa, cq as Ba, ct as Ra, cu as Ga, cv as La, cj as ka, fq as ya, _ as Ha, fe as Na, fg as Oa, a9 as Ua, aa as Ea, fu as Va, fv as za, fs as Wa, cx as qa, cB as ja, cC as Xa, cG as Ya, cE as Za, cD as _a, cz as Ja, cy as Ka, cF as Qa, cA as $a, cH as ae, cL as ee, cM as se, cQ as te, cO as oe, cN as re, cJ as ne, cI as ie, cP as de, cK as le, cR as ue, cV as ce, cT as be, c_ as pe, cU as ge, cX as Se, c$ as Ce, d3 as me, cW as Te, cY as De, cZ as Me, d0 as Ae, d1 as he, d2 as ve, cS as fe, a3 as Ie, ah as Pe, d5 as Fe, d8 as we, d9 as xe, db as Be, d6 as Re, d7 as Ge, a2 as Le, da as ke, fj as ye, fA as He, fx as Ne, dc as Oe, de as Ue, dd as Ee, df as Ve, ab as ze, ac as We, ad as qe, ae as je, dg as Xe, a6 as Ye, dh as Ze, di as _e, dk as Je, dj as Ke, dl as Qe, ai as $e, dm as as, du as es, dq as ss, dA as ts, dr as os, dt as rs, dn as ns, dx as is, dv as ds, dw as ls, ds as us, dC as cs, dB as bs, dy as ps, dz as gs, dp as Ss, a1 as Cs, dD as ms, b4 as Ts, fp as Ds, fm as Ms, fn as As, fo as hs, dF as vs, dI as fs, dL as Is, dH as Ps, dK as Fs, dG as ws, dJ as xs, dM as Bs, fk as Rs, b6 as Gs, fy as Ls, f9 as ks, fh as ys, dN as Hs, dQ as Ns, dP as Os, dO as Us, ft as Es, dR as Vs, dT as zs, dS as Ws, dU as qs, b0 as js, dV as Xs, dW as Ys, bc as Zs, dZ as _s, dY as Js, dX as Ks, af as Qs, d_ as $s, d$ as at, e0 as et, e4 as st, a8 as tt, e1 as ot, a7 as rt, e6 as nt, e5 as it, e9 as dt, e8 as lt, e7 as ut, e3 as ct, e2 as bt, ea as pt, fi as gt, eb as St, ef as Ct, eg as mt, ek as Tt, ei as Dt, eh as Mt, ed as At, ec as ht, ej as vt, ee as ft, a0 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, eG as Yt, fl as Zt, eI as _t, eJ as Jt, eK as Kt, eM as Qt, fd as $t, fa as ao, fc as eo, fw as so, eN as to, eQ as oo, eO as ro, eP as no, eR as io, b8 as lo, fz as uo, ag as co, eU as bo, eY as po, eX as go, eW as So, eS as Co, eV as mo, bj as To, eT as Do, eL as Mo, eZ as Ao, e$ as ho, f0 as vo, f1 as fo, f3 as Io, f4 as Po, f2 as Fo, a$ as wo, Z as xo, bg as Bo, as as Ro, bH as Go, av as Lo, at as ko, au as yo, bP as Ho, am as No, al as Oo, an as Uo, aM as Eo, aL as Vo, ar as zo, ff as Wo, aq as qo, aH as jo, aC as Xo, ax as Yo, ap as Zo, ao as _o, aw as Jo, aF as Ko, aG as Qo, aJ as $o, aK as ar, dE as er, aN as sr, bi as tr, aB as or, bb as rr, f5 as nr, ay as ir, aD as dr, aE as lr, aI as ur, az as cr, aA as br, f7 as pr, e_ as gr, aY as Sr, bh as Cr, bd as mr, b3 as Tr, aP as Dr, aQ as Mr, aR as Ar, d4 as hr, aS as vr, aT as fr, ak as Ir, aj as Pr, b5 as Fr, b7 as wr, be as xr, b1 as Br, aO as Rr, bf as Gr, aV as Lr, eH as kr, b9 as yr, f6 as Hr, aU as Nr, aX as Or, a_ as Ur } from "./index-BcMuYxDM.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
export {
|
|
4
4
|
t as AccessControlWrapper,
|
|
@@ -525,7 +525,7 @@ Defaulting to \`null\`.`}var eH=GU,x$e=ZU;const tH=y.forwardRef(({className:e,va
|
|
|
525
525
|
|
|
526
526
|
`)}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=!_Y.jitless,c=s&&GLe.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?WY([],h,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function KY(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=>wc(a,r,yc())))}),t)}const $8e=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=>NP(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=>KY(l,o,e,i)):KY(s,o,e,i)}}),I8e=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])=>GY(n,l,c)):GY(n,i,a)}});function LP(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(pg(e)&&pg(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=LP(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=LP(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 GY(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=LP(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 F8e=he("$ZodEnum",(e,t)=>{kn.init(e,t);const n=kY(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>YLe.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}}),L8e=he("$ZodTransform",(e,t)=>{kn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new EY(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 YY(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ZY=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(`^(${NP(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=>YY(i,n.value)):YY(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),z8e=he("$ZodExactOptional",(e,t)=>{ZY.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)}),j8e=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(`^(${NP(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)}),R8e=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=>XY(i,t)):XY(o,t)}});function XY(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const B8e=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))}),V8e=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=>QY(i,e)):QY(o,e)}});function QY(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 q8e=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=>wc(a,r,yc()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>wc(i,r,yc()))},input:n.value}),n.issues=[]),n)}}),U8e=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 H8e=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(JY):JY(o)}});function JY(e){return e.value=Object.freeze(e.value),e}const W8e=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=>eZ(i,n,r,e));eZ(o,n,r,e)}});function eZ(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(hg(o))}}var tZ;class K8e{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 G8e(){return new K8e}(tZ=globalThis).__zod_globalRegistry??(tZ.__zod_globalRegistry=G8e());const gg=globalThis.__zod_globalRegistry;function Y8e(e,t){return new e({type:"string",...et(t)})}function Z8e(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...et(t)})}function nZ(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...et(t)})}function X8e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...et(t)})}function Q8e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...et(t)})}function J8e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...et(t)})}function eze(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...et(t)})}function tze(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...et(t)})}function nze(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...et(t)})}function rze(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...et(t)})}function oze(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...et(t)})}function ize(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...et(t)})}function aze(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...et(t)})}function sze(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...et(t)})}function lze(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...et(t)})}function cze(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...et(t)})}function uze(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...et(t)})}function dze(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...et(t)})}function fze(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...et(t)})}function pze(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...et(t)})}function hze(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...et(t)})}function gze(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...et(t)})}function mze(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...et(t)})}function vze(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...et(t)})}function yze(e,t){return new e({type:"string",format:"date",check:"string_format",...et(t)})}function bze(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...et(t)})}function wze(e,t){return new e({type:"string",format:"duration",check:"string_format",...et(t)})}function xze(e,t){return new e({type:"number",checks:[],...et(t)})}function Sze(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...et(t)})}function Cze(e){return new e({type:"any"})}function Eze(e){return new e({type:"unknown"})}function _ze(e,t){return new e({type:"never",...et(t)})}function rZ(e,t){return new RY({check:"less_than",...et(t),value:e,inclusive:!1})}function zP(e,t){return new RY({check:"less_than",...et(t),value:e,inclusive:!0})}function oZ(e,t){return new BY({check:"greater_than",...et(t),value:e,inclusive:!1})}function jP(e,t){return new BY({check:"greater_than",...et(t),value:e,inclusive:!0})}function iZ(e,t){return new V6e({check:"multiple_of",...et(t),value:e})}function aZ(e,t){return new U6e({check:"max_length",...et(t),maximum:e})}function Gb(e,t){return new H6e({check:"min_length",...et(t),minimum:e})}function sZ(e,t){return new W6e({check:"length_equals",...et(t),length:e})}function kze(e,t){return new K6e({check:"string_format",format:"regex",...et(t),pattern:e})}function Oze(e){return new G6e({check:"string_format",format:"lowercase",...et(e)})}function Pze(e){return new Y6e({check:"string_format",format:"uppercase",...et(e)})}function Aze(e,t){return new Z6e({check:"string_format",format:"includes",...et(t),includes:e})}function Tze(e,t){return new X6e({check:"string_format",format:"starts_with",...et(t),prefix:e})}function Mze(e,t){return new Q6e({check:"string_format",format:"ends_with",...et(t),suffix:e})}function Md(e){return new J6e({check:"overwrite",tx:e})}function Nze(e){return Md(t=>t.normalize(e))}function Dze(){return Md(e=>e.trim())}function $ze(){return Md(e=>e.toLowerCase())}function Ize(){return Md(e=>e.toUpperCase())}function Fze(){return Md(e=>KLe(e))}function Lze(e,t,n){return new e({type:"array",element:t,...et(n)})}function zze(e,t,n){return new e({type:"custom",check:"custom",fn:t,...et(n)})}function jze(e){const t=Rze(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(hg(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(hg(o))}},e(n.value,n)));return t}function Rze(e,t){const n=new Yr({check:"custom",...et(t)});return n._zod.check=e,n}function lZ(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)??gg,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 cZ(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>
|
|
527
527
|
|
|
528
|
-
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 uZ(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 Bze=(e,t={})=>n=>{const r=lZ({...n,processors:t});return dr(e,r),cZ(r,e),uZ(r,e)},Yb=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},a=lZ({...o??{},target:i,io:t,processors:n});return dr(e,a),cZ(a,e),uZ(a,e)},Vze={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},qze=(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=Vze[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}))])}},Uze=(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)},Hze=(e,t,n,r)=>{n.not={}},Wze=(e,t,n,r)=>{},Kze=(e,t,n,r)=>{},Gze=(e,t,n,r)=>{const o=e._zod.def,i=kY(o.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Yze=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Zze=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Xze=(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"]})},Qze=(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)},Jze=(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},eje=(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},tje=(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"}]},nje=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},rje=(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))},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,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},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;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},aje=(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},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,n.readOnly=!0},dZ=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},lje=he("ZodISODateTime",(e,t)=>{p8e.init(e,t),yn.init(e,t)});function cje(e){return vze(lje,e)}const uje=he("ZodISODate",(e,t)=>{h8e.init(e,t),yn.init(e,t)});function dje(e){return yze(uje,e)}const fje=he("ZodISOTime",(e,t)=>{g8e.init(e,t),yn.init(e,t)});function pje(e){return bze(fje,e)}const hje=he("ZodISODuration",(e,t)=>{m8e.init(e,t),yn.init(e,t)});function gje(e){return wze(hje,e)}const Bo=he("ZodError",(e,t)=>{DY.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>a6e(e,n)},flatten:{value:n=>i6e(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,AP,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,AP,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),mje=$P(Bo),vje=IP(Bo),yje=qb(Bo),bje=Ub(Bo),wje=c6e(Bo),xje=u6e(Bo),Sje=d6e(Bo),Cje=f6e(Bo),Eje=p6e(Bo),_je=h6e(Bo),kje=g6e(Bo),Oje=m6e(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=Bze(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ws(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)=>Ks(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>mje(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>yje(e,n,r),e.parseAsync=async(n,r)=>vje(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>bje(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>wje(e,n,r),e.decode=(n,r)=>xje(e,n,r),e.encodeAsync=async(n,r)=>Sje(e,n,r),e.decodeAsync=async(n,r)=>Cje(e,n,r),e.safeEncode=(n,r)=>Eje(e,n,r),e.safeDecode=(n,r)=>_je(e,n,r),e.safeEncodeAsync=async(n,r)=>kje(e,n,r),e.safeDecodeAsync=async(n,r)=>Oje(e,n,r),e.refine=(n,r)=>e.check(C7e(n,r)),e.superRefine=n=>e.check(E7e(n)),e.overwrite=n=>e.check(Md(n)),e.optional=()=>bZ(e),e.exactOptional=()=>u7e(e),e.nullable=()=>wZ(e),e.nullish=()=>bZ(wZ(e)),e.nonoptional=n=>m7e(e,n),e.array=()=>e7e(e),e.or=n=>r7e([e,n]),e.and=n=>i7e(e,n),e.transform=n=>SZ(e,l7e(n)),e.default=n=>p7e(e,n),e.prefault=n=>g7e(e,n),e.catch=n=>y7e(e,n),e.pipe=n=>SZ(e,n),e.readonly=()=>x7e(e),e.describe=n=>{const r=e.clone();return gg.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=gg.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return gg.get(e);const r=e.clone();return gg.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),fZ=he("_ZodString",(e,t)=>{FP.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>qze(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(kze(...r)),e.includes=(...r)=>e.check(Aze(...r)),e.startsWith=(...r)=>e.check(Tze(...r)),e.endsWith=(...r)=>e.check(Mze(...r)),e.min=(...r)=>e.check(Gb(...r)),e.max=(...r)=>e.check(aZ(...r)),e.length=(...r)=>e.check(sZ(...r)),e.nonempty=(...r)=>e.check(Gb(1,...r)),e.lowercase=r=>e.check(Oze(r)),e.uppercase=r=>e.check(Pze(r)),e.trim=()=>e.check(Dze()),e.normalize=(...r)=>e.check(Nze(...r)),e.toLowerCase=()=>e.check($ze()),e.toUpperCase=()=>e.check(Ize()),e.slugify=()=>e.check(Fze())}),Pje=he("ZodString",(e,t)=>{FP.init(e,t),fZ.init(e,t),e.email=n=>e.check(Z8e(Aje,n)),e.url=n=>e.check(tze(Tje,n)),e.jwt=n=>e.check(mze(Hje,n)),e.emoji=n=>e.check(nze(Mje,n)),e.guid=n=>e.check(nZ(pZ,n)),e.uuid=n=>e.check(X8e(Zb,n)),e.uuidv4=n=>e.check(Q8e(Zb,n)),e.uuidv6=n=>e.check(J8e(Zb,n)),e.uuidv7=n=>e.check(eze(Zb,n)),e.nanoid=n=>e.check(rze(Nje,n)),e.guid=n=>e.check(nZ(pZ,n)),e.cuid=n=>e.check(oze(Dje,n)),e.cuid2=n=>e.check(ize($je,n)),e.ulid=n=>e.check(aze(Ije,n)),e.base64=n=>e.check(pze(Vje,n)),e.base64url=n=>e.check(hze(qje,n)),e.xid=n=>e.check(sze(Fje,n)),e.ksuid=n=>e.check(lze(Lje,n)),e.ipv4=n=>e.check(cze(zje,n)),e.ipv6=n=>e.check(uze(jje,n)),e.cidrv4=n=>e.check(dze(Rje,n)),e.cidrv6=n=>e.check(fze(Bje,n)),e.e164=n=>e.check(gze(Uje,n)),e.datetime=n=>e.check(cje(n)),e.date=n=>e.check(dje(n)),e.time=n=>e.check(pje(n)),e.duration=n=>e.check(gje(n))});function Nd(e){return Y8e(Pje,e)}const yn=he("ZodStringFormat",(e,t)=>{cn.init(e,t),fZ.init(e,t)}),Aje=he("ZodEmail",(e,t)=>{o8e.init(e,t),yn.init(e,t)}),pZ=he("ZodGUID",(e,t)=>{n8e.init(e,t),yn.init(e,t)}),Zb=he("ZodUUID",(e,t)=>{r8e.init(e,t),yn.init(e,t)}),Tje=he("ZodURL",(e,t)=>{i8e.init(e,t),yn.init(e,t)}),Mje=he("ZodEmoji",(e,t)=>{a8e.init(e,t),yn.init(e,t)}),Nje=he("ZodNanoID",(e,t)=>{s8e.init(e,t),yn.init(e,t)}),Dje=he("ZodCUID",(e,t)=>{l8e.init(e,t),yn.init(e,t)}),$je=he("ZodCUID2",(e,t)=>{c8e.init(e,t),yn.init(e,t)}),Ije=he("ZodULID",(e,t)=>{u8e.init(e,t),yn.init(e,t)}),Fje=he("ZodXID",(e,t)=>{d8e.init(e,t),yn.init(e,t)}),Lje=he("ZodKSUID",(e,t)=>{f8e.init(e,t),yn.init(e,t)}),zje=he("ZodIPv4",(e,t)=>{v8e.init(e,t),yn.init(e,t)}),jje=he("ZodIPv6",(e,t)=>{y8e.init(e,t),yn.init(e,t)}),Rje=he("ZodCIDRv4",(e,t)=>{b8e.init(e,t),yn.init(e,t)}),Bje=he("ZodCIDRv6",(e,t)=>{w8e.init(e,t),yn.init(e,t)}),Vje=he("ZodBase64",(e,t)=>{x8e.init(e,t),yn.init(e,t)}),qje=he("ZodBase64URL",(e,t)=>{C8e.init(e,t),yn.init(e,t)}),Uje=he("ZodE164",(e,t)=>{E8e.init(e,t),yn.init(e,t)}),Hje=he("ZodJWT",(e,t)=>{k8e.init(e,t),yn.init(e,t)}),hZ=he("ZodNumber",(e,t)=>{qY.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Uze(e,r,o),e.gt=(r,o)=>e.check(oZ(r,o)),e.gte=(r,o)=>e.check(jP(r,o)),e.min=(r,o)=>e.check(jP(r,o)),e.lt=(r,o)=>e.check(rZ(r,o)),e.lte=(r,o)=>e.check(zP(r,o)),e.max=(r,o)=>e.check(zP(r,o)),e.int=r=>e.check(gZ(r)),e.safe=r=>e.check(gZ(r)),e.positive=r=>e.check(oZ(0,r)),e.nonnegative=r=>e.check(jP(0,r)),e.negative=r=>e.check(rZ(0,r)),e.nonpositive=r=>e.check(zP(0,r)),e.multipleOf=(r,o)=>e.check(iZ(r,o)),e.step=(r,o)=>e.check(iZ(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 Wje(e){return xze(hZ,e)}const Kje=he("ZodNumberFormat",(e,t)=>{O8e.init(e,t),hZ.init(e,t)});function gZ(e){return Sze(Kje,e)}const Gje=he("ZodAny",(e,t)=>{P8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wze()});function Yje(){return Cze(Gje)}const Zje=he("ZodUnknown",(e,t)=>{A8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kze()});function mZ(){return Eze(Zje)}const Xje=he("ZodNever",(e,t)=>{T8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hze(e,n,r)});function Qje(e){return _ze(Xje,e)}const Jje=he("ZodArray",(e,t)=>{M8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xze(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(aZ(n,r)),e.length=(n,r)=>e.check(sZ(n,r)),e.unwrap=()=>e.element});function e7e(e,t){return Lze(Jje,e,t)}const t7e=he("ZodObject",(e,t)=>{D8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qze(e,n,r,o),It(e,"shape",()=>t.shape),e.keyof=()=>a7e(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:mZ()}),e.loose=()=>e.clone({...e._zod.def,catchall:mZ()}),e.strict=()=>e.clone({...e._zod.def,catchall:Qje()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>e6e(e,n),e.safeExtend=n=>t6e(e,n),e.merge=n=>n6e(e,n),e.pick=n=>QLe(e,n),e.omit=n=>JLe(e,n),e.partial=(...n)=>r6e(yZ,e,n[0]),e.required=(...n)=>o6e(xZ,e,n[0])});function vZ(e,t){const n={type:"object",shape:e??{},...et(t)};return new t7e(n)}const n7e=he("ZodUnion",(e,t)=>{$8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jze(e,n,r,o),e.options=t.options});function r7e(e,t){return new n7e({type:"union",options:e,...et(t)})}const o7e=he("ZodIntersection",(e,t)=>{I8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eje(e,n,r,o)});function i7e(e,t){return new o7e({type:"intersection",left:e,right:t})}const RP=he("ZodEnum",(e,t)=>{F8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Gze(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 RP({...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 RP({...t,checks:[],...et(o),entries:i})}});function a7e(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new RP({type:"enum",entries:n,...et(t)})}const s7e=he("ZodTransform",(e,t)=>{L8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zze(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new EY(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(hg(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(hg(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function l7e(e){return new s7e({type:"transform",transform:e})}const yZ=he("ZodOptional",(e,t)=>{ZY.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>dZ(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function bZ(e){return new yZ({type:"optional",innerType:e})}const c7e=he("ZodExactOptional",(e,t)=>{z8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>dZ(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function u7e(e){return new c7e({type:"optional",innerType:e})}const d7e=he("ZodNullable",(e,t)=>{j8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function wZ(e){return new d7e({type:"nullable",innerType:e})}const f7e=he("ZodDefault",(e,t)=>{R8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function p7e(e,t){return new f7e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():TY(t)}})}const h7e=he("ZodPrefault",(e,t)=>{B8e.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 g7e(e,t){return new h7e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():TY(t)}})}const xZ=he("ZodNonOptional",(e,t)=>{V8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function m7e(e,t){return new xZ({type:"nonoptional",innerType:e,...et(t)})}const v7e=he("ZodCatch",(e,t)=>{q8e.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.removeCatch=e.unwrap});function y7e(e,t){return new v7e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const b7e=he("ZodPipe",(e,t)=>{U8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>aje(e,n,r,o),e.in=t.in,e.out=t.out});function SZ(e,t){return new b7e({type:"pipe",in:e,out:t})}const w7e=he("ZodReadonly",(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});function x7e(e){return new w7e({type:"readonly",innerType:e})}const S7e=he("ZodCustom",(e,t)=>{W8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yze(e,n)});function C7e(e,t={}){return zze(S7e,e,t)}function E7e(e){return jze(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 _7e=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}));_7e.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 k7e=y.forwardRef(({className:e,...t},n)=>g.jsx("caption",{ref:n,className:U("mt-4 text-sm text-muted-foreground",e),...t}));k7e.displayName="TableCaption";const O7e=vZ({id:Wje(),header:Nd(),type:Nd(),status:Nd(),target:Nd(),limit:Nd(),reviewer:Nd()});function P7e({id:e}){const{attributes:t,listeners:n}=sY({id:e});return g.jsxs(mt,{...t,...n,variant:"ghost",size:"icon",className:"size-7 text-muted-foreground hover:bg-transparent",children:[g.jsx(jue,{className:"size-3 text-muted-foreground"}),g.jsx("span",{className:"sr-only",children:"Drag to reorder"})]})}const CZ=[{id:"drag",header:()=>null,cell:({row:e})=>g.jsx(P7e,{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(D7e,{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(Pue,{className:"text-green-500 dark:text-green-400"}):g.jsx(que,{}),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(),vK.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(),vK.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(nc,{children:[g.jsx(rc,{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(td,{}),g.jsx(wr,{children:"Delete"})]})]})}];function A7e({row:e}){const{transform:t,transition:n,setNodeRef:r,isDragging:o}=sY({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:ag.Transform.toString(t),transition:n},children:e.getVisibleCells().map(i=>g.jsx(Dd,{children:jb(i.column.columnDef.cell,i.getContext())},i.id))})}function T7e({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=z4e(tP(HG,{}),tP(WG,{}),tP(sP,{})),v=y.useMemo(()=>(n==null?void 0:n.map(({id:S})=>S))||[],[n]),b=CY({data:n,columns:CZ,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:bY(),getFilteredRowModel:xY(),getPaginationRowModel:SY(),getSortedRowModel:VLe(),getFacetedRowModel:RLe(),getFacetedUniqueValues:BLe()});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 fP(k,O,P)})}return g.jsxs(RK,{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(OO,{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(nc,{children:[g.jsx(rc,{asChild:!0,children:g.jsxs(mt,{variant:"outline",size:"sm",children:[g.jsx(Mue,{}),g.jsx("span",{className:"hidden lg:inline",children:"Customize Columns"}),g.jsx("span",{className:"lg:hidden",children:"Columns"}),g.jsx(Jm,{})]})}),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(vc,{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(RFe,{collisionDetection:q4e,modifiers:[GFe],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(eLe,{items:v,strategy:QFe,children:b.getRowModel().rows.map(S=>g.jsx(A7e,{row:S},S.id))}):g.jsx(os,{children:g.jsx(Dd,{colSpan:CZ.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(Eue,{})]}),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(bu,{})]}),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(_ue,{})]})]})]})]})]}),g.jsx(vc,{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(vc,{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(vc,{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 M7e=[{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}],N7e={desktop:{label:"Desktop",color:"var(--primary)"},mobile:{label:"Mobile",color:"var(--primary)"}};function D7e({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(id,{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(a0,{config:N7e,children:g.jsxs(B7,{accessibilityLayer:!0,data:M7e,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(s0,{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(yd,{}),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(Jue,{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(yd,{})]}),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(U0,{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 $7e=({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"})]})]})]})]}),EZ=({className:e,...t})=>g.jsx("nav",{role:"navigation","aria-label":"pagination",className:U("mx-auto flex w-full justify-center",e),...t});EZ.displayName="Pagination";const _Z=y.forwardRef(({className:e,...t},n)=>g.jsx("ul",{ref:n,className:U("flex flex-row items-center gap-1",e),...t}));_Z.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(Ol({variant:t?"outline":"ghost",size:n}),e),...r});$d.displayName="PaginationLink";const kZ=({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(bu,{className:"h-4 w-4"}),g.jsx("span",{children:"Previous"})]});kZ.displayName="PaginationPrevious";const OZ=({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"})]});OZ.displayName="PaginationNext";const BP=({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(ev,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"More pages"})]});BP.displayName="PaginationEllipsis";const PZ=({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"})]});PZ.displayName="PaginationNextLast";const AZ=({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(bu,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Previous Last"})]});AZ.displayName="PaginationPreviousLast";const I7e=({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(BP,{onClick:()=>r(s[0]-1)},"ellipsis-start")),s[s.length-1]<o.length&&p.push(g.jsx(BP,{onClick:()=>r(s[s.length-1]+1)},"ellipsis-end")),p};return g.jsx("div",{className:"p-4",children:g.jsx(EZ,{children:g.jsxs(_Z,{children:[g.jsxs(tw,{children:[g.jsx(AZ,{onClick:u}),g.jsx(kZ,{onClick:c})]}),f(),g.jsxs(tw,{children:[g.jsx(OZ,{onClick:l}),g.jsx(PZ,{onClick:d})]})]})})})},F7e=({columns:e,data:t,pageCount:n,pageSizeOptions:r=[10,20,30,40,50],className:o})=>{var b;const[i,a]=xn.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=CY({data:t,columns:e,pageCount:n??-1,getCoreRowModel:bY(),getFilteredRowModel:xY(),state:{pagination:{pageIndex:p,pageSize:h}},onPaginationChange:m,getPaginationRowModel:SY(),manualPagination:!0,manualFiltering:!0});return g.jsxs("div",{className:o,children:[g.jsxs(Y0,{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(Hh,{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(gte,{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(bu,{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(vte,{className:"h-4 w-4","aria-hidden":"true"})})]})]})]})]})};function L7e({key:e,data:t,handleAction:n,className:r}){return g.jsx(vc,{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(KO,{link:"form-card",handleAction:n,Item:o})})]},o.id))})]})})})}const z7e={position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.5)",zIndex:9999};function TZ({show:e,className:t}){return e?g.jsx("div",{style:z7e,className:t}):null}function MZ({pageTitles:e={},defaultTitle:t="Default Title",className:n}){const r=xn.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(yd,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),g.jsx("h1",{className:"text-xl font-bold",children:o})]})})}function j7e({items:e,pageTitles:t={}}){const n=xn.useLocation(),r=xn.useNavigate(),o=t[n.pathname]||"Default Title";return g.jsx(Qh,{children:g.jsx(hb,{className:"flex flex-col gap-2",children:g.jsx(Sd,{children:e.map(i=>g.jsx(gc,{className:o==i.title?"font-bold bg-white rounded-lg shadow-md":"",children:g.jsxs(mc,{tooltip:i.title,onClick:()=>{r(i.url)},children:[i.icon&&g.jsx(i.icon,{}),g.jsx("span",{children:i.title})]})},i.title))})})})}function R7e({items:e,...t}){return g.jsx(Qh,{...t,children:g.jsx(hb,{children:g.jsx(Sd,{children:e.map(n=>g.jsx(gc,{children:g.jsx(mc,{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 B7e({user:e,onLogout:t,menuItems:n=[],className:r}){const{isMobile:o}=hc();return g.jsx(Sd,{children:g.jsx(gc,{children:g.jsxs(nc,{children:[g.jsx(rc,{asChild:!0,children:g.jsxs(mc,{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(D0,{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(td,{}),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(td,{}),g.jsxs(wr,{onClick:t,children:[g.jsx(Hue,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})})}function V7e({items:e,className:t}){const{isMobile:n}=hc();return g.jsxs(Qh,{className:U("group-data-[collapsible=icon]:hidden",t),children:[g.jsx(bO,{children:"Documents"}),g.jsxs(Sd,{children:[e.map(r=>g.jsxs(gc,{children:[g.jsx(mc,{asChild:!0,children:g.jsxs("a",{href:r.url,children:[g.jsx(r.icon,{}),g.jsx("span",{children:r.name})]})}),g.jsxs(nc,{children:[g.jsx(rc,{asChild:!0,children:g.jsxs(wO,{showOnHover:!0,className:"rounded-sm data-[state=open]:bg-accent",children:[g.jsx(ev,{}),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(zue,{}),g.jsx("span",{children:"Open"})]}),g.jsxs(wr,{children:[g.jsx(Zue,{}),g.jsx("span",{children:"Share"})]})]})]})]},r.name)),g.jsx(gc,{children:g.jsxs(mc,{className:"text-sidebar-foreground/70",children:[g.jsx(ev,{className:"text-sidebar-foreground/70"}),g.jsx("span",{children:"More"})]})})]})]})}const NZ=({user:e,onLogout:t,className:n})=>{var r;return g.jsxs(nc,{children:[g.jsx(rc,{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(D0,{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(td,{}),g.jsx(wr,{onClick:t,children:"Log out"})]})]})},q7e=({item:e,setOpen:t})=>{const n=typeof e.icon=="string"?V0[e.icon]||V0.arrowRight:e.icon||V0.arrowRight;return g.jsx("div",{className:"space-y-3 text-white",onClickCapture:()=>{t&&t(!1)},children:g.jsxs(xn.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)},VP=({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,U7e=({navItems:e,logoText:t="Logo",logoHref:n="/"})=>g.jsxs("aside",{className:"hidden h-screen w-64 flex-col overflow-y-auto overflow-x-hidden rounded-tr-[90px] border-r bg-primary py-8 pl-5 dark:bg-background lg:flex",children:[g.jsx(xn.Link,{to:n,className:"text-3xl font-bold text-white",children:t}),g.jsx("div",{className:"mt-6 flex flex-1 flex-col justify-between",children:g.jsx(VP,{items:e})})]});function H7e({navMain:e=[],navSecondary:t=[],user:n,onLogout:r,logoText:o="ACS Tracking",logoHref:i="#",logoIcon:a=Oue,className:s,pageTitles:l={},...c}){return g.jsxs("aside",{className:U("hidden h-screen w-64 flex-col border-r bg-primary py-6 pl-5 text-white shadow-lg dark:bg-background lg:flex",s),...c,children:[g.jsxs("a",{href:i,className:"mt-4 flex items-center gap-2 text-xl font-semibold",children:[g.jsx(a,{className:"h-5 w-5"}),g.jsx("span",{children:o})]}),g.jsx("nav",{className:"mt-8 flex-1 space-y-6 overflow-y-auto pr-4 text-base",children:g.jsx("div",{children:g.jsx("ul",{className:"space-y-1",children:e.map(u=>g.jsx("li",{children:g.jsxs("a",{href:u.url,className:"flex items-center gap-2 rounded-md px-3 py-2 text-white/90 hover:bg-white/10 hover:text-white",children:[u.icon&&g.jsx(u.icon,{className:"h-4 w-4"}),g.jsx("span",{children:u.title})]})},u.title))})})}),g.jsx("div",{className:"border-t border-gray-800 pt-4 pr-4",children:g.jsxs("ul",{className:"space-y-1 text-base",children:[t.map(u=>g.jsx("li",{children:g.jsxs("a",{href:u.url,className:"flex items-center gap-2 rounded-md px-3 py-2 text-white/70 hover:bg-white/10 hover:text-white",children:[u.icon&&g.jsx(u.icon,{className:"h-4 w-4"}),g.jsx("span",{children:u.title})]})},u.title)),r&&g.jsx("li",{children:g.jsxs("button",{onClick:r,className:"flex items-center gap-2 rounded-md px-3 py-2 text-white/70 hover:bg-white/10 hover:text-white",children:[g.jsx(Iue,{className:"h-4 w-4"}),g.jsx("span",{children:"Log out"})]})},"logout")]})}),n&&g.jsxs("div",{className:"mb-6 mt-4 border-t border-gray-800 pt-4 text-xs text-white/80",children:[g.jsx("div",{className:"mb-2 font-semibold",children:n.name}),g.jsx("div",{className:"mb-2 break-all text-[11px] text-white/60",children:n.email})]})]})}const W7e=({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(id,{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(xn.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(VP,{items:n,setOpen:e})})]})})})})});function K7e({children:e,useCustomSidebar:t=!1,sidebarProps:n,headerProps:r,defaultOpen:o=!0,className:i}){const{showOverlay:a}=QN();return g.jsxs(mO,{defaultOpen:o,children:[!t&&g.jsx(H7e,{...n}),g.jsxs(yO,{children:[g.jsx(MZ,{...r}),g.jsxs("div",{className:U("flex flex-1 flex-col gap-4 p-4 md:gap-6 md:p-6",i),children:[e,g.jsx(TZ,{show:a})]})]})]})}const G7e=({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"})]})}),Y7e=({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")}),Z7e=({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.jsx(Z0,{userPopup:o,isOpen:a,onClose:u,className:U("!bg-background !px-1 w-full lg:w-[85%]",c),title:r??"Add Client",children:e(u)})]})},DZ=({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(cd,{open:a,children:[g.jsx(ud,{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(Sue,{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(ac,{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"})]})]})]})})},X7e=({className:e,startDateParamName:t="filterStartDate",endDateParamName:n="filterEndDate"})=>{const r=new URLSearchParams(location.search),o=xn.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)??rM(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)??rM(new Date).toISOString().split("T")[0]),[l,c]=E.useState(()=>r.get(n)??Ef(new Date,3).toISOString().split("T")[0]);return g.jsx(DZ,{startDate:new Date(a+"T00:00"),endDate:new Date(l+"T00:00"),onChange:i,className:`pt-0 ${e}`})};function Q7e(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 J7e(e,t){return e===t}function e9e(e,t,n){var r=J7e,o=E.useRef(e),i=E.useState({})[1],a=Q7e(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 t9e=({placeholder:e,className:t})=>{const[n,r]=xn.useSearchParams(),o=n.get("search")||"",[i,a]=E.useState(o),[s]=e9e(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)})},$Z=({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})]}),n9e=({title:e="Kutubi"})=>g.jsx(Cae,{children:g.jsxs("title",{children:[" ",e," "]})}),IZ=({setTheme:e,className:t})=>g.jsxs(nc,{children:[g.jsx(rc,{asChild:!0,children:g.jsxs(mt,{variant:"outline",size:"icon",className:t,children:[g.jsx(Que,{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"})]})]}),r9e=({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($Z,{title:e}),g.jsxs("div",{className:"ml-4 flex items-center md:ml-6",children:[g.jsx(NZ,{user:n,onLogout:t}),g.jsx(IZ,{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()})]})]}),FZ=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ie(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},LZ=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?FZ(r.ref,n,e):r.refs&&r.refs.forEach(o=>FZ(o,n,e))}},o9e=(e,t)=>{t.shouldUseNativeValidation&&LZ(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(i9e(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},i9e=(e,t)=>e.some(n=>n.startsWith(t+"."));var a9e=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},s9e=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&&LZ({},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:o9e(a9e(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};function l9e(){const{pathname:e}=xn.useLocation();return E.useMemo(()=>e,[e])}function zZ(){const e=xn.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 jZ({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 c9e(e){const t={};return Object.keys(e||{}).forEach(n=>{t[n]=Yje()}),vZ(t)}function u9e(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 d9e({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=zZ(),{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}=fd(),$=e!=null&&e.id?r?dd.Update:dd.Read:dd.Create,[G,z]=E.useState(!0);E.useEffect(()=>{z(N($,D(t)))},[$,D,N,t]);const K=d??c9e(e||{}),R=OV({defaultValues:E.useMemo(()=>e||void 0,[e]),resolver:s9e(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?u9e(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(TN,{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(kue,{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(jZ,{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 RZ=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})]})});RZ.displayName="FileUploadButton";function f9e({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(cd,{open:h,onOpenChange:m,children:[g.jsx(ud,{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(ac,{className:"w-full p-0",children:g.jsxs(gh,{children:[g.jsx(f0,{placeholder:r,className:"h-9",onValueChange:a}),g.jsxs(p0,{children:[g.jsx(h0,{children:"No item found."}),g.jsxs(g0,{children:[s&&g.jsxs(Gu,{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(Gu,{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 p9e=y.forwardRef(f9e);function h9e({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 g9e=E.forwardRef(h9e);function m9e(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 v9e({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?m9e(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(cd,{children:[g.jsx(ud,{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(ST,{className:"mr-2 h-4 w-4"}),l?Jo(l,"PPP"):g.jsx("span",{children:n})]})}),g.jsxs(ac,{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 y9e=y.forwardRef(v9e);function b9e({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 w9e({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 x9e=E.forwardRef(w9e);function S9e({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(PO,{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 C9e=E.forwardRef(S9e);function BZ(e){return/^\d{1,}$/.test(e)}function E9e({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&&BZ(v)&&Number(v)!==Number(c)&&u(Number(v)),b&&BZ(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 _9e=E.forwardRef(E9e);var nw={exports:{}},rw={exports:{}},At={};/** @license React v16.13.1
|
|
528
|
+
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 uZ(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 Bze=(e,t={})=>n=>{const r=lZ({...n,processors:t});return dr(e,r),cZ(r,e),uZ(r,e)},Yb=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},a=lZ({...o??{},target:i,io:t,processors:n});return dr(e,a),cZ(a,e),uZ(a,e)},Vze={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},qze=(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=Vze[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}))])}},Uze=(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)},Hze=(e,t,n,r)=>{n.not={}},Wze=(e,t,n,r)=>{},Kze=(e,t,n,r)=>{},Gze=(e,t,n,r)=>{const o=e._zod.def,i=kY(o.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Yze=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Zze=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Xze=(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"]})},Qze=(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)},Jze=(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},eje=(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},tje=(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"}]},nje=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},rje=(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))},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,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},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;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},aje=(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},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,n.readOnly=!0},dZ=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},lje=he("ZodISODateTime",(e,t)=>{p8e.init(e,t),yn.init(e,t)});function cje(e){return vze(lje,e)}const uje=he("ZodISODate",(e,t)=>{h8e.init(e,t),yn.init(e,t)});function dje(e){return yze(uje,e)}const fje=he("ZodISOTime",(e,t)=>{g8e.init(e,t),yn.init(e,t)});function pje(e){return bze(fje,e)}const hje=he("ZodISODuration",(e,t)=>{m8e.init(e,t),yn.init(e,t)});function gje(e){return wze(hje,e)}const Bo=he("ZodError",(e,t)=>{DY.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>a6e(e,n)},flatten:{value:n=>i6e(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,AP,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,AP,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),mje=$P(Bo),vje=IP(Bo),yje=qb(Bo),bje=Ub(Bo),wje=c6e(Bo),xje=u6e(Bo),Sje=d6e(Bo),Cje=f6e(Bo),Eje=p6e(Bo),_je=h6e(Bo),kje=g6e(Bo),Oje=m6e(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=Bze(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ws(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)=>Ks(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>mje(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>yje(e,n,r),e.parseAsync=async(n,r)=>vje(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>bje(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>wje(e,n,r),e.decode=(n,r)=>xje(e,n,r),e.encodeAsync=async(n,r)=>Sje(e,n,r),e.decodeAsync=async(n,r)=>Cje(e,n,r),e.safeEncode=(n,r)=>Eje(e,n,r),e.safeDecode=(n,r)=>_je(e,n,r),e.safeEncodeAsync=async(n,r)=>kje(e,n,r),e.safeDecodeAsync=async(n,r)=>Oje(e,n,r),e.refine=(n,r)=>e.check(C7e(n,r)),e.superRefine=n=>e.check(E7e(n)),e.overwrite=n=>e.check(Md(n)),e.optional=()=>bZ(e),e.exactOptional=()=>u7e(e),e.nullable=()=>wZ(e),e.nullish=()=>bZ(wZ(e)),e.nonoptional=n=>m7e(e,n),e.array=()=>e7e(e),e.or=n=>r7e([e,n]),e.and=n=>i7e(e,n),e.transform=n=>SZ(e,l7e(n)),e.default=n=>p7e(e,n),e.prefault=n=>g7e(e,n),e.catch=n=>y7e(e,n),e.pipe=n=>SZ(e,n),e.readonly=()=>x7e(e),e.describe=n=>{const r=e.clone();return gg.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=gg.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return gg.get(e);const r=e.clone();return gg.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),fZ=he("_ZodString",(e,t)=>{FP.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>qze(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(kze(...r)),e.includes=(...r)=>e.check(Aze(...r)),e.startsWith=(...r)=>e.check(Tze(...r)),e.endsWith=(...r)=>e.check(Mze(...r)),e.min=(...r)=>e.check(Gb(...r)),e.max=(...r)=>e.check(aZ(...r)),e.length=(...r)=>e.check(sZ(...r)),e.nonempty=(...r)=>e.check(Gb(1,...r)),e.lowercase=r=>e.check(Oze(r)),e.uppercase=r=>e.check(Pze(r)),e.trim=()=>e.check(Dze()),e.normalize=(...r)=>e.check(Nze(...r)),e.toLowerCase=()=>e.check($ze()),e.toUpperCase=()=>e.check(Ize()),e.slugify=()=>e.check(Fze())}),Pje=he("ZodString",(e,t)=>{FP.init(e,t),fZ.init(e,t),e.email=n=>e.check(Z8e(Aje,n)),e.url=n=>e.check(tze(Tje,n)),e.jwt=n=>e.check(mze(Hje,n)),e.emoji=n=>e.check(nze(Mje,n)),e.guid=n=>e.check(nZ(pZ,n)),e.uuid=n=>e.check(X8e(Zb,n)),e.uuidv4=n=>e.check(Q8e(Zb,n)),e.uuidv6=n=>e.check(J8e(Zb,n)),e.uuidv7=n=>e.check(eze(Zb,n)),e.nanoid=n=>e.check(rze(Nje,n)),e.guid=n=>e.check(nZ(pZ,n)),e.cuid=n=>e.check(oze(Dje,n)),e.cuid2=n=>e.check(ize($je,n)),e.ulid=n=>e.check(aze(Ije,n)),e.base64=n=>e.check(pze(Vje,n)),e.base64url=n=>e.check(hze(qje,n)),e.xid=n=>e.check(sze(Fje,n)),e.ksuid=n=>e.check(lze(Lje,n)),e.ipv4=n=>e.check(cze(zje,n)),e.ipv6=n=>e.check(uze(jje,n)),e.cidrv4=n=>e.check(dze(Rje,n)),e.cidrv6=n=>e.check(fze(Bje,n)),e.e164=n=>e.check(gze(Uje,n)),e.datetime=n=>e.check(cje(n)),e.date=n=>e.check(dje(n)),e.time=n=>e.check(pje(n)),e.duration=n=>e.check(gje(n))});function Nd(e){return Y8e(Pje,e)}const yn=he("ZodStringFormat",(e,t)=>{cn.init(e,t),fZ.init(e,t)}),Aje=he("ZodEmail",(e,t)=>{o8e.init(e,t),yn.init(e,t)}),pZ=he("ZodGUID",(e,t)=>{n8e.init(e,t),yn.init(e,t)}),Zb=he("ZodUUID",(e,t)=>{r8e.init(e,t),yn.init(e,t)}),Tje=he("ZodURL",(e,t)=>{i8e.init(e,t),yn.init(e,t)}),Mje=he("ZodEmoji",(e,t)=>{a8e.init(e,t),yn.init(e,t)}),Nje=he("ZodNanoID",(e,t)=>{s8e.init(e,t),yn.init(e,t)}),Dje=he("ZodCUID",(e,t)=>{l8e.init(e,t),yn.init(e,t)}),$je=he("ZodCUID2",(e,t)=>{c8e.init(e,t),yn.init(e,t)}),Ije=he("ZodULID",(e,t)=>{u8e.init(e,t),yn.init(e,t)}),Fje=he("ZodXID",(e,t)=>{d8e.init(e,t),yn.init(e,t)}),Lje=he("ZodKSUID",(e,t)=>{f8e.init(e,t),yn.init(e,t)}),zje=he("ZodIPv4",(e,t)=>{v8e.init(e,t),yn.init(e,t)}),jje=he("ZodIPv6",(e,t)=>{y8e.init(e,t),yn.init(e,t)}),Rje=he("ZodCIDRv4",(e,t)=>{b8e.init(e,t),yn.init(e,t)}),Bje=he("ZodCIDRv6",(e,t)=>{w8e.init(e,t),yn.init(e,t)}),Vje=he("ZodBase64",(e,t)=>{x8e.init(e,t),yn.init(e,t)}),qje=he("ZodBase64URL",(e,t)=>{C8e.init(e,t),yn.init(e,t)}),Uje=he("ZodE164",(e,t)=>{E8e.init(e,t),yn.init(e,t)}),Hje=he("ZodJWT",(e,t)=>{k8e.init(e,t),yn.init(e,t)}),hZ=he("ZodNumber",(e,t)=>{qY.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Uze(e,r,o),e.gt=(r,o)=>e.check(oZ(r,o)),e.gte=(r,o)=>e.check(jP(r,o)),e.min=(r,o)=>e.check(jP(r,o)),e.lt=(r,o)=>e.check(rZ(r,o)),e.lte=(r,o)=>e.check(zP(r,o)),e.max=(r,o)=>e.check(zP(r,o)),e.int=r=>e.check(gZ(r)),e.safe=r=>e.check(gZ(r)),e.positive=r=>e.check(oZ(0,r)),e.nonnegative=r=>e.check(jP(0,r)),e.negative=r=>e.check(rZ(0,r)),e.nonpositive=r=>e.check(zP(0,r)),e.multipleOf=(r,o)=>e.check(iZ(r,o)),e.step=(r,o)=>e.check(iZ(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 Wje(e){return xze(hZ,e)}const Kje=he("ZodNumberFormat",(e,t)=>{O8e.init(e,t),hZ.init(e,t)});function gZ(e){return Sze(Kje,e)}const Gje=he("ZodAny",(e,t)=>{P8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wze()});function Yje(){return Cze(Gje)}const Zje=he("ZodUnknown",(e,t)=>{A8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kze()});function mZ(){return Eze(Zje)}const Xje=he("ZodNever",(e,t)=>{T8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hze(e,n,r)});function Qje(e){return _ze(Xje,e)}const Jje=he("ZodArray",(e,t)=>{M8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xze(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(aZ(n,r)),e.length=(n,r)=>e.check(sZ(n,r)),e.unwrap=()=>e.element});function e7e(e,t){return Lze(Jje,e,t)}const t7e=he("ZodObject",(e,t)=>{D8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qze(e,n,r,o),It(e,"shape",()=>t.shape),e.keyof=()=>a7e(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:mZ()}),e.loose=()=>e.clone({...e._zod.def,catchall:mZ()}),e.strict=()=>e.clone({...e._zod.def,catchall:Qje()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>e6e(e,n),e.safeExtend=n=>t6e(e,n),e.merge=n=>n6e(e,n),e.pick=n=>QLe(e,n),e.omit=n=>JLe(e,n),e.partial=(...n)=>r6e(yZ,e,n[0]),e.required=(...n)=>o6e(xZ,e,n[0])});function vZ(e,t){const n={type:"object",shape:e??{},...et(t)};return new t7e(n)}const n7e=he("ZodUnion",(e,t)=>{$8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jze(e,n,r,o),e.options=t.options});function r7e(e,t){return new n7e({type:"union",options:e,...et(t)})}const o7e=he("ZodIntersection",(e,t)=>{I8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eje(e,n,r,o)});function i7e(e,t){return new o7e({type:"intersection",left:e,right:t})}const RP=he("ZodEnum",(e,t)=>{F8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Gze(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 RP({...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 RP({...t,checks:[],...et(o),entries:i})}});function a7e(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new RP({type:"enum",entries:n,...et(t)})}const s7e=he("ZodTransform",(e,t)=>{L8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zze(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new EY(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(hg(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(hg(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function l7e(e){return new s7e({type:"transform",transform:e})}const yZ=he("ZodOptional",(e,t)=>{ZY.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>dZ(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function bZ(e){return new yZ({type:"optional",innerType:e})}const c7e=he("ZodExactOptional",(e,t)=>{z8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>dZ(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function u7e(e){return new c7e({type:"optional",innerType:e})}const d7e=he("ZodNullable",(e,t)=>{j8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function wZ(e){return new d7e({type:"nullable",innerType:e})}const f7e=he("ZodDefault",(e,t)=>{R8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function p7e(e,t){return new f7e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():TY(t)}})}const h7e=he("ZodPrefault",(e,t)=>{B8e.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 g7e(e,t){return new h7e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():TY(t)}})}const xZ=he("ZodNonOptional",(e,t)=>{V8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function m7e(e,t){return new xZ({type:"nonoptional",innerType:e,...et(t)})}const v7e=he("ZodCatch",(e,t)=>{q8e.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.removeCatch=e.unwrap});function y7e(e,t){return new v7e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const b7e=he("ZodPipe",(e,t)=>{U8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>aje(e,n,r,o),e.in=t.in,e.out=t.out});function SZ(e,t){return new b7e({type:"pipe",in:e,out:t})}const w7e=he("ZodReadonly",(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});function x7e(e){return new w7e({type:"readonly",innerType:e})}const S7e=he("ZodCustom",(e,t)=>{W8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yze(e,n)});function C7e(e,t={}){return zze(S7e,e,t)}function E7e(e){return jze(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 _7e=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}));_7e.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 k7e=y.forwardRef(({className:e,...t},n)=>g.jsx("caption",{ref:n,className:U("mt-4 text-sm text-muted-foreground",e),...t}));k7e.displayName="TableCaption";const O7e=vZ({id:Wje(),header:Nd(),type:Nd(),status:Nd(),target:Nd(),limit:Nd(),reviewer:Nd()});function P7e({id:e}){const{attributes:t,listeners:n}=sY({id:e});return g.jsxs(mt,{...t,...n,variant:"ghost",size:"icon",className:"size-7 text-muted-foreground hover:bg-transparent",children:[g.jsx(jue,{className:"size-3 text-muted-foreground"}),g.jsx("span",{className:"sr-only",children:"Drag to reorder"})]})}const CZ=[{id:"drag",header:()=>null,cell:({row:e})=>g.jsx(P7e,{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(D7e,{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(Pue,{className:"text-green-500 dark:text-green-400"}):g.jsx(que,{}),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(),vK.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(),vK.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(nc,{children:[g.jsx(rc,{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(td,{}),g.jsx(wr,{children:"Delete"})]})]})}];function A7e({row:e}){const{transform:t,transition:n,setNodeRef:r,isDragging:o}=sY({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:ag.Transform.toString(t),transition:n},children:e.getVisibleCells().map(i=>g.jsx(Dd,{children:jb(i.column.columnDef.cell,i.getContext())},i.id))})}function T7e({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=z4e(tP(HG,{}),tP(WG,{}),tP(sP,{})),v=y.useMemo(()=>(n==null?void 0:n.map(({id:S})=>S))||[],[n]),b=CY({data:n,columns:CZ,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:bY(),getFilteredRowModel:xY(),getPaginationRowModel:SY(),getSortedRowModel:VLe(),getFacetedRowModel:RLe(),getFacetedUniqueValues:BLe()});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 fP(k,O,P)})}return g.jsxs(RK,{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(OO,{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(nc,{children:[g.jsx(rc,{asChild:!0,children:g.jsxs(mt,{variant:"outline",size:"sm",children:[g.jsx(Mue,{}),g.jsx("span",{className:"hidden lg:inline",children:"Customize Columns"}),g.jsx("span",{className:"lg:hidden",children:"Columns"}),g.jsx(Jm,{})]})}),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(vc,{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(RFe,{collisionDetection:q4e,modifiers:[GFe],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(eLe,{items:v,strategy:QFe,children:b.getRowModel().rows.map(S=>g.jsx(A7e,{row:S},S.id))}):g.jsx(os,{children:g.jsx(Dd,{colSpan:CZ.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(Eue,{})]}),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(bu,{})]}),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(_ue,{})]})]})]})]})]}),g.jsx(vc,{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(vc,{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(vc,{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 M7e=[{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}],N7e={desktop:{label:"Desktop",color:"var(--primary)"},mobile:{label:"Mobile",color:"var(--primary)"}};function D7e({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(id,{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(a0,{config:N7e,children:g.jsxs(B7,{accessibilityLayer:!0,data:M7e,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(s0,{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(yd,{}),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(Jue,{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(yd,{})]}),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(U0,{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 $7e=({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"})]})]})]})]}),EZ=({className:e,...t})=>g.jsx("nav",{role:"navigation","aria-label":"pagination",className:U("mx-auto flex w-full justify-center",e),...t});EZ.displayName="Pagination";const _Z=y.forwardRef(({className:e,...t},n)=>g.jsx("ul",{ref:n,className:U("flex flex-row items-center gap-1",e),...t}));_Z.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(Ol({variant:t?"outline":"ghost",size:n}),e),...r});$d.displayName="PaginationLink";const kZ=({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(bu,{className:"h-4 w-4"}),g.jsx("span",{children:"Previous"})]});kZ.displayName="PaginationPrevious";const OZ=({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"})]});OZ.displayName="PaginationNext";const BP=({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(ev,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"More pages"})]});BP.displayName="PaginationEllipsis";const PZ=({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"})]});PZ.displayName="PaginationNextLast";const AZ=({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(bu,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Previous Last"})]});AZ.displayName="PaginationPreviousLast";const I7e=({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(BP,{onClick:()=>r(s[0]-1)},"ellipsis-start")),s[s.length-1]<o.length&&p.push(g.jsx(BP,{onClick:()=>r(s[s.length-1]+1)},"ellipsis-end")),p};return g.jsx("div",{className:"p-4",children:g.jsx(EZ,{children:g.jsxs(_Z,{children:[g.jsxs(tw,{children:[g.jsx(AZ,{onClick:u}),g.jsx(kZ,{onClick:c})]}),f(),g.jsxs(tw,{children:[g.jsx(OZ,{onClick:l}),g.jsx(PZ,{onClick:d})]})]})})})},F7e=({columns:e,data:t,pageCount:n,pageSizeOptions:r=[10,20,30,40,50],className:o})=>{var b;const[i,a]=xn.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=CY({data:t,columns:e,pageCount:n??-1,getCoreRowModel:bY(),getFilteredRowModel:xY(),state:{pagination:{pageIndex:p,pageSize:h}},onPaginationChange:m,getPaginationRowModel:SY(),manualPagination:!0,manualFiltering:!0});return g.jsxs("div",{className:o,children:[g.jsxs(Y0,{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(Hh,{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(gte,{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(bu,{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(vte,{className:"h-4 w-4","aria-hidden":"true"})})]})]})]})]})};function L7e({key:e,data:t,handleAction:n,className:r}){return g.jsx(vc,{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(KO,{link:"form-card",handleAction:n,Item:o})})]},o.id))})]})})})}const z7e={position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.5)",zIndex:9999};function TZ({show:e,className:t}){return e?g.jsx("div",{style:z7e,className:t}):null}function MZ({pageTitles:e={},defaultTitle:t="Default Title",className:n}){const r=xn.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(yd,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),g.jsx("h1",{className:"text-xl font-bold",children:o})]})})}function j7e({items:e,pageTitles:t={}}){const n=xn.useLocation(),r=xn.useNavigate(),o=t[n.pathname]||"Default Title";return g.jsx(Qh,{children:g.jsx(hb,{className:"flex flex-col gap-2",children:g.jsx(Sd,{children:e.map(i=>g.jsx(gc,{className:o==i.title?"font-bold bg-white rounded-lg shadow-md":"",children:g.jsxs(mc,{tooltip:i.title,onClick:()=>{r(i.url)},children:[i.icon&&g.jsx(i.icon,{}),g.jsx("span",{children:i.title})]})},i.title))})})})}function R7e({items:e,...t}){return g.jsx(Qh,{...t,children:g.jsx(hb,{children:g.jsx(Sd,{children:e.map(n=>g.jsx(gc,{children:g.jsx(mc,{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 B7e({user:e,onLogout:t,menuItems:n=[],className:r}){const{isMobile:o}=hc();return g.jsx(Sd,{children:g.jsx(gc,{children:g.jsxs(nc,{children:[g.jsx(rc,{asChild:!0,children:g.jsxs(mc,{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(D0,{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(td,{}),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(td,{}),g.jsxs(wr,{onClick:t,children:[g.jsx(Hue,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})})}function V7e({items:e,className:t}){const{isMobile:n}=hc();return g.jsxs(Qh,{className:U("group-data-[collapsible=icon]:hidden",t),children:[g.jsx(bO,{children:"Documents"}),g.jsxs(Sd,{children:[e.map(r=>g.jsxs(gc,{children:[g.jsx(mc,{asChild:!0,children:g.jsxs("a",{href:r.url,children:[g.jsx(r.icon,{}),g.jsx("span",{children:r.name})]})}),g.jsxs(nc,{children:[g.jsx(rc,{asChild:!0,children:g.jsxs(wO,{showOnHover:!0,className:"rounded-sm data-[state=open]:bg-accent",children:[g.jsx(ev,{}),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(zue,{}),g.jsx("span",{children:"Open"})]}),g.jsxs(wr,{children:[g.jsx(Zue,{}),g.jsx("span",{children:"Share"})]})]})]})]},r.name)),g.jsx(gc,{children:g.jsxs(mc,{className:"text-sidebar-foreground/70",children:[g.jsx(ev,{className:"text-sidebar-foreground/70"}),g.jsx("span",{children:"More"})]})})]})]})}const NZ=({user:e,onLogout:t,className:n})=>{var r;return g.jsxs(nc,{children:[g.jsx(rc,{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(D0,{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(td,{}),g.jsx(wr,{onClick:t,children:"Log out"})]})]})},q7e=({item:e,setOpen:t})=>{const n=typeof e.icon=="string"?V0[e.icon]||V0.arrowRight:e.icon||V0.arrowRight;return g.jsx("div",{className:"space-y-3 text-white",onClickCapture:()=>{t&&t(!1)},children:g.jsxs(xn.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)},VP=({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,U7e=({navItems:e,logoText:t="Logo",logoHref:n="/"})=>g.jsxs("aside",{className:"hidden h-screen w-64 flex-col overflow-y-auto overflow-x-hidden rounded-tr-[90px] border-r bg-primary py-8 pl-5 dark:bg-background lg:flex",children:[g.jsx(xn.Link,{to:n,className:"text-3xl font-bold text-white",children:t}),g.jsx("div",{className:"mt-6 flex flex-1 flex-col justify-between",children:g.jsx(VP,{items:e})})]});function H7e({navMain:e=[],navSecondary:t=[],user:n,onLogout:r,logoText:o="ACS Tracking",logoHref:i="#",logoIcon:a=Oue,className:s,pageTitles:l={},...c}){return g.jsxs("aside",{className:U("hidden h-screen w-64 flex-col border-r bg-primary py-6 pl-5 text-white shadow-lg dark:bg-background lg:flex",s),...c,children:[g.jsxs("a",{href:i,className:"mt-4 flex items-center gap-2 text-xl font-semibold",children:[g.jsx(a,{className:"h-5 w-5"}),g.jsx("span",{children:o})]}),g.jsx("nav",{className:"mt-8 flex-1 space-y-6 overflow-y-auto pr-4 text-base",children:g.jsx("div",{children:g.jsx("ul",{className:"space-y-1",children:e.map(u=>g.jsx("li",{children:g.jsxs("a",{href:u.url,className:"flex items-center gap-2 rounded-md px-3 py-2 text-white/90 hover:bg-white/10 hover:text-white",children:[u.icon&&g.jsx(u.icon,{className:"h-4 w-4"}),g.jsx("span",{children:u.title})]})},u.title))})})}),g.jsx("div",{className:"border-t border-gray-800 pt-4 pr-4",children:g.jsxs("ul",{className:"space-y-1 text-base",children:[t.map(u=>g.jsx("li",{children:g.jsxs("a",{href:u.url,className:"flex items-center gap-2 rounded-md px-3 py-2 text-white/70 hover:bg-white/10 hover:text-white",children:[u.icon&&g.jsx(u.icon,{className:"h-4 w-4"}),g.jsx("span",{children:u.title})]})},u.title)),r&&g.jsx("li",{children:g.jsxs("button",{onClick:r,className:"flex items-center gap-2 rounded-md px-3 py-2 text-white/70 hover:bg-white/10 hover:text-white",children:[g.jsx(Iue,{className:"h-4 w-4"}),g.jsx("span",{children:"Log out"})]})},"logout")]})}),n&&g.jsxs("div",{className:"mb-6 mt-4 border-t border-gray-800 pt-4 text-xs text-white/80",children:[g.jsx("div",{className:"mb-2 font-semibold",children:n.name}),g.jsx("div",{className:"mb-2 break-all text-[11px] text-white/60",children:n.email})]})]})}const W7e=({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(id,{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(xn.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(VP,{items:n,setOpen:e})})]})})})})});function K7e({children:e,customSidebar:t,useCustomSidebar:n=!1,sidebarProps:r,headerProps:o,defaultOpen:i=!0,className:a}){const{showOverlay:s}=QN();return g.jsxs(mO,{defaultOpen:i,children:[n&&t?t:g.jsx(H7e,{...r}),g.jsxs(yO,{children:[g.jsx(MZ,{...o}),g.jsxs("div",{className:U("flex flex-1 flex-col gap-4 p-4 md:gap-6 md:p-6",a),children:[e,g.jsx(TZ,{show:s})]})]})]})}const G7e=({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"})]})}),Y7e=({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")}),Z7e=({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.jsx(Z0,{userPopup:o,isOpen:a,onClose:u,className:U("!bg-background !px-1 w-full lg:w-[85%]",c),title:r??"Add Client",children:e(u)})]})},DZ=({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(cd,{open:a,children:[g.jsx(ud,{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(Sue,{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(ac,{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"})]})]})]})})},X7e=({className:e,startDateParamName:t="filterStartDate",endDateParamName:n="filterEndDate"})=>{const r=new URLSearchParams(location.search),o=xn.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)??rM(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)??rM(new Date).toISOString().split("T")[0]),[l,c]=E.useState(()=>r.get(n)??Ef(new Date,3).toISOString().split("T")[0]);return g.jsx(DZ,{startDate:new Date(a+"T00:00"),endDate:new Date(l+"T00:00"),onChange:i,className:`pt-0 ${e}`})};function Q7e(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 J7e(e,t){return e===t}function e9e(e,t,n){var r=J7e,o=E.useRef(e),i=E.useState({})[1],a=Q7e(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 t9e=({placeholder:e,className:t})=>{const[n,r]=xn.useSearchParams(),o=n.get("search")||"",[i,a]=E.useState(o),[s]=e9e(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)})},$Z=({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})]}),n9e=({title:e="Kutubi"})=>g.jsx(Cae,{children:g.jsxs("title",{children:[" ",e," "]})}),IZ=({setTheme:e,className:t})=>g.jsxs(nc,{children:[g.jsx(rc,{asChild:!0,children:g.jsxs(mt,{variant:"outline",size:"icon",className:t,children:[g.jsx(Que,{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"})]})]}),r9e=({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($Z,{title:e}),g.jsxs("div",{className:"ml-4 flex items-center md:ml-6",children:[g.jsx(NZ,{user:n,onLogout:t}),g.jsx(IZ,{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()})]})]}),FZ=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ie(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},LZ=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?FZ(r.ref,n,e):r.refs&&r.refs.forEach(o=>FZ(o,n,e))}},o9e=(e,t)=>{t.shouldUseNativeValidation&&LZ(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(i9e(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},i9e=(e,t)=>e.some(n=>n.startsWith(t+"."));var a9e=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},s9e=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&&LZ({},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:o9e(a9e(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};function l9e(){const{pathname:e}=xn.useLocation();return E.useMemo(()=>e,[e])}function zZ(){const e=xn.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 jZ({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 c9e(e){const t={};return Object.keys(e||{}).forEach(n=>{t[n]=Yje()}),vZ(t)}function u9e(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 d9e({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=zZ(),{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}=fd(),$=e!=null&&e.id?r?dd.Update:dd.Read:dd.Create,[G,z]=E.useState(!0);E.useEffect(()=>{z(N($,D(t)))},[$,D,N,t]);const K=d??c9e(e||{}),R=OV({defaultValues:E.useMemo(()=>e||void 0,[e]),resolver:s9e(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?u9e(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(TN,{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(kue,{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(jZ,{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 RZ=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})]})});RZ.displayName="FileUploadButton";function f9e({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(cd,{open:h,onOpenChange:m,children:[g.jsx(ud,{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(ac,{className:"w-full p-0",children:g.jsxs(gh,{children:[g.jsx(f0,{placeholder:r,className:"h-9",onValueChange:a}),g.jsxs(p0,{children:[g.jsx(h0,{children:"No item found."}),g.jsxs(g0,{children:[s&&g.jsxs(Gu,{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(Gu,{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 p9e=y.forwardRef(f9e);function h9e({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 g9e=E.forwardRef(h9e);function m9e(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 v9e({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?m9e(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(cd,{children:[g.jsx(ud,{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(ST,{className:"mr-2 h-4 w-4"}),l?Jo(l,"PPP"):g.jsx("span",{children:n})]})}),g.jsxs(ac,{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 y9e=y.forwardRef(v9e);function b9e({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 w9e({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 x9e=E.forwardRef(w9e);function S9e({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(PO,{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 C9e=E.forwardRef(S9e);function BZ(e){return/^\d{1,}$/.test(e)}function E9e({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&&BZ(v)&&Number(v)!==Number(c)&&u(Number(v)),b&&BZ(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 _9e=E.forwardRef(E9e);var nw={exports:{}},rw={exports:{}},At={};/** @license React v16.13.1
|
|
529
529
|
* react-is.production.min.js
|
|
530
530
|
*
|
|
531
531
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -2,11 +2,12 @@ import { SiteHeaderProps } from './SiteHeader';
|
|
|
2
2
|
import { AppSidebarProps } from '../navigation';
|
|
3
3
|
export type DashboardLayoutProps = {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
+
customSidebar?: React.ReactNode;
|
|
5
6
|
useCustomSidebar?: boolean;
|
|
6
7
|
sidebarProps?: AppSidebarProps;
|
|
7
8
|
headerProps?: SiteHeaderProps;
|
|
8
9
|
defaultOpen?: boolean;
|
|
9
10
|
className?: string;
|
|
10
11
|
};
|
|
11
|
-
export declare function DashboardLayout({ children, useCustomSidebar, sidebarProps, headerProps, defaultOpen, className, }: DashboardLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function DashboardLayout({ children, customSidebar, useCustomSidebar, sidebarProps, headerProps, defaultOpen, className, }: DashboardLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
//# sourceMappingURL=DashboardLayout.d.ts.map
|
|
@@ -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,EAAc,eAAe,EAAE,MAAM,eAAe,CAAA;AAI3D,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,eAAe,CAAA;IAC9B,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,gBAAwB,EACxB,YAAY,EACZ,WAAW,EACX,WAAkB,EAClB,SAAS,GACV,EAAE,oBAAoB,2CAetB"}
|
|
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,EAAc,eAAe,EAAE,MAAM,eAAe,CAAA;AAI3D,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,eAAe,CAAA;IAC9B,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,aAAa,EACb,gBAAwB,EACxB,YAAY,EACZ,WAAW,EACX,WAAkB,EAClB,SAAS,GACV,EAAE,oBAAoB,2CAetB"}
|
package/package.json
CHANGED