izen-react-starter 2.7.5 → 2.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{2SSKDMRQ-Chn-NgZI.js → 2SSKDMRQ-DF56fa3n.js} +2 -2
- package/dist/{AP7HFJJL-BME9q2ff.js → AP7HFJJL-D6Nri1fZ.js} +1 -1
- package/dist/{WDYDFRGG-CYAbLseR.js → WDYDFRGG-DIAyp-ht.js} +2 -2
- package/dist/{index-DPdV1XXU.js → index-9FsK5CNZ.js} +6 -8
- package/dist/react-starter.js +1 -1
- package/dist/react-starter.umd.cjs +1 -1
- package/dist/src/components/layout/DashboardLayout.d.ts.map +1 -1
- package/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-D6Nri1fZ.js";
|
|
2
|
+
import { g as h, c as v, a as e } from "./index-9FsK5CNZ.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-9FsK5CNZ.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-D6Nri1fZ.js";
|
|
2
|
+
import { g as d, c as f, a as e } from "./index-9FsK5CNZ.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -9231,7 +9231,7 @@ var X3e = (e, t = !1) => {
|
|
|
9231
9231
|
const t = O$(() => {
|
|
9232
9232
|
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);
|
|
9233
9233
|
let u;
|
|
9234
|
-
return I(this, _c) ? u = I(this, _c) : (u = E$(() => import("./WDYDFRGG-
|
|
9234
|
+
return I(this, _c) ? u = I(this, _c) : (u = E$(() => import("./WDYDFRGG-DIAyp-ht.js")), fe(this, _c, u)), H$(I(this, If), I(this, wc)), S$(u, C$({
|
|
9235
9235
|
get queryFlavor() {
|
|
9236
9236
|
return I(n, Mf);
|
|
9237
9237
|
},
|
|
@@ -9338,7 +9338,7 @@ var X3e = (e, t = !1) => {
|
|
|
9338
9338
|
const t = O$(() => {
|
|
9339
9339
|
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);
|
|
9340
9340
|
let d;
|
|
9341
|
-
return I(this, Dc) ? d = I(this, Dc) : (d = E$(() => import("./2SSKDMRQ-
|
|
9341
|
+
return I(this, Dc) ? d = I(this, Dc) : (d = E$(() => import("./2SSKDMRQ-DF56fa3n.js")), fe(this, Dc, d)), H$(I(this, Vf), I(this, Nc)), S$(d, C$({
|
|
9342
9342
|
get queryFlavor() {
|
|
9343
9343
|
return I(n, Lf);
|
|
9344
9344
|
},
|
|
@@ -60082,13 +60082,11 @@ function gVe({
|
|
|
60082
60082
|
const { showOverlay: s } = dJ();
|
|
60083
60083
|
return /* @__PURE__ */ T(DW, { defaultOpen: i, children: [
|
|
60084
60084
|
n && t ? t : /* @__PURE__ */ v(P5e, { ...r }),
|
|
60085
|
-
/* @__PURE__ */
|
|
60085
|
+
/* @__PURE__ */ v($W, { className: a, children: /* @__PURE__ */ T("div", { className: j("flex flex-1 flex-col gap-4 p-4 md:gap-6 md:p-6"), children: [
|
|
60086
60086
|
/* @__PURE__ */ v(E5e, { ...o }),
|
|
60087
|
-
|
|
60088
|
-
|
|
60089
|
-
|
|
60090
|
-
] })
|
|
60091
|
-
] })
|
|
60087
|
+
e,
|
|
60088
|
+
/* @__PURE__ */ v(C5e, { show: s })
|
|
60089
|
+
] }) })
|
|
60092
60090
|
] });
|
|
60093
60091
|
}
|
|
60094
60092
|
const vVe = ({
|
package/dist/react-starter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a_ as t, bl as o, bo as r, bm as n, bn as i, fc as d, a5 as l, a6 as u, bp as c, br as b, bs as g, bB as p, bC as S, bw as C, bA as m, by as T, bx as D, bu as M, bt as A, bz as h, bv as v, fs as f, bq as I, bb as P, bD as F, b3 as w, bE as x, bG as B, bF as R, bH as G, bJ as L, bP as k, bL as y, bM as H, bK as N, bN as O, bO as U, Y as E, bR as V, Z as z, bW as W, bV as q, bT as X, bS as j, bU as Y, bX as Z, bY as _, bZ as J, b$ as K, b_ as Q, f9 as $, c0 as aa, c3 as ea, c4 as sa, c5 as ta, c1 as oa, c2 as ra, c6 as na, c7 as ia, c9 as da, c8 as la, ca as ua, cb as ca, ce as ba, cf as ga, cc as pa, cg as Sa, cd as Ca, ci as ma, ch as Ta, aX as Da, cj as Ma, cn as Aa, cl as ha, cs as va, cm as fa, cp as Ia, ct as Pa, cx as Fa, co as wa, cq as xa, cr as Ba, cu as Ra, cv as Ga, cw as La, ck as ka, fr as ya, a0 as Ha, ff as Na, fh as Oa, aa as Ua, ab as Ea, fv as Va, fw as za, ft as Wa, cy as qa, cC as Xa, cD as ja, cH as Ya, cF as Za, cE as _a, cA as Ja, cz as Ka, cG as Qa, cB as $a, cI as ae, cM as ee, cN as se, cR as te, cP as oe, cO as re, cK as ne, cJ as ie, cQ as de, cL as le, cS as ue, cW as ce, cU as be, c$ as ge, cV as pe, cY as Se, d0 as Ce, d4 as me, cX as Te, cZ as De, c_ as Me, d1 as Ae, d2 as he, d3 as ve, cT as fe, a4 as Ie, ai as Pe, d6 as Fe, d9 as we, da as xe, dc as Be, d7 as Re, d8 as Ge, a3 as Le, db as ke, fk as ye, fB as He, fy as Ne, dd as Oe, df as Ue, de as Ee, dg as Ve, ac as ze, ad as We, ae as qe, af as Xe, dh as je, a7 as Ye, di as Ze, dj as _e, dl as Je, dk as Ke, dm as Qe, aj as $e, dn as as, dv as es, dr as ss, dB as ts, ds as os, du as rs, dp as ns, dy as is, dw as ds, dx as ls, dt as us, dD as cs, dC as bs, dz as gs, dA as ps, dq as Ss, a2 as Cs, dE as ms, b5 as Ts, fq as Ds, fn as Ms, fo as As, fp as hs, dG as vs, dJ as fs, dM as Is, dI as Ps, dL as Fs, dH as ws, dK as xs, dN as Bs, fl as Rs, b7 as Gs, fz as Ls, fa as ks, fi as ys, dO as Hs, dR as Ns, dQ as Os, dP as Us, fu as Es, dS as Vs, dU as zs, dT as Ws, dV as qs, b1 as Xs, dW as js, dX as Ys, bd as Zs, d_ as _s, dZ as Js, dY as Ks, ag as Qs, d$ as $s, e0 as at, e1 as et, e5 as st, a9 as tt, e2 as ot, a8 as rt, e7 as nt, e6 as it, ea as dt, e9 as lt, e8 as ut, e4 as ct, e3 as bt, eb as gt, fj as pt, ec as St, eg as Ct, eh as mt, el as Tt, ej as Dt, ei as Mt, ee as At, ed as ht, ek as vt, ef as ft, a1 as It, em as Pt, en as Ft, eo as wt, ep as xt, eq as Bt, er as Rt, es as Gt, et as Lt, eu as kt, ev as yt, ew as Ht, ex as Nt, ey as Ot, ez as Ut, eA as Et, eB as Vt, eC as zt, eD as Wt, eE as qt, eF as Xt, eG as jt, eH as Yt, fm as Zt, eJ as _t, eK as Jt, eL as Kt, eN as Qt, fe as $t, fb as ao, fd as eo, fx as so, eO as to, eR as oo, eP as ro, eQ as no, eS as io, b9 as lo, fA as uo, ah as co, eV as bo, eZ as go, eY as po, eX as So, eT as Co, eW as mo, bk as To, eU as Do, eM as Mo, e_ as Ao, f0 as ho, f1 as vo, f2 as fo, f4 as Io, f5 as Po, f3 as Fo, b0 as wo, _ as xo, bh as Bo, at as Ro, bI as Go, aw as Lo, au as ko, av as yo, bQ as Ho, an as No, am as Oo, ao as Uo, aN as Eo, aM as Vo, as as zo, fg as Wo, ar as qo, aI as Xo, X as jo, aD as Yo, ay as Zo, aq as _o, ap as Jo, ax as Ko, aG as Qo, aH as $o, aK as ar, aL as er, dF as sr, aO as tr, bj as or, aC as rr, bc as nr, f6 as ir, az as dr, aE as lr, aF as ur, X as cr, aJ as br, aA as gr, aB as pr, f8 as Sr, e$ as Cr, aZ as mr, bi as Tr, be as Dr, b4 as Mr, aQ as Ar, aR as hr, aS as vr, d5 as fr, aT as Ir, aU as Pr, al as Fr, ak as wr, b6 as xr, b8 as Br, bf as Rr, b2 as Gr, aP as Lr, bg as kr, aW as yr, eI as Hr, ba as Nr, f7 as Or, aV as Ur, aY as Er, a$ as Vr } from "./index-
|
|
1
|
+
import { a_ as t, bl as o, bo as r, bm as n, bn as i, fc as d, a5 as l, a6 as u, bp as c, br as b, bs as g, bB as p, bC as S, bw as C, bA as m, by as T, bx as D, bu as M, bt as A, bz as h, bv as v, fs as f, bq as I, bb as P, bD as F, b3 as w, bE as x, bG as B, bF as R, bH as G, bJ as L, bP as k, bL as y, bM as H, bK as N, bN as O, bO as U, Y as E, bR as V, Z as z, bW as W, bV as q, bT as X, bS as j, bU as Y, bX as Z, bY as _, bZ as J, b$ as K, b_ as Q, f9 as $, c0 as aa, c3 as ea, c4 as sa, c5 as ta, c1 as oa, c2 as ra, c6 as na, c7 as ia, c9 as da, c8 as la, ca as ua, cb as ca, ce as ba, cf as ga, cc as pa, cg as Sa, cd as Ca, ci as ma, ch as Ta, aX as Da, cj as Ma, cn as Aa, cl as ha, cs as va, cm as fa, cp as Ia, ct as Pa, cx as Fa, co as wa, cq as xa, cr as Ba, cu as Ra, cv as Ga, cw as La, ck as ka, fr as ya, a0 as Ha, ff as Na, fh as Oa, aa as Ua, ab as Ea, fv as Va, fw as za, ft as Wa, cy as qa, cC as Xa, cD as ja, cH as Ya, cF as Za, cE as _a, cA as Ja, cz as Ka, cG as Qa, cB as $a, cI as ae, cM as ee, cN as se, cR as te, cP as oe, cO as re, cK as ne, cJ as ie, cQ as de, cL as le, cS as ue, cW as ce, cU as be, c$ as ge, cV as pe, cY as Se, d0 as Ce, d4 as me, cX as Te, cZ as De, c_ as Me, d1 as Ae, d2 as he, d3 as ve, cT as fe, a4 as Ie, ai as Pe, d6 as Fe, d9 as we, da as xe, dc as Be, d7 as Re, d8 as Ge, a3 as Le, db as ke, fk as ye, fB as He, fy as Ne, dd as Oe, df as Ue, de as Ee, dg as Ve, ac as ze, ad as We, ae as qe, af as Xe, dh as je, a7 as Ye, di as Ze, dj as _e, dl as Je, dk as Ke, dm as Qe, aj as $e, dn as as, dv as es, dr as ss, dB as ts, ds as os, du as rs, dp as ns, dy as is, dw as ds, dx as ls, dt as us, dD as cs, dC as bs, dz as gs, dA as ps, dq as Ss, a2 as Cs, dE as ms, b5 as Ts, fq as Ds, fn as Ms, fo as As, fp as hs, dG as vs, dJ as fs, dM as Is, dI as Ps, dL as Fs, dH as ws, dK as xs, dN as Bs, fl as Rs, b7 as Gs, fz as Ls, fa as ks, fi as ys, dO as Hs, dR as Ns, dQ as Os, dP as Us, fu as Es, dS as Vs, dU as zs, dT as Ws, dV as qs, b1 as Xs, dW as js, dX as Ys, bd as Zs, d_ as _s, dZ as Js, dY as Ks, ag as Qs, d$ as $s, e0 as at, e1 as et, e5 as st, a9 as tt, e2 as ot, a8 as rt, e7 as nt, e6 as it, ea as dt, e9 as lt, e8 as ut, e4 as ct, e3 as bt, eb as gt, fj as pt, ec as St, eg as Ct, eh as mt, el as Tt, ej as Dt, ei as Mt, ee as At, ed as ht, ek as vt, ef as ft, a1 as It, em as Pt, en as Ft, eo as wt, ep as xt, eq as Bt, er as Rt, es as Gt, et as Lt, eu as kt, ev as yt, ew as Ht, ex as Nt, ey as Ot, ez as Ut, eA as Et, eB as Vt, eC as zt, eD as Wt, eE as qt, eF as Xt, eG as jt, eH as Yt, fm as Zt, eJ as _t, eK as Jt, eL as Kt, eN as Qt, fe as $t, fb as ao, fd as eo, fx as so, eO as to, eR as oo, eP as ro, eQ as no, eS as io, b9 as lo, fA as uo, ah as co, eV as bo, eZ as go, eY as po, eX as So, eT as Co, eW as mo, bk as To, eU as Do, eM as Mo, e_ as Ao, f0 as ho, f1 as vo, f2 as fo, f4 as Io, f5 as Po, f3 as Fo, b0 as wo, _ as xo, bh as Bo, at as Ro, bI as Go, aw as Lo, au as ko, av as yo, bQ as Ho, an as No, am as Oo, ao as Uo, aN as Eo, aM as Vo, as as zo, fg as Wo, ar as qo, aI as Xo, X as jo, aD as Yo, ay as Zo, aq as _o, ap as Jo, ax as Ko, aG as Qo, aH as $o, aK as ar, aL as er, dF as sr, aO as tr, bj as or, aC as rr, bc as nr, f6 as ir, az as dr, aE as lr, aF as ur, X as cr, aJ as br, aA as gr, aB as pr, f8 as Sr, e$ as Cr, aZ as mr, bi as Tr, be as Dr, b4 as Mr, aQ as Ar, aR as hr, aS as vr, d5 as fr, aT as Ir, aU as Pr, al as Fr, ak as wr, b6 as xr, b8 as Br, bf as Rr, b2 as Gr, aP as Lr, bg as kr, aW as yr, eI as Hr, ba as Nr, f7 as Or, aV as Ur, aY as Er, a$ as Vr } from "./index-9FsK5CNZ.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
export {
|
|
4
4
|
t as AccessControlWrapper,
|
|
@@ -525,7 +525,7 @@ Defaulting to \`null\`.`}var tH=YU,S$e=XU;const nH=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=!kY.jitless,c=s&&YLe.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?KY([],h,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function GY(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 I8e=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=>GY(l,o,e,i)):GY(s,o,e,i)}}),F8e=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])=>YY(n,l,c)):YY(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 YY(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 L8e=he("$ZodEnum",(e,t)=>{kn.init(e,t);const n=OY(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>ZLe.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}}),z8e=he("$ZodTransform",(e,t)=>{kn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new _Y(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 ZY(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const XY=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=>ZY(i,n.value)):ZY(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),j8e=he("$ZodExactOptional",(e,t)=>{XY.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)}),R8e=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)}),B8e=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=>QY(i,t)):QY(o,t)}});function QY(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const V8e=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))}),q8e=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=>JY(i,e)):JY(o,e)}});function JY(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 U8e=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)}}),H8e=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 W8e=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(eZ):eZ(o)}});function eZ(e){return e.value=Object.freeze(e.value),e}const K8e=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=>tZ(i,n,r,e));tZ(o,n,r,e)}});function tZ(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 nZ;class G8e{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 Y8e(){return new G8e}(nZ=globalThis).__zod_globalRegistry??(nZ.__zod_globalRegistry=Y8e());const gg=globalThis.__zod_globalRegistry;function Z8e(e,t){return new e({type:"string",...et(t)})}function X8e(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...et(t)})}function rZ(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...et(t)})}function Q8e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...et(t)})}function J8e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...et(t)})}function eze(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...et(t)})}function tze(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...et(t)})}function nze(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...et(t)})}function rze(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...et(t)})}function oze(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...et(t)})}function ize(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...et(t)})}function aze(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...et(t)})}function sze(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...et(t)})}function lze(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...et(t)})}function cze(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...et(t)})}function uze(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...et(t)})}function dze(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...et(t)})}function fze(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...et(t)})}function pze(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...et(t)})}function hze(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...et(t)})}function gze(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...et(t)})}function mze(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...et(t)})}function vze(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...et(t)})}function yze(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...et(t)})}function bze(e,t){return new e({type:"string",format:"date",check:"string_format",...et(t)})}function wze(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...et(t)})}function xze(e,t){return new e({type:"string",format:"duration",check:"string_format",...et(t)})}function Sze(e,t){return new e({type:"number",checks:[],...et(t)})}function Cze(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...et(t)})}function Eze(e){return new e({type:"any"})}function _ze(e){return new e({type:"unknown"})}function kze(e,t){return new e({type:"never",...et(t)})}function oZ(e,t){return new BY({check:"less_than",...et(t),value:e,inclusive:!1})}function zP(e,t){return new BY({check:"less_than",...et(t),value:e,inclusive:!0})}function iZ(e,t){return new VY({check:"greater_than",...et(t),value:e,inclusive:!1})}function jP(e,t){return new VY({check:"greater_than",...et(t),value:e,inclusive:!0})}function aZ(e,t){return new q6e({check:"multiple_of",...et(t),value:e})}function sZ(e,t){return new H6e({check:"max_length",...et(t),maximum:e})}function Gb(e,t){return new W6e({check:"min_length",...et(t),minimum:e})}function lZ(e,t){return new K6e({check:"length_equals",...et(t),length:e})}function Oze(e,t){return new G6e({check:"string_format",format:"regex",...et(t),pattern:e})}function Pze(e){return new Y6e({check:"string_format",format:"lowercase",...et(e)})}function Aze(e){return new Z6e({check:"string_format",format:"uppercase",...et(e)})}function Tze(e,t){return new X6e({check:"string_format",format:"includes",...et(t),includes:e})}function Mze(e,t){return new Q6e({check:"string_format",format:"starts_with",...et(t),prefix:e})}function Nze(e,t){return new J6e({check:"string_format",format:"ends_with",...et(t),suffix:e})}function Md(e){return new e8e({check:"overwrite",tx:e})}function Dze(e){return Md(t=>t.normalize(e))}function $ze(){return Md(e=>e.trim())}function Ize(){return Md(e=>e.toLowerCase())}function Fze(){return Md(e=>e.toUpperCase())}function Lze(){return Md(e=>GLe(e))}function zze(e,t,n){return new e({type:"array",element:t,...et(n)})}function jze(e,t,n){return new e({type:"custom",check:"custom",fn:t,...et(n)})}function Rze(e){const t=Bze(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 Bze(e,t){const n=new Yr({check:"custom",...et(t)});return n._zod.check=e,n}function cZ(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 uZ(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 dZ(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 Vze=(e,t={})=>n=>{const r=cZ({...n,processors:t});return dr(e,r),uZ(r,e),dZ(r,e)},Yb=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},a=cZ({...o??{},target:i,io:t,processors:n});return dr(e,a),uZ(a,e),dZ(a,e)},qze={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Uze=(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=qze[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}))])}},Hze=(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)},Wze=(e,t,n,r)=>{n.not={}},Kze=(e,t,n,r)=>{},Gze=(e,t,n,r)=>{},Yze=(e,t,n,r)=>{const o=e._zod.def,i=OY(o.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Zze=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Xze=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Qze=(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"]})},Jze=(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)},eje=(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},tje=(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},nje=(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"}]},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},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,n.default=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,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},aje=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},sje=(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},lje=(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},fZ=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},cje=he("ZodISODateTime",(e,t)=>{h8e.init(e,t),yn.init(e,t)});function uje(e){return yze(cje,e)}const dje=he("ZodISODate",(e,t)=>{g8e.init(e,t),yn.init(e,t)});function fje(e){return bze(dje,e)}const pje=he("ZodISOTime",(e,t)=>{m8e.init(e,t),yn.init(e,t)});function hje(e){return wze(pje,e)}const gje=he("ZodISODuration",(e,t)=>{v8e.init(e,t),yn.init(e,t)});function mje(e){return xze(gje,e)}const Bo=he("ZodError",(e,t)=>{$Y.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>s6e(e,n)},flatten:{value:n=>a6e(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}),vje=$P(Bo),yje=IP(Bo),bje=qb(Bo),wje=Ub(Bo),xje=u6e(Bo),Sje=d6e(Bo),Cje=f6e(Bo),Eje=p6e(Bo),_je=h6e(Bo),kje=g6e(Bo),Oje=m6e(Bo),Pje=v6e(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=Vze(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)=>vje(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>bje(e,n,r),e.parseAsync=async(n,r)=>yje(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>wje(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>xje(e,n,r),e.decode=(n,r)=>Sje(e,n,r),e.encodeAsync=async(n,r)=>Cje(e,n,r),e.decodeAsync=async(n,r)=>Eje(e,n,r),e.safeEncode=(n,r)=>_je(e,n,r),e.safeDecode=(n,r)=>kje(e,n,r),e.safeEncodeAsync=async(n,r)=>Oje(e,n,r),e.safeDecodeAsync=async(n,r)=>Pje(e,n,r),e.refine=(n,r)=>e.check(E7e(n,r)),e.superRefine=n=>e.check(_7e(n)),e.overwrite=n=>e.check(Md(n)),e.optional=()=>wZ(e),e.exactOptional=()=>d7e(e),e.nullable=()=>xZ(e),e.nullish=()=>wZ(xZ(e)),e.nonoptional=n=>v7e(e,n),e.array=()=>t7e(e),e.or=n=>o7e([e,n]),e.and=n=>a7e(e,n),e.transform=n=>CZ(e,c7e(n)),e.default=n=>h7e(e,n),e.prefault=n=>m7e(e,n),e.catch=n=>b7e(e,n),e.pipe=n=>CZ(e,n),e.readonly=()=>S7e(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)),pZ=he("_ZodString",(e,t)=>{FP.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Uze(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(Oze(...r)),e.includes=(...r)=>e.check(Tze(...r)),e.startsWith=(...r)=>e.check(Mze(...r)),e.endsWith=(...r)=>e.check(Nze(...r)),e.min=(...r)=>e.check(Gb(...r)),e.max=(...r)=>e.check(sZ(...r)),e.length=(...r)=>e.check(lZ(...r)),e.nonempty=(...r)=>e.check(Gb(1,...r)),e.lowercase=r=>e.check(Pze(r)),e.uppercase=r=>e.check(Aze(r)),e.trim=()=>e.check($ze()),e.normalize=(...r)=>e.check(Dze(...r)),e.toLowerCase=()=>e.check(Ize()),e.toUpperCase=()=>e.check(Fze()),e.slugify=()=>e.check(Lze())}),Aje=he("ZodString",(e,t)=>{FP.init(e,t),pZ.init(e,t),e.email=n=>e.check(X8e(Tje,n)),e.url=n=>e.check(nze(Mje,n)),e.jwt=n=>e.check(vze(Wje,n)),e.emoji=n=>e.check(rze(Nje,n)),e.guid=n=>e.check(rZ(hZ,n)),e.uuid=n=>e.check(Q8e(Zb,n)),e.uuidv4=n=>e.check(J8e(Zb,n)),e.uuidv6=n=>e.check(eze(Zb,n)),e.uuidv7=n=>e.check(tze(Zb,n)),e.nanoid=n=>e.check(oze(Dje,n)),e.guid=n=>e.check(rZ(hZ,n)),e.cuid=n=>e.check(ize($je,n)),e.cuid2=n=>e.check(aze(Ije,n)),e.ulid=n=>e.check(sze(Fje,n)),e.base64=n=>e.check(hze(qje,n)),e.base64url=n=>e.check(gze(Uje,n)),e.xid=n=>e.check(lze(Lje,n)),e.ksuid=n=>e.check(cze(zje,n)),e.ipv4=n=>e.check(uze(jje,n)),e.ipv6=n=>e.check(dze(Rje,n)),e.cidrv4=n=>e.check(fze(Bje,n)),e.cidrv6=n=>e.check(pze(Vje,n)),e.e164=n=>e.check(mze(Hje,n)),e.datetime=n=>e.check(uje(n)),e.date=n=>e.check(fje(n)),e.time=n=>e.check(hje(n)),e.duration=n=>e.check(mje(n))});function Nd(e){return Z8e(Aje,e)}const yn=he("ZodStringFormat",(e,t)=>{cn.init(e,t),pZ.init(e,t)}),Tje=he("ZodEmail",(e,t)=>{i8e.init(e,t),yn.init(e,t)}),hZ=he("ZodGUID",(e,t)=>{r8e.init(e,t),yn.init(e,t)}),Zb=he("ZodUUID",(e,t)=>{o8e.init(e,t),yn.init(e,t)}),Mje=he("ZodURL",(e,t)=>{a8e.init(e,t),yn.init(e,t)}),Nje=he("ZodEmoji",(e,t)=>{s8e.init(e,t),yn.init(e,t)}),Dje=he("ZodNanoID",(e,t)=>{l8e.init(e,t),yn.init(e,t)}),$je=he("ZodCUID",(e,t)=>{c8e.init(e,t),yn.init(e,t)}),Ije=he("ZodCUID2",(e,t)=>{u8e.init(e,t),yn.init(e,t)}),Fje=he("ZodULID",(e,t)=>{d8e.init(e,t),yn.init(e,t)}),Lje=he("ZodXID",(e,t)=>{f8e.init(e,t),yn.init(e,t)}),zje=he("ZodKSUID",(e,t)=>{p8e.init(e,t),yn.init(e,t)}),jje=he("ZodIPv4",(e,t)=>{y8e.init(e,t),yn.init(e,t)}),Rje=he("ZodIPv6",(e,t)=>{b8e.init(e,t),yn.init(e,t)}),Bje=he("ZodCIDRv4",(e,t)=>{w8e.init(e,t),yn.init(e,t)}),Vje=he("ZodCIDRv6",(e,t)=>{x8e.init(e,t),yn.init(e,t)}),qje=he("ZodBase64",(e,t)=>{S8e.init(e,t),yn.init(e,t)}),Uje=he("ZodBase64URL",(e,t)=>{E8e.init(e,t),yn.init(e,t)}),Hje=he("ZodE164",(e,t)=>{_8e.init(e,t),yn.init(e,t)}),Wje=he("ZodJWT",(e,t)=>{O8e.init(e,t),yn.init(e,t)}),gZ=he("ZodNumber",(e,t)=>{UY.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Hze(e,r,o),e.gt=(r,o)=>e.check(iZ(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(oZ(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(mZ(r)),e.safe=r=>e.check(mZ(r)),e.positive=r=>e.check(iZ(0,r)),e.nonnegative=r=>e.check(jP(0,r)),e.negative=r=>e.check(oZ(0,r)),e.nonpositive=r=>e.check(zP(0,r)),e.multipleOf=(r,o)=>e.check(aZ(r,o)),e.step=(r,o)=>e.check(aZ(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 Kje(e){return Sze(gZ,e)}const Gje=he("ZodNumberFormat",(e,t)=>{P8e.init(e,t),gZ.init(e,t)});function mZ(e){return Cze(Gje,e)}const Yje=he("ZodAny",(e,t)=>{A8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kze()});function Zje(){return Eze(Yje)}const Xje=he("ZodUnknown",(e,t)=>{T8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Gze()});function vZ(){return _ze(Xje)}const Qje=he("ZodNever",(e,t)=>{M8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wze(e,n,r)});function Jje(e){return kze(Qje,e)}const e7e=he("ZodArray",(e,t)=>{N8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qze(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(sZ(n,r)),e.length=(n,r)=>e.check(lZ(n,r)),e.unwrap=()=>e.element});function t7e(e,t){return zze(e7e,e,t)}const n7e=he("ZodObject",(e,t)=>{$8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jze(e,n,r,o),It(e,"shape",()=>t.shape),e.keyof=()=>s7e(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:vZ()}),e.loose=()=>e.clone({...e._zod.def,catchall:vZ()}),e.strict=()=>e.clone({...e._zod.def,catchall:Jje()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>t6e(e,n),e.safeExtend=n=>n6e(e,n),e.merge=n=>r6e(e,n),e.pick=n=>JLe(e,n),e.omit=n=>e6e(e,n),e.partial=(...n)=>o6e(bZ,e,n[0]),e.required=(...n)=>i6e(SZ,e,n[0])});function yZ(e,t){const n={type:"object",shape:e??{},...et(t)};return new n7e(n)}const r7e=he("ZodUnion",(e,t)=>{I8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eje(e,n,r,o),e.options=t.options});function o7e(e,t){return new r7e({type:"union",options:e,...et(t)})}const i7e=he("ZodIntersection",(e,t)=>{F8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tje(e,n,r,o)});function a7e(e,t){return new i7e({type:"intersection",left:e,right:t})}const RP=he("ZodEnum",(e,t)=>{L8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Yze(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 s7e(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 l7e=he("ZodTransform",(e,t)=>{z8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xze(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new _Y(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 c7e(e){return new l7e({type:"transform",transform:e})}const bZ=he("ZodOptional",(e,t)=>{XY.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fZ(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function wZ(e){return new bZ({type:"optional",innerType:e})}const u7e=he("ZodExactOptional",(e,t)=>{j8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fZ(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function d7e(e){return new u7e({type:"optional",innerType:e})}const f7e=he("ZodNullable",(e,t)=>{R8e.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 xZ(e){return new f7e({type:"nullable",innerType:e})}const p7e=he("ZodDefault",(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,e.removeDefault=e.unwrap});function h7e(e,t){return new p7e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():MY(t)}})}const g7e=he("ZodPrefault",(e,t)=>{V8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ije(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function m7e(e,t){return new g7e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():MY(t)}})}const SZ=he("ZodNonOptional",(e,t)=>{q8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function v7e(e,t){return new SZ({type:"nonoptional",innerType:e,...et(t)})}const y7e=he("ZodCatch",(e,t)=>{U8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>aje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function b7e(e,t){return new y7e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const w7e=he("ZodPipe",(e,t)=>{H8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>sje(e,n,r,o),e.in=t.in,e.out=t.out});function CZ(e,t){return new w7e({type:"pipe",in:e,out:t})}const x7e=he("ZodReadonly",(e,t)=>{W8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function S7e(e){return new x7e({type:"readonly",innerType:e})}const C7e=he("ZodCustom",(e,t)=>{K8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zze(e,n)});function E7e(e,t={}){return jze(C7e,e,t)}function _7e(e){return Rze(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 k7e=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}));k7e.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 O7e=y.forwardRef(({className:e,...t},n)=>g.jsx("caption",{ref:n,className:U("mt-4 text-sm text-muted-foreground",e),...t}));O7e.displayName="TableCaption";const P7e=yZ({id:Kje(),header:Nd(),type:Nd(),status:Nd(),target:Nd(),limit:Nd(),reviewer:Nd()});function A7e({id:e}){const{attributes:t,listeners:n}=lY({id:e});return g.jsxs(mt,{...t,...n,variant:"ghost",size:"icon",className:"size-7 text-muted-foreground hover:bg-transparent",children:[g.jsx(Rue,{className:"size-3 text-muted-foreground"}),g.jsx("span",{className:"sr-only",children:"Drag to reorder"})]})}const EZ=[{id:"drag",header:()=>null,cell:({row:e})=>g.jsx(A7e,{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($7e,{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(Aue,{className:"text-green-500 dark:text-green-400"}):g.jsx(Uue,{}),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(),yK.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(),yK.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 T7e({row:e}){const{transform:t,transition:n,setNodeRef:r,isDragging:o}=lY({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 M7e({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=j4e(tP(WG,{}),tP(KG,{}),tP(sP,{})),v=y.useMemo(()=>(n==null?void 0:n.map(({id:S})=>S))||[],[n]),b=EY({data:n,columns:EZ,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:wY(),getFilteredRowModel:SY(),getPaginationRowModel:CY(),getSortedRowModel:qLe(),getFacetedRowModel:BLe(),getFacetedUniqueValues:VLe()});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(BK,{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(Nue,{}),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(BFe,{collisionDetection:U4e,modifiers:[YFe],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(tLe,{items:v,strategy:JFe,children:b.getRowModel().rows.map(S=>g.jsx(T7e,{row:S},S.id))}):g.jsx(os,{children:g.jsx(Dd,{colSpan:EZ.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(_ue,{})]}),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(kue,{})]})]})]})]})]}),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 N7e=[{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}],D7e={desktop:{label:"Desktop",color:"var(--primary)"},mobile:{label:"Mobile",color:"var(--primary)"}};function $7e({item:e}){const t=pb();return g.jsxs(Rh,{children:[g.jsx(jq,{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:D7e,children:g.jsxs(V7,{accessibilityLayer:!0,data:N7e,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(ede,{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(Rq,{asChild:!0,children:g.jsx(mt,{variant:"outline",className:"w-full",children:"Done"})})]})]})]})}const I7e=({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"})]})]})]})]}),_Z=({className:e,...t})=>g.jsx("nav",{role:"navigation","aria-label":"pagination",className:U("mx-auto flex w-full justify-center",e),...t});_Z.displayName="Pagination";const kZ=y.forwardRef(({className:e,...t},n)=>g.jsx("ul",{ref:n,className:U("flex flex-row items-center gap-1",e),...t}));kZ.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 OZ=({className:e,...t})=>g.jsxs($d,{"aria-label":"Go to previous page",size:"default",className:U("gap-1 pl-2.5",e),...t,children:[g.jsx(bu,{className:"h-4 w-4"}),g.jsx("span",{children:"Previous"})]});OZ.displayName="PaginationPrevious";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",{children:"Next"}),g.jsx(Oa,{className:"h-4 w-4"})]});PZ.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 AZ=({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"})]});AZ.displayName="PaginationNextLast";const TZ=({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"})]});TZ.displayName="PaginationPreviousLast";const F7e=({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(_Z,{children:g.jsxs(kZ,{children:[g.jsxs(tw,{children:[g.jsx(TZ,{onClick:u}),g.jsx(OZ,{onClick:c})]}),f(),g.jsxs(tw,{children:[g.jsx(PZ,{onClick:l}),g.jsx(AZ,{onClick:d})]})]})})})},L7e=({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=EY({data:t,columns:e,pageCount:n??-1,getCoreRowModel:wY(),getFilteredRowModel:SY(),state:{pagination:{pageIndex:p,pageSize:h}},onPaginationChange:m,getPaginationRowModel:CY(),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(mte,{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(yte,{className:"h-4 w-4","aria-hidden":"true"})})]})]})]})]})};function z7e({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 j7e={position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.5)",zIndex:9999};function MZ({show:e,className:t}){return e?g.jsx("div",{style:j7e,className:t}):null}function NZ({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 R7e({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 B7e({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 V7e({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(Wue,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})})}function q7e({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(jue,{}),g.jsx("span",{children:"Open"})]}),g.jsxs(wr,{children:[g.jsx(Xue,{}),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 DZ=({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"})]})]})},U7e=({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(U7e,{item:r,setOpen:t},r.href))}):null,H7e=({navItems:e,logoText:t="Logo",logoHref:n="/",children:r})=>g.jsx("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:r??g.jsxs(g.Fragment,{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 W7e({navMain:e=[],navSecondary:t=[],user:n,onLogout:r,logoText:o="ACS Tracking",logoHref:i="#",logoIcon:a=Pue,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(Fue,{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 K7e=({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 G7e({children:e,customSidebar:t,useCustomSidebar:n=!1,sidebarProps:r,headerProps:o,defaultOpen:i=!0,className:a}){const{showOverlay:s}=JN();return g.jsxs(mO,{defaultOpen:i,children:[n&&t?t:g.jsx(W7e,{...r}),g.jsxs(yO,{children:[g.jsx(NZ,{...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(MZ,{show:s})]})]})]})}const Y7e=({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"})]})}),Z7e=({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")}),X7e=({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)})]})},$Z=({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(Cue,{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"})]})]})]})})},Q7e=({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)??oM(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)??oM(new Date).toISOString().split("T")[0]),[l,c]=E.useState(()=>r.get(n)??Ef(new Date,3).toISOString().split("T")[0]);return g.jsx($Z,{startDate:new Date(a+"T00:00"),endDate:new Date(l+"T00:00"),onChange:i,className:`pt-0 ${e}`})};function J7e(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 e9e(e,t){return e===t}function t9e(e,t,n){var r=e9e,o=E.useRef(e),i=E.useState({})[1],a=J7e(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 n9e=({placeholder:e,className:t})=>{const[n,r]=xn.useSearchParams(),o=n.get("search")||"",[i,a]=E.useState(o),[s]=t9e(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)})},IZ=({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})]}),r9e=({title:e="Kutubi"})=>g.jsx(Eae,{children:g.jsxs("title",{children:[" ",e," "]})}),FZ=({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(Jue,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),g.jsx(OI,{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"})]})]}),o9e=({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(IZ,{title:e}),g.jsxs("div",{className:"ml-4 flex items-center md:ml-6",children:[g.jsx(DZ,{user:n,onLogout:t}),g.jsx(FZ,{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()})]})]}),LZ=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ie(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},zZ=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?LZ(r.ref,n,e):r.refs&&r.refs.forEach(o=>LZ(o,n,e))}},i9e=(e,t)=>{t.shouldUseNativeValidation&&zZ(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(a9e(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},a9e=(e,t)=>e.some(n=>n.startsWith(t+"."));var s9e=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]=uV(a,t,n,o,c?[].concat(c,r.message):r.message)}e.shift()}return n},l9e=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&&zZ({},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:i9e(s9e(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};function c9e(){const{pathname:e}=xn.useLocation();return E.useMemo(()=>e,[e])}function jZ(){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 RZ({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 u9e(e){const t={};return Object.keys(e||{}).forEach(n=>{t[n]=Zje()}),yZ(t)}function d9e(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 f9e({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=jZ(),{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]=WD(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??u9e(e||{}),R=PV({defaultValues:E.useMemo(()=>e||void 0,[e]),resolver:l9e(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?d9e(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(MN,{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(Oue,{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(RZ,{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 BZ=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})]})});BZ.displayName="FileUploadButton";function p9e({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(_I,{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 h9e=y.forwardRef(p9e);function g9e({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 m9e=E.forwardRef(g9e);function v9e(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 y9e({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?v9e(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(CT,{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 b9e=y.forwardRef(y9e);function w9e({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 x9e({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 S9e=E.forwardRef(x9e);function C9e({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 E9e=E.forwardRef(C9e);function VZ(e){return/^\d{1,}$/.test(e)}function _9e({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&&VZ(v)&&Number(v)!==Number(c)&&u(Number(v)),b&&VZ(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 k9e=E.forwardRef(_9e);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 dZ(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 Vze=(e,t={})=>n=>{const r=cZ({...n,processors:t});return dr(e,r),uZ(r,e),dZ(r,e)},Yb=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},a=cZ({...o??{},target:i,io:t,processors:n});return dr(e,a),uZ(a,e),dZ(a,e)},qze={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Uze=(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=qze[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}))])}},Hze=(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)},Wze=(e,t,n,r)=>{n.not={}},Kze=(e,t,n,r)=>{},Gze=(e,t,n,r)=>{},Yze=(e,t,n,r)=>{const o=e._zod.def,i=OY(o.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Zze=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Xze=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Qze=(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"]})},Jze=(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)},eje=(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},tje=(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},nje=(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"}]},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},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,n.default=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,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},aje=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},sje=(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},lje=(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},fZ=(e,t,n,r)=>{const o=e._zod.def;dr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},cje=he("ZodISODateTime",(e,t)=>{h8e.init(e,t),yn.init(e,t)});function uje(e){return yze(cje,e)}const dje=he("ZodISODate",(e,t)=>{g8e.init(e,t),yn.init(e,t)});function fje(e){return bze(dje,e)}const pje=he("ZodISOTime",(e,t)=>{m8e.init(e,t),yn.init(e,t)});function hje(e){return wze(pje,e)}const gje=he("ZodISODuration",(e,t)=>{v8e.init(e,t),yn.init(e,t)});function mje(e){return xze(gje,e)}const Bo=he("ZodError",(e,t)=>{$Y.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>s6e(e,n)},flatten:{value:n=>a6e(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}),vje=$P(Bo),yje=IP(Bo),bje=qb(Bo),wje=Ub(Bo),xje=u6e(Bo),Sje=d6e(Bo),Cje=f6e(Bo),Eje=p6e(Bo),_je=h6e(Bo),kje=g6e(Bo),Oje=m6e(Bo),Pje=v6e(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=Vze(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)=>vje(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>bje(e,n,r),e.parseAsync=async(n,r)=>yje(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>wje(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>xje(e,n,r),e.decode=(n,r)=>Sje(e,n,r),e.encodeAsync=async(n,r)=>Cje(e,n,r),e.decodeAsync=async(n,r)=>Eje(e,n,r),e.safeEncode=(n,r)=>_je(e,n,r),e.safeDecode=(n,r)=>kje(e,n,r),e.safeEncodeAsync=async(n,r)=>Oje(e,n,r),e.safeDecodeAsync=async(n,r)=>Pje(e,n,r),e.refine=(n,r)=>e.check(E7e(n,r)),e.superRefine=n=>e.check(_7e(n)),e.overwrite=n=>e.check(Md(n)),e.optional=()=>wZ(e),e.exactOptional=()=>d7e(e),e.nullable=()=>xZ(e),e.nullish=()=>wZ(xZ(e)),e.nonoptional=n=>v7e(e,n),e.array=()=>t7e(e),e.or=n=>o7e([e,n]),e.and=n=>a7e(e,n),e.transform=n=>CZ(e,c7e(n)),e.default=n=>h7e(e,n),e.prefault=n=>m7e(e,n),e.catch=n=>b7e(e,n),e.pipe=n=>CZ(e,n),e.readonly=()=>S7e(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)),pZ=he("_ZodString",(e,t)=>{FP.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Uze(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(Oze(...r)),e.includes=(...r)=>e.check(Tze(...r)),e.startsWith=(...r)=>e.check(Mze(...r)),e.endsWith=(...r)=>e.check(Nze(...r)),e.min=(...r)=>e.check(Gb(...r)),e.max=(...r)=>e.check(sZ(...r)),e.length=(...r)=>e.check(lZ(...r)),e.nonempty=(...r)=>e.check(Gb(1,...r)),e.lowercase=r=>e.check(Pze(r)),e.uppercase=r=>e.check(Aze(r)),e.trim=()=>e.check($ze()),e.normalize=(...r)=>e.check(Dze(...r)),e.toLowerCase=()=>e.check(Ize()),e.toUpperCase=()=>e.check(Fze()),e.slugify=()=>e.check(Lze())}),Aje=he("ZodString",(e,t)=>{FP.init(e,t),pZ.init(e,t),e.email=n=>e.check(X8e(Tje,n)),e.url=n=>e.check(nze(Mje,n)),e.jwt=n=>e.check(vze(Wje,n)),e.emoji=n=>e.check(rze(Nje,n)),e.guid=n=>e.check(rZ(hZ,n)),e.uuid=n=>e.check(Q8e(Zb,n)),e.uuidv4=n=>e.check(J8e(Zb,n)),e.uuidv6=n=>e.check(eze(Zb,n)),e.uuidv7=n=>e.check(tze(Zb,n)),e.nanoid=n=>e.check(oze(Dje,n)),e.guid=n=>e.check(rZ(hZ,n)),e.cuid=n=>e.check(ize($je,n)),e.cuid2=n=>e.check(aze(Ije,n)),e.ulid=n=>e.check(sze(Fje,n)),e.base64=n=>e.check(hze(qje,n)),e.base64url=n=>e.check(gze(Uje,n)),e.xid=n=>e.check(lze(Lje,n)),e.ksuid=n=>e.check(cze(zje,n)),e.ipv4=n=>e.check(uze(jje,n)),e.ipv6=n=>e.check(dze(Rje,n)),e.cidrv4=n=>e.check(fze(Bje,n)),e.cidrv6=n=>e.check(pze(Vje,n)),e.e164=n=>e.check(mze(Hje,n)),e.datetime=n=>e.check(uje(n)),e.date=n=>e.check(fje(n)),e.time=n=>e.check(hje(n)),e.duration=n=>e.check(mje(n))});function Nd(e){return Z8e(Aje,e)}const yn=he("ZodStringFormat",(e,t)=>{cn.init(e,t),pZ.init(e,t)}),Tje=he("ZodEmail",(e,t)=>{i8e.init(e,t),yn.init(e,t)}),hZ=he("ZodGUID",(e,t)=>{r8e.init(e,t),yn.init(e,t)}),Zb=he("ZodUUID",(e,t)=>{o8e.init(e,t),yn.init(e,t)}),Mje=he("ZodURL",(e,t)=>{a8e.init(e,t),yn.init(e,t)}),Nje=he("ZodEmoji",(e,t)=>{s8e.init(e,t),yn.init(e,t)}),Dje=he("ZodNanoID",(e,t)=>{l8e.init(e,t),yn.init(e,t)}),$je=he("ZodCUID",(e,t)=>{c8e.init(e,t),yn.init(e,t)}),Ije=he("ZodCUID2",(e,t)=>{u8e.init(e,t),yn.init(e,t)}),Fje=he("ZodULID",(e,t)=>{d8e.init(e,t),yn.init(e,t)}),Lje=he("ZodXID",(e,t)=>{f8e.init(e,t),yn.init(e,t)}),zje=he("ZodKSUID",(e,t)=>{p8e.init(e,t),yn.init(e,t)}),jje=he("ZodIPv4",(e,t)=>{y8e.init(e,t),yn.init(e,t)}),Rje=he("ZodIPv6",(e,t)=>{b8e.init(e,t),yn.init(e,t)}),Bje=he("ZodCIDRv4",(e,t)=>{w8e.init(e,t),yn.init(e,t)}),Vje=he("ZodCIDRv6",(e,t)=>{x8e.init(e,t),yn.init(e,t)}),qje=he("ZodBase64",(e,t)=>{S8e.init(e,t),yn.init(e,t)}),Uje=he("ZodBase64URL",(e,t)=>{E8e.init(e,t),yn.init(e,t)}),Hje=he("ZodE164",(e,t)=>{_8e.init(e,t),yn.init(e,t)}),Wje=he("ZodJWT",(e,t)=>{O8e.init(e,t),yn.init(e,t)}),gZ=he("ZodNumber",(e,t)=>{UY.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Hze(e,r,o),e.gt=(r,o)=>e.check(iZ(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(oZ(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(mZ(r)),e.safe=r=>e.check(mZ(r)),e.positive=r=>e.check(iZ(0,r)),e.nonnegative=r=>e.check(jP(0,r)),e.negative=r=>e.check(oZ(0,r)),e.nonpositive=r=>e.check(zP(0,r)),e.multipleOf=(r,o)=>e.check(aZ(r,o)),e.step=(r,o)=>e.check(aZ(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 Kje(e){return Sze(gZ,e)}const Gje=he("ZodNumberFormat",(e,t)=>{P8e.init(e,t),gZ.init(e,t)});function mZ(e){return Cze(Gje,e)}const Yje=he("ZodAny",(e,t)=>{A8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kze()});function Zje(){return Eze(Yje)}const Xje=he("ZodUnknown",(e,t)=>{T8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Gze()});function vZ(){return _ze(Xje)}const Qje=he("ZodNever",(e,t)=>{M8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wze(e,n,r)});function Jje(e){return kze(Qje,e)}const e7e=he("ZodArray",(e,t)=>{N8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qze(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(sZ(n,r)),e.length=(n,r)=>e.check(lZ(n,r)),e.unwrap=()=>e.element});function t7e(e,t){return zze(e7e,e,t)}const n7e=he("ZodObject",(e,t)=>{$8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jze(e,n,r,o),It(e,"shape",()=>t.shape),e.keyof=()=>s7e(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:vZ()}),e.loose=()=>e.clone({...e._zod.def,catchall:vZ()}),e.strict=()=>e.clone({...e._zod.def,catchall:Jje()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>t6e(e,n),e.safeExtend=n=>n6e(e,n),e.merge=n=>r6e(e,n),e.pick=n=>JLe(e,n),e.omit=n=>e6e(e,n),e.partial=(...n)=>o6e(bZ,e,n[0]),e.required=(...n)=>i6e(SZ,e,n[0])});function yZ(e,t){const n={type:"object",shape:e??{},...et(t)};return new n7e(n)}const r7e=he("ZodUnion",(e,t)=>{I8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eje(e,n,r,o),e.options=t.options});function o7e(e,t){return new r7e({type:"union",options:e,...et(t)})}const i7e=he("ZodIntersection",(e,t)=>{F8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tje(e,n,r,o)});function a7e(e,t){return new i7e({type:"intersection",left:e,right:t})}const RP=he("ZodEnum",(e,t)=>{L8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Yze(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 s7e(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 l7e=he("ZodTransform",(e,t)=>{z8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xze(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new _Y(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 c7e(e){return new l7e({type:"transform",transform:e})}const bZ=he("ZodOptional",(e,t)=>{XY.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fZ(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function wZ(e){return new bZ({type:"optional",innerType:e})}const u7e=he("ZodExactOptional",(e,t)=>{j8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fZ(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function d7e(e){return new u7e({type:"optional",innerType:e})}const f7e=he("ZodNullable",(e,t)=>{R8e.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 xZ(e){return new f7e({type:"nullable",innerType:e})}const p7e=he("ZodDefault",(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,e.removeDefault=e.unwrap});function h7e(e,t){return new p7e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():MY(t)}})}const g7e=he("ZodPrefault",(e,t)=>{V8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ije(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function m7e(e,t){return new g7e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():MY(t)}})}const SZ=he("ZodNonOptional",(e,t)=>{q8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function v7e(e,t){return new SZ({type:"nonoptional",innerType:e,...et(t)})}const y7e=he("ZodCatch",(e,t)=>{U8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>aje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function b7e(e,t){return new y7e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const w7e=he("ZodPipe",(e,t)=>{H8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>sje(e,n,r,o),e.in=t.in,e.out=t.out});function CZ(e,t){return new w7e({type:"pipe",in:e,out:t})}const x7e=he("ZodReadonly",(e,t)=>{W8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lje(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function S7e(e){return new x7e({type:"readonly",innerType:e})}const C7e=he("ZodCustom",(e,t)=>{K8e.init(e,t),On.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zze(e,n)});function E7e(e,t={}){return jze(C7e,e,t)}function _7e(e){return Rze(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 k7e=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}));k7e.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 O7e=y.forwardRef(({className:e,...t},n)=>g.jsx("caption",{ref:n,className:U("mt-4 text-sm text-muted-foreground",e),...t}));O7e.displayName="TableCaption";const P7e=yZ({id:Kje(),header:Nd(),type:Nd(),status:Nd(),target:Nd(),limit:Nd(),reviewer:Nd()});function A7e({id:e}){const{attributes:t,listeners:n}=lY({id:e});return g.jsxs(mt,{...t,...n,variant:"ghost",size:"icon",className:"size-7 text-muted-foreground hover:bg-transparent",children:[g.jsx(Rue,{className:"size-3 text-muted-foreground"}),g.jsx("span",{className:"sr-only",children:"Drag to reorder"})]})}const EZ=[{id:"drag",header:()=>null,cell:({row:e})=>g.jsx(A7e,{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($7e,{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(Aue,{className:"text-green-500 dark:text-green-400"}):g.jsx(Uue,{}),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(),yK.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(),yK.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 T7e({row:e}){const{transform:t,transition:n,setNodeRef:r,isDragging:o}=lY({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 M7e({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=j4e(tP(WG,{}),tP(KG,{}),tP(sP,{})),v=y.useMemo(()=>(n==null?void 0:n.map(({id:S})=>S))||[],[n]),b=EY({data:n,columns:EZ,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:wY(),getFilteredRowModel:SY(),getPaginationRowModel:CY(),getSortedRowModel:qLe(),getFacetedRowModel:BLe(),getFacetedUniqueValues:VLe()});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(BK,{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(Nue,{}),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(BFe,{collisionDetection:U4e,modifiers:[YFe],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(tLe,{items:v,strategy:JFe,children:b.getRowModel().rows.map(S=>g.jsx(T7e,{row:S},S.id))}):g.jsx(os,{children:g.jsx(Dd,{colSpan:EZ.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(_ue,{})]}),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(kue,{})]})]})]})]})]}),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 N7e=[{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}],D7e={desktop:{label:"Desktop",color:"var(--primary)"},mobile:{label:"Mobile",color:"var(--primary)"}};function $7e({item:e}){const t=pb();return g.jsxs(Rh,{children:[g.jsx(jq,{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:D7e,children:g.jsxs(V7,{accessibilityLayer:!0,data:N7e,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(ede,{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(Rq,{asChild:!0,children:g.jsx(mt,{variant:"outline",className:"w-full",children:"Done"})})]})]})]})}const I7e=({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"})]})]})]})]}),_Z=({className:e,...t})=>g.jsx("nav",{role:"navigation","aria-label":"pagination",className:U("mx-auto flex w-full justify-center",e),...t});_Z.displayName="Pagination";const kZ=y.forwardRef(({className:e,...t},n)=>g.jsx("ul",{ref:n,className:U("flex flex-row items-center gap-1",e),...t}));kZ.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 OZ=({className:e,...t})=>g.jsxs($d,{"aria-label":"Go to previous page",size:"default",className:U("gap-1 pl-2.5",e),...t,children:[g.jsx(bu,{className:"h-4 w-4"}),g.jsx("span",{children:"Previous"})]});OZ.displayName="PaginationPrevious";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",{children:"Next"}),g.jsx(Oa,{className:"h-4 w-4"})]});PZ.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 AZ=({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"})]});AZ.displayName="PaginationNextLast";const TZ=({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"})]});TZ.displayName="PaginationPreviousLast";const F7e=({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(_Z,{children:g.jsxs(kZ,{children:[g.jsxs(tw,{children:[g.jsx(TZ,{onClick:u}),g.jsx(OZ,{onClick:c})]}),f(),g.jsxs(tw,{children:[g.jsx(PZ,{onClick:l}),g.jsx(AZ,{onClick:d})]})]})})})},L7e=({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=EY({data:t,columns:e,pageCount:n??-1,getCoreRowModel:wY(),getFilteredRowModel:SY(),state:{pagination:{pageIndex:p,pageSize:h}},onPaginationChange:m,getPaginationRowModel:CY(),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(mte,{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(yte,{className:"h-4 w-4","aria-hidden":"true"})})]})]})]})]})};function z7e({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 j7e={position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.5)",zIndex:9999};function MZ({show:e,className:t}){return e?g.jsx("div",{style:j7e,className:t}):null}function NZ({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 R7e({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 B7e({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 V7e({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(Wue,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})})}function q7e({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(jue,{}),g.jsx("span",{children:"Open"})]}),g.jsxs(wr,{children:[g.jsx(Xue,{}),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 DZ=({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"})]})]})},U7e=({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(U7e,{item:r,setOpen:t},r.href))}):null,H7e=({navItems:e,logoText:t="Logo",logoHref:n="/",children:r})=>g.jsx("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:r??g.jsxs(g.Fragment,{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 W7e({navMain:e=[],navSecondary:t=[],user:n,onLogout:r,logoText:o="ACS Tracking",logoHref:i="#",logoIcon:a=Pue,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(Fue,{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 K7e=({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 G7e({children:e,customSidebar:t,useCustomSidebar:n=!1,sidebarProps:r,headerProps:o,defaultOpen:i=!0,className:a}){const{showOverlay:s}=JN();return g.jsxs(mO,{defaultOpen:i,children:[n&&t?t:g.jsx(W7e,{...r}),g.jsx(yO,{className:a,children:g.jsxs("div",{className:U("flex flex-1 flex-col gap-4 p-4 md:gap-6 md:p-6"),children:[g.jsx(NZ,{...o}),e,g.jsx(MZ,{show:s})]})})]})}const Y7e=({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"})]})}),Z7e=({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")}),X7e=({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)})]})},$Z=({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(Cue,{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"})]})]})]})})},Q7e=({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)??oM(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)??oM(new Date).toISOString().split("T")[0]),[l,c]=E.useState(()=>r.get(n)??Ef(new Date,3).toISOString().split("T")[0]);return g.jsx($Z,{startDate:new Date(a+"T00:00"),endDate:new Date(l+"T00:00"),onChange:i,className:`pt-0 ${e}`})};function J7e(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 e9e(e,t){return e===t}function t9e(e,t,n){var r=e9e,o=E.useRef(e),i=E.useState({})[1],a=J7e(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 n9e=({placeholder:e,className:t})=>{const[n,r]=xn.useSearchParams(),o=n.get("search")||"",[i,a]=E.useState(o),[s]=t9e(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)})},IZ=({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})]}),r9e=({title:e="Kutubi"})=>g.jsx(Eae,{children:g.jsxs("title",{children:[" ",e," "]})}),FZ=({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(Jue,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),g.jsx(OI,{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"})]})]}),o9e=({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(IZ,{title:e}),g.jsxs("div",{className:"ml-4 flex items-center md:ml-6",children:[g.jsx(DZ,{user:n,onLogout:t}),g.jsx(FZ,{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()})]})]}),LZ=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ie(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},zZ=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?LZ(r.ref,n,e):r.refs&&r.refs.forEach(o=>LZ(o,n,e))}},i9e=(e,t)=>{t.shouldUseNativeValidation&&zZ(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(a9e(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},a9e=(e,t)=>e.some(n=>n.startsWith(t+"."));var s9e=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]=uV(a,t,n,o,c?[].concat(c,r.message):r.message)}e.shift()}return n},l9e=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&&zZ({},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:i9e(s9e(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};function c9e(){const{pathname:e}=xn.useLocation();return E.useMemo(()=>e,[e])}function jZ(){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 RZ({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 u9e(e){const t={};return Object.keys(e||{}).forEach(n=>{t[n]=Zje()}),yZ(t)}function d9e(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 f9e({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=jZ(),{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]=WD(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??u9e(e||{}),R=PV({defaultValues:E.useMemo(()=>e||void 0,[e]),resolver:l9e(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?d9e(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(MN,{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(Oue,{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(RZ,{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 BZ=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})]})});BZ.displayName="FileUploadButton";function p9e({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(_I,{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 h9e=y.forwardRef(p9e);function g9e({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 m9e=E.forwardRef(g9e);function v9e(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 y9e({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?v9e(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(CT,{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 b9e=y.forwardRef(y9e);function w9e({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 x9e({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 S9e=E.forwardRef(x9e);function C9e({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 E9e=E.forwardRef(C9e);function VZ(e){return/^\d{1,}$/.test(e)}function _9e({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&&VZ(v)&&Number(v)!==Number(c)&&u(Number(v)),b&&VZ(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 k9e=E.forwardRef(_9e);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.
|
|
@@ -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,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,
|
|
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,2CAgBtB"}
|
package/package.json
CHANGED