@sikka/hawa 0.2.32-beta → 0.2.33-beta

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.
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../src/elements/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,SAAS,EAWT,OAAO,EAER,MAAM,uBAAuB,CAAA;AAc9B,KAAK,SAAS,GAAG,EAAE,CAAA;AACnB,KAAK,cAAc,GAAG;IACpB,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IACzB,KAAK,CAAC,EAAE;QACN,iBAAiB,CAAC,EAAE,MAAM,CAAA;QAC1B,MAAM,CAAC,EAAE,GAAG,CAAA;QACZ,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,EAAE,CAAC,EAAE,MAAM,CAAA;QACX,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACD,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,EAAE,CAAA;IAC/B,IAAI,EAAE,SAAS,EAAE,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,OAAO,uBAAuB,CAAA;AAG9B,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAChD,QAAQ,EAAE,GAAG,CAAA;KACd;CACF;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA6P9C,CAAA"}
1
+ {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../src/elements/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,SAAS,EAWT,OAAO,EAER,MAAM,uBAAuB,CAAA;AAc9B,KAAK,SAAS,GAAG,EAAE,CAAA;AACnB,KAAK,cAAc,GAAG;IACpB,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IACzB,KAAK,CAAC,EAAE;QACN,iBAAiB,CAAC,EAAE,MAAM,CAAA;QAC1B,MAAM,CAAC,EAAE,GAAG,CAAA;QACZ,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,EAAE,CAAC,EAAE,MAAM,CAAA;QACX,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACD,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,EAAE,CAAA;IAC/B,IAAI,EAAE,SAAS,EAAE,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,OAAO,uBAAuB,CAAA;AAG9B,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAChD,QAAQ,EAAE,GAAG,CAAA;KACd;CACF;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA8P9C,CAAA"}
package/dist/index.es.js CHANGED
@@ -39887,11 +39887,11 @@ const qE = Q.forwardRef(
39887
39887
  {
39888
39888
  ref: n,
39889
39889
  className: ke(
39890
- "text-start align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
39890
+ " text-start align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&:not(:last-child)&:not(:first-child)]:border-x",
39891
39891
  t.condensed ? "h-8" : "h-12",
39892
39892
  t.clickable ? "px-1" : "px-4",
39893
39893
  //First and last columns
39894
- t.clickable ? "[&:not(:last-child)&:not(:first-child)]:border-x [&:not(:last-child)&:not(:first-child)]:p-1" : "px-4",
39894
+ t.clickable ? " [&:not(:last-child)&:not(:first-child)]:p-1" : "px-4",
39895
39895
  //Columns in between
39896
39896
  e
39897
39897
  ),
@@ -42158,7 +42158,7 @@ const g_ = ({
42158
42158
  ] }) }),
42159
42159
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
42160
42160
  /* @__PURE__ */ l.jsx("div", { className: "flex w-fit flex-row items-center gap-2 text-sm text-muted-foreground" }),
42161
- /* @__PURE__ */ l.jsxs("div", { className: "flex w-fit flex-row items-center gap-2 ", children: [
42161
+ p.getPageCount() !== 0 && /* @__PURE__ */ l.jsxs("div", { className: "flex w-fit flex-row items-center gap-2 ", children: [
42162
42162
  /* @__PURE__ */ l.jsx(
42163
42163
  Zl,
42164
42164
  {
@@ -42184,7 +42184,7 @@ const g_ = ({
42184
42184
  onItemSelect: (xe) => p.setPageSize(Number(xe))
42185
42185
  }
42186
42186
  ),
42187
- /* @__PURE__ */ l.jsx("div", { className: "flex w-fit flex-row items-center gap-2 text-sm ", children: p.getPageCount() !== 0 && /* @__PURE__ */ l.jsxs("span", { className: "flex items-center gap-1", children: [
42187
+ /* @__PURE__ */ l.jsx("div", { className: "flex w-fit flex-row items-center gap-2 text-sm ", children: /* @__PURE__ */ l.jsxs("span", { className: "flex items-center gap-1", children: [
42188
42188
  /* @__PURE__ */ l.jsx("div", { children: (K = n.texts) == null ? void 0 : K.page }),
42189
42189
  /* @__PURE__ */ l.jsxs("div", { className: "flex flex-row gap-1", children: [
42190
42190
  /* @__PURE__ */ l.jsx("span", { className: "font-bold", children: p.getState().pagination.pageIndex + 1 }),
package/dist/index.umd.js CHANGED
@@ -227,7 +227,7 @@ Error generating stack: `+B.message+`
227
227
  Defaulting to \`${cm}\`.`}function bw(e){return YN.includes(e)}const xw=vw,yw=q.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>l.jsx(xw,{ref:o,decorative:n,orientation:t,className:Pe("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));yw.displayName=xw.displayName;const Cw="ToastProvider",[dm,KN,QN]=bd("Toast"),[ww,S_]=cr("Toast",[QN]),[qN,mf]=ww(Cw),Ew=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:i}=e,[s,u]=p.useState(null),[c,d]=p.useState(0),g=p.useRef(!1),v=p.useRef(!1);return p.createElement(dm.Provider,{scope:t},p.createElement(qN,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:a,toastCount:c,viewport:s,onViewportChange:u,onToastAdd:p.useCallback(()=>d(y=>y+1),[]),onToastRemove:p.useCallback(()=>d(y=>y-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:v},i))};Ew.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${Cw}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const eO="ToastViewport",tO=["F8"],fm="toast.viewportPause",gm="toast.viewportResume",nO=p.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=tO,label:o="Notifications ({hotkey})",...a}=e,i=mf(eO,n),s=KN(n),u=p.useRef(null),c=p.useRef(null),d=p.useRef(null),g=p.useRef(null),v=Jt(t,g,i.onViewportChange),y=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),C=i.toastCount>0;p.useEffect(()=>{const w=E=>{var j;r.every(N=>E[N]||E.code===N)&&((j=g.current)===null||j===void 0||j.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),p.useEffect(()=>{const w=u.current,E=g.current;if(C&&w&&E){const j=()=>{if(!i.isClosePausedRef.current){const G=new CustomEvent(fm);E.dispatchEvent(G),i.isClosePausedRef.current=!0}},P=()=>{if(i.isClosePausedRef.current){const G=new CustomEvent(gm);E.dispatchEvent(G),i.isClosePausedRef.current=!1}},N=G=>{!w.contains(G.relatedTarget)&&P()},$=()=>{w.contains(document.activeElement)||P()};return w.addEventListener("focusin",j),w.addEventListener("focusout",N),w.addEventListener("pointermove",j),w.addEventListener("pointerleave",$),window.addEventListener("blur",j),window.addEventListener("focus",P),()=>{w.removeEventListener("focusin",j),w.removeEventListener("focusout",N),w.removeEventListener("pointermove",j),w.removeEventListener("pointerleave",$),window.removeEventListener("blur",j),window.removeEventListener("focus",P)}}},[C,i.isClosePausedRef]);const h=p.useCallback(({tabbingDirection:w})=>{const j=s().map(P=>{const N=P.ref.current,$=[N,...bO(N)];return w==="forwards"?$:$.reverse()});return(w==="forwards"?j.reverse():j).flat()},[s]);return p.useEffect(()=>{const w=g.current;if(w){const E=j=>{const P=j.altKey||j.ctrlKey||j.metaKey;if(j.key==="Tab"&&!P){const J=document.activeElement,Q=j.shiftKey;if(j.target===w&&Q){var $;($=c.current)===null||$===void 0||$.focus();return}const ne=h({tabbingDirection:Q?"backwards":"forwards"}),de=ne.findIndex(R=>R===J);if(pm(ne.slice(de+1)))j.preventDefault();else{var G,V;Q?(G=c.current)===null||G===void 0||G.focus():(V=d.current)===null||V===void 0||V.focus()}}};return w.addEventListener("keydown",E),()=>w.removeEventListener("keydown",E)}},[s,h]),p.createElement(VF,{ref:u,role:"region","aria-label":o.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:C?void 0:"none"}},C&&p.createElement(Sw,{ref:c,onFocusFromOutsideViewport:()=>{const w=h({tabbingDirection:"forwards"});pm(w)}}),p.createElement(dm.Slot,{scope:n},p.createElement(Et.ol,ye({tabIndex:-1},a,{ref:v}))),C&&p.createElement(Sw,{ref:d,onFocusFromOutsideViewport:()=>{const w=h({tabbingDirection:"backwards"});pm(w)}}))}),rO="ToastFocusProxy",Sw=p.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,a=mf(rO,n);return p.createElement(Yp,ye({"aria-hidden":!0,tabIndex:0},o,{ref:t,style:{position:"fixed"},onFocus:i=>{var s;const u=i.relatedTarget;!((s=a.viewport)!==null&&s!==void 0&&s.contains(u))&&r()}}))}),vf="Toast",oO="toast.swipeStart",aO="toast.swipeMove",iO="toast.swipeCancel",sO="toast.swipeEnd",lO=p.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:a,...i}=e,[s=!0,u]=jr({prop:r,defaultProp:o,onChange:a});return p.createElement(Kn,{present:n||s},p.createElement(Dw,ye({open:s},i,{ref:t,onClose:()=>u(!1),onPause:Jn(e.onPause),onResume:Jn(e.onResume),onSwipeStart:ot(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ot(e.onSwipeMove,c=>{const{x:d,y:g}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:ot(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ot(e.onSwipeEnd,c=>{const{x:d,y:g}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),u(!1)})})))}),[uO,cO]=ww(vf,{onClose(){}}),Dw=p.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:a,onClose:i,onEscapeKeyDown:s,onPause:u,onResume:c,onSwipeStart:d,onSwipeMove:g,onSwipeCancel:v,onSwipeEnd:y,...C}=e,h=mf(vf,n),[w,E]=p.useState(null),j=Jt(t,R=>E(R)),P=p.useRef(null),N=p.useRef(null),$=o||h.duration,G=p.useRef(0),V=p.useRef($),J=p.useRef(0),{onToastAdd:Q,onToastRemove:he}=h,xe=Jn(()=>{var R;(w==null?void 0:w.contains(document.activeElement))&&((R=h.viewport)===null||R===void 0||R.focus()),i()}),ne=p.useCallback(R=>{!R||R===1/0||(window.clearTimeout(J.current),G.current=new Date().getTime(),J.current=window.setTimeout(xe,R))},[xe]);p.useEffect(()=>{const R=h.viewport;if(R){const W=()=>{ne(V.current),c==null||c()},oe=()=>{const pe=new Date().getTime()-G.current;V.current=V.current-pe,window.clearTimeout(J.current),u==null||u()};return R.addEventListener(fm,oe),R.addEventListener(gm,W),()=>{R.removeEventListener(fm,oe),R.removeEventListener(gm,W)}}},[h.viewport,$,u,c,ne]),p.useEffect(()=>{a&&!h.isClosePausedRef.current&&ne($)},[a,$,h.isClosePausedRef,ne]),p.useEffect(()=>(Q(),()=>he()),[Q,he]);const de=p.useMemo(()=>w?Iw(w):null,[w]);return h.viewport?p.createElement(p.Fragment,null,de&&p.createElement(dO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},de),p.createElement(uO,{scope:n,onClose:xe},wo.createPortal(p.createElement(dm.ItemSlot,{scope:n},p.createElement(_F,{asChild:!0,onEscapeKeyDown:ot(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||xe(),h.isFocusedToastEscapeKeyDownRef.current=!1})},p.createElement(Et.li,ye({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":h.swipeDirection},C,{ref:j,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ot(e.onKeyDown,R=>{R.key==="Escape"&&(s==null||s(R.nativeEvent),R.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,xe()))}),onPointerDown:ot(e.onPointerDown,R=>{R.button===0&&(P.current={x:R.clientX,y:R.clientY})}),onPointerMove:ot(e.onPointerMove,R=>{if(!P.current)return;const W=R.clientX-P.current.x,oe=R.clientY-P.current.y,pe=!!N.current,se=["left","right"].includes(h.swipeDirection),Z=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,te=se?Z(0,W):0,U=se?0:Z(0,oe),K=R.pointerType==="touch"?10:2,me={x:te,y:U},H={originalEvent:R,delta:me};pe?(N.current=me,bf(aO,g,H,{discrete:!1})):Tw(me,h.swipeDirection,K)?(N.current=me,bf(oO,d,H,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(W)>K||Math.abs(oe)>K)&&(P.current=null)}),onPointerUp:ot(e.onPointerUp,R=>{const W=N.current,oe=R.target;if(oe.hasPointerCapture(R.pointerId)&&oe.releasePointerCapture(R.pointerId),N.current=null,P.current=null,W){const pe=R.currentTarget,se={originalEvent:R,delta:W};Tw(W,h.swipeDirection,h.swipeThreshold)?bf(sO,y,se,{discrete:!0}):bf(iO,v,se,{discrete:!0}),pe.addEventListener("click",Z=>Z.preventDefault(),{once:!0})}})})))),h.viewport))):null});Dw.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){const t=`Invalid prop \`type\` supplied to \`${vf}\`. Expected \`foreground | background\`.`;return new Error(t)}return null}};const dO=e=>{const{__scopeToast:t,children:n,...r}=e,o=mf(vf,t),[a,i]=p.useState(!1),[s,u]=p.useState(!1);return mO(()=>i(!0)),p.useEffect(()=>{const c=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:p.createElement(Ed,{asChild:!0},p.createElement(Yp,r,a&&p.createElement(p.Fragment,null,o.label," ",n)))},fO=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.createElement(Et.div,ye({},r,{ref:t}))}),gO=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.createElement(Et.div,ye({},r,{ref:t}))}),pO="ToastAction",Fw=p.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?p.createElement(jw,{altText:n,asChild:!0},p.createElement(Aw,ye({},r,{ref:t}))):null});Fw.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${pO}\``)}};const hO="ToastClose",Aw=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=cO(hO,n);return p.createElement(jw,{asChild:!0},p.createElement(Et.button,ye({type:"button"},r,{ref:t,onClick:ot(e.onClick,o.onClose)})))}),jw=p.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return p.createElement(Et.div,ye({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},o,{ref:t}))});function Iw(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),vO(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Iw(r))}}),t}function bf(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?$g(o,a):o.dispatchEvent(a)}const Tw=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),a=r>o;return t==="left"||t==="right"?a&&r>n:!a&&o>n};function mO(e=()=>{}){const t=Jn(e);Aa(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function vO(e){return e.nodeType===e.ELEMENT_NODE}function bO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pm(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}const xO=Ew,kw=nO,Pw=lO,Bw=fO,Nw=gO,Ow=Fw,$w=Aw,yO=Rg("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"},severity:{info:"info group text-info-foreground bg-info",warning:"warning group text-warning-foreground bg-warning",error:"error group border-error bg-error text-error-foreground",success:"success group text-success-foreground bg-success",none:""}},defaultVariants:{variant:"default"}}),Rw=xO,hm=q.forwardRef(({className:e,...t},n)=>l.jsx(kw,{ref:n,className:Pe("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));hm.displayName=kw.displayName;const mm=q.forwardRef(({className:e,variant:t,severity:n="none",direction:r,...o},a)=>l.jsx(Pw,{ref:a,className:Pe(yO({variant:t,severity:n}),e,r==="rtl"?"p-6 pl-0 pr-10 data-[state=closed]:slide-out-to-left-full":"p-6 pr-8 data-[state=closed]:slide-out-to-right-full"),dir:r,...o}));mm.displayName=Pw.displayName;const Mw=q.forwardRef(({className:e,...t},n)=>l.jsx(Ow,{ref:n,className:Pe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","group-[.info]:border-muted/40 group-[.info]:hover:border-info/30 group-[.info]:hover:bg-info group-[.info]:hover:text-info-foreground group-[.info]:focus:ring-info","group-[.error]:border-muted/40 group-[.error]:hover:border-error/30 group-[.error]:hover:bg-error group-[.error]:hover:text-error-foreground group-[.error]:focus:ring-error","group-[.success]:border-muted/40 group-[.success]:hover:border-success/30 group-[.success]:hover:bg-success group-[.success]:hover:text-success-foreground group-[.success]:focus:ring-success","group-[.warning]:border-muted/40 group-[.warning]:hover:border-warning/30 group-[.warning]:hover:bg-warning group-[.warning]:hover:text-warning-foreground group-[.warning]:focus:ring-warning",e),...t}));Mw.displayName=Ow.displayName;const vm=q.forwardRef(({className:e,...t},n)=>l.jsx($w,{ref:n,className:Pe("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:l.jsx("svg",{"aria-label":"Close Icon","aria-hidden":"true",className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}));vm.displayName=$w.displayName;const bm=q.forwardRef(({className:e,...t},n)=>l.jsx(Bw,{ref:n,className:Pe("text-sm font-semibold",e),...t}));bm.displayName=Bw.displayName;const xm=q.forwardRef(({className:e,...t},n)=>l.jsx(Nw,{ref:n,className:Pe("text-sm opacity-90",e),...t}));xm.displayName=Nw.displayName;const CO=5,wO=1e5;let ym=0;function EO(){return ym=(ym+1)%Number.MAX_VALUE,ym.toString()}const Cm=new Map,Lw=e=>{if(Cm.has(e))return;const t=setTimeout(()=>{Cm.delete(e),Pu({type:"REMOVE_TOAST",toastId:e})},wO);Cm.set(e,t)},_w=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,CO)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Lw(n):e.toasts.forEach(r=>{Lw(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},xf=[];let yf={toasts:[]};function Pu(e){yf=_w(yf,e),xf.forEach(t=>{t(yf)})}function Vw({...e}){const t=EO(),n=o=>Pu({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>Pu({type:"DISMISS_TOAST",toastId:t});return Pu({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function Ww(){const[e,t]=q.useState(yf);return q.useEffect(()=>(xf.push(t),()=>{const n=xf.indexOf(t);n>-1&&xf.splice(n,1)}),[e]),{...e,toast:Vw,dismiss:n=>Pu({type:"DISMISS_TOAST",toastId:n})}}function SO(e){const{toasts:t}=Ww();let n=e.direction==="rtl";return l.jsxs(Rw,{swipeDirection:n?"left":"right",children:[t.map(function({id:r,title:o,description:a,action:i,...s}){return l.jsxs(mm,{direction:e.direction,...s,children:[l.jsxs("div",{className:"grid gap-1 text-start",children:[o&&l.jsx(bm,{children:o}),a&&l.jsx(xm,{children:a})]}),i,l.jsx(vm,{})]},r)}),l.jsx(hm,{className:Pe("gap-2",n&&"fixed left-0")})]})}const Hw="Dialog",[Gw,D_]=cr(Hw),[DO,so]=Gw(Hw),FO=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=p.useRef(null),u=p.useRef(null),[c=!1,d]=jr({prop:r,defaultProp:o,onChange:a});return p.createElement(DO,{scope:t,triggerRef:s,contentRef:u,contentId:Ir(),titleId:Ir(),descriptionId:Ir(),open:c,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(g=>!g),[d]),modal:i},n)},AO="DialogTrigger",jO=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=so(AO,n),a=Jt(t,o.triggerRef);return p.createElement(Et.button,ye({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Em(o.open)},r,{ref:a,onClick:ot(e.onClick,o.onOpenToggle)}))}),zw="DialogPortal",[IO,Uw]=Gw(zw,{forceMount:void 0}),TO=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=so(zw,t);return p.createElement(IO,{scope:t,forceMount:n},p.Children.map(r,i=>p.createElement(Kn,{present:n||a.open},p.createElement(Ed,{asChild:!0,container:o},i))))},wm="DialogOverlay",kO=p.forwardRef((e,t)=>{const n=Uw(wm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=so(wm,e.__scopeDialog);return a.modal?p.createElement(Kn,{present:r||a.open},p.createElement(PO,ye({},o,{ref:t}))):null}),PO=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=so(wm,n);return p.createElement(Vp,{as:ci,allowPinchZoom:!0,shards:[o.contentRef]},p.createElement(Et.div,ye({"data-state":Em(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Bu="DialogContent",BO=p.forwardRef((e,t)=>{const n=Uw(Bu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=so(Bu,e.__scopeDialog);return p.createElement(Kn,{present:r||a.open},a.modal?p.createElement(NO,ye({},o,{ref:t})):p.createElement(OO,ye({},o,{ref:t})))}),NO=p.forwardRef((e,t)=>{const n=so(Bu,e.__scopeDialog),r=p.useRef(null),o=Jt(t,n.contentRef,r);return p.useEffect(()=>{const a=r.current;if(a)return jd(a)},[]),p.createElement(Zw,ye({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ot(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=n.triggerRef.current)===null||i===void 0||i.focus()}),onPointerDownOutside:ot(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:ot(e.onFocusOutside,a=>a.preventDefault())}))}),OO=p.forwardRef((e,t)=>{const n=so(Bu,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return p.createElement(Zw,ye({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,a),!a.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),a.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:a=>{var i,s;(i=e.onInteractOutside)===null||i===void 0||i.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=a.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(u))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}}))}),Zw=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=so(Bu,n),u=p.useRef(null),c=Jt(t,u);return Fp(),p.createElement(p.Fragment,null,p.createElement(Ip,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a},p.createElement(cu,ye({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Em(s.open)},i,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),$O="DialogTitle",RO=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=so($O,n);return p.createElement(Et.h2,ye({id:o.titleId},r,{ref:t}))}),MO="DialogDescription",LO=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=so(MO,n);return p.createElement(Et.p,ye({id:o.descriptionId},r,{ref:t}))}),_O="DialogClose",VO=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=so(_O,n);return p.createElement(Et.button,ye({type:"button"},r,{ref:t,onClick:ot(e.onClick,()=>o.onOpenChange(!1))}))});function Em(e){return e?"open":"closed"}const WO=FO,HO=jO,Xw=TO,Yw=kO,Jw=BO,Kw=RO,Qw=LO,GO=VO,qw=WO,zO=HO,eE=({className:e,...t})=>l.jsx(Xw,{className:Pe(e),...t});eE.displayName=Xw.displayName;const tE=q.forwardRef(({className:e,...t},n)=>l.jsx(Yw,{ref:n,className:Pe("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));tE.displayName=Yw.displayName;const Sm=q.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(eE,{children:[l.jsx(tE,{}),l.jsxs(Jw,{onPointerDownOutside:o=>{n.persist&&o.preventDefault()},ref:r,className:Pe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...n,children:[t,l.jsxs(GO,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx("svg",{"aria-label":"Close Icon","aria-hidden":"true",className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Sm.displayName=Jw.displayName;const nE=({className:e,...t})=>l.jsx("div",{className:Pe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});nE.displayName="DialogHeader";const rE=({className:e,...t})=>l.jsx("div",{className:Pe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});rE.displayName="DialogFooter";const oE=q.forwardRef(({className:e,...t},n)=>l.jsx(Kw,{ref:n,className:Pe("text-lg font-semibold leading-none tracking-tight",e),...t}));oE.displayName=Kw.displayName;const aE=q.forwardRef(({className:e,...t},n)=>l.jsx(Qw,{ref:n,className:Pe("text-sm text-muted-foreground",e),...t}));aE.displayName=Qw.displayName;const iE="Checkbox",[UO,F_]=cr(iE),[ZO,XO]=UO(iE),YO=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:u="on",onCheckedChange:c,...d}=e,[g,v]=p.useState(null),y=Jt(t,P=>v(P)),C=p.useRef(!1),h=g?!!g.closest("form"):!0,[w=!1,E]=jr({prop:o,defaultProp:a,onChange:c}),j=p.useRef(w);return p.useEffect(()=>{const P=g==null?void 0:g.form;if(P){const N=()=>E(j.current);return P.addEventListener("reset",N),()=>P.removeEventListener("reset",N)}},[g,E]),p.createElement(ZO,{scope:n,state:w,disabled:s},p.createElement(Et.button,ye({type:"button",role:"checkbox","aria-checked":Ii(w)?"mixed":w,"aria-required":i,"data-state":sE(w),"data-disabled":s?"":void 0,disabled:s,value:u},d,{ref:y,onKeyDown:ot(e.onKeyDown,P=>{P.key==="Enter"&&P.preventDefault()}),onClick:ot(e.onClick,P=>{E(N=>Ii(N)?!0:!N),h&&(C.current=P.isPropagationStopped(),C.current||P.stopPropagation())})})),h&&p.createElement(QO,{control:g,bubbles:!C.current,name:r,value:u,checked:w,required:i,disabled:s,style:{transform:"translateX(-100%)"}}))}),JO="CheckboxIndicator",KO=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=XO(JO,n);return p.createElement(Kn,{present:r||Ii(a.state)||a.state===!0},p.createElement(Et.span,ye({"data-state":sE(a.state),"data-disabled":a.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),QO=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=p.useRef(null),i=Pb(n),s=wp(t);return p.useEffect(()=>{const u=a.current,c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==n&&g){const v=new Event("click",{bubbles:r});u.indeterminate=Ii(n),g.call(u,Ii(n)?!1:n),u.dispatchEvent(v)}},[i,n,r]),p.createElement("input",ye({type:"checkbox","aria-hidden":!0,defaultChecked:Ii(n)?!1:n},o,{tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Ii(e){return e==="indeterminate"}function sE(e){return Ii(e)?"indeterminate":e?"checked":"unchecked"}const lE=YO,qO=KO,Dm=({id:e,label:t,sublabel:n,helperText:r,...o})=>l.jsxs("div",{className:"items-top mb-3 flex gap-2 ",children:[l.jsx(uE,{id:e,...o}),(t||r)&&l.jsxs("div",{className:"grid gap-1.5 leading-none",children:[t&&l.jsx("label",{role:"checkbox",htmlFor:e,className:Pe("cursor-pointer select-none text-sm font-medium leading-none",o.disabled&&"cursor-not-allowed text-muted-foreground opacity-70"),children:t}),n&&l.jsx("label",{role:"checkbox",htmlFor:e,className:Pe("cursor-pointer select-none text-sm text-muted-foreground",o.disabled&&"cursor-not-allowed text-muted-foreground opacity-70"),children:n}),r&&!o.disabled&&l.jsx("label",{role:"checkbox",htmlFor:e,className:Pe("select-none text-xs text-red-500",o.disabled&&"cursor-not-allowed opacity-70"),children:r})]})]}),uE=q.forwardRef(({className:e,...t},n)=>l.jsx(lE,{ref:n,className:Pe("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:l.jsxs(qO,{className:Pe("flex items-center justify-center text-current"),children:[l.jsx("svg",{"aria-label":"Check Mark",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"0.60em",width:"0.60em",children:l.jsx("path",{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"})})," "]})}));uE.displayName=lE.displayName;const cE=()=>l.jsx("svg",{"aria-label":"Chevron Right Icon",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",children:l.jsx("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"})}),e$=({size:e="normal",bodyColor:t="white",headerColor:n="gray-200",borders:r="all",highlightFirst:o=!1,direction:a="ltr",bordersWidth:i="1",pagination:s=!0,onRowClicked:u,clickable:c,...d})=>{var de,R,W,oe,pe,se,Z,te;const[g,v]=p.useState(10),[y,C]=p.useState(null),[h,w]=p.useState(1);p.useState(null);const[E,j]=p.useState(d.rows),[P,N]=p.useState(null),[$,G]=p.useState(null),{slice:V,range:J}=Rb(d.rows,h,g,P,$);let Q=a==="rtl",he={normal:"py-3 px-6",small:"px-3 py-1"};const xe=(U,K)=>{K&&(N(U),G(me=>me==="asc"?"desc":"asc"))},ne=()=>{(V==null?void 0:V.length)<1&&h!==1&&w(h-1),y&&w(y)};return p.useEffect(()=>{ne()},[V,h]),l.jsxs("div",{className:"relative flex flex-col gap-2 ",children:[d.isLoading?l.jsx(Go,{className:"h-[105px] w-full"}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:`overflow-x-auto rounded bg-${n}`,children:[d.headerTools&&l.jsx("div",{className:"flex flex-row items-center justify-between gap-2 border bg-background px-2 py-2",children:d.headerTools}),l.jsxs("table",{className:_e("w-full rounded bg-muted text-left text-sm text-muted-foreground",`bg-${n}`),children:[l.jsx("thead",{className:_e("bg-muted text-xs uppercase text-muted-foreground ",r==="rows"||r==="all"||r==="inner"?"border-b ":""),children:l.jsxs("tr",{children:[d.columns.map((U,K)=>{if(!U.hidden)return l.jsxs("th",{onClick:()=>U.sortable&&xe(K,U.sortable),scope:"col",colSpan:2,className:_e(U.sortable?"cursor-pointer hover:bg-muted-foreground/10":"",he[e],K!==0&&(r==="cols"||r==="all"||r==="inner")?`border-r border-r-[${i}px] border-l border-l-[${i}px]`:""),children:[U.value,P===K&&l.jsx("span",{children:$==="asc"?" ▲":" ▼"})]},K)}),d.actions?l.jsx("th",{scope:"col",className:_e(he[e],"w-[calc(1%)] text-center"),children:((de=d.texts)==null?void 0:de.actions)??"Actions"}):null]})}),l.jsx("tbody",{className:t&&d.rows?`bg-${t}`:"bg-transparent",children:E?V==null?void 0:V.map((U,K)=>{let me=K==(V==null?void 0:V.length)-1;return l.jsxs("tr",{className:_e(" text-mute-foreground border bg-background ",c?"transition-all hover:bg-gray-100":"",!me&&(r==="all"||r==="rows"||r==="inner")?`border-b border-b-[${i}px]`:""),onClick:H=>u(U),children:[U==null?void 0:U.map((H,ge)=>{let ie=ge===0,be=ge===(U==null?void 0:U.length)-1,Re=Q&&me&&be&&!d.actions,Ne=Q&&me&&ie,We=!Q&&me&&ie,Ke=!Q&&me&&be&&!d.actions;if(!H.hidden)return l.jsxs("td",{colSpan:2,className:_e(he[e],o&&ie?"font-bold":"font-normal",Ne?"rounded-bl-none rounded-br":Re||We?"rounded-bl rounded-br-none":Ke?"rounded-bl-none rounded-br":"",!ie&&!be&&(r==="cols"||r==="inner"||r==="all")?`border-l border-l-[${i}px] border-r border-r-[${i}px]`:!ie&&d.actions&&(r==="cols"||r==="inner"||r==="all")?`border-l border-l-[${i}px] border-r border-r-[${i}px]`:""),children:[H.value," ",H.suffix&&H.suffix]},ge)}),d.actions&&l.jsx("td",{align:Q?"right":"left",className:Pe(Q&&me&&"rounded-bl rounded-br-none",!Q&&me&&"rounded-bl-none rounded-br"),colSpan:1,children:l.jsx("div",{className:"flex items-center justify-center",children:l.jsx(pi,{width:d.actionsWidth,size:d.actionsSize,direction:a,side:"right",items:d.actions,onItemSelect:H=>d.handleActionClick(H,U),trigger:l.jsx("div",{className:"flex w-fit cursor-pointer items-center justify-center rounded p-2 transition-all hover:bg-primary/20 ",children:l.jsx("svg",{"aria-label":"Vertical Three Dots Menu Icon",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",children:l.jsx("path",{d:"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"})})})})})})]},K)}):l.jsx("tr",{className:"bg-transparent",children:l.jsx("td",{colSpan:20,children:l.jsx("div",{className:_e("w-full rounded-b border p-5 text-center","bg-background"),children:((R=d.texts)==null?void 0:R.noData)??"No Data"})})})})]})]})}),s&&l.jsxs("div",{className:"flex flex-row items-center justify-between ",children:[J.length>1?l.jsxs("div",{className:"flex w-fit flex-row items-stretch justify-center gap-2 overflow-clip rounded ",children:[l.jsx("div",{className:Pe("flex h-6 w-6 rotate-180 cursor-pointer items-center justify-center rounded border bg-background p-1 text-xs hover:bg-primary/10 dark:hover:bg-primary/10",a==="rtl"&&"rotate-0"),onClick:()=>h<=1?w(J.length):w(h-1),children:l.jsx(cE,{})}),l.jsxs("div",{className:"flex flex-row items-center overflow-clip rounded transition-all",children:[J.length>6&&J.map((U,K)=>{if(K<=0)return l.jsx("button",{className:_e("w-10 p-1 text-xs hover:bg-gray-200",h===U?"bg-primary text-primary-foreground hover:bg-primary":"bg-gray-100"),onClick:()=>w(U),children:U},K)}),(J==null?void 0:J.length)>6&&l.jsx("input",{type:"text",className:" w-10 bg-gray-100 p-1 text-center text-xs",defaultValue:h!==0||h!==J.length-1?h:"...",value:h==1||h==J.length?"...":y||h,onChange:U=>C(parseInt(U.target.value)),onKeyDown:U=>{U.key==="Enter"&&(w(y),C(null))}}),(J==null?void 0:J.length)>6&&J.map((U,K)=>{if(K>=J.length-1)return l.jsx("button",{className:_e("w-10 p-1 text-xs hover:bg-gray-200",h===U?"bg-primary text-primary-foreground hover:bg-primary":"bg-gray-100"),onClick:()=>w(U),children:U},K)}),(J==null?void 0:J.length)<=6&&J.map((U,K)=>l.jsx("button",{className:_e("w-10 p-1 text-xs",h===U?"bg-primary text-primary-foreground ":"border bg-background hover:bg-primary/10 dark:hover:bg-primary/10",a==="rtl"?K===0?"rounded-r border-l-0":K===J.length-1?"rounded-l border-r-0":"":K===0?"rounded-l border-r-0":K===J.length-1?"rounded-r border-l-0":""),onClick:()=>w(U),children:U},K))]}),l.jsx("div",{onClick:()=>h>=J.length?w(1):w(h+1),className:Pe("flex h-6 w-6 cursor-pointer items-center justify-center rounded border bg-background p-1 text-xs hover:bg-primary/10 dark:hover:bg-primary/10",a==="rtl"&&"rotate-180"),children:l.jsx(cE,{})})]}):l.jsx("div",{}),d.rows?l.jsxs("div",{className:"flex w-fit flex-row items-center gap-2 ",children:[l.jsxs("div",{className:"text-xs ",children:[d.rows.length," ",((W=d.texts)==null?void 0:W.items)??"Items"]}),l.jsxs("select",{value:g,className:"h-6 cursor-pointer rounded border bg-background px-2 text-xs",onChange:U=>{v(parseInt(U.target.value))},children:[l.jsxs("option",{value:10,style:{fontSize:10},children:["10 / ",((oe=d.texts)==null?void 0:oe.page)??"Page"]}),l.jsxs("option",{value:20,style:{fontSize:10},children:["20 / ",((pe=d.texts)==null?void 0:pe.page)??"Page"]}),l.jsxs("option",{value:30,style:{fontSize:10},children:["30 / ",((se=d.texts)==null?void 0:se.page)??"Page"]}),l.jsxs("option",{value:50,style:{fontSize:10},children:["50 / ",((Z=d.texts)==null?void 0:Z.page)??"Page"]}),l.jsxs("option",{value:100,style:{fontSize:10},children:["100 / ",((te=d.texts)==null?void 0:te.page)??"Page"]})]})]}):l.jsx("div",{})]})]})};function _s(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function t$(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function dE(...e){return t=>e.forEach(n=>t$(n,t))}function Nu(...e){return p.useCallback(dE(...e),e)}function n$(e,t=[]){let n=[];function r(a,i){const s=p.createContext(i),u=n.length;n=[...n,i];function c(g){const{scope:v,children:y,...C}=g,h=(v==null?void 0:v[e][u])||s,w=p.useMemo(()=>C,Object.values(C));return p.createElement(h.Provider,{value:w},y)}function d(g,v){const y=(v==null?void 0:v[e][u])||s,C=p.useContext(y);if(C)return C;if(i!==void 0)return i;throw new Error(`\`${g}\` must be used within \`${a}\``)}return c.displayName=a+"Provider",[c,d]}const o=()=>{const a=n.map(i=>p.createContext(i));return function(s){const u=(s==null?void 0:s[e])||a;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return o.scopeName=e,[r,r$(o,...t)]}function r$(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=r.reduce((s,{useScope:u,scopeName:c})=>{const g=u(a)[`__scope${c}`];return{...s,...g}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}const Fm=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},o$=q["useId".toString()]||(()=>{});let a$=0;function Am(e){const[t,n]=q.useState(o$());return Fm(()=>{e||n(r=>r??String(a$++))},[e]),e||(t?`radix-${t}`:"")}function Ti(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function i$({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=s$({defaultProp:t,onChange:n}),a=e!==void 0,i=a?e:r,s=Ti(n),u=p.useCallback(c=>{if(a){const g=typeof c=="function"?c(e):c;g!==e&&s(g)}else o(c)},[a,e,o,s]);return[i,u]}function s$({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),a=Ti(t);return p.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}const jm=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),a=o.find(u$);if(a){const i=a.props.children,s=o.map(u=>u===a?p.Children.count(i)>1?p.Children.only(null):p.isValidElement(i)?i.props.children:null:u);return p.createElement(Im,ye({},r,{ref:t}),p.isValidElement(i)?p.cloneElement(i,void 0,s):null)}return p.createElement(Im,ye({},r,{ref:t}),n)});jm.displayName="Slot";const Im=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...c$(r,n.props),ref:dE(t,n.ref)}):p.Children.count(n)>1?p.Children.only(null):null});Im.displayName="SlotClone";const l$=({children:e})=>p.createElement(p.Fragment,null,e);function u$(e){return p.isValidElement(e)&&e.type===l$}function c$(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?n[r]=(...s)=>{a==null||a(...s),o==null||o(...s)}:r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const Cf=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:a,...i}=r,s=a?jm:t;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(s,ye({},i,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function d$(e,t){e&&wo.flushSync(()=>e.dispatchEvent(t))}function f$(e){const t=Ti(e);p.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const Tm="dismissableLayer.update",g$="dismissableLayer.pointerDownOutside",p$="dismissableLayer.focusOutside";let fE;const h$=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m$=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...u}=e,c=p.useContext(h$),[d,g]=p.useState(null),[,v]=p.useState({}),y=Nu(t,G=>g(G)),C=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=C.indexOf(h),E=d?C.indexOf(d):-1,j=c.layersWithOutsidePointerEventsDisabled.size>0,P=E>=w,N=v$(G=>{const V=G.target,J=[...c.branches].some(Q=>Q.contains(V));!P||J||(o==null||o(G),i==null||i(G),G.defaultPrevented||s==null||s())}),$=b$(G=>{const V=G.target;[...c.branches].some(Q=>Q.contains(V))||(a==null||a(G),i==null||i(G),G.defaultPrevented||s==null||s())});return f$(G=>{E===c.layers.size-1&&(r==null||r(G),!G.defaultPrevented&&s&&(G.preventDefault(),s()))}),p.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(fE=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),gE(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=fE)}},[d,n,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),gE())},[d,c]),p.useEffect(()=>{const G=()=>v({});return document.addEventListener(Tm,G),()=>document.removeEventListener(Tm,G)},[]),p.createElement(Cf.div,ye({},u,{ref:y,style:{pointerEvents:j?P?"auto":"none":void 0,...e.style},onFocusCapture:_s(e.onFocusCapture,$.onFocusCapture),onBlurCapture:_s(e.onBlurCapture,$.onBlurCapture),onPointerDownCapture:_s(e.onPointerDownCapture,N.onPointerDownCapture)}))});function v$(e){const t=Ti(e),n=p.useRef(!1),r=p.useRef(()=>{});return p.useEffect(()=>{const o=i=>{if(i.target&&!n.current){let u=function(){pE(g$,t,s,{discrete:!0})};const s={originalEvent:i};i.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=u,document.addEventListener("click",r.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{document.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),document.removeEventListener("pointerdown",o),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function b$(e){const t=Ti(e),n=p.useRef(!1);return p.useEffect(()=>{const r=o=>{o.target&&!n.current&&pE(p$,t,{originalEvent:o},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function gE(){const e=new CustomEvent(Tm);document.dispatchEvent(e)}function pE(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?d$(o,a):o.dispatchEvent(a)}const km="focusScope.autoFocusOnMount",Pm="focusScope.autoFocusOnUnmount",hE={bubbles:!1,cancelable:!0},x$=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,u]=p.useState(null),c=Ti(o),d=Ti(a),g=p.useRef(null),v=Nu(t,h=>u(h)),y=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let h=function(E){if(y.paused||!s)return;const j=E.target;s.contains(j)?g.current=j:ki(g.current,{select:!0})},w=function(E){y.paused||!s||s.contains(E.relatedTarget)||ki(g.current,{select:!0})};return document.addEventListener("focusin",h),document.addEventListener("focusout",w),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",w)}}},[r,s,y.paused]),p.useEffect(()=>{if(s){bE.add(y);const h=document.activeElement;if(!s.contains(h)){const E=new CustomEvent(km,hE);s.addEventListener(km,c),s.dispatchEvent(E),E.defaultPrevented||(y$(D$(mE(s)),{select:!0}),document.activeElement===h&&ki(s))}return()=>{s.removeEventListener(km,c),setTimeout(()=>{const E=new CustomEvent(Pm,hE);s.addEventListener(Pm,d),s.dispatchEvent(E),E.defaultPrevented||ki(h??document.body,{select:!0}),s.removeEventListener(Pm,d),bE.remove(y)},0)}}},[s,c,d,y]);const C=p.useCallback(h=>{if(!n&&!r||y.paused)return;const w=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,E=document.activeElement;if(w&&E){const j=h.currentTarget,[P,N]=C$(j);P&&N?!h.shiftKey&&E===N?(h.preventDefault(),n&&ki(P,{select:!0})):h.shiftKey&&E===P&&(h.preventDefault(),n&&ki(N,{select:!0})):E===j&&h.preventDefault()}},[n,r,y.paused]);return p.createElement(Cf.div,ye({tabIndex:-1},i,{ref:v,onKeyDown:C}))});function y$(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ki(r,{select:t}),document.activeElement!==n)return}function C$(e){const t=mE(e),n=vE(t,e),r=vE(t.reverse(),e);return[n,r]}function mE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function vE(e,t){for(const n of e)if(!w$(n,{upTo:t}))return n}function w$(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function E$(e){return e instanceof HTMLInputElement&&"select"in e}function ki(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&E$(e)&&t&&e.select()}}const bE=S$();function S$(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=xE(e,t),e.unshift(t)},remove(t){var n;e=xE(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function xE(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function D$(e){return e.filter(t=>t.tagName!=="A")}const F$=p.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?wo.createPortal(p.createElement(Cf.div,ye({},o,{ref:t})),r):null});function A$(e,t){return p.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const wf=e=>{const{present:t,children:n}=e,r=j$(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),a=Nu(r.ref,o.ref);return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:a}):null};wf.displayName="Presence";function j$(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),a=p.useRef("none"),i=e?"mounted":"unmounted",[s,u]=A$(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=Ef(r.current);a.current=s==="mounted"?c:"none"},[s]),Fm(()=>{const c=r.current,d=o.current;if(d!==e){const v=a.current,y=Ef(c);e?u("MOUNT"):y==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&v!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Fm(()=>{if(t){const c=g=>{const y=Ef(r.current).includes(g.animationName);g.target===t&&y&&wo.flushSync(()=>u("ANIMATION_END"))},d=g=>{g.target===t&&(a.current=Ef(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Ef(e){return(e==null?void 0:e.animationName)||"none"}let Bm=0;function I$(){p.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:yE()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:yE()),Bm++,()=>{Bm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Bm--}},[])}function yE(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var CE=ux(),Nm=function(){},Sf=q.forwardRef(function(e,t){var n=q.useRef(null),r=q.useState({onScrollCapture:Nm,onWheelCapture:Nm,onTouchMoveCapture:Nm}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,g=e.shards,v=e.sideCar,y=e.noIsolation,C=e.inert,h=e.allowPinchZoom,w=e.as,E=w===void 0?"div":w,j=$p(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),P=v,N=lx([n,t]),$=zn(zn({},j),o);return q.createElement(q.Fragment,null,d&&q.createElement(P,{sideCar:CE,removeScrollBar:c,shards:g,noIsolation:y,inert:C,setCallbacks:a,allowPinchZoom:!!h,lockRef:n}),i?q.cloneElement(q.Children.only(s),zn(zn({},$),{ref:N})):q.createElement(E,zn({},$,{className:u,ref:N}),s))});Sf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Sf.classNames={fullWidth:fu,zeroRight:du};var Om=!1;if(typeof window<"u")try{var Df=Object.defineProperty({},"passive",{get:function(){return Om=!0,!0}});window.addEventListener("test",Df,Df),window.removeEventListener("test",Df,Df)}catch{Om=!1}var Vs=Om?{passive:!1}:!1,T$=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},k$=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},wE=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=EE(e,n);if(r){var o=SE(e,n),a=o[1],i=o[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},P$=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},B$=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},EE=function(e,t){return e==="v"?T$(t):k$(t)},SE=function(e,t){return e==="v"?P$(t):B$(t)},N$=function(e,t){return e==="h"&&t==="rtl"?-1:1},O$=function(e,t,n,r,o){var a=N$(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,u=t.contains(s),c=!1,d=i>0,g=0,v=0;do{var y=SE(e,s),C=y[0],h=y[1],w=y[2],E=h-w-a*C;(C||E)&&EE(e,s)&&(g+=E,v+=C),s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(d&&(o&&g===0||!o&&i>g)||!d&&(o&&v===0||!o&&-i>v))&&(c=!0),c},Ff=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},DE=function(e){return[e.deltaX,e.deltaY]},FE=function(e){return e&&"current"in e?e.current:e},$$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},R$=function(e){return`
228
228
  .block-interactivity-`.concat(e,` {pointer-events: none;}
229
229
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
230
- `)},M$=0,Ws=[];function L$(e){var t=q.useRef([]),n=q.useRef([0,0]),r=q.useRef(),o=q.useState(M$++)[0],a=q.useState(function(){return Mp()})[0],i=q.useRef(e);q.useEffect(function(){i.current=e},[e]),q.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=sx([e.lockRef.current],(e.shards||[]).map(FE),!0).filter(Boolean);return h.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=q.useCallback(function(h,w){if("touches"in h&&h.touches.length===2)return!i.current.allowPinchZoom;var E=Ff(h),j=n.current,P="deltaX"in h?h.deltaX:j[0]-E[0],N="deltaY"in h?h.deltaY:j[1]-E[1],$,G=h.target,V=Math.abs(P)>Math.abs(N)?"h":"v";if("touches"in h&&V==="h"&&G.type==="range")return!1;var J=wE(V,G);if(!J)return!0;if(J?$=V:($=V==="v"?"h":"v",J=wE(V,G)),!J)return!1;if(!r.current&&"changedTouches"in h&&(P||N)&&(r.current=$),!$)return!0;var Q=r.current||$;return O$(Q,w,h,Q==="h"?P:N,!0)},[]),u=q.useCallback(function(h){var w=h;if(!(!Ws.length||Ws[Ws.length-1]!==a)){var E="deltaY"in w?DE(w):Ff(w),j=t.current.filter(function($){return $.name===w.type&&$.target===w.target&&$$($.delta,E)})[0];if(j&&j.should){w.preventDefault();return}if(!j){var P=(i.current.shards||[]).map(FE).filter(Boolean).filter(function($){return $.contains(w.target)}),N=P.length>0?s(w,P[0]):!i.current.noIsolation;N&&w.preventDefault()}}},[]),c=q.useCallback(function(h,w,E,j){var P={name:h,delta:w,target:E,should:j};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(N){return N!==P})},1)},[]),d=q.useCallback(function(h){n.current=Ff(h),r.current=void 0},[]),g=q.useCallback(function(h){c(h.type,DE(h),h.target,s(h,e.lockRef.current))},[]),v=q.useCallback(function(h){c(h.type,Ff(h),h.target,s(h,e.lockRef.current))},[]);q.useEffect(function(){return Ws.push(a),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Vs),document.addEventListener("touchmove",u,Vs),document.addEventListener("touchstart",d,Vs),function(){Ws=Ws.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,Vs),document.removeEventListener("touchmove",u,Vs),document.removeEventListener("touchstart",d,Vs)}},[]);var y=e.removeScrollBar,C=e.inert;return q.createElement(q.Fragment,null,C?q.createElement(a,{styles:R$(o)}):null,y?q.createElement(px,{gapMode:"margin"}):null)}const _$=dx(CE,L$);var AE=q.forwardRef(function(e,t){return q.createElement(Sf,zn({},e,{ref:t,sideCar:_$}))});AE.classNames=Sf.classNames;const V$=AE,jE="Dialog",[IE,j_]=n$(jE),[W$,Pi]=IE(jE),H$=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=p.useRef(null),u=p.useRef(null),[c=!1,d]=i$({prop:r,defaultProp:o,onChange:a});return p.createElement(W$,{scope:t,triggerRef:s,contentRef:u,contentId:Am(),titleId:Am(),descriptionId:Am(),open:c,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(g=>!g),[d]),modal:i},n)},TE="DialogPortal",[G$,kE]=IE(TE,{forceMount:void 0}),z$=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Pi(TE,t);return p.createElement(G$,{scope:t,forceMount:n},p.Children.map(r,i=>p.createElement(wf,{present:n||a.open},p.createElement(F$,{asChild:!0,container:o},i))))},$m="DialogOverlay",U$=p.forwardRef((e,t)=>{const n=kE($m,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Pi($m,e.__scopeDialog);return a.modal?p.createElement(wf,{present:r||a.open},p.createElement(Z$,ye({},o,{ref:t}))):null}),Z$=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pi($m,n);return p.createElement(V$,{as:jm,allowPinchZoom:!0,shards:[o.contentRef]},p.createElement(Cf.div,ye({"data-state":BE(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Ou="DialogContent",X$=p.forwardRef((e,t)=>{const n=kE(Ou,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Pi(Ou,e.__scopeDialog);return p.createElement(wf,{present:r||a.open},a.modal?p.createElement(Y$,ye({},o,{ref:t})):p.createElement(J$,ye({},o,{ref:t})))}),Y$=p.forwardRef((e,t)=>{const n=Pi(Ou,e.__scopeDialog),r=p.useRef(null),o=Nu(t,n.contentRef,r);return p.useEffect(()=>{const a=r.current;if(a)return jd(a)},[]),p.createElement(PE,ye({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_s(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=n.triggerRef.current)===null||i===void 0||i.focus()}),onPointerDownOutside:_s(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:_s(e.onFocusOutside,a=>a.preventDefault())}))}),J$=p.forwardRef((e,t)=>{const n=Pi(Ou,e.__scopeDialog),r=p.useRef(!1);return p.createElement(PE,ye({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,o),!o.defaultPrevented){var i;r.current||(i=n.triggerRef.current)===null||i===void 0||i.focus(),o.preventDefault()}r.current=!1},onInteractOutside:o=>{var a,i;(a=e.onInteractOutside)===null||a===void 0||a.call(e,o),o.defaultPrevented||(r.current=!0);const s=o.target;((i=n.triggerRef.current)===null||i===void 0?void 0:i.contains(s))&&o.preventDefault()}}))}),PE=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=Pi(Ou,n),u=p.useRef(null),c=Nu(t,u);return I$(),p.createElement(p.Fragment,null,p.createElement(x$,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a},p.createElement(m$,ye({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":BE(s.open)},i,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function BE(e){return e?"open":"closed"}const K$=H$,Q$=z$,q$=U$,eR=X$;var NE=1,tR=.9,nR=.3,Rm=.1,rR=0,Mm=.999,oR=.9999,aR=.99,OE=/[\\\/\-_+.# \t"@\[\(\{&]/,iR=/[\\\/\-_+.# \t"@\[\(\{&]/g;function Lm(e,t,n,r,o,a){if(a===t.length)return o===e.length?NE:aR;for(var i=r.charAt(a),s=n.indexOf(i,o),u=0,c,d,g;s>=0;)c=Lm(e,t,n,r,s+1,a+1),c>u&&(s===o?c*=NE:OE.test(e.charAt(s-1))?(c*=tR,g=e.slice(o,s-1).match(iR),g&&o>0&&(c*=Math.pow(Mm,g.length))):OE.test(e.slice(o,s-1))?(c*=rR,o>0&&(c*=Math.pow(Mm,s-o))):(c*=nR,o>0&&(c*=Math.pow(Mm,s-o))),e.charAt(s)!==t.charAt(a)&&(c*=oR)),c<Rm&&n.charAt(s-1)===r.charAt(a+1)&&n.charAt(s-1)!==r.charAt(a)&&(d=Lm(e,t,n,r,s+1,a+2),d*Rm>c&&(c=d*Rm)),c>u&&(u=c),s=n.indexOf(i,s+1);return u}function sR(e,t){return Lm(e,t,e.toLowerCase(),t.toLowerCase(),0,0)}var lR=sR;const uR=zl(lR);var cR='[cmdk-list-sizer=""]',$u='[cmdk-group=""]',_m='[cmdk-group-items=""]',dR='[cmdk-group-heading=""]',$E='[cmdk-item=""]',RE=`${$E}:not([aria-disabled="true"])`,Vm="cmdk-item-select",Oa="data-value",fR=(e,t)=>uR(e,t),ME=q.createContext(void 0),Ru=()=>q.useContext(ME),LE=q.createContext(void 0),Wm=()=>q.useContext(LE),_E=q.createContext(void 0),VE=q.forwardRef((e,t)=>{let n=q.useRef(null),r=Gs(()=>({search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}})),o=Gs(()=>new Set),a=Gs(()=>new Map),i=Gs(()=>new Map),s=Gs(()=>new Set),u=WE(e),{label:c,children:d,value:g,onValueChange:v,filter:y,shouldFilter:C,...h}=e,w=q.useId(),E=q.useId(),j=q.useId(),P=ER();Hs(()=>{if(g!==void 0){let Z=g.trim().toLowerCase();r.current.value=Z,P(6,he),N.emit()}},[g]);let N=q.useMemo(()=>({subscribe:Z=>(s.current.add(Z),()=>s.current.delete(Z)),snapshot:()=>r.current,setState:(Z,te,U)=>{var K,me,H;if(!Object.is(r.current[Z],te)){if(r.current[Z]=te,Z==="search")Q(),V(),P(1,J);else if(Z==="value")if(((K=u.current)==null?void 0:K.value)!==void 0){(H=(me=u.current).onValueChange)==null||H.call(me,te);return}else U||P(5,he);N.emit()}},emit:()=>{s.current.forEach(Z=>Z())}}),[]),$=q.useMemo(()=>({value:(Z,te)=>{te!==i.current.get(Z)&&(i.current.set(Z,te),r.current.filtered.items.set(Z,G(te)),P(2,()=>{V(),N.emit()}))},item:(Z,te)=>(o.current.add(Z),te&&(a.current.has(te)?a.current.get(te).add(Z):a.current.set(te,new Set([Z]))),P(3,()=>{Q(),V(),r.current.value||J(),N.emit()}),()=>{i.current.delete(Z),o.current.delete(Z),r.current.filtered.items.delete(Z),P(4,()=>{Q(),J(),N.emit()})}),group:Z=>(a.current.has(Z)||a.current.set(Z,new Set),()=>{i.current.delete(Z),a.current.delete(Z)}),filter:()=>u.current.shouldFilter,label:c||e["aria-label"],listId:w,inputId:j,labelId:E}),[]);function G(Z){var te;let U=((te=u.current)==null?void 0:te.filter)??fR;return Z?U(Z,r.current.search):0}function V(){if(!n.current||!r.current.search||u.current.shouldFilter===!1)return;let Z=r.current.filtered.items,te=[];r.current.filtered.groups.forEach(K=>{let me=a.current.get(K),H=0;me.forEach(ge=>{let ie=Z.get(ge);H=Math.max(ie,H)}),te.push([K,H])});let U=n.current.querySelector(cR);ne().sort((K,me)=>{let H=K.getAttribute(Oa),ge=me.getAttribute(Oa);return(Z.get(ge)??0)-(Z.get(H)??0)}).forEach(K=>{let me=K.closest(_m);me?me.appendChild(K.parentElement===me?K:K.closest(`${_m} > *`)):U.appendChild(K.parentElement===U?K:K.closest(`${_m} > *`))}),te.sort((K,me)=>me[1]-K[1]).forEach(K=>{let me=n.current.querySelector(`${$u}[${Oa}="${K[0]}"]`);me==null||me.parentElement.appendChild(me)})}function J(){let Z=ne().find(U=>!U.ariaDisabled),te=Z==null?void 0:Z.getAttribute(Oa);N.setState("value",te||void 0)}function Q(){if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let Z=0;for(let te of o.current){let U=i.current.get(te),K=G(U);r.current.filtered.items.set(te,K),K>0&&Z++}for(let[te,U]of a.current)for(let K of U)if(r.current.filtered.items.get(K)>0){r.current.filtered.groups.add(te);break}r.current.filtered.count=Z}function he(){var Z,te,U;let K=xe();K&&(((Z=K.parentElement)==null?void 0:Z.firstChild)===K&&((U=(te=K.closest($u))==null?void 0:te.querySelector(dR))==null||U.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function xe(){return n.current.querySelector(`${$E}[aria-selected="true"]`)}function ne(){return Array.from(n.current.querySelectorAll(RE))}function de(Z){let te=ne()[Z];te&&N.setState("value",te.getAttribute(Oa))}function R(Z){var te;let U=xe(),K=ne(),me=K.findIndex(ge=>ge===U),H=K[me+Z];(te=u.current)!=null&&te.loop&&(H=me+Z<0?K[K.length-1]:me+Z===K.length?K[0]:K[me+Z]),H&&N.setState("value",H.getAttribute(Oa))}function W(Z){let te=xe(),U=te==null?void 0:te.closest($u),K;for(;U&&!K;)U=Z>0?CR(U,$u):wR(U,$u),K=U==null?void 0:U.querySelector(RE);K?N.setState("value",K.getAttribute(Oa)):R(Z)}let oe=()=>de(ne().length-1),pe=Z=>{Z.preventDefault(),Z.metaKey?oe():Z.altKey?W(1):R(1)},se=Z=>{Z.preventDefault(),Z.metaKey?de(0):Z.altKey?W(-1):R(-1)};return q.createElement("div",{ref:Mu([n,t]),...h,"cmdk-root":"",onKeyDown:Z=>{var te;if((te=h.onKeyDown)==null||te.call(h,Z),!Z.defaultPrevented)switch(Z.key){case"n":case"j":{Z.ctrlKey&&pe(Z);break}case"ArrowDown":{pe(Z);break}case"p":case"k":{Z.ctrlKey&&se(Z);break}case"ArrowUp":{se(Z);break}case"Home":{Z.preventDefault(),de(0);break}case"End":{Z.preventDefault(),oe();break}case"Enter":{Z.preventDefault();let U=xe();if(U){let K=new Event(Vm);U.dispatchEvent(K)}}}}},q.createElement("label",{"cmdk-label":"",htmlFor:$.inputId,id:$.labelId,style:SR},c),q.createElement(LE.Provider,{value:N},q.createElement(ME.Provider,{value:$},d)))}),gR=q.forwardRef((e,t)=>{let n=q.useId(),r=q.useRef(null),o=q.useContext(_E),a=Ru(),i=WE(e);Hs(()=>a.item(n,o),[]);let s=HE(n,r,[e.value,e.children,r]),u=Wm(),c=zs(E=>E.value&&E.value===s.current),d=zs(E=>a.filter()===!1?!0:E.search?E.filtered.items.get(n)>0:!0);q.useEffect(()=>{let E=r.current;if(!(!E||e.disabled))return E.addEventListener(Vm,g),()=>E.removeEventListener(Vm,g)},[d,e.onSelect,e.disabled]);function g(){var E,j;(j=(E=i.current).onSelect)==null||j.call(E,s.current)}function v(){u.setState("value",s.current,!0)}if(!d)return null;let{disabled:y,value:C,onSelect:h,...w}=e;return q.createElement("div",{ref:Mu([r,t]),...w,"cmdk-item":"",role:"option","aria-disabled":y||void 0,"aria-selected":c||void 0,"data-selected":c||void 0,onPointerMove:y?void 0:v,onClick:y?void 0:g},e.children)}),pR=q.forwardRef((e,t)=>{let{heading:n,children:r,...o}=e,a=q.useId(),i=q.useRef(null),s=q.useRef(null),u=q.useId(),c=Ru(),d=zs(v=>c.filter()===!1?!0:v.search?v.filtered.groups.has(a):!0);Hs(()=>c.group(a),[]),HE(a,i,[e.value,e.heading,s]);let g=q.createElement(_E.Provider,{value:a},r);return q.createElement("div",{ref:Mu([i,t]),...o,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&q.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),q.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},g))}),hR=q.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=q.useRef(null),a=zs(i=>!i.search);return!n&&!a?null:q.createElement("div",{ref:Mu([o,t]),...r,"cmdk-separator":"",role:"separator"})}),mR=q.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=Wm(),i=zs(u=>u.search),s=Ru();return q.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),q.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,id:s.inputId,type:"text",value:o?e.value:i,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),vR=q.forwardRef((e,t)=>{let{children:n,...r}=e,o=q.useRef(null),a=q.useRef(null),i=Ru();return q.useEffect(()=>{if(a.current&&o.current){let s=a.current,u=o.current,c,d=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let g=s.getBoundingClientRect().height;u.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return d.observe(s),()=>{cancelAnimationFrame(c),d.unobserve(s)}}},[]),q.createElement("div",{ref:Mu([o,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:i.listId,"aria-labelledby":i.inputId},q.createElement("div",{ref:a,"cmdk-list-sizer":""},n))}),bR=q.forwardRef((e,t)=>{let{open:n,onOpenChange:r,container:o,...a}=e;return q.createElement(K$,{open:n,onOpenChange:r},q.createElement(Q$,{container:o},q.createElement(q$,{"cmdk-overlay":""}),q.createElement(eR,{"aria-label":e.label,"cmdk-dialog":""},q.createElement(VE,{ref:t,...a}))))}),xR=q.forwardRef((e,t)=>{let n=q.useRef(!0),r=zs(o=>o.filtered.count===0);return q.useEffect(()=>{n.current=!1},[]),n.current||!r?null:q.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),yR=q.forwardRef((e,t)=>{let{progress:n,children:r,...o}=e;return q.createElement("div",{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},q.createElement("div",{"aria-hidden":!0},r))}),gr=Object.assign(VE,{List:vR,Item:gR,Input:mR,Group:pR,Separator:hR,Dialog:bR,Empty:xR,Loading:yR});function CR(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function wR(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function WE(e){let t=q.useRef(e);return Hs(()=>{t.current=e}),t}var Hs=typeof window>"u"?q.useEffect:q.useLayoutEffect;function Gs(e){let t=q.useRef();return t.current===void 0&&(t.current=e()),t}function Mu(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function zs(e){let t=Wm(),n=()=>e(t.snapshot());return q.useSyncExternalStore(t.subscribe,n,n)}function HE(e,t,n){let r=q.useRef(),o=Ru();return Hs(()=>{var a;let i=(()=>{var s;for(let u of n){if(typeof u=="string")return u.trim().toLowerCase();if(typeof u=="object"&&"current"in u&&u.current)return(s=u.current.textContent)==null?void 0:s.trim().toLowerCase()}})();o.value(e,i),(a=t.current)==null||a.setAttribute(Oa,i),r.current=i}),r}var ER=()=>{let[e,t]=q.useState(),n=Gs(()=>new Map);return Hs(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}},SR={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Af=q.forwardRef(({className:e,...t},n)=>l.jsx(gr,{ref:n,className:Pe("flex h-full w-full flex-col overflow-hidden rounded bg-popover text-popover-foreground",e),...t}));Af.displayName=gr.displayName;const DR=({children:e,...t})=>l.jsx(qw,{...t,children:l.jsx(Sm,{className:"overflow-hidden p-0 shadow-lg",children:l.jsx(Af,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Hm=q.forwardRef(({className:e,...t},n)=>l.jsxs("div",{dir:t.dir,className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 shrink-0 opacity-50",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"11",cy:"11",r:"8"}),l.jsx("path",{d:"m21 21-4.3-4.3"})]}),l.jsx(gr.Input,{ref:n,className:Pe("flex h-11 w-full rounded bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Hm.displayName=gr.Input.displayName;const GE=q.forwardRef(({className:e,...t},n)=>l.jsx(gr.List,{ref:n,className:Pe("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));GE.displayName=gr.List.displayName;const Gm=q.forwardRef((e,t)=>l.jsx(gr.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Gm.displayName=gr.Empty.displayName;const zm=q.forwardRef(({className:e,...t},n)=>l.jsx(gr.Group,{ref:n,className:Pe("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));zm.displayName=gr.Group.displayName;const zE=q.forwardRef(({className:e,...t},n)=>l.jsx(gr.Separator,{ref:n,className:Pe("-mx-1 h-px bg-border",e),...t}));zE.displayName=gr.Separator.displayName;const Um=q.forwardRef(({className:e,...t},n)=>l.jsx(gr.Item,{ref:n,className:Pe("relative flex cursor-default select-none items-center rounded-inner px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));Um.displayName=gr.Item.displayName;const UE=({className:e,...t})=>l.jsx("span",{className:Pe("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});UE.displayName="CommandShortcut";const FR=e=>{var a,i,s,u,c;const[t,n]=q.useState(!1),[r,o]=q.useState((a=e.defaultValue)==null?void 0:a.value);return l.jsx(hh,{className:"w-[200px] p-0",open:t,disableTrigger:e.isLoading,onOpenChange:n,trigger:l.jsxs("div",{className:"relative flex max-h-fit flex-col items-start gap-2 ",children:[e.label&&l.jsx(Ea,{children:e.label}),e.isLoading?l.jsx(Go,{className:"h-[38px] w-[200px]"}):l.jsxs(Qe,{disabled:e.isLoading,variant:"outline",role:"combobox","aria-expanded":t,className:"h-[38px] w-[200px] justify-between",children:[r?(i=e.items.find(d=>d.value===r))==null?void 0:i.label:((s=e.texts)==null?void 0:s.placeholder)??"Select item...",l.jsxs("svg",{"aria-label":"Expand Up-Down Icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4 shrink-0 opacity-50",children:[l.jsx("path",{d:"m7 15 5 5 5-5"}),l.jsx("path",{d:"m7 9 5-5 5 5"})]})]})]}),children:l.jsxs(Af,{children:[l.jsx(Hm,{dir:e.direction,placeholder:((u=e.texts)==null?void 0:u.searchPlaceholder)??"Search items..."}),l.jsx(Gm,{children:((c=e.texts)==null?void 0:c.nothingFound)??"No framework found."}),l.jsx(zm,{children:e.items.map(d=>l.jsxs(Um,{dir:e.direction,className:"flex flex-row gap-1",onSelect:g=>{o(g===r?"":g),n(!1)},children:[l.jsx("svg",{"aria-label":"Check Mark Icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:Pe("h-4 w-4",r===d.value?"opacity-100":"opacity-0"),children:l.jsx("polyline",{points:"20 6 9 17 4 12"})}),d.label]},d.value))})]})})},Zm=q.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full overflow-auto rounded border",children:l.jsx("table",{ref:n,className:Pe("w-full caption-bottom text-sm",e),...t})}));Zm.displayName="Table";const Xm=q.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:Pe("[&_tr]:border-b","bg-muted/50",e),...t}));Xm.displayName="TableHeader";const Ym=q.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:Pe("text-start align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t.condensed?"h-8":"h-12",t.clickable?"px-1":"px-4",t.clickable?"[&:not(:last-child)&:not(:first-child)]:border-x [&:not(:last-child)&:not(:first-child)]:p-1":"px-4",e),...t}));Ym.displayName="TableHead";const Jm=q.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:Pe("border-none",e),...t}));Jm.displayName="TableBody";const ZE=q.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:Pe("bg-primary font-medium text-primary-foreground",e),...t}));ZE.displayName="TableFooter";const Lu=q.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:Pe("transition-colors data-[state=selected]:bg-muted","[&:not(:last-child)&:not(:first-child)]:border-y",e),...t}));Lu.displayName="TableRow";const jf=q.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:Pe(t.condensed?"p-0 px-4":"p-4"," align-middle [&:has([role=checkbox])]:pr-0 ","[&:not(:last-child)&:not(:first-child)]:border-x",e),...t}));jf.displayName="TableCell";const XE=q.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:Pe("mt-4 text-sm text-muted-foreground",e),...t}));XE.displayName="TableCaption";/**
230
+ `)},M$=0,Ws=[];function L$(e){var t=q.useRef([]),n=q.useRef([0,0]),r=q.useRef(),o=q.useState(M$++)[0],a=q.useState(function(){return Mp()})[0],i=q.useRef(e);q.useEffect(function(){i.current=e},[e]),q.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=sx([e.lockRef.current],(e.shards||[]).map(FE),!0).filter(Boolean);return h.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=q.useCallback(function(h,w){if("touches"in h&&h.touches.length===2)return!i.current.allowPinchZoom;var E=Ff(h),j=n.current,P="deltaX"in h?h.deltaX:j[0]-E[0],N="deltaY"in h?h.deltaY:j[1]-E[1],$,G=h.target,V=Math.abs(P)>Math.abs(N)?"h":"v";if("touches"in h&&V==="h"&&G.type==="range")return!1;var J=wE(V,G);if(!J)return!0;if(J?$=V:($=V==="v"?"h":"v",J=wE(V,G)),!J)return!1;if(!r.current&&"changedTouches"in h&&(P||N)&&(r.current=$),!$)return!0;var Q=r.current||$;return O$(Q,w,h,Q==="h"?P:N,!0)},[]),u=q.useCallback(function(h){var w=h;if(!(!Ws.length||Ws[Ws.length-1]!==a)){var E="deltaY"in w?DE(w):Ff(w),j=t.current.filter(function($){return $.name===w.type&&$.target===w.target&&$$($.delta,E)})[0];if(j&&j.should){w.preventDefault();return}if(!j){var P=(i.current.shards||[]).map(FE).filter(Boolean).filter(function($){return $.contains(w.target)}),N=P.length>0?s(w,P[0]):!i.current.noIsolation;N&&w.preventDefault()}}},[]),c=q.useCallback(function(h,w,E,j){var P={name:h,delta:w,target:E,should:j};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(N){return N!==P})},1)},[]),d=q.useCallback(function(h){n.current=Ff(h),r.current=void 0},[]),g=q.useCallback(function(h){c(h.type,DE(h),h.target,s(h,e.lockRef.current))},[]),v=q.useCallback(function(h){c(h.type,Ff(h),h.target,s(h,e.lockRef.current))},[]);q.useEffect(function(){return Ws.push(a),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Vs),document.addEventListener("touchmove",u,Vs),document.addEventListener("touchstart",d,Vs),function(){Ws=Ws.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,Vs),document.removeEventListener("touchmove",u,Vs),document.removeEventListener("touchstart",d,Vs)}},[]);var y=e.removeScrollBar,C=e.inert;return q.createElement(q.Fragment,null,C?q.createElement(a,{styles:R$(o)}):null,y?q.createElement(px,{gapMode:"margin"}):null)}const _$=dx(CE,L$);var AE=q.forwardRef(function(e,t){return q.createElement(Sf,zn({},e,{ref:t,sideCar:_$}))});AE.classNames=Sf.classNames;const V$=AE,jE="Dialog",[IE,j_]=n$(jE),[W$,Pi]=IE(jE),H$=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=p.useRef(null),u=p.useRef(null),[c=!1,d]=i$({prop:r,defaultProp:o,onChange:a});return p.createElement(W$,{scope:t,triggerRef:s,contentRef:u,contentId:Am(),titleId:Am(),descriptionId:Am(),open:c,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(g=>!g),[d]),modal:i},n)},TE="DialogPortal",[G$,kE]=IE(TE,{forceMount:void 0}),z$=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Pi(TE,t);return p.createElement(G$,{scope:t,forceMount:n},p.Children.map(r,i=>p.createElement(wf,{present:n||a.open},p.createElement(F$,{asChild:!0,container:o},i))))},$m="DialogOverlay",U$=p.forwardRef((e,t)=>{const n=kE($m,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Pi($m,e.__scopeDialog);return a.modal?p.createElement(wf,{present:r||a.open},p.createElement(Z$,ye({},o,{ref:t}))):null}),Z$=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pi($m,n);return p.createElement(V$,{as:jm,allowPinchZoom:!0,shards:[o.contentRef]},p.createElement(Cf.div,ye({"data-state":BE(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Ou="DialogContent",X$=p.forwardRef((e,t)=>{const n=kE(Ou,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Pi(Ou,e.__scopeDialog);return p.createElement(wf,{present:r||a.open},a.modal?p.createElement(Y$,ye({},o,{ref:t})):p.createElement(J$,ye({},o,{ref:t})))}),Y$=p.forwardRef((e,t)=>{const n=Pi(Ou,e.__scopeDialog),r=p.useRef(null),o=Nu(t,n.contentRef,r);return p.useEffect(()=>{const a=r.current;if(a)return jd(a)},[]),p.createElement(PE,ye({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_s(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=n.triggerRef.current)===null||i===void 0||i.focus()}),onPointerDownOutside:_s(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:_s(e.onFocusOutside,a=>a.preventDefault())}))}),J$=p.forwardRef((e,t)=>{const n=Pi(Ou,e.__scopeDialog),r=p.useRef(!1);return p.createElement(PE,ye({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,o),!o.defaultPrevented){var i;r.current||(i=n.triggerRef.current)===null||i===void 0||i.focus(),o.preventDefault()}r.current=!1},onInteractOutside:o=>{var a,i;(a=e.onInteractOutside)===null||a===void 0||a.call(e,o),o.defaultPrevented||(r.current=!0);const s=o.target;((i=n.triggerRef.current)===null||i===void 0?void 0:i.contains(s))&&o.preventDefault()}}))}),PE=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=Pi(Ou,n),u=p.useRef(null),c=Nu(t,u);return I$(),p.createElement(p.Fragment,null,p.createElement(x$,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a},p.createElement(m$,ye({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":BE(s.open)},i,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function BE(e){return e?"open":"closed"}const K$=H$,Q$=z$,q$=U$,eR=X$;var NE=1,tR=.9,nR=.3,Rm=.1,rR=0,Mm=.999,oR=.9999,aR=.99,OE=/[\\\/\-_+.# \t"@\[\(\{&]/,iR=/[\\\/\-_+.# \t"@\[\(\{&]/g;function Lm(e,t,n,r,o,a){if(a===t.length)return o===e.length?NE:aR;for(var i=r.charAt(a),s=n.indexOf(i,o),u=0,c,d,g;s>=0;)c=Lm(e,t,n,r,s+1,a+1),c>u&&(s===o?c*=NE:OE.test(e.charAt(s-1))?(c*=tR,g=e.slice(o,s-1).match(iR),g&&o>0&&(c*=Math.pow(Mm,g.length))):OE.test(e.slice(o,s-1))?(c*=rR,o>0&&(c*=Math.pow(Mm,s-o))):(c*=nR,o>0&&(c*=Math.pow(Mm,s-o))),e.charAt(s)!==t.charAt(a)&&(c*=oR)),c<Rm&&n.charAt(s-1)===r.charAt(a+1)&&n.charAt(s-1)!==r.charAt(a)&&(d=Lm(e,t,n,r,s+1,a+2),d*Rm>c&&(c=d*Rm)),c>u&&(u=c),s=n.indexOf(i,s+1);return u}function sR(e,t){return Lm(e,t,e.toLowerCase(),t.toLowerCase(),0,0)}var lR=sR;const uR=zl(lR);var cR='[cmdk-list-sizer=""]',$u='[cmdk-group=""]',_m='[cmdk-group-items=""]',dR='[cmdk-group-heading=""]',$E='[cmdk-item=""]',RE=`${$E}:not([aria-disabled="true"])`,Vm="cmdk-item-select",Oa="data-value",fR=(e,t)=>uR(e,t),ME=q.createContext(void 0),Ru=()=>q.useContext(ME),LE=q.createContext(void 0),Wm=()=>q.useContext(LE),_E=q.createContext(void 0),VE=q.forwardRef((e,t)=>{let n=q.useRef(null),r=Gs(()=>({search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}})),o=Gs(()=>new Set),a=Gs(()=>new Map),i=Gs(()=>new Map),s=Gs(()=>new Set),u=WE(e),{label:c,children:d,value:g,onValueChange:v,filter:y,shouldFilter:C,...h}=e,w=q.useId(),E=q.useId(),j=q.useId(),P=ER();Hs(()=>{if(g!==void 0){let Z=g.trim().toLowerCase();r.current.value=Z,P(6,he),N.emit()}},[g]);let N=q.useMemo(()=>({subscribe:Z=>(s.current.add(Z),()=>s.current.delete(Z)),snapshot:()=>r.current,setState:(Z,te,U)=>{var K,me,H;if(!Object.is(r.current[Z],te)){if(r.current[Z]=te,Z==="search")Q(),V(),P(1,J);else if(Z==="value")if(((K=u.current)==null?void 0:K.value)!==void 0){(H=(me=u.current).onValueChange)==null||H.call(me,te);return}else U||P(5,he);N.emit()}},emit:()=>{s.current.forEach(Z=>Z())}}),[]),$=q.useMemo(()=>({value:(Z,te)=>{te!==i.current.get(Z)&&(i.current.set(Z,te),r.current.filtered.items.set(Z,G(te)),P(2,()=>{V(),N.emit()}))},item:(Z,te)=>(o.current.add(Z),te&&(a.current.has(te)?a.current.get(te).add(Z):a.current.set(te,new Set([Z]))),P(3,()=>{Q(),V(),r.current.value||J(),N.emit()}),()=>{i.current.delete(Z),o.current.delete(Z),r.current.filtered.items.delete(Z),P(4,()=>{Q(),J(),N.emit()})}),group:Z=>(a.current.has(Z)||a.current.set(Z,new Set),()=>{i.current.delete(Z),a.current.delete(Z)}),filter:()=>u.current.shouldFilter,label:c||e["aria-label"],listId:w,inputId:j,labelId:E}),[]);function G(Z){var te;let U=((te=u.current)==null?void 0:te.filter)??fR;return Z?U(Z,r.current.search):0}function V(){if(!n.current||!r.current.search||u.current.shouldFilter===!1)return;let Z=r.current.filtered.items,te=[];r.current.filtered.groups.forEach(K=>{let me=a.current.get(K),H=0;me.forEach(ge=>{let ie=Z.get(ge);H=Math.max(ie,H)}),te.push([K,H])});let U=n.current.querySelector(cR);ne().sort((K,me)=>{let H=K.getAttribute(Oa),ge=me.getAttribute(Oa);return(Z.get(ge)??0)-(Z.get(H)??0)}).forEach(K=>{let me=K.closest(_m);me?me.appendChild(K.parentElement===me?K:K.closest(`${_m} > *`)):U.appendChild(K.parentElement===U?K:K.closest(`${_m} > *`))}),te.sort((K,me)=>me[1]-K[1]).forEach(K=>{let me=n.current.querySelector(`${$u}[${Oa}="${K[0]}"]`);me==null||me.parentElement.appendChild(me)})}function J(){let Z=ne().find(U=>!U.ariaDisabled),te=Z==null?void 0:Z.getAttribute(Oa);N.setState("value",te||void 0)}function Q(){if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let Z=0;for(let te of o.current){let U=i.current.get(te),K=G(U);r.current.filtered.items.set(te,K),K>0&&Z++}for(let[te,U]of a.current)for(let K of U)if(r.current.filtered.items.get(K)>0){r.current.filtered.groups.add(te);break}r.current.filtered.count=Z}function he(){var Z,te,U;let K=xe();K&&(((Z=K.parentElement)==null?void 0:Z.firstChild)===K&&((U=(te=K.closest($u))==null?void 0:te.querySelector(dR))==null||U.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function xe(){return n.current.querySelector(`${$E}[aria-selected="true"]`)}function ne(){return Array.from(n.current.querySelectorAll(RE))}function de(Z){let te=ne()[Z];te&&N.setState("value",te.getAttribute(Oa))}function R(Z){var te;let U=xe(),K=ne(),me=K.findIndex(ge=>ge===U),H=K[me+Z];(te=u.current)!=null&&te.loop&&(H=me+Z<0?K[K.length-1]:me+Z===K.length?K[0]:K[me+Z]),H&&N.setState("value",H.getAttribute(Oa))}function W(Z){let te=xe(),U=te==null?void 0:te.closest($u),K;for(;U&&!K;)U=Z>0?CR(U,$u):wR(U,$u),K=U==null?void 0:U.querySelector(RE);K?N.setState("value",K.getAttribute(Oa)):R(Z)}let oe=()=>de(ne().length-1),pe=Z=>{Z.preventDefault(),Z.metaKey?oe():Z.altKey?W(1):R(1)},se=Z=>{Z.preventDefault(),Z.metaKey?de(0):Z.altKey?W(-1):R(-1)};return q.createElement("div",{ref:Mu([n,t]),...h,"cmdk-root":"",onKeyDown:Z=>{var te;if((te=h.onKeyDown)==null||te.call(h,Z),!Z.defaultPrevented)switch(Z.key){case"n":case"j":{Z.ctrlKey&&pe(Z);break}case"ArrowDown":{pe(Z);break}case"p":case"k":{Z.ctrlKey&&se(Z);break}case"ArrowUp":{se(Z);break}case"Home":{Z.preventDefault(),de(0);break}case"End":{Z.preventDefault(),oe();break}case"Enter":{Z.preventDefault();let U=xe();if(U){let K=new Event(Vm);U.dispatchEvent(K)}}}}},q.createElement("label",{"cmdk-label":"",htmlFor:$.inputId,id:$.labelId,style:SR},c),q.createElement(LE.Provider,{value:N},q.createElement(ME.Provider,{value:$},d)))}),gR=q.forwardRef((e,t)=>{let n=q.useId(),r=q.useRef(null),o=q.useContext(_E),a=Ru(),i=WE(e);Hs(()=>a.item(n,o),[]);let s=HE(n,r,[e.value,e.children,r]),u=Wm(),c=zs(E=>E.value&&E.value===s.current),d=zs(E=>a.filter()===!1?!0:E.search?E.filtered.items.get(n)>0:!0);q.useEffect(()=>{let E=r.current;if(!(!E||e.disabled))return E.addEventListener(Vm,g),()=>E.removeEventListener(Vm,g)},[d,e.onSelect,e.disabled]);function g(){var E,j;(j=(E=i.current).onSelect)==null||j.call(E,s.current)}function v(){u.setState("value",s.current,!0)}if(!d)return null;let{disabled:y,value:C,onSelect:h,...w}=e;return q.createElement("div",{ref:Mu([r,t]),...w,"cmdk-item":"",role:"option","aria-disabled":y||void 0,"aria-selected":c||void 0,"data-selected":c||void 0,onPointerMove:y?void 0:v,onClick:y?void 0:g},e.children)}),pR=q.forwardRef((e,t)=>{let{heading:n,children:r,...o}=e,a=q.useId(),i=q.useRef(null),s=q.useRef(null),u=q.useId(),c=Ru(),d=zs(v=>c.filter()===!1?!0:v.search?v.filtered.groups.has(a):!0);Hs(()=>c.group(a),[]),HE(a,i,[e.value,e.heading,s]);let g=q.createElement(_E.Provider,{value:a},r);return q.createElement("div",{ref:Mu([i,t]),...o,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&q.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),q.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},g))}),hR=q.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=q.useRef(null),a=zs(i=>!i.search);return!n&&!a?null:q.createElement("div",{ref:Mu([o,t]),...r,"cmdk-separator":"",role:"separator"})}),mR=q.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=Wm(),i=zs(u=>u.search),s=Ru();return q.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),q.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,id:s.inputId,type:"text",value:o?e.value:i,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),vR=q.forwardRef((e,t)=>{let{children:n,...r}=e,o=q.useRef(null),a=q.useRef(null),i=Ru();return q.useEffect(()=>{if(a.current&&o.current){let s=a.current,u=o.current,c,d=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let g=s.getBoundingClientRect().height;u.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return d.observe(s),()=>{cancelAnimationFrame(c),d.unobserve(s)}}},[]),q.createElement("div",{ref:Mu([o,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:i.listId,"aria-labelledby":i.inputId},q.createElement("div",{ref:a,"cmdk-list-sizer":""},n))}),bR=q.forwardRef((e,t)=>{let{open:n,onOpenChange:r,container:o,...a}=e;return q.createElement(K$,{open:n,onOpenChange:r},q.createElement(Q$,{container:o},q.createElement(q$,{"cmdk-overlay":""}),q.createElement(eR,{"aria-label":e.label,"cmdk-dialog":""},q.createElement(VE,{ref:t,...a}))))}),xR=q.forwardRef((e,t)=>{let n=q.useRef(!0),r=zs(o=>o.filtered.count===0);return q.useEffect(()=>{n.current=!1},[]),n.current||!r?null:q.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),yR=q.forwardRef((e,t)=>{let{progress:n,children:r,...o}=e;return q.createElement("div",{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},q.createElement("div",{"aria-hidden":!0},r))}),gr=Object.assign(VE,{List:vR,Item:gR,Input:mR,Group:pR,Separator:hR,Dialog:bR,Empty:xR,Loading:yR});function CR(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function wR(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function WE(e){let t=q.useRef(e);return Hs(()=>{t.current=e}),t}var Hs=typeof window>"u"?q.useEffect:q.useLayoutEffect;function Gs(e){let t=q.useRef();return t.current===void 0&&(t.current=e()),t}function Mu(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function zs(e){let t=Wm(),n=()=>e(t.snapshot());return q.useSyncExternalStore(t.subscribe,n,n)}function HE(e,t,n){let r=q.useRef(),o=Ru();return Hs(()=>{var a;let i=(()=>{var s;for(let u of n){if(typeof u=="string")return u.trim().toLowerCase();if(typeof u=="object"&&"current"in u&&u.current)return(s=u.current.textContent)==null?void 0:s.trim().toLowerCase()}})();o.value(e,i),(a=t.current)==null||a.setAttribute(Oa,i),r.current=i}),r}var ER=()=>{let[e,t]=q.useState(),n=Gs(()=>new Map);return Hs(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}},SR={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Af=q.forwardRef(({className:e,...t},n)=>l.jsx(gr,{ref:n,className:Pe("flex h-full w-full flex-col overflow-hidden rounded bg-popover text-popover-foreground",e),...t}));Af.displayName=gr.displayName;const DR=({children:e,...t})=>l.jsx(qw,{...t,children:l.jsx(Sm,{className:"overflow-hidden p-0 shadow-lg",children:l.jsx(Af,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Hm=q.forwardRef(({className:e,...t},n)=>l.jsxs("div",{dir:t.dir,className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 shrink-0 opacity-50",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"11",cy:"11",r:"8"}),l.jsx("path",{d:"m21 21-4.3-4.3"})]}),l.jsx(gr.Input,{ref:n,className:Pe("flex h-11 w-full rounded bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Hm.displayName=gr.Input.displayName;const GE=q.forwardRef(({className:e,...t},n)=>l.jsx(gr.List,{ref:n,className:Pe("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));GE.displayName=gr.List.displayName;const Gm=q.forwardRef((e,t)=>l.jsx(gr.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Gm.displayName=gr.Empty.displayName;const zm=q.forwardRef(({className:e,...t},n)=>l.jsx(gr.Group,{ref:n,className:Pe("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));zm.displayName=gr.Group.displayName;const zE=q.forwardRef(({className:e,...t},n)=>l.jsx(gr.Separator,{ref:n,className:Pe("-mx-1 h-px bg-border",e),...t}));zE.displayName=gr.Separator.displayName;const Um=q.forwardRef(({className:e,...t},n)=>l.jsx(gr.Item,{ref:n,className:Pe("relative flex cursor-default select-none items-center rounded-inner px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));Um.displayName=gr.Item.displayName;const UE=({className:e,...t})=>l.jsx("span",{className:Pe("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});UE.displayName="CommandShortcut";const FR=e=>{var a,i,s,u,c;const[t,n]=q.useState(!1),[r,o]=q.useState((a=e.defaultValue)==null?void 0:a.value);return l.jsx(hh,{className:"w-[200px] p-0",open:t,disableTrigger:e.isLoading,onOpenChange:n,trigger:l.jsxs("div",{className:"relative flex max-h-fit flex-col items-start gap-2 ",children:[e.label&&l.jsx(Ea,{children:e.label}),e.isLoading?l.jsx(Go,{className:"h-[38px] w-[200px]"}):l.jsxs(Qe,{disabled:e.isLoading,variant:"outline",role:"combobox","aria-expanded":t,className:"h-[38px] w-[200px] justify-between",children:[r?(i=e.items.find(d=>d.value===r))==null?void 0:i.label:((s=e.texts)==null?void 0:s.placeholder)??"Select item...",l.jsxs("svg",{"aria-label":"Expand Up-Down Icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4 shrink-0 opacity-50",children:[l.jsx("path",{d:"m7 15 5 5 5-5"}),l.jsx("path",{d:"m7 9 5-5 5 5"})]})]})]}),children:l.jsxs(Af,{children:[l.jsx(Hm,{dir:e.direction,placeholder:((u=e.texts)==null?void 0:u.searchPlaceholder)??"Search items..."}),l.jsx(Gm,{children:((c=e.texts)==null?void 0:c.nothingFound)??"No framework found."}),l.jsx(zm,{children:e.items.map(d=>l.jsxs(Um,{dir:e.direction,className:"flex flex-row gap-1",onSelect:g=>{o(g===r?"":g),n(!1)},children:[l.jsx("svg",{"aria-label":"Check Mark Icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:Pe("h-4 w-4",r===d.value?"opacity-100":"opacity-0"),children:l.jsx("polyline",{points:"20 6 9 17 4 12"})}),d.label]},d.value))})]})})},Zm=q.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full overflow-auto rounded border",children:l.jsx("table",{ref:n,className:Pe("w-full caption-bottom text-sm",e),...t})}));Zm.displayName="Table";const Xm=q.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:Pe("[&_tr]:border-b","bg-muted/50",e),...t}));Xm.displayName="TableHeader";const Ym=q.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:Pe(" text-start align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&:not(:last-child)&:not(:first-child)]:border-x",t.condensed?"h-8":"h-12",t.clickable?"px-1":"px-4",t.clickable?" [&:not(:last-child)&:not(:first-child)]:p-1":"px-4",e),...t}));Ym.displayName="TableHead";const Jm=q.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:Pe("border-none",e),...t}));Jm.displayName="TableBody";const ZE=q.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:Pe("bg-primary font-medium text-primary-foreground",e),...t}));ZE.displayName="TableFooter";const Lu=q.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:Pe("transition-colors data-[state=selected]:bg-muted","[&:not(:last-child)&:not(:first-child)]:border-y",e),...t}));Lu.displayName="TableRow";const jf=q.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:Pe(t.condensed?"p-0 px-4":"p-4"," align-middle [&:has([role=checkbox])]:pr-0 ","[&:not(:last-child)&:not(:first-child)]:border-x",e),...t}));jf.displayName="TableCell";const XE=q.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:Pe("mt-4 text-sm text-muted-foreground",e),...t}));XE.displayName="TableCaption";/**
231
231
  * table-core
232
232
  *
233
233
  * Copyright (c) TanStack
@@ -248,7 +248,7 @@ Defaulting to \`${cm}\`.`}function bw(e){return YN.includes(e)}const xw=vw,yw=q.
248
248
  * LICENSE.md file in the root directory of this source tree.
249
249
  *
250
250
  * @license MIT
251
- */function l3(e,t){return e?rM(e)?q.createElement(e,t):e:null}function rM(e){return oM(e)||typeof e=="function"||aM(e)}function oM(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function aM(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function iM(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=q.useState(()=>({current:ZR(t)})),[r,o]=q.useState(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:i=>{o(i),e.onStateChange==null||e.onStateChange(i)}})),n.current}const sM=({columns:e,data:t,...n})=>{var w,E,j,P,N,$,G,V,J,Q,he;const[r,o]=q.useState([]),[a,i]=q.useState([]),[s,u]=q.useState(""),[c,d]=q.useState({}),[g,v]=q.useState({}),[y,C]=q.useState({}),h=iM({data:t,columns:e,onExpandedChange:d,getExpandedRowModel:tM(),onGlobalFilterChange:u,onSortingChange:o,onColumnFiltersChange:i,getCoreRowModel:YR(),getPaginationRowModel:nM(),getSortedRowModel:eM(),getFilteredRowModel:qR(),onColumnVisibilityChange:v,onRowSelectionChange:C,state:{sorting:r,columnFilters:a,columnVisibility:g,globalFilter:s,rowSelection:y,expanded:c}});return l.jsxs("div",{className:"flex w-full flex-col gap-4",children:[l.jsx("div",{className:"flex items-center",children:l.jsx(Ot,{placeholder:(w=n.texts)==null?void 0:w.searchPlaceholder,value:s??"",onChange:xe=>u(xe.target.value),margin:"none",className:"w-full md:max-w-sm"})}),l.jsx("div",{className:"rounded-md",children:l.jsxs(Zm,{children:[h.getAllColumns().length>0&&l.jsx(Xm,{children:h.getHeaderGroups().map(xe=>l.jsx(Lu,{children:xe.headers.map(ne=>{var R;let de=(R=ne.column.columnDef.meta)==null?void 0:R.sortable;return l.jsx(Ym,{condensed:n.condensed,clickable:de,children:ne.isPlaceholder?null:l3(ne.column.columnDef.header,ne.getContext())},ne.id)})},xe.id))}),l.jsx(Jm,{children:(E=h.getRowModel().rows)!=null&&E.length?h.getRowModel().rows.map(xe=>l.jsx(Lu,{"data-state":xe.getIsSelected()&&"selected",children:xe.getVisibleCells().map(ne=>l.jsx(jf,{condensed:n.condensed,children:l3(ne.column.columnDef.cell,ne.getContext())},ne.id))},xe.id)):l.jsx(Lu,{children:l.jsx(jf,{colSpan:e.length,className:"h-24 text-center",children:(j=n.texts)==null?void 0:j.noData})})})]})}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"flex w-fit flex-row items-center gap-2 text-sm text-muted-foreground"}),l.jsxs("div",{className:"flex w-fit flex-row items-center gap-2 ",children:[l.jsx(pi,{size:"sm",width:"parent",direction:n.direction,items:[{label:`10 / ${(P=n.texts)==null?void 0:P.page}`,value:10},{label:`20 / ${(N=n.texts)==null?void 0:N.page}`,value:20},{label:`30 / ${($=n.texts)==null?void 0:$.page}`,value:30},{label:`40 / ${(G=n.texts)==null?void 0:G.page}`,value:40},{label:`50 / ${(V=n.texts)==null?void 0:V.page}`,value:50}],trigger:l.jsx(Qe,{variant:"outline",size:"icon",className:"h-fit w-fit p-0 px-2 py-1 ",children:`${h.getState().pagination.pageSize} / ${(J=n.texts)==null?void 0:J.page}`}),onItemSelect:xe=>h.setPageSize(Number(xe))}),l.jsx("div",{className:"flex w-fit flex-row items-center gap-2 text-sm ",children:h.getPageCount()!==0&&l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx("div",{children:(Q=n.texts)==null?void 0:Q.page}),l.jsxs("div",{className:"flex flex-row gap-1",children:[l.jsx("span",{className:"font-bold",children:h.getState().pagination.pageIndex+1}),l.jsx("span",{children:(he=n.texts)==null?void 0:he.of}),l.jsx("span",{className:"font-bold",children:h.getPageCount()})]})]})}),l.jsx(Qe,{variant:"outline",size:"smallIcon",onClick:()=>h.previousPage(),disabled:!h.getCanPreviousPage(),className:Pe(n.direction==="ltr"&&"rotate-180"),children:l.jsx("svg",{"aria-label":"Chevron Right Icon",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",children:l.jsx("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"})})}),l.jsx(Qe,{variant:"outline",size:"smallIcon",onClick:()=>h.nextPage(),disabled:!h.getCanNextPage(),className:Pe(n.direction==="rtl"&&"rotate-180"),children:l.jsx("svg",{"aria-label":"Chevron Right Icon",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",children:l.jsx("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"})})})]})]})]})},lM=e=>l.jsxs(Qe,{variant:"ghost",className:Pe("flex w-full flex-row justify-start gap-2",e.condensed&&"h-6"),onClick:e.onSort,children:[e.label,l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e.condensed?"h-3 w-3":"h-4 w-4",children:[l.jsx("path",{d:"m21 16-4 4-4-4"}),l.jsx("path",{d:"M17 20V4"}),l.jsx("path",{d:"m3 8 4-4 4 4"}),l.jsx("path",{d:"M7 4v16"})]})]}),uM=e=>l.jsx("div",{children:e.children}),cM=e=>l.jsx("div",{className:"fixed bottom-0 top-auto left-0 m-0 w-full max-w-full p-1",children:l.jsx("div",{className:"flex w-full flex-row items-center justify-evenly rounded bg-gray-200",children:e.appBarContent.map((t,n)=>l.jsxs("div",{className:"m-1 flex h-full w-full flex-col items-center justify-center rounded p-2 transition-all hover:cursor-pointer hover:bg-buttonPrimary-700 hover:text-white",onClick:t.action,children:[l.jsx("div",{children:t.icon}),l.jsx("div",{className:"mt-2 text-sm",children:t.label})]},n))})}),gv=(e=!1)=>{const[t,n]=p.useState(e);return{isOpen:t,onOpen:()=>n(!0),onClose:()=>n(!1)}},Bf=()=>{const[e,t]=p.useState(window==null?void 0:window.innerWidth),n=()=>{t(window==null?void 0:window.innerWidth)};return p.useEffect(()=>{if(typeof window<"u")return window==null||window.addEventListener("resize",n),()=>{window==null||window.removeEventListener("resize",n)}},[]),e},dM=({direction:e="rtl",navigationSize:t="md",...n})=>{var d;const[r,o]=p.useState(!1);p.useState(!1),gv(!1);const a=p.useRef(null);p.useRef(null);let i;typeof window<"u"?i=Bf():i=1200;const[s,u]=p.useState(!1);p.useEffect(()=>{const g=v=>{a.current&&!a.current.contains(v.target)&&!s&&o(!1)};return document.addEventListener("click",g,!0),()=>{document.removeEventListener("click",g,!0)}},[s]);let c={sm:"h-10",md:"",lg:"h-24"};return l.jsxs("div",{className:"h-full w-full",children:[l.jsxs("div",{className:_e("z-30 flex w-auto select-none flex-row items-start justify-between bg-layoutPrimary-500 transition-all",c[t],"rounded p-3 ",r?"h-44":"h-14",n.stickyNav?"fixed left-4 right-4 top-4":"",e==="rtl"?"flex-row":"flex-row-reverse"),children:[i>600?l.jsx("div",{className:"flex flex-row h-8 items-center gap-4 px-3",children:(d=n.navItems)==null?void 0:d.map(({label:g},v)=>l.jsx("div",{onClick:()=>o(!r),className:"cursor-pointer rounded bg-none text-gray-600 transition-all hover:text-black",children:g},v))}):l.jsxs("div",{className:"flex items-center justify-center",children:[l.jsxs("div",{onClick:()=>o(!r),className:"cursor-pointer rounded p-1 transition-all hover:bg-gray-100",children:[l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",height:"1.6em",width:"1.6em",children:l.jsx("path",{fillRule:"evenodd",d:"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})," "]}),n.pageTitle?l.jsx("div",{children:n.pageTitle}):l.jsx("div",{})]}),l.jsx("div",{className:"h-full",children:l.jsx("img",{className:"h-full max-h-8 ",src:`https://sikka-images.s3.ap-southeast-1.amazonaws.com/seera/seera-horizontal-wordmark-${e==="rtl"?"ar":"en"}-white.svg`})})]}),l.jsx("div",{className:_e(" relative top-14"),children:n.children})]})},u3="Collapsible",[fM,c3]=cr(u3),[gM,pv]=fM(u3),pM=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[u=!1,c]=jr({prop:r,defaultProp:o,onChange:i});return p.createElement(gM,{scope:n,disabled:a,contentId:Ir(),open:u,onOpenToggle:p.useCallback(()=>c(d=>!d),[c])},p.createElement(Et.div,ye({"data-state":hv(u),"data-disabled":a?"":void 0},s,{ref:t})))}),hM="CollapsibleTrigger",mM=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=pv(hM,n);return p.createElement(Et.button,ye({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":hv(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:ot(e.onClick,o.onOpenToggle)}))}),d3="CollapsibleContent",vM=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pv(d3,e.__scopeCollapsible);return p.createElement(Kn,{present:n||o.open},({present:a})=>p.createElement(bM,ye({},r,{ref:t,present:a})))}),bM=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=pv(d3,n),[s,u]=p.useState(r),c=p.useRef(null),d=Jt(t,c),g=p.useRef(0),v=g.current,y=p.useRef(0),C=y.current,h=i.open||s,w=p.useRef(h),E=p.useRef();return p.useEffect(()=>{const j=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(j)},[]),Aa(()=>{const j=c.current;if(j){E.current=E.current||{transitionDuration:j.style.transitionDuration,animationName:j.style.animationName},j.style.transitionDuration="0s",j.style.animationName="none";const P=j.getBoundingClientRect();g.current=P.height,y.current=P.width,w.current||(j.style.transitionDuration=E.current.transitionDuration,j.style.animationName=E.current.animationName),u(r)}},[i.open,r]),p.createElement(Et.div,ye({"data-state":hv(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h},a,{ref:d,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...e.style}}),h&&o)});function hv(e){return e?"open":"closed"}const xM=pM,yM=mM,CM=vM,Ma="Accordion",wM=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[mv,EM,SM]=bd(Ma),[Nf,W_]=cr(Ma,[SM,c3]),vv=c3(),f3=p.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return p.createElement(mv.Provider,{scope:e.__scopeAccordion},n==="multiple"?p.createElement(jM,ye({},a,{ref:t})):p.createElement(AM,ye({},o,{ref:t})))});f3.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[g3,DM]=Nf(Ma),[p3,FM]=Nf(Ma,{collapsible:!1}),AM=p.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,u]=jr({prop:n,defaultProp:r,onChange:o});return p.createElement(g3,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:u,onItemClose:p.useCallback(()=>a&&u(""),[a,u])},p.createElement(p3,{scope:e.__scopeAccordion,collapsible:a},p.createElement(h3,ye({},i,{ref:t}))))}),jM=p.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i=[],s]=jr({prop:n,defaultProp:r,onChange:o}),u=p.useCallback(d=>s((g=[])=>[...g,d]),[s]),c=p.useCallback(d=>s((g=[])=>g.filter(v=>v!==d)),[s]);return p.createElement(g3,{scope:e.__scopeAccordion,value:i,onItemOpen:u,onItemClose:c},p.createElement(p3,{scope:e.__scopeAccordion,collapsible:!0},p.createElement(h3,ye({},a,{ref:t}))))}),[IM,Of]=Nf(Ma),h3=p.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...i}=e,s=p.useRef(null),u=Jt(s,t),c=EM(n),g=xd(o)==="ltr",v=ot(e.onKeyDown,y=>{var C;if(!wM.includes(y.key))return;const h=y.target,w=c().filter(Q=>{var he;return!((he=Q.ref.current)!==null&&he!==void 0&&he.disabled)}),E=w.findIndex(Q=>Q.ref.current===h),j=w.length;if(E===-1)return;y.preventDefault();let P=E;const N=0,$=j-1,G=()=>{P=E+1,P>$&&(P=N)},V=()=>{P=E-1,P<N&&(P=$)};switch(y.key){case"Home":P=N;break;case"End":P=$;break;case"ArrowRight":a==="horizontal"&&(g?G():V());break;case"ArrowDown":a==="vertical"&&G();break;case"ArrowLeft":a==="horizontal"&&(g?V():G());break;case"ArrowUp":a==="vertical"&&V();break}const J=P%j;(C=w[J].ref.current)===null||C===void 0||C.focus()});return p.createElement(IM,{scope:n,disabled:r,direction:o,orientation:a},p.createElement(mv.Slot,{scope:n},p.createElement(Et.div,ye({},i,{"data-orientation":a,ref:u,onKeyDown:r?void 0:v}))))}),bv="AccordionItem",[TM,xv]=Nf(bv),kM=p.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Of(bv,n),i=DM(bv,n),s=vv(n),u=Ir(),c=r&&i.value.includes(r)||!1,d=a.disabled||e.disabled;return p.createElement(TM,{scope:n,open:c,disabled:d,triggerId:u},p.createElement(xM,ye({"data-orientation":a.orientation,"data-state":v3(c)},s,o,{ref:t,disabled:d,open:c,onOpenChange:g=>{g?i.onItemOpen(r):i.onItemClose(r)}})))}),PM="AccordionHeader",BM=p.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Of(Ma,n),a=xv(PM,n);return p.createElement(Et.h3,ye({"data-orientation":o.orientation,"data-state":v3(a.open),"data-disabled":a.disabled?"":void 0},r,{ref:t}))}),m3="AccordionTrigger",NM=p.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Of(Ma,n),a=xv(m3,n),i=FM(m3,n),s=vv(n);return p.createElement(mv.ItemSlot,{scope:n},p.createElement(yM,ye({"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId},s,r,{ref:t})))}),OM="AccordionContent",$M=p.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Of(Ma,n),a=xv(OM,n),i=vv(n);return p.createElement(CM,ye({role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation},i,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function v3(e){return e?"open":"closed"}const RM=f3,MM=kM,LM=BM,b3=NM,x3=$M,_M=RM;let y3="flex flex-1 items-center select-none cursor-pointer bg-primary-foreground rounded justify-between p-2 px-3 font-medium transition-all [&[data-state=open]>svg]:-rotate-90";const C3=q.forwardRef(({className:e,...t},n)=>l.jsx(MM,{ref:n,className:Pe(e),...t}));C3.displayName="AccordionItem";const w3=q.forwardRef(({className:e,showArrow:t,children:n,...r},o)=>l.jsx(LM,{className:"flex",children:l.jsxs(b3,{ref:o,className:Pe(y3,e),...r,children:[n,t&&l.jsx("svg",{"aria-label":"Chevron Right Icon",stroke:"currentColor",fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",className:"h-4 w-4 shrink-0 rotate-90 transition-transform duration-200",children:l.jsx("path",{d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"})})]})}));w3.displayName=b3.displayName;const E3=q.forwardRef(({className:e,children:t,...n},r)=>l.jsx(x3,{ref:r,className:Pe("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...n,children:l.jsx("div",{children:t})}));E3.displayName=x3.displayName;const S3=({title:e,items:t,selectedItem:n,openedItem:r,setOpenedItem:o,onItemClick:a,onSubItemClick:i,direction:s,isOpen:u})=>l.jsxs("div",{children:[e&&l.jsx("h3",{className:"mb-1 font-bold",children:e}),l.jsx("ul",{className:"flex flex-col gap-2",children:l.jsx(_M,{value:r,type:"single",onValueChange:c=>{o(c)},collapsible:!0,className:"flex flex-col gap-1",children:t.map((c,d)=>l.jsx(D3,{isOpen:u,selectedItem:n,direction:s,item:c,onItemClick:a,onSubItemClick:i},d))})})]}),D3=({item:e,onItemClick:t,onSubItemClick:n,direction:r,isOpen:o=!0,...a})=>{const i=s=>a.selectedItem===s?"bg-primary text-primary-foreground cursor-default":"hover:bg-primary/10";return e.subitems?l.jsxs(C3,{value:e.value,className:"overflow-x-clip",dir:r,children:[l.jsx(w3,{className:Pe("overflow-x-clip",a.selectedItem===e.value?"cursor-default bg-primary text-primary-foreground":"hover:bg-primary/10",e.subitems&&e.subitems.some(s=>a.selectedItem===s.value)?"bg-primary text-primary-foreground hover:bg-primary":""),showArrow:o,children:l.jsxs("div",{className:Pe(!o&&"py-1","flex w-fit flex-row items-center gap-2"),children:[e.icon,o&&l.jsx("span",{className:Pe("transition-all ",o?"opacity-100":"opacity-0"),children:e.label})]})}),e.subitems&&l.jsx(E3,{className:" mt-1 h-full rounded ",children:l.jsx("div",{className:Pe("flex h-full flex-col gap-2 bg-foreground/5 p-1"),children:e.subitems.map((s,u)=>l.jsxs("li",{onClick:c=>{c.stopPropagation(),s.onClick(),n&&n([e.value,s.value])},className:Pe("flex h-full cursor-pointer flex-row items-center gap-2 rounded p-2 transition-all",i(s.value)),children:[s.icon,s.label]},u))})})]}):l.jsx("div",{dir:r,onClick:()=>{e.onClick(),t&&t([e.value])},className:Pe(y3,i(e.value),"overflow-x-clip "),children:l.jsxs("div",{className:"flex flex-row items-center gap-2 ",children:[e.icon,l.jsx("span",{className:Pe("whitespace-nowrap transition-all",o?"opacity-100":"opacity-0"),children:e.label})]})})},VM=({direction:e="ltr",drawerSize:t="md",onSettingsClick:n,DrawerFooterActions:r,currentPage:o,clickedItem:a,design:i="default",...s})=>{var $,G;let u=56,c=200,d={opened:{sm:"100",md:c,lg:"250"},closed:{sm:u,md:u,lg:u}};const g=p.useRef(null),v=e==="rtl",[y,C]=p.useState("");p.useState(o);let h;typeof window<"u"?h=Bf():h=1200;const[w,E]=p.useState(()=>h>600?s.keepDrawerOpen!==void 0?s.keepDrawerOpen:!0:!1),[j,P]=p.useState(h>600);let N=h>600?d[w?"opened":"closed"][t]:0;return p.useEffect(()=>{const V=J=>{g.current&&!g.current.contains(J.target)&&!w&&P(!1)};return document.addEventListener("click",V,!0),()=>{document.removeEventListener("click",V,!0)}},[w]),l.jsxs("div",{className:"fixed left-0",children:[s.topBar&&l.jsxs("div",{className:_e("fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-primary-foreground p-2",v?"flex-row-reverse":"flex-row"),children:[h>600?l.jsx("div",{className:_e("dark:text-white",v?[h>600?"mr-14":"mr-2",w?"mr-40":""]:[h>600?"ml-14":"ml-2",w?"ml-40":""]),style:v?{marginRight:`${d[w?"opened":"closed"][t]}px`}:{marginLeft:`${d[w?"opened":"closed"][t]}px`},children:s.pageTitle}):l.jsxs("div",{dir:e,className:"flex items-center justify-center gap-0.5",children:[l.jsx("div",{onClick:()=>P(!0),className:"z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100",children:l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 20 20","aria-hidden":"true",height:"1.6em",width:"1.6em",children:l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"})})}),s.pageTitle?l.jsx("div",{className:"text-sm",children:s.pageTitle}):l.jsx("div",{})]}),l.jsxs("div",{className:_e("flex gap-2 dark:text-white",v?"flex-row-reverse":"flex-row"),children:[h>600?l.jsxs("div",{className:v?"text-left text-xs":"text-right text-xs",children:[l.jsx("div",{className:"font-bold",children:s.username})," ",l.jsx("div",{children:s.email})]}):null,l.jsx(pi,{triggerClassname:"mx-2",align:"end",alignOffset:8,side:"bottom",sideOffset:5,width:s.profileMenuWidth,direction:v?"rtl":"ltr",items:s.profileMenuItems,onItemSelect:V=>console.log("selecting item ",V),trigger:l.jsx("div",{className:"relative h-8 w-8 cursor-pointer overflow-clip rounded ring-1 ring-primary/30 dark:bg-gray-600",children:s.avatarImage?l.jsx("img",{src:s.avatarImage,alt:"User Avatar"}):l.jsx("svg",{"aria-label":"Avatar Icon",className:"absolute -left-1 h-10 w-10 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})})})})]})]}),l.jsxs("div",{className:_e("fixed z-40 flex flex-col justify-between overflow-x-clip transition-all",i==="floating"?v?"right-5 top-5":"bottom-5 left-5 top-5":v?"right-0 top-0 h-full":"left-0 top-0 h-full"),style:{width:h>600?j?`${d.opened[t]}px`:`${d.closed[t]}px`:j?`${d.opened[t]}px`:"0px"},onMouseEnter:()=>{P(!0)},onMouseLeave:()=>{w?P(!0):(C(""),P(!1))},ref:g,children:[l.jsxs("div",{dir:e,className:"fixed z-50 mb-2 flex h-14 w-full flex-row items-center justify-center bg-primary-foreground transition-all",style:{width:h>600?`${j?c:56}px`:`${j?c:0}px`},children:[l.jsx("img",{className:_e("h-9 opacity-0 transition-all",j?"visible opacity-100":"invisible opacity-0"),src:s.logoLink}),h>600?l.jsx("img",{className:_e("fixed h-9 transition-all",i==="floating"?v?"right-7.5 top-7":"left-7.5 top-7":v?"right-2.5 top-2.5":"left-2.5 top-2.5",j?"invisible opacity-0":"visible opacity-100"),src:s.logoSymbol}):null]}),l.jsx("div",{className:_e("fixed bottom-14 bg-primary-foreground p-2 py-2 transition-all",i==="floating"?"top-[76px]":"top-14",j?"overflow-auto":"overflow-hidden"),style:{height:i==="floating"?"calc(100% - 152px)":"calc(100% - 112px)",width:h>600?`${j?c:56}px`:`${j?c:0}px`},children:l.jsx(S3,{direction:e,onItemClick:V=>{a&&a(V)},onSubItemClick:V=>{a&&a(V)},selectedItem:o,openedItem:y,setOpenedItem:V=>C(V),isOpen:j,items:s.drawerItems})}),l.jsxs("div",{className:_e("fixed flex h-14 w-full items-center justify-center gap-2 overflow-clip bg-primary-foreground transition-all",e==="rtl"?"flex-row-reverse":"flex-row",i==="floating"?"bottom-5":"bottom-0"),style:{width:h>600?`${j?c:56}px`:`${j?c:0}px`},children:[r&&j?l.jsx(l.Fragment,{children:r}):null,h>600&&j?l.jsx(Is,{side:"left",delayDuration:500,content:w?(($=s.texts)==null?void 0:$.collapseSidebar)||"Collapse Sidebar":((G=s.texts)==null?void 0:G.expandSidebar)||"Expand Sidebar",children:l.jsx(Qe,{variant:"light",onClick:()=>{E(!w),s.onDrawerExpand&&s.onDrawerExpand(w)},size:"smallIcon",children:l.jsx("svg",{className:_e("h-6 w-6 shrink-0 text-primary transition-all disabled:bg-gray-200 ",w?v?"-rotate-90":"rotate-90":v?"rotate-90":"-rotate-90"),fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})}):null]})]}),l.jsx("div",{className:"fixed overflow-y-auto transition-all",style:i==="floating"?v?{height:`calc(100% - ${s.topBar?"56":"0"}px)`,width:`calc(100% - ${N+20}px)`,left:"0px",top:s.topBar?"56px":"0px"}:{height:`calc(100% - ${s.topBar?"56":"0"}px)`,width:`calc(100% - ${N+20}px)`,left:`${N+20}px`,top:s.topBar?"56px":"0px"}:v?{height:`calc(100% - ${s.topBar?"56":"0"}px)`,width:`calc(100% - ${N}px)`,left:"0px",top:s.topBar?"56px":"0px"}:{height:`calc(100% - ${s.topBar?"56":"0"}px)`,width:`calc(100% - ${N}px)`,left:`${N}px`,top:s.topBar?"56px":"0px"},children:s.children})]})};var F3={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},A3=p.createContext&&p.createContext(F3),La=globalThis&&globalThis.__assign||function(){return La=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},La.apply(this,arguments)},WM=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function j3(e){return e&&e.map(function(t,n){return p.createElement(t.tag,La({key:n},t.attr),j3(t.child))})}function Vu(e){return function(t){return p.createElement(HM,La({attr:La({},e.attr)},t),j3(e.child))}}function HM(e){var t=function(n){var r=e.attr,o=e.size,a=e.title,i=WM(e,["attr","size","title"]),s=o||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),p.createElement("svg",La({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,i,{className:u,style:La(La({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&p.createElement("title",null,a),e.children)};return A3!==void 0?p.createElement(A3.Consumer,null,function(n){return t(n)}):t(F3)}function GM(e){return Vu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M510.846 392.673c-5.211 12.157-27.239 21.089-67.36 27.318-2.064 2.786-3.775 14.686-6.507 23.956-1.625 5.566-5.623 8.869-12.128 8.869l-.297-.005c-9.395 0-19.203-4.323-38.852-4.323-26.521 0-35.662 6.043-56.254 20.588-21.832 15.438-42.771 28.764-74.027 27.399-31.646 2.334-58.025-16.908-72.871-27.404-20.714-14.643-29.828-20.582-56.241-20.582-18.864 0-30.736 4.72-38.852 4.72-8.073 0-11.213-4.922-12.422-9.04-2.703-9.189-4.404-21.263-6.523-24.13-20.679-3.209-67.31-11.344-68.498-32.15a10.627 10.627 0 0 1 8.877-11.069c69.583-11.455 100.924-82.901 102.227-85.934.074-.176.155-.344.237-.515 3.713-7.537 4.544-13.849 2.463-18.753-5.05-11.896-26.872-16.164-36.053-19.796-23.715-9.366-27.015-20.128-25.612-27.504 2.437-12.836 21.725-20.735 33.002-15.453 8.919 4.181 16.843 6.297 23.547 6.297 5.022 0 8.212-1.204 9.96-2.171-2.043-35.936-7.101-87.29 5.687-115.969C158.122 21.304 229.705 15.42 250.826 15.42c.944 0 9.141-.089 10.11-.089 52.148 0 102.254 26.78 126.723 81.643 12.777 28.65 7.749 79.792 5.695 116.009 1.582.872 4.357 1.942 8.599 2.139 6.397-.286 13.815-2.389 22.069-6.257 6.085-2.846 14.406-2.461 20.48.058l.029.01c9.476 3.385 15.439 10.215 15.589 17.87.184 9.747-8.522 18.165-25.878 25.018-2.118.835-4.694 1.655-7.434 2.525-9.797 3.106-24.6 7.805-28.616 17.271-2.079 4.904-1.256 11.211 2.46 18.748.087.168.166.342.239.515 1.301 3.03 32.615 74.46 102.23 85.934 6.427 1.058 11.163 7.877 7.725 15.859z"}}]})(e)}function zM(e){return Vu({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448,209.91a210.06,210.06,0,0,1-122.77-39.25V349.38A162.55,162.55,0,1,1,185,188.31V278.2a74.62,74.62,0,1,0,52.23,71.18V0l88,0a121.18,121.18,0,0,0,1.86,22.17h0A122.18,122.18,0,0,0,381,102.39a121.43,121.43,0,0,0,67,20.14Z"}}]})(e)}function I3(e){return Vu({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"}}]})(e)}const UM=({direction:e="rtl",drawerSize:t="md",onSettingsClick:n,...r})=>{var w;const[o,a]=p.useState(!1),[i,s]=p.useState("");gv(!1);const[u,c]=p.useState(!1),d=p.useRef(null),g=e==="rtl";let v;typeof window<"u"?v=Bf():v=1200,p.useEffect(()=>{const E=j=>{d.current&&!d.current.contains(j.target)&&!u&&a(!1)};return document.addEventListener("click",E,!0),()=>{document.removeEventListener("click",E,!0)}},[u]);let y="fixed top-0 z-40 flex h-full flex-col justify-between overflow-x-clip bg-layoutPrimary-500 transition-all",C={opened:{sm:"100",md:"160",lg:"250"},closed:{sm:"56",md:"56",lg:"56"}},h=v>600?C[u?"opened":"closed"][t]:0;return l.jsxs("div",{className:"fixed",children:[r.topBar&&l.jsxs("div",{className:_e("fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-layoutPrimary-500 p-2",g?"flex-row-reverse":"flex-row"),children:[v>600?r.pageTitle?l.jsx("div",{className:_e(g?[v>600?"mr-14":"mr-2",u?"mr-40":""]:[v>600?"ml-14":"ml-2",u?"ml-40":""]),style:g?{marginRight:`${C[u?"opened":"closed"][t]}px`}:{marginLeft:`${C[u?"opened":"closed"][t]}px`},children:r.pageTitle}):null:l.jsxs("div",{dir:e,className:"flex items-center justify-center gap-0.5 ",children:[l.jsxs("div",{onClick:()=>a(!0),className:"z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100",children:[l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",height:"1.6em",width:"1.6em",children:l.jsx("path",{fillRule:"evenodd",d:"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})," "]}),r.pageTitle?l.jsx("div",{className:"text-sm",children:r.pageTitle}):l.jsx("div",{})]}),l.jsxs("div",{className:_e("flex gap-2",g?"flex-row-reverse":"flex-row"),children:[v>600?l.jsxs("div",{className:_e(g?"text-left text-xs":"text-right text-xs"),children:[l.jsx("div",{className:"font-bold",children:r.username})," ",l.jsx("div",{children:r.email})]}):null,l.jsx(Rd,{direction:e,withHeader:!(v>600),headerTitle:v>600?"":r.username,headerSubtitle:v>600?"":r.email,menuItems:r.profileMenuItems,position:"bottom-left",children:l.jsx("div",{className:"relative h-8 w-8 cursor-pointer overflow-hidden rounded-full ring-1 ring-buttonPrimary-500 dark:bg-gray-600",children:l.jsx("svg",{className:"absolute -left-1 h-10 w-10 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})})})})]})]}),l.jsx("div",{onMouseEnter:()=>{a(!0)},onMouseLeave:()=>a(!!u),ref:d,className:_e(y,C[t],g?"right-0":"left-0"),style:{width:v>600?o?`${C.opened[t]}px`:`${C.closed[t]}px`:o?`${C.opened[t]}px`:"0px"},children:l.jsxs("div",{className:_e("no-scrollbar",r.topBar?"":"mt-2",o?"overflow-auto":"overflow-hidden"),children:[l.jsxs("div",{dir:e,className:_e("fixed z-50 mb-2 flex h-14 flex-row items-center transition-all ",v>600||o?"bg-layoutPrimary-500":"w-0 bg-transparent"),style:{width:v>600?`${C[o?"opened":"closed"][t]-16}px`:"full"},children:[l.jsx("img",{className:_e("fixed top-2.5 h-9 opacity-0 transition-all",g?"right-2.5":"left-2.5",o?"visible opacity-100":"invisible opacity-0"),src:r.logoLink}),v>600?l.jsx("img",{className:_e("fixed top-2.5 h-9 transition-all",g?"right-2.5":"left-2.5",o?"invisible opacity-0":"visible opacity-100"),src:r.logoSymbol}):null]}),l.jsx("div",{className:"mb-10 mt-14",children:(w=r.drawerItems)==null?void 0:w.map((E,j)=>l.jsxs("div",{className:_e("flex flex-col items-stretch justify-center"),children:[E==null?void 0:E.map((P,N)=>{var $,G,V;return l.jsxs("div",{id:"test",className:"flex flex-col",children:[l.jsxs("div",{onClick:()=>{P.subItems?i===P.slug?s(""):s(P.slug):P.action()},className:_e(r.currentPage===P.slug||($=P.subItems)!=null&&$.find(J=>J.slug===r.currentPage)?"bg-buttonPrimary-500 text-white":"hover:bg-layoutPrimary-300","m-2 my-1 flex cursor-pointer flex-row items-center justify-between overflow-x-clip rounded p-2 pl-3 transition-all ",g?"flex-row-reverse pr-3":""),children:[l.jsxs("div",{className:"flex flex-row",dir:e,children:[l.jsx("div",{className:"flex items-center justify-center",children:P.icon}),l.jsx("div",{className:_e("mx-2 whitespace-nowrap text-sm transition-all",o?"opacity-100":"opacity-0"),children:P.label})]}),P.subItems&&l.jsx("div",{className:_e(i&&P.slug===i?"-rotate-90":"rotate-90"),children:l.jsx(I3,{fontSize:11})})]}),P.subItems&&l.jsx("div",{className:_e("m-1 flex cursor-pointer flex-col gap-0 overflow-clip whitespace-nowrap rounded bg-layoutPrimary-300 p-1 transition-all",i==P.slug&&o?"":"my-0 py-0",g?"text-right":"text-left"),style:{height:i==P.slug&&o?6+33*((G=P.subItems)==null?void 0:G.length):0},children:(V=P.subItems)==null?void 0:V.map((J,Q)=>l.jsxs("div",{className:_e("flex flex-row gap-2 overflow-x-clip rounded p-2 px-2 text-xs",g?"text-right":"text-left",r.currentPage===J.slug?"bg-buttonPrimary-500 text-white hover:bg-buttonPrimary-500":"hover:bg-layoutPrimary-500"),dir:e,onClick:()=>{J.action()},children:[l.jsx("div",{className:"flex items-center justify-center",children:J.icon}),l.jsx("div",{className:"flex flex-row justify-between",children:J.label})]},Q))})]},N)}),j!==r.drawerItems.length-1&&l.jsx("div",{className:"my-2 h-[1px] w-10/12 self-center bg-buttonPrimary-500 text-center "})]},j))}),o&&l.jsxs("div",{className:_e("fixed bottom-0 flex flex-row items-center bg-layoutPrimary-500 p-4 transition-all",o?"bg-layoutPrimary-500 ":"bg-red-500",n?"justify-between":"justify-end",e==="rtl"?"right-0":"left-0"),style:{width:`${C[o?"opened":"closed"][t]-16}px`},children:[n&&l.jsx("div",{className:" cursor-pointer rounded p-2 transition-all hover:bg-layoutPrimary-700",onClick:()=>n(),children:l.jsxs("svg",{"aria-label":"Settings Icon",stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",children:[l.jsx("circle",{cx:"12",cy:"12",r:"3"}),l.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}),v>600?l.jsx("div",{className:_e("w-fit transition-all"),style:g?{right:`${C[o?"opened":"closed"][t]-35}px`}:{left:`${C[o?"opened":"closed"][t]-35}px`},children:l.jsx("div",{dir:e,className:_e("relative left-0 top-0 transition-all",o?" opacity-100":" opacity-0"),children:l.jsx("div",{onClick:()=>c(!u),className:"w-fit cursor-pointer rounded bg-gray-300 p-2 transition-all hover:bg-gray-400",children:l.jsx(I3,{fontSize:14,className:_e("transition-all",g?u?"rotate-0":"rotate-180":u?"rotate-180":"rotate-0")})})})}):null]})]})}),l.jsx("div",{className:"fixed overflow-y-auto",style:g?{height:`calc(100% - ${r.topBar?"56":"0"}px)`,width:`calc(100% - ${h}px)`,left:"0px",top:r.topBar?"56px":"0px"}:{height:`calc(100% - ${r.topBar?"56":"0"}px)`,width:`calc(100% - ${h}px)`,left:`${h}px`,top:r.topBar?"56px":"0px"},children:r.children})]})},ZM=({direction:e="rtl",drawerSize:t="md",onSettingsClick:n,DrawerFooterActions:r,...o})=>{var E,j,P;const[a,i]=p.useState(!1),[s,u]=p.useState("");gv(!1);const[c,d]=p.useState(!1),g=p.useRef(null),v=e==="rtl";let y;typeof window<"u"?y=Bf():y=1200,p.useEffect(()=>{const N=$=>{g.current&&!g.current.contains($.target)&&!c&&i(!1)};return document.addEventListener("click",N,!0),()=>{document.removeEventListener("click",N,!0)}},[c]);let C=200,h={opened:{sm:"100",md:C,lg:"250"},closed:{sm:"56",md:"56",lg:"56"}},w=y>600?h[c?"opened":"closed"][t]:0;return l.jsxs("div",{className:"fixed left-0",children:[o.topBar&&l.jsxs("div",{className:_e("fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-primary-foreground p-2",v?"flex-row-reverse":"flex-row"),children:[y>600?l.jsx("div",{className:_e("dark:text-white",v?[y>600?"mr-14":"mr-2",c?"mr-40":""]:[y>600?"ml-14":"ml-2",c?"ml-40":""]),style:v?{marginRight:`${h[c?"opened":"closed"][t]}px`}:{marginLeft:`${h[c?"opened":"closed"][t]}px`},children:o.pageTitle}):l.jsxs("div",{dir:e,className:"flex items-center justify-center gap-0.5",children:[l.jsx("div",{onClick:()=>i(!0),className:"z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100",children:l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",height:"1.6em",width:"1.6em",children:l.jsx("path",{fillRule:"evenodd",d:"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})}),o.pageTitle?l.jsx("div",{className:"text-sm",children:o.pageTitle}):l.jsx("div",{})]}),l.jsxs("div",{className:_e("flex gap-2 dark:text-white",v?"flex-row-reverse":"flex-row"),children:[y>600?l.jsxs("div",{className:v?"text-left text-xs":"text-right text-xs",children:[l.jsx("div",{className:"font-bold",children:o.username})," ",l.jsx("div",{children:o.email})]}):null,l.jsx(pi,{triggerClassname:"mx-2",align:"end",alignOffset:8,side:"bottom",sideOffset:5,direction:v?"rtl":"ltr",trigger:l.jsx("div",{className:"relative h-8 w-8 cursor-pointer overflow-clip rounded ring-1 ring-primary/30 dark:bg-gray-600",children:l.jsx(XM,{})}),items:o.profileMenuItems,onItemSelect:N=>console.log("selecting item ",N)})]})]}),l.jsxs("div",{className:_e("fixed top-0 z-40 flex h-full flex-col justify-between overflow-x-clip transition-all",v?"right-0":"left-0"),style:{width:y>600?a?`${h.opened[t]}px`:`${h.closed[t]}px`:a?`${h.opened[t]}px`:"0px"},onMouseEnter:()=>{i(!0)},onMouseLeave:()=>i(!!c),ref:g,children:[l.jsxs("div",{dir:e,className:_e("fixed z-50 mb-2 flex h-14 w-full flex-row items-center justify-center bg-primary-foreground transition-all"),style:{width:y>600?`${a?C:56}px`:`${a?C:0}px`},children:[l.jsx("img",{className:_e("h-9 opacity-0 transition-all",a?"visible opacity-100":"invisible opacity-0"),src:o.logoLink}),y>600?l.jsx("img",{className:_e("fixed top-2.5 h-9 transition-all",v?"right-2.5":"left-2.5",a?"invisible opacity-0":"visible opacity-100"),src:o.logoSymbol}):null]}),l.jsx("div",{className:_e("fixed bottom-14 top-14 bg-primary-foreground py-2 transition-all",a?"overflow-auto":"overflow-hidden"),style:{height:"calc(100% - 112px)",width:y>600?`${a?C:56}px`:`${a?C:0}px`},children:(E=o.drawerItems)==null?void 0:E.map((N,$)=>l.jsxs("div",{className:_e("flex select-none flex-col items-stretch justify-center transition-all"),children:[N==null?void 0:N.map((G,V)=>{var J,Q,he;return l.jsxs("div",{id:"test",className:"flex flex-col",children:[l.jsxs("div",{onClick:()=>{G.subItems?s===G.slug?u(""):u(G.slug):G.action()},className:_e(o.currentPage===G.slug||(J=G.subItems)!=null&&J.find(xe=>xe.slug===o.currentPage)?"bg-primary text-primary-foreground ":"hover:bg-primary/20","my-1 flex cursor-pointer flex-row items-center justify-between overflow-x-clip rounded p-2 pl-3 transition-all ",v?"flex-row-reverse pr-3":"","m-2"),children:[l.jsxs("div",{className:"flex flex-row",dir:e,children:[l.jsx("div",{className:"flex items-center justify-center ",children:G.icon}),l.jsx("div",{className:_e("mx-2 whitespace-nowrap text-sm transition-all",a?"opacity-100":"opacity-0"),children:G.label})]}),G.subItems&&l.jsx(YM,{pointing:s&&G.slug===s?"up":"down"})]}),G.subItems&&l.jsx("div",{className:_e("m-1 mx-2 flex cursor-pointer flex-col gap-[2px] overflow-clip whitespace-nowrap rounded bg-primary/10 p-1 transition-all",s==G.slug&&a?"":"my-0 py-0",v?"text-right":"text-left"),style:{height:s==G.slug&&a?6+35*((Q=G.subItems)==null?void 0:Q.length):0},children:(he=G.subItems)==null?void 0:he.map((xe,ne)=>l.jsxs("div",{className:_e("flex flex-row gap-2 overflow-x-clip rounded-inner p-2 px-2 text-xs",v?"text-right":"text-left",o.currentPage===xe.slug?"bg-primary text-white":"hover:bg-primary-foreground hover:text-primary "),dir:e,onClick:()=>{xe.action()},children:[l.jsx("div",{className:"flex items-center justify-center",children:xe.icon}),l.jsx("div",{className:"flex flex-row justify-between",children:xe.label})]},ne))})]},V)}),$!==o.drawerItems.length-1&&l.jsx("div",{className:"my-2 h-[1px] w-10/12 self-center bg-buttonPrimary-500 bg-red-500 text-center "})]},$))}),l.jsxs("div",{className:_e("fixed bottom-0 flex h-14 w-full items-center justify-center gap-2 overflow-clip bg-primary-foreground transition-all",e==="rtl"?"flex-row-reverse":"flex-row"),style:{width:y>600?`${a?C:56}px`:`${a?C:0}px`},children:[r&&a?l.jsx(l.Fragment,{children:r}):null,y>600&&a?l.jsx(Is,{side:"left",delayDuration:500,content:c?((j=o.texts)==null?void 0:j.collapseSidebar)||"Collapse Sidebar":((P=o.texts)==null?void 0:P.expandSidebar)||"Expand Sidebar",children:l.jsx(Qe,{variant:"light",onClick:()=>d(!c),size:"smallIcon",children:l.jsx("svg",{className:_e("h-6 w-6 shrink-0 text-primary transition-all disabled:bg-gray-200 ",c?v?"-rotate-90":"rotate-90":v?"rotate-90":"-rotate-90"),fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})}):null]})]}),l.jsx("div",{className:"fixed overflow-y-auto",style:v?{height:`calc(100% - ${o.topBar?"56":"0"}px)`,width:`calc(100% - ${w}px)`,left:"0px",top:o.topBar?"56px":"0px"}:{height:`calc(100% - ${o.topBar?"56":"0"}px)`,width:`calc(100% - ${w}px)`,left:`${w}px`,top:o.topBar?"56px":"0px"},children:o.children})]})},XM=()=>l.jsx("svg",{className:"absolute -left-1 h-10 w-10 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})}),YM=({pointing:e})=>{let t;switch(e){case"right":t="-rotate-90";break;case"left":t="rotate-90";break;case"up":t="-rotate-180";break;case"down":t="rotate-0";break}return l.jsx("svg",{className:_e("h-6 w-6 shrink-0 text-primary-foreground transition-all disabled:bg-gray-200 ",t),fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})},JM=({maxWidth:e="normal",variant:t="contained",centered:n=!1,direction:r="ltr",...o})=>{let a="flex w-full flex-col rounded p-4",i={full:"md:max-w-xl",small:"md:max-w-sm w-1/3 min-w-min",normal:"max-w-sm md:max-w-md"},s={contained:"bg-background border",outlined:"bg-transparent border border-black w-fit",neobrutalism:"shadow-neobrutalism border-4 border-black bg-white"};return l.jsx("div",{className:_e(a,i[e],s[t],n?"flex items-center text-center":""),dir:r,children:o.children})},KM=e=>l.jsx("div",{className:" columns-1 gap-5 sm:columns-2 sm:gap-8 md:columns-3 lg:columns-4 [&>*:not(:first-child)]:mt-8",children:e.children}),QM=({isOpen:e,onClose:t,items:n})=>e?l.jsxs("div",{className:"fixed inset-0 z-40 flex bg-gray-600 bg-opacity-75",children:[l.jsxs("div",{className:"w-1/3 rounded-l-lg bg-gray-800 shadow-2xl",children:[l.jsx("button",{onClick:t,className:"p-4 text-gray-400 hover:text-white focus:text-white focus:outline-none",children:"Close"}),l.jsx("nav",{children:n.map((r,o)=>l.jsx("a",{href:"#",onClick:r.onClick,className:"block p-4 font-bold text-white hover:bg-gray-700 hover:text-gray-400",children:r.label},o))})]}),l.jsx("div",{className:"w-2/3 bg-gray-50"})]}):null;function qM(e){return Vu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"}}]})(e)}function eL(e){return Vu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z"}}]})(e)}const tL=({variation:e="default",...t})=>{var r;let n={default:"rounded border",minimal:"border-t"};return l.jsxs("div",{className:Pe("flex w-full flex-row items-center justify-between gap-8 rounded bg-background p-4",n[e]),children:[l.jsxs("div",{className:"flex flex-col items-center gap-2",children:[l.jsxs("div",{className:"flex flex-row items-center gap-2",children:[t.logoURL&&l.jsx("div",{children:l.jsx("img",{className:"h-8",src:t.logoURL})}),t.logoText&&l.jsx("div",{children:l.jsx("div",{className:"text-2xl font-bold text-primary",children:t.logoText})})]}),t.copyRights&&t.footerLinks&&l.jsxs("div",{className:"text-xs text-muted-foreground",children:["© ",t.copyRights," ",new Date().getFullYear()]})]}),t.copyRights&&!t.footerLinks&&l.jsxs("div",{className:"text-xs text-muted-foreground",children:["© ",t.copyRights," ",new Date().getFullYear()]}),(r=t.footerLinks)==null?void 0:r.map(o=>l.jsxs("div",{className:"flex w-32 flex-col gap-2",children:[l.jsx("div",{className:"text-lg font-bold",children:o.title}),l.jsx("div",{className:"flex flex-col gap-1",children:o.pages.map(a=>l.jsx("a",{className:"transition-all hover:font-bold",href:a.link,children:a.label}))})]})),t.socialLinks&&l.jsxs("div",{className:"flex flex-row gap-2",children:[t.socialLinks.twitter&&l.jsx(Qe,{size:"smallIcon",variant:"ghost",children:l.jsx(eL,{})}),t.socialLinks.instagram&&l.jsx(Qe,{size:"smallIcon",variant:"ghost",children:l.jsx(qM,{})}),t.socialLinks.tiktok&&l.jsx(Qe,{size:"smallIcon",variant:"ghost",children:l.jsx(zM,{})}),t.socialLinks.snapchat&&l.jsx(Qe,{size:"smallIcon",variant:"ghost",children:l.jsx(GM,{})})]})]})},nL=({design:e="floating",...t})=>{const n=p.useRef(null),[r,o]=p.useState(!1);let a={floating:"left-1/2 z-50 w-[calc(100%-2rem)] -translate-x-1/2 lg:max-w-7xl p-4 rounded",default:"w-[calc(100%)] left-0 z-50 right-0 rounded-none p-2"};return l.jsx("div",{ref:n,children:l.jsxs("div",{dir:t.direction,className:_e(a[e],"fixed flex flex-col justify-between border border-gray-100 bg-white shadow-sm transition-all dark:border-gray-600 dark:bg-gray-700 md:flex-row md:gap-4 ",t.position==="top"?e==="floating"?"top-6":"top-0":e==="floating"?"bottom-6":"bottom-0",r?"opacity-0":"opacity-100"),children:[l.jsxs("div",{className:"mb-3 flex w-full flex-col items-center justify-start md:mb-0 md:flex-row md:items-center",children:[l.jsxs("div",{className:_e(t.direction==="rtl"?"md:ml-4 md:border-l md:pl-4":"md:mr-4 md:border-r md:pr-4","mb-2 flex items-center border-gray-200 dark:border-gray-600 md:mb-0 md:mr-4 md:pr-4"),children:[t.logoURL&&l.jsx("img",{src:t.logoURL,className:"mr-2 h-6",alt:"Flowbite Logo"}),t.title&&l.jsx("span",{className:"self-center whitespace-nowrap text-lg font-semibold dark:text-white",children:t.title})]}),t.text&&l.jsx("p",{className:_e("m-0 flex items-center text-center text-sm font-normal text-gray-500 dark:text-gray-400 ",t.direction==="rtl"?"md:text-right":"md:text-left"),children:t.text})]}),t.actionText&&l.jsx("div",{className:_e("flex flex-shrink-0 items-center justify-center ",t.direction==="rtl"?"ml-0 md:ml-10":"mr-0 md:mr-10"),children:l.jsx(Qe,{onClick:t.onActionClick,children:t.actionText})}),l.jsxs("button",{type:"button",className:_e("absolute top-2 inline-flex h-9 w-9 items-center justify-center rounded-inner p-1.5 text-gray-400 transition-all hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white",t.direction==="rtl"?"left-2":"right-2"),"data-dismiss-target":"#alert-default","aria-label":"Close",onClick:()=>{o(!0),setTimeout(()=>{n.current.removeChild(n.current.children[0])},200)},children:[l.jsx("span",{className:"sr-only",children:"Close"}),l.jsx("svg",{"aria-hidden":"true",className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})]})]})})};var Wu=e=>e.type==="checkbox",Us=e=>e instanceof Date,er=e=>e==null;const T3=e=>typeof e=="object";var wn=e=>!er(e)&&!Array.isArray(e)&&T3(e)&&!Us(e),k3=e=>wn(e)&&e.target?Wu(e.target)?e.target.checked:e.target.value:e,rL=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,P3=(e,t)=>e.has(rL(t)),oL=e=>{const t=e.constructor&&e.constructor.prototype;return wn(t)&&t.hasOwnProperty("isPrototypeOf")},yv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function uo(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(yv&&(e instanceof Blob||e instanceof FileList))&&(n||wn(e)))if(t=n?[]:{},!n&&!oL(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=uo(e[r]));else return e;return t}var Hu=e=>Array.isArray(e)?e.filter(Boolean):[],bn=e=>e===void 0,et=(e,t,n)=>{if(!t||!wn(e))return n;const r=Hu(t.split(/[,[\].]+?/)).reduce((o,a)=>er(o)?o:o[a],e);return bn(r)||r===e?bn(e[t])?n:e[t]:r},_a=e=>typeof e=="boolean";const $f={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},co={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ta={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},B3=p.createContext(null),Cv=()=>p.useContext(B3),Gu=e=>{const{children:t,...n}=e;return p.createElement(B3.Provider,{value:n},t)};var N3=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const i=a;return t._proxyFormState[i]!==co.all&&(t._proxyFormState[i]=!r||co.all),n&&(n[i]=!0),e[i]}});return o},Hr=e=>wn(e)&&!Object.keys(e).length,O3=(e,t,n,r)=>{n(e);const{name:o,...a}=e;return Hr(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(i=>t[i]===(!r||co.all))},Rf=e=>Array.isArray(e)?e:[e],$3=(e,t,n)=>n&&t?e===t||Array.isArray(e)&&e.some(r=>r&&n&&r===t):!e||!t||e===t||Rf(e).some(r=>r&&(r.startsWith(t)||t.startsWith(r)));function wv(e){const t=p.useRef(e);t.current=e,p.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function aL(e){const t=Cv(),{control:n=t.control,disabled:r,name:o,exact:a}=e||{},[i,s]=p.useState(n._formState),u=p.useRef(!0),c=p.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=p.useRef(o);return d.current=o,wv({disabled:r,next:g=>u.current&&$3(d.current,g.name,a)&&O3(g,c.current,n._updateFormState)&&s({...n._formState,...g}),subject:n._subjects.state}),p.useEffect(()=>(u.current=!0,c.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),N3(i,n,c.current,!1)}var Po=e=>typeof e=="string",R3=(e,t,n,r,o)=>Po(e)?(r&&t.watch.add(e),et(n,e,o)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),et(n,a))):(r&&(t.watchAll=!0),n);function iL(e){const t=Cv(),{control:n=t.control,name:r,defaultValue:o,disabled:a,exact:i}=e||{},s=p.useRef(r);s.current=r,wv({disabled:a,subject:n._subjects.values,next:d=>{$3(s.current,d.name,i)&&c(uo(R3(s.current,n._names,d.values||n._formValues,!1,o)))}});const[u,c]=p.useState(n._getWatch(r,o));return p.useEffect(()=>n._removeUnmounted()),u}var Ev=e=>/^\w*$/.test(e),M3=e=>Hu(e.replace(/["|']|\]/g,"").split(/\.|\[/));function tn(e,t,n){let r=-1;const o=Ev(t)?[t]:M3(t),a=o.length,i=a-1;for(;++r<a;){const s=o[r];let u=n;if(r!==i){const c=e[s];u=wn(c)||Array.isArray(c)?c:isNaN(+o[r+1])?{}:[]}e[s]=u,e=e[s]}return e}function sL(e){const t=Cv(),{name:n,disabled:r,control:o=t.control,shouldUnregister:a}=e,i=P3(o._names.array,n),s=iL({control:o,name:n,defaultValue:et(o._formValues,n,et(o._defaultValues,n,e.defaultValue)),exact:!0}),u=aL({control:o,name:n}),c=p.useRef(o.register(n,{...e.rules,value:s}));return c.current=o.register(n,e.rules),p.useEffect(()=>{const d=o._options.shouldUnregister||a,g=(v,y)=>{const C=et(o._fields,v);C&&(C._f.mount=y)};if(g(n,!0),d){const v=uo(et(o._options.defaultValues,n));tn(o._defaultValues,n,v),bn(et(o._formValues,n))&&tn(o._formValues,n,v)}return()=>{(i?d&&!o._state.action:d)?o.unregister(n):g(n,!1)}},[n,o,i,a]),p.useEffect(()=>{o._updateDisabledField({disabled:r,fields:o._fields,name:n})},[r,n,o]),{field:{name:n,value:s,..._a(r)?{disabled:r}:{},onChange:p.useCallback(d=>c.current.onChange({target:{value:k3(d),name:n},type:$f.CHANGE}),[n]),onBlur:p.useCallback(()=>c.current.onBlur({target:{value:et(o._formValues,n),name:n},type:$f.BLUR}),[n,o]),ref:d=>{const g=et(o._fields,n);g&&d&&(g._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:v=>d.setCustomValidity(v),reportValidity:()=>d.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!et(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!et(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!et(u.touchedFields,n)},error:{enumerable:!0,get:()=>et(u.errors,n)}})}}const Pt=e=>e.render(sL(e));var lL=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{};const Sv=(e,t,n)=>{for(const r of n||Object.keys(e)){const o=et(e,r);if(o){const{_f:a,...i}=o;if(a&&t(a.name)){if(a.ref.focus){a.ref.focus();break}else if(a.refs&&a.refs[0].focus){a.refs[0].focus();break}}else wn(i)&&Sv(i,t)}}};var L3=e=>({isOnSubmit:!e||e===co.onSubmit,isOnBlur:e===co.onBlur,isOnChange:e===co.onChange,isOnAll:e===co.all,isOnTouch:e===co.onTouched}),_3=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length)))),uL=(e,t,n)=>{const r=Hu(et(e,n));return tn(r,"root",t[n]),tn(e,n,r),e},Dv=e=>e.type==="file",Va=e=>typeof e=="function",Mf=e=>{if(!yv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Lf=e=>Po(e),Fv=e=>e.type==="radio",_f=e=>e instanceof RegExp;const V3={value:!1,isValid:!1},W3={value:!0,isValid:!0};var H3=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!bn(e[0].attributes.value)?bn(e[0].value)||e[0].value===""?W3:{value:e[0].value,isValid:!0}:W3:V3}return V3};const G3={isValid:!1,value:null};var z3=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,G3):G3;function U3(e,t,n="validate"){if(Lf(e)||Array.isArray(e)&&e.every(Lf)||_a(e)&&!e)return{type:n,message:Lf(e)?e:"",ref:t}}var Zs=e=>wn(e)&&!_f(e)?e:{value:e,message:""},Z3=async(e,t,n,r,o)=>{const{ref:a,refs:i,required:s,maxLength:u,minLength:c,min:d,max:g,pattern:v,validate:y,name:C,valueAsNumber:h,mount:w,disabled:E}=e._f,j=et(t,C);if(!w||E)return{};const P=i?i[0]:a,N=ne=>{r&&P.reportValidity&&(P.setCustomValidity(_a(ne)?"":ne||""),P.reportValidity())},$={},G=Fv(a),V=Wu(a),J=G||V,Q=(h||Dv(a))&&bn(a.value)&&bn(j)||Mf(a)&&a.value===""||j===""||Array.isArray(j)&&!j.length,he=lL.bind(null,C,n,$),xe=(ne,de,R,W=ta.maxLength,oe=ta.minLength)=>{const pe=ne?de:R;$[C]={type:ne?W:oe,message:pe,ref:a,...he(ne?W:oe,pe)}};if(o?!Array.isArray(j)||!j.length:s&&(!J&&(Q||er(j))||_a(j)&&!j||V&&!H3(i).isValid||G&&!z3(i).isValid)){const{value:ne,message:de}=Lf(s)?{value:!!s,message:s}:Zs(s);if(ne&&($[C]={type:ta.required,message:de,ref:P,...he(ta.required,de)},!n))return N(de),$}if(!Q&&(!er(d)||!er(g))){let ne,de;const R=Zs(g),W=Zs(d);if(!er(j)&&!isNaN(j)){const oe=a.valueAsNumber||j&&+j;er(R.value)||(ne=oe>R.value),er(W.value)||(de=oe<W.value)}else{const oe=a.valueAsDate||new Date(j),pe=te=>new Date(new Date().toDateString()+" "+te),se=a.type=="time",Z=a.type=="week";Po(R.value)&&j&&(ne=se?pe(j)>pe(R.value):Z?j>R.value:oe>new Date(R.value)),Po(W.value)&&j&&(de=se?pe(j)<pe(W.value):Z?j<W.value:oe<new Date(W.value))}if((ne||de)&&(xe(!!ne,R.message,W.message,ta.max,ta.min),!n))return N($[C].message),$}if((u||c)&&!Q&&(Po(j)||o&&Array.isArray(j))){const ne=Zs(u),de=Zs(c),R=!er(ne.value)&&j.length>+ne.value,W=!er(de.value)&&j.length<+de.value;if((R||W)&&(xe(R,ne.message,de.message),!n))return N($[C].message),$}if(v&&!Q&&Po(j)){const{value:ne,message:de}=Zs(v);if(_f(ne)&&!j.match(ne)&&($[C]={type:ta.pattern,message:de,ref:a,...he(ta.pattern,de)},!n))return N(de),$}if(y){if(Va(y)){const ne=await y(j,t),de=U3(ne,P);if(de&&($[C]={...de,...he(ta.validate,de.message)},!n))return N(de.message),$}else if(wn(y)){let ne={};for(const de in y){if(!Hr(ne)&&!n)break;const R=U3(await y[de](j,t),P,de);R&&(ne={...R,...he(de,R.message)},N(R.message),n&&($[C]=ne))}if(!Hr(ne)&&($[C]={ref:P,...ne},!n))return $}}return N(!0),$};function cL(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=bn(e)?r++:e[t[r++]];return e}function dL(e){for(const t in e)if(e.hasOwnProperty(t)&&!bn(e[t]))return!1;return!0}function On(e,t){const n=Array.isArray(t)?t:Ev(t)?[t]:M3(t),r=n.length===1?e:cL(e,n),o=n.length-1,a=n[o];return r&&delete r[a],o!==0&&(wn(r)&&Hr(r)||Array.isArray(r)&&dL(r))&&On(e,n.slice(0,-1)),e}function Av(){let e=[];return{get observers(){return e},next:o=>{for(const a of e)a.next&&a.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(a=>a!==o)}}),unsubscribe:()=>{e=[]}}}var Vf=e=>er(e)||!T3(e);function Bi(e,t){if(Vf(e)||Vf(t))return e===t;if(Us(e)&&Us(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const a=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const i=t[o];if(Us(a)&&Us(i)||wn(a)&&wn(i)||Array.isArray(a)&&Array.isArray(i)?!Bi(a,i):a!==i)return!1}}return!0}var X3=e=>e.type==="select-multiple",fL=e=>Fv(e)||Wu(e),jv=e=>Mf(e)&&e.isConnected,Y3=e=>{for(const t in e)if(Va(e[t]))return!0;return!1};function Wf(e,t={}){const n=Array.isArray(e);if(wn(e)||n)for(const r in e)Array.isArray(e[r])||wn(e[r])&&!Y3(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Wf(e[r],t[r])):er(e[r])||(t[r]=!0);return t}function J3(e,t,n){const r=Array.isArray(e);if(wn(e)||r)for(const o in e)Array.isArray(e[o])||wn(e[o])&&!Y3(e[o])?bn(t)||Vf(n[o])?n[o]=Array.isArray(e[o])?Wf(e[o],[]):{...Wf(e[o])}:J3(e[o],er(t)?{}:t[o],n[o]):n[o]=!Bi(e[o],t[o]);return n}var Iv=(e,t)=>J3(e,t,Wf(t)),K3=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>bn(e)?e:t?e===""?NaN:e&&+e:n&&Po(e)?new Date(e):r?r(e):e;function Tv(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Dv(t)?t.files:Fv(t)?z3(e.refs).value:X3(t)?[...t.selectedOptions].map(({value:n})=>n):Wu(t)?H3(e.refs).value:K3(bn(t.value)?e.ref.value:t.value,e)}var gL=(e,t,n,r)=>{const o={};for(const a of e){const i=et(t,a);i&&tn(o,a,i._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},zu=e=>bn(e)?e:_f(e)?e.source:wn(e)?_f(e.value)?e.value.source:e.value:e,pL=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Q3(e,t,n){const r=et(e,n);if(r||Ev(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const a=o.join("."),i=et(t,a),s=et(e,a);if(i&&!Array.isArray(i)&&n!==a)return{name:n};if(s&&s.type)return{name:a,error:s};o.pop()}return{name:n}}var hL=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,mL=(e,t)=>!Hu(et(e,t)).length&&On(e,t);const vL={mode:co.onSubmit,reValidateMode:co.onChange,shouldFocusError:!0};function bL(e={},t){let n={...vL,...e},r={submitCount:0,isDirty:!1,isLoading:Va(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},o={},a=wn(n.defaultValues)||wn(n.values)?uo(n.defaultValues||n.values)||{}:{},i=n.shouldUnregister?{}:uo(a),s={action:!1,mount:!1,watch:!1},u={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const g={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:Av(),array:Av(),state:Av()},y=e.resetOptions&&e.resetOptions.keepDirtyValues,C=L3(n.mode),h=L3(n.reValidateMode),w=n.criteriaMode===co.all,E=le=>Ee=>{clearTimeout(d),d=setTimeout(le,Ee)},j=async le=>{if(g.isValid||le){const Ee=n.resolver?Hr((await Q()).errors):await xe(o,!0);Ee!==r.isValid&&v.state.next({isValid:Ee})}},P=le=>g.isValidating&&v.state.next({isValidating:le}),N=(le,Ee=[],Ie,Ue,He=!0,Te=!0)=>{if(Ue&&Ie){if(s.action=!0,Te&&Array.isArray(et(o,le))){const Fe=Ie(et(o,le),Ue.argA,Ue.argB);He&&tn(o,le,Fe)}if(Te&&Array.isArray(et(r.errors,le))){const Fe=Ie(et(r.errors,le),Ue.argA,Ue.argB);He&&tn(r.errors,le,Fe),mL(r.errors,le)}if(g.touchedFields&&Te&&Array.isArray(et(r.touchedFields,le))){const Fe=Ie(et(r.touchedFields,le),Ue.argA,Ue.argB);He&&tn(r.touchedFields,le,Fe)}g.dirtyFields&&(r.dirtyFields=Iv(a,i)),v.state.next({name:le,isDirty:de(le,Ee),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else tn(i,le,Ee)},$=(le,Ee)=>{tn(r.errors,le,Ee),v.state.next({errors:r.errors})},G=(le,Ee,Ie,Ue)=>{const He=et(o,le);if(He){const Te=et(i,le,bn(Ie)?et(a,le):Ie);bn(Te)||Ue&&Ue.defaultChecked||Ee?tn(i,le,Ee?Te:Tv(He._f)):oe(le,Te),s.mount&&j()}},V=(le,Ee,Ie,Ue,He)=>{let Te=!1,Fe=!1;const Ge={name:le};if(!Ie||Ue){g.isDirty&&(Fe=r.isDirty,r.isDirty=Ge.isDirty=de(),Te=Fe!==Ge.isDirty);const tt=Bi(et(a,le),Ee);Fe=et(r.dirtyFields,le),tt?On(r.dirtyFields,le):tn(r.dirtyFields,le,!0),Ge.dirtyFields=r.dirtyFields,Te=Te||g.dirtyFields&&Fe!==!tt}if(Ie){const tt=et(r.touchedFields,le);tt||(tn(r.touchedFields,le,Ie),Ge.touchedFields=r.touchedFields,Te=Te||g.touchedFields&&tt!==Ie)}return Te&&He&&v.state.next(Ge),Te?Ge:{}},J=(le,Ee,Ie,Ue)=>{const He=et(r.errors,le),Te=g.isValid&&_a(Ee)&&r.isValid!==Ee;if(e.delayError&&Ie?(c=E(()=>$(le,Ie)),c(e.delayError)):(clearTimeout(d),c=null,Ie?tn(r.errors,le,Ie):On(r.errors,le)),(Ie?!Bi(He,Ie):He)||!Hr(Ue)||Te){const Fe={...Ue,...Te&&_a(Ee)?{isValid:Ee}:{},errors:r.errors,name:le};r={...r,...Fe},v.state.next(Fe)}P(!1)},Q=async le=>n.resolver(i,n.context,gL(le||u.mount,o,n.criteriaMode,n.shouldUseNativeValidation)),he=async le=>{const{errors:Ee}=await Q(le);if(le)for(const Ie of le){const Ue=et(Ee,Ie);Ue?tn(r.errors,Ie,Ue):On(r.errors,Ie)}else r.errors=Ee;return Ee},xe=async(le,Ee,Ie={valid:!0})=>{for(const Ue in le){const He=le[Ue];if(He){const{_f:Te,...Fe}=He;if(Te){const Ge=u.array.has(Te.name),tt=await Z3(He,i,w,n.shouldUseNativeValidation&&!Ee,Ge);if(tt[Te.name]&&(Ie.valid=!1,Ee))break;!Ee&&(et(tt,Te.name)?Ge?uL(r.errors,tt,Te.name):tn(r.errors,Te.name,tt[Te.name]):On(r.errors,Te.name))}Fe&&await xe(Fe,Ee,Ie)}}return Ie.valid},ne=()=>{for(const le of u.unMount){const Ee=et(o,le);Ee&&(Ee._f.refs?Ee._f.refs.every(Ie=>!jv(Ie)):!jv(Ee._f.ref))&&ie(le)}u.unMount=new Set},de=(le,Ee)=>(le&&Ee&&tn(i,le,Ee),!Bi(U(),a)),R=(le,Ee,Ie)=>R3(le,u,{...s.mount?i:bn(Ee)?a:Po(le)?{[le]:Ee}:Ee},Ie,Ee),W=le=>Hu(et(s.mount?i:a,le,e.shouldUnregister?et(a,le,[]):[])),oe=(le,Ee,Ie={})=>{const Ue=et(o,le);let He=Ee;if(Ue){const Te=Ue._f;Te&&(!Te.disabled&&tn(i,le,K3(Ee,Te)),He=Mf(Te.ref)&&er(Ee)?"":Ee,X3(Te.ref)?[...Te.ref.options].forEach(Fe=>Fe.selected=He.includes(Fe.value)):Te.refs?Wu(Te.ref)?Te.refs.length>1?Te.refs.forEach(Fe=>(!Fe.defaultChecked||!Fe.disabled)&&(Fe.checked=Array.isArray(He)?!!He.find(Ge=>Ge===Fe.value):He===Fe.value)):Te.refs[0]&&(Te.refs[0].checked=!!He):Te.refs.forEach(Fe=>Fe.checked=Fe.value===He):Dv(Te.ref)?Te.ref.value="":(Te.ref.value=He,Te.ref.type||v.values.next({name:le,values:{...i}})))}(Ie.shouldDirty||Ie.shouldTouch)&&V(le,He,Ie.shouldTouch,Ie.shouldDirty,!0),Ie.shouldValidate&&te(le)},pe=(le,Ee,Ie)=>{for(const Ue in Ee){const He=Ee[Ue],Te=`${le}.${Ue}`,Fe=et(o,Te);(u.array.has(le)||!Vf(He)||Fe&&!Fe._f)&&!Us(He)?pe(Te,He,Ie):oe(Te,He,Ie)}},se=(le,Ee,Ie={})=>{const Ue=et(o,le),He=u.array.has(le),Te=uo(Ee);tn(i,le,Te),He?(v.array.next({name:le,values:{...i}}),(g.isDirty||g.dirtyFields)&&Ie.shouldDirty&&v.state.next({name:le,dirtyFields:Iv(a,i),isDirty:de(le,Te)})):Ue&&!Ue._f&&!er(Te)?pe(le,Te,Ie):oe(le,Te,Ie),_3(le,u)&&v.state.next({...r}),v.values.next({name:le,values:{...i}}),!s.mount&&t()},Z=async le=>{const Ee=le.target;let Ie=Ee.name,Ue=!0;const He=et(o,Ie),Te=()=>Ee.type?Tv(He._f):k3(le);if(He){let Fe,Ge;const tt=Te(),xt=le.type===$f.BLUR||le.type===$f.FOCUS_OUT,$t=!pL(He._f)&&!n.resolver&&!et(r.errors,Ie)&&!He._f.deps||hL(xt,et(r.touchedFields,Ie),r.isSubmitted,h,C),ht=_3(Ie,u,xt);tn(i,Ie,tt),xt?(He._f.onBlur&&He._f.onBlur(le),c&&c(0)):He._f.onChange&&He._f.onChange(le);const Wt=V(Ie,tt,xt,!1),mn=!Hr(Wt)||ht;if(!xt&&v.values.next({name:Ie,type:le.type,values:{...i}}),$t)return g.isValid&&j(),mn&&v.state.next({name:Ie,...ht?{}:Wt});if(!xt&&ht&&v.state.next({...r}),P(!0),n.resolver){const{errors:Kt}=await Q([Ie]),En=Q3(r.errors,o,Ie),vn=Q3(Kt,o,En.name||Ie);Fe=vn.error,Ie=vn.name,Ge=Hr(Kt)}else Fe=(await Z3(He,i,w,n.shouldUseNativeValidation))[Ie],Ue=Number.isNaN(tt)||tt===et(i,Ie,tt),Ue&&(Fe?Ge=!1:g.isValid&&(Ge=await xe(o,!0)));Ue&&(He._f.deps&&te(He._f.deps),J(Ie,Ge,Fe,Wt))}},te=async(le,Ee={})=>{let Ie,Ue;const He=Rf(le);if(P(!0),n.resolver){const Te=await he(bn(le)?le:He);Ie=Hr(Te),Ue=le?!He.some(Fe=>et(Te,Fe)):Ie}else le?(Ue=(await Promise.all(He.map(async Te=>{const Fe=et(o,Te);return await xe(Fe&&Fe._f?{[Te]:Fe}:Fe)}))).every(Boolean),!(!Ue&&!r.isValid)&&j()):Ue=Ie=await xe(o);return v.state.next({...!Po(le)||g.isValid&&Ie!==r.isValid?{}:{name:le},...n.resolver||!le?{isValid:Ie}:{},errors:r.errors,isValidating:!1}),Ee.shouldFocus&&!Ue&&Sv(o,Te=>Te&&et(r.errors,Te),le?He:u.mount),Ue},U=le=>{const Ee={...a,...s.mount?i:{}};return bn(le)?Ee:Po(le)?et(Ee,le):le.map(Ie=>et(Ee,Ie))},K=(le,Ee)=>({invalid:!!et((Ee||r).errors,le),isDirty:!!et((Ee||r).dirtyFields,le),isTouched:!!et((Ee||r).touchedFields,le),error:et((Ee||r).errors,le)}),me=le=>{le&&Rf(le).forEach(Ee=>On(r.errors,Ee)),v.state.next({errors:le?r.errors:{}})},H=(le,Ee,Ie)=>{const Ue=(et(o,le,{_f:{}})._f||{}).ref;tn(r.errors,le,{...Ee,ref:Ue}),v.state.next({name:le,errors:r.errors,isValid:!1}),Ie&&Ie.shouldFocus&&Ue&&Ue.focus&&Ue.focus()},ge=(le,Ee)=>Va(le)?v.values.subscribe({next:Ie=>le(R(void 0,Ee),Ie)}):R(le,Ee,!0),ie=(le,Ee={})=>{for(const Ie of le?Rf(le):u.mount)u.mount.delete(Ie),u.array.delete(Ie),Ee.keepValue||(On(o,Ie),On(i,Ie)),!Ee.keepError&&On(r.errors,Ie),!Ee.keepDirty&&On(r.dirtyFields,Ie),!Ee.keepTouched&&On(r.touchedFields,Ie),!n.shouldUnregister&&!Ee.keepDefaultValue&&On(a,Ie);v.values.next({values:{...i}}),v.state.next({...r,...Ee.keepDirty?{isDirty:de()}:{}}),!Ee.keepIsValid&&j()},be=({disabled:le,name:Ee,field:Ie,fields:Ue})=>{if(_a(le)){const He=le?void 0:et(i,Ee,Tv(Ie?Ie._f:et(Ue,Ee)._f));tn(i,Ee,He),V(Ee,He,!1,!1,!0)}},Re=(le,Ee={})=>{let Ie=et(o,le);const Ue=_a(Ee.disabled);return tn(o,le,{...Ie||{},_f:{...Ie&&Ie._f?Ie._f:{ref:{name:le}},name:le,mount:!0,...Ee}}),u.mount.add(le),Ie?be({field:Ie,disabled:Ee.disabled,name:le}):G(le,!0,Ee.value),{...Ue?{disabled:Ee.disabled}:{},...n.progressive?{required:!!Ee.required,min:zu(Ee.min),max:zu(Ee.max),minLength:zu(Ee.minLength),maxLength:zu(Ee.maxLength),pattern:zu(Ee.pattern)}:{},name:le,onChange:Z,onBlur:Z,ref:He=>{if(He){Re(le,Ee),Ie=et(o,le);const Te=bn(He.value)&&He.querySelectorAll&&He.querySelectorAll("input,select,textarea")[0]||He,Fe=fL(Te),Ge=Ie._f.refs||[];if(Fe?Ge.find(tt=>tt===Te):Te===Ie._f.ref)return;tn(o,le,{_f:{...Ie._f,...Fe?{refs:[...Ge.filter(jv),Te,...Array.isArray(et(a,le))?[{}]:[]],ref:{type:Te.type,name:le}}:{ref:Te}}}),G(le,!1,void 0,Te)}else Ie=et(o,le,{}),Ie._f&&(Ie._f.mount=!1),(n.shouldUnregister||Ee.shouldUnregister)&&!(P3(u.array,le)&&s.action)&&u.unMount.add(le)}}},Ne=()=>n.shouldFocusError&&Sv(o,le=>le&&et(r.errors,le),u.mount),We=(le,Ee)=>async Ie=>{Ie&&(Ie.preventDefault&&Ie.preventDefault(),Ie.persist&&Ie.persist());let Ue=uo(i);if(v.state.next({isSubmitting:!0}),n.resolver){const{errors:He,values:Te}=await Q();r.errors=He,Ue=Te}else await xe(o);On(r.errors,"root"),Hr(r.errors)?(v.state.next({errors:{}}),await le(Ue,Ie)):(Ee&&await Ee({...r.errors},Ie),Ne(),setTimeout(Ne)),v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Hr(r.errors),submitCount:r.submitCount+1,errors:r.errors})},Ke=(le,Ee={})=>{et(o,le)&&(bn(Ee.defaultValue)?se(le,et(a,le)):(se(le,Ee.defaultValue),tn(a,le,Ee.defaultValue)),Ee.keepTouched||On(r.touchedFields,le),Ee.keepDirty||(On(r.dirtyFields,le),r.isDirty=Ee.defaultValue?de(le,et(a,le)):de()),Ee.keepError||(On(r.errors,le),g.isValid&&j()),v.state.next({...r}))},$e=(le,Ee={})=>{const Ie=le?uo(le):a,Ue=uo(Ie),He=le&&!Hr(le)?Ue:a;if(Ee.keepDefaultValues||(a=Ie),!Ee.keepValues){if(Ee.keepDirtyValues||y)for(const Te of u.mount)et(r.dirtyFields,Te)?tn(He,Te,et(i,Te)):se(Te,et(He,Te));else{if(yv&&bn(le))for(const Te of u.mount){const Fe=et(o,Te);if(Fe&&Fe._f){const Ge=Array.isArray(Fe._f.refs)?Fe._f.refs[0]:Fe._f.ref;if(Mf(Ge)){const tt=Ge.closest("form");if(tt){tt.reset();break}}}}o={}}i=e.shouldUnregister?Ee.keepDefaultValues?uo(a):{}:uo(He),v.array.next({values:{...He}}),v.values.next({values:{...He}})}u={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!g.isValid||!!Ee.keepIsValid,s.watch=!!e.shouldUnregister,v.state.next({submitCount:Ee.keepSubmitCount?r.submitCount:0,isDirty:Ee.keepDirty?r.isDirty:!!(Ee.keepDefaultValues&&!Bi(le,a)),isSubmitted:Ee.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:Ee.keepDirtyValues?r.dirtyFields:Ee.keepDefaultValues&&le?Iv(a,le):{},touchedFields:Ee.keepTouched?r.touchedFields:{},errors:Ee.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},qe=(le,Ee)=>$e(Va(le)?le(i):le,Ee);return{control:{register:Re,unregister:ie,getFieldState:K,handleSubmit:We,setError:H,_executeSchema:Q,_getWatch:R,_getDirty:de,_updateValid:j,_removeUnmounted:ne,_updateFieldArray:N,_updateDisabledField:be,_getFieldArray:W,_reset:$e,_resetDefaultValues:()=>Va(n.defaultValues)&&n.defaultValues().then(le=>{qe(le,n.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:le=>{r={...r,...le}},_subjects:v,_proxyFormState:g,get _fields(){return o},get _formValues(){return i},get _state(){return s},set _state(le){s=le},get _defaultValues(){return a},get _names(){return u},set _names(le){u=le},get _formState(){return r},set _formState(le){r=le},get _options(){return n},set _options(le){n={...n,...le}}},trigger:te,register:Re,handleSubmit:We,watch:ge,setValue:se,getValues:U,reset:qe,resetField:Ke,clearErrors:me,unregister:ie,setError:H,setFocus:(le,Ee={})=>{const Ie=et(o,le),Ue=Ie&&Ie._f;if(Ue){const He=Ue.refs?Ue.refs[0]:Ue.ref;He.focus&&(He.focus(),Ee.shouldSelect&&He.select())}},getFieldState:K}}function na(e={}){const t=p.useRef(),n=p.useRef(),[r,o]=p.useState({isDirty:!1,isValidating:!1,isLoading:Va(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:Va(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...bL(e,()=>o(i=>({...i}))),formState:r});const a=t.current.control;return a._options=e,wv({subject:a._subjects.state,next:i=>{O3(i,a._proxyFormState,a._updateFormState,!0)&&o({...a._formState})}}),p.useEffect(()=>{e.values&&!Bi(e.values,n.current)?(a._reset(e.values,a._options.resetOptions),n.current=e.values):a._resetDefaultValues()},[e.values,a]),p.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=N3(r,a),t.current}const xL=e=>{const t=na(),{formState:{errors:n},handleSubmit:r,control:o}=t;return l.jsx(Ut,{children:l.jsxs("form",{onSubmit:r(a=>e.handleUpdateProfile(a)),children:[l.jsx(Lt,{headless:!0,children:l.jsxs(Gu,{...t,children:[l.jsx(Pt,{control:o,name:"fullName",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"text",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:(i=n.fullName)==null?void 0:i.message,...a,value:a.value??""})}}),l.jsx(Pt,{control:o,name:"phoneNumber",render:({field:a})=>l.jsx($d,{label:"Phone number"})}),l.jsx(Pt,{control:o,name:"email",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"text",label:e.texts.emailLabel,helperText:(i=n.email)==null?void 0:i.message,placeholder:e.texts.emailPlaceholder,...a,value:a.value??""})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(Pt,{control:o,name:"password",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"password",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:(i=n.password)==null?void 0:i.message,...a,value:a.value??""})},rules:{required:e.texts.passwordRequiredText}}),l.jsx(Pt,{control:o,name:"confirmPassword",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"password",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:(i=n.confirmPassword)==null?void 0:i.message,...a,value:a.value??""})},rules:{required:e.texts.confirmPasswordRequiredText}})]})}),l.jsx(kr,{children:l.jsx(Qe,{className:"w-full",type:"submit",children:e.texts.updateProfile})})]})})},yL=e=>l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,children:[l.jsx("div",{className:"mb-2 text-sm font-bold",children:e.blockTitle}),l.jsx("div",{className:"flex flex-col gap-4 rounded p-2",children:e.children})]})}),CL=e=>{var t,n,r,o,a,i,s;return l.jsxs("div",{dir:e.direction,children:[l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,className:"flex flex-col gap-6",children:[e.viaGoogle&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleGoogle,children:[l.jsx(Zn.google,{className:"h-4 w-4"}),((t=e.texts)==null?void 0:t.continueWithGoogle)??"Continue With Google"]}),e.viaGithub&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleGithub,children:[l.jsx(Zn.gitHub,{className:"h-4 w-4"}),((n=e.texts)==null?void 0:n.continueWithGithub)??"Continue With Github"]}),e.viaTwitter&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleTwitter,children:[l.jsx(Zn.twitter,{className:"h-4 w-4"}),((r=e.texts)==null?void 0:r.continueWithTwitter)??"Continue With Twitter"]}),e.viaApple&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleApple,children:[l.jsx(Zn.apple,{className:"h-4 w-4"}),((o=e.texts)==null?void 0:o.continueWithApple)??"Continue With Apple"]}),e.viaMicrosoft&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleMicrosoft,children:[l.jsx(Zn.microsoft,{className:"h-4 w-4"}),((a=e.texts)==null?void 0:a.continueWithMicrosoft)??"Continue With Microsoft"]}),e.viaEmail&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleEmail,children:[l.jsx(Zn.mail,{className:"h-4 w-4"}),((i=e.texts)==null?void 0:i.continueWithEmail)??"Continue With Email"]}),e.viaPhone&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handlePhone,children:[l.jsx(Zn.phone,{className:"h-4 w-4"}),((s=e.texts)==null?void 0:s.continueWithPhone)??"Continue With Phone"]}),!e.withoutSignUp&&l.jsxs("div",{className:"p-3 text-center text-sm font-normal dark:text-gray-300",children:[e.texts.newUserText,l.jsx("span",{onClick:e.handleRouteToSignUp,className:"clickable-link",children:e.texts.createAccount})]})]})}),l.jsxs("div",{className:"mt-6 flex flex-row justify-between",children:[l.jsx(Sr,{onChangeTab:e.handleLanguage,design:"tabs",options:[{value:"ar",label:"عربي"},{value:"en",label:"English"}]}),l.jsx(Sr,{onChangeTab:e.handleColorMode,design:"tabs",options:[{value:"light",label:l.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90",children:l.jsx("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})},{value:"dark",label:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-[1.2rem] w-[1.2rem] transition-all dark:rotate-0 dark:scale-100",children:l.jsx("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"})})}]})]})]})},wL=e=>{var j,P,N,$,G;const[t,n]=p.useState(null),r=na(),{formState:{errors:o},handleSubmit:a,control:i}=r,[s,u]=p.useState(null),[c,d]=p.useState(0),[g,v]=p.useState(!1),[y,C]=p.useState(""),[h,w]=p.useState(e.confirmationStage),E=()=>{clearTimeout(s),d(60),v(!0);const J=setInterval(()=>{d(Q=>Q>0?Q-1:(clearInterval(J),v(!1),0))},1e3);u(J)};return l.jsx(Ut,{children:l.jsx(Lt,{className:"transition-all",headless:!0,children:h?l.jsxs("form",{onSubmit:V=>{V.preventDefault(),t&&e.handleConfirm(t)},children:[l.jsx(sm,{width:"full",digits:6,getPins:V=>n(V)}),l.jsx("div",{className:" py-2 text-center text-xs text-muted-foreground",children:g?l.jsxs("span",{children:["Resend code in ",c," seconds |"," ",l.jsx("span",{className:"clickable-link",onClick:()=>{clearTimeout(s),v(!1)},children:"Cancel"})]}):l.jsxs("span",{children:[((j=e.texts)==null?void 0:j.didntGetCode)??"Didn't get the code?"," ",l.jsx("span",{className:"clickable-link",onClick:()=>{E()},children:((P=e.texts)==null?void 0:P.resendCode)??"Click to resend"})]})}),l.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-2",children:[l.jsx(Qe,{variant:"secondary",onClick:()=>w(!1),children:((N=e.texts)==null?void 0:N.cancel)??"Cancel"}),l.jsx(Qe,{isLoading:e.loadingConfirm,children:(($=e.texts)==null?void 0:$.confirm)??"Confirm"})]})]}):l.jsxs("form",{onSubmit:V=>{V.preventDefault(),w(!0),e.handleContinue(y)},children:[l.jsx(Pt,{control:i,name:"phone",render:({field:V})=>l.jsx($d,{country:e.country??"",label:e.label??"",handleChange:J=>C(J.target.value),...V}),rules:{required:e.phoneRequiredText}}),l.jsx(Qe,{isLoading:e.loadingContinue,className:"w-full",children:((G=e.texts)==null?void 0:G.continue)??"Continue"})]})})})},EL=e=>{const{formState:{errors:t},handleSubmit:n,control:r}=na();return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs(Ut,{dir:e.direction,children:[l.jsx(Lt,{headless:!0,children:l.jsxs("form",{onSubmit:n(o=>e.handleSignIn(o)),children:[e.showError&&l.jsx(ro,{title:e.errorTitle,text:e.errorText,severity:"error"}),e.signInType==="email"?l.jsx(Pt,{control:r,name:"email",render:({field:o})=>{var a;return l.jsx(Ot,{width:"full",type:"text",autoComplete:"email",label:e.texts.emailLabel,helperText:(a=t.email)==null?void 0:a.message,placeholder:e.texts.emailPlaceholder,value:o.value??"",onChange:o.onChange})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}):e.signInType==="username"?l.jsx(Pt,{control:r,name:"username",render:({field:o})=>{var a;return l.jsx(Ot,{width:"full",type:"text",autoComplete:"username",label:e.texts.usernameLabel,helperText:(a=t.username)==null?void 0:a.message,placeholder:e.texts.usernamePlaceholder,onChange:o.onChange,value:o.value??""})},rules:{required:e.texts.usernameRequired}}):l.jsx(Pt,{control:r,name:"phone",render:({field:o})=>l.jsx($d,{label:"Phone number"}),rules:{required:e.texts.phoneRequiredText}}),e.signInType!=="phone"&&l.jsxs(l.Fragment,{children:[l.jsx(Pt,{control:r,name:"password",render:({field:o})=>{var a;return l.jsx(Ot,{width:"full",autoComplete:"current-password",type:"password",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:(a=t.password)==null?void 0:a.message,onChange:o.onChange,value:o.value??""})},rules:{required:e.texts.passwordRequiredText,minLength:5}}),!e.withoutResetPassword&&l.jsx("div",{onClick:e.handleForgotPassword,className:"mb-3 w-fit cursor-pointer text-xs dark:text-gray-300",children:e.texts.forgotPasswordText})]}),l.jsx(Qe,{className:"mt-4 w-full",isLoading:e.isLoading,children:e.texts.signInText}),!e.withoutSignUp&&l.jsxs("div",{className:"p-3 text-center text-sm font-normal dark:text-gray-300",children:[e.texts.newUserText," ",l.jsx("span",{onClick:e.handleRouteToSignUp,className:"clickable-link",children:e.texts.createAccount})]})]})}),e.viaGithub||e.viaGoogle||e.viaTwitter?l.jsxs(kr,{className:Pe(e.logosOnly?"flex flex-row justify-center gap-2":"grid grid-cols-1 gap-2"),children:[e.viaGoogle&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleGoogleSignIn,children:[e.isGoogleLoading?l.jsx(ws,{size:"button"}):l.jsx(Zn.google,{className:"h-4 w-4"}),!e.logosOnly&&e.texts.signInViaGoogleLabel]}),e.viaGithub&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleGithubSignIn,children:[e.isGithubLoading?l.jsx(ws,{size:"button"}):l.jsx(Zn.gitHub,{className:"h-4 w-4"}),!e.logosOnly&&e.texts.signInViaGithubLabel]}),e.viaTwitter&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleTwitterSignIn,children:[e.isTwitterLoading?l.jsx(ws,{size:"button"}):l.jsx(Zn.twitter,{className:"h-4 w-4"})," ",!e.logosOnly&&e.texts.signInViaTwitterLabel]})]}):null]}),l.jsx(lm,{currentColorMode:e.currentColorMode,currentLanguage:e.currentLanguage,handleColorMode:e.handleColorMode,handleLanguage:e.handleLanguage})]})};function SL(){return l.jsxs(Ut,{children:[l.jsxs(Ao,{className:"space-y-1",children:[l.jsx(jo,{className:"text-2xl",children:"Create an account"}),l.jsx(hi,{children:"Enter your email below to create your account"})]}),l.jsxs(Lt,{className:"grid gap-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[l.jsxs(Qe,{variant:"outline",children:[l.jsx(Zn.gitHub,{className:"mr-2 h-4 w-4"}),"Github"]}),l.jsxs(Qe,{variant:"outline",children:[l.jsx(Zn.google,{className:"mr-2 h-4 w-4"}),"Google"]})]}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx("span",{className:"w-full border-t"})}),l.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:l.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or continue with"})})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ea,{htmlFor:"email",children:"Email"}),l.jsx(Ls,{id:"email",type:"email",placeholder:"m@example.com"})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ea,{htmlFor:"password",children:"Password"}),l.jsx(Ls,{id:"password",type:"password"})]})]}),l.jsx(kr,{children:l.jsx(Qe,{className:"w-full",children:"Create account"})})]})}const DL=e=>{const t=na(),{formState:{errors:n},handleSubmit:r,control:o}=t;return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs(Ut,{dir:e.direction,children:[l.jsx(Lt,{headless:!0,children:l.jsxs("div",{children:[e.showError&&l.jsx(ro,{title:e.errorTitle,text:e.errorText,severity:"error"}),l.jsx(Gu,{...t,children:l.jsxs("form",{onSubmit:r(a=>e.handleSignUp(a)),children:[l.jsx("div",{children:e.signUpFields.map((a,i)=>{if(a==="fullname")return l.jsx(Pt,{control:o,name:"fullName",render:({field:s})=>{var u;return l.jsx(Ot,{width:"full",type:"text",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:(u=n.fullName)==null?void 0:u.message,onChange:s.onChange,value:s.value??""})},rules:{required:e.texts.fullNameRequiredText}},i);if(a==="email")return l.jsx(Pt,{control:o,name:"email",render:({field:s})=>{var u;return l.jsx(Ot,{width:"full",type:"text",autoComplete:"email",label:e.texts.emailLabel,helperText:(u=n.email)==null?void 0:u.message,placeholder:e.texts.emailPlaceholder,onChange:s.onChange,value:s.value??""})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}},i);if(a==="username")return l.jsx(Pt,{control:o,name:"username",render:({field:s})=>{var u;return l.jsx(Ot,{width:"full",type:"text",autoComplete:"username",label:e.texts.usernameLabel,helperText:(u=n.username)==null?void 0:u.message,placeholder:e.texts.usernamePlaceholder,onChange:s.onChange,value:s.value??""})},rules:{required:e.texts.usernameRequired}},i)})}),l.jsx(Pt,{control:o,name:"password",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"password",autoComplete:"new-password",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:(i=n.password)==null?void 0:i.message,onChange:a.onChange,value:a.value??""})},rules:{required:e.texts.passwordRequiredText}}),l.jsx(Pt,{control:o,name:"confirm_password",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"password",autoComplete:"new-password",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:(i=n.confirm_password)==null?void 0:i.message,onChange:a.onChange,value:a.value??""})},rules:{required:e.texts.passwordRequiredText}}),e.showRefCode&&l.jsx(Pt,{control:o,name:"refCode",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"text",label:e.texts.refCode,placeholder:e.texts.passwordPlaceholder,helperText:(i=n.password)==null?void 0:i.message,value:a.value??"",onChange:a.onChange})}}),e.showUserSource&&l.jsx("div",{children:l.jsx(Pt,{control:o,name:"reference",render:({field:a})=>l.jsx(uu,{label:"How did you learn about us?",isCreatable:!1,isMulti:!1,isSearchable:!1,isClearable:!1,options:[{value:"friend",label:"From a friend"},{value:"ad",label:"Advertisement"},{value:"other",label:"Other"}],onChange:i=>{a.onChange(i.value)}})})}),e.showTermsOption&&l.jsx(Pt,{control:o,name:"terms_accepted",render:({field:a})=>{var i;return l.jsx(Dm,{id:"terms_accepted",helperText:(i=n.terms_accepted)==null?void 0:i.message.toString(),onCheckedChange:s=>a.onChange(s),label:l.jsxs("span",{children:[e.texts.iAcceptText," ",l.jsx("a",{onClick:e.handleRouteToTOS,className:"clickable-link",children:e.texts.termsText})]})})},rules:{required:e.texts.termsRequiredText}}),e.showNewsletterOption&&l.jsx(Pt,{control:o,name:"newsletter_accepted",render:({field:a})=>l.jsx(Dm,{id:"newsletter_accepted",label:e.texts.subscribeToNewsletter,onCheckedChange:a.onChange})}),l.jsx(Qe,{className:"w-full",isLoading:e.isLoading,children:e.texts.signUpText})]})}),l.jsxs("div",{className:"flex flex-row items-center justify-center gap-1 p-3 text-center text-sm font-normal dark:text-white",children:[l.jsx("span",{children:e.texts.existingUserText}),l.jsx("span",{onClick:e.handleRouteToSignIn,className:"clickable-link",children:e.texts.signInText})]})]})}),e.viaGithub||e.viaGoogle||e.viaTwitter?l.jsxs(kr,{className:Pe(e.logosOnly?"flex flex-row justify-center gap-2":"grid grid-cols-1 gap-2"),children:[e.viaGoogle&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleGoogleSignUp,children:[l.jsx(Zn.google,{className:"h-4 w-4"}),!e.logosOnly&&e.texts.signUpViaGoogleLabel]}),e.viaGithub&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleGithubSignUp,children:[l.jsx(Zn.gitHub,{className:"h-4 w-4"}),!e.logosOnly&&e.texts.signUpViaGithubLabel]}),e.viaTwitter&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleTwitterSignUp,children:[l.jsx(Zn.twitter,{className:"h-4 w-4"}),!e.logosOnly&&e.texts.signUpViaTwitterLabel]})]}):null]}),l.jsx(lm,{currentColorMode:e.currentColorMode,currentLanguage:e.currentLanguage,handleColorMode:e.handleColorMode,handleLanguage:e.handleLanguage})]})},FL=e=>{const[t,n]=p.useState(!1),r=na(),{formState:{errors:o},handleSubmit:a,control:i}=r,s=u=>{u.password===u.confirmPassword?e.handleNewPassword():n(!0)};return l.jsxs(Ut,{dir:e.direction,children:[t&&l.jsx(ro,{text:e.texts.passwordMatchError,severity:"error"}),e.passwordChanged?l.jsx(Lt,{headless:!0,children:l.jsx("div",{className:"text-center",children:e.texts.passwordChanged})}):l.jsx(Gu,{...r,children:l.jsxs("form",{onSubmit:a(s),children:[!e.headless&&l.jsxs(Ao,{children:[l.jsx(jo,{children:"Create Password"}),l.jsx(hi,{children:"Set a new password for your account"})]}),l.jsxs(Lt,{headless:e.headless,children:[l.jsx(Pt,{control:i,name:"password",render:({field:u})=>{var c;return l.jsx(Ot,{width:"full",type:"password",autoComplete:"new-password",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:(c=o.password)==null?void 0:c.message,...u,value:u.value??""})},rules:{required:e.texts.passwordRequiredText}}),l.jsx(Pt,{control:i,name:"confirmPassword",render:({field:u})=>{var c;return l.jsx(Ot,{width:"full",type:"password",autoComplete:"new-password",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:(c=o.confirmPassword)==null?void 0:c.message,...u,value:u.value??""})},rules:{required:e.texts.confirmPasswordRequiredText}})]}),l.jsx(kr,{children:l.jsx(Qe,{className:"w-full",type:"submit",children:e.texts.updatePassword})})]})})]})},AL=e=>{var i,s,u,c,d,g;const t=na(),{formState:{errors:n},handleSubmit:r,register:o,control:a}=t;return l.jsx(Ut,{dir:e.direction,children:e.sent?l.jsx(Lt,{headless:!0,children:l.jsx("div",{className:"text-center",children:(g=e.texts)==null?void 0:g.emailSentText})}):l.jsxs(l.Fragment,{children:[!e.headless&&l.jsxs(Ao,{children:[l.jsx(jo,{children:"Reset Password"}),l.jsx(hi,{children:"Enter your email to reset your account password"})]}),l.jsxs("form",{onSubmit:r(e.handleResetPassword),children:[l.jsxs(Lt,{headless:e.headless,children:[l.jsx(Pt,{control:a,name:"email",render:({field:v})=>{var y,C,h;return l.jsx(Ot,{width:"full",type:"text",label:(y=e.texts)==null?void 0:y.emailLabel,helperText:(C=n.email)==null?void 0:C.message,placeholder:(h=e.texts)==null?void 0:h.emailPlaceholder,...v,value:v.value??""})},rules:{required:(i=e.texts)==null?void 0:i.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:(s=e.texts)==null?void 0:s.emailInvalidText}}}),l.jsxs("div",{className:"pb-2 text-start text-sm dark:text-gray-300",children:[((u=e.texts)==null?void 0:u.dontHaveAccount)??"Don't have an account? ",l.jsx("span",{onClick:e.handleRouteToSignUp,className:"clickable-link",children:((c=e.texts)==null?void 0:c.signUpText)??"Sign Up"})]})]}),l.jsx(kr,{children:l.jsx(Qe,{type:"submit",className:"w-full",children:(d=e.texts)==null?void 0:d.resetPassword})})]})]})})},jL=e=>{const[t,n]=p.useState(null);return l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,children:[e.showError&&l.jsx(ro,{title:e.errorTitle,text:e.errorText,severity:"error"}),l.jsxs("div",{className:"mb-4 dark:text-white",children:[l.jsx("div",{className:"text-lg font-bold",children:e.texts.checkYourPhone??"Please check your phone"}),l.jsxs("div",{className:"text-muted-foreground",children:[l.jsx("span",{children:e.texts.weSentCode??"We've sent a code to "}),l.jsx("span",{children:e.phoneNumber})]})," "]}),l.jsxs("form",{onSubmit:r=>{r.preventDefault(),t&&e.submitConfirmation(t)},children:[l.jsx(sm,{width:"full",digits:6,getPins:r=>n(r)}),l.jsxs("div",{className:" py-2 text-center text-xs text-muted-foreground",children:[l.jsx("span",{children:e.texts.didntGetCode??"Didn't get the code?"})," ",l.jsx("span",{className:"clickable-link",children:e.texts.resendCode??"Click to resend"})]}),l.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-2",children:[l.jsx(Qe,{variant:"secondary",children:e.texts.cancel??"Cancel"}),l.jsx(Qe,{children:e.texts.confirm??"Confirm"})]})]})]})})},IL=({texts:e,handleResend:t})=>l.jsxs(Ut,{children:[l.jsx(Lt,{headless:!0,children:l.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[l.jsx("div",{className:"flex h-16 w-16 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground",children:l.jsxs("svg",{stroke:"currentColor",fill:"none","stroke-width":"2",viewBox:"0 0 24 24","stroke-linecap":"round","stroke-linejoin":"round",height:"0.5em",width:"0.5em",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),l.jsx("polyline",{points:"22,6 12,13 2,6"})]})}),l.jsx("div",{className:"m-2 text-xl font-bold",children:(e==null?void 0:e.checkEmail)??"Check you email"}),l.jsx("div",{className:"text-sm",children:(e==null?void 0:e.pleaseVerify)??"Thank you for signing up! To complete your registration, we've sent a verification email to the address you provided. Please check your inbox and follow the instructions in the email to activate your account."})]})}),l.jsx(kr,{className:"flex flex-col justify-center ",children:l.jsx("span",{className:"clickable-link text-sm",onClick:t,children:(e==null?void 0:e.resendEmail)??"Resend Email"})})]}),TL=e=>{const[t,n]=p.useState("");return l.jsxs(Ut,{children:[l.jsxs(Ao,{children:[l.jsx(jo,{children:"Choose Payment Method"}),l.jsx(hi,{children:"And you'll be directed to the next step to complete the payment"})]}),l.jsxs(Lt,{className:"grid grid-cols-2 gap-4",children:[l.jsxs(Qe,{className:Pe("flex w-full flex-col gap-2 pt-6",t==="mada"&&"outline outline-4 outline-primary"),variant:"outline",size:"heightless",disabled:!e.viaMada,onClick:()=>n("mada"),children:[l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",className:"h-6"}),l.jsx("span",{children:e.madaLabel})]}),l.jsxs(Qe,{className:Pe("flex w-full flex-col gap-2",t==="apple-pay"&&"outline outline-4 outline-primary"),variant:"outline",size:"heightless",disabled:!e.viaApplePay,onClick:()=>n("apple-pay"),children:[l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",className:"h-11"}),l.jsx("span",{children:e.applePayLabel})]}),l.jsxs(Qe,{className:Pe("flex w-full flex-col gap-2",t==="visa-master"&&"outline outline-4 outline-primary"),variant:"outline",size:"heightless",disabled:!e.viaCreditCard,onClick:()=>n("visa-master"),children:[l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",className:"h-6"}),l.jsx("span",{children:e.visaMasterLabel})]}),l.jsxs(Qe,{variant:"outline",size:"heightless",className:Pe("flex w-full flex-col gap-2",t==="wallet"&&"outline outline-4 outline-primary"),disabled:!e.viaWallet,onClick:()=>n("wallet"),children:[l.jsx("svg",{version:"1.1",fill:"currentColor",viewBox:"0 0 223 223",className:"h-6 w-6",children:l.jsxs("g",{children:[l.jsx("path",{d:`M223,94.5c0-6.075-4.925-11-11-11h-63c-6.075,0-11,4.925-11,11v33c0,6.075,4.925,11,11,11h63c6.075,0,11-4.925,11-11V94.5z
251
+ */function l3(e,t){return e?rM(e)?q.createElement(e,t):e:null}function rM(e){return oM(e)||typeof e=="function"||aM(e)}function oM(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function aM(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function iM(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=q.useState(()=>({current:ZR(t)})),[r,o]=q.useState(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:i=>{o(i),e.onStateChange==null||e.onStateChange(i)}})),n.current}const sM=({columns:e,data:t,...n})=>{var w,E,j,P,N,$,G,V,J,Q,he;const[r,o]=q.useState([]),[a,i]=q.useState([]),[s,u]=q.useState(""),[c,d]=q.useState({}),[g,v]=q.useState({}),[y,C]=q.useState({}),h=iM({data:t,columns:e,onExpandedChange:d,getExpandedRowModel:tM(),onGlobalFilterChange:u,onSortingChange:o,onColumnFiltersChange:i,getCoreRowModel:YR(),getPaginationRowModel:nM(),getSortedRowModel:eM(),getFilteredRowModel:qR(),onColumnVisibilityChange:v,onRowSelectionChange:C,state:{sorting:r,columnFilters:a,columnVisibility:g,globalFilter:s,rowSelection:y,expanded:c}});return l.jsxs("div",{className:"flex w-full flex-col gap-4",children:[l.jsx("div",{className:"flex items-center",children:l.jsx(Ot,{placeholder:(w=n.texts)==null?void 0:w.searchPlaceholder,value:s??"",onChange:xe=>u(xe.target.value),margin:"none",className:"w-full md:max-w-sm"})}),l.jsx("div",{className:"rounded-md",children:l.jsxs(Zm,{children:[h.getAllColumns().length>0&&l.jsx(Xm,{children:h.getHeaderGroups().map(xe=>l.jsx(Lu,{children:xe.headers.map(ne=>{var R;let de=(R=ne.column.columnDef.meta)==null?void 0:R.sortable;return l.jsx(Ym,{condensed:n.condensed,clickable:de,children:ne.isPlaceholder?null:l3(ne.column.columnDef.header,ne.getContext())},ne.id)})},xe.id))}),l.jsx(Jm,{children:(E=h.getRowModel().rows)!=null&&E.length?h.getRowModel().rows.map(xe=>l.jsx(Lu,{"data-state":xe.getIsSelected()&&"selected",children:xe.getVisibleCells().map(ne=>l.jsx(jf,{condensed:n.condensed,children:l3(ne.column.columnDef.cell,ne.getContext())},ne.id))},xe.id)):l.jsx(Lu,{children:l.jsx(jf,{colSpan:e.length,className:"h-24 text-center",children:(j=n.texts)==null?void 0:j.noData})})})]})}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"flex w-fit flex-row items-center gap-2 text-sm text-muted-foreground"}),h.getPageCount()!==0&&l.jsxs("div",{className:"flex w-fit flex-row items-center gap-2 ",children:[l.jsx(pi,{size:"sm",width:"parent",direction:n.direction,items:[{label:`10 / ${(P=n.texts)==null?void 0:P.page}`,value:10},{label:`20 / ${(N=n.texts)==null?void 0:N.page}`,value:20},{label:`30 / ${($=n.texts)==null?void 0:$.page}`,value:30},{label:`40 / ${(G=n.texts)==null?void 0:G.page}`,value:40},{label:`50 / ${(V=n.texts)==null?void 0:V.page}`,value:50}],trigger:l.jsx(Qe,{variant:"outline",size:"icon",className:"h-fit w-fit p-0 px-2 py-1 ",children:`${h.getState().pagination.pageSize} / ${(J=n.texts)==null?void 0:J.page}`}),onItemSelect:xe=>h.setPageSize(Number(xe))}),l.jsx("div",{className:"flex w-fit flex-row items-center gap-2 text-sm ",children:l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx("div",{children:(Q=n.texts)==null?void 0:Q.page}),l.jsxs("div",{className:"flex flex-row gap-1",children:[l.jsx("span",{className:"font-bold",children:h.getState().pagination.pageIndex+1}),l.jsx("span",{children:(he=n.texts)==null?void 0:he.of}),l.jsx("span",{className:"font-bold",children:h.getPageCount()})]})]})}),l.jsx(Qe,{variant:"outline",size:"smallIcon",onClick:()=>h.previousPage(),disabled:!h.getCanPreviousPage(),className:Pe(n.direction==="ltr"&&"rotate-180"),children:l.jsx("svg",{"aria-label":"Chevron Right Icon",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",children:l.jsx("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"})})}),l.jsx(Qe,{variant:"outline",size:"smallIcon",onClick:()=>h.nextPage(),disabled:!h.getCanNextPage(),className:Pe(n.direction==="rtl"&&"rotate-180"),children:l.jsx("svg",{"aria-label":"Chevron Right Icon",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",children:l.jsx("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"})})})]})]})]})},lM=e=>l.jsxs(Qe,{variant:"ghost",className:Pe("flex w-full flex-row justify-start gap-2",e.condensed&&"h-6"),onClick:e.onSort,children:[e.label,l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e.condensed?"h-3 w-3":"h-4 w-4",children:[l.jsx("path",{d:"m21 16-4 4-4-4"}),l.jsx("path",{d:"M17 20V4"}),l.jsx("path",{d:"m3 8 4-4 4 4"}),l.jsx("path",{d:"M7 4v16"})]})]}),uM=e=>l.jsx("div",{children:e.children}),cM=e=>l.jsx("div",{className:"fixed bottom-0 top-auto left-0 m-0 w-full max-w-full p-1",children:l.jsx("div",{className:"flex w-full flex-row items-center justify-evenly rounded bg-gray-200",children:e.appBarContent.map((t,n)=>l.jsxs("div",{className:"m-1 flex h-full w-full flex-col items-center justify-center rounded p-2 transition-all hover:cursor-pointer hover:bg-buttonPrimary-700 hover:text-white",onClick:t.action,children:[l.jsx("div",{children:t.icon}),l.jsx("div",{className:"mt-2 text-sm",children:t.label})]},n))})}),gv=(e=!1)=>{const[t,n]=p.useState(e);return{isOpen:t,onOpen:()=>n(!0),onClose:()=>n(!1)}},Bf=()=>{const[e,t]=p.useState(window==null?void 0:window.innerWidth),n=()=>{t(window==null?void 0:window.innerWidth)};return p.useEffect(()=>{if(typeof window<"u")return window==null||window.addEventListener("resize",n),()=>{window==null||window.removeEventListener("resize",n)}},[]),e},dM=({direction:e="rtl",navigationSize:t="md",...n})=>{var d;const[r,o]=p.useState(!1);p.useState(!1),gv(!1);const a=p.useRef(null);p.useRef(null);let i;typeof window<"u"?i=Bf():i=1200;const[s,u]=p.useState(!1);p.useEffect(()=>{const g=v=>{a.current&&!a.current.contains(v.target)&&!s&&o(!1)};return document.addEventListener("click",g,!0),()=>{document.removeEventListener("click",g,!0)}},[s]);let c={sm:"h-10",md:"",lg:"h-24"};return l.jsxs("div",{className:"h-full w-full",children:[l.jsxs("div",{className:_e("z-30 flex w-auto select-none flex-row items-start justify-between bg-layoutPrimary-500 transition-all",c[t],"rounded p-3 ",r?"h-44":"h-14",n.stickyNav?"fixed left-4 right-4 top-4":"",e==="rtl"?"flex-row":"flex-row-reverse"),children:[i>600?l.jsx("div",{className:"flex flex-row h-8 items-center gap-4 px-3",children:(d=n.navItems)==null?void 0:d.map(({label:g},v)=>l.jsx("div",{onClick:()=>o(!r),className:"cursor-pointer rounded bg-none text-gray-600 transition-all hover:text-black",children:g},v))}):l.jsxs("div",{className:"flex items-center justify-center",children:[l.jsxs("div",{onClick:()=>o(!r),className:"cursor-pointer rounded p-1 transition-all hover:bg-gray-100",children:[l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",height:"1.6em",width:"1.6em",children:l.jsx("path",{fillRule:"evenodd",d:"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})," "]}),n.pageTitle?l.jsx("div",{children:n.pageTitle}):l.jsx("div",{})]}),l.jsx("div",{className:"h-full",children:l.jsx("img",{className:"h-full max-h-8 ",src:`https://sikka-images.s3.ap-southeast-1.amazonaws.com/seera/seera-horizontal-wordmark-${e==="rtl"?"ar":"en"}-white.svg`})})]}),l.jsx("div",{className:_e(" relative top-14"),children:n.children})]})},u3="Collapsible",[fM,c3]=cr(u3),[gM,pv]=fM(u3),pM=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[u=!1,c]=jr({prop:r,defaultProp:o,onChange:i});return p.createElement(gM,{scope:n,disabled:a,contentId:Ir(),open:u,onOpenToggle:p.useCallback(()=>c(d=>!d),[c])},p.createElement(Et.div,ye({"data-state":hv(u),"data-disabled":a?"":void 0},s,{ref:t})))}),hM="CollapsibleTrigger",mM=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=pv(hM,n);return p.createElement(Et.button,ye({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":hv(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:ot(e.onClick,o.onOpenToggle)}))}),d3="CollapsibleContent",vM=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pv(d3,e.__scopeCollapsible);return p.createElement(Kn,{present:n||o.open},({present:a})=>p.createElement(bM,ye({},r,{ref:t,present:a})))}),bM=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=pv(d3,n),[s,u]=p.useState(r),c=p.useRef(null),d=Jt(t,c),g=p.useRef(0),v=g.current,y=p.useRef(0),C=y.current,h=i.open||s,w=p.useRef(h),E=p.useRef();return p.useEffect(()=>{const j=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(j)},[]),Aa(()=>{const j=c.current;if(j){E.current=E.current||{transitionDuration:j.style.transitionDuration,animationName:j.style.animationName},j.style.transitionDuration="0s",j.style.animationName="none";const P=j.getBoundingClientRect();g.current=P.height,y.current=P.width,w.current||(j.style.transitionDuration=E.current.transitionDuration,j.style.animationName=E.current.animationName),u(r)}},[i.open,r]),p.createElement(Et.div,ye({"data-state":hv(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h},a,{ref:d,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...e.style}}),h&&o)});function hv(e){return e?"open":"closed"}const xM=pM,yM=mM,CM=vM,Ma="Accordion",wM=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[mv,EM,SM]=bd(Ma),[Nf,W_]=cr(Ma,[SM,c3]),vv=c3(),f3=p.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return p.createElement(mv.Provider,{scope:e.__scopeAccordion},n==="multiple"?p.createElement(jM,ye({},a,{ref:t})):p.createElement(AM,ye({},o,{ref:t})))});f3.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[g3,DM]=Nf(Ma),[p3,FM]=Nf(Ma,{collapsible:!1}),AM=p.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,u]=jr({prop:n,defaultProp:r,onChange:o});return p.createElement(g3,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:u,onItemClose:p.useCallback(()=>a&&u(""),[a,u])},p.createElement(p3,{scope:e.__scopeAccordion,collapsible:a},p.createElement(h3,ye({},i,{ref:t}))))}),jM=p.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i=[],s]=jr({prop:n,defaultProp:r,onChange:o}),u=p.useCallback(d=>s((g=[])=>[...g,d]),[s]),c=p.useCallback(d=>s((g=[])=>g.filter(v=>v!==d)),[s]);return p.createElement(g3,{scope:e.__scopeAccordion,value:i,onItemOpen:u,onItemClose:c},p.createElement(p3,{scope:e.__scopeAccordion,collapsible:!0},p.createElement(h3,ye({},a,{ref:t}))))}),[IM,Of]=Nf(Ma),h3=p.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...i}=e,s=p.useRef(null),u=Jt(s,t),c=EM(n),g=xd(o)==="ltr",v=ot(e.onKeyDown,y=>{var C;if(!wM.includes(y.key))return;const h=y.target,w=c().filter(Q=>{var he;return!((he=Q.ref.current)!==null&&he!==void 0&&he.disabled)}),E=w.findIndex(Q=>Q.ref.current===h),j=w.length;if(E===-1)return;y.preventDefault();let P=E;const N=0,$=j-1,G=()=>{P=E+1,P>$&&(P=N)},V=()=>{P=E-1,P<N&&(P=$)};switch(y.key){case"Home":P=N;break;case"End":P=$;break;case"ArrowRight":a==="horizontal"&&(g?G():V());break;case"ArrowDown":a==="vertical"&&G();break;case"ArrowLeft":a==="horizontal"&&(g?V():G());break;case"ArrowUp":a==="vertical"&&V();break}const J=P%j;(C=w[J].ref.current)===null||C===void 0||C.focus()});return p.createElement(IM,{scope:n,disabled:r,direction:o,orientation:a},p.createElement(mv.Slot,{scope:n},p.createElement(Et.div,ye({},i,{"data-orientation":a,ref:u,onKeyDown:r?void 0:v}))))}),bv="AccordionItem",[TM,xv]=Nf(bv),kM=p.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Of(bv,n),i=DM(bv,n),s=vv(n),u=Ir(),c=r&&i.value.includes(r)||!1,d=a.disabled||e.disabled;return p.createElement(TM,{scope:n,open:c,disabled:d,triggerId:u},p.createElement(xM,ye({"data-orientation":a.orientation,"data-state":v3(c)},s,o,{ref:t,disabled:d,open:c,onOpenChange:g=>{g?i.onItemOpen(r):i.onItemClose(r)}})))}),PM="AccordionHeader",BM=p.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Of(Ma,n),a=xv(PM,n);return p.createElement(Et.h3,ye({"data-orientation":o.orientation,"data-state":v3(a.open),"data-disabled":a.disabled?"":void 0},r,{ref:t}))}),m3="AccordionTrigger",NM=p.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Of(Ma,n),a=xv(m3,n),i=FM(m3,n),s=vv(n);return p.createElement(mv.ItemSlot,{scope:n},p.createElement(yM,ye({"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId},s,r,{ref:t})))}),OM="AccordionContent",$M=p.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Of(Ma,n),a=xv(OM,n),i=vv(n);return p.createElement(CM,ye({role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation},i,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function v3(e){return e?"open":"closed"}const RM=f3,MM=kM,LM=BM,b3=NM,x3=$M,_M=RM;let y3="flex flex-1 items-center select-none cursor-pointer bg-primary-foreground rounded justify-between p-2 px-3 font-medium transition-all [&[data-state=open]>svg]:-rotate-90";const C3=q.forwardRef(({className:e,...t},n)=>l.jsx(MM,{ref:n,className:Pe(e),...t}));C3.displayName="AccordionItem";const w3=q.forwardRef(({className:e,showArrow:t,children:n,...r},o)=>l.jsx(LM,{className:"flex",children:l.jsxs(b3,{ref:o,className:Pe(y3,e),...r,children:[n,t&&l.jsx("svg",{"aria-label":"Chevron Right Icon",stroke:"currentColor",fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",className:"h-4 w-4 shrink-0 rotate-90 transition-transform duration-200",children:l.jsx("path",{d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"})})]})}));w3.displayName=b3.displayName;const E3=q.forwardRef(({className:e,children:t,...n},r)=>l.jsx(x3,{ref:r,className:Pe("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...n,children:l.jsx("div",{children:t})}));E3.displayName=x3.displayName;const S3=({title:e,items:t,selectedItem:n,openedItem:r,setOpenedItem:o,onItemClick:a,onSubItemClick:i,direction:s,isOpen:u})=>l.jsxs("div",{children:[e&&l.jsx("h3",{className:"mb-1 font-bold",children:e}),l.jsx("ul",{className:"flex flex-col gap-2",children:l.jsx(_M,{value:r,type:"single",onValueChange:c=>{o(c)},collapsible:!0,className:"flex flex-col gap-1",children:t.map((c,d)=>l.jsx(D3,{isOpen:u,selectedItem:n,direction:s,item:c,onItemClick:a,onSubItemClick:i},d))})})]}),D3=({item:e,onItemClick:t,onSubItemClick:n,direction:r,isOpen:o=!0,...a})=>{const i=s=>a.selectedItem===s?"bg-primary text-primary-foreground cursor-default":"hover:bg-primary/10";return e.subitems?l.jsxs(C3,{value:e.value,className:"overflow-x-clip",dir:r,children:[l.jsx(w3,{className:Pe("overflow-x-clip",a.selectedItem===e.value?"cursor-default bg-primary text-primary-foreground":"hover:bg-primary/10",e.subitems&&e.subitems.some(s=>a.selectedItem===s.value)?"bg-primary text-primary-foreground hover:bg-primary":""),showArrow:o,children:l.jsxs("div",{className:Pe(!o&&"py-1","flex w-fit flex-row items-center gap-2"),children:[e.icon,o&&l.jsx("span",{className:Pe("transition-all ",o?"opacity-100":"opacity-0"),children:e.label})]})}),e.subitems&&l.jsx(E3,{className:" mt-1 h-full rounded ",children:l.jsx("div",{className:Pe("flex h-full flex-col gap-2 bg-foreground/5 p-1"),children:e.subitems.map((s,u)=>l.jsxs("li",{onClick:c=>{c.stopPropagation(),s.onClick(),n&&n([e.value,s.value])},className:Pe("flex h-full cursor-pointer flex-row items-center gap-2 rounded p-2 transition-all",i(s.value)),children:[s.icon,s.label]},u))})})]}):l.jsx("div",{dir:r,onClick:()=>{e.onClick(),t&&t([e.value])},className:Pe(y3,i(e.value),"overflow-x-clip "),children:l.jsxs("div",{className:"flex flex-row items-center gap-2 ",children:[e.icon,l.jsx("span",{className:Pe("whitespace-nowrap transition-all",o?"opacity-100":"opacity-0"),children:e.label})]})})},VM=({direction:e="ltr",drawerSize:t="md",onSettingsClick:n,DrawerFooterActions:r,currentPage:o,clickedItem:a,design:i="default",...s})=>{var $,G;let u=56,c=200,d={opened:{sm:"100",md:c,lg:"250"},closed:{sm:u,md:u,lg:u}};const g=p.useRef(null),v=e==="rtl",[y,C]=p.useState("");p.useState(o);let h;typeof window<"u"?h=Bf():h=1200;const[w,E]=p.useState(()=>h>600?s.keepDrawerOpen!==void 0?s.keepDrawerOpen:!0:!1),[j,P]=p.useState(h>600);let N=h>600?d[w?"opened":"closed"][t]:0;return p.useEffect(()=>{const V=J=>{g.current&&!g.current.contains(J.target)&&!w&&P(!1)};return document.addEventListener("click",V,!0),()=>{document.removeEventListener("click",V,!0)}},[w]),l.jsxs("div",{className:"fixed left-0",children:[s.topBar&&l.jsxs("div",{className:_e("fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-primary-foreground p-2",v?"flex-row-reverse":"flex-row"),children:[h>600?l.jsx("div",{className:_e("dark:text-white",v?[h>600?"mr-14":"mr-2",w?"mr-40":""]:[h>600?"ml-14":"ml-2",w?"ml-40":""]),style:v?{marginRight:`${d[w?"opened":"closed"][t]}px`}:{marginLeft:`${d[w?"opened":"closed"][t]}px`},children:s.pageTitle}):l.jsxs("div",{dir:e,className:"flex items-center justify-center gap-0.5",children:[l.jsx("div",{onClick:()=>P(!0),className:"z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100",children:l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 20 20","aria-hidden":"true",height:"1.6em",width:"1.6em",children:l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"})})}),s.pageTitle?l.jsx("div",{className:"text-sm",children:s.pageTitle}):l.jsx("div",{})]}),l.jsxs("div",{className:_e("flex gap-2 dark:text-white",v?"flex-row-reverse":"flex-row"),children:[h>600?l.jsxs("div",{className:v?"text-left text-xs":"text-right text-xs",children:[l.jsx("div",{className:"font-bold",children:s.username})," ",l.jsx("div",{children:s.email})]}):null,l.jsx(pi,{triggerClassname:"mx-2",align:"end",alignOffset:8,side:"bottom",sideOffset:5,width:s.profileMenuWidth,direction:v?"rtl":"ltr",items:s.profileMenuItems,onItemSelect:V=>console.log("selecting item ",V),trigger:l.jsx("div",{className:"relative h-8 w-8 cursor-pointer overflow-clip rounded ring-1 ring-primary/30 dark:bg-gray-600",children:s.avatarImage?l.jsx("img",{src:s.avatarImage,alt:"User Avatar"}):l.jsx("svg",{"aria-label":"Avatar Icon",className:"absolute -left-1 h-10 w-10 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})})})})]})]}),l.jsxs("div",{className:_e("fixed z-40 flex flex-col justify-between overflow-x-clip transition-all",i==="floating"?v?"right-5 top-5":"bottom-5 left-5 top-5":v?"right-0 top-0 h-full":"left-0 top-0 h-full"),style:{width:h>600?j?`${d.opened[t]}px`:`${d.closed[t]}px`:j?`${d.opened[t]}px`:"0px"},onMouseEnter:()=>{P(!0)},onMouseLeave:()=>{w?P(!0):(C(""),P(!1))},ref:g,children:[l.jsxs("div",{dir:e,className:"fixed z-50 mb-2 flex h-14 w-full flex-row items-center justify-center bg-primary-foreground transition-all",style:{width:h>600?`${j?c:56}px`:`${j?c:0}px`},children:[l.jsx("img",{className:_e("h-9 opacity-0 transition-all",j?"visible opacity-100":"invisible opacity-0"),src:s.logoLink}),h>600?l.jsx("img",{className:_e("fixed h-9 transition-all",i==="floating"?v?"right-7.5 top-7":"left-7.5 top-7":v?"right-2.5 top-2.5":"left-2.5 top-2.5",j?"invisible opacity-0":"visible opacity-100"),src:s.logoSymbol}):null]}),l.jsx("div",{className:_e("fixed bottom-14 bg-primary-foreground p-2 py-2 transition-all",i==="floating"?"top-[76px]":"top-14",j?"overflow-auto":"overflow-hidden"),style:{height:i==="floating"?"calc(100% - 152px)":"calc(100% - 112px)",width:h>600?`${j?c:56}px`:`${j?c:0}px`},children:l.jsx(S3,{direction:e,onItemClick:V=>{a&&a(V)},onSubItemClick:V=>{a&&a(V)},selectedItem:o,openedItem:y,setOpenedItem:V=>C(V),isOpen:j,items:s.drawerItems})}),l.jsxs("div",{className:_e("fixed flex h-14 w-full items-center justify-center gap-2 overflow-clip bg-primary-foreground transition-all",e==="rtl"?"flex-row-reverse":"flex-row",i==="floating"?"bottom-5":"bottom-0"),style:{width:h>600?`${j?c:56}px`:`${j?c:0}px`},children:[r&&j?l.jsx(l.Fragment,{children:r}):null,h>600&&j?l.jsx(Is,{side:"left",delayDuration:500,content:w?(($=s.texts)==null?void 0:$.collapseSidebar)||"Collapse Sidebar":((G=s.texts)==null?void 0:G.expandSidebar)||"Expand Sidebar",children:l.jsx(Qe,{variant:"light",onClick:()=>{E(!w),s.onDrawerExpand&&s.onDrawerExpand(w)},size:"smallIcon",children:l.jsx("svg",{className:_e("h-6 w-6 shrink-0 text-primary transition-all disabled:bg-gray-200 ",w?v?"-rotate-90":"rotate-90":v?"rotate-90":"-rotate-90"),fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})}):null]})]}),l.jsx("div",{className:"fixed overflow-y-auto transition-all",style:i==="floating"?v?{height:`calc(100% - ${s.topBar?"56":"0"}px)`,width:`calc(100% - ${N+20}px)`,left:"0px",top:s.topBar?"56px":"0px"}:{height:`calc(100% - ${s.topBar?"56":"0"}px)`,width:`calc(100% - ${N+20}px)`,left:`${N+20}px`,top:s.topBar?"56px":"0px"}:v?{height:`calc(100% - ${s.topBar?"56":"0"}px)`,width:`calc(100% - ${N}px)`,left:"0px",top:s.topBar?"56px":"0px"}:{height:`calc(100% - ${s.topBar?"56":"0"}px)`,width:`calc(100% - ${N}px)`,left:`${N}px`,top:s.topBar?"56px":"0px"},children:s.children})]})};var F3={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},A3=p.createContext&&p.createContext(F3),La=globalThis&&globalThis.__assign||function(){return La=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},La.apply(this,arguments)},WM=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function j3(e){return e&&e.map(function(t,n){return p.createElement(t.tag,La({key:n},t.attr),j3(t.child))})}function Vu(e){return function(t){return p.createElement(HM,La({attr:La({},e.attr)},t),j3(e.child))}}function HM(e){var t=function(n){var r=e.attr,o=e.size,a=e.title,i=WM(e,["attr","size","title"]),s=o||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),p.createElement("svg",La({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,i,{className:u,style:La(La({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&p.createElement("title",null,a),e.children)};return A3!==void 0?p.createElement(A3.Consumer,null,function(n){return t(n)}):t(F3)}function GM(e){return Vu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M510.846 392.673c-5.211 12.157-27.239 21.089-67.36 27.318-2.064 2.786-3.775 14.686-6.507 23.956-1.625 5.566-5.623 8.869-12.128 8.869l-.297-.005c-9.395 0-19.203-4.323-38.852-4.323-26.521 0-35.662 6.043-56.254 20.588-21.832 15.438-42.771 28.764-74.027 27.399-31.646 2.334-58.025-16.908-72.871-27.404-20.714-14.643-29.828-20.582-56.241-20.582-18.864 0-30.736 4.72-38.852 4.72-8.073 0-11.213-4.922-12.422-9.04-2.703-9.189-4.404-21.263-6.523-24.13-20.679-3.209-67.31-11.344-68.498-32.15a10.627 10.627 0 0 1 8.877-11.069c69.583-11.455 100.924-82.901 102.227-85.934.074-.176.155-.344.237-.515 3.713-7.537 4.544-13.849 2.463-18.753-5.05-11.896-26.872-16.164-36.053-19.796-23.715-9.366-27.015-20.128-25.612-27.504 2.437-12.836 21.725-20.735 33.002-15.453 8.919 4.181 16.843 6.297 23.547 6.297 5.022 0 8.212-1.204 9.96-2.171-2.043-35.936-7.101-87.29 5.687-115.969C158.122 21.304 229.705 15.42 250.826 15.42c.944 0 9.141-.089 10.11-.089 52.148 0 102.254 26.78 126.723 81.643 12.777 28.65 7.749 79.792 5.695 116.009 1.582.872 4.357 1.942 8.599 2.139 6.397-.286 13.815-2.389 22.069-6.257 6.085-2.846 14.406-2.461 20.48.058l.029.01c9.476 3.385 15.439 10.215 15.589 17.87.184 9.747-8.522 18.165-25.878 25.018-2.118.835-4.694 1.655-7.434 2.525-9.797 3.106-24.6 7.805-28.616 17.271-2.079 4.904-1.256 11.211 2.46 18.748.087.168.166.342.239.515 1.301 3.03 32.615 74.46 102.23 85.934 6.427 1.058 11.163 7.877 7.725 15.859z"}}]})(e)}function zM(e){return Vu({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448,209.91a210.06,210.06,0,0,1-122.77-39.25V349.38A162.55,162.55,0,1,1,185,188.31V278.2a74.62,74.62,0,1,0,52.23,71.18V0l88,0a121.18,121.18,0,0,0,1.86,22.17h0A122.18,122.18,0,0,0,381,102.39a121.43,121.43,0,0,0,67,20.14Z"}}]})(e)}function I3(e){return Vu({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"}}]})(e)}const UM=({direction:e="rtl",drawerSize:t="md",onSettingsClick:n,...r})=>{var w;const[o,a]=p.useState(!1),[i,s]=p.useState("");gv(!1);const[u,c]=p.useState(!1),d=p.useRef(null),g=e==="rtl";let v;typeof window<"u"?v=Bf():v=1200,p.useEffect(()=>{const E=j=>{d.current&&!d.current.contains(j.target)&&!u&&a(!1)};return document.addEventListener("click",E,!0),()=>{document.removeEventListener("click",E,!0)}},[u]);let y="fixed top-0 z-40 flex h-full flex-col justify-between overflow-x-clip bg-layoutPrimary-500 transition-all",C={opened:{sm:"100",md:"160",lg:"250"},closed:{sm:"56",md:"56",lg:"56"}},h=v>600?C[u?"opened":"closed"][t]:0;return l.jsxs("div",{className:"fixed",children:[r.topBar&&l.jsxs("div",{className:_e("fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-layoutPrimary-500 p-2",g?"flex-row-reverse":"flex-row"),children:[v>600?r.pageTitle?l.jsx("div",{className:_e(g?[v>600?"mr-14":"mr-2",u?"mr-40":""]:[v>600?"ml-14":"ml-2",u?"ml-40":""]),style:g?{marginRight:`${C[u?"opened":"closed"][t]}px`}:{marginLeft:`${C[u?"opened":"closed"][t]}px`},children:r.pageTitle}):null:l.jsxs("div",{dir:e,className:"flex items-center justify-center gap-0.5 ",children:[l.jsxs("div",{onClick:()=>a(!0),className:"z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100",children:[l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",height:"1.6em",width:"1.6em",children:l.jsx("path",{fillRule:"evenodd",d:"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})," "]}),r.pageTitle?l.jsx("div",{className:"text-sm",children:r.pageTitle}):l.jsx("div",{})]}),l.jsxs("div",{className:_e("flex gap-2",g?"flex-row-reverse":"flex-row"),children:[v>600?l.jsxs("div",{className:_e(g?"text-left text-xs":"text-right text-xs"),children:[l.jsx("div",{className:"font-bold",children:r.username})," ",l.jsx("div",{children:r.email})]}):null,l.jsx(Rd,{direction:e,withHeader:!(v>600),headerTitle:v>600?"":r.username,headerSubtitle:v>600?"":r.email,menuItems:r.profileMenuItems,position:"bottom-left",children:l.jsx("div",{className:"relative h-8 w-8 cursor-pointer overflow-hidden rounded-full ring-1 ring-buttonPrimary-500 dark:bg-gray-600",children:l.jsx("svg",{className:"absolute -left-1 h-10 w-10 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})})})})]})]}),l.jsx("div",{onMouseEnter:()=>{a(!0)},onMouseLeave:()=>a(!!u),ref:d,className:_e(y,C[t],g?"right-0":"left-0"),style:{width:v>600?o?`${C.opened[t]}px`:`${C.closed[t]}px`:o?`${C.opened[t]}px`:"0px"},children:l.jsxs("div",{className:_e("no-scrollbar",r.topBar?"":"mt-2",o?"overflow-auto":"overflow-hidden"),children:[l.jsxs("div",{dir:e,className:_e("fixed z-50 mb-2 flex h-14 flex-row items-center transition-all ",v>600||o?"bg-layoutPrimary-500":"w-0 bg-transparent"),style:{width:v>600?`${C[o?"opened":"closed"][t]-16}px`:"full"},children:[l.jsx("img",{className:_e("fixed top-2.5 h-9 opacity-0 transition-all",g?"right-2.5":"left-2.5",o?"visible opacity-100":"invisible opacity-0"),src:r.logoLink}),v>600?l.jsx("img",{className:_e("fixed top-2.5 h-9 transition-all",g?"right-2.5":"left-2.5",o?"invisible opacity-0":"visible opacity-100"),src:r.logoSymbol}):null]}),l.jsx("div",{className:"mb-10 mt-14",children:(w=r.drawerItems)==null?void 0:w.map((E,j)=>l.jsxs("div",{className:_e("flex flex-col items-stretch justify-center"),children:[E==null?void 0:E.map((P,N)=>{var $,G,V;return l.jsxs("div",{id:"test",className:"flex flex-col",children:[l.jsxs("div",{onClick:()=>{P.subItems?i===P.slug?s(""):s(P.slug):P.action()},className:_e(r.currentPage===P.slug||($=P.subItems)!=null&&$.find(J=>J.slug===r.currentPage)?"bg-buttonPrimary-500 text-white":"hover:bg-layoutPrimary-300","m-2 my-1 flex cursor-pointer flex-row items-center justify-between overflow-x-clip rounded p-2 pl-3 transition-all ",g?"flex-row-reverse pr-3":""),children:[l.jsxs("div",{className:"flex flex-row",dir:e,children:[l.jsx("div",{className:"flex items-center justify-center",children:P.icon}),l.jsx("div",{className:_e("mx-2 whitespace-nowrap text-sm transition-all",o?"opacity-100":"opacity-0"),children:P.label})]}),P.subItems&&l.jsx("div",{className:_e(i&&P.slug===i?"-rotate-90":"rotate-90"),children:l.jsx(I3,{fontSize:11})})]}),P.subItems&&l.jsx("div",{className:_e("m-1 flex cursor-pointer flex-col gap-0 overflow-clip whitespace-nowrap rounded bg-layoutPrimary-300 p-1 transition-all",i==P.slug&&o?"":"my-0 py-0",g?"text-right":"text-left"),style:{height:i==P.slug&&o?6+33*((G=P.subItems)==null?void 0:G.length):0},children:(V=P.subItems)==null?void 0:V.map((J,Q)=>l.jsxs("div",{className:_e("flex flex-row gap-2 overflow-x-clip rounded p-2 px-2 text-xs",g?"text-right":"text-left",r.currentPage===J.slug?"bg-buttonPrimary-500 text-white hover:bg-buttonPrimary-500":"hover:bg-layoutPrimary-500"),dir:e,onClick:()=>{J.action()},children:[l.jsx("div",{className:"flex items-center justify-center",children:J.icon}),l.jsx("div",{className:"flex flex-row justify-between",children:J.label})]},Q))})]},N)}),j!==r.drawerItems.length-1&&l.jsx("div",{className:"my-2 h-[1px] w-10/12 self-center bg-buttonPrimary-500 text-center "})]},j))}),o&&l.jsxs("div",{className:_e("fixed bottom-0 flex flex-row items-center bg-layoutPrimary-500 p-4 transition-all",o?"bg-layoutPrimary-500 ":"bg-red-500",n?"justify-between":"justify-end",e==="rtl"?"right-0":"left-0"),style:{width:`${C[o?"opened":"closed"][t]-16}px`},children:[n&&l.jsx("div",{className:" cursor-pointer rounded p-2 transition-all hover:bg-layoutPrimary-700",onClick:()=>n(),children:l.jsxs("svg",{"aria-label":"Settings Icon",stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",children:[l.jsx("circle",{cx:"12",cy:"12",r:"3"}),l.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}),v>600?l.jsx("div",{className:_e("w-fit transition-all"),style:g?{right:`${C[o?"opened":"closed"][t]-35}px`}:{left:`${C[o?"opened":"closed"][t]-35}px`},children:l.jsx("div",{dir:e,className:_e("relative left-0 top-0 transition-all",o?" opacity-100":" opacity-0"),children:l.jsx("div",{onClick:()=>c(!u),className:"w-fit cursor-pointer rounded bg-gray-300 p-2 transition-all hover:bg-gray-400",children:l.jsx(I3,{fontSize:14,className:_e("transition-all",g?u?"rotate-0":"rotate-180":u?"rotate-180":"rotate-0")})})})}):null]})]})}),l.jsx("div",{className:"fixed overflow-y-auto",style:g?{height:`calc(100% - ${r.topBar?"56":"0"}px)`,width:`calc(100% - ${h}px)`,left:"0px",top:r.topBar?"56px":"0px"}:{height:`calc(100% - ${r.topBar?"56":"0"}px)`,width:`calc(100% - ${h}px)`,left:`${h}px`,top:r.topBar?"56px":"0px"},children:r.children})]})},ZM=({direction:e="rtl",drawerSize:t="md",onSettingsClick:n,DrawerFooterActions:r,...o})=>{var E,j,P;const[a,i]=p.useState(!1),[s,u]=p.useState("");gv(!1);const[c,d]=p.useState(!1),g=p.useRef(null),v=e==="rtl";let y;typeof window<"u"?y=Bf():y=1200,p.useEffect(()=>{const N=$=>{g.current&&!g.current.contains($.target)&&!c&&i(!1)};return document.addEventListener("click",N,!0),()=>{document.removeEventListener("click",N,!0)}},[c]);let C=200,h={opened:{sm:"100",md:C,lg:"250"},closed:{sm:"56",md:"56",lg:"56"}},w=y>600?h[c?"opened":"closed"][t]:0;return l.jsxs("div",{className:"fixed left-0",children:[o.topBar&&l.jsxs("div",{className:_e("fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-primary-foreground p-2",v?"flex-row-reverse":"flex-row"),children:[y>600?l.jsx("div",{className:_e("dark:text-white",v?[y>600?"mr-14":"mr-2",c?"mr-40":""]:[y>600?"ml-14":"ml-2",c?"ml-40":""]),style:v?{marginRight:`${h[c?"opened":"closed"][t]}px`}:{marginLeft:`${h[c?"opened":"closed"][t]}px`},children:o.pageTitle}):l.jsxs("div",{dir:e,className:"flex items-center justify-center gap-0.5",children:[l.jsx("div",{onClick:()=>i(!0),className:"z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100",children:l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",height:"1.6em",width:"1.6em",children:l.jsx("path",{fillRule:"evenodd",d:"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})}),o.pageTitle?l.jsx("div",{className:"text-sm",children:o.pageTitle}):l.jsx("div",{})]}),l.jsxs("div",{className:_e("flex gap-2 dark:text-white",v?"flex-row-reverse":"flex-row"),children:[y>600?l.jsxs("div",{className:v?"text-left text-xs":"text-right text-xs",children:[l.jsx("div",{className:"font-bold",children:o.username})," ",l.jsx("div",{children:o.email})]}):null,l.jsx(pi,{triggerClassname:"mx-2",align:"end",alignOffset:8,side:"bottom",sideOffset:5,direction:v?"rtl":"ltr",trigger:l.jsx("div",{className:"relative h-8 w-8 cursor-pointer overflow-clip rounded ring-1 ring-primary/30 dark:bg-gray-600",children:l.jsx(XM,{})}),items:o.profileMenuItems,onItemSelect:N=>console.log("selecting item ",N)})]})]}),l.jsxs("div",{className:_e("fixed top-0 z-40 flex h-full flex-col justify-between overflow-x-clip transition-all",v?"right-0":"left-0"),style:{width:y>600?a?`${h.opened[t]}px`:`${h.closed[t]}px`:a?`${h.opened[t]}px`:"0px"},onMouseEnter:()=>{i(!0)},onMouseLeave:()=>i(!!c),ref:g,children:[l.jsxs("div",{dir:e,className:_e("fixed z-50 mb-2 flex h-14 w-full flex-row items-center justify-center bg-primary-foreground transition-all"),style:{width:y>600?`${a?C:56}px`:`${a?C:0}px`},children:[l.jsx("img",{className:_e("h-9 opacity-0 transition-all",a?"visible opacity-100":"invisible opacity-0"),src:o.logoLink}),y>600?l.jsx("img",{className:_e("fixed top-2.5 h-9 transition-all",v?"right-2.5":"left-2.5",a?"invisible opacity-0":"visible opacity-100"),src:o.logoSymbol}):null]}),l.jsx("div",{className:_e("fixed bottom-14 top-14 bg-primary-foreground py-2 transition-all",a?"overflow-auto":"overflow-hidden"),style:{height:"calc(100% - 112px)",width:y>600?`${a?C:56}px`:`${a?C:0}px`},children:(E=o.drawerItems)==null?void 0:E.map((N,$)=>l.jsxs("div",{className:_e("flex select-none flex-col items-stretch justify-center transition-all"),children:[N==null?void 0:N.map((G,V)=>{var J,Q,he;return l.jsxs("div",{id:"test",className:"flex flex-col",children:[l.jsxs("div",{onClick:()=>{G.subItems?s===G.slug?u(""):u(G.slug):G.action()},className:_e(o.currentPage===G.slug||(J=G.subItems)!=null&&J.find(xe=>xe.slug===o.currentPage)?"bg-primary text-primary-foreground ":"hover:bg-primary/20","my-1 flex cursor-pointer flex-row items-center justify-between overflow-x-clip rounded p-2 pl-3 transition-all ",v?"flex-row-reverse pr-3":"","m-2"),children:[l.jsxs("div",{className:"flex flex-row",dir:e,children:[l.jsx("div",{className:"flex items-center justify-center ",children:G.icon}),l.jsx("div",{className:_e("mx-2 whitespace-nowrap text-sm transition-all",a?"opacity-100":"opacity-0"),children:G.label})]}),G.subItems&&l.jsx(YM,{pointing:s&&G.slug===s?"up":"down"})]}),G.subItems&&l.jsx("div",{className:_e("m-1 mx-2 flex cursor-pointer flex-col gap-[2px] overflow-clip whitespace-nowrap rounded bg-primary/10 p-1 transition-all",s==G.slug&&a?"":"my-0 py-0",v?"text-right":"text-left"),style:{height:s==G.slug&&a?6+35*((Q=G.subItems)==null?void 0:Q.length):0},children:(he=G.subItems)==null?void 0:he.map((xe,ne)=>l.jsxs("div",{className:_e("flex flex-row gap-2 overflow-x-clip rounded-inner p-2 px-2 text-xs",v?"text-right":"text-left",o.currentPage===xe.slug?"bg-primary text-white":"hover:bg-primary-foreground hover:text-primary "),dir:e,onClick:()=>{xe.action()},children:[l.jsx("div",{className:"flex items-center justify-center",children:xe.icon}),l.jsx("div",{className:"flex flex-row justify-between",children:xe.label})]},ne))})]},V)}),$!==o.drawerItems.length-1&&l.jsx("div",{className:"my-2 h-[1px] w-10/12 self-center bg-buttonPrimary-500 bg-red-500 text-center "})]},$))}),l.jsxs("div",{className:_e("fixed bottom-0 flex h-14 w-full items-center justify-center gap-2 overflow-clip bg-primary-foreground transition-all",e==="rtl"?"flex-row-reverse":"flex-row"),style:{width:y>600?`${a?C:56}px`:`${a?C:0}px`},children:[r&&a?l.jsx(l.Fragment,{children:r}):null,y>600&&a?l.jsx(Is,{side:"left",delayDuration:500,content:c?((j=o.texts)==null?void 0:j.collapseSidebar)||"Collapse Sidebar":((P=o.texts)==null?void 0:P.expandSidebar)||"Expand Sidebar",children:l.jsx(Qe,{variant:"light",onClick:()=>d(!c),size:"smallIcon",children:l.jsx("svg",{className:_e("h-6 w-6 shrink-0 text-primary transition-all disabled:bg-gray-200 ",c?v?"-rotate-90":"rotate-90":v?"rotate-90":"-rotate-90"),fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})}):null]})]}),l.jsx("div",{className:"fixed overflow-y-auto",style:v?{height:`calc(100% - ${o.topBar?"56":"0"}px)`,width:`calc(100% - ${w}px)`,left:"0px",top:o.topBar?"56px":"0px"}:{height:`calc(100% - ${o.topBar?"56":"0"}px)`,width:`calc(100% - ${w}px)`,left:`${w}px`,top:o.topBar?"56px":"0px"},children:o.children})]})},XM=()=>l.jsx("svg",{className:"absolute -left-1 h-10 w-10 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})}),YM=({pointing:e})=>{let t;switch(e){case"right":t="-rotate-90";break;case"left":t="rotate-90";break;case"up":t="-rotate-180";break;case"down":t="rotate-0";break}return l.jsx("svg",{className:_e("h-6 w-6 shrink-0 text-primary-foreground transition-all disabled:bg-gray-200 ",t),fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})},JM=({maxWidth:e="normal",variant:t="contained",centered:n=!1,direction:r="ltr",...o})=>{let a="flex w-full flex-col rounded p-4",i={full:"md:max-w-xl",small:"md:max-w-sm w-1/3 min-w-min",normal:"max-w-sm md:max-w-md"},s={contained:"bg-background border",outlined:"bg-transparent border border-black w-fit",neobrutalism:"shadow-neobrutalism border-4 border-black bg-white"};return l.jsx("div",{className:_e(a,i[e],s[t],n?"flex items-center text-center":""),dir:r,children:o.children})},KM=e=>l.jsx("div",{className:" columns-1 gap-5 sm:columns-2 sm:gap-8 md:columns-3 lg:columns-4 [&>*:not(:first-child)]:mt-8",children:e.children}),QM=({isOpen:e,onClose:t,items:n})=>e?l.jsxs("div",{className:"fixed inset-0 z-40 flex bg-gray-600 bg-opacity-75",children:[l.jsxs("div",{className:"w-1/3 rounded-l-lg bg-gray-800 shadow-2xl",children:[l.jsx("button",{onClick:t,className:"p-4 text-gray-400 hover:text-white focus:text-white focus:outline-none",children:"Close"}),l.jsx("nav",{children:n.map((r,o)=>l.jsx("a",{href:"#",onClick:r.onClick,className:"block p-4 font-bold text-white hover:bg-gray-700 hover:text-gray-400",children:r.label},o))})]}),l.jsx("div",{className:"w-2/3 bg-gray-50"})]}):null;function qM(e){return Vu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"}}]})(e)}function eL(e){return Vu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z"}}]})(e)}const tL=({variation:e="default",...t})=>{var r;let n={default:"rounded border",minimal:"border-t"};return l.jsxs("div",{className:Pe("flex w-full flex-row items-center justify-between gap-8 rounded bg-background p-4",n[e]),children:[l.jsxs("div",{className:"flex flex-col items-center gap-2",children:[l.jsxs("div",{className:"flex flex-row items-center gap-2",children:[t.logoURL&&l.jsx("div",{children:l.jsx("img",{className:"h-8",src:t.logoURL})}),t.logoText&&l.jsx("div",{children:l.jsx("div",{className:"text-2xl font-bold text-primary",children:t.logoText})})]}),t.copyRights&&t.footerLinks&&l.jsxs("div",{className:"text-xs text-muted-foreground",children:["© ",t.copyRights," ",new Date().getFullYear()]})]}),t.copyRights&&!t.footerLinks&&l.jsxs("div",{className:"text-xs text-muted-foreground",children:["© ",t.copyRights," ",new Date().getFullYear()]}),(r=t.footerLinks)==null?void 0:r.map(o=>l.jsxs("div",{className:"flex w-32 flex-col gap-2",children:[l.jsx("div",{className:"text-lg font-bold",children:o.title}),l.jsx("div",{className:"flex flex-col gap-1",children:o.pages.map(a=>l.jsx("a",{className:"transition-all hover:font-bold",href:a.link,children:a.label}))})]})),t.socialLinks&&l.jsxs("div",{className:"flex flex-row gap-2",children:[t.socialLinks.twitter&&l.jsx(Qe,{size:"smallIcon",variant:"ghost",children:l.jsx(eL,{})}),t.socialLinks.instagram&&l.jsx(Qe,{size:"smallIcon",variant:"ghost",children:l.jsx(qM,{})}),t.socialLinks.tiktok&&l.jsx(Qe,{size:"smallIcon",variant:"ghost",children:l.jsx(zM,{})}),t.socialLinks.snapchat&&l.jsx(Qe,{size:"smallIcon",variant:"ghost",children:l.jsx(GM,{})})]})]})},nL=({design:e="floating",...t})=>{const n=p.useRef(null),[r,o]=p.useState(!1);let a={floating:"left-1/2 z-50 w-[calc(100%-2rem)] -translate-x-1/2 lg:max-w-7xl p-4 rounded",default:"w-[calc(100%)] left-0 z-50 right-0 rounded-none p-2"};return l.jsx("div",{ref:n,children:l.jsxs("div",{dir:t.direction,className:_e(a[e],"fixed flex flex-col justify-between border border-gray-100 bg-white shadow-sm transition-all dark:border-gray-600 dark:bg-gray-700 md:flex-row md:gap-4 ",t.position==="top"?e==="floating"?"top-6":"top-0":e==="floating"?"bottom-6":"bottom-0",r?"opacity-0":"opacity-100"),children:[l.jsxs("div",{className:"mb-3 flex w-full flex-col items-center justify-start md:mb-0 md:flex-row md:items-center",children:[l.jsxs("div",{className:_e(t.direction==="rtl"?"md:ml-4 md:border-l md:pl-4":"md:mr-4 md:border-r md:pr-4","mb-2 flex items-center border-gray-200 dark:border-gray-600 md:mb-0 md:mr-4 md:pr-4"),children:[t.logoURL&&l.jsx("img",{src:t.logoURL,className:"mr-2 h-6",alt:"Flowbite Logo"}),t.title&&l.jsx("span",{className:"self-center whitespace-nowrap text-lg font-semibold dark:text-white",children:t.title})]}),t.text&&l.jsx("p",{className:_e("m-0 flex items-center text-center text-sm font-normal text-gray-500 dark:text-gray-400 ",t.direction==="rtl"?"md:text-right":"md:text-left"),children:t.text})]}),t.actionText&&l.jsx("div",{className:_e("flex flex-shrink-0 items-center justify-center ",t.direction==="rtl"?"ml-0 md:ml-10":"mr-0 md:mr-10"),children:l.jsx(Qe,{onClick:t.onActionClick,children:t.actionText})}),l.jsxs("button",{type:"button",className:_e("absolute top-2 inline-flex h-9 w-9 items-center justify-center rounded-inner p-1.5 text-gray-400 transition-all hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white",t.direction==="rtl"?"left-2":"right-2"),"data-dismiss-target":"#alert-default","aria-label":"Close",onClick:()=>{o(!0),setTimeout(()=>{n.current.removeChild(n.current.children[0])},200)},children:[l.jsx("span",{className:"sr-only",children:"Close"}),l.jsx("svg",{"aria-hidden":"true",className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})]})]})})};var Wu=e=>e.type==="checkbox",Us=e=>e instanceof Date,er=e=>e==null;const T3=e=>typeof e=="object";var wn=e=>!er(e)&&!Array.isArray(e)&&T3(e)&&!Us(e),k3=e=>wn(e)&&e.target?Wu(e.target)?e.target.checked:e.target.value:e,rL=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,P3=(e,t)=>e.has(rL(t)),oL=e=>{const t=e.constructor&&e.constructor.prototype;return wn(t)&&t.hasOwnProperty("isPrototypeOf")},yv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function uo(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(yv&&(e instanceof Blob||e instanceof FileList))&&(n||wn(e)))if(t=n?[]:{},!n&&!oL(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=uo(e[r]));else return e;return t}var Hu=e=>Array.isArray(e)?e.filter(Boolean):[],bn=e=>e===void 0,et=(e,t,n)=>{if(!t||!wn(e))return n;const r=Hu(t.split(/[,[\].]+?/)).reduce((o,a)=>er(o)?o:o[a],e);return bn(r)||r===e?bn(e[t])?n:e[t]:r},_a=e=>typeof e=="boolean";const $f={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},co={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ta={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},B3=p.createContext(null),Cv=()=>p.useContext(B3),Gu=e=>{const{children:t,...n}=e;return p.createElement(B3.Provider,{value:n},t)};var N3=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const i=a;return t._proxyFormState[i]!==co.all&&(t._proxyFormState[i]=!r||co.all),n&&(n[i]=!0),e[i]}});return o},Hr=e=>wn(e)&&!Object.keys(e).length,O3=(e,t,n,r)=>{n(e);const{name:o,...a}=e;return Hr(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(i=>t[i]===(!r||co.all))},Rf=e=>Array.isArray(e)?e:[e],$3=(e,t,n)=>n&&t?e===t||Array.isArray(e)&&e.some(r=>r&&n&&r===t):!e||!t||e===t||Rf(e).some(r=>r&&(r.startsWith(t)||t.startsWith(r)));function wv(e){const t=p.useRef(e);t.current=e,p.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function aL(e){const t=Cv(),{control:n=t.control,disabled:r,name:o,exact:a}=e||{},[i,s]=p.useState(n._formState),u=p.useRef(!0),c=p.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=p.useRef(o);return d.current=o,wv({disabled:r,next:g=>u.current&&$3(d.current,g.name,a)&&O3(g,c.current,n._updateFormState)&&s({...n._formState,...g}),subject:n._subjects.state}),p.useEffect(()=>(u.current=!0,c.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),N3(i,n,c.current,!1)}var Po=e=>typeof e=="string",R3=(e,t,n,r,o)=>Po(e)?(r&&t.watch.add(e),et(n,e,o)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),et(n,a))):(r&&(t.watchAll=!0),n);function iL(e){const t=Cv(),{control:n=t.control,name:r,defaultValue:o,disabled:a,exact:i}=e||{},s=p.useRef(r);s.current=r,wv({disabled:a,subject:n._subjects.values,next:d=>{$3(s.current,d.name,i)&&c(uo(R3(s.current,n._names,d.values||n._formValues,!1,o)))}});const[u,c]=p.useState(n._getWatch(r,o));return p.useEffect(()=>n._removeUnmounted()),u}var Ev=e=>/^\w*$/.test(e),M3=e=>Hu(e.replace(/["|']|\]/g,"").split(/\.|\[/));function tn(e,t,n){let r=-1;const o=Ev(t)?[t]:M3(t),a=o.length,i=a-1;for(;++r<a;){const s=o[r];let u=n;if(r!==i){const c=e[s];u=wn(c)||Array.isArray(c)?c:isNaN(+o[r+1])?{}:[]}e[s]=u,e=e[s]}return e}function sL(e){const t=Cv(),{name:n,disabled:r,control:o=t.control,shouldUnregister:a}=e,i=P3(o._names.array,n),s=iL({control:o,name:n,defaultValue:et(o._formValues,n,et(o._defaultValues,n,e.defaultValue)),exact:!0}),u=aL({control:o,name:n}),c=p.useRef(o.register(n,{...e.rules,value:s}));return c.current=o.register(n,e.rules),p.useEffect(()=>{const d=o._options.shouldUnregister||a,g=(v,y)=>{const C=et(o._fields,v);C&&(C._f.mount=y)};if(g(n,!0),d){const v=uo(et(o._options.defaultValues,n));tn(o._defaultValues,n,v),bn(et(o._formValues,n))&&tn(o._formValues,n,v)}return()=>{(i?d&&!o._state.action:d)?o.unregister(n):g(n,!1)}},[n,o,i,a]),p.useEffect(()=>{o._updateDisabledField({disabled:r,fields:o._fields,name:n})},[r,n,o]),{field:{name:n,value:s,..._a(r)?{disabled:r}:{},onChange:p.useCallback(d=>c.current.onChange({target:{value:k3(d),name:n},type:$f.CHANGE}),[n]),onBlur:p.useCallback(()=>c.current.onBlur({target:{value:et(o._formValues,n),name:n},type:$f.BLUR}),[n,o]),ref:d=>{const g=et(o._fields,n);g&&d&&(g._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:v=>d.setCustomValidity(v),reportValidity:()=>d.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!et(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!et(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!et(u.touchedFields,n)},error:{enumerable:!0,get:()=>et(u.errors,n)}})}}const Pt=e=>e.render(sL(e));var lL=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{};const Sv=(e,t,n)=>{for(const r of n||Object.keys(e)){const o=et(e,r);if(o){const{_f:a,...i}=o;if(a&&t(a.name)){if(a.ref.focus){a.ref.focus();break}else if(a.refs&&a.refs[0].focus){a.refs[0].focus();break}}else wn(i)&&Sv(i,t)}}};var L3=e=>({isOnSubmit:!e||e===co.onSubmit,isOnBlur:e===co.onBlur,isOnChange:e===co.onChange,isOnAll:e===co.all,isOnTouch:e===co.onTouched}),_3=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length)))),uL=(e,t,n)=>{const r=Hu(et(e,n));return tn(r,"root",t[n]),tn(e,n,r),e},Dv=e=>e.type==="file",Va=e=>typeof e=="function",Mf=e=>{if(!yv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Lf=e=>Po(e),Fv=e=>e.type==="radio",_f=e=>e instanceof RegExp;const V3={value:!1,isValid:!1},W3={value:!0,isValid:!0};var H3=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!bn(e[0].attributes.value)?bn(e[0].value)||e[0].value===""?W3:{value:e[0].value,isValid:!0}:W3:V3}return V3};const G3={isValid:!1,value:null};var z3=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,G3):G3;function U3(e,t,n="validate"){if(Lf(e)||Array.isArray(e)&&e.every(Lf)||_a(e)&&!e)return{type:n,message:Lf(e)?e:"",ref:t}}var Zs=e=>wn(e)&&!_f(e)?e:{value:e,message:""},Z3=async(e,t,n,r,o)=>{const{ref:a,refs:i,required:s,maxLength:u,minLength:c,min:d,max:g,pattern:v,validate:y,name:C,valueAsNumber:h,mount:w,disabled:E}=e._f,j=et(t,C);if(!w||E)return{};const P=i?i[0]:a,N=ne=>{r&&P.reportValidity&&(P.setCustomValidity(_a(ne)?"":ne||""),P.reportValidity())},$={},G=Fv(a),V=Wu(a),J=G||V,Q=(h||Dv(a))&&bn(a.value)&&bn(j)||Mf(a)&&a.value===""||j===""||Array.isArray(j)&&!j.length,he=lL.bind(null,C,n,$),xe=(ne,de,R,W=ta.maxLength,oe=ta.minLength)=>{const pe=ne?de:R;$[C]={type:ne?W:oe,message:pe,ref:a,...he(ne?W:oe,pe)}};if(o?!Array.isArray(j)||!j.length:s&&(!J&&(Q||er(j))||_a(j)&&!j||V&&!H3(i).isValid||G&&!z3(i).isValid)){const{value:ne,message:de}=Lf(s)?{value:!!s,message:s}:Zs(s);if(ne&&($[C]={type:ta.required,message:de,ref:P,...he(ta.required,de)},!n))return N(de),$}if(!Q&&(!er(d)||!er(g))){let ne,de;const R=Zs(g),W=Zs(d);if(!er(j)&&!isNaN(j)){const oe=a.valueAsNumber||j&&+j;er(R.value)||(ne=oe>R.value),er(W.value)||(de=oe<W.value)}else{const oe=a.valueAsDate||new Date(j),pe=te=>new Date(new Date().toDateString()+" "+te),se=a.type=="time",Z=a.type=="week";Po(R.value)&&j&&(ne=se?pe(j)>pe(R.value):Z?j>R.value:oe>new Date(R.value)),Po(W.value)&&j&&(de=se?pe(j)<pe(W.value):Z?j<W.value:oe<new Date(W.value))}if((ne||de)&&(xe(!!ne,R.message,W.message,ta.max,ta.min),!n))return N($[C].message),$}if((u||c)&&!Q&&(Po(j)||o&&Array.isArray(j))){const ne=Zs(u),de=Zs(c),R=!er(ne.value)&&j.length>+ne.value,W=!er(de.value)&&j.length<+de.value;if((R||W)&&(xe(R,ne.message,de.message),!n))return N($[C].message),$}if(v&&!Q&&Po(j)){const{value:ne,message:de}=Zs(v);if(_f(ne)&&!j.match(ne)&&($[C]={type:ta.pattern,message:de,ref:a,...he(ta.pattern,de)},!n))return N(de),$}if(y){if(Va(y)){const ne=await y(j,t),de=U3(ne,P);if(de&&($[C]={...de,...he(ta.validate,de.message)},!n))return N(de.message),$}else if(wn(y)){let ne={};for(const de in y){if(!Hr(ne)&&!n)break;const R=U3(await y[de](j,t),P,de);R&&(ne={...R,...he(de,R.message)},N(R.message),n&&($[C]=ne))}if(!Hr(ne)&&($[C]={ref:P,...ne},!n))return $}}return N(!0),$};function cL(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=bn(e)?r++:e[t[r++]];return e}function dL(e){for(const t in e)if(e.hasOwnProperty(t)&&!bn(e[t]))return!1;return!0}function On(e,t){const n=Array.isArray(t)?t:Ev(t)?[t]:M3(t),r=n.length===1?e:cL(e,n),o=n.length-1,a=n[o];return r&&delete r[a],o!==0&&(wn(r)&&Hr(r)||Array.isArray(r)&&dL(r))&&On(e,n.slice(0,-1)),e}function Av(){let e=[];return{get observers(){return e},next:o=>{for(const a of e)a.next&&a.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(a=>a!==o)}}),unsubscribe:()=>{e=[]}}}var Vf=e=>er(e)||!T3(e);function Bi(e,t){if(Vf(e)||Vf(t))return e===t;if(Us(e)&&Us(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const a=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const i=t[o];if(Us(a)&&Us(i)||wn(a)&&wn(i)||Array.isArray(a)&&Array.isArray(i)?!Bi(a,i):a!==i)return!1}}return!0}var X3=e=>e.type==="select-multiple",fL=e=>Fv(e)||Wu(e),jv=e=>Mf(e)&&e.isConnected,Y3=e=>{for(const t in e)if(Va(e[t]))return!0;return!1};function Wf(e,t={}){const n=Array.isArray(e);if(wn(e)||n)for(const r in e)Array.isArray(e[r])||wn(e[r])&&!Y3(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Wf(e[r],t[r])):er(e[r])||(t[r]=!0);return t}function J3(e,t,n){const r=Array.isArray(e);if(wn(e)||r)for(const o in e)Array.isArray(e[o])||wn(e[o])&&!Y3(e[o])?bn(t)||Vf(n[o])?n[o]=Array.isArray(e[o])?Wf(e[o],[]):{...Wf(e[o])}:J3(e[o],er(t)?{}:t[o],n[o]):n[o]=!Bi(e[o],t[o]);return n}var Iv=(e,t)=>J3(e,t,Wf(t)),K3=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>bn(e)?e:t?e===""?NaN:e&&+e:n&&Po(e)?new Date(e):r?r(e):e;function Tv(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Dv(t)?t.files:Fv(t)?z3(e.refs).value:X3(t)?[...t.selectedOptions].map(({value:n})=>n):Wu(t)?H3(e.refs).value:K3(bn(t.value)?e.ref.value:t.value,e)}var gL=(e,t,n,r)=>{const o={};for(const a of e){const i=et(t,a);i&&tn(o,a,i._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},zu=e=>bn(e)?e:_f(e)?e.source:wn(e)?_f(e.value)?e.value.source:e.value:e,pL=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Q3(e,t,n){const r=et(e,n);if(r||Ev(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const a=o.join("."),i=et(t,a),s=et(e,a);if(i&&!Array.isArray(i)&&n!==a)return{name:n};if(s&&s.type)return{name:a,error:s};o.pop()}return{name:n}}var hL=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,mL=(e,t)=>!Hu(et(e,t)).length&&On(e,t);const vL={mode:co.onSubmit,reValidateMode:co.onChange,shouldFocusError:!0};function bL(e={},t){let n={...vL,...e},r={submitCount:0,isDirty:!1,isLoading:Va(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},o={},a=wn(n.defaultValues)||wn(n.values)?uo(n.defaultValues||n.values)||{}:{},i=n.shouldUnregister?{}:uo(a),s={action:!1,mount:!1,watch:!1},u={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const g={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:Av(),array:Av(),state:Av()},y=e.resetOptions&&e.resetOptions.keepDirtyValues,C=L3(n.mode),h=L3(n.reValidateMode),w=n.criteriaMode===co.all,E=le=>Ee=>{clearTimeout(d),d=setTimeout(le,Ee)},j=async le=>{if(g.isValid||le){const Ee=n.resolver?Hr((await Q()).errors):await xe(o,!0);Ee!==r.isValid&&v.state.next({isValid:Ee})}},P=le=>g.isValidating&&v.state.next({isValidating:le}),N=(le,Ee=[],Ie,Ue,He=!0,Te=!0)=>{if(Ue&&Ie){if(s.action=!0,Te&&Array.isArray(et(o,le))){const Fe=Ie(et(o,le),Ue.argA,Ue.argB);He&&tn(o,le,Fe)}if(Te&&Array.isArray(et(r.errors,le))){const Fe=Ie(et(r.errors,le),Ue.argA,Ue.argB);He&&tn(r.errors,le,Fe),mL(r.errors,le)}if(g.touchedFields&&Te&&Array.isArray(et(r.touchedFields,le))){const Fe=Ie(et(r.touchedFields,le),Ue.argA,Ue.argB);He&&tn(r.touchedFields,le,Fe)}g.dirtyFields&&(r.dirtyFields=Iv(a,i)),v.state.next({name:le,isDirty:de(le,Ee),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else tn(i,le,Ee)},$=(le,Ee)=>{tn(r.errors,le,Ee),v.state.next({errors:r.errors})},G=(le,Ee,Ie,Ue)=>{const He=et(o,le);if(He){const Te=et(i,le,bn(Ie)?et(a,le):Ie);bn(Te)||Ue&&Ue.defaultChecked||Ee?tn(i,le,Ee?Te:Tv(He._f)):oe(le,Te),s.mount&&j()}},V=(le,Ee,Ie,Ue,He)=>{let Te=!1,Fe=!1;const Ge={name:le};if(!Ie||Ue){g.isDirty&&(Fe=r.isDirty,r.isDirty=Ge.isDirty=de(),Te=Fe!==Ge.isDirty);const tt=Bi(et(a,le),Ee);Fe=et(r.dirtyFields,le),tt?On(r.dirtyFields,le):tn(r.dirtyFields,le,!0),Ge.dirtyFields=r.dirtyFields,Te=Te||g.dirtyFields&&Fe!==!tt}if(Ie){const tt=et(r.touchedFields,le);tt||(tn(r.touchedFields,le,Ie),Ge.touchedFields=r.touchedFields,Te=Te||g.touchedFields&&tt!==Ie)}return Te&&He&&v.state.next(Ge),Te?Ge:{}},J=(le,Ee,Ie,Ue)=>{const He=et(r.errors,le),Te=g.isValid&&_a(Ee)&&r.isValid!==Ee;if(e.delayError&&Ie?(c=E(()=>$(le,Ie)),c(e.delayError)):(clearTimeout(d),c=null,Ie?tn(r.errors,le,Ie):On(r.errors,le)),(Ie?!Bi(He,Ie):He)||!Hr(Ue)||Te){const Fe={...Ue,...Te&&_a(Ee)?{isValid:Ee}:{},errors:r.errors,name:le};r={...r,...Fe},v.state.next(Fe)}P(!1)},Q=async le=>n.resolver(i,n.context,gL(le||u.mount,o,n.criteriaMode,n.shouldUseNativeValidation)),he=async le=>{const{errors:Ee}=await Q(le);if(le)for(const Ie of le){const Ue=et(Ee,Ie);Ue?tn(r.errors,Ie,Ue):On(r.errors,Ie)}else r.errors=Ee;return Ee},xe=async(le,Ee,Ie={valid:!0})=>{for(const Ue in le){const He=le[Ue];if(He){const{_f:Te,...Fe}=He;if(Te){const Ge=u.array.has(Te.name),tt=await Z3(He,i,w,n.shouldUseNativeValidation&&!Ee,Ge);if(tt[Te.name]&&(Ie.valid=!1,Ee))break;!Ee&&(et(tt,Te.name)?Ge?uL(r.errors,tt,Te.name):tn(r.errors,Te.name,tt[Te.name]):On(r.errors,Te.name))}Fe&&await xe(Fe,Ee,Ie)}}return Ie.valid},ne=()=>{for(const le of u.unMount){const Ee=et(o,le);Ee&&(Ee._f.refs?Ee._f.refs.every(Ie=>!jv(Ie)):!jv(Ee._f.ref))&&ie(le)}u.unMount=new Set},de=(le,Ee)=>(le&&Ee&&tn(i,le,Ee),!Bi(U(),a)),R=(le,Ee,Ie)=>R3(le,u,{...s.mount?i:bn(Ee)?a:Po(le)?{[le]:Ee}:Ee},Ie,Ee),W=le=>Hu(et(s.mount?i:a,le,e.shouldUnregister?et(a,le,[]):[])),oe=(le,Ee,Ie={})=>{const Ue=et(o,le);let He=Ee;if(Ue){const Te=Ue._f;Te&&(!Te.disabled&&tn(i,le,K3(Ee,Te)),He=Mf(Te.ref)&&er(Ee)?"":Ee,X3(Te.ref)?[...Te.ref.options].forEach(Fe=>Fe.selected=He.includes(Fe.value)):Te.refs?Wu(Te.ref)?Te.refs.length>1?Te.refs.forEach(Fe=>(!Fe.defaultChecked||!Fe.disabled)&&(Fe.checked=Array.isArray(He)?!!He.find(Ge=>Ge===Fe.value):He===Fe.value)):Te.refs[0]&&(Te.refs[0].checked=!!He):Te.refs.forEach(Fe=>Fe.checked=Fe.value===He):Dv(Te.ref)?Te.ref.value="":(Te.ref.value=He,Te.ref.type||v.values.next({name:le,values:{...i}})))}(Ie.shouldDirty||Ie.shouldTouch)&&V(le,He,Ie.shouldTouch,Ie.shouldDirty,!0),Ie.shouldValidate&&te(le)},pe=(le,Ee,Ie)=>{for(const Ue in Ee){const He=Ee[Ue],Te=`${le}.${Ue}`,Fe=et(o,Te);(u.array.has(le)||!Vf(He)||Fe&&!Fe._f)&&!Us(He)?pe(Te,He,Ie):oe(Te,He,Ie)}},se=(le,Ee,Ie={})=>{const Ue=et(o,le),He=u.array.has(le),Te=uo(Ee);tn(i,le,Te),He?(v.array.next({name:le,values:{...i}}),(g.isDirty||g.dirtyFields)&&Ie.shouldDirty&&v.state.next({name:le,dirtyFields:Iv(a,i),isDirty:de(le,Te)})):Ue&&!Ue._f&&!er(Te)?pe(le,Te,Ie):oe(le,Te,Ie),_3(le,u)&&v.state.next({...r}),v.values.next({name:le,values:{...i}}),!s.mount&&t()},Z=async le=>{const Ee=le.target;let Ie=Ee.name,Ue=!0;const He=et(o,Ie),Te=()=>Ee.type?Tv(He._f):k3(le);if(He){let Fe,Ge;const tt=Te(),xt=le.type===$f.BLUR||le.type===$f.FOCUS_OUT,$t=!pL(He._f)&&!n.resolver&&!et(r.errors,Ie)&&!He._f.deps||hL(xt,et(r.touchedFields,Ie),r.isSubmitted,h,C),ht=_3(Ie,u,xt);tn(i,Ie,tt),xt?(He._f.onBlur&&He._f.onBlur(le),c&&c(0)):He._f.onChange&&He._f.onChange(le);const Wt=V(Ie,tt,xt,!1),mn=!Hr(Wt)||ht;if(!xt&&v.values.next({name:Ie,type:le.type,values:{...i}}),$t)return g.isValid&&j(),mn&&v.state.next({name:Ie,...ht?{}:Wt});if(!xt&&ht&&v.state.next({...r}),P(!0),n.resolver){const{errors:Kt}=await Q([Ie]),En=Q3(r.errors,o,Ie),vn=Q3(Kt,o,En.name||Ie);Fe=vn.error,Ie=vn.name,Ge=Hr(Kt)}else Fe=(await Z3(He,i,w,n.shouldUseNativeValidation))[Ie],Ue=Number.isNaN(tt)||tt===et(i,Ie,tt),Ue&&(Fe?Ge=!1:g.isValid&&(Ge=await xe(o,!0)));Ue&&(He._f.deps&&te(He._f.deps),J(Ie,Ge,Fe,Wt))}},te=async(le,Ee={})=>{let Ie,Ue;const He=Rf(le);if(P(!0),n.resolver){const Te=await he(bn(le)?le:He);Ie=Hr(Te),Ue=le?!He.some(Fe=>et(Te,Fe)):Ie}else le?(Ue=(await Promise.all(He.map(async Te=>{const Fe=et(o,Te);return await xe(Fe&&Fe._f?{[Te]:Fe}:Fe)}))).every(Boolean),!(!Ue&&!r.isValid)&&j()):Ue=Ie=await xe(o);return v.state.next({...!Po(le)||g.isValid&&Ie!==r.isValid?{}:{name:le},...n.resolver||!le?{isValid:Ie}:{},errors:r.errors,isValidating:!1}),Ee.shouldFocus&&!Ue&&Sv(o,Te=>Te&&et(r.errors,Te),le?He:u.mount),Ue},U=le=>{const Ee={...a,...s.mount?i:{}};return bn(le)?Ee:Po(le)?et(Ee,le):le.map(Ie=>et(Ee,Ie))},K=(le,Ee)=>({invalid:!!et((Ee||r).errors,le),isDirty:!!et((Ee||r).dirtyFields,le),isTouched:!!et((Ee||r).touchedFields,le),error:et((Ee||r).errors,le)}),me=le=>{le&&Rf(le).forEach(Ee=>On(r.errors,Ee)),v.state.next({errors:le?r.errors:{}})},H=(le,Ee,Ie)=>{const Ue=(et(o,le,{_f:{}})._f||{}).ref;tn(r.errors,le,{...Ee,ref:Ue}),v.state.next({name:le,errors:r.errors,isValid:!1}),Ie&&Ie.shouldFocus&&Ue&&Ue.focus&&Ue.focus()},ge=(le,Ee)=>Va(le)?v.values.subscribe({next:Ie=>le(R(void 0,Ee),Ie)}):R(le,Ee,!0),ie=(le,Ee={})=>{for(const Ie of le?Rf(le):u.mount)u.mount.delete(Ie),u.array.delete(Ie),Ee.keepValue||(On(o,Ie),On(i,Ie)),!Ee.keepError&&On(r.errors,Ie),!Ee.keepDirty&&On(r.dirtyFields,Ie),!Ee.keepTouched&&On(r.touchedFields,Ie),!n.shouldUnregister&&!Ee.keepDefaultValue&&On(a,Ie);v.values.next({values:{...i}}),v.state.next({...r,...Ee.keepDirty?{isDirty:de()}:{}}),!Ee.keepIsValid&&j()},be=({disabled:le,name:Ee,field:Ie,fields:Ue})=>{if(_a(le)){const He=le?void 0:et(i,Ee,Tv(Ie?Ie._f:et(Ue,Ee)._f));tn(i,Ee,He),V(Ee,He,!1,!1,!0)}},Re=(le,Ee={})=>{let Ie=et(o,le);const Ue=_a(Ee.disabled);return tn(o,le,{...Ie||{},_f:{...Ie&&Ie._f?Ie._f:{ref:{name:le}},name:le,mount:!0,...Ee}}),u.mount.add(le),Ie?be({field:Ie,disabled:Ee.disabled,name:le}):G(le,!0,Ee.value),{...Ue?{disabled:Ee.disabled}:{},...n.progressive?{required:!!Ee.required,min:zu(Ee.min),max:zu(Ee.max),minLength:zu(Ee.minLength),maxLength:zu(Ee.maxLength),pattern:zu(Ee.pattern)}:{},name:le,onChange:Z,onBlur:Z,ref:He=>{if(He){Re(le,Ee),Ie=et(o,le);const Te=bn(He.value)&&He.querySelectorAll&&He.querySelectorAll("input,select,textarea")[0]||He,Fe=fL(Te),Ge=Ie._f.refs||[];if(Fe?Ge.find(tt=>tt===Te):Te===Ie._f.ref)return;tn(o,le,{_f:{...Ie._f,...Fe?{refs:[...Ge.filter(jv),Te,...Array.isArray(et(a,le))?[{}]:[]],ref:{type:Te.type,name:le}}:{ref:Te}}}),G(le,!1,void 0,Te)}else Ie=et(o,le,{}),Ie._f&&(Ie._f.mount=!1),(n.shouldUnregister||Ee.shouldUnregister)&&!(P3(u.array,le)&&s.action)&&u.unMount.add(le)}}},Ne=()=>n.shouldFocusError&&Sv(o,le=>le&&et(r.errors,le),u.mount),We=(le,Ee)=>async Ie=>{Ie&&(Ie.preventDefault&&Ie.preventDefault(),Ie.persist&&Ie.persist());let Ue=uo(i);if(v.state.next({isSubmitting:!0}),n.resolver){const{errors:He,values:Te}=await Q();r.errors=He,Ue=Te}else await xe(o);On(r.errors,"root"),Hr(r.errors)?(v.state.next({errors:{}}),await le(Ue,Ie)):(Ee&&await Ee({...r.errors},Ie),Ne(),setTimeout(Ne)),v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Hr(r.errors),submitCount:r.submitCount+1,errors:r.errors})},Ke=(le,Ee={})=>{et(o,le)&&(bn(Ee.defaultValue)?se(le,et(a,le)):(se(le,Ee.defaultValue),tn(a,le,Ee.defaultValue)),Ee.keepTouched||On(r.touchedFields,le),Ee.keepDirty||(On(r.dirtyFields,le),r.isDirty=Ee.defaultValue?de(le,et(a,le)):de()),Ee.keepError||(On(r.errors,le),g.isValid&&j()),v.state.next({...r}))},$e=(le,Ee={})=>{const Ie=le?uo(le):a,Ue=uo(Ie),He=le&&!Hr(le)?Ue:a;if(Ee.keepDefaultValues||(a=Ie),!Ee.keepValues){if(Ee.keepDirtyValues||y)for(const Te of u.mount)et(r.dirtyFields,Te)?tn(He,Te,et(i,Te)):se(Te,et(He,Te));else{if(yv&&bn(le))for(const Te of u.mount){const Fe=et(o,Te);if(Fe&&Fe._f){const Ge=Array.isArray(Fe._f.refs)?Fe._f.refs[0]:Fe._f.ref;if(Mf(Ge)){const tt=Ge.closest("form");if(tt){tt.reset();break}}}}o={}}i=e.shouldUnregister?Ee.keepDefaultValues?uo(a):{}:uo(He),v.array.next({values:{...He}}),v.values.next({values:{...He}})}u={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!g.isValid||!!Ee.keepIsValid,s.watch=!!e.shouldUnregister,v.state.next({submitCount:Ee.keepSubmitCount?r.submitCount:0,isDirty:Ee.keepDirty?r.isDirty:!!(Ee.keepDefaultValues&&!Bi(le,a)),isSubmitted:Ee.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:Ee.keepDirtyValues?r.dirtyFields:Ee.keepDefaultValues&&le?Iv(a,le):{},touchedFields:Ee.keepTouched?r.touchedFields:{},errors:Ee.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},qe=(le,Ee)=>$e(Va(le)?le(i):le,Ee);return{control:{register:Re,unregister:ie,getFieldState:K,handleSubmit:We,setError:H,_executeSchema:Q,_getWatch:R,_getDirty:de,_updateValid:j,_removeUnmounted:ne,_updateFieldArray:N,_updateDisabledField:be,_getFieldArray:W,_reset:$e,_resetDefaultValues:()=>Va(n.defaultValues)&&n.defaultValues().then(le=>{qe(le,n.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:le=>{r={...r,...le}},_subjects:v,_proxyFormState:g,get _fields(){return o},get _formValues(){return i},get _state(){return s},set _state(le){s=le},get _defaultValues(){return a},get _names(){return u},set _names(le){u=le},get _formState(){return r},set _formState(le){r=le},get _options(){return n},set _options(le){n={...n,...le}}},trigger:te,register:Re,handleSubmit:We,watch:ge,setValue:se,getValues:U,reset:qe,resetField:Ke,clearErrors:me,unregister:ie,setError:H,setFocus:(le,Ee={})=>{const Ie=et(o,le),Ue=Ie&&Ie._f;if(Ue){const He=Ue.refs?Ue.refs[0]:Ue.ref;He.focus&&(He.focus(),Ee.shouldSelect&&He.select())}},getFieldState:K}}function na(e={}){const t=p.useRef(),n=p.useRef(),[r,o]=p.useState({isDirty:!1,isValidating:!1,isLoading:Va(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:Va(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...bL(e,()=>o(i=>({...i}))),formState:r});const a=t.current.control;return a._options=e,wv({subject:a._subjects.state,next:i=>{O3(i,a._proxyFormState,a._updateFormState,!0)&&o({...a._formState})}}),p.useEffect(()=>{e.values&&!Bi(e.values,n.current)?(a._reset(e.values,a._options.resetOptions),n.current=e.values):a._resetDefaultValues()},[e.values,a]),p.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=N3(r,a),t.current}const xL=e=>{const t=na(),{formState:{errors:n},handleSubmit:r,control:o}=t;return l.jsx(Ut,{children:l.jsxs("form",{onSubmit:r(a=>e.handleUpdateProfile(a)),children:[l.jsx(Lt,{headless:!0,children:l.jsxs(Gu,{...t,children:[l.jsx(Pt,{control:o,name:"fullName",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"text",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:(i=n.fullName)==null?void 0:i.message,...a,value:a.value??""})}}),l.jsx(Pt,{control:o,name:"phoneNumber",render:({field:a})=>l.jsx($d,{label:"Phone number"})}),l.jsx(Pt,{control:o,name:"email",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"text",label:e.texts.emailLabel,helperText:(i=n.email)==null?void 0:i.message,placeholder:e.texts.emailPlaceholder,...a,value:a.value??""})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(Pt,{control:o,name:"password",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"password",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:(i=n.password)==null?void 0:i.message,...a,value:a.value??""})},rules:{required:e.texts.passwordRequiredText}}),l.jsx(Pt,{control:o,name:"confirmPassword",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"password",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:(i=n.confirmPassword)==null?void 0:i.message,...a,value:a.value??""})},rules:{required:e.texts.confirmPasswordRequiredText}})]})}),l.jsx(kr,{children:l.jsx(Qe,{className:"w-full",type:"submit",children:e.texts.updateProfile})})]})})},yL=e=>l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,children:[l.jsx("div",{className:"mb-2 text-sm font-bold",children:e.blockTitle}),l.jsx("div",{className:"flex flex-col gap-4 rounded p-2",children:e.children})]})}),CL=e=>{var t,n,r,o,a,i,s;return l.jsxs("div",{dir:e.direction,children:[l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,className:"flex flex-col gap-6",children:[e.viaGoogle&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleGoogle,children:[l.jsx(Zn.google,{className:"h-4 w-4"}),((t=e.texts)==null?void 0:t.continueWithGoogle)??"Continue With Google"]}),e.viaGithub&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleGithub,children:[l.jsx(Zn.gitHub,{className:"h-4 w-4"}),((n=e.texts)==null?void 0:n.continueWithGithub)??"Continue With Github"]}),e.viaTwitter&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleTwitter,children:[l.jsx(Zn.twitter,{className:"h-4 w-4"}),((r=e.texts)==null?void 0:r.continueWithTwitter)??"Continue With Twitter"]}),e.viaApple&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleApple,children:[l.jsx(Zn.apple,{className:"h-4 w-4"}),((o=e.texts)==null?void 0:o.continueWithApple)??"Continue With Apple"]}),e.viaMicrosoft&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleMicrosoft,children:[l.jsx(Zn.microsoft,{className:"h-4 w-4"}),((a=e.texts)==null?void 0:a.continueWithMicrosoft)??"Continue With Microsoft"]}),e.viaEmail&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleEmail,children:[l.jsx(Zn.mail,{className:"h-4 w-4"}),((i=e.texts)==null?void 0:i.continueWithEmail)??"Continue With Email"]}),e.viaPhone&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handlePhone,children:[l.jsx(Zn.phone,{className:"h-4 w-4"}),((s=e.texts)==null?void 0:s.continueWithPhone)??"Continue With Phone"]}),!e.withoutSignUp&&l.jsxs("div",{className:"p-3 text-center text-sm font-normal dark:text-gray-300",children:[e.texts.newUserText,l.jsx("span",{onClick:e.handleRouteToSignUp,className:"clickable-link",children:e.texts.createAccount})]})]})}),l.jsxs("div",{className:"mt-6 flex flex-row justify-between",children:[l.jsx(Sr,{onChangeTab:e.handleLanguage,design:"tabs",options:[{value:"ar",label:"عربي"},{value:"en",label:"English"}]}),l.jsx(Sr,{onChangeTab:e.handleColorMode,design:"tabs",options:[{value:"light",label:l.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90",children:l.jsx("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})},{value:"dark",label:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-[1.2rem] w-[1.2rem] transition-all dark:rotate-0 dark:scale-100",children:l.jsx("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"})})}]})]})]})},wL=e=>{var j,P,N,$,G;const[t,n]=p.useState(null),r=na(),{formState:{errors:o},handleSubmit:a,control:i}=r,[s,u]=p.useState(null),[c,d]=p.useState(0),[g,v]=p.useState(!1),[y,C]=p.useState(""),[h,w]=p.useState(e.confirmationStage),E=()=>{clearTimeout(s),d(60),v(!0);const J=setInterval(()=>{d(Q=>Q>0?Q-1:(clearInterval(J),v(!1),0))},1e3);u(J)};return l.jsx(Ut,{children:l.jsx(Lt,{className:"transition-all",headless:!0,children:h?l.jsxs("form",{onSubmit:V=>{V.preventDefault(),t&&e.handleConfirm(t)},children:[l.jsx(sm,{width:"full",digits:6,getPins:V=>n(V)}),l.jsx("div",{className:" py-2 text-center text-xs text-muted-foreground",children:g?l.jsxs("span",{children:["Resend code in ",c," seconds |"," ",l.jsx("span",{className:"clickable-link",onClick:()=>{clearTimeout(s),v(!1)},children:"Cancel"})]}):l.jsxs("span",{children:[((j=e.texts)==null?void 0:j.didntGetCode)??"Didn't get the code?"," ",l.jsx("span",{className:"clickable-link",onClick:()=>{E()},children:((P=e.texts)==null?void 0:P.resendCode)??"Click to resend"})]})}),l.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-2",children:[l.jsx(Qe,{variant:"secondary",onClick:()=>w(!1),children:((N=e.texts)==null?void 0:N.cancel)??"Cancel"}),l.jsx(Qe,{isLoading:e.loadingConfirm,children:(($=e.texts)==null?void 0:$.confirm)??"Confirm"})]})]}):l.jsxs("form",{onSubmit:V=>{V.preventDefault(),w(!0),e.handleContinue(y)},children:[l.jsx(Pt,{control:i,name:"phone",render:({field:V})=>l.jsx($d,{country:e.country??"",label:e.label??"",handleChange:J=>C(J.target.value),...V}),rules:{required:e.phoneRequiredText}}),l.jsx(Qe,{isLoading:e.loadingContinue,className:"w-full",children:((G=e.texts)==null?void 0:G.continue)??"Continue"})]})})})},EL=e=>{const{formState:{errors:t},handleSubmit:n,control:r}=na();return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs(Ut,{dir:e.direction,children:[l.jsx(Lt,{headless:!0,children:l.jsxs("form",{onSubmit:n(o=>e.handleSignIn(o)),children:[e.showError&&l.jsx(ro,{title:e.errorTitle,text:e.errorText,severity:"error"}),e.signInType==="email"?l.jsx(Pt,{control:r,name:"email",render:({field:o})=>{var a;return l.jsx(Ot,{width:"full",type:"text",autoComplete:"email",label:e.texts.emailLabel,helperText:(a=t.email)==null?void 0:a.message,placeholder:e.texts.emailPlaceholder,value:o.value??"",onChange:o.onChange})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}):e.signInType==="username"?l.jsx(Pt,{control:r,name:"username",render:({field:o})=>{var a;return l.jsx(Ot,{width:"full",type:"text",autoComplete:"username",label:e.texts.usernameLabel,helperText:(a=t.username)==null?void 0:a.message,placeholder:e.texts.usernamePlaceholder,onChange:o.onChange,value:o.value??""})},rules:{required:e.texts.usernameRequired}}):l.jsx(Pt,{control:r,name:"phone",render:({field:o})=>l.jsx($d,{label:"Phone number"}),rules:{required:e.texts.phoneRequiredText}}),e.signInType!=="phone"&&l.jsxs(l.Fragment,{children:[l.jsx(Pt,{control:r,name:"password",render:({field:o})=>{var a;return l.jsx(Ot,{width:"full",autoComplete:"current-password",type:"password",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:(a=t.password)==null?void 0:a.message,onChange:o.onChange,value:o.value??""})},rules:{required:e.texts.passwordRequiredText,minLength:5}}),!e.withoutResetPassword&&l.jsx("div",{onClick:e.handleForgotPassword,className:"mb-3 w-fit cursor-pointer text-xs dark:text-gray-300",children:e.texts.forgotPasswordText})]}),l.jsx(Qe,{className:"mt-4 w-full",isLoading:e.isLoading,children:e.texts.signInText}),!e.withoutSignUp&&l.jsxs("div",{className:"p-3 text-center text-sm font-normal dark:text-gray-300",children:[e.texts.newUserText," ",l.jsx("span",{onClick:e.handleRouteToSignUp,className:"clickable-link",children:e.texts.createAccount})]})]})}),e.viaGithub||e.viaGoogle||e.viaTwitter?l.jsxs(kr,{className:Pe(e.logosOnly?"flex flex-row justify-center gap-2":"grid grid-cols-1 gap-2"),children:[e.viaGoogle&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleGoogleSignIn,children:[e.isGoogleLoading?l.jsx(ws,{size:"button"}):l.jsx(Zn.google,{className:"h-4 w-4"}),!e.logosOnly&&e.texts.signInViaGoogleLabel]}),e.viaGithub&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleGithubSignIn,children:[e.isGithubLoading?l.jsx(ws,{size:"button"}):l.jsx(Zn.gitHub,{className:"h-4 w-4"}),!e.logosOnly&&e.texts.signInViaGithubLabel]}),e.viaTwitter&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleTwitterSignIn,children:[e.isTwitterLoading?l.jsx(ws,{size:"button"}):l.jsx(Zn.twitter,{className:"h-4 w-4"})," ",!e.logosOnly&&e.texts.signInViaTwitterLabel]})]}):null]}),l.jsx(lm,{currentColorMode:e.currentColorMode,currentLanguage:e.currentLanguage,handleColorMode:e.handleColorMode,handleLanguage:e.handleLanguage})]})};function SL(){return l.jsxs(Ut,{children:[l.jsxs(Ao,{className:"space-y-1",children:[l.jsx(jo,{className:"text-2xl",children:"Create an account"}),l.jsx(hi,{children:"Enter your email below to create your account"})]}),l.jsxs(Lt,{className:"grid gap-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[l.jsxs(Qe,{variant:"outline",children:[l.jsx(Zn.gitHub,{className:"mr-2 h-4 w-4"}),"Github"]}),l.jsxs(Qe,{variant:"outline",children:[l.jsx(Zn.google,{className:"mr-2 h-4 w-4"}),"Google"]})]}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx("span",{className:"w-full border-t"})}),l.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:l.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or continue with"})})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ea,{htmlFor:"email",children:"Email"}),l.jsx(Ls,{id:"email",type:"email",placeholder:"m@example.com"})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ea,{htmlFor:"password",children:"Password"}),l.jsx(Ls,{id:"password",type:"password"})]})]}),l.jsx(kr,{children:l.jsx(Qe,{className:"w-full",children:"Create account"})})]})}const DL=e=>{const t=na(),{formState:{errors:n},handleSubmit:r,control:o}=t;return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs(Ut,{dir:e.direction,children:[l.jsx(Lt,{headless:!0,children:l.jsxs("div",{children:[e.showError&&l.jsx(ro,{title:e.errorTitle,text:e.errorText,severity:"error"}),l.jsx(Gu,{...t,children:l.jsxs("form",{onSubmit:r(a=>e.handleSignUp(a)),children:[l.jsx("div",{children:e.signUpFields.map((a,i)=>{if(a==="fullname")return l.jsx(Pt,{control:o,name:"fullName",render:({field:s})=>{var u;return l.jsx(Ot,{width:"full",type:"text",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:(u=n.fullName)==null?void 0:u.message,onChange:s.onChange,value:s.value??""})},rules:{required:e.texts.fullNameRequiredText}},i);if(a==="email")return l.jsx(Pt,{control:o,name:"email",render:({field:s})=>{var u;return l.jsx(Ot,{width:"full",type:"text",autoComplete:"email",label:e.texts.emailLabel,helperText:(u=n.email)==null?void 0:u.message,placeholder:e.texts.emailPlaceholder,onChange:s.onChange,value:s.value??""})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}},i);if(a==="username")return l.jsx(Pt,{control:o,name:"username",render:({field:s})=>{var u;return l.jsx(Ot,{width:"full",type:"text",autoComplete:"username",label:e.texts.usernameLabel,helperText:(u=n.username)==null?void 0:u.message,placeholder:e.texts.usernamePlaceholder,onChange:s.onChange,value:s.value??""})},rules:{required:e.texts.usernameRequired}},i)})}),l.jsx(Pt,{control:o,name:"password",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"password",autoComplete:"new-password",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:(i=n.password)==null?void 0:i.message,onChange:a.onChange,value:a.value??""})},rules:{required:e.texts.passwordRequiredText}}),l.jsx(Pt,{control:o,name:"confirm_password",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"password",autoComplete:"new-password",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:(i=n.confirm_password)==null?void 0:i.message,onChange:a.onChange,value:a.value??""})},rules:{required:e.texts.passwordRequiredText}}),e.showRefCode&&l.jsx(Pt,{control:o,name:"refCode",render:({field:a})=>{var i;return l.jsx(Ot,{width:"full",type:"text",label:e.texts.refCode,placeholder:e.texts.passwordPlaceholder,helperText:(i=n.password)==null?void 0:i.message,value:a.value??"",onChange:a.onChange})}}),e.showUserSource&&l.jsx("div",{children:l.jsx(Pt,{control:o,name:"reference",render:({field:a})=>l.jsx(uu,{label:"How did you learn about us?",isCreatable:!1,isMulti:!1,isSearchable:!1,isClearable:!1,options:[{value:"friend",label:"From a friend"},{value:"ad",label:"Advertisement"},{value:"other",label:"Other"}],onChange:i=>{a.onChange(i.value)}})})}),e.showTermsOption&&l.jsx(Pt,{control:o,name:"terms_accepted",render:({field:a})=>{var i;return l.jsx(Dm,{id:"terms_accepted",helperText:(i=n.terms_accepted)==null?void 0:i.message.toString(),onCheckedChange:s=>a.onChange(s),label:l.jsxs("span",{children:[e.texts.iAcceptText," ",l.jsx("a",{onClick:e.handleRouteToTOS,className:"clickable-link",children:e.texts.termsText})]})})},rules:{required:e.texts.termsRequiredText}}),e.showNewsletterOption&&l.jsx(Pt,{control:o,name:"newsletter_accepted",render:({field:a})=>l.jsx(Dm,{id:"newsletter_accepted",label:e.texts.subscribeToNewsletter,onCheckedChange:a.onChange})}),l.jsx(Qe,{className:"w-full",isLoading:e.isLoading,children:e.texts.signUpText})]})}),l.jsxs("div",{className:"flex flex-row items-center justify-center gap-1 p-3 text-center text-sm font-normal dark:text-white",children:[l.jsx("span",{children:e.texts.existingUserText}),l.jsx("span",{onClick:e.handleRouteToSignIn,className:"clickable-link",children:e.texts.signInText})]})]})}),e.viaGithub||e.viaGoogle||e.viaTwitter?l.jsxs(kr,{className:Pe(e.logosOnly?"flex flex-row justify-center gap-2":"grid grid-cols-1 gap-2"),children:[e.viaGoogle&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleGoogleSignUp,children:[l.jsx(Zn.google,{className:"h-4 w-4"}),!e.logosOnly&&e.texts.signUpViaGoogleLabel]}),e.viaGithub&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleGithubSignUp,children:[l.jsx(Zn.gitHub,{className:"h-4 w-4"}),!e.logosOnly&&e.texts.signUpViaGithubLabel]}),e.viaTwitter&&l.jsxs(Qe,{className:"flex flex-row items-center gap-2",variant:"outline",onClick:e.handleTwitterSignUp,children:[l.jsx(Zn.twitter,{className:"h-4 w-4"}),!e.logosOnly&&e.texts.signUpViaTwitterLabel]})]}):null]}),l.jsx(lm,{currentColorMode:e.currentColorMode,currentLanguage:e.currentLanguage,handleColorMode:e.handleColorMode,handleLanguage:e.handleLanguage})]})},FL=e=>{const[t,n]=p.useState(!1),r=na(),{formState:{errors:o},handleSubmit:a,control:i}=r,s=u=>{u.password===u.confirmPassword?e.handleNewPassword():n(!0)};return l.jsxs(Ut,{dir:e.direction,children:[t&&l.jsx(ro,{text:e.texts.passwordMatchError,severity:"error"}),e.passwordChanged?l.jsx(Lt,{headless:!0,children:l.jsx("div",{className:"text-center",children:e.texts.passwordChanged})}):l.jsx(Gu,{...r,children:l.jsxs("form",{onSubmit:a(s),children:[!e.headless&&l.jsxs(Ao,{children:[l.jsx(jo,{children:"Create Password"}),l.jsx(hi,{children:"Set a new password for your account"})]}),l.jsxs(Lt,{headless:e.headless,children:[l.jsx(Pt,{control:i,name:"password",render:({field:u})=>{var c;return l.jsx(Ot,{width:"full",type:"password",autoComplete:"new-password",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:(c=o.password)==null?void 0:c.message,...u,value:u.value??""})},rules:{required:e.texts.passwordRequiredText}}),l.jsx(Pt,{control:i,name:"confirmPassword",render:({field:u})=>{var c;return l.jsx(Ot,{width:"full",type:"password",autoComplete:"new-password",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:(c=o.confirmPassword)==null?void 0:c.message,...u,value:u.value??""})},rules:{required:e.texts.confirmPasswordRequiredText}})]}),l.jsx(kr,{children:l.jsx(Qe,{className:"w-full",type:"submit",children:e.texts.updatePassword})})]})})]})},AL=e=>{var i,s,u,c,d,g;const t=na(),{formState:{errors:n},handleSubmit:r,register:o,control:a}=t;return l.jsx(Ut,{dir:e.direction,children:e.sent?l.jsx(Lt,{headless:!0,children:l.jsx("div",{className:"text-center",children:(g=e.texts)==null?void 0:g.emailSentText})}):l.jsxs(l.Fragment,{children:[!e.headless&&l.jsxs(Ao,{children:[l.jsx(jo,{children:"Reset Password"}),l.jsx(hi,{children:"Enter your email to reset your account password"})]}),l.jsxs("form",{onSubmit:r(e.handleResetPassword),children:[l.jsxs(Lt,{headless:e.headless,children:[l.jsx(Pt,{control:a,name:"email",render:({field:v})=>{var y,C,h;return l.jsx(Ot,{width:"full",type:"text",label:(y=e.texts)==null?void 0:y.emailLabel,helperText:(C=n.email)==null?void 0:C.message,placeholder:(h=e.texts)==null?void 0:h.emailPlaceholder,...v,value:v.value??""})},rules:{required:(i=e.texts)==null?void 0:i.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:(s=e.texts)==null?void 0:s.emailInvalidText}}}),l.jsxs("div",{className:"pb-2 text-start text-sm dark:text-gray-300",children:[((u=e.texts)==null?void 0:u.dontHaveAccount)??"Don't have an account? ",l.jsx("span",{onClick:e.handleRouteToSignUp,className:"clickable-link",children:((c=e.texts)==null?void 0:c.signUpText)??"Sign Up"})]})]}),l.jsx(kr,{children:l.jsx(Qe,{type:"submit",className:"w-full",children:(d=e.texts)==null?void 0:d.resetPassword})})]})]})})},jL=e=>{const[t,n]=p.useState(null);return l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,children:[e.showError&&l.jsx(ro,{title:e.errorTitle,text:e.errorText,severity:"error"}),l.jsxs("div",{className:"mb-4 dark:text-white",children:[l.jsx("div",{className:"text-lg font-bold",children:e.texts.checkYourPhone??"Please check your phone"}),l.jsxs("div",{className:"text-muted-foreground",children:[l.jsx("span",{children:e.texts.weSentCode??"We've sent a code to "}),l.jsx("span",{children:e.phoneNumber})]})," "]}),l.jsxs("form",{onSubmit:r=>{r.preventDefault(),t&&e.submitConfirmation(t)},children:[l.jsx(sm,{width:"full",digits:6,getPins:r=>n(r)}),l.jsxs("div",{className:" py-2 text-center text-xs text-muted-foreground",children:[l.jsx("span",{children:e.texts.didntGetCode??"Didn't get the code?"})," ",l.jsx("span",{className:"clickable-link",children:e.texts.resendCode??"Click to resend"})]}),l.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-2",children:[l.jsx(Qe,{variant:"secondary",children:e.texts.cancel??"Cancel"}),l.jsx(Qe,{children:e.texts.confirm??"Confirm"})]})]})]})})},IL=({texts:e,handleResend:t})=>l.jsxs(Ut,{children:[l.jsx(Lt,{headless:!0,children:l.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[l.jsx("div",{className:"flex h-16 w-16 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground",children:l.jsxs("svg",{stroke:"currentColor",fill:"none","stroke-width":"2",viewBox:"0 0 24 24","stroke-linecap":"round","stroke-linejoin":"round",height:"0.5em",width:"0.5em",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),l.jsx("polyline",{points:"22,6 12,13 2,6"})]})}),l.jsx("div",{className:"m-2 text-xl font-bold",children:(e==null?void 0:e.checkEmail)??"Check you email"}),l.jsx("div",{className:"text-sm",children:(e==null?void 0:e.pleaseVerify)??"Thank you for signing up! To complete your registration, we've sent a verification email to the address you provided. Please check your inbox and follow the instructions in the email to activate your account."})]})}),l.jsx(kr,{className:"flex flex-col justify-center ",children:l.jsx("span",{className:"clickable-link text-sm",onClick:t,children:(e==null?void 0:e.resendEmail)??"Resend Email"})})]}),TL=e=>{const[t,n]=p.useState("");return l.jsxs(Ut,{children:[l.jsxs(Ao,{children:[l.jsx(jo,{children:"Choose Payment Method"}),l.jsx(hi,{children:"And you'll be directed to the next step to complete the payment"})]}),l.jsxs(Lt,{className:"grid grid-cols-2 gap-4",children:[l.jsxs(Qe,{className:Pe("flex w-full flex-col gap-2 pt-6",t==="mada"&&"outline outline-4 outline-primary"),variant:"outline",size:"heightless",disabled:!e.viaMada,onClick:()=>n("mada"),children:[l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",className:"h-6"}),l.jsx("span",{children:e.madaLabel})]}),l.jsxs(Qe,{className:Pe("flex w-full flex-col gap-2",t==="apple-pay"&&"outline outline-4 outline-primary"),variant:"outline",size:"heightless",disabled:!e.viaApplePay,onClick:()=>n("apple-pay"),children:[l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",className:"h-11"}),l.jsx("span",{children:e.applePayLabel})]}),l.jsxs(Qe,{className:Pe("flex w-full flex-col gap-2",t==="visa-master"&&"outline outline-4 outline-primary"),variant:"outline",size:"heightless",disabled:!e.viaCreditCard,onClick:()=>n("visa-master"),children:[l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",className:"h-6"}),l.jsx("span",{children:e.visaMasterLabel})]}),l.jsxs(Qe,{variant:"outline",size:"heightless",className:Pe("flex w-full flex-col gap-2",t==="wallet"&&"outline outline-4 outline-primary"),disabled:!e.viaWallet,onClick:()=>n("wallet"),children:[l.jsx("svg",{version:"1.1",fill:"currentColor",viewBox:"0 0 223 223",className:"h-6 w-6",children:l.jsxs("g",{children:[l.jsx("path",{d:`M223,94.5c0-6.075-4.925-11-11-11h-63c-6.075,0-11,4.925-11,11v33c0,6.075,4.925,11,11,11h63c6.075,0,11-4.925,11-11V94.5z
252
252
  M169.515,123.967c-7.082,0-12.823-5.741-12.823-12.823c0-7.082,5.741-12.823,12.823-12.823c7.082,0,12.823,5.741,12.823,12.823
253
253
  C182.338,118.225,176.597,123.967,169.515,123.967z`}),l.jsx("path",{d:`M123.509,68.5H205v-33c0-8.271-6.395-15-14.667-15h-175C7.062,20.5,0,27.229,0,35.5v152c0,8.271,7.062,15,15.333,15h175
254
254
  c8.271,0,14.667-6.729,14.667-15v-34h-81.342L123.509,68.5z`})]})}),l.jsx("span",{children:e.walletLabel})]}),l.jsxs(Qe,{variant:"outline",size:"heightless",className:Pe("flex w-full flex-col gap-2",t==="stc-pay"&&"outline outline-4 outline-primary"),disabled:!e.viaSTCPay,onClick:()=>n("stc-pay"),children:[l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",className:"h-6"}),l.jsx("span",{children:e.stcPayLabel})]}),l.jsxs(Qe,{variant:"outline",size:"heightless",className:Pe("flex w-full flex-col gap-2",t==="google-pay"&&"outline outline-4 outline-primary"),disabled:!e.viaGooglePay,onClick:()=>n("google-pay"),children:[l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",className:"h-6"}),l.jsx("span",{children:e.googlePayLabel})]}),l.jsxs(Qe,{variant:"outline",size:"heightless",className:Pe("col-span-2 flex w-full flex-col gap-2",t==="paypal"&&"outline outline-4 outline-primary"),disabled:!e.viaPayPal,onClick:()=>n("paypal"),children:[l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",className:"h-6"}),l.jsx("span",{children:e.paypalLabel})]})]}),l.jsx(kr,{children:l.jsx(Qe,{onClick:()=>e.handleContinue(t),className:"w-full",disabled:!t,children:"Continue"})})]})},kL=e=>{const[t,n]=p.useState(""),[r,o]=p.useState(""),a=na(),{formState:{errors:i},handleSubmit:s,control:u}=a,c=g=>{const v=/^4[0-9]{0,15}$/m,y=/^5$|^5[0-5][0-9]{0,16}$/m,C=/^3$|^3[47][0-9]{0,13}$/m,h=/^(440647|440795|446404|457865|968208|457997|474491|636120|417633|468540|468541|468542|468543|968201|446393|409201|458456|484783|462220|455708|410621|455036|486094|486095|486096|504300|440533|489318|489319|445564|968211|410685|406996|432328|428671|428672|428673|968206|446672|543357|434107|407197|407395|412565|431361|604906|521076|529415|535825|543085|524130|554180|549760|968209|524514|529741|537767|535989|536023|513213|520058|558563|588982|589005|531095|530906|532013|968204|422817|422818|422819|428331|483010|483011|483012|589206|968207|419593|439954|530060|531196|420132)/,w=/^507803[0-6][0-9]|507808[3-9][0-9]|507809[0-9][0-9]|507810[0-2][0-9]/;let E="visa";return g.replace(/[^\d]/g,"").match(h)?E="mada":g.replace(/[^\d]/g,"").match(w)?E="meeza":g.replace(/[^\d]/g,"").match(v)?E="visa":g.replace(/[^\d]/g,"").match(y)?E="mastercard":g.replace(/[^\d]/g,"").match(C)&&(E="amex"),E},d=g=>{let{value:v,name:y}=g.target,C=v;v=v.replace(/\D/g,""),/^3[47]\d{0,13}$/.test(v)?C=v.replace(/(\d{4})/,"$1 ").replace(/(\d{4}) (\d{6})/,"$1 $2 "):/^3(?:0[0-5]|[68]\d)\d{0,11}$/.test(v)?C=v.replace(/(\d{4})/,"$1 ").replace(/(\d{4}) (\d{6})/,"$1 $2 "):/^\d{0,16}$/.test(v)&&(C=v.replace(/(\d{4})/,"$1 ").replace(/(\d{4}) (\d{4})/,"$1 $2 ").replace(/(\d{4}) (\d{4}) (\d{4})/,"$1 $2 $3 ")),console.log("card number is ",C.trimRight()),n(C.trimRight())};return p.useEffect(()=>{let g=c(t);o(g)}),l.jsx(Ut,{children:l.jsxs("form",{onSubmit:s(e.handle),children:[l.jsxs(Lt,{headless:!0,children:[l.jsxs("div",{className:"flex flex-row gap-4",children:[l.jsx(Pt,{control:u,name:"cardNumber",render:({field:g})=>{var v;return l.jsx(Ot,{width:"full",name:"cardNumber",placeholder:"1234 1234 1234 1234",type:"number",onChange:d,label:"Card Number",helperText:(v=i.password)==null?void 0:v.message,iconInside:l.jsx("img",{src:`https://sikka-images.s3.ap-southeast-1.amazonaws.com/payment-symbols/borderless/${r}.png`,alt:"",className:"h-8"})})},rules:{required:"Card Number is rquired"}}),l.jsx("div",{className:"w-1/4",children:l.jsx(Pt,{control:u,name:"cardCVC",render:({field:g})=>{var v;return l.jsx(Ot,{width:"full",name:"cardCVC",maxLength:"3",autoComplete:"cc-number",placeholder:"CVC",type:"number",label:"CVC",helperText:(v=i.password)==null?void 0:v.message})},rules:{required:"Password is rquired"}})})]}),l.jsx(Pt,{control:u,name:"cardExpiry",render:({field:g})=>{var v;return l.jsx(Ot,{width:"full",name:"cardExpiry",placeholder:"MM / YY",type:"password",label:"Expiry Date",helperText:(v=i.password)==null?void 0:v.message})},rules:{required:"Password is rquired"}}),l.jsx(Pt,{control:u,name:"cardName",render:({field:g})=>{var v;return l.jsx(Ot,{width:"full",name:"cardName",type:"text",label:"Name on card",helperText:(v=i.password)==null?void 0:v.message})},rules:{required:"Card holder name is rquired"}})]}),l.jsx(kr,{children:l.jsx(Qe,{className:"w-full",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})})]})})},PL=e=>{const[t,n]=p.useState(0);return l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,children:[l.jsxs("div",{className:"p-4 text-center",children:[l.jsx("div",{className:" text-5xl font-extrabold",children:Number(t).toLocaleString("en")||"0"}),l.jsx("div",{className:"text-sm font-normal",children:e.currency||"SAR"})]}),l.jsxs("div",{className:"mb-2 flex w-full flex-col gap-4 text-center",children:[l.jsxs("div",{className:"mb-2 flex w-full flex-row gap-4 text-center",children:[l.jsx(Qe,{variant:"outline",className:"h-full w-full",children:"10 SAR"}),l.jsx(Qe,{variant:"outline",className:"h-full w-full",children:"50 SAR"}),l.jsx(Qe,{variant:"outline",className:"h-full w-full",children:"100 SAR"})]}),l.jsx(Ls,{placeholder:"Custom Amount",type:"number",name:"amount"})]}),l.jsx(Qe,{className:"mt-6 w-full",children:e.texts.chargeWallet})]})})},BL=e=>l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,children:[l.jsxs("div",{className:"text-center text-5xl font-extrabold",children:[e.walletBalance||"0",l.jsx("div",{className:"text-sm font-normal",children:e.currency||"SAR"})]}),l.jsx(Qe,{className:"mt-6 w-full",onClick:e.handlePayWithWallet,children:"Pay Now"})]})}),NL=e=>{var s,u,c,d,g,v,y,C,h,w;let t=e.lang==="ar";const n=na(),{formState:{errors:r},handleSubmit:o,register:a,control:i}=n;return l.jsxs(Ut,{children:[l.jsx(Ao,{children:l.jsx(jo,{children:e.texts.orderDetails})}),l.jsx(Lt,{children:l.jsx("div",{children:l.jsx("div",{className:"rounded border border-gray-300",children:l.jsx(ty,{pagination:!1,direction:t?"rtl":"ltr",columns:[{hidden:!1,value:"Product"},{hidden:!0,value:"ID"},{hidden:!1,value:"Price"}],borders:"inner",rows:e.products,bordersWidth:"1"})})})}),l.jsx(Ao,{children:l.jsx(jo,{children:e.texts.billingAddress})}),l.jsxs("form",{onSubmit:o(e.handlePayNow),children:[l.jsx(Lt,{children:l.jsx("div",{children:l.jsxs(Gu,{...n,children:[l.jsxs("div",{children:[l.jsx(Pt,{control:i,name:"firstName",rules:{required:(s=e.texts)==null?void 0:s.required},render:({field:E})=>{var j,P;return l.jsx(Ot,{type:"text",label:((j=e.texts)==null?void 0:j.firstNameLabel)+" *",helperText:(P=r.firstName)==null?void 0:P.message,...E,value:E.value??""})}}),l.jsx("div",{style:{width:20}}),l.jsx(Pt,{control:i,name:"lastName",rules:{required:(u=e.texts)==null?void 0:u.required},render:({field:E})=>{var j,P;return l.jsx(Ot,{width:"full",type:"text",label:((j=e.texts)==null?void 0:j.lastNameLabel)+" *",helperText:(P=r.lastName)==null?void 0:P.message,...E,value:E.value??""})}})]}),l.jsx(Pt,{control:i,name:"email",render:({field:E})=>{var j,P;return l.jsx(Ot,{width:"full",type:"text",label:((j=e.texts)==null?void 0:j.emailLabel)+" *",helperText:(P=r.email)==null?void 0:P.message,...E,value:E.value??""})},rules:{required:(c=e.texts)==null?void 0:c.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:(d=e.texts)==null?void 0:d.emailInvalidText}}}),l.jsx("div",{className:"flex flex-col md:flex-row",children:l.jsx(Pt,{control:i,name:"streetAddress",rules:{required:(g=e.texts)==null?void 0:g.required},render:({field:E})=>{var j,P;return l.jsx(Ot,{width:"full",type:"text",label:((j=e.texts)==null?void 0:j.streetAddressLabel)+" *",helperText:(P=r.streetAddress)==null?void 0:P.message,...E,value:E.value??""})}})}),l.jsxs("div",{className:"flex flex-col md:flex-row",children:[l.jsx(Pt,{control:i,name:"province",rules:{required:(v=e.texts)==null?void 0:v.required},render:({field:E})=>{var j,P;return l.jsx(Ot,{width:"full",type:"text",label:((j=e.texts)==null?void 0:j.stateLabel)+" *",helperText:(P=r.province)==null?void 0:P.message,...E,value:E.value??""})}}),l.jsx("div",{style:{width:20}}),l.jsx(Pt,{control:i,name:"city",rules:{required:(y=e.texts)==null?void 0:y.required},render:({field:E})=>{var j,P;return l.jsx(Ot,{width:"full",type:"text",label:((j=e.texts)==null?void 0:j.cityLabel)+" *",helperText:(P=r.city)==null?void 0:P.message,...E,value:E.value??""})}})]}),l.jsxs("div",{className:"flex flex-col md:flex-row",children:[l.jsx(Pt,{control:i,name:"buildingNumber",rules:{required:(C=e.texts)==null?void 0:C.required},render:({field:E})=>{var j,P;return l.jsx(Ot,{width:"full",type:"text",label:((j=e.texts)==null?void 0:j.buildingNumberLabel)+" *",helperText:(P=r.buildingNumber)==null?void 0:P.message,...E,value:E.value??""})}}),l.jsx("div",{style:{width:20}}),l.jsx(Pt,{control:i,name:"zipCode",rules:{required:(h=e.texts)==null?void 0:h.required},render:({field:E})=>{var j,P;return l.jsx(Ot,{width:"full",type:"number",label:((j=e.texts)==null?void 0:j.zipCodeLabel)+" *",helperText:(P=r.zipCode)==null?void 0:P.message,...E,value:E.value??""})}})]}),l.jsx("div",{className:"mb-3",children:l.jsx(Pt,{control:i,name:"country",rules:{required:(w=e.texts)==null?void 0:w.required},render:({field:E})=>{var j,P;return l.jsxs(uu,{native:!0,label:((j=e.texts)==null?void 0:j.countryLabel)+" *",helperText:(P=r.country)==null?void 0:P.message,options:ny,getOptionLabel:N=>N.country_label,onChange:N=>E.onChange(N.country_label),value:E.value??"",children:[l.jsx("option",{}),e.countriesList.map((N,$)=>l.jsx("option",{children:N},$))]})}})})]})})}),l.jsx(kr,{children:l.jsx(Qe,{className:"w-full",children:e.texts.payNow})})," "]})]})},OL=e=>(e.lang,l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,children:[" ",l.jsx("div",{className:"py-5 text-center text-3xl font-bold dark:text-white",children:e.confirmationTitle}),l.jsxs("div",{className:"py-5 dark:text-white",children:[l.jsxs("div",{className:"mb-2 text-center",children:[e.texts.successMessage," ",l.jsx("strong",{children:e.userEmail})]}),l.jsx("div",{className:"text-center",children:e.texts.yourOrderNumber}),l.jsx("div",{className:"text-center font-bold",children:e.orderNumber})]}),l.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-5 pt-0",children:[l.jsx(Qe,{className:"w-full",onClick:e.handlePrint,children:e.texts.print}),l.jsx(Qe,{className:"w-full",onClick:e.handleHistory,children:e.texts.history}),l.jsx(Qe,{className:"w-full",onClick:e.handleHome,children:e.texts.homePage}),l.jsx("div",{className:" text-center text-sm dark:text-white",children:e.texts.fasterPaymentNote}),l.jsx("a",{className:"clickable-link text-xs",onClick:e.handleRefundPolicyLink,children:e.texts.refundPolicy})]})]})})),$L=e=>l.jsxs("div",{children:[l.jsxs("div",{className:"mb-2 flex w-full justify-between",children:[l.jsx(Sr,{design:"tabs",defaultValue:e.currentCycle,options:e.billingCycles,onChangeTab:t=>e.onCycleChange(t)}),l.jsx(Sr,{design:"tabs",defaultValue:e.currentCurrency,options:e.currencies,onChangeTab:t=>e.onCurrencyChange(t)})]}),l.jsx("div",{className:"flex flex-row justify-between",children:e.plans.map((t,n)=>l.jsx(qC,{onPlanClicked:()=>e.onPlanClicked(t),...t,texts:{...t.texts,currencyText:e.currentCurrency,cycleText:e.currentCycle}},n))})]}),RL=()=>l.jsx("svg",{className:"h-5 w-5 text-green-500","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),q3=()=>l.jsx("svg",{className:"h-5 w-5 text-red-500","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),ML=e=>{var a;const[t,n]=p.useState("sar"),[r,o]=p.useState("month");return l.jsxs("div",{id:"detailed-pricing",className:"w-full overflow-x-auto",children:[l.jsxs("div",{className:"mb-2 flex w-full justify-between",children:[l.jsx(Sr,{design:"tabs",defaultValue:r,options:e.billingCycles,onChangeTab:i=>e.onCycleChange(i)}),l.jsx(Sr,{design:"tabs",defaultValue:t,options:e.currencies,onChangeTab:i=>e.onCurrencyChange(i)})]}),l.jsxs("div",{className:" overflow-hidden rounded",children:[l.jsxs("div",{className:"grid grid-cols-4 gap-x-2 border-b border-t border-gray-200 bg-gray-100 p-4 text-sm font-medium text-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:text-white",children:[l.jsx("div",{className:"flex items-center"}),e.plans.map(i=>l.jsxs("div",{children:[l.jsx("h5",{className:"text-md 0 font-bold text-gray-500 dark:text-gray-400",children:i.texts.title}),l.jsxs("div",{className:" flex items-baseline text-gray-900 dark:text-white",children:[l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-5xl font-extrabold tracking-tight",children:i.price}),l.jsx("span",{className:"mx-1 text-sm font-semibold",children:i.texts.currencyText})]}),l.jsxs("span",{className:"ml-1 text-xl font-normal text-gray-500 dark:text-gray-400",children:["/ ",i.texts.cycleText]})]}),l.jsx("h5",{className:"text-md font-normal text-gray-500 dark:text-gray-400",children:i.texts.subtitle})]}))]}),(a=e.plans)==null?void 0:a.map(i=>i.features.map(s=>l.jsxs("div",{className:"grid grid-cols-4 gap-x-16 border-b border-gray-200 px-4 py-5 text-sm text-gray-700 dark:border-gray-700",children:[l.jsxs("div",{className:" flex flex-row items-center gap-2 text-gray-500 dark:text-gray-400",children:[s.text,s.description&&l.jsx(Is,{side:"right",content:s.description,children:l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",children:l.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"})})})]}),l.jsx(q3,{}),l.jsx(RL,{}),l.jsx(q3,{})]})))]})]})},LL=e=>{const[t,n]=p.useState(null);let r=[{title:"basic",price:"$49",cycle:"/mo"},{title:"business",price:"$99",cycle:"/mo"},{title:"enterprise",price:"$149",cycle:"/mo"}];return l.jsx("div",{className:"z-10 w-full max-w-screen-sm",children:l.jsxs("div",{className:"max-w-2xl ",children:[l.jsxs("div",{className:"flex flex-row justify-between",children:[l.jsx(Sr,{design:"tabs",options:e.currencies,defaultValue:e.currentCurrency}),l.jsx(Sr,{design:"tabs",options:e.billingCycles,defaultValue:e.currentCycle})]}),r.map(o=>l.jsxs("label",{htmlFor:o.title,className:"",onClick:()=>n(o.title),children:[l.jsx("input",{type:"radio",name:"radio",id:o.title,className:"peer appearance-none"}),l.jsxs("div",{className:_e(t===o.title?"peer-checked:border-blue-500":"","peer flex cursor-pointer items-center justify-between rounded-xl border bg-background px-5 py-4 shadow dark:text-white peer-checked:[&_.active]:block peer-checked:[&_.default]:hidden"),children:[l.jsxs("div",{className:"peer flex items-center gap-4",children:[l.jsx(_L,{}),l.jsx(VL,{title:"Enterprise",subtitle:"For startups and new businesses"})]}),l.jsx(WL,{amount:o.price,cycle:o.cycle})]})]}))]})})},_L=()=>l.jsxs(l.Fragment,{children:[l.jsx("svg",{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"default h-8 w-8 text-neutral-500",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),l.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"active hidden h-8 w-8 text-blue-500",children:l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z"})})]}),VL=e=>l.jsxs("div",{className:"peer flex flex-col items-start ",children:[l.jsx("h2",{className:"font-medium text-neutral-700 dark:text-gray-100 sm:text-xl",children:e.title}),l.jsxs("p",{className:"text-sm text-neutral-500 dark:text-gray-300",children:[e.subtitle," "]})]}),WL=e=>l.jsxs("h2",{className:"peer text-xl font-semibold text-neutral-900 dark:text-white sm:text-2xl",children:[e.amount,l.jsx("span",{className:"text-base font-medium text-neutral-400",children:e.cycle})]}),HL=({referralLink:e,referralCode:t})=>l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,children:[l.jsxs("div",{className:"my-2 mt-0",children:[l.jsx("div",{className:"mb-1",children:"Referral Code"}),l.jsxs("div",{className:"flex flex-row items-center justify-between rounded border bg-background",children:[l.jsx("span",{className:"ml-3 font-bold",children:t}),l.jsx(Qe,{onClick:()=>navigator.clipboard.writeText(t),children:l.jsxs("span",{className:"bg-red flex items-center justify-center",children:[l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",children:l.jsx("path",{d:"M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z"})})," "]})})]})]}),l.jsxs("div",{className:"my-2 mt-0",children:[l.jsx("div",{className:"mb-1",children:"Referral Link"}),l.jsxs("div",{className:"flex flex-row items-center justify-between rounded border bg-background",children:[l.jsx("span",{className:"ml-3 font-bold",children:e}),l.jsx(Qe,{onClick:()=>navigator.clipboard.writeText(e),children:l.jsxs("span",{className:"bg-red flex items-center justify-center",children:[l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",children:l.jsx("path",{d:"M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z"})})," "]})})]})]})]})}),GL=({referralLink:e,referralCode:t,withdrawError:n})=>{const r=na(),{formState:{errors:o},handleSubmit:a,control:i}=r;return l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,children:[l.jsx("div",{children:l.jsxs(Gu,{...r,children:[l.jsx(Ot,{label:"IBAN"}),l.jsx(Ot,{label:"Holder Name"}),l.jsx(Pt,{control:i,name:"bank",render:({field:s})=>l.jsx(uu,{label:"Bank",isCreatable:!1,isMulti:!1,isSearchable:!1,isClearable:!1,options:[{value:"snb",label:"Saudi National Bank"},{value:"bilad",label:"Al Bilad Bank"},{value:"rajihi",label:"Al Rajihi Bank"}],onInputChange:(u,c)=>console.log("changing",u),...s,onChange:(u,c)=>console.log("chooo",u)})})]})}),l.jsx("div",{children:l.jsx(Qe,{className:"mt-6 w-full",children:"Add Bank Account"})}),n&&l.jsx("div",{children:l.jsx(ro,{text:"Sorry can't withdraw the money at the moment. Please try again in 2022/11/20",severity:"warning"})}),l.jsxs("div",{className:"mt-3",children:[l.jsx("div",{className:"mb-1",children:"Settlement Accounts"}),l.jsxs("div",{className:"rounded",children:[l.jsx(kv,{bank:"Al Inma Bank",iban:"SA10228094028098329119",accountHolder:"Zakher Masri",default:!0}),l.jsx(kv,{bank:"Al Rajihi Bank",iban:"SA10228094028098329119",accountHolder:"Zakher Masri"}),l.jsx(kv,{bank:"Al Inma Bank",iban:"SA10228094028098329119",accountHolder:"Zakher Masri"})]})]})]})})},kv=e=>l.jsxs("div",{className:"mb-3 flex flex-row items-center justify-between rounded border bg-background p-3",children:[l.jsxs("div",{className:"flex flex-col justify-between",children:[l.jsx("div",{className:"text-xs",children:e.bank}),l.jsx("div",{children:e.accountHolder}),l.jsx("div",{className:"text-xs",children:e.iban})]}),l.jsxs("div",{className:"flex flex-row items-center justify-center gap-2",children:[e.default&&l.jsx(Uc,{label:"Default",size:"small"}),l.jsx(Rd,{size:"small",menuItems:[[{label:"Set Default",disabled:e.default},{label:"Edit"},{label:"Delete"}]],children:l.jsx(Qe,{variant:"outline",size:"icon",children:l.jsx("svg",{"aria-label":"Vertical Three Dots Menu Icon",className:"rotate-90",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",children:l.jsx("path",{d:"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"})})})})]})]}),zL=({referralLink:e,referralCode:t,withdrawError:n})=>l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,children:[l.jsx("div",{className:"mb-1",children:"Stats"}),l.jsxs("div",{className:"justi flex flex-row gap-1",children:[l.jsx(Pv,{title:"Clicks",number:22}),l.jsx(Pv,{title:"Sign-ups",number:32}),l.jsx(Pv,{title:"Commission",number:"213.22 SAR"})]}),l.jsx(Qe,{className:"mt-6 w-full",children:"Withdraw Money"}),n&&l.jsx("div",{children:l.jsx(ro,{text:"Sorry can't withdraw the money at the moment. Please try again in 2022/11/20",severity:"warning"})}),l.jsxs("div",{className:"mt-3",children:[l.jsx("div",{className:"mb-1",children:"Sign ups"}),l.jsxs("div",{className:"rounded",children:[l.jsx(Uu,{date:"2020/10/11 @ 9:45 pm",email:"zakher@sikka.io",amount:"3.4 SAR / Month"}),l.jsx(Uu,{date:"2022/10/11 @ 9:45 pm",email:"zakher@sikka.io",amount:"3.4 SAR / Month"}),l.jsx(Uu,{date:"2022/10/11 @ 9:45 pm",email:"zakher@sikka.io",amount:"3.4 SAR / Month"}),l.jsx(Uu,{date:"2022/10/11 @ 9:45 pm",email:"zakher@sikka.io",amount:"3.4 SAR / Month"}),l.jsx(Uu,{date:"2022/10/11 @ 9:45 pm",email:"zakher@sikka.io",amount:"3.4 SAR / Month"})]})]})]})}),Pv=e=>l.jsxs("div",{className:"w-full rounded border bg-background p-2",children:[l.jsx("div",{className:"text-sm",children:e.title}),l.jsx("div",{className:"font-bold",children:e.number})]}),Uu=e=>l.jsxs("div",{className:"mb-3 rounded border-b bg-background p-2",children:[l.jsx("div",{className:"text-xs",children:e.date}),l.jsxs("div",{className:"flex flex-row justify-between",children:[l.jsx("div",{children:e.email}),l.jsx("div",{children:e.amount})]})]}),UL=({variant:e="contained",texts:t})=>l.jsx(Ut,{children:l.jsx(Lt,{headless:!0,children:l.jsxs("div",{className:"flex flex-col items-center dark:text-white",children:[l.jsx("div",{className:"text-center text-6xl font-bold ",children:"404"}),l.jsx("div",{className:"m-2 text-center text-xl font-bold ",children:(t==null?void 0:t.pageNotFound)??"Page Not Found"}),l.jsx("div",{className:"mb-4 text-center",children:(t==null?void 0:t.ifLost)??l.jsxs(l.Fragment,{children:["If you're lost please contact us"," ",l.jsx("span",{className:"clickable-link",children:"help@sikka.io"})]})}),l.jsx(Qe,{className:"w-full",children:(t==null?void 0:t.home)??"Home"})]})})}),ZL=({variant:e="contained",texts:t,onActionClick:n})=>l.jsxs(Ut,{children:[l.jsx(Lt,{headless:!0,children:l.jsxs("div",{className:"flex flex-col items-center justify-center text-center ",children:[l.jsx("div",{className:"flex h-10 w-10 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground",children:l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"0.35em",width:"0.35em",children:l.jsx("path",{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"})})}),l.jsx("div",{className:"m-2 text-xl font-bold",children:(t==null?void 0:t.youreCaughtUp)??"You're all caught up"})]})}),l.jsx(kr,{children:l.jsx(Qe,{className:"w-full",onClick:()=>n(),children:(t==null?void 0:t.actionText)??"Go Home"})})]}),XL=e=>l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,children:[l.jsx("div",{children:l.jsx("p",{className:"mb-4 max-w-sm",children:"The team at Sikka Software is simply amazing. The tech is easy to follow, easy to work with, and infinitely flexible. The solution opportunities created by Tines are endless."})}),l.jsxs("div",{className:"flex flex-row gap-4",children:[l.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",children:[l.jsx("rect",{width:"48",height:"48",rx:"24",fill:"#45BE8B"}),l.jsx("path",{d:"M14.1412 22.4427L17.5803 16.5199C17.7671 16.1981 18.1112 16 18.4834 16H20.8581C21.653 16 22.1565 16.8528 21.7725 17.5488L19.3042 22.0225C19.2202 22.1747 19.1762 22.3458 19.1762 22.5196C19.1762 23.0879 19.6369 23.5486 20.2052 23.5486H21.5827C22.1594 23.5486 22.627 24.0162 22.627 24.5929V31.347C22.627 31.9237 22.1594 32.3913 21.5827 32.3913H15.0443C14.4676 32.3913 14 31.9237 14 31.347V22.9671C14 22.7829 14.0487 22.602 14.1412 22.4427Z",fill:"#FFFFFF"}),l.jsx("path",{d:"M25.356 22.4427L28.7951 16.5199C28.982 16.1981 29.326 16 29.6982 16H32.0729C32.8679 16 33.3713 16.8528 32.9873 17.5488L30.5191 22.0225C30.4351 22.1747 30.391 22.3458 30.391 22.5196C30.391 23.0879 30.8518 23.5486 31.4201 23.5486H32.7975C33.3743 23.5486 33.8418 24.0162 33.8418 24.5929V31.347C33.8418 31.9237 33.3743 32.3913 32.7975 32.3913H26.2592C25.6824 32.3913 25.2148 31.9237 25.2148 31.347V22.9671C25.2148 22.7829 25.2636 22.602 25.356 22.4427Z",fill:"#FFFFFF"})]}),l.jsx("span",{className:"border border-l "})," ",l.jsxs("div",{children:[l.jsx("strong",{children:"Brent Lassi"}),l.jsx("div",{children:" Chief Information Security Officer"})]})]})]})}),YL=({variant:e="contained",texts:t,handleNewsletterSub:n})=>l.jsxs(Ut,{children:[l.jsxs(Ao,{children:[l.jsx(jo,{children:t==null?void 0:t.title}),l.jsx(hi,{children:t==null?void 0:t.subtitle})]}),l.jsx(Lt,{children:l.jsxs("form",{className:"flex flex-row gap-2",onSubmit:r=>{r.preventDefault(),n(r.target[0].value)},children:[l.jsx(Ls,{type:"email",name:"email",placeholder:"example@sikka.io"}),l.jsx(Qe,{children:(t==null?void 0:t.submit)??"Submit"})]})})]}),JL=({variant:e="contained",onActionClick:t,...n})=>l.jsx(Ut,{children:l.jsxs(Lt,{headless:!0,className:"flex flex-row items-center justify-between",children:[l.jsxs("div",{className:"flex flex-col items-start justify-center ",children:[l.jsx("span",{className:"text-lg font-bold",children:n.title}),l.jsx("span",{className:"text-sm",children:n.subtitle})]}),l.jsx(Qe,{onClick:()=>t(),children:n.actionText})]})}),KL=({texts:e})=>l.jsx(Ut,{children:l.jsx(Lt,{headless:!0,children:l.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[l.jsxs("div",{className:"flex h-10 w-10 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground",children:[l.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"0.35em",width:"0.35em",children:l.jsx("path",{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"})})," "]}),l.jsx("div",{className:"m-2 text-xl font-bold",children:(e==null?void 0:e.title)??"You don't have permission"}),l.jsx("div",{children:(e==null?void 0:e.subtitle)??"If you think this is a problem please contact your administrator or our customer support"})]})})});function QL(e){return e.currentTarget instanceof HTMLElement&&e.relatedTarget instanceof HTMLElement?e.currentTarget.contains(e.relatedTarget):!1}function qL({onBlur:e,onFocus:t}={}){const n=p.useRef(),[r,o]=p.useState(!1),a=p.useRef(!1),i=c=>{o(c),a.current=c},s=c=>{a.current||(i(!0),t==null||t(c))},u=c=>{a.current&&!QL(c)&&(i(!1),e==null||e(c))};return p.useEffect(()=>{if(n.current)return n.current.addEventListener("focusin",s),n.current.addEventListener("focusout",u),()=>{var c,d;(c=n.current)==null||c.removeEventListener("focusin",s),(d=n.current)==null||d.removeEventListener("focusout",u)}},[s,u]),{ref:n,focused:r}}function e_(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function t_(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function n_(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,o]=p.useState(n?t:t_(e,t)),a=p.useRef();return p.useEffect(()=>{if("matchMedia"in window)return a.current=window.matchMedia(e),o(a.current.matches),e_(a.current,i=>o(i.matches))},[e]),r}function r_(e=""){const[t,n]=p.useState(e);return p.useEffect(()=>{const o=()=>{const a=window.location.hash.substring(1);n(a||e)};return window.addEventListener("hashchange",o),o(),()=>{window.removeEventListener("hashchange",o)}},[e]),{activeTab:t,handleTabChange:o=>{n(o),window.location.hash=o}}}function Bv(e,t,n){p.useEffect(()=>(window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)),[e,t])}function Nv(){return typeof window<"u"?{x:window.pageXOffset,y:window.pageYOffset}:{x:0,y:0}}function o_({x:e,y:t}){if(typeof window<"u"){const n={behavior:"smooth"};typeof e=="number"&&(n.left=e),typeof t=="number"&&(n.top=t),window.scrollTo(n)}}function a_(){const[e,t]=p.useState({x:0,y:0});return Bv("scroll",()=>t(Nv())),Bv("resize",()=>t(Nv())),p.useEffect(()=>{t(Nv())},[]),[e,o_]}Ce.ActionCard=ON,Ce.Announcement=JL,Ce.AppLanding=CL,Ce.AppLayout=VM,Ce.AppSidebar=QM,Ce.ArrowCarousel=jI,Ce.BackToTop=EN,Ce.Box=uM,Ce.Button=Qe,Ce.Card=Ut,Ce.CardContent=Lt,Ce.CardDescription=hi,Ce.CardFooter=kr,Ce.CardHeader=Ao,Ce.CardTitle=jo,Ce.Carousel=LN,Ce.ChargeWalletForm=PL,Ce.CheckEmail=IL,Ce.Checkbox=Dm,Ce.CheckoutForm=NL,Ce.CodeConfirmation=jL,Ce.Command=Af,Ce.CommandDialog=DR,Ce.CommandEmpty=Gm,Ce.CommandGroup=zm,Ce.CommandInput=Hm,Ce.CommandItem=Um,Ce.CommandList=GE,Ce.CommandSeparator=zE,Ce.CommandShortcut=UE,Ce.ComparingPlans=ML,Ce.ConfirmationPage=OL,Ce.CreditCardForm=kL,Ce.DataTable=sM,Ce.Dialog=qw,Ce.DialogContent=Sm,Ce.DialogDescription=aE,Ce.DialogFooter=rE,Ce.DialogHeader=nE,Ce.DialogTitle=oE,Ce.DialogTrigger=zO,Ce.DragDropImages=rI,Ce.DraggableCard=oI,Ce.DropdownMenu=pi,Ce.EmptyState=ZL,Ce.FeedbackByEmoji=EI,Ce.FeedbackRating=uI,Ce.FloatingComment=TI,Ce.FloatingCommentExec=wN,Ce.FloatingCommentSlate=pN,Ce.Footer=tL,Ce.HawaAccordion=D7,Ce.HawaAdCard=AN,Ce.HawaAlert=ro,Ce.HawaAppLayout=UM,Ce.HawaAppLayoutSimplified=ZM,Ce.HawaBanner=nL,Ce.HawaBottomAppBar=cM,Ce.HawaButton=BN,Ce.HawaCheckbox=P4,Ce.HawaChip=Uc,Ce.HawaCodeBlock=oj,Ce.HawaColorPicker=z0,Ce.HawaContainer=JM,Ce.HawaCopyrights=T7,Ce.HawaDatepicker=aj,Ce.HawaGrid=KM,Ce.HawaIconCount=N4,Ce.HawaInlineCode=SN,Ce.HawaItemCard=FN,Ce.HawaLandingCard=jN,Ce.HawaLoading=ws,Ce.HawaMenu=Rd,Ce.HawaModal=I7,Ce.HawaPanelTabs=B4,Ce.HawaPhoneInput=$d,Ce.HawaPinInput=sm,Ce.HawaPricingCard=qC,Ce.HawaRadio=Sr,Ce.HawaRange=U0,Ce.HawaSearchBar=S7,Ce.HawaSelect=uu,Ce.HawaSettingsRow=jF,Ce.HawaSiteLayout=dM,Ce.HawaStats=P7,Ce.HawaStepper=k7,Ce.HawaStoreButtons=NN,Ce.HawaTable=ty,Ce.HawaTabs=j7,Ce.HawaTextField=Ot,Ce.HawaTypography=IF,Ce.HorizontalPricing=LL,Ce.Icons=Zn,Ce.Input=Ls,Ce.InterfaceSettings=lm,Ce.InvoiceAccordion=lI,Ce.Label=Ea,Ce.LeadGenerator=YL,Ce.NewPasswordForm=FL,Ce.NoPermission=KL,Ce.NotFound=UL,Ce.PayWithWallet=BL,Ce.Popover=hh,Ce.PopoverContent=ph,Ce.PricingPlans=$L,Ce.ReferralAccount=HL,Ce.ReferralSettlement=GL,Ce.ReferralStats=zL,Ce.ResetPasswordForm=AL,Ce.SearchableSelect=FR,Ce.SelectPayment=TL,Ce.Separator=yw,Ce.SidebarGroup=S3,Ce.SidebarItem=D3,Ce.SignInBlock=SL,Ce.SignInForm=EL,Ce.SignInPhone=wL,Ce.SignUpForm=DL,Ce.Skeleton=Go,Ce.SortButton=lM,Ce.StickyFeatures=$N,Ce.SubsectionList=aI,Ce.Switch=Ep,Ce.Table=Zm,Ce.TableBody=Jm,Ce.TableCaption=XE,Ce.TableCell=jf,Ce.TableFooter=ZE,Ce.TableHead=Ym,Ce.TableHeader=Xm,Ce.TableRow=Lu,Ce.TableTest=e$,Ce.Tabs=gw,Ce.TabsContent=mw,Ce.TabsList=pw,Ce.TabsTrigger=hw,Ce.Test=r4,Ce.Testimonial=XL,Ce.Textarea=zd,Ce.Timeline=DN,Ce.Toast=mm,Ce.ToastAction=Mw,Ce.ToastClose=vm,Ce.ToastDescription=xm,Ce.ToastProvider=Rw,Ce.ToastTitle=bm,Ce.ToastViewport=hm,Ce.Toaster=SO,Ce.Tooltip=Is,Ce.UsageCard=sI,Ce.UserProfileForm=xL,Ce.UserReferralSource=RN,Ce.UserSettingsForm=yL,Ce.buttonVariants=$b,Ce.reducer=_w,Ce.toast=Vw,Ce.useClipboard=ly,Ce.useFocusWithin=qL,Ce.useMediaQuery=n_,Ce.useTabs=r_,Ce.useToast=Ww,Ce.useWindowEvent=Bv,Ce.useWindowScroll=a_,Object.defineProperty(Ce,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.2.32-beta",
3
+ "version": "0.2.33-beta",
4
4
  "description": "Modern UI Kit made with Tailwind & Radix Primitives",
5
5
  "license": "MIT",
6
6
  "author": {