@6thbridge/hexa 0.0.68 → 0.0.70

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,15 @@
1
- var Ar=Object.defineProperty;var Br=(e,t,o)=>t in e?Ar(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Wt=(e,t,o)=>Br(e,typeof t!="symbol"?t+"":t,o);import*as $t from"react";import*as $ from"@radix-ui/react-tooltip";import{clsx as Mr}from"clsx";import{twMerge as Vr}from"tailwind-merge";function n(...e){return Vr(Mr(e))}import{jsx as Le,jsxs as zt}from"react/jsx-runtime";var Zt=$.Provider,Kt=$.Root,Ut=$.Trigger,ut=$t.forwardRef(({className:e,sideOffset:t=2,...o},r)=>Le($.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}));ut.displayName=$.Content.displayName;var Je=({trigger:e,children:t,contentClassName:o,triggerClassName:r,asChild:a=!0,side:i,sideOffset:s,align:l,alignOffset:p,delayDuration:d=100,hasArrow:c=!0,arrowClassName:u,...m})=>Le(Zt,{children:Le(Kt,{delayDuration:d,...m,children:zt("div",{className:"flex justify-center items-center",children:[Le(Ut,{asChild:a,className:r,children:e}),zt(ut,{side:i,sideOffset:s,align:l,alignOffset:p,className:o,children:[t,c&&Le($.Arrow,{className:n("fill-white",u)})]})]})})});Je.displayName="Tooltip";import _r from"react";import*as Xt from"react";import*as ft from"@radix-ui/react-label";import{cva as Or}from"class-variance-authority";import{jsx as Hr}from"react/jsx-runtime";var Gr=Or("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),gt=Xt.forwardRef(({className:e,...t},o)=>Hr(ft.Root,{ref:o,className:n(Gr(),e),...t}));gt.displayName=ft.Root.displayName;import{jsx as Yt,jsxs as Wr}from"react/jsx-runtime";var T=_r.forwardRef(({className:e,children:t,showAsterisk:o,error:r,...a},i)=>Yt(gt,{ref:i,className:n(r&&"text-red-500",e),...a,children:o?Wr("p",{children:[t,Yt("span",{className:"text-red-500",children:"*"})]}):t}));T.displayName="FormLabel";import{jsx as jt,jsxs as zr}from"react/jsx-runtime";var De=({size:e=16,colour:t="primary"})=>zr("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[jt("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),jt("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 qe from"react";import{Slot as $r}from"@radix-ui/react-slot";import{cva as Zr}from"class-variance-authority";import{Fragment as Jt,jsx as ke,jsxs as Kr}from"react/jsx-runtime";var O=Zr("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"}}),se=qe.forwardRef(({className:e,variant:t="primary",size:o,asChild:r=!1,isLoading:a=!1,leftNode:i,rightNode:s,LoaderSize:l,...p},d)=>{let c=r?$r:"button",{children:u,disabled:m,...g}=p,v=qe.useRef(null);return ke(c,{className:n(O({variant:t,size:o,className:e})),ref:v||d,disabled:m||a,...g,children:ke("div",{className:"flex font-medium justify-center items-center gap-2",children:a?ke(Jt,{children:ke("span",{className:"mx-auto",children:ke(De,{size:l,colour:"secondary"})})}):Kr(Jt,{children:[i,u,s]})})})});se.displayName="Button";import*as ht from"react";import{cva as yt}from"class-variance-authority";import Ur from"react";import{jsx as Xr}from"react/jsx-runtime";var Z=Ur.forwardRef(({className:e,children:t,error:o,...r},a)=>{let i=o??t;return i?Xr("p",{ref:a,className:n("text-xs font-normal text-[#F04248]",e),...r,children:i}):null});Z.displayName="ErrorMessage";import Yr from"react";import{jsx as jr}from"react/jsx-runtime";var K=Yr.forwardRef(({className:e,...t},o)=>jr("div",{ref:o,className:n("text-sm text-[#8E98A8",e),...t}));K.displayName="FormDescription";import{jsx as fe,jsxs as Qt}from"react/jsx-runtime";var Jr=yt("!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"}}),eo=ht.forwardRef(({className:e,status:t,type:o,...r},a)=>fe("input",{type:o,className:n(Jr({status:t}),e),ref:a,...r}));eo.displayName="BaseInnerInput";var U=yt("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"}}),qt=yt("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"}}),G=ht.forwardRef(({className:e,status:t="default",disabled:o,error:r,isLoading:a,sideNodeClassName:i,showAsterisk:s,label:l,description:p,...d},c)=>{let u=t;return r&&(u="error"),a&&(u="loading"),o&&(u="prefilled"),Qt("div",{className:"relative space-y-1 w-full",children:[l&&fe(T,{showAsterisk:s,error:r,children:l}),Qt("div",{className:n(U({status:u}),d.leftNode?"pl-0":"",d.rightNode?"pr-0":"",e),children:[d.leftNode?fe("div",{className:n(qt({status:u,side:"left"}),i),children:d.leftNode}):null,fe(eo,{ref:c,disabled:a||o,className:n({"!pl-3":d.leftNode&&t!=="neutral","!pr-3":d.rightNode&&t!=="neutral"}),...d}),d.rightNode?fe("div",{className:n(qt({status:u,side:"right"}),i),children:d.rightNode}):null]}),p&&fe(K,{className:"text-gray-400 text-sm !font-normal",children:p}),fe(Z,{error:r})]})});G.displayName="Input";import{useMemo as ea,useState as co}from"react";import{jsx as to,jsxs as qr}from"react/jsx-runtime";var oo=()=>qr("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[to("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"}),to("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 ro,jsxs as Qr}from"react/jsx-runtime";var ao=()=>Qr("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ro("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"}),ro("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 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:"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 so}from"react/jsx-runtime";var lo=()=>so("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:so("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 J,jsxs as ta}from"react/jsx-runtime";var po=[{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}],mo=({onValidate:e,onChange:t,disableValidation:o,...r})=>{let[a,i]=co(!1),[s,l]=co(po),p=m=>po.map(g=>({...g,validated:g.RegExp.test(m)})),d=m=>{let g=p(m),v=g.every(N=>N.validated);return l(g),v},c=m=>{if(t&&t(m),o)return;let g=m?.target?.value,v=d(g);e&&e(v,g)},u=ea(()=>J("div",{className:"flex items-center gap-2",children:s?.map(m=>ta("div",{className:n("text-xs flex items-center gap-0.5",{"text-[#62C554]":m?.validated,"text-[#8E98A8]":!m?.validated}),children:[J("span",{className:"",children:m?.validated?J(io,{}):J(lo,{})}),J("span",{className:"",children:m?.label})]},m?.key))}),[s]);return J(G,{sideNodeClassName:"!border-l-0",rightNode:a?J("button",{type:"button",onClick:()=>i(m=>!m),children:J(oo,{})}):J("button",{type:"button",onClick:()=>i(m=>!m),children:J(ao,{})}),type:a?"text":"password",onChange:c,description:!o&&u,...r})};mo.displayName="PasswordInput";import{cva as oa}from"class-variance-authority";import{jsx as Qe,jsxs as ra}from"react/jsx-runtime";var Ds=oa("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"}}),uo=({className:e,status:t="default",disabled:o,error:r,isLoading:a,showAsterisk:i,label:s,description:l,...p})=>{let d=t;return r&&(d="error"),a&&(d="loading"),o&&(d="prefilled"),ra("div",{className:"relative space-y-1",children:[Qe(T,{showAsterisk:i,error:r,children:s}),Qe("textarea",{className:n("min-h-[80px]",U({status:d}),e),disabled:a||o,...p}),Qe(K,{className:"text-gray-400 text-sm !font-normal",children:l}),Qe(Z,{error:r})]})};uo.displayName="Textarea";import*as ge from"react";import*as le from"react";import{Command as A}from"cmdk";import{Search as la}from"lucide-react";import*as Te from"react";import*as w from"@radix-ui/react-dialog";import{jsx as fo,jsxs as aa}from"react/jsx-runtime";var go=()=>aa("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:[fo("path",{d:"M18 6 6 18"}),fo("path",{d:"m6 6 12 12"})]});import{Fragment as sa,jsx as I,jsxs as ye}from"react/jsx-runtime";var na=w.Root,ia=w.Trigger,ho=w.Portal,yo=Te.forwardRef(({className:e,...t},o)=>I(w.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}));yo.displayName=w.Overlay.displayName;var vt=Te.forwardRef(({className:e,hideCloseButton:t,children:o,...r},a)=>ye(ho,{children:[I(yo,{}),ye(w.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&&ye(w.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:[I(go,{}),I("span",{className:"sr-only",children:"Close"})]})]})]}));vt.displayName=w.Content.displayName;var vo=({className:e,...t})=>I("div",{className:n("flex flex-col space-y-1.5 text-left",e),...t});vo.displayName="DialogHeader";var Co=({className:e,...t})=>I("div",{className:n("flex flex-row justify-end sm:space-x-2",e),...t});Co.displayName="DialogFooter";var bo=Te.forwardRef(({className:e,...t},o)=>I(w.Title,{ref:o,className:n("text-xl font-semibold leading-none tracking-tight",e),...t}));bo.displayName=w.Title.displayName;var xo=Te.forwardRef(({className:e,...t},o)=>I(w.Description,{ref:o,className:n("text-sm text-gray-500",e),...t}));xo.displayName=w.Description.displayName;var Ct=({trigger:e=void 0,children:t,open:o,onOpenChange:r,hideCloseButton:a,footer:i,title:s,description:l,contentClassName:p,headerClassName:d,titleClassName:c,descriptionClassName:u,footerClassName:m,asChild:g=!0,onOpenAutoFocus:v,onCloseAutoFocus:N,onEscapeKeyDown:h,onInteractOutside:y,onPointerDownOutside:C,...L})=>ye(na,{...L,open:o,onOpenChange:r,children:[I(ia,{asChild:g,children:e}),I(ho,{children:ye(vt,{className:p,hideCloseButton:a,onOpenAutoFocus:v,onCloseAutoFocus:N,onEscapeKeyDown:h,onPointerDownOutside:C,onInteractOutside:y,children:[s||l?ye(vo,{className:d,children:[s&&I(bo,{className:c,children:s}),l&&I(xo,{className:u,children:l})]}):I(sa,{}),t,i&&I(Co,{className:m,children:i})]})})]});Ct.displayName=w.Dialog.displayName;import{Fragment as Ws,jsx as q,jsxs as pa}from"react/jsx-runtime";var Se=le.forwardRef(({className:e,...t},o)=>q(A,{ref:o,className:n("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Se.displayName=A.displayName;var Fe=le.forwardRef(({className:e,CommandInputContainerClassName:t,loading:o,...r},a)=>pa("div",{className:n("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[o?q(De,{size:16,colour:"secondary"}):q(la,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),q(A.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})]}));Fe.displayName=A.Input.displayName;var Ee=le.forwardRef(({className:e,...t},o)=>q(A.List,{ref:o,className:n("overflow-y-auto overflow-x-hidden",e),...t}));Ee.displayName=A.List.displayName;var Ie=le.forwardRef((e,t)=>q(A.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ie.displayName=A.Empty.displayName;var Ae=le.forwardRef(({className:e,...t},o)=>q(A.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}));Ae.displayName=A.Group.displayName;var ca=le.forwardRef(({className:e,...t},o)=>q(A.Separator,{ref:o,className:n("-mx-1 h-px bg-border",e),...t}));ca.displayName=A.Separator.displayName;var Be=le.forwardRef(({className:e,...t},o)=>q(A.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}));Be.displayName=A.Item.displayName;var da=({className:e,...t})=>q("span",{className:n("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});da.displayName="CommandShortcut";import*as wo from"react";import*as X from"@radix-ui/react-popover";import{jsx as Me,jsxs as ma}from"react/jsx-runtime";var Q=X.Root,H=X.Trigger,Y=wo.forwardRef(({className:e,align:t="center",sideOffset:o=4,portal:r=!0,...a},i)=>r?Me(X.Portal,{children:Me(X.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})}):Me(X.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}));Y.displayName=X.Content.displayName;var ce=({trigger:e,children:t,open:o,onOpenChange:r,contentClassName:a,asChild:i=!0,align:s,side:l,alignOffset:p,triggerClassName:d,sideOffset:c,onOpenAutoFocus:u,onCloseAutoFocus:m,portal:g=!0,id:v="popover",...N})=>ma(Q,{...N,open:o,onOpenChange:r,children:[Me(H,{asChild:i,className:d,id:`${v}-trigger`,children:e}),Me(Y,{alignOffset:p,sideOffset:c,side:l,align:s,className:a,onOpenAutoFocus:u,onCloseAutoFocus:m,portal:g,id:`${v}-content`,children:t})]});ce.displayName=X.Root.displayName;import*as bt from"react";import*as _ from"@radix-ui/react-scroll-area";import{jsx as Ve,jsxs as ua}from"react/jsx-runtime";var ve=bt.forwardRef(({className:e,viewPortClassName:t,children:o,...r},a)=>ua(_.Root,{ref:a,className:n("relative overflow-hidden",e),...r,children:[Ve(_.Viewport,{className:n("h-full w-full rounded-[inherit]",t),children:o}),Ve(No,{}),Ve(_.Corner,{})]}));ve.displayName=_.Root.displayName;var No=bt.forwardRef(({className:e,orientation:t="vertical",...o},r)=>Ve(_.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:Ve(_.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));No.displayName=_.ScrollAreaScrollbar.displayName;import{jsx as ee,jsxs as et}from"react/jsx-runtime";var Po=({className:e,value:t,placeholder:o="",status:r,disabled:a,id:i})=>ee(H,{asChild:!0,disabled:a,id:i??"searchable-trigger",children:et("button",{disabled:a,className:n(U({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...",ee("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:ee("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"})})]})}),tt=({options:e=[],value:t,onChange:o,containerClassName:r,placeholder:a,disabled:i,loading:s,optionComponent:l,children:p,modal:d=!1,hideSearch:c,className:u,inputValue:m,onValueChange:g,onInputValueChange:v})=>{let[N,h]=ge.useState(!1),y=ge.useRef(null),[C,L]=ge.useState(void 0);return ge.useLayoutEffect(()=>{y.current&&L(y.current.clientWidth)},[y.current]),et(Q,{modal:d,open:N,onOpenChange:h,children:[ee("div",{className:n("w-full",u),ref:y,children:p}),ee(Y,{portal:!d,className:"p-0 min-w-[200px]",style:{width:C},children:et(Se,{className:n("relative max-h-[270px]",{"mt-2":!c}),children:[!c&&ee(Fe,{loading:s,placeholder:a??"Search options...",onValueChange:v,value:m,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),ee(ve,{viewPortClassName:"max-h-[225px]",className:n("w-full px-0 h-full overflow-y-auto",r),children:et(Ee,{children:[!c&&ee(Ie,{children:"No result found."}),ee(Ae,{className:"w-full",children:e?.map(f=>ee(Be,{defaultValue:t?.label,value:f.label,disabled:i,onSelect:()=>{o(f),h(!1),g?.(f?.value)},id:f.value,children:l?l(f):f.label},f.value))})]})})]})})]})};var xt=[{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"}],Ro=()=>{let e={};return xt?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};import*as He from"react";import*as ot from"react-phone-number-input";import ha from"react-phone-number-input/flags";import{jsx as Oe,jsxs as ga}from"react/jsx-runtime";var fa=e=>ga("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[Oe("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",Oe("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"}),Oe("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),Oe("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),Oe("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Lo=fa;import{jsx as x,jsxs as Ge}from"react/jsx-runtime";var Do=He.forwardRef(({className:e,onChange:t,defaultCountry:o="NG",modal:r,showAsterisk:a,label:i,description:s,error:l,...p},d)=>{let c=u=>x(ya,{...u,status:p.status,modal:r});return Ge("div",{className:"relative space-y-1",children:[x(T,{showAsterisk:a,error:l,children:i}),x(ot.default,{ref:d,className:n("flex",e),flagComponent:de,countrySelectComponent:c,inputComponent:ko,defaultCountry:o,onChange:u=>{t&&t?.(u)},...p}),x(K,{className:"text-gray-400 text-sm !font-normal",children:s}),x(Z,{error:l})]})});Do.displayName="PhoneInput";var ko=He.forwardRef(({className:e,...t},o)=>x(G,{className:n("!rounded-s-none h-10",e),...t,ref:o}));ko.displayName="InputComponent";var ya=({disabled:e,value:t,onChange:o,options:r,status:a,modal:i})=>{let s=He.useCallback(l=>{o(l)},[o]);return Ge(Q,{modal:i,children:[x(H,{disabled:e,children:Ge("div",{className:n(U({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:[x(de,{country:t,countryName:t}),x("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:x("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"})})]})}),x(Y,{portal:!i,className:"w-[200px] md:w-[300px] p-0",children:x(Se,{children:x(Ee,{children:Ge(ve,{className:"h-72",children:[x(Fe,{placeholder:"Search country..."}),x(Ie,{children:"No country found."}),x(Ae,{children:r.filter(l=>l.value).map(l=>Ge(Be,{className:"gap-2",onSelect:()=>s(l.value),children:[x(de,{country:l.value,countryName:l.label}),x("span",{className:"flex-1 text-sm",children:l.label}),l.value&&x("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${ot.getCountryCallingCode(l.value)}`}),x("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:n("ml-auto",l.value===t?"opacity-100":"opacity-0"),children:x("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${l.value}-${l.label}`))})]})})})})]})},de=({country:e,countryName:t,className:o})=>{let r=ha[e];return e==="GLOBAL"?x("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:x(Lo,{className:"w-full h-[90%]"})}):x("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:r&&x(r,{title:t})})};de.displayName="FlagComponent";import{jsx as j,jsxs as _e}from"react/jsx-runtime";var va=Ro(),Ca=({className:e,value:t,placeholder:o="",status:r,disabled:a})=>j(H,{asChild:!0,disabled:a,id:"country-dropdown",children:_e("button",{disabled:a,className:n(U({status:r}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?_e("div",{className:"flex gap-2 items-center",children:[j(de,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),_e("span",{className:"",children:[" ",va[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"})})]})}),ba=({hideSearch:e=!0,showAsterisk:t,label:o,description:r,error:a,...i})=>{let s=xt?.map(l=>({value:l?.internetCountryCode,label:l?.countryName,...l}));return _e("div",{className:"relative space-y-1",children:[j(T,{showAsterisk:t,error:a,children:o}),j(tt,{options:s,hideSearch:e,optionComponent:l=>_e("div",{className:"w-full flex items-center gap-2",children:[j(de,{country:l?.internetCountryCode,countryName:l?.label,className:"ml-2 !w-6 !h-5"}),j("span",{className:"flex-1 text-sm",children:l?.label})]}),...i,children:j(Ca,{value:i?.value?.value,status:i?.status,placeholder:i?.placeholder??" Select Country"})}),j(K,{className:"text-gray-400 text-sm !font-normal",children:r}),j(Z,{error:a})]})};import{jsx as We,jsxs as xa}from"react/jsx-runtime";var ze=({showAsterisk:e,label:t,description:o,error:r,hideSearch:a=!0,status:i,...s})=>xa("div",{className:"relative space-y-1",children:[We(T,{showAsterisk:e,error:r,children:t}),We(tt,{hideSearch:a,...s,containerClassName:"h-full",children:We(Po,{disabled:s?.disabled,placeholder:s?.placeholder??"Select",status:i,value:s?.value?.label??s?.value?.value,className:s?.className,id:s?.id})}),We(K,{className:"text-gray-400 text-sm !font-normal",children:o}),We(Z,{error:r})]});import wa from"react-otp-input";import{cva as Na}from"class-variance-authority";import{useMemo as Pa}from"react";import{jsx as To}from"react/jsx-runtime";var Ra=Na("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"}}),La=({numInputs:e=4,inputStyle:t,containerStyle:o,placeholder:r="-",status:a,...i})=>{let s=Pa(()=>r||new Array(e).fill("").reduce((d,c)=>d+=c,""),[e,r]);return To(wa,{numInputs:e,placeholder:s,containerStyle:n("w-full",o),inputStyle:n(Ra({status:a}),t),renderInput:l=>To("input",{...l}),...i})};import{useState as Da,useEffect as ka}from"react";import{jsx as R,jsxs as he}from"react/jsx-runtime";var Ta=({type:e})=>e==="gray"?R("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R("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"?R("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:R("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"?R("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R("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"?R("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R("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"})}):R("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R("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"})}),Sa=({type:e="info",title:t,description:o,open:r,showCloseButton:a,bottomNode:i,sideNode:s,onClose:l,showIcon:p=!0})=>{let[d,c]=Da(r);ka(()=>{c(r)},[r]);let u="",m="";switch(e){case"gray":u="#eeeef0",m="#79818c";break;case"info":u="#ebf5fd",m="#70B6F6";break;case"warning":u="#fff8df",m="#ffc700";break;case"success":u="#e0f9f0",m="#49e0aa";break;case"danger":u="#fde8e9",m="#f3777c";break;default:u="#eeeef0",m="#79818c";break}function g(){c(!1),l&&l()}return d?he("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:u||"#ebf5fd"},children:[R("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:m||"#70B6F6"}}),he("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[he("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[p&&R("div",{className:"h-full flex justify-end",children:R(Ta,{type:e})}),he("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[he("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||o)&&he("div",{children:[t&&R("div",{className:"text-sm font-bold text-[#191919]",children:t}),o&&R("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:o})]}),i]}),s]})]}),a&&R("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:R("button",{onClick:g,children:he("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};import{useState as Ea}from"react";import{Copy as Ia,CheckIcon as Aa}from"lucide-react";import{motion as Ba,AnimatePresence as Ma}from"framer-motion";import{jsx as Fa}from"react/jsx-runtime";var Ce=({children:e,mode:t="truncate",className:o,as:r="div",...a})=>Fa(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 be,jsxs as Oa}from"react/jsx-runtime";var Va=({text:e,textToCopy:t,onCopy:o,iconsPosition:r="right",clampText:a=!0,clampMode:i="truncate",isLink:s=!1,textClassName:l})=>{let[p,d]=Ea(!1),c=()=>{navigator.clipboard.writeText(t??e).then(()=>{d(!0),o?.(),setTimeout(()=>d(!1),2e3)})},u=p?Aa:Ia;return Oa("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"&&be(So,{Icon:u,onClick:c,copied:p}),be(Ce,{as:s?"a":"span",mode:a?i:"overflow",className:n({underline:s},l),href:s?e:void 0,children:e}),r==="right"&&be(So,{Icon:u,onClick:c,copied:p})]})},So=({Icon:e,onClick:t,copied:o})=>be(Ma,{mode:"wait",children:be(Ba.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:be(e,{className:`w-5 h-5 ${o?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},o?"check":"copy")});import{useEffect as Fo,useState as Ga}from"react";import{Search as Ha}from"lucide-react";import{jsx as Eo}from"react/jsx-runtime";var wt=({value:e,onChange:t,debounce:o=500,addon:r,...a})=>{let[i,s]=Ga(e??""),l=p=>s(p.target.value);return Fo(()=>{e&&s(e)},[e]),Fo(()=>{let p=setTimeout(()=>{t(i)},o);return()=>clearTimeout(p)},[i,o,t]),Eo(G,{leftNode:r??Eo(Ha,{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 Io}from"react";import{X as _a}from"lucide-react";import{jsx as te,jsxs as xe}from"react/jsx-runtime";var Wa=e=>{let{environment:t,branch:o,version:r,deployTime:a,showBanner:i,onClose:s,initDefault:l,removeFromStorage:p,syncLocalStorageToState:d}=e,c=t||process.env.NEXT_PUBLIC_NODE_ENV;return c!=="staging"&&c!=="sandbox"||(Io(()=>{d()},[d]),Io(()=>{let u;return(c==="staging"||c==="sandbox")&&(u=setInterval(()=>{p(),l()},5*60*1e3)),()=>{u&&clearInterval(u)}},[i,t,s,p,l,c]),!i)?null:xe("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[te("button",{onClick:s,className:"absolute top-2 right-2",children:te(_a,{})}),xe("div",{className:"space-y-2 text-sm",children:[xe("div",{className:"flex gap-2",children:[te("span",{className:"font-medium",children:"Environment:"}),te("span",{className:"text-blue-600 capitalize",children:c})]}),xe("div",{className:"flex gap-2",children:[te("span",{className:"font-medium",children:"Branch:"}),te("span",{className:"text-green-600 capitalize",children:o||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),xe("div",{className:"flex gap-2",children:[te("span",{className:"font-medium",children:"Version:"}),te("span",{className:"text-purple-600",children:r||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),xe("div",{className:"flex gap-2",children:[te("span",{className:"font-medium",children:"Deploy Time:"}),te("span",{className:"text-orange-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};import*as $e from"react";import{Drawer as V}from"vaul";import{cva as Ka}from"class-variance-authority";import{jsx as Ao,jsxs as za}from"react/jsx-runtime";var Bo=()=>za("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:[Ao("path",{d:"M18 6 6 18"}),Ao("path",{d:"m6 6 12 12"})]});import{useState as $a,useEffect as Za}from"react";function Mo(){let[e,t]=$a({width:100,height:100});return Za(()=>{function o(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",o),o(),()=>window.removeEventListener("resize",o)},[]),e}import{Fragment as qa,jsx as S,jsxs as we}from"react/jsx-runtime";var Nt=({shouldScaleBackground:e=!0,...t})=>S(V.Root,{direction:"right",shouldScaleBackground:e,...t});Nt.displayName="Drawer";var Ua=V.Trigger,Xa=V.Close,Ya=V.Portal,Vo=$e.forwardRef(({className:e,...t},o)=>S(V.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}));Vo.displayName=V.Overlay.displayName;var ja=Ka("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"}}),Oo=$e.forwardRef(({side:e="right",hideCloseButton:t,className:o,children:r,id:a,...i},s)=>we(Ya,{children:[S(Vo,{}),we(V.Content,{ref:s,className:n(ja({side:e}),o),...i,children:[S("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&&we(V.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:[S(Bo,{}),S("span",{className:"sr-only",children:"Close"})]})]})]}));Oo.displayName=V.Content.displayName;var Go=({className:e,...t})=>S("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});Go.displayName="DrawerHeader";var Ho=({className:e,...t})=>S("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});Ho.displayName="DrawerFooter";var _o=$e.forwardRef(({className:e,...t},o)=>S(V.Title,{ref:o,className:n("text-xl font-semibold text-[#191919] dark:text-white",e),...t}));_o.displayName=V.Title.displayName;var Wo=$e.forwardRef(({className:e,...t},o)=>S(V.Description,{ref:o,className:n("text-xs text-[#5d5c5c] dark:text-white",e),...t}));Wo.displayName=V.Description.displayName;var Ja=({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:d,titleClassName:c,descriptionClassName:u,footerClassName:m,asChild:g=!0,onOpenAutoFocus:v,drawerContentClassName:N,onCloseAutoFocus:h,id:y="drawer"})=>{let{width:C}=Mo(),L=C<768?"bottom":"right";return we(Nt,{open:o,onOpenChange:r,direction:L,children:[S(Ua,{className:"cursor-pointer",asChild:g,id:`${y}-open-trigger`,children:e}),we(Oo,{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:L,hideCloseButton:a,onOpenAutoFocus:v,onCloseAutoFocus:h,id:`${y}-content`,children:[s||l?we(Go,{className:d,id:`${y}-header`,children:[s&&S(_o,{className:c,id:`${y}-title`,children:s}),l&&S(Wo,{id:`${y}-description`,className:u,children:l})]}):S(qa,{}),S("div",{className:n("flex w-full overflow-y-auto flex-col justify-start items-start p-4 flex-1 h-[30px]",N),children:t}),i&&S(Ho,{className:m,children:i})]})]})};import{jsx as zo}from"react/jsx-runtime";var $o=()=>zo("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:zo("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 Ze,jsxs as Qa}from"react/jsx-runtime";var Zo=e=>Qa("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:[Ze("rect",{width:"60",height:"30",fill:"#00247D"}),Ze("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#FFFFFF",strokeWidth:"6"}),Ze("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#CF142B",strokeWidth:"4"}),Ze("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#FFFFFF",strokeWidth:"10"}),Ze("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#CF142B",strokeWidth:"6"})]});import{jsx as Pt,jsxs as en}from"react/jsx-runtime";var Ko=e=>en("svg",{viewBox:"0 0 60 40",className:"w-full max-w-md h-auto","aria-label":"Tricolore - Flag of France",...e,children:[Pt("rect",{x:"0",y:"0",width:"20",height:"40",fill:"#002395"}),Pt("rect",{x:"20",y:"0",width:"20",height:"40",fill:"#FFFFFF"}),Pt("rect",{x:"40",y:"0",width:"20",height:"40",fill:"#ED2939"})]});import{jsx as Uo,jsxs as tn}from"react/jsx-runtime";var Xo=()=>tn("svg",{width:"20",height:"18",viewBox:"0 0 8 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Uo("path",{d:"M5.50257 12.9395L3.68439 14.7576L1.86621 12.9395",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),Uo("path",{d:"M5.50257 5.06055L3.68439 3.24237L1.86621 5.06055",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});import{PopoverClose as on}from"@radix-ui/react-popover";import{jsx as W,jsxs as Rt}from"react/jsx-runtime";var rn=[{key:"en",label:"English"},{key:"fr",label:"French"}],an=({locale:e})=>e==="fr"?W(Ko,{width:10}):W(Zo,{width:10}),nn=({locale:e})=>W("div",{className:"px-2 py-1 ",children:Rt("div",{className:"flex items-center gap-2.5",children:[W(an,{locale:e})," ",W("span",{className:"uppercase",children:e}),W(Xo,{})]})}),sn=({locale:e="en",onChange:t,locales:o=rn})=>Rt(Q,{children:[W("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:W(H,{className:"!p-0 !bg-transparent ",id:"locale_select_dropdown",children:W(nn,{locale:e})})}),W(Y,{side:"bottom",className:"p-0 max-w-max rounded-md overflow-hidden mx-auto mt-2",children:W("div",{children:o?.map(r=>Rt(on,{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&&W($o,{})]},r?.key))})})]});import{useMemo as dr,useRef as Dn,useState as kn}from"react";import{AnimatePresence as ln,motion as cn}from"framer-motion";import{useMemo as dn,useState as pn}from"react";import{HiCheck as mn}from"react-icons/hi";import{FiLogOut as un}from"react-icons/fi";import{BsPlus as fn}from"react-icons/bs";import{jsx as Lt,jsxs as Dt}from"react/jsx-runtime";var Ke=({activeBusiness:e,onTriggerClick:t,iconOnly:o=!1,className:r,rightNode:a})=>Dt("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:[Lt("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&&Dt("section",{className:"flex-1 flex justify-between items-center relative text-black w-full -space-y-1 tracking-wide",children:[Dt("div",{className:"flex-1 min-w-0 max-w-[150px] w-full",children:[Lt(Ce,{as:"h2",className:"text-base capitalize font-medium",children:e?.name}),Lt(Ce,{as:"p",className:"text-sm text-[#A5A5A5]",onClick:void 0,children:e?.email})]}),a]})]});import{ChevronUp as gn}from"lucide-react";import{jsx as Yo}from"react/jsx-runtime";var jo=e=>Yo("svg",{width:"9",height:"8",viewBox:"0 0 9 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Yo("circle",{cx:"4.5",cy:"4",r:"4",fill:"#62C554"})});import{jsx as B,jsxs as kt}from"react/jsx-runtime";var hn={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[d,c]=pn(""),u=dn(()=>{let y=d.toLowerCase();return(o||[]).filter(C=>C.name?.toLowerCase().startsWith(y))},[o,d]),m=p==="hidden"||l,g=y=>c(y.target.value),v=y=>{r(y||""),m&&i(!1),c("")},N=()=>{t(),s(!1),m&&i(!1),c("")},h=()=>{a?.(),s(!1),m&&i(!1),c("")};return B(ln,{initial:!1,children:B(cn.div,{initial:"hidden",animate:"visible",exit:"exit",variants:hn,children:kt("div",{className:"w-72 bg-white border-x border-t rounded-xl overflow-hidden p-3",style:{boxShadow:`
1
+ var $r=Object.defineProperty;var Zr=(e,t,o)=>t in e?$r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var jt=(e,t,o)=>Zr(e,typeof t!="symbol"?t+"":t,o);import*as Yt from"react";import*as Y from"@radix-ui/react-tooltip";import{clsx as Kr}from"clsx";import{twMerge as Ur}from"tailwind-merge";function n(...e){return Ur(Kr(e))}import{jsx as Ie,jsxs as Xt}from"react/jsx-runtime";var Jt=Y.Provider,qt=Y.Root,Qt=Y.Trigger,bt=Yt.forwardRef(({className:e,sideOffset:t=2,...o},r)=>Ie(Y.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}));bt.displayName=Y.Content.displayName;var at=({trigger:e,children:t,contentClassName:o,triggerClassName:r,asChild:a=!0,side:i,sideOffset:s,align:l,alignOffset:d,delayDuration:p=100,hasArrow:c=!0,arrowClassName:u,...m})=>Ie(Jt,{children:Ie(qt,{delayDuration:p,...m,children:Xt("div",{className:"flex justify-center items-center",children:[Ie(Qt,{asChild:a,className:r,children:e}),Xt(bt,{side:i,sideOffset:s,align:l,alignOffset:d,className:o,children:[t,c&&Ie(Y.Arrow,{className:n("fill-white",u)})]})]})})});at.displayName="Tooltip";import Jr from"react";import*as eo from"react";import*as Ct from"@radix-ui/react-label";import{cva as jr}from"class-variance-authority";import{jsx as Yr}from"react/jsx-runtime";var Xr=jr("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),xt=eo.forwardRef(({className:e,...t},o)=>Yr(Ct.Root,{ref:o,className:n(Xr(),e),...t}));xt.displayName=Ct.Root.displayName;import{jsx as to,jsxs as qr}from"react/jsx-runtime";var T=Jr.forwardRef(({className:e,children:t,showAsterisk:o,error:r,...a},i)=>to(xt,{ref:i,className:n(r&&"text-red-500",e),...a,children:o?qr("p",{children:[t,to("span",{className:"text-red-500",children:"*"})]}):t}));T.displayName="FormLabel";import{jsx as oo,jsxs as Qr}from"react/jsx-runtime";var pe=({size:e=16,colour:t="primary"})=>Qr("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[oo("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),oo("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 nt from"react";import{Slot as ea}from"@radix-ui/react-slot";import{cva as ta}from"class-variance-authority";import{Fragment as ro,jsx as Ae,jsxs as oa}from"react/jsx-runtime";var z=ta("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=nt.forwardRef(({className:e,variant:t="primary",size:o,asChild:r=!1,isLoading:a=!1,leftNode:i,rightNode:s,LoaderSize:l,...d},p)=>{let c=r?ea:"button",{children:u,disabled:m,...g}=d,v=nt.useRef(null);return Ae(c,{className:n(z({variant:t,size:o,className:e})),ref:v||p,disabled:m||a,...g,children:Ae("div",{className:"flex font-medium justify-center items-center gap-2",children:a?Ae(ro,{children:Ae("span",{className:"mx-auto",children:Ae(pe,{size:l,colour:"secondary"})})}):oa(ro,{children:[i,u,s]})})})});me.displayName="Button";import*as wt from"react";import{cva as Nt}from"class-variance-authority";import ra from"react";import{jsx as aa}from"react/jsx-runtime";var J=ra.forwardRef(({className:e,children:t,error:o,...r},a)=>{let i=o??t;return i?aa("p",{ref:a,className:n("text-xs font-normal text-[#F04248]",e),...r,children:i}):null});J.displayName="ErrorMessage";import na from"react";import{jsx as ia}from"react/jsx-runtime";var q=na.forwardRef(({className:e,...t},o)=>ia("div",{ref:o,className:n("text-sm text-[#8E98A8",e),...t}));q.displayName="FormDescription";import{jsx as we,jsxs as no}from"react/jsx-runtime";var sa=Nt("!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"}}),io=wt.forwardRef(({className:e,status:t,type:o,...r},a)=>we("input",{type:o,className:n(sa({status:t}),e),ref:a,...r}));io.displayName="BaseInnerInput";var H=Nt("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"}}),ao=Nt("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"}}),$=wt.forwardRef(({className:e,status:t="default",disabled:o,error:r,isLoading:a,sideNodeClassName:i,showAsterisk:s,label:l,description:d,...p},c)=>{let u=t;return r&&(u="error"),a&&(u="loading"),o&&(u="prefilled"),no("div",{className:"relative space-y-1 w-full",children:[l&&we(T,{showAsterisk:s,error:r,children:l}),no("div",{className:n(H({status:u}),p.leftNode?"pl-0":"",p.rightNode?"pr-0":"",e),children:[p.leftNode?we("div",{className:n(ao({status:u,side:"left"}),i),children:p.leftNode}):null,we(io,{ref:c,disabled:a||o,className:n({"!pl-3":p.leftNode&&t!=="neutral","!pr-3":p.rightNode&&t!=="neutral"}),...p}),p.rightNode?we("div",{className:n(ao({status:u,side:"right"}),i),children:p.rightNode}):null]}),d&&we(q,{className:"text-gray-400 text-sm !font-normal",children:d}),we(J,{error:r})]})});$.displayName="Input";import{useMemo as da,useState as ho}from"react";import{jsx as so,jsxs as la}from"react/jsx-runtime";var lo=()=>la("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[so("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"}),so("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 co,jsxs as ca}from"react/jsx-runtime";var po=()=>ca("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[co("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"}),co("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 mo}from"react/jsx-runtime";var uo=()=>mo("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:mo("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 fo}from"react/jsx-runtime";var go=()=>fo("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:fo("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 oe,jsxs as pa}from"react/jsx-runtime";var yo=[{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}],vo=({onValidate:e,onChange:t,disableValidation:o,...r})=>{let[a,i]=ho(!1),[s,l]=ho(yo),d=m=>yo.map(g=>({...g,validated:g.RegExp.test(m)})),p=m=>{let g=d(m),v=g.every(C=>C.validated);return l(g),v},c=m=>{if(t&&t(m),o)return;let g=m?.target?.value,v=p(g);e&&e(v,g)},u=da(()=>oe("div",{className:"flex items-center gap-2",children:s?.map(m=>pa("div",{className:n("text-xs flex items-center gap-0.5",{"text-[#62C554]":m?.validated,"text-[#8E98A8]":!m?.validated}),children:[oe("span",{className:"",children:m?.validated?oe(uo,{}):oe(go,{})}),oe("span",{className:"",children:m?.label})]},m?.key))}),[s]);return oe($,{sideNodeClassName:"!border-l-0",rightNode:a?oe("button",{type:"button",onClick:()=>i(m=>!m),children:oe(lo,{})}):oe("button",{type:"button",onClick:()=>i(m=>!m),children:oe(po,{})}),type:a?"text":"password",onChange:c,description:!o&&u,...r})};vo.displayName="PasswordInput";import{cva as ma}from"class-variance-authority";import{jsx as it,jsxs as ua}from"react/jsx-runtime";var Gs=ma("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"}}),bo=({className:e,status:t="default",disabled:o,error:r,isLoading:a,showAsterisk:i,label:s,description:l,...d})=>{let p=t;return r&&(p="error"),a&&(p="loading"),o&&(p="prefilled"),ua("div",{className:"relative space-y-1",children:[it(T,{showAsterisk:i,error:r,children:s}),it("textarea",{className:n("min-h-[80px]",H({status:p}),e),disabled:a||o,...d}),it(q,{className:"text-gray-400 text-sm !font-normal",children:l}),it(J,{error:r})]})};bo.displayName="Textarea";import*as Ne from"react";import*as ue from"react";import{Command as B}from"cmdk";import{Search as va}from"lucide-react";import*as Me from"react";import*as L from"@radix-ui/react-dialog";import{jsx as Co,jsxs as fa}from"react/jsx-runtime";var xo=()=>fa("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:[Co("path",{d:"M18 6 6 18"}),Co("path",{d:"m6 6 12 12"})]});import{Fragment as ya,jsx as M,jsxs as Pe}from"react/jsx-runtime";var ga=L.Root,ha=L.Trigger,wo=L.Portal,No=Me.forwardRef(({className:e,...t},o)=>M(L.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}));No.displayName=L.Overlay.displayName;var Rt=Me.forwardRef(({className:e,hideCloseButton:t,children:o,...r},a)=>Pe(wo,{children:[M(No,{}),Pe(L.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&&Pe(L.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:[M(xo,{}),M("span",{className:"sr-only",children:"Close"})]})]})]}));Rt.displayName=L.Content.displayName;var Ro=({className:e,...t})=>M("div",{className:n("flex flex-col space-y-1.5 text-left",e),...t});Ro.displayName="DialogHeader";var Po=({className:e,...t})=>M("div",{className:n("flex flex-row justify-end sm:space-x-2",e),...t});Po.displayName="DialogFooter";var Lo=Me.forwardRef(({className:e,...t},o)=>M(L.Title,{ref:o,className:n("text-xl font-semibold leading-none tracking-tight",e),...t}));Lo.displayName=L.Title.displayName;var Do=Me.forwardRef(({className:e,...t},o)=>M(L.Description,{ref:o,className:n("text-sm text-gray-500",e),...t}));Do.displayName=L.Description.displayName;var Pt=({trigger:e=void 0,children:t,open:o,onOpenChange:r,hideCloseButton:a,footer:i,title:s,description:l,contentClassName:d,headerClassName:p,titleClassName:c,descriptionClassName:u,footerClassName:m,asChild:g=!0,onOpenAutoFocus:v,onCloseAutoFocus:C,onEscapeKeyDown:h,onInteractOutside:y,onPointerDownOutside:x,...P})=>Pe(ga,{...P,open:o,onOpenChange:r,children:[M(ha,{asChild:g,children:e}),M(wo,{children:Pe(Rt,{className:d,hideCloseButton:a,onOpenAutoFocus:v,onCloseAutoFocus:C,onEscapeKeyDown:h,onPointerDownOutside:x,onInteractOutside:y,children:[s||l?Pe(Ro,{className:p,children:[s&&M(Lo,{className:c,children:s}),l&&M(Do,{className:u,children:l})]}):M(ya,{}),t,i&&M(Po,{className:m,children:i})]})})]});Pt.displayName=L.Dialog.displayName;import{Fragment as e1,jsx as re,jsxs as xa}from"react/jsx-runtime";var Be=ue.forwardRef(({className:e,...t},o)=>re(B,{ref:o,className:n("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Be.displayName=B.displayName;var Ve=ue.forwardRef(({className:e,CommandInputContainerClassName:t,loading:o,...r},a)=>xa("div",{className:n("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[o?re(pe,{size:16,colour:"secondary"}):re(va,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),re(B.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})]}));Ve.displayName=B.Input.displayName;var Oe=ue.forwardRef(({className:e,...t},o)=>re(B.List,{ref:o,className:n("overflow-y-auto overflow-x-hidden",e),...t}));Oe.displayName=B.List.displayName;var Ge=ue.forwardRef((e,t)=>re(B.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ge.displayName=B.Empty.displayName;var He=ue.forwardRef(({className:e,...t},o)=>re(B.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}));He.displayName=B.Group.displayName;var ba=ue.forwardRef(({className:e,...t},o)=>re(B.Separator,{ref:o,className:n("-mx-1 h-px bg-border",e),...t}));ba.displayName=B.Separator.displayName;var _e=ue.forwardRef(({className:e,...t},o)=>re(B.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}));_e.displayName=B.Item.displayName;var Ca=({className:e,...t})=>re("span",{className:n("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ca.displayName="CommandShortcut";import*as ko from"react";import*as Q from"@radix-ui/react-popover";import{jsx as We,jsxs as wa}from"react/jsx-runtime";var Z=Q.Root,V=Q.Trigger,_=ko.forwardRef(({className:e,align:t="center",sideOffset:o=4,portal:r=!0,...a},i)=>r?We(Q.Portal,{children:We(Q.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})}):We(Q.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}));_.displayName=Q.Content.displayName;var fe=({trigger:e,children:t,open:o,onOpenChange:r,contentClassName:a,asChild:i=!0,align:s,side:l,alignOffset:d,triggerClassName:p,sideOffset:c,onOpenAutoFocus:u,onCloseAutoFocus:m,portal:g=!0,id:v="popover",...C})=>wa(Z,{...C,open:o,onOpenChange:r,children:[We(V,{asChild:i,className:p,id:`${v}-trigger`,children:e}),We(_,{alignOffset:d,sideOffset:c,side:l,align:s,className:a,onOpenAutoFocus:u,onCloseAutoFocus:m,portal:g,id:`${v}-content`,children:t})]});fe.displayName=Q.Root.displayName;import*as Lt from"react";import*as K from"@radix-ui/react-scroll-area";import{jsx as ze,jsxs as Na}from"react/jsx-runtime";var ge=Lt.forwardRef(({className:e,viewPortClassName:t,children:o,...r},a)=>Na(K.Root,{ref:a,className:n("relative overflow-hidden",e),...r,children:[ze(K.Viewport,{className:n("h-full w-full rounded-[inherit]",t),children:o}),ze(To,{}),ze(K.Corner,{})]}));ge.displayName=K.Root.displayName;var To=Lt.forwardRef(({className:e,orientation:t="vertical",...o},r)=>ze(K.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:ze(K.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));To.displayName=K.ScrollAreaScrollbar.displayName;import{jsx as ae,jsxs as st}from"react/jsx-runtime";var So=({className:e,value:t,placeholder:o="",status:r,disabled:a,id:i})=>ae(V,{asChild:!0,disabled:a,id:i??"searchable-trigger",children:st("button",{disabled:a,className:n(H({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...",ae("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:ae("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"})})]})}),lt=({options:e=[],value:t,onChange:o,containerClassName:r,placeholder:a,disabled:i,loading:s,optionComponent:l,children:d,modal:p=!1,hideSearch:c,className:u,inputValue:m,onValueChange:g,onInputValueChange:v})=>{let[C,h]=Ne.useState(!1),y=Ne.useRef(null),[x,P]=Ne.useState(void 0);return Ne.useLayoutEffect(()=>{y.current&&P(y.current.clientWidth)},[y.current]),st(Z,{modal:p,open:C,onOpenChange:h,children:[ae("div",{className:n("w-full",u),ref:y,children:d}),ae(_,{portal:!p,className:"p-0 min-w-[200px]",style:{width:x},children:st(Be,{className:n("relative max-h-[270px]",{"mt-2":!c}),children:[!c&&ae(Ve,{loading:s,placeholder:a??"Search options...",onValueChange:v,value:m,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),ae(ge,{viewPortClassName:"max-h-[225px]",className:n("w-full px-0 h-full overflow-y-auto",r),children:st(Oe,{children:[!c&&ae(Ge,{children:"No result found."}),ae(He,{className:"w-full",children:e?.map(f=>ae(_e,{defaultValue:t?.label,value:f.label,disabled:i,onSelect:()=>{o(f),h(!1),g?.(f?.value)},id:f.value,children:l?l(f):f.label},f.value))})]})})]})})]})};var Dt=[{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"}],Fo=()=>{let e={};return Dt?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};import*as Ke from"react";import*as ct from"react-phone-number-input";import La from"react-phone-number-input/flags";import{jsx as $e,jsxs as Pa}from"react/jsx-runtime";var Ra=e=>Pa("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[$e("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",$e("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"}),$e("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),$e("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),$e("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Eo=Ra;import{jsx as N,jsxs as Ze}from"react/jsx-runtime";var Io=Ke.forwardRef(({className:e,onChange:t,defaultCountry:o="NG",modal:r,showAsterisk:a,label:i,description:s,error:l,...d},p)=>{let c=u=>N(Da,{...u,status:d.status,modal:r});return Ze("div",{className:"relative space-y-1",children:[N(T,{showAsterisk:a,error:l,children:i}),N(ct.default,{ref:p,className:n("flex",e),flagComponent:he,countrySelectComponent:c,inputComponent:Ao,defaultCountry:o,onChange:u=>{t&&t?.(u)},...d}),N(q,{className:"text-gray-400 text-sm !font-normal",children:s}),N(J,{error:l})]})});Io.displayName="PhoneInput";var Ao=Ke.forwardRef(({className:e,...t},o)=>N($,{className:n("!rounded-s-none h-10",e),...t,ref:o}));Ao.displayName="InputComponent";var Da=({disabled:e,value:t,onChange:o,options:r,status:a,modal:i})=>{let s=Ke.useCallback(l=>{o(l)},[o]);return Ze(Z,{modal:i,children:[N(V,{disabled:e,children:Ze("div",{className:n(H({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:[N(he,{country:t,countryName:t}),N("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:N("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"})})]})}),N(_,{portal:!i,className:"w-[200px] md:w-[300px] p-0",children:N(Be,{children:N(Oe,{children:Ze(ge,{className:"h-72",children:[N(Ve,{placeholder:"Search country..."}),N(Ge,{children:"No country found."}),N(He,{children:r.filter(l=>l.value).map(l=>Ze(_e,{className:"gap-2",onSelect:()=>s(l.value),children:[N(he,{country:l.value,countryName:l.label}),N("span",{className:"flex-1 text-sm",children:l.label}),l.value&&N("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${ct.getCountryCallingCode(l.value)}`}),N("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:n("ml-auto",l.value===t?"opacity-100":"opacity-0"),children:N("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${l.value}-${l.label}`))})]})})})})]})},he=({country:e,countryName:t,className:o})=>{let r=La[e];return e==="GLOBAL"?N("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:N(Eo,{className:"w-full h-[90%]"})}):N("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:r&&N(r,{title:t})})};he.displayName="FlagComponent";import{jsx as ee,jsxs as Ue}from"react/jsx-runtime";var ka=Fo(),Ta=({className:e,value:t,placeholder:o="",status:r,disabled:a})=>ee(V,{asChild:!0,disabled:a,id:"country-dropdown",children:Ue("button",{disabled:a,className:n(H({status:r}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?Ue("div",{className:"flex gap-2 items-center",children:[ee(he,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),Ue("span",{className:"",children:[" ",ka[t]]})]}):o??"Select options...",ee("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:ee("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"})})]})}),Sa=({hideSearch:e=!0,showAsterisk:t,label:o,description:r,error:a,...i})=>{let s=Dt?.map(l=>({value:l?.internetCountryCode,label:l?.countryName,...l}));return Ue("div",{className:"relative space-y-1",children:[ee(T,{showAsterisk:t,error:a,children:o}),ee(lt,{options:s,hideSearch:e,optionComponent:l=>Ue("div",{className:"w-full flex items-center gap-2",children:[ee(he,{country:l?.internetCountryCode,countryName:l?.label,className:"ml-2 !w-6 !h-5"}),ee("span",{className:"flex-1 text-sm",children:l?.label})]}),...i,children:ee(Ta,{value:i?.value?.value,status:i?.status,placeholder:i?.placeholder??" Select Country"})}),ee(q,{className:"text-gray-400 text-sm !font-normal",children:r}),ee(J,{error:a})]})};import{jsx as je,jsxs as Fa}from"react/jsx-runtime";var Xe=({showAsterisk:e,label:t,description:o,error:r,hideSearch:a=!0,status:i,...s})=>Fa("div",{className:"relative space-y-1",children:[je(T,{showAsterisk:e,error:r,children:t}),je(lt,{hideSearch:a,...s,containerClassName:"h-full",children:je(So,{disabled:s?.disabled,placeholder:s?.placeholder??"Select",status:i,value:s?.value?.label??s?.value?.value,className:s?.className,id:s?.id})}),je(q,{className:"text-gray-400 text-sm !font-normal",children:o}),je(J,{error:r})]});import Ea from"react-otp-input";import{cva as Ia}from"class-variance-authority";import{useMemo as Aa}from"react";import{jsx as Mo}from"react/jsx-runtime";var Ma=Ia("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"}}),Ba=({numInputs:e=4,inputStyle:t,containerStyle:o,placeholder:r="-",status:a,...i})=>{let s=Aa(()=>r||new Array(e).fill("").reduce((p,c)=>p+=c,""),[e,r]);return Mo(Ea,{numInputs:e,placeholder:s,containerStyle:n("w-full",o),inputStyle:n(Ma({status:a}),t),renderInput:l=>Mo("input",{...l}),...i})};import{useState as Va,useEffect as Oa}from"react";import{jsx as k,jsxs as Re}from"react/jsx-runtime";var Ga=({type:e})=>e==="gray"?k("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:k("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"?k("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:k("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"?k("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:k("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"?k("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:k("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"})}):k("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:k("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"})}),Ha=({type:e="info",title:t,description:o,open:r,showCloseButton:a,bottomNode:i,sideNode:s,onClose:l,showIcon:d=!0})=>{let[p,c]=Va(r);Oa(()=>{c(r)},[r]);let u="",m="";switch(e){case"gray":u="#eeeef0",m="#79818c";break;case"info":u="#ebf5fd",m="#70B6F6";break;case"warning":u="#fff8df",m="#ffc700";break;case"success":u="#e0f9f0",m="#49e0aa";break;case"danger":u="#fde8e9",m="#f3777c";break;default:u="#eeeef0",m="#79818c";break}function g(){c(!1),l&&l()}return p?Re("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:u||"#ebf5fd"},children:[k("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:m||"#70B6F6"}}),Re("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[Re("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[d&&k("div",{className:"h-full flex justify-end",children:k(Ga,{type:e})}),Re("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[Re("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||o)&&Re("div",{children:[t&&k("div",{className:"text-sm font-bold text-[#191919]",children:t}),o&&k("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:o})]}),i]}),s]})]}),a&&k("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:k("button",{onClick:g,children:Re("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),k("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};import{useState as Wa}from"react";import{Copy as za,CheckIcon as $a}from"lucide-react";import{motion as Za,AnimatePresence as Ka}from"framer-motion";import{jsx as _a}from"react/jsx-runtime";var Le=({children:e,mode:t="truncate",className:o,as:r="div",...a})=>_a(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 De,jsxs as ja}from"react/jsx-runtime";var Ua=({text:e,textToCopy:t,onCopy:o,iconsPosition:r="right",clampText:a=!0,clampMode:i="truncate",isLink:s=!1,textClassName:l})=>{let[d,p]=Wa(!1),c=()=>{navigator.clipboard.writeText(t??e).then(()=>{p(!0),o?.(),setTimeout(()=>p(!1),2e3)})},u=d?$a:za;return ja("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"&&De(Bo,{Icon:u,onClick:c,copied:d}),De(Le,{as:s?"a":"span",mode:a?i:"overflow",className:n({underline:s},l),href:s?e:void 0,children:e}),r==="right"&&De(Bo,{Icon:u,onClick:c,copied:d})]})},Bo=({Icon:e,onClick:t,copied:o})=>De(Ka,{mode:"wait",children:De(Za.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:De(e,{className:`w-5 h-5 ${o?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},o?"check":"copy")});import{useEffect as Vo,useState as Xa}from"react";import{Search as Ya}from"lucide-react";import{jsx as Oo}from"react/jsx-runtime";var kt=({value:e,onChange:t,debounce:o=500,addon:r,...a})=>{let[i,s]=Xa(e??""),l=d=>s(d.target.value);return Vo(()=>{e&&s(e)},[e]),Vo(()=>{let d=setTimeout(()=>{t(i)},o);return()=>clearTimeout(d)},[i,o,t]),Oo($,{leftNode:r??Oo(Ya,{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 Go}from"react";import{X as Ja}from"lucide-react";import{jsx as ne,jsxs as ke}from"react/jsx-runtime";var qa=e=>{let{environment:t,branch:o,version:r,deployTime:a,showBanner:i,onClose:s,initDefault:l,removeFromStorage:d,syncLocalStorageToState:p}=e,c=t||process.env.NEXT_PUBLIC_NODE_ENV;return c!=="staging"&&c!=="sandbox"||(Go(()=>{p()},[p]),Go(()=>{let u;return(c==="staging"||c==="sandbox")&&(u=setInterval(()=>{d(),l()},5*60*1e3)),()=>{u&&clearInterval(u)}},[i,t,s,d,l,c]),!i)?null:ke("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[ne("button",{onClick:s,className:"absolute top-2 right-2",children:ne(Ja,{})}),ke("div",{className:"space-y-2 text-sm",children:[ke("div",{className:"flex gap-2",children:[ne("span",{className:"font-medium",children:"Environment:"}),ne("span",{className:"text-blue-600 capitalize",children:c})]}),ke("div",{className:"flex gap-2",children:[ne("span",{className:"font-medium",children:"Branch:"}),ne("span",{className:"text-green-600 capitalize",children:o||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),ke("div",{className:"flex gap-2",children:[ne("span",{className:"font-medium",children:"Version:"}),ne("span",{className:"text-purple-600",children:r||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),ke("div",{className:"flex gap-2",children:[ne("span",{className:"font-medium",children:"Deploy Time:"}),ne("span",{className:"text-orange-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};import*as Ye from"react";import{Drawer as W}from"vaul";import{cva as on}from"class-variance-authority";import{jsx as Ho,jsxs as Qa}from"react/jsx-runtime";var _o=()=>Qa("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:[Ho("path",{d:"M18 6 6 18"}),Ho("path",{d:"m6 6 12 12"})]});import{useState as en,useEffect as tn}from"react";function Wo(){let[e,t]=en({width:100,height:100});return tn(()=>{function o(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",o),o(),()=>window.removeEventListener("resize",o)},[]),e}import{Fragment as cn,jsx as F,jsxs as Te}from"react/jsx-runtime";var Tt=({shouldScaleBackground:e=!0,...t})=>F(W.Root,{direction:"right",shouldScaleBackground:e,...t});Tt.displayName="Drawer";var rn=W.Trigger,an=W.Close,nn=W.Portal,zo=Ye.forwardRef(({className:e,...t},o)=>F(W.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}));zo.displayName=W.Overlay.displayName;var sn=on("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"}}),$o=Ye.forwardRef(({side:e="right",hideCloseButton:t,className:o,children:r,id:a,...i},s)=>Te(nn,{children:[F(zo,{}),Te(W.Content,{ref:s,className:n(sn({side:e}),o),...i,children:[F("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&&Te(W.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:[F(_o,{}),F("span",{className:"sr-only",children:"Close"})]})]})]}));$o.displayName=W.Content.displayName;var Zo=({className:e,...t})=>F("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});Zo.displayName="DrawerHeader";var Ko=({className:e,...t})=>F("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});Ko.displayName="DrawerFooter";var Uo=Ye.forwardRef(({className:e,...t},o)=>F(W.Title,{ref:o,className:n("text-xl font-semibold text-[#191919] dark:text-white",e),...t}));Uo.displayName=W.Title.displayName;var jo=Ye.forwardRef(({className:e,...t},o)=>F(W.Description,{ref:o,className:n("text-xs text-[#5d5c5c] dark:text-white",e),...t}));jo.displayName=W.Description.displayName;var ln=({trigger:e=void 0,children:t,open:o=void 0,onOpenChange:r=void 0,hideCloseButton:a,footer:i,title:s,description:l,contentClassName:d,headerClassName:p,titleClassName:c,descriptionClassName:u,footerClassName:m,asChild:g=!0,onOpenAutoFocus:v,drawerContentClassName:C,onCloseAutoFocus:h,id:y="drawer"})=>{let{width:x}=Wo(),P=x<768?"bottom":"right";return Te(Tt,{open:o,onOpenChange:r,direction:P,children:[F(rn,{className:"cursor-pointer",asChild:g,id:`${y}-open-trigger`,children:e}),Te($o,{className:n("flex flex-col gap-0 justify-start items-start max-h-[90vh] md:max-h-full w-full !max-w-md",d),side:P,hideCloseButton:a,onOpenAutoFocus:v,onCloseAutoFocus:h,id:`${y}-content`,children:[s||l?Te(Zo,{className:p,id:`${y}-header`,children:[s&&F(Uo,{className:c,id:`${y}-title`,children:s}),l&&F(jo,{id:`${y}-description`,className:u,children:l})]}):F(cn,{}),F("div",{className:n("flex w-full overflow-y-auto flex-col justify-start items-start p-4 flex-1 h-[30px]",C),children:t}),i&&F(Ko,{className:m,children:i})]})]})};import{jsx as Xo}from"react/jsx-runtime";var Yo=()=>Xo("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:Xo("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 Je,jsxs as dn}from"react/jsx-runtime";var Jo=e=>dn("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:[Je("rect",{width:"60",height:"30",fill:"#00247D"}),Je("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#FFFFFF",strokeWidth:"6"}),Je("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#CF142B",strokeWidth:"4"}),Je("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#FFFFFF",strokeWidth:"10"}),Je("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#CF142B",strokeWidth:"6"})]});import{jsx as St,jsxs as pn}from"react/jsx-runtime";var qo=e=>pn("svg",{viewBox:"0 0 60 40",className:"w-full max-w-md h-auto","aria-label":"Tricolore - Flag of France",...e,children:[St("rect",{x:"0",y:"0",width:"20",height:"40",fill:"#002395"}),St("rect",{x:"20",y:"0",width:"20",height:"40",fill:"#FFFFFF"}),St("rect",{x:"40",y:"0",width:"20",height:"40",fill:"#ED2939"})]});import{jsx as Qo,jsxs as mn}from"react/jsx-runtime";var er=()=>mn("svg",{width:"20",height:"18",viewBox:"0 0 8 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Qo("path",{d:"M5.50257 12.9395L3.68439 14.7576L1.86621 12.9395",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),Qo("path",{d:"M5.50257 5.06055L3.68439 3.24237L1.86621 5.06055",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});import{PopoverClose as un}from"@radix-ui/react-popover";import{jsx as U,jsxs as Ft}from"react/jsx-runtime";var fn=[{key:"en",label:"English"},{key:"fr",label:"French"}],gn=({locale:e})=>e==="fr"?U(qo,{width:10}):U(Jo,{width:10}),hn=({locale:e})=>U("div",{className:"px-2 py-1 ",children:Ft("div",{className:"flex items-center gap-2.5",children:[U(gn,{locale:e})," ",U("span",{className:"uppercase",children:e}),U(er,{})]})}),yn=({locale:e="en",onChange:t,locales:o=fn})=>Ft(Z,{children:[U("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:U(V,{className:"!p-0 !bg-transparent ",id:"locale_select_dropdown",children:U(hn,{locale:e})})}),U(_,{side:"bottom",className:"p-0 max-w-max rounded-md overflow-hidden mx-auto mt-2",children:U("div",{children:o?.map(r=>Ft(un,{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&&U(Yo,{})]},r?.key))})})]});import{useMemo as hr,useRef as Vn,useState as On}from"react";import{AnimatePresence as vn,motion as bn}from"framer-motion";import{useMemo as Cn,useState as xn}from"react";import{HiCheck as wn}from"react-icons/hi";import{FiLogOut as Nn}from"react-icons/fi";import{BsPlus as Rn}from"react-icons/bs";import{jsx as Et,jsxs as It}from"react/jsx-runtime";var qe=({activeBusiness:e,onTriggerClick:t,iconOnly:o=!1,className:r,rightNode:a})=>It("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:[Et("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&&It("section",{className:"flex-1 flex justify-between items-center relative text-black w-full -space-y-1 tracking-wide",children:[It("div",{className:"flex-1 min-w-0 max-w-[150px] w-full",children:[Et(Le,{as:"h2",className:"text-base capitalize font-medium",children:e?.name}),Et(Le,{as:"p",className:"text-sm text-[#A5A5A5]",onClick:void 0,children:e?.email})]}),a]})]});import{ChevronUp as Pn}from"lucide-react";import{jsx as tr}from"react/jsx-runtime";var or=e=>tr("svg",{width:"9",height:"8",viewBox:"0 0 9 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:tr("circle",{cx:"4.5",cy:"4",r:"4",fill:"#62C554"})});import{jsx as O,jsxs as At}from"react/jsx-runtime";var Ln={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}}},rr=({activeBusiness:e,toggleAddBusinessDrawer:t,businesses:o=[],handleSwitchBusiness:r,onLogoutClick:a,onToggleSideBar:i,toggleShowBusiness:s,isMobile:l,collapseType:d})=>{let[p,c]=xn(""),u=Cn(()=>{let y=p.toLowerCase();return(o||[]).filter(x=>x.name?.toLowerCase().startsWith(y))},[o,p]),m=d==="hidden"||l,g=y=>c(y.target.value),v=y=>{r(y||""),m&&i(!1),c("")},C=()=>{t(),s(!1),m&&i(!1),c("")},h=()=>{a?.(),s(!1),m&&i(!1),c("")};return O(vn,{initial:!1,children:O(bn.div,{initial:"hidden",animate:"visible",exit:"exit",variants:Ln,children:At("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:[B(Ke,{activeBusiness:e,rightNode:B(jo,{}),className:"bg-[#FAFAFA] border-none p-3"}),B("div",{className:"mt-3",children:B(G,{label:"Search Account",leftNode:B(gn,{className:"h-4 w-4 text-gray-500"}),value:d,onChange:g,placeholder:"Search Account",className:"text-sm"})}),B("ul",{className:"max-h-48 overflow-y-auto mt-2 px-1 space-y-2",children:u.map(y=>B(Ke,{onTriggerClick:()=>v(y?.clientId),activeBusiness:y,rightNode:e.clientId===y.clientId?B(mn,{className:"text-primary-600",size:18}):void 0,className:n("bg-white border-none ",{"bg-[#FAFAFA]":e.clientId===y.clientId})},y.clientId))}),B("div",{className:"py-2 ",children:kt("button",{onClick:N,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:[B(fn,{size:18,className:"text-primary-main"})," Add Account"]})}),B("div",{className:"bg-[#FAFAFA] px-3 py-2 -m-3 mt-4",children:kt("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:h,children:[B(un,{size:16})," Log Out"]})})]})})})};import{jsx as pe,jsxs as vn}from"react/jsx-runtime";var qo=({activeBusiness:e,toggleAddBusinessDrawer:t,toggleShowBusiness:o,businesses:r=[],handleSwitchBusiness:a,iconOnly:i=!1,onLogoutClick:s,isMobile:l,onToggleSideBar:p,isBusinessShown:d,collapseType:c})=>pe("div",{className:"px-4 relative mb-0 ",children:pe(ce,{side:l?"top":"right",open:d,onOpenChange:o,align:"end",contentClassName:"!bg-transparent !shadow-none !p-0",trigger:pe("div",{className:"flex items-center w-full",children:pe(Ke,{activeBusiness:e,onTriggerClick:()=>o(!0),iconOnly:i,rightNode:pe(yn,{className:"stroke-gray-500"})})}),children:pe(Jo,{activeBusiness:e,handleSwitchBusiness:a,toggleAddBusinessDrawer:t,businesses:r,onLogoutClick:s,onToggleSideBar:p,toggleShowBusiness:o,collapseType:c,isMobile:l})})}),yn=({className:e})=>vn("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:[pe("path",{d:"M7 22l5 5 5-5"}),pe("path",{d:"M7 4l5-5 5 5"})]});import{AnimatePresence as Cn,motion as bn}from"framer-motion";import{useEffect as xn}from"react";import{FiChevronRight as wn}from"react-icons/fi";import{useState as Qo,useEffect as er}from"react";var tr=(e,t)=>{let[o,r]=Qo(t),[a,i]=Qo(!1);return er(()=>{i(!0);try{let s=localStorage.getItem(e);s&&r(JSON.parse(s))}catch(s){console.error("Error reading from localStorage:",s)}},[e]),er(()=>{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 or,jsx as M,jsxs as Ne}from"react/jsx-runtime";var Nn={hidden:{opacity:0,height:0},visible:{opacity:1,height:"auto",transition:{duration:.3}}},rr=({isIconsOnly:e,isSidebarCollapsed:t,onToggleSideBar:o,currentPath:r,onNavigate:a,collapseType:i,links:s,appConfig:l,isMobile:p})=>{let d="@sidebar-expanded-menus",[c,u]=tr(d,{}),m=h=>{u(y=>({...y,[h]:!y[h]}))},g=h=>{if(!!h?.children?.length){e?(o(!t),u(C=>({...C,[h.id]:!0}))):m(h.id);return}a(`/${h.to}`)},v=h=>h.split("?")[0],N=h=>h?.children?.length?(h.children||[]).some(C=>v(r)===v(C.to)):v(r)===v(h.to);return xn(()=>{let h={};s.forEach(y=>{y.children&&y.children.length>0&&y.children.some(C=>v(r)===v(C.to))&&(h[y.id]=!0)}),u(h)},[s,r,t]),M("ul",{className:"w-[90%] space-y-2.5",children:s.map((h,y)=>{if(h.isHidden||l?.hiddenRoutes?.includes(h.key??""))return null;let C=N(h),L=!!h?.children?.length,f=c[h.id];return Ne("div",{className:"mb-1 relative flex flex-col justify-center items-center",onClick:()=>g(h),children:[C&&!p&&(e||!L||!f)&&M("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),M("li",{id:h.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&&(!f||!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:Ne("div",{className:n("flex items-center w-full",{"justify-center":e}),children:[M(Je,{trigger:M("span",{className:"w-6",onClick:()=>g(h),children:h.icon}),side:"right",hasArrow:!0,open:e?void 0:!1,children:h.name},y),(i!=="icons"||!t)&&Ne(or,{children:[M("span",{className:"px-3 text-nowrap",children:h.name}),L&&M("span",{className:"ml-auto transition-transform duration-300",style:{transform:f?"rotate(90deg)":"rotate(0deg)"},children:M(wn,{size:18})})]})]})},h.to),L&&(i!=="icons"||!t)&&M(Cn,{children:f&&M(bn.div,{initial:"hidden",animate:"visible",exit:"hidden",variants:Nn,className:"overflow-hidden w-full",children:Ne("ul",{className:" mt-1 relative ",children:[h.children?.map(P=>{if(P.isHidden)return null;let k=v(r)===v(P.to);return M("div",{id:P.id,className:n("relative pl-12 bg-blue-100- mt-4"),children:Ne("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":k},{"hover:text-primary-main":!k}),onClick:()=>a(`/${P.to}`),children:[P.name,k&&Ne(or,{children:[!p&&M("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),M("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 "})]})]})})}),M("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 Tn}from"lucide-react";import{jsx as oe,jsxs as ar}from"react/jsx-runtime";var nr=()=>ar("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:[ar("g",{children:[oe("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"}),oe("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"})]}),oe("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"}),oe("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"}),oe("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"}),oe("path",{fill:"#000000",d:"m839.47,268.66V86.41h111.44v35.41h-69.26v49.21h69.26v34.63h-69.26v63.01h-42.18Z"}),oe("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"}),oe("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"}),oe("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"}),oe("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 ir,jsxs as Pn}from"react/jsx-runtime";var sr=()=>Pn("svg",{width:"100%",height:"32",viewBox:"0 0 20 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"pl-5",children:[ir("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"}),ir("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 ae,jsxs as cr}from"react/jsx-runtime";var lr=({onToggleSideBar:e,isSidebarCollapsed:t})=>ae("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?ae(Rn,{}):ae(Ln,{})}),Rn=e=>cr("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:[ae("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),ae("path",{d:"M9 3v18"}),ae("path",{d:"m14 9 3 3-3 3"})]}),Ln=e=>cr("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:[ae("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),ae("path",{d:"M15 3v18"}),ae("path",{d:"m10 15-3-3 3-3"})]});import{Fragment as Fn,jsx as z,jsxs as rt}from"react/jsx-runtime";var Sn=({isSidebarCollapsed:e,onToggleSideBar:t,isMobile:o,links:r,businessProps:a,currentPath:i,onNavigate:s,appConfig:l,collapseType:p,onLogoutClick:d,openSidebarIcon:c=z(nr,{}),closedSidebarIcon:u=z(sr,{}),nodeAfterSideBarLogo:m})=>{let g=dr(()=>o?"hidden":p||(o?"hidden":"icons"),[o,p]),[v,N]=kn(!1),h=g==="icons"&&e,y=Dn(null),{businessList:C,activeBusiness:L,toggleAddBusinessDrawer:f,handleSetActiveBusiness:b}=a,P=mt=>N(mt),k=mt=>{b?.(mt),P(!1)},ie=dr(()=>g==="hidden"?c:e?u:c,[e,c,u,g]),_t=o&&g==="hidden"&&e;return rt(Fn,{children:[_t&&z("div",{className:"fixed inset-0 z-40 bg-black bg-opacity-40 transition-all animate-in fade-in-15",onClick:()=>t(!1)}),rt("div",{className:n("relative flex flex-row h-full",{"fixed inset-0 z-50 pointer-events-none":_t}),children:[z("div",{className:"absolute -right-[22px] top-0 z-20",children:g==="icons"&&z(lr,{isSidebarCollapsed:e,onToggleSideBar:t})}),rt("aside",{id:"sidebar_menu",ref:y,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":g==="hidden","w-[311px]":e&&g!=="icons","w-[75px]":e&&g==="icons","w-[270px]":!e&&g==="icons","w-0 lg:w-0 pointer-events-none":!e&&g==="hidden","pointer-events-auto":e&&g==="hidden","left-0 top-0":o&&g==="hidden","-translate-x-full":!e&&o&&g!=="hidden","translate-x-0":e&&o&&g==="hidden"}),children:[rt("div",{className:n("flex items-center py-2 justify-center w-full",{"justify-between px-2":o}),children:[z("section",{className:n({"ml-2":o,"-ml-16":!e}),children:ie}),g==="hidden"&&z("div",{onClick:()=>t(!1),className:"flex items-center gap-2 text-3xl cursor-pointer mr-5",children:z(Tn,{size:24,className:"text-black hover:opacity-60"})})]}),m,z("div",{className:"flex-1 overflow-y-auto px-0 h-full max-h-[calc(100vh-200px)]",children:z(rr,{isIconsOnly:h,collapseType:g,currentPath:i,isSidebarCollapsed:e,links:r,onNavigate:s,onToggleSideBar:t,appConfig:l,isMobile:o})}),z("div",{className:"absolute bottom-5 w-full",children:z(qo,{activeBusiness:L,handleSwitchBusiness:k,isBusinessShown:v,toggleAddBusinessDrawer:f,toggleShowBusiness:P,businesses:C||[],iconOnly:g==="icons"?e:!1,onLogoutClick:d,isMobile:o,onToggleSideBar:t,collapseType:g})})]})]})]})};import{jsx as Tt}from"react/jsx-runtime";var En=({status:e,variant:t,className:o})=>Tt("div",{children:Tt("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:Tt("p",{children:e.replace("-"," ")})})});import{Loader as li}from"lucide-react";import{ChevronLeftIcon as An,ChevronRightIcon as Bn}from"lucide-react";import{jsx as St}from"react/jsx-runtime";var In=({page:e,currentPage:t,onClick:o})=>typeof e=="string"?St("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):St("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}),pr=({totalPages:e,currentPage:t,handlePageClick:o})=>{let a=()=>{let p=Math.floor(1.5),d=Math.max(1,t-p),c=Math.min(e,d+3-1);return c>e&&(d=Math.max(1,e-3+1),c=e),{start:d,end:c}},{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,d)=>i+d)),s<e-1&&l.push("..."),s<e&&l.push(e),l.map((p,d)=>St(In,{page:p,currentPage:t,onClick:typeof p=="number"?()=>o(p):void 0},d))};import{jsx as Pe,jsxs as Ft}from"react/jsx-runtime";var Et=({currentPage:e=1,totalPages:t=1,onPageChange:o,itemsPerPage:r=0,totalItems:a=0,id:i="pagination"})=>{let s=d=>{d>=1&&d<=t&&o?.(d)},l=r===0?1:r*(e-1)+1,p=e===t?a:Math.min(l+r-1,a);return Ft("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&&Pe("section",{className:"text-[#717171] text-[12px]",children:Ft("p",{className:"",children:["Showing ",l," - ",p," of ",a]})}),Pe("div",{className:"flex items-center justify-center sm:justify-end ",children:Ft("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[Pe("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:Pe(An,{className:"size-5"})}),pr({currentPage:e,totalPages:t,handlePageClick:s}),Pe("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:Pe(Bn,{className:"size-5"})})]})})]})};import{flexRender as mr}from"@tanstack/react-table";import{jsx as ne,jsxs as Mn}from"react/jsx-runtime";var ur=({table:e,isMobile:t,onRowClick:o,id:r})=>ne("div",{className:n("relative w-full rounded-b border-0",{}),children:Mn("table",{id:r??"table",className:"w-full overflow-x-scroll",children:[ne("thead",{children:e.getHeaderGroups().map(a=>ne("tr",{className:n(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:a.headers.map(i=>ne("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:ne("div",{className:n("flex items-center",{"cursor-pointer select-none":i.column.getCanSort()}),onClick:i.column.getToggleSortingHandler(),children:i.isPlaceholder?null:mr(i.column.columnDef.header,i.getContext())})},i.id))},a.id))}),ne("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(a=>ne("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=>ne("td",{className:n("",{}),children:ne("div",{className:n("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:mr(i.column.columnDef.cell,i.getContext())})},i.id))},a.id))})]})});import{Download as ri,ListFilter as ai,RotateCw as ni}from"lucide-react";import{useCallback as Un,useEffect as vr,useState as Xn}from"react";import{useForm as Yn,Controller as ct}from"react-hook-form";import*as It from"react";import*as me from"@radix-ui/react-radio-group";import{jsx as at}from"react/jsx-runtime";var nt=It.forwardRef(({className:e,...t},o)=>at(me.Root,{className:n("grid gap-2",e),...t,ref:o}));nt.displayName=me.Root.displayName;var it=It.forwardRef(({className:e,...t},o)=>at(me.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:[O(qe,{activeBusiness:e,rightNode:O(or,{}),className:"bg-[#FAFAFA] border-none p-3"}),O("div",{className:"mt-3",children:O($,{label:"Search Account",leftNode:O(Pn,{className:"h-4 w-4 text-gray-500"}),value:p,onChange:g,placeholder:"Search Account",className:"text-sm"})}),O("ul",{className:"max-h-48 overflow-y-auto mt-2 px-1 space-y-2",children:u.map(y=>O(qe,{onTriggerClick:()=>v(y?.clientId),activeBusiness:y,rightNode:e.clientId===y.clientId?O(wn,{className:"text-primary-600",size:18}):void 0,className:n("bg-white border-none ",{"bg-[#FAFAFA]":e.clientId===y.clientId})},y.clientId))}),O("div",{className:"py-2 ",children:At("button",{onClick:C,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:[O(Rn,{size:18,className:"text-primary-main"})," Add Account"]})}),O("div",{className:"bg-[#FAFAFA] px-3 py-2 -m-3 mt-4",children:At("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:h,children:[O(Nn,{size:16})," Log Out"]})})]})})})};import{jsx as ye,jsxs as kn}from"react/jsx-runtime";var ar=({activeBusiness:e,toggleAddBusinessDrawer:t,toggleShowBusiness:o,businesses:r=[],handleSwitchBusiness:a,iconOnly:i=!1,onLogoutClick:s,isMobile:l,onToggleSideBar:d,isBusinessShown:p,collapseType:c})=>ye("div",{className:"px-4 relative mb-0 ",children:ye(fe,{side:l?"top":"right",open:p,onOpenChange:o,align:"end",contentClassName:"!bg-transparent !shadow-none !p-0",trigger:ye("div",{className:"flex items-center w-full",children:ye(qe,{activeBusiness:e,onTriggerClick:()=>o(!0),iconOnly:i,rightNode:ye(Dn,{className:"stroke-gray-500"})})}),children:ye(rr,{activeBusiness:e,handleSwitchBusiness:a,toggleAddBusinessDrawer:t,businesses:r,onLogoutClick:s,onToggleSideBar:d,toggleShowBusiness:o,collapseType:c,isMobile:l})})}),Dn=({className:e})=>kn("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:[ye("path",{d:"M7 22l5 5 5-5"}),ye("path",{d:"M7 4l5-5 5 5"})]});import{AnimatePresence as Tn,motion as Sn}from"framer-motion";import{useEffect as Fn}from"react";import{FiChevronRight as En}from"react-icons/fi";import{useState as nr,useEffect as ir}from"react";var sr=(e,t)=>{let[o,r]=nr(t),[a,i]=nr(!1);return ir(()=>{i(!0);try{let s=localStorage.getItem(e);s&&r(JSON.parse(s))}catch(s){console.error("Error reading from localStorage:",s)}},[e]),ir(()=>{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 lr,jsx as G,jsxs as Se}from"react/jsx-runtime";var In={hidden:{opacity:0,height:0},visible:{opacity:1,height:"auto",transition:{duration:.3}}},cr=({isIconsOnly:e,isSidebarCollapsed:t,onToggleSideBar:o,currentPath:r,onNavigate:a,collapseType:i,links:s,appConfig:l,isMobile:d})=>{let p="@sidebar-expanded-menus",[c,u]=sr(p,{}),m=h=>{u(y=>({...y,[h]:!y[h]}))},g=h=>{if(!!h?.children?.length){e?(o(!t),u(x=>({...x,[h.id]:!0}))):m(h.id);return}a(`/${h.to}`)},v=h=>h.split("?")[0],C=h=>h?.children?.length?(h.children||[]).some(x=>v(r)===v(x.to)):v(r)===v(h.to);return Fn(()=>{let h={};s.forEach(y=>{y.children&&y.children.length>0&&y.children.some(x=>v(r)===v(x.to))&&(h[y.id]=!0)}),u(h)},[s,r,t]),G("ul",{className:"w-[90%] space-y-2.5",children:s.map((h,y)=>{if(h.isHidden||l?.hiddenRoutes?.includes(h.key??""))return null;let x=C(h),P=!!h?.children?.length,f=c[h.id];return Se("div",{className:"mb-1 relative flex flex-col justify-center items-center",onClick:()=>g(h),children:[x&&!d&&(e||!P||!f)&&G("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),G("li",{id:h.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 ":x&&(!f||!t)},{"hover:bg-gray-100":!x&&(i!=="icons"||!t)},{"bg-white text-primary-main":x},{"flex justify-center text-primary-main !px-0 max-w-[70%]":e&&x,"flex justify-center !px-0 max-w-[70%]":e&&!x}),children:Se("div",{className:n("flex items-center w-full",{"justify-center":e}),children:[G(at,{trigger:G("span",{className:"w-6",onClick:()=>g(h),children:h.icon}),side:"right",hasArrow:!0,open:e?void 0:!1,children:h.name},y),(i!=="icons"||!t)&&Se(lr,{children:[G("span",{className:"px-3 text-nowrap",children:h.name}),P&&G("span",{className:"ml-auto transition-transform duration-300",style:{transform:f?"rotate(90deg)":"rotate(0deg)"},children:G(En,{size:18})})]})]})},h.to),P&&(i!=="icons"||!t)&&G(Tn,{children:f&&G(Sn.div,{initial:"hidden",animate:"visible",exit:"hidden",variants:In,className:"overflow-hidden w-full",children:Se("ul",{className:" mt-1 relative ",children:[h.children?.map(R=>{if(l?.hiddenRoutes?.includes(R.key??"")||R.isHidden)return null;let b=v(r)===v(R.to);return G("div",{id:R.id,className:n("relative pl-12 bg-blue-100- mt-4"),children:Se("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":b},{"hover:text-primary-main":!b}),onClick:()=>a(`/${R.to}`),children:[R.name,b&&Se(lr,{children:[!d&&G("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),G("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 "})]})]})})}),G("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 Gn}from"lucide-react";import{jsx as ie,jsxs as dr}from"react/jsx-runtime";var pr=()=>dr("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:[dr("g",{children:[ie("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"}),ie("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"})]}),ie("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"}),ie("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"}),ie("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"}),ie("path",{fill:"#000000",d:"m839.47,268.66V86.41h111.44v35.41h-69.26v49.21h69.26v34.63h-69.26v63.01h-42.18Z"}),ie("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"}),ie("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"}),ie("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"}),ie("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 mr,jsxs as An}from"react/jsx-runtime";var ur=()=>An("svg",{width:"100%",height:"32",viewBox:"0 0 20 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"pl-5",children:[mr("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"}),mr("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 ce,jsxs as gr}from"react/jsx-runtime";var fr=({onToggleSideBar:e,isSidebarCollapsed:t})=>ce("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?ce(Mn,{}):ce(Bn,{})}),Mn=e=>gr("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:[ce("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),ce("path",{d:"M9 3v18"}),ce("path",{d:"m14 9 3 3-3 3"})]}),Bn=e=>gr("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:[ce("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),ce("path",{d:"M15 3v18"}),ce("path",{d:"m10 15-3-3 3-3"})]});import{Fragment as _n,jsx as j,jsxs as dt}from"react/jsx-runtime";var Hn=({isSidebarCollapsed:e,onToggleSideBar:t,isMobile:o,links:r,businessProps:a,currentPath:i,onNavigate:s,appConfig:l,collapseType:d,onLogoutClick:p,openSidebarIcon:c=j(pr,{}),closedSidebarIcon:u=j(ur,{}),nodeAfterSideBarLogo:m})=>{let g=hr(()=>o?"hidden":d||(o?"hidden":"icons"),[o,d]),[v,C]=On(!1),h=g==="icons"&&e,y=Vn(null),{businessList:x,activeBusiness:P,toggleAddBusinessDrawer:f,handleSetActiveBusiness:w}=a,R=xe=>C(xe),b=xe=>{w?.(xe),R(!1)},I=hr(()=>g==="hidden"?c:e?u:c,[e,c,u,g]),X=o&&g==="hidden"&&e;return dt(_n,{children:[X&&j("div",{className:"fixed inset-0 z-40 bg-black bg-opacity-40 transition-all animate-in fade-in-15",onClick:()=>t(!1)}),dt("div",{className:n("relative flex flex-row h-full",{"fixed inset-0 z-50 pointer-events-none":X}),children:[j("div",{className:"absolute -right-[22px] top-0 z-20",children:g==="icons"&&j(fr,{isSidebarCollapsed:e,onToggleSideBar:t})}),dt("aside",{id:"sidebar_menu",ref:y,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":g==="hidden","w-[311px]":e&&g!=="icons","w-[75px]":e&&g==="icons","w-[270px]":!e&&g==="icons","w-0 lg:w-0 pointer-events-none":!e&&g==="hidden","pointer-events-auto":e&&g==="hidden","left-0 top-0":o&&g==="hidden","-translate-x-full":!e&&o&&g!=="hidden","translate-x-0":e&&o&&g==="hidden"}),children:[dt("div",{className:n("flex items-center py-2 justify-center w-full",{"justify-between px-2":o}),children:[j("section",{className:n({"ml-2":o,"-ml-16":!e}),children:I}),g==="hidden"&&j("div",{onClick:()=>t(!1),className:"flex items-center gap-2 text-3xl cursor-pointer mr-5",children:j(Gn,{size:24,className:"text-black hover:opacity-60"})})]}),m,j("div",{className:"flex-1 overflow-y-auto px-0 h-full max-h-[calc(100vh-200px)]",children:j(cr,{isIconsOnly:h,collapseType:g,currentPath:i,isSidebarCollapsed:e,links:r,onNavigate:s,onToggleSideBar:t,appConfig:l,isMobile:o})}),j("div",{className:"absolute bottom-5 w-full",children:j(ar,{activeBusiness:P,handleSwitchBusiness:b,isBusinessShown:v,toggleAddBusinessDrawer:f,toggleShowBusiness:R,businesses:x||[],iconOnly:g==="icons"?e:!1,onLogoutClick:p,isMobile:o,onToggleSideBar:t,collapseType:g})})]})]})]})};import{jsx as Mt}from"react/jsx-runtime";var Wn=({status:e,variant:t,className:o})=>Mt("div",{children:Mt("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:Mt("p",{children:e.replace("-"," ")})})});import{Loader as vi}from"lucide-react";import{ChevronLeftIcon as $n,ChevronRightIcon as Zn}from"lucide-react";import{jsx as Bt}from"react/jsx-runtime";var zn=({page:e,currentPage:t,onClick:o})=>typeof e=="string"?Bt("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):Bt("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}),yr=({totalPages:e,currentPage:t,handlePageClick:o})=>{let a=()=>{let d=Math.floor(1.5),p=Math.max(1,t-d),c=Math.min(e,p+3-1);return c>e&&(p=Math.max(1,e-3+1),c=e),{start:p,end:c}},{start:i,end:s}=a(),l=[];return i>1&&l.push(1),i>2&&l.push("..."),l.push(...Array.from({length:s-i+1},(d,p)=>i+p)),s<e-1&&l.push("..."),s<e&&l.push(e),l.map((d,p)=>Bt(zn,{page:d,currentPage:t,onClick:typeof d=="number"?()=>o(d):void 0},p))};import{jsx as Fe,jsxs as Vt}from"react/jsx-runtime";var Ot=({currentPage:e=1,totalPages:t=1,onPageChange:o,itemsPerPage:r=0,totalItems:a=0,id:i="pagination"})=>{let s=p=>{p>=1&&p<=t&&o?.(p)},l=r===0?1:r*(e-1)+1,d=e===t?a:Math.min(l+r-1,a);return Vt("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&&Fe("section",{className:"text-[#717171] text-[12px]",children:Vt("p",{className:"",children:["Showing ",l," - ",d," of ",a]})}),Fe("div",{className:"flex items-center justify-center sm:justify-end ",children:Vt("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[Fe("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:Fe($n,{className:"size-5"})}),yr({currentPage:e,totalPages:t,handlePageClick:s}),Fe("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:Fe(Zn,{className:"size-5"})})]})})]})};import{flexRender as vr}from"@tanstack/react-table";import{jsx as de,jsxs as Kn}from"react/jsx-runtime";var br=({table:e,isMobile:t,onRowClick:o,id:r})=>de("div",{className:n("relative w-full rounded-b border-0",{}),children:Kn("table",{id:r??"table",className:"w-full overflow-x-scroll",children:[de("thead",{children:e.getHeaderGroups().map(a=>de("tr",{className:n(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:a.headers.map(i=>de("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:de("div",{className:n("flex items-center",{"cursor-pointer select-none":i.column.getCanSort()}),onClick:i.column.getToggleSortingHandler(),children:i.isPlaceholder?null:vr(i.column.columnDef.header,i.getContext())})},i.id))},a.id))}),de("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(a=>de("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=>de("td",{className:n("",{}),children:de("div",{className:n("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:vr(i.column.columnDef.cell,i.getContext())})},i.id))},a.id))})]})});import{Download as ui,ListFilter as fi,RotateCw as gi}from"lucide-react";import{useCallback as ri,useEffect as Rr,useState as ai}from"react";import{useForm as ni,Controller as ht}from"react-hook-form";import*as Gt from"react";import*as ve from"@radix-ui/react-radio-group";import{jsx as pt}from"react/jsx-runtime";var mt=Gt.forwardRef(({className:e,...t},o)=>pt(ve.Root,{className:n("grid gap-2",e),...t,ref:o}));mt.displayName=ve.Root.displayName;var ut=Gt.forwardRef(({className:e,...t},o)=>pt(ve.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:at(me.Indicator,{className:"rounded-full flex items-center justify-center",children:at("div",{className:"h-2 w-2 bg-current text-current rounded-full transition"})})}));it.displayName=me.Item.displayName;import{v4 as Cr}from"uuid";import*as st from"react";import{ChevronLeft as Vn,ChevronRight as On}from"lucide-react";import*as fr from"react";import{DayPicker as Gn}from"react-day-picker";import{jsx as Ue}from"react/jsx-runtime";function At({className:e,classNames:t,showOutsideDays:o=!0,...r}){return Ue(Gn,{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(O({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(O({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})=>Ue(Vn,{className:"h-4 w-4",...a}),IconRight:({...a})=>Ue(On,{className:"h-4 w-4",...a}),Dropdown:({value:a,onChange:i,children:s})=>{let p=fr.Children.toArray(s).map(c=>({label:c.props.children,value:c.props.value?.toString()??""})),d=c=>{i?.({target:{value:c}})};return Ue("div",{className:"",children:Ue(ze,{options:p,value:p?.find(c=>c?.value===a?.toString()),onChange:c=>d(c?.value),className:"!border-0 !max-w-max"})})}},disabled:a=>a>new Date||a<new Date("1900-01-01"),...r})}At.displayName="Calendar";import{jsx as F,jsxs as Xe}from"react/jsx-runtime";var gr=st.forwardRef(({value:e,onClick:t,error:o,status:r},a)=>F("div",{className:"relative mt-2 rounded-md shadow-sm !w-full",children:Xe("button",{className:n(U({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:[Xe("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:[F("path",{d:"M8 2v4"}),F("path",{d:"M16 2v4"}),F("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),F("path",{d:"M3 10h18"})]}),e||"Select a date"]})}));gr.displayName="DateInputButton";var hr=(e,t)=>e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):t;function Hn({value:e,className:t,placeholder:o="Pick a date",...r}){return F(H,{asChild:!0,className:n("cursor-pointer",t),children:F(gr,{value:hr(e,o),error:r?.error})})}function _n({children:e,captionLayout:t="dropdown-buttons",fromYear:o=1900,toYear:r=new Date().getFullYear(),disableDate:a,modal:i,...s}){let[l,p]=st.useState(!1);return Xe(Q,{modal:i,open:a?!1:l,onOpenChange:p,children:[e,F(Y,{align:"start",className:"w-auto p-0",children:F(At,{mode:"single",fromYear:o,toYear:r,captionLayout:t,initialFocus:!0,classNames:{},showOutsideDays:!1,...s})})]})}var Wn=(e,t="yyyy-MM-dd")=>e?String(hr(new Date(e),t)):"N/A",Bt=({label:e,optional:t,onChange:o,error:r,helpText:a,value:i})=>Xe("div",{className:"block w-full",children:[e&&Xe("div",{className:"flex justify-between w-full",children:[F(T,{className:"block text-sm font-medium mb-0 text-pallet-text-white-black",children:e}),t&&F("span",{className:"text-sm leading-6 text-gray-500",id:"email-optional",children:"Optional"})]}),F(_n,{selected:i?new Date(i):void 0,onSelect:s=>{let l=s?Wn(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:F("div",{children:F(Hn,{status:r?"error":"default",value:i?new Date(i):void 0})})}),r&&F("p",{className:"mt-2 text-sm text-red-600",id:`${name}-error`,children:r}),a&&F("p",{className:"mt-2 text-sm text-gray-500",id:`${name}-description`,children:a})]});import{create as zn}from"zustand";var lt="filter_",$n=e=>{yr();let t=new URLSearchParams(window?.location?.search);Object.keys(e).forEach(o=>{t.set(`${lt}${o}`,e[o])}),console.log("params",t.toString()),window.history.replaceState({},"",`${window.location.pathname}?${t}`)},yr=()=>{let e=new URLSearchParams(window.location.search),t=[];e.forEach((o,r)=>{r.startsWith(lt)&&t.push(r)}),t.forEach(o=>e.delete(o)),window.history.replaceState({},"",`${window.location.pathname}?${e}`)},Zn=()=>{if(typeof window>"u")return{};let e=new URLSearchParams(window.location.search),t={};return e.forEach((o,r)=>{r.startsWith(lt)&&(t[r.replace(lt,"")]=o)}),t},Kn=()=>zn()(e=>({filters:Zn(),resetFilters:()=>{e({filters:null}),yr()},upDateFilter:t=>e(o=>{let r;return typeof t=="function"?r=t(o.filters):r={...o?.filters,...t},$n(r),{filters:r}})})),Ye=()=>Kn();import{PopoverClose as br}from"@radix-ui/react-popover";import{Fragment as jn,jsx as D,jsxs as ue}from"react/jsx-runtime";var xr=({filters:e,values:t={},setAppliedFilters:o,onChange:r,id:a="filter-content"})=>{let i=Ye(),{upDateFilter:s,resetFilters:l,filters:p}=i(),[d,c]=Xn(!0),u=()=>{c(!0)},{control:m,handleSubmit:g,watch:v,resetField:N}=Yn({defaultValues:p??t,mode:"all"});vr(()=>{d&&o&&(o(p),c(!1))},[d]),vr(()=>{if(!r)return;let f=v(b=>{r(b)});return()=>f.unsubscribe()},[r,v]);let h=()=>{l(),u()},y=f=>{let b=Object.fromEntries(Object.entries(f??{}).filter(([,P])=>P!==void 0&&P!==""));s(b),u()},C=Un(f=>{N(f,{defaultValue:""});let b={...v()};delete b[f];let P=Object.fromEntries(Object.entries(b??{}).filter(([,k])=>k!==void 0&&k!==""));if(h(),y(P),r){let ie={...v()};delete ie[f],r(ie)}},[N,p,s,r,v]),L=f=>{let b=v(f);return b!=null&&b!==""&&(Array.isArray(b)?b.length>0:!0)?D("div",{className:"flex justify-end mt-1",children:D("button",{onClick:()=>C(f),type:"button",className:"text-gray-500 text-[10px] font-medium p-0.5 px-1.5 border rounded-md hover:bg-gray-50 transition-colors",children:"Clear"})}):null};return ue("form",{onSubmit:g(y),children:[D("div",{className:"space-y-2",children:e.map(f=>{switch(f.type){case"input":return ue("div",{children:[D(ct,{name:f.key,control:m,render:({field:b,formState:P})=>D(G,{error:P?.errors?.root?.message,placeholder:f?.placeholder,id:`${a}-${f.key}`,...b,...f})}),L(f?.key)]},f.key);case"drop-down":return ue("div",{children:[D(ct,{name:f.key,control:m,render:({field:{value:b,onChange:P},formState:{errors:k}})=>D(ze,{label:f?.label,options:f?.options,value:f?.options?.find(ie=>String(ie?.value)===String(b)),onChange:ie=>P(ie?.value),error:k?.[f?.key]?.message,modal:!0,placeholder:f?.placeholder,className:"!h-10",id:`${a}-${f.key}`})}),L(f?.key)]},f.key);case"radio":return ue("div",{children:[D(ct,{name:f.key,control:m,render:({field:{value:b,onChange:P}})=>ue(jn,{children:[D(T,{className:"block text-sm font-medium mb-2 text-pallet-text-white-black",children:f?.label}),D(nt,{onValueChange:P,defaultValue:b,"aria-label":f?.label,id:`${a}-${f.key}`,children:D("div",{className:"flex items-center gap-2",children:f?.options?.map(k=>ue("div",{className:"flex items-center space-x-2",children:[D(it,{value:k?.value,id:`${a}-${f.key}-${k?.value}`}),D("label",{htmlFor:`${a}-${f.key}-${k?.value}`,className:"text-xs",children:k?.label})]},Cr()))})},`${Cr()}-${b}`)]})}),L(f?.key)]},f.key);case"date":return ue("div",{children:[D(ct,{name:f.key,control:m,render:({field:b})=>D(Bt,{onChange:b?.onChange,value:b?.value,label:f?.label})}),L(f?.key)]},f.key);default:return null}})}),ue("div",{style:{marginTop:28},className:"grid grid-cols-2 gap-2",children:[D(br,{onClick:h,className:n(O({variant:"outlined",size:"sm"})),type:"button",id:`${a}-reset-button`,children:"Reset"}),D(br,{className:n(O({size:"sm"})),type:"submit",id:`${a}-submit-button`,children:"Submit"})]})]})};import{ListFilter as ti}from"lucide-react";import{useEffect as Jn,useState as qn}from"react";import{Fragment as wr,jsx as Mt}from"react/jsx-runtime";var Nr=({setAppliedFilters:e})=>{let[t,o]=qn(!0),r=Ye(),{filters:a}=r(),i=Object.keys(a??{});return Jn(()=>{t&&e&&(e(a),o(!1))},[t]),Mt(wr,{children:i?.length?Mt("div",{className:"flex rounded-s-md bg-primary-main p-1 text-white text-sm px-2.5",children:i?.length}):Mt(wr,{})})};import{useEffect as Qn,useState as ei}from"react";var Pr=()=>{let[e,t]=ei(!1);return Qn(()=>(t(!0),()=>t(!1)),[]),{mounted:e,MounClient:r=>e?{children:r}:null}};import{jsx as Re,jsxs as oi}from"react/jsx-runtime";var Vt=({filters:e,setAppliedFilters:t,isOpen:o=!1,onChange:r,id:a="filter-popover"})=>{let{mounted:i}=Pr();return i?Re("div",{className:"",children:Re(ce,{id:`${a}-filter-popover`,defaultOpen:o,trigger:oi("button",{title:"Filter",className:n("!border-[#DEDEDE] !text-gray-800 !p-0 flex items-center",O({variant:"outlined",size:"sm"})),type:"button",children:[Re("span",{className:"!px-[10px] !py-[8px]",children:Re(ti,{className:"w-4 h-4",size:5})}),Re(Nr,{setAppliedFilters:t})]}),contentClassName:"!border border-gray-200 pt-2",children:Re(xr,{filters:e,setAppliedFilters:t,id:a,onChange:r})})}):null};import{Fragment as ii,jsx as E,jsxs as dt}from"react/jsx-runtime";var Ot=({onRefetch:e,search:t,FilterMenu:o,ExtraNode:r,onExport:a,download:i,isRefetching:s,filterListOptions:l=[],setAppliedFilters:p,onFilterChange:d,id:c="table-toolbar"})=>{let u=g=>{t?.onSearch?.(g)},m=()=>{try{e?.()}catch(g){console.error("Error while refetching data",g)}};return E(ii,{children:(e||t?.enabled||o||r||a)&&dt("div",{className:"w-full flex flex-col sm:!flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[E("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:dt("div",{className:" w-full flex gap-x-3",children:[t?.enabled&&E("section",{className:"sm:w-56",children:E(wt,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:u,debounce:t?.debounceRate,id:`${c}-search-input`})}),dt("div",{className:" flex gap-2",children:[e&&E(se,{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:E(ni,{className:n("w-4 h-4",{"animate-spin":s}),size:5})}),l?.length?E(Vt,{setAppliedFilters:p,filters:l,id:`${c}-filter-popover`,onChange:d}):null,o&&E(ce,{id:`${c}-deprecated-filter-popover`,trigger:E("button",{title:"Filter",className:n("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",O({variant:"outlined",size:"sm"})),children:E(ai,{className:"w-4 h-4",size:5})}),children:o})]})]})}),E("div",{className:"flex items-start flex-col gap-2 justify-center",children:E("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:dt("div",{className:"flex gap-2",children:[r&&r,a&&E(se,{variant:"primary",onClick:a,size:"sm",id:`${c}-export-button`,children:"Export"}),i?.enabled&&E(se,{variant:"primary",leftNode:E(ri,{className:"w-4 h-5",size:5}),onClick:i?.onDownload,id:i.buttonId,size:"sm",children:i?.buttonText})]})})})]})})};import{jsx as Rr,jsxs as si}from"react/jsx-runtime";var Lr=({tableBulkActions:e,selectedRows:t,isMobile:o=!1})=>{let r=t.length;return Rr("div",{className:n(" border-t border-gray-200 px-4 py-3","flex items-center justify-between",o&&"flex-col gap-2"),id:"bulk_row_actions",children:Rr("div",{className:n("flex gap-2",o&&"w-full justify-start flex-wrap"),children:e.map((a,i)=>si(se,{variant:a.variant||"outlined",size:"sm",className:n("flex ietems-center justify-center",a.className),onClick:()=>a.onClick(t),leftNode:a.icon,disabled:a.disabled||r===0,id:`bulk_row_action_${i}`,children:[a.label," ",a.showCount!==!1&&r]},i))})})};import{jsx as re,jsxs as Dr}from"react/jsx-runtime";var ci=({table:e,isMobile:t=!1,onRowClick:o,id:r="table",onRefetch:a,isRefetching:i,FilterMenu:s,ExtraNode:l,onExport:p,search:d={enabled:!1,debounceRate:700},download:c={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:u,pagination:m,filterListOptions:g,setAppliedFilters:v,onFilterChange:N,tableBulkActions:h})=>{let y=h&&Array.isArray(h.selectedRows)&&h.selectedRows.length>0;return Dr("div",{className:n("relative w-full rounded-b border-0 overflow-x-auto"),children:[re(Ot,{onRefetch:a,search:d,FilterMenu:s,ExtraNode:l,onExport:p,download:c,isRefetching:i,filterListOptions:g,setAppliedFilters:v,id:r,onFilterChange:N}),y&&h?.actions?.length&&re(Lr,{tableBulkActions:h.actions,selectedRows:h.selectedRows??[],isMobile:t}),re("main",{className:"w-full overflow-x-auto mt-5",children:u?Dr("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[re(li,{size:20,className:"animate-spin"}),re("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?re("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:re("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):re("div",{className:"flex flex-col gap-2",children:re(ur,{table:e,isMobile:t,onRowClick:o,id:r})})}),!u&&m?.enabled&&e.getRowModel().rows.length>0&&re(Et,{...m,currentPage:m?.currentPage??1,totalPages:m?.totalPages??Math.ceil((m?.totalItems??0)/Math.max(m?.itemsPerPage??1,1))??1,onPageChange:C=>m?.onPageChange?.(C),id:r})]})};import{createContext as di,useMemo as pi}from"react";import{jsx as ui}from"react/jsx-runtime";var pt=di(void 0),mi=({permissions:e,children:t})=>{let o=pi(()=>e,[e]);return ui(pt.Provider,{value:o,children:t})};import{useCallback as fi,useContext as gi,useMemo as hi}from"react";var kr=()=>gi(pt),Gt=e=>{let t=kr(),o=fi(a=>{if(!t||!a||t.some(c=>c.resource==="all"&&c.action==="administrator"))return!0;let{resource:s,action:l}=a,p=t.filter(c=>c.resource===s);return p.some(c=>c.action===l)?!0:l==="read"?p.some(c=>c.action==="write"):!1},[e]);return{hasPermission:hi(()=>o(e),[t,e]),validatePermission:o}};import{Fragment as Tr,jsx as Sr}from"react/jsx-runtime";var yi=({permission:e,children:t})=>{let{hasPermission:o}=Gt(e||{});return e?Sr(Tr,{children:o?t:null}):Sr(Tr,{children:t})};var Fr={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$"},je=class je{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 Fr[t]||t}};Wt(je,"formatAmountAndCurrency",(t,o,r)=>{let a=new Intl.NumberFormat(r?.locale||je.getCurrencyLocaleMap(t),{maximumFractionDigits:3,style:"currency",currency:t,currencyDisplay:"symbol"}).format(r?.convertToMajorCurrency?je.koboToNaira(Number(o)):Number(o)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),i=Fr[t]||t;return a.replace(t,i)});var Er=je;import Ht from"dayjs";var Ir=class{static getDateLibrary(){return Ht()}static formatTimestampToDate(t,o){return Ht.unix(t).format(o||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return Ht(t).unix()}};export{Er as AmountAction,Sa as Banner,se as Button,Bt as CalendarInput,Va as CopyableLabel,ba as Country,Fr as CurrencySymbolMap,Ir as DateAction,wt as DebouncedInput,Wa as DevBanner,Ct as Dialog,Ja as Drawer,Xa as DrawerClose,Nt as DrawerRoot,Vt as FilterPopover,de as FlagComponent,T as FormLabel,yi as HasResourcePermission,G as Input,De as Loader,sn as LocaleSelector,La as OTPInput,Ot as PageDataToolbar,Et as Pagination,mo as PasswordInput,pt as PermissionsContext,mi as PermissionsProvider,Do as PhoneInput,ce as Popover,Y as PopoverContent,Q as PopoverRoot,H as PopoverTrigger,nt as RadioGroup,it as RadioGroupItem,ve as ScrollArea,ze as Select,Sn as Sidebar,En as Status,ci as Table,Ce as TextOverflow,uo as Textarea,Je as Tooltip,ut as TooltipContent,Zt as TooltipProvider,Kt as TooltipRoot,Ut as TooltipTrigger,O as buttonVariants,n as cn,Ye as useFilterStore,Gt as useHasPermission,kr 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:pt(ve.Indicator,{className:"rounded-full flex items-center justify-center",children:pt("div",{className:"h-2 w-2 bg-current text-current rounded-full transition"})})}));ut.displayName=ve.Item.displayName;import{v4 as Pr}from"uuid";import*as ft from"react";import{ChevronLeft as Un,ChevronRight as jn}from"lucide-react";import*as Cr from"react";import{DayPicker as Xn}from"react-day-picker";import{jsx as Qe}from"react/jsx-runtime";function Ht({className:e,classNames:t,showOutsideDays:o=!0,...r}){return Qe(Xn,{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(z({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(z({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})=>Qe(Un,{className:"h-4 w-4",...a}),IconRight:({...a})=>Qe(jn,{className:"h-4 w-4",...a}),Dropdown:({value:a,onChange:i,children:s})=>{let d=Cr.Children.toArray(s).map(c=>({label:c.props.children,value:c.props.value?.toString()??""})),p=c=>{i?.({target:{value:c}})};return Qe("div",{className:"",children:Qe(Xe,{options:d,value:d?.find(c=>c?.value===a?.toString()),onChange:c=>p(c?.value),className:"!border-0 !max-w-max"})})}},disabled:a=>a>new Date||a<new Date("1900-01-01"),...r})}Ht.displayName="Calendar";import{jsx as E,jsxs as et}from"react/jsx-runtime";var xr=ft.forwardRef(({value:e,onClick:t,error:o,status:r},a)=>E("div",{className:"relative mt-2 rounded-md shadow-sm !w-full",children:et("button",{className:n(H({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:[et("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:[E("path",{d:"M8 2v4"}),E("path",{d:"M16 2v4"}),E("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),E("path",{d:"M3 10h18"})]}),e||"Select a date"]})}));xr.displayName="DateInputButton";var wr=(e,t)=>e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):t;function Yn({value:e,className:t,placeholder:o="Pick a date",...r}){return E(V,{asChild:!0,className:n("cursor-pointer",t),children:E(xr,{value:wr(e,o),error:r?.error})})}function Jn({children:e,captionLayout:t="dropdown-buttons",fromYear:o=1900,toYear:r=new Date().getFullYear(),disableDate:a,modal:i,...s}){let[l,d]=ft.useState(!1);return et(Z,{modal:i,open:a?!1:l,onOpenChange:d,children:[e,E(_,{align:"start",className:"w-auto p-0",children:E(Ht,{mode:"single",fromYear:o,toYear:r,captionLayout:t,initialFocus:!0,classNames:{},showOutsideDays:!1,...s})})]})}var qn=(e,t="yyyy-MM-dd")=>e?String(wr(new Date(e),t)):"N/A",_t=({label:e,optional:t,onChange:o,error:r,helpText:a,value:i})=>et("div",{className:"block w-full",children:[e&&et("div",{className:"flex justify-between w-full",children:[E(T,{className:"block text-sm font-medium mb-0 text-pallet-text-white-black",children:e}),t&&E("span",{className:"text-sm leading-6 text-gray-500",id:"email-optional",children:"Optional"})]}),E(Jn,{selected:i?new Date(i):void 0,onSelect:s=>{let l=s?qn(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:E("div",{children:E(Yn,{status:r?"error":"default",value:i?new Date(i):void 0})})}),r&&E("p",{className:"mt-2 text-sm text-red-600",id:`${name}-error`,children:r}),a&&E("p",{className:"mt-2 text-sm text-gray-500",id:`${name}-description`,children:a})]});import{create as Qn}from"zustand";var gt="filter_",ei=e=>{Nr();let t=new URLSearchParams(window?.location?.search);Object.keys(e).forEach(o=>{t.set(`${gt}${o}`,e[o])}),console.log("params",t.toString()),window.history.replaceState({},"",`${window.location.pathname}?${t}`)},Nr=()=>{let e=new URLSearchParams(window.location.search),t=[];e.forEach((o,r)=>{r.startsWith(gt)&&t.push(r)}),t.forEach(o=>e.delete(o)),window.history.replaceState({},"",`${window.location.pathname}?${e}`)},ti=()=>{if(typeof window>"u")return{};let e=new URLSearchParams(window.location.search),t={};return e.forEach((o,r)=>{r.startsWith(gt)&&(t[r.replace(gt,"")]=o)}),t},oi=()=>Qn()(e=>({filters:ti(),resetFilters:()=>{e({filters:null}),Nr()},upDateFilter:t=>e(o=>{let r;return typeof t=="function"?r=t(o.filters):r={...o?.filters,...t},ei(r),{filters:r}})})),tt=()=>oi();import{PopoverClose as Lr}from"@radix-ui/react-popover";import{Fragment as ii,jsx as S,jsxs as be}from"react/jsx-runtime";var Dr=({filters:e,values:t={},setAppliedFilters:o,onChange:r,id:a="filter-content"})=>{let i=tt(),{upDateFilter:s,resetFilters:l,filters:d}=i(),[p,c]=ai(!0),u=()=>{c(!0)},{control:m,handleSubmit:g,watch:v,resetField:C}=ni({defaultValues:d??t,mode:"all"});Rr(()=>{p&&o&&(o(d),c(!1))},[p]),Rr(()=>{if(!r)return;let f=v(w=>{r(w)});return()=>f.unsubscribe()},[r,v]);let h=()=>{l(),u()},y=f=>{let w=Object.fromEntries(Object.entries(f??{}).filter(([,R])=>R!==void 0&&R!==""));s(w),u()},x=ri(f=>{C(f,{defaultValue:""});let w={...v()};delete w[f];let R=Object.fromEntries(Object.entries(w??{}).filter(([,b])=>b!==void 0&&b!==""));if(h(),y(R),r){let I={...v()};delete I[f],r(I)}},[C,d,s,r,v]),P=f=>{let w=v(f);return w!=null&&w!==""&&(Array.isArray(w)?w.length>0:!0)?S("div",{className:"flex justify-end mt-1",children:S("button",{onClick:()=>x(f),type:"button",className:"text-gray-500 text-[10px] font-medium p-0.5 px-1.5 border rounded-md hover:bg-gray-50 transition-colors",children:"Clear"})}):null};return be("form",{onSubmit:g(y),children:[S("div",{className:"space-y-2",children:e.map(f=>{switch(f.type){case"input":return be("div",{children:[S(ht,{name:f.key,control:m,render:({field:w,formState:R})=>S($,{error:R?.errors?.root?.message,placeholder:f?.placeholder,id:`${a}-${f.key}`,...w,...f})}),P(f?.key)]},f.key);case"drop-down":return be("div",{children:[S(ht,{name:f.key,control:m,render:({field:{value:w,onChange:R},formState:{errors:b}})=>S(Xe,{label:f?.label,options:f?.options,value:f?.options?.find(I=>String(I?.value)===String(w)),onChange:I=>R(I?.value),error:b?.[f?.key]?.message,modal:!0,placeholder:f?.placeholder,className:"!h-10",id:`${a}-${f.key}`})}),P(f?.key)]},f.key);case"radio":return be("div",{children:[S(ht,{name:f.key,control:m,render:({field:{value:w,onChange:R}})=>be(ii,{children:[S(T,{className:"block text-sm font-medium mb-2 text-pallet-text-white-black",children:f?.label}),S(mt,{onValueChange:R,defaultValue:w,"aria-label":f?.label,id:`${a}-${f.key}`,children:S("div",{className:"flex items-center gap-2",children:f?.options?.map(b=>be("div",{className:"flex items-center space-x-2",children:[S(ut,{value:b?.value,id:`${a}-${f.key}-${b?.value}`}),S("label",{htmlFor:`${a}-${f.key}-${b?.value}`,className:"text-xs",children:b?.label})]},Pr()))})},`${Pr()}-${w}`)]})}),P(f?.key)]},f.key);case"date":return be("div",{children:[S(ht,{name:f.key,control:m,render:({field:w})=>S(_t,{onChange:w?.onChange,value:w?.value,label:f?.label})}),P(f?.key)]},f.key);default:return null}})}),be("div",{style:{marginTop:28},className:"grid grid-cols-2 gap-2",children:[S(Lr,{onClick:h,className:n(z({variant:"outlined",size:"sm"})),type:"button",id:`${a}-reset-button`,children:"Reset"}),S(Lr,{className:n(z({size:"sm"})),type:"submit",id:`${a}-submit-button`,children:"Submit"})]})]})};import{ListFilter as pi}from"lucide-react";import{useEffect as si,useState as li}from"react";import{Fragment as kr,jsx as Wt}from"react/jsx-runtime";var Tr=({setAppliedFilters:e})=>{let[t,o]=li(!0),r=tt(),{filters:a}=r(),i=Object.keys(a??{});return si(()=>{t&&e&&(e(a),o(!1))},[t]),Wt(kr,{children:i?.length?Wt("div",{className:"flex rounded-s-md bg-primary-main p-1 text-white text-sm px-2.5",children:i?.length}):Wt(kr,{})})};import{useEffect as ci,useState as di}from"react";var Sr=()=>{let[e,t]=di(!1);return ci(()=>(t(!0),()=>t(!1)),[]),{mounted:e,MounClient:r=>e?{children:r}:null}};import{jsx as Ee,jsxs as mi}from"react/jsx-runtime";var zt=({filters:e,setAppliedFilters:t,isOpen:o=!1,onChange:r,id:a="filter-popover"})=>{let{mounted:i}=Sr();return i?Ee("div",{className:"",children:Ee(fe,{id:`${a}-filter-popover`,defaultOpen:o,trigger:mi("button",{title:"Filter",className:n("!border-[#DEDEDE] !text-gray-800 !p-0 flex items-center",z({variant:"outlined",size:"sm"})),type:"button",children:[Ee("span",{className:"!px-[10px] !py-[8px]",children:Ee(pi,{className:"w-4 h-4",size:5})}),Ee(Tr,{setAppliedFilters:t})]}),contentClassName:"!border border-gray-200 pt-2",children:Ee(Dr,{filters:e,setAppliedFilters:t,id:a,onChange:r})})}):null};import{Fragment as hi,jsx as A,jsxs as yt}from"react/jsx-runtime";var $t=({onRefetch:e,search:t,FilterMenu:o,ExtraNode:r,onExport:a,download:i,isRefetching:s,filterListOptions:l=[],setAppliedFilters:d,onFilterChange:p,id:c="table-toolbar"})=>{let u=g=>{t?.onSearch?.(g)},m=()=>{try{e?.()}catch(g){console.error("Error while refetching data",g)}};return A(hi,{children:(e||t?.enabled||o||r||a)&&yt("div",{className:"w-full flex flex-col sm:!flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[A("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:yt("div",{className:" w-full flex gap-x-3",children:[t?.enabled&&A("section",{className:"sm:w-56",children:A(kt,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:u,debounce:t?.debounceRate,id:`${c}-search-input`})}),yt("div",{className:" flex gap-2",children:[e&&A(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:A(gi,{className:n("w-4 h-4",{"animate-spin":s}),size:5})}),l?.length?A(zt,{setAppliedFilters:d,filters:l,id:`${c}-filter-popover`,onChange:p}):null,o&&A(fe,{id:`${c}-deprecated-filter-popover`,trigger:A("button",{title:"Filter",className:n("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",z({variant:"outlined",size:"sm"})),children:A(fi,{className:"w-4 h-4",size:5})}),children:o})]})]})}),A("div",{className:"flex items-start flex-col gap-2 justify-center",children:A("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:yt("div",{className:"flex gap-2",children:[r&&r,a&&A(me,{variant:"primary",onClick:a,size:"sm",id:`${c}-export-button`,children:"Export"}),i?.enabled&&A(me,{variant:"primary",leftNode:A(ui,{className:"w-4 h-5",size:5}),onClick:i?.onDownload,id:i.buttonId,size:"sm",children:i?.buttonText})]})})})]})})};import{jsx as Fr,jsxs as yi}from"react/jsx-runtime";var Er=({tableBulkActions:e,selectedRows:t,isMobile:o=!1})=>{let r=t.length;return Fr("div",{className:n(" border-t border-gray-200 px-4 py-3","flex items-center justify-between",o&&"flex-col gap-2"),id:"bulk_row_actions",children:Fr("div",{className:n("flex gap-2",o&&"w-full justify-start flex-wrap"),children:e.map((a,i)=>yi(me,{variant:a.variant||"outlined",size:"sm",className:n("flex ietems-center justify-center",a.className),onClick:()=>a.onClick(t),leftNode:a.icon,disabled:a.disabled||r===0,id:`bulk_row_action_${i}`,children:[a.label," ",a.showCount!==!1&&r]},i))})})};import{jsx as se,jsxs as Ir}from"react/jsx-runtime";var bi=({table:e,isMobile:t=!1,onRowClick:o,id:r="table",onRefetch:a,isRefetching:i,FilterMenu:s,ExtraNode:l,onExport:d,search:p={enabled:!1,debounceRate:700},download:c={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:u,pagination:m,filterListOptions:g,setAppliedFilters:v,onFilterChange:C,tableBulkActions:h})=>{let y=h&&Array.isArray(h.selectedRows)&&h.selectedRows.length>0;return Ir("div",{className:n("relative w-full rounded-b border-0 overflow-x-auto"),children:[se($t,{onRefetch:a,search:p,FilterMenu:s,ExtraNode:l,onExport:d,download:c,isRefetching:i,filterListOptions:g,setAppliedFilters:v,id:r,onFilterChange:C}),y&&h?.actions?.length&&se(Er,{tableBulkActions:h.actions,selectedRows:h.selectedRows??[],isMobile:t}),se("main",{className:"w-full overflow-x-auto mt-5",children:u?Ir("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[se(vi,{size:20,className:"animate-spin"}),se("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?se("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:se("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):se("div",{className:"flex flex-col gap-2",children:se(br,{table:e,isMobile:t,onRowClick:o,id:r})})}),!u&&m?.enabled&&e.getRowModel().rows.length>0&&se(Ot,{...m,currentPage:m?.currentPage??1,totalPages:m?.totalPages??Math.ceil((m?.totalItems??0)/Math.max(m?.itemsPerPage??1,1))??1,onPageChange:x=>m?.onPageChange?.(x),id:r})]})};import{createContext as Ci,useMemo as xi}from"react";import{jsx as Ni}from"react/jsx-runtime";var vt=Ci(void 0),wi=({permissions:e,children:t})=>{let o=xi(()=>e,[e]);return Ni(vt.Provider,{value:o,children:t})};import{useCallback as Ri,useContext as Pi,useMemo as Li}from"react";var Ar=()=>Pi(vt),Zt=e=>{let t=Ar(),o=Ri(a=>{if(!t||!a||t.some(c=>c.resource==="all"&&c.action==="administrator"))return!0;let{resource:s,action:l}=a,d=t.filter(c=>c.resource===s);return d.some(c=>c.action===l)?!0:l==="read"?d.some(c=>c.action==="write"):!1},[e]);return{hasPermission:Li(()=>o(e),[t,e]),validatePermission:o}};import{Fragment as Mr,jsx as Br}from"react/jsx-runtime";var Di=({permission:e,children:t})=>{let{hasPermission:o}=Zt(e||{});return e?Br(Mr,{children:o?t:null}):Br(Mr,{children:t})};import*as le from"react";import*as Gr from"react";import*as ot from"@radix-ui/react-checkbox";import{motion as Vr}from"framer-motion";import{jsx as Ce,jsxs as Or}from"react/jsx-runtime";var Kt=Gr.forwardRef(({size:e="md",semi:t=!1,className:o,id:r,label:a,labelClassName:i,labelWrapperClassName:s,disabled:l,subtitle:d,subtitleClassName:p,bodyClassName:c,...u},m)=>Or("div",{className:n("flex justify-start items-start gap-1",c),children:[Ce(ot.Root,{ref:m,className:n(`shrink-0 rounded-[3px] transition box-border border border-solid
10
+ border-base-500 bg-base-100 dark:bg-transparent hover:bg-status-success-bg hover:border-status-success-fill ring-offset-background focus-visible:outline-none
11
+ focus-visible:border-status-success-fill focus-visible:!ring-offset-status-success-bg focus-visible:!ring-status-success-bg focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-status-success-fill
12
+ focus:border-status-success-fill focus:!ring-offset-status-success-bg focus:!ring-status-success-bg focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-status-success-fill
13
+ disabled:cursor-not-allowed disabled:opacity-50 peer`,e==="md"?"h-5 w-5":e==="lg"?"h-6 w-6":"","data-[state=checked]:border-status-success-fill data-[state=checked]:bg-status-success-bg",o),id:r,disabled:l,...u,children:Ce(ot.Indicator,{className:n(`text-white dark:text-black data-[state=checked]:text-status-success-fill
14
+ flex items-center justify-center text-current`),children:t?Ce(Vr.svg,{initial:{opacity:0,scale:.8},exit:{opacity:0},animate:{opacity:1,scale:1},transition:{duration:.1},width:"12",height:"2",viewBox:"0 0 12 2",fill:"none",children:Ce("path",{d:"M1.9165 1H10.0832",stroke:l?"#B0B0B0":"#00D488",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):Ce(Vr.svg,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.1},exit:{opacity:0},width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:Ce("path",{d:"M1 3.99996L3.66353 6.66349L9 1.33643",stroke:l?"#B0B0B0":"#00D488",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(a||d)&&Or("div",{className:n("flex flex-col justify-start items-start text-base-700 dark:text-white peer-aria-checked:text-base-900 dark:peer-aria-checked:text-white peer-focus-visible:text-base-900 dark:peer-focus-visible:text-white peer-focus:text-base-900 dark:peer-focus:text-white peer-hover:text-base-900 dark:peer-hover:text-white",s),children:[Ce("label",{htmlFor:r,className:n(i,"text-sm font-normal cursor-pointer disabled:cursor-not-allowed transition-colors"),children:a}),d&&Ce("p",{className:n("text-sm text-base-500",p),children:d})]})]}));Kt.displayName=ot.Root.displayName;import{X as ki}from"lucide-react";import{jsx as D,jsxs as te}from"react/jsx-runtime";var Hr=({disabled:e,className:t,values:o,placeholder:r="",status:a,onDelete:i})=>te(V,{className:n(H({status:a}),t),disabled:e,children:[D("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:o.length?o?.map(s=>te("p",{className:"text-xs p-1.5 py-1 bg-gray-100 rounded-md flex items-center",children:[s.label,D("button",{type:"button",className:"pl-2",onClick:l=>{l.stopPropagation(),i&&i(s)},children:D(ki,{size:12})})]},s?.value)):o.length===0?D("span",{className:"text-[#79818C] dark:text-[#959BA4]",children:r}):""}),D("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:D("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"})})]}),Ti=({options:e,children:t,onChange:o,optionComponent:r,values:a,hideSearch:i,modal:s,placeholder:l,isLoading:d,showSelectedValues:p=!1,error:c,label:u,showAsterisk:m})=>{let[g,v]=le.useState(""),[C,h]=le.useState(a),y=b=>{let I=C.find(X=>X.value===b.value);h(X=>I?(o(X.filter(xe=>xe.value!==b.value)),X.filter(xe=>xe.value!==b.value)):(o([...X,b]),[...X,b]))},x=g?e.filter(b=>b.label?.trim()?.toLowerCase()?.includes(g?.trim()?.toLowerCase())):e??[],P=le.useRef(null),[f,w]=le.useState(void 0);le.useLayoutEffect(()=>{P.current&&w(P.current.clientWidth)},[P.current]);let R=le.useCallback(b=>{let I=C?.filter(X=>X?.value!==b?.value)??[];console.log("filtered",I),h(I)},[C]);return te("div",{className:"relative space-y-1",children:[D(T,{showAsterisk:m,error:c,children:u}),te(Z,{modal:s,children:[D("div",{ref:P,children:t??D(Hr,{values:C,placeholder:l??"Select",onDelete:R,className:"h-auto"})}),p&&D("div",{className:"flex py-2 gap-2 flex-wrap",children:C?.map(b=>D("div",{className:"bg-gray-100 border text-black rounded-xl text-[10px] font-medium px-2 py-1",children:b?.label},b?.value))}),te(_,{portal:!s,align:"start",className:"min-w-[200px] p-0",style:{width:f},children:[!i&&D("div",{className:"w-full px-4",children:te("div",{className:"w-full h-[36px] px-1 flex items-center justify-start border-[0.5px] rounded-md border-[#D7D7D7] mb-[5px]",children:[d?D(pe,{}):te("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[D("path",{d:"M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z",stroke:"#959595",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),D("path",{d:"M22 22L20 20",stroke:"#959595",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),D("input",{value:g,placeholder:"Search",type:"text",disabled:d,className:"oultine-0 focus-visible:outline-0 focus-visible:ring-0 ml-1 w-full !border-transparent placeholder:text-sm placeholder:font-normal dark:bg-transparent placeholder:text-[#959595] dark:placeholder:text-[#DDDFE0] focus:ring-0 focus:ring-offset-0 focus:bg-white dark:focus:bg-transparent dark:text-[#DDDFE0]",onChange:b=>v(b.target.value)})]})}),te("div",{className:n("w-full h-[44px] px-2.5 flex items-center justify-between mb-[5px] border-[#D7D7D7] dark:border-[#5C636B]",i?"border-b-[0.5px]":"border-y-[0.5px]"),children:[te("button",{className:"text-sm text-primary-main font-normal",onClick:()=>{C?.length===e?.length?(h([]),o([])):(h(e),o(e))},disabled:x?.length<1||d,children:[C?.length===e?.length?"Unselect":"Select"," all"]}),te("p",{className:"text-sm text-[#959595] font-normal dark:text-[#DDDFE0]",children:[C.length," selected"]})]}),te(ge,{viewPortClassName:"max-h-[225px]",className:"pb-1",children:[d&&D("div",{className:"py-7 flex justify-center",children:D(pe,{})}),!d&&x?.map(b=>D("article",{className:"cursor-pointer relative hover:bg-status-success-bg transition flex w-[calc(100%-0.375rem)] mx-auto rounded-md items-center focus:dark:!text-[#DDDFE0] py-1.5 px-2 text-sm outline-none focus:bg-status-success-bg dark:!text-[#DDDFE0] focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus-visible:ring-1 focus-visible:ring-status-success-fill focus-visible:ring-offset-1 focus-visible:ring-offset-status-success-fill",onClick:()=>{y(b)},children:D("div",{className:"w-full h-[30px] flex flex-row items-center dark:!text-white",children:D(Kt,{value:b.value,label:r?r(b):b.label,bodyClassName:"w-full",labelWrapperClassName:"w-full",labelClassName:n(r&&"w-full"),checked:C?.map(I=>I.value).includes(b.value)})})},b.value))]})]})]})]})};var _r={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$"},rt=class rt{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 _r[t]||t}};jt(rt,"formatAmountAndCurrency",(t,o,r)=>{let a=new Intl.NumberFormat(r?.locale||rt.getCurrencyLocaleMap(t),{maximumFractionDigits:3,style:"currency",currency:t,currencyDisplay:"symbol"}).format(r?.convertToMajorCurrency?rt.koboToNaira(Number(o)):Number(o)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),i=_r[t]||t;return a.replace(t,i)});var Wr=rt;import Ut from"dayjs";var zr=class{static getDateLibrary(){return Ut()}static formatTimestampToDate(t,o){return Ut.unix(t).format(o||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return Ut(t).unix()}};export{Wr as AmountAction,Ha as Banner,me as Button,_t as CalendarInput,Ua as CopyableLabel,Sa as Country,_r as CurrencySymbolMap,zr as DateAction,kt as DebouncedInput,qa as DevBanner,Pt as Dialog,ln as Drawer,an as DrawerClose,Tt as DrawerRoot,zt as FilterPopover,he as FlagComponent,T as FormLabel,Di as HasResourcePermission,$ as Input,pe as Loader,yn as LocaleSelector,Ti as MultiSelect,Hr as MultiSelectTrigger,Ba as OTPInput,$t as PageDataToolbar,Ot as Pagination,vo as PasswordInput,vt as PermissionsContext,wi as PermissionsProvider,Io as PhoneInput,fe as Popover,_ as PopoverContent,Z as PopoverRoot,V as PopoverTrigger,mt as RadioGroup,ut as RadioGroupItem,ge as ScrollArea,Xe as Select,Hn as Sidebar,Wn as Status,bi as Table,Le as TextOverflow,bo as Textarea,at as Tooltip,bt as TooltipContent,Jt as TooltipProvider,qt as TooltipRoot,Qt as TooltipTrigger,z as buttonVariants,n as cn,tt as useFilterStore,Zt as useHasPermission,Ar as usePermissions};
10
15
  //# sourceMappingURL=index.mjs.map