@6thbridge/hexa 0.0.65 → 0.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
- var Tr=Object.defineProperty;var Sr=(e,t,o)=>t in e?Tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Ht=(e,t,o)=>Sr(e,typeof t!="symbol"?t+"":t,o);import*as Wt from"react";import*as H from"@radix-ui/react-tooltip";import{clsx as Fr}from"clsx";import{twMerge as Er}from"tailwind-merge";function n(...e){return Er(Fr(e))}import{jsx as Ne,jsxs as _t}from"react/jsx-runtime";var zt=H.Provider,$t=H.Root,Zt=H.Trigger,pt=Wt.forwardRef(({className:e,sideOffset:t=2,...o},r)=>Ne(H.Content,{ref:r,sideOffset:t,className:n("z-50 rounded-md border border-transparent bg-gray-50 px-3 py-1.5 text-base font-semibold text-bold text-black/40 shadow-xl- animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 [box-shadow:3px_4px_11px_0px_#0000001A,13px_16px_21px_0px_#00000017,29px_36px_28px_0px_#0000000D,52px_65px_33px_0px_#00000003,82px_101px_36px_0px_#00000000]",e),...o,children:o.children}));pt.displayName=H.Content.displayName;var Ue=({trigger:e,children:t,contentClassName:o,triggerClassName:r,asChild:a=!0,side:i,sideOffset:s,align:l,alignOffset:m,delayDuration:c=100,hasArrow:d=!0,arrowClassName:u,...f})=>Ne(zt,{children:Ne($t,{delayDuration:c,...f,children:_t("div",{className:"flex justify-center items-center",children:[Ne(Zt,{asChild:a,className:r,children:e}),_t(pt,{side:i,sideOffset:s,align:l,alignOffset:m,className:o,children:[t,d&&Ne(H.Arrow,{className:n("fill-white",u)})]})]})})});Ue.displayName="Tooltip";import Br from"react";import*as Kt from"react";import*as mt from"@radix-ui/react-label";import{cva as Ir}from"class-variance-authority";import{jsx as Mr}from"react/jsx-runtime";var Ar=Ir("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ut=Kt.forwardRef(({className:e,...t},o)=>Mr(mt.Root,{ref:o,className:n(Ar(),e),...t}));ut.displayName=mt.Root.displayName;import{jsx as Ut,jsxs as Vr}from"react/jsx-runtime";var R=Br.forwardRef(({className:e,children:t,showAsterisk:o,error:r,...a},i)=>Ut(ut,{ref:i,className:n(r&&"text-red-500",e),...a,children:o?Vr("p",{children:[t,Ut("span",{className:"text-red-500",children:"*"})]}):t}));R.displayName="FormLabel";import{jsx as Xt,jsxs as Or}from"react/jsx-runtime";var Pe=({size:e=16,colour:t="primary"})=>Or("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[Xt("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),Xt("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:t==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as Xe from"react";import{Slot as Gr}from"@radix-ui/react-slot";import{cva as Hr}from"class-variance-authority";import{Fragment as Yt,jsx as Re,jsxs as _r}from"react/jsx-runtime";var A=Hr("overflow-hidden isolate inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",danger:"border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60","danger-outlined":"border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","dark-text":"border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",light:"border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] leading-[1rem] font-normal text-sm rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),ue=Xe.forwardRef(({className:e,variant:t="primary",size:o,asChild:r=!1,isLoading:a=!1,leftNode:i,rightNode:s,LoaderSize:l,...m},c)=>{let d=r?Gr:"button",{children:u,disabled:f,...h}=m,C=Xe.useRef(null);return Re(d,{className:n(A({variant:t,size:o,className:e})),ref:C||c,disabled:f||a,...h,children:Re("div",{className:"flex font-medium justify-center items-center gap-2",children:a?Re(Yt,{children:Re("span",{className:"mx-auto",children:Re(Pe,{size:l,colour:"secondary"})})}):_r(Yt,{children:[i,u,s]})})})});ue.displayName="Button";import*as ft from"react";import{cva as gt}from"class-variance-authority";import Wr from"react";import{jsx as zr}from"react/jsx-runtime";var _=Wr.forwardRef(({className:e,children:t,error:o,...r},a)=>{let i=o??t;return i?zr("p",{ref:a,className:n("text-xs font-normal text-[#F04248]",e),...r,children:i}):null});_.displayName="ErrorMessage";import $r from"react";import{jsx as Zr}from"react/jsx-runtime";var W=$r.forwardRef(({className:e,...t},o)=>Zr("div",{ref:o,className:n("text-sm text-[#8E98A8",e),...t}));W.displayName="FormDescription";import{jsx as ce,jsxs as Jt}from"react/jsx-runtime";var Kr=gt("!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",error:"placeholder:text-red-500 text-red-500",loading:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",prefilled:"",neutral:""}},defaultVariants:{status:"default"}}),qt=ft.forwardRef(({className:e,status:t,type:o,...r},a)=>ce("input",{type:o,className:n(Kr({status:t}),e),ref:a,...r}));qt.displayName="BaseInnerInput";var z=gt("flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-text-primary focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),jt=gt("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-transparent border-0 caret-[#DEDEDE] !px-0"}},defaultVariants:{status:"default",side:"left"}}),M=ft.forwardRef(({className:e,status:t="default",disabled:o,error:r,isLoading:a,sideNodeClassName:i,showAsterisk:s,label:l,description:m,...c},d)=>{let u=t;return r&&(u="error"),a&&(u="loading"),o&&(u="prefilled"),Jt("div",{className:"relative space-y-1 w-full",children:[l&&ce(R,{showAsterisk:s,error:r,children:l}),Jt("div",{className:n(z({status:u}),c.leftNode?"pl-0":"",c.rightNode?"pr-0":"",e),children:[c.leftNode?ce("div",{className:n(jt({status:u,side:"left"}),i),children:c.leftNode}):null,ce(qt,{ref:d,disabled:a||o,className:n({"!pl-3":c.leftNode&&t!=="neutral","!pr-3":c.rightNode&&t!=="neutral"}),...c}),c.rightNode?ce("div",{className:n(jt({status:u,side:"right"}),i),children:c.rightNode}):null]}),m&&ce(W,{className:"text-gray-400 text-sm !font-normal",children:m}),ce(_,{error:r})]})});M.displayName="Input";import{useMemo as Yr,useState as so}from"react";import{jsx as Qt,jsxs as Ur}from"react/jsx-runtime";var eo=()=>Ur("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Qt("path",{d:"M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Qt("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as to,jsxs as Xr}from"react/jsx-runtime";var oo=()=>Xr("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[to("path",{d:"M4.08759 12.69C3.26171 11.9072 2.61006 10.9591 2.17509 9.90752C2.10081 9.73454 2.0625 9.54826 2.0625 9.36001C2.0625 9.17177 2.10081 8.98549 2.17509 8.81252C2.75274 7.4073 3.72095 6.19704 4.96509 5.32502C6.14597 4.4998 7.55989 4.07405 9.00009 4.11002C10.0363 4.084 11.064 4.30239 12.0001 4.74752M13.9201 6.03752C14.7415 6.81964 15.3904 7.76486 15.8251 8.81252C15.8994 8.98549 15.9377 9.17177 15.9377 9.36001C15.9377 9.54826 15.8994 9.73454 15.8251 9.90752C15.2474 11.3127 14.2792 12.523 13.0351 13.395C11.8542 14.2202 10.4403 14.646 9.00009 14.61C7.9639 14.636 6.93616 14.4176 6.00009 13.9725",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),to("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as ro}from"react/jsx-runtime";var ao=()=>ro("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ro("path",{d:"M8.89802 2.93408L9.70202 3.49808L6.21602 8.52608H5.41202L3.46802 5.80208L4.27202 5.05208L5.81402 6.49208L8.89802 2.93408Z",fill:"currentColor"})});import{jsx as no}from"react/jsx-runtime";var io=()=>no("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:no("path",{d:"M3.37891 8.62142L6.00041 5.99992L8.62191 8.62142M8.62191 3.37842L5.99991 5.99992L3.37891 3.37842",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});import{jsx as X,jsxs as jr}from"react/jsx-runtime";var lo=[{label:"Uppercase",key:"uppercase",RegExp:/[A-Z]/,validated:!1},{label:"Lowercase",key:"lowercase",RegExp:/[a-z]/,validated:!1},{label:"Number",key:"number",RegExp:/\d/,validated:!1},{label:"8 Characters",key:"eight-chars",RegExp:/.{8}/,validated:!1}],co=({onValidate:e,onChange:t,disableValidation:o,...r})=>{let[a,i]=so(!1),[s,l]=so(lo),m=f=>lo.map(h=>({...h,validated:h.RegExp.test(f)})),c=f=>{let h=m(f),C=h.every(p=>p.validated);return l(h),C},d=f=>{if(t&&t(f),o)return;let h=f?.target?.value,C=c(h);e&&e(C,h)},u=Yr(()=>X("div",{className:"flex items-center gap-2",children:s?.map(f=>jr("div",{className:n("text-xs flex items-center gap-0.5",{"text-[#62C554]":f?.validated,"text-[#8E98A8]":!f?.validated}),children:[X("span",{className:"",children:f?.validated?X(ao,{}):X(io,{})}),X("span",{className:"",children:f?.label})]},f?.key))}),[s]);return X(M,{sideNodeClassName:"!border-l-0",rightNode:a?X("button",{type:"button",onClick:()=>i(f=>!f),children:X(eo,{})}):X("button",{type:"button",onClick:()=>i(f=>!f),children:X(oo,{})}),type:a?"text":"password",onChange:d,description:!o&&u,...r})};co.displayName="PasswordInput";import{cva as Jr}from"class-variance-authority";import{jsx as Ye,jsxs as qr}from"react/jsx-runtime";var Ns=Jr("flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",loading:"placeholder:text-[#C4C4C4]",prefilled:"resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:""}},defaultVariants:{status:"default"}}),po=({className:e,status:t="default",disabled:o,error:r,isLoading:a,showAsterisk:i,label:s,description:l,...m})=>{let c=t;return r&&(c="error"),a&&(c="loading"),o&&(c="prefilled"),qr("div",{className:"relative space-y-1",children:[Ye(R,{showAsterisk:i,error:r,children:s}),Ye("textarea",{className:n("min-h-[80px]",z({status:c}),e),disabled:a||o,...m}),Ye(W,{className:"text-gray-400 text-sm !font-normal",children:l}),Ye(_,{error:r})]})};po.displayName="Textarea";import*as de from"react";import*as re from"react";import{Command as S}from"cmdk";import{Search as ra}from"lucide-react";import*as Le from"react";import*as b from"@radix-ui/react-dialog";import{jsx as mo,jsxs as Qr}from"react/jsx-runtime";var uo=()=>Qr("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:"lucide lucide-x",children:[mo("path",{d:"M18 6 6 18"}),mo("path",{d:"m6 6 12 12"})]});import{Fragment as oa,jsx as T,jsxs as fe}from"react/jsx-runtime";var ea=b.Root,ta=b.Trigger,fo=b.Portal,go=Le.forwardRef(({className:e,...t},o)=>T(b.Overlay,{ref:o,className:n("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));go.displayName=b.Overlay.displayName;var ht=Le.forwardRef(({className:e,hideCloseButton:t,children:o,...r},a)=>fe(fo,{children:[T(go,{}),fe(b.Content,{ref:a,className:n("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white 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%] rounded-lg max-h-[95%] overflow-y-auto",e),...r,children:[o,!t&&fe(b.Close,{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:[T(uo,{}),T("span",{className:"sr-only",children:"Close"})]})]})]}));ht.displayName=b.Content.displayName;var ho=({className:e,...t})=>T("div",{className:n("flex flex-col space-y-1.5 text-left",e),...t});ho.displayName="DialogHeader";var yo=({className:e,...t})=>T("div",{className:n("flex flex-row justify-end sm:space-x-2",e),...t});yo.displayName="DialogFooter";var vo=Le.forwardRef(({className:e,...t},o)=>T(b.Title,{ref:o,className:n("text-xl font-semibold leading-none tracking-tight",e),...t}));vo.displayName=b.Title.displayName;var Co=Le.forwardRef(({className:e,...t},o)=>T(b.Description,{ref:o,className:n("text-sm text-gray-500",e),...t}));Co.displayName=b.Description.displayName;var yt=({trigger:e=void 0,children:t,open:o,onOpenChange:r,hideCloseButton:a,footer:i,title:s,description:l,contentClassName:m,headerClassName:c,titleClassName:d,descriptionClassName:u,footerClassName:f,asChild:h=!0,onOpenAutoFocus:C,onCloseAutoFocus:p,onEscapeKeyDown:y,onInteractOutside:g,onPointerDownOutside:x,...P})=>fe(ea,{...P,open:o,onOpenChange:r,children:[T(ta,{asChild:h,children:e}),T(fo,{children:fe(ht,{className:m,hideCloseButton:a,onOpenAutoFocus:C,onCloseAutoFocus:p,onEscapeKeyDown:y,onPointerDownOutside:x,onInteractOutside:g,children:[s||l?fe(ho,{className:c,children:[s&&T(vo,{className:d,children:s}),l&&T(Co,{className:u,children:l})]}):T(oa,{}),t,i&&T(yo,{className:f,children:i})]})})]});yt.displayName=b.Dialog.displayName;import{Fragment as Os,jsx as Y,jsxs as ia}from"react/jsx-runtime";var De=re.forwardRef(({className:e,...t},o)=>Y(S,{ref:o,className:n("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));De.displayName=S.displayName;var ke=re.forwardRef(({className:e,CommandInputContainerClassName:t,loading:o,...r},a)=>ia("div",{className:n("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[o?Y(Pe,{size:16,colour:"secondary"}):Y(ra,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),Y(S.Input,{ref:a,className:n("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:o,...r})]}));ke.displayName=S.Input.displayName;var Te=re.forwardRef(({className:e,...t},o)=>Y(S.List,{ref:o,className:n("overflow-y-auto overflow-x-hidden",e),...t}));Te.displayName=S.List.displayName;var Se=re.forwardRef((e,t)=>Y(S.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Se.displayName=S.Empty.displayName;var Fe=re.forwardRef(({className:e,...t},o)=>Y(S.Group,{ref:o,className:n("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}));Fe.displayName=S.Group.displayName;var aa=re.forwardRef(({className:e,...t},o)=>Y(S.Separator,{ref:o,className:n("-mx-1 h-px bg-border",e),...t}));aa.displayName=S.Separator.displayName;var Ee=re.forwardRef(({className:e,...t},o)=>Y(S.Item,{ref:o,className:n("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Ee.displayName=S.Item.displayName;var na=({className:e,...t})=>Y("span",{className:n("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});na.displayName="CommandShortcut";import*as bo from"react";import*as $ from"@radix-ui/react-popover";import{jsx as Ie,jsxs as sa}from"react/jsx-runtime";var j=$.Root,B=$.Trigger,Z=bo.forwardRef(({className:e,align:t="center",sideOffset:o=4,portal:r=!0,...a},i)=>r?Ie($.Portal,{children:Ie($.Content,{ref:i,align:t,sideOffset:o,className:n("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a})}):Ie($.Content,{ref:i,align:t,sideOffset:o,className:n("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a}));Z.displayName=$.Content.displayName;var ae=({trigger:e,children:t,open:o,onOpenChange:r,contentClassName:a,asChild:i=!0,align:s,side:l,alignOffset:m,triggerClassName:c,sideOffset:d,onOpenAutoFocus:u,onCloseAutoFocus:f,portal:h=!0,id:C="popover",...p})=>sa(j,{...p,open:o,onOpenChange:r,children:[Ie(B,{asChild:i,className:c,id:`${C}-trigger`,children:e}),Ie(Z,{alignOffset:m,sideOffset:d,side:l,align:s,className:a,onOpenAutoFocus:u,onCloseAutoFocus:f,portal:h,id:`${C}-content`,children:t})]});ae.displayName=$.Root.displayName;import*as vt from"react";import*as V from"@radix-ui/react-scroll-area";import{jsx as Ae,jsxs as la}from"react/jsx-runtime";var ge=vt.forwardRef(({className:e,viewPortClassName:t,children:o,...r},a)=>la(V.Root,{ref:a,className:n("relative overflow-hidden",e),...r,children:[Ae(V.Viewport,{className:n("h-full w-full rounded-[inherit]",t),children:o}),Ae(xo,{}),Ae(V.Corner,{})]}));ge.displayName=V.Root.displayName;var xo=vt.forwardRef(({className:e,orientation:t="vertical",...o},r)=>Ae(V.ScrollAreaScrollbar,{ref:r,orientation:t,className:n("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:Ae(V.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));xo.displayName=V.ScrollAreaScrollbar.displayName;import{jsx as J,jsxs as je}from"react/jsx-runtime";var wo=({className:e,value:t,placeholder:o="",status:r,disabled:a,id:i})=>J(B,{asChild:!0,disabled:a,id:i??"searchable-trigger",children:je("button",{disabled:a,className:n(z({status:r}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t??o??"Select options...",J("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:J("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),Je=({options:e=[],value:t,onChange:o,containerClassName:r,placeholder:a,disabled:i,loading:s,optionComponent:l,children:m,modal:c=!1,hideSearch:d,className:u,inputValue:f,onValueChange:h,onInputValueChange:C})=>{let[p,y]=de.useState(!1),g=de.useRef(null),[x,P]=de.useState(void 0);return de.useLayoutEffect(()=>{g.current&&P(g.current.clientWidth)},[g.current]),je(j,{modal:c,open:p,onOpenChange:y,children:[J("div",{className:n("w-full",u),ref:g,children:m}),J(Z,{portal:!c,className:"p-0 min-w-[200px]",style:{width:x},children:je(De,{className:n("relative max-h-[270px]",{"mt-2":!d}),children:[!d&&J(ke,{loading:s,placeholder:a??"Search options...",onValueChange:C,value:f,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),J(ge,{viewPortClassName:"max-h-[225px]",className:n("w-full px-0 h-full overflow-y-auto",r),children:je(Te,{children:[!d&&J(Se,{children:"No result found."}),J(Fe,{className:"w-full",children:e?.map(U=>J(Ee,{defaultValue:t?.label,value:U.label,disabled:i,onSelect:()=>{o(U),y(!1),h?.(U?.value)},id:U.value,children:l?l(U):U.label},U.value))})]})})]})})]})};var Ct=[{countryCode:"GLOBAL",countryName:"Global",currency:"Dollars",currencyCode:"USD",internetCountryCode:"GLOBAL"},{countryName:"Benin",countryCode:"+229",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BJ"},{countryName:"Burkina Faso",countryCode:"+226",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BF"},{countryName:"Cameroon",countryCode:"+237",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CM"},{countryName:"Chad",countryCode:"+235",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"TD"},{countryName:"DR Congo",countryCode:"+243",currency:"Congolese franc",currencyCode:"CDF",currencyIcon:"FC",internetCountryCode:"CD"},{countryName:"Eswatini",countryCode:"+268",currency:"Swazi lilangeni",currencyCode:"SZL",currencyIcon:"L",internetCountryCode:"SZ"},{countryName:"Gabon",countryCode:"+241",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"GA"},{countryName:"Ghana",countryCode:"+233",currency:"Ghanaian cedi",currencyCode:"GHS",currencyIcon:"\u20B5",internetCountryCode:"GH"},{countryName:"Guinea",countryCode:"+224",currency:"Guinean franc",currencyCode:"GNF",currencyIcon:"Fr",internetCountryCode:"GN"},{countryName:"Ivory Coast",countryCode:"+225",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"CI"},{countryName:"Kenya",countryCode:"+254",currency:"Kenyan shilling",currencyCode:"KES",currencyIcon:"Sh",internetCountryCode:"KE"},{countryName:"Lesotho",countryCode:"+266",currency:"Lesotho loti",currencyCode:"LSL",currencyIcon:"L",internetCountryCode:"LS"},{countryName:"Liberia",countryCode:"+231",currency:"Liberian dollar",currencyCode:"LRD",currencyIcon:"$",internetCountryCode:"LR"},{countryName:"Madagascar",countryCode:"+261",currency:"Malagasy ariary",currencyCode:"MGA",currencyIcon:"Ar",internetCountryCode:"MG"},{countryName:"Malawi",countryCode:"+265",currency:"Malawian kwacha",currencyCode:"MWK",currencyIcon:"MK",internetCountryCode:"MW"},{countryName:"Mali",countryCode:"+223",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"ML"},{countryName:"Mozambique",countryCode:"+258",currency:"Mozambican metical",currencyCode:"MZN",currencyIcon:"MT",internetCountryCode:"MZ"},{countryName:"Namibia",countryCode:"+264",currency:"Namibian dollar",currencyCode:"NAD",currencyIcon:"$",internetCountryCode:"NA"},{countryName:"Niger",countryCode:"+227",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"NE"},{countryName:"Nigeria",countryCode:"+234",currency:"Nigerian naira",currencyCode:"NGN",currencyIcon:"\u20A6",internetCountryCode:"NG"},{countryName:"Republic of the Congo",countryCode:"+242",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CG"},{countryName:"Rwanda",countryCode:"+250",currency:"Rwandan franc",currencyCode:"RWF",currencyIcon:"Fr",internetCountryCode:"RW"},{countryName:"Senegal",countryCode:"+221",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"SN"},{countryName:"Seychelles",countryCode:"+248",currency:"Seychellois rupee",currencyCode:"SCR",currencyIcon:"\u20A8",internetCountryCode:"SC"},{countryName:"South Africa",countryCode:"+27",currency:"South African rand",currencyCode:"ZAR",currencyIcon:"R",internetCountryCode:"ZA"},{countryName:"South Sudan",countryCode:"+211",currency:"South Sudanese pound",currencyCode:"SSP",currencyIcon:"\xA3",internetCountryCode:"SS"},{countryName:"Tanzania",countryCode:"+255",currency:"Tanzanian shilling",currencyCode:"TZS",currencyIcon:"Sh",internetCountryCode:"TZ"},{countryName:"Togo",countryCode:"+228",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"TG"},{countryName:"Uganda",countryCode:"+256",currency:"Ugandan shilling",currencyCode:"UGX",currencyIcon:"Sh",internetCountryCode:"UG"},{countryName:"Zambia",countryCode:"+260",currency:"Zambian kwacha",currencyCode:"ZMW",currencyIcon:"ZK",internetCountryCode:"ZM"}],No=()=>{let e={};return Ct?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};import*as Ve from"react";import*as qe from"react-phone-number-input";import pa from"react-phone-number-input/flags";import{jsx as Me,jsxs as da}from"react/jsx-runtime";var ca=e=>da("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[Me("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",Me("path",{d:"M3 10L7 8L10 9L13 8L16 10L19 9L22 11L25 10L28 12V15L26 17L28 19L27 22L29 24L27 26L24 25L21 26L18 24L15 25L12 23L9 24L6 22L4 23L2 21V18L4 16L3 13L5 11L3 10Z",fill:"#34D399"}),Me("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),Me("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),Me("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Po=ca;import{jsx as v,jsxs as Be}from"react/jsx-runtime";var Ro=Ve.forwardRef(({className:e,onChange:t,defaultCountry:o="NG",modal:r,showAsterisk:a,label:i,description:s,error:l,...m},c)=>{let d=u=>v(ma,{...u,status:m.status,modal:r});return Be("div",{className:"relative space-y-1",children:[v(R,{showAsterisk:a,error:l,children:i}),v(qe.default,{ref:c,className:n("flex",e),flagComponent:ne,countrySelectComponent:d,inputComponent:Lo,defaultCountry:o,onChange:u=>{t&&t?.(u)},...m}),v(W,{className:"text-gray-400 text-sm !font-normal",children:s}),v(_,{error:l})]})});Ro.displayName="PhoneInput";var Lo=Ve.forwardRef(({className:e,...t},o)=>v(M,{className:n("!rounded-s-none h-10",e),...t,ref:o}));Lo.displayName="InputComponent";var ma=({disabled:e,value:t,onChange:o,options:r,status:a,modal:i})=>{let s=Ve.useCallback(l=>{o(l)},[o]);return Be(j,{modal:i,children:[v(B,{disabled:e,children:Be("div",{className:n(z({status:a}),"transition justify-center items-center disabled:text-base-500 flex gap-3 h-10 rounded-e-none border-e-0 pl-2 pr-2"),children:[v(ne,{country:t,countryName:t}),v("svg",{className:n("mr-0.5 h-4 w-4 opacity-50",e?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:v("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),v(Z,{portal:!i,className:"w-[200px] md:w-[300px] p-0",children:v(De,{children:v(Te,{children:Be(ge,{className:"h-72",children:[v(ke,{placeholder:"Search country..."}),v(Se,{children:"No country found."}),v(Fe,{children:r.filter(l=>l.value).map(l=>Be(Ee,{className:"gap-2",onSelect:()=>s(l.value),children:[v(ne,{country:l.value,countryName:l.label}),v("span",{className:"flex-1 text-sm",children:l.label}),l.value&&v("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${qe.getCountryCallingCode(l.value)}`}),v("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:n("ml-auto",l.value===t?"opacity-100":"opacity-0"),children:v("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${l.value}-${l.label}`))})]})})})})]})},ne=({country:e,countryName:t,className:o})=>{let r=pa[e];return e==="GLOBAL"?v("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:v(Po,{className:"w-full h-[90%]"})}):v("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:r&&v(r,{title:t})})};ne.displayName="FlagComponent";import{jsx as K,jsxs as Oe}from"react/jsx-runtime";var ua=No(),fa=({className:e,value:t,placeholder:o="",status:r,disabled:a})=>K(B,{asChild:!0,disabled:a,children:Oe("button",{disabled:a,className:n(z({status:r}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?Oe("div",{className:"flex gap-2 items-center",children:[K(ne,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),Oe("span",{className:"",children:[" ",ua[t]]})]}):o??"Select options...",K("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:K("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),ga=({hideSearch:e=!0,showAsterisk:t,label:o,description:r,error:a,...i})=>{let s=Ct?.map(l=>({value:l?.internetCountryCode,label:l?.countryName,...l}));return Oe("div",{className:"relative space-y-1",children:[K(R,{showAsterisk:t,error:a,children:o}),K(Je,{options:s,hideSearch:e,optionComponent:l=>Oe("div",{className:"w-full flex items-center gap-2",children:[K(ne,{country:l?.internetCountryCode,countryName:l?.label,className:"ml-2 !w-6 !h-5"}),K("span",{className:"flex-1 text-sm",children:l?.label})]}),...i,children:K(fa,{value:i?.value?.value,status:i?.status,placeholder:i?.placeholder??" Select Country"})}),K(W,{className:"text-gray-400 text-sm !font-normal",children:r}),K(_,{error:a})]})};import{jsx as Ge,jsxs as ha}from"react/jsx-runtime";var He=({showAsterisk:e,label:t,description:o,error:r,hideSearch:a=!0,status:i,...s})=>ha("div",{className:"relative space-y-1",children:[Ge(R,{showAsterisk:e,error:r,children:t}),Ge(Je,{hideSearch:a,...s,containerClassName:"h-full",children:Ge(wo,{disabled:s?.disabled,placeholder:s?.placeholder??"Select",status:i,value:s?.value?.label??s?.value?.value,className:s?.className,id:s?.id})}),Ge(W,{className:"text-gray-400 text-sm !font-normal",children:o}),Ge(_,{error:r})]});import ya from"react-otp-input";import{cva as va}from"class-variance-authority";import{useMemo as Ca}from"react";import{jsx as Do}from"react/jsx-runtime";var ba=va("transition cursor-default placeholder:text-black dark:placeholder:text-white rounded-lg !h-14 !w-14 border aspect-square text-base font-semibold tracking-normal outline-none placeholder:text-sm placeholder:font-normal text-black focus:bg-white",{variants:{status:{default:"border-gray-300 dark:border-[#d4d4d4] focus:border-gray-400 focus-visible:!ring-offset-gray-200 focus:ring-offset-gray-200 !ring-gray-200 !focus-visible:ring-1 bg-white dark:!bg-transparent dark:focus-visible:!ring-0 dark:focus-within:!bg-transparent dark:text-white dark:focus-within:border-[#9299A2] dark:border-[#676767] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-600 bg-red-50 border-red-600 text-red-600 focus-within:bg-red-50 focus-within:border-red-600",loading:"placeholder:text-[#C4C4C4]"}},defaultVariants:{status:"default"}}),xa=({numInputs:e=4,inputStyle:t,containerStyle:o,placeholder:r="-",status:a,...i})=>{let s=Ca(()=>r||new Array(e).fill("").reduce((c,d)=>c+=d,""),[e,r]);return Do(ya,{numInputs:e,placeholder:s,containerStyle:n("w-full",o),inputStyle:n(ba({status:a}),t),renderInput:l=>Do("input",{...l}),...i})};import{useState as wa,useEffect as Na}from"react";import{jsx as w,jsxs as pe}from"react/jsx-runtime";var Pa=({type:e})=>e==="gray"?w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M10 0C4.49 0 0 4.49 0 10C0 15.51 4.49 20 10 20C15.51 20 20 15.51 20 10C20 4.49 15.51 0 10 0ZM14.78 7.7L9.11 13.37C8.97 13.51 8.78 13.59 8.58 13.59C8.38 13.59 8.19 13.51 8.05 13.37L5.22 10.54C4.93 10.25 4.93 9.77 5.22 9.48C5.51 9.19 5.99 9.19 6.28 9.48L8.58 11.78L13.72 6.64C14.01 6.35 14.49 6.35 14.78 6.64C15.07 6.93 15.07 7.4 14.78 7.7Z",fill:"#79818C"})}):e==="info"?w("svg",{stroke:"#70B6F6",fill:"#70B6F6","stroke-width":"0",viewBox:"0 0 16 16",height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"})}):e==="warning"?w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#FFC700"})}):e==="success"?w("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2ZM16.78 9.7L11.11 15.37C10.97 15.51 10.78 15.59 10.58 15.59C10.38 15.59 10.19 15.51 10.05 15.37L7.22 12.54C6.93 12.25 6.93 11.77 7.22 11.48C7.51 11.19 7.99 11.19 8.28 11.48L10.58 13.78L15.72 8.64C16.01 8.35 16.49 8.35 16.78 8.64C17.07 8.93 17.07 9.4 16.78 9.7Z",fill:"#00D488"})}):w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#F04248"})}),Ra=({type:e="info",title:t,description:o,open:r,showCloseButton:a,bottomNode:i,sideNode:s,onClose:l,showIcon:m=!0})=>{let[c,d]=wa(r);Na(()=>{d(r)},[r]);let u="",f="";switch(e){case"gray":u="#eeeef0",f="#79818c";break;case"info":u="#ebf5fd",f="#70B6F6";break;case"warning":u="#fff8df",f="#ffc700";break;case"success":u="#e0f9f0",f="#49e0aa";break;case"danger":u="#fde8e9",f="#f3777c";break;default:u="#eeeef0",f="#79818c";break}function h(){d(!1),l&&l()}return c?pe("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:u||"#ebf5fd"},children:[w("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:f||"#70B6F6"}}),pe("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[pe("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[m&&w("div",{className:"h-full flex justify-end",children:w(Pa,{type:e})}),pe("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[pe("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||o)&&pe("div",{children:[t&&w("div",{className:"text-sm font-bold text-[#191919]",children:t}),o&&w("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:o})]}),i]}),s]})]}),a&&w("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:w("button",{onClick:h,children:pe("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),w("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};import{useState as Da}from"react";import{Copy as ka,CheckIcon as Ta}from"lucide-react";import{motion as Sa,AnimatePresence as Fa}from"framer-motion";import{jsx as La}from"react/jsx-runtime";var he=({children:e,mode:t="truncate",className:o,as:r="div",...a})=>La(r,{className:n({"text-ellipsis overflow-hidden whitespace-nowrap":t==="truncate","whitespace-normal break-words":t==="wrap","":t==="overflow"},o),target:a?.href?"_blank":void 0,...a,children:e});import{jsx as ye,jsxs as Ia}from"react/jsx-runtime";var Ea=({text:e,textToCopy:t,onCopy:o,iconsPosition:r="right",clampText:a=!0,clampMode:i="truncate",isLink:s=!1,textClassName:l})=>{let[m,c]=Da(!1),d=()=>{navigator.clipboard.writeText(t??e).then(()=>{c(!0),o?.(),setTimeout(()=>c(!1),2e3)})},u=m?Ta:ka;return Ia("div",{className:"flex items-center space-x-2 cursor-pointer text-[#717171] bg-gray-100 w-fit max-w-full rounded-md p-1 px-2",children:[r==="left"&&ye(ko,{Icon:u,onClick:d,copied:m}),ye(he,{as:s?"a":"span",mode:a?i:"overflow",className:n({underline:s},l),href:s?e:void 0,children:e}),r==="right"&&ye(ko,{Icon:u,onClick:d,copied:m})]})},ko=({Icon:e,onClick:t,copied:o})=>ye(Fa,{mode:"wait",children:ye(Sa.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:ye(e,{className:`w-5 h-5 ${o?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},o?"check":"copy")});import{useEffect as To,useState as Aa}from"react";import{Search as Ma}from"lucide-react";import{jsx as So}from"react/jsx-runtime";var bt=({value:e,onChange:t,debounce:o=500,addon:r,...a})=>{let[i,s]=Aa(e??""),l=m=>s(m.target.value);return To(()=>{e&&s(e)},[e]),To(()=>{let m=setTimeout(()=>{t(i)},o);return()=>clearTimeout(m)},[i,o,t]),So(M,{leftNode:r??So(Ma,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...a,className:n("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",a?.className),onChange:l,value:i})};import{useEffect as Fo}from"react";import{X as Ba}from"lucide-react";import{jsx as q,jsxs as ve}from"react/jsx-runtime";var Va=e=>{let{environment:t,branch:o,version:r,deployTime:a,showBanner:i,onClose:s,initDefault:l,removeFromStorage:m,syncLocalStorageToState:c}=e,d=t||process.env.NEXT_PUBLIC_NODE_ENV;return d!=="staging"&&d!=="sandbox"||(Fo(()=>{c()},[c]),Fo(()=>{let u;return(d==="staging"||d==="sandbox")&&(u=setInterval(()=>{m(),l()},5*60*1e3)),()=>{u&&clearInterval(u)}},[i,t,s,m,l,d]),!i)?null:ve("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[q("button",{onClick:s,className:"absolute top-2 right-2",children:q(Ba,{})}),ve("div",{className:"space-y-2 text-sm",children:[ve("div",{className:"flex gap-2",children:[q("span",{className:"font-medium",children:"Environment:"}),q("span",{className:"text-blue-600 capitalize",children:d})]}),ve("div",{className:"flex gap-2",children:[q("span",{className:"font-medium",children:"Branch:"}),q("span",{className:"text-green-600 capitalize",children:o||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),ve("div",{className:"flex gap-2",children:[q("span",{className:"font-medium",children:"Version:"}),q("span",{className:"text-purple-600",children:r||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),ve("div",{className:"flex gap-2",children:[q("span",{className:"font-medium",children:"Deploy Time:"}),q("span",{className:"text-orange-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};import*as _e from"react";import{Drawer as I}from"vaul";import{cva as _a}from"class-variance-authority";import{jsx as Eo,jsxs as Oa}from"react/jsx-runtime";var Io=()=>Oa("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:"lucide lucide-x",children:[Eo("path",{d:"M18 6 6 18"}),Eo("path",{d:"m6 6 12 12"})]});import{useState as Ga,useEffect as Ha}from"react";function Ao(){let[e,t]=Ga({width:100,height:100});return Ha(()=>{function o(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",o),o(),()=>window.removeEventListener("resize",o)},[]),e}import{Fragment as Ua,jsx as L,jsxs as Ce}from"react/jsx-runtime";var xt=({shouldScaleBackground:e=!0,...t})=>L(I.Root,{direction:"right",shouldScaleBackground:e,...t});xt.displayName="Drawer";var Wa=I.Trigger,za=I.Close,$a=I.Portal,Mo=_e.forwardRef(({className:e,...t},o)=>L(I.Overlay,{className:n("fixed inset-0 z-40 bg-black/75 !m-0 !p-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Mo.displayName=I.Overlay.displayName;var Za=_a("fixed focus-visible:outline-0 z-50 gap-4 bg-white shadow-lg dark:bg-[#2B2B2B] dark:text-white transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:border-none !select-text",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top rounded-b-lg",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom rounded-t-lg",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-[512px] ",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-[512px]"}},defaultVariants:{side:"right"}}),Bo=_e.forwardRef(({side:e="right",hideCloseButton:t,className:o,children:r,id:a,...i},s)=>Ce($a,{children:[L(Mo,{}),Ce(I.Content,{ref:s,className:n(Za({side:e}),o),...i,children:[L("button",{className:"bg-gray-300 block md:!hidden mx-auto mt-4 md:!mt-0 h-1.5 w-[80px] rounded-full opacity-70 transition-opacity hover:opacity-100 relative"}),r,!t&&Ce(I.Close,{id:`${a}-close-button`,className:"absolute right-2 top-3 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-secondary",children:[L(Io,{}),L("span",{className:"sr-only",children:"Close"})]})]})]}));Bo.displayName=I.Content.displayName;var Vo=({className:e,...t})=>L("div",{className:n("text-lg flex flex-col border-b border-b-gray-200 space-y-1 text-left w-full p-3",e),...t});Vo.displayName="DrawerHeader";var Oo=({className:e,...t})=>L("div",{className:n("flex flex-col-reverse sm:flex-row m-auto right-0 left-0 p-3 sm:space-x-2 border-t border-t-[#EDEDED] dark:border-t-[#242424] w-full",e),...t});Oo.displayName="DrawerFooter";var Go=_e.forwardRef(({className:e,...t},o)=>L(I.Title,{ref:o,className:n("text-xl font-semibold text-[#191919] dark:text-white",e),...t}));Go.displayName=I.Title.displayName;var Ho=_e.forwardRef(({className:e,...t},o)=>L(I.Description,{ref:o,className:n("text-xs text-[#5d5c5c] dark:text-white",e),...t}));Ho.displayName=I.Description.displayName;var Ka=({trigger:e=void 0,children:t,open:o=void 0,onOpenChange:r=void 0,hideCloseButton:a,footer:i,title:s,description:l,contentClassName:m,headerClassName:c,titleClassName:d,descriptionClassName:u,footerClassName:f,asChild:h=!0,onOpenAutoFocus:C,drawerContentClassName:p,onCloseAutoFocus:y,id:g="drawer"})=>{let{width:x}=Ao(),P=x<768?"bottom":"right";return Ce(xt,{open:o,onOpenChange:r,direction:P,children:[L(Wa,{className:"cursor-pointer",asChild:h,id:`${g}-open-trigger`,children:e}),Ce(Bo,{className:n("flex flex-col gap-0 justify-start items-start max-h-[90vh] md:max-h-full w-full !max-w-md",m),side:P,hideCloseButton:a,onOpenAutoFocus:C,onCloseAutoFocus:y,id:`${g}-content`,children:[s||l?Ce(Vo,{className:c,id:`${g}-header`,children:[s&&L(Go,{className:d,id:`${g}-title`,children:s}),l&&L(Ho,{id:`${g}-description`,className:u,children:l})]}):L(Ua,{}),L("div",{className:n("flex w-full overflow-y-auto flex-col justify-start items-start p-4 flex-1 h-[30px]",p),children:t}),i&&L(Oo,{className:f,children:i})]})]})};import{jsx as _o}from"react/jsx-runtime";var Wo=()=>_o("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",className:"h-5 w-5",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:_o("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"})});import{jsx as We,jsxs as Xa}from"react/jsx-runtime";var zo=e=>Xa("svg",{viewBox:"0 0 60 30",className:"w-full max-w-md h-auto","aria-label":"Union Jack - Flag of the United Kingdom",...e,children:[We("rect",{width:"60",height:"30",fill:"#00247D"}),We("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#FFFFFF",strokeWidth:"6"}),We("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#CF142B",strokeWidth:"4"}),We("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#FFFFFF",strokeWidth:"10"}),We("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#CF142B",strokeWidth:"6"})]});import{jsx as wt,jsxs as Ya}from"react/jsx-runtime";var $o=e=>Ya("svg",{viewBox:"0 0 60 40",className:"w-full max-w-md h-auto","aria-label":"Tricolore - Flag of France",...e,children:[wt("rect",{x:"0",y:"0",width:"20",height:"40",fill:"#002395"}),wt("rect",{x:"20",y:"0",width:"20",height:"40",fill:"#FFFFFF"}),wt("rect",{x:"40",y:"0",width:"20",height:"40",fill:"#ED2939"})]});import{jsx as Zo,jsxs as ja}from"react/jsx-runtime";var Ko=()=>ja("svg",{width:"20",height:"18",viewBox:"0 0 8 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Zo("path",{d:"M5.50257 12.9395L3.68439 14.7576L1.86621 12.9395",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),Zo("path",{d:"M5.50257 5.06055L3.68439 3.24237L1.86621 5.06055",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});import{PopoverClose as Ja}from"@radix-ui/react-popover";import{jsx as O,jsxs as Nt}from"react/jsx-runtime";var qa=[{key:"en",label:"English"},{key:"fr",label:"French"}],Qa=({locale:e})=>e==="fr"?O($o,{width:10}):O(zo,{width:10}),en=({locale:e})=>O("div",{className:"px-2 py-1 ",children:Nt("div",{className:"flex items-center gap-2.5",children:[O(Qa,{locale:e})," ",O("span",{className:"uppercase",children:e}),O(Ko,{})]})}),tn=({locale:e="en",onChange:t,locales:o=qa})=>Nt(j,{children:[O("div",{className:"flex items-center gap-2 px-2 py-1 rounded-lg shadow border-[0.5px] border-gray-50/50 text-current bg-white/10 ",children:O(B,{className:"!p-0 !bg-transparent ",children:O(en,{locale:e})})}),O(Z,{side:"bottom",className:"p-0 max-w-max rounded-md overflow-hidden mx-auto mt-2",children:O("div",{children:o?.map(r=>Nt(Ja,{type:"button",className:n("flex items-center gap-3 px-3 py-1 text-sm hover:bg-blue-50 w-full transition-all",{"bg-blue-100":e&&e===r?.key}),onClick:()=>t?.(r?.key),children:[r?.label," ",e&&e===r?.key&&O(Wo,{})]},r?.key))})})]});import{useMemo as lr,useRef as wn,useState as Nn}from"react";import{AnimatePresence as on,motion as rn}from"framer-motion";import{useMemo as an,useState as nn}from"react";import{HiCheck as sn}from"react-icons/hi";import{FiLogOut as ln}from"react-icons/fi";import{BsPlus as cn}from"react-icons/bs";import{jsx as Pt,jsxs as Rt}from"react/jsx-runtime";var ze=({activeBusiness:e,onTriggerClick:t,iconOnly:o=!1,className:r,rightNode:a})=>Rt("div",{id:"sidemenu_business_bar",role:"button",onClick:t||void 0,className:n("relative flex w-full items-center rounded-lg text-black bg-white",{"border-[.5px] border-[#E9EBF8] py-1 px-2":!o,"hover:bg-primary-accent transition-all duration-150 cursor-pointer ":!!t},r),children:[Pt("section",{className:n("flex items-center justify-center bg-[#E9EBF8] text-primary-main rounded-md mr-3 text-xl font-medium",{"w-10 h-10":!o,"w-full h-10 mr-0":o}),children:e?.name?.charAt(0)||"M"}),!o&&Rt("section",{className:"flex-1 flex justify-between items-center relative text-black w-full -space-y-1 tracking-wide",children:[Rt("div",{className:"flex-1 min-w-0 max-w-[150px] w-full",children:[Pt(he,{as:"h2",className:"text-base capitalize font-medium",children:e?.name}),Pt(he,{as:"p",className:"text-sm text-[#A5A5A5]",onClick:void 0,children:e?.email})]}),a]})]});import{ChevronUp as dn}from"lucide-react";import{jsx as Uo}from"react/jsx-runtime";var Xo=e=>Uo("svg",{width:"9",height:"8",viewBox:"0 0 9 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Uo("circle",{cx:"4.5",cy:"4",r:"4",fill:"#62C554"})});import{jsx as F,jsxs as Lt}from"react/jsx-runtime";var pn={hidden:{y:"-12px",opacity:0},visible:{y:"0",opacity:1,transition:{type:"spring",damping:25,stiffness:500}},exit:{y:"-12px",opacity:0,transition:{type:"spring",damping:25,stiffness:500}}},Yo=({activeBusiness:e,toggleAddBusinessDrawer:t,businesses:o=[],handleSwitchBusiness:r,onLogoutClick:a,onToggleSideBar:i,toggleShowBusiness:s,isMobile:l,collapseType:m})=>{let[c,d]=nn(""),u=an(()=>{let g=c.toLowerCase();return(o||[]).filter(x=>x.name?.toLowerCase().startsWith(g))},[o,c]),f=m==="hidden"||l,h=g=>d(g.target.value),C=g=>{r(g||""),f&&i(!1),d("")},p=()=>{t(),s(!1),f&&i(!1),d("")},y=()=>{a?.(),s(!1),f&&i(!1),d("")};return F(on,{initial:!1,children:F(rn.div,{initial:"hidden",animate:"visible",exit:"exit",variants:pn,children:Lt("div",{className:"w-72 bg-white border-x border-t rounded-xl overflow-hidden p-3",style:{boxShadow:`
1
+ var Tr=Object.defineProperty;var Sr=(e,t,o)=>t in e?Tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var _t=(e,t,o)=>Sr(e,typeof t!="symbol"?t+"":t,o);import*as zt from"react";import*as _ from"@radix-ui/react-tooltip";import{clsx as Fr}from"clsx";import{twMerge as Er}from"tailwind-merge";function n(...e){return Er(Fr(e))}import{jsx as Ne,jsxs as Wt}from"react/jsx-runtime";var $t=_.Provider,Zt=_.Root,Kt=_.Trigger,pt=zt.forwardRef(({className:e,sideOffset:t=2,...o},r)=>Ne(_.Content,{ref:r,sideOffset:t,className:n("z-50 rounded-md border border-transparent bg-gray-50 px-3 py-1.5 text-base font-semibold text-bold text-black/40 shadow-xl- animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 [box-shadow:3px_4px_11px_0px_#0000001A,13px_16px_21px_0px_#00000017,29px_36px_28px_0px_#0000000D,52px_65px_33px_0px_#00000003,82px_101px_36px_0px_#00000000]",e),...o,children:o.children}));pt.displayName=_.Content.displayName;var Ue=({trigger:e,children:t,contentClassName:o,triggerClassName:r,asChild:a=!0,side:i,sideOffset:s,align:l,alignOffset:p,delayDuration:c=100,hasArrow:d=!0,arrowClassName:m,...u})=>Ne($t,{children:Ne(Zt,{delayDuration:c,...u,children:Wt("div",{className:"flex justify-center items-center",children:[Ne(Kt,{asChild:a,className:r,children:e}),Wt(pt,{side:i,sideOffset:s,align:l,alignOffset:p,className:o,children:[t,d&&Ne(_.Arrow,{className:n("fill-white",m)})]})]})})});Ue.displayName="Tooltip";import Br from"react";import*as Ut from"react";import*as mt from"@radix-ui/react-label";import{cva as Ir}from"class-variance-authority";import{jsx as Mr}from"react/jsx-runtime";var Ar=Ir("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ut=Ut.forwardRef(({className:e,...t},o)=>Mr(mt.Root,{ref:o,className:n(Ar(),e),...t}));ut.displayName=mt.Root.displayName;import{jsx as Xt,jsxs as Vr}from"react/jsx-runtime";var R=Br.forwardRef(({className:e,children:t,showAsterisk:o,error:r,...a},i)=>Xt(ut,{ref:i,className:n(r&&"text-red-500",e),...a,children:o?Vr("p",{children:[t,Xt("span",{className:"text-red-500",children:"*"})]}):t}));R.displayName="FormLabel";import{jsx as Yt,jsxs as Or}from"react/jsx-runtime";var Pe=({size:e=16,colour:t="primary"})=>Or("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[Yt("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),Yt("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:t==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as Xe from"react";import{Slot as Gr}from"@radix-ui/react-slot";import{cva as Hr}from"class-variance-authority";import{Fragment as jt,jsx as Re,jsxs as _r}from"react/jsx-runtime";var M=Hr("overflow-hidden isolate inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",danger:"border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60","danger-outlined":"border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","dark-text":"border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",light:"border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] leading-[1rem] font-normal text-sm rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),me=Xe.forwardRef(({className:e,variant:t="primary",size:o,asChild:r=!1,isLoading:a=!1,leftNode:i,rightNode:s,LoaderSize:l,...p},c)=>{let d=r?Gr:"button",{children:m,disabled:u,...h}=p,v=Xe.useRef(null);return Re(d,{className:n(M({variant:t,size:o,className:e})),ref:v||c,disabled:u||a,...h,children:Re("div",{className:"flex font-medium justify-center items-center gap-2",children:a?Re(jt,{children:Re("span",{className:"mx-auto",children:Re(Pe,{size:l,colour:"secondary"})})}):_r(jt,{children:[i,m,s]})})})});me.displayName="Button";import*as ft from"react";import{cva as gt}from"class-variance-authority";import Wr from"react";import{jsx as zr}from"react/jsx-runtime";var W=Wr.forwardRef(({className:e,children:t,error:o,...r},a)=>{let i=o??t;return i?zr("p",{ref:a,className:n("text-xs font-normal text-[#F04248]",e),...r,children:i}):null});W.displayName="ErrorMessage";import $r from"react";import{jsx as Zr}from"react/jsx-runtime";var z=$r.forwardRef(({className:e,...t},o)=>Zr("div",{ref:o,className:n("text-sm text-[#8E98A8",e),...t}));z.displayName="FormDescription";import{jsx as ce,jsxs as qt}from"react/jsx-runtime";var Kr=gt("!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",error:"placeholder:text-red-500 text-red-500",loading:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",prefilled:"",neutral:""}},defaultVariants:{status:"default"}}),Qt=ft.forwardRef(({className:e,status:t,type:o,...r},a)=>ce("input",{type:o,className:n(Kr({status:t}),e),ref:a,...r}));Qt.displayName="BaseInnerInput";var $=gt("flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-text-primary focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),Jt=gt("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-transparent border-0 caret-[#DEDEDE] !px-0"}},defaultVariants:{status:"default",side:"left"}}),B=ft.forwardRef(({className:e,status:t="default",disabled:o,error:r,isLoading:a,sideNodeClassName:i,showAsterisk:s,label:l,description:p,...c},d)=>{let m=t;return r&&(m="error"),a&&(m="loading"),o&&(m="prefilled"),qt("div",{className:"relative space-y-1 w-full",children:[l&&ce(R,{showAsterisk:s,error:r,children:l}),qt("div",{className:n($({status:m}),c.leftNode?"pl-0":"",c.rightNode?"pr-0":"",e),children:[c.leftNode?ce("div",{className:n(Jt({status:m,side:"left"}),i),children:c.leftNode}):null,ce(Qt,{ref:d,disabled:a||o,className:n({"!pl-3":c.leftNode&&t!=="neutral","!pr-3":c.rightNode&&t!=="neutral"}),...c}),c.rightNode?ce("div",{className:n(Jt({status:m,side:"right"}),i),children:c.rightNode}):null]}),p&&ce(z,{className:"text-gray-400 text-sm !font-normal",children:p}),ce(W,{error:r})]})});B.displayName="Input";import{useMemo as Yr,useState as lo}from"react";import{jsx as eo,jsxs as Ur}from"react/jsx-runtime";var to=()=>Ur("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[eo("path",{d:"M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),eo("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as oo,jsxs as Xr}from"react/jsx-runtime";var ro=()=>Xr("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[oo("path",{d:"M4.08759 12.69C3.26171 11.9072 2.61006 10.9591 2.17509 9.90752C2.10081 9.73454 2.0625 9.54826 2.0625 9.36001C2.0625 9.17177 2.10081 8.98549 2.17509 8.81252C2.75274 7.4073 3.72095 6.19704 4.96509 5.32502C6.14597 4.4998 7.55989 4.07405 9.00009 4.11002C10.0363 4.084 11.064 4.30239 12.0001 4.74752M13.9201 6.03752C14.7415 6.81964 15.3904 7.76486 15.8251 8.81252C15.8994 8.98549 15.9377 9.17177 15.9377 9.36001C15.9377 9.54826 15.8994 9.73454 15.8251 9.90752C15.2474 11.3127 14.2792 12.523 13.0351 13.395C11.8542 14.2202 10.4403 14.646 9.00009 14.61C7.9639 14.636 6.93616 14.4176 6.00009 13.9725",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),oo("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as ao}from"react/jsx-runtime";var no=()=>ao("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ao("path",{d:"M8.89802 2.93408L9.70202 3.49808L6.21602 8.52608H5.41202L3.46802 5.80208L4.27202 5.05208L5.81402 6.49208L8.89802 2.93408Z",fill:"currentColor"})});import{jsx as io}from"react/jsx-runtime";var so=()=>io("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:io("path",{d:"M3.37891 8.62142L6.00041 5.99992L8.62191 8.62142M8.62191 3.37842L5.99991 5.99992L3.37891 3.37842",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});import{jsx as X,jsxs as jr}from"react/jsx-runtime";var co=[{label:"Uppercase",key:"uppercase",RegExp:/[A-Z]/,validated:!1},{label:"Lowercase",key:"lowercase",RegExp:/[a-z]/,validated:!1},{label:"Number",key:"number",RegExp:/\d/,validated:!1},{label:"8 Characters",key:"eight-chars",RegExp:/.{8}/,validated:!1}],po=({onValidate:e,onChange:t,disableValidation:o,...r})=>{let[a,i]=lo(!1),[s,l]=lo(co),p=u=>co.map(h=>({...h,validated:h.RegExp.test(u)})),c=u=>{let h=p(u),v=h.every(y=>y.validated);return l(h),v},d=u=>{if(t&&t(u),o)return;let h=u?.target?.value,v=c(h);e&&e(v,h)},m=Yr(()=>X("div",{className:"flex items-center gap-2",children:s?.map(u=>jr("div",{className:n("text-xs flex items-center gap-0.5",{"text-[#62C554]":u?.validated,"text-[#8E98A8]":!u?.validated}),children:[X("span",{className:"",children:u?.validated?X(no,{}):X(so,{})}),X("span",{className:"",children:u?.label})]},u?.key))}),[s]);return X(B,{sideNodeClassName:"!border-l-0",rightNode:a?X("button",{type:"button",onClick:()=>i(u=>!u),children:X(to,{})}):X("button",{type:"button",onClick:()=>i(u=>!u),children:X(ro,{})}),type:a?"text":"password",onChange:d,description:!o&&m,...r})};po.displayName="PasswordInput";import{cva as Jr}from"class-variance-authority";import{jsx as Ye,jsxs as qr}from"react/jsx-runtime";var Ns=Jr("flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",loading:"placeholder:text-[#C4C4C4]",prefilled:"resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:""}},defaultVariants:{status:"default"}}),mo=({className:e,status:t="default",disabled:o,error:r,isLoading:a,showAsterisk:i,label:s,description:l,...p})=>{let c=t;return r&&(c="error"),a&&(c="loading"),o&&(c="prefilled"),qr("div",{className:"relative space-y-1",children:[Ye(R,{showAsterisk:i,error:r,children:s}),Ye("textarea",{className:n("min-h-[80px]",$({status:c}),e),disabled:a||o,...p}),Ye(z,{className:"text-gray-400 text-sm !font-normal",children:l}),Ye(W,{error:r})]})};mo.displayName="Textarea";import*as de from"react";import*as ae from"react";import{Command as F}from"cmdk";import{Search as ra}from"lucide-react";import*as Le from"react";import*as x from"@radix-ui/react-dialog";import{jsx as uo,jsxs as Qr}from"react/jsx-runtime";var fo=()=>Qr("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:"lucide lucide-x",children:[uo("path",{d:"M18 6 6 18"}),uo("path",{d:"m6 6 12 12"})]});import{Fragment as oa,jsx as S,jsxs as ue}from"react/jsx-runtime";var ea=x.Root,ta=x.Trigger,go=x.Portal,ho=Le.forwardRef(({className:e,...t},o)=>S(x.Overlay,{ref:o,className:n("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ho.displayName=x.Overlay.displayName;var ht=Le.forwardRef(({className:e,hideCloseButton:t,children:o,...r},a)=>ue(go,{children:[S(ho,{}),ue(x.Content,{ref:a,className:n("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white 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%] rounded-lg max-h-[95%] overflow-y-auto",e),...r,children:[o,!t&&ue(x.Close,{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:[S(fo,{}),S("span",{className:"sr-only",children:"Close"})]})]})]}));ht.displayName=x.Content.displayName;var yo=({className:e,...t})=>S("div",{className:n("flex flex-col space-y-1.5 text-left",e),...t});yo.displayName="DialogHeader";var vo=({className:e,...t})=>S("div",{className:n("flex flex-row justify-end sm:space-x-2",e),...t});vo.displayName="DialogFooter";var Co=Le.forwardRef(({className:e,...t},o)=>S(x.Title,{ref:o,className:n("text-xl font-semibold leading-none tracking-tight",e),...t}));Co.displayName=x.Title.displayName;var bo=Le.forwardRef(({className:e,...t},o)=>S(x.Description,{ref:o,className:n("text-sm text-gray-500",e),...t}));bo.displayName=x.Description.displayName;var yt=({trigger:e=void 0,children:t,open:o,onOpenChange:r,hideCloseButton:a,footer:i,title:s,description:l,contentClassName:p,headerClassName:c,titleClassName:d,descriptionClassName:m,footerClassName:u,asChild:h=!0,onOpenAutoFocus:v,onCloseAutoFocus:y,onEscapeKeyDown:f,onInteractOutside:g,onPointerDownOutside:C,...P})=>ue(ea,{...P,open:o,onOpenChange:r,children:[S(ta,{asChild:h,children:e}),S(go,{children:ue(ht,{className:p,hideCloseButton:a,onOpenAutoFocus:v,onCloseAutoFocus:y,onEscapeKeyDown:f,onPointerDownOutside:C,onInteractOutside:g,children:[s||l?ue(yo,{className:c,children:[s&&S(Co,{className:d,children:s}),l&&S(bo,{className:m,children:l})]}):S(oa,{}),t,i&&S(vo,{className:u,children:i})]})})]});yt.displayName=x.Dialog.displayName;import{Fragment as Os,jsx as Y,jsxs as ia}from"react/jsx-runtime";var De=ae.forwardRef(({className:e,...t},o)=>Y(F,{ref:o,className:n("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));De.displayName=F.displayName;var ke=ae.forwardRef(({className:e,CommandInputContainerClassName:t,loading:o,...r},a)=>ia("div",{className:n("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[o?Y(Pe,{size:16,colour:"secondary"}):Y(ra,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),Y(F.Input,{ref:a,className:n("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:o,...r})]}));ke.displayName=F.Input.displayName;var Te=ae.forwardRef(({className:e,...t},o)=>Y(F.List,{ref:o,className:n("overflow-y-auto overflow-x-hidden",e),...t}));Te.displayName=F.List.displayName;var Se=ae.forwardRef((e,t)=>Y(F.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Se.displayName=F.Empty.displayName;var Fe=ae.forwardRef(({className:e,...t},o)=>Y(F.Group,{ref:o,className:n("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}));Fe.displayName=F.Group.displayName;var aa=ae.forwardRef(({className:e,...t},o)=>Y(F.Separator,{ref:o,className:n("-mx-1 h-px bg-border",e),...t}));aa.displayName=F.Separator.displayName;var Ee=ae.forwardRef(({className:e,...t},o)=>Y(F.Item,{ref:o,className:n("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Ee.displayName=F.Item.displayName;var na=({className:e,...t})=>Y("span",{className:n("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});na.displayName="CommandShortcut";import*as xo from"react";import*as Z from"@radix-ui/react-popover";import{jsx as Ie,jsxs as sa}from"react/jsx-runtime";var j=Z.Root,V=Z.Trigger,K=xo.forwardRef(({className:e,align:t="center",sideOffset:o=4,portal:r=!0,...a},i)=>r?Ie(Z.Portal,{children:Ie(Z.Content,{ref:i,align:t,sideOffset:o,className:n("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a})}):Ie(Z.Content,{ref:i,align:t,sideOffset:o,className:n("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a}));K.displayName=Z.Content.displayName;var ne=({trigger:e,children:t,open:o,onOpenChange:r,contentClassName:a,asChild:i=!0,align:s,side:l,alignOffset:p,triggerClassName:c,sideOffset:d,onOpenAutoFocus:m,onCloseAutoFocus:u,portal:h=!0,id:v="popover",...y})=>sa(j,{...y,open:o,onOpenChange:r,children:[Ie(V,{asChild:i,className:c,id:`${v}-trigger`,children:e}),Ie(K,{alignOffset:p,sideOffset:d,side:l,align:s,className:a,onOpenAutoFocus:m,onCloseAutoFocus:u,portal:h,id:`${v}-content`,children:t})]});ne.displayName=Z.Root.displayName;import*as vt from"react";import*as O from"@radix-ui/react-scroll-area";import{jsx as Ae,jsxs as la}from"react/jsx-runtime";var fe=vt.forwardRef(({className:e,viewPortClassName:t,children:o,...r},a)=>la(O.Root,{ref:a,className:n("relative overflow-hidden",e),...r,children:[Ae(O.Viewport,{className:n("h-full w-full rounded-[inherit]",t),children:o}),Ae(wo,{}),Ae(O.Corner,{})]}));fe.displayName=O.Root.displayName;var wo=vt.forwardRef(({className:e,orientation:t="vertical",...o},r)=>Ae(O.ScrollAreaScrollbar,{ref:r,orientation:t,className:n("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:Ae(O.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));wo.displayName=O.ScrollAreaScrollbar.displayName;import{jsx as J,jsxs as je}from"react/jsx-runtime";var No=({className:e,value:t,placeholder:o="",status:r,disabled:a,id:i})=>J(V,{asChild:!0,disabled:a,id:i??"searchable-trigger",children:je("button",{disabled:a,className:n($({status:r}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t??o??"Select options...",J("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:J("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),Je=({options:e=[],value:t,onChange:o,containerClassName:r,placeholder:a,disabled:i,loading:s,optionComponent:l,children:p,modal:c=!1,hideSearch:d,className:m,inputValue:u,onValueChange:h,onInputValueChange:v})=>{let[y,f]=de.useState(!1),g=de.useRef(null),[C,P]=de.useState(void 0);return de.useLayoutEffect(()=>{g.current&&P(g.current.clientWidth)},[g.current]),je(j,{modal:c,open:y,onOpenChange:f,children:[J("div",{className:n("w-full",m),ref:g,children:p}),J(K,{portal:!c,className:"p-0 min-w-[200px]",style:{width:C},children:je(De,{className:n("relative max-h-[270px]",{"mt-2":!d}),children:[!d&&J(ke,{loading:s,placeholder:a??"Search options...",onValueChange:v,value:u,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),J(fe,{viewPortClassName:"max-h-[225px]",className:n("w-full px-0 h-full overflow-y-auto",r),children:je(Te,{children:[!d&&J(Se,{children:"No result found."}),J(Fe,{className:"w-full",children:e?.map(T=>J(Ee,{defaultValue:t?.label,value:T.label,disabled:i,onSelect:()=>{o(T),f(!1),h?.(T?.value)},id:T.value,children:l?l(T):T.label},T.value))})]})})]})})]})};var Ct=[{countryCode:"GLOBAL",countryName:"Global",currency:"Dollars",currencyCode:"USD",internetCountryCode:"GLOBAL"},{countryName:"Benin",countryCode:"+229",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BJ"},{countryName:"Burkina Faso",countryCode:"+226",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BF"},{countryName:"Cameroon",countryCode:"+237",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CM"},{countryName:"Chad",countryCode:"+235",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"TD"},{countryName:"DR Congo",countryCode:"+243",currency:"Congolese franc",currencyCode:"CDF",currencyIcon:"FC",internetCountryCode:"CD"},{countryName:"Eswatini",countryCode:"+268",currency:"Swazi lilangeni",currencyCode:"SZL",currencyIcon:"L",internetCountryCode:"SZ"},{countryName:"Gabon",countryCode:"+241",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"GA"},{countryName:"Ghana",countryCode:"+233",currency:"Ghanaian cedi",currencyCode:"GHS",currencyIcon:"\u20B5",internetCountryCode:"GH"},{countryName:"Guinea",countryCode:"+224",currency:"Guinean franc",currencyCode:"GNF",currencyIcon:"Fr",internetCountryCode:"GN"},{countryName:"Ivory Coast",countryCode:"+225",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"CI"},{countryName:"Kenya",countryCode:"+254",currency:"Kenyan shilling",currencyCode:"KES",currencyIcon:"Sh",internetCountryCode:"KE"},{countryName:"Lesotho",countryCode:"+266",currency:"Lesotho loti",currencyCode:"LSL",currencyIcon:"L",internetCountryCode:"LS"},{countryName:"Liberia",countryCode:"+231",currency:"Liberian dollar",currencyCode:"LRD",currencyIcon:"$",internetCountryCode:"LR"},{countryName:"Madagascar",countryCode:"+261",currency:"Malagasy ariary",currencyCode:"MGA",currencyIcon:"Ar",internetCountryCode:"MG"},{countryName:"Malawi",countryCode:"+265",currency:"Malawian kwacha",currencyCode:"MWK",currencyIcon:"MK",internetCountryCode:"MW"},{countryName:"Mali",countryCode:"+223",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"ML"},{countryName:"Mozambique",countryCode:"+258",currency:"Mozambican metical",currencyCode:"MZN",currencyIcon:"MT",internetCountryCode:"MZ"},{countryName:"Namibia",countryCode:"+264",currency:"Namibian dollar",currencyCode:"NAD",currencyIcon:"$",internetCountryCode:"NA"},{countryName:"Niger",countryCode:"+227",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"NE"},{countryName:"Nigeria",countryCode:"+234",currency:"Nigerian naira",currencyCode:"NGN",currencyIcon:"\u20A6",internetCountryCode:"NG"},{countryName:"Republic of the Congo",countryCode:"+242",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CG"},{countryName:"Rwanda",countryCode:"+250",currency:"Rwandan franc",currencyCode:"RWF",currencyIcon:"Fr",internetCountryCode:"RW"},{countryName:"Senegal",countryCode:"+221",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"SN"},{countryName:"Seychelles",countryCode:"+248",currency:"Seychellois rupee",currencyCode:"SCR",currencyIcon:"\u20A8",internetCountryCode:"SC"},{countryName:"South Africa",countryCode:"+27",currency:"South African rand",currencyCode:"ZAR",currencyIcon:"R",internetCountryCode:"ZA"},{countryName:"South Sudan",countryCode:"+211",currency:"South Sudanese pound",currencyCode:"SSP",currencyIcon:"\xA3",internetCountryCode:"SS"},{countryName:"Tanzania",countryCode:"+255",currency:"Tanzanian shilling",currencyCode:"TZS",currencyIcon:"Sh",internetCountryCode:"TZ"},{countryName:"Togo",countryCode:"+228",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"TG"},{countryName:"Uganda",countryCode:"+256",currency:"Ugandan shilling",currencyCode:"UGX",currencyIcon:"Sh",internetCountryCode:"UG"},{countryName:"Zambia",countryCode:"+260",currency:"Zambian kwacha",currencyCode:"ZMW",currencyIcon:"ZK",internetCountryCode:"ZM"}],Po=()=>{let e={};return Ct?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};import*as Ve from"react";import*as qe from"react-phone-number-input";import pa from"react-phone-number-input/flags";import{jsx as Me,jsxs as da}from"react/jsx-runtime";var ca=e=>da("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[Me("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",Me("path",{d:"M3 10L7 8L10 9L13 8L16 10L19 9L22 11L25 10L28 12V15L26 17L28 19L27 22L29 24L27 26L24 25L21 26L18 24L15 25L12 23L9 24L6 22L4 23L2 21V18L4 16L3 13L5 11L3 10Z",fill:"#34D399"}),Me("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),Me("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),Me("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Ro=ca;import{jsx as b,jsxs as Be}from"react/jsx-runtime";var Lo=Ve.forwardRef(({className:e,onChange:t,defaultCountry:o="NG",modal:r,showAsterisk:a,label:i,description:s,error:l,...p},c)=>{let d=m=>b(ma,{...m,status:p.status,modal:r});return Be("div",{className:"relative space-y-1",children:[b(R,{showAsterisk:a,error:l,children:i}),b(qe.default,{ref:c,className:n("flex",e),flagComponent:ie,countrySelectComponent:d,inputComponent:Do,defaultCountry:o,onChange:m=>{t&&t?.(m)},...p}),b(z,{className:"text-gray-400 text-sm !font-normal",children:s}),b(W,{error:l})]})});Lo.displayName="PhoneInput";var Do=Ve.forwardRef(({className:e,...t},o)=>b(B,{className:n("!rounded-s-none h-10",e),...t,ref:o}));Do.displayName="InputComponent";var ma=({disabled:e,value:t,onChange:o,options:r,status:a,modal:i})=>{let s=Ve.useCallback(l=>{o(l)},[o]);return Be(j,{modal:i,children:[b(V,{disabled:e,children:Be("div",{className:n($({status:a}),"transition justify-center items-center disabled:text-base-500 flex gap-3 h-10 rounded-e-none border-e-0 pl-2 pr-2"),children:[b(ie,{country:t,countryName:t}),b("svg",{className:n("mr-0.5 h-4 w-4 opacity-50",e?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:b("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),b(K,{portal:!i,className:"w-[200px] md:w-[300px] p-0",children:b(De,{children:b(Te,{children:Be(fe,{className:"h-72",children:[b(ke,{placeholder:"Search country..."}),b(Se,{children:"No country found."}),b(Fe,{children:r.filter(l=>l.value).map(l=>Be(Ee,{className:"gap-2",onSelect:()=>s(l.value),children:[b(ie,{country:l.value,countryName:l.label}),b("span",{className:"flex-1 text-sm",children:l.label}),l.value&&b("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${qe.getCountryCallingCode(l.value)}`}),b("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:n("ml-auto",l.value===t?"opacity-100":"opacity-0"),children:b("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${l.value}-${l.label}`))})]})})})})]})},ie=({country:e,countryName:t,className:o})=>{let r=pa[e];return e==="GLOBAL"?b("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:b(Ro,{className:"w-full h-[90%]"})}):b("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:r&&b(r,{title:t})})};ie.displayName="FlagComponent";import{jsx as U,jsxs as Oe}from"react/jsx-runtime";var ua=Po(),fa=({className:e,value:t,placeholder:o="",status:r,disabled:a})=>U(V,{asChild:!0,disabled:a,id:"country-dropdown",children:Oe("button",{disabled:a,className:n($({status:r}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?Oe("div",{className:"flex gap-2 items-center",children:[U(ie,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),Oe("span",{className:"",children:[" ",ua[t]]})]}):o??"Select options...",U("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:U("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),ga=({hideSearch:e=!0,showAsterisk:t,label:o,description:r,error:a,...i})=>{let s=Ct?.map(l=>({value:l?.internetCountryCode,label:l?.countryName,...l}));return Oe("div",{className:"relative space-y-1",children:[U(R,{showAsterisk:t,error:a,children:o}),U(Je,{options:s,hideSearch:e,optionComponent:l=>Oe("div",{className:"w-full flex items-center gap-2",children:[U(ie,{country:l?.internetCountryCode,countryName:l?.label,className:"ml-2 !w-6 !h-5"}),U("span",{className:"flex-1 text-sm",children:l?.label})]}),...i,children:U(fa,{value:i?.value?.value,status:i?.status,placeholder:i?.placeholder??" Select Country"})}),U(z,{className:"text-gray-400 text-sm !font-normal",children:r}),U(W,{error:a})]})};import{jsx as Ge,jsxs as ha}from"react/jsx-runtime";var He=({showAsterisk:e,label:t,description:o,error:r,hideSearch:a=!0,status:i,...s})=>ha("div",{className:"relative space-y-1",children:[Ge(R,{showAsterisk:e,error:r,children:t}),Ge(Je,{hideSearch:a,...s,containerClassName:"h-full",children:Ge(No,{disabled:s?.disabled,placeholder:s?.placeholder??"Select",status:i,value:s?.value?.label??s?.value?.value,className:s?.className,id:s?.id})}),Ge(z,{className:"text-gray-400 text-sm !font-normal",children:o}),Ge(W,{error:r})]});import ya from"react-otp-input";import{cva as va}from"class-variance-authority";import{useMemo as Ca}from"react";import{jsx as ko}from"react/jsx-runtime";var ba=va("transition cursor-default placeholder:text-black dark:placeholder:text-white rounded-lg !h-14 !w-14 border aspect-square text-base font-semibold tracking-normal outline-none placeholder:text-sm placeholder:font-normal text-black focus:bg-white",{variants:{status:{default:"border-gray-300 dark:border-[#d4d4d4] focus:border-gray-400 focus-visible:!ring-offset-gray-200 focus:ring-offset-gray-200 !ring-gray-200 !focus-visible:ring-1 bg-white dark:!bg-transparent dark:focus-visible:!ring-0 dark:focus-within:!bg-transparent dark:text-white dark:focus-within:border-[#9299A2] dark:border-[#676767] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-600 bg-red-50 border-red-600 text-red-600 focus-within:bg-red-50 focus-within:border-red-600",loading:"placeholder:text-[#C4C4C4]"}},defaultVariants:{status:"default"}}),xa=({numInputs:e=4,inputStyle:t,containerStyle:o,placeholder:r="-",status:a,...i})=>{let s=Ca(()=>r||new Array(e).fill("").reduce((c,d)=>c+=d,""),[e,r]);return ko(ya,{numInputs:e,placeholder:s,containerStyle:n("w-full",o),inputStyle:n(ba({status:a}),t),renderInput:l=>ko("input",{...l}),...i})};import{useState as wa,useEffect as Na}from"react";import{jsx as w,jsxs as pe}from"react/jsx-runtime";var Pa=({type:e})=>e==="gray"?w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M10 0C4.49 0 0 4.49 0 10C0 15.51 4.49 20 10 20C15.51 20 20 15.51 20 10C20 4.49 15.51 0 10 0ZM14.78 7.7L9.11 13.37C8.97 13.51 8.78 13.59 8.58 13.59C8.38 13.59 8.19 13.51 8.05 13.37L5.22 10.54C4.93 10.25 4.93 9.77 5.22 9.48C5.51 9.19 5.99 9.19 6.28 9.48L8.58 11.78L13.72 6.64C14.01 6.35 14.49 6.35 14.78 6.64C15.07 6.93 15.07 7.4 14.78 7.7Z",fill:"#79818C"})}):e==="info"?w("svg",{stroke:"#70B6F6",fill:"#70B6F6","stroke-width":"0",viewBox:"0 0 16 16",height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"})}):e==="warning"?w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#FFC700"})}):e==="success"?w("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2ZM16.78 9.7L11.11 15.37C10.97 15.51 10.78 15.59 10.58 15.59C10.38 15.59 10.19 15.51 10.05 15.37L7.22 12.54C6.93 12.25 6.93 11.77 7.22 11.48C7.51 11.19 7.99 11.19 8.28 11.48L10.58 13.78L15.72 8.64C16.01 8.35 16.49 8.35 16.78 8.64C17.07 8.93 17.07 9.4 16.78 9.7Z",fill:"#00D488"})}):w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#F04248"})}),Ra=({type:e="info",title:t,description:o,open:r,showCloseButton:a,bottomNode:i,sideNode:s,onClose:l,showIcon:p=!0})=>{let[c,d]=wa(r);Na(()=>{d(r)},[r]);let m="",u="";switch(e){case"gray":m="#eeeef0",u="#79818c";break;case"info":m="#ebf5fd",u="#70B6F6";break;case"warning":m="#fff8df",u="#ffc700";break;case"success":m="#e0f9f0",u="#49e0aa";break;case"danger":m="#fde8e9",u="#f3777c";break;default:m="#eeeef0",u="#79818c";break}function h(){d(!1),l&&l()}return c?pe("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:m||"#ebf5fd"},children:[w("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:u||"#70B6F6"}}),pe("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[pe("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[p&&w("div",{className:"h-full flex justify-end",children:w(Pa,{type:e})}),pe("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[pe("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||o)&&pe("div",{children:[t&&w("div",{className:"text-sm font-bold text-[#191919]",children:t}),o&&w("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:o})]}),i]}),s]})]}),a&&w("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:w("button",{onClick:h,children:pe("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),w("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};import{useState as Da}from"react";import{Copy as ka,CheckIcon as Ta}from"lucide-react";import{motion as Sa,AnimatePresence as Fa}from"framer-motion";import{jsx as La}from"react/jsx-runtime";var ge=({children:e,mode:t="truncate",className:o,as:r="div",...a})=>La(r,{className:n({"text-ellipsis overflow-hidden whitespace-nowrap":t==="truncate","whitespace-normal break-words":t==="wrap","":t==="overflow"},o),target:a?.href?"_blank":void 0,...a,children:e});import{jsx as he,jsxs as Ia}from"react/jsx-runtime";var Ea=({text:e,textToCopy:t,onCopy:o,iconsPosition:r="right",clampText:a=!0,clampMode:i="truncate",isLink:s=!1,textClassName:l})=>{let[p,c]=Da(!1),d=()=>{navigator.clipboard.writeText(t??e).then(()=>{c(!0),o?.(),setTimeout(()=>c(!1),2e3)})},m=p?Ta:ka;return Ia("div",{className:"flex items-center space-x-2 cursor-pointer text-[#717171] bg-gray-100 w-fit max-w-full rounded-md p-1 px-2",children:[r==="left"&&he(To,{Icon:m,onClick:d,copied:p}),he(ge,{as:s?"a":"span",mode:a?i:"overflow",className:n({underline:s},l),href:s?e:void 0,children:e}),r==="right"&&he(To,{Icon:m,onClick:d,copied:p})]})},To=({Icon:e,onClick:t,copied:o})=>he(Fa,{mode:"wait",children:he(Sa.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:he(e,{className:`w-5 h-5 ${o?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},o?"check":"copy")});import{useEffect as So,useState as Aa}from"react";import{Search as Ma}from"lucide-react";import{jsx as Fo}from"react/jsx-runtime";var bt=({value:e,onChange:t,debounce:o=500,addon:r,...a})=>{let[i,s]=Aa(e??""),l=p=>s(p.target.value);return So(()=>{e&&s(e)},[e]),So(()=>{let p=setTimeout(()=>{t(i)},o);return()=>clearTimeout(p)},[i,o,t]),Fo(B,{leftNode:r??Fo(Ma,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...a,className:n("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",a?.className),onChange:l,value:i})};import{useEffect as Eo}from"react";import{X as Ba}from"lucide-react";import{jsx as q,jsxs as ye}from"react/jsx-runtime";var Va=e=>{let{environment:t,branch:o,version:r,deployTime:a,showBanner:i,onClose:s,initDefault:l,removeFromStorage:p,syncLocalStorageToState:c}=e,d=t||process.env.NEXT_PUBLIC_NODE_ENV;return d!=="staging"&&d!=="sandbox"||(Eo(()=>{c()},[c]),Eo(()=>{let m;return(d==="staging"||d==="sandbox")&&(m=setInterval(()=>{p(),l()},5*60*1e3)),()=>{m&&clearInterval(m)}},[i,t,s,p,l,d]),!i)?null:ye("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[q("button",{onClick:s,className:"absolute top-2 right-2",children:q(Ba,{})}),ye("div",{className:"space-y-2 text-sm",children:[ye("div",{className:"flex gap-2",children:[q("span",{className:"font-medium",children:"Environment:"}),q("span",{className:"text-blue-600 capitalize",children:d})]}),ye("div",{className:"flex gap-2",children:[q("span",{className:"font-medium",children:"Branch:"}),q("span",{className:"text-green-600 capitalize",children:o||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),ye("div",{className:"flex gap-2",children:[q("span",{className:"font-medium",children:"Version:"}),q("span",{className:"text-purple-600",children:r||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),ye("div",{className:"flex gap-2",children:[q("span",{className:"font-medium",children:"Deploy Time:"}),q("span",{className:"text-orange-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};import*as _e from"react";import{Drawer as A}from"vaul";import{cva as _a}from"class-variance-authority";import{jsx as Io,jsxs as Oa}from"react/jsx-runtime";var Ao=()=>Oa("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:"lucide lucide-x",children:[Io("path",{d:"M18 6 6 18"}),Io("path",{d:"m6 6 12 12"})]});import{useState as Ga,useEffect as Ha}from"react";function Mo(){let[e,t]=Ga({width:100,height:100});return Ha(()=>{function o(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",o),o(),()=>window.removeEventListener("resize",o)},[]),e}import{Fragment as Ua,jsx as L,jsxs as ve}from"react/jsx-runtime";var xt=({shouldScaleBackground:e=!0,...t})=>L(A.Root,{direction:"right",shouldScaleBackground:e,...t});xt.displayName="Drawer";var Wa=A.Trigger,za=A.Close,$a=A.Portal,Bo=_e.forwardRef(({className:e,...t},o)=>L(A.Overlay,{className:n("fixed inset-0 z-40 bg-black/75 !m-0 !p-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Bo.displayName=A.Overlay.displayName;var Za=_a("fixed focus-visible:outline-0 z-50 gap-4 bg-white shadow-lg dark:bg-[#2B2B2B] dark:text-white transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:border-none !select-text",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top rounded-b-lg",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom rounded-t-lg",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-[512px] ",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-[512px]"}},defaultVariants:{side:"right"}}),Vo=_e.forwardRef(({side:e="right",hideCloseButton:t,className:o,children:r,id:a,...i},s)=>ve($a,{children:[L(Bo,{}),ve(A.Content,{ref:s,className:n(Za({side:e}),o),...i,children:[L("button",{className:"bg-gray-300 block md:!hidden mx-auto mt-4 md:!mt-0 h-1.5 w-[80px] rounded-full opacity-70 transition-opacity hover:opacity-100 relative"}),r,!t&&ve(A.Close,{id:`${a}-close-button`,className:"absolute right-2 top-3 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-secondary",children:[L(Ao,{}),L("span",{className:"sr-only",children:"Close"})]})]})]}));Vo.displayName=A.Content.displayName;var Oo=({className:e,...t})=>L("div",{className:n("text-lg flex flex-col border-b border-b-gray-200 space-y-1 text-left w-full p-3",e),...t});Oo.displayName="DrawerHeader";var Go=({className:e,...t})=>L("div",{className:n("flex flex-col-reverse sm:flex-row m-auto right-0 left-0 p-3 sm:space-x-2 border-t border-t-[#EDEDED] dark:border-t-[#242424] w-full",e),...t});Go.displayName="DrawerFooter";var Ho=_e.forwardRef(({className:e,...t},o)=>L(A.Title,{ref:o,className:n("text-xl font-semibold text-[#191919] dark:text-white",e),...t}));Ho.displayName=A.Title.displayName;var _o=_e.forwardRef(({className:e,...t},o)=>L(A.Description,{ref:o,className:n("text-xs text-[#5d5c5c] dark:text-white",e),...t}));_o.displayName=A.Description.displayName;var Ka=({trigger:e=void 0,children:t,open:o=void 0,onOpenChange:r=void 0,hideCloseButton:a,footer:i,title:s,description:l,contentClassName:p,headerClassName:c,titleClassName:d,descriptionClassName:m,footerClassName:u,asChild:h=!0,onOpenAutoFocus:v,drawerContentClassName:y,onCloseAutoFocus:f,id:g="drawer"})=>{let{width:C}=Mo(),P=C<768?"bottom":"right";return ve(xt,{open:o,onOpenChange:r,direction:P,children:[L(Wa,{className:"cursor-pointer",asChild:h,id:`${g}-open-trigger`,children:e}),ve(Vo,{className:n("flex flex-col gap-0 justify-start items-start max-h-[90vh] md:max-h-full w-full !max-w-md",p),side:P,hideCloseButton:a,onOpenAutoFocus:v,onCloseAutoFocus:f,id:`${g}-content`,children:[s||l?ve(Oo,{className:c,id:`${g}-header`,children:[s&&L(Ho,{className:d,id:`${g}-title`,children:s}),l&&L(_o,{id:`${g}-description`,className:m,children:l})]}):L(Ua,{}),L("div",{className:n("flex w-full overflow-y-auto flex-col justify-start items-start p-4 flex-1 h-[30px]",y),children:t}),i&&L(Go,{className:u,children:i})]})]})};import{jsx as Wo}from"react/jsx-runtime";var zo=()=>Wo("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",className:"h-5 w-5",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:Wo("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"})});import{jsx as We,jsxs as Xa}from"react/jsx-runtime";var $o=e=>Xa("svg",{viewBox:"0 0 60 30",className:"w-full max-w-md h-auto","aria-label":"Union Jack - Flag of the United Kingdom",...e,children:[We("rect",{width:"60",height:"30",fill:"#00247D"}),We("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#FFFFFF",strokeWidth:"6"}),We("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#CF142B",strokeWidth:"4"}),We("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#FFFFFF",strokeWidth:"10"}),We("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#CF142B",strokeWidth:"6"})]});import{jsx as wt,jsxs as Ya}from"react/jsx-runtime";var Zo=e=>Ya("svg",{viewBox:"0 0 60 40",className:"w-full max-w-md h-auto","aria-label":"Tricolore - Flag of France",...e,children:[wt("rect",{x:"0",y:"0",width:"20",height:"40",fill:"#002395"}),wt("rect",{x:"20",y:"0",width:"20",height:"40",fill:"#FFFFFF"}),wt("rect",{x:"40",y:"0",width:"20",height:"40",fill:"#ED2939"})]});import{jsx as Ko,jsxs as ja}from"react/jsx-runtime";var Uo=()=>ja("svg",{width:"20",height:"18",viewBox:"0 0 8 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ko("path",{d:"M5.50257 12.9395L3.68439 14.7576L1.86621 12.9395",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),Ko("path",{d:"M5.50257 5.06055L3.68439 3.24237L1.86621 5.06055",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});import{PopoverClose as Ja}from"@radix-ui/react-popover";import{jsx as G,jsxs as Nt}from"react/jsx-runtime";var qa=[{key:"en",label:"English"},{key:"fr",label:"French"}],Qa=({locale:e})=>e==="fr"?G(Zo,{width:10}):G($o,{width:10}),en=({locale:e})=>G("div",{className:"px-2 py-1 ",children:Nt("div",{className:"flex items-center gap-2.5",children:[G(Qa,{locale:e})," ",G("span",{className:"uppercase",children:e}),G(Uo,{})]})}),tn=({locale:e="en",onChange:t,locales:o=qa})=>Nt(j,{children:[G("div",{className:"flex items-center gap-2 px-2 py-1 rounded-lg shadow border-[0.5px] border-gray-50/50 text-current bg-white/10 ",children:G(V,{className:"!p-0 !bg-transparent ",id:"locale_select_dropdown",children:G(en,{locale:e})})}),G(K,{side:"bottom",className:"p-0 max-w-max rounded-md overflow-hidden mx-auto mt-2",children:G("div",{children:o?.map(r=>Nt(Ja,{type:"button",id:`locale_option_${r?.key}`,className:n("flex items-center gap-3 px-3 py-1 text-sm hover:bg-blue-50 w-full transition-all",{"bg-blue-100":e&&e===r?.key}),onClick:()=>t?.(r?.key),children:[r?.label," ",e&&e===r?.key&&G(zo,{})]},r?.key))})})]});import{useMemo as cr,useRef as wn,useState as Nn}from"react";import{AnimatePresence as on,motion as rn}from"framer-motion";import{useMemo as an,useState as nn}from"react";import{HiCheck as sn}from"react-icons/hi";import{FiLogOut as ln}from"react-icons/fi";import{BsPlus as cn}from"react-icons/bs";import{jsx as Pt,jsxs as Rt}from"react/jsx-runtime";var ze=({activeBusiness:e,onTriggerClick:t,iconOnly:o=!1,className:r,rightNode:a})=>Rt("div",{id:"sidemenu_business_bar",role:"button",onClick:t||void 0,className:n("relative flex w-full items-center rounded-lg text-black bg-white",{"border-[.5px] border-[#E9EBF8] py-1 px-2":!o,"hover:bg-primary-accent transition-all duration-150 cursor-pointer ":!!t},r),children:[Pt("section",{className:n("flex items-center justify-center bg-[#E9EBF8] text-primary-main rounded-md mr-3 text-xl font-medium",{"w-10 h-10":!o,"w-full h-10 mr-0":o}),children:e?.name?.charAt(0)||"M"}),!o&&Rt("section",{className:"flex-1 flex justify-between items-center relative text-black w-full -space-y-1 tracking-wide",children:[Rt("div",{className:"flex-1 min-w-0 max-w-[150px] w-full",children:[Pt(ge,{as:"h2",className:"text-base capitalize font-medium",children:e?.name}),Pt(ge,{as:"p",className:"text-sm text-[#A5A5A5]",onClick:void 0,children:e?.email})]}),a]})]});import{ChevronUp as dn}from"lucide-react";import{jsx as Xo}from"react/jsx-runtime";var Yo=e=>Xo("svg",{width:"9",height:"8",viewBox:"0 0 9 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Xo("circle",{cx:"4.5",cy:"4",r:"4",fill:"#62C554"})});import{jsx as E,jsxs as Lt}from"react/jsx-runtime";var pn={hidden:{y:"-12px",opacity:0},visible:{y:"0",opacity:1,transition:{type:"spring",damping:25,stiffness:500}},exit:{y:"-12px",opacity:0,transition:{type:"spring",damping:25,stiffness:500}}},jo=({activeBusiness:e,toggleAddBusinessDrawer:t,businesses:o=[],handleSwitchBusiness:r,onLogoutClick:a,onToggleSideBar:i,toggleShowBusiness:s,isMobile:l,collapseType:p})=>{let[c,d]=nn(""),m=an(()=>{let g=c.toLowerCase();return(o||[]).filter(C=>C.name?.toLowerCase().startsWith(g))},[o,c]),u=p==="hidden"||l,h=g=>d(g.target.value),v=g=>{r(g||""),u&&i(!1),d("")},y=()=>{t(),s(!1),u&&i(!1),d("")},f=()=>{a?.(),s(!1),u&&i(!1),d("")};return E(on,{initial:!1,children:E(rn.div,{initial:"hidden",animate:"visible",exit:"exit",variants:pn,children:Lt("div",{className:"w-72 bg-white border-x border-t rounded-xl overflow-hidden p-3",style:{boxShadow:`
2
2
  3px 4px 11px 0px #0000001A,
3
3
  13px 16px 21px 0px #00000017,
4
4
  29px 36px 28px 0px #0000000D,
5
5
  52px 65px 33px 0px #00000003,
6
6
  82px 101px 36px 0px #00000000
7
- `},children:[F(ze,{activeBusiness:e,rightNode:F(Xo,{}),className:"bg-[#FAFAFA] border-none p-3"}),F("div",{className:"mt-3",children:F(M,{label:"Search Account",leftNode:F(dn,{className:"h-4 w-4 text-gray-500"}),value:c,onChange:h,placeholder:"Search Account",className:"text-sm"})}),F("ul",{className:"max-h-48 overflow-y-auto mt-2 px-1 space-y-2",children:u.map(g=>F(ze,{onTriggerClick:()=>C(g?.clientId),activeBusiness:g,rightNode:e.clientId===g.clientId?F(sn,{className:"text-primary-600",size:18}):void 0,className:n("bg-white border-none ",{"bg-[#FAFAFA]":e.clientId===g.clientId})},g.clientId))}),F("div",{className:"py-2 ",children:Lt("button",{onClick:p,className:"w-full flex items-center justify-start gap-2 text-sm text-[#0033C7] border-[#BECFFF] border-[0.5px] rounded-lg py-2 px-3 hover:bg-primary-accent transition ",children:[F(cn,{size:18,className:"text-primary-main"})," Add Account"]})}),F("div",{className:"bg-[#FAFAFA] px-3 py-2 -m-3 mt-4",children:Lt("button",{className:"w-full flex items-center gap-2 text-sm text-black hover:text-gray-700 transition p-2 hover:bg-primary-accent",onClick:y,children:[F(ln,{size:16})," Log Out"]})})]})})})};import{jsx as ie,jsxs as un}from"react/jsx-runtime";var jo=({activeBusiness:e,toggleAddBusinessDrawer:t,toggleShowBusiness:o,businesses:r=[],handleSwitchBusiness:a,iconOnly:i=!1,onLogoutClick:s,isMobile:l,onToggleSideBar:m,isBusinessShown:c,collapseType:d})=>ie("div",{className:"px-4 relative mb-0 ",children:ie(ae,{side:l?"top":"right",open:c,onOpenChange:o,align:"end",contentClassName:"!bg-transparent !shadow-none !p-0",trigger:ie("div",{className:"flex items-center w-full",children:ie(ze,{activeBusiness:e,onTriggerClick:()=>o(!0),iconOnly:i,rightNode:ie(mn,{className:"stroke-gray-500"})})}),children:ie(Yo,{activeBusiness:e,handleSwitchBusiness:a,toggleAddBusinessDrawer:t,businesses:r,onLogoutClick:s,onToggleSideBar:m,toggleShowBusiness:o,collapseType:d,isMobile:l})})}),mn=({className:e})=>un("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:n("lucide lucide-chevrons-up-down-icon lucide-chevrons-up-down",e),children:[ie("path",{d:"M7 22l5 5 5-5"}),ie("path",{d:"M7 4l5-5 5 5"})]});import{AnimatePresence as fn,motion as gn}from"framer-motion";import{useEffect as hn}from"react";import{FiChevronRight as yn}from"react-icons/fi";import{useState as Jo,useEffect as qo}from"react";var Qo=(e,t)=>{let[o,r]=Jo(t),[a,i]=Jo(!1);return qo(()=>{i(!0);try{let s=localStorage.getItem(e);s&&r(JSON.parse(s))}catch(s){console.error("Error reading from localStorage:",s)}},[e]),qo(()=>{if(a)try{localStorage.setItem(e,JSON.stringify(o))}catch(s){console.error("Error writing to localStorage:",s)}},[e,o,a]),[o,r]};import{Fragment as er,jsx as E,jsxs as be}from"react/jsx-runtime";var vn={hidden:{opacity:0,height:0},visible:{opacity:1,height:"auto",transition:{duration:.3}}},tr=({isIconsOnly:e,isSidebarCollapsed:t,onToggleSideBar:o,currentPath:r,onNavigate:a,collapseType:i,links:s,appConfig:l,isMobile:m})=>{let c="@sidebar-expanded-menus",[d,u]=Qo(c,{}),f=p=>{u(y=>({...y,[p]:!y[p]}))},h=p=>{if(!!p?.children?.length){e?(o(!t),u(g=>({...g,[p.id]:!0}))):f(p.id);return}a(`/${p.to}`)},C=p=>p?.children?.length?(p.children||[]).some(g=>r===g.to):r===p.to;return hn(()=>{let p={};s.forEach(y=>{y.children&&y.children.length>0&&y.children.some(g=>r===g.to)&&(p[y.id]=!0)}),u(p)},[s,r,t]),E("ul",{className:"w-[90%] space-y-2.5",children:s.map((p,y)=>{if(p.isHidden||l?.hiddenRoutes?.includes(p.key??""))return null;let g=C(p),x=!!p?.children?.length,P=d[p.id];return be("div",{className:"mb-1 relative flex flex-col justify-center items-center",onClick:()=>h(p),children:[g&&!m&&(e||!x||!P)&&E("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),E("li",{id:p.id,className:n("cursor-pointer transition text-base duration-300 w-full text-[#00000066] font-medium rounded-md mx-auto max-w-full ml-4 p-2",{"bg-[#F6F8FF] text-primary-main ":g&&(!P||!t)},{"hover:bg-gray-100":!g&&(i!=="icons"||!t)},{"bg-white text-primary-main":g},{"flex justify-center text-primary-main !px-0 max-w-[70%]":e&&g,"flex justify-center !px-0 max-w-[70%]":e&&!g}),children:be("div",{className:n("flex items-center w-full",{"justify-center":e}),children:[E(Ue,{trigger:E("span",{className:"w-6",onClick:()=>h(p),children:p.icon}),side:"right",hasArrow:!0,open:e?void 0:!1,children:p.name},y),(i!=="icons"||!t)&&be(er,{children:[E("span",{className:"px-3 text-nowrap",children:p.name}),x&&E("span",{className:"ml-auto transition-transform duration-300",style:{transform:P?"rotate(90deg)":"rotate(0deg)"},children:E(yn,{size:18})})]})]})},p.to),x&&(i!=="icons"||!t)&&E(fn,{children:P&&E(gn.div,{initial:"hidden",animate:"visible",exit:"hidden",variants:vn,className:"overflow-hidden w-full",children:be("ul",{className:" mt-1 relative ",children:[p.children?.map(le=>{if(le.isHidden)return null;let me=r===le.to;return E("div",{id:le.id,className:n("relative pl-12 bg-blue-100- mt-4"),children:be("li",{className:n("cursor-pointer transition text-base duration-300 px-3 w-full text-black font-medium opacity-40 rounded-md text-nowrap",{"bg-transparent opacity-100 text-primary-main":me},{"hover:text-primary-main":!me}),onClick:()=>a(`/${le.to}`),children:[le.name,me&&be(er,{children:[!m&&E("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),E("div",{id:"vertical-bar-child",className:"h-4 w-0.5 bg-primary-main absolute left-[30px] z-10 -translate-y-1/2 top-1/2 rounded-t-full rounded-b-full "})]})]})})}),E("div",{id:"vertical-bar",className:"bg-white rounded-t-full rounded-b-full h-full w-[4px] absolute left-[29px] top-0"})]})})})]},y)})})};import{X as Pn}from"lucide-react";import{jsx as Q,jsxs as or}from"react/jsx-runtime";var rr=()=>or("svg",{width:"100%",height:40,xmlns:"http://www.w3.org/2000/svg",id:"Layer_1","data-name":"Layer 1",viewBox:"0 0 1565.51 377.21",children:[or("g",{children:[Q("path",{fill:"#0231C5",d:"m277.49,86.74v85.18l-.41,6.31v.21c-.72,5.8-2.38,11.28-4.86,16.35-1.45,3-3.21,5.9-5.28,8.49-1.55,2.07-3.42,4.04-5.28,5.9-1.66,1.55-3.42,3.11-5.28,4.45-1.66,1.24-3.42,2.38-5.28,3.42-1.76.93-3.52,1.76-5.28,2.59-1.24.52-2.48.93-3.83,1.35l-1.45.52-5.28,1.76-5.28,1.76-5.28,1.76-5.28,1.76-10.56,3.52-.52.21v19.15l-.41.1-3.62,1.14-.83.21-2.79.93-2.48.83-1.14.31-3.62,1.14-.62.21-3,.93-2.28.72-1.35.41-3.62,1.14-.41.1-.52.21h-.21v-37.26c0-1.55.31-3,.72-4.45.1-.31.21-.62.41-.93.83-1.86,2.07-3.52,3.62-4.86.41-.31.83-.72,1.35-1.04.72-.52,1.45-.83,2.28-1.24.21-.1.52-.21.72-.31l.21-.1,2.17-.72.62-.21,3.62-1.14,1.14-.41,5.28-1.76.83-.31,3.62-1.14.93-.31,5.28-1.76,5.28-1.76,5.28-1.76,5.28-1.76,3.83-1.24c.52-.1.93-.31,1.45-.52,1.97-.72,3.73-1.76,5.28-2.9,2.07-1.45,3.83-3.21,5.28-5.18,3.21-4.14,5.07-9.42,5.07-14.9v-85.08c0-5.59-1.76-10.76-5.07-15.01-1.45-1.86-3.11-3.52-5.07-4.97q-.1-.1-.21-.1c-1.66-1.24-3.42-2.17-5.28-2.9-1.76-.72-3.52-1.14-5.28-1.45-1.76-.31-3.52-.31-5.28-.21-1.76.1-3.52.41-5.28.93-.21.1-.52.1-.72.21l-4.55,1.45-5.28,1.66-5.28,1.76-5.69,1.55-5.28,1.76-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.76-5.69,1.66-5.28,1.76-3.83,1.24c-.52.21-1.04.31-1.55.52-1.86.72-3.73,1.76-5.28,2.9-2.07,1.45-3.83,3.21-5.28,5.18-3.21,4.24-5.07,9.42-5.07,15.01v33.33c0,3.93.83,7.25,2.07,10.04.1.31.21.52.41.83-.1.1-.31.1-.41.21-.83.41-1.55.72-2.28,1.24-.41.21-.83.52-1.35.72-1.24.72-2.48,1.55-3.62,2.38-.1.1-.31.21-.41.31-1.14.83-2.17,1.66-3.21,2.48-.72.62-1.45,1.24-2.07,1.97-.52.52-1.04.93-1.55,1.45-1.24,1.35-2.48,2.69-3.62,4.14-.1.1-.1.21-.21.31-.72.93-1.35,1.76-1.97,2.69-.52-.72-1.04-1.55-1.45-2.28-.72-1.14-1.35-2.28-1.86-3.52-.62-1.24-1.14-2.59-1.66-3.83-2.38-6-3.62-12.42-3.62-18.94v-33.64c0-8.07,1.86-15.94,5.28-22.77,1.45-3,3.21-5.9,5.28-8.49,1.55-2.07,3.42-4.04,5.28-5.9,1.66-1.55,3.42-3.11,5.28-4.45,1.66-1.24,3.42-2.38,5.28-3.42,1.66-.93,3.42-1.76,5.28-2.59,1.35-.52,2.59-1.04,3.93-1.45l1.35-.41,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.8-1.66,5.28-1.76,5.28-1.66,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,1.76-.52c1.14-.41,2.38-.72,3.62-1.04,1.76-.41,3.52-.83,5.28-1.04,1.76-.21,3.52-.41,5.28-.41,1.76-.1,3.52,0,5.28.1,1.76.1,3.52.31,5.28.62,1.76.31,3.52.72,5.28,1.24,1.76.52,3.62,1.14,5.28,1.86,1.76.72,3.62,1.66,5.28,2.59,1.86,1.04,3.62,2.17,5.28,3.42h.1c1.86,1.35,3.62,2.79,5.28,4.45,1.97,1.76,3.73,3.73,5.28,5.8,2.07,2.69,3.83,5.49,5.28,8.49,3.73,7.14,5.59,14.9,5.59,23.08Z"}),Q("path",{fill:"#0231C5",d:"m184.03,136.63v28.05l-.72.21-1.97.62-3.31,1.04-.21.1-3.62,1.14-1.45.52-2.17.72-.52.1h0l-2.17.72-1.86.62-1.76.52-3.52,1.14h-.1l-3.62,1.14-1.66.52-1.97.62-3.31,1.04-.21.1-3.62,1.14-1.45.52-2.17.72-.52.1-2.69.83-.41.1-3.62,1.14-1.24.41-2.38.72-2.9.93-.62.21-3.62,1.14-1.04.31-1.97.62-.62.21-2.79.93-.83.31-3,.93c-.21.1-.41.1-.62.21-.31.1-.62.21-.83.31-.93.41-1.86.83-2.79,1.35-.83.41-1.76.93-2.59,1.55-.31.21-.72.52-1.04.83-1.35,1.04-2.48,2.17-3.62,3.52-.21.21-.41.52-.62.83-1.14,1.55-2.17,3.21-3,5.07-1.35,3.11-2.07,6.42-2.07,9.94v82.39c0,2.59.72,5.07,2.07,7.14.83,1.35,2.07,2.59,3.42,3.62q.1.1.21.1c1.14.83,2.28,1.45,3.62,1.76,1.14.41,2.38.62,3.62.62,1.14,0,2.38-.1,3.62-.41.31-.1.62-.21.93-.31l2.59-.83,3.62-1.14,3.62-1.14,3.62-1.14,3.62-1.14,1.66-.52c.62-.21,1.24-.52,1.86-.83,1.35-.52,2.48-1.24,3.62-2.17,1.35-1.04,2.59-2.28,3.62-3.73,2.07-2.9,3.21-6.52,3.21-10.25v-58.48l.31-.1,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.66-.52,3.62-1.14h.1l3.52-1.14,1.76-.52,1.86-.62,3.42-1.14.21-.1,1.14-.41v67.07c0,2.48-.21,5.07-.62,7.45-.21.93-.31,1.76-.52,2.69-.83,3.52-1.97,6.83-3.62,9.94-1.04,2.07-2.28,4.04-3.62,6-1.14,1.55-2.28,3-3.62,4.45-1.14,1.24-2.38,2.38-3.62,3.42-1.14,1.04-2.38,1.86-3.62,2.79-1.14.83-2.38,1.55-3.62,2.28-1.14.62-2.38,1.24-3.62,1.76-.1,0-.21.1-.31.21-1.04.41-2.17.83-3.21,1.24-.31.1-.62.21-.93.31l-2.69.83-7.25,2.28-3.62,1.14-3.62,1.14-1.66.52c-.62.21-1.24.41-1.86.52-1.24.31-2.38.62-3.62.83-1.24.21-2.38.41-3.62.41-1.14.1-2.17.1-3.21.1h-.31c-1.24,0-2.38-.1-3.62-.21-1.24-.1-2.38-.31-3.62-.52s-2.38-.52-3.62-.93c-.72-.21-1.35-.41-2.07-.62-.52-.21-1.04-.41-1.55-.62-1.24-.52-2.38-1.04-3.62-1.66s-2.48-1.35-3.62-2.17c-.52-.31-1.04-.72-1.55-1.04-.72-.52-1.35-1.04-2.07-1.66-1.24-1.04-2.48-2.17-3.62-3.42-1.35-1.35-2.59-2.9-3.62-4.45-1.45-1.97-2.59-4.04-3.62-6.21-2.38-5.18-3.62-10.87-3.62-16.77v-82.39c0-6.62,1.24-13.04,3.62-18.94.52-1.35,1.04-2.59,1.66-3.83s1.24-2.38,1.86-3.52c.41-.83.93-1.55,1.45-2.28.62-.93,1.24-1.86,1.97-2.69,0-.1.1-.21.21-.21,1.14-1.45,2.28-2.79,3.62-4.14.52-.52.93-1.04,1.55-1.45.72-.72,1.35-1.24,2.07-1.86,1.04-.83,2.07-1.76,3.21-2.48.1-.1.31-.21.41-.31,1.14-.83,2.38-1.66,3.62-2.28.41-.21.83-.52,1.35-.72.72-.41,1.55-.83,2.28-1.24.1-.1.21-.1.41-.21.83-.41,1.76-.83,2.59-1.14.21-.1.41-.21.62-.21,1.04-.41,2.17-.83,3.21-1.14l.31-.1,1.04-.31,2.59-.83,2.79-.93.83-.31,3.62-1.14.83-.31,2.79-.83.62-.21,1.97-.62,1.04-.31,3.62-1.14.62-.21,2.9-.93,2.38-.72,1.24-.41,3.62-1.14.41-.1,2.69-.83.52-.1,2.17-.72,1.45-.41,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.66-.52,3.62-1.14h.1l3.52-1.14,1.76-.52,1.86-.62,2.17-.72h0l.52-.1,2.17-.72,1.45-.52,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.04-.41Z"})]}),Q("path",{fill:"#000000",d:"m433.57,86.41c18.92,0,34.54,6.21,46.87,18.62,12.32,12.41,18.49,28.16,18.49,47.26s-6.16,34.85-18.49,47.26c-12.33,12.41-27.95,18.62-46.87,18.62h-35.41v50.51h-42.18V86.41h77.59Zm-6.51,97.38c8.5,0,15.49-2.95,20.96-8.85,5.47-5.9,8.2-13.45,8.2-22.65s-2.73-16.75-8.2-22.65c-5.47-5.9-12.46-8.85-20.96-8.85h-28.9v63.01h28.9Z"}),Q("path",{fill:"#000000",d:"m568.18,272.05c-18.23,0-32.63-6.16-43.22-18.49-10.59-12.32-15.88-28.21-15.88-47.65s5.47-34.89,16.4-47.39c10.94-12.5,25.34-18.75,43.22-18.75,8.85,0,16.75,1.91,23.69,5.73,6.94,3.82,12.15,9.03,15.62,15.62v-17.96h39.58v125.5h-39.58v-17.7c-3.47,6.25-8.81,11.33-16.01,15.23-7.2,3.91-15.15,5.86-23.82,5.86Zm11.46-33.07c9.54,0,16.92-3.12,22.13-9.37,5.21-6.25,7.81-14.15,7.81-23.69s-2.6-17.18-7.81-23.43c-5.21-6.25-12.59-9.37-22.13-9.37-9.03,0-16.27,3.04-21.74,9.11-5.47,6.08-8.2,13.97-8.2,23.69s2.73,17.66,8.2,23.82c5.47,6.16,12.71,9.24,21.74,9.24Z"}),Q("path",{fill:"#000000",d:"m765.53,143.17h39.84v121.59c0,19.44-5.99,34.54-17.97,45.3-11.29,9.72-26.65,14.58-46.08,14.58s-35.76-4.34-46.34-13.02c-10.24-8.68-15.45-19.7-15.62-33.07h40.1c.87,11.28,8.16,16.92,21.87,16.92,16.14,0,24.21-9.37,24.21-28.12v-19.53c-7.29,13.89-20.57,20.83-39.84,20.83-15.45,0-27.04-4.69-34.76-14.06-7.73-9.37-11.59-22.22-11.59-38.53v-72.9h39.83v66.91c0,18.05,7.38,27.08,22.13,27.08,7.81,0,13.8-2.82,17.97-8.46,4.17-5.64,6.25-13.41,6.25-23.3v-62.23Z"}),Q("path",{fill:"#000000",d:"m839.47,268.66V86.41h111.44v35.41h-69.26v49.21h69.26v34.63h-69.26v63.01h-42.18Z"}),Q("path",{fill:"#000000",d:"m1090.07,253.82c-12.59,12.5-29.47,18.75-50.64,18.75s-38.1-6.25-50.77-18.75c-12.67-12.5-19.01-28.47-19.01-47.91s6.33-35.36,19.01-47.78c12.67-12.41,29.59-18.62,50.77-18.62s38.05,6.21,50.64,18.62c12.58,12.41,18.88,28.34,18.88,47.78s-6.29,35.41-18.88,47.91Zm-50.64-15.1c9.2,0,16.49-3.03,21.87-9.11,5.38-6.07,8.07-13.97,8.07-23.69s-2.69-17.61-8.07-23.69c-5.38-6.07-12.67-9.11-21.87-9.11s-16.71,3.04-22,9.11c-5.3,6.08-7.94,13.97-7.94,23.69s2.64,17.62,7.94,23.69c5.29,6.08,12.63,9.11,22,9.11Z"}),Q("path",{fill:"#000000",d:"m1131.86,268.66v-125.5h39.84v18.23c7.46-14.41,21-21.61,40.62-21.61,30.55,0,45.82,17.1,45.82,51.29v77.59h-40.1v-64.57c0-10.76-1.69-18.57-5.08-23.43-3.39-4.86-9.07-7.29-17.05-7.29-16.14,0-24.21,9.89-24.21,29.68v65.61h-39.84Z"}),Q("path",{fill:"#000000",d:"m1353.43,237.68c5.55,0,10.15-.26,13.8-.78v31.76c-7.64,1.39-16.49,2.08-26.56,2.08-4.52,0-8.51-.26-11.98-.78-3.47-.52-7.38-1.69-11.72-3.52-4.34-1.82-7.9-4.3-10.68-7.42-2.78-3.13-5.17-7.64-7.16-13.54-2-5.9-2.99-12.84-2.99-20.83v-49.99h-19.79v-31.5h19.79v-37.23h39.84v37.23h28.38v31.5h-28.38v41.66c0,8.51,1.47,14.19,4.43,17.05,2.95,2.86,7.29,4.3,13.02,4.3Z"}),Q("path",{fill:"#000000",d:"m1513.55,199.4c0,5.21-.35,11.02-1.04,17.44h-92.69c.35,8.16,3.12,14.49,8.33,19.01,5.21,4.52,12.24,6.77,21.09,6.77,12.15,0,19.96-3.91,23.43-11.72h39.05c-1.91,12.33-8.64,22.35-20.18,30.07-11.55,7.72-25.65,11.59-42.31,11.59-21.35,0-38.19-5.9-50.51-17.7-12.33-11.8-18.49-28.12-18.49-48.95s6.16-36.67,18.49-48.56c12.32-11.89,28.73-17.83,49.21-17.83s35.23,5.56,47.39,16.66c12.15,11.11,18.23,25.52,18.23,43.22Zm-93.73-7.29h54.42c-.18-8.33-2.52-14.75-7.03-19.27-4.52-4.51-11.02-6.77-19.53-6.77s-15.23,2.39-20.18,7.16c-4.95,4.78-7.51,11.07-7.68,18.88Z"})]});import{jsx as ar,jsxs as Cn}from"react/jsx-runtime";var nr=()=>Cn("svg",{width:"100%",height:"32",viewBox:"0 0 20 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"pl-5",children:[ar("path",{d:"M19.686 5.71949V15.1448L19.6467 15.8434V15.8548V15.8663C19.5779 16.5076 19.4207 17.1146 19.1848 17.6758C19.0472 18.0079 18.8801 18.3286 18.6836 18.6149C18.5361 18.8439 18.3592 19.0615 18.1823 19.2677C18.025 19.4394 17.858 19.6112 17.6811 19.7601C17.5238 19.8975 17.3567 20.0235 17.1798 20.138C17.0127 20.2411 16.8456 20.3327 16.6786 20.4243C16.5606 20.4816 16.4427 20.5274 16.3149 20.5732L16.1773 20.6305L15.6761 20.8252L15.1748 21.0199L14.6736 21.2146L14.1723 21.4093L13.1698 21.7986L13.1207 21.8215V23.9402L13.0814 23.9517L12.7374 24.0777L12.6587 24.1006L12.3934 24.2036L12.1575 24.2953L12.0494 24.3296L11.7054 24.4556L11.6464 24.4785L11.3614 24.5816L11.1452 24.6617L11.0174 24.7075L10.6734 24.8335L10.6341 24.845L10.5849 24.8679H10.5653V20.745C10.5653 20.5732 10.5948 20.4129 10.6341 20.2526C10.6439 20.2182 10.6537 20.1838 10.6734 20.1495C10.752 19.9433 10.87 19.7601 11.0174 19.6112C11.0567 19.5769 11.096 19.5311 11.1452 19.4967C11.214 19.4394 11.2828 19.4051 11.3614 19.3593C11.381 19.3478 11.4105 19.3364 11.4302 19.3249L11.4498 19.3135L11.6562 19.2333L11.7152 19.2104L12.0592 19.0844L12.1673 19.0386L12.6686 18.8439L12.7472 18.8096L13.0912 18.6836L13.1796 18.6492L13.6809 18.4545L14.1821 18.2598L14.6834 18.0652L15.1846 17.8705L15.5483 17.733C15.5974 17.7216 15.6367 17.6987 15.6859 17.6758C15.8726 17.5956 16.0397 17.4811 16.1871 17.3551C16.3837 17.1948 16.5508 17.0001 16.6884 16.7825C16.9931 16.3244 17.17 15.7403 17.17 15.1333V5.71949C17.17 5.10106 17.0029 4.52844 16.6884 4.05889C16.5508 3.85275 16.3935 3.66951 16.2068 3.50917C16.197 3.49772 16.197 3.49772 16.1871 3.49772C16.0299 3.36029 15.8628 3.25722 15.6859 3.17705C15.5188 3.09689 15.3517 3.05108 15.1846 3.01672C15.0176 2.98236 14.8505 2.98236 14.6834 2.99382C14.5163 3.00527 14.3492 3.03963 14.1821 3.09689C14.1625 3.10834 14.133 3.10834 14.1133 3.11979L13.6809 3.28013L13.1796 3.46336L12.6784 3.65806L12.1378 3.82984L11.6366 4.02453L11.1353 4.20777L10.6341 4.40246L10.1328 4.5857L9.63159 4.76894L9.13034 4.96363L8.62909 5.14687L8.12784 5.3301L7.62659 5.52479L7.12534 5.70803L6.6241 5.90272L6.12285 6.08596L5.6216 6.28065L5.08103 6.46389L4.57979 6.65858L4.21614 6.79601C4.16699 6.81891 4.11785 6.83037 4.06871 6.85327C3.8918 6.93344 3.71489 7.04796 3.56746 7.17394C3.37089 7.33427 3.20381 7.52896 3.06621 7.74656C2.76153 8.2161 2.58462 8.78872 2.58462 9.40715V13.0948C2.58462 13.53 2.66325 13.8965 2.78119 14.2057C2.79102 14.2401 2.80085 14.263 2.8205 14.2973C2.81067 14.3088 2.79102 14.3088 2.78119 14.3202C2.70256 14.366 2.63376 14.4004 2.56496 14.4577C2.52565 14.4806 2.48634 14.5149 2.43719 14.5378C2.31925 14.618 2.20131 14.7096 2.0932 14.8012C2.08337 14.8127 2.06371 14.8241 2.05389 14.8356C1.94577 14.9272 1.84749 15.0188 1.74921 15.1104C1.68041 15.1792 1.61161 15.2479 1.55264 15.328C1.5035 15.3853 1.45435 15.4311 1.40521 15.4884C1.28727 15.6373 1.16933 15.7861 1.06122 15.9465C1.05139 15.9579 1.05139 15.9694 1.04156 15.9808C0.972761 16.0839 0.913791 16.1755 0.85482 16.2786C0.805678 16.1984 0.756536 16.1068 0.717223 16.0266C0.648424 15.9007 0.589453 15.7747 0.540311 15.6373C0.481341 15.4998 0.432199 15.3509 0.383057 15.2135C0.157004 14.5493 0.0390625 13.8392 0.0390625 13.1177V9.3957C0.0390625 8.50241 0.215974 7.63203 0.540311 6.87618C0.677909 6.54406 0.844992 6.22339 1.04156 5.93708C1.18899 5.70803 1.3659 5.49044 1.54281 5.28429C1.70006 5.11251 1.86715 4.94072 2.04406 4.79184C2.20131 4.65441 2.3684 4.52844 2.54531 4.41391C2.70256 4.31084 2.86964 4.21922 3.04656 4.1276C3.17432 4.07034 3.29227 4.01308 3.42003 3.96727L3.5478 3.92146L4.04905 3.73822L4.5503 3.54353L5.05155 3.36029L5.5528 3.1656L6.05405 2.98236L6.5553 2.78767L7.05654 2.60444L7.55779 2.40974L8.10818 2.22651L8.60943 2.03182L9.11068 1.84858L9.61193 1.66534L10.1132 1.47065L10.6144 1.28741L11.1157 1.09272L11.6169 0.909482L12.1182 0.714792L12.6194 0.531554L13.1207 0.336863L13.2878 0.279601C13.3959 0.233791 13.5138 0.199434 13.6317 0.165077C13.7988 0.119268 13.9659 0.073458 14.133 0.0505533C14.3001 0.0276485 14.4672 0.00474375 14.6342 0.00474375C14.8013 -0.00670864 14.9684 0.00474368 15.1355 0.0161961C15.3026 0.0276485 15.4697 0.0505533 15.6367 0.0849104C15.8038 0.119268 15.9709 0.165077 16.138 0.222339C16.3051 0.279601 16.482 0.348315 16.6392 0.428482C16.8063 0.508649 16.9832 0.61172 17.1405 0.714792C17.3174 0.829315 17.4845 0.955292 17.6417 1.09272C17.6417 1.09272 17.6417 1.09272 17.6516 1.09272C17.8285 1.2416 17.9956 1.40193 18.1528 1.58517C18.3396 1.77986 18.5066 1.99746 18.6541 2.22651C18.8506 2.52427 19.0177 2.83348 19.1553 3.1656C19.5091 3.95582 19.686 4.81475 19.686 5.71949Z",fill:"#0231C5"}),ar("path",{d:"M10.8112 9.92822V13.0846L10.7425 13.1079L10.5557 13.1778L10.2412 13.2943L10.2215 13.3059L9.87755 13.434L9.73995 13.4923L9.53356 13.5738L9.48441 13.5855L9.27802 13.667L9.10111 13.7369L8.93402 13.7951L8.59986 13.9232H8.59003L8.24604 14.0514L8.08878 14.1096L7.90204 14.1795L7.58753 14.2959L7.56787 14.3076L7.22388 14.4357L7.08628 14.4939L6.87989 14.5755L6.83074 14.5871L6.57521 14.6803L6.53589 14.692L6.1919 14.8201L6.07396 14.8667L5.8479 14.9482L5.57271 15.053L5.51374 15.0763L5.16974 15.2044L5.07146 15.2394L4.88472 15.3093L4.82575 15.3326L4.56038 15.4374L4.48175 15.4723L4.19673 15.5771C4.17707 15.5888 4.15742 15.5888 4.13776 15.6004C4.10827 15.6121 4.07879 15.6237 4.05913 15.6354C3.97068 15.682 3.88222 15.7286 3.79377 15.7868C3.71514 15.8334 3.62668 15.8916 3.54806 15.9615C3.51857 15.9848 3.47926 16.0197 3.44977 16.0547C3.322 16.1712 3.21389 16.2993 3.10578 16.4507C3.08612 16.474 3.06646 16.5089 3.04681 16.5439C2.93869 16.7186 2.84041 16.9049 2.76178 17.1146C2.63401 17.464 2.56521 17.8367 2.56521 18.2327V27.5039C2.56521 27.7951 2.63401 28.0747 2.76178 28.3076C2.84041 28.459 2.95835 28.5988 3.08612 28.7153C3.09595 28.7269 3.09595 28.7269 3.10578 28.7269C3.21389 28.8201 3.322 28.89 3.44977 28.9249C3.55788 28.9715 3.67582 28.9948 3.79377 28.9948C3.90188 28.9948 4.01982 28.9831 4.13776 28.9482C4.16725 28.9366 4.19673 28.9249 4.22622 28.9133L4.47193 28.8201L4.81592 28.692L5.15991 28.5638L5.50391 28.4357L5.8479 28.3076L6.00516 28.2494C6.06413 28.2261 6.1231 28.1911 6.18207 28.1562C6.30984 28.098 6.41795 28.0164 6.52606 27.9116C6.65383 27.7951 6.77177 27.6554 6.87006 27.4923C7.06663 27.1662 7.17474 26.7585 7.17474 26.3392V19.7585L7.20422 19.7469L7.54822 19.6187L7.56787 19.6071L7.88238 19.4906L8.06912 19.4207L8.22638 19.3625L8.57037 19.2344H8.5802L8.91437 19.1063L9.08145 19.048L9.25836 18.9781L9.5827 18.85L9.60236 18.8384L9.71047 18.7918V26.3392C9.71047 26.6188 9.69081 26.9099 9.6515 27.1778C9.63184 27.2826 9.62201 27.3758 9.60236 27.4806C9.52373 27.8767 9.41562 28.2494 9.25836 28.5988C9.16008 28.8317 9.04214 29.053 8.91437 29.2743C8.80625 29.449 8.69814 29.6121 8.57037 29.7752C8.46226 29.9149 8.34432 30.043 8.22638 30.1595C8.11827 30.276 8.00032 30.3692 7.88238 30.474C7.77427 30.5672 7.65633 30.6487 7.53839 30.7302C7.43028 30.8001 7.31234 30.87 7.19439 30.9282C7.18457 30.9282 7.17474 30.9399 7.16491 30.9515C7.06663 30.9981 6.95851 31.0447 6.86023 31.0913C6.83074 31.1029 6.80126 31.1146 6.77177 31.1262L6.51624 31.2194L5.82825 31.4757L5.48425 31.6038L5.14026 31.7319L4.983 31.7901C4.92403 31.8134 4.86506 31.8367 4.80609 31.8484C4.68815 31.8833 4.58004 31.9183 4.4621 31.9415C4.34416 31.9648 4.23604 31.9881 4.1181 31.9881C4.00999 31.9998 3.91171 31.9998 3.81342 31.9998H3.78394C3.666 31.9998 3.55788 31.9881 3.43994 31.9765C3.322 31.9648 3.21389 31.9415 3.09595 31.9183C2.97801 31.895 2.8699 31.86 2.75195 31.8134C2.68316 31.7901 2.62419 31.7668 2.55539 31.7435C2.50624 31.7203 2.4571 31.697 2.40796 31.6737C2.29002 31.6154 2.18191 31.5572 2.06397 31.4873C1.94602 31.4174 1.82808 31.3359 1.71997 31.2427C1.67083 31.2078 1.62169 31.1612 1.57255 31.1262C1.50375 31.068 1.44478 31.0098 1.37598 30.9399C1.25804 30.8234 1.1401 30.6953 1.03198 30.5555C0.904214 30.4041 0.786273 30.2294 0.687989 30.0547C0.550391 29.8334 0.442278 29.6004 0.343994 29.3559C0.117941 28.7735 0 28.1329 0 27.469V18.1978C0 17.4524 0.117941 16.7302 0.343994 16.0663C0.393136 15.9149 0.442278 15.7751 0.501249 15.6354C0.560219 15.4956 0.61919 15.3675 0.67816 15.2394C0.717474 15.1462 0.766616 15.0647 0.815758 14.9831C0.874728 14.8783 0.933699 14.7735 1.0025 14.6803C1.0025 14.6687 1.01233 14.657 1.02215 14.657C1.13027 14.494 1.23838 14.3425 1.36615 14.1911C1.41529 14.1329 1.4546 14.0746 1.51358 14.0281C1.58237 13.9465 1.64134 13.8883 1.71014 13.8184C1.80843 13.7252 1.90671 13.6204 2.01482 13.5389C2.02465 13.5272 2.04431 13.5156 2.05414 13.5039C2.16225 13.4108 2.28019 13.3176 2.39813 13.2477C2.43745 13.2244 2.47676 13.1895 2.5259 13.1662C2.5947 13.1196 2.67333 13.073 2.74213 13.0264C2.75195 13.0147 2.76178 13.0147 2.78144 13.0031C2.86007 12.9565 2.94852 12.9099 3.02715 12.875C3.04681 12.8633 3.06646 12.8517 3.08612 12.8517C3.1844 12.8051 3.29252 12.7585 3.3908 12.7236L3.42029 12.7119L3.51857 12.677L3.76428 12.5838L4.02965 12.479L4.10828 12.444L4.45227 12.3159L4.5309 12.281L4.79626 12.1878L4.85523 12.1645L5.04197 12.0946L5.14026 12.0597L5.48425 11.9316L5.54322 11.9083L5.81842 11.8034L6.04447 11.7219L6.16241 11.6753L6.50641 11.5472L6.54572 11.5355L6.80126 11.4424L6.8504 11.4307L7.0568 11.3492L7.19439 11.3026L7.53839 11.1745L7.55805 11.1628L7.87256 11.0464L8.0593 10.9765L8.21655 10.9182L8.56054 10.7901H8.57037L8.90454 10.662L9.07162 10.6038L9.24853 10.5339L9.45493 10.4523L9.50407 10.4407L9.71047 10.3592L9.84807 10.3009L10.1921 10.1728L10.2117 10.1612L10.5262 10.0447L10.713 9.97481L10.8112 9.92822Z",fill:"#0231C5"})]});import{jsx as ee,jsxs as sr}from"react/jsx-runtime";var ir=({onToggleSideBar:e,isSidebarCollapsed:t})=>ee("button",{onClick:()=>e(!t),className:"w-6 h-12 bg-[#EEF2FF] rounded-tr-md [clip-path:polygon(0%_0%,100%_0%,100%_60%,0%_100%,0%_100%)] mt-5 flex justify-center items-center pb-2 text-gray-700",children:t?ee(bn,{}):ee(xn,{})}),bn=e=>sr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-panel-left-open-icon lucide-panel-left-open",...e,children:[ee("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),ee("path",{d:"M9 3v18"}),ee("path",{d:"m14 9 3 3-3 3"})]}),xn=e=>sr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-panel-right-open-icon lucide-panel-right-open",...e,children:[ee("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),ee("path",{d:"M15 3v18"}),ee("path",{d:"m10 15-3-3 3-3"})]});import{Fragment as Ln,jsx as G,jsxs as Qe}from"react/jsx-runtime";var Rn=({isSidebarCollapsed:e,onToggleSideBar:t,isMobile:o,links:r,businessProps:a,currentPath:i,onNavigate:s,appConfig:l,collapseType:m,onLogoutClick:c,openSidebarIcon:d=G(rr,{}),closedSidebarIcon:u=G(nr,{}),nodeAfterSideBarLogo:f})=>{let h=lr(()=>o?"hidden":m||(o?"hidden":"icons"),[o,m]),[C,p]=Nn(!1),y=h==="icons"&&e,g=wn(null),{businessList:x,activeBusiness:P,toggleAddBusinessDrawer:U,handleSetActiveBusiness:le}=a,me=dt=>p(dt),Dr=dt=>{le?.(dt),me(!1)},kr=lr(()=>h==="hidden"?d:e?u:d,[e,d,u,h]),Gt=o&&h==="hidden"&&e;return Qe(Ln,{children:[Gt&&G("div",{className:"fixed inset-0 z-40 bg-black bg-opacity-40 transition-all animate-in fade-in-15",onClick:()=>t(!1)}),Qe("div",{className:n("relative flex flex-row h-full",{"fixed inset-0 z-50 pointer-events-none":Gt}),children:[G("div",{className:"absolute -right-[22px] top-0 z-30",children:h==="icons"&&G(ir,{isSidebarCollapsed:e,onToggleSideBar:t})}),Qe("aside",{id:"sidebar_menu",ref:g,className:n("relative pt-4 h-full max-h-screen bg-[#FBFBFB] overflow-hidden flex-col flex transition-all duration-300 w-64 gap-y-5",{"!fixed":h==="hidden","w-[311px]":e&&h!=="icons","w-[75px]":e&&h==="icons","w-[270px]":!e&&h==="icons","w-0 lg:w-0 pointer-events-none":!e&&h==="hidden","pointer-events-auto":e&&h==="hidden","left-0 top-0":o&&h==="hidden","-translate-x-full":!e&&o&&h!=="hidden","translate-x-0":e&&o&&h==="hidden"}),children:[Qe("div",{className:n("flex items-center py-2 justify-center w-full",{"justify-between px-2":o}),children:[G("section",{className:n({"ml-2":o,"-ml-16":!e}),children:kr}),h==="hidden"&&G("div",{onClick:()=>t(!1),className:"flex items-center gap-2 text-3xl cursor-pointer mr-5",children:G(Pn,{size:24,className:"text-black hover:opacity-60"})})]}),f,G("div",{className:"flex-1 overflow-y-auto px-0 h-full max-h-[calc(100vh-200px)]",children:G(tr,{isIconsOnly:y,collapseType:h,currentPath:i,isSidebarCollapsed:e,links:r,onNavigate:s,onToggleSideBar:t,appConfig:l,isMobile:o})}),G("div",{className:"absolute bottom-5 w-full",children:G(jo,{activeBusiness:P,handleSwitchBusiness:Dr,isBusinessShown:C,toggleAddBusinessDrawer:U,toggleShowBusiness:me,businesses:x||[],iconOnly:h==="icons"?e:!1,onLogoutClick:c,isMobile:o,onToggleSideBar:t,collapseType:h})})]})]})]})};import{jsx as Dt}from"react/jsx-runtime";var Dn=({status:e,variant:t,className:o})=>Dt("div",{children:Dt("div",{className:n("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":t==="success"},{"bg-gray-500/20 text-white":t==="abandoned"},{"bg-red-500/20 text-red-500":t==="failed"},{"bg-yellow-500/20 text-yellow-500":t==="pending"},o),children:Dt("p",{children:e.replace("-"," ")})})});import{Loader as ai}from"lucide-react";import{ChevronLeftIcon as Tn,ChevronRightIcon as Sn}from"lucide-react";import{jsx as kt}from"react/jsx-runtime";var kn=({page:e,currentPage:t,onClick:o})=>typeof e=="string"?kt("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):kt("button",{onClick:o,id:`page-button-${e}`,className:`p-1 w-8 h-8 text-xs sm:text-sm rounded-full ${e===t?"bg-primary-main text-white":"text-[#717171] hover:bg-primary-main/10"}`,children:e}),cr=({totalPages:e,currentPage:t,handlePageClick:o})=>{let a=()=>{let m=Math.floor(1.5),c=Math.max(1,t-m),d=Math.min(e,c+3-1);return d>e&&(c=Math.max(1,e-3+1),d=e),{start:c,end:d}},{start:i,end:s}=a(),l=[];return i>1&&l.push(1),i>2&&l.push("..."),l.push(...Array.from({length:s-i+1},(m,c)=>i+c)),s<e-1&&l.push("..."),s<e&&l.push(e),l.map((m,c)=>kt(kn,{page:m,currentPage:t,onClick:typeof m=="number"?()=>o(m):void 0},c))};import{jsx as xe,jsxs as Tt}from"react/jsx-runtime";var St=({currentPage:e=1,totalPages:t=1,onPageChange:o,itemsPerPage:r=0,totalItems:a=0,id:i="pagination"})=>{let s=c=>{c>=1&&c<=t&&o?.(c)},l=r===0?1:r*(e-1)+1,m=e===t?a:Math.min(l+r-1,a);return Tt("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10 sm:gap-y-0",children:[a&&xe("section",{className:"text-[#717171] text-[12px]",children:Tt("p",{className:"",children:["Showing ",l," - ",m," of ",a]})}),xe("div",{className:"flex items-center justify-center sm:justify-end ",children:Tt("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[xe("button",{onClick:()=>s(e-1),id:`${i}-prev-button`,disabled:e===1,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:xe(Tn,{className:"size-5"})}),cr({currentPage:e,totalPages:t,handlePageClick:s}),xe("button",{onClick:()=>s(e+1),id:`${i}-next-button`,disabled:e===t,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:xe(Sn,{className:"size-5"})})]})})]})};import{flexRender as dr}from"@tanstack/react-table";import{jsx as te,jsxs as Fn}from"react/jsx-runtime";var pr=({table:e,isMobile:t,onRowClick:o,id:r})=>te("div",{className:n("relative w-full rounded-b border-0",{}),children:Fn("table",{id:r??"table",className:"w-full overflow-x-scroll",children:[te("thead",{children:e.getHeaderGroups().map(a=>te("tr",{className:n(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:a.headers.map(i=>te("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",colSpan:i.colSpan,style:{width:i.getSize()},children:i.isPlaceholder?null:te("div",{className:n("flex items-center",{"cursor-pointer select-none":i.column.getCanSort()}),onClick:i.column.getToggleSortingHandler(),children:i.isPlaceholder?null:dr(i.column.columnDef.header,i.getContext())})},i.id))},a.id))}),te("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(a=>te("tr",{className:n("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":o}),onClick:()=>o?o(a):{},children:a.getVisibleCells().map(i=>te("td",{className:n("",{}),children:te("div",{className:n("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:dr(i.column.columnDef.cell,i.getContext())})},i.id))},a.id))})]})});import{Download as ei,ListFilter as ti,RotateCw as oi}from"lucide-react";import{useEffect as zn,useState as $n}from"react";import{useForm as Zn,Controller as it}from"react-hook-form";import*as Ft from"react";import*as se from"@radix-ui/react-radio-group";import{jsx as et}from"react/jsx-runtime";var tt=Ft.forwardRef(({className:e,...t},o)=>et(se.Root,{className:n("grid gap-2",e),...t,ref:o}));tt.displayName=se.Root.displayName;var ot=Ft.forwardRef(({className:e,...t},o)=>et(se.Item,{ref:o,className:n(`aspect-square h-4 w-4 rounded-full border border-[#808080] text-primary-main ring-offset-background focus-visible:outline-none
7
+ `},children:[E(ze,{activeBusiness:e,rightNode:E(Yo,{}),className:"bg-[#FAFAFA] border-none p-3"}),E("div",{className:"mt-3",children:E(B,{label:"Search Account",leftNode:E(dn,{className:"h-4 w-4 text-gray-500"}),value:c,onChange:h,placeholder:"Search Account",className:"text-sm"})}),E("ul",{className:"max-h-48 overflow-y-auto mt-2 px-1 space-y-2",children:m.map(g=>E(ze,{onTriggerClick:()=>v(g?.clientId),activeBusiness:g,rightNode:e.clientId===g.clientId?E(sn,{className:"text-primary-600",size:18}):void 0,className:n("bg-white border-none ",{"bg-[#FAFAFA]":e.clientId===g.clientId})},g.clientId))}),E("div",{className:"py-2 ",children:Lt("button",{onClick:y,className:"w-full flex items-center justify-start gap-2 text-sm text-[#0033C7] border-[#BECFFF] border-[0.5px] rounded-lg py-2 px-3 hover:bg-primary-accent transition ",children:[E(cn,{size:18,className:"text-primary-main"})," Add Account"]})}),E("div",{className:"bg-[#FAFAFA] px-3 py-2 -m-3 mt-4",children:Lt("button",{className:"w-full flex items-center gap-2 text-sm text-black hover:text-gray-700 transition p-2 hover:bg-primary-accent",onClick:f,children:[E(ln,{size:16})," Log Out"]})})]})})})};import{jsx as se,jsxs as un}from"react/jsx-runtime";var Jo=({activeBusiness:e,toggleAddBusinessDrawer:t,toggleShowBusiness:o,businesses:r=[],handleSwitchBusiness:a,iconOnly:i=!1,onLogoutClick:s,isMobile:l,onToggleSideBar:p,isBusinessShown:c,collapseType:d})=>se("div",{className:"px-4 relative mb-0 ",children:se(ne,{side:l?"top":"right",open:c,onOpenChange:o,align:"end",contentClassName:"!bg-transparent !shadow-none !p-0",trigger:se("div",{className:"flex items-center w-full",children:se(ze,{activeBusiness:e,onTriggerClick:()=>o(!0),iconOnly:i,rightNode:se(mn,{className:"stroke-gray-500"})})}),children:se(jo,{activeBusiness:e,handleSwitchBusiness:a,toggleAddBusinessDrawer:t,businesses:r,onLogoutClick:s,onToggleSideBar:p,toggleShowBusiness:o,collapseType:d,isMobile:l})})}),mn=({className:e})=>un("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:n("lucide lucide-chevrons-up-down-icon lucide-chevrons-up-down",e),children:[se("path",{d:"M7 22l5 5 5-5"}),se("path",{d:"M7 4l5-5 5 5"})]});import{AnimatePresence as fn,motion as gn}from"framer-motion";import{useEffect as hn}from"react";import{FiChevronRight as yn}from"react-icons/fi";import{useState as qo,useEffect as Qo}from"react";var er=(e,t)=>{let[o,r]=qo(t),[a,i]=qo(!1);return Qo(()=>{i(!0);try{let s=localStorage.getItem(e);s&&r(JSON.parse(s))}catch(s){console.error("Error reading from localStorage:",s)}},[e]),Qo(()=>{if(a)try{localStorage.setItem(e,JSON.stringify(o))}catch(s){console.error("Error writing to localStorage:",s)}},[e,o,a]),[o,r]};import{Fragment as tr,jsx as I,jsxs as Ce}from"react/jsx-runtime";var vn={hidden:{opacity:0,height:0},visible:{opacity:1,height:"auto",transition:{duration:.3}}},or=({isIconsOnly:e,isSidebarCollapsed:t,onToggleSideBar:o,currentPath:r,onNavigate:a,collapseType:i,links:s,appConfig:l,isMobile:p})=>{let c="@sidebar-expanded-menus",[d,m]=er(c,{}),u=f=>{m(g=>({...g,[f]:!g[f]}))},h=f=>{if(!!f?.children?.length){e?(o(!t),m(C=>({...C,[f.id]:!0}))):u(f.id);return}a(`/${f.to}`)},v=f=>f.split("?")[0],y=f=>f?.children?.length?(f.children||[]).some(C=>v(r)===v(C.to)):v(r)===v(f.to);return hn(()=>{let f={};s.forEach(g=>{g.children&&g.children.length>0&&g.children.some(C=>v(r)===v(C.to))&&(f[g.id]=!0)}),m(f)},[s,r,t]),I("ul",{className:"w-[90%] space-y-2.5",children:s.map((f,g)=>{if(f.isHidden||l?.hiddenRoutes?.includes(f.key??""))return null;let C=y(f),P=!!f?.children?.length,T=d[f.id];return Ce("div",{className:"mb-1 relative flex flex-col justify-center items-center",onClick:()=>h(f),children:[C&&!p&&(e||!P||!T)&&I("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),I("li",{id:f.id,className:n("cursor-pointer transition text-base duration-300 w-full text-[#00000066] font-medium rounded-md mx-auto max-w-full ml-4 p-2",{"bg-[#F6F8FF] text-primary-main ":C&&(!T||!t)},{"hover:bg-gray-100":!C&&(i!=="icons"||!t)},{"bg-white text-primary-main":C},{"flex justify-center text-primary-main !px-0 max-w-[70%]":e&&C,"flex justify-center !px-0 max-w-[70%]":e&&!C}),children:Ce("div",{className:n("flex items-center w-full",{"justify-center":e}),children:[I(Ue,{trigger:I("span",{className:"w-6",onClick:()=>h(f),children:f.icon}),side:"right",hasArrow:!0,open:e?void 0:!1,children:f.name},g),(i!=="icons"||!t)&&Ce(tr,{children:[I("span",{className:"px-3 text-nowrap",children:f.name}),P&&I("span",{className:"ml-auto transition-transform duration-300",style:{transform:T?"rotate(90deg)":"rotate(0deg)"},children:I(yn,{size:18})})]})]})},f.to),P&&(i!=="icons"||!t)&&I(fn,{children:T&&I(gn.div,{initial:"hidden",animate:"visible",exit:"hidden",variants:vn,className:"overflow-hidden w-full",children:Ce("ul",{className:" mt-1 relative ",children:[f.children?.map(re=>{if(re.isHidden)return null;let we=v(r)===v(re.to);return I("div",{id:re.id,className:n("relative pl-12 bg-blue-100- mt-4"),children:Ce("li",{className:n("cursor-pointer transition text-base duration-300 px-3 w-full text-black font-medium opacity-40 rounded-md text-nowrap",{"bg-transparent opacity-100 text-primary-main":we},{"hover:text-primary-main":!we}),onClick:()=>a(`/${re.to}`),children:[re.name,we&&Ce(tr,{children:[!p&&I("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),I("div",{id:"vertical-bar-child",className:"h-4 w-0.5 bg-primary-main absolute left-[30px] z-10 -translate-y-1/2 top-1/2 rounded-t-full rounded-b-full "})]})]})})}),I("div",{id:"vertical-bar",className:"bg-white rounded-t-full rounded-b-full h-full w-[4px] absolute left-[29px] top-0"})]})})})]},g)})})};import{X as Pn}from"lucide-react";import{jsx as Q,jsxs as rr}from"react/jsx-runtime";var ar=()=>rr("svg",{width:"100%",height:40,xmlns:"http://www.w3.org/2000/svg",id:"Layer_1","data-name":"Layer 1",viewBox:"0 0 1565.51 377.21",children:[rr("g",{children:[Q("path",{fill:"#0231C5",d:"m277.49,86.74v85.18l-.41,6.31v.21c-.72,5.8-2.38,11.28-4.86,16.35-1.45,3-3.21,5.9-5.28,8.49-1.55,2.07-3.42,4.04-5.28,5.9-1.66,1.55-3.42,3.11-5.28,4.45-1.66,1.24-3.42,2.38-5.28,3.42-1.76.93-3.52,1.76-5.28,2.59-1.24.52-2.48.93-3.83,1.35l-1.45.52-5.28,1.76-5.28,1.76-5.28,1.76-5.28,1.76-10.56,3.52-.52.21v19.15l-.41.1-3.62,1.14-.83.21-2.79.93-2.48.83-1.14.31-3.62,1.14-.62.21-3,.93-2.28.72-1.35.41-3.62,1.14-.41.1-.52.21h-.21v-37.26c0-1.55.31-3,.72-4.45.1-.31.21-.62.41-.93.83-1.86,2.07-3.52,3.62-4.86.41-.31.83-.72,1.35-1.04.72-.52,1.45-.83,2.28-1.24.21-.1.52-.21.72-.31l.21-.1,2.17-.72.62-.21,3.62-1.14,1.14-.41,5.28-1.76.83-.31,3.62-1.14.93-.31,5.28-1.76,5.28-1.76,5.28-1.76,5.28-1.76,3.83-1.24c.52-.1.93-.31,1.45-.52,1.97-.72,3.73-1.76,5.28-2.9,2.07-1.45,3.83-3.21,5.28-5.18,3.21-4.14,5.07-9.42,5.07-14.9v-85.08c0-5.59-1.76-10.76-5.07-15.01-1.45-1.86-3.11-3.52-5.07-4.97q-.1-.1-.21-.1c-1.66-1.24-3.42-2.17-5.28-2.9-1.76-.72-3.52-1.14-5.28-1.45-1.76-.31-3.52-.31-5.28-.21-1.76.1-3.52.41-5.28.93-.21.1-.52.1-.72.21l-4.55,1.45-5.28,1.66-5.28,1.76-5.69,1.55-5.28,1.76-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.76-5.69,1.66-5.28,1.76-3.83,1.24c-.52.21-1.04.31-1.55.52-1.86.72-3.73,1.76-5.28,2.9-2.07,1.45-3.83,3.21-5.28,5.18-3.21,4.24-5.07,9.42-5.07,15.01v33.33c0,3.93.83,7.25,2.07,10.04.1.31.21.52.41.83-.1.1-.31.1-.41.21-.83.41-1.55.72-2.28,1.24-.41.21-.83.52-1.35.72-1.24.72-2.48,1.55-3.62,2.38-.1.1-.31.21-.41.31-1.14.83-2.17,1.66-3.21,2.48-.72.62-1.45,1.24-2.07,1.97-.52.52-1.04.93-1.55,1.45-1.24,1.35-2.48,2.69-3.62,4.14-.1.1-.1.21-.21.31-.72.93-1.35,1.76-1.97,2.69-.52-.72-1.04-1.55-1.45-2.28-.72-1.14-1.35-2.28-1.86-3.52-.62-1.24-1.14-2.59-1.66-3.83-2.38-6-3.62-12.42-3.62-18.94v-33.64c0-8.07,1.86-15.94,5.28-22.77,1.45-3,3.21-5.9,5.28-8.49,1.55-2.07,3.42-4.04,5.28-5.9,1.66-1.55,3.42-3.11,5.28-4.45,1.66-1.24,3.42-2.38,5.28-3.42,1.66-.93,3.42-1.76,5.28-2.59,1.35-.52,2.59-1.04,3.93-1.45l1.35-.41,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.8-1.66,5.28-1.76,5.28-1.66,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,1.76-.52c1.14-.41,2.38-.72,3.62-1.04,1.76-.41,3.52-.83,5.28-1.04,1.76-.21,3.52-.41,5.28-.41,1.76-.1,3.52,0,5.28.1,1.76.1,3.52.31,5.28.62,1.76.31,3.52.72,5.28,1.24,1.76.52,3.62,1.14,5.28,1.86,1.76.72,3.62,1.66,5.28,2.59,1.86,1.04,3.62,2.17,5.28,3.42h.1c1.86,1.35,3.62,2.79,5.28,4.45,1.97,1.76,3.73,3.73,5.28,5.8,2.07,2.69,3.83,5.49,5.28,8.49,3.73,7.14,5.59,14.9,5.59,23.08Z"}),Q("path",{fill:"#0231C5",d:"m184.03,136.63v28.05l-.72.21-1.97.62-3.31,1.04-.21.1-3.62,1.14-1.45.52-2.17.72-.52.1h0l-2.17.72-1.86.62-1.76.52-3.52,1.14h-.1l-3.62,1.14-1.66.52-1.97.62-3.31,1.04-.21.1-3.62,1.14-1.45.52-2.17.72-.52.1-2.69.83-.41.1-3.62,1.14-1.24.41-2.38.72-2.9.93-.62.21-3.62,1.14-1.04.31-1.97.62-.62.21-2.79.93-.83.31-3,.93c-.21.1-.41.1-.62.21-.31.1-.62.21-.83.31-.93.41-1.86.83-2.79,1.35-.83.41-1.76.93-2.59,1.55-.31.21-.72.52-1.04.83-1.35,1.04-2.48,2.17-3.62,3.52-.21.21-.41.52-.62.83-1.14,1.55-2.17,3.21-3,5.07-1.35,3.11-2.07,6.42-2.07,9.94v82.39c0,2.59.72,5.07,2.07,7.14.83,1.35,2.07,2.59,3.42,3.62q.1.1.21.1c1.14.83,2.28,1.45,3.62,1.76,1.14.41,2.38.62,3.62.62,1.14,0,2.38-.1,3.62-.41.31-.1.62-.21.93-.31l2.59-.83,3.62-1.14,3.62-1.14,3.62-1.14,3.62-1.14,1.66-.52c.62-.21,1.24-.52,1.86-.83,1.35-.52,2.48-1.24,3.62-2.17,1.35-1.04,2.59-2.28,3.62-3.73,2.07-2.9,3.21-6.52,3.21-10.25v-58.48l.31-.1,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.66-.52,3.62-1.14h.1l3.52-1.14,1.76-.52,1.86-.62,3.42-1.14.21-.1,1.14-.41v67.07c0,2.48-.21,5.07-.62,7.45-.21.93-.31,1.76-.52,2.69-.83,3.52-1.97,6.83-3.62,9.94-1.04,2.07-2.28,4.04-3.62,6-1.14,1.55-2.28,3-3.62,4.45-1.14,1.24-2.38,2.38-3.62,3.42-1.14,1.04-2.38,1.86-3.62,2.79-1.14.83-2.38,1.55-3.62,2.28-1.14.62-2.38,1.24-3.62,1.76-.1,0-.21.1-.31.21-1.04.41-2.17.83-3.21,1.24-.31.1-.62.21-.93.31l-2.69.83-7.25,2.28-3.62,1.14-3.62,1.14-1.66.52c-.62.21-1.24.41-1.86.52-1.24.31-2.38.62-3.62.83-1.24.21-2.38.41-3.62.41-1.14.1-2.17.1-3.21.1h-.31c-1.24,0-2.38-.1-3.62-.21-1.24-.1-2.38-.31-3.62-.52s-2.38-.52-3.62-.93c-.72-.21-1.35-.41-2.07-.62-.52-.21-1.04-.41-1.55-.62-1.24-.52-2.38-1.04-3.62-1.66s-2.48-1.35-3.62-2.17c-.52-.31-1.04-.72-1.55-1.04-.72-.52-1.35-1.04-2.07-1.66-1.24-1.04-2.48-2.17-3.62-3.42-1.35-1.35-2.59-2.9-3.62-4.45-1.45-1.97-2.59-4.04-3.62-6.21-2.38-5.18-3.62-10.87-3.62-16.77v-82.39c0-6.62,1.24-13.04,3.62-18.94.52-1.35,1.04-2.59,1.66-3.83s1.24-2.38,1.86-3.52c.41-.83.93-1.55,1.45-2.28.62-.93,1.24-1.86,1.97-2.69,0-.1.1-.21.21-.21,1.14-1.45,2.28-2.79,3.62-4.14.52-.52.93-1.04,1.55-1.45.72-.72,1.35-1.24,2.07-1.86,1.04-.83,2.07-1.76,3.21-2.48.1-.1.31-.21.41-.31,1.14-.83,2.38-1.66,3.62-2.28.41-.21.83-.52,1.35-.72.72-.41,1.55-.83,2.28-1.24.1-.1.21-.1.41-.21.83-.41,1.76-.83,2.59-1.14.21-.1.41-.21.62-.21,1.04-.41,2.17-.83,3.21-1.14l.31-.1,1.04-.31,2.59-.83,2.79-.93.83-.31,3.62-1.14.83-.31,2.79-.83.62-.21,1.97-.62,1.04-.31,3.62-1.14.62-.21,2.9-.93,2.38-.72,1.24-.41,3.62-1.14.41-.1,2.69-.83.52-.1,2.17-.72,1.45-.41,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.66-.52,3.62-1.14h.1l3.52-1.14,1.76-.52,1.86-.62,2.17-.72h0l.52-.1,2.17-.72,1.45-.52,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.04-.41Z"})]}),Q("path",{fill:"#000000",d:"m433.57,86.41c18.92,0,34.54,6.21,46.87,18.62,12.32,12.41,18.49,28.16,18.49,47.26s-6.16,34.85-18.49,47.26c-12.33,12.41-27.95,18.62-46.87,18.62h-35.41v50.51h-42.18V86.41h77.59Zm-6.51,97.38c8.5,0,15.49-2.95,20.96-8.85,5.47-5.9,8.2-13.45,8.2-22.65s-2.73-16.75-8.2-22.65c-5.47-5.9-12.46-8.85-20.96-8.85h-28.9v63.01h28.9Z"}),Q("path",{fill:"#000000",d:"m568.18,272.05c-18.23,0-32.63-6.16-43.22-18.49-10.59-12.32-15.88-28.21-15.88-47.65s5.47-34.89,16.4-47.39c10.94-12.5,25.34-18.75,43.22-18.75,8.85,0,16.75,1.91,23.69,5.73,6.94,3.82,12.15,9.03,15.62,15.62v-17.96h39.58v125.5h-39.58v-17.7c-3.47,6.25-8.81,11.33-16.01,15.23-7.2,3.91-15.15,5.86-23.82,5.86Zm11.46-33.07c9.54,0,16.92-3.12,22.13-9.37,5.21-6.25,7.81-14.15,7.81-23.69s-2.6-17.18-7.81-23.43c-5.21-6.25-12.59-9.37-22.13-9.37-9.03,0-16.27,3.04-21.74,9.11-5.47,6.08-8.2,13.97-8.2,23.69s2.73,17.66,8.2,23.82c5.47,6.16,12.71,9.24,21.74,9.24Z"}),Q("path",{fill:"#000000",d:"m765.53,143.17h39.84v121.59c0,19.44-5.99,34.54-17.97,45.3-11.29,9.72-26.65,14.58-46.08,14.58s-35.76-4.34-46.34-13.02c-10.24-8.68-15.45-19.7-15.62-33.07h40.1c.87,11.28,8.16,16.92,21.87,16.92,16.14,0,24.21-9.37,24.21-28.12v-19.53c-7.29,13.89-20.57,20.83-39.84,20.83-15.45,0-27.04-4.69-34.76-14.06-7.73-9.37-11.59-22.22-11.59-38.53v-72.9h39.83v66.91c0,18.05,7.38,27.08,22.13,27.08,7.81,0,13.8-2.82,17.97-8.46,4.17-5.64,6.25-13.41,6.25-23.3v-62.23Z"}),Q("path",{fill:"#000000",d:"m839.47,268.66V86.41h111.44v35.41h-69.26v49.21h69.26v34.63h-69.26v63.01h-42.18Z"}),Q("path",{fill:"#000000",d:"m1090.07,253.82c-12.59,12.5-29.47,18.75-50.64,18.75s-38.1-6.25-50.77-18.75c-12.67-12.5-19.01-28.47-19.01-47.91s6.33-35.36,19.01-47.78c12.67-12.41,29.59-18.62,50.77-18.62s38.05,6.21,50.64,18.62c12.58,12.41,18.88,28.34,18.88,47.78s-6.29,35.41-18.88,47.91Zm-50.64-15.1c9.2,0,16.49-3.03,21.87-9.11,5.38-6.07,8.07-13.97,8.07-23.69s-2.69-17.61-8.07-23.69c-5.38-6.07-12.67-9.11-21.87-9.11s-16.71,3.04-22,9.11c-5.3,6.08-7.94,13.97-7.94,23.69s2.64,17.62,7.94,23.69c5.29,6.08,12.63,9.11,22,9.11Z"}),Q("path",{fill:"#000000",d:"m1131.86,268.66v-125.5h39.84v18.23c7.46-14.41,21-21.61,40.62-21.61,30.55,0,45.82,17.1,45.82,51.29v77.59h-40.1v-64.57c0-10.76-1.69-18.57-5.08-23.43-3.39-4.86-9.07-7.29-17.05-7.29-16.14,0-24.21,9.89-24.21,29.68v65.61h-39.84Z"}),Q("path",{fill:"#000000",d:"m1353.43,237.68c5.55,0,10.15-.26,13.8-.78v31.76c-7.64,1.39-16.49,2.08-26.56,2.08-4.52,0-8.51-.26-11.98-.78-3.47-.52-7.38-1.69-11.72-3.52-4.34-1.82-7.9-4.3-10.68-7.42-2.78-3.13-5.17-7.64-7.16-13.54-2-5.9-2.99-12.84-2.99-20.83v-49.99h-19.79v-31.5h19.79v-37.23h39.84v37.23h28.38v31.5h-28.38v41.66c0,8.51,1.47,14.19,4.43,17.05,2.95,2.86,7.29,4.3,13.02,4.3Z"}),Q("path",{fill:"#000000",d:"m1513.55,199.4c0,5.21-.35,11.02-1.04,17.44h-92.69c.35,8.16,3.12,14.49,8.33,19.01,5.21,4.52,12.24,6.77,21.09,6.77,12.15,0,19.96-3.91,23.43-11.72h39.05c-1.91,12.33-8.64,22.35-20.18,30.07-11.55,7.72-25.65,11.59-42.31,11.59-21.35,0-38.19-5.9-50.51-17.7-12.33-11.8-18.49-28.12-18.49-48.95s6.16-36.67,18.49-48.56c12.32-11.89,28.73-17.83,49.21-17.83s35.23,5.56,47.39,16.66c12.15,11.11,18.23,25.52,18.23,43.22Zm-93.73-7.29h54.42c-.18-8.33-2.52-14.75-7.03-19.27-4.52-4.51-11.02-6.77-19.53-6.77s-15.23,2.39-20.18,7.16c-4.95,4.78-7.51,11.07-7.68,18.88Z"})]});import{jsx as nr,jsxs as Cn}from"react/jsx-runtime";var ir=()=>Cn("svg",{width:"100%",height:"32",viewBox:"0 0 20 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"pl-5",children:[nr("path",{d:"M19.686 5.71949V15.1448L19.6467 15.8434V15.8548V15.8663C19.5779 16.5076 19.4207 17.1146 19.1848 17.6758C19.0472 18.0079 18.8801 18.3286 18.6836 18.6149C18.5361 18.8439 18.3592 19.0615 18.1823 19.2677C18.025 19.4394 17.858 19.6112 17.6811 19.7601C17.5238 19.8975 17.3567 20.0235 17.1798 20.138C17.0127 20.2411 16.8456 20.3327 16.6786 20.4243C16.5606 20.4816 16.4427 20.5274 16.3149 20.5732L16.1773 20.6305L15.6761 20.8252L15.1748 21.0199L14.6736 21.2146L14.1723 21.4093L13.1698 21.7986L13.1207 21.8215V23.9402L13.0814 23.9517L12.7374 24.0777L12.6587 24.1006L12.3934 24.2036L12.1575 24.2953L12.0494 24.3296L11.7054 24.4556L11.6464 24.4785L11.3614 24.5816L11.1452 24.6617L11.0174 24.7075L10.6734 24.8335L10.6341 24.845L10.5849 24.8679H10.5653V20.745C10.5653 20.5732 10.5948 20.4129 10.6341 20.2526C10.6439 20.2182 10.6537 20.1838 10.6734 20.1495C10.752 19.9433 10.87 19.7601 11.0174 19.6112C11.0567 19.5769 11.096 19.5311 11.1452 19.4967C11.214 19.4394 11.2828 19.4051 11.3614 19.3593C11.381 19.3478 11.4105 19.3364 11.4302 19.3249L11.4498 19.3135L11.6562 19.2333L11.7152 19.2104L12.0592 19.0844L12.1673 19.0386L12.6686 18.8439L12.7472 18.8096L13.0912 18.6836L13.1796 18.6492L13.6809 18.4545L14.1821 18.2598L14.6834 18.0652L15.1846 17.8705L15.5483 17.733C15.5974 17.7216 15.6367 17.6987 15.6859 17.6758C15.8726 17.5956 16.0397 17.4811 16.1871 17.3551C16.3837 17.1948 16.5508 17.0001 16.6884 16.7825C16.9931 16.3244 17.17 15.7403 17.17 15.1333V5.71949C17.17 5.10106 17.0029 4.52844 16.6884 4.05889C16.5508 3.85275 16.3935 3.66951 16.2068 3.50917C16.197 3.49772 16.197 3.49772 16.1871 3.49772C16.0299 3.36029 15.8628 3.25722 15.6859 3.17705C15.5188 3.09689 15.3517 3.05108 15.1846 3.01672C15.0176 2.98236 14.8505 2.98236 14.6834 2.99382C14.5163 3.00527 14.3492 3.03963 14.1821 3.09689C14.1625 3.10834 14.133 3.10834 14.1133 3.11979L13.6809 3.28013L13.1796 3.46336L12.6784 3.65806L12.1378 3.82984L11.6366 4.02453L11.1353 4.20777L10.6341 4.40246L10.1328 4.5857L9.63159 4.76894L9.13034 4.96363L8.62909 5.14687L8.12784 5.3301L7.62659 5.52479L7.12534 5.70803L6.6241 5.90272L6.12285 6.08596L5.6216 6.28065L5.08103 6.46389L4.57979 6.65858L4.21614 6.79601C4.16699 6.81891 4.11785 6.83037 4.06871 6.85327C3.8918 6.93344 3.71489 7.04796 3.56746 7.17394C3.37089 7.33427 3.20381 7.52896 3.06621 7.74656C2.76153 8.2161 2.58462 8.78872 2.58462 9.40715V13.0948C2.58462 13.53 2.66325 13.8965 2.78119 14.2057C2.79102 14.2401 2.80085 14.263 2.8205 14.2973C2.81067 14.3088 2.79102 14.3088 2.78119 14.3202C2.70256 14.366 2.63376 14.4004 2.56496 14.4577C2.52565 14.4806 2.48634 14.5149 2.43719 14.5378C2.31925 14.618 2.20131 14.7096 2.0932 14.8012C2.08337 14.8127 2.06371 14.8241 2.05389 14.8356C1.94577 14.9272 1.84749 15.0188 1.74921 15.1104C1.68041 15.1792 1.61161 15.2479 1.55264 15.328C1.5035 15.3853 1.45435 15.4311 1.40521 15.4884C1.28727 15.6373 1.16933 15.7861 1.06122 15.9465C1.05139 15.9579 1.05139 15.9694 1.04156 15.9808C0.972761 16.0839 0.913791 16.1755 0.85482 16.2786C0.805678 16.1984 0.756536 16.1068 0.717223 16.0266C0.648424 15.9007 0.589453 15.7747 0.540311 15.6373C0.481341 15.4998 0.432199 15.3509 0.383057 15.2135C0.157004 14.5493 0.0390625 13.8392 0.0390625 13.1177V9.3957C0.0390625 8.50241 0.215974 7.63203 0.540311 6.87618C0.677909 6.54406 0.844992 6.22339 1.04156 5.93708C1.18899 5.70803 1.3659 5.49044 1.54281 5.28429C1.70006 5.11251 1.86715 4.94072 2.04406 4.79184C2.20131 4.65441 2.3684 4.52844 2.54531 4.41391C2.70256 4.31084 2.86964 4.21922 3.04656 4.1276C3.17432 4.07034 3.29227 4.01308 3.42003 3.96727L3.5478 3.92146L4.04905 3.73822L4.5503 3.54353L5.05155 3.36029L5.5528 3.1656L6.05405 2.98236L6.5553 2.78767L7.05654 2.60444L7.55779 2.40974L8.10818 2.22651L8.60943 2.03182L9.11068 1.84858L9.61193 1.66534L10.1132 1.47065L10.6144 1.28741L11.1157 1.09272L11.6169 0.909482L12.1182 0.714792L12.6194 0.531554L13.1207 0.336863L13.2878 0.279601C13.3959 0.233791 13.5138 0.199434 13.6317 0.165077C13.7988 0.119268 13.9659 0.073458 14.133 0.0505533C14.3001 0.0276485 14.4672 0.00474375 14.6342 0.00474375C14.8013 -0.00670864 14.9684 0.00474368 15.1355 0.0161961C15.3026 0.0276485 15.4697 0.0505533 15.6367 0.0849104C15.8038 0.119268 15.9709 0.165077 16.138 0.222339C16.3051 0.279601 16.482 0.348315 16.6392 0.428482C16.8063 0.508649 16.9832 0.61172 17.1405 0.714792C17.3174 0.829315 17.4845 0.955292 17.6417 1.09272C17.6417 1.09272 17.6417 1.09272 17.6516 1.09272C17.8285 1.2416 17.9956 1.40193 18.1528 1.58517C18.3396 1.77986 18.5066 1.99746 18.6541 2.22651C18.8506 2.52427 19.0177 2.83348 19.1553 3.1656C19.5091 3.95582 19.686 4.81475 19.686 5.71949Z",fill:"#0231C5"}),nr("path",{d:"M10.8112 9.92822V13.0846L10.7425 13.1079L10.5557 13.1778L10.2412 13.2943L10.2215 13.3059L9.87755 13.434L9.73995 13.4923L9.53356 13.5738L9.48441 13.5855L9.27802 13.667L9.10111 13.7369L8.93402 13.7951L8.59986 13.9232H8.59003L8.24604 14.0514L8.08878 14.1096L7.90204 14.1795L7.58753 14.2959L7.56787 14.3076L7.22388 14.4357L7.08628 14.4939L6.87989 14.5755L6.83074 14.5871L6.57521 14.6803L6.53589 14.692L6.1919 14.8201L6.07396 14.8667L5.8479 14.9482L5.57271 15.053L5.51374 15.0763L5.16974 15.2044L5.07146 15.2394L4.88472 15.3093L4.82575 15.3326L4.56038 15.4374L4.48175 15.4723L4.19673 15.5771C4.17707 15.5888 4.15742 15.5888 4.13776 15.6004C4.10827 15.6121 4.07879 15.6237 4.05913 15.6354C3.97068 15.682 3.88222 15.7286 3.79377 15.7868C3.71514 15.8334 3.62668 15.8916 3.54806 15.9615C3.51857 15.9848 3.47926 16.0197 3.44977 16.0547C3.322 16.1712 3.21389 16.2993 3.10578 16.4507C3.08612 16.474 3.06646 16.5089 3.04681 16.5439C2.93869 16.7186 2.84041 16.9049 2.76178 17.1146C2.63401 17.464 2.56521 17.8367 2.56521 18.2327V27.5039C2.56521 27.7951 2.63401 28.0747 2.76178 28.3076C2.84041 28.459 2.95835 28.5988 3.08612 28.7153C3.09595 28.7269 3.09595 28.7269 3.10578 28.7269C3.21389 28.8201 3.322 28.89 3.44977 28.9249C3.55788 28.9715 3.67582 28.9948 3.79377 28.9948C3.90188 28.9948 4.01982 28.9831 4.13776 28.9482C4.16725 28.9366 4.19673 28.9249 4.22622 28.9133L4.47193 28.8201L4.81592 28.692L5.15991 28.5638L5.50391 28.4357L5.8479 28.3076L6.00516 28.2494C6.06413 28.2261 6.1231 28.1911 6.18207 28.1562C6.30984 28.098 6.41795 28.0164 6.52606 27.9116C6.65383 27.7951 6.77177 27.6554 6.87006 27.4923C7.06663 27.1662 7.17474 26.7585 7.17474 26.3392V19.7585L7.20422 19.7469L7.54822 19.6187L7.56787 19.6071L7.88238 19.4906L8.06912 19.4207L8.22638 19.3625L8.57037 19.2344H8.5802L8.91437 19.1063L9.08145 19.048L9.25836 18.9781L9.5827 18.85L9.60236 18.8384L9.71047 18.7918V26.3392C9.71047 26.6188 9.69081 26.9099 9.6515 27.1778C9.63184 27.2826 9.62201 27.3758 9.60236 27.4806C9.52373 27.8767 9.41562 28.2494 9.25836 28.5988C9.16008 28.8317 9.04214 29.053 8.91437 29.2743C8.80625 29.449 8.69814 29.6121 8.57037 29.7752C8.46226 29.9149 8.34432 30.043 8.22638 30.1595C8.11827 30.276 8.00032 30.3692 7.88238 30.474C7.77427 30.5672 7.65633 30.6487 7.53839 30.7302C7.43028 30.8001 7.31234 30.87 7.19439 30.9282C7.18457 30.9282 7.17474 30.9399 7.16491 30.9515C7.06663 30.9981 6.95851 31.0447 6.86023 31.0913C6.83074 31.1029 6.80126 31.1146 6.77177 31.1262L6.51624 31.2194L5.82825 31.4757L5.48425 31.6038L5.14026 31.7319L4.983 31.7901C4.92403 31.8134 4.86506 31.8367 4.80609 31.8484C4.68815 31.8833 4.58004 31.9183 4.4621 31.9415C4.34416 31.9648 4.23604 31.9881 4.1181 31.9881C4.00999 31.9998 3.91171 31.9998 3.81342 31.9998H3.78394C3.666 31.9998 3.55788 31.9881 3.43994 31.9765C3.322 31.9648 3.21389 31.9415 3.09595 31.9183C2.97801 31.895 2.8699 31.86 2.75195 31.8134C2.68316 31.7901 2.62419 31.7668 2.55539 31.7435C2.50624 31.7203 2.4571 31.697 2.40796 31.6737C2.29002 31.6154 2.18191 31.5572 2.06397 31.4873C1.94602 31.4174 1.82808 31.3359 1.71997 31.2427C1.67083 31.2078 1.62169 31.1612 1.57255 31.1262C1.50375 31.068 1.44478 31.0098 1.37598 30.9399C1.25804 30.8234 1.1401 30.6953 1.03198 30.5555C0.904214 30.4041 0.786273 30.2294 0.687989 30.0547C0.550391 29.8334 0.442278 29.6004 0.343994 29.3559C0.117941 28.7735 0 28.1329 0 27.469V18.1978C0 17.4524 0.117941 16.7302 0.343994 16.0663C0.393136 15.9149 0.442278 15.7751 0.501249 15.6354C0.560219 15.4956 0.61919 15.3675 0.67816 15.2394C0.717474 15.1462 0.766616 15.0647 0.815758 14.9831C0.874728 14.8783 0.933699 14.7735 1.0025 14.6803C1.0025 14.6687 1.01233 14.657 1.02215 14.657C1.13027 14.494 1.23838 14.3425 1.36615 14.1911C1.41529 14.1329 1.4546 14.0746 1.51358 14.0281C1.58237 13.9465 1.64134 13.8883 1.71014 13.8184C1.80843 13.7252 1.90671 13.6204 2.01482 13.5389C2.02465 13.5272 2.04431 13.5156 2.05414 13.5039C2.16225 13.4108 2.28019 13.3176 2.39813 13.2477C2.43745 13.2244 2.47676 13.1895 2.5259 13.1662C2.5947 13.1196 2.67333 13.073 2.74213 13.0264C2.75195 13.0147 2.76178 13.0147 2.78144 13.0031C2.86007 12.9565 2.94852 12.9099 3.02715 12.875C3.04681 12.8633 3.06646 12.8517 3.08612 12.8517C3.1844 12.8051 3.29252 12.7585 3.3908 12.7236L3.42029 12.7119L3.51857 12.677L3.76428 12.5838L4.02965 12.479L4.10828 12.444L4.45227 12.3159L4.5309 12.281L4.79626 12.1878L4.85523 12.1645L5.04197 12.0946L5.14026 12.0597L5.48425 11.9316L5.54322 11.9083L5.81842 11.8034L6.04447 11.7219L6.16241 11.6753L6.50641 11.5472L6.54572 11.5355L6.80126 11.4424L6.8504 11.4307L7.0568 11.3492L7.19439 11.3026L7.53839 11.1745L7.55805 11.1628L7.87256 11.0464L8.0593 10.9765L8.21655 10.9182L8.56054 10.7901H8.57037L8.90454 10.662L9.07162 10.6038L9.24853 10.5339L9.45493 10.4523L9.50407 10.4407L9.71047 10.3592L9.84807 10.3009L10.1921 10.1728L10.2117 10.1612L10.5262 10.0447L10.713 9.97481L10.8112 9.92822Z",fill:"#0231C5"})]});import{jsx as ee,jsxs as lr}from"react/jsx-runtime";var sr=({onToggleSideBar:e,isSidebarCollapsed:t})=>ee("button",{onClick:()=>e(!t),className:"w-6 h-12 bg-[#EEF2FF] rounded-tr-md [clip-path:polygon(0%_0%,100%_0%,100%_60%,0%_100%,0%_100%)] mt-5 flex justify-center items-center pb-2 text-gray-700",children:t?ee(bn,{}):ee(xn,{})}),bn=e=>lr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-panel-left-open-icon lucide-panel-left-open",...e,children:[ee("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),ee("path",{d:"M9 3v18"}),ee("path",{d:"m14 9 3 3-3 3"})]}),xn=e=>lr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-panel-right-open-icon lucide-panel-right-open",...e,children:[ee("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),ee("path",{d:"M15 3v18"}),ee("path",{d:"m10 15-3-3 3-3"})]});import{Fragment as Ln,jsx as H,jsxs as Qe}from"react/jsx-runtime";var Rn=({isSidebarCollapsed:e,onToggleSideBar:t,isMobile:o,links:r,businessProps:a,currentPath:i,onNavigate:s,appConfig:l,collapseType:p,onLogoutClick:c,openSidebarIcon:d=H(ar,{}),closedSidebarIcon:m=H(ir,{}),nodeAfterSideBarLogo:u})=>{let h=cr(()=>o?"hidden":p||(o?"hidden":"icons"),[o,p]),[v,y]=Nn(!1),f=h==="icons"&&e,g=wn(null),{businessList:C,activeBusiness:P,toggleAddBusinessDrawer:T,handleSetActiveBusiness:Gt}=a,re=dt=>y(dt),we=dt=>{Gt?.(dt),re(!1)},kr=cr(()=>h==="hidden"?d:e?m:d,[e,d,m,h]),Ht=o&&h==="hidden"&&e;return Qe(Ln,{children:[Ht&&H("div",{className:"fixed inset-0 z-40 bg-black bg-opacity-40 transition-all animate-in fade-in-15",onClick:()=>t(!1)}),Qe("div",{className:n("relative flex flex-row h-full",{"fixed inset-0 z-50 pointer-events-none":Ht}),children:[H("div",{className:"absolute -right-[22px] top-0 z-20",children:h==="icons"&&H(sr,{isSidebarCollapsed:e,onToggleSideBar:t})}),Qe("aside",{id:"sidebar_menu",ref:g,className:n("relative pt-4 h-full max-h-screen bg-[#FBFBFB] overflow-hidden flex-col flex transition-all duration-300 w-64 gap-y-5",{"!fixed":h==="hidden","w-[311px]":e&&h!=="icons","w-[75px]":e&&h==="icons","w-[270px]":!e&&h==="icons","w-0 lg:w-0 pointer-events-none":!e&&h==="hidden","pointer-events-auto":e&&h==="hidden","left-0 top-0":o&&h==="hidden","-translate-x-full":!e&&o&&h!=="hidden","translate-x-0":e&&o&&h==="hidden"}),children:[Qe("div",{className:n("flex items-center py-2 justify-center w-full",{"justify-between px-2":o}),children:[H("section",{className:n({"ml-2":o,"-ml-16":!e}),children:kr}),h==="hidden"&&H("div",{onClick:()=>t(!1),className:"flex items-center gap-2 text-3xl cursor-pointer mr-5",children:H(Pn,{size:24,className:"text-black hover:opacity-60"})})]}),u,H("div",{className:"flex-1 overflow-y-auto px-0 h-full max-h-[calc(100vh-200px)]",children:H(or,{isIconsOnly:f,collapseType:h,currentPath:i,isSidebarCollapsed:e,links:r,onNavigate:s,onToggleSideBar:t,appConfig:l,isMobile:o})}),H("div",{className:"absolute bottom-5 w-full",children:H(Jo,{activeBusiness:P,handleSwitchBusiness:we,isBusinessShown:v,toggleAddBusinessDrawer:T,toggleShowBusiness:re,businesses:C||[],iconOnly:h==="icons"?e:!1,onLogoutClick:c,isMobile:o,onToggleSideBar:t,collapseType:h})})]})]})]})};import{jsx as Dt}from"react/jsx-runtime";var Dn=({status:e,variant:t,className:o})=>Dt("div",{children:Dt("div",{className:n("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":t==="success"},{"bg-gray-500/20 text-white":t==="abandoned"},{"bg-red-500/20 text-red-500":t==="failed"},{"bg-yellow-500/20 text-yellow-500":t==="pending"},o),children:Dt("p",{children:e.replace("-"," ")})})});import{Loader as ai}from"lucide-react";import{ChevronLeftIcon as Tn,ChevronRightIcon as Sn}from"lucide-react";import{jsx as kt}from"react/jsx-runtime";var kn=({page:e,currentPage:t,onClick:o})=>typeof e=="string"?kt("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):kt("button",{onClick:o,id:`page-button-${e}`,className:`p-1 w-8 h-8 text-xs sm:text-sm rounded-full ${e===t?"bg-primary-main text-white":"text-[#717171] hover:bg-primary-main/10"}`,children:e}),dr=({totalPages:e,currentPage:t,handlePageClick:o})=>{let a=()=>{let p=Math.floor(1.5),c=Math.max(1,t-p),d=Math.min(e,c+3-1);return d>e&&(c=Math.max(1,e-3+1),d=e),{start:c,end:d}},{start:i,end:s}=a(),l=[];return i>1&&l.push(1),i>2&&l.push("..."),l.push(...Array.from({length:s-i+1},(p,c)=>i+c)),s<e-1&&l.push("..."),s<e&&l.push(e),l.map((p,c)=>kt(kn,{page:p,currentPage:t,onClick:typeof p=="number"?()=>o(p):void 0},c))};import{jsx as be,jsxs as Tt}from"react/jsx-runtime";var St=({currentPage:e=1,totalPages:t=1,onPageChange:o,itemsPerPage:r=0,totalItems:a=0,id:i="pagination"})=>{let s=c=>{c>=1&&c<=t&&o?.(c)},l=r===0?1:r*(e-1)+1,p=e===t?a:Math.min(l+r-1,a);return Tt("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10 sm:gap-y-0",children:[a&&be("section",{className:"text-[#717171] text-[12px]",children:Tt("p",{className:"",children:["Showing ",l," - ",p," of ",a]})}),be("div",{className:"flex items-center justify-center sm:justify-end ",children:Tt("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[be("button",{onClick:()=>s(e-1),id:`${i}-prev-button`,disabled:e===1,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:be(Tn,{className:"size-5"})}),dr({currentPage:e,totalPages:t,handlePageClick:s}),be("button",{onClick:()=>s(e+1),id:`${i}-next-button`,disabled:e===t,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:be(Sn,{className:"size-5"})})]})})]})};import{flexRender as pr}from"@tanstack/react-table";import{jsx as te,jsxs as Fn}from"react/jsx-runtime";var mr=({table:e,isMobile:t,onRowClick:o,id:r})=>te("div",{className:n("relative w-full rounded-b border-0",{}),children:Fn("table",{id:r??"table",className:"w-full overflow-x-scroll",children:[te("thead",{children:e.getHeaderGroups().map(a=>te("tr",{className:n(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:a.headers.map(i=>te("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",colSpan:i.colSpan,style:{width:i.getSize()},children:i.isPlaceholder?null:te("div",{className:n("flex items-center",{"cursor-pointer select-none":i.column.getCanSort()}),onClick:i.column.getToggleSortingHandler(),children:i.isPlaceholder?null:pr(i.column.columnDef.header,i.getContext())})},i.id))},a.id))}),te("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(a=>te("tr",{className:n("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":o}),onClick:()=>o?o(a):{},children:a.getVisibleCells().map(i=>te("td",{className:n("",{}),children:te("div",{className:n("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:pr(i.column.columnDef.cell,i.getContext())})},i.id))},a.id))})]})});import{Download as ei,ListFilter as ti,RotateCw as oi}from"lucide-react";import{useEffect as zn,useState as $n}from"react";import{useForm as Zn,Controller as it}from"react-hook-form";import*as Ft from"react";import*as le from"@radix-ui/react-radio-group";import{jsx as et}from"react/jsx-runtime";var tt=Ft.forwardRef(({className:e,...t},o)=>et(le.Root,{className:n("grid gap-2",e),...t,ref:o}));tt.displayName=le.Root.displayName;var ot=Ft.forwardRef(({className:e,...t},o)=>et(le.Item,{ref:o,className:n(`aspect-square h-4 w-4 rounded-full border border-[#808080] text-primary-main ring-offset-background focus-visible:outline-none
8
8
  focus-visible:border-purplring-purple-200 focus-visible:!ring-primary-main focus-visible:!ring-status-success-bg focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-purple-200
9
- focus:border-purplring-purple-200 focus:!ring-primary-main focus:!ring-status-success-bg focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-purple-200 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:et(se.Indicator,{className:"rounded-full flex items-center justify-center",children:et("div",{className:"h-2 w-2 bg-current text-current rounded-full transition"})})}));ot.displayName=se.Item.displayName;import{v4 as Kn}from"uuid";import*as rt from"react";import{ChevronLeft as En,ChevronRight as In}from"lucide-react";import*as mr from"react";import{DayPicker as An}from"react-day-picker";import{jsx as $e}from"react/jsx-runtime";function Et({className:e,classNames:t,showOutsideDays:o=!0,...r}){return $e(An,{showOutsideDays:o,className:n("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium hidden",caption_dropdowns:"flex justify-center gap-1 !px-4",nav:"space-x-1 flex items-center",nav_button:n(A({variant:"outlined"}),"h-7 w-7 bg-transparent !text-black !border-0 p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:n(A({variant:"primary"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100 bg-white text-black/60"),day_range_end:"day-range-end",day_selected:"!bg-primary-main !text-white hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({...a})=>$e(En,{className:"h-4 w-4",...a}),IconRight:({...a})=>$e(In,{className:"h-4 w-4",...a}),Dropdown:({value:a,onChange:i,children:s})=>{let m=mr.Children.toArray(s).map(d=>({label:d.props.children,value:d.props.value?.toString()??""})),c=d=>{i?.({target:{value:d}})};return $e("div",{className:"",children:$e(He,{options:m,value:m?.find(d=>d?.value===a?.toString()),onChange:d=>c(d?.value),className:"!border-0 !max-w-max"})})}},disabled:a=>a>new Date||a<new Date("1900-01-01"),...r})}Et.displayName="Calendar";import{jsx as D,jsxs as Ze}from"react/jsx-runtime";var ur=rt.forwardRef(({value:e,onClick:t,error:o,status:r},a)=>D("div",{className:"relative mt-2 rounded-md shadow-sm !w-full",children:Ze("button",{className:n(z({status:r}),"flex items-center gap-2 text",{"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-purple-600":!o,"text-red-900 ring-red-300 placeholder:text-red-300 focus:ring-red-500":o}),onClick:t,ref:a,type:"button",children:[Ze("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-calendar-icon lucide-calendar",children:[D("path",{d:"M8 2v4"}),D("path",{d:"M16 2v4"}),D("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),D("path",{d:"M3 10h18"})]}),e||"Select a date"]})}));ur.displayName="DateInputButton";var fr=(e,t)=>e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):t;function Mn({value:e,className:t,placeholder:o="Pick a date",...r}){return D(B,{asChild:!0,className:n("cursor-pointer",t),children:D(ur,{value:fr(e,o),error:r?.error})})}function Bn({children:e,captionLayout:t="dropdown-buttons",fromYear:o=1900,toYear:r=new Date().getFullYear(),disableDate:a,modal:i,...s}){let[l,m]=rt.useState(!1);return Ze(j,{modal:i,open:a?!1:l,onOpenChange:m,children:[e,D(Z,{align:"start",className:"w-auto p-0",children:D(Et,{mode:"single",fromYear:o,toYear:r,captionLayout:t,initialFocus:!0,classNames:{},showOutsideDays:!1,...s})})]})}var Vn=(e,t="yyyy-MM-dd")=>e?String(fr(new Date(e),t)):"N/A",It=({label:e,optional:t,onChange:o,error:r,helpText:a,value:i})=>Ze("div",{className:"block w-full",children:[e&&Ze("div",{className:"flex justify-between w-full",children:[D(R,{className:"block text-sm font-medium mb-0 text-pallet-text-white-black",children:e}),t&&D("span",{className:"text-sm leading-6 text-gray-500",id:"email-optional",children:"Optional"})]}),D(Bn,{selected:i?new Date(i):void 0,onSelect:s=>{let l=s?Vn(s,"yyyy-MM-dd"):"";o(l)},disabled:s=>s<new Date("2000-01-01")||s>new Date("3000-01-01"),fromYear:2e3,toYear:3e3,children:D("div",{children:D(Mn,{status:r?"error":"default",value:i?new Date(i):void 0})})}),r&&D("p",{className:"mt-2 text-sm text-red-600",id:`${name}-error`,children:r}),a&&D("p",{className:"mt-2 text-sm text-gray-500",id:`${name}-description`,children:a})]});import{create as On}from"zustand";var at="filter_",Gn=e=>{let t=new URLSearchParams(window?.location?.search);Object.keys(e).forEach(o=>{t.set(`${at}${o}`,e[o])}),window.history.replaceState({},"",`${window.location.pathname}?${t}`)},Hn=()=>{let e=new URLSearchParams(window.location.search),t=[];e.forEach((o,r)=>{r.startsWith(at)&&t.push(r)}),t.forEach(o=>e.delete(o)),window.history.replaceState({},"",`${window.location.pathname}?${e}`)},_n=()=>{if(typeof window>"u")return{};let e=new URLSearchParams(window.location.search),t={};return e.forEach((o,r)=>{r.startsWith(at)&&(t[r.replace(at,"")]=o)}),t},Wn=()=>On()(e=>({filters:_n(),resetFilters:()=>{e({filters:null}),Hn()},upDateFilter:t=>e(o=>{let r;return typeof t=="function"?r=t(o.filters):r={...o?.filters,...t},Gn(r),{filters:r}})})),nt=()=>Wn();import{PopoverClose as gr}from"@radix-ui/react-popover";import{Fragment as Un,jsx as N,jsxs as st}from"react/jsx-runtime";var hr=({filters:e,values:t={},setAppliedFilters:o,id:r="filter-content"})=>{let a=nt(),{upDateFilter:i,resetFilters:s,filters:l}=a(),[m,c]=$n(!0),d=()=>{c(!0)},{control:u,handleSubmit:f}=Zn({defaultValues:l??t});zn(()=>{m&&o&&(o(l),c(!1))},[m]);let h=()=>{s(),d()};return st("form",{onSubmit:f(p=>{let y=Object.fromEntries(Object.entries(p??{}).filter(([,g])=>g!=null&&g!==""));i(y),d()}),children:[N("div",{className:"space-y-3",children:e.map(p=>{switch(p.type){case"input":return N("div",{children:N(it,{name:p.key,control:u,render:({field:y,formState:g})=>N(M,{error:g?.errors?.root?.message,placeholder:p?.placeholder,id:`${r}-${p.key}`,...y,...p})})},p.key);case"drop-down":return N("div",{children:N(it,{name:p.key,control:u,render:({field:{value:y,onChange:g},formState:{errors:x}})=>N(He,{label:p?.label,options:p?.options,value:p?.options?.find(P=>String(P?.value)===String(y)),onChange:P=>g(P?.value),error:x?.[p?.key]?.message,modal:!0,placeholder:p?.placeholder,className:"!h-10",id:`${r}-${p.key}`})})},p.key);case"radio":return N("div",{children:N(it,{name:p.key,control:u,render:({field:{value:y,onChange:g}})=>st(Un,{children:[N(R,{className:"block text-sm font-medium mb-2 text-pallet-text-white-black",children:p?.label}),N(tt,{onValueChange:g,defaultValue:y,"aria-label":p?.label,id:`${r}-${p.key}`,children:N("div",{className:"flex items-center gap-2",children:p?.options?.map(x=>st("div",{className:"flex items-center space-x-2",children:[N(ot,{value:x?.value,id:`${r}-${p.key}-${x?.value}`}),N("label",{htmlFor:`${r}-${p.key}-${x?.value}`,className:"text-xs",children:x?.label})]},Kn()))})})]})})},p.key);case"date":return N("div",{children:N(it,{name:p.key,control:u,render:({field:y})=>N(It,{onChange:y?.onChange,value:y?.value,label:p?.label})})},p.key);default:return null}})}),st("div",{style:{marginTop:28},className:"grid grid-cols-2 gap-2",children:[N(gr,{onClick:h,className:n(A({variant:"outlined",size:"sm"})),type:"button",id:`${r}-reset-button`,children:"Reset"}),N(gr,{className:n(A({size:"sm"})),type:"submit",id:`${r}-submit-button`,children:"Submit"})]})]})};import{ListFilter as qn}from"lucide-react";import{useEffect as Xn,useState as Yn}from"react";import{Fragment as yr,jsx as At}from"react/jsx-runtime";var vr=({setAppliedFilters:e})=>{let[t,o]=Yn(!0),r=nt(),{filters:a}=r();console.log("cachedFilters",a);let i=Object.keys(a??{});return Xn(()=>{t&&e&&(e(a),o(!1))},[t]),At(yr,{children:i?.length?At("div",{className:"flex rounded-s-md bg-primary-main p-1 text-white text-sm px-2.5",children:i?.length}):At(yr,{})})};import{useEffect as jn,useState as Jn}from"react";var Cr=()=>{let[e,t]=Jn(!1);return jn(()=>(t(!0),()=>t(!1)),[]),{mounted:e,MounClient:r=>e?{children:r}:null}};import{jsx as we,jsxs as Qn}from"react/jsx-runtime";var Mt=({filters:e,setAppliedFilters:t,isOpen:o=!1,id:r="filter-popover"})=>{let{mounted:a}=Cr();return a?we("div",{className:"",children:we(ae,{id:`${r}-filter-popover`,defaultOpen:o,trigger:Qn("button",{title:"Filter",className:n("!border-[#DEDEDE] !text-gray-800 !p-0 flex items-center",A({variant:"outlined",size:"sm"})),type:"button",children:[we("span",{className:"!px-[10px] !py-[8px]",children:we(qn,{className:"w-4 h-4",size:5})}),we(vr,{setAppliedFilters:t})]}),contentClassName:"!border border-gray-200 pt-2",children:we(hr,{filters:e,setAppliedFilters:t,id:r})})}):null};import{Fragment as ri,jsx as k,jsxs as lt}from"react/jsx-runtime";var Bt=({onRefetch:e,search:t,FilterMenu:o,ExtraNode:r,onExport:a,download:i,isRefetching:s,filterListOptions:l=[],setAppliedFilters:m,id:c="table-toolbar"})=>{let d=f=>{t?.onSearch?.(f)},u=()=>{try{e?.()}catch(f){console.error("Error while refetching data",f)}};return k(ri,{children:(e||t?.enabled||o||r||a)&&lt("div",{className:"w-full flex flex-col sm:!flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[k("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:lt("div",{className:" w-full flex gap-x-3",children:[t?.enabled&&k("section",{className:"sm:w-56",children:k(bt,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:d,debounce:t?.debounceRate,id:`${c}-search-input`})}),lt("div",{className:" flex gap-2",children:[e&&k(ue,{onClick:u,title:"Refetch Data",disabled:s,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",id:`${c}-refetch-button`,children:k(oi,{className:n("w-4 h-4",{"animate-spin":s}),size:5})}),l?.length?k(Mt,{setAppliedFilters:m,filters:l,id:`${c}-filter-popover`}):null,o&&k(ae,{id:`${c}-deprecated-filter-popover`,trigger:k("button",{title:"Filter",className:n("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",A({variant:"outlined",size:"sm"})),children:k(ti,{className:"w-4 h-4",size:5})}),children:o})]})]})}),k("div",{className:"flex items-start flex-col gap-2 justify-center",children:k("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:lt("div",{className:"flex gap-2",children:[r&&r,a&&k(ue,{variant:"primary",onClick:a,size:"sm",id:`${c}-export-button`,children:"Export"}),i?.enabled&&k(ue,{variant:"primary",leftNode:k(ei,{className:"w-4 h-5",size:5}),onClick:i?.onDownload,id:i.buttonId,size:"sm",children:i?.buttonText})]})})})]})})};import{jsx as oe,jsxs as br}from"react/jsx-runtime";var ni=({table:e,isMobile:t=!1,onRowClick:o,id:r="table",onRefetch:a,isRefetching:i,FilterMenu:s,ExtraNode:l,onExport:m,search:c={enabled:!1,debounceRate:700},download:d={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:u,pagination:f,filterListOptions:h,setAppliedFilters:C})=>br("div",{className:n("relative w-full rounded-b border-0 overflow-x-auto"),children:[oe(Bt,{onRefetch:a,search:c,FilterMenu:s,ExtraNode:l,onExport:m,download:d,isRefetching:i,filterListOptions:h,setAppliedFilters:C,id:r}),oe("main",{className:"w-full overflow-x-auto mt-5",children:u?br("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[oe(ai,{size:20,className:"animate-spin"}),oe("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?oe("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:oe("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):oe("div",{className:"flex flex-col gap-2",children:oe(pr,{table:e,isMobile:t,onRowClick:o,id:r})})}),!u&&f?.enabled&&e.getRowModel().rows.length>0&&oe(St,{...f,currentPage:f?.currentPage??1,totalPages:f?.totalPages??Math.ceil((f?.totalItems??0)/Math.max(f?.itemsPerPage??1,1))??1,onPageChange:p=>f?.onPageChange?.(p),id:r})]});import{createContext as ii,useMemo as si}from"react";import{jsx as ci}from"react/jsx-runtime";var ct=ii(void 0),li=({permissions:e,children:t})=>{let o=si(()=>e,[e]);return ci(ct.Provider,{value:o,children:t})};import{useCallback as di,useContext as pi,useMemo as mi}from"react";var xr=()=>pi(ct),Vt=e=>{let t=xr(),o=di(a=>{if(!t||!a||t.some(d=>d.resource==="all"&&d.action==="administrator"))return!0;let{resource:s,action:l}=a,m=t.filter(d=>d.resource===s);return m.some(d=>d.action===l)?!0:l==="read"?m.some(d=>d.action==="write"):!1},[e]);return{hasPermission:mi(()=>o(e),[t,e]),validatePermission:o}};import{Fragment as wr,jsx as Nr}from"react/jsx-runtime";var ui=({permission:e,children:t})=>{let{hasPermission:o}=Vt(e||{});return e?Nr(wr,{children:o?t:null}):Nr(wr,{children:t})};var Pr={USD:"$",CAD:"CA$",EUR:"\u20AC",AED:"AED",AFN:"Af",ALL:"ALL",AMD:"AMD",ARS:"AR$",AUD:"AU$",AZN:"man.",BAM:"KM",BDT:"Tk",BGN:"BGN",BHD:"BD",BIF:"FBu",BND:"BN$",BOB:"Bs",BRL:"R$",BWP:"BWP",BYN:"Br",BZD:"BZ$",CDF:"CDF",CHF:"CHF",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"Dkr",DOP:"RD$",DZD:"DA",EEK:"Ekr",EGP:"EGP",ERN:"Nfk",ETB:"Br",GBP:"\xA3",GEL:"GEL",GHS:"GH\u20B5",GNF:"FG",GTQ:"GTQ",HKD:"HK$",HNL:"HNL",HRK:"kn",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",INR:"\u20B9",IQD:"IQD",IRR:"IRR",ISK:"Ikr",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"Ksh",KHR:"KHR",KMF:"CF",KRW:"\u20A9",KWD:"KD",KZT:"KZT",LBP:"L.L.",LKR:"SLRs",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"MDL",MGA:"MGA",MKD:"MKD",MMK:"MMK",MOP:"MOP$",MUR:"MURs",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"Nkr",NPR:"NPRs",NZD:"NZ$",OMR:"OMR",PAB:"B/.",PEN:"S/.",PHP:"\u20B1",PKR:"PKRs",PLN:"z\u0142",PYG:"\u20B2",QAR:"QR",RON:"RON",RSD:"din.",RUB:"RUB",RWF:"RWF",SAR:"SR",SDG:"SDG",SEK:"Skr",SGD:"S$",SOS:"Ssh",SYP:"SY\xA3",THB:"\u0E3F",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",UYU:"$U",UZS:"UZS",VEF:"Bs.F.",VND:"\u20AB",XAF:"F CFA",XOF:"CFA",YER:"YR",ZAR:"R",ZMK:"ZK",ZWL:"ZWL$"},Ke=class Ke{static getCurrencyLocaleMap(t){return{XOF:"fr",XAF:"fr"}[t]||"en"}static koboToNaira(t){return+t/100}static nairaToKobo(t){return+t*100}static getCurrencySymbol(t){return Pr[t]||t}};Ht(Ke,"formatAmountAndCurrency",(t,o,r)=>{let a=new Intl.NumberFormat(r?.locale||Ke.getCurrencyLocaleMap(t),{maximumFractionDigits:3,style:"currency",currency:t,currencyDisplay:"symbol"}).format(r?.convertToMajorCurrency?Ke.koboToNaira(Number(o)):Number(o)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),i=Pr[t]||t;return a.replace(t,i)});var Rr=Ke;import Ot from"dayjs";var Lr=class{static getDateLibrary(){return Ot()}static formatTimestampToDate(t,o){return Ot.unix(t).format(o||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return Ot(t).unix()}};export{Rr as AmountAction,Ra as Banner,ue as Button,It as CalendarInput,Ea as CopyableLabel,ga as Country,Pr as CurrencySymbolMap,Lr as DateAction,bt as DebouncedInput,Va as DevBanner,yt as Dialog,Ka as Drawer,za as DrawerClose,xt as DrawerRoot,Mt as FilterPopover,ne as FlagComponent,R as FormLabel,ui as HasResourcePermission,M as Input,Pe as Loader,tn as LocaleSelector,xa as OTPInput,Bt as PageDataToolbar,St as Pagination,co as PasswordInput,ct as PermissionsContext,li as PermissionsProvider,Ro as PhoneInput,ae as Popover,Z as PopoverContent,j as PopoverRoot,B as PopoverTrigger,tt as RadioGroup,ot as RadioGroupItem,ge as ScrollArea,He as Select,Rn as Sidebar,Dn as Status,ni as Table,he as TextOverflow,po as Textarea,Ue as Tooltip,pt as TooltipContent,zt as TooltipProvider,$t as TooltipRoot,Zt as TooltipTrigger,A as buttonVariants,n as cn,Vt as useHasPermission,xr as usePermissions};
9
+ focus:border-purplring-purple-200 focus:!ring-primary-main focus:!ring-status-success-bg focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-purple-200 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:et(le.Indicator,{className:"rounded-full flex items-center justify-center",children:et("div",{className:"h-2 w-2 bg-current text-current rounded-full transition"})})}));ot.displayName=le.Item.displayName;import{v4 as Kn}from"uuid";import*as rt from"react";import{ChevronLeft as En,ChevronRight as In}from"lucide-react";import*as ur from"react";import{DayPicker as An}from"react-day-picker";import{jsx as $e}from"react/jsx-runtime";function Et({className:e,classNames:t,showOutsideDays:o=!0,...r}){return $e(An,{showOutsideDays:o,className:n("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium hidden",caption_dropdowns:"flex justify-center gap-1 !px-4",nav:"space-x-1 flex items-center",nav_button:n(M({variant:"outlined"}),"h-7 w-7 bg-transparent !text-black !border-0 p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:n(M({variant:"primary"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100 bg-white text-black/60"),day_range_end:"day-range-end",day_selected:"!bg-primary-main !text-white hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({...a})=>$e(En,{className:"h-4 w-4",...a}),IconRight:({...a})=>$e(In,{className:"h-4 w-4",...a}),Dropdown:({value:a,onChange:i,children:s})=>{let p=ur.Children.toArray(s).map(d=>({label:d.props.children,value:d.props.value?.toString()??""})),c=d=>{i?.({target:{value:d}})};return $e("div",{className:"",children:$e(He,{options:p,value:p?.find(d=>d?.value===a?.toString()),onChange:d=>c(d?.value),className:"!border-0 !max-w-max"})})}},disabled:a=>a>new Date||a<new Date("1900-01-01"),...r})}Et.displayName="Calendar";import{jsx as D,jsxs as Ze}from"react/jsx-runtime";var fr=rt.forwardRef(({value:e,onClick:t,error:o,status:r},a)=>D("div",{className:"relative mt-2 rounded-md shadow-sm !w-full",children:Ze("button",{className:n($({status:r}),"flex items-center gap-2 text",{"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-purple-600":!o,"text-red-900 ring-red-300 placeholder:text-red-300 focus:ring-red-500":o}),onClick:t,ref:a,type:"button",children:[Ze("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-calendar-icon lucide-calendar",children:[D("path",{d:"M8 2v4"}),D("path",{d:"M16 2v4"}),D("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),D("path",{d:"M3 10h18"})]}),e||"Select a date"]})}));fr.displayName="DateInputButton";var gr=(e,t)=>e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):t;function Mn({value:e,className:t,placeholder:o="Pick a date",...r}){return D(V,{asChild:!0,className:n("cursor-pointer",t),children:D(fr,{value:gr(e,o),error:r?.error})})}function Bn({children:e,captionLayout:t="dropdown-buttons",fromYear:o=1900,toYear:r=new Date().getFullYear(),disableDate:a,modal:i,...s}){let[l,p]=rt.useState(!1);return Ze(j,{modal:i,open:a?!1:l,onOpenChange:p,children:[e,D(K,{align:"start",className:"w-auto p-0",children:D(Et,{mode:"single",fromYear:o,toYear:r,captionLayout:t,initialFocus:!0,classNames:{},showOutsideDays:!1,...s})})]})}var Vn=(e,t="yyyy-MM-dd")=>e?String(gr(new Date(e),t)):"N/A",It=({label:e,optional:t,onChange:o,error:r,helpText:a,value:i})=>Ze("div",{className:"block w-full",children:[e&&Ze("div",{className:"flex justify-between w-full",children:[D(R,{className:"block text-sm font-medium mb-0 text-pallet-text-white-black",children:e}),t&&D("span",{className:"text-sm leading-6 text-gray-500",id:"email-optional",children:"Optional"})]}),D(Bn,{selected:i?new Date(i):void 0,onSelect:s=>{let l=s?Vn(s,"yyyy-MM-dd"):"";o(l)},disabled:s=>s<new Date("2000-01-01")||s>new Date("3000-01-01"),fromYear:2e3,toYear:3e3,children:D("div",{children:D(Mn,{status:r?"error":"default",value:i?new Date(i):void 0})})}),r&&D("p",{className:"mt-2 text-sm text-red-600",id:`${name}-error`,children:r}),a&&D("p",{className:"mt-2 text-sm text-gray-500",id:`${name}-description`,children:a})]});import{create as On}from"zustand";var at="filter_",Gn=e=>{let t=new URLSearchParams(window?.location?.search);Object.keys(e).forEach(o=>{t.set(`${at}${o}`,e[o])}),window.history.replaceState({},"",`${window.location.pathname}?${t}`)},Hn=()=>{let e=new URLSearchParams(window.location.search),t=[];e.forEach((o,r)=>{r.startsWith(at)&&t.push(r)}),t.forEach(o=>e.delete(o)),window.history.replaceState({},"",`${window.location.pathname}?${e}`)},_n=()=>{if(typeof window>"u")return{};let e=new URLSearchParams(window.location.search),t={};return e.forEach((o,r)=>{r.startsWith(at)&&(t[r.replace(at,"")]=o)}),t},Wn=()=>On()(e=>({filters:_n(),resetFilters:()=>{e({filters:null}),Hn()},upDateFilter:t=>e(o=>{let r;return typeof t=="function"?r=t(o.filters):r={...o?.filters,...t},Gn(r),{filters:r}})})),nt=()=>Wn();import{PopoverClose as hr}from"@radix-ui/react-popover";import{Fragment as Un,jsx as N,jsxs as st}from"react/jsx-runtime";var yr=({filters:e,values:t={},setAppliedFilters:o,id:r="filter-content"})=>{let a=nt(),{upDateFilter:i,resetFilters:s,filters:l}=a(),[p,c]=$n(!0),d=()=>{c(!0)},{control:m,handleSubmit:u}=Zn({defaultValues:l??t});zn(()=>{p&&o&&(o(l),c(!1))},[p]);let h=()=>{s(),d()};return st("form",{onSubmit:u(y=>{let f=Object.fromEntries(Object.entries(y??{}).filter(([,g])=>g!=null&&g!==""));i(f),d()}),children:[N("div",{className:"space-y-3",children:e.map(y=>{switch(y.type){case"input":return N("div",{children:N(it,{name:y.key,control:m,render:({field:f,formState:g})=>N(B,{error:g?.errors?.root?.message,placeholder:y?.placeholder,id:`${r}-${y.key}`,...f,...y})})},y.key);case"drop-down":return N("div",{children:N(it,{name:y.key,control:m,render:({field:{value:f,onChange:g},formState:{errors:C}})=>N(He,{label:y?.label,options:y?.options,value:y?.options?.find(P=>String(P?.value)===String(f)),onChange:P=>g(P?.value),error:C?.[y?.key]?.message,modal:!0,placeholder:y?.placeholder,className:"!h-10",id:`${r}-${y.key}`})})},y.key);case"radio":return N("div",{children:N(it,{name:y.key,control:m,render:({field:{value:f,onChange:g}})=>st(Un,{children:[N(R,{className:"block text-sm font-medium mb-2 text-pallet-text-white-black",children:y?.label}),N(tt,{onValueChange:g,defaultValue:f,"aria-label":y?.label,id:`${r}-${y.key}`,children:N("div",{className:"flex items-center gap-2",children:y?.options?.map(C=>st("div",{className:"flex items-center space-x-2",children:[N(ot,{value:C?.value,id:`${r}-${y.key}-${C?.value}`}),N("label",{htmlFor:`${r}-${y.key}-${C?.value}`,className:"text-xs",children:C?.label})]},Kn()))})})]})})},y.key);case"date":return N("div",{children:N(it,{name:y.key,control:m,render:({field:f})=>N(It,{onChange:f?.onChange,value:f?.value,label:y?.label})})},y.key);default:return null}})}),st("div",{style:{marginTop:28},className:"grid grid-cols-2 gap-2",children:[N(hr,{onClick:h,className:n(M({variant:"outlined",size:"sm"})),type:"button",id:`${r}-reset-button`,children:"Reset"}),N(hr,{className:n(M({size:"sm"})),type:"submit",id:`${r}-submit-button`,children:"Submit"})]})]})};import{ListFilter as qn}from"lucide-react";import{useEffect as Xn,useState as Yn}from"react";import{Fragment as vr,jsx as At}from"react/jsx-runtime";var Cr=({setAppliedFilters:e})=>{let[t,o]=Yn(!0),r=nt(),{filters:a}=r();console.log("cachedFilters",a);let i=Object.keys(a??{});return Xn(()=>{t&&e&&(e(a),o(!1))},[t]),At(vr,{children:i?.length?At("div",{className:"flex rounded-s-md bg-primary-main p-1 text-white text-sm px-2.5",children:i?.length}):At(vr,{})})};import{useEffect as jn,useState as Jn}from"react";var br=()=>{let[e,t]=Jn(!1);return jn(()=>(t(!0),()=>t(!1)),[]),{mounted:e,MounClient:r=>e?{children:r}:null}};import{jsx as xe,jsxs as Qn}from"react/jsx-runtime";var Mt=({filters:e,setAppliedFilters:t,isOpen:o=!1,id:r="filter-popover"})=>{let{mounted:a}=br();return a?xe("div",{className:"",children:xe(ne,{id:`${r}-filter-popover`,defaultOpen:o,trigger:Qn("button",{title:"Filter",className:n("!border-[#DEDEDE] !text-gray-800 !p-0 flex items-center",M({variant:"outlined",size:"sm"})),type:"button",children:[xe("span",{className:"!px-[10px] !py-[8px]",children:xe(qn,{className:"w-4 h-4",size:5})}),xe(Cr,{setAppliedFilters:t})]}),contentClassName:"!border border-gray-200 pt-2",children:xe(yr,{filters:e,setAppliedFilters:t,id:r})})}):null};import{Fragment as ri,jsx as k,jsxs as lt}from"react/jsx-runtime";var Bt=({onRefetch:e,search:t,FilterMenu:o,ExtraNode:r,onExport:a,download:i,isRefetching:s,filterListOptions:l=[],setAppliedFilters:p,id:c="table-toolbar"})=>{let d=u=>{t?.onSearch?.(u)},m=()=>{try{e?.()}catch(u){console.error("Error while refetching data",u)}};return k(ri,{children:(e||t?.enabled||o||r||a)&&lt("div",{className:"w-full flex flex-col sm:!flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[k("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:lt("div",{className:" w-full flex gap-x-3",children:[t?.enabled&&k("section",{className:"sm:w-56",children:k(bt,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:d,debounce:t?.debounceRate,id:`${c}-search-input`})}),lt("div",{className:" flex gap-2",children:[e&&k(me,{onClick:m,title:"Refetch Data",disabled:s,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",id:`${c}-refetch-button`,children:k(oi,{className:n("w-4 h-4",{"animate-spin":s}),size:5})}),l?.length?k(Mt,{setAppliedFilters:p,filters:l,id:`${c}-filter-popover`}):null,o&&k(ne,{id:`${c}-deprecated-filter-popover`,trigger:k("button",{title:"Filter",className:n("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",M({variant:"outlined",size:"sm"})),children:k(ti,{className:"w-4 h-4",size:5})}),children:o})]})]})}),k("div",{className:"flex items-start flex-col gap-2 justify-center",children:k("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:lt("div",{className:"flex gap-2",children:[r&&r,a&&k(me,{variant:"primary",onClick:a,size:"sm",id:`${c}-export-button`,children:"Export"}),i?.enabled&&k(me,{variant:"primary",leftNode:k(ei,{className:"w-4 h-5",size:5}),onClick:i?.onDownload,id:i.buttonId,size:"sm",children:i?.buttonText})]})})})]})})};import{jsx as oe,jsxs as xr}from"react/jsx-runtime";var ni=({table:e,isMobile:t=!1,onRowClick:o,id:r="table",onRefetch:a,isRefetching:i,FilterMenu:s,ExtraNode:l,onExport:p,search:c={enabled:!1,debounceRate:700},download:d={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:m,pagination:u,filterListOptions:h,setAppliedFilters:v})=>xr("div",{className:n("relative w-full rounded-b border-0 overflow-x-auto"),children:[oe(Bt,{onRefetch:a,search:c,FilterMenu:s,ExtraNode:l,onExport:p,download:d,isRefetching:i,filterListOptions:h,setAppliedFilters:v,id:r}),oe("main",{className:"w-full overflow-x-auto mt-5",children:m?xr("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[oe(ai,{size:20,className:"animate-spin"}),oe("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?oe("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:oe("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):oe("div",{className:"flex flex-col gap-2",children:oe(mr,{table:e,isMobile:t,onRowClick:o,id:r})})}),!m&&u?.enabled&&e.getRowModel().rows.length>0&&oe(St,{...u,currentPage:u?.currentPage??1,totalPages:u?.totalPages??Math.ceil((u?.totalItems??0)/Math.max(u?.itemsPerPage??1,1))??1,onPageChange:y=>u?.onPageChange?.(y),id:r})]});import{createContext as ii,useMemo as si}from"react";import{jsx as ci}from"react/jsx-runtime";var ct=ii(void 0),li=({permissions:e,children:t})=>{let o=si(()=>e,[e]);return ci(ct.Provider,{value:o,children:t})};import{useCallback as di,useContext as pi,useMemo as mi}from"react";var wr=()=>pi(ct),Vt=e=>{let t=wr(),o=di(a=>{if(!t||!a||t.some(d=>d.resource==="all"&&d.action==="administrator"))return!0;let{resource:s,action:l}=a,p=t.filter(d=>d.resource===s);return p.some(d=>d.action===l)?!0:l==="read"?p.some(d=>d.action==="write"):!1},[e]);return{hasPermission:mi(()=>o(e),[t,e]),validatePermission:o}};import{Fragment as Nr,jsx as Pr}from"react/jsx-runtime";var ui=({permission:e,children:t})=>{let{hasPermission:o}=Vt(e||{});return e?Pr(Nr,{children:o?t:null}):Pr(Nr,{children:t})};var Rr={USD:"$",CAD:"CA$",EUR:"\u20AC",AED:"AED",AFN:"Af",ALL:"ALL",AMD:"AMD",ARS:"AR$",AUD:"AU$",AZN:"man.",BAM:"KM",BDT:"Tk",BGN:"BGN",BHD:"BD",BIF:"FBu",BND:"BN$",BOB:"Bs",BRL:"R$",BWP:"BWP",BYN:"Br",BZD:"BZ$",CDF:"CDF",CHF:"CHF",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"Dkr",DOP:"RD$",DZD:"DA",EEK:"Ekr",EGP:"EGP",ERN:"Nfk",ETB:"Br",GBP:"\xA3",GEL:"GEL",GHS:"GH\u20B5",GNF:"FG",GTQ:"GTQ",HKD:"HK$",HNL:"HNL",HRK:"kn",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",INR:"\u20B9",IQD:"IQD",IRR:"IRR",ISK:"Ikr",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"Ksh",KHR:"KHR",KMF:"CF",KRW:"\u20A9",KWD:"KD",KZT:"KZT",LBP:"L.L.",LKR:"SLRs",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"MDL",MGA:"MGA",MKD:"MKD",MMK:"MMK",MOP:"MOP$",MUR:"MURs",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"Nkr",NPR:"NPRs",NZD:"NZ$",OMR:"OMR",PAB:"B/.",PEN:"S/.",PHP:"\u20B1",PKR:"PKRs",PLN:"z\u0142",PYG:"\u20B2",QAR:"QR",RON:"RON",RSD:"din.",RUB:"RUB",RWF:"RWF",SAR:"SR",SDG:"SDG",SEK:"Skr",SGD:"S$",SOS:"Ssh",SYP:"SY\xA3",THB:"\u0E3F",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",UYU:"$U",UZS:"UZS",VEF:"Bs.F.",VND:"\u20AB",XAF:"F CFA",XOF:"CFA",YER:"YR",ZAR:"R",ZMK:"ZK",ZWL:"ZWL$"},Ke=class Ke{static getCurrencyLocaleMap(t){return{XOF:"fr",XAF:"fr"}[t]||"en"}static koboToNaira(t){return+t/100}static nairaToKobo(t){return+t*100}static getCurrencySymbol(t){return Rr[t]||t}};_t(Ke,"formatAmountAndCurrency",(t,o,r)=>{let a=new Intl.NumberFormat(r?.locale||Ke.getCurrencyLocaleMap(t),{maximumFractionDigits:3,style:"currency",currency:t,currencyDisplay:"symbol"}).format(r?.convertToMajorCurrency?Ke.koboToNaira(Number(o)):Number(o)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),i=Rr[t]||t;return a.replace(t,i)});var Lr=Ke;import Ot from"dayjs";var Dr=class{static getDateLibrary(){return Ot()}static formatTimestampToDate(t,o){return Ot.unix(t).format(o||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return Ot(t).unix()}};export{Lr as AmountAction,Ra as Banner,me as Button,It as CalendarInput,Ea as CopyableLabel,ga as Country,Rr as CurrencySymbolMap,Dr as DateAction,bt as DebouncedInput,Va as DevBanner,yt as Dialog,Ka as Drawer,za as DrawerClose,xt as DrawerRoot,Mt as FilterPopover,ie as FlagComponent,R as FormLabel,ui as HasResourcePermission,B as Input,Pe as Loader,tn as LocaleSelector,xa as OTPInput,Bt as PageDataToolbar,St as Pagination,po as PasswordInput,ct as PermissionsContext,li as PermissionsProvider,Lo as PhoneInput,ne as Popover,K as PopoverContent,j as PopoverRoot,V as PopoverTrigger,tt as RadioGroup,ot as RadioGroupItem,fe as ScrollArea,He as Select,Rn as Sidebar,Dn as Status,ni as Table,ge as TextOverflow,mo as Textarea,Ue as Tooltip,pt as TooltipContent,$t as TooltipProvider,Zt as TooltipRoot,Kt as TooltipTrigger,M as buttonVariants,n as cn,Vt as useHasPermission,wr as usePermissions};
10
10
  //# sourceMappingURL=index.mjs.map