sodtrack-web-ui 0.39.0 → 0.39.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import {a as a$2}from'./chunk-WWSXCOGT.mjs';import {a}from'./chunk-W2YOW3FA.mjs';import {a as a$1}from'./chunk-2WINTZSS.mjs';import $,{useId,useRef,useState,useEffect}from'react';import*as R from'@radix-ui/react-portal';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var i=56,u=6,q=({options:n,noResults:w,selectedOption:L,onSelect:P,onChange:C,onClick:T,className:k,...I})=>{let N=useId(),l=useRef(null),o=useRef(null),g=useRef(null),[H,M]=useState("bottom"),[r,F]=useState(),[s,c]=useState(-1),[h,y]=useState(L??null),b=e=>{l.current.style.display="none",o.current.value=e.label,y(e),P?.(e);},A=e=>{if(e.key==="ArrowDown"){if(s===n.length-1)return;c(t=>t+1),l.current.style.display="flex",x();}else if(e.key==="ArrowUp"){if(s===0)return;c(t=>t-1),x();}else e.key==="Enter"&&(b(n[s]),c(-1));},x=()=>{let e=i*u;g.current.scroll({top:(s+2)*i<=e?0:i*(s+2)-e,behavior:"smooth"});};return useEffect(()=>{if(!o.current)return;let e=()=>{if(!o.current)return;let t=i*(n.length<u?n.length:u)+16,m=o.current.getBoundingClientRect();F(m);let B=window.innerHeight-m.bottom>t,D=m.top>t;M(B?"bottom":D?"top":"bottom");};return e(),o.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{o.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[o.current]),useEffect(()=>{function e(t){l.current&&!l.current.contains(t.target)&&(l.current.style.display="none",c(-1));}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[l.current]),jsxs(Fragment,{children:[jsx(a,{className:a$1("w-full !cursor-pointer",k),readOnly:!0,ref:o,autoComplete:"off",list:"",selectMode:!0,value:h?.label,showClearButton:!1,onClick:e=>{l.current.style.display="flex",T?.(e);},onChange:e=>{c(-1),y(null),C?.(e);},onKeyDown:A,...I}),jsx(R.Root,{asChild:!0,children:jsx("ul",{ref:l,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:r?{width:`${r.width}px`,left:r.left,top:H==="bottom"?`${r.height+r.top+window.scrollY}px`:window.scrollY+r.top-(n.length<u?n.length:u)*i-16}:void 0,children:jsxs(a$2,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:g,children:[n.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[$.cloneElement(w.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:w.message})]}),n.map((e,t)=>jsx("li",{onClick:()=>{b(e);},className:a$1("w-full flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",h?.value===e.value&&"bg-primary-200",s===t&&"bg-primary-200"),value:e.value,children:e.label},`select-option-${N}-${e.key??e.value}`))]})})})]})};export{q as a};
1
+ import {a as a$2}from'./chunk-JGL2V7EX.mjs';import {a}from'./chunk-W2YOW3FA.mjs';import {a as a$1}from'./chunk-2WINTZSS.mjs';import $,{useId,useRef,useState,useEffect}from'react';import*as R from'@radix-ui/react-portal';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var i=56,u=6,q=({options:n,noResults:w,selectedOption:L,onSelect:P,onChange:C,onClick:T,className:k,...I})=>{let N=useId(),l=useRef(null),o=useRef(null),g=useRef(null),[H,M]=useState("bottom"),[r,F]=useState(),[s,c]=useState(-1),[h,y]=useState(L??null),b=e=>{l.current.style.display="none",o.current.value=e.label,y(e),P?.(e);},A=e=>{if(e.key==="ArrowDown"){if(s===n.length-1)return;c(t=>t+1),l.current.style.display="flex",x();}else if(e.key==="ArrowUp"){if(s===0)return;c(t=>t-1),x();}else e.key==="Enter"&&(b(n[s]),c(-1));},x=()=>{let e=i*u;g.current.scroll({top:(s+2)*i<=e?0:i*(s+2)-e,behavior:"smooth"});};return useEffect(()=>{if(!o.current)return;let e=()=>{if(!o.current)return;let t=i*(n.length<u?n.length:u)+16,m=o.current.getBoundingClientRect();F(m);let B=window.innerHeight-m.bottom>t,D=m.top>t;M(B?"bottom":D?"top":"bottom");};return e(),o.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{o.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[o.current]),useEffect(()=>{function e(t){l.current&&!l.current.contains(t.target)&&(l.current.style.display="none",c(-1));}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[l.current]),jsxs(Fragment,{children:[jsx(a,{className:a$1("w-full !cursor-pointer",k),readOnly:!0,ref:o,autoComplete:"off",list:"",selectMode:!0,value:h?.label,showClearButton:!1,onClick:e=>{l.current.style.display="flex",T?.(e);},onChange:e=>{c(-1),y(null),C?.(e);},onKeyDown:A,...I}),jsx(R.Root,{asChild:!0,children:jsx("ul",{ref:l,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:r?{width:`${r.width}px`,left:r.left,top:H==="bottom"?`${r.height+r.top+window.scrollY}px`:window.scrollY+r.top-(n.length<u?n.length:u)*i-16}:void 0,children:jsxs(a$2,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:g,children:[n.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[$.cloneElement(w.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:w.message})]}),n.map((e,t)=>jsx("li",{onClick:()=>{b(e);},className:a$1("w-full flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",h?.value===e.value&&"bg-primary-200",s===t&&"bg-primary-200"),value:e.value,children:e.label},`select-option-${N}-${e.key??e.value}`))]})})})]})};export{q as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-WWSXCOGT.mjs';import {d as d$1}from'./chunk-AF7XWQ5Y.mjs';import {a}from'./chunk-2WINTZSS.mjs';import*as s from'react';import*as e from'@radix-ui/react-dialog';export{e as a };import {jsx,jsxs}from'react/jsx-runtime';var N=e.Root,C=e.Trigger,f=e.Portal,x=e.Close,d=s.forwardRef(({className:t,...a$1},o)=>jsx(e.Overlay,{ref:o,className:a("bg-black/80 fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...a$1}));d.displayName=e.Overlay.displayName;var c=s.forwardRef(({className:t,children:a$2,...o},p)=>jsx(f,{children:jsx(d,{className:"bg-neutral-900/50",children:jsxs(e.Content,{ref:p,className:a("elevation-9 fixed left-[50%] top-[50%] z-[10000] grid w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] rounded-2xl bg-neutral-50 pr-0 pt-4 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%]",t),...o,children:[jsxs(e.Close,{className:"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground mr-4 self-end justify-self-end rounded-sm transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",children:[jsx(d$1,{className:"h-6 w-6"}),jsx("span",{className:"sr-only",children:"Close"})]}),jsx(a$1,{className:"max-h-[80vh]",viewPortClassName:"p-8 pt-2",children:a$2})]})})}));c.displayName=e.Content.displayName;var g=({className:t,...a$1})=>jsx("div",{className:a("flex flex-col gap-4 text-left",t),...a$1});g.displayName="DialogHeader";var D=({className:t,...a$1})=>jsx("div",{className:a("mt-6 flex justify-end gap-3",t),...a$1});D.displayName="DialogFooter";var v=s.forwardRef(({className:t,...a$1},o)=>jsx(e.Title,{ref:o,className:a("font-jakarta text-xl font-semibold leading-[130%]",t),...a$1}));v.displayName=e.Title.displayName;var P=s.forwardRef(({className:t,...a$1},o)=>jsx(e.Description,{ref:o,className:a("font-inter text-base font-normal leading-[130%]",t),...a$1}));P.displayName=e.Description.displayName;export{N as b,C as c,f as d,x as e,d as f,c as g,g as h,D as i,v as j,P as k};
1
+ import {a as a$1}from'./chunk-JGL2V7EX.mjs';import {d as d$1}from'./chunk-AF7XWQ5Y.mjs';import {a}from'./chunk-2WINTZSS.mjs';import*as s from'react';import*as e from'@radix-ui/react-dialog';export{e as a };import {jsx,jsxs}from'react/jsx-runtime';var N=e.Root,C=e.Trigger,f=e.Portal,x=e.Close,d=s.forwardRef(({className:t,...a$1},o)=>jsx(e.Overlay,{ref:o,className:a("bg-black/80 fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...a$1}));d.displayName=e.Overlay.displayName;var c=s.forwardRef(({className:t,children:a$2,...o},p)=>jsx(f,{children:jsx(d,{className:"bg-neutral-900/50",children:jsxs(e.Content,{ref:p,className:a("elevation-9 fixed left-[50%] top-[50%] z-[10000] grid w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] rounded-2xl bg-neutral-50 pr-0 pt-4 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%]",t),...o,children:[jsxs(e.Close,{className:"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground mr-4 self-end justify-self-end rounded-sm transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",children:[jsx(d$1,{className:"h-6 w-6"}),jsx("span",{className:"sr-only",children:"Close"})]}),jsx(a$1,{className:"max-h-[80vh]",viewPortClassName:"p-8 pt-2",children:a$2})]})})}));c.displayName=e.Content.displayName;var g=({className:t,...a$1})=>jsx("div",{className:a("flex flex-col gap-4 text-left",t),...a$1});g.displayName="DialogHeader";var D=({className:t,...a$1})=>jsx("div",{className:a("mt-6 flex justify-end gap-3",t),...a$1});D.displayName="DialogFooter";var v=s.forwardRef(({className:t,...a$1},o)=>jsx(e.Title,{ref:o,className:a("font-jakarta text-xl font-semibold leading-[130%]",t),...a$1}));v.displayName=e.Title.displayName;var P=s.forwardRef(({className:t,...a$1},o)=>jsx(e.Description,{ref:o,className:a("font-inter text-base font-normal leading-[130%]",t),...a$1}));P.displayName=e.Description.displayName;export{N as b,C as c,f as d,x as e,d as f,c as g,g as h,D as i,v as j,P as k};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-2WINTZSS.mjs';import*as e from'@radix-ui/react-scroll-area';import {forwardRef,useRef,useEffect,useImperativeHandle}from'react';import {jsxs,jsx}from'react/jsx-runtime';var b=forwardRef(({className:c,children:r,onScrollEnd:a$1,isInfiniteScroll:o=!1,viewPortClassName:f,viewPortStyle:S,...p},u)=>{let l=useRef(null);return useEffect(()=>{if(!o)return;let m=()=>{if(l.current){let{scrollTop:A,scrollHeight:P,clientHeight:d}=l.current;A+d>=P-10&&a$1?.();}},s=l.current;return s?.addEventListener("scroll",m),()=>{s?.removeEventListener("scroll",m);}},[a$1,o]),useImperativeHandle(u,()=>l.current,[l]),jsxs(e.Root,{className:a("relative overflow-hidden",c),...p,children:[jsx(e.Viewport,{ref:l,className:a("h-full w-full rounded-[inherit] [&>div]:!flex [&>div]:h-full [&>div]:flex-col",f),style:S,children:r}),jsx(v,{forceMount:o},o?l.current?.scrollHeight:1),jsx(e.Corner,{})]})});b.displayName=e.Root.displayName;var v=forwardRef(({className:c,orientation:r="vertical",...a$1},o)=>jsx(e.ScrollAreaScrollbar,{ref:o,orientation:r,className:a("flex touch-none select-none bg-neutral-100 transition-colors",r==="vertical"&&"h-full w-4 py-2",r==="horizontal"&&"h-4 flex-col px-2",c),...a$1,children:jsx(e.ScrollAreaThumb,{className:a("relative flex-1 rounded bg-primary-500",r==="vertical"&&"mx-1 w-2",r==="horizontal"&&"my-1 h-2")})}));v.displayName=e.ScrollAreaScrollbar.displayName;export{b as a,v as b};
@@ -1,2 +1,2 @@
1
- import {a as a$2}from'./chunk-WWSXCOGT.mjs';import {a as a$1}from'./chunk-W2YOW3FA.mjs';import {g}from'./chunk-AF7XWQ5Y.mjs';import {a}from'./chunk-2WINTZSS.mjs';import c0,{useId,useRef,useState,useEffect}from'react';import*as O from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var V='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Country=chile" clip-path="url(%23clip0_1491_56906)">%0A<path id="Vector" d="M20.0015 40C31.0488 40 40.0029 31.0459 40.0029 19.9985C40.0029 8.95123 31.0459 0 20.0015 0C8.95705 0 0 8.95414 0 20.0015C0 31.0488 8.95414 40.0029 20.0015 40.0029V40Z" fill="%23F0F0F0"/>%0A<path id="Vector_2" d="M40 20.0015C40 31.0459 31.0459 40.0029 19.9985 40.0029C8.95123 40.0029 0 31.0459 0 20.0015C0 8.95705 20.0015 20.0015 20.0015 20.0015H40.0029H40Z" fill="%23D80027"/>%0A<path id="Vector_3" d="M0 20.0015C0 8.95414 8.95414 0 20.0015 0V20.0015H0Z" fill="%230052B4"/>%0A<path id="Vector_4" d="M11.9049 6.9569L13.1986 10.9427H17.3908L14.001 13.405L15.2947 17.3908L11.9049 14.9284L8.51515 17.3908L9.80885 13.405L6.41907 10.9427H10.6112L11.9049 6.9569Z" fill="%23F0F0F0"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1491_56906">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var Z='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Country=argentina" clip-path="url(%23clip0_1491_56925)">%0A<path id="Vector" d="M20.0015 40C31.0488 40 40.0029 31.0459 40.0029 19.9985C40.0029 8.95123 31.0459 0 20.0015 0C8.95705 0 0 8.95414 0 20.0015C0 31.0488 8.95414 40.0029 20.0015 40.0029V40Z" fill="%23F0F0F0"/>%0A<path id="Vector_2" d="M20.0012 0C12.0704 0 5.21814 4.61371 1.98535 11.3061H38.017C34.7813 4.61371 27.9291 0 20.0012 0Z" fill="%23338AF3"/>%0A<path id="Vector_3" d="M20.0012 40C27.9291 40 34.7813 35.3863 38.017 28.694H1.98535C5.22105 35.3834 12.0704 40 20.0012 40Z" fill="%23338AF3"/>%0A<path id="Vector_4" d="M25.9786 20.0015L23.5366 21.1498L24.8361 23.5162L22.1848 23.0075L21.8475 25.6879L20.0015 23.7168L18.1525 25.6879L17.8152 23.0075L15.1639 23.5133L16.4634 21.1498L14.0214 20.0015L16.4634 18.8531L15.1639 16.4867L17.8152 16.9954L18.1525 14.315L19.9985 16.2861L21.8475 14.315L22.1848 16.9954L24.8361 16.4867L23.5366 18.8531L25.9786 20.0015Z" fill="%23FFDA44"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1491_56925">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var y='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Country=colombia" clip-path="url(%23clip0_1491_56936)">%0A<path id="Vector" d="M0 20.0015C0 8.95414 8.95414 0 20.0015 0C31.0488 0 40.0029 8.95414 40.0029 20.0015L20.0015 21.74L0 20.0015Z" fill="%23FFDA44"/>%0A<path id="Vector_2" d="M2.67752 29.9993C6.13417 35.9765 12.5968 40 20.0015 40C27.4061 40 33.8687 35.9794 37.3254 29.9993L20.0015 28.6939L2.67752 29.9993Z" fill="%23D80027"/>%0A<path id="Vector_3" d="M37.3254 29.9993C39.029 27.0572 40.0029 23.6413 40.0029 19.9985H0C0 23.6413 0.973908 27.0572 2.67752 29.9993H37.3254Z" fill="%230052B4"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1491_56936">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var P='data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="flags_sm" clip-path="url(%23clip0_2024_263)">%0A<path id="Vector" d="M12.0009 24C18.6275 24 24.0017 18.6275 24.0017 11.9991C24.0017 5.37074 18.6275 0 12.0009 0C5.37423 0 0 5.37248 0 12.0009C0 18.6293 5.37248 24.0017 12.0009 24.0017V24Z" fill="%23F0F0F0"/>%0A<path id="Vector_2" d="M24.0004 12.0009C24.0004 7.24417 21.2322 3.13283 17.2168 1.19141V22.8104C21.2305 20.869 24.0004 16.7577 24.0004 12.0009Z" fill="%23338AF3"/>%0A<path id="Vector_3" d="M0 12.0009C0 16.7576 2.76822 20.8689 6.78363 22.8104V1.19135C2.76822 3.13102 0 7.24237 0 12.0009Z" fill="%23338AF3"/>%0A<path id="Vector_4" d="M15.1358 14.0295L13.1072 12.0009L15.0381 10.07L14.9509 9.04953L14.398 8.49658L11.9996 10.895L9.60113 8.49658L9.04818 9.04953L8.96096 10.07L10.8919 12.0009L8.86328 14.0295L9.96918 15.1354L11.9978 13.1068L14.0264 15.1354L15.1323 14.0295H15.1358Z" fill="%23ACABB1"/>%0A<path id="Vector_5" d="M14.9527 9.04944L13.8468 10.1553C14.3195 10.628 14.6108 11.2787 14.6108 11.9991C14.6108 13.4399 13.4438 14.6086 12.0013 14.6086C10.5587 14.6086 9.3918 13.4416 9.3918 11.9991C9.3918 11.2787 9.6831 10.6263 10.1558 10.1553L9.04991 9.04944C8.29462 9.80473 7.82715 10.8478 7.82715 12.0008C7.82715 14.3068 9.69531 16.175 12.0013 16.175C14.3073 16.175 16.1754 14.3068 16.1754 12.0008C16.1754 10.8478 15.708 9.80473 14.9527 9.04944Z" fill="%236DA544"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_2024_263">%0A<rect width="24" height="24" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var A='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Country=mexico" clip-path="url(%23clip0_1491_56915)">%0A<path id="Vector" d="M20.0015 40C31.0488 40 40.0029 31.0459 40.0029 19.9985C40.0029 8.95123 31.0488 0 20.0015 0C8.95414 0 0 8.95414 0 20.0015C0 31.0488 8.95414 40.0029 20.0015 40.0029V40Z" fill="%23F0F0F0"/>%0A<path id="Vector_2" d="M40.0004 20.0014C40.0004 12.0735 35.3838 5.2213 28.6943 1.9856V38.0173C35.3809 34.7816 40.0004 27.9293 40.0004 20.0014Z" fill="%23D80027"/>%0A<path id="Vector_3" d="M0 20.0015C0 27.9294 4.61661 34.7816 11.3061 38.0173V1.98561C4.61661 5.2184 0 12.0706 0 20.0015Z" fill="%236DA544"/>%0A<path id="Vector_4" d="M14.7801 20.0015C14.7801 22.8825 17.1175 25.2199 19.9985 25.2199C22.8796 25.2199 25.2169 22.8825 25.2169 20.0015V18.263H14.7801V20.0015Z" fill="%236DA544"/>%0A<path id="Vector_5" d="M26.953 16.5216H21.7433C21.7433 15.5593 20.9612 14.7831 20.0019 14.7831C19.0425 14.7831 18.2605 15.5622 18.2605 16.5216H13.0508C13.0508 17.481 13.8881 18.2601 14.8474 18.2601H14.7835C14.7835 19.2195 15.5655 19.9986 16.5249 19.9986C16.5249 20.9579 17.2982 21.7371 18.2605 21.7371H21.7462C22.7085 21.7371 23.4818 20.9579 23.4818 19.9986C24.444 19.9986 25.2232 19.2195 25.2232 18.2601H25.1592C26.1215 18.2601 26.9559 17.481 26.9559 16.5216H26.953Z" fill="%23FF9811"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1491_56915">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var E='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Country=peru" clip-path="url(%23clip0_1491_56921)">%0A<path id="Vector" d="M20.0015 40C31.0488 40 40.0029 31.0459 40.0029 19.9985C40.0029 8.95123 31.0488 0 20.0015 0C8.95414 0 0 8.95414 0 20.0015C0 31.0488 8.95414 40.0029 20.0015 40.0029V40Z" fill="%23F0F0F0"/>%0A<path id="Vector_2" d="M39.9996 20.0014C39.9996 11.402 34.569 4.07005 26.9521 1.24426V38.7586C34.569 35.9328 39.9996 28.6009 39.9996 20.0014Z" fill="%23D80027"/>%0A<path id="Vector_3" d="M0 20.0015C0 28.6009 5.43063 35.9328 13.0475 38.7586V1.24428C5.43063 4.07006 0 11.402 0 20.0015Z" fill="%23D80027"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1491_56921">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var b='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Country=brasil" clip-path="url(%23clip0_1491_56900)">%0A<path id="Vector" d="M20.0015 40C31.0459 40 40.0029 31.0459 40.0029 19.9985C40.0029 8.95123 31.0459 0 20.0015 0C8.95705 0 0 8.95414 0 20.0015C0 31.0488 8.95414 40.0029 20.0015 40.0029V40Z" fill="%236DA544"/>%0A<path id="Vector_2" d="M20.001 7.82617L36.5226 20.0015L20.001 32.1768L3.47656 20.0015L19.9981 7.82617H20.001Z" fill="%23FFDA44"/>%0A<path id="Vector_3" d="M20.0018 26.9554C23.8451 26.9554 26.9587 23.8418 26.9587 19.9985C26.9587 16.1552 23.8451 13.0416 20.0018 13.0416C16.1585 13.0416 13.0449 16.1552 13.0449 19.9985C13.0449 23.8418 16.1585 26.9554 20.0018 26.9554Z" fill="%23F0F0F0"/>%0A<path id="Vector_4" d="M16.5219 19.5654C15.3125 19.5654 14.1438 19.7486 13.0449 20.0916C13.0943 23.8913 16.1876 26.9584 19.9989 26.9584C22.3566 26.9584 24.4382 25.7868 25.697 23.9931C23.5428 21.2981 20.2315 19.5683 16.5219 19.5683V19.5654Z" fill="%230052B4"/>%0A<path id="Vector_5" d="M26.8275 21.3329C26.9118 20.9027 26.9554 20.455 26.9554 20.0015C26.9554 16.1582 23.8418 13.0446 19.9985 13.0446C17.1321 13.0446 14.6697 14.7801 13.6056 17.2542C14.5476 17.0594 15.5215 16.9547 16.5186 16.9547C20.5596 16.9547 24.214 18.6351 26.8246 21.33L26.8275 21.3329Z" fill="%230052B4"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1491_56900">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var S='data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g clip-path="url(%23clip0_2024_325)">%0A<path d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z" fill="%23F0F0F0"/>%0A<path d="M12 8.86953H23.5866C23.2857 7.75325 22.8284 6.70132 22.2387 5.73907H12V8.86953Z" fill="%23338AF3"/>%0A<path d="M4.53015 21.3913H19.4698C20.565 20.5191 21.5042 19.4596 22.2387 18.2609H1.76129C2.49587 19.4596 3.43506 20.5191 4.53015 21.3913Z" fill="%23338AF3"/>%0A<path d="M12 0V2.60869H19.4699C17.42 0.976125 14.8242 0 12 0Z" fill="%23338AF3"/>%0A<path d="M12 8.86953H23.5866C23.2857 7.75325 22.8284 6.70132 22.2387 5.73907H12V8.86953Z" fill="%23338AF3"/>%0A<path d="M0 12C0 13.0831 0.144375 14.1323 0.413391 15.1305H23.5867C23.8556 14.1323 24 13.0831 24 12H0Z" fill="%23338AF3"/>%0A<path d="M10.4348 7.02287L8.96922 7.71226L9.74965 9.13163L8.15824 8.82723L7.95658 10.4348L6.84818 9.25243L5.73968 10.4348L5.53807 8.82723L3.94666 9.13154L4.72704 7.71221L3.26154 7.02287L4.72708 6.33357L3.94666 4.91419L5.53802 5.2186L5.73972 3.61102L6.84818 4.7934L7.95663 3.61102L8.15824 5.2186L9.74969 4.91419L8.96927 6.33362L10.4348 7.02287Z" fill="%23FFDA44"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_2024_325">%0A<rect width="24" height="24" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var B='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g clip-path="url(%23clip0_1770_12638)">%0A<path d="M20 40C31.0457 40 40 31.0457 40 20C40 8.9543 31.0457 0 20 0C8.9543 0 0 8.9543 0 20C0 31.0457 8.9543 40 20 40Z" fill="%23F0F0F0"/>%0A<path d="M19.1305 20H40C40 18.1948 39.7594 16.4461 39.311 14.7826H19.1305V20Z" fill="%23D80027"/>%0A<path d="M19.1305 9.56523H37.0646C35.8403 7.56742 34.2749 5.80156 32.4497 4.34781H19.1305V9.56523Z" fill="%23D80027"/>%0A<path d="M20 40C24.707 40 29.0333 38.3731 32.4497 35.6522H7.55032C10.9667 38.3731 15.2931 40 20 40Z" fill="%23D80027"/>%0A<path d="M2.93548 30.4348H37.0645C38.0474 28.8309 38.8097 27.0778 39.311 25.2173H0.688995C1.19032 27.0778 1.95259 28.8309 2.93548 30.4348Z" fill="%23D80027"/>%0A<path d="M9.26437 3.12328H11.087L9.39164 4.35492L10.0392 6.34781L8.34398 5.11617L6.64875 6.34781L7.20813 4.62617C5.71547 5.86953 4.40719 7.32625 3.32906 8.94938H3.91305L2.83391 9.73336C2.66578 10.0138 2.50453 10.2987 2.35 10.5879L2.86531 12.1739L1.90391 11.4754C1.66492 11.9817 1.44633 12.4995 1.24984 13.028L1.81758 14.7755H3.91305L2.21773 16.0071L2.86531 18L1.17008 16.7684L0.154609 17.5062C0.0529687 18.3232 0 19.1554 0 20H20C20 8.95437 20 7.65219 20 0C16.0491 0 12.366 1.14609 9.26437 3.12328ZM10.0392 18L8.34398 16.7684L6.64875 18L7.29633 16.0071L5.60102 14.7755H7.69648L8.34398 12.7826L8.99148 14.7755H11.087L9.39164 16.0071L10.0392 18ZM9.39164 10.181L10.0392 12.1739L8.34398 10.9423L6.64875 12.1739L7.29633 10.181L5.60102 8.94938H7.69648L8.34398 6.95648L8.99148 8.94938H11.087L9.39164 10.181ZM17.2131 18L15.5179 16.7684L13.8227 18L14.4702 16.0071L12.7749 14.7755H14.8704L15.5179 12.7826L16.1654 14.7755H18.2609L16.5655 16.0071L17.2131 18ZM16.5655 10.181L17.2131 12.1739L15.5179 10.9423L13.8227 12.1739L14.4702 10.181L12.7749 8.94938H14.8704L15.5179 6.95648L16.1654 8.94938H18.2609L16.5655 10.181ZM16.5655 4.35492L17.2131 6.34781L15.5179 5.11617L13.8227 6.34781L14.4702 4.35492L12.7749 3.12328H14.8704L15.5179 1.13039L16.1654 3.12328H18.2609L16.5655 4.35492Z" fill="%230052B4"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1770_12638">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var D=56,L=6,d0=[{id:0,code:"+56",name:"Chile",flag:V,country:"CL"},{id:1,code:"+54",name:"Argentina",flag:Z,country:"AR"},{id:2,code:"+57",name:"Colombia",flag:y,country:"CO"},{id:3,code:"+502",name:"Guatemala",flag:P,country:"GT"},{id:4,code:"+52",name:"Mexico",flag:A,country:"MX"},{id:5,code:"+51",name:"Per\xFA",flag:E,country:"PE"},{id:6,code:"+55",name:"Brasil",flag:b,country:"BR"},{id:7,code:"+598",name:"Uruguay",flag:S,country:"UY"},{id:8,code:"+1",name:"Estados Unidos",flag:B,country:"US"}],O0=({options:i=d0,noResults:w,selectedOption:R,onSelect:N,onChange:v,onClick:a0,className:T,defaultCountry:C="CL",initialValue:d,size:I="md",...a$3})=>{let k=useId(),c=useRef(null),o=useRef(null),U=useRef(null),[G,$]=useState("bottom"),[s,z]=useState(),[Y,X]=useState(-1),[n,m]=useState(R??null),[F,_]=useState(""),j=e=>{let t={target:{value:e.code+F}};v?.(t),c.current.style.display="none",o.current.value=e.code,m(e),N?.(e);};return useEffect(()=>{if(!o.current)return;let e=()=>{if(!o.current)return;let t=D*(i.length<L?i.length:L)+16,h=o.current.getBoundingClientRect();z(h);let q=window.innerHeight-h.bottom>t,J=h.top>t;$(q?"bottom":J?"top":"bottom");};return e(),o.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{o.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[o.current]),useEffect(()=>{function e(t){c.current&&!c.current.contains(t.target)&&(c.current.style.display="none",X(-1));}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[c.current]),useEffect(()=>{if(C&&!d){let e=i.find(t=>t.country===C)??null;m(e);}},[C,d]),useEffect(()=>{if(d){let e=i.find(t=>d.includes(t.code))??null;m(e),_(d.replace(e?.code??"",""));}},[d]),jsx("div",{className:a("flex flex-col",T),children:jsxs("div",{className:a("relative flex flex-col"),children:[jsx(a$1,{ref:o,value:F,placeholder:a$3.placeholder??"",onChange:e=>{let t=e.target.value.replace(/\D/g,"");_(t);let h={target:{value:n?.code&&!t.includes(n.code)?n?.code+t:t}};v?.(h);},startComponent:jsxs("div",{className:"z-[100000] ml-3 flex h-2 w-[7.5rem] cursor-pointer items-center",onClick:()=>{a$3.disabled||(c.current.style.display="flex");},children:[jsx("img",{src:n?.flag,alt:n?.country,className:a("h-6 w-6 cursor-pointer",a$3.disabled&&"cursor-not-allowed text-neutral-400")}),jsx("span",{className:a("ml-1",a$3.disabled&&"cursor-not-allowed text-neutral-400"),children:n?.code}),jsx(g,{className:a(I==="md"?"h-6 w-6":"h-4.5 w-4.5","cursor-pointer",a$3.disabled&&"cursor-not-allowed text-neutral-400")})]}),...a$3}),jsx(O.Root,{asChild:!0,children:jsx("ul",{ref:c,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:s?{width:`${s.width}px`,left:s.left,top:G==="bottom"?`${s.height+s.top+window.scrollY}px`:window.scrollY+s.top-(i.length<L?i.length:L)*D-16}:void 0,children:jsxs(a$2,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:U,children:[i.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[c0.cloneElement(w.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:w.message})]}),i.map((e,t)=>jsx("li",{onClick:()=>{j(e);},className:a("flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",n?.code===e.code&&"bg-primary-200",Y===t&&"bg-primary-200"),value:e.code,children:jsxs("div",{className:a("flex items-center space-x-3"),children:[jsx("img",{src:e.flag,alt:e.country,className:"h-6 w-6"}),jsx("p",{children:e.name}),jsx("p",{className:"text-primary-500",children:`(${e.code})`})]})},`select-option-${k}-${e.id??e.code}`))]})})})]})})};
1
+ import {a as a$2}from'./chunk-JGL2V7EX.mjs';import {a as a$1}from'./chunk-W2YOW3FA.mjs';import {g}from'./chunk-AF7XWQ5Y.mjs';import {a}from'./chunk-2WINTZSS.mjs';import c0,{useId,useRef,useState,useEffect}from'react';import*as O from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var V='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Country=chile" clip-path="url(%23clip0_1491_56906)">%0A<path id="Vector" d="M20.0015 40C31.0488 40 40.0029 31.0459 40.0029 19.9985C40.0029 8.95123 31.0459 0 20.0015 0C8.95705 0 0 8.95414 0 20.0015C0 31.0488 8.95414 40.0029 20.0015 40.0029V40Z" fill="%23F0F0F0"/>%0A<path id="Vector_2" d="M40 20.0015C40 31.0459 31.0459 40.0029 19.9985 40.0029C8.95123 40.0029 0 31.0459 0 20.0015C0 8.95705 20.0015 20.0015 20.0015 20.0015H40.0029H40Z" fill="%23D80027"/>%0A<path id="Vector_3" d="M0 20.0015C0 8.95414 8.95414 0 20.0015 0V20.0015H0Z" fill="%230052B4"/>%0A<path id="Vector_4" d="M11.9049 6.9569L13.1986 10.9427H17.3908L14.001 13.405L15.2947 17.3908L11.9049 14.9284L8.51515 17.3908L9.80885 13.405L6.41907 10.9427H10.6112L11.9049 6.9569Z" fill="%23F0F0F0"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1491_56906">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var Z='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Country=argentina" clip-path="url(%23clip0_1491_56925)">%0A<path id="Vector" d="M20.0015 40C31.0488 40 40.0029 31.0459 40.0029 19.9985C40.0029 8.95123 31.0459 0 20.0015 0C8.95705 0 0 8.95414 0 20.0015C0 31.0488 8.95414 40.0029 20.0015 40.0029V40Z" fill="%23F0F0F0"/>%0A<path id="Vector_2" d="M20.0012 0C12.0704 0 5.21814 4.61371 1.98535 11.3061H38.017C34.7813 4.61371 27.9291 0 20.0012 0Z" fill="%23338AF3"/>%0A<path id="Vector_3" d="M20.0012 40C27.9291 40 34.7813 35.3863 38.017 28.694H1.98535C5.22105 35.3834 12.0704 40 20.0012 40Z" fill="%23338AF3"/>%0A<path id="Vector_4" d="M25.9786 20.0015L23.5366 21.1498L24.8361 23.5162L22.1848 23.0075L21.8475 25.6879L20.0015 23.7168L18.1525 25.6879L17.8152 23.0075L15.1639 23.5133L16.4634 21.1498L14.0214 20.0015L16.4634 18.8531L15.1639 16.4867L17.8152 16.9954L18.1525 14.315L19.9985 16.2861L21.8475 14.315L22.1848 16.9954L24.8361 16.4867L23.5366 18.8531L25.9786 20.0015Z" fill="%23FFDA44"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1491_56925">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var y='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Country=colombia" clip-path="url(%23clip0_1491_56936)">%0A<path id="Vector" d="M0 20.0015C0 8.95414 8.95414 0 20.0015 0C31.0488 0 40.0029 8.95414 40.0029 20.0015L20.0015 21.74L0 20.0015Z" fill="%23FFDA44"/>%0A<path id="Vector_2" d="M2.67752 29.9993C6.13417 35.9765 12.5968 40 20.0015 40C27.4061 40 33.8687 35.9794 37.3254 29.9993L20.0015 28.6939L2.67752 29.9993Z" fill="%23D80027"/>%0A<path id="Vector_3" d="M37.3254 29.9993C39.029 27.0572 40.0029 23.6413 40.0029 19.9985H0C0 23.6413 0.973908 27.0572 2.67752 29.9993H37.3254Z" fill="%230052B4"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1491_56936">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var P='data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="flags_sm" clip-path="url(%23clip0_2024_263)">%0A<path id="Vector" d="M12.0009 24C18.6275 24 24.0017 18.6275 24.0017 11.9991C24.0017 5.37074 18.6275 0 12.0009 0C5.37423 0 0 5.37248 0 12.0009C0 18.6293 5.37248 24.0017 12.0009 24.0017V24Z" fill="%23F0F0F0"/>%0A<path id="Vector_2" d="M24.0004 12.0009C24.0004 7.24417 21.2322 3.13283 17.2168 1.19141V22.8104C21.2305 20.869 24.0004 16.7577 24.0004 12.0009Z" fill="%23338AF3"/>%0A<path id="Vector_3" d="M0 12.0009C0 16.7576 2.76822 20.8689 6.78363 22.8104V1.19135C2.76822 3.13102 0 7.24237 0 12.0009Z" fill="%23338AF3"/>%0A<path id="Vector_4" d="M15.1358 14.0295L13.1072 12.0009L15.0381 10.07L14.9509 9.04953L14.398 8.49658L11.9996 10.895L9.60113 8.49658L9.04818 9.04953L8.96096 10.07L10.8919 12.0009L8.86328 14.0295L9.96918 15.1354L11.9978 13.1068L14.0264 15.1354L15.1323 14.0295H15.1358Z" fill="%23ACABB1"/>%0A<path id="Vector_5" d="M14.9527 9.04944L13.8468 10.1553C14.3195 10.628 14.6108 11.2787 14.6108 11.9991C14.6108 13.4399 13.4438 14.6086 12.0013 14.6086C10.5587 14.6086 9.3918 13.4416 9.3918 11.9991C9.3918 11.2787 9.6831 10.6263 10.1558 10.1553L9.04991 9.04944C8.29462 9.80473 7.82715 10.8478 7.82715 12.0008C7.82715 14.3068 9.69531 16.175 12.0013 16.175C14.3073 16.175 16.1754 14.3068 16.1754 12.0008C16.1754 10.8478 15.708 9.80473 14.9527 9.04944Z" fill="%236DA544"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_2024_263">%0A<rect width="24" height="24" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var A='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Country=mexico" clip-path="url(%23clip0_1491_56915)">%0A<path id="Vector" d="M20.0015 40C31.0488 40 40.0029 31.0459 40.0029 19.9985C40.0029 8.95123 31.0488 0 20.0015 0C8.95414 0 0 8.95414 0 20.0015C0 31.0488 8.95414 40.0029 20.0015 40.0029V40Z" fill="%23F0F0F0"/>%0A<path id="Vector_2" d="M40.0004 20.0014C40.0004 12.0735 35.3838 5.2213 28.6943 1.9856V38.0173C35.3809 34.7816 40.0004 27.9293 40.0004 20.0014Z" fill="%23D80027"/>%0A<path id="Vector_3" d="M0 20.0015C0 27.9294 4.61661 34.7816 11.3061 38.0173V1.98561C4.61661 5.2184 0 12.0706 0 20.0015Z" fill="%236DA544"/>%0A<path id="Vector_4" d="M14.7801 20.0015C14.7801 22.8825 17.1175 25.2199 19.9985 25.2199C22.8796 25.2199 25.2169 22.8825 25.2169 20.0015V18.263H14.7801V20.0015Z" fill="%236DA544"/>%0A<path id="Vector_5" d="M26.953 16.5216H21.7433C21.7433 15.5593 20.9612 14.7831 20.0019 14.7831C19.0425 14.7831 18.2605 15.5622 18.2605 16.5216H13.0508C13.0508 17.481 13.8881 18.2601 14.8474 18.2601H14.7835C14.7835 19.2195 15.5655 19.9986 16.5249 19.9986C16.5249 20.9579 17.2982 21.7371 18.2605 21.7371H21.7462C22.7085 21.7371 23.4818 20.9579 23.4818 19.9986C24.444 19.9986 25.2232 19.2195 25.2232 18.2601H25.1592C26.1215 18.2601 26.9559 17.481 26.9559 16.5216H26.953Z" fill="%23FF9811"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1491_56915">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var E='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Country=peru" clip-path="url(%23clip0_1491_56921)">%0A<path id="Vector" d="M20.0015 40C31.0488 40 40.0029 31.0459 40.0029 19.9985C40.0029 8.95123 31.0488 0 20.0015 0C8.95414 0 0 8.95414 0 20.0015C0 31.0488 8.95414 40.0029 20.0015 40.0029V40Z" fill="%23F0F0F0"/>%0A<path id="Vector_2" d="M39.9996 20.0014C39.9996 11.402 34.569 4.07005 26.9521 1.24426V38.7586C34.569 35.9328 39.9996 28.6009 39.9996 20.0014Z" fill="%23D80027"/>%0A<path id="Vector_3" d="M0 20.0015C0 28.6009 5.43063 35.9328 13.0475 38.7586V1.24428C5.43063 4.07006 0 11.402 0 20.0015Z" fill="%23D80027"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1491_56921">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var b='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Country=brasil" clip-path="url(%23clip0_1491_56900)">%0A<path id="Vector" d="M20.0015 40C31.0459 40 40.0029 31.0459 40.0029 19.9985C40.0029 8.95123 31.0459 0 20.0015 0C8.95705 0 0 8.95414 0 20.0015C0 31.0488 8.95414 40.0029 20.0015 40.0029V40Z" fill="%236DA544"/>%0A<path id="Vector_2" d="M20.001 7.82617L36.5226 20.0015L20.001 32.1768L3.47656 20.0015L19.9981 7.82617H20.001Z" fill="%23FFDA44"/>%0A<path id="Vector_3" d="M20.0018 26.9554C23.8451 26.9554 26.9587 23.8418 26.9587 19.9985C26.9587 16.1552 23.8451 13.0416 20.0018 13.0416C16.1585 13.0416 13.0449 16.1552 13.0449 19.9985C13.0449 23.8418 16.1585 26.9554 20.0018 26.9554Z" fill="%23F0F0F0"/>%0A<path id="Vector_4" d="M16.5219 19.5654C15.3125 19.5654 14.1438 19.7486 13.0449 20.0916C13.0943 23.8913 16.1876 26.9584 19.9989 26.9584C22.3566 26.9584 24.4382 25.7868 25.697 23.9931C23.5428 21.2981 20.2315 19.5683 16.5219 19.5683V19.5654Z" fill="%230052B4"/>%0A<path id="Vector_5" d="M26.8275 21.3329C26.9118 20.9027 26.9554 20.455 26.9554 20.0015C26.9554 16.1582 23.8418 13.0446 19.9985 13.0446C17.1321 13.0446 14.6697 14.7801 13.6056 17.2542C14.5476 17.0594 15.5215 16.9547 16.5186 16.9547C20.5596 16.9547 24.214 18.6351 26.8246 21.33L26.8275 21.3329Z" fill="%230052B4"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1491_56900">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var S='data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g clip-path="url(%23clip0_2024_325)">%0A<path d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z" fill="%23F0F0F0"/>%0A<path d="M12 8.86953H23.5866C23.2857 7.75325 22.8284 6.70132 22.2387 5.73907H12V8.86953Z" fill="%23338AF3"/>%0A<path d="M4.53015 21.3913H19.4698C20.565 20.5191 21.5042 19.4596 22.2387 18.2609H1.76129C2.49587 19.4596 3.43506 20.5191 4.53015 21.3913Z" fill="%23338AF3"/>%0A<path d="M12 0V2.60869H19.4699C17.42 0.976125 14.8242 0 12 0Z" fill="%23338AF3"/>%0A<path d="M12 8.86953H23.5866C23.2857 7.75325 22.8284 6.70132 22.2387 5.73907H12V8.86953Z" fill="%23338AF3"/>%0A<path d="M0 12C0 13.0831 0.144375 14.1323 0.413391 15.1305H23.5867C23.8556 14.1323 24 13.0831 24 12H0Z" fill="%23338AF3"/>%0A<path d="M10.4348 7.02287L8.96922 7.71226L9.74965 9.13163L8.15824 8.82723L7.95658 10.4348L6.84818 9.25243L5.73968 10.4348L5.53807 8.82723L3.94666 9.13154L4.72704 7.71221L3.26154 7.02287L4.72708 6.33357L3.94666 4.91419L5.53802 5.2186L5.73972 3.61102L6.84818 4.7934L7.95663 3.61102L8.15824 5.2186L9.74969 4.91419L8.96927 6.33362L10.4348 7.02287Z" fill="%23FFDA44"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_2024_325">%0A<rect width="24" height="24" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var B='data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g clip-path="url(%23clip0_1770_12638)">%0A<path d="M20 40C31.0457 40 40 31.0457 40 20C40 8.9543 31.0457 0 20 0C8.9543 0 0 8.9543 0 20C0 31.0457 8.9543 40 20 40Z" fill="%23F0F0F0"/>%0A<path d="M19.1305 20H40C40 18.1948 39.7594 16.4461 39.311 14.7826H19.1305V20Z" fill="%23D80027"/>%0A<path d="M19.1305 9.56523H37.0646C35.8403 7.56742 34.2749 5.80156 32.4497 4.34781H19.1305V9.56523Z" fill="%23D80027"/>%0A<path d="M20 40C24.707 40 29.0333 38.3731 32.4497 35.6522H7.55032C10.9667 38.3731 15.2931 40 20 40Z" fill="%23D80027"/>%0A<path d="M2.93548 30.4348H37.0645C38.0474 28.8309 38.8097 27.0778 39.311 25.2173H0.688995C1.19032 27.0778 1.95259 28.8309 2.93548 30.4348Z" fill="%23D80027"/>%0A<path d="M9.26437 3.12328H11.087L9.39164 4.35492L10.0392 6.34781L8.34398 5.11617L6.64875 6.34781L7.20813 4.62617C5.71547 5.86953 4.40719 7.32625 3.32906 8.94938H3.91305L2.83391 9.73336C2.66578 10.0138 2.50453 10.2987 2.35 10.5879L2.86531 12.1739L1.90391 11.4754C1.66492 11.9817 1.44633 12.4995 1.24984 13.028L1.81758 14.7755H3.91305L2.21773 16.0071L2.86531 18L1.17008 16.7684L0.154609 17.5062C0.0529687 18.3232 0 19.1554 0 20H20C20 8.95437 20 7.65219 20 0C16.0491 0 12.366 1.14609 9.26437 3.12328ZM10.0392 18L8.34398 16.7684L6.64875 18L7.29633 16.0071L5.60102 14.7755H7.69648L8.34398 12.7826L8.99148 14.7755H11.087L9.39164 16.0071L10.0392 18ZM9.39164 10.181L10.0392 12.1739L8.34398 10.9423L6.64875 12.1739L7.29633 10.181L5.60102 8.94938H7.69648L8.34398 6.95648L8.99148 8.94938H11.087L9.39164 10.181ZM17.2131 18L15.5179 16.7684L13.8227 18L14.4702 16.0071L12.7749 14.7755H14.8704L15.5179 12.7826L16.1654 14.7755H18.2609L16.5655 16.0071L17.2131 18ZM16.5655 10.181L17.2131 12.1739L15.5179 10.9423L13.8227 12.1739L14.4702 10.181L12.7749 8.94938H14.8704L15.5179 6.95648L16.1654 8.94938H18.2609L16.5655 10.181ZM16.5655 4.35492L17.2131 6.34781L15.5179 5.11617L13.8227 6.34781L14.4702 4.35492L12.7749 3.12328H14.8704L15.5179 1.13039L16.1654 3.12328H18.2609L16.5655 4.35492Z" fill="%230052B4"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_1770_12638">%0A<rect width="40" height="40" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';var D=56,L=6,d0=[{id:0,code:"+56",name:"Chile",flag:V,country:"CL"},{id:1,code:"+54",name:"Argentina",flag:Z,country:"AR"},{id:2,code:"+57",name:"Colombia",flag:y,country:"CO"},{id:3,code:"+502",name:"Guatemala",flag:P,country:"GT"},{id:4,code:"+52",name:"Mexico",flag:A,country:"MX"},{id:5,code:"+51",name:"Per\xFA",flag:E,country:"PE"},{id:6,code:"+55",name:"Brasil",flag:b,country:"BR"},{id:7,code:"+598",name:"Uruguay",flag:S,country:"UY"},{id:8,code:"+1",name:"Estados Unidos",flag:B,country:"US"}],O0=({options:i=d0,noResults:w,selectedOption:R,onSelect:N,onChange:v,onClick:a0,className:T,defaultCountry:C="CL",initialValue:d,size:I="md",...a$3})=>{let k=useId(),c=useRef(null),o=useRef(null),U=useRef(null),[G,$]=useState("bottom"),[s,z]=useState(),[Y,X]=useState(-1),[n,m]=useState(R??null),[F,_]=useState(""),j=e=>{let t={target:{value:e.code+F}};v?.(t),c.current.style.display="none",o.current.value=e.code,m(e),N?.(e);};return useEffect(()=>{if(!o.current)return;let e=()=>{if(!o.current)return;let t=D*(i.length<L?i.length:L)+16,h=o.current.getBoundingClientRect();z(h);let q=window.innerHeight-h.bottom>t,J=h.top>t;$(q?"bottom":J?"top":"bottom");};return e(),o.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{o.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[o.current]),useEffect(()=>{function e(t){c.current&&!c.current.contains(t.target)&&(c.current.style.display="none",X(-1));}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[c.current]),useEffect(()=>{if(C&&!d){let e=i.find(t=>t.country===C)??null;m(e);}},[C,d]),useEffect(()=>{if(d){let e=i.find(t=>d.includes(t.code))??null;m(e),_(d.replace(e?.code??"",""));}},[d]),jsx("div",{className:a("flex flex-col",T),children:jsxs("div",{className:a("relative flex flex-col"),children:[jsx(a$1,{ref:o,value:F,placeholder:a$3.placeholder??"",onChange:e=>{let t=e.target.value.replace(/\D/g,"");_(t);let h={target:{value:n?.code&&!t.includes(n.code)?n?.code+t:t}};v?.(h);},startComponent:jsxs("div",{className:"z-[100000] ml-3 flex h-2 w-[7.5rem] cursor-pointer items-center",onClick:()=>{a$3.disabled||(c.current.style.display="flex");},children:[jsx("img",{src:n?.flag,alt:n?.country,className:a("h-6 w-6 cursor-pointer",a$3.disabled&&"cursor-not-allowed text-neutral-400")}),jsx("span",{className:a("ml-1",a$3.disabled&&"cursor-not-allowed text-neutral-400"),children:n?.code}),jsx(g,{className:a(I==="md"?"h-6 w-6":"h-4.5 w-4.5","cursor-pointer",a$3.disabled&&"cursor-not-allowed text-neutral-400")})]}),...a$3}),jsx(O.Root,{asChild:!0,children:jsx("ul",{ref:c,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:s?{width:`${s.width}px`,left:s.left,top:G==="bottom"?`${s.height+s.top+window.scrollY}px`:window.scrollY+s.top-(i.length<L?i.length:L)*D-16}:void 0,children:jsxs(a$2,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:U,children:[i.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[c0.cloneElement(w.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:w.message})]}),i.map((e,t)=>jsx("li",{onClick:()=>{j(e);},className:a("flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",n?.code===e.code&&"bg-primary-200",Y===t&&"bg-primary-200"),value:e.code,children:jsxs("div",{className:a("flex items-center space-x-3"),children:[jsx("img",{src:e.flag,alt:e.country,className:"h-6 w-6"}),jsx("p",{children:e.name}),jsx("p",{className:"text-primary-500",children:`(${e.code})`})]})},`select-option-${k}-${e.id??e.code}`))]})})})]})})};
2
2
  export{O0 as a};
@@ -1 +1 @@
1
- import {a as a$3}from'./chunk-XGJ7RSSV.mjs';import {j as j$1}from'./chunk-AAPIG5QF.mjs';import {c as c$1}from'./chunk-F7FACDZF.mjs';import {a as a$2}from'./chunk-WWSXCOGT.mjs';import {c}from'./chunk-DXG7NKVL.mjs';import {d}from'./chunk-AF7XWQ5Y.mjs';import {a as a$1}from'./chunk-2WINTZSS.mjs';import*as n from'react';import*as a from'@radix-ui/react-dialog';import*as x from'@radix-ui/react-visually-hidden';import {jsx,jsxs}from'react/jsx-runtime';var V=["sm","md","lg","xl"],T=({...r})=>jsx(a.Root,{...r});T.displayName="Drawer";var j=a.Trigger,h=a.Portal,B=a.Close,v=n.forwardRef(({className:r,...t},o)=>jsx(a.Overlay,{ref:o,className:a$1("fixed inset-0 z-50 bg-neutral-900/60","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=open]:animate-in data-[state=closed]:animate-out","transition-all",r),...t}));v.displayName=a.Overlay.displayName;var A=n.forwardRef(({className:r,size:t="sm",title:o,description:i,children:p,isLoading:f=!1,loadingText:m="",buttons:c,hideHeader:d$1=!1,...P},H)=>jsx(h,{children:jsx(v,{children:jsxs(a.Content,{ref:H,...!i||d$1?{"aria-describedby":void 0}:{},className:a$1("fixed right-0 top-0 flex h-full flex-col bg-neutral-50",t==="sm"&&"w-[29.375rem] max-w-[29.375rem]",t==="md"&&"w-[47.5rem] max-w-[47.5rem]",t==="lg"&&"w-[58.75rem] max-w-[58.75rem]",t==="xl"&&"w-[78.125rem] max-w-[78.125rem]","data-[state=open]:animate-slideIn","data-[state=closed]:animate-swipeOut",r),...P,children:[jsx(B,{asChild:!0,className:"ml-auto mr-2 mt-4 flex-shrink-0 cursor-pointer",children:jsx(d,{className:"h-6 w-6"})}),jsxs(a$2,{className:"h-full",viewPortClassName:"pr-8 pl-6",children:[d$1?jsx(x.Root,{children:jsx(j$1,{children:"Drawer"})}):jsx(N,{title:o,description:i,buttons:c}),jsx("div",{className:a$1("flex flex-1 flex-col pb-6",r),children:f?jsxs("div",{className:"flex flex-1 flex-col items-center justify-center",children:[jsx(a$3,{}),m&&jsx("p",{children:m})]}):p})]})]})})}));A.displayName="DrawerContent";var N=({className:r,title:t,description:o,buttons:i=[],...p})=>jsxs("div",{className:a$1("mb-7",r),...p,children:[jsxs("div",{className:"flex justify-between gap-2",children:[t&&jsx(C,{children:t}),!Array.isArray(i)&&i.visible!==!1&&jsx(c,{size:"sm",variant:"ghost",...i}),Array.isArray(i)&&jsx("div",{className:"flex gap-1",children:i.map(({visible:f=!0,...m},c)=>f?jsx(c$1,{variant:"ghost",size:"sm",...m},c):null)})]}),o&&jsx(b,{className:"mt-1",children:o})]});N.displayName="DrawerHeader";var O=({className:r,...t})=>jsx("div",{className:a$1("mt-auto flex pt-6",r),...t});O.displayName="DrawerFooter";var C=n.forwardRef(({className:r,...t},o)=>jsx(a.Title,{ref:o,className:a$1("font-jakarta text-2xl font-semibold leading-[130%] text-neutral-900",r),...t}));C.displayName=a.Title.displayName;var b=n.forwardRef(({className:r,...t},o)=>jsx(a.Description,{ref:o,className:a$1("text-sm leading-[130%] text-neutral-900",r),...t}));b.displayName=a.Description.displayName;export{V as a,T as b,j as c,h as d,B as e,v as f,A as g,N as h,O as i,C as j,b as k};
1
+ import {a as a$3}from'./chunk-XGJ7RSSV.mjs';import {j as j$1}from'./chunk-G4QPCVEU.mjs';import {c as c$1}from'./chunk-F7FACDZF.mjs';import {a as a$2}from'./chunk-JGL2V7EX.mjs';import {c}from'./chunk-DXG7NKVL.mjs';import {d}from'./chunk-AF7XWQ5Y.mjs';import {a as a$1}from'./chunk-2WINTZSS.mjs';import*as n from'react';import*as a from'@radix-ui/react-dialog';import*as x from'@radix-ui/react-visually-hidden';import {jsx,jsxs}from'react/jsx-runtime';var V=["sm","md","lg","xl"],T=({...r})=>jsx(a.Root,{...r});T.displayName="Drawer";var j=a.Trigger,h=a.Portal,B=a.Close,v=n.forwardRef(({className:r,...t},o)=>jsx(a.Overlay,{ref:o,className:a$1("fixed inset-0 z-50 bg-neutral-900/60","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=open]:animate-in data-[state=closed]:animate-out","transition-all",r),...t}));v.displayName=a.Overlay.displayName;var A=n.forwardRef(({className:r,size:t="sm",title:o,description:i,children:p,isLoading:f=!1,loadingText:m="",buttons:c,hideHeader:d$1=!1,...P},H)=>jsx(h,{children:jsx(v,{children:jsxs(a.Content,{ref:H,...!i||d$1?{"aria-describedby":void 0}:{},className:a$1("fixed right-0 top-0 flex h-full flex-col bg-neutral-50",t==="sm"&&"w-[29.375rem] max-w-[29.375rem]",t==="md"&&"w-[47.5rem] max-w-[47.5rem]",t==="lg"&&"w-[58.75rem] max-w-[58.75rem]",t==="xl"&&"w-[78.125rem] max-w-[78.125rem]","data-[state=open]:animate-slideIn","data-[state=closed]:animate-swipeOut",r),...P,children:[jsx(B,{asChild:!0,className:"ml-auto mr-2 mt-4 flex-shrink-0 cursor-pointer",children:jsx(d,{className:"h-6 w-6"})}),jsxs(a$2,{className:"h-full",viewPortClassName:"pr-8 pl-6",children:[d$1?jsx(x.Root,{children:jsx(j$1,{children:"Drawer"})}):jsx(N,{title:o,description:i,buttons:c}),jsx("div",{className:a$1("flex flex-1 flex-col pb-6",r),children:f?jsxs("div",{className:"flex flex-1 flex-col items-center justify-center",children:[jsx(a$3,{}),m&&jsx("p",{children:m})]}):p})]})]})})}));A.displayName="DrawerContent";var N=({className:r,title:t,description:o,buttons:i=[],...p})=>jsxs("div",{className:a$1("mb-7",r),...p,children:[jsxs("div",{className:"flex justify-between gap-2",children:[t&&jsx(C,{children:t}),!Array.isArray(i)&&i.visible!==!1&&jsx(c,{size:"sm",variant:"ghost",...i}),Array.isArray(i)&&jsx("div",{className:"flex gap-1",children:i.map(({visible:f=!0,...m},c)=>f?jsx(c$1,{variant:"ghost",size:"sm",...m},c):null)})]}),o&&jsx(b,{className:"mt-1",children:o})]});N.displayName="DrawerHeader";var O=({className:r,...t})=>jsx("div",{className:a$1("mt-auto flex pt-6",r),...t});O.displayName="DrawerFooter";var C=n.forwardRef(({className:r,...t},o)=>jsx(a.Title,{ref:o,className:a$1("font-jakarta text-2xl font-semibold leading-[130%] text-neutral-900",r),...t}));C.displayName=a.Title.displayName;var b=n.forwardRef(({className:r,...t},o)=>jsx(a.Description,{ref:o,className:a$1("text-sm leading-[130%] text-neutral-900",r),...t}));b.displayName=a.Description.displayName;export{V as a,T as b,j as c,h as d,B as e,v as f,A as g,N as h,O as i,C as j,b as k};
@@ -1 +1 @@
1
- import {a as a$3}from'./chunk-WWSXCOGT.mjs';import {a}from'./chunk-KTRSJBA4.mjs';import {a as a$1}from'./chunk-W2YOW3FA.mjs';import {o}from'./chunk-AF7XWQ5Y.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import {useState,useRef,useMemo,useEffect}from'react';import*as S from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var U=["00:00:00","00:30:00","01:00:00","01:30:00","02:00:00","02:30:00","03:00:00","03:30:00","04:00:00","04:30:00","05:00:00","05:30:00","06:00:00","06:30:00","07:00:00","07:30:00","08:00:00","08:30:00","09:00:00","09:30:00","10:00:00","10:30:00","11:00:00","11:30:00","12:00:00","12:30:00","13:00:00","13:30:00","14:00:00","14:30:00","15:00:00","15:30:00","16:00:00","16:30:00","17:00:00","17:30:00","18:00:00","18:30:00","19:00:00","19:30:00","20:00:00","20:30:00","21:00:00","21:30:00","22:00:00","22:30:00","23:00:00","23:30:00"],i=56,d=6,V=({value:f,onChange:P,locale:g,minTime:T,maxTime:v,...N})=>{let[O,u]=useState(!1),[p,h]=useState(f),[n,y]=useState(),[z,A]=useState("bottom"),E=useRef(null),o$1=useRef(null),x=useRef(null),[l,c]=useState(-1),k=e=>{h(e),P?.(e),u(!1),c(-1);},B=useMemo(()=>p?format(new Date("2024-01-01T"+p),"p"):"",[p,g]),K=()=>{h(void 0),c(-1),P?.(void 0);},r=useMemo(()=>U.map(e=>({value:e,label:format(new Date("2024-01-01T"+e),"p"),disabled:T&&e<T||v&&e>v})),[g,T,v]),_=e=>{if(e.preventDefault(),e.key==="ArrowDown"){if(l===r.length-1)return;c(t=>t+1),u(!0),L();}else if(e.key==="ArrowUp"){if(l===0)return;c(t=>t-1),L();}else e.key==="Enter"&&(k(r[l].value),c(-1));},L=()=>{let e=i*d;x.current.scroll({top:(l+2)*i<=e?0:i*(l+2)-e,behavior:"smooth"});};return useEffect(()=>{h(f);},[f]),a(E,()=>{u(!1);}),useEffect(()=>{if(!o$1.current)return;let e=()=>{if(!o$1.current)return;let t=i*(r.length<d?r.length:d)+16,m=o$1.current.getBoundingClientRect();y(m);let $=window.innerHeight-m.bottom>t,G=m.top+m.height>t;A($?"bottom":G?"top":"bottom");};return e(),o$1.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{o$1.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[o$1.current]),jsxs(Fragment,{children:[jsx(a$1,{ref:o$1,autoComplete:"off",startIcon:jsx(o,{}),onClean:K,readOnly:!0,value:B,onKeyDown:_,onClick:e=>{y(e.currentTarget.getBoundingClientRect()),u(t=>!t);},...N}),jsx(S.Root,{children:jsx("div",{ref:E,className:a$2("pointer-events-auto fixed z-50 hidden",O&&"block"),style:n?{width:`${n.width}px`,top:z==="bottom"?`${n.height+n.top}px`:n.top-(r.length<d?r.length:d)*i-16,left:n?.left}:void 0,children:jsx(a$3,{className:"elevation-8 my-2 flex max-h-84 w-full flex-col rounded-lg bg-neutral-50",ref:x,children:r.map((e,t)=>jsx("div",{onClick:()=>!e.disabled&&k(e.value),className:a$2("flex w-full items-center px-2 hover:cursor-pointer",!e.disabled&&"hover:bg-primary-100",p===e.value&&"bg-primary-200",l===t&&"bg-primary-200",e.disabled&&"text-neutral-500 hover:cursor-not-allowed"),style:{height:i},children:e.label},e.value))})})})]})};V.displayName="TimePicker";export{V as a};
1
+ import {a as a$3}from'./chunk-JGL2V7EX.mjs';import {a}from'./chunk-KTRSJBA4.mjs';import {a as a$1}from'./chunk-W2YOW3FA.mjs';import {o}from'./chunk-AF7XWQ5Y.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import {useState,useRef,useMemo,useEffect}from'react';import*as S from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var U=["00:00:00","00:30:00","01:00:00","01:30:00","02:00:00","02:30:00","03:00:00","03:30:00","04:00:00","04:30:00","05:00:00","05:30:00","06:00:00","06:30:00","07:00:00","07:30:00","08:00:00","08:30:00","09:00:00","09:30:00","10:00:00","10:30:00","11:00:00","11:30:00","12:00:00","12:30:00","13:00:00","13:30:00","14:00:00","14:30:00","15:00:00","15:30:00","16:00:00","16:30:00","17:00:00","17:30:00","18:00:00","18:30:00","19:00:00","19:30:00","20:00:00","20:30:00","21:00:00","21:30:00","22:00:00","22:30:00","23:00:00","23:30:00"],i=56,d=6,V=({value:f,onChange:P,locale:g,minTime:T,maxTime:v,...N})=>{let[O,u]=useState(!1),[p,h]=useState(f),[n,y]=useState(),[z,A]=useState("bottom"),E=useRef(null),o$1=useRef(null),x=useRef(null),[l,c]=useState(-1),k=e=>{h(e),P?.(e),u(!1),c(-1);},B=useMemo(()=>p?format(new Date("2024-01-01T"+p),"p"):"",[p,g]),K=()=>{h(void 0),c(-1),P?.(void 0);},r=useMemo(()=>U.map(e=>({value:e,label:format(new Date("2024-01-01T"+e),"p"),disabled:T&&e<T||v&&e>v})),[g,T,v]),_=e=>{if(e.preventDefault(),e.key==="ArrowDown"){if(l===r.length-1)return;c(t=>t+1),u(!0),L();}else if(e.key==="ArrowUp"){if(l===0)return;c(t=>t-1),L();}else e.key==="Enter"&&(k(r[l].value),c(-1));},L=()=>{let e=i*d;x.current.scroll({top:(l+2)*i<=e?0:i*(l+2)-e,behavior:"smooth"});};return useEffect(()=>{h(f);},[f]),a(E,()=>{u(!1);}),useEffect(()=>{if(!o$1.current)return;let e=()=>{if(!o$1.current)return;let t=i*(r.length<d?r.length:d)+16,m=o$1.current.getBoundingClientRect();y(m);let $=window.innerHeight-m.bottom>t,G=m.top+m.height>t;A($?"bottom":G?"top":"bottom");};return e(),o$1.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{o$1.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[o$1.current]),jsxs(Fragment,{children:[jsx(a$1,{ref:o$1,autoComplete:"off",startIcon:jsx(o,{}),onClean:K,readOnly:!0,value:B,onKeyDown:_,onClick:e=>{y(e.currentTarget.getBoundingClientRect()),u(t=>!t);},...N}),jsx(S.Root,{children:jsx("div",{ref:E,className:a$2("pointer-events-auto fixed z-50 hidden",O&&"block"),style:n?{width:`${n.width}px`,top:z==="bottom"?`${n.height+n.top}px`:n.top-(r.length<d?r.length:d)*i-16,left:n?.left}:void 0,children:jsx(a$3,{className:"elevation-8 my-2 flex max-h-84 w-full flex-col rounded-lg bg-neutral-50",ref:x,children:r.map((e,t)=>jsx("div",{onClick:()=>!e.disabled&&k(e.value),className:a$2("flex w-full items-center px-2 hover:cursor-pointer",!e.disabled&&"hover:bg-primary-100",p===e.value&&"bg-primary-200",l===t&&"bg-primary-200",e.disabled&&"text-neutral-500 hover:cursor-not-allowed"),style:{height:i},children:e.label},e.value))})})})]})};V.displayName="TimePicker";export{V as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-WGMDH4XX.mjs';import {d}from'./chunk-BRYDEYOA.mjs';import {a}from'./chunk-WWSXCOGT.mjs';import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-W2YOW3FA.mjs';import {a as a$3}from'./chunk-BVHU5ZT3.mjs';import {c}from'./chunk-DXG7NKVL.mjs';import {b}from'./chunk-UBOAGDGR.mjs';import {c as c$1,h}from'./chunk-AF7XWQ5Y.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import bt,{createContext,useMemo,useCallback,useState,useRef,useEffect,useContext,useId}from'react';import*as Ct from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Vt=({title:t,titleLines:o=1,description:r,descriptionLines:e=1,Icon:s,iconAsColumn:i=!0,className:a,...n})=>jsxs("div",{className:a$2("flex gap-2 py-4 pl-4 pr-6",i&&"flex-col items-center gap-1",!i&&!r&&"items-center"),...n,children:[s&&jsx(s,{className:a$2("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$2("flex flex-col gap-1",i&&"text-center"),children:[jsx("p",{className:a$2("leading-[130%] text-neutral-500",!!r&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),r&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:e?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e}:void 0,children:r})]})]}),at=Vt;var Ut=bt.memo(({handleSelect:t,NoResultsIcon:o,noResultsLabel:r,noResultsDescription:e,noResultsDescriptionLines:s,noResultsAsColumn:i,noResultsButtonOnClick:a$3,optionDescriptionLines:n,noResultsButtonLabel:w,filteredOptions:c$1,inputRect:p,inputRef:f,popoverPosition:x,optionsListRef:k,selectedOption:m,options:R,setFilteredOptions:h})=>jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:k,className:"pointer-events-auto fixed z-50 hidden w-full",style:p?{width:`${p.width}px`,left:p.left,top:x==="bottom"?`${p.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-p.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",children:[c$1.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:r,description:e,Icon:o,iconAsColumn:i,descriptionLines:s}),a$3&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:u=>{k.current.style.display="none",f.current.value="",h(R),a$3();},children:w})]})]}),c$1.map(u=>jsx(Mt,{title:u.label,disabled:u.disabled,description:u.description,descriptionLines:n,onClick:()=>t(u),className:a$2(m?.value===u.value&&"bg-primary-200")},u.key??u.value))]})})})),zt=Ut;var qt=336,rr=({options:t,defaultSelectedOption:o,onSelect:r,onClick:e,onInputChange:s,error:i,helperText:a,label:n,placeholder:w,value:c,size:p="lg",optionDescriptionLines:f=1,noResultsLabel:x,noResultsIcon:k,noResultsDescription:m,noResultsDescriptionLines:R,noResultsAsColumn:h,noResultsButtonOnClick:u,noResultsButtonLabel:A,className:j,disabled:b})=>{let[d,y]=useState(o??null),L=useRef(null),g=useRef(null),[nt,st]=useState(),[lt,T]=useState([]),[ct,H]=useState("bottom"),[V,K]=useState(),G=qt,N=useCallback(v=>{L.current.style.display="none",g.current.value=v.label,y(v),r?.(v);},[r]),z=useCallback(()=>{if(!g?.current)return;let v=g.current.getBoundingClientRect();st(v);let O=V?V.height:G,M=window.innerHeight-v.bottom>O,Q=v.top>O;H(M?"bottom":Q?"top":"bottom");},[V?.height]),U=useCallback(()=>{let v=t.filter(O=>O.label.toLowerCase().includes(g?.current?.value.toLowerCase()??""));if(T(v),L?.current){let O=L.current.getBoundingClientRect();K(O);}},[t]);return useEffect(()=>{T(t);},[t]),useEffect(()=>{if(!c){y(null),g.current&&(g.current.value="");return}(!g.current?.value||d?.value!==c.value)&&(y(c),g.current.value=c.label);},[c]),a$5(L,()=>{L.current.style.display="none",d&&g.current&&(g.current.value=d.label);}),useEffect(()=>{if(g?.current)return z(),g.current.addEventListener("mousedown",z),g.current.addEventListener("input",U),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{g.current?.removeEventListener("mousedown",z),g.current?.removeEventListener("input",U),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z);}},[z,U]),jsxs("div",{className:a$2("relative",j),children:[jsx(a$4,{ref:g,autoComplete:"off",list:"",selectMode:!0,onChange:v=>{v.target.value||(y(null),r?.(null)),s?.(v);},onClean:()=>{y(null),T(t),r?.(null);},onClick:v=>{L.current.style.display="flex",e?.(v);},onBlur:()=>{d&&g.current&&(g.current.value=d.label);},label:n,helperText:a,placeholder:w,size:p,error:i,disabled:b}),jsx(zt,{handleSelect:N,noResultsLabel:x,NoResultsIcon:k,optionDescriptionLines:f,noResultsAsColumn:h,noResultsButtonLabel:A,noResultsButtonOnClick:u,noResultsDescription:m,noResultsDescriptionLines:R,filteredOptions:lt,inputRect:nt,inputRef:g,popoverPosition:ct,optionsListRef:L,selectedOption:d,options:t,setFilteredOptions:T})]})};var Kt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:s,disabled:i=!1,className:a,...n})=>jsxs("div",{className:"flex w-full flex-col",...n,children:[jsx("p",{className:a$2(!!e&&"font-medium"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:o}),e&&jsx("p",{className:a$2("text-sm",i?"text-neutral-400":"text-neutral-700"),style:s?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:s}:void 0,children:e})]}),Y=Kt;var mr=({children:t,title:o,titleLines:r,description:e="",descriptionLines:s,startIcon:i,badgeContent:a,hasDivider:n=!1,disabled:w=!1,onSelect:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:w,onClick:c,hasDivider:n,className:a$2(!w&&"cursor-pointer",p),...f,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:s,disabled:w}),jsxs("div",{className:"flex gap-2",children:[a&&jsx(a$3,{content:a,size:"lg",variant:"alert",className:a$2("self-center",w&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var St=({children:t,title:o,titleLines:r,description:e="",descriptionLines:s,startIcon:i,hasDivider:a=!1,disabled:n=!1,checked:w,onCheckedChange:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,...f,className:a$2("pr-6",p),children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:s,disabled:n}),jsx(b,{size:"sm",checked:w,onCheckedChange:c,className:"self-center",disabled:n})]});var E=336,Ft=createContext({inputRef:null,optionsListRef:null,scrollAreaRef:null,autocompleteId:"",inputRect:void 0,showChips:!1,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:E,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),I=()=>{let t=useContext(Ft);if(t===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return t},Dt=({children:t})=>{let o=useRef(null),r=useRef(null),e=useRef(null),s=useId(),[i,a]=useState(),[n,w]=useState(!0),[c,p]=useState([]),[f,x]=useState(-1),[k,m]=useState("bottom"),[R,h]=useState(),[u,A]=useState(E);return jsx(Ft.Provider,{value:{optionsListRef:o,inputRef:r,scrollAreaRef:e,autocompleteId:s,inputRect:i,showChips:n,filteredOptions:c,currentFocus:f,popoverPosition:k,setFilteredOptions:p,setCurrentFocus:x,setShowChips:w,setPopoverPosition:m,setInputRect:a,optionsListHeight:u,optionsListRect:R,setOptionsListRect:h,setOptionsListHeight:A},children:t})};var le=({option:t,onMountWidth:o,size:r})=>{let e=useRef(null);return useEffect(()=>{e.current&&o?.(e.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:e,className:"flex-shrink-0",size:r==="md"?"xs":"sm",hasCloseIcon:!1,children:t.label})},Tt=le;var ge=150,we=bt.memo(({selectedOptions:t,error:o,onCleanSelectedOptions:r,disabled:e,size:s})=>{let{autocompleteId:i,inputRect:a,inputRef:n,optionsListRef:w}=I(),c=bt.useRef(null),[p,f]=bt.useState(new Map),x=useMemo(()=>{if(!a?.width)return [];let m=0,R=a.width-ge,h=0;for(let u=0;u<t.length&&(h+=p.get(u)??0,!(h>R));u++)m++;return t.slice(0,m)},[a?.width,t,p]),k=useCallback(()=>{e||(n?.current?.focus(),w.current.style.display="flex");},[e]);return jsxs("div",{onClick:k,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",e&&"cursor-not-allowed"),style:{maxWidth:a?.width?a?.width:void 0,height:a?.height?a?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:c,children:x.map((m,R)=>jsx(Tt,{option:m,onMountWidth:h=>f(u=>new Map(u).set(R,h)),size:s},`chip-input-${i}-${m.value}`))}),t.length>x.length&&jsx("span",{className:"text-base",children:"..."}),t.length>0&&!o&&jsx(a$3,{content:String(t.length),size:s}),o&&t.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:m=>{m.stopPropagation(),r();}})]})}),Ht=we;var be=bt.memo(({option:t,index:o,onPressOption:r,isSelected:e,optionDescriptionLines:s})=>{let{currentFocus:i,inputRef:a}=I();return jsx(St,{title:t.label,checked:e,disabled:t.disabled,className:i===o?"bg-primary-200":void 0,onMouseDown:n=>{a?.current?.value&&n.preventDefault(),r?.(t,n);},description:t.description,descriptionLines:s})}),ht=be;var xe=bt.memo(({selectedOptions:t,handleSelect:o,NoResultsIcon:r,noResultsLabel:e,noResultsDescription:s,noResultsDescriptionLines:i,noResultsAsColumn:a$2,noResultsButtonOnClick:n,optionDescriptionLines:w,noResultsButtonLabel:c$1})=>{let{popoverPosition:p,scrollAreaRef:f,optionsListRef:x,filteredOptions:k,inputRect:m,autocompleteId:R,inputRef:h,optionsListHeight:u}=I(),A=useCallback(b=>t.some(d=>d.value===b.value),[t]),j=useMemo(()=>t.filter(b=>b.label.toLowerCase().includes(h?.current?.value.toLowerCase()??"")),[t,h?.current?.value]);return jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:x,className:"pointer-events-auto fixed z-50 hidden w-full",style:m?{width:`${m.width}px`,left:m.left,top:p==="bottom"?`${m.bottom}px`:void 0,bottom:p==="top"?`${window.innerHeight-m.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex w-full flex-col rounded-lg bg-neutral-50",style:{maxHeight:u+"px"},ref:f,children:[k.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:e,description:s,Icon:r,iconAsColumn:a$2,descriptionLines:i}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:b=>{x.current.style.display="none",h.current.value="",n();},children:c$1})]})]}),j.map((b,d)=>jsx(ht,{option:b,index:d,onPressOption:(y,L)=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`)),k.map((b,d)=>!t.some(y=>y.value===b.value)&&jsx(ht,{option:b,index:d,onPressOption:(y,L)=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`))]})})})}),Xt=xe;var Le=bt.memo(({selectedOptions:t,onSelect:o,error:r,helperText:e,label:s,placeholder:i,options:a,onInputChange:n,size:w,disabled:c})=>{let{setCurrentFocus:p,setFilteredOptions:f,optionsListRef:x,inputRef:k}=I();return jsx(a$4,{ref:k,autoComplete:"off",list:"",disabled:c,selectMode:!0,onChange:m=>{p(-1),n?.(m.target.value);},onClean:()=>{p(-1),f(a),o?.(null,t);},onClick:()=>{c||(x.current.style.display="flex");},error:r,helperText:e,label:s,placeholder:i,fixedTopLabel:t.length>0,size:w})}),Bt=Le;var Yt=({options:t,defaultSelectedOptions:o,onSelect:r,error:e,helperText:s,label:i,placeholder:a,noResultsLabel:n,noResultsIcon:w,noResultsDescription:c,noResultsDescriptionLines:p,noResultsAsColumn:f,noResultsButtonOnClick:x,noResultsButtonLabel:k,className:m,onInputChange:R,value:h,loading:u,size:A="lg",optionDescriptionLines:j=1,disabled:b})=>{let{inputRef:d,optionsListRef:y,setFilteredOptions:L,setShowChips:g,setInputRect:nt,setPopoverPosition:st,setCurrentFocus:lt,showChips:T,setOptionsListRect:ct,optionsListRect:H,setOptionsListHeight:V}=I(),K=useRef(!1),[G,N]=useState(o??[]),z=useCallback(C=>{N(P=>{let S,$=P.findIndex(jt=>jt.value===C.value);return $===-1?(S=P.concat(C),r?.(C,S),S):(S=P.toSpliced($,1),r?.(C,S),S)});},[]),U=useCallback(()=>{N([]),L(t),r?.(null,[]);},[]),v=useCallback(()=>{g(!1);},[]),O=useCallback(()=>{g(!0);},[]),M=useCallback(()=>{if(!d?.current)return;let C=d.current.getBoundingClientRect();nt(C);let P=H?H.height>E?E:H.height:E,S=window.innerHeight-C.bottom>P,$=C.top>P;st(S?"bottom":$?"top":"bottom"),V($?E:window.innerHeight-C.bottom>E?E:window.innerHeight-C.bottom);},[H?.height]),Q=useCallback(()=>{let C=t.filter(P=>P.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(L(C),y?.current){let P=y.current.getBoundingClientRect();ct(P);}},[t,y?.current]);return useEffect(()=>{L(t);},[t]),a$5(y,()=>{y.current.style.display="none",lt(-1);}),useEffect(()=>{if(d?.current)return M(),d.current.addEventListener("mousedown",M),d.current.addEventListener("input",Q),d.current.addEventListener("focusin",v),d.current.addEventListener("focusout",O),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M),()=>{d.current?.removeEventListener("mousedown",M),d.current?.removeEventListener("input",M),d.current?.removeEventListener("focusout",O),d.current?.removeEventListener("focusin",v),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M);}},[M,O,v,Q]),useEffect(()=>{h&&(N(h),g(!0));},[h]),useEffect(()=>{u||o&&o.length&&!K.current&&(N(o),K.current=!0,g(!0));},[o,u]),jsxs("div",{className:a$2("relative",m),children:[jsx(Bt,{selectedOptions:G,onSelect:r,error:e,helperText:s,label:i,placeholder:a,handleSelect:z,options:t,onInputChange:R,size:A,disabled:b}),T&&jsx(Ht,{selectedOptions:G,disabled:b,error:e,onCleanSelectedOptions:U,size:A}),jsx(Xt,{handleSelect:z,selectedOptions:G,noResultsLabel:n,NoResultsIcon:w,optionDescriptionLines:j,noResultsAsColumn:f,noResultsButtonLabel:k,noResultsButtonOnClick:x,noResultsDescription:c,noResultsDescriptionLines:p})]})};var Oo=t=>jsx(Dt,{children:jsx(Yt,{...t})});var Oe=({children:t,hasDescription:o=!1,disabled:r=!1,hasDivider:e=!1,className:s,onClick:i,...a})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("line-height-[120%] flex flex-row gap-4 pl-4 pr-3",o?"py-3":"py-[0.875rem]",r?"text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",s),onClick:n=>{r||i?.(n);},...a,children:t}),e&&jsx(a$1,{})]}),_=Oe;var Mt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:s,startIcon:i,hasDivider:a=!1,disabled:n=!1,className:w,...c})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,className:w,...c,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:s,disabled:n})]});export{rr as a,Mt as b,mr as c,St as d,Oo as e};
1
+ import {a as a$1}from'./chunk-WGMDH4XX.mjs';import {d}from'./chunk-BRYDEYOA.mjs';import {a}from'./chunk-JGL2V7EX.mjs';import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-W2YOW3FA.mjs';import {a as a$3}from'./chunk-BVHU5ZT3.mjs';import {c}from'./chunk-DXG7NKVL.mjs';import {b}from'./chunk-UBOAGDGR.mjs';import {c as c$1,h}from'./chunk-AF7XWQ5Y.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import bt,{createContext,useMemo,useCallback,useState,useRef,useEffect,useContext,useId}from'react';import*as Ct from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Vt=({title:t,titleLines:o=1,description:r,descriptionLines:e=1,Icon:s,iconAsColumn:i=!0,className:a,...n})=>jsxs("div",{className:a$2("flex gap-2 py-4 pl-4 pr-6",i&&"flex-col items-center gap-1",!i&&!r&&"items-center"),...n,children:[s&&jsx(s,{className:a$2("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$2("flex flex-col gap-1",i&&"text-center"),children:[jsx("p",{className:a$2("leading-[130%] text-neutral-500",!!r&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),r&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:e?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e}:void 0,children:r})]})]}),at=Vt;var Ut=bt.memo(({handleSelect:t,NoResultsIcon:o,noResultsLabel:r,noResultsDescription:e,noResultsDescriptionLines:s,noResultsAsColumn:i,noResultsButtonOnClick:a$3,optionDescriptionLines:n,noResultsButtonLabel:w,filteredOptions:c$1,inputRect:p,inputRef:f,popoverPosition:x,optionsListRef:k,selectedOption:m,options:R,setFilteredOptions:h})=>jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:k,className:"pointer-events-auto fixed z-50 hidden w-full",style:p?{width:`${p.width}px`,left:p.left,top:x==="bottom"?`${p.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-p.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",children:[c$1.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:r,description:e,Icon:o,iconAsColumn:i,descriptionLines:s}),a$3&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:u=>{k.current.style.display="none",f.current.value="",h(R),a$3();},children:w})]})]}),c$1.map(u=>jsx(Mt,{title:u.label,disabled:u.disabled,description:u.description,descriptionLines:n,onClick:()=>t(u),className:a$2(m?.value===u.value&&"bg-primary-200")},u.key??u.value))]})})})),zt=Ut;var qt=336,rr=({options:t,defaultSelectedOption:o,onSelect:r,onClick:e,onInputChange:s,error:i,helperText:a,label:n,placeholder:w,value:c,size:p="lg",optionDescriptionLines:f=1,noResultsLabel:x,noResultsIcon:k,noResultsDescription:m,noResultsDescriptionLines:R,noResultsAsColumn:h,noResultsButtonOnClick:u,noResultsButtonLabel:A,className:j,disabled:b})=>{let[d,y]=useState(o??null),L=useRef(null),g=useRef(null),[nt,st]=useState(),[lt,T]=useState([]),[ct,H]=useState("bottom"),[V,K]=useState(),G=qt,N=useCallback(v=>{L.current.style.display="none",g.current.value=v.label,y(v),r?.(v);},[r]),z=useCallback(()=>{if(!g?.current)return;let v=g.current.getBoundingClientRect();st(v);let O=V?V.height:G,M=window.innerHeight-v.bottom>O,Q=v.top>O;H(M?"bottom":Q?"top":"bottom");},[V?.height]),U=useCallback(()=>{let v=t.filter(O=>O.label.toLowerCase().includes(g?.current?.value.toLowerCase()??""));if(T(v),L?.current){let O=L.current.getBoundingClientRect();K(O);}},[t]);return useEffect(()=>{T(t);},[t]),useEffect(()=>{if(!c){y(null),g.current&&(g.current.value="");return}(!g.current?.value||d?.value!==c.value)&&(y(c),g.current.value=c.label);},[c]),a$5(L,()=>{L.current.style.display="none",d&&g.current&&(g.current.value=d.label);}),useEffect(()=>{if(g?.current)return z(),g.current.addEventListener("mousedown",z),g.current.addEventListener("input",U),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{g.current?.removeEventListener("mousedown",z),g.current?.removeEventListener("input",U),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z);}},[z,U]),jsxs("div",{className:a$2("relative",j),children:[jsx(a$4,{ref:g,autoComplete:"off",list:"",selectMode:!0,onChange:v=>{v.target.value||(y(null),r?.(null)),s?.(v);},onClean:()=>{y(null),T(t),r?.(null);},onClick:v=>{L.current.style.display="flex",e?.(v);},onBlur:()=>{d&&g.current&&(g.current.value=d.label);},label:n,helperText:a,placeholder:w,size:p,error:i,disabled:b}),jsx(zt,{handleSelect:N,noResultsLabel:x,NoResultsIcon:k,optionDescriptionLines:f,noResultsAsColumn:h,noResultsButtonLabel:A,noResultsButtonOnClick:u,noResultsDescription:m,noResultsDescriptionLines:R,filteredOptions:lt,inputRect:nt,inputRef:g,popoverPosition:ct,optionsListRef:L,selectedOption:d,options:t,setFilteredOptions:T})]})};var Kt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:s,disabled:i=!1,className:a,...n})=>jsxs("div",{className:"flex w-full flex-col",...n,children:[jsx("p",{className:a$2(!!e&&"font-medium"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:o}),e&&jsx("p",{className:a$2("text-sm",i?"text-neutral-400":"text-neutral-700"),style:s?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:s}:void 0,children:e})]}),Y=Kt;var mr=({children:t,title:o,titleLines:r,description:e="",descriptionLines:s,startIcon:i,badgeContent:a,hasDivider:n=!1,disabled:w=!1,onSelect:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:w,onClick:c,hasDivider:n,className:a$2(!w&&"cursor-pointer",p),...f,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:s,disabled:w}),jsxs("div",{className:"flex gap-2",children:[a&&jsx(a$3,{content:a,size:"lg",variant:"alert",className:a$2("self-center",w&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var St=({children:t,title:o,titleLines:r,description:e="",descriptionLines:s,startIcon:i,hasDivider:a=!1,disabled:n=!1,checked:w,onCheckedChange:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,...f,className:a$2("pr-6",p),children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:s,disabled:n}),jsx(b,{size:"sm",checked:w,onCheckedChange:c,className:"self-center",disabled:n})]});var E=336,Ft=createContext({inputRef:null,optionsListRef:null,scrollAreaRef:null,autocompleteId:"",inputRect:void 0,showChips:!1,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:E,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),I=()=>{let t=useContext(Ft);if(t===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return t},Dt=({children:t})=>{let o=useRef(null),r=useRef(null),e=useRef(null),s=useId(),[i,a]=useState(),[n,w]=useState(!0),[c,p]=useState([]),[f,x]=useState(-1),[k,m]=useState("bottom"),[R,h]=useState(),[u,A]=useState(E);return jsx(Ft.Provider,{value:{optionsListRef:o,inputRef:r,scrollAreaRef:e,autocompleteId:s,inputRect:i,showChips:n,filteredOptions:c,currentFocus:f,popoverPosition:k,setFilteredOptions:p,setCurrentFocus:x,setShowChips:w,setPopoverPosition:m,setInputRect:a,optionsListHeight:u,optionsListRect:R,setOptionsListRect:h,setOptionsListHeight:A},children:t})};var le=({option:t,onMountWidth:o,size:r})=>{let e=useRef(null);return useEffect(()=>{e.current&&o?.(e.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:e,className:"flex-shrink-0",size:r==="md"?"xs":"sm",hasCloseIcon:!1,children:t.label})},Tt=le;var ge=150,we=bt.memo(({selectedOptions:t,error:o,onCleanSelectedOptions:r,disabled:e,size:s})=>{let{autocompleteId:i,inputRect:a,inputRef:n,optionsListRef:w}=I(),c=bt.useRef(null),[p,f]=bt.useState(new Map),x=useMemo(()=>{if(!a?.width)return [];let m=0,R=a.width-ge,h=0;for(let u=0;u<t.length&&(h+=p.get(u)??0,!(h>R));u++)m++;return t.slice(0,m)},[a?.width,t,p]),k=useCallback(()=>{e||(n?.current?.focus(),w.current.style.display="flex");},[e]);return jsxs("div",{onClick:k,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",e&&"cursor-not-allowed"),style:{maxWidth:a?.width?a?.width:void 0,height:a?.height?a?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:c,children:x.map((m,R)=>jsx(Tt,{option:m,onMountWidth:h=>f(u=>new Map(u).set(R,h)),size:s},`chip-input-${i}-${m.value}`))}),t.length>x.length&&jsx("span",{className:"text-base",children:"..."}),t.length>0&&!o&&jsx(a$3,{content:String(t.length),size:s}),o&&t.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:m=>{m.stopPropagation(),r();}})]})}),Ht=we;var be=bt.memo(({option:t,index:o,onPressOption:r,isSelected:e,optionDescriptionLines:s})=>{let{currentFocus:i,inputRef:a}=I();return jsx(St,{title:t.label,checked:e,disabled:t.disabled,className:i===o?"bg-primary-200":void 0,onMouseDown:n=>{a?.current?.value&&n.preventDefault(),r?.(t,n);},description:t.description,descriptionLines:s})}),ht=be;var xe=bt.memo(({selectedOptions:t,handleSelect:o,NoResultsIcon:r,noResultsLabel:e,noResultsDescription:s,noResultsDescriptionLines:i,noResultsAsColumn:a$2,noResultsButtonOnClick:n,optionDescriptionLines:w,noResultsButtonLabel:c$1})=>{let{popoverPosition:p,scrollAreaRef:f,optionsListRef:x,filteredOptions:k,inputRect:m,autocompleteId:R,inputRef:h,optionsListHeight:u}=I(),A=useCallback(b=>t.some(d=>d.value===b.value),[t]),j=useMemo(()=>t.filter(b=>b.label.toLowerCase().includes(h?.current?.value.toLowerCase()??"")),[t,h?.current?.value]);return jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:x,className:"pointer-events-auto fixed z-50 hidden w-full",style:m?{width:`${m.width}px`,left:m.left,top:p==="bottom"?`${m.bottom}px`:void 0,bottom:p==="top"?`${window.innerHeight-m.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex w-full flex-col rounded-lg bg-neutral-50",style:{maxHeight:u+"px"},ref:f,children:[k.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:e,description:s,Icon:r,iconAsColumn:a$2,descriptionLines:i}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:b=>{x.current.style.display="none",h.current.value="",n();},children:c$1})]})]}),j.map((b,d)=>jsx(ht,{option:b,index:d,onPressOption:(y,L)=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`)),k.map((b,d)=>!t.some(y=>y.value===b.value)&&jsx(ht,{option:b,index:d,onPressOption:(y,L)=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`))]})})})}),Xt=xe;var Le=bt.memo(({selectedOptions:t,onSelect:o,error:r,helperText:e,label:s,placeholder:i,options:a,onInputChange:n,size:w,disabled:c})=>{let{setCurrentFocus:p,setFilteredOptions:f,optionsListRef:x,inputRef:k}=I();return jsx(a$4,{ref:k,autoComplete:"off",list:"",disabled:c,selectMode:!0,onChange:m=>{p(-1),n?.(m.target.value);},onClean:()=>{p(-1),f(a),o?.(null,t);},onClick:()=>{c||(x.current.style.display="flex");},error:r,helperText:e,label:s,placeholder:i,fixedTopLabel:t.length>0,size:w})}),Bt=Le;var Yt=({options:t,defaultSelectedOptions:o,onSelect:r,error:e,helperText:s,label:i,placeholder:a,noResultsLabel:n,noResultsIcon:w,noResultsDescription:c,noResultsDescriptionLines:p,noResultsAsColumn:f,noResultsButtonOnClick:x,noResultsButtonLabel:k,className:m,onInputChange:R,value:h,loading:u,size:A="lg",optionDescriptionLines:j=1,disabled:b})=>{let{inputRef:d,optionsListRef:y,setFilteredOptions:L,setShowChips:g,setInputRect:nt,setPopoverPosition:st,setCurrentFocus:lt,showChips:T,setOptionsListRect:ct,optionsListRect:H,setOptionsListHeight:V}=I(),K=useRef(!1),[G,N]=useState(o??[]),z=useCallback(C=>{N(P=>{let S,$=P.findIndex(jt=>jt.value===C.value);return $===-1?(S=P.concat(C),r?.(C,S),S):(S=P.toSpliced($,1),r?.(C,S),S)});},[]),U=useCallback(()=>{N([]),L(t),r?.(null,[]);},[]),v=useCallback(()=>{g(!1);},[]),O=useCallback(()=>{g(!0);},[]),M=useCallback(()=>{if(!d?.current)return;let C=d.current.getBoundingClientRect();nt(C);let P=H?H.height>E?E:H.height:E,S=window.innerHeight-C.bottom>P,$=C.top>P;st(S?"bottom":$?"top":"bottom"),V($?E:window.innerHeight-C.bottom>E?E:window.innerHeight-C.bottom);},[H?.height]),Q=useCallback(()=>{let C=t.filter(P=>P.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(L(C),y?.current){let P=y.current.getBoundingClientRect();ct(P);}},[t,y?.current]);return useEffect(()=>{L(t);},[t]),a$5(y,()=>{y.current.style.display="none",lt(-1);}),useEffect(()=>{if(d?.current)return M(),d.current.addEventListener("mousedown",M),d.current.addEventListener("input",Q),d.current.addEventListener("focusin",v),d.current.addEventListener("focusout",O),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M),()=>{d.current?.removeEventListener("mousedown",M),d.current?.removeEventListener("input",M),d.current?.removeEventListener("focusout",O),d.current?.removeEventListener("focusin",v),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M);}},[M,O,v,Q]),useEffect(()=>{h&&(N(h),g(!0));},[h]),useEffect(()=>{u||o&&o.length&&!K.current&&(N(o),K.current=!0,g(!0));},[o,u]),jsxs("div",{className:a$2("relative",m),children:[jsx(Bt,{selectedOptions:G,onSelect:r,error:e,helperText:s,label:i,placeholder:a,handleSelect:z,options:t,onInputChange:R,size:A,disabled:b}),T&&jsx(Ht,{selectedOptions:G,disabled:b,error:e,onCleanSelectedOptions:U,size:A}),jsx(Xt,{handleSelect:z,selectedOptions:G,noResultsLabel:n,NoResultsIcon:w,optionDescriptionLines:j,noResultsAsColumn:f,noResultsButtonLabel:k,noResultsButtonOnClick:x,noResultsDescription:c,noResultsDescriptionLines:p})]})};var Oo=t=>jsx(Dt,{children:jsx(Yt,{...t})});var Oe=({children:t,hasDescription:o=!1,disabled:r=!1,hasDivider:e=!1,className:s,onClick:i,...a})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("line-height-[120%] flex flex-row gap-4 pl-4 pr-3",o?"py-3":"py-[0.875rem]",r?"text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",s),onClick:n=>{r||i?.(n);},...a,children:t}),e&&jsx(a$1,{})]}),_=Oe;var Mt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:s,startIcon:i,hasDivider:a=!1,disabled:n=!1,className:w,...c})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,className:w,...c,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:s,disabled:n})]});export{rr as a,Mt as b,mr as c,St as d,Oo as e};
@@ -1 +1 @@
1
- import {a,b as b$2}from'./chunk-VTZ3HCM2.mjs';import {a as a$1,b as b$1,c,g,h,d,e as e$1,i,f,j}from'./chunk-3O53ORIU.mjs';import {a as a$2,b}from'./chunk-WWSXCOGT.mjs';import {e}from'./chunk-AF7XWQ5Y.mjs';import {useMemo}from'react';import {useReactTable,getCoreRowModel,getPaginationRowModel,flexRender}from'@tanstack/react-table';import {jsx,jsxs}from'react/jsx-runtime';function J({columns:g$1,data:d$1,rowsCount:n,pagination:l,onPaginationChange:p,noResults:r,rowsPerPageText:N="Rows per page",ofText:M="of",onNextPageClick:k,onPreviousPageClick:B,disableNextPage:c$1,disablePreviousPage:T,className:A,onRowsPerPageChange:L,...G}){let t=useReactTable({data:d$1,columns:g$1,rowCount:n,state:{pagination:l},onPaginationChange:p,manualPagination:!0,getCoreRowModel:getCoreRowModel(),getPaginationRowModel:getPaginationRowModel()}),E=useMemo(()=>T||!!n&&!t.getCanPreviousPage(),[T,n,l?.pageIndex]),F=useMemo(()=>c$1||!!n&&!t.getCanNextPage(),[c$1,n,l?.pageIndex]);return jsx(a,{children:jsxs(a$1,{className:A,...G,children:[jsxs(a$2,{children:[jsx(b,{orientation:"horizontal"}),jsxs(b$1,{children:[jsx("colgroup",{children:t.getHeaderGroups()[0].headers.map(o=>{let a=o.column.getSize()/t.getHeaderGroups()[0].headers.reduce((i,O)=>i+O.getSize(),0)*100;return jsx("col",{span:1,style:{width:`${a}%`}},o.id)})}),jsx(c,{children:t.getHeaderGroups().map(o=>jsx(g,{children:o.headers.map(a=>{let i=a.column.columnDef;return jsx(h,{children:jsxs("div",{className:"flex items-center",children:[a.isPlaceholder?null:flexRender(i.header,a.getContext()),i.headerInfoTooltip&&jsx(b$2,{size:i.headerInfoTooltipSize,content:i.headerInfoTooltip,className:"font-normal normal-case",children:jsx(e,{className:"ml-1 w-[0.875rem]"})})]})},a.id)})},o.id))}),jsx(d,{children:t.getRowModel().rows?.length?t.getRowModel().rows.map(o=>jsx(e$1,{"data-state":o.getIsSelected()&&"selected",children:o.getVisibleCells().map(a=>jsx(i,{children:flexRender(a.column.columnDef.cell,a.getContext())},a.id))},o.id)):jsx(f,{colSpan:g$1.length,icon:r.icon,Icon:r.Icon,title:r.title,description:r.description})})]})]}),l&&p&&d$1.length>0&&jsx(j,{rowsCount:n,pagination:l,onRowsPerPageChange:o=>{t.setPageSize(o),t.setPageIndex(0),L?.(o);},onPreviousPageClick:()=>{t.previousPage(),B?.();},onNextPageClick:()=>{t.nextPage(),k?.();},disableNextPage:F,disablePreviousPage:E,ofText:M,rowsPerPageText:N})]})})}var ae=J;export{J as a,ae as b};
1
+ import {a,b as b$2}from'./chunk-VTZ3HCM2.mjs';import {a as a$1,b as b$1,c,g,h,d,e as e$1,i,f,j}from'./chunk-3O53ORIU.mjs';import {a as a$2,b}from'./chunk-JGL2V7EX.mjs';import {e}from'./chunk-AF7XWQ5Y.mjs';import {useMemo}from'react';import {useReactTable,getCoreRowModel,getPaginationRowModel,flexRender}from'@tanstack/react-table';import {jsx,jsxs}from'react/jsx-runtime';function J({columns:g$1,data:d$1,rowsCount:n,pagination:l,onPaginationChange:p,noResults:r,rowsPerPageText:N="Rows per page",ofText:M="of",onNextPageClick:k,onPreviousPageClick:B,disableNextPage:c$1,disablePreviousPage:T,className:A,onRowsPerPageChange:L,...G}){let t=useReactTable({data:d$1,columns:g$1,rowCount:n,state:{pagination:l},onPaginationChange:p,manualPagination:!0,getCoreRowModel:getCoreRowModel(),getPaginationRowModel:getPaginationRowModel()}),E=useMemo(()=>T||!!n&&!t.getCanPreviousPage(),[T,n,l?.pageIndex]),F=useMemo(()=>c$1||!!n&&!t.getCanNextPage(),[c$1,n,l?.pageIndex]);return jsx(a,{children:jsxs(a$1,{className:A,...G,children:[jsxs(a$2,{children:[jsx(b,{orientation:"horizontal"}),jsxs(b$1,{children:[jsx("colgroup",{children:t.getHeaderGroups()[0].headers.map(o=>{let a=o.column.getSize()/t.getHeaderGroups()[0].headers.reduce((i,O)=>i+O.getSize(),0)*100;return jsx("col",{span:1,style:{width:`${a}%`}},o.id)})}),jsx(c,{children:t.getHeaderGroups().map(o=>jsx(g,{children:o.headers.map(a=>{let i=a.column.columnDef;return jsx(h,{children:jsxs("div",{className:"flex items-center",children:[a.isPlaceholder?null:flexRender(i.header,a.getContext()),i.headerInfoTooltip&&jsx(b$2,{size:i.headerInfoTooltipSize,content:i.headerInfoTooltip,className:"font-normal normal-case",children:jsx(e,{className:"ml-1 w-[0.875rem]"})})]})},a.id)})},o.id))}),jsx(d,{children:t.getRowModel().rows?.length?t.getRowModel().rows.map(o=>jsx(e$1,{"data-state":o.getIsSelected()&&"selected",children:o.getVisibleCells().map(a=>jsx(i,{children:flexRender(a.column.columnDef.cell,a.getContext())},a.id))},o.id)):jsx(f,{colSpan:g$1.length,icon:r.icon,Icon:r.Icon,title:r.title,description:r.description})})]})]}),l&&p&&d$1.length>0&&jsx(j,{rowsCount:n,pagination:l,onRowsPerPageChange:o=>{t.setPageSize(o),t.setPageIndex(0),L?.(o);},onPreviousPageClick:()=>{t.previousPage(),B?.();},onNextPageClick:()=>{t.nextPage(),k?.();},disableNextPage:F,disablePreviousPage:E,ofText:M,rowsPerPageText:N})]})})}var ae=J;export{J as a,ae as b};
@@ -1,4 +1,4 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var y=require('react'),reactTable=require('@tanstack/react-table'),A=require('@radix-ui/react-scroll-area'),jsxRuntime=require('react/jsx-runtime'),reactTooltip=require('@radix-ui/react-tooltip');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var y__namespace=/*#__PURE__*/_interopNamespace(y);var A__namespace=/*#__PURE__*/_interopNamespace(A);var he=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Z=(...e)=>e.filter((a,t,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===t).join(" ").trim();var Se={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"};var Pe=y.forwardRef(({color:e="currentColor",size:a=24,strokeWidth:t=2,absoluteStrokeWidth:o,className:u="",children:l,iconNode:r,...d},f)=>y.createElement("svg",{ref:f,...Se,width:a,height:a,stroke:e,strokeWidth:o?Number(t)*24/Number(a):t,className:Z("lucide",u),...d},[...r.map(([c,I])=>y.createElement(c,I)),...Array.isArray(l)?l:[l]]));var v=(e,a)=>{let t=y.forwardRef(({className:o,...u},l)=>y.createElement(Pe,{ref:l,iconNode:a,className:Z(`lucide-${he(e)}`,o),...u}));return t.displayName=`${e}`,t};var O=v("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var G=v("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var z=v("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var be=z;var ke=G,Ae=O;function Me(e){var a,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var u=e.length;for(a=0;a<u;a++)e[a]&&(t=Me(e[a]))&&(o&&(o+=" "),o+=t);}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function ye(){for(var e,a,t=0,o="",u=arguments.length;t<u;t++)(e=arguments[t])&&(a=Me(e))&&(o&&(o+=" "),o+=a);return o}var te="-",Je=e=>{let a=$e(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return {getClassGroupId:r=>{let d=r.split(te);return d[0]===""&&d.length!==1&&d.shift(),Re(d,a)||Qe(r)},getConflictingClassGroupIds:(r,d)=>{let f=t[r]||[];return d&&o[r]?[...f,...o[r]]:f}}},Re=(e,a)=>{if(e.length===0)return a.classGroupId;let t=e[0],o=a.nextPart.get(t),u=o?Re(e.slice(1),o):void 0;if(u)return u;if(a.validators.length===0)return;let l=e.join(te);return a.validators.find(({validator:r})=>r(l))?.classGroupId},Be=/^\[(.+)\]$/,Qe=e=>{if(Be.test(e)){let a=Be.exec(e)[1],t=a?.substring(0,a.indexOf(":"));if(t)return "arbitrary.."+t}},$e=e=>{let{theme:a,prefix:t}=e,o={nextPart:new Map,validators:[]};return _e(Object.entries(e.classGroups),t).forEach(([l,r])=>{ae(r,o,l,a);}),o},ae=(e,a,t,o)=>{e.forEach(u=>{if(typeof u=="string"){let l=u===""?a:Te(a,u);l.classGroupId=t;return}if(typeof u=="function"){if(je(u)){ae(u(o),a,t,o);return}a.validators.push({validator:u,classGroupId:t});return}Object.entries(u).forEach(([l,r])=>{ae(r,Te(a,l),t,o);});});},Te=(e,a)=>{let t=e;return a.split(te).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o);}),t},je=e=>e.isThemeGetter,_e=(e,a)=>a?e.map(([t,o])=>{let u=o.map(l=>typeof l=="string"?a+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([r,d])=>[a+r,d])):l);return [t,u]}):e,Ye=e=>{if(e<1)return {get:()=>{},set:()=>{}};let a=0,t=new Map,o=new Map,u=(l,r)=>{t.set(l,r),a++,a>e&&(a=0,o=t,t=new Map);};return {get(l){let r=t.get(l);if(r!==void 0)return r;if((r=o.get(l))!==void 0)return u(l,r),r},set(l,r){t.has(l)?t.set(l,r):u(l,r);}}},Fe="!",ea=e=>{let{separator:a,experimentalParseClassName:t}=e,o=a.length===1,u=a[0],l=a.length,r=d=>{let f=[],c=0,I=0,g;for(let x=0;x<d.length;x++){let C=d[x];if(c===0){if(C===u&&(o||d.slice(x,x+l)===a)){f.push(d.slice(I,x)),I=x+l;continue}if(C==="/"){g=x;continue}}C==="["?c++:C==="]"&&c--;}let w=f.length===0?d:d.substring(I),M=w.startsWith(Fe),k=M?w.substring(1):w,i=g&&g>I?g-I:void 0;return {modifiers:f,hasImportantModifier:M,baseClassName:k,maybePostfixModifierPosition:i}};return t?d=>t({className:d,parseClassName:r}):r},aa=e=>{if(e.length<=1)return e;let a=[],t=[];return e.forEach(o=>{o[0]==="["?(a.push(...t.sort(),o),t=[]):t.push(o);}),a.push(...t.sort()),a},ta=e=>({cache:Ye(e.cacheSize),parseClassName:ea(e),...Je(e)}),oa=/\s+/,la=(e,a)=>{let{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:u}=a,l=[],r=e.trim().split(oa),d="";for(let f=r.length-1;f>=0;f-=1){let c=r[f],{modifiers:I,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:M}=t(c),k=!!M,i=o(k?w.substring(0,M):w);if(!i){if(!k){d=c+(d.length>0?" "+d:d);continue}if(i=o(w),!i){d=c+(d.length>0?" "+d:d);continue}k=!1;}let x=aa(I).join(":"),C=g?x+Fe:x,n=C+i;if(l.includes(n))continue;l.push(n);let h=u(i,k);for(let P=0;P<h.length;++P){let D=h[P];l.push(C+D);}d=c+(d.length>0?" "+d:d);}return d};function ua(){let e=0,a,t,o="";for(;e<arguments.length;)(a=arguments[e++])&&(t=De(a))&&(o&&(o+=" "),o+=t);return o}var De=e=>{if(typeof e=="string")return e;let a,t="";for(let o=0;o<e.length;o++)e[o]&&(a=De(e[o]))&&(t&&(t+=" "),t+=a);return t};function da(e,...a){let t,o,u,l=r;function r(f){let c=a.reduce((I,g)=>g(I),e());return t=ta(c),o=t.cache.get,u=t.cache.set,l=d,d(f)}function d(f){let c=o(f);if(c)return c;let I=la(f,t);return u(f,I),I}return function(){return l(ua.apply(null,arguments))}}var p=e=>{let a=t=>t[e]||[];return a.isThemeGetter=!0,a},ve=/^\[(?:([a-z-]+):)?(.+)\]$/i,ra=/^\d+\/\d+$/,sa=new Set(["px","full","screen"]),fa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ia=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ca=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,na=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,T=e=>q(e)||sa.has(e)||ra.test(e),R=e=>U(e,"length",Sa),q=e=>!!e&&!Number.isNaN(Number(e)),ee=e=>U(e,"number",q),E=e=>!!e&&Number.isInteger(Number(e)),ma=e=>e.endsWith("%")&&q(e.slice(0,-1)),s=e=>ve.test(e),F=e=>fa.test(e),La=new Set(["length","size","percentage"]),xa=e=>U(e,La,qe),Ia=e=>U(e,"position",qe),Ca=new Set(["image","url"]),ga=e=>U(e,Ca,Pa),ha=e=>U(e,"",wa),V=()=>!0,U=(e,a,t)=>{let o=ve.exec(e);return o?o[1]?typeof a=="string"?o[1]===a:a.has(o[1]):t(o[2]):!1},Sa=e=>ia.test(e)&&!ca.test(e),qe=()=>!1,wa=e=>na.test(e),Pa=e=>pa.test(e);var ba=()=>{let e=p("colors"),a=p("spacing"),t=p("blur"),o=p("brightness"),u=p("borderColor"),l=p("borderRadius"),r=p("borderSpacing"),d=p("borderWidth"),f=p("contrast"),c=p("grayscale"),I=p("hueRotate"),g=p("invert"),w=p("gap"),M=p("gradientColorStops"),k=p("gradientColorStopPositions"),i=p("inset"),x=p("margin"),C=p("opacity"),n=p("padding"),h=p("saturate"),P=p("scale"),D=p("sepia"),pe=p("skew"),me=p("space"),Le=p("translate"),$=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",s,a],m=()=>[s,a],xe=()=>["",T,R],X=()=>["auto",q,s],Ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",s],ge=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[q,s];return {cacheSize:500,separator:":",theme:{colors:[V],spacing:[T,R],blur:["none","",F,s],brightness:B(),borderColor:[e],borderRadius:["none","","full",F,s],borderSpacing:m(),borderWidth:xe(),contrast:B(),grayscale:H(),hueRotate:B(),invert:H(),gap:m(),gradientColorStops:[e],gradientColorStopPositions:[ma,R],inset:_(),margin:_(),opacity:B(),padding:m(),saturate:B(),scale:B(),sepia:H(),skew:B(),space:m(),translate:m()},classGroups:{aspect:[{aspect:["auto","square","video",s]}],container:["container"],columns:[{columns:[F]}],"break-after":[{"break-after":ge()}],"break-before":[{"break-before":ge()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Ie(),s]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[i]}],"inset-x":[{"inset-x":[i]}],"inset-y":[{"inset-y":[i]}],start:[{start:[i]}],end:[{end:[i]}],top:[{top:[i]}],right:[{right:[i]}],bottom:[{bottom:[i]}],left:[{left:[i]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",E,s]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",s]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",E,s]}],"grid-cols":[{"grid-cols":[V]}],"col-start-end":[{col:["auto",{span:["full",E,s]},s]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[V]}],"row-start-end":[{row:["auto",{span:[E,s]},s]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",s]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",s]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[n]}],px:[{px:[n]}],py:[{py:[n]}],ps:[{ps:[n]}],pe:[{pe:[n]}],pt:[{pt:[n]}],pr:[{pr:[n]}],pb:[{pb:[n]}],pl:[{pl:[n]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[me]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[me]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",s,a]}],"min-w":[{"min-w":[s,a,"min","max","fit"]}],"max-w":[{"max-w":[s,a,"none","full","min","max","fit","prose",{screen:[F]},F]}],h:[{h:[s,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[s,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[s,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[s,a,"auto","min","max","fit"]}],"font-size":[{text:["base",F,R]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ee]}],"font-family":[{font:[V]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",s]}],"line-clamp":[{"line-clamp":["none",q,ee]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",T,s]}],"list-image":[{"list-image":["none",s]}],"list-style-type":[{list:["none","disc","decimal",s]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",T,R]}],"underline-offset":[{"underline-offset":["auto",T,s]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:m()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",s]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",s]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ie(),Ia]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",xa]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ga]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[M]}],"gradient-via":[{via:[M]}],"gradient-to":[{to:[M]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:K()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[T,s]}],"outline-w":[{outline:[T,R]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[T,R]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",F,ha]}],"shadow-color":[{shadow:[V]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ce()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",F,s]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[I]}],invert:[{invert:[g]}],saturate:[{saturate:[h]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[h]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-x":[{"border-spacing-x":[r]}],"border-spacing-y":[{"border-spacing-y":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",s]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",s]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",s]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[E,s]}],"translate-x":[{"translate-x":[Le]}],"translate-y":[{"translate-y":[Le]}],"skew-x":[{"skew-x":[pe]}],"skew-y":[{"skew-y":[pe]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",s]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",s]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":m()}],"scroll-mx":[{"scroll-mx":m()}],"scroll-my":[{"scroll-my":m()}],"scroll-ms":[{"scroll-ms":m()}],"scroll-me":[{"scroll-me":m()}],"scroll-mt":[{"scroll-mt":m()}],"scroll-mr":[{"scroll-mr":m()}],"scroll-mb":[{"scroll-mb":m()}],"scroll-ml":[{"scroll-ml":m()}],"scroll-p":[{"scroll-p":m()}],"scroll-px":[{"scroll-px":m()}],"scroll-py":[{"scroll-py":m()}],"scroll-ps":[{"scroll-ps":m()}],"scroll-pe":[{"scroll-pe":m()}],"scroll-pt":[{"scroll-pt":m()}],"scroll-pr":[{"scroll-pr":m()}],"scroll-pb":[{"scroll-pb":m()}],"scroll-pl":[{"scroll-pl":m()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",s]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[T,R,ee]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ue=da(ba);function S(...e){return Ue(ye(e))}var oe=y.forwardRef(({className:e,children:a,onScrollEnd:t,isInfiniteScroll:o=!1,viewPortClassName:u,...l},r)=>{let d=y.useRef(null);return y.useEffect(()=>{if(!o)return;let f=()=>{if(d.current){let{scrollTop:I,scrollHeight:g,clientHeight:w}=d.current;I+w>=g-10&&t?.();}},c=d.current;return c?.addEventListener("scroll",f),()=>{c?.removeEventListener("scroll",f);}},[t,o]),y.useImperativeHandle(r,()=>d.current,[d]),jsxRuntime.jsxs(A__namespace.Root,{className:S("relative overflow-hidden",e),...l,children:[jsxRuntime.jsx(A__namespace.Viewport,{ref:d,className:S("h-full w-full rounded-[inherit] [&>div]:!flex [&>div]:h-full [&>div]:flex-col",u),children:a}),jsxRuntime.jsx(J,{forceMount:o},o?d.current?.scrollHeight:1),jsxRuntime.jsx(A__namespace.Corner,{})]})});oe.displayName=A__namespace.Root.displayName;var J=y.forwardRef(({className:e,orientation:a="vertical",...t},o)=>jsxRuntime.jsx(A__namespace.ScrollAreaScrollbar,{ref:o,orientation:a,className:S("flex touch-none select-none bg-neutral-100 transition-colors",a==="vertical"&&"h-full w-4 py-2",a==="horizontal"&&"h-4 flex-col px-2",e),...t,children:jsxRuntime.jsx(A__namespace.ScrollAreaThumb,{className:S("relative flex-1 rounded bg-primary-500",a==="vertical"&&"mx-1 w-2",a==="horizontal"&&"my-1 h-2")})}));J.displayName=A__namespace.ScrollAreaScrollbar.displayName;var ze=reactTooltip.TooltipProvider,Ee=({children:e,content:a,open:t,defaultOpen:o,onOpenChange:u,className:l,size:r="md",align:d="center",side:f="bottom",...c})=>jsxRuntime.jsxs(reactTooltip.Root,{open:t,defaultOpen:o,onOpenChange:u,children:[jsxRuntime.jsx(reactTooltip.TooltipTrigger,{asChild:!0,children:e}),jsxRuntime.jsxs(reactTooltip.TooltipContent,{className:S("max-w-[20.5rem] whitespace-break-spaces rounded-lg bg-neutral-900 text-sm leading-[120%] text-neutral-50",r==="sm"&&"p-2",r==="md"&&"p-4",f==="top"&&"text-center",f==="bottom"&&"text-center",f==="right"&&"text-left",f==="right"&&"text-right",l),side:f,align:d,...c,children:[a,jsxRuntime.jsx(reactTooltip.TooltipArrow,{width:16,height:8,className:"fill-neutral-900"})]})]});var le=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("div",{ref:t,className:S("flex flex-col overflow-hidden rounded-2xl border border-primary-200 bg-neutral-50",e),...a}));le.displayName="TableContainer";var ue=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("div",{className:"relative w-full overflow-auto",children:jsxRuntime.jsx("table",{ref:t,className:S("w-full table-auto overflow-hidden text-neutral-900",e),...a})}));ue.displayName="Table";var de=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("thead",{ref:t,className:e,...a}));de.displayName="TableHeader";var re=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("tbody",{ref:t,className:e,...a}));re.displayName="TableBody";var se=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("tr",{ref:t,className:S("text-base font-normal leading-[130%]",e),...a}));se.displayName="TableBodyRow";var fe=y__namespace.forwardRef(({colSpan:e,Icon:a,icon:t,title:o,description:u,...l},r)=>jsxRuntime.jsx("tr",{ref:r,...l,children:jsxRuntime.jsx("td",{colSpan:e,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center px-10 pb-12 pt-10 font-normal leading-[120%] text-neutral-500",children:[t,a&&jsxRuntime.jsx(a,{size:40,className:"text-neutral-300"}),jsxRuntime.jsx("span",{className:"mt-2 font-semibold leading-[130%] text-neutral-500",children:o}),u&&jsxRuntime.jsx("span",{className:"leading-[130%] text-neutral-500",children:u})]})})}));fe.displayName="TableBodyRowNoResults";var ie=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("tr",{ref:t,className:S("bg-primary-100",e),...a}));ie.displayName="TableHeaderRow";var ce=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("th",{ref:t,className:S("h-10 px-3 py-1 text-left text-sm font-semibold uppercase leading-[130%]",e),...a}));ce.displayName="TableHead";var ne=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("td",{ref:t,className:S("h-18 px-3 py-1",e),...a}));ne.displayName="TableCell";var Ve=({disableNextPage:e,disablePreviousPage:a,onNextPageClick:t,onPreviousPageClick:o,pagination:u,rowsCount:l,rowsPerPageText:r="Rows per page",ofText:d="of",onRowsPerPageChange:f})=>jsxRuntime.jsxs("div",{className:"flex h-8 flex-1 items-center justify-end gap-6 border-t-1 border-t-primary-200",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("span",{className:"mr-2 text-sm font-semibold leading-[130%] text-neutral-700",children:`${r}:`}),jsxRuntime.jsxs("select",{className:"text-sm leading-[130%]",value:u.pageSize,id:"rows_per_page",onChange:c=>{f?.(Number(c.target.value));},children:[jsxRuntime.jsx("option",{value:"10",children:"10"}),jsxRuntime.jsx("option",{value:"25",children:"25"}),jsxRuntime.jsx("option",{value:"50",children:"50"})]})]}),!!l&&jsxRuntime.jsx("span",{className:"text-sm font-normal leading-[130%] text-neutral-700",children:`${u?.pageIndex*u.pageSize+1}-${l>u?.pageIndex*u.pageSize+u.pageSize?u?.pageIndex*u.pageSize+u.pageSize:l} ${d} ${l}`}),!l&&jsxRuntime.jsx("span",{className:"text-sm font-normal leading-[120%] tracking-sm text-neutral-700",children:`${u.pageIndex>0?"... ":""}${u.pageIndex+1}${e?"":" ..."}`}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("button",{type:"button",disabled:a,className:"flex h-8 cursor-pointer items-center px-3 disabled:cursor-not-allowed",onClick:o,children:jsxRuntime.jsx(Ae,{className:S("h-[1.125rem] w-[1.125rem] text-neutral-900",a&&"text-neutral-500")})}),jsxRuntime.jsx("button",{type:"button",disabled:e,className:"flex h-8 cursor-pointer items-center px-3 disabled:cursor-not-allowed",onClick:t,children:jsxRuntime.jsx(ke,{className:S("h-[1.125rem] w-[1.125rem] text-neutral-900",e&&"text-neutral-500")})})]})]});function Ha({columns:e,data:a,rowsCount:t,pagination:o,onPaginationChange:u,noResults:l,rowsPerPageText:r="Rows per page",ofText:d="of",onNextPageClick:f,onPreviousPageClick:c,disableNextPage:I,disablePreviousPage:g,className:w,onRowsPerPageChange:M,...k}){let i=reactTable.useReactTable({data:a,columns:e,rowCount:t,state:{pagination:o},onPaginationChange:u,manualPagination:!0,getCoreRowModel:reactTable.getCoreRowModel(),getPaginationRowModel:reactTable.getPaginationRowModel()}),x=y.useMemo(()=>g||!!t&&!i.getCanPreviousPage(),[g,t,o?.pageIndex]),C=y.useMemo(()=>I||!!t&&!i.getCanNextPage(),[I,t,o?.pageIndex]);return jsxRuntime.jsx(ze,{children:jsxRuntime.jsxs(le,{className:w,...k,children:[jsxRuntime.jsxs(oe,{children:[jsxRuntime.jsx(J,{orientation:"horizontal"}),jsxRuntime.jsxs(ue,{children:[jsxRuntime.jsx("colgroup",{children:i.getHeaderGroups()[0].headers.map(n=>{let h=n.column.getSize()/i.getHeaderGroups()[0].headers.reduce((P,D)=>P+D.getSize(),0)*100;return jsxRuntime.jsx("col",{span:1,style:{width:`${h}%`}},n.id)})}),jsxRuntime.jsx(de,{children:i.getHeaderGroups().map(n=>jsxRuntime.jsx(ie,{children:n.headers.map(h=>{let P=h.column.columnDef;return jsxRuntime.jsx(ce,{children:jsxRuntime.jsxs("div",{className:"flex items-center",children:[h.isPlaceholder?null:reactTable.flexRender(P.header,h.getContext()),P.headerInfoTooltip&&jsxRuntime.jsx(Ee,{size:P.headerInfoTooltipSize,content:P.headerInfoTooltip,className:"font-normal normal-case",children:jsxRuntime.jsx(be,{className:"ml-1 w-[0.875rem]"})})]})},h.id)})},n.id))}),jsxRuntime.jsx(re,{children:i.getRowModel().rows?.length?i.getRowModel().rows.map(n=>jsxRuntime.jsx(se,{"data-state":n.getIsSelected()&&"selected",children:n.getVisibleCells().map(h=>jsxRuntime.jsx(ne,{children:reactTable.flexRender(h.column.columnDef.cell,h.getContext())},h.id))},n.id)):jsxRuntime.jsx(fe,{colSpan:e.length,icon:l.icon,Icon:l.Icon,title:l.title,description:l.description})})]})]}),o&&u&&a.length>0&&jsxRuntime.jsx(Ve,{rowsCount:t,pagination:o,onRowsPerPageChange:n=>{i.setPageSize(n),i.setPageIndex(0),M?.(n);},onPreviousPageClick:()=>{i.previousPage(),c?.();},onNextPageClick:()=>{i.nextPage(),f?.();},disableNextPage:C,disablePreviousPage:x,ofText:d,rowsPerPageText:r})]})})}var $t=Ha;/*! Bundled license information:
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var y=require('react'),reactTable=require('@tanstack/react-table'),M=require('@radix-ui/react-scroll-area'),jsxRuntime=require('react/jsx-runtime'),reactTooltip=require('@radix-ui/react-tooltip');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var y__namespace=/*#__PURE__*/_interopNamespace(y);var M__namespace=/*#__PURE__*/_interopNamespace(M);var he=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Z=(...e)=>e.filter((a,t,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===t).join(" ").trim();var Se={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"};var Pe=y.forwardRef(({color:e="currentColor",size:a=24,strokeWidth:t=2,absoluteStrokeWidth:o,className:u="",children:l,iconNode:r,...d},f)=>y.createElement("svg",{ref:f,...Se,width:a,height:a,stroke:e,strokeWidth:o?Number(t)*24/Number(a):t,className:Z("lucide",u),...d},[...r.map(([c,x])=>y.createElement(c,x)),...Array.isArray(l)?l:[l]]));var v=(e,a)=>{let t=y.forwardRef(({className:o,...u},l)=>y.createElement(Pe,{ref:l,iconNode:a,className:Z(`lucide-${he(e)}`,o),...u}));return t.displayName=`${e}`,t};var O=v("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var G=v("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var z=v("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var be=z;var ke=G,Ae=O;function Me(e){var a,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var u=e.length;for(a=0;a<u;a++)e[a]&&(t=Me(e[a]))&&(o&&(o+=" "),o+=t);}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function ye(){for(var e,a,t=0,o="",u=arguments.length;t<u;t++)(e=arguments[t])&&(a=Me(e))&&(o&&(o+=" "),o+=a);return o}var te="-",Je=e=>{let a=$e(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return {getClassGroupId:r=>{let d=r.split(te);return d[0]===""&&d.length!==1&&d.shift(),Re(d,a)||Qe(r)},getConflictingClassGroupIds:(r,d)=>{let f=t[r]||[];return d&&o[r]?[...f,...o[r]]:f}}},Re=(e,a)=>{if(e.length===0)return a.classGroupId;let t=e[0],o=a.nextPart.get(t),u=o?Re(e.slice(1),o):void 0;if(u)return u;if(a.validators.length===0)return;let l=e.join(te);return a.validators.find(({validator:r})=>r(l))?.classGroupId},Be=/^\[(.+)\]$/,Qe=e=>{if(Be.test(e)){let a=Be.exec(e)[1],t=a?.substring(0,a.indexOf(":"));if(t)return "arbitrary.."+t}},$e=e=>{let{theme:a,prefix:t}=e,o={nextPart:new Map,validators:[]};return _e(Object.entries(e.classGroups),t).forEach(([l,r])=>{ae(r,o,l,a);}),o},ae=(e,a,t,o)=>{e.forEach(u=>{if(typeof u=="string"){let l=u===""?a:Te(a,u);l.classGroupId=t;return}if(typeof u=="function"){if(je(u)){ae(u(o),a,t,o);return}a.validators.push({validator:u,classGroupId:t});return}Object.entries(u).forEach(([l,r])=>{ae(r,Te(a,l),t,o);});});},Te=(e,a)=>{let t=e;return a.split(te).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o);}),t},je=e=>e.isThemeGetter,_e=(e,a)=>a?e.map(([t,o])=>{let u=o.map(l=>typeof l=="string"?a+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([r,d])=>[a+r,d])):l);return [t,u]}):e,Ye=e=>{if(e<1)return {get:()=>{},set:()=>{}};let a=0,t=new Map,o=new Map,u=(l,r)=>{t.set(l,r),a++,a>e&&(a=0,o=t,t=new Map);};return {get(l){let r=t.get(l);if(r!==void 0)return r;if((r=o.get(l))!==void 0)return u(l,r),r},set(l,r){t.has(l)?t.set(l,r):u(l,r);}}},Fe="!",ea=e=>{let{separator:a,experimentalParseClassName:t}=e,o=a.length===1,u=a[0],l=a.length,r=d=>{let f=[],c=0,x=0,g;for(let I=0;I<d.length;I++){let C=d[I];if(c===0){if(C===u&&(o||d.slice(I,I+l)===a)){f.push(d.slice(x,I)),x=I+l;continue}if(C==="/"){g=I;continue}}C==="["?c++:C==="]"&&c--;}let w=f.length===0?d:d.substring(x),k=w.startsWith(Fe),A=k?w.substring(1):w,i=g&&g>x?g-x:void 0;return {modifiers:f,hasImportantModifier:k,baseClassName:A,maybePostfixModifierPosition:i}};return t?d=>t({className:d,parseClassName:r}):r},aa=e=>{if(e.length<=1)return e;let a=[],t=[];return e.forEach(o=>{o[0]==="["?(a.push(...t.sort(),o),t=[]):t.push(o);}),a.push(...t.sort()),a},ta=e=>({cache:Ye(e.cacheSize),parseClassName:ea(e),...Je(e)}),oa=/\s+/,la=(e,a)=>{let{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:u}=a,l=[],r=e.trim().split(oa),d="";for(let f=r.length-1;f>=0;f-=1){let c=r[f],{modifiers:x,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:k}=t(c),A=!!k,i=o(A?w.substring(0,k):w);if(!i){if(!A){d=c+(d.length>0?" "+d:d);continue}if(i=o(w),!i){d=c+(d.length>0?" "+d:d);continue}A=!1;}let I=aa(x).join(":"),C=g?I+Fe:I,n=C+i;if(l.includes(n))continue;l.push(n);let h=u(i,A);for(let P=0;P<h.length;++P){let D=h[P];l.push(C+D);}d=c+(d.length>0?" "+d:d);}return d};function ua(){let e=0,a,t,o="";for(;e<arguments.length;)(a=arguments[e++])&&(t=De(a))&&(o&&(o+=" "),o+=t);return o}var De=e=>{if(typeof e=="string")return e;let a,t="";for(let o=0;o<e.length;o++)e[o]&&(a=De(e[o]))&&(t&&(t+=" "),t+=a);return t};function da(e,...a){let t,o,u,l=r;function r(f){let c=a.reduce((x,g)=>g(x),e());return t=ta(c),o=t.cache.get,u=t.cache.set,l=d,d(f)}function d(f){let c=o(f);if(c)return c;let x=la(f,t);return u(f,x),x}return function(){return l(ua.apply(null,arguments))}}var p=e=>{let a=t=>t[e]||[];return a.isThemeGetter=!0,a},ve=/^\[(?:([a-z-]+):)?(.+)\]$/i,ra=/^\d+\/\d+$/,sa=new Set(["px","full","screen"]),fa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ia=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ca=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,na=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,T=e=>q(e)||sa.has(e)||ra.test(e),R=e=>U(e,"length",Sa),q=e=>!!e&&!Number.isNaN(Number(e)),ee=e=>U(e,"number",q),E=e=>!!e&&Number.isInteger(Number(e)),ma=e=>e.endsWith("%")&&q(e.slice(0,-1)),s=e=>ve.test(e),F=e=>fa.test(e),La=new Set(["length","size","percentage"]),xa=e=>U(e,La,qe),Ia=e=>U(e,"position",qe),Ca=new Set(["image","url"]),ga=e=>U(e,Ca,Pa),ha=e=>U(e,"",wa),V=()=>!0,U=(e,a,t)=>{let o=ve.exec(e);return o?o[1]?typeof a=="string"?o[1]===a:a.has(o[1]):t(o[2]):!1},Sa=e=>ia.test(e)&&!ca.test(e),qe=()=>!1,wa=e=>na.test(e),Pa=e=>pa.test(e);var ba=()=>{let e=p("colors"),a=p("spacing"),t=p("blur"),o=p("brightness"),u=p("borderColor"),l=p("borderRadius"),r=p("borderSpacing"),d=p("borderWidth"),f=p("contrast"),c=p("grayscale"),x=p("hueRotate"),g=p("invert"),w=p("gap"),k=p("gradientColorStops"),A=p("gradientColorStopPositions"),i=p("inset"),I=p("margin"),C=p("opacity"),n=p("padding"),h=p("saturate"),P=p("scale"),D=p("sepia"),pe=p("skew"),me=p("space"),Le=p("translate"),$=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",s,a],m=()=>[s,a],xe=()=>["",T,R],X=()=>["auto",q,s],Ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",s],ge=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[q,s];return {cacheSize:500,separator:":",theme:{colors:[V],spacing:[T,R],blur:["none","",F,s],brightness:B(),borderColor:[e],borderRadius:["none","","full",F,s],borderSpacing:m(),borderWidth:xe(),contrast:B(),grayscale:H(),hueRotate:B(),invert:H(),gap:m(),gradientColorStops:[e],gradientColorStopPositions:[ma,R],inset:_(),margin:_(),opacity:B(),padding:m(),saturate:B(),scale:B(),sepia:H(),skew:B(),space:m(),translate:m()},classGroups:{aspect:[{aspect:["auto","square","video",s]}],container:["container"],columns:[{columns:[F]}],"break-after":[{"break-after":ge()}],"break-before":[{"break-before":ge()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Ie(),s]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[i]}],"inset-x":[{"inset-x":[i]}],"inset-y":[{"inset-y":[i]}],start:[{start:[i]}],end:[{end:[i]}],top:[{top:[i]}],right:[{right:[i]}],bottom:[{bottom:[i]}],left:[{left:[i]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",E,s]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",s]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",E,s]}],"grid-cols":[{"grid-cols":[V]}],"col-start-end":[{col:["auto",{span:["full",E,s]},s]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[V]}],"row-start-end":[{row:["auto",{span:[E,s]},s]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",s]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",s]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[n]}],px:[{px:[n]}],py:[{py:[n]}],ps:[{ps:[n]}],pe:[{pe:[n]}],pt:[{pt:[n]}],pr:[{pr:[n]}],pb:[{pb:[n]}],pl:[{pl:[n]}],m:[{m:[I]}],mx:[{mx:[I]}],my:[{my:[I]}],ms:[{ms:[I]}],me:[{me:[I]}],mt:[{mt:[I]}],mr:[{mr:[I]}],mb:[{mb:[I]}],ml:[{ml:[I]}],"space-x":[{"space-x":[me]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[me]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",s,a]}],"min-w":[{"min-w":[s,a,"min","max","fit"]}],"max-w":[{"max-w":[s,a,"none","full","min","max","fit","prose",{screen:[F]},F]}],h:[{h:[s,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[s,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[s,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[s,a,"auto","min","max","fit"]}],"font-size":[{text:["base",F,R]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ee]}],"font-family":[{font:[V]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",s]}],"line-clamp":[{"line-clamp":["none",q,ee]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",T,s]}],"list-image":[{"list-image":["none",s]}],"list-style-type":[{list:["none","disc","decimal",s]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",T,R]}],"underline-offset":[{"underline-offset":["auto",T,s]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:m()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",s]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",s]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ie(),Ia]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",xa]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ga]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:K()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[T,s]}],"outline-w":[{outline:[T,R]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[T,R]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",F,ha]}],"shadow-color":[{shadow:[V]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ce()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",F,s]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[g]}],saturate:[{saturate:[h]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[h]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-x":[{"border-spacing-x":[r]}],"border-spacing-y":[{"border-spacing-y":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",s]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",s]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",s]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[E,s]}],"translate-x":[{"translate-x":[Le]}],"translate-y":[{"translate-y":[Le]}],"skew-x":[{"skew-x":[pe]}],"skew-y":[{"skew-y":[pe]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",s]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",s]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":m()}],"scroll-mx":[{"scroll-mx":m()}],"scroll-my":[{"scroll-my":m()}],"scroll-ms":[{"scroll-ms":m()}],"scroll-me":[{"scroll-me":m()}],"scroll-mt":[{"scroll-mt":m()}],"scroll-mr":[{"scroll-mr":m()}],"scroll-mb":[{"scroll-mb":m()}],"scroll-ml":[{"scroll-ml":m()}],"scroll-p":[{"scroll-p":m()}],"scroll-px":[{"scroll-px":m()}],"scroll-py":[{"scroll-py":m()}],"scroll-ps":[{"scroll-ps":m()}],"scroll-pe":[{"scroll-pe":m()}],"scroll-pt":[{"scroll-pt":m()}],"scroll-pr":[{"scroll-pr":m()}],"scroll-pb":[{"scroll-pb":m()}],"scroll-pl":[{"scroll-pl":m()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",s]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[T,R,ee]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ue=da(ba);function S(...e){return Ue(ye(e))}var oe=y.forwardRef(({className:e,children:a,onScrollEnd:t,isInfiniteScroll:o=!1,viewPortClassName:u,viewPortStyle:l,...r},d)=>{let f=y.useRef(null);return y.useEffect(()=>{if(!o)return;let c=()=>{if(f.current){let{scrollTop:g,scrollHeight:w,clientHeight:k}=f.current;g+k>=w-10&&t?.();}},x=f.current;return x?.addEventListener("scroll",c),()=>{x?.removeEventListener("scroll",c);}},[t,o]),y.useImperativeHandle(d,()=>f.current,[f]),jsxRuntime.jsxs(M__namespace.Root,{className:S("relative overflow-hidden",e),...r,children:[jsxRuntime.jsx(M__namespace.Viewport,{ref:f,className:S("h-full w-full rounded-[inherit] [&>div]:!flex [&>div]:h-full [&>div]:flex-col",u),style:l,children:a}),jsxRuntime.jsx(J,{forceMount:o},o?f.current?.scrollHeight:1),jsxRuntime.jsx(M__namespace.Corner,{})]})});oe.displayName=M__namespace.Root.displayName;var J=y.forwardRef(({className:e,orientation:a="vertical",...t},o)=>jsxRuntime.jsx(M__namespace.ScrollAreaScrollbar,{ref:o,orientation:a,className:S("flex touch-none select-none bg-neutral-100 transition-colors",a==="vertical"&&"h-full w-4 py-2",a==="horizontal"&&"h-4 flex-col px-2",e),...t,children:jsxRuntime.jsx(M__namespace.ScrollAreaThumb,{className:S("relative flex-1 rounded bg-primary-500",a==="vertical"&&"mx-1 w-2",a==="horizontal"&&"my-1 h-2")})}));J.displayName=M__namespace.ScrollAreaScrollbar.displayName;var ze=reactTooltip.TooltipProvider,Ee=({children:e,content:a,open:t,defaultOpen:o,onOpenChange:u,className:l,size:r="md",align:d="center",side:f="bottom",...c})=>jsxRuntime.jsxs(reactTooltip.Root,{open:t,defaultOpen:o,onOpenChange:u,children:[jsxRuntime.jsx(reactTooltip.TooltipTrigger,{asChild:!0,children:e}),jsxRuntime.jsxs(reactTooltip.TooltipContent,{className:S("max-w-[20.5rem] whitespace-break-spaces rounded-lg bg-neutral-900 text-sm leading-[120%] text-neutral-50",r==="sm"&&"p-2",r==="md"&&"p-4",f==="top"&&"text-center",f==="bottom"&&"text-center",f==="right"&&"text-left",f==="right"&&"text-right",l),side:f,align:d,...c,children:[a,jsxRuntime.jsx(reactTooltip.TooltipArrow,{width:16,height:8,className:"fill-neutral-900"})]})]});var le=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("div",{ref:t,className:S("flex flex-col overflow-hidden rounded-2xl border border-primary-200 bg-neutral-50",e),...a}));le.displayName="TableContainer";var ue=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("div",{className:"relative w-full overflow-auto",children:jsxRuntime.jsx("table",{ref:t,className:S("w-full table-auto overflow-hidden text-neutral-900",e),...a})}));ue.displayName="Table";var de=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("thead",{ref:t,className:e,...a}));de.displayName="TableHeader";var re=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("tbody",{ref:t,className:e,...a}));re.displayName="TableBody";var se=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("tr",{ref:t,className:S("text-base font-normal leading-[130%]",e),...a}));se.displayName="TableBodyRow";var fe=y__namespace.forwardRef(({colSpan:e,Icon:a,icon:t,title:o,description:u,...l},r)=>jsxRuntime.jsx("tr",{ref:r,...l,children:jsxRuntime.jsx("td",{colSpan:e,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center px-10 pb-12 pt-10 font-normal leading-[120%] text-neutral-500",children:[t,a&&jsxRuntime.jsx(a,{size:40,className:"text-neutral-300"}),jsxRuntime.jsx("span",{className:"mt-2 font-semibold leading-[130%] text-neutral-500",children:o}),u&&jsxRuntime.jsx("span",{className:"leading-[130%] text-neutral-500",children:u})]})})}));fe.displayName="TableBodyRowNoResults";var ie=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("tr",{ref:t,className:S("bg-primary-100",e),...a}));ie.displayName="TableHeaderRow";var ce=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("th",{ref:t,className:S("h-10 px-3 py-1 text-left text-sm font-semibold uppercase leading-[130%]",e),...a}));ce.displayName="TableHead";var ne=y__namespace.forwardRef(({className:e,...a},t)=>jsxRuntime.jsx("td",{ref:t,className:S("h-18 px-3 py-1",e),...a}));ne.displayName="TableCell";var Ve=({disableNextPage:e,disablePreviousPage:a,onNextPageClick:t,onPreviousPageClick:o,pagination:u,rowsCount:l,rowsPerPageText:r="Rows per page",ofText:d="of",onRowsPerPageChange:f})=>jsxRuntime.jsxs("div",{className:"flex h-8 flex-1 items-center justify-end gap-6 border-t-1 border-t-primary-200",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("span",{className:"mr-2 text-sm font-semibold leading-[130%] text-neutral-700",children:`${r}:`}),jsxRuntime.jsxs("select",{className:"text-sm leading-[130%]",value:u.pageSize,id:"rows_per_page",onChange:c=>{f?.(Number(c.target.value));},children:[jsxRuntime.jsx("option",{value:"10",children:"10"}),jsxRuntime.jsx("option",{value:"25",children:"25"}),jsxRuntime.jsx("option",{value:"50",children:"50"})]})]}),!!l&&jsxRuntime.jsx("span",{className:"text-sm font-normal leading-[130%] text-neutral-700",children:`${u?.pageIndex*u.pageSize+1}-${l>u?.pageIndex*u.pageSize+u.pageSize?u?.pageIndex*u.pageSize+u.pageSize:l} ${d} ${l}`}),!l&&jsxRuntime.jsx("span",{className:"text-sm font-normal leading-[120%] tracking-sm text-neutral-700",children:`${u.pageIndex>0?"... ":""}${u.pageIndex+1}${e?"":" ..."}`}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("button",{type:"button",disabled:a,className:"flex h-8 cursor-pointer items-center px-3 disabled:cursor-not-allowed",onClick:o,children:jsxRuntime.jsx(Ae,{className:S("h-[1.125rem] w-[1.125rem] text-neutral-900",a&&"text-neutral-500")})}),jsxRuntime.jsx("button",{type:"button",disabled:e,className:"flex h-8 cursor-pointer items-center px-3 disabled:cursor-not-allowed",onClick:t,children:jsxRuntime.jsx(ke,{className:S("h-[1.125rem] w-[1.125rem] text-neutral-900",e&&"text-neutral-500")})})]})]});function Ha({columns:e,data:a,rowsCount:t,pagination:o,onPaginationChange:u,noResults:l,rowsPerPageText:r="Rows per page",ofText:d="of",onNextPageClick:f,onPreviousPageClick:c,disableNextPage:x,disablePreviousPage:g,className:w,onRowsPerPageChange:k,...A}){let i=reactTable.useReactTable({data:a,columns:e,rowCount:t,state:{pagination:o},onPaginationChange:u,manualPagination:!0,getCoreRowModel:reactTable.getCoreRowModel(),getPaginationRowModel:reactTable.getPaginationRowModel()}),I=y.useMemo(()=>g||!!t&&!i.getCanPreviousPage(),[g,t,o?.pageIndex]),C=y.useMemo(()=>x||!!t&&!i.getCanNextPage(),[x,t,o?.pageIndex]);return jsxRuntime.jsx(ze,{children:jsxRuntime.jsxs(le,{className:w,...A,children:[jsxRuntime.jsxs(oe,{children:[jsxRuntime.jsx(J,{orientation:"horizontal"}),jsxRuntime.jsxs(ue,{children:[jsxRuntime.jsx("colgroup",{children:i.getHeaderGroups()[0].headers.map(n=>{let h=n.column.getSize()/i.getHeaderGroups()[0].headers.reduce((P,D)=>P+D.getSize(),0)*100;return jsxRuntime.jsx("col",{span:1,style:{width:`${h}%`}},n.id)})}),jsxRuntime.jsx(de,{children:i.getHeaderGroups().map(n=>jsxRuntime.jsx(ie,{children:n.headers.map(h=>{let P=h.column.columnDef;return jsxRuntime.jsx(ce,{children:jsxRuntime.jsxs("div",{className:"flex items-center",children:[h.isPlaceholder?null:reactTable.flexRender(P.header,h.getContext()),P.headerInfoTooltip&&jsxRuntime.jsx(Ee,{size:P.headerInfoTooltipSize,content:P.headerInfoTooltip,className:"font-normal normal-case",children:jsxRuntime.jsx(be,{className:"ml-1 w-[0.875rem]"})})]})},h.id)})},n.id))}),jsxRuntime.jsx(re,{children:i.getRowModel().rows?.length?i.getRowModel().rows.map(n=>jsxRuntime.jsx(se,{"data-state":n.getIsSelected()&&"selected",children:n.getVisibleCells().map(h=>jsxRuntime.jsx(ne,{children:reactTable.flexRender(h.column.columnDef.cell,h.getContext())},h.id))},n.id)):jsxRuntime.jsx(fe,{colSpan:e.length,icon:l.icon,Icon:l.Icon,title:l.title,description:l.description})})]})]}),o&&u&&a.length>0&&jsxRuntime.jsx(Ve,{rowsCount:t,pagination:o,onRowsPerPageChange:n=>{i.setPageSize(n),i.setPageIndex(0),k?.(n);},onPreviousPageClick:()=>{i.previousPage(),c?.();},onNextPageClick:()=>{i.nextPage(),f?.();},disableNextPage:C,disablePreviousPage:I,ofText:d,rowsPerPageText:r})]})})}var $t=Ha;/*! Bundled license information:
2
2
 
3
3
  lucide-react/dist/esm/shared/src/utils.js:
4
4
  (**
@@ -1 +1 @@
1
- export{a as DataTable,b as default}from'./chunk-WJH3L5FN.mjs';import'./chunk-VTZ3HCM2.mjs';import'./chunk-3O53ORIU.mjs';import'./chunk-WWSXCOGT.mjs';import'./chunk-AF7XWQ5Y.mjs';import'./chunk-4SUP4N33.mjs';import'./chunk-2WINTZSS.mjs';
1
+ export{a as DataTable,b as default}from'./chunk-WEIBRDLJ.mjs';import'./chunk-VTZ3HCM2.mjs';import'./chunk-3O53ORIU.mjs';import'./chunk-JGL2V7EX.mjs';import'./chunk-AF7XWQ5Y.mjs';import'./chunk-4SUP4N33.mjs';import'./chunk-2WINTZSS.mjs';