@6thbridge/hexa 0.0.106 → 0.0.107-pr92-203
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.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";var Oi=Object.defineProperty;var Vi=(e,t,r)=>t in e?Oi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var lr=(e,t,r)=>Vi(e,typeof t!="symbol"?t+"":t,r);var Mo={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$"},Ot=class Ot{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 Mo[t]||t}};lr(Ot,"formatAmountAndCurrency",(t,r,o)=>{let a=new Intl.NumberFormat(o?.locale||Ot.getCurrencyLocaleMap(t),{maximumFractionDigits:3,style:"currency",currency:t,currencyDisplay:"symbol"}).format(o?.convertToMajorCurrency?Ot.koboToNaira(Number(r)):Number(r)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),n=Mo[t]||t;return a.replace(t,n)});var Io=Ot;import Ir from"dayjs";var Bo=class{static getDateLibrary(){return Ir()}static formatTimestampToDate(t,r){return Ir.unix(t).format(r||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return Ir(t).unix()}};var Br=class{static capitalizeFirstWord(t){return t.charAt(0).toUpperCase()+t.slice(1)}static capitalizeEachWord(t){return t.split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}};lr(Br,"sanitizeString",({str:t,allowedChars:r})=>{if(!r)return t.replace(/[^a-zA-Z0-9\s]/g,"");let o=r.map(n=>["^","$",".","*","+","?","(",")","[","]","{","}","|","\\","-"].includes(n)?"\\"+n:n),a=new RegExp(`[^a-zA-Z0-9${o.join("")}]`,"g");return t.replace(a,"")});import*as Vo from"react";import*as ye from"@radix-ui/react-tooltip";import{clsx as Hi}from"clsx";import{twMerge as $i}from"tailwind-merge";function s(...e){return $i(Hi(e))}import{jsx as vt,jsxs as Oo}from"react/jsx-runtime";var Ho=ye.Provider,$o=ye.Root,_o=ye.Trigger,Or=Vo.forwardRef(({className:e,sideOffset:t=2,...r},o)=>vt(ye.Portal,{children:vt(ye.Content,{ref:o,sideOffset:t,className:s("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),...r,children:r.children})}));Or.displayName=ye.Content.displayName;var cr=({trigger:e,children:t,contentClassName:r,triggerClassName:o,asChild:a=!0,side:n,sideOffset:i,align:l,alignOffset:u,delayDuration:d=100,hasArrow:p=!0,arrowClassName:m,...c})=>vt(Ho,{children:vt($o,{delayDuration:d,...c,children:Oo("div",{className:"flex justify-center items-center",children:[vt(_o,{asChild:a,className:o,children:e}),Oo(Or,{side:n,sideOffset:i,align:l,alignOffset:u,className:r,children:[t,p&&vt(ye.Arrow,{className:s("fill-white",m)})]})]})})});cr.displayName="Tooltip";import Gi from"react";import*as zo from"react";import*as Vr from"@radix-ui/react-label";import{cva as _i}from"class-variance-authority";import{jsx as Wi}from"react/jsx-runtime";var zi=_i("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Hr=zo.forwardRef(({className:e,...t},r)=>Wi(Vr.Root,{ref:r,className:s(zi(),e),...t}));Hr.displayName=Vr.Root.displayName;import{jsx as Wo,jsxs as Ui}from"react/jsx-runtime";var G=Gi.forwardRef(({className:e,children:t,showAsterisk:r,error:o,...a},n)=>Wo(Hr,{ref:n,className:s(o&&"text-red-500",e),...a,children:r?Ui("p",{children:[t,Wo("span",{className:"text-red-500",children:"*"})]}):t}));G.displayName="FormLabel";import{jsx as Go,jsxs as Zi}from"react/jsx-runtime";var Fe=({size:e=16,colour:t="primary"})=>Zi("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[Go("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),Go("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 Uo from"react";import{Slot as Ki}from"@radix-ui/react-slot";import{cva as ji}from"class-variance-authority";import{Fragment as Yi,jsx as st,jsxs as Xi}from"react/jsx-runtime";var le=ji("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"}}),re=Uo.forwardRef(({className:e,variant:t="primary",size:r,asChild:o=!1,isLoading:a=!1,leftNode:n,rightNode:i,LoaderSize:l,children:u,disabled:d,...p},m)=>st(o?Ki:"button",{className:s(le({variant:t,size:r,className:e})),ref:m,disabled:d||a,...p,children:st("div",{className:"flex font-medium justify-center items-center gap-2 pointer-events-none",children:a?st("span",{className:"mx-auto",children:st(Fe,{size:l,colour:"secondary"})}):Xi(Yi,{children:[n&&st("span",{children:n}),u&&st("span",{children:u}),i&&st("span",{children:i})]})})}));re.displayName="Button";import*as xe from"@radix-ui/react-dropdown-menu";import{ChevronDown as qi}from"lucide-react";import*as Zo from"react";import{jsx as _e,jsxs as dr}from"react/jsx-runtime";var Ji=le,Ko=({items:e,variant:t="primary",size:r,isLoading:o=!1,leftNode:a,children:n,disabled:i,className:l,buttonClassName:u,triggerClassName:d,contentClassName:p,itemClassName:m,menuAlign:c="end",menuSide:g="bottom",menuTriggerLabel:C="More options",open:h,onOpenChange:v,modal:f=!1,id:x="split-button",...P})=>dr("div",{className:s("inline-flex",l),id:x,children:[_e(re,{type:"button",variant:t,size:r,isLoading:o,leftNode:a,disabled:i,className:s("!rounded-r-none",u),id:`${x}-action`,...P,children:n}),dr(xe.Root,{open:h,onOpenChange:v,modal:f,children:[_e(xe.Trigger,{asChild:!0,disabled:i,className:"!h-full",children:_e(re,{type:"button",variant:t,size:r,disabled:i,className:s("!px-2 !rounded-l-none !h-auto",Ji({variant:t,size:r}),d,{"!border-l-white border-l-[0.5px]":t==="primary"||t==="danger"}),id:`${x}-trigger`,"aria-label":C,children:_e(qi,{className:"h-full w-4"})})}),_e(xe.Portal,{children:_e(xe.Content,{align:c,side:g,sideOffset:4,className:s("z-50 min-w-[10rem] overflow-hidden rounded-md border border-gray-100 bg-white p-1 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",p),id:`${x}-content`,children:e.map((w,L)=>dr(Zo.Fragment,{children:[w.separatorBefore&&_e(xe.Separator,{className:"-mx-1 my-1 h-px bg-gray-100"}),dr(xe.Item,{disabled:w.disabled,onSelect:()=>w.onSelect?.(),className:s("flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-primary-accent focus:bg-primary-accent data-[highlighted]:bg-primary-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",w.destructive&&"text-red-600 hover:bg-red-50 focus:bg-red-50 data-[highlighted]:bg-red-50",m,w.className),id:`${x}-item-${w.value??L}`,children:[w.icon&&_e("span",{className:"shrink-0",children:w.icon}),_e("span",{children:w.label})]})]},w.value??L))})})]})]});Ko.displayName="SplitButton";import*as $r from"react";import{cva as _r}from"class-variance-authority";import Qi from"react";import{jsx as es}from"react/jsx-runtime";var pe=Qi.forwardRef(({className:e,children:t,error:r,...o},a)=>{let n=r??t;return n?es("p",{ref:a,className:s("text-xs font-normal text-[#F04248]",e),...o,children:n}):null});pe.displayName="ErrorMessage";import ts from"react";import{jsx as rs}from"react/jsx-runtime";var Ne=ts.forwardRef(({className:e,...t},r)=>rs("div",{ref:r,className:s("text-sm text-[#8E98A8",e),...t}));Ne.displayName="FormDescription";import{jsx as lt,jsxs as Yo}from"react/jsx-runtime";var os=_r("!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"}}),Xo=$r.forwardRef(({className:e,status:t,type:r,...o},a)=>lt("input",{type:r,className:s(os({status:t}),e),ref:a,...o}));Xo.displayName="BaseInnerInput";var oe=_r("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"}}),jo=_r("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"}}),ne=$r.forwardRef(({className:e,status:t="default",disabled:r,error:o,isLoading:a,sideNodeClassName:n,showAsterisk:i,label:l,description:u,...d},p)=>{let m=t;return o&&(m="error"),a&&(m="loading"),r&&(m="prefilled"),Yo("div",{className:"relative space-y-1 w-full",children:[l&<(G,{showAsterisk:i,error:o,children:l}),Yo("div",{className:s(oe({status:m}),d.leftNode?"pl-0":"",d.rightNode?"pr-0":"",e),children:[d.leftNode?lt("div",{className:s(jo({status:m,side:"left"}),n),children:d.leftNode}):null,lt(Xo,{ref:p,disabled:a||r,className:s({"!pl-3":d.leftNode&&t!=="neutral","!pr-3":d.rightNode&&t!=="neutral","sentry-mask":!!d?.isContentSensitive}),...d}),d.rightNode?lt("div",{className:s(jo({status:m,side:"right"}),n),children:d.rightNode}):null]}),u&<(Ne,{className:"text-gray-400 text-sm !font-normal",children:u}),lt(pe,{error:o})]})});ne.displayName="Input";import{useMemo as is,useState as an}from"react";import{jsx as qo}from"react/jsx-runtime";var Jo=()=>qo("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:qo("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 Qo,jsxs as ns}from"react/jsx-runtime";var en=()=>ns("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Qo("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"}),Qo("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 tn,jsxs as as}from"react/jsx-runtime";var rn=()=>as("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[tn("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"}),tn("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 on}from"react/jsx-runtime";var nn=()=>on("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:on("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 Me,jsxs as ss}from"react/jsx-runtime";var sn=[{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:"12 Characters",key:"twelve-chars",RegExp:/.{12}/,validated:!1}],ln=({onValidate:e,onChange:t,disableValidation:r,...o})=>{let[a,n]=an(!1),[i,l]=an(sn),u=c=>sn.map(g=>({...g,validated:g.RegExp.test(c)})),d=c=>{let g=u(c),C=g.every(h=>h.validated);return l(g),C},p=c=>{if(t&&t(c),r)return;let g=c?.target?.value,C=d(g);e&&e(C,g)},m=is(()=>Me("div",{className:"flex items-center gap-2",children:i?.map(c=>ss("div",{className:s("text-xs flex items-center gap-0.5",{"text-[#62C554]":c?.validated,"text-[#8E98A8]":!c?.validated}),children:[Me("span",{className:"",children:c?.validated?Me(Jo,{}):Me(nn,{})}),Me("span",{className:"",children:c?.label})]},c?.key))}),[i]);return Me(ne,{sideNodeClassName:"!border-l-0",rightNode:a?Me("button",{type:"button",onClick:()=>n(c=>!c),children:Me(en,{})}):Me("button",{type:"button",onClick:()=>n(c=>!c),children:Me(rn,{})}),type:a?"text":"password",onChange:p,description:!r&&m,isContentSensitive:!0,...o})};ln.displayName="PasswordInput";import{cva as ls}from"class-variance-authority";import{jsx as ur,jsxs as cs}from"react/jsx-runtime";var h1=ls("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"}}),cn=({className:e,status:t="default",disabled:r,error:o,isLoading:a,showAsterisk:n,label:i,description:l,...u})=>{let d=t;return o&&(d="error"),a&&(d="loading"),r&&(d="prefilled"),cs("div",{className:"relative space-y-1",children:[ur(G,{showAsterisk:n,error:o,children:i}),ur("textarea",{className:s("min-h-[80px]",oe({status:d}),e),disabled:a||r,...u}),ur(Ne,{className:"text-gray-400 text-sm !font-normal",children:l}),ur(pe,{error:o})]})};cn.displayName="Textarea";import*as Sn from"react";import{X as ks}from"lucide-react";import*as ct from"react";import*as Qe from"react";import{Command as me}from"cmdk";import{Search as gs}from"lucide-react";import*as z from"@radix-ui/react-dialog";import*as Je from"react";import{jsx as dn,jsxs as ds}from"react/jsx-runtime";var un=()=>ds("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:[dn("path",{d:"M18 6 6 18"}),dn("path",{d:"m6 6 12 12"})]});import{Fragment as fs,jsx as we,jsxs as bt}from"react/jsx-runtime";var us=z.Root,ps=z.Trigger,ms=z.Portal,pn=Je.forwardRef(({className:e,...t},r)=>we(z.Overlay,{ref:r,className:s("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}));pn.displayName=z.Overlay.displayName;var zr=Je.forwardRef(({className:e,hideCloseButton:t,children:r,...o},a)=>bt(ms,{children:[we(pn,{}),bt(z.Content,{ref:a,className:s("fixed left-[50%] top-[50%] z-50 grid sm:w-full w-[95%] 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),...o,children:[r,!t&&bt(z.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 z-20",children:[we(un,{}),we("span",{className:"sr-only",children:"Close"})]})]})]}));zr.displayName=z.Content.displayName;var mn=({className:e,...t})=>we("div",{className:s("flex flex-col space-y-1.5 text-left",e),...t});mn.displayName="DialogHeader";var fn=({className:e,...t})=>we("div",{className:s("flex flex-row justify-end sm:space-x-2",e),...t});fn.displayName="DialogFooter";var gn=Je.forwardRef(({className:e,...t},r)=>we(z.Title,{ref:r,className:s("text-xl font-semibold leading-none tracking-tight",e),...t}));gn.displayName=z.Title.displayName;var hn=Je.forwardRef(({className:e,...t},r)=>we(z.Description,{ref:r,className:s("text-sm text-gray-500",e),...t}));hn.displayName=z.Description.displayName;var Wr=({trigger:e=void 0,children:t,open:r,onOpenChange:o,hideCloseButton:a,footer:n,title:i,description:l,contentClassName:u,headerClassName:d,titleClassName:p,descriptionClassName:m,footerClassName:c,asChild:g=!0,onOpenAutoFocus:C,onCloseAutoFocus:h,onEscapeKeyDown:v,onInteractOutside:f,onPointerDownOutside:x,closeOnOutsideClick:P=!0,...w})=>{let L=Je.useCallback(b=>{P||b.preventDefault(),x?.(b)},[P,x]),T=Je.useCallback(b=>{P||b.preventDefault(),f?.(b)},[P,f]);return bt(us,{...w,...r!==void 0?{open:r,onOpenChange:o}:{},children:[we(ps,{asChild:g,children:e}),bt(zr,{className:u,hideCloseButton:a,onOpenAutoFocus:C,onCloseAutoFocus:h,onEscapeKeyDown:v,onPointerDownOutside:L,onInteractOutside:T,children:[i||l?bt(mn,{className:d,children:[i&&we(gn,{className:p,children:i}),l&&we(hn,{className:m,children:l})]}):we(fs,{}),t,n&&we(fn,{className:c,children:n})]})]})};Wr.displayName=z.Dialog.displayName;import{Fragment as F1,jsx as Ie,jsxs as bs}from"react/jsx-runtime";var Vt=Qe.forwardRef(({className:e,...t},r)=>Ie(me,{ref:r,className:s("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Vt.displayName=me.displayName;var Ht=Qe.forwardRef(({className:e,CommandInputContainerClassName:t,loading:r,...o},a)=>bs("div",{className:s("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[r?Ie(Fe,{size:16,colour:"secondary"}):Ie(gs,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),Ie(me.Input,{ref:a,className:s("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:r,...o})]}));Ht.displayName=me.Input.displayName;var $t=Qe.forwardRef(({className:e,...t},r)=>Ie(me.List,{ref:r,className:s("overflow-y-auto overflow-x-hidden",e),...t}));$t.displayName=me.List.displayName;var _t=Qe.forwardRef((e,t)=>Ie(me.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));_t.displayName=me.Empty.displayName;var zt=Qe.forwardRef(({className:e,...t},r)=>Ie(me.Group,{ref:r,className:s("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}));zt.displayName=me.Group.displayName;var hs=Qe.forwardRef(({className:e,...t},r)=>Ie(me.Separator,{ref:r,className:s("-mx-1 h-px bg-border",e),...t}));hs.displayName=me.Separator.displayName;var Wt=Qe.forwardRef(({className:e,...t},r)=>Ie(me.Item,{ref:r,className:s("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}));Wt.displayName=me.Item.displayName;var vs=({className:e,...t})=>Ie("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});vs.displayName="CommandShortcut";import*as Gr from"react";import*as Re from"@radix-ui/react-popover";import{jsx as yt,jsxs as ys}from"react/jsx-runtime";var fe=Re.Root,J=Gr.forwardRef((e,t)=>yt(Re.Trigger,{ref:t,...e,onPointerDown:r=>{e.onPointerDown?.(r)}}));J.displayName=Re.Trigger.displayName;var ce=Gr.forwardRef(({className:e,align:t="center",sideOffset:r=4,portal:o=!0,...a},n)=>o?yt(Re.Portal,{children:yt(Re.Content,{ref:n,align:t,sideOffset:r,className:s("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})}):yt(Re.Content,{ref:n,align:t,sideOffset:r,className:s("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}));ce.displayName=Re.Content.displayName;var Pe=({trigger:e,children:t,open:r,onOpenChange:o,contentClassName:a,asChild:n=!0,align:i,side:l,alignOffset:u,triggerClassName:d,sideOffset:p,onOpenAutoFocus:m,onCloseAutoFocus:c,portal:g=!0,id:C="popover",...h})=>ys(fe,{...h,...r!==void 0?{open:r,onOpenChange:o}:{},children:[yt(J,{asChild:n,className:d,id:`${C}-trigger`,children:e}),yt(ce,{alignOffset:u,sideOffset:p,side:l,align:i,className:a,onOpenAutoFocus:m,onCloseAutoFocus:c,portal:g,id:`${C}-content`,children:t})]});Pe.displayName=Re.Root.displayName;import*as Ur from"react";import*as De from"@radix-ui/react-scroll-area";import{jsx as Gt,jsxs as ws}from"react/jsx-runtime";var Se=Ur.forwardRef(({className:e,viewPortClassName:t,children:r,...o},a)=>ws(De.Root,{ref:a,className:s("relative overflow-hidden",e),...o,children:[Gt(De.Viewport,{className:s("h-full w-full rounded-[inherit]",t),children:r}),Gt(pr,{}),Gt(De.Corner,{})]}));Se.displayName=De.Root.displayName;var pr=Ur.forwardRef(({className:e,orientation:t="vertical",...r},o)=>Gt(De.ScrollAreaScrollbar,{ref:o,orientation:t,className:s("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),...r,children:Gt(De.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));pr.displayName=De.ScrollAreaScrollbar.displayName;import{jsx as Le,jsxs as mr}from"react/jsx-runtime";var vn=({className:e,value:t,placeholder:r="",status:o,disabled:a,id:n})=>Le(J,{asChild:!0,disabled:a,id:n??"searchable-trigger",children:mr("button",{disabled:a,className:s(oe({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[Le("span",{children:t??r??"Select options..."}),Le("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:Le("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"})})]})}),fr=({options:e=[],value:t,onChange:r,containerClassName:o,placeholder:a,disabled:n,loading:i,optionComponent:l,children:u,modal:d=!1,hideSearch:p,className:m,inputValue:c,onValueChange:g,onInputValueChange:C})=>{let[h,v]=ct.useState(!1),[f,x]=ct.useState(void 0),P=ct.useRef(null),w=ct.useCallback(L=>{if(P.current&&(P.current.disconnect(),P.current=null),L){let T=()=>{x(L.getBoundingClientRect().width)};T();let b=new ResizeObserver(()=>{T()});b.observe(L),P.current=b}},[]);return mr(fe,{modal:d,open:h,onOpenChange:v,children:[Le("div",{className:s("w-full",m),ref:w,children:u}),Le(ce,{portal:!d,className:"p-0 min-w-[200px]",style:{width:f?`${f}px`:void 0},children:mr(Vt,{className:s("relative max-h-[270px]",{"mt-2":!p}),children:[!p&&Le(Ht,{loading:i,placeholder:a??"Search options...",onValueChange:C,value:c,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),Le(Se,{viewPortClassName:"max-h-[225px]",className:s("w-full px-0 h-full overflow-y-auto",o),children:mr($t,{children:[!p&&Le(_t,{children:"No result found."}),Le(zt,{className:"w-full",children:e?.map((L,T)=>Le(Wt,{defaultValue:t?.label,value:L.label,disabled:n,onSelect:()=>{r(L),v(!1),g?.(L?.value)},id:L.value,children:l?l(L):Le("span",{children:L.label})},`${L.value}-${T}`))})]})})]})})]})};import{X as Ns}from"lucide-react";import*as Z from"react";import{v4 as yn}from"uuid";import{AnimatePresence as Cs,motion as xs}from"framer-motion";import*as bn from"react";import{jsx as et,jsxs as Zr}from"react/jsx-runtime";var Ut=({size:e="md",semi:t=!1,className:r,id:o,label:a,labelClassName:n,labelWrapperClassName:i,disabled:l,subtitle:u,subtitleClassName:d,bodyClassName:p,checked:m,defaultChecked:c,onCheckedChange:g,name:C,value:h,onClick:v})=>{let f=bn.useId(),x=o??f,P=l?"#B0B0B0":"#00D488";return Zr("div",{className:s("flex justify-start items-start gap-1",p),children:[Zr("div",{className:"relative flex items-center justify-center",children:[et("input",{type:"checkbox",id:x,name:C,value:h,checked:m,defaultChecked:c,disabled:l,onClick:v,onChange:w=>g?.(w.target.checked),className:s("appearance-none shrink-0 rounded-[3px] border border-solid border-base-500","bg-base-100 dark:bg-transparent cursor-pointer transition","hover:bg-status-success-bg hover:border-status-success-fill","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-status-success-fill focus-visible:ring-offset-2","checked:bg-status-success-bg checked:border-status-success-fill","disabled:cursor-not-allowed disabled:opacity-50",e==="md"?"h-5 w-5":"h-6 w-6",r)}),et(Cs,{children:m&&et(xs.svg,{className:"absolute pointer-events-none",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.1},...t?{width:12,height:2,viewBox:"0 0 12 2"}:{width:10,height:8,viewBox:"0 0 10 8"},fill:"none",children:t?et("path",{d:"M1.9165 1H10.0832",stroke:P,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}):et("path",{d:"M1 3.99996L3.66353 6.66349L9 1.33643",stroke:P,strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})},t?"semi":"check")})]}),(a||u)&&Zr("div",{className:s("flex flex-col justify-start items-start",i),children:[et("label",{htmlFor:x,children:et("span",{className:s("text-sm font-normal cursor-pointer transition-colors text-base-700 dark:text-white",l&&"cursor-not-allowed opacity-50",n),onClick:()=>!l&&g?.(!m),children:a})}),u&&et("p",{className:s("text-sm text-base-500",l&&"opacity-50",d),children:u})]})]})};Ut.displayName="Checkbox";import{jsx as B,jsxs as Ee}from"react/jsx-runtime";var wn=Z.memo(({item:e,onDelete:t})=>Ee("p",{className:"text-xs p-1.5 py-1 bg-gray-100 rounded-md flex items-center",children:[B("span",{children:e.label}),B("button",{type:"button",className:"pl-2",onClick:r=>{r.stopPropagation(),t(e)},children:B(Ns,{size:12})})]}));wn.displayName="SelectedChip";var Kr=Z.memo(({disabled:e,className:t,values:r,placeholder:o="",status:a,onDelete:n})=>B(J,{asChild:!0,disabled:e,children:Ee("div",{className:s(oe({status:a}),"cursor-pointer [&>svg]:shrink-0 h-auto min-h-12 flex items-center justify-between w-full gap-2",t),children:[B("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:r.length?r.map(i=>B(wn,{item:i,onDelete:n},i.value)):B("span",{className:"text-[#79818C] dark:text-[#959BA4]",children:o})}),B("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:B("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}));Kr.displayName="MultiSelectTrigger";var Cn=Z.memo(({option:e,isChecked:t,onSelect:r,optionComponent:o})=>B("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:()=>r(e),children:B("div",{className:"w-full h-[30px] flex flex-row items-center dark:!text-white",children:B(Ut,{onCheckedChange:()=>r(e),value:e.value,label:o?o(e):B("span",{children:e.label}),bodyClassName:"w-full",labelWrapperClassName:"w-full",labelClassName:s(o&&"w-full"),checked:t})})}));Cn.displayName="OptionItem";var jr=({options:e,children:t,onChange:r,optionComponent:o,values:a,hideSearch:n,modal:i,placeholder:l,isLoading:u,showSelectedValues:d=!1,error:p,label:m,showAsterisk:c})=>{let[g,C]=Z.useState(""),h=a,v=Z.useMemo(()=>new Set(h.map(y=>y.value)),[h]),f=Z.useMemo(()=>{if(!g)return e;let y=g.trim().toLowerCase();return e.filter(F=>F.label?.trim()?.toLowerCase()?.includes(y))},[e,g]),x=Z.useCallback(y=>{let F=v.has(y.value);r(F?h.filter($=>$.value!==y.value):[...h,y])},[h,v,r]),P=Z.useRef(null),[w,L]=Z.useState(void 0);Z.useLayoutEffect(()=>{if(!P.current)return;let y=P.current,F=()=>{L(y.getBoundingClientRect().width)};F();let $=new ResizeObserver(()=>{F()});return $.observe(y),()=>$.disconnect()},[]);let T=Z.useCallback(y=>{let F=h.filter($=>$.value!==y.value);r(F)},[h,r]),b=Z.useCallback(()=>{h.length===e.length?r([]):r(e)},[h.length,e,r]),D=Z.useCallback(y=>{C(y.target.value)},[]);return Ee("div",{className:"relative space-y-1",children:[B(G,{showAsterisk:c,error:p,children:m}),Ee(fe,{modal:i,children:[B("div",{ref:P,children:t??B(Kr,{values:h,placeholder:l??"Select",onDelete:T,className:"h-auto"})}),d&&B("div",{className:"flex py-2 gap-2 flex-wrap",children:h.map(y=>B("div",{className:"bg-gray-100 border text-black rounded-xl text-[10px] font-medium px-2 py-1",children:B("span",{children:y.label})},yn()))}),Ee(ce,{portal:!i,align:"start",className:"min-w-[200px] p-0",style:{width:w?`${w}px`:void 0},onInteractOutside:y=>{y.target?.closest("[data-radix-popper-content-wrapper]")&&y.preventDefault()},onOpenAutoFocus:y=>y.preventDefault(),children:[!n&&B("div",{className:"w-full px-4",children:Ee("div",{className:"w-full h-[36px] px-1 flex items-center justify-start border-[0.5px] rounded-md border-[#D7D7D7] mb-[5px]",children:[u?B(Fe,{}):Ee("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[B("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"}),B("path",{d:"M22 22L20 20",stroke:"#959595",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),B("input",{value:g,placeholder:"Search",type:"text",disabled:u,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:D})]})}),Ee("div",{className:s("w-full h-[44px] px-2.5 flex items-center justify-between mb-[5px] border-[#D7D7D7] dark:border-[#5C636B]",n?"border-b-[0.5px]":"border-y-[0.5px]"),children:[B("button",{className:"text-sm text-primary-main font-normal",onClick:b,disabled:f.length<1||u,children:Ee("span",{children:[h.length===e.length?"Unselect":"Select"," all"]})}),Ee("p",{className:"text-sm text-[#959595] font-normal dark:text-[#DDDFE0]",children:[h.length," selected"]})]}),Ee(Se,{viewPortClassName:"max-h-[225px]",className:"pb-1",children:[u&&B("div",{className:"py-7 flex justify-center",children:B(Fe,{})}),!u&&f.map(y=>B(Cn,{option:y,isChecked:v.has(y.value),onSelect:x,optionComponent:o},yn()))]})]})]})]})};var Rs=[{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"}],xn=e=>{if(!e)return Rs?.map(r=>({value:r?.internetCountryCode,label:r?.countryName,...r}));if(!e?.length)return[];let t=new Set;return e.reduce((r,o)=>(t.has(o.value)||(t.add(o.value),r.push(o)),r),[])};import*as jt from"react";import*as gr from"react-phone-number-input";import Ss from"react-phone-number-input/flags";import{jsx as Zt,jsxs as Ds}from"react/jsx-runtime";var Ps=e=>Ds("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[Zt("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",Zt("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"}),Zt("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),Zt("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),Zt("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Nn=Ps;import{jsx as H,jsxs as Kt}from"react/jsx-runtime";var Rn=jt.forwardRef(({className:e,onChange:t,defaultCountry:r="NG",disableCountrySelect:o=!1,modal:a,showAsterisk:n,label:i,description:l,error:u,countryOptions:d,...p},m)=>{let c=g=>H(Ls,{...g,status:p.status,modal:a,options:d||g?.options});return Kt("div",{className:"relative space-y-1",children:[H(G,{showAsterisk:n,error:u,children:i}),H(gr.default,{ref:m,className:s("flex sentry-mask",e),flagComponent:ze,countrySelectComponent:g=>H(c,{...g,disabled:g?.disabled||o}),inputComponent:Pn,defaultCountry:r,onChange:g=>{t&&t?.(g)},...p}),H(Ne,{className:"text-gray-400 text-sm !font-normal",children:l}),H(pe,{error:u})]})});Rn.displayName="PhoneInput";var Pn=jt.forwardRef(({className:e,...t},r)=>H(ne,{className:s("!rounded-s-none h-10",e),...t,ref:r}));Pn.displayName="InputComponent";var Ls=({disabled:e,value:t,onChange:r,options:o,status:a,modal:n})=>{let i=jt.useCallback(l=>{r(l)},[r]);return Kt(fe,{modal:n,children:[H(J,{disabled:e,children:Kt("div",{className:s(oe({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:[H(ze,{country:t,countryName:t}),H("svg",{className:s("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:H("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"})})]})}),H(ce,{portal:!n,className:"w-[200px] md:w-[300px] p-0",children:H(Vt,{children:H($t,{children:Kt(Se,{className:"h-72",children:[H(Ht,{placeholder:"Search country..."}),H(_t,{children:"No country found."}),H(zt,{children:o.filter(l=>l.value).map(l=>Kt(Wt,{className:"gap-2",onSelect:()=>i(l.value),children:[H(ze,{country:l.value,countryName:l.label}),H("span",{className:"flex-1 text-sm",children:l.label}),l.value&&H("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${gr.getCountryCallingCode(l.value)}`}),H("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:s("ml-auto",l.value===t?"opacity-100":"opacity-0"),children:H("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${l.value}-${l.label}`))})]})})})})]})},ze=({country:e,countryName:t,className:r})=>{let o=Ss[e];return e==="GLOBAL"?H("span",{className:s("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:H(Nn,{className:"w-full h-[90%]"})}):H("span",{className:s("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:o&&H(o,{title:t})})};ze.displayName="FlagComponent";import{jsx as M,jsxs as tt}from"react/jsx-runtime";var Ts=({className:e,value:t,placeholder:r="",status:o,disabled:a})=>M(J,{asChild:!0,disabled:a,id:"country-dropdown",children:tt("button",{disabled:a,className:s(oe({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?tt("div",{className:"flex gap-2 items-center",children:[M(ze,{country:t?.value,countryName:t?.value,className:"ml-1 !w-6 h-5"}),M("span",{className:"",children:t?.label}),"-",M("span",{className:"",children:t?.value})]}):M("span",{children:r??"Select options..."}),M("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:M("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"})})]})}),Ln=Sn.memo(({item:e,onDelete:t})=>tt("p",{className:"text-xs pl-1.5 pr-1 py-1 bg-gray-100 rounded-md flex items-center gap-1",children:[M(ze,{country:e?.internetCountryCode||e?.value,countryName:e?.value,className:"!w-5 h-4"}),M("span",{children:e.label}),M("button",{type:"button",className:"pl-1",onClick:r=>{r.stopPropagation(),t(e)},children:M(ks,{size:12})})]}));Ln.displayName="CountryChip";var Fs=({className:e,values:t,placeholder:r="",status:o,disabled:a,onDelete:n})=>M(J,{asChild:!0,disabled:a,id:"country-dropdown",children:tt("div",{className:s(oe({status:o}),"cursor-pointer h-auto min-h-12 flex items-center justify-between w-full gap-2",e),children:[M("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:t.length?t.map(i=>M(Ln,{item:i,onDelete:n},i.value)):M("span",{className:"text-[#79818C]",children:r})}),M("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:M("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"})})]})}),Dn=e=>tt("div",{className:"w-full flex items-center gap-2",children:[M(ze,{country:e?.internetCountryCode||e?.value,countryName:e?.label,className:"ml-2 !w-6 !h-5"}),tt("div",{className:"flex-1 flex items-center gap-2",children:[M("span",{className:"flex text-sm",children:e?.label}),"-",M("span",{className:"text-sm",children:e?.internetCountryCode})]})]}),Es=e=>{let{hideSearch:t=!0,showAsterisk:r,label:o,description:a,error:n,countryOptions:i=void 0}=e,l=xn(i);if(e.multiSelect){let{value:c,onChange:g,placeholder:C,status:h,disabled:v,loading:f,modal:x,className:P,optionComponent:w}=e,L=c??[];return tt("div",{className:"relative space-y-1",children:[M(G,{showAsterisk:r,error:n,children:o}),M(jr,{options:l,values:L,onChange:b=>g(b),hideSearch:t,modal:x,isLoading:f,placeholder:C??"Select Country",optionComponent:w??Dn,children:M(Fs,{values:L,status:h,disabled:v,className:P,placeholder:C??"Select Country",onDelete:b=>{g(L.filter(D=>D.value!==b.value))}})}),M(Ne,{className:"text-gray-400 text-sm !font-normal",children:a}),M(pe,{error:n})]})}let{value:u,onChange:d,...p}=e,m=l?.find(c=>(c?.value||c?.internetCountryCode)===u?.value);return tt("div",{className:"relative space-y-1",children:[M(G,{showAsterisk:r,error:n,children:o}),M(fr,{options:l,hideSearch:t,optionComponent:Dn,value:u,onChange:d,...p,children:M(Ts,{value:m,status:p?.status,placeholder:p?.placeholder??" Select Country"})}),M(Ne,{className:"text-gray-400 text-sm !font-normal",children:a}),M(pe,{error:n})]})};import{jsx as Yt,jsxs as As}from"react/jsx-runtime";var rt=({showAsterisk:e,label:t,description:r,error:o,hideSearch:a=!1,status:n,...i})=>As("div",{className:"relative space-y-1",children:[Yt(G,{showAsterisk:e,error:o,children:t}),Yt(fr,{hideSearch:a,...i,containerClassName:"h-full",children:Yt(vn,{disabled:i?.disabled,placeholder:i?.placeholder??"Select",status:n,value:i?.value?.label??i?.value?.value,className:i?.className,id:i?.id})}),Yt(Ne,{className:"text-gray-400 text-sm !font-normal",children:r}),Yt(pe,{error:o})]});import{cva as Ms}from"class-variance-authority";import{useMemo as Is}from"react";import Bs from"react-otp-input";import{jsx as kn}from"react/jsx-runtime";var Os=Ms("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 flex-shrink-0",{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"}}),Vs=({numInputs:e=4,inputStyle:t,containerStyle:r,placeholder:o="-",status:a,inputMode:n="numeric",inputType:i="number",...l})=>{let u=Is(()=>o||new Array(e).fill("").reduce((m,c)=>m+=c,""),[e,o]);return kn(Bs,{numInputs:e,placeholder:u,containerStyle:s("w-fit sentry-mask flex justify-between",r),inputStyle:s(Os({status:a}),t,"sentry-mask"),renderInput:d=>kn("input",{...d,inputMode:n,type:i}),inputType:i,...l})};import*as Be from"@radix-ui/react-accordion";import{ChevronDown as Hs}from"lucide-react";import{jsx as Xt,jsxs as Tn}from"react/jsx-runtime";function $s({items:e,type:t="single",defaultValue:r,onChange:o,className:a}){return Xt(Be.Root,{...t==="single"?{type:"single",collapsible:!0,defaultValue:r,onValueChange:o}:{type:"multiple",defaultValue:r,onValueChange:o},className:s("w-full flex flex-col gap-2.5",a),children:e.map(i=>Tn(Be.Item,{value:i.key,className:"border border-gray-300 rounded-md overflow-hidden",children:[Xt(Be.Header,{className:"flex",children:Tn(Be.Trigger,{className:"group flex flex-1 items-center justify-between px-4 py-3 text-sm font-medium text-gray-800 hover:bg-gray-200/50 transition-all data-[state=open]:bg-gray-200/50",children:[i.title,Xt(Hs,{className:"h-4 w-4 shrink-0 text-gray-500 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),Xt(Be.Content,{className:"overflow-hidden data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up",children:Xt("div",{className:"px-4 py-3 border-t border-gray-300",children:i.content})})]},i.key))})}import{useState as _s,useEffect as zs}from"react";import{jsx as K,jsxs as dt}from"react/jsx-runtime";var Ws=({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",strokeWidth:"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"})}),Gs=({type:e="info",title:t,description:r,open:o,showCloseButton:a,bottomNode:n,sideNode:i,onClose:l,showIcon:u=!0})=>{let[d,p]=_s(o);zs(()=>{p(o)},[o]);let m="",c="";switch(e){case"gray":m="#eeeef0",c="#79818c";break;case"info":m="#ebf5fd",c="#70B6F6";break;case"warning":m="#fff8df",c="#ffc700";break;case"success":m="#e0f9f0",c="#49e0aa";break;case"danger":m="#fde8e9",c="#f3777c";break;default:m="#eeeef0",c="#79818c";break}function g(){p(!1),l&&l()}return d?dt("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:m||"#ebf5fd"},children:[K("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:c||"#70B6F6"}}),dt("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[dt("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[u&&K("div",{className:"h-full flex justify-end",children:K(Ws,{type:e})}),dt("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[dt("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||r)&&dt("div",{children:[t&&K("div",{className:"text-sm font-bold text-[#191919]",children:t}),r&&K("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:r})]}),n]}),i]})]}),a&&K("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:K("button",{onClick:g,children:dt("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 Zs}from"react";import{Copy as Ks,CheckIcon as js}from"lucide-react";import{motion as Ys,AnimatePresence as Xs}from"framer-motion";import{jsx as Us}from"react/jsx-runtime";var wt=({children:e,mode:t="truncate",className:r,as:o="div",...a})=>Us(o,{className:s({"text-ellipsis overflow-hidden whitespace-nowrap":t==="truncate","whitespace-normal break-words":t==="wrap","":t==="overflow"},r),target:a?.href?"_blank":void 0,...a,children:e});import{jsx as Ct,jsxs as Js}from"react/jsx-runtime";var qs=({text:e,textToCopy:t,onCopy:r,iconsPosition:o="right",clampText:a=!0,clampMode:n="truncate",isLink:i=!1,textClassName:l})=>{let[u,d]=Zs(!1),p=()=>{navigator.clipboard.writeText(t??e).then(()=>{d(!0),r?.(),setTimeout(()=>d(!1),2e3)})},m=u?js:Ks;return Js("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:[o==="left"&&Ct(Fn,{Icon:m,onClick:p,copied:u}),Ct(wt,{as:i?"a":"span",mode:a?n:"overflow",className:s({underline:i},l),href:i?e:void 0,children:e}),o==="right"&&Ct(Fn,{Icon:m,onClick:p,copied:u})]})},Fn=({Icon:e,onClick:t,copied:r})=>Ct(Xs,{mode:"wait",children:Ct(Ys.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:Ct(e,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});import{useEffect as En,useState as Qs}from"react";import{Search as el}from"lucide-react";import{jsx as An}from"react/jsx-runtime";var Yr=({value:e,onChange:t,debounce:r=500,addon:o,...a})=>{let[n,i]=Qs(e??""),l=u=>i(u.target.value);return En(()=>{e&&i(e)},[e]),En(()=>{let u=setTimeout(()=>{t(n)},r);return()=>clearTimeout(u)},[n,r,t]),An(ne,{leftNode:o??An(el,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...a,className:s("!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:n})};import{useEffect as Mn}from"react";import{X as tl}from"lucide-react";import{jsx as Oe,jsxs as xt}from"react/jsx-runtime";var rl=e=>{let{environment:t,branch:r,version:o,deployTime:a,showBanner:n,onClose:i,initDefault:l,removeFromStorage:u,syncLocalStorageToState:d}=e,p=t||process.env.NEXT_PUBLIC_NODE_ENV;return p!=="staging"&&p!=="sandbox"||(Mn(()=>{d()},[d]),Mn(()=>{let m;return(p==="staging"||p==="sandbox")&&(m=setInterval(()=>{u(),l()},300*1e3)),()=>{m&&clearInterval(m)}},[n,t,i,u,l,p]),!n)?null:xt("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[Oe("button",{onClick:i,className:"absolute top-2 right-2",children:Oe(tl,{})}),xt("div",{className:"space-y-2 text-sm",children:[xt("div",{className:"flex gap-2",children:[Oe("span",{className:"font-medium",children:"Environment:"}),Oe("span",{className:"text-blue-600 capitalize",children:p})]}),xt("div",{className:"flex gap-2",children:[Oe("span",{className:"font-medium",children:"Branch:"}),Oe("span",{className:"text-green-600 capitalize",children:r||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),xt("div",{className:"flex gap-2",children:[Oe("span",{className:"font-medium",children:"Version:"}),Oe("span",{className:"text-purple-600",children:o||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),xt("div",{className:"flex gap-2",children:[Oe("span",{className:"font-medium",children:"Deploy Time:"}),Oe("span",{className:"text-orange-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};import{cva as Bl}from"class-variance-authority";import*as Qt from"react";import*as ae from"@radix-ui/react-dialog";import*as Hn from"react";import R,{useLayoutEffect as nl,useEffect as al,useMemo as il}from"react";function ol(e){if(!e||typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}var $n=R.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Nt=()=>{let e=R.useContext($n);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};ol(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
1
|
+
"use client";var Oi=Object.defineProperty;var Vi=(e,t,r)=>t in e?Oi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var lr=(e,t,r)=>Vi(e,typeof t!="symbol"?t+"":t,r);var Mo={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$"},Ot=class Ot{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 Mo[t]||t}};lr(Ot,"formatAmountAndCurrency",(t,r,o)=>{let a=new Intl.NumberFormat(o?.locale||Ot.getCurrencyLocaleMap(t),{maximumFractionDigits:2,style:"currency",currency:t,currencyDisplay:"symbol"}).format(o?.convertToMajorCurrency?Ot.koboToNaira(Number(r)):Number(r)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),n=Mo[t]||t;return a.replace(t,n)});var Io=Ot;import Ir from"dayjs";var Bo=class{static getDateLibrary(){return Ir()}static formatTimestampToDate(t,r){return Ir.unix(t).format(r||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return Ir(t).unix()}};var Br=class{static capitalizeFirstWord(t){return t.charAt(0).toUpperCase()+t.slice(1)}static capitalizeEachWord(t){return t.split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}};lr(Br,"sanitizeString",({str:t,allowedChars:r})=>{if(!r)return t.replace(/[^a-zA-Z0-9\s]/g,"");let o=r.map(n=>["^","$",".","*","+","?","(",")","[","]","{","}","|","\\","-"].includes(n)?"\\"+n:n),a=new RegExp(`[^a-zA-Z0-9${o.join("")}]`,"g");return t.replace(a,"")});import*as Vo from"react";import*as ye from"@radix-ui/react-tooltip";import{clsx as Hi}from"clsx";import{twMerge as $i}from"tailwind-merge";function s(...e){return $i(Hi(e))}import{jsx as vt,jsxs as Oo}from"react/jsx-runtime";var Ho=ye.Provider,$o=ye.Root,_o=ye.Trigger,Or=Vo.forwardRef(({className:e,sideOffset:t=2,...r},o)=>vt(ye.Portal,{children:vt(ye.Content,{ref:o,sideOffset:t,className:s("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),...r,children:r.children})}));Or.displayName=ye.Content.displayName;var cr=({trigger:e,children:t,contentClassName:r,triggerClassName:o,asChild:a=!0,side:n,sideOffset:i,align:l,alignOffset:u,delayDuration:d=100,hasArrow:p=!0,arrowClassName:m,...c})=>vt(Ho,{children:vt($o,{delayDuration:d,...c,children:Oo("div",{className:"flex justify-center items-center",children:[vt(_o,{asChild:a,className:o,children:e}),Oo(Or,{side:n,sideOffset:i,align:l,alignOffset:u,className:r,children:[t,p&&vt(ye.Arrow,{className:s("fill-white",m)})]})]})})});cr.displayName="Tooltip";import Gi from"react";import*as zo from"react";import*as Vr from"@radix-ui/react-label";import{cva as _i}from"class-variance-authority";import{jsx as Wi}from"react/jsx-runtime";var zi=_i("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Hr=zo.forwardRef(({className:e,...t},r)=>Wi(Vr.Root,{ref:r,className:s(zi(),e),...t}));Hr.displayName=Vr.Root.displayName;import{jsx as Wo,jsxs as Ui}from"react/jsx-runtime";var G=Gi.forwardRef(({className:e,children:t,showAsterisk:r,error:o,...a},n)=>Wo(Hr,{ref:n,className:s(o&&"text-red-500",e),...a,children:r?Ui("p",{children:[t,Wo("span",{className:"text-red-500",children:"*"})]}):t}));G.displayName="FormLabel";import{jsx as Go,jsxs as Zi}from"react/jsx-runtime";var Fe=({size:e=16,colour:t="primary"})=>Zi("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[Go("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),Go("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 Uo from"react";import{Slot as Ki}from"@radix-ui/react-slot";import{cva as ji}from"class-variance-authority";import{Fragment as Yi,jsx as st,jsxs as Xi}from"react/jsx-runtime";var le=ji("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"}}),re=Uo.forwardRef(({className:e,variant:t="primary",size:r,asChild:o=!1,isLoading:a=!1,leftNode:n,rightNode:i,LoaderSize:l,children:u,disabled:d,...p},m)=>st(o?Ki:"button",{className:s(le({variant:t,size:r,className:e})),ref:m,disabled:d||a,...p,children:st("div",{className:"flex font-medium justify-center items-center gap-2 pointer-events-none",children:a?st("span",{className:"mx-auto",children:st(Fe,{size:l,colour:"secondary"})}):Xi(Yi,{children:[n&&st("span",{children:n}),u&&st("span",{children:u}),i&&st("span",{children:i})]})})}));re.displayName="Button";import*as xe from"@radix-ui/react-dropdown-menu";import{ChevronDown as qi}from"lucide-react";import*as Zo from"react";import{jsx as _e,jsxs as dr}from"react/jsx-runtime";var Ji=le,Ko=({items:e,variant:t="primary",size:r,isLoading:o=!1,leftNode:a,children:n,disabled:i,className:l,buttonClassName:u,triggerClassName:d,contentClassName:p,itemClassName:m,menuAlign:c="end",menuSide:g="bottom",menuTriggerLabel:C="More options",open:h,onOpenChange:v,modal:f=!1,id:x="split-button",...P})=>dr("div",{className:s("inline-flex",l),id:x,children:[_e(re,{type:"button",variant:t,size:r,isLoading:o,leftNode:a,disabled:i,className:s("!rounded-r-none",u),id:`${x}-action`,...P,children:n}),dr(xe.Root,{open:h,onOpenChange:v,modal:f,children:[_e(xe.Trigger,{asChild:!0,disabled:i,className:"!h-full",children:_e(re,{type:"button",variant:t,size:r,disabled:i,className:s("!px-2 !rounded-l-none !h-auto",Ji({variant:t,size:r}),d,{"!border-l-white border-l-[0.5px]":t==="primary"||t==="danger"}),id:`${x}-trigger`,"aria-label":C,children:_e(qi,{className:"h-full w-4"})})}),_e(xe.Portal,{children:_e(xe.Content,{align:c,side:g,sideOffset:4,className:s("z-50 min-w-[10rem] overflow-hidden rounded-md border border-gray-100 bg-white p-1 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",p),id:`${x}-content`,children:e.map((w,L)=>dr(Zo.Fragment,{children:[w.separatorBefore&&_e(xe.Separator,{className:"-mx-1 my-1 h-px bg-gray-100"}),dr(xe.Item,{disabled:w.disabled,onSelect:()=>w.onSelect?.(),className:s("flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-primary-accent focus:bg-primary-accent data-[highlighted]:bg-primary-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",w.destructive&&"text-red-600 hover:bg-red-50 focus:bg-red-50 data-[highlighted]:bg-red-50",m,w.className),id:`${x}-item-${w.value??L}`,children:[w.icon&&_e("span",{className:"shrink-0",children:w.icon}),_e("span",{children:w.label})]})]},w.value??L))})})]})]});Ko.displayName="SplitButton";import*as $r from"react";import{cva as _r}from"class-variance-authority";import Qi from"react";import{jsx as es}from"react/jsx-runtime";var pe=Qi.forwardRef(({className:e,children:t,error:r,...o},a)=>{let n=r??t;return n?es("p",{ref:a,className:s("text-xs font-normal text-[#F04248]",e),...o,children:n}):null});pe.displayName="ErrorMessage";import ts from"react";import{jsx as rs}from"react/jsx-runtime";var Ne=ts.forwardRef(({className:e,...t},r)=>rs("div",{ref:r,className:s("text-sm text-[#8E98A8",e),...t}));Ne.displayName="FormDescription";import{jsx as lt,jsxs as Yo}from"react/jsx-runtime";var os=_r("!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"}}),Xo=$r.forwardRef(({className:e,status:t,type:r,...o},a)=>lt("input",{type:r,className:s(os({status:t}),e),ref:a,...o}));Xo.displayName="BaseInnerInput";var oe=_r("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"}}),jo=_r("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"}}),ne=$r.forwardRef(({className:e,status:t="default",disabled:r,error:o,isLoading:a,sideNodeClassName:n,showAsterisk:i,label:l,description:u,...d},p)=>{let m=t;return o&&(m="error"),a&&(m="loading"),r&&(m="prefilled"),Yo("div",{className:"relative space-y-1 w-full",children:[l&<(G,{showAsterisk:i,error:o,children:l}),Yo("div",{className:s(oe({status:m}),d.leftNode?"pl-0":"",d.rightNode?"pr-0":"",e),children:[d.leftNode?lt("div",{className:s(jo({status:m,side:"left"}),n),children:d.leftNode}):null,lt(Xo,{ref:p,disabled:a||r,className:s({"!pl-3":d.leftNode&&t!=="neutral","!pr-3":d.rightNode&&t!=="neutral","sentry-mask":!!d?.isContentSensitive}),...d}),d.rightNode?lt("div",{className:s(jo({status:m,side:"right"}),n),children:d.rightNode}):null]}),u&<(Ne,{className:"text-gray-400 text-sm !font-normal",children:u}),lt(pe,{error:o})]})});ne.displayName="Input";import{useMemo as is,useState as an}from"react";import{jsx as qo}from"react/jsx-runtime";var Jo=()=>qo("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:qo("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 Qo,jsxs as ns}from"react/jsx-runtime";var en=()=>ns("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Qo("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"}),Qo("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 tn,jsxs as as}from"react/jsx-runtime";var rn=()=>as("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[tn("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"}),tn("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 on}from"react/jsx-runtime";var nn=()=>on("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:on("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 Me,jsxs as ss}from"react/jsx-runtime";var sn=[{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:"12 Characters",key:"twelve-chars",RegExp:/.{12}/,validated:!1}],ln=({onValidate:e,onChange:t,disableValidation:r,...o})=>{let[a,n]=an(!1),[i,l]=an(sn),u=c=>sn.map(g=>({...g,validated:g.RegExp.test(c)})),d=c=>{let g=u(c),C=g.every(h=>h.validated);return l(g),C},p=c=>{if(t&&t(c),r)return;let g=c?.target?.value,C=d(g);e&&e(C,g)},m=is(()=>Me("div",{className:"flex items-center gap-2",children:i?.map(c=>ss("div",{className:s("text-xs flex items-center gap-0.5",{"text-[#62C554]":c?.validated,"text-[#8E98A8]":!c?.validated}),children:[Me("span",{className:"",children:c?.validated?Me(Jo,{}):Me(nn,{})}),Me("span",{className:"",children:c?.label})]},c?.key))}),[i]);return Me(ne,{sideNodeClassName:"!border-l-0",rightNode:a?Me("button",{type:"button",onClick:()=>n(c=>!c),children:Me(en,{})}):Me("button",{type:"button",onClick:()=>n(c=>!c),children:Me(rn,{})}),type:a?"text":"password",onChange:p,description:!r&&m,isContentSensitive:!0,...o})};ln.displayName="PasswordInput";import{cva as ls}from"class-variance-authority";import{jsx as ur,jsxs as cs}from"react/jsx-runtime";var h1=ls("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"}}),cn=({className:e,status:t="default",disabled:r,error:o,isLoading:a,showAsterisk:n,label:i,description:l,...u})=>{let d=t;return o&&(d="error"),a&&(d="loading"),r&&(d="prefilled"),cs("div",{className:"relative space-y-1",children:[ur(G,{showAsterisk:n,error:o,children:i}),ur("textarea",{className:s("min-h-[80px]",oe({status:d}),e),disabled:a||r,...u}),ur(Ne,{className:"text-gray-400 text-sm !font-normal",children:l}),ur(pe,{error:o})]})};cn.displayName="Textarea";import*as Sn from"react";import{X as ks}from"lucide-react";import*as ct from"react";import*as Qe from"react";import{Command as me}from"cmdk";import{Search as gs}from"lucide-react";import*as z from"@radix-ui/react-dialog";import*as Je from"react";import{jsx as dn,jsxs as ds}from"react/jsx-runtime";var un=()=>ds("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:[dn("path",{d:"M18 6 6 18"}),dn("path",{d:"m6 6 12 12"})]});import{Fragment as fs,jsx as we,jsxs as bt}from"react/jsx-runtime";var us=z.Root,ps=z.Trigger,ms=z.Portal,pn=Je.forwardRef(({className:e,...t},r)=>we(z.Overlay,{ref:r,className:s("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}));pn.displayName=z.Overlay.displayName;var zr=Je.forwardRef(({className:e,hideCloseButton:t,children:r,...o},a)=>bt(ms,{children:[we(pn,{}),bt(z.Content,{ref:a,className:s("fixed left-[50%] top-[50%] z-50 grid sm:w-full w-[95%] 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),...o,children:[r,!t&&bt(z.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 z-20",children:[we(un,{}),we("span",{className:"sr-only",children:"Close"})]})]})]}));zr.displayName=z.Content.displayName;var mn=({className:e,...t})=>we("div",{className:s("flex flex-col space-y-1.5 text-left",e),...t});mn.displayName="DialogHeader";var fn=({className:e,...t})=>we("div",{className:s("flex flex-row justify-end sm:space-x-2",e),...t});fn.displayName="DialogFooter";var gn=Je.forwardRef(({className:e,...t},r)=>we(z.Title,{ref:r,className:s("text-xl font-semibold leading-none tracking-tight",e),...t}));gn.displayName=z.Title.displayName;var hn=Je.forwardRef(({className:e,...t},r)=>we(z.Description,{ref:r,className:s("text-sm text-gray-500",e),...t}));hn.displayName=z.Description.displayName;var Wr=({trigger:e=void 0,children:t,open:r,onOpenChange:o,hideCloseButton:a,footer:n,title:i,description:l,contentClassName:u,headerClassName:d,titleClassName:p,descriptionClassName:m,footerClassName:c,asChild:g=!0,onOpenAutoFocus:C,onCloseAutoFocus:h,onEscapeKeyDown:v,onInteractOutside:f,onPointerDownOutside:x,closeOnOutsideClick:P=!0,...w})=>{let L=Je.useCallback(b=>{P||b.preventDefault(),x?.(b)},[P,x]),T=Je.useCallback(b=>{P||b.preventDefault(),f?.(b)},[P,f]);return bt(us,{...w,...r!==void 0?{open:r,onOpenChange:o}:{},children:[we(ps,{asChild:g,children:e}),bt(zr,{className:u,hideCloseButton:a,onOpenAutoFocus:C,onCloseAutoFocus:h,onEscapeKeyDown:v,onPointerDownOutside:L,onInteractOutside:T,children:[i||l?bt(mn,{className:d,children:[i&&we(gn,{className:p,children:i}),l&&we(hn,{className:m,children:l})]}):we(fs,{}),t,n&&we(fn,{className:c,children:n})]})]})};Wr.displayName=z.Dialog.displayName;import{Fragment as F1,jsx as Ie,jsxs as bs}from"react/jsx-runtime";var Vt=Qe.forwardRef(({className:e,...t},r)=>Ie(me,{ref:r,className:s("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Vt.displayName=me.displayName;var Ht=Qe.forwardRef(({className:e,CommandInputContainerClassName:t,loading:r,...o},a)=>bs("div",{className:s("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[r?Ie(Fe,{size:16,colour:"secondary"}):Ie(gs,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),Ie(me.Input,{ref:a,className:s("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:r,...o})]}));Ht.displayName=me.Input.displayName;var $t=Qe.forwardRef(({className:e,...t},r)=>Ie(me.List,{ref:r,className:s("overflow-y-auto overflow-x-hidden",e),...t}));$t.displayName=me.List.displayName;var _t=Qe.forwardRef((e,t)=>Ie(me.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));_t.displayName=me.Empty.displayName;var zt=Qe.forwardRef(({className:e,...t},r)=>Ie(me.Group,{ref:r,className:s("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}));zt.displayName=me.Group.displayName;var hs=Qe.forwardRef(({className:e,...t},r)=>Ie(me.Separator,{ref:r,className:s("-mx-1 h-px bg-border",e),...t}));hs.displayName=me.Separator.displayName;var Wt=Qe.forwardRef(({className:e,...t},r)=>Ie(me.Item,{ref:r,className:s("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}));Wt.displayName=me.Item.displayName;var vs=({className:e,...t})=>Ie("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});vs.displayName="CommandShortcut";import*as Gr from"react";import*as Re from"@radix-ui/react-popover";import{jsx as yt,jsxs as ys}from"react/jsx-runtime";var fe=Re.Root,J=Gr.forwardRef((e,t)=>yt(Re.Trigger,{ref:t,...e,onPointerDown:r=>{e.onPointerDown?.(r)}}));J.displayName=Re.Trigger.displayName;var ce=Gr.forwardRef(({className:e,align:t="center",sideOffset:r=4,portal:o=!0,...a},n)=>o?yt(Re.Portal,{children:yt(Re.Content,{ref:n,align:t,sideOffset:r,className:s("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})}):yt(Re.Content,{ref:n,align:t,sideOffset:r,className:s("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}));ce.displayName=Re.Content.displayName;var Pe=({trigger:e,children:t,open:r,onOpenChange:o,contentClassName:a,asChild:n=!0,align:i,side:l,alignOffset:u,triggerClassName:d,sideOffset:p,onOpenAutoFocus:m,onCloseAutoFocus:c,portal:g=!0,id:C="popover",...h})=>ys(fe,{...h,...r!==void 0?{open:r,onOpenChange:o}:{},children:[yt(J,{asChild:n,className:d,id:`${C}-trigger`,children:e}),yt(ce,{alignOffset:u,sideOffset:p,side:l,align:i,className:a,onOpenAutoFocus:m,onCloseAutoFocus:c,portal:g,id:`${C}-content`,children:t})]});Pe.displayName=Re.Root.displayName;import*as Ur from"react";import*as De from"@radix-ui/react-scroll-area";import{jsx as Gt,jsxs as ws}from"react/jsx-runtime";var Se=Ur.forwardRef(({className:e,viewPortClassName:t,children:r,...o},a)=>ws(De.Root,{ref:a,className:s("relative overflow-hidden",e),...o,children:[Gt(De.Viewport,{className:s("h-full w-full rounded-[inherit]",t),children:r}),Gt(pr,{}),Gt(De.Corner,{})]}));Se.displayName=De.Root.displayName;var pr=Ur.forwardRef(({className:e,orientation:t="vertical",...r},o)=>Gt(De.ScrollAreaScrollbar,{ref:o,orientation:t,className:s("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),...r,children:Gt(De.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));pr.displayName=De.ScrollAreaScrollbar.displayName;import{jsx as Le,jsxs as mr}from"react/jsx-runtime";var vn=({className:e,value:t,placeholder:r="",status:o,disabled:a,id:n})=>Le(J,{asChild:!0,disabled:a,id:n??"searchable-trigger",children:mr("button",{disabled:a,className:s(oe({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[Le("span",{children:t??r??"Select options..."}),Le("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:Le("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"})})]})}),fr=({options:e=[],value:t,onChange:r,containerClassName:o,placeholder:a,disabled:n,loading:i,optionComponent:l,children:u,modal:d=!1,hideSearch:p,className:m,inputValue:c,onValueChange:g,onInputValueChange:C})=>{let[h,v]=ct.useState(!1),[f,x]=ct.useState(void 0),P=ct.useRef(null),w=ct.useCallback(L=>{if(P.current&&(P.current.disconnect(),P.current=null),L){let T=()=>{x(L.getBoundingClientRect().width)};T();let b=new ResizeObserver(()=>{T()});b.observe(L),P.current=b}},[]);return mr(fe,{modal:d,open:h,onOpenChange:v,children:[Le("div",{className:s("w-full",m),ref:w,children:u}),Le(ce,{portal:!d,className:"p-0 min-w-[200px]",style:{width:f?`${f}px`:void 0},children:mr(Vt,{className:s("relative max-h-[270px]",{"mt-2":!p}),children:[!p&&Le(Ht,{loading:i,placeholder:a??"Search options...",onValueChange:C,value:c,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),Le(Se,{viewPortClassName:"max-h-[225px]",className:s("w-full px-0 h-full overflow-y-auto",o),children:mr($t,{children:[!p&&Le(_t,{children:"No result found."}),Le(zt,{className:"w-full",children:e?.map((L,T)=>Le(Wt,{defaultValue:t?.label,value:L.label,disabled:n,onSelect:()=>{r(L),v(!1),g?.(L?.value)},id:L.value,children:l?l(L):Le("span",{children:L.label})},`${L.value}-${T}`))})]})})]})})]})};import{X as Ns}from"lucide-react";import*as Z from"react";import{v4 as yn}from"uuid";import{AnimatePresence as Cs,motion as xs}from"framer-motion";import*as bn from"react";import{jsx as et,jsxs as Zr}from"react/jsx-runtime";var Ut=({size:e="md",semi:t=!1,className:r,id:o,label:a,labelClassName:n,labelWrapperClassName:i,disabled:l,subtitle:u,subtitleClassName:d,bodyClassName:p,checked:m,defaultChecked:c,onCheckedChange:g,name:C,value:h,onClick:v})=>{let f=bn.useId(),x=o??f,P=l?"#B0B0B0":"#00D488";return Zr("div",{className:s("flex justify-start items-start gap-1",p),children:[Zr("div",{className:"relative flex items-center justify-center",children:[et("input",{type:"checkbox",id:x,name:C,value:h,checked:m,defaultChecked:c,disabled:l,onClick:v,onChange:w=>g?.(w.target.checked),className:s("appearance-none shrink-0 rounded-[3px] border border-solid border-base-500","bg-base-100 dark:bg-transparent cursor-pointer transition","hover:bg-status-success-bg hover:border-status-success-fill","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-status-success-fill focus-visible:ring-offset-2","checked:bg-status-success-bg checked:border-status-success-fill","disabled:cursor-not-allowed disabled:opacity-50",e==="md"?"h-5 w-5":"h-6 w-6",r)}),et(Cs,{children:m&&et(xs.svg,{className:"absolute pointer-events-none",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.1},...t?{width:12,height:2,viewBox:"0 0 12 2"}:{width:10,height:8,viewBox:"0 0 10 8"},fill:"none",children:t?et("path",{d:"M1.9165 1H10.0832",stroke:P,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}):et("path",{d:"M1 3.99996L3.66353 6.66349L9 1.33643",stroke:P,strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})},t?"semi":"check")})]}),(a||u)&&Zr("div",{className:s("flex flex-col justify-start items-start",i),children:[et("label",{htmlFor:x,children:et("span",{className:s("text-sm font-normal cursor-pointer transition-colors text-base-700 dark:text-white",l&&"cursor-not-allowed opacity-50",n),onClick:()=>!l&&g?.(!m),children:a})}),u&&et("p",{className:s("text-sm text-base-500",l&&"opacity-50",d),children:u})]})]})};Ut.displayName="Checkbox";import{jsx as B,jsxs as Ee}from"react/jsx-runtime";var wn=Z.memo(({item:e,onDelete:t})=>Ee("p",{className:"text-xs p-1.5 py-1 bg-gray-100 rounded-md flex items-center",children:[B("span",{children:e.label}),B("button",{type:"button",className:"pl-2",onClick:r=>{r.stopPropagation(),t(e)},children:B(Ns,{size:12})})]}));wn.displayName="SelectedChip";var Kr=Z.memo(({disabled:e,className:t,values:r,placeholder:o="",status:a,onDelete:n})=>B(J,{asChild:!0,disabled:e,children:Ee("div",{className:s(oe({status:a}),"cursor-pointer [&>svg]:shrink-0 h-auto min-h-12 flex items-center justify-between w-full gap-2",t),children:[B("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:r.length?r.map(i=>B(wn,{item:i,onDelete:n},i.value)):B("span",{className:"text-[#79818C] dark:text-[#959BA4]",children:o})}),B("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:B("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}));Kr.displayName="MultiSelectTrigger";var Cn=Z.memo(({option:e,isChecked:t,onSelect:r,optionComponent:o})=>B("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:()=>r(e),children:B("div",{className:"w-full h-[30px] flex flex-row items-center dark:!text-white",children:B(Ut,{onCheckedChange:()=>r(e),value:e.value,label:o?o(e):B("span",{children:e.label}),bodyClassName:"w-full",labelWrapperClassName:"w-full",labelClassName:s(o&&"w-full"),checked:t})})}));Cn.displayName="OptionItem";var jr=({options:e,children:t,onChange:r,optionComponent:o,values:a,hideSearch:n,modal:i,placeholder:l,isLoading:u,showSelectedValues:d=!1,error:p,label:m,showAsterisk:c})=>{let[g,C]=Z.useState(""),h=a,v=Z.useMemo(()=>new Set(h.map(y=>y.value)),[h]),f=Z.useMemo(()=>{if(!g)return e;let y=g.trim().toLowerCase();return e.filter(F=>F.label?.trim()?.toLowerCase()?.includes(y))},[e,g]),x=Z.useCallback(y=>{let F=v.has(y.value);r(F?h.filter($=>$.value!==y.value):[...h,y])},[h,v,r]),P=Z.useRef(null),[w,L]=Z.useState(void 0);Z.useLayoutEffect(()=>{if(!P.current)return;let y=P.current,F=()=>{L(y.getBoundingClientRect().width)};F();let $=new ResizeObserver(()=>{F()});return $.observe(y),()=>$.disconnect()},[]);let T=Z.useCallback(y=>{let F=h.filter($=>$.value!==y.value);r(F)},[h,r]),b=Z.useCallback(()=>{h.length===e.length?r([]):r(e)},[h.length,e,r]),D=Z.useCallback(y=>{C(y.target.value)},[]);return Ee("div",{className:"relative space-y-1",children:[B(G,{showAsterisk:c,error:p,children:m}),Ee(fe,{modal:i,children:[B("div",{ref:P,children:t??B(Kr,{values:h,placeholder:l??"Select",onDelete:T,className:"h-auto"})}),d&&B("div",{className:"flex py-2 gap-2 flex-wrap",children:h.map(y=>B("div",{className:"bg-gray-100 border text-black rounded-xl text-[10px] font-medium px-2 py-1",children:B("span",{children:y.label})},yn()))}),Ee(ce,{portal:!i,align:"start",className:"min-w-[200px] p-0",style:{width:w?`${w}px`:void 0},onInteractOutside:y=>{y.target?.closest("[data-radix-popper-content-wrapper]")&&y.preventDefault()},onOpenAutoFocus:y=>y.preventDefault(),children:[!n&&B("div",{className:"w-full px-4",children:Ee("div",{className:"w-full h-[36px] px-1 flex items-center justify-start border-[0.5px] rounded-md border-[#D7D7D7] mb-[5px]",children:[u?B(Fe,{}):Ee("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[B("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"}),B("path",{d:"M22 22L20 20",stroke:"#959595",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),B("input",{value:g,placeholder:"Search",type:"text",disabled:u,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:D})]})}),Ee("div",{className:s("w-full h-[44px] px-2.5 flex items-center justify-between mb-[5px] border-[#D7D7D7] dark:border-[#5C636B]",n?"border-b-[0.5px]":"border-y-[0.5px]"),children:[B("button",{className:"text-sm text-primary-main font-normal",onClick:b,disabled:f.length<1||u,children:Ee("span",{children:[h.length===e.length?"Unselect":"Select"," all"]})}),Ee("p",{className:"text-sm text-[#959595] font-normal dark:text-[#DDDFE0]",children:[h.length," selected"]})]}),Ee(Se,{viewPortClassName:"max-h-[225px]",className:"pb-1",children:[u&&B("div",{className:"py-7 flex justify-center",children:B(Fe,{})}),!u&&f.map(y=>B(Cn,{option:y,isChecked:v.has(y.value),onSelect:x,optionComponent:o},yn()))]})]})]})]})};var Rs=[{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"}],xn=e=>{if(!e)return Rs?.map(r=>({value:r?.internetCountryCode,label:r?.countryName,...r}));if(!e?.length)return[];let t=new Set;return e.reduce((r,o)=>(t.has(o.value)||(t.add(o.value),r.push(o)),r),[])};import*as jt from"react";import*as gr from"react-phone-number-input";import Ss from"react-phone-number-input/flags";import{jsx as Zt,jsxs as Ds}from"react/jsx-runtime";var Ps=e=>Ds("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[Zt("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",Zt("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"}),Zt("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),Zt("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),Zt("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Nn=Ps;import{jsx as H,jsxs as Kt}from"react/jsx-runtime";var Rn=jt.forwardRef(({className:e,onChange:t,defaultCountry:r="NG",disableCountrySelect:o=!1,modal:a,showAsterisk:n,label:i,description:l,error:u,countryOptions:d,...p},m)=>{let c=g=>H(Ls,{...g,status:p.status,modal:a,options:d||g?.options});return Kt("div",{className:"relative space-y-1",children:[H(G,{showAsterisk:n,error:u,children:i}),H(gr.default,{ref:m,className:s("flex sentry-mask",e),flagComponent:ze,countrySelectComponent:g=>H(c,{...g,disabled:g?.disabled||o}),inputComponent:Pn,defaultCountry:r,onChange:g=>{t&&t?.(g)},...p}),H(Ne,{className:"text-gray-400 text-sm !font-normal",children:l}),H(pe,{error:u})]})});Rn.displayName="PhoneInput";var Pn=jt.forwardRef(({className:e,...t},r)=>H(ne,{className:s("!rounded-s-none h-10",e),...t,ref:r}));Pn.displayName="InputComponent";var Ls=({disabled:e,value:t,onChange:r,options:o,status:a,modal:n})=>{let i=jt.useCallback(l=>{r(l)},[r]);return Kt(fe,{modal:n,children:[H(J,{disabled:e,children:Kt("div",{className:s(oe({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:[H(ze,{country:t,countryName:t}),H("svg",{className:s("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:H("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"})})]})}),H(ce,{portal:!n,className:"w-[200px] md:w-[300px] p-0",children:H(Vt,{children:H($t,{children:Kt(Se,{className:"h-72",children:[H(Ht,{placeholder:"Search country..."}),H(_t,{children:"No country found."}),H(zt,{children:o.filter(l=>l.value).map(l=>Kt(Wt,{className:"gap-2",onSelect:()=>i(l.value),children:[H(ze,{country:l.value,countryName:l.label}),H("span",{className:"flex-1 text-sm",children:l.label}),l.value&&H("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${gr.getCountryCallingCode(l.value)}`}),H("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:s("ml-auto",l.value===t?"opacity-100":"opacity-0"),children:H("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${l.value}-${l.label}`))})]})})})})]})},ze=({country:e,countryName:t,className:r})=>{let o=Ss[e];return e==="GLOBAL"?H("span",{className:s("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:H(Nn,{className:"w-full h-[90%]"})}):H("span",{className:s("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:o&&H(o,{title:t})})};ze.displayName="FlagComponent";import{jsx as M,jsxs as tt}from"react/jsx-runtime";var Ts=({className:e,value:t,placeholder:r="",status:o,disabled:a})=>M(J,{asChild:!0,disabled:a,id:"country-dropdown",children:tt("button",{disabled:a,className:s(oe({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?tt("div",{className:"flex gap-2 items-center",children:[M(ze,{country:t?.value,countryName:t?.value,className:"ml-1 !w-6 h-5"}),M("span",{className:"",children:t?.label}),"-",M("span",{className:"",children:t?.value})]}):M("span",{children:r??"Select options..."}),M("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:M("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"})})]})}),Ln=Sn.memo(({item:e,onDelete:t})=>tt("p",{className:"text-xs pl-1.5 pr-1 py-1 bg-gray-100 rounded-md flex items-center gap-1",children:[M(ze,{country:e?.internetCountryCode||e?.value,countryName:e?.value,className:"!w-5 h-4"}),M("span",{children:e.label}),M("button",{type:"button",className:"pl-1",onClick:r=>{r.stopPropagation(),t(e)},children:M(ks,{size:12})})]}));Ln.displayName="CountryChip";var Fs=({className:e,values:t,placeholder:r="",status:o,disabled:a,onDelete:n})=>M(J,{asChild:!0,disabled:a,id:"country-dropdown",children:tt("div",{className:s(oe({status:o}),"cursor-pointer h-auto min-h-12 flex items-center justify-between w-full gap-2",e),children:[M("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:t.length?t.map(i=>M(Ln,{item:i,onDelete:n},i.value)):M("span",{className:"text-[#79818C]",children:r})}),M("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:M("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"})})]})}),Dn=e=>tt("div",{className:"w-full flex items-center gap-2",children:[M(ze,{country:e?.internetCountryCode||e?.value,countryName:e?.label,className:"ml-2 !w-6 !h-5"}),tt("div",{className:"flex-1 flex items-center gap-2",children:[M("span",{className:"flex text-sm",children:e?.label}),"-",M("span",{className:"text-sm",children:e?.internetCountryCode})]})]}),Es=e=>{let{hideSearch:t=!0,showAsterisk:r,label:o,description:a,error:n,countryOptions:i=void 0}=e,l=xn(i);if(e.multiSelect){let{value:c,onChange:g,placeholder:C,status:h,disabled:v,loading:f,modal:x,className:P,optionComponent:w}=e,L=c??[];return tt("div",{className:"relative space-y-1",children:[M(G,{showAsterisk:r,error:n,children:o}),M(jr,{options:l,values:L,onChange:b=>g(b),hideSearch:t,modal:x,isLoading:f,placeholder:C??"Select Country",optionComponent:w??Dn,children:M(Fs,{values:L,status:h,disabled:v,className:P,placeholder:C??"Select Country",onDelete:b=>{g(L.filter(D=>D.value!==b.value))}})}),M(Ne,{className:"text-gray-400 text-sm !font-normal",children:a}),M(pe,{error:n})]})}let{value:u,onChange:d,...p}=e,m=l?.find(c=>(c?.value||c?.internetCountryCode)===u?.value);return tt("div",{className:"relative space-y-1",children:[M(G,{showAsterisk:r,error:n,children:o}),M(fr,{options:l,hideSearch:t,optionComponent:Dn,value:u,onChange:d,...p,children:M(Ts,{value:m,status:p?.status,placeholder:p?.placeholder??" Select Country"})}),M(Ne,{className:"text-gray-400 text-sm !font-normal",children:a}),M(pe,{error:n})]})};import{jsx as Yt,jsxs as As}from"react/jsx-runtime";var rt=({showAsterisk:e,label:t,description:r,error:o,hideSearch:a=!1,status:n,...i})=>As("div",{className:"relative space-y-1",children:[Yt(G,{showAsterisk:e,error:o,children:t}),Yt(fr,{hideSearch:a,...i,containerClassName:"h-full",children:Yt(vn,{disabled:i?.disabled,placeholder:i?.placeholder??"Select",status:n,value:i?.value?.label??i?.value?.value,className:i?.className,id:i?.id})}),Yt(Ne,{className:"text-gray-400 text-sm !font-normal",children:r}),Yt(pe,{error:o})]});import{cva as Ms}from"class-variance-authority";import{useMemo as Is}from"react";import Bs from"react-otp-input";import{jsx as kn}from"react/jsx-runtime";var Os=Ms("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 flex-shrink-0",{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"}}),Vs=({numInputs:e=4,inputStyle:t,containerStyle:r,placeholder:o="-",status:a,inputMode:n="numeric",inputType:i="number",...l})=>{let u=Is(()=>o||new Array(e).fill("").reduce((m,c)=>m+=c,""),[e,o]);return kn(Bs,{numInputs:e,placeholder:u,containerStyle:s("w-fit sentry-mask flex justify-between",r),inputStyle:s(Os({status:a}),t,"sentry-mask"),renderInput:d=>kn("input",{...d,inputMode:n,type:i}),inputType:i,...l})};import*as Be from"@radix-ui/react-accordion";import{ChevronDown as Hs}from"lucide-react";import{jsx as Xt,jsxs as Tn}from"react/jsx-runtime";function $s({items:e,type:t="single",defaultValue:r,onChange:o,className:a}){return Xt(Be.Root,{...t==="single"?{type:"single",collapsible:!0,defaultValue:r,onValueChange:o}:{type:"multiple",defaultValue:r,onValueChange:o},className:s("w-full flex flex-col gap-2.5",a),children:e.map(i=>Tn(Be.Item,{value:i.key,className:"border border-gray-300 rounded-md overflow-hidden",children:[Xt(Be.Header,{className:"flex",children:Tn(Be.Trigger,{className:"group flex flex-1 items-center justify-between px-4 py-3 text-sm font-medium text-gray-800 hover:bg-gray-200/50 transition-all data-[state=open]:bg-gray-200/50",children:[i.title,Xt(Hs,{className:"h-4 w-4 shrink-0 text-gray-500 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),Xt(Be.Content,{className:"overflow-hidden data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up",children:Xt("div",{className:"px-4 py-3 border-t border-gray-300",children:i.content})})]},i.key))})}import{useState as _s,useEffect as zs}from"react";import{jsx as K,jsxs as dt}from"react/jsx-runtime";var Ws=({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",strokeWidth:"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"})}),Gs=({type:e="info",title:t,description:r,open:o,showCloseButton:a,bottomNode:n,sideNode:i,onClose:l,showIcon:u=!0})=>{let[d,p]=_s(o);zs(()=>{p(o)},[o]);let m="",c="";switch(e){case"gray":m="#eeeef0",c="#79818c";break;case"info":m="#ebf5fd",c="#70B6F6";break;case"warning":m="#fff8df",c="#ffc700";break;case"success":m="#e0f9f0",c="#49e0aa";break;case"danger":m="#fde8e9",c="#f3777c";break;default:m="#eeeef0",c="#79818c";break}function g(){p(!1),l&&l()}return d?dt("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:m||"#ebf5fd"},children:[K("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:c||"#70B6F6"}}),dt("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[dt("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[u&&K("div",{className:"h-full flex justify-end",children:K(Ws,{type:e})}),dt("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[dt("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||r)&&dt("div",{children:[t&&K("div",{className:"text-sm font-bold text-[#191919]",children:t}),r&&K("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:r})]}),n]}),i]})]}),a&&K("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:K("button",{onClick:g,children:dt("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 Zs}from"react";import{Copy as Ks,CheckIcon as js}from"lucide-react";import{motion as Ys,AnimatePresence as Xs}from"framer-motion";import{jsx as Us}from"react/jsx-runtime";var wt=({children:e,mode:t="truncate",className:r,as:o="div",...a})=>Us(o,{className:s({"text-ellipsis overflow-hidden whitespace-nowrap":t==="truncate","whitespace-normal break-words":t==="wrap","":t==="overflow"},r),target:a?.href?"_blank":void 0,...a,children:e});import{jsx as Ct,jsxs as Js}from"react/jsx-runtime";var qs=({text:e,textToCopy:t,onCopy:r,iconsPosition:o="right",clampText:a=!0,clampMode:n="truncate",isLink:i=!1,textClassName:l})=>{let[u,d]=Zs(!1),p=()=>{navigator.clipboard.writeText(t??e).then(()=>{d(!0),r?.(),setTimeout(()=>d(!1),2e3)})},m=u?js:Ks;return Js("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:[o==="left"&&Ct(Fn,{Icon:m,onClick:p,copied:u}),Ct(wt,{as:i?"a":"span",mode:a?n:"overflow",className:s({underline:i},l),href:i?e:void 0,children:e}),o==="right"&&Ct(Fn,{Icon:m,onClick:p,copied:u})]})},Fn=({Icon:e,onClick:t,copied:r})=>Ct(Xs,{mode:"wait",children:Ct(Ys.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:Ct(e,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});import{useEffect as En,useState as Qs}from"react";import{Search as el}from"lucide-react";import{jsx as An}from"react/jsx-runtime";var Yr=({value:e,onChange:t,debounce:r=500,addon:o,...a})=>{let[n,i]=Qs(e??""),l=u=>i(u.target.value);return En(()=>{e&&i(e)},[e]),En(()=>{let u=setTimeout(()=>{t(n)},r);return()=>clearTimeout(u)},[n,r,t]),An(ne,{leftNode:o??An(el,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...a,className:s("!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:n})};import{useEffect as Mn}from"react";import{X as tl}from"lucide-react";import{jsx as Oe,jsxs as xt}from"react/jsx-runtime";var rl=e=>{let{environment:t,branch:r,version:o,deployTime:a,showBanner:n,onClose:i,initDefault:l,removeFromStorage:u,syncLocalStorageToState:d}=e,p=t||process.env.NEXT_PUBLIC_NODE_ENV;return p!=="staging"&&p!=="sandbox"||(Mn(()=>{d()},[d]),Mn(()=>{let m;return(p==="staging"||p==="sandbox")&&(m=setInterval(()=>{u(),l()},300*1e3)),()=>{m&&clearInterval(m)}},[n,t,i,u,l,p]),!n)?null:xt("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[Oe("button",{onClick:i,className:"absolute top-2 right-2",children:Oe(tl,{})}),xt("div",{className:"space-y-2 text-sm",children:[xt("div",{className:"flex gap-2",children:[Oe("span",{className:"font-medium",children:"Environment:"}),Oe("span",{className:"text-blue-600 capitalize",children:p})]}),xt("div",{className:"flex gap-2",children:[Oe("span",{className:"font-medium",children:"Branch:"}),Oe("span",{className:"text-green-600 capitalize",children:r||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),xt("div",{className:"flex gap-2",children:[Oe("span",{className:"font-medium",children:"Version:"}),Oe("span",{className:"text-purple-600",children:o||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),xt("div",{className:"flex gap-2",children:[Oe("span",{className:"font-medium",children:"Deploy Time:"}),Oe("span",{className:"text-orange-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};import{cva as Bl}from"class-variance-authority";import*as Qt from"react";import*as ae from"@radix-ui/react-dialog";import*as Hn from"react";import R,{useLayoutEffect as nl,useEffect as al,useMemo as il}from"react";function ol(e){if(!e||typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}var $n=R.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Nt=()=>{let e=R.useContext($n);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};ol(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
2
2
|
[data-state=closed]
|
|
3
3
|
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function sl(){let e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function ll(){return ro(/^Mac/)}function cl(){return ro(/^iPhone/)}function In(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function dl(){return ro(/^iPad/)||ll()&&navigator.maxTouchPoints>1}function _n(){return cl()||dl()}function ro(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}var ul=24,pl=typeof window<"u"?nl:al;function Bn(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}var Xr=typeof document<"u"&&window.visualViewport;function On(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function zn(e){for(On(e)&&(e=e.parentElement);e&&!On(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var ml=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),hr=0,qr;function fl(e={}){let{isDisabled:t}=e;pl(()=>{if(!t)return hr++,hr===1&&_n()&&(qr=gl()),()=>{hr--,hr===0&&qr?.()}},[t])}function gl(){let e,t=0,r=m=>{e=zn(m.target),!(e===document.documentElement&&e===document.body)&&(t=m.changedTouches[0].pageY)},o=m=>{if(!e||e===document.documentElement||e===document.body){m.preventDefault();return}let c=m.changedTouches[0].pageY,g=e.scrollTop,C=e.scrollHeight-e.clientHeight;C!==0&&((g<=0&&c>t||g>=C&&c<t)&&m.preventDefault(),t=c)},a=m=>{let c=m.target;eo(c)&&c!==document.activeElement&&(m.preventDefault(),c.style.transform="translateY(-2000px)",c.focus(),requestAnimationFrame(()=>{c.style.transform=""}))},n=m=>{let c=m.target;eo(c)&&(c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",Xr&&(Xr.height<window.innerHeight?requestAnimationFrame(()=>{Vn(c)}):Xr.addEventListener("resize",()=>Vn(c),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},l=window.pageXOffset,u=window.pageYOffset,d=Bn(hl(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let p=Bn(qt(document,"touchstart",r,{passive:!1,capture:!0}),qt(document,"touchmove",o,{passive:!1,capture:!0}),qt(document,"touchend",a,{passive:!1,capture:!0}),qt(document,"focus",n,!0),qt(window,"scroll",i));return()=>{d(),p(),window.scrollTo(l,u)}}function hl(e,t,r){let o=e.style[t];return e.style[t]=r,()=>{e.style[t]=o}}function qt(e,t,r,o){return e.addEventListener(t,r,o),()=>{e.removeEventListener(t,r,o)}}function Vn(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let r=zn(e);if(r!==document.documentElement&&r!==document.body&&r!==e){let o=r.getBoundingClientRect().top,a=e.getBoundingClientRect().top,n=e.getBoundingClientRect().bottom,i=r.getBoundingClientRect().bottom+ul;n>i&&(r.scrollTop+=a-o)}e=r.parentElement}}function eo(e){return e instanceof HTMLInputElement&&!ml.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function vl(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function bl(...e){return t=>e.forEach(r=>vl(r,t))}function Wn(...e){return Hn.useCallback(bl(...e),e)}var Gn=new WeakMap;function j(e,t,r=!1){if(!e||!(e instanceof HTMLElement))return;let o={};Object.entries(t).forEach(([a,n])=>{if(a.startsWith("--")){e.style.setProperty(a,n);return}o[a]=e.style[a],e.style[a]=n}),!r&&Gn.set(e,o)}function yl(e,t){if(!e||!(e instanceof HTMLElement))return;let r=Gn.get(e);r&&(e.style[t]=r[t])}var U=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function vr(e,t){if(!e)return null;let r=window.getComputedStyle(e),o=r.transform||r.webkitTransform||r.mozTransform,a=o.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[U(t)?13:12]):(a=o.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[U(t)?5:4]):null)}function wl(e){return 8*(Math.log(e+1)-2)}function Jr(e,t){if(!e)return()=>{};let r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}function Cl(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}var _={DURATION:.5,EASE:[.32,.72,0,1]},Un=.4,xl=.25,Nl=100,Zn=8,ut=16,to=26,Qr="vaul-dragging";function Kn(e){let t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...r)=>t.current==null?void 0:t.current.call(t,...r),[])}function Rl({defaultProp:e,onChange:t}){let r=R.useState(e),[o]=r,a=R.useRef(o),n=Kn(t);return R.useEffect(()=>{a.current!==o&&(n(o),a.current=o)},[o,a,n]),r}function jn({prop:e,defaultProp:t,onChange:r=()=>{}}){let[o,a]=Rl({defaultProp:t,onChange:r}),n=e!==void 0,i=n?e:o,l=Kn(r),u=R.useCallback(d=>{if(n){let m=typeof d=="function"?d(e):d;m!==e&&l(m)}else a(d)},[n,e,a,l]);return[i,u]}function Pl({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:r,drawerRef:o,overlayRef:a,fadeFromIndex:n,onSnapPointChange:i,direction:l="bottom",container:u,snapToSequentialPoint:d}){let[p,m]=jn({prop:e,defaultProp:r?.[0],onChange:t}),[c,g]=R.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);R.useEffect(()=>{function b(){g({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]);let C=R.useMemo(()=>p===r?.[r.length-1]||null,[r,p]),h=R.useMemo(()=>{var b;return(b=r?.findIndex(D=>D===p))!=null?b:null},[r,p]),v=r&&r.length>0&&(n||n===0)&&!Number.isNaN(n)&&r[n]===p||!r,f=R.useMemo(()=>{let b=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var D;return(D=r?.map(y=>{let F=typeof y=="string",$=0;if(F&&($=parseInt(y,10)),U(l)){let N=F?$:c?y*b.height:0;return c?l==="bottom"?b.height-N:-b.height+N:N}let S=F?$:c?y*b.width:0;return c?l==="right"?b.width-S:-b.width+S:S}))!=null?D:[]},[r,c,u]),x=R.useMemo(()=>h!==null?f?.[h]:null,[f,h]),P=R.useCallback(b=>{var D;let y=(D=f?.findIndex(F=>F===b))!=null?D:null;i(y),j(o.current,{transition:`transform ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`,transform:U(l)?`translate3d(0, ${b}px, 0)`:`translate3d(${b}px, 0, 0)`}),f&&y!==f.length-1&&n!==void 0&&y!==n&&y<n?j(a.current,{transition:`opacity ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`,opacity:"0"}):j(a.current,{transition:`opacity ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`,opacity:"1"}),m(r?.[Math.max(y,0)])},[o.current,r,f,n,a,m]);R.useEffect(()=>{if(p||e){var b;let D=(b=r?.findIndex(y=>y===e||y===p))!=null?b:-1;f&&D!==-1&&typeof f[D]=="number"&&P(f[D])}},[p,e,r,f,P]);function w({draggedDistance:b,closeDrawer:D,velocity:y,dismissible:F}){if(n===void 0)return;let $=l==="bottom"||l==="right"?(x??0)-b:(x??0)+b,S=h===n-1,N=h===0,ee=b>0;if(S&&j(a.current,{transition:`opacity ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`}),!d&&y>2&&!ee){F?D():P(f[0]);return}if(!d&&y>2&&ee&&f&&r){P(f[r.length-1]);return}let q=f?.reduce((te,$e)=>typeof te!="number"||typeof $e!="number"?te:Math.abs($e-$)<Math.abs(te-$)?$e:te),ie=U(l)?window.innerHeight:window.innerWidth;if(y>Un&&Math.abs(b)<ie*.4){let te=ee?1:-1;if(te>0&&C&&r){P(f[r.length-1]);return}if(N&&te<0&&F&&D(),h===null)return;P(f[h+te]);return}P(q)}function L({draggedDistance:b}){if(x===null)return;let D=l==="bottom"||l==="right"?x-b:x+b;(l==="bottom"||l==="right")&&D<f[f.length-1]||(l==="top"||l==="left")&&D>f[f.length-1]||j(o.current,{transform:U(l)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`})}function T(b,D){if(!r||typeof h!="number"||!f||n===void 0)return null;let y=h===n-1;if(h>=n&&D)return 0;if(y&&!D)return 1;if(!v&&!y)return null;let $=y?h+1:h-1,S=y?f[$]-f[$-1]:f[$+1]-f[$],N=b/Math.abs(S);return y?1-N:N}return{isLastSnapPoint:C,activeSnapPoint:p,shouldFade:v,getPercentageDragged:T,setActiveSnapPoint:m,activeSnapPointIndex:h,onRelease:w,onDrag:L,snapPointsOffset:f}}var Dl=()=>()=>{};function Sl(){let{direction:e,isOpen:t,shouldScaleBackground:r,setBackgroundColorOnScale:o,noBodyStyles:a}=Nt(),n=R.useRef(null),i=il(()=>document.body.style.backgroundColor,[]);function l(){return(window.innerWidth-to)/window.innerWidth}R.useEffect(()=>{if(t&&r){n.current&&clearTimeout(n.current);let u=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!u)return;Cl(o&&!a?Jr(document.body,{background:"black"}):Dl,Jr(u,{transformOrigin:U(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${_.DURATION}s`,transitionTimingFunction:`cubic-bezier(${_.EASE.join(",")})`}));let d=Jr(u,{borderRadius:`${Zn}px`,overflow:"hidden",...U(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{d(),n.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},_.DURATION*1e3)}}},[t,r,i])}var Jt=null;function Ll({isOpen:e,modal:t,nested:r,hasBeenOpened:o,preventScrollRestoration:a,noBodyStyles:n}){let[i,l]=R.useState(()=>typeof window<"u"?window.location.href:""),u=R.useRef(0),d=R.useCallback(()=>{if(In()&&Jt===null&&e&&!n){Jt={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};let{scrollX:m,innerHeight:c}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-u.current}px`,left:`${-m}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let g=c-window.innerHeight;g&&u.current>=c&&(document.body.style.top=`${-(u.current+g)}px`)}),300)}},[e]),p=R.useCallback(()=>{if(In()&&Jt!==null&&!n){let m=-parseInt(document.body.style.top,10),c=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Jt),window.requestAnimationFrame(()=>{if(a&&i!==window.location.href){l(window.location.href);return}window.scrollTo(c,m)}),Jt=null}},[i]);return R.useEffect(()=>{function m(){u.current=window.scrollY}return m(),window.addEventListener("scroll",m),()=>{window.removeEventListener("scroll",m)}},[]),R.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||p()}},[t,p]),R.useEffect(()=>{r||!o||(e?(!window.matchMedia("(display-mode: standalone)").matches&&d(),t||window.setTimeout(()=>{p()},500)):p())},[e,o,i,t,r,d,p]),{restorePositionSetting:p}}function Yn({open:e,onOpenChange:t,children:r,onDrag:o,onRelease:a,snapPoints:n,shouldScaleBackground:i=!1,setBackgroundColorOnScale:l=!0,closeThreshold:u=xl,scrollLockTimeout:d=Nl,dismissible:p=!0,handleOnly:m=!1,fadeFromIndex:c=n&&n.length-1,activeSnapPoint:g,setActiveSnapPoint:C,fixed:h,modal:v=!0,onClose:f,nested:x,noBodyStyles:P=!1,direction:w="bottom",defaultOpen:L=!1,disablePreventScroll:T=!0,snapToSequentialPoint:b=!1,preventScrollRestoration:D=!1,repositionInputs:y=!0,onAnimationEnd:F,container:$,autoFocus:S=!1}){var N,ee;let[q=!1,ie]=jn({defaultProp:L,prop:e,onChange:k=>{t?.(k),!k&&!x&&ki(),setTimeout(()=>{F?.(k)},_.DURATION*1e3),k&&!v&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),k||(document.body.style.pointerEvents="auto")}}),[te,$e]=R.useState(!1),[Ye,Et]=R.useState(!1),[Ni,Ro]=R.useState(!1),ft=R.useRef(null),ar=R.useRef(null),Tr=R.useRef(null),Fr=R.useRef(null),At=R.useRef(null),Mt=R.useRef(!1),Er=R.useRef(null),Ar=R.useRef(0),gt=R.useRef(!1),Po=R.useRef(!L),Do=R.useRef(0),E=R.useRef(null),So=R.useRef(((N=E.current)==null?void 0:N.getBoundingClientRect().height)||0),Lo=R.useRef(((ee=E.current)==null?void 0:ee.getBoundingClientRect().width)||0),Mr=R.useRef(0),Ri=R.useCallback(k=>{n&&k===It.length-1&&(ar.current=new Date)},[]),{activeSnapPoint:Pi,activeSnapPointIndex:ht,setActiveSnapPoint:ko,onRelease:Di,snapPointsOffset:It,onDrag:Si,shouldFade:To,getPercentageDragged:Li}=Pl({snapPoints:n,activeSnapPointProp:g,setActiveSnapPointProp:C,drawerRef:E,fadeFromIndex:c,overlayRef:ft,onSnapPointChange:Ri,direction:w,container:$,snapToSequentialPoint:b});fl({isDisabled:!q||Ye||!v||Ni||!te||!y||!T});let{restorePositionSetting:ki}=Ll({isOpen:q,modal:v,nested:x??!1,hasBeenOpened:te,preventScrollRestoration:D,noBodyStyles:P});function ir(){return(window.innerWidth-to)/window.innerWidth}function Ti(k){var I,V;!p&&!n||E.current&&!E.current.contains(k.target)||(So.current=((I=E.current)==null?void 0:I.getBoundingClientRect().height)||0,Lo.current=((V=E.current)==null?void 0:V.getBoundingClientRect().width)||0,Et(!0),Tr.current=new Date,_n()&&window.addEventListener("touchend",()=>Mt.current=!1,{once:!0}),k.target.setPointerCapture(k.pointerId),Ar.current=U(w)?k.pageY:k.pageX)}function Fo(k,I){var V;let A=k,W=(V=window.getSelection())==null?void 0:V.toString(),ue=E.current?vr(E.current,w):null,se=new Date;if(A.tagName==="SELECT"||A.hasAttribute("data-vaul-no-drag")||A.closest("[data-vaul-no-drag]"))return!1;if(w==="right"||w==="left")return!0;if(ar.current&&se.getTime()-ar.current.getTime()<500)return!1;if(ue!==null&&(w==="bottom"?ue>0:ue<0))return!0;if(W&&W.length>0)return!1;if(At.current&&se.getTime()-At.current.getTime()<d&&ue===0||I)return At.current=se,!1;for(;A;){if(A.scrollHeight>A.clientHeight){if(A.scrollTop!==0)return At.current=new Date,!1;if(A.getAttribute("role")==="dialog")return!0}A=A.parentNode}return!0}function Fi(k){if(E.current&&Ye){let I=w==="bottom"||w==="right"?1:-1,V=(Ar.current-(U(w)?k.pageY:k.pageX))*I,A=V>0,W=n&&!p&&!A;if(W&&ht===0)return;let ue=Math.abs(V),se=document.querySelector("[data-vaul-drawer-wrapper]"),Xe=w==="bottom"||w==="top"?So.current:Lo.current,Te=ue/Xe,it=Li(ue,A);if(it!==null&&(Te=it),W&&Te>=1||!Mt.current&&!Fo(k.target,A))return;if(E.current.classList.add(Qr),Mt.current=!0,j(E.current,{transition:"none"}),j(ft.current,{transition:"none"}),n&&Si({draggedDistance:V}),A&&!n){let Ae=wl(V),sr=Math.min(Ae*-1,0)*I;j(E.current,{transform:U(w)?`translate3d(0, ${sr}px, 0)`:`translate3d(${sr}px, 0, 0)`});return}let qe=1-Te;if((To||c&&ht===c-1)&&(o?.(k,Te),j(ft.current,{opacity:`${qe}`,transition:"none"},!0)),se&&ft.current&&i){let Ae=Math.min(ir()+Te*(1-ir()),1),sr=8-Te*8,Ao=Math.max(0,14-Te*14);j(se,{borderRadius:`${sr}px`,transform:U(w)?`scale(${Ae}) translate3d(0, ${Ao}px, 0)`:`scale(${Ae}) translate3d(${Ao}px, 0, 0)`,transition:"none"},!0)}if(!n){let Ae=ue*I;j(E.current,{transform:U(w)?`translate3d(0, ${Ae}px, 0)`:`translate3d(${Ae}px, 0, 0)`})}}}R.useEffect(()=>{window.requestAnimationFrame(()=>{Po.current=!0})},[]),R.useEffect(()=>{var k;function I(){if(!E.current||!y)return;let V=document.activeElement;if(eo(V)||gt.current){var A;let W=((A=window.visualViewport)==null?void 0:A.height)||0,ue=window.innerHeight,se=ue-W,Xe=E.current.getBoundingClientRect().height||0,Te=Xe>ue*.8;Mr.current||(Mr.current=Xe);let it=E.current.getBoundingClientRect().top;if(Math.abs(Do.current-se)>60&&(gt.current=!gt.current),n&&n.length>0&&It&&ht){let qe=It[ht]||0;se+=qe}if(Do.current=se,Xe>W||gt.current){let qe=E.current.getBoundingClientRect().height,Ae=qe;qe>W&&(Ae=W-(Te?it:to)),h?E.current.style.height=`${qe-Math.max(se,0)}px`:E.current.style.height=`${Math.max(Ae,W-it)}px`}else sl()||(E.current.style.height=`${Mr.current}px`);n&&n.length>0&&!gt.current?E.current.style.bottom="0px":E.current.style.bottom=`${Math.max(se,0)}px`}}return(k=window.visualViewport)==null||k.addEventListener("resize",I),()=>{var V;return(V=window.visualViewport)==null?void 0:V.removeEventListener("resize",I)}},[ht,n,It]);function Bt(k){Ei(),f?.(),k||ie(!1),setTimeout(()=>{n&&ko(n[0])},_.DURATION*1e3)}function Eo(){if(!E.current)return;let k=document.querySelector("[data-vaul-drawer-wrapper]"),I=vr(E.current,w);j(E.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`}),j(ft.current,{transition:`opacity ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`,opacity:"1"}),i&&I&&I>0&&q&&j(k,{borderRadius:`${Zn}px`,overflow:"hidden",...U(w)?{transform:`scale(${ir()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ir()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${_.DURATION}s`,transitionTimingFunction:`cubic-bezier(${_.EASE.join(",")})`},!0)}function Ei(){!Ye||!E.current||(E.current.classList.remove(Qr),Mt.current=!1,Et(!1),Fr.current=new Date)}function Ai(k){if(!Ye||!E.current)return;E.current.classList.remove(Qr),Mt.current=!1,Et(!1),Fr.current=new Date;let I=vr(E.current,w);if(!k||!Fo(k.target,!1)||!I||Number.isNaN(I)||Tr.current===null)return;let V=Fr.current.getTime()-Tr.current.getTime(),A=Ar.current-(U(w)?k.pageY:k.pageX),W=Math.abs(A)/V;if(W>.05&&(Ro(!0),setTimeout(()=>{Ro(!1)},200)),n){Di({draggedDistance:A*(w==="bottom"||w==="right"?1:-1),closeDrawer:Bt,velocity:W,dismissible:p}),a?.(k,!0);return}if(w==="bottom"||w==="right"?A>0:A<0){Eo(),a?.(k,!0);return}if(W>Un){Bt(),a?.(k,!1);return}var ue;let se=Math.min((ue=E.current.getBoundingClientRect().height)!=null?ue:0,window.innerHeight);var Xe;let Te=Math.min((Xe=E.current.getBoundingClientRect().width)!=null?Xe:0,window.innerWidth),it=w==="left"||w==="right";if(Math.abs(I)>=(it?Te:se)*u){Bt(),a?.(k,!1);return}a?.(k,!0),Eo()}R.useEffect(()=>(q&&(j(document.documentElement,{scrollBehavior:"auto"}),ar.current=new Date),()=>{yl(document.documentElement,"scrollBehavior")}),[q]);function Mi(k){let I=k?(window.innerWidth-ut)/window.innerWidth:1,V=k?-ut:0;Er.current&&window.clearTimeout(Er.current),j(E.current,{transition:`transform ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`,transform:U(w)?`scale(${I}) translate3d(0, ${V}px, 0)`:`scale(${I}) translate3d(${V}px, 0, 0)`}),!k&&E.current&&(Er.current=setTimeout(()=>{let A=vr(E.current,w);j(E.current,{transition:"none",transform:U(w)?`translate3d(0, ${A}px, 0)`:`translate3d(${A}px, 0, 0)`})},500))}function Ii(k,I){if(I<0)return;let V=(window.innerWidth-ut)/window.innerWidth,A=V+I*(1-V),W=-ut+I*ut;j(E.current,{transform:U(w)?`scale(${A}) translate3d(0, ${W}px, 0)`:`scale(${A}) translate3d(${W}px, 0, 0)`,transition:"none"})}function Bi(k,I){let V=U(w)?window.innerHeight:window.innerWidth,A=I?(V-ut)/V:1,W=I?-ut:0;I&&j(E.current,{transition:`transform ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`,transform:U(w)?`scale(${A}) translate3d(0, ${W}px, 0)`:`scale(${A}) translate3d(${W}px, 0, 0)`})}return R.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),R.createElement(ae.Root,{modal:v,defaultOpen:L,onOpenChange:k=>{!p&&!k||(k?$e(!0):Bt(!0),ie(k))},open:q},R.createElement($n.Provider,{value:{activeSnapPoint:Pi,snapPoints:n,setActiveSnapPoint:ko,drawerRef:E,overlayRef:ft,onOpenChange:t,onPress:Ti,onRelease:Ai,onDrag:Fi,dismissible:p,shouldAnimate:Po,handleOnly:m,isOpen:q,isDragging:Ye,shouldFade:To,closeDrawer:Bt,onNestedDrag:Ii,onNestedOpenChange:Mi,onNestedRelease:Bi,keyboardIsOpen:gt,modal:v,snapPointsOffset:It,activeSnapPointIndex:ht,direction:w,shouldScaleBackground:i,setBackgroundColorOnScale:l,noBodyStyles:P,container:$,autoFocus:S}},r))}var Xn=R.forwardRef(function({...e},t){let{overlayRef:r,snapPoints:o,onRelease:a,shouldFade:n,isOpen:i,modal:l,shouldAnimate:u}=Nt(),d=Wn(t,r),p=o&&o.length>0;if(!l)return null;let m=R.useCallback(c=>a(c),[a]);return R.createElement(ae.Overlay,{onMouseUp:m,ref:d,"data-vaul-overlay":"","data-vaul-snap-points":i&&p?"true":"false","data-vaul-snap-points-overlay":i&&n?"true":"false","data-vaul-animate":u?.current?"true":"false",...e})});Xn.displayName="Drawer.Overlay";var qn=R.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:r,...o},a){let{drawerRef:n,onPress:i,onRelease:l,onDrag:u,keyboardIsOpen:d,snapPointsOffset:p,activeSnapPointIndex:m,modal:c,isOpen:g,direction:C,snapPoints:h,container:v,handleOnly:f,shouldAnimate:x,autoFocus:P}=Nt(),[w,L]=R.useState(!1),T=Wn(a,n),b=R.useRef(null),D=R.useRef(null),y=R.useRef(!1),F=h&&h.length>0;Sl();let $=(N,ee,q=0)=>{if(y.current)return!0;let ie=Math.abs(N.y),te=Math.abs(N.x),$e=te>ie,Ye=["bottom","right"].includes(ee)?1:-1;if(ee==="left"||ee==="right"){if(!(N.x*Ye<0)&&te>=0&&te<=q)return $e}else if(!(N.y*Ye<0)&&ie>=0&&ie<=q)return!$e;return y.current=!0,!0};R.useEffect(()=>{F&&window.requestAnimationFrame(()=>{L(!0)})},[]);function S(N){b.current=null,y.current=!1,l(N)}return R.createElement(ae.Content,{"data-vaul-drawer-direction":C,"data-vaul-drawer":"","data-vaul-delayed-snap-points":w?"true":"false","data-vaul-snap-points":g&&F?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":x?.current?"true":"false",...o,ref:T,style:p&&p.length>0?{"--snap-point-height":`${p[m??0]}px`,...t}:t,onPointerDown:N=>{f||(o.onPointerDown==null||o.onPointerDown.call(o,N),b.current={x:N.pageX,y:N.pageY},i(N))},onOpenAutoFocus:N=>{r?.(N),P||N.preventDefault()},onPointerDownOutside:N=>{if(e?.(N),!c||N.defaultPrevented){N.preventDefault();return}d.current&&(d.current=!1)},onFocusOutside:N=>{if(!c){N.preventDefault();return}},onPointerMove:N=>{if(D.current=N,f||(o.onPointerMove==null||o.onPointerMove.call(o,N),!b.current))return;let ee=N.pageY-b.current.y,q=N.pageX-b.current.x,ie=N.pointerType==="touch"?10:2;$({x:q,y:ee},C,ie)?u(N):(Math.abs(q)>ie||Math.abs(ee)>ie)&&(b.current=null)},onPointerUp:N=>{o.onPointerUp==null||o.onPointerUp.call(o,N),b.current=null,y.current=!1,l(N)},onPointerOut:N=>{o.onPointerOut==null||o.onPointerOut.call(o,N),S(D.current)},onContextMenu:N=>{o.onContextMenu==null||o.onContextMenu.call(o,N),D.current&&S(D.current)}})});qn.displayName="Drawer.Content";var kl=250,Tl=120,Jn=R.forwardRef(function({preventCycle:e=!1,children:t,...r},o){let{closeDrawer:a,isDragging:n,snapPoints:i,activeSnapPoint:l,setActiveSnapPoint:u,dismissible:d,handleOnly:p,isOpen:m,onPress:c,onDrag:g}=Nt(),C=R.useRef(null),h=R.useRef(!1);function v(){if(h.current){P();return}window.setTimeout(()=>{f()},Tl)}function f(){if(n||e||h.current){P();return}if(P(),!i||i.length===0){d||a();return}if(l===i[i.length-1]&&d){a();return}let L=i.findIndex(b=>b===l);if(L===-1)return;let T=i[L+1];u(T)}function x(){C.current=window.setTimeout(()=>{h.current=!0},kl)}function P(){C.current&&window.clearTimeout(C.current),h.current=!1}return R.createElement("div",{onClick:v,onPointerCancel:P,onPointerDown:w=>{p&&c(w),x()},onPointerMove:w=>{p&&g(w)},ref:o,"data-vaul-drawer-visible":m?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},R.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});Jn.displayName="Drawer.Handle";function Fl({onDrag:e,onOpenChange:t,open:r,...o}){let{onNestedDrag:a,onNestedOpenChange:n,onNestedRelease:i}=Nt();if(!a)throw new Error("Drawer.NestedRoot must be placed in another drawer");return R.createElement(Yn,{nested:!0,open:r,onClose:()=>{n(!1)},onDrag:(l,u)=>{a(l,u),e?.(l,u)},onOpenChange:l=>{l&&n(l),t?.(l)},onRelease:i,...o})}function El(e){let t=Nt(),{container:r=t.container,...o}=e;return R.createElement(ae.Portal,{container:r,...o})}var ge={Root:Yn,NestedRoot:Fl,Content:qn,Overlay:Xn,Trigger:ae.Trigger,Portal:El,Handle:Jn,Close:ae.Close,Title:ae.Title,Description:ae.Description};import{useState as Al,useEffect as Ml}from"react";function Qn(){let[e,t]=Al({width:100,height:100});return Ml(()=>{function r(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",r),r(),()=>window.removeEventListener("resize",r)},[]),e}import{jsx as ea,jsxs as Il}from"react/jsx-runtime";var ta=()=>Il("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:[ea("path",{d:"M18 6 6 18"}),ea("path",{d:"m6 6 12 12"})]});import{Fragment as la,jsx as Q,jsxs as Rt}from"react/jsx-runtime";var oo=({shouldScaleBackground:e=!1,...t})=>Q(ge.Root,{direction:"right",shouldScaleBackground:e,...t});oo.displayName="Drawer";var Ol=ge.Trigger,Vl=ge.Close,Hl=ge.Portal,ra=Qt.forwardRef(({className:e,...t},r)=>Q(ge.Overlay,{className:s("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:r}));ra.displayName=ge.Overlay.displayName;var $l=Bl("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",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"},size:{default:"sm:max-w-[512px]",full:"!max-w-full w-full"}},defaultVariants:{side:"right",size:"default"}}),oa=Qt.forwardRef(({side:e="right",size:t="default",hideCloseButton:r,usePortal:o=!0,showOverlay:a=!0,className:n,children:i,id:l,...u},d)=>{let p=Rt(la,{children:[a&&Q(ra,{}),Rt(ge.Content,{ref:d,className:s($l({side:e,size:t}),n),...u,children:[Q("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"}),t==="full"&&Q("style",{children:`
|
|
4
4
|
body { pointer-events: auto !important; }
|